From 56aabc58cb16ae6c8d6cf8afc6720a49dd05d644 Mon Sep 17 00:00:00 2001 From: prakriti5dhang Date: Thu, 12 Sep 2024 17:24:36 +0530 Subject: [PATCH] exp3 --- README.md | 27 +- experiment-descriptor.json | 57 + experiment/aim.md | 10 +- experiment/contributors.md | 24 +- experiment/experiment-name.md | 2 +- experiment/images/mono_ckt_th.png | Bin 0 -> 86994 bytes experiment/images/monostable_prc.png | Bin 0 -> 44807 bytes experiment/images/outputwavfrm_mono.png | Bin 0 -> 89625 bytes .../pin-configuration-555-timer-8-pin.png | Bin 0 -> 2577 bytes experiment/images/post_quiz1.png | Bin 0 -> 27888 bytes experiment/posttest.json | 67 +- experiment/pretest.json | 70 +- experiment/procedure.md | 22 +- .../css/cktconnection_monostable.css | 169 + .../simulation/css/monostable_astable.css | 132 + .../simulation/css/simulationtabcss.css | 28 + experiment/simulation/images/Print Filled.png | Bin 0 -> 476 bytes experiment/simulation/images/monostable.png | Bin 0 -> 18581 bytes experiment/simulation/js/canvasjs.min.js | 5175 ++++++ .../simulation/js/cktconnection_monostable.js | 649 + experiment/simulation/js/graph.ob.js | 1 + experiment/simulation/js/graph_use.ob.js | 1 + experiment/simulation/js/jquery.knob.min.js | 438 + .../js/jquery_files/jquery-1.7.1.min.js | 4 + .../js/jquery_files/jquery.jqplot.min.js | 533 + .../simulation/js/jquery_files/jquery.min.js | 13 + experiment/simulation/js/jsplumb1.js | 15293 ++++++++++++++++ experiment/simulation/js/monostablecal.js | 300 + experiment/simulation/littledot.png | Bin 0 -> 1289 bytes .../simulation/monostable_multivibrator.html | 184 + experiment/theory.md | 51 +- 31 files changed, 23180 insertions(+), 70 deletions(-) create mode 100644 experiment-descriptor.json create mode 100644 experiment/images/mono_ckt_th.png create mode 100644 experiment/images/monostable_prc.png create mode 100644 experiment/images/outputwavfrm_mono.png create mode 100644 experiment/images/pin-configuration-555-timer-8-pin.png create mode 100644 experiment/images/post_quiz1.png create mode 100644 experiment/simulation/css/cktconnection_monostable.css create mode 100644 experiment/simulation/css/monostable_astable.css create mode 100644 experiment/simulation/css/simulationtabcss.css create mode 100644 experiment/simulation/images/Print Filled.png create mode 100644 experiment/simulation/images/monostable.png create mode 100644 experiment/simulation/js/canvasjs.min.js create mode 100644 experiment/simulation/js/cktconnection_monostable.js create mode 100644 experiment/simulation/js/graph.ob.js create mode 100644 experiment/simulation/js/graph_use.ob.js create mode 100644 experiment/simulation/js/jquery.knob.min.js create mode 100644 experiment/simulation/js/jquery_files/jquery-1.7.1.min.js create mode 100644 experiment/simulation/js/jquery_files/jquery.jqplot.min.js create mode 100644 experiment/simulation/js/jquery_files/jquery.min.js create mode 100644 experiment/simulation/js/jsplumb1.js create mode 100644 experiment/simulation/js/monostablecal.js create mode 100644 experiment/simulation/littledot.png create mode 100644 experiment/simulation/monostable_multivibrator.html diff --git a/README.md b/README.md index 6bcc731..d069ba1 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,25 @@ ## Introduction -Discipline | Fill your discipline name here +Discipline | Electronics and Communication and Engineering :--|:--| - Lab | Fill your lab name here - Experiment| Fill your experiment name and number here + Lab | Analog Electronics Circuits Virtual Laboratory + Experiment| Monostable Multivibrator using IC 555 ### About the Experiment -Fill a brief description of this experiment here - -Name of Developer | Fill the name of experiment owner here +### Subject Matter Expert +Name | **Prof. Chittaranjan Mandal** :--|:--| - Institute | - Email id| - Department | + Institute | **Indian Institute of Technology Kharagpur** + Email id| **chitta@iitkgp.ac.in** + Department | **Department of Computer Science and Engineering** +Webpage| [http://www.iitkgp.ac.in/department/CS/faculty/cs-chitta](http://www.iitkgp.ac.in/department/CS/faculty/cs-chitta) + ### Contributors List -SrNo | Name | Faculty or Student | Department| Institute | Email id -:--|:--|:--|:--|:--|:--| -1 | . | . | . | . | . -2 | . | . | . | . | . +SrNo | Name | Developer and Integration Engineer | Department| Institute +:--|:--|:--|:--|:--| +1 | **Sukriti Dhang** | Developer | Department of Mechanical Engineering | IIT Kharagpur | +2 | **Prakriti Dhang** | Integration | Department of Mechanical Engineering | IIT Kharagpur | diff --git a/experiment-descriptor.json b/experiment-descriptor.json new file mode 100644 index 0000000..7f5fa2a --- /dev/null +++ b/experiment-descriptor.json @@ -0,0 +1,57 @@ +{ + "unit-type": "lu", + "label": "", + "basedir": ".", + "LaTeXinMD": false, + "units": [ + { + "unit-type": "aim" + }, + + { + "target": "theory.html", + "source": "theory.md", + "label": "Theory", + "unit-type": "task", + "content-type": "text" + }, + + { + "target": "pretest.html", + "source": "pretest.json", + "label": "Pretest", + "unit-type": "task", + "content-type": "assesment" + }, + { + "target": "procedure.html", + "source": "procedure.md", + "label": "Procedure", + "unit-type": "task", + "content-type": "text" + }, + + { + "target": "simulation.html", + "source": "simulation/monostable_multivibrator.html", + "label": "Simulation", + "unit-type": "task", + "content-type": "simulation" + }, + + { + "target": "posttest.html", + "source": "posttest.json", + "label": "Posttest", + "unit-type": "task", + "content-type": "assesment" + }, + { + "target": "references.html", + "source": "references.md", + "label": "References", + "unit-type": "task", + "content-type": "text" + } + ] +} diff --git a/experiment/aim.md b/experiment/aim.md index 4bc1c54..fd3ffd6 100644 --- a/experiment/aim.md +++ b/experiment/aim.md @@ -1 +1,9 @@ -### Aim of the experiment +## Aim of the experiment + +1. To perform a Monostable Multivibrator using 555 Timer +2. To observe and plot the Trigger Input Voltage. +3. To observe and plot the Output Voltage. +4. To observe and plot the Capacitance Voltage. +5. Calculate the practical time period by the waveform. +6. Calculate the theoretical time period by 1.1RAC. +7. Calculate the frequency of the waveform. \ No newline at end of file diff --git a/experiment/contributors.md b/experiment/contributors.md index 43e714a..fbfb09f 100644 --- a/experiment/contributors.md +++ b/experiment/contributors.md @@ -1,11 +1,15 @@ -EMPTY - -### Subject Matter Experts -| SNo. | Name | Email | Institute | ID | -| :---: | :---: | :---: | :---: | :---: | -| 1 | name | email | institute | id | +### Subject Matter Expert +Name | **Prof. Chittaranjan Mandal** +:--|:--| + Institute | **Indian Institute of Technology Kharagpur** + Email id| **chitta@iitkgp.ac.in** + Department | **Department of Computer Science and Engineering** +Webpage| [http://www.iitkgp.ac.in/department/CS/faculty/cs-chitta](http://www.iitkgp.ac.in/department/CS/faculty/cs-chitta) -### Developers -| SNo. | Name | Email | Institute | ID | -| :---: | :---: | :---: | :---: | :---: | -| 1 | name | email | institute | id | \ No newline at end of file + +### Contributors List + +SrNo | Name | Developer and Integration Engineer | Department| Institute +:--|:--|:--|:--|:--| +1 | **Sukriti Dhang** | Developer | Department of Mechanical Engineering | IIT Kharagpur | +2 | **Prakriti Dhang** | Integration | Department of Mechanical Engineering | IIT Kharagpur | \ No newline at end of file diff --git a/experiment/experiment-name.md b/experiment/experiment-name.md index b0d364b..fdc7ea1 100644 --- a/experiment/experiment-name.md +++ b/experiment/experiment-name.md @@ -1 +1 @@ -## Experiment name +## Monostable Multivibrator using IC 555 diff --git a/experiment/images/mono_ckt_th.png b/experiment/images/mono_ckt_th.png new file mode 100644 index 0000000000000000000000000000000000000000..bd3d827ea241bb0dbd0217b16b913bf74edddb3d GIT binary patch literal 86994 zcmV)9K*hg_P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf|D{PpK~#8N?7at^ zWmUEAJF2^@yQ(@Tnw&v`qNo@SN5z~KJ!VBPE0{r1LBRkBqGBQ|DyS%m2|+NRh$xDZ zQL?0_>71%7cK7@K<6C2|-F?sfo%_-~=e+0GHEYc^=g4!+G3Q!)?Y(=3){SnQIB`;} zU%x&!ZtRJP6C-*iY>bT?dUPHt`X}h=>4^;+HmHB1>Jb|@ZioqbZBRdb6GR6tWkSzH zwXcr}6V$(6xT4#zaXj%RO`4QPc^nq9EAbGR_ z@S&bMGFp&h z7(0A|f22kGiXkzR_Qknhs}>(#GU>L*s%ly#9LfAurA$wD@5Vj~tw9!J|L z8YvCmNt2L;-!=Zy3z(oWTtAM#+gPo!Mn~uX!|pTKgwX@;Q7{b1Z-|LmQ&A6Cu zQ<`coU*H>jwNZ+$m;dRbcw9XG$vf#Z)1{-jv%PSOCvEr%ob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vWIHVe9qVjl%T7GeT^LI`3}@q&kCC*RceJuA<} z!N8yZ!1hO~zj|s$o-lxW2rEKYDdWEJUNalw+GdhA4{D^vns34uTMDJq~knih*$qw7i!B0%RZ$(VAnoI8<_fS(Tfc z+fdi;{+nhVyfj=0aot$dfTl!$FcHfTY8~^Tw$M|=a0hjl?iNG+{S>MhaJcmb9zfOZX1#B0;mE+6W&d$Md#d}OK*^pTKnwHQq!0nP`|eN-O|>QX-c_dZ_bFuLAf zpLpMFr59%}B(L)p3Rvu-wh?jc=e&nQ--c(7Lg!~^C^Ce0E literal 0 HcmV?d00001 diff --git a/experiment/images/outputwavfrm_mono.png b/experiment/images/outputwavfrm_mono.png new file mode 100644 index 0000000000000000000000000000000000000000..18d0c4bafebde3fa27bc579b11fde867d815b63f GIT binary patch literal 89625 zcmWieXCM@g8^;eJ5!L-dnU$HH%;P9UcBx3l$=NU zGMJrM)yKMG?P`DV`)Qwz=Ok-8bGr@PpIz{HMrF)I{30bR@Sf|88bO2gTvvk?|1~(vqigq9qQrbr0&`DD%@V|U(4<7qLTp5H zl_7g`YS=$7;kEAmjxh~Wp1NFfvJYP@K&88mZMiD+SC-0Y} z9NI?G1eS~552=JPC7vCzD5k&Wz2kg}rS(37%Vf zVIiYVDhSq13I1xgG)8;$Hw*i4iv1(2g-Z+~>-4nhyO4H51i#&j6o2uOw*t+d`rEX@ z{*D@7g&B7*HR|unGszFyO8i-7jC3MVB1; z|6^3osVr3bWNeE*xymx~^%Z;+akXUl+k@Hn3D~wtEWQ6QeW+Kn*Gg;W8hufPl)8N6 zMnhZK7AL<<^Q^jn9tr$uHNp08&gFz6k$5mP@hmONjdP<)oi#^a+57~z-5pM z`(P40AbdFOkaCT{n~`0({vKUoYN(I>P2a<1Zi-qrZnhX*=zbT(+eq$y1>OtJE{3*c z2wYW3h)p+OQ+Z}|!++z(jfZq^nSpja_Z@dwC$i7uN%4c9<@`4RLaZyS3XFPaItPbS zR*k*umno=|URTH#Qh2(*rX1vGQ#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B0hotzf%lAImX1DO^>q;!-Kh4orY&&55HAtE0g}>Ny74vRy^!E&7_BVZG zE6*hZK%VnaHaES5&zyLni|5OpwAD1`XIBmejm>`%we6zQh5ZgUXum8;t{?(*d9$O3A(ffXAMb;=(r#EvM3EX`wB2Q=soj`+$J@EBX3@MP~d^=XIpIHJiS_;YfOZhZ$eB4Iw^UBvee%E9p3?)~EiG z2M%jh+^TqVdKIqZ0RCXty1Ngw!U3&bM?+udljRs>r{XU^s<_H7_$oi8hjIqL1JD@Y zW6&vAc|Lgb(DCSxjUzeY;eA4%xPzy4@$Ba#y0Hd6`;vaes^bZi-km(pwVY&(9xX?$ z2W_9;Yg!jrhra)`*X?WZ0vs33e?9kf7pHv$KU&t@w=DWPW%lz+Uxx4(BHC$KdzE)} zmo3dx=`#3y{Y?b(XHLA^oac@2ejit|G>2?j)6=5&H-T{A+jKF_8rtM?Y8Bo({mQX8 z#sMWMak>+>t))|ot`%(u1|0AeXl()orv<}} z{icXze$f`7U)sVq>0I2+^aCaI0GEOw`=D>d z9$JHVl-;>r7q*dW~5125!yiK&W8X8-^I07*qoM6N<$g0~dbcK`qY literal 0 HcmV?d00001 diff --git a/experiment/images/pin-configuration-555-timer-8-pin.png b/experiment/images/pin-configuration-555-timer-8-pin.png new file mode 100644 index 0000000000000000000000000000000000000000..0dc835c3c93f85065379e21a56c7b67e6628ce1b GIT binary patch literal 2577 zcmb7GX;4$y5)M})VH@^M5fKy&3Np$FMh%1sO9*iQ6-5?HfNIpE_TkJ~!R# zkej;71{DYdqKNH9B|sg)`1>_aPQ-wQappgp&*djOx2ZOC}=Ch`M5bls$LsU zf`)R8yI&jx^22laROmcc8VWkEczGUik;#V;K@}n(5Gn#ffIwt276?Kh1Qv*}2oMBS zCZtk@G6)1A1ViOPED!?`0)mQ=BPV__&@9W6Qs*6t+$ZY zx9#&G%2}6QXAb4nXEKUkIR(|Jec$9iiJ-jk$RKgc3(QtPRq=&&P2zo-q2(LBMAjnt z%2;^^YLsriC|J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F-47p}Mr^o)vGUIXxGHD!OTzkF7WAz>TbK zVsi*~K%fncOnXO1JO1^WyXuyHPc6mbi(}02dFhf8ZTU<}QRMaq*vdwxQ{mH`1v9%Z z#RI05F-)$;q;h@jDLR=JKb!TyecbYS5r%#y5+9N%T9GamE01@tK9s&#cUbi+b5<*V zrq}i?w%cS?7t!reQQ6gK5Pb$(t`y8;9Io0k);84)kKcJ$JlUsj!JLyujBa=CKez!F znNrn7`ic3RzhyRxSRxF(+kzi?2>!k zcNDZ~1O|CveTs0`UGR10UK1sZl`Xc!#Gfyu|GzJZ>%gg7BprE?{L_ER|G;BH)|Bie V%)-V$;@I*KjLRW(l{5a@zW@+Ri;e&Q literal 0 HcmV?d00001 diff --git a/experiment/images/post_quiz1.png b/experiment/images/post_quiz1.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5a01f571a0ab9939c1c25545135c8af90af22c GIT binary patch literal 27888 zcmb5UWmH^Ev^GevKyV1|ZjHNJaB18%xI^Ra7Tn$4-7QFPcPBvO7TjTY@12?7-*?tJ zyN;}?wX2?8TPs3QK@#a3-Zuyc2qbB#AIcCAU(7$BZ{T1*sW$hr&1dt)Nm)`9qGpQV z`11wYTtr?30-`<^;nfJ{^BvwnO3MiX0(s!S`^&I>nF$1hO^Eal5mk5nb07FNLP?i{ zMIDOOhAydVs>@11*E)bI4$&+t?GJ3NKRhZ4DH{b2ffNZT0z4@$)hHL+s4$7J+)u=S zV3XZAq%P}5z-R(seT{Ow;oisNa`P?c>BH&dw%YA3rS$#8BsBW_FCS8z=Q}aoltk_?1xUd{Dej$yWh9US$mIkD>qwEJHb@_Y7owfU7yT~1 z4K|L99233bFkvDK*O`q{n_-vEG+iUkzc1t?-BFAi;mPL^PH|FF{mXt$?qar40X|b_ z7bWj6Ql%SFk!W*j)9$BOsT0jg6=wMrQj7?>M2gwKie9(!4Z(y8s|YN|CDvw+iMcK* zpBBeV_8&7yG^5IaTvC4*cK$j&vx!n{Rty(uCrpkXjKU;(7SpFD>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| ztM1rL0dJ7bIG1oO$36HU-`kL~u7rMNI zFP%uZQ~o85m6*+|84ZBynjG%~kW%a1WIa-hJdk2^!q>gUfa8?vy+7@KXowULrZtj5AWCJ=qCVFx<^R<{devNuX{YO>YRrosOOmP>At literal 0 HcmV?d00001 diff --git a/experiment/posttest.json b/experiment/posttest.json index e0e6fc2..e29350b 100644 --- a/experiment/posttest.json +++ b/experiment/posttest.json @@ -2,37 +2,62 @@ "version": 2.0, "questions": [ { - "question": "This is a Sample Question 1?", + "question": "What does the discharge transistor do in the 555 timer circuit?", "answers": { - "a": "answer1", - "b": "answer2", - "c": "answer3", - "d": "answer4" + "a": "Charge the external capacitor to start the timing over again", + "b": "Charge the external capacitor to stop the timing", + "c": "Discharge the external capacitor to stop the timing", + "d": "Discharge the external capacitor to start the timing over again" }, - "explanations": { - "a": "Explanation 1 here", - "b": "Explanation 2", - "c": "Explanation 2", - "d": "Explanation 2" + + "correctAnswer": "d", + "difficulty": "beginner" + }, + { + "question": "The monostable multivibrator circuit is not an oscillator because ________.", + "answers": { + "a": "Its output switches between two states", + "b": "It requires a sine wave input signal", + "c": "It requires a trigger to obtain an output signal", + "d": "The circuit does not require a dc power supply" + }, + + "correctAnswer": "c", + "difficulty": "beginner" + }, + { + "question": "The monostable multivibrator circuit is also know as ________.", + "answers": { + "a": "One shot", + "b": "Two shot", + "c": "Three shot", + "d": "Four shot" }, + "correctAnswer": "a", "difficulty": "beginner" }, { - "question": "This is a Sample Question 2?", + "question": "A monostable 555 timer has one stable states:", "answers": { - "a": "answer1", - "b": "answer2", - "c": "answer3", - "d": "answer4" + "a": "True", + "b": "False" + }, - "explanations": { - "a": "Explanation 1 here", - "b": "Explanation 2", - "c": "Explanation 2", - "d": "Explanation 2" + + "correctAnswer": "a", + "difficulty": "beginner" + }, + { + "question": "What is the formula to calculate the time period of the monostable multivibrator.", + "answers": { + "a": "T = 0.69 * (RA + RB) * C", + "b": "T = 0.69 * (RA + 2RB) * C", + "c": "T = 0.69 * RB * C", + "d": "T = 1.1 * R * C" }, - "correctAnswer": "c", + + "correctAnswer": "d", "difficulty": "beginner" } ] diff --git a/experiment/pretest.json b/experiment/pretest.json index e0e6fc2..ca093bf 100644 --- a/experiment/pretest.json +++ b/experiment/pretest.json @@ -2,37 +2,63 @@ "version": 2.0, "questions": [ { - "question": "This is a Sample Question 1?", + "question": "What is the formula to calculate the time period of the monostable multivibrator.", "answers": { - "a": "answer1", - "b": "answer2", - "c": "answer3", - "d": "answer4" + "a": "T = 0.69 * (RA + RB) * C", + "b": "T = 0.69 * (RA + 2RB) * C", + "c": "T = 0.69 * RB * C", + "d": "T = 1.1 * R * C" }, - "explanations": { - "a": "Explanation 1 here", - "b": "Explanation 2", - "c": "Explanation 2", - "d": "Explanation 2" + + "correctAnswer": "d", + "difficulty": "beginner" + }, + { + "question": "When a capacitor charges:", + "answers": { + "a": " the voltage across the plates rises exponentially", + "b": "the circuit current falls exponentially", + "c": "the capacitor charges to the source voltage in 5×RC seconds", + "d": "all of the above" }, - "correctAnswer": "a", + + "correctAnswer": "d", "difficulty": "beginner" }, { - "question": "This is a Sample Question 2?", + "question": "The ________ is defined as the time the output is active divided by the total period of the output signal.", "answers": { - "a": "answer1", - "b": "answer2", - "c": "answer3", - "d": "answer4" + "a": "active ratio", + "b": "duty cycle", + "c": "on time", + "d": "off time" }, - "explanations": { - "a": "Explanation 1 here", - "b": "Explanation 2", - "c": "Explanation 2", - "d": "Explanation 2" + + "correctAnswer": "b", + "difficulty": "beginner" + }, + { + "question": "A monostable 555 timer has the following number of stable states:", + "answers": { + "a": "0", + "b": "1", + "c": "2", + "d": "3" + }, + + "correctAnswer": "b", + "difficulty": "beginner" + }, + { + "question": "What is the output pulse width of the waveform at the output of the circuit in the given figure?

", + "answers": { + "a": "1.65 ms", + "b": "18.2 ms", + "c": "4.98 ms", + "d": "54.6 ms" }, - "correctAnswer": "c", + + "correctAnswer": "b", "difficulty": "beginner" } ] diff --git a/experiment/procedure.md b/experiment/procedure.md index 37929cc..ba80495 100644 --- a/experiment/procedure.md +++ b/experiment/procedure.md @@ -1 +1,21 @@ -### Procedure \ No newline at end of file +## Procedure + +#### Monostable Multivibrator using 555 +1. Connect the components as mentioned below: +L1-L12, L14-L12, L16-L12, L4-L9, L8-L9, L9-L10, L3-L17, L11-L13, L7-L11, L6-L13, L5-L15.(For eg. click on 1 and then drag to 12 and so on.) +2. Click on 'Check Connection' button to check the connections. +3. If connected wrong, click on the wrong connection. Else click on 'Delete all connection' button to erase all the connections. +4. Intially set R a=10 kΩ, C=1 µf, Vcc=5 V, Tin = 20 msec. +5. Click on "Calculate" button. +6. Now note the output voltage. +7. Click on "Plot" button to plot, Trigger Input Voltage, Output Voltage, Capacitance Voltage +8. Click on "Clear" button to clear the data. +9. Repeat the experiment for another set of resistance value and capacitance value. +10. Set the Resistance (R a) value (1 kΩ - 10 kΩ). +11. Set the Capacitance (C) value . +12. Set supply voltage (Vcc). + +
+ +

Figure 1

+
diff --git a/experiment/simulation/css/cktconnection_monostable.css b/experiment/simulation/css/cktconnection_monostable.css new file mode 100644 index 0000000..61b7c8d --- /dev/null +++ b/experiment/simulation/css/cktconnection_monostable.css @@ -0,0 +1,169 @@ + + +.demo { + /* for IE10+ touch devices */ + touch-action:none; +} + +.jtk-demo-canvas { + height:550px; + /*max-height:700px; + border:1px solid #CCC; + background-color:white;*/ + display: flex; + position:absolute; + top:5px; +} +.canvas-wide { + margin-left:0; +} + +/** JSPLUMB ARTEFACTS **/ +.jtk-overlay { + z-index: 51; +} + +.jtk-endpoint { + z-index: 50; + cursor: move; +} + +.jtk-connector { + z-index: 1; +} + +/** ELEMENTS **/ +.littledot +{ + cursor: pointer; + width: 12px; + height: 12px; + background-image: url(littledot.png); + z-index: 5; + position: absolute; + border-radius: 31px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; +} +.cmdLink detach{ + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; +} + + +.littledot-hover-hover { + border: 2px solid orange; +} + +.dropHover { + border: 1px solid orange; +} + +/** ELEMENT POSITIONS **/ +#ld1 { + position: absolute; + top: 230px; + left: 175px; +} +#ld2 { + position: absolute; + top: 198px; + left:120px; + +} + +#ld6 { + position: absolute; + top:145px; + left:120px; +} + +#ld7 { + position: absolute; + top: 98px; + left: 120px; +} + + +#ld3 { + position: absolute; + top:98px; + left:240px; +} +#ld5 { + position: absolute; + top:188px; + left:240px; +} + +#ld4 { + position: absolute; + top: 60px; + left:155px;; +} + + +#ld8 { + position: absolute; + top: 60px; + left:190px; + +} + +#ld9 { + position: absolute; + top:15px; + left:172px; +} +#ld10 { + position: absolute; + top:55px; + left:25px; +} +#ld11 { + position: absolute; + top:155px; + left:25px; +} + + + +#ld13 { + position: absolute; + top: 200px; + left: 25px; + +} +#ld14 { + position: absolute; + top: 270px; + left: 22px; + +} + +#ld15 { + position: absolute; + top:190px; + left:295px; +} +#ld16 { + position: absolute; + top:260px; + left:295px; +} +#ld17 { + position: absolute; + top:75px; + left:290px; +} +#ld12 { + position: absolute; + top: 280px; + left: 170px; + +} +path, .jtk-endpoint { + cursor: pointer; +} diff --git a/experiment/simulation/css/monostable_astable.css b/experiment/simulation/css/monostable_astable.css new file mode 100644 index 0000000..4839687 --- /dev/null +++ b/experiment/simulation/css/monostable_astable.css @@ -0,0 +1,132 @@ +/* +To change this license header, choose License Headers in Project Properties. +To change this template file, choose Tools | Templates +and open the template in the editor. +*/ +/* + Created on : 22 Nov, 2016, 5:43:22 PM + Author : sukriti +*/ + + .canvasjs-chart-credit{ + display:none; + } + //.dropdown { + // position: relative; + // display: inline-block; + // height:20px; + // font-size: 16px; + // font-weight: bold; + + // } + .dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + border:2px solid #3385ff; + min-width: 330px; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + padding: 12px 16px; + z-index: 50; + cursor: pointer; + } + + .dropdown:hover .dropdown-content { + display: block; + + } + + + img[id^="info_"] { + //background-color: #e4e5e9; + //background: none; + border: none; + padding: 5px; + float: right; + cursor: pointer; + width: 30px; + height: 30px; + +} + +table { + //font-family:Arial, Helvetica, sans-serif; + //color:#666; + //font-size:12px; + //text-shadow: 1px 1px 0px #fff; + //background:#eaebec; + //margin:5px; + //border:#ccc 2px solid; + + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + + -moz-box-shadow: 0 1px 2px #d1d1d1; + -webkit-box-shadow: 0 1px 2px #d1d1d1; + box-shadow: 0 1px 2px #d1d1d1; +} +table tr:hover td{ + background: #ccebff; + //background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0)); + //background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0); +} +table tr:last-child td:first-child{ + -moz-border-radius-bottomleft:3px; + -webkit-border-bottom-left-radius:3px; + border-bottom-left-radius:3px; +} +table tr:last-child td:last-child{ + -moz-border-radius-bottomright:3px; + -webkit-border-bottom-right-radius:3px; + border-bottom-right-radius:3px; +} + + + /* .tooltip { + position: relative; + display: inline-block; + + }*/ + + /* Tooltip text */ + .tooltip .tooltiptext { + visibility: hidden; + width: 80px; + background-color: #f9f9f9;/*#ffff80;#555;*/ + border:2px solid #3385ff; + + color: #555; /*#fff;*/ + text-align: center; + // padding: 5px 0; + // border-radius: 6px; + + /* Position the tooltip text */ + position: absolute; + z-index: 1; + top: 60%; + left: 90%; + margin-left: 20px; + + /* Fade in tooltip */ + opacity: 0; + transition: opacity 1s; + } + + /* Tooltip arrow + .tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 300px; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; + }*/ + + /* Show the tooltip text when you mouse over the tooltip container */ + .tooltip:hover .tooltiptext { + visibility: visible; + opacity: 3; + } \ No newline at end of file diff --git a/experiment/simulation/css/simulationtabcss.css b/experiment/simulation/css/simulationtabcss.css new file mode 100644 index 0000000..649c06c --- /dev/null +++ b/experiment/simulation/css/simulationtabcss.css @@ -0,0 +1,28 @@ +/* +To change this license header, choose License Headers in Project Properties. +To change this template file, choose Tools | Templates +and open the template in the editor. +*/ +/* + Created on : 20 Jun, 2016, 8:44:41 PM + Author : sukriti +*/ + +/*input{ + width:310px; + height:40px; + background:#4E9CAF; //darkmoderate cyan + text-align: center; + padding:20px; + padding-top:3px; + padding-bottom:3px; + border-radius:10px; + color:white; + font-weight: bold; + font-size:12pt; + display: inline-block; + cursor:pointer; +} +input:hover{ + background-color: #20B2AA; //LightSeaGreen +}*/ \ No newline at end of file diff --git a/experiment/simulation/images/Print Filled.png b/experiment/simulation/images/Print Filled.png new file mode 100644 index 0000000000000000000000000000000000000000..69b95698e0b248e54646ded7be16e93dafdaab02 GIT binary patch literal 476 zcmV<20VDp2P)EIU%ZWW}v$MV<62-0j?q{UM0$KDWuOK*%@YW<+_|#Z526S zB~b>K^QI7HWzc$7B!@kym3)|Nt)^S+7{DEXYXJ7UrDq9X0pQ-wkp}>`EwSIgb#6jF z8?1!avNR#T{jCww3@IeUMm@-Lc^TOb8}3WLwUvsT0r)87PXWBQD&z!!y=v`gTF4WC zn0;FLxhZZj!>QyP^{bJOvH@%%JiKh zlqUsj5u&!o5ZoxOHH4tLH-+>$B|D>9E#l<7wKF2-4~J2n6ySzEoS_(y@>~PJa%(-w SDp)4~0000@}OWM9GpW9qXXRmqKp^ZI>W`m8 zAarZsr}hLh_{%>XJ>lR#I``*lk08Z8mlwe=jJ8TzN)Sj{4BO!=Ch+@77jey#3xSGAblAi3$8uyP@@ zjd^HGyw8S$VisvyuR|>1vhvdA?^+8h&GGTWS7S~sn#Xs*@v?EFCFU0Yb) zz0qCUTBrL{94|dSZZYfJ_%V`dUmmUGgfT{zwUs*~?XZ&)u&&+Hm8Mo$wx+-B^>lg~ z*;Q-ZrWKQ=}MM{1u$n`X~KLA_+gde%hGI#`0b~A0izj z>`>WOtg`kz9iv%iYdQLX?_xE{%-3?SN`7;apJ5;doLk7lZ>sAcgKYHAkzAc0yRsWY zPM&)oAr;3F_*zG6)s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--- /dev/null +++ b/experiment/simulation/js/canvasjs.min.js @@ -0,0 +1,5175 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/* + CanvasJS HTML5 & JavaScript Charts - v1.8.5 Beta 1 - http://canvasjs.com/ + Copyright 2013 fenopix +*/ + +(function () { + function T(a, c) { + a.prototype = Ja(c.prototype); + a.prototype.constructor = a; + a.base = c.prototype + } + function Ja(a) { + function c() { + } + c.prototype = a; + return new c + } + function za(a, c, b) { + "millisecond" === b ? a.setMilliseconds(a.getMilliseconds() + 1 * c) : "second" === b ? a.setSeconds(a.getSeconds() + 1 * c) : "minute" === b ? a.setMinutes(a.getMinutes() + 1 * c) : "hour" === b ? a.setHours(a.getHours() + 1 * c) : "day" === b ? a.setDate(a.getDate() + 1 * c) : "week" === b ? a.setDate(a.getDate() + 7 * c) : "month" === b ? a.setMonth(a.getMonth() + 1 * c) : "year" === b && a.setFullYear(a.getFullYear() + 1 * c); + return a + } + function Q(a, c) { + var b = !1; + 0 > a && (b = !0, a *= -1); + a = "" + a; + for (c = c?c:1; a.length < c; ) + a = "0" + a; + return b ? "-" + a : a + } + function ea(a) { + if (!a) + return a; + a = a.replace(/^\s\s*/, ""); + for (var c = /\s/, b = a.length; c.test(a.charAt(--b)); ) + ; + return a.slice(0, b + 1) + } + function Ka(a) { + a.roundRect = function (a, b, d, e, f, g, h, q) { + h && (this.fillStyle = h); + q && (this.strokeStyle = q); + "undefined" === typeof f && (f = 5); + this.lineWidth = g; + this.beginPath(); + this.moveTo(a + f, b); + this.lineTo(a + d - f, b); + this.quadraticCurveTo(a + d, b, a + d, b + f); + this.lineTo(a + d, b + e - f); + this.quadraticCurveTo(a + d, b + e, a + d - f, b + e); + this.lineTo(a + f, b + e); + this.quadraticCurveTo(a, b + e, a, b + e - f); + this.lineTo(a, b + f); + this.quadraticCurveTo(a, b, a + f, b); + this.closePath(); + h && this.fill(); + q && 0 < g && this.stroke() + } + } + function Aa(a, c) { + return a - c + } + function Ba(a, c) { + return a.x - c.x + } + function C(a) { + var c = ((a & 16711680) >> 16).toString(16), + b = ((a & 65280) >> 8).toString(16); + a = ((a & 255) >> 0).toString(16); + c = 2 > c.length ? "0" + c : c; + b = 2 > b.length ? "0" + b : b; + a = 2 > a.length ? "0" + a : a; + return"#" + c + b + a + } + function La(a, c) { + var b = this.length >>> 0, d = Number(c) || + 0, d = 0 > d ? Math.ceil(d) : Math.floor(d); + for (0 > d && (d += b); d < b; d++) + if (d in this && this[d] === a) + return d; + return-1 + } + function x(a) { + return null === a || "undefined" === typeof a + } + function Ca(a, c, b) { + b = b || "normal"; + var d = a + "_" + c + "_" + b, e = Da[d]; + if (isNaN(e)) { + try { + a = "position:absolute; left:0px; top:-20000px; padding:0px;\n\ +margin:0px;border:none;white-space:pre;line-height:normal;font-family:" + a + "; \n\ +font-size:" + c + "px; font-weight:" + b + ";"; + if (!Z) { + var + f = document.body; + Z = document.createElement("span"); + Z.innerHTML = ""; + var g = document.createTextNode("Mpgyi"); + Z.appendChild(g); + f.appendChild(Z) + } + Z.style.display = ""; + Z.setAttribute("style", a); + e = Math.round(Z.offsetHeight); + Z.style.display = "none" + } catch (h) { + e = Math.ceil(1.1 * c) + } + e = Math.max(e, c); + Da[d] = e + } + return e + } + function D(a, c) { + var b = []; + if (b = {solid: [], + shortDash: [3, 1], + shortDot: [1, 1], + shortDashDot: [3, 1, 1, 1], + shortDashDotDot: [3, 1, 1, 1, 1, 1], dot: [1, 2], + dash: [4, 2], + dashDot: [4, 2, 1, 2], longDash: [8, 2], + longDashDot: [8, 2, 1, 2], + longDashDotDot: [8, 2, 1, 2, 1, 2]}[a || "solid"]) + for (var d = 0; d < b.length; d++) + b[d] *= c; + else + b = []; + return b + } + function J(a, + c, b, d) { + if (a.addEventListener) + a.addEventListener(c, b, d || !1); + else if (a.attachEvent) + a.attachEvent("on" + c, function (c) { + c = c || window.event; + c.preventDefault = c.preventDefault || function () { + c.returnValue = !1 + }; + c.stopPropagation = c.stopPropagation || function () { + c.cancelBubble = !0 + }; + b.call(a, c) + }); + else + return!1 + } + function Ea(a, c, b) { + a *= N; + c *= N; + a = b.getImageData(a, c, 2, 2).data; + c = !0; + for (b = 0; 4 > b; b++) + if (a[b] !== a[b + 4] | a[b] !== a[b + 8] | a[b] !== a[b + 12]) { + c = !1; + break + } + return c ? a[0] << 16 | a[1] << 8 | a[2] : 0 + } + function R(a, c, b) { + return a in c ? c[a] : b[a] + } + function ja(a, c, b) { + if (u && Fa) { + var d = a.getContext("2d"); + ka = d.webkitBackingStorePixelRatio || d.mozBackingStorePixelRatio || d.msBackingStorePixelRatio || d.oBackingStorePixelRatio || d.backingStorePixelRatio || 1; + N = ta / ka; + a.width = c * N; + a.height = b * N; + ta !== ka && (a.style.width = c + "px", a.style.height = b + "px", d.scale(N, N)) + } + else + a.width = c, a.height = b + } + function $(a, c) { + var b = document.createElement("canvas"); + b.setAttribute("class", "canvasjs-chart-canvas"); + ja(b, a, c); + u || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(b); + return b + } + function Ga(a, c, b) { + if (a && c && b) { + b = b + "." + c; + var d = "image/" + c; + a = a.toDataURL(d); + var e = !1, f = document.createElement("a"); + f.download = b; + f.href = a; + f.target = "_blank"; + if ("undefined" !== typeof Blob && new Blob) { + for (var g = a.replace(/^data:[a-z/]*;base64,/, ""), g = atob(g), h = new ArrayBuffer(g.length), h = new Uint8Array(h), q = 0; q < g.length; q++) + h[q] = g.charCodeAt(q); + c = new Blob([h.buffer], {type: "image/" + c}); + try { + window.navigator.msSaveBlob(c, b), e = !0 + } catch (k) { + f.dataset.downloadurl = [d, f.download, f.href].join(":"), f.href = + window.URL.createObjectURL(c) + } + } + if (!e) + try { + event = document.createEvent("MouseEvents"), event.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), f.dispatchEvent ? f.dispatchEvent(event) : f.fireEvent && f.fireEvent("onclick") + } catch (n) { + c = window.open(), c.document.write("
Please right click on the image and save it to your device
"), c.document.close() + } + } + } + function U(a, c, b) { + c.getAttribute("state") !== b && (c.setAttribute("state", b), c.setAttribute("type", "button"), c.style.position = + "relative", c.style.margin = "0px 0px 0px 0px", c.style.padding = "3px 4px 0px 4px", c.style.cssFloat = "left", c.setAttribute("title", a._cultureInfo[b + "Text"]), c.innerHTML = "" + a._cultureInfo[b + "Text"] + "") + } + function la() { + for (var a = null, c = 0; c < arguments.length; c++) + a = arguments[c], a.style && (a.style.display = "inline") + } + function X() { + for (var a = null, c = 0; c < arguments.length; c++) + (a = arguments[c]) && a.style && (a.style.display = "none") + } + function L(a, c, b, d) { + this._defaultsKey = + a; + this.parent = d; + this._eventListeners = []; + d = {}; + b && (ca[b] && ca[b][a]) && (d = ca[b][a]); + this._options = c ? c : {}; + this.setOptions(this._options, d) + } + function v(a, c, b) { + this._publicChartReference = b; + c = c || {}; + v.base.constructor.call(this, "Chart", c, c.theme ? c.theme : "theme1"); + var d = this; + this._containerId = a; + this._objectsInitialized = !1; + this.overlaidCanvasCtx = this.ctx = null; + this._indexLabels = []; + this._panTimerId = 0; + this._lastTouchEventType = ""; + this._lastTouchData = null; + this.isAnimating = !1; + this.renderCount = 0; + this.panEnabled = this.disableToolTip = + this.animatedRender = !1; + this._defaultCursor = "default"; + this.plotArea = {canvas: null, ctx: null, x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0}; + this._dataInRenderedOrder = []; + (this._container = "string" === typeof this._containerId ? document.getElementById(this._containerId) : this._containerId) ? (this._container.innerHTML = "", c = a = 0, a = this._options.width ? this.width : 0 < this._container.clientWidth ? this._container.clientWidth : this.width, c = this._options.height ? this.height : 0 < this._container.clientHeight ? this._container.clientHeight : + this.height, this.width = a, this.height = c, this.x1 = this.y1 = 0, + this.x2 = this.width, this.y2 = this.height, this._selectedColorSet = "undefined" !== typeof aa[this.colorSet] ? aa[this.colorSet] : aa.colorSet1, this._canvasJSContainer = document.createElement("div"), this._canvasJSContainer.setAttribute("class", "canvasjs-chart-container"), this._canvasJSContainer.style.position = "relative", this._canvasJSContainer.style.textAlign = "left", this._canvasJSContainer.style.cursor = "auto", u || (this._canvasJSContainer.style.height = "0px"), + this._container.appendChild(this._canvasJSContainer), this.canvas = $(a, c), + this.canvas.style.position = "absolute", this.canvas.getContext && (this._canvasJSContainer.appendChild(this.canvas), + this.ctx = this.canvas.getContext("2d"), this.ctx.textBaseline = "top", Ka(this.ctx), + u ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = $(a, c), this.plotArea.canvas.style.position = "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas), this.plotArea.ctx = + this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = $(a, c), + this.overlaidCanvas.style.position = "absolute", this._canvasJSContainer.appendChild(this.overlaidCanvas), + this.overlaidCanvasCtx = this.overlaidCanvas.getContext("2d"), this.overlaidCanvasCtx.textBaseline = "top", this._eventManager = new fa(this), J(window, "resize", function () { + d._updateSize() && d.render() + }), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"), + this._toolBar.style.cssText = "position: absolute; right: 1px; top: 1px;", + this._canvasJSContainer.appendChild(this._toolBar), + this.bounds = {x1: 0, y1: 0, x2: this.width, y2: this.height}, + J(this.overlaidCanvas, "click", function (a) { + d._mouseEventHandler(a) + }), J(this.overlaidCanvas, "mousemove", function (a) { + d._mouseEventHandler(a) + }), J(this.overlaidCanvas, "mouseup", function (a) { + d._mouseEventHandler(a) + }), J(this.overlaidCanvas, "mousedown", function (a) { + d._mouseEventHandler(a); + X(d._dropdownMenu) + }), J(this.overlaidCanvas, "mouseout", function (a) { + d._mouseEventHandler(a) + }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? + "MSPointerDown" : "touchstart", function (a) { + d._touchEventHandler(a) + }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function (a) { + d._touchEventHandler(a) + }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function (a) { + d._touchEventHandler(a) + }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function (a) { + d._touchEventHandler(a) + }), this._creditLink || (this._creditLink = document.createElement("a"), this._creditLink.setAttribute("class", + "canvasjs-chart-credit"), this._creditLink.setAttribute("style", "outline:none;margin:0px;position:absolute;right:3px;top:" + (this.height - 14) + "px;color:dimgrey;text-decoration:none;font-size:10px;font-family:Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"), this._creditLink.setAttribute("tabIndex", -1), this._creditLink.setAttribute("target", "_blank")), this._toolTip = new V(this, this._options.toolTip, this.theme), this.axisY2 = this.axisY = this.axisX = this.data = null, this.sessionVariables = {axisX: {}, axisY: {}, + axisY2: {}})) : window.console && window.console.log('CanvasJS Error: Chart Container with id "' + this._containerId + '" was not found') + } + function ma(a, c) { + for (var b = [], d, e = 0; e < a.length; e++) + if (0 == e) + b.push(a[0]); + else { + var f, g, h; + h = e - 1; + f = 0 === h ? 0 : h - 1; + g = h === a.length - 1 ? h : h + 1; + d = Math.abs((a[g].x - a[f].x) / (0 === a[g].x - a[h].x ? 0.01 : a[g].x - a[h].x)) * (c - 1) / 2 + 1; + var q = (a[g].x - a[f].x) / d; + d = (a[g].y - a[f].y) / d; + b[b.length] = a[h].x > a[f].x && 0 < q || a[h].x < a[f].x && 0 > q ? {x: a[h].x + q / 3, y: a[h].y + d / 3} : {x: a[h].x, y: a[h].y + d / 9}; + h = e; + f = 0 === h ? 0 : h - 1; + g = h === a.length - 1 ? h : h + 1; + d = Math.abs((a[g].x - a[f].x) / (0 === a[h].x - a[f].x ? 0.01 : a[h].x - a[f].x)) * (c - 1) / 2 + 1; + q = (a[g].x - a[f].x) / d; + d = (a[g].y - a[f].y) / d; + b[b.length] = a[h].x > a[f].x && 0 < q || a[h].x < a[f].x && 0 > q ? {x: a[h].x - q / 3, y: a[h].y - d / 3} : {x: a[h].x, y: a[h].y - d / 9}; + b[b.length] = a[e] + } + return b + } + function Ha(a, c) { + if (null === a || "undefined" === typeof a) + return c; + var b = parseFloat(a.toString()) * (0 <= a.toString().indexOf("%") ? c / 100 : 1); + return!isNaN(b) && b <= c && 0 <= b ? b : c + } + function da(a, c, b, d, e) { + "undefined" === typeof e && (e = 0); + this._padding = e; + this._x1 = a; + this._y1 = c; + this._x2 = b; + this._y2 = d; + this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding + } + function O(a, c) { + O.base.constructor.call(this, "TextBlock", c); + this.ctx = a; + this._isDirty = !0; + this._wrappedText = null; + this._lineHeight = Ca(this.fontFamily, this.fontSize, this.fontWeight) + } + function ga(a, c) { + ga.base.constructor.call(this, "Title", c, a.theme); + this.chart = a; + this.canvas = a.canvas; + this.ctx = this.chart.ctx; + if (x(this._options.margin) && a._options.subtitles) + for (var b = a._options.subtitles, + d = 0; d < b.length; d++) + if ((x(b[d].horizontalAlign) && "center" === this.horizontalAlign || b[d].horizontalAlign === this.horizontalAlign) && (x(b[d].verticalAlign) && "top" === this.verticalAlign || b[d].verticalAlign === this.verticalAlign) && !b[d].dockInsidePlotArea === !this.dockInsidePlotArea) { + this.margin = 0; + break + } + "undefined" === typeof this._options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); + this.height = this.width = null; + this.bounds = {x1: null, y1: null, x2: null, y2: null} + } + function na(a, c) { + na.base.constructor.call(this, + "Subtitle", c, a.theme); + this.chart = a; + this.canvas = a.canvas; + this.ctx = this.chart.ctx; + "undefined" === typeof this._options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); + this.height = this.width = null; + this.bounds = {x1: null, y1: null, x2: null, y2: null} + } + function oa(a, c, b) { + oa.base.constructor.call(this, "Legend", c, b); + this.chart = a; + this.canvas = a.canvas; + this.ctx = this.chart.ctx; + this.ghostCtx = this.chart._eventManager.ghostCtx; + this.items = []; + this.height = this.width = 0; + this.orientation = null; + this.dataSeries = + []; + this.bounds = {x1: null, y1: null, x2: null, y2: null}; + "undefined" === typeof this._options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); + this.lineHeight = Ca(this.fontFamily, this.fontSize, this.fontWeight); + this.horizontalSpacing = this.fontSize + } + function ua(a, c) { + ua.base.constructor.call(this, c); + this.chart = a; + this.canvas = a.canvas; + this.ctx = this.chart.ctx + } + function Y(a, c, b, d, e) { + Y.base.constructor.call(this, "DataSeries", c, b); + this.chart = a; + this.canvas = a.canvas; + this._ctx = a.canvas.ctx; + this.index = d; + this.noDataPointsInPlotArea = 0; + this.id = e; + this.chart._eventManager.objectMap[e] = {id: e, objectType: "dataSeries", dataSeriesIndex: d}; + this.dataPointIds = []; + this.plotUnit = []; + + this.axisY = this.axisX = null; + null === this.fillOpacity && (this.type.match(/area/i) ? this.fillOpacity = 0.7 : this.fillOpacity = 1); + this.axisPlacement = this.getDefaultAxisPlacement(); + "undefined" === typeof this._options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize)) + } + function F(a, c, b, d) { + F.base.constructor.call(this, + "Axis", c, a.theme); + this.chart = a; + this.canvas = a.canvas; + this.ctx = a.ctx; + this.intervalStartPosition = this.maxHeight = this.maxWidth = 0; + this.labels = []; + this._stripLineLabels = this._labels = null; + this.dataInfo = {min: Infinity, max: -Infinity, viewPortMin: Infinity, viewPortMax: -Infinity, minDiff: Infinity}; + "axisX" === b ? (this.sessionVariables = this.chart.sessionVariables[b], this._options.interval || (this.intervalType = null), "theme2" === this.chart.theme && x(this._options.lineThickness) && (this.lineThickness = 2)) : this.sessionVariables = + "left" === d || "top" === d ? this.chart.sessionVariables.axisY : this.chart.sessionVariables.axisY2; + "undefined" === typeof this._options.titleFontSize && (this.titleFontSize = this.chart.getAutoFontSize(this.titleFontSize)); + "undefined" === typeof this._options.labelFontSize && (this.labelFontSize = this.chart.getAutoFontSize(this.labelFontSize)); + this.type = b; + "axisX" !== b || c && "undefined" !== typeof c.gridThickness || (this.gridThickness = 0); + this._position = d; + this.lineCoordinates = {x1: null, y1: null, x2: null, y2: null, width: null}; + this.labelAngle = + (this.labelAngle % 360 + 360) % 360; + 90 < this.labelAngle && 270 >= this.labelAngle ? this.labelAngle -= 180 : 270 < this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360); + if (this._options.stripLines && 0 < this._options.stripLines.length) + for (this.stripLines = [], c = 0; c < this._options.stripLines.length; c++) + this.stripLines.push(new pa(this.chart, this._options.stripLines[c], a.theme, ++this.chart._eventManager.lastObjectId, this)); + this._titleTextBlock = null; + this.hasOptionChanged("viewportMinimum") && null === this.viewportMinimum && + (this._options.viewportMinimum = void 0, this.sessionVariables.viewportMinimum = null); + this.hasOptionChanged("viewportMinimum") || isNaN(this.sessionVariables.newViewportMinimum) || null === this.sessionVariables.newViewportMinimum ? this.sessionVariables.newViewportMinimum = null : this.viewportMinimum = this.sessionVariables.newViewportMinimum; + this.hasOptionChanged("viewportMaximum") && null === this.viewportMaximum && (this._options.viewportMaximum = void 0, this.sessionVariables.viewportMaximum = null); + this.hasOptionChanged("viewportMaximum") || + isNaN(this.sessionVariables.newViewportMaximum) || null === this.sessionVariables.newViewportMaximum ? this.sessionVariables.newViewportMaximum = null : this.viewportMaximum = this.sessionVariables.newViewportMaximum; + null !== this.minimum && null !== this.viewportMinimum && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum)); + null !== this.maximum && null !== this.viewportMaximum && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum)); + this.trackChanges("viewportMinimum"); + this.trackChanges("viewportMaximum") + } + function pa(a, c, b, d, e) { + pa.base.constructor.call(this, "StripLine", c, b, e); + this.id = d; + this.chart = a; + this.ctx = this.chart.ctx; + this.label = this.label; + this._thicknessType = "pixel"; + null !== this.startValue && null !== this.endValue && (this.value = ((this.startValue.getTime ? this.startValue.getTime() : this.startValue) + (this.endValue.getTime ? this.endValue.getTime() : this.endValue)) / 2, this.thickness = Math.max(this.endValue - this.startValue), this._thicknessType = "value") + } + function V(a, c, b) { + V.base.constructor.call(this, "ToolTip", + c, b); + this.chart = a; + this.canvas = a.canvas; + this.ctx = this.chart.ctx; + this.currentDataPointIndex = this.currentSeriesIndex = -1; + this._timerId = 0; + this._prevY = this._prevX = NaN; + this._initialize() + } + function fa(a) { + this.chart = a; + this.lastObjectId = 0; + this.objectMap = []; + this.rectangularRegionEventSubscriptions = []; + this.previousDataPointEventObject = null; + this.ghostCanvas = $(this.chart.width, this.chart.height); + this.ghostCtx = this.ghostCanvas.getContext("2d"); + this.mouseoveredObjectMaps = [] + } + function ha(a) { + var c; + a && ia[a] && (c = ia[a]); + ha.base.constructor.call(this, "CultureInfo", c) + } + function va(a) { + this.chart = a; + this.ctx = this.chart.plotArea.ctx; + this.animations = []; + this.animationRequestId = null + } + var u = !!document.createElement("canvas").getContext, + qa = {Chart: {width: 500, height: 400, zoomEnabled: !1, zoomType: "x", backgroundColor: "white", theme: "theme1", animationEnabled: !1, animationDuration: 1200, dataPointWidth: null, dataPointMinWidth: null, dataPointMaxWidth: null, colorSet: "colorSet1", culture: "en", creditText: "CanvasJS.com", interactivityEnabled: !0, exportEnabled: !1, + exportFileName: "Chart", rangeChanging: null, rangeChanged: null}, + Title: {padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 20, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, margin: 5, wrap: !0, maxWidth: null, dockInsidePlotArea: !1}, + Subtitle: {padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 14, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", + borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, margin: 2, wrap: !0, maxWidth: null, dockInsidePlotArea: !1}, + Legend: {name: null, verticalAlign: "center", horizontalAlign: "right", fontSize: 14, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", cursor: null, itemmouseover: null, itemmouseout: null, itemmousemove: null, itemclick: null, dockInsidePlotArea: !1, reversed: !1, maxWidth: null, maxHeight: null, itemMaxWidth: null, itemWidth: null, itemWrap: !0, itemTextFormatter: null}, + ToolTip: {enabled: !0,shared: !1, animationEnabled: !0, content: null, contentFormatter: null, reversed: !1, backgroundColor: null, borderColor: null, borderThickness: 2, cornerRadius: 5, fontSize: 14, fontColor: null, fontFamily: "Calibri, Arial, Georgia, serif;", fontWeight: "normal", fontStyle: "italic"}, + Axis: {minimum: null, maximum: null, viewportMinimum: null, viewportMaximum: null, interval: null, intervalType: null, title: null, titleFontColor: "black", titleFontSize: 20, titleFontFamily: "arial", titleFontWeight: "normal", titleFontStyle: "normal", titleWrap: !0, + titleMaxWidth: null, labelAngle: 0, labelFontFamily: "arial", labelFontColor: "black", labelFontSize: 12, labelFontWeight: "normal", labelFontStyle: "normal", labelAutoFit: !0, labelWrap: !0, labelMaxWidth: null, labelFormatter: null, prefix: "", suffix: "", includeZero: !0, tickLength: 5, tickColor: "black", tickThickness: 1, lineColor: "black", lineThickness: 1, lineDashType: "solid", gridColor: "A0A0A0", gridThickness: 0, gridDashType: "solid", interlacedColor: null, valueFormatString: null, margin: 2, stripLines: []}, + StripLine: {value: null, startValue: null,endValue: null, color: "orange", opacity: null, thickness: 2, lineDashType: "solid", label: "", labelPlacement: "inside", labelAlign: "far", labelWrap: !0, labelMaxWidth: null, labelBackgroundColor: "transparent", labelFontFamily: "arial", labelFontColor: "orange", labelFontSize: 12, labelFontWeight: "normal", labelFontStyle: "normal", labelFormatter: null, showOnTop: !1}, + DataSeries: {name: null, dataPoints: null, label: "", bevelEnabled: !1, highlightEnabled: !0, cursor: null, indexLabel: "", indexLabelPlacement: "auto", indexLabelOrientation: "horizontal", + indexLabelFontColor: "black", indexLabelFontSize: 12, indexLabelFontStyle: "normal", indexLabelFontFamily: "Arial", indexLabelFontWeight: "normal", indexLabelBackgroundColor: null, indexLabelLineColor: null, indexLabelLineThickness: 1, indexLabelLineDashType: "solid", indexLabelMaxWidth: null, indexLabelWrap: !0, indexLabelFormatter: null, lineThickness: 2, lineDashType: "solid", connectNullData: !1, nullDataLineDashType: "dash", color: null, lineColor: null, risingColor: "white", fillOpacity: null, startAngle: 0, radius: null, innerRadius: null, + type: "column", xValueType: "number", axisYType: "primary", xValueFormatString: null, yValueFormatString: null, zValueFormatString: null, percentFormatString: null, showInLegend: null, legendMarkerType: null, legendMarkerColor: null, legendText: null, legendMarkerBorderColor: null, legendMarkerBorderThickness: null, markerType: "circle", markerColor: null, markerSize: null, markerBorderColor: null, markerBorderThickness: null, mouseover: null, mouseout: null, mousemove: null, click: null, toolTipContent: null, visible: !0}, + TextBlock: {x: 0, y: 0, width: null, height: null, maxWidth: null, maxHeight: null, padding: 0, angle: 0, text: "", horizontalAlign: "center", fontSize: 12, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, textBaseline: "top"}, + CultureInfo: {decimalSeparator: ".", digitGroupSeparator: ",", zoomText: "Zoom", panText: "Pan", resetText: "Reset", menuText: "More Options", saveJPGText: "Save as JPEG", savePNGText: "Save as PNG", days: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), + shortDays: "Sun Mon Tue Wed Thu Fri Sat".split(" "), months: "January February March April May June July August September October November December".split(" "), shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}}, ia = {en: {}}, aa = {colorSet1: "#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "), colorSet2: "#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "), colorSet3: "#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")}, + ca = {theme1: {Chart: {colorSet: "colorSet1"}, + Title: {fontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", fontSize: 33, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5}, + Subtitle: {fontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", fontSize: 16, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5}, Axis: {titleFontSize: 26, titleFontColor: "#666666", titleFontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", + labelFontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", labelFontSize: 18, labelFontColor: "grey", tickColor: "#BBBBBB", tickThickness: 2, gridThickness: 2, gridColor: "#BBBBBB", lineThickness: 2, lineColor: "#BBBBBB"}, Legend: {verticalAlign: "bottom", horizontalAlign: "center", fontFamily: u ? "monospace, sans-serif,arial black" : "calibri"}, DataSeries: {indexLabelFontColor: "grey", indexLabelFontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", indexLabelFontSize: 18, indexLabelLineThickness: 1}}, + theme2: {Chart: {colorSet: "colorSet2"}, + Title: {fontFamily: "impact, charcoal, arial black, sans-serif", fontSize: 32, fontColor: "#333333", verticalAlign: "top", margin: 5}, + Subtitle: {fontFamily: "impact, charcoal, arial black, sans-serif", fontSize: 14, fontColor: "#333333", verticalAlign: "top", margin: 5}, + Axis: {titleFontSize: 22, titleFontColor: "rgb(98,98,98)", titleFontFamily: u ? "monospace, sans-serif,arial black" : "arial", titleFontWeight: "bold", labelFontFamily: u ? "monospace, Courier New, Courier" : "arial", labelFontSize: 16, + labelFontColor: "grey", labelFontWeight: "bold", tickColor: "grey", tickThickness: 2, gridThickness: 2, gridColor: "grey", lineColor: "grey", lineThickness: 0}, + Legend: {verticalAlign: "bottom", horizontalAlign: "center", fontFamily: u ? "monospace, sans-serif,arial black" : "arial"}, + DataSeries: {indexLabelFontColor: "grey", indexLabelFontFamily: u ? "Courier New, Courier, monospace" : "arial", indexLabelFontWeight: "bold", indexLabelFontSize: 18, indexLabelLineThickness: 1}}, + theme3: {Chart: {colorSet: "colorSet1"}, + Title: {fontFamily: u ? "Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif" :"calibri", fontSize: 32, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5}, + Subtitle: {fontFamily: u ? "Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif" : "calibri", fontSize: 16, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5}, + Axis: {titleFontSize: 22, titleFontColor: "rgb(98,98,98)", titleFontFamily: u ? "Verdana, Geneva, Calibri, sans-serif" : "calibri", labelFontFamily: u ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", labelFontSize: 18, + labelFontColor: "grey", tickColor: "grey", tickThickness: 2, gridThickness: 2, gridColor: "grey", lineThickness: 2, lineColor: "grey"}, + Legend: {verticalAlign: "bottom", horizontalAlign: "center", fontFamily: u ? "monospace, sans-serif,arial black" : "calibri"}, + DataSeries: {bevelEnabled: !0, indexLabelFontColor: "grey", indexLabelFontFamily: u ? "Candara, Optima, Calibri, Verdana, Geneva, sans-serif" : "calibri", indexLabelFontSize: 18, indexLabelLineColor: "lightgrey", indexLabelLineThickness: 2}}}, + E = {numberDuration: 1, yearDuration: 314496E5, + monthDuration: 2592E6, weekDuration: 6048E5, dayDuration: 864E5, hourDuration: 36E5, minuteDuration: 6E4, secondDuration: 1E3, millisecondDuration: 1, dayOfWeekFromInt: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")}, Da = {}, Z = null, wa = function () { + var a = /D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g, c = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), b = "Sun Mon Tue Wed Thu Fri Sat".split(" "), d = "January February March April May June July August September October November December".split(" "), + e = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), f = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, g = /[^-+\dA-Z]/g; + return function (h, q, k) { + var n = k ? k.days : c, m = k ? k.months : d, l = k ? k.shortDays : b, p = k ? k.shortMonths : e; + k = ""; + var r = !1; + h = h && h.getTime ? h : h ? new Date(h) : new Date; + if (isNaN(h)) + throw SyntaxError("invalid date"); + "UTC:" === q.slice(0, 4) && (q = q.slice(4), r = !0); + k = r ? "getUTC" : "get"; + var t = h[k + "Date"](), y = h[k + "Day"](), + s = h[k + "Month"](), z = h[k + "FullYear"](), w = h[k + "Hours"](), u = h[k + "Minutes"](), W = h[k + "Seconds"](), x = h[k + "Milliseconds"](), v = r ? 0 : h.getTimezoneOffset(); + return k = q.replace(a, function (a) { + switch (a) { + case "D": + return t; + case "DD": + return Q(t, 2); + case "DDD": + return l[y]; + case "DDDD": + return n[y]; + case "M": + return s + 1; + case "MM": + return Q(s + 1, 2); + case "MMM": + return p[s]; + case "MMMM": + return m[s]; + case "Y": + return parseInt(String(z).slice(-2)); + case "YY": + return Q(String(z).slice(-2), 2); + case "YYY": + return Q(String(z).slice(-3), 3); + case "YYYY": + return Q(z, + 4); + case "h": + return w % 12 || 12; + case "hh": + return Q(w % 12 || 12, 2); + case "H": + return w; + case "HH": + return Q(w, 2); + case "m": + return u; + case "mm": + return Q(u, 2); + case "s": + return W; + case "ss": + return Q(W, 2); + case "f": + return String(x).slice(0, 1); + case "ff": + return Q(String(x).slice(0, 2), 2); + case "fff": + return Q(String(x).slice(0, 3), 3); + case "t": + return 12 > w ? "a" : "p"; + case "tt": + return 12 > w ? "am" : "pm"; + case "T": + return 12 > w ? "A" : "P"; + case "TT": + return 12 > w ? "AM" : "PM"; + case "K": + return r ? "UTC" : (String(h).match(f) || [""]).pop().replace(g, ""); + case "z": + return(0 < v ? "-" : "+") + Math.floor(Math.abs(v) / 60); + case "zz": + return(0 < v ? "-" : "+") + Q(Math.floor(Math.abs(v) / 60), 2); + case "zzz": + return(0 < v ? "-" : "+") + Q(Math.floor(Math.abs(v) / 60), 2) + Q(Math.abs(v) % 60, 2); + default: + return a.slice(1, a.length - 1) + } + }) + } + }(), ba = function (a, c, b) { + if (null === a) + return""; + a = Number(a); + var d = 0 > a ? !0 : !1; + d && (a *= -1); + var e = b ? b.decimalSeparator : ".", f = b ? b.digitGroupSeparator : ",", g = ""; + c = String(c); + var g = 1, h = b = "", q = -1, k = [], n = [], m = 0, l = 0, p = 0, r = !1, t = 0, h = c.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g); + c = null; + for (var y = 0; h && y < h.length; y++) + if (c = h[y], "." === c && 0 > q) + q = y; + else { + if ("%" === c) + g *= 100; + else if ("\u2030" === c) { + g *= 1E3; + continue + } else if ("," === c[0] && "." === c[c.length - 1]) { + g /= Math.pow(1E3, c.length - 1); + q = y + c.length - 1; + continue + } else + "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || (r = !0); + 0 > q ? (k.push(c), "#" === c || "0" === c ? m++ : "," === c && p++) : (n.push(c), "#" !== c && "0" !== c || l++) + } + r && (c = Math.floor(a), t = (0 === c ? "" : String(c)).length - m, g /= Math.pow(10, t)); + 0 > q && (q = y); + g = (a * g).toFixed(l); + c = g.split("."); + g = (c[0] + "").split(""); + a = (c[1] + + "").split(""); + g && "0" === g[0] && g.shift(); + for (y = r = h = l = q = 0; 0 < k.length; ) + if (c = k.pop(), "#" === c || "0" === c) + if (q++, q === m) { + var s = g, g = []; + if ("0" === c) + for (c = m - l - (s?s.length:0); 0 < c; ) + s.unshift("0"), c--; + for (; 0 < s.length; ) + b = s.pop() + b, y++, 0 === y % r && (h === p && 0 < s.length) && (b = f + b); + d && (b = "-" + b) + } else + 0 < g.length ? (b = g.pop() + b, l++, y++) : "0" === c && (b = "0" + b, l++, y++), 0 === y % r && (h === p && 0 < g.length) && (b = f + b); + else + "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || !/[eE][+-]*[0]+/.test(c) ? "," === c ? (h++, r = y, y = 0, 0 < g.length && (b = f + b)) : b = 1 < c.length && + ('"' === c[0] && '"' === c[c.length - 1] || "'" === c[0] && "'" === c[c.length - 1]) ? c.slice(1, c.length - 1) + b : c + b : (c = 0 > t ? c.replace("+", "").replace("-", "") : c.replace("-", ""), b += c.replace(/[0]+/, function (a) { + return Q(t, a.length) + })); + d = ""; + for (f = !1; 0 < n.length; ) + c = n.shift(), "#" === c || "0" === c ? 0 < a.length && 0 !== Number(a.join("")) ? (d += a.shift(), f = !0) : "0" === c && (d += "0", f = !0) : 1 < c.length && ('"' === c[0] && '"' === c[c.length - 1] || "'" === c[0] && "'" === c[c.length - 1]) ? d += c.slice(1, c.length - 1) : "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || !/[eE][+-]*[0]+/.test(c) ? + d += c : (c = 0 > t ? c.replace("+", "").replace("-", "") : c.replace("-", ""), d += c.replace(/[0]+/, function (a) { + return Q(t, a.length) + })); + return b + ((f ? e : "") + d) + }, ra = function (a) { + var c = 0, b = 0; + a = a || window.event; + a.offsetX || 0 === a.offsetX ? (c = a.offsetX, b = a.offsetY) : a.layerX || 0 == a.layerX ? (c = a.layerX, b = a.layerY) : (c = a.pageX - a.target.offsetLeft, b = a.pageY - a.target.offsetTop); + return{x: c, y: b} + }, Fa = !0, ta = window.devicePixelRatio || 1, ka = 1, N = Fa ? ta / ka : 1, Ma = {reset: {image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUg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gIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC"}}; + L.prototype.setOptions = function (a, c) { + if (qa[this._defaultsKey]) { + var b = qa[this._defaultsKey], d; + for (d in b) + b.hasOwnProperty(d) && (this[d] = a && d in a ? a[d] : c && d in + c ? c[d] : b[d]) + } + }; + L.prototype.updateOption = function (a) { + var c = qa[this._defaultsKey], b = this._options.theme ? this._options.theme : this.chart && this.chart._options.theme ? this.chart._options.theme : "theme1", d = {}, e = this[a]; + b && (ca[b] && ca[b][this._defaultsKey]) && (d = ca[b][this._defaultsKey]); + a in c && (e = a in this._options ? this._options[a] : d && a in d ? d[a] : c[a]); + if (e === this[a]) + return!1; + this[a] = e; + return!0 + }; + L.prototype.trackChanges = function (a) { + if (!this.sessionVariables) + throw"Session Variable Store not set"; + this.sessionVariables[a] = + this._options[a] + }; + L.prototype.isBeingTracked = function (a) { + this._options._oldOptions || (this._options._oldOptions = {}); + return this._options._oldOptions[a] ? !0 : !1 + }; + L.prototype.hasOptionChanged = function (a) { + if (!this.sessionVariables) + throw"Session Variable Store not set"; + return this.sessionVariables[a] !== this._options[a] + }; + L.prototype.addEventListener = function (a, c, b) { + a && c && (this._eventListeners[a] = this._eventListeners[a] || [], this._eventListeners[a].push({context: b || this, eventHandler: c})) + }; + L.prototype.removeEventListener = + function (a, c) { + if (a && c && this._eventListeners[a]) + for (var b = this._eventListeners[a], d = 0; d < b.length; d++) + if (b[d].eventHandler === c) { + b[d].splice(d, 1); + break + } + }; + L.prototype.removeAllEventListeners = function () { + this._eventListeners = [] + }; + L.prototype.dispatchEvent = function (a, c, b) { + if (a && this._eventListeners[a]) { + c = c || {}; + for (var d = this._eventListeners[a], e = 0; e < d.length; e++) + d[e].eventHandler.call(d[e].context, c) + } + "function" === typeof this[a] && this[a].call(b || this.chart._publicChartReference, c) + }; + T(v, L); + v.prototype._updateOptions = + function () { + var a = this; + this.updateOption("width"); + this.updateOption("height"); + this.updateOption("dataPointWidth"); + this.updateOption("dataPointMinWidth"); + this.updateOption("dataPointMaxWidth"); + this.updateOption("interactivityEnabled"); + this.updateOption("theme"); + this.updateOption("colorSet") && (this._selectedColorSet = "undefined" !== typeof aa[this.colorSet] ? aa[this.colorSet] : aa.colorSet1); + this.updateOption("backgroundColor"); + this.backgroundColor || (this.backgroundColor = "rgba(0,0,0,0)"); + this.updateOption("culture"); + this._cultureInfo = new ha(this._options.culture); + this.updateOption("animationEnabled"); + this.animationEnabled = this.animationEnabled && u; + this.updateOption("animationDuration"); + this.updateOption("rangeChanging"); + this.updateOption("rangeChanged"); + this.updateOption("exportEnabled"); + this.updateOption("exportFileName"); + this.updateOption("zoomType"); + this._options.zoomEnabled ? (this._zoomButton || (X(this._zoomButton = document.createElement("button")), U(this, this._zoomButton, "pan"), this._toolBar.appendChild(this._zoomButton), + J(this._zoomButton, "click", function () { + a.zoomEnabled ? (a.zoomEnabled = !1, a.panEnabled = !0, U(a, a._zoomButton, "zoom")) : (a.zoomEnabled = !0, a.panEnabled = !1, U(a, a._zoomButton, "pan")); + a.render() + })), this._resetButton || (X(this._resetButton = document.createElement("button")), U(this, this._resetButton, "reset"), this._toolBar.appendChild(this._resetButton), J(this._resetButton, "click", function () { + a._toolTip.hide(); + a.zoomEnabled || a.panEnabled ? (a.zoomEnabled = !0, a.panEnabled = !1, U(a, a._zoomButton, "pan"), a._defaultCursor = + "default", a.overlaidCanvas.style.cursor = a._defaultCursor) : (a.zoomEnabled = !1, a.panEnabled = !1); + a.sessionVariables.axisX && (a.sessionVariables.axisX.newViewportMinimum = null, a.sessionVariables.axisX.newViewportMaximum = null); + a.sessionVariables.axisY && (a.sessionVariables.axisY.newViewportMinimum = null, a.sessionVariables.axisY.newViewportMaximum = null); + a.sessionVariables.axisY2 && (a.sessionVariables.axisY2.newViewportMinimum = null, a.sessionVariables.axisY2.newViewportMaximum = null); + a.resetOverlayedCanvas(); + X(a._zoomButton, + a._resetButton); + a._dispatchRangeEvent("rangeChanging", "reset"); + a.render(); + a._dispatchRangeEvent("rangeChanged", "reset") + }), this.overlaidCanvas.style.cursor = a._defaultCursor), this.zoomEnabled || this.panEnabled || (this._zoomButton ? (a._zoomButton.getAttribute("state") === a._cultureInfo.zoomText ? (this.panEnabled = !0, this.zoomEnabled = !1) : (this.zoomEnabled = !0, this.panEnabled = !1), la(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1))) : this.panEnabled = this.zoomEnabled = !1; + this._menuButton ? + this.exportEnabled ? la(this._menuButton) : X(this._menuButton) : this.exportEnabled && u && (this._menuButton = document.createElement("button"), U(this, this._menuButton, "menu"), this._toolBar.appendChild(this._menuButton), J(this._menuButton, "click", function () { + "none" !== a._dropdownMenu.style.display || a._dropDownCloseTime && 500 >= (new Date).getTime() - a._dropDownCloseTime.getTime() || (a._dropdownMenu.style.display = "block", a._menuButton.blur(), a._dropdownMenu.focus()) + }, !0)); + if (!this._dropdownMenu && this.exportEnabled && + u) { + this._dropdownMenu = document.createElement("div"); + this._dropdownMenu.setAttribute("tabindex", -1); + this._dropdownMenu.style.cssText = "position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;"; + a._dropdownMenu.style.display = "none"; + this._toolBar.appendChild(this._dropdownMenu); + J(this._dropdownMenu, "blur", function () { + X(a._dropdownMenu); + a._dropDownCloseTime = new Date + }, !0); + var c = document.createElement("div"); + c.style.cssText = "padding: 2px 15px 2px 10px"; + c.innerHTML = this._cultureInfo.saveJPGText; + this._dropdownMenu.appendChild(c); + J(c, "mouseover", function () { + this.style.backgroundColor = "#EEEEEE" + }, !0); + J(c, "mouseout", function () { + this.style.backgroundColor = "transparent" + }, !0); + J(c, "click", function () { + Ga(a.canvas, + "jpeg", a.exportFileName); + X(a._dropdownMenu) + }, !0); + c = document.createElement("div"); + c.style.cssText = "padding: 2px 15px 2px 10px"; + c.innerHTML = this._cultureInfo.savePNGText; + this._dropdownMenu.appendChild(c); + J(c, "mouseover", function () { + this.style.backgroundColor = "#EEEEEE" + }, !0); + J(c, "mouseout", function () { + this.style.backgroundColor = "transparent" + }, !0); + J(c, "click", function () { + Ga(a.canvas, "png", a.exportFileName); + X(a._dropdownMenu) + }, !0) + } + "none" !== this._toolBar.style.display && this._zoomButton && (this.panEnabled ? U(a, + a._zoomButton, "zoom") : U(a, a._zoomButton, "pan"), a._resetButton.getAttribute("state") !== a._cultureInfo.resetText && U(a, a._resetButton, "reset")); + if ("undefined" === typeof qa.Chart.creditHref) + this.creditHref = "http://canvasjs.com/", this.creditText = "CanvasJS.com"; + else + var b = this.updateOption("creditText"), d = this.updateOption("creditHref"); + if (0 === this.renderCount || b || d) + this._creditLink.setAttribute("href", this.creditHref), this._creditLink.innerHTML = this.creditText; + this.creditHref && this.creditText ? this._creditLink.parentElement || + this._canvasJSContainer.appendChild(this._creditLink) : this._creditLink.parentElement && this._canvasJSContainer.removeChild(this._creditLink); + this._options.toolTip && this._toolTip._options !== this._options.toolTip && (this._toolTip._options = this._options.toolTip); + for (var e in this._toolTip._options) + this._toolTip._options.hasOwnProperty(e) && this._toolTip.updateOption(e) + }; + v.prototype._updateSize = function () { + var a = 0, c = 0; + this._options.width ? a = this.width : this.width = a = 0 < this._container.clientWidth ? this._container.clientWidth : + this.width; + this._options.height ? c = this.height : this.height = c = 0 < this._container.clientHeight ? this._container.clientHeight : this.height; + return this.canvas.width !== a * N || this.canvas.height !== c * N ? (ja(this.canvas, a, c), ja(this.overlaidCanvas, a, c), ja(this._eventManager.ghostCanvas, a, c), !0) : !1 + }; + v.prototype._initialize = function () { + this._animator ? this._animator.cancelAllAnimations() : this._animator = new va(this); + this.removeAllEventListeners(); + this.disableToolTip = !1; + this._axes = []; + this.pieDoughnutClickHandler = null; + this.animationRequestId && this.cancelRequestAnimFrame.call(window, this.animationRequestId); + this._updateOptions(); + this.animatedRender = u && this.animationEnabled && 0 === this.renderCount; + this._updateSize(); + this.clearCanvas(); + this.ctx.beginPath(); + this.axisY2 = this.axisY = this.axisX = null; + this._indexLabels = []; + this._dataInRenderedOrder = []; + this._events = []; + this._eventManager && this._eventManager.reset(); + this.plotInfo = {axisPlacement: null, axisXValueType: null, plotTypes: []}; + this.layoutManager = new da(0, 0, this.width, this.height, + 2); + this.plotArea.layoutManager && this.plotArea.layoutManager.reset(); + this.data = []; + var a = 0; + if (this._options.data) + for (var c = 0; c < this._options.data.length; c++) + if (a++, !this._options.data[c].type || 0 <= v._supportedChartTypes.indexOf(this._options.data[c].type)) { + var b = new Y(this, this._options.data[c], this.theme, a - 1, ++this._eventManager.lastObjectId); + null === b.name && (b.name = "DataSeries " + a); + null === b.color ? 1 < this._options.data.length ? (b._colorSet = [this._selectedColorSet[b.index % this._selectedColorSet.length]], + b.color = this._selectedColorSet[b.index % this._selectedColorSet.length]) : b._colorSet = "line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "candlestick" === b.type || "ohlc" === b.type ? [this._selectedColorSet[0]] : this._selectedColorSet : b._colorSet = [b.color]; + null === b.markerSize && (("line" === b.type || "stepLine" === b.type || "spline" === b.type || 0 <= b.type.toLowerCase().indexOf("area")) && + b.dataPoints && b.dataPoints.length < this.width / 16 || "scatter" === b.type) && (b.markerSize = 8); + "bubble" !== b.type && "scatter" !== b.type || !b.dataPoints || (b.dataPoints.some ? b.dataPoints.some(function (a) { + return a.x + }) && b.dataPoints.sort(Ba) : b.dataPoints.sort(Ba)); + this.data.push(b); + var d = b.axisPlacement, e; + "normal" === d ? "xySwapped" === this.plotInfo.axisPlacement ? e = 'You cannot combine "' + b.type + '" with bar chart' : "none" === this.plotInfo.axisPlacement ? e = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && + (this.plotInfo.axisPlacement = "normal") : "xySwapped" === d ? "normal" === this.plotInfo.axisPlacement ? e = 'You cannot combine "' + b.type + '" with line, area, column or pie chart' : "none" === this.plotInfo.axisPlacement ? e = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "xySwapped") : "none" == d && ("normal" === this.plotInfo.axisPlacement ? e = 'You cannot combine "' + b.type + '" with line, area, column or bar chart' : "xySwapped" === this.plotInfo.axisPlacement ? e = + 'You cannot combine "' + b.type + '" with bar chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "none")); + if (e && window.console) { + window.console.log(e); + return + } + } + this._objectsInitialized = !0 + }; + v._supportedChartTypes = function (a) { + a.indexOf || (a.indexOf = La); + return a + }("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc rangeColumn rangeBar rangeArea rangeSplineArea pie doughnut funnel".split(" ")); + v.prototype.render = function (a) { + a && (this._options = a); + this._initialize(); + var c = []; + for (a = 0; a < this.data.length; a++) + if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) + this.data[a].axisYType && "primary" !== this.data[a].axisYType ? "secondary" === this.data[a].axisYType && (this.axisY2 || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2 = new F(this, this._options.axisY2, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2 = new F(this, + this._options.axisY2, "axisY", "top"))), this.data[a].axisY = this.axisY2) : (this.axisY || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY = new F(this, this._options.axisY, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY = new F(this, this._options.axisY, "axisY", "bottom"))), this.data[a].axisY = this.axisY), this.axisX || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX = new F(this, this._options.axisX, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && + this._axes.push(this.axisX = new F(this, this._options.axisX, "axisX", "left"))), this.data[a].axisX = this.axisX; + this.axisY && this.axisY2 && (0 < this.axisY.gridThickness && "undefined" === typeof this.axisY2._options.gridThickness ? this.axisY2.gridThickness = 0 : 0 < this.axisY2.gridThickness && "undefined" === typeof this.axisY._options.gridThickness && (this.axisY.gridThickness = 0)); + var b = !1; + if (0 < this._axes.length && (this.zoomEnabled || this.panEnabled)) + for (a = 0; a < this._axes.length; a++) + if (null !== this._axes[a].viewportMinimum || + null !== this._axes[a].viewportMaximum) { + b = !0; + break + } + b ? la(this._zoomButton, this._resetButton) : (X(this._zoomButton, this._resetButton), this._options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1)); + this._processData(); + this._options.title && (this._title = new ga(this, this._options.title), this._title.dockInsidePlotArea ? c.push(this._title) : this._title.render()); + if (this._options.subtitles) + for (a = 0; a < this._options.subtitles.length; a++) + this.subtitles = [], b = new na(this, this._options.subtitles[a]), this.subtitles.push(b), + b.dockInsidePlotArea ? c.push(b) : b.render(); + this.legend = new oa(this, this._options.legend, this.theme); + for (a = 0; a < this.data.length; a++) + (this.data[a].showInLegend || "pie" === this.data[a].type || "doughnut" === this.data[a].type) && this.legend.dataSeries.push(this.data[a]); + this.legend.dockInsidePlotArea ? c.push(this.legend) : this.legend.render(); + if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) + F.setLayoutAndRender(this.axisX, this.axisY, this.axisY2, this.plotInfo.axisPlacement, this.layoutManager.getFreeSpace()); + else if ("none" === this.plotInfo.axisPlacement) + this.preparePlotArea(); + else + return; + for (a = 0; a < c.length; a++) + c[a].render(); + var d = []; + if (this.animatedRender) { + var e = $(this.width, this.height); + e.getContext("2d").drawImage(this.canvas, 0, 0, this.width, this.height) + } + for (a = 0; a < this.plotInfo.plotTypes.length; a++) + for (c = this.plotInfo.plotTypes[a], b = 0; b < c.plotUnits.length; b++) { + var f = c.plotUnits[b], g = null; + f.targetCanvas = null; + this.animatedRender && (f.targetCanvas = $(this.width, this.height), f.targetCanvasCtx = f.targetCanvas.getContext("2d")); + "line" === f.type ? g = this.renderLine(f) : "stepLine" === f.type ? g = this.renderStepLine(f) : "spline" === f.type ? g = this.renderSpline(f) : "column" === f.type ? g = this.renderColumn(f) : "bar" === f.type ? g = this.renderBar(f) : "area" === f.type ? g = this.renderArea(f) : "stepArea" === f.type ? g = this.renderStepArea(f) : "splineArea" === f.type ? g = this.renderSplineArea(f) : "stackedColumn" === f.type ? g = this.renderStackedColumn(f) : "stackedColumn100" === f.type ? g = this.renderStackedColumn100(f) : "stackedBar" === f.type ? g = this.renderStackedBar(f) : "stackedBar100" === + f.type ? g = this.renderStackedBar100(f) : "stackedArea" === f.type ? g = this.renderStackedArea(f) : "stackedArea100" === f.type ? g = this.renderStackedArea100(f) : "bubble" === f.type ? g = g = this.renderBubble(f) : "scatter" === f.type ? g = this.renderScatter(f) : "pie" === f.type ? this.renderPie(f) : "doughnut" === f.type ? this.renderPie(f) : "candlestick" === f.type ? g = this.renderCandlestick(f) : "ohlc" === f.type ? g = this.renderCandlestick(f) : "rangeColumn" === f.type ? g = this.renderRangeColumn(f) : "rangeBar" === f.type ? g = this.renderRangeBar(f) : "rangeArea" === + f.type ? g = this.renderRangeArea(f) : "rangeSplineArea" === f.type && (g = this.renderRangeSplineArea(f)); + for (var h = 0; h < f.dataSeriesIndexes.length; h++) + this._dataInRenderedOrder.push(this.data[f.dataSeriesIndexes[h]]); + this.animatedRender && g && d.push(g) + } + this.animatedRender && 0 < this._indexLabels.length && (a = $(this.width, this.height).getContext("2d"), d.push(this.renderIndexLabels(a))); + var q = this; + 0 < d.length ? (q.disableToolTip = !0, q._animator.animate(200, q.animationDuration, function (a) { + q.ctx.clearRect(0, 0, q.width, q.height); + q.ctx.drawImage(e, 0, 0, Math.floor(q.width * N), Math.floor(q.height * N), 0, 0, q.width, q.height); + for (var b = 0; b < d.length; b++) + g = d[b], 1 > a && "undefined" !== typeof g.startTimePercent ? a >= g.startTimePercent && g.animationCallback(g.easingFunction(a - g.startTimePercent, 0, 1, 1 - g.startTimePercent), g) : g.animationCallback(g.easingFunction(a, 0, 1, 1), g); + q.dispatchEvent("dataAnimationIterationEnd", {chart: q}) + }, function () { + d = []; + for (var a = 0; a < q.plotInfo.plotTypes.length; a++) + for (var b = q.plotInfo.plotTypes[a], c = 0; c < b.plotUnits.length; c++) + b.plotUnits[c].targetCanvas = + null; + e = null; + q.disableToolTip = !1 + })) : (0 < q._indexLabels.length && q.renderIndexLabels(), q.dispatchEvent("dataAnimationIterationEnd", {chart: q})); + this.attachPlotAreaEventHandlers(); + this.zoomEnabled || (this.panEnabled || !this._zoomButton || "none" === this._zoomButton.style.display) || X(this._zoomButton, this._resetButton); + this._toolTip._updateToolTip(); + this.renderCount++ + }; + v.prototype.attachPlotAreaEventHandlers = function () { + this.attachEvent({context: this, chart: this, mousedown: this._plotAreaMouseDown, mouseup: this._plotAreaMouseUp, + mousemove: this._plotAreaMouseMove, cursor: this.zoomEnabled ? "col-resize" : "move", cursor:this.panEnabled ? "move" : "default", capture: !0, bounds: this.plotArea}) + }; + v.prototype.categoriseDataSeries = function () { + for (var a = "", c = 0; c < this.data.length; c++) + if (a = this.data[c], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= v._supportedChartTypes.indexOf(a.type)) { + for (var b = null, d = !1, e = null, f = !1, g = 0; g < this.plotInfo.plotTypes.length; g++) + if (this.plotInfo.plotTypes[g].type === a.type) { + d = !0; + b = this.plotInfo.plotTypes[g]; + break + } + d || (b = {type: a.type, totalDataSeries: 0, plotUnits: []}, this.plotInfo.plotTypes.push(b)); + for (g = 0; g < b.plotUnits.length; g++) + if (b.plotUnits[g].axisYType === a.axisYType) { + f = !0; + e = b.plotUnits[g]; + break + } + f || (e = {type: a.type, previousDataSeriesCount: 0, index: b.plotUnits.length, plotType: b, axisYType: a.axisYType, axisY: "primary" === a.axisYType ? this.axisY : this.axisY2, axisX: this.axisX, dataSeriesIndexes: [], yTotals: []}, b.plotUnits.push(e)); + b.totalDataSeries++; + e.dataSeriesIndexes.push(c); + a.plotUnit = e + } + for (c = 0; c < this.plotInfo.plotTypes.length; c++) + for (b = + this.plotInfo.plotTypes[c], g = a = 0; g < b.plotUnits.length; g++) + b.plotUnits[g].previousDataSeriesCount = a, a += b.plotUnits[g].dataSeriesIndexes.length + }; + v.prototype.assignIdToDataPoints = function () { + for (var a = 0; a < this.data.length; a++) { + var c = this.data[a]; + if (c.dataPoints) + for (var b = c.dataPoints.length, d = 0; d < b; d++) + c.dataPointIds[d] = ++this._eventManager.lastObjectId + } + }; + v.prototype._processData = function () { + this.assignIdToDataPoints(); + this.categoriseDataSeries(); + for (var a = 0; a < this.plotInfo.plotTypes.length; a++) + for (var c = + this.plotInfo.plotTypes[a], b = 0; b < c.plotUnits.length; b++) { + var d = c.plotUnits[b]; + "line" === d.type || "stepLine" === d.type || "spline" === d.type || "column" === d.type || "area" === d.type || "stepArea" === d.type || "splineArea" === d.type || "bar" === d.type || "bubble" === d.type || "scatter" === d.type ? this._processMultiseriesPlotUnit(d) : "stackedColumn" === d.type || "stackedBar" === d.type || "stackedArea" === d.type ? this._processStackedPlotUnit(d) : "stackedColumn100" === d.type || "stackedBar100" === d.type || "stackedArea100" === d.type ? this._processStacked100PlotUnit(d) : + "candlestick" !== d.type && "ohlc" !== d.type && "rangeColumn" !== d.type && "rangeBar" !== d.type && "rangeArea" !== d.type && "rangeSplineArea" !== d.type || this._processMultiYPlotUnit(d) + } + }; + v.prototype._processMultiseriesPlotUnit = function (a) { + if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) + for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, e, f = !1, g = 0; g < a.dataSeriesIndexes.length; g++) { + var h = this.data[a.dataSeriesIndexes[g]], q = 0, k = !1, n = !1, m; + if ("normal" === h.axisPlacement || "xySwapped" === h.axisPlacement) + var l = this.sessionVariables.axisX.newViewportMinimum ? + this.sessionVariables.axisX.newViewportMinimum : this._options.axisX && this._options.axisX.viewportMinimum ? this._options.axisX.viewportMinimum : this._options.axisX && this._options.axisX.minimum ? this._options.axisX.minimum : -Infinity, p = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this._options.axisX && this._options.axisX.viewportMaximum ? this._options.axisX.viewportMaximum : this._options.axisX && this._options.axisX.maximum ? this._options.axisX.maximum : Infinity; + if (h.dataPoints[q].x && h.dataPoints[q].x.getTime || "dateTime" === h.xValueType) + f = !0; + for (q = 0; q < h.dataPoints.length; q++) { + "undefined" === typeof h.dataPoints[q].x && (h.dataPoints[q].x = q); + h.dataPoints[q].x.getTime ? (f = !0, d = h.dataPoints[q].x.getTime()) : d = h.dataPoints[q].x; + e = h.dataPoints[q].y; + d < b.min && (b.min = d); + d > b.max && (b.max = d); + e < c.min && (c.min = e); + e > c.max && (c.max = e); + if (0 < q) { + var r = d - h.dataPoints[q - 1].x; + 0 > r && (r *= -1); + b.minDiff > r && 0 !== r && (b.minDiff = r); + null !== e && null !== h.dataPoints[q - 1].y && (r = e - h.dataPoints[q - 1].y, + 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r)) + } + if (d < l && !k) + null !== e && (m = d); + else { + if (!k && (k = !0, 0 < q)) { + q -= 2; + continue + } + if (d > p && !n) + n = !0; + else if (d > p && n) + continue; + h.dataPoints[q].label && (a.axisX.labels[d] = h.dataPoints[q].label); + d < b.viewPortMin && (b.viewPortMin = d); + d > b.viewPortMax && (b.viewPortMax = d); + null === e ? b.viewPortMin === d && m < d && (b.viewPortMin = m) : (e < c.viewPortMin && (c.viewPortMin = e), e > c.viewPortMax && (c.viewPortMax = e)) + } + } + this.plotInfo.axisXValueType = h.xValueType = f ? "dateTime" : "number" + } + }; + v.prototype._processStackedPlotUnit = + function (a) { + if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { + for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, e, f = !1, g = [], h = [], q = Infinity, k = 0; k < a.dataSeriesIndexes.length; k++) { + var n = this.data[a.dataSeriesIndexes[k]], m = 0, l = !1, p = !1, r; + if ("normal" === n.axisPlacement || "xySwapped" === n.axisPlacement) + var t = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this._options.axisX && this._options.axisX.viewportMinimum ? this._options.axisX.viewportMinimum : this._options.axisX && + this._options.axisX.minimum ? this._options.axisX.minimum : -Infinity, y = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this._options.axisX && this._options.axisX.viewportMaximum ? this._options.axisX.viewportMaximum : this._options.axisX && this._options.axisX.maximum ? this._options.axisX.maximum : Infinity; + if (n.dataPoints[m].x && n.dataPoints[m].x.getTime || "dateTime" === n.xValueType) + f = !0; + for (m = 0; m < n.dataPoints.length; m++) { + "undefined" === typeof n.dataPoints[m].x && (n.dataPoints[m].x = + m); + n.dataPoints[m].x.getTime ? (f = !0, d = n.dataPoints[m].x.getTime()) : d = n.dataPoints[m].x; + x(n.dataPoints[m].y) ? e = 0 : (e = n.dataPoints[m].y, 0 === k && (q = Math.min(e, q))); + d < b.min && (b.min = d); + d > b.max && (b.max = d); + if (0 < m) { + var s = d - n.dataPoints[m - 1].x; + 0 > s && (s *= -1); + b.minDiff > s && 0 !== s && (b.minDiff = s); + null !== e && null !== n.dataPoints[m - 1].y && (s = e - n.dataPoints[m - 1].y, 0 > s && (s *= -1), c.minDiff > s && 0 !== s && (c.minDiff = s)) + } + if (d < t && !l) + null !== n.dataPoints[m].y && (r = d); + else { + if (!l && (l = !0, 0 < m)) { + m -= 2; + continue + } + if (d > y && !p) + p = !0; + else if (d > y && p) + continue; + n.dataPoints[m].label && (a.axisX.labels[d] = n.dataPoints[m].label); + d < b.viewPortMin && (b.viewPortMin = d); + d > b.viewPortMax && (b.viewPortMax = d); + null === n.dataPoints[m].y ? b.viewPortMin === d && r < d && (b.viewPortMin = r) : (a.yTotals[d] = (a.yTotals[d] ? a.yTotals[d] : 0) + Math.abs(e), 0 <= e ? g[d] = g[d] ? g[d] + e : e : h[d] = h[d] ? h[d] + e : e) + } + } + this.plotInfo.axisXValueType = n.xValueType = f ? "dateTime" : "number" + } + for (m in g) + g.hasOwnProperty(m) && !isNaN(m) && (a = g[m], a < c.min && (c.min = Math.min(a, q)), a > c.max && (c.max = a), m < b.viewPortMin || m > b.viewPortMax || + (a < c.viewPortMin && (c.viewPortMin = Math.min(a, q)), a > c.viewPortMax && (c.viewPortMax = a))); + for (m in h) + h.hasOwnProperty(m) && !isNaN(m) && (a = h[m], a < c.min && (c.min = Math.min(a, q)), a > c.max && (c.max = a), m < b.viewPortMin || m > b.viewPortMax || (a < c.viewPortMin && (c.viewPortMin = Math.min(a, q)), a > c.viewPortMax && (c.viewPortMax = a))) + } + }; + v.prototype._processStacked100PlotUnit = function (a) { + if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { + for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, e, f = !1, g = !1, h = !1, q = [], k = 0; k < a.dataSeriesIndexes.length; k++) { + var n = + this.data[a.dataSeriesIndexes[k]], m = 0, l = !1, p = !1, r; + if ("normal" === n.axisPlacement || "xySwapped" === n.axisPlacement) + var t = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this._options.axisX && this._options.axisX.viewportMinimum ? this._options.axisX.viewportMinimum : this._options.axisX && this._options.axisX.minimum ? this._options.axisX.minimum : -Infinity, y = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this._options.axisX && + this._options.axisX.viewportMaximum ? this._options.axisX.viewportMaximum : this._options.axisX && this._options.axisX.maximum ? this._options.axisX.maximum : Infinity; + if (n.dataPoints[m].x && n.dataPoints[m].x.getTime || "dateTime" === n.xValueType) + f = !0; + for (m = 0; m < n.dataPoints.length; m++) { + "undefined" === typeof n.dataPoints[m].x && (n.dataPoints[m].x = m); + n.dataPoints[m].x.getTime ? (f = !0, d = n.dataPoints[m].x.getTime()) : d = n.dataPoints[m].x; + e = x(n.dataPoints[m].y) ? null : n.dataPoints[m].y; + d < b.min && (b.min = d); + d > b.max && (b.max = d); + if (0 < m) { + var s = d - n.dataPoints[m - 1].x; + 0 > s && (s *= -1); + b.minDiff > s && 0 !== s && (b.minDiff = s); + x(e) || null === n.dataPoints[m - 1].y || (s = e - n.dataPoints[m - 1].y, 0 > s && (s *= -1), c.minDiff > s && 0 !== s && (c.minDiff = s)) + } + if (d < t && !l) + null !== e && (r = d); + else { + if (!l && (l = !0, 0 < m)) { + m -= 2; + continue + } + if (d > y && !p) + p = !0; + else if (d > y && p) + continue; + n.dataPoints[m].label && (a.axisX.labels[d] = n.dataPoints[m].label); + d < b.viewPortMin && (b.viewPortMin = d); + d > b.viewPortMax && (b.viewPortMax = d); + null === e ? b.viewPortMin === d && r < d && (b.viewPortMin = r) : (a.yTotals[d] = (a.yTotals[d] ? + a.yTotals[d] : 0) + Math.abs(e), 0 <= e ? g = !0 : 0 > e && (h = !0), q[d] = q[d] ? q[d] + Math.abs(e) : Math.abs(e)) + } + } + this.plotInfo.axisXValueType = n.xValueType = f ? "dateTime" : "number" + } + g && !h ? (c.max = x(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = x(c.viewPortMin) ? 1 : Math.min(c.viewPortMin, 1)) : g && h ? (c.max = x(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = x(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99)) : !g && h && (c.max = x(c.viewPortMax) ? -1 : Math.max(c.viewPortMax, -1), c.min = x(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99)); + c.viewPortMin = + c.min; + c.viewPortMax = c.max; + a.dataPointYSums = q + } + }; + v.prototype._processMultiYPlotUnit = function (a) { + if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) + for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, e, f, g, h = !1, q = 0; q < a.dataSeriesIndexes.length; q++) { + var k = this.data[a.dataSeriesIndexes[q]], n = 0, m = !1, l = !1, p, r, t; + if ("normal" === k.axisPlacement || "xySwapped" === k.axisPlacement) + var y = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this._options.axisX && this._options.axisX.viewportMinimum ? + this._options.axisX.viewportMinimum : this._options.axisX && this._options.axisX.minimum ? this._options.axisX.minimum : -Infinity, s = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this._options.axisX && this._options.axisX.viewportMaximum ? this._options.axisX.viewportMaximum : this._options.axisX && this._options.axisX.maximum ? this._options.axisX.maximum : Infinity; + if (k.dataPoints[n].x && k.dataPoints[n].x.getTime || "dateTime" === k.xValueType) + h = !0; + for (n = 0; n < k.dataPoints.length; n++) { + "undefined" === + typeof k.dataPoints[n].x && (k.dataPoints[n].x = n); + k.dataPoints[n].x.getTime ? (h = !0, d = k.dataPoints[n].x.getTime()) : d = k.dataPoints[n].x; + if ((e = k.dataPoints[n].y) && e.length) { + f = Math.min.apply(null, e); + g = Math.max.apply(null, e); + r = !0; + for (var z = 0; z < e.length; z++) + null === e.k && (r = !1); + r && (m || (t = p), p = d) + } + d < b.min && (b.min = d); + d > b.max && (b.max = d); + f < c.min && (c.min = f); + g > c.max && (c.max = g); + 0 < n && (r = d - k.dataPoints[n - 1].x, 0 > r && (r *= -1), b.minDiff > r && 0 !== r && (b.minDiff = r), e && (null !== e[0] && k.dataPoints[n - 1].y && null !== k.dataPoints[n - 1].y[0]) && + (r = e[0] - k.dataPoints[n - 1].y[0], 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r))); + if (!(d < y) || m) { + if (!m && (m = !0, 0 < n)) { + n -= 2; + p = t; + continue + } + if (d > s && !l) + l = !0; + else if (d > s && l) + continue; + k.dataPoints[n].label && (a.axisX.labels[d] = k.dataPoints[n].label); + d < b.viewPortMin && (b.viewPortMin = d); + d > b.viewPortMax && (b.viewPortMax = d); + if (b.viewPortMin === d && e) + for (z = 0; z < e.length; z++) + if (null === e[z] && p < d) { + b.viewPortMin = p; + break + } + null === e ? b.viewPortMin === d && p < d && (b.viewPortMin = p) : (f < c.viewPortMin && (c.viewPortMin = f), g > c.viewPortMax && (c.viewPortMax = + g)) + } + } + this.plotInfo.axisXValueType = k.xValueType = h ? "dateTime" : "number" + } + }; + v.prototype.getDataPointAtXY = function (a, c, b) { + b = b || !1; + for (var d = [], e = this._dataInRenderedOrder.length - 1; 0 <= e; e--) { + var f = null; + (f = this._dataInRenderedOrder[e].getDataPointAtXY(a, c, b)) && d.push(f) + } + a = null; + c = !1; + for (b = 0; b < d.length; b++) + if ("line" === d[b].dataSeries.type || "stepLine" === d[b].dataSeries.type || "area" === d[b].dataSeries.type || "stepArea" === d[b].dataSeries.type) + if (e = R("markerSize", d[b].dataPoint, d[b].dataSeries) || 8, d[b].distance <= + e / 2) { + c = !0; + break + } + for (b = 0; b < d.length; b++) + c && "line" !== d[b].dataSeries.type && "stepLine" !== d[b].dataSeries.type && "area" !== d[b].dataSeries.type && "stepArea" !== d[b].dataSeries.type || (a ? d[b].distance <= a.distance && (a = d[b]) : a = d[b]); + return a + }; + v.prototype.getObjectAtXY = function (a, c, b) { + var d = null; + if (b = this.getDataPointAtXY(a, c, b || !1)) + d = b.dataSeries.dataPointIds[b.dataPointIndex]; + else if (u) + d = Ea(a, c, this._eventManager.ghostCtx); + else + for (b = 0; b < this.legend.items.length; b++) { + var e = this.legend.items[b]; + a >= e.x1 && (a <= + e.x2 && c >= e.y1 && c <= e.y2) && (d = e.id) + } + return d + }; + v.prototype.getAutoFontSize = function (a, c, b) { + a /= 400; + return Math.round(Math.min(this.width, this.height) * a) + }; + v.prototype.resetOverlayedCanvas = function () { + this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height) + }; + v.prototype.clearCanvas = function () { + this.ctx.clearRect(0, 0, this.width, this.height); + this.backgroundColor && (this.ctx.fillStyle = this.backgroundColor, this.ctx.fillRect(0, 0, this.width, this.height)) + }; + v.prototype.attachEvent = function (a) { + this._events.push(a) + }; + v.prototype._touchEventHandler = function (a) { + if (a.changedTouches && this.interactivityEnabled) { + var c = [], b = a.changedTouches, d = b ? b[0] : a, e = null; + switch (a.type) { + case "touchstart": + case "MSPointerDown": + c = ["mousemove", "mousedown"]; + this._lastTouchData = ra(d); + this._lastTouchData.time = new Date; + break; + case "touchmove": + case "MSPointerMove": + c = ["mousemove"]; + break; + case "touchend": + case "MSPointerUp": + c = "touchstart" === this._lastTouchEventType || "MSPointerDown" === this._lastTouchEventType ? ["mouseup", "click"] : ["mouseup"]; + break; + default: + return + } + if (!(b && 1 < b.length)) { + e = ra(d); + e.time = new Date; + try { + var f = e.y - this._lastTouchData.y, g = e.time - this._lastTouchData.time; + if (15 < Math.abs(f) && (this._lastTouchData.scroll || 200 > g)) { + this._lastTouchData.scroll = !0; + var h = window.parent || window; + h && h.scrollBy && h.scrollBy(0, -f) + } + } catch (q) { + } + this._lastTouchEventType = a.type; + if (this._lastTouchData.scroll && this.zoomEnabled) + this.isDrag && this.resetOverlayedCanvas(), this.isDrag = !1; + else + for (b = 0; b < c.length; b++) + e = c[b], f = document.createEvent("MouseEvent"), f.initMouseEvent(e, + !0, !0, window, 1, d.screenX, d.screenY, d.clientX, d.clientY, !1, !1, !1, !1, 0, null), d.target.dispatchEvent(f), a.preventManipulation && a.preventManipulation(), a.preventDefault && a.preventDefault() + } + } + }; + v.prototype._dispatchRangeEvent = function (a, c) { + var b = {}; + b.chart = this._publicChartReference; + b.type = a; + b.trigger = c; + var d = []; + this.axisX && d.push("axisX"); + this.axisY && d.push("axisY"); + this.axisY2 && d.push("axisY2"); + for (var e = 0; e < d.length; e++) + b[d[e]] = {viewportMinimum: this[d[e]].sessionVariables.newViewportMinimum, viewportMaximum: this[d[e]].sessionVariables.newViewportMaximum}; + this.dispatchEvent(a, b, this._publicChartReference) + }; + v.prototype._mouseEventHandler = function (a) { + if (this.interactivityEnabled) + if (this._ignoreNextEvent) + this._ignoreNextEvent = !1; + else { + a.preventManipulation && a.preventManipulation(); + a.preventDefault && a.preventDefault(); + "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement); + var c = ra(a), b = a.type, d, e; + a.which ? e = 3 == a.which : a.button && (e = 2 == a.button); + if (!e) { + if (v.capturedEventParam) + d = v.capturedEventParam, "mouseup" === b && (v.capturedEventParam = null, d.chart.overlaidCanvas.releaseCapture ? + d.chart.overlaidCanvas.releaseCapture() : document.body.removeEventListener("mouseup", d.chart._mouseEventHandler, !1)), d.hasOwnProperty(b) && d[b].call(d.context, c.x, c.y); + else if (this._events) { + for (e = 0; e < this._events.length; e++) + if (this._events[e].hasOwnProperty(b)) { + d = this._events[e]; + var f = d.bounds; + if (c.x >= f.x1 && c.x <= f.x2 && c.y >= f.y1 && c.y <= f.y2) { + d[b].call(d.context, c.x, c.y); + "mousedown" === b && !0 === d.capture ? (v.capturedEventParam = d, this.overlaidCanvas.setCapture ? this.overlaidCanvas.setCapture() : document.body.addEventListener("mouseup", + this._mouseEventHandler, !1)) : "mouseup" === b && (d.chart.overlaidCanvas.releaseCapture ? d.chart.overlaidCanvas.releaseCapture() : document.body.removeEventListener("mouseup", this._mouseEventHandler, !1)); + break + } else + d = null + } + a.target.style.cursor = d && d.cursor ? d.cursor : this._defaultCursor + } + this._toolTip && this._toolTip.enabled && (b = this.plotArea, (c.x < b.x1 || c.x > b.x2 || c.y < b.y1 || c.y > b.y2) && this._toolTip.hide()); + this.isDrag && this.zoomEnabled || !this._eventManager || this._eventManager.mouseEventHandler(a) + } + } + }; + v.prototype._plotAreaMouseDown = + function (a, c) { + this.isDrag = !0; + this.dragStartPoint = {x: a, y: c} + }; + v.prototype._plotAreaMouseUp = function (a, c) { + if (("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) { + var b = c - this.dragStartPoint.y, d = a - this.dragStartPoint.x, e = 0 <= this.zoomType.indexOf("x"), f = 0 <= this.zoomType.indexOf("y"), g = !1; + this.resetOverlayedCanvas(); + if ("xySwapped" === this.plotInfo.axisPlacement) + var h = f, f = e, e = h; + if (this.panEnabled || this.zoomEnabled) { + if (this.panEnabled) + for (e = f = 0; e < this._axes.length; e++) + b = + this._axes[e], b.viewportMinimum < b.minimum ? (f = b.minimum - b.viewportMinimum, b.sessionVariables.newViewportMinimum = b.viewportMinimum + f, b.sessionVariables.newViewportMaximum = b.viewportMaximum + f, g = !0) : b.viewportMaximum > b.maximum && (f = b.viewportMaximum - b.maximum, b.sessionVariables.newViewportMinimum = b.viewportMinimum - f, b.sessionVariables.newViewportMaximum = b.viewportMaximum - f, g = !0); + else if ((!e || 2 < Math.abs(d)) && (!f || 2 < Math.abs(b)) && this.zoomEnabled) { + if (!this.dragStartPoint) + return; + b = e ? this.dragStartPoint.x : + this.plotArea.x1; + d = f ? this.dragStartPoint.y : this.plotArea.y1; + e = e ? a : this.plotArea.x2; + f = f ? c : this.plotArea.y2; + 2 < Math.abs(b - e) && 2 < Math.abs(d - f) && this._zoomPanToSelectedRegion(b, d, e, f) && (g = !0) + } + g && (this._ignoreNextEvent = !0, this._dispatchRangeEvent("rangeChanging", "zoom"), this.render(), this._dispatchRangeEvent("rangeChanged", "zoom"), g && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (la(this._zoomButton, this._resetButton), U(this, this._zoomButton, "pan"), U(this, this._resetButton, "reset"))) + } + } + this.isDrag = + !1 + }; + v.prototype._plotAreaMouseMove = function (a, c) { + if (this.isDrag && "none" !== this.plotInfo.axisPlacement) { + var b = 0, d = 0, e = b = null, e = 0 <= this.zoomType.indexOf("x"), f = 0 <= this.zoomType.indexOf("y"); + "xySwapped" === this.plotInfo.axisPlacement && (b = f, f = e, e = b); + b = this.dragStartPoint.x - a; + d = this.dragStartPoint.y - c; + 2 < Math.abs(b) && 8 > Math.abs(b) && (this.panEnabled || this.zoomEnabled) ? this._toolTip.hide() : this.panEnabled || this.zoomEnabled || this._toolTip.mouseMoveHandler(a, c); + if ((!e || 2 < Math.abs(b) || !f || 2 < Math.abs(d)) && (this.panEnabled || + this.zoomEnabled)) + if (this.panEnabled) + e = {x1: e ? this.plotArea.x1 + b : this.plotArea.x1, y1: f ? this.plotArea.y1 + d : this.plotArea.y1, x2: e ? this.plotArea.x2 + b : this.plotArea.x2, y2: f ? this.plotArea.y2 + d : this.plotArea.y2}, this._zoomPanToSelectedRegion(e.x1, e.y1, e.x2, e.y2, !0) && (this._dispatchRangeEvent("rangeChanging", "pan"), this.render(), this._dispatchRangeEvent("rangeChanged", "pan"), this.dragStartPoint.x = a, this.dragStartPoint.y = c); + else if (this.zoomEnabled) { + this.resetOverlayedCanvas(); + b = this.overlaidCanvasCtx.globalAlpha; + this.overlaidCanvasCtx.fillStyle = "#A89896"; + var d = e ? this.dragStartPoint.x : this.plotArea.x1, g = f ? this.dragStartPoint.y : this.plotArea.y1, h = e ? a - this.dragStartPoint.x : this.plotArea.x2 - this.plotArea.x1, q = f ? c - this.dragStartPoint.y : this.plotArea.y2 - this.plotArea.y1; + this.validateRegion(d, g, e ? a : this.plotArea.x2 - this.plotArea.x1, f ? c : this.plotArea.y2 - this.plotArea.y1, "xy" !== this.zoomType).isValid && (this.resetOverlayedCanvas(), this.overlaidCanvasCtx.fillStyle = "#99B2B5"); + this.overlaidCanvasCtx.globalAlpha = 0.7; + this.overlaidCanvasCtx.fillRect(d, + g, h, q); + this.overlaidCanvasCtx.globalAlpha = b + } + } else + this._toolTip.mouseMoveHandler(a, c) + }; + v.prototype._zoomPanToSelectedRegion = function (a, c, b, d, e) { + a = this.validateRegion(a, c, b, d, e); + c = a.axesWithValidRange; + b = a.axesRanges; + if (a.isValid) + for (d = 0; d < c.length; d++) + e = b[d], c[d].setViewPortRange(e.val1, e.val2); + return a.isValid + }; + v.prototype.validateRegion = function (a, c, b, d, e) { + e = e || !1; + var f = 0 <= this.zoomType.indexOf("x"), g = 0 <= this.zoomType.indexOf("y"), h = !1, q = [], k = [], n = []; + this.axisX && f && k.push(this.axisX); + this.axisY && + g && k.push(this.axisY); + this.axisY2 && g && k.push(this.axisY2); + for (f = 0; f < k.length; f++) { + var g = k[f], m = g.convertPixelToValue({x: a, y: c}), l = g.convertPixelToValue({x: b, y: d}); + if (m > l) + var p = l, l = m, m = p; + if (isFinite(g.dataInfo.minDiff)) + if (!(Math.abs(l - m) < 3 * Math.abs(g.dataInfo.minDiff) || m < g.minimum || l > g.maximum)) + q.push(g), n.push({val1: m, val2: l}), h = !0; + else if (!e) { + h = !1; + break + } + } + return{isValid: h, axesWithValidRange: q, axesRanges: n} + }; + v.prototype.preparePlotArea = function () { + var a = this.plotArea, c = this.axisY ? this.axisY : this.axisY2; + !u && (0 < a.x1 || 0 < a.y1) && a.ctx.translate(a.x1, a.y1); + this.axisX && c ? (a.x1 = this.axisX.lineCoordinates.x1 < this.axisX.lineCoordinates.x2 ? this.axisX.lineCoordinates.x1 : c.lineCoordinates.x1, a.y1 = this.axisX.lineCoordinates.y1 < c.lineCoordinates.y1 ? this.axisX.lineCoordinates.y1 : c.lineCoordinates.y1, a.x2 = this.axisX.lineCoordinates.x2 > c.lineCoordinates.x2 ? this.axisX.lineCoordinates.x2 : c.lineCoordinates.x2, a.y2 = this.axisX.lineCoordinates.y2 > this.axisX.lineCoordinates.y1 ? this.axisX.lineCoordinates.y2 : c.lineCoordinates.y2, + a.width = a.x2 - a.x1, a.height = a.y2 - a.y1) : (c = this.layoutManager.getFreeSpace(), a.x1 = c.x1, a.x2 = c.x2, a.y1 = c.y1, a.y2 = c.y2, a.width = c.width, a.height = c.height); + u || (a.canvas.width = a.width, a.canvas.height = a.height, a.canvas.style.left = a.x1 + "px", a.canvas.style.top = a.y1 + "px", (0 < a.x1 || 0 < a.y1) && a.ctx.translate(-a.x1, -a.y1)); + a.layoutManager = new da(a.x1, a.y1, a.x2, a.y2, 2) + }; + v.prototype.getPixelCoordinatesOnPlotArea = function (a, c) { + return{x: this.axisX.getPixelCoordinatesOnAxis(a).x, y: this.axisY.getPixelCoordinatesOnAxis(c).y} + }; + v.prototype.renderIndexLabels = function (a) { + a = a || this.plotArea.ctx; + for (var c = this.plotArea, b = 0, d = 0, e = 0, f = 0, g = b = f = d = e = 0, h = 0, q = 0; q < this._indexLabels.length; q++) { + var k = this._indexLabels[q], n = k.chartType.toLowerCase(), m, l, p = R("indexLabelFontColor", k.dataPoint, k.dataSeries), g = R("indexLabelFontSize", k.dataPoint, k.dataSeries), h = R("indexLabelFontFamily", k.dataPoint, k.dataSeries); + m = R("indexLabelFontStyle", k.dataPoint, k.dataSeries); + l = R("indexLabelFontWeight", k.dataPoint, k.dataSeries); + var f = R("indexLabelBackgroundColor", + k.dataPoint, k.dataSeries), d = R("indexLabelMaxWidth", k.dataPoint, k.dataSeries), e = R("indexLabelWrap", k.dataPoint, k.dataSeries), r = R("indexLabelLineDashType", k.dataPoint, k.dataSeries), t = R("indexLabelLineColor", k.dataPoint, k.dataSeries), y = x(k.dataPoint.indexLabelLineThickness) ? x(k.dataSeries._options.indexLabelLineThickness) ? 0 : k.dataSeries._options.indexLabelLineThickness : k.dataPoint.indexLabelLineThickness, b = 0 < y ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << + 0) : 0, s = {percent: null, total: null}, z = null; + if (0 <= k.dataSeries.type.indexOf("stacked") || "pie" === k.dataSeries.type || "doughnut" === k.dataSeries.type) + s = this.getPercentAndTotal(k.dataSeries, k.dataPoint); + if (k.dataSeries.indexLabelFormatter || k.dataPoint.indexLabelFormatter) + z = {chart: this._publicChartReference, dataSeries: k.dataSeries, dataPoint: k.dataPoint, index: k.indexKeyword, total: s.total, percent: s.percent}; + var w = k.dataPoint.indexLabelFormatter ? k.dataPoint.indexLabelFormatter(z) : k.dataPoint.indexLabel ? this.replaceKeywordsWithValue(k.dataPoint.indexLabel, + k.dataPoint, k.dataSeries, null, k.indexKeyword) : k.dataSeries.indexLabelFormatter ? k.dataSeries.indexLabelFormatter(z) : k.dataSeries.indexLabel ? this.replaceKeywordsWithValue(k.dataSeries.indexLabel, k.dataPoint, k.dataSeries, null, k.indexKeyword) : null; + if (null !== w && "" !== w) { + var s = R("indexLabelPlacement", k.dataPoint, k.dataSeries), z = R("indexLabelOrientation", k.dataPoint, k.dataSeries), u = k.direction, W = k.dataSeries.axisX, A = k.dataSeries.axisY, v = !1, p = new O(a, {x: 0, y: 0, maxWidth: d ? d : 0.5 * this.width, maxHeight: e ? 5 * g : 1.5 * + g, angle: "horizontal" === z ? 0 : -90, text: w, padding: 0, backgroundColor: f, horizontalAlign: "left", fontSize: g, fontFamily: h, fontWeight: l, fontColor: p, fontStyle: m, textBaseline: "top"}); + p.measureText(); + if (0 <= n.indexOf("line") || 0 <= n.indexOf("area") || 0 <= n.indexOf("bubble") || 0 <= n.indexOf("scatter")) { + if (k.dataPoint.x < W.viewportMinimum || k.dataPoint.x > W.viewportMaximum || k.dataPoint.y < A.viewportMinimum || k.dataPoint.y > A.viewportMaximum) + continue + } else if (0 <= n.indexOf("column")) { + if (k.dataPoint.x < W.viewportMinimum || k.dataPoint.x > + W.viewportMaximum || k.bounds.y1 > c.y2 || k.bounds.y2 < c.y1) + continue + } else if (0 <= n.indexOf("bar")) { + if (k.dataPoint.x < W.viewportMinimum || k.dataPoint.x > W.viewportMaximum || k.bounds.x1 > c.x2 || k.bounds.x2 < c.x1) + continue + } else if (k.dataPoint.x < W.viewportMinimum || k.dataPoint.x > W.viewportMaximum) + continue; + d = f = 2; + "horizontal" === z ? (g = p.width, h = p.height) : (h = p.width, g = p.height); + if ("normal" === this.plotInfo.axisPlacement) { + if (0 <= n.indexOf("line") || 0 <= n.indexOf("area")) + s = "auto", f = 4; + else if (0 <= n.indexOf("stacked")) + "auto" === s && + (s = "inside"); + else if ("bubble" === n || "scatter" === n) + s = "inside"; + m = k.point.x - g / 2; + "inside" !== s ? (d = c.y1, e = c.y2, 0 < u ? (l = k.point.y - h - f - b, l < d && (l = "auto" === s ? Math.max(k.point.y, d) + f + b : d + f + b, v = l + h > k.point.y)) : (l = k.point.y + f + b, l > e - h - f - b && (l = "auto" === s ? Math.min(k.point.y, e) - h - f - b : e - h - f - b, v = l < k.point.y))) : (d = Math.max(k.bounds.y1, c.y1), e = Math.min(k.bounds.y2, c.y2), b = 0 <= n.indexOf("range") ? 0 < u ? Math.max(k.bounds.y1, c.y1) + h / 2 + f : Math.min(k.bounds.y2, c.y2) - h / 2 - f : (Math.max(k.bounds.y1, c.y1) + Math.min(k.bounds.y2, c.y2)) / 2, + 0 < u ? (l = Math.max(k.point.y, b) - h / 2, l < d && ("bubble" === n || "scatter" === n) && (l = Math.max(k.point.y - h - f, c.y1 + f))) : (l = Math.min(k.point.y, b) - h / 2, l > e - h - f && ("bubble" === n || "scatter" === n) && (l = Math.min(k.point.y + f, c.y2 - h - f))), l = Math.min(l, e - h)) + } else + 0 <= n.indexOf("line") || 0 <= n.indexOf("area") || 0 <= n.indexOf("scatter") ? (s = "auto", d = 4) : 0 <= n.indexOf("stacked") ? "auto" === s && (s = "inside") : "bubble" === n && (s = "inside"), l = k.point.y - h / 2, "inside" !== s ? (f = c.x1, e = c.x2, 0 > u ? (m = k.point.x - g - d - b, m < f && (m = "auto" === s ? Math.max(k.point.x, f) + + d + b : f + d + b, v = m + g > k.point.x)) : (m = k.point.x + d + b, m > e - g - d - b && (m = "auto" === s ? Math.min(k.point.x, e) - g - d - b : e - g - d - b, v = m < k.point.x))) : (f = Math.max(k.bounds.x1, c.x1), Math.min(k.bounds.x2, c.x2), b = 0 <= n.indexOf("range") ? 0 > u ? Math.max(k.bounds.x1, c.x1) + g / 2 + d : Math.min(k.bounds.x2, c.x2) - g / 2 - d : (Math.max(k.bounds.x1, c.x1) + Math.min(k.bounds.x2, c.x2)) / 2, m = 0 > u ? Math.max(k.point.x, b) - g / 2 : Math.min(k.point.x, b) - g / 2, m = Math.max(m, f)); + "vertical" === z && (l += h); + p.x = m; + p.y = l; + p.render(!0); + y && ("inside" !== s && (0 > n.indexOf("bar") && k.point.x > + c.x1 && k.point.x < c.x2 || !v) && (0 > n.indexOf("column") && k.point.y > c.y1 && k.point.y < c.y2 || !v)) && (a.lineWidth = y, a.strokeStyle = t ? t : "gray", a.setLineDash && a.setLineDash(D(r, y)), a.beginPath(), a.moveTo(k.point.x, k.point.y), 0 <= n.indexOf("bar") ? a.lineTo(m + (0 < k.direction ? 0 : g), l + ("horizontal" === z ? h : -h) / 2) : 0 <= n.indexOf("column") ? a.lineTo(m + g / 2, l + ((0 < k.direction ? h : -h) + ("horizontal" === z ? h : -h)) / 2) : a.lineTo(m + g / 2, l + ((l < k.point.y ? h : -h) + ("horizontal" === z ? h : -h)) / 2), a.stroke()) + } + } + return{source: a, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, + easingFunction: B.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7} + }; + v.prototype.renderLine = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = this._eventManager.ghostCtx; + c.save(); + var d = this.plotArea; + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + for (var d = [], e = 0; e < a.dataSeriesIndexes.length; e++) { + var f = a.dataSeriesIndexes[e], g = this.data[f]; + c.lineWidth = g.lineThickness; + var h = g.dataPoints, q = "solid"; + if (c.setLineDash) { + var k = D(g.nullDataLineDashType, + g.lineThickness), q = g.lineDashType, n = D(q, g.lineThickness); + c.setLineDash(n) + } + var m = g.id; + this._eventManager.objectMap[m] = {objectType: "dataSeries", dataSeriesIndex: f}; + m = C(m); + b.strokeStyle = m; + b.lineWidth = 0 < g.lineThickness ? Math.max(g.lineThickness, 4) : 0; + var m = g._colorSet, l = m = g._options.lineColor ? g._options.lineColor : m[0]; + c.strokeStyle = m; + var p = !0, r = 0, t, y; + c.beginPath(); + if (0 < h.length) { + for (var s = !1, r = 0; r < h.length; r++) + if (t = h[r].x.getTime ? h[r].x.getTime() : h[r].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && + (!g.connectNullData || !s))) + if ("number" !== typeof h[r].y) + 0 < r && !(g.connectNullData || s || p) && (c.stroke(), u && b.stroke()), s = !0; + else { + t = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (t - a.axisX.conversionParameters.minimum) + 0.5 << 0; + y = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (h[r].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var z = g.dataPointIds[r]; + this._eventManager.objectMap[z] = {id: z, objectType: "dataPoint", dataSeriesIndex: f, dataPointIndex: r, + x1: t, y1: y}; + p || s ? (!p && g.connectNullData ? (c.setLineDash && (g._options.nullDataLineDashType || q === g.lineDashType && g.lineDashType !== g.nullDataLineDashType) && (c.stroke(), q = g.nullDataLineDashType, c.setLineDash(k)), c.lineTo(t, y), u && b.lineTo(t, y)) : (c.beginPath(), c.moveTo(t, y), u && (b.beginPath(), b.moveTo(t, y))), s = p = !1) : (c.lineTo(t, y), u && b.lineTo(t, y), 0 == r % 500 && (c.stroke(), c.beginPath(), c.moveTo(t, y), u && (b.stroke(), b.beginPath(), b.moveTo(t, y)))); + r < h.length - 1 && (l !== (h[r].lineColor || m) || q !== (h[r].lineDashType || + g.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(t, y), l = h[r].lineColor || m, c.strokeStyle = l, c.setLineDash && (h[r].lineDashType ? (q = h[r].lineDashType, c.setLineDash(D(q, g.lineThickness))) : (q = g.lineDashType, c.setLineDash(n)))); + if (0 < h[r].markerSize || 0 < g.markerSize) { + var w = g.getMarkerProperties(r, t, y, c); + d.push(w); + z = C(z); + u && d.push({x: t, y: y, ctx: b, type: w.type, size: w.size, color: z, borderColor: z, borderThickness: w.borderThickness}) + } + (h[r].indexLabel || g.indexLabel || h[r].indexLabelFormatter || g.indexLabelFormatter) && + this._indexLabels.push({chartType: "line", dataPoint: h[r], dataSeries: g, point: {x: t, y: y}, direction: 0 <= h[r].y ? 1 : -1, color: m}) + } + c.stroke(); + u && b.stroke() + } + } + P.drawMarkers(d); + c.restore(); + c.beginPath(); + u && b.beginPath(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderStepLine = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = this._eventManager.ghostCtx; + c.save(); + var d = this.plotArea; + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + for (var d = [], e = 0; e < a.dataSeriesIndexes.length; e++) { + var f = a.dataSeriesIndexes[e], g = this.data[f]; + c.lineWidth = g.lineThickness; + var h = g.dataPoints, q = "solid"; + if (c.setLineDash) { + var k = D(g.nullDataLineDashType, g.lineThickness), q = g.lineDashType, n = D(q, g.lineThickness); + c.setLineDash(n) + } + var m = g.id; + this._eventManager.objectMap[m] = {objectType: "dataSeries", dataSeriesIndex: f}; + m = C(m); + b.strokeStyle = m; + b.lineWidth = 0 < g.lineThickness ? Math.max(g.lineThickness, 4) : + 0; + var m = g._colorSet, l = m = g._options.lineColor ? g._options.lineColor : m[0]; + c.strokeStyle = m; + var p = !0, r = 0, t, y; + c.beginPath(); + if (0 < h.length) { + for (var s = !1, r = 0; r < h.length; r++) + if (t = h[r].getTime ? h[r].x.getTime() : h[r].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && (!g.connectNullData || !s))) + if ("number" !== typeof h[r].y) + 0 < r && !(g.connectNullData || s || p) && (c.stroke(), u && b.stroke()), s = !0; + else { + var z = y; + t = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (t - a.axisX.conversionParameters.minimum) + + 0.5 << 0; + y = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (h[r].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var w = g.dataPointIds[r]; + this._eventManager.objectMap[w] = {id: w, objectType: "dataPoint", dataSeriesIndex: f, dataPointIndex: r, x1: t, y1: y}; + p || s ? (!p && g.connectNullData ? (c.setLineDash && (g._options.nullDataLineDashType || q === g.lineDashType && g.lineDashType !== g.nullDataLineDashType) && (c.stroke(), q = g.nullDataLineDashType, c.setLineDash(k)), c.lineTo(t, z), c.lineTo(t, y), u && (b.lineTo(t, + z), b.lineTo(t, y))) : (c.beginPath(), c.moveTo(t, y), u && (b.beginPath(), b.moveTo(t, y))), s = p = !1) : (c.lineTo(t, z), u && b.lineTo(t, z), c.lineTo(t, y), u && b.lineTo(t, y), 0 == r % 500 && (c.stroke(), c.beginPath(), c.moveTo(t, y), u && (b.stroke(), b.beginPath(), b.moveTo(t, y)))); + r < h.length - 1 && (l !== (h[r].lineColor || m) || q !== (h[r].lineDashType || g.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(t, y), l = h[r].lineColor || m, c.strokeStyle = l, c.setLineDash && (h[r].lineDashType ? (q = h[r].lineDashType, c.setLineDash(D(q, g.lineThickness))) : (q = + g.lineDashType, c.setLineDash(n)))); + if (0 < h[r].markerSize || 0 < g.markerSize) + z = g.getMarkerProperties(r, t, y, c), d.push(z), w = C(w), u && d.push({x: t, y: y, ctx: b, type: z.type, size: z.size, color: w, borderColor: w, borderThickness: z.borderThickness}); + (h[r].indexLabel || g.indexLabel || h[r].indexLabelFormatter || g.indexLabelFormatter) && this._indexLabels.push({chartType: "stepLine", dataPoint: h[r], dataSeries: g, point: {x: t, y: y}, direction: 0 <= h[r].y ? 1 : -1, color: m}) + } + c.stroke(); + u && b.stroke() + } + } + P.drawMarkers(d); + c.restore(); + c.beginPath(); + u && b.beginPath(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderSpline = function (a) { + function c(a) { + a = ma(a, 2); + if (0 < a.length) { + b.beginPath(); + u && d.beginPath(); + b.moveTo(a[0].x, a[0].y); + a[0].newStrokeStyle && (b.strokeStyle = a[0].newStrokeStyle); + a[0].newLineDashArray && b.setLineDash(a[0].newLineDashArray); + u && d.moveTo(a[0].x, a[0].y); + for (var c = 0; c < a.length - 3; c += 3) + if (b.bezierCurveTo(a[c + 1].x, a[c + 1].y, a[c + 2].x, a[c + 2].y, + a[c + 3].x, a[c + 3].y), u && d.bezierCurveTo(a[c + 1].x, a[c + 1].y, a[c + 2].x, a[c + 2].y, a[c + 3].x, a[c + 3].y), 0 < c && 0 === c % 3E3 || a[c + 3].newStrokeStyle || a[c + 3].newLineDashArray) + b.stroke(), b.beginPath(), b.moveTo(a[c + 3].x, a[c + 3].y), a[c + 3].newStrokeStyle && (b.strokeStyle = a[c + 3].newStrokeStyle), a[c + 3].newLineDashArray && b.setLineDash(a[c + 3].newLineDashArray), u && (d.stroke(), d.beginPath(), d.moveTo(a[c + 3].x, a[c + 3].y)); + b.stroke(); + u && d.stroke() + } + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = + this._eventManager.ghostCtx; + b.save(); + var e = this.plotArea; + b.beginPath(); + b.rect(e.x1, e.y1, e.width, e.height); + b.clip(); + for (var e = [], f = 0; f < a.dataSeriesIndexes.length; f++) { + var g = a.dataSeriesIndexes[f], h = this.data[g]; + b.lineWidth = h.lineThickness; + var q = h.dataPoints, k = "solid"; + if (b.setLineDash) { + var n = D(h.nullDataLineDashType, h.lineThickness), k = h.lineDashType, m = D(k, h.lineThickness); + b.setLineDash(m) + } + var l = h.id; + this._eventManager.objectMap[l] = {objectType: "dataSeries", dataSeriesIndex: g}; + l = C(l); + d.strokeStyle = l; + d.lineWidth = + 0 < h.lineThickness ? Math.max(h.lineThickness, 4) : 0; + var l = h._colorSet, p = l = h._options.lineColor ? h._options.lineColor : l[0]; + b.strokeStyle = l; + var r = 0, t, y, s = []; + b.beginPath(); + if (0 < q.length) + for (y = !1, r = 0; r < q.length; r++) + if (t = q[r].getTime ? q[r].x.getTime() : q[r].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && (!h.connectNullData || !y))) + if ("number" !== typeof q[r].y) + 0 < r && !y && (h.connectNullData ? b.setLineDash && (0 < s.length && (h._options.nullDataLineDashType || !q[r - 1].lineDashType)) && (s[s.length - 1].newLineDashArray = + n, k = h.nullDataLineDashType) : (c(s), s = [])), y = !0; + else { + t = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (t - a.axisX.conversionParameters.minimum) + 0.5 << 0; + y = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (q[r].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var z = h.dataPointIds[r]; + this._eventManager.objectMap[z] = {id: z, objectType: "dataPoint", dataSeriesIndex: g, dataPointIndex: r, x1: t, y1: y}; + s[s.length] = {x: t, y: y}; + r < q.length - 1 && (p !== (q[r].lineColor || + l) || k !== (q[r].lineDashType || h.lineDashType)) && (p = q[r].lineColor || l, s[s.length - 1].newStrokeStyle = p, b.setLineDash && (q[r].lineDashType ? (k = q[r].lineDashType, s[s.length - 1].newLineDashArray = D(k, h.lineThickness)) : (k = h.lineDashType, s[s.length - 1].newLineDashArray = m))); + if (0 < q[r].markerSize || 0 < h.markerSize) { + var w = h.getMarkerProperties(r, t, y, b); + e.push(w); + z = C(z); + u && e.push({x: t, y: y, ctx: d, type: w.type, size: w.size, color: z, borderColor: z, borderThickness: w.borderThickness}) + } + (q[r].indexLabel || h.indexLabel || q[r].indexLabelFormatter || + h.indexLabelFormatter) && this._indexLabels.push({chartType: "spline", dataPoint: q[r], dataSeries: h, point: {x: t, y: y}, direction: 0 <= q[r].y ? 1 : -1, color: l}); + y = !1 + } + c(s) + } + P.drawMarkers(e); + b.restore(); + b.beginPath(); + u && d.beginPath(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + var M = function (a, c, b, d, e, f, g, h, q, k, n, m, l) { + "undefined" === typeof l && (l = 1); + g = g || 0; + h = h || "black"; + var p = 15 < d - c && 15 < e - b ? 8 : 0.35 * Math.min(d - c, e - b); + a.beginPath(); + a.moveTo(c, + b); + a.save(); + a.fillStyle = f; + a.globalAlpha = l; + a.fillRect(c, b, d - c, e - b); + a.globalAlpha = 1; + 0 < g && (l = 0 === g % 2 ? 0 : 0.5, a.beginPath(), a.lineWidth = g, a.strokeStyle = h, a.moveTo(c, b), a.rect(c - l, b - l, d - c + 2 * l, e - b + 2 * l), a.stroke()); + a.restore(); + !0 === q && (a.save(), a.beginPath(), a.moveTo(c, b), a.lineTo(c + p, b + p), a.lineTo(d - p, b + p), a.lineTo(d, b), a.closePath(), g = a.createLinearGradient((d + c) / 2, b + p, (d + c) / 2, b), g.addColorStop(0, f), g.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle = g, a.fill(), a.restore()); + !0 === k && (a.save(), a.beginPath(), + a.moveTo(c, e), a.lineTo(c + p, e - p), a.lineTo(d - p, e - p), a.lineTo(d, e), a.closePath(), g = a.createLinearGradient((d + c) / 2, e - p, (d + c) / 2, e), g.addColorStop(0, f), g.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle = g, a.fill(), a.restore()); + !0 === n && (a.save(), a.beginPath(), a.moveTo(c, b), a.lineTo(c + p, b + p), a.lineTo(c + p, e - p), a.lineTo(c, e), a.closePath(), g = a.createLinearGradient(c + p, (e + b) / 2, c, (e + b) / 2), g.addColorStop(0, f), g.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = g, a.fill(), a.restore()); + !0 === m && (a.save(), + a.beginPath(), a.moveTo(d, b), a.lineTo(d - p, b + p), a.lineTo(d - p, e - p), a.lineTo(d, e), g = a.createLinearGradient(d - p, (e + b) / 2, d, (e + b) / 2), g.addColorStop(0, f), g.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = g, g.addColorStop(0, f), g.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = g, a.fill(), a.closePath(), a.restore()) + }; + v.prototype.renderColumn = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = 0, f, g, h, q = a.axisY.conversionParameters.reference + + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.width, 0.9 * (this.plotArea.width / a.plotType.totalDataSeries)) << 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width / + Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.totalDataSeries) << 0; + this.dataPointMaxWidth && e > k && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < e) && (k = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e)); + n < e && (n = e); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), + this._eventManager.ghostCtx.clip()); + for (d = 0; d < a.dataSeriesIndexes.length; d++) { + var k = a.dataSeriesIndexes[d], m = this.data[k], l = m.dataPoints; + if (0 < l.length) + for (var p = 5 < n && m.bevelEnabled ? !0 : !1, e = 0; e < l.length; e++) + if (l[e].getTime ? h = l[e].x.getTime() : h = l[e].x, !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && "number" === typeof l[e].y) { + f = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (h - a.axisX.conversionParameters.minimum) + 0.5 << 0; + g = a.axisY.conversionParameters.reference + + a.axisY.conversionParameters.pixelPerUnit * (l[e].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + f = f - a.plotType.totalDataSeries * n / 2 + (a.previousDataSeriesCount + d) * n << 0; + var r = f + n << 0, t; + 0 <= l[e].y ? t = q : (t = g, g = q); + g > t && (t = g = t); + b = l[e].color ? l[e].color : m._colorSet[e % m._colorSet.length]; + M(c, f, g, r, t, b, 0, null, p && 0 <= l[e].y, 0 > l[e].y && p, !1, !1, m.fillOpacity); + b = m.dataPointIds[e]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: e, x1: f, y1: g, x2: r, y2: t}; + b = C(b); + u && M(this._eventManager.ghostCtx, + f, g, r, t, b, 0, null, !1, !1, !1, !1); + (l[e].indexLabel || m.indexLabel || l[e].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({chartType: "column", dataPoint: l[e], dataSeries: m, point: {x: f + (r - f) / 2, y: 0 <= l[e].y ? g : t}, direction: 0 <= l[e].y ? 1 : -1, bounds: {x1: f, y1: Math.min(g, t), x2: r, y2: Math.max(g, t)}, color: b}) + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.min(q, a.axisY.boundingRect.y2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.yScaleAnimation, easingFunction: B.easing.easeOutQuart, + animationBase: a} + } + }; + v.prototype.renderStackedColumn = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = [], f = [], g = 0, h, q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << + 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.plotUnits.length) << 0; + this.dataPointMaxWidth && g > k && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < g) && (k = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g)); + n < g && (n = g); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (k = 0; k < a.dataSeriesIndexes.length; k++) { + var m = a.dataSeriesIndexes[k], l = this.data[m], p = l.dataPoints; + if (0 < p.length) { + var r = 5 < n && l.bevelEnabled ? !0 : !1; + c.strokeStyle = "#4572A7 "; + for (g = 0; g < p.length; g++) + if (b = p[g].x.getTime ? p[g].x.getTime() : p[g].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && + "number" === typeof p[g].y) { + d = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (b - a.axisX.conversionParameters.minimum) + 0.5 << 0; + h = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (p[g].y - a.axisY.conversionParameters.minimum); + var t = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, y = t + n << 0, s; + if (0 <= p[g].y) { + var z = e[b] ? e[b] : 0; + h -= z; + s = q - z; + e[b] = z + (s - h) + } else + z = f[b] ? f[b] : 0, s = h + z, h = q + z, f[b] = z + (s - h); + b = p[g].color ? p[g].color : l._colorSet[g % l._colorSet.length]; + M(c, t, h, y, s, b, 0, null, r && 0 <= p[g].y, 0 > p[g].y && r, !1, !1, l.fillOpacity); + b = l.dataPointIds[g]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: g, x1: t, y1: h, x2: y, y2: s}; + b = C(b); + u && M(this._eventManager.ghostCtx, t, h, y, s, b, 0, null, !1, !1, !1, !1); + (p[g].indexLabel || l.indexLabel || p[g].indexLabelFormatter || l.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedColumn", dataPoint: p[g], dataSeries: l, point: {x: d, y: 0 <= p[g].y ? h : s}, direction: 0 <= p[g].y ? 1 : -1, bounds: {x1: t, y1: Math.min(h, + s), x2: y, y2: Math.max(h, s)}, color: b}) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.min(q, a.axisY.boundingRect.y2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.yScaleAnimation, easingFunction: B.easing.easeOutQuart, animationBase: a} + } + }; + v.prototype.renderStackedColumn100 = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = [], f = [], g = 0, h, q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * + (0 - a.axisY.conversionParameters.minimum) << 0, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.plotUnits.length) << + 0; + this.dataPointMaxWidth && g > k && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < g) && (k = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g)); + n < g && (n = g); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (k = 0; k < a.dataSeriesIndexes.length; k++) { + var m = a.dataSeriesIndexes[k], + l = this.data[m], p = l.dataPoints; + if (0 < p.length) + for (var r = 5 < n && l.bevelEnabled ? !0 : !1, g = 0; g < p.length; g++) + if (b = p[g].x.getTime ? p[g].x.getTime() : p[g].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof p[g].y) { + d = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (b - a.axisX.conversionParameters.minimum) + 0.5 << 0; + h = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * ((0 !== a.dataPointYSums[b] ? 100 * (p[g].y / a.dataPointYSums[b]) : + 0) - a.axisY.conversionParameters.minimum); + var t = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, y = t + n << 0, s; + if (0 <= p[g].y) { + var z = e[b] ? e[b] : 0; + h -= z; + s = q - z; + e[b] = z + (s - h) + } else + z = f[b] ? f[b] : 0, s = h + z, h = q + z, f[b] = z + (s - h); + b = p[g].color ? p[g].color : l._colorSet[g % l._colorSet.length]; + M(c, t, h, y, s, b, 0, null, r && 0 <= p[g].y, 0 > p[g].y && r, !1, !1, l.fillOpacity); + b = l.dataPointIds[g]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: g, x1: t, y1: h, x2: y, y2: s}; + b = C(b); + u && M(this._eventManager.ghostCtx, + t, h, y, s, b, 0, null, !1, !1, !1, !1); + (p[g].indexLabel || l.indexLabel || p[g].indexLabelFormatter || l.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedColumn100", dataPoint: p[g], dataSeries: l, point: {x: d, y: 0 <= p[g].y ? h : s}, direction: 0 <= p[g].y ? 1 : -1, bounds: {x1: t, y1: Math.min(h, s), x2: y, y2: Math.max(h, s)}, color: b}) + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.min(q, a.axisY.boundingRect.y2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.yScaleAnimation, easingFunction: B.easing.easeOutQuart, + animationBase: a} + } + }; + v.prototype.renderBar = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = 0, f, g, h, q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, + 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.totalDataSeries) << 0; + this.dataPointMaxWidth && e > k && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < e) && (k = Math.max(this.dataPointWidth ? + this.dataPointWidth : -Infinity, e)); + n < e && (n = e); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (d = 0; d < a.dataSeriesIndexes.length; d++) { + var k = a.dataSeriesIndexes[d], m = this.data[k], l = m.dataPoints; + if (0 < l.length) { + var p = 5 < n && m.bevelEnabled ? !0 : !1; + c.strokeStyle = "#4572A7 "; + for (e = 0; e < l.length; e++) + if (l[e].getTime ? h = l[e].x.getTime() : h = l[e].x, + !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && "number" === typeof l[e].y) { + g = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (h - a.axisX.conversionParameters.minimum) + 0.5 << 0; + f = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (l[e].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + g = g - a.plotType.totalDataSeries * n / 2 + (a.previousDataSeriesCount + d) * n << 0; + var r = g + n << 0, t; + 0 <= l[e].y ? t = q : (t = f, f = q); + b = l[e].color ? l[e].color : m._colorSet[e % + m._colorSet.length]; + M(c, t, g, f, r, b, 0, null, p, !1, !1, !1, m.fillOpacity); + b = m.dataPointIds[e]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: e, x1: t, y1: g, x2: f, y2: r}; + b = C(b); + u && M(this._eventManager.ghostCtx, t, g, f, r, b, 0, null, !1, !1, !1, !1); + (l[e].indexLabel || m.indexLabel || l[e].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({chartType: "bar", dataPoint: l[e], dataSeries: m, point: {x: 0 <= l[e].y ? f : t, y: g + (r - g) / 2}, direction: 0 <= l[e].y ? 1 : -1, bounds: {x1: Math.min(t, + f), y1: g, x2: Math.max(t, f), y2: r}, color: b}) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.max(q, a.axisX.boundingRect.x2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.xScaleAnimation, easingFunction: B.easing.easeOutQuart, animationBase: a} + } + }; + v.prototype.renderStackedBar = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = [], f = [], g = 0, h, q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * + (0 - a.axisY.conversionParameters.minimum) << 0, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.plotUnits.length) << + 0; + this.dataPointMaxWidth && g > k && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < g) && (k = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g)); + n < g && (n = g); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (k = 0; k < a.dataSeriesIndexes.length; k++) { + var m = a.dataSeriesIndexes[k], + l = this.data[m], p = l.dataPoints; + if (0 < p.length) { + var r = 5 < n && l.bevelEnabled ? !0 : !1; + c.strokeStyle = "#4572A7 "; + for (g = 0; g < p.length; g++) + if (b = p[g].x.getTime ? p[g].x.getTime() : p[g].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof p[g].y) { + d = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (b - a.axisX.conversionParameters.minimum) + 0.5 << 0; + h = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (p[g].y - a.axisY.conversionParameters.minimum); + var t = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, y = t + n << 0, s; + if (0 <= p[g].y) { + var z = e[b] ? e[b] : 0; + s = q + z; + h += z; + e[b] = z + (h - s) + } else + z = f[b] ? f[b] : 0, s = h - z, h = q - z, f[b] = z + (h - s); + b = p[g].color ? p[g].color : l._colorSet[g % l._colorSet.length]; + M(c, s, t, h, y, b, 0, null, r, !1, !1, !1, l.fillOpacity); + b = l.dataPointIds[g]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: g, x1: s, y1: t, x2: h, y2: y}; + b = C(b); + u && M(this._eventManager.ghostCtx, s, t, h, y, b, 0, null, !1, !1, !1, !1); + (p[g].indexLabel || l.indexLabel || + p[g].indexLabelFormatter || l.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedBar", dataPoint: p[g], dataSeries: l, point: {x: 0 <= p[g].y ? h : s, y: d}, direction: 0 <= p[g].y ? 1 : -1, bounds: {x1: Math.min(s, h), y1: t, x2: Math.max(s, h), y2: y}, color: b}) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.max(q, a.axisX.boundingRect.x2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.xScaleAnimation, easingFunction: B.easing.easeOutQuart, animationBase: a} + } + }; + v.prototype.renderStackedBar100 = function (a) { + var c = + a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = [], f = [], g = 0, h, q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1, k = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, n = a.axisX.dataInfo.minDiff; + isFinite(n) || (n = 0.3 * Math.abs(a.axisX.viewportMaximum - + a.axisX.viewportMinimum)); + n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(n) / a.plotType.plotUnits.length) << 0; + this.dataPointMaxWidth && g > k && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, k)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && k < g) && (k = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g)); + n < g && (n = g); + n > k && (n = k); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, + d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (k = 0; k < a.dataSeriesIndexes.length; k++) { + var m = a.dataSeriesIndexes[k], l = this.data[m], p = l.dataPoints; + if (0 < p.length) { + var r = 5 < n && l.bevelEnabled ? !0 : !1; + c.strokeStyle = "#4572A7 "; + for (g = 0; g < p.length; g++) + if (b = p[g].x.getTime ? p[g].x.getTime() : p[g].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof p[g].y) { + d = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * + (b - a.axisX.conversionParameters.minimum) + 0.5 << 0; + h = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * ((0 !== a.dataPointYSums[b] ? 100 * (p[g].y / a.dataPointYSums[b]) : 0) - a.axisY.conversionParameters.minimum); + var t = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, y = t + n << 0, s; + if (0 <= p[g].y) { + var z = e[b] ? e[b] : 0; + s = q + z; + h += z; + e[b] = z + (h - s) + } else + z = f[b] ? f[b] : 0, s = h - z, h = q - z, f[b] = z + (h - s); + b = p[g].color ? p[g].color : l._colorSet[g % l._colorSet.length]; + M(c, s, t, h, y, b, 0, null, r, !1, !1, !1, l.fillOpacity); + b = + l.dataPointIds[g]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: g, x1: s, y1: t, x2: h, y2: y}; + b = C(b); + u && M(this._eventManager.ghostCtx, s, t, h, y, b, 0, null, !1, !1, !1, !1); + (p[g].indexLabel || l.indexLabel || p[g].indexLabelFormatter || l.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedBar100", dataPoint: p[g], dataSeries: l, point: {x: 0 <= p[g].y ? h : s, y: d}, direction: 0 <= p[g].y ? 1 : -1, bounds: {x1: Math.min(s, h), y1: t, x2: Math.max(s, h), y2: y}, color: b}) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + a = Math.max(q, a.axisX.boundingRect.x2); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.xScaleAnimation, easingFunction: B.easing.easeOutQuart, animationBase: a} + } + }; + v.prototype.renderArea = function (a) { + function c() { + z && (0 < k.lineThickness && b.stroke(), 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? s = y : 0 > a.axisY.viewportMaximum ? s = f.y1 : 0 < a.axisY.viewportMinimum && (s = e.y2), b.lineTo(p, s), b.lineTo(z.x, s), b.closePath(), b.globalAlpha = k.fillOpacity, b.fill(), b.globalAlpha = 1, u && (d.lineTo(p, s), d.lineTo(z.x, + s), d.closePath(), d.fill()), b.beginPath(), b.moveTo(p, r), d.beginPath(), d.moveTo(p, r), z = {x: p, y: r}) + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = this._eventManager.ghostCtx, e = a.axisX.lineCoordinates, f = a.axisY.lineCoordinates, g = [], h = this.plotArea; + b.save(); + u && d.save(); + b.beginPath(); + b.rect(h.x1, h.y1, h.width, h.height); + b.clip(); + u && (d.beginPath(), d.rect(h.x1, h.y1, h.width, h.height), d.clip()); + for (h = 0; h < a.dataSeriesIndexes.length; h++) { + var q = a.dataSeriesIndexes[h], k = this.data[q], + n = k.dataPoints, g = k.id; + this._eventManager.objectMap[g] = {objectType: "dataSeries", dataSeriesIndex: q}; + g = C(g); + d.fillStyle = g; + var g = [], m = !0, l = 0, p, r, t, y = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) + 0.5 << 0, s, z = null; + if (0 < n.length) { + var w = k._colorSet[l % k._colorSet.length], x = k._options.lineColor || w, v = x; + b.fillStyle = w; + b.strokeStyle = x; + b.lineWidth = k.lineThickness; + var A = "solid"; + if (b.setLineDash) { + var H = D(k.nullDataLineDashType, k.lineThickness), + A = k.lineDashType, K = D(A, k.lineThickness); + b.setLineDash(K) + } + for (var I = !0; l < n.length; l++) + if (t = n[l].x.getTime ? n[l].x.getTime() : n[l].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !I))) + if ("number" !== typeof n[l].y) + k.connectNullData || (I || m) || c(), I = !0; + else { + p = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (t - a.axisX.conversionParameters.minimum) + 0.5 << 0; + r = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * + (n[l].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + m || I ? (!m && k.connectNullData ? (b.setLineDash && (k._options.nullDataLineDashType || A === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (b.stroke(), A = k.nullDataLineDashType, b.setLineDash(H)), b.lineTo(p, r), u && d.lineTo(p, r)) : (b.beginPath(), b.moveTo(p, r), u && (d.beginPath(), d.moveTo(p, r)), z = {x: p, y: r}), I = m = !1) : (b.lineTo(p, r), u && d.lineTo(p, r), 0 == l % 250 && c()); + l < n.length - 1 && (v !== (n[l].lineColor || x) || A !== (n[l].lineDashType || k.lineDashType)) && (c(), v = n[l].lineColor || + x, b.strokeStyle = v, b.setLineDash && (n[l].lineDashType ? (A = n[l].lineDashType, b.setLineDash(D(A, k.lineThickness))) : (A = k.lineDashType, b.setLineDash(K)))); + var G = k.dataPointIds[l]; + this._eventManager.objectMap[G] = {id: G, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: l, x1: p, y1: r}; + 0 !== n[l].markerSize && (0 < n[l].markerSize || 0 < k.markerSize) && (t = k.getMarkerProperties(l, p, r, b), g.push(t), G = C(G), u && g.push({x: p, y: r, ctx: d, type: t.type, size: t.size, color: G, borderColor: G, borderThickness: t.borderThickness})); + (n[l].indexLabel || + k.indexLabel || n[l].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({chartType: "area", dataPoint: n[l], dataSeries: k, point: {x: p, y: r}, direction: 0 <= n[l].y ? 1 : -1, color: w}) + } + c(); + P.drawMarkers(g) + } + } + b.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderSplineArea = function (a) { + function c() { + var c = ma(s, 2); + if (0 < c.length) { + if (0 < k.lineThickness) { + b.beginPath(); + b.moveTo(c[0].x, c[0].y); + c[0].newStrokeStyle && (b.strokeStyle = c[0].newStrokeStyle); + c[0].newLineDashArray && b.setLineDash(c[0].newLineDashArray); + for (var g = 0; g < c.length - 3; g += 3) + if (b.bezierCurveTo(c[g + 1].x, c[g + 1].y, c[g + 2].x, c[g + 2].y, c[g + 3].x, c[g + 3].y), u && d.bezierCurveTo(c[g + 1].x, c[g + 1].y, c[g + 2].x, c[g + 2].y, c[g + 3].x, c[g + 3].y), c[g + 3].newStrokeStyle || c[g + 3].newLineDashArray) + b.stroke(), b.beginPath(), b.moveTo(c[g + 3].x, c[g + 3].y), c[g + 3].newStrokeStyle && (b.strokeStyle = c[g + 3].newStrokeStyle), c[g + 3].newLineDashArray && + b.setLineDash(c[g + 3].newLineDashArray); + b.stroke() + } + b.beginPath(); + b.moveTo(c[0].x, c[0].y); + u && (d.beginPath(), d.moveTo(c[0].x, c[0].y)); + for (g = 0; g < c.length - 3; g += 3) + b.bezierCurveTo(c[g + 1].x, c[g + 1].y, c[g + 2].x, c[g + 2].y, c[g + 3].x, c[g + 3].y), u && d.bezierCurveTo(c[g + 1].x, c[g + 1].y, c[g + 2].x, c[g + 2].y, c[g + 3].x, c[g + 3].y); + 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? t = r : 0 > a.axisY.viewportMaximum ? t = f.y1 : 0 < a.axisY.viewportMinimum && (t = e.y2); + y = {x: c[0].x, y: c[0].y}; + b.lineTo(c[c.length - 1].x, t); + b.lineTo(y.x, t); + b.closePath(); + b.globalAlpha = k.fillOpacity; + b.fill(); + b.globalAlpha = 1; + u && (d.lineTo(c[c.length - 1].x, t), d.lineTo(y.x, t), d.closePath(), d.fill()) + } + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = this._eventManager.ghostCtx, e = a.axisX.lineCoordinates, f = a.axisY.lineCoordinates, g = [], h = this.plotArea; + b.save(); + u && d.save(); + b.beginPath(); + b.rect(h.x1, h.y1, h.width, h.height); + b.clip(); + u && (d.beginPath(), d.rect(h.x1, h.y1, h.width, h.height), d.clip()); + for (h = 0; h < a.dataSeriesIndexes.length; h++) { + var q = + a.dataSeriesIndexes[h], k = this.data[q], n = k.dataPoints, g = k.id; + this._eventManager.objectMap[g] = {objectType: "dataSeries", dataSeriesIndex: q}; + g = C(g); + d.fillStyle = g; + var g = [], m = 0, l, p, r = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) + 0.5 << 0, t, y = null, s = []; + if (0 < n.length) { + var z = k._colorSet[m % k._colorSet.length], w = k._options.lineColor || z, x = w; + b.fillStyle = z; + b.strokeStyle = w; + b.lineWidth = k.lineThickness; + var v = "solid"; + if (b.setLineDash) { + var A = D(k.nullDataLineDashType, + k.lineThickness), v = k.lineDashType, H = D(v, k.lineThickness); + b.setLineDash(H) + } + for (p = !1; m < n.length; m++) + if (l = n[m].x.getTime ? n[m].x.getTime() : n[m].x, !(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !p))) + if ("number" !== typeof n[m].y) + 0 < m && !p && (k.connectNullData ? b.setLineDash && (0 < s.length && (k._options.nullDataLineDashType || !n[m - 1].lineDashType)) && (s[s.length - 1].newLineDashArray = A, v = k.nullDataLineDashType) : (c(), s = [])), p = !0; + else { + l = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * + (l - a.axisX.conversionParameters.minimum) + 0.5 << 0; + p = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (n[m].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var K = k.dataPointIds[m]; + this._eventManager.objectMap[K] = {id: K, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: m, x1: l, y1: p}; + s[s.length] = {x: l, y: p}; + m < n.length - 1 && (x !== (n[m].lineColor || w) || v !== (n[m].lineDashType || k.lineDashType)) && (x = n[m].lineColor || w, s[s.length - 1].newStrokeStyle = x, b.setLineDash && (n[m].lineDashType ? + (v = n[m].lineDashType, s[s.length - 1].newLineDashArray = D(v, k.lineThickness)) : (v = k.lineDashType, s[s.length - 1].newLineDashArray = H))); + if (0 !== n[m].markerSize && (0 < n[m].markerSize || 0 < k.markerSize)) { + var I = k.getMarkerProperties(m, l, p, b); + g.push(I); + K = C(K); + u && g.push({x: l, y: p, ctx: d, type: I.type, size: I.size, color: K, borderColor: K, borderThickness: I.borderThickness}) + } + (n[m].indexLabel || k.indexLabel || n[m].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({chartType: "splineArea", dataPoint: n[m], dataSeries: k, + point: {x: l, y: p}, direction: 0 <= n[m].y ? 1 : -1, color: z}); + p = !1 + } + c(); + P.drawMarkers(g) + } + } + b.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderStepArea = function (a) { + function c() { + z && (0 < k.lineThickness && b.stroke(), 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? s = y : 0 > a.axisY.viewportMaximum ? s = f.y1 : 0 < a.axisY.viewportMinimum && (s = e.y2), b.lineTo(p, s), b.lineTo(z.x, s), b.closePath(), + b.globalAlpha = k.fillOpacity, b.fill(), b.globalAlpha = 1, u && (d.lineTo(p, s), d.lineTo(z.x, s), d.closePath(), d.fill()), b.beginPath(), b.moveTo(p, r), d.beginPath(), d.moveTo(p, r), z = {x: p, y: r}) + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = this._eventManager.ghostCtx, e = a.axisX.lineCoordinates, f = a.axisY.lineCoordinates, g = [], h = this.plotArea; + b.save(); + u && d.save(); + b.beginPath(); + b.rect(h.x1, h.y1, h.width, h.height); + b.clip(); + u && (d.beginPath(), d.rect(h.x1, h.y1, h.width, h.height), d.clip()); + for (h = 0; h < a.dataSeriesIndexes.length; h++) { + var q = a.dataSeriesIndexes[h], k = this.data[q], n = k.dataPoints, g = k.id; + this._eventManager.objectMap[g] = {objectType: "dataSeries", dataSeriesIndex: q}; + g = C(g); + d.fillStyle = g; + var g = [], m = !0, l = 0, p, r, t, y = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) + 0.5 << 0, s, z = null, w = !1; + if (0 < n.length) { + var x = k._colorSet[l % k._colorSet.length], v = k._options.lineColor || x, A = v; + b.fillStyle = x; + b.strokeStyle = v; + b.lineWidth = + k.lineThickness; + var H = "solid"; + if (b.setLineDash) { + var K = D(k.nullDataLineDashType, k.lineThickness), H = k.lineDashType, I = D(H, k.lineThickness); + b.setLineDash(I) + } + for (; l < n.length; l++) + if (t = n[l].x.getTime ? n[l].x.getTime() : n[l].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !w))) { + var G = r; + "number" !== typeof n[l].y ? (k.connectNullData || (w || m) || c(), w = !0) : (p = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (t - a.axisX.conversionParameters.minimum) + + 0.5 << 0, r = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (n[l].y - a.axisY.conversionParameters.minimum) + 0.5 << 0, m || w ? (!m && k.connectNullData ? (b.setLineDash && (k._options.nullDataLineDashType || H === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (b.stroke(), H = k.nullDataLineDashType, b.setLineDash(K)), b.lineTo(p, G), b.lineTo(p, r), u && (d.lineTo(p, G), d.lineTo(p, r))) : (b.beginPath(), b.moveTo(p, r), u && (d.beginPath(), d.moveTo(p, r)), z = {x: p, y: r}), w = m = !1) : (b.lineTo(p, G), u && + d.lineTo(p, G), b.lineTo(p, r), u && d.lineTo(p, r), 0 == l % 250 && c()), l < n.length - 1 && (A !== (n[l].lineColor || v) || H !== (n[l].lineDashType || k.lineDashType)) && (c(), A = n[l].lineColor || v, b.strokeStyle = A, b.setLineDash && (n[l].lineDashType ? (H = n[l].lineDashType, b.setLineDash(D(H, k.lineThickness))) : (H = k.lineDashType, b.setLineDash(I)))), G = k.dataPointIds[l], this._eventManager.objectMap[G] = {id: G, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: l, x1: p, y1: r}, 0 !== n[l].markerSize && (0 < n[l].markerSize || 0 < k.markerSize) && (t = + k.getMarkerProperties(l, p, r, b), g.push(t), G = C(G), u && g.push({x: p, y: r, ctx: d, type: t.type, size: t.size, color: G, borderColor: G, borderThickness: t.borderThickness})), (n[l].indexLabel || k.indexLabel || n[l].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({chartType: "stepArea", dataPoint: n[l], dataSeries: k, point: {x: p, y: r}, direction: 0 <= n[l].y ? 1 : -1, color: x})) + } + c(); + P.drawMarkers(g) + } + } + b.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, + easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderStackedArea = function (a) { + function c() { + if (!(1 > h.length)) { + for (0 < s.lineThickness && b.stroke(); 0 < h.length; ) { + var a = h.pop(); + b.lineTo(a.x, a.y); + u && r.lineTo(a.x, a.y) + } + b.closePath(); + b.globalAlpha = s.fillOpacity; + b.fill(); + b.globalAlpha = 1; + b.beginPath(); + u && (r.closePath(), r.fill(), r.beginPath()); + h = [] + } + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = null, e = [], f = this.plotArea, g = [], h = [], q = [], k = 0, n, m, l, p = a.axisY.conversionParameters.reference + + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, r = this._eventManager.ghostCtx; + u && r.beginPath(); + b.save(); + u && r.save(); + b.beginPath(); + b.rect(f.x1, f.y1, f.width, f.height); + b.clip(); + u && (r.beginPath(), r.rect(f.x1, f.y1, f.width, f.height), r.clip()); + for (var t = [], f = 0; f < a.dataSeriesIndexes.length; f++) { + var y = a.dataSeriesIndexes[f], s = this.data[y], z = s.dataPoints; + s.dataPointIndexes = []; + for (k = 0; k < z.length; k++) + y = z[k].x.getTime ? z[k].x.getTime() : z[k].x, s.dataPointIndexes[y] = k, t[y] || + (q.push(y), t[y] = !0); + q.sort(Aa) + } + for (f = 0; f < a.dataSeriesIndexes.length; f++) { + y = a.dataSeriesIndexes[f]; + s = this.data[y]; + z = s.dataPoints; + t = !0; + h = []; + k = s.id; + this._eventManager.objectMap[k] = {objectType: "dataSeries", dataSeriesIndex: y}; + k = C(k); + r.fillStyle = k; + if (0 < q.length) { + var d = s._colorSet[0], w = s._options.lineColor || d, x = w; + b.fillStyle = d; + b.strokeStyle = w; + b.lineWidth = s.lineThickness; + var v = "solid"; + if (b.setLineDash) { + var A = D(s.nullDataLineDashType, s.lineThickness), v = s.lineDashType, H = D(v, s.lineThickness); + b.setLineDash(H) + } + for (var K = + !0, k = 0; k < q.length; k++) { + l = q[k]; + var I = null, I = 0 <= s.dataPointIndexes[l] ? z[s.dataPointIndexes[l]] : {x: l, y: null}; + if (!(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax && (!s.connectNullData || !K))) + if ("number" !== typeof I.y) + s.connectNullData || (K || t) || c(), K = !0; + else { + n = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (l - a.axisX.conversionParameters.minimum) + 0.5 << 0; + m = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (I.y - a.axisY.conversionParameters.minimum); + var G = g[l] ? g[l] : 0; + m -= G; + h.push({x: n, y: p - G}); + g[l] = p - m; + t || K ? (!t && s.connectNullData ? (b.setLineDash && (s._options.nullDataLineDashType || v === s.lineDashType && s.lineDashType !== s.nullDataLineDashType) && (b.stroke(), v = s.nullDataLineDashType, b.setLineDash(A)), b.lineTo(n, m), u && r.lineTo(n, m)) : (b.beginPath(), b.moveTo(n, m), u && (r.beginPath(), r.moveTo(n, m))), K = t = !1) : (b.lineTo(n, m), u && r.lineTo(n, m), 0 == k % 250 && (c(), b.moveTo(n, m), u && r.moveTo(n, m), h.push({x: n, y: p - G}))); + k < z.length - 1 && (x !== (z[k].lineColor || w) || v !== (z[k].lineDashType || + s.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, m), h.push({x: n, y: p - G}), x = z[k].lineColor || w, b.strokeStyle = x, b.setLineDash && (z[k].lineDashType ? (v = z[k].lineDashType, b.setLineDash(D(v, s.lineThickness))) : (v = s.lineDashType, b.setLineDash(H)))); + if (0 <= s.dataPointIndexes[l]) { + var S = s.dataPointIds[s.dataPointIndexes[l]]; + this._eventManager.objectMap[S] = {id: S, objectType: "dataPoint", dataSeriesIndex: y, dataPointIndex: s.dataPointIndexes[l], x1: n, y1: m} + } + 0 <= s.dataPointIndexes[l] && 0 !== I.markerSize && (0 < I.markerSize || 0 < s.markerSize) && + (l = s.getMarkerProperties(k, n, m, b), e.push(l), markerColor = C(S), u && e.push({x: n, y: m, ctx: r, type: l.type, size: l.size, color: markerColor, borderColor: markerColor, borderThickness: l.borderThickness})); + (I.indexLabel || s.indexLabel || I.indexLabelFormatter || s.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedArea", dataPoint: I, dataSeries: s, point: {x: n, y: m}, direction: 0 <= z[k].y ? 1 : -1, color: d}) + } + } + c(); + b.moveTo(n, m); + u && r.moveTo(n, m) + } + delete s.dataPointIndexes + } + P.drawMarkers(e); + b.restore(); + u && r.restore(); + return{source: b, + dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderStackedArea100 = function (a) { + function c() { + for (0 < w.lineThickness && b.stroke(); 0 < h.length; ) { + var a = h.pop(); + b.lineTo(a.x, a.y); + u && y.lineTo(a.x, a.y) + } + b.closePath(); + b.globalAlpha = w.fillOpacity; + b.fill(); + b.globalAlpha = 1; + b.beginPath(); + u && (y.closePath(), y.fill(), y.beginPath()); + h = [] + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = null, e = this.plotArea, + f = [], g = [], h = [], q = [], k = 0, n, m, l, p = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (0 - a.axisY.conversionParameters.minimum) << 0, r = this.dataPointMaxWidth ? this.dataPointMaxWidth : 0.15 * this.width << 0, t = a.axisX.dataInfo.minDiff, t = 0.9 * e.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(t) << 0, y = this._eventManager.ghostCtx; + b.save(); + u && y.save(); + b.beginPath(); + b.rect(e.x1, e.y1, e.width, e.height); + b.clip(); + u && (y.beginPath(), y.rect(e.x1, e.y1, e.width, e.height), y.clip()); + for (var s = [], e = 0; e < a.dataSeriesIndexes.length; e++) { + var z = a.dataSeriesIndexes[e], w = this.data[z], x = w.dataPoints; + w.dataPointIndexes = []; + for (k = 0; k < x.length; k++) + z = x[k].x.getTime ? x[k].x.getTime() : x[k].x, w.dataPointIndexes[z] = k, s[z] || (q.push(z), s[z] = !0); + q.sort(Aa) + } + for (e = 0; e < a.dataSeriesIndexes.length; e++) { + z = a.dataSeriesIndexes[e]; + w = this.data[z]; + x = w.dataPoints; + s = !0; + d = w.id; + this._eventManager.objectMap[d] = {objectType: "dataSeries", dataSeriesIndex: z}; + d = C(d); + y.fillStyle = d; + 1 == x.length && (t = r); + 1 > t ? t = 1 : t > r && (t = r); + h = []; + if (0 < q.length) { + var d = w._colorSet[k % w._colorSet.length], v = w._options.lineColor || d, A = v; + b.fillStyle = d; + b.strokeStyle = v; + b.lineWidth = w.lineThickness; + var H = "solid"; + if (b.setLineDash) { + var K = D(w.nullDataLineDashType, w.lineThickness), H = w.lineDashType, I = D(H, w.lineThickness); + b.setLineDash(I) + } + for (var G = !0, k = 0; k < q.length; k++) { + l = q[k]; + var S = null, S = 0 <= w.dataPointIndexes[l] ? x[w.dataPointIndexes[l]] : {x: l, y: null}; + if (!(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax && (!w.connectNullData || !G))) + if ("number" !== + typeof S.y) + w.connectNullData || (G || s) || c(), G = !0; + else { + m = 0 !== a.dataPointYSums[l] ? 100 * (S.y / a.dataPointYSums[l]) : 0; + n = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (l - a.axisX.conversionParameters.minimum) + 0.5 << 0; + m = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (m - a.axisY.conversionParameters.minimum); + var sa = g[l] ? g[l] : 0; + m -= sa; + h.push({x: n, y: p - sa}); + g[l] = p - m; + s || G ? (!s && w.connectNullData ? (b.setLineDash && (w._options.nullDataLineDashType || H === + w.lineDashType && w.lineDashType !== w.nullDataLineDashType) && (b.stroke(), H = w.nullDataLineDashType, b.setLineDash(K)), b.lineTo(n, m), u && y.lineTo(n, m)) : (b.beginPath(), b.moveTo(n, m), u && (y.beginPath(), y.moveTo(n, m))), G = s = !1) : (b.lineTo(n, m), u && y.lineTo(n, m), 0 == k % 250 && (c(), b.moveTo(n, m), u && y.moveTo(n, m), h.push({x: n, y: p - sa}))); + k < x.length - 1 && (A !== (x[k].lineColor || v) || H !== (x[k].lineDashType || w.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, m), h.push({x: n, y: p - sa}), A = x[k].lineColor || v, b.strokeStyle = A, b.setLineDash && + (x[k].lineDashType ? (H = x[k].lineDashType, b.setLineDash(D(H, w.lineThickness))) : (H = w.lineDashType, b.setLineDash(I)))); + if (0 <= w.dataPointIndexes[l]) { + var xa = w.dataPointIds[w.dataPointIndexes[l]]; + this._eventManager.objectMap[xa] = {id: xa, objectType: "dataPoint", dataSeriesIndex: z, dataPointIndex: w.dataPointIndexes[l], x1: n, y1: m} + } + 0 <= w.dataPointIndexes[l] && 0 !== S.markerSize && (0 < S.markerSize || 0 < w.markerSize) && (l = w.getMarkerProperties(k, n, m, b), f.push(l), markerColor = C(xa), u && f.push({x: n, y: m, ctx: y, type: l.type, size: l.size, + color: markerColor, borderColor: markerColor, borderThickness: l.borderThickness})); + (S.indexLabel || w.indexLabel || S.indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({chartType: "stackedArea100", dataPoint: S, dataSeries: w, point: {x: n, y: m}, direction: 0 <= x[k].y ? 1 : -1, color: d}) + } + } + c(); + b.moveTo(n, m); + u && y.moveTo(n, m) + } + delete w.dataPointIndexes + } + P.drawMarkers(f); + b.restore(); + u && y.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderBubble = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx, b = a.dataSeriesIndexes.length; + if (!(0 >= b)) { + var d = this.plotArea, e = 0, f, g, h = this.dataPointMaxWidth ? this.dataPointMaxWidth : 0.15 * this.width << 0, e = a.axisX.dataInfo.minDiff, b = 0.9 * (d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(e) / b) << 0; + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), + this._eventManager.ghostCtx.clip()); + for (var q = -Infinity, k = Infinity, n = 0; n < a.dataSeriesIndexes.length; n++) + for (var m = a.dataSeriesIndexes[n], l = this.data[m], p = l.dataPoints, r = 0, e = 0; e < p.length; e++) + f = p[e].getTime ? f = p[e].x.getTime() : f = p[e].x, f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax || "undefined" === typeof p[e].z || (r = p[e].z, r > q && (q = r), r < k && (k = r)); + for (var t = 25 * Math.PI, d = Math.max(Math.pow(0.25 * Math.min(d.height, d.width) / 2, 2) * Math.PI, t), n = 0; n < a.dataSeriesIndexes.length; n++) + if (m = a.dataSeriesIndexes[n], + l = this.data[m], p = l.dataPoints, 1 == p.length && (b = h), 1 > b ? b = 1 : b > h && (b = h), 0 < p.length) + for (c.strokeStyle = "#4572A7 ", e = 0; e < p.length; e++) + if (f = p[e].getTime ? f = p[e].x.getTime() : f = p[e].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof p[e].y) { + f = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (f - a.axisX.conversionParameters.minimum) + 0.5 << 0; + g = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (p[e].y - a.axisY.conversionParameters.minimum) + + 0.5 << 0; + var r = p[e].z, y = 2 * Math.max(Math.sqrt((q === k ? d / 2 : t + (d - t) / (q - k) * (r - k)) / Math.PI) << 0, 1), r = l.getMarkerProperties(e, c); + r.size = y; + c.globalAlpha = l.fillOpacity; + P.drawMarker(f, g, c, r.type, r.size, r.color, r.borderColor, r.borderThickness); + c.globalAlpha = 1; + var s = l.dataPointIds[e]; + this._eventManager.objectMap[s] = {id: s, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: e, x1: f, y1: g, size: y}; + y = C(s); + u && P.drawMarker(f, g, this._eventManager.ghostCtx, r.type, r.size, y, y, r.borderThickness); + (p[e].indexLabel || l.indexLabel || + p[e].indexLabelFormatter || l.indexLabelFormatter) && this._indexLabels.push({chartType: "bubble", dataPoint: p[e], dataSeries: l, point: {x: f, y: g}, direction: 1, bounds: {x1: f - r.size / 2, y1: g - r.size / 2, x2: f + r.size / 2, y2: g + r.size / 2}, color: null}) + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, easingFunction: B.easing.easeInQuad, animationBase: 0} + } + }; + v.prototype.renderScatter = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx, b = a.dataSeriesIndexes.length; + if (!(0 >= b)) { + var d = this.plotArea, e = 0, f, g, h = this.dataPointMaxWidth ? this.dataPointMaxWidth : 0.15 * this.width << 0, e = a.axisX.dataInfo.minDiff, b = 0.9 * (d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(e) / b) << 0; + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (var q = 0; q < a.dataSeriesIndexes.length; q++) { + var k = a.dataSeriesIndexes[q], + n = this.data[k], m = n.dataPoints; + 1 == m.length && (b = h); + 1 > b ? b = 1 : b > h && (b = h); + if (0 < m.length) { + c.strokeStyle = "#4572A7 "; + Math.pow(0.3 * Math.min(d.height, d.width) / 2, 2); + for (var l = 0, p = 0, e = 0; e < m.length; e++) + if (f = m[e].getTime ? f = m[e].x.getTime() : f = m[e].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof m[e].y) { + f = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (f - a.axisX.conversionParameters.minimum) + 0.5 << 0; + g = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * + (m[e].y - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var r = n.getMarkerProperties(e, f, g, c); + c.globalAlpha = n.fillOpacity; + P.drawMarker(r.x, r.y, r.ctx, r.type, r.size, r.color, r.borderColor, r.borderThickness); + c.globalAlpha = 1; + Math.sqrt((l - f) * (l - f) + (p - g) * (p - g)) < Math.min(r.size, 5) && m.length > Math.min(this.plotArea.width, this.plotArea.height) || (l = n.dataPointIds[e], this._eventManager.objectMap[l] = {id: l, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: e, x1: f, y1: g}, l = C(l), u && P.drawMarker(r.x, r.y, this._eventManager.ghostCtx, + r.type, r.size, l, l, r.borderThickness), (m[e].indexLabel || n.indexLabel || m[e].indexLabelFormatter || n.indexLabelFormatter) && this._indexLabels.push({chartType: "scatter", dataPoint: m[e], dataSeries: n, point: {x: f, y: g}, direction: 1, bounds: {x1: f - r.size / 2, y1: g - r.size / 2, x2: f + r.size / 2, y2: g + r.size / 2}, color: null}), l = f, p = g) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, easingFunction: B.easing.easeInQuad, animationBase: 0} + } + }; + v.prototype.renderCandlestick = + function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx, b = this._eventManager.ghostCtx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = null, d = this.plotArea, e = 0, f, g, h, q, k, n, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1; + f = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.015 * this.width; + var m = a.axisX.dataInfo.minDiff; + isFinite(m) || (m = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + m = this.dataPointWidth ? this.dataPointWidth : + 0.7 * d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(m) << 0; + this.dataPointMaxWidth && e > f && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, f)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && f < e) && (f = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e)); + m < e && (m = e); + m > f && (m = f); + c.save(); + u && b.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && (b.rect(d.x1, d.y1, d.width, d.height), b.clip()); + for (var l = 0; l < a.dataSeriesIndexes.length; l++) { + var p = + a.dataSeriesIndexes[l], r = this.data[p], t = r.dataPoints; + if (0 < t.length) + for (var y = 5 < m && r.bevelEnabled ? !0 : !1, e = 0; e < t.length; e++) + if (t[e].getTime ? n = t[e].x.getTime() : n = t[e].x, !(n < a.axisX.dataInfo.viewPortMin || n > a.axisX.dataInfo.viewPortMax) && null !== t[e].y && t[e].y.length && "number" === typeof t[e].y[0] && "number" === typeof t[e].y[1] && "number" === typeof t[e].y[2] && "number" === typeof t[e].y[3]) { + f = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (n - a.axisX.conversionParameters.minimum) + + 0.5 << 0; + g = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (t[e].y[0] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + h = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (t[e].y[1] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + q = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (t[e].y[2] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + k = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * + (t[e].y[3] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var s = f - m / 2 << 0, z = s + m << 0, d = t[e].color ? t[e].color : r._colorSet[0], w = Math.round(Math.max(1, 0.15 * m)), x = 0 === w % 2 ? 0 : 0.5, v = r.dataPointIds[e]; + this._eventManager.objectMap[v] = {id: v, objectType: "dataPoint", dataSeriesIndex: p, dataPointIndex: e, x1: s, y1: g, x2: z, y2: h, x3: f, y3: q, x4: f, y4: k, borderThickness: w, color: d}; + c.strokeStyle = d; + c.beginPath(); + c.lineWidth = w; + b.lineWidth = Math.max(w, 4); + "candlestick" === r.type ? (c.moveTo(f - x, h), c.lineTo(f - x, Math.min(g, k)), c.stroke(), c.moveTo(f - + x, Math.max(g, k)), c.lineTo(f - x, q), c.stroke(), M(c, s, Math.min(g, k), z, Math.max(g, k), t[e].y[0] <= t[e].y[3] ? r.risingColor : d, w, d, y, y, !1, !1, r.fillOpacity), u && (d = C(v), b.strokeStyle = d, b.moveTo(f - x, h), b.lineTo(f - x, Math.min(g, k)), b.stroke(), b.moveTo(f - x, Math.max(g, k)), b.lineTo(f - x, q), b.stroke(), M(b, s, Math.min(g, k), z, Math.max(g, k), d, 0, null, !1, !1, !1, !1))) : "ohlc" === r.type && (c.moveTo(f - x, h), c.lineTo(f - x, q), c.stroke(), c.beginPath(), c.moveTo(f, g), c.lineTo(s, g), c.stroke(), c.beginPath(), c.moveTo(f, k), c.lineTo(z, k), c.stroke(), + u && (d = C(v), b.strokeStyle = d, b.moveTo(f - x, h), b.lineTo(f - x, q), b.stroke(), b.beginPath(), b.moveTo(f, g), b.lineTo(s, g), b.stroke(), b.beginPath(), b.moveTo(f, k), b.lineTo(z, k), b.stroke())); + (t[e].indexLabel || r.indexLabel || t[e].indexLabelFormatter || r.indexLabelFormatter) && this._indexLabels.push({chartType: r.type, dataPoint: t[e], dataSeries: r, point: {x: s + (z - s) / 2, y: h}, direction: 1, bounds: {x1: s, y1: Math.min(h, q), x2: z, y2: Math.max(h, q)}, color: d}) + } + } + c.restore(); + u && b.restore(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, + easingFunction: B.easing.easeInQuad, animationBase: 0} + } + }; + v.prototype.renderRangeColumn = function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = 0, f, g, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1; + f = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.03 * this.width; + var h = a.axisX.dataInfo.minDiff; + isFinite(h) || (h = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + h = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(h) / a.plotType.totalDataSeries) << 0; + this.dataPointMaxWidth && e > f && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, f)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && f < e) && (f = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e)); + h < e && (h = e); + h > f && (h = f); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && + (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (var q = 0; q < a.dataSeriesIndexes.length; q++) { + var k = a.dataSeriesIndexes[q], n = this.data[k], m = n.dataPoints; + if (0 < m.length) + for (var l = 5 < h && n.bevelEnabled ? !0 : !1, e = 0; e < m.length; e++) + if (m[e].getTime ? g = m[e].x.getTime() : g = m[e].x, !(g < a.axisX.dataInfo.viewPortMin || g > a.axisX.dataInfo.viewPortMax) && null !== m[e].y && m[e].y.length && "number" === typeof m[e].y[0] && "number" === typeof m[e].y[1]) { + b = a.axisX.conversionParameters.reference + + a.axisX.conversionParameters.pixelPerUnit * (g - a.axisX.conversionParameters.minimum) + 0.5 << 0; + d = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (m[e].y[0] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + f = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (m[e].y[1] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var p = b - a.plotType.totalDataSeries * h / 2 + (a.previousDataSeriesCount + q) * h << 0, r = p + h << 0, b = m[e].color ? m[e].color : n._colorSet[e % n._colorSet.length]; + if (d > f) { + var t = d, d = f; + f = t + } + t = n.dataPointIds[e]; + this._eventManager.objectMap[t] = {id: t, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: e, x1: p, y1: d, x2: r, y2: f}; + M(c, p, d, r, f, b, 0, b, l, l, !1, !1, n.fillOpacity); + b = C(t); + u && M(this._eventManager.ghostCtx, p, d, r, f, b, 0, null, !1, !1, !1, !1); + if (m[e].indexLabel || n.indexLabel || m[e].indexLabelFormatter || n.indexLabelFormatter) + this._indexLabels.push({chartType: "rangeColumn", dataPoint: m[e], dataSeries: n, indexKeyword: 0, point: {x: p + (r - p) / 2, y: m[e].y[1] >= m[e].y[0] ? f : d}, direction: m[e].y[1] >= + m[e].y[0] ? -1 : 1, bounds: {x1: p, y1: Math.min(d, f), x2: r, y2: Math.max(d, f)}, color: b}), this._indexLabels.push({chartType: "rangeColumn", dataPoint: m[e], dataSeries: n, indexKeyword: 1, point: {x: p + (r - p) / 2, y: m[e].y[1] >= m[e].y[0] ? d : f}, direction: m[e].y[1] >= m[e].y[0] ? 1 : -1, bounds: {x1: p, y1: Math.min(d, f), x2: r, y2: Math.max(d, f)}, color: b}) + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, easingFunction: B.easing.easeInQuad, animationBase: 0} + } + }; + v.prototype.renderRangeBar = + function (a) { + var c = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var b = null, d = this.plotArea, e = 0, f, g, h, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1; + f = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0; + var q = a.axisX.dataInfo.minDiff; + isFinite(q) || (q = 0.3 * Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum)); + q = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height / Math.abs(a.axisX.viewportMaximum - a.axisX.viewportMinimum) * Math.abs(q) / a.plotType.totalDataSeries) << 0; + this.dataPointMaxWidth && e > f && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, f)); + !this.dataPointMaxWidth && (this.dataPointMinWidth && f < e) && (f = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e)); + q < e && (q = e); + q > f && (q = f); + c.save(); + u && this._eventManager.ghostCtx.save(); + c.beginPath(); + c.rect(d.x1, d.y1, d.width, d.height); + c.clip(); + u && + (this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); + for (var k = 0; k < a.dataSeriesIndexes.length; k++) { + var n = a.dataSeriesIndexes[k], m = this.data[n], l = m.dataPoints; + if (0 < l.length) { + var p = 5 < q && m.bevelEnabled ? !0 : !1; + c.strokeStyle = "#4572A7 "; + for (e = 0; e < l.length; e++) + if (l[e].getTime ? h = l[e].x.getTime() : h = l[e].x, !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && null !== l[e].y && l[e].y.length && "number" === typeof l[e].y[0] && "number" === typeof l[e].y[1]) { + d = a.axisY.conversionParameters.reference + + a.axisY.conversionParameters.pixelPerUnit * (l[e].y[0] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + f = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (l[e].y[1] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + g = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (h - a.axisX.conversionParameters.minimum) + 0.5 << 0; + g = g - a.plotType.totalDataSeries * q / 2 + (a.previousDataSeriesCount + k) * q << 0; + var r = g + q << 0; + d > f && (b = d, d = f, f = b); + b = l[e].color ? l[e].color : m._colorSet[e % + m._colorSet.length]; + M(c, d, g, f, r, b, 0, null, p, !1, !1, !1, m.fillOpacity); + b = m.dataPointIds[e]; + this._eventManager.objectMap[b] = {id: b, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: e, x1: d, y1: g, x2: f, y2: r}; + b = C(b); + u && M(this._eventManager.ghostCtx, d, g, f, r, b, 0, null, !1, !1, !1, !1); + if (l[e].indexLabel || m.indexLabel || l[e].indexLabelFormatter || m.indexLabelFormatter) + this._indexLabels.push({chartType: "rangeBar", dataPoint: l[e], dataSeries: m, indexKeyword: 0, point: {x: l[e].y[1] >= l[e].y[0] ? d : f, y: g + (r - g) / 2}, direction: l[e].y[1] >= + l[e].y[0] ? -1 : 1, bounds: {x1: Math.min(d, f), y1: g, x2: Math.max(d, f), y2: r}, color: b}), this._indexLabels.push({chartType: "rangeBar", dataPoint: l[e], dataSeries: m, indexKeyword: 1, point: {x: l[e].y[1] >= l[e].y[0] ? f : d, y: g + (r - g) / 2}, direction: l[e].y[1] >= l[e].y[0] ? 1 : -1, bounds: {x1: Math.min(d, f), y1: g, x2: Math.max(d, f), y2: r}, color: b}) + } + } + } + c.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: c, dest: this.plotArea.ctx, animationCallback: B.fadeInAnimation, easingFunction: B.easing.easeInQuad, animationBase: 0} + } + }; + v.prototype.renderRangeArea = + function (a) { + function c() { + if (y) { + var a = null; + 0 < q.lineThickness && b.stroke(); + for (var c = g.length - 1; 0 <= c; c--) + a = g[c], b.lineTo(a.x, a.y), d.lineTo(a.x, a.y); + b.closePath(); + b.globalAlpha = q.fillOpacity; + b.fill(); + b.globalAlpha = 1; + d.fill(); + if (0 < q.lineThickness) { + b.beginPath(); + b.moveTo(a.x, a.y); + for (c = 0; c < g.length; c++) + a = g[c], b.lineTo(a.x, a.y); + b.stroke() + } + b.beginPath(); + b.moveTo(l, p); + d.beginPath(); + d.moveTo(l, p); + y = {x: l, y: p}; + g = []; + g.push({x: l, y: r}) + } + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = + this._eventManager.ghostCtx, e = [], f = this.plotArea; + b.save(); + u && d.save(); + b.beginPath(); + b.rect(f.x1, f.y1, f.width, f.height); + b.clip(); + u && (d.beginPath(), d.rect(f.x1, f.y1, f.width, f.height), d.clip()); + for (f = 0; f < a.dataSeriesIndexes.length; f++) { + var g = [], h = a.dataSeriesIndexes[f], q = this.data[h], k = q.dataPoints, e = q.id; + this._eventManager.objectMap[e] = {objectType: "dataSeries", dataSeriesIndex: h}; + e = C(e); + d.fillStyle = e; + var e = [], n = !0, m = 0, l, p, r, t, y = null; + if (0 < k.length) { + var s = q._colorSet[m % q._colorSet.length], z = q._options.lineColor || + s, w = z; + b.fillStyle = s; + b.strokeStyle = z; + b.lineWidth = q.lineThickness; + var x = "solid"; + if (b.setLineDash) { + var v = D(q.nullDataLineDashType, q.lineThickness), x = q.lineDashType, A = D(x, q.lineThickness); + b.setLineDash(A) + } + for (var H = !0; m < k.length; m++) + if (t = k[m].x.getTime ? k[m].x.getTime() : k[m].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax && (!q.connectNullData || !H))) + if (null !== k[m].y && k[m].y.length && "number" === typeof k[m].y[0] && "number" === typeof k[m].y[1]) { + l = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * + (t - a.axisX.conversionParameters.minimum) + 0.5 << 0; + p = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (k[m].y[0] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + r = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (k[m].y[1] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + n || H ? (q.connectNullData && !n ? (b.setLineDash && (q._options.nullDataLineDashType || x === q.lineDashType && q.lineDashType !== q.nullDataLineDashType) && (g[g.length - 1].newLineDashArray = A, x = + q.nullDataLineDashType, b.setLineDash(v)), b.lineTo(l, p), u && d.lineTo(l, p), g.push({x: l, y: r})) : (b.beginPath(), b.moveTo(l, p), y = {x: l, y: p}, g = [], g.push({x: l, y: r}), u && (d.beginPath(), d.moveTo(l, p))), H = n = !1) : (b.lineTo(l, p), g.push({x: l, y: r}), u && d.lineTo(l, p), 0 == m % 250 && c()); + t = q.dataPointIds[m]; + this._eventManager.objectMap[t] = {id: t, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: m, x1: l, y1: p, y2: r}; + m < k.length - 1 && (w !== (k[m].lineColor || z) || x !== (k[m].lineDashType || q.lineDashType)) && (c(), w = k[m].lineColor || z, + g[g.length - 1].newStrokeStyle = w, b.strokeStyle = w, b.setLineDash && (k[m].lineDashType ? (x = k[m].lineDashType, g[g.length - 1].newLineDashArray = D(x, q.lineThickness), b.setLineDash(g[g.length - 1].newLineDashArray)) : (x = q.lineDashType, g[g.length - 1].newLineDashArray = A, b.setLineDash(A)))); + if (0 !== k[m].markerSize && (0 < k[m].markerSize || 0 < q.markerSize)) { + var K = q.getMarkerProperties(m, l, r, b); + e.push(K); + var I = C(t); + u && e.push({x: l, y: r, ctx: d, type: K.type, size: K.size, color: I, borderColor: I, borderThickness: K.borderThickness}); + K = q.getMarkerProperties(m, + l, p, b); + e.push(K); + I = C(t); + u && e.push({x: l, y: p, ctx: d, type: K.type, size: K.size, color: I, borderColor: I, borderThickness: K.borderThickness}) + } + if (k[m].indexLabel || q.indexLabel || k[m].indexLabelFormatter || q.indexLabelFormatter) + this._indexLabels.push({chartType: "rangeArea", dataPoint: k[m], dataSeries: q, indexKeyword: 0, point: {x: l, y: p}, direction: k[m].y[0] <= k[m].y[1] ? -1 : 1, color: s}), this._indexLabels.push({chartType: "rangeArea", dataPoint: k[m], dataSeries: q, indexKeyword: 1, point: {x: l, y: r}, direction: k[m].y[0] <= k[m].y[1] ? 1 : + -1, color: s}) + } else + H || n || c(), H = !0; + c(); + P.drawMarkers(e) + } + } + b.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + v.prototype.renderRangeSplineArea = function (a) { + function c(a, c) { + var e = ma(p, 2); + if (0 < e.length) { + if (0 < h.lineThickness) { + b.strokeStyle = c; + b.setLineDash && b.setLineDash(a); + b.beginPath(); + b.moveTo(e[0].x, e[0].y); + for (var f = 0; f < e.length - 3; f += 3) { + if (e[f].newStrokeStyle || e[f].newLineDashArray) + b.stroke(), + b.beginPath(), b.moveTo(e[f].x, e[f].y), e[f].newStrokeStyle && (b.strokeStyle = e[f].newStrokeStyle), e[f].newLineDashArray && b.setLineDash(e[f].newLineDashArray); + b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y) + } + b.stroke() + } + b.beginPath(); + b.moveTo(e[0].x, e[0].y); + u && (d.beginPath(), d.moveTo(e[0].x, e[0].y)); + for (f = 0; f < e.length - 3; f += 3) + b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y), u && d.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y); + e = ma(r, 2); + b.lineTo(r[r.length - + 1].x, r[r.length - 1].y); + for (f = e.length - 1; 2 < f; f -= 3) + b.bezierCurveTo(e[f - 1].x, e[f - 1].y, e[f - 2].x, e[f - 2].y, e[f - 3].x, e[f - 3].y), u && d.bezierCurveTo(e[f - 1].x, e[f - 1].y, e[f - 2].x, e[f - 2].y, e[f - 3].x, e[f - 3].y); + b.closePath(); + b.globalAlpha = h.fillOpacity; + b.fill(); + u && (d.closePath(), d.fill()); + b.globalAlpha = 1; + if (0 < h.lineThickness) { + b.strokeStyle = c; + b.setLineDash && b.setLineDash(a); + b.beginPath(); + b.moveTo(e[0].x, e[0].y); + for (var g = f = 0; f < e.length - 3; f += 3, g++) { + if (p[g].newStrokeStyle || p[g].newLineDashArray) + b.stroke(), b.beginPath(), + b.moveTo(e[f].x, e[f].y), p[g].newStrokeStyle && (b.strokeStyle = p[g].newStrokeStyle), p[g].newLineDashArray && b.setLineDash(p[g].newLineDashArray); + b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y) + } + b.stroke() + } + b.beginPath() + } + } + var b = a.targetCanvasCtx || this.plotArea.ctx; + if (!(0 >= a.dataSeriesIndexes.length)) { + var d = this._eventManager.ghostCtx, e = [], f = this.plotArea; + b.save(); + u && d.save(); + b.beginPath(); + b.rect(f.x1, f.y1, f.width, f.height); + b.clip(); + u && (d.beginPath(), d.rect(f.x1, f.y1, f.width, f.height), + d.clip()); + for (f = 0; f < a.dataSeriesIndexes.length; f++) { + var g = a.dataSeriesIndexes[f], h = this.data[g], q = h.dataPoints, e = h.id; + this._eventManager.objectMap[e] = {objectType: "dataSeries", dataSeriesIndex: g}; + e = C(e); + d.fillStyle = e; + var e = [], k = 0, n, m, l, p = [], r = []; + if (0 < q.length) { + var t = h._colorSet[k % h._colorSet.length], y = h._options.lineColor || t, s = y; + b.fillStyle = t; + b.lineWidth = h.lineThickness; + var z = "solid", w; + if (b.setLineDash) { + var x = D(h.nullDataLineDashType, h.lineThickness), z = h.lineDashType; + w = D(z, h.lineThickness) + } + for (m = !1; k < + q.length; k++) + if (n = q[k].x.getTime ? q[k].x.getTime() : q[k].x, !(n < a.axisX.dataInfo.viewPortMin || n > a.axisX.dataInfo.viewPortMax && (!h.connectNullData || !m))) + if (null !== q[k].y && q[k].y.length && "number" === typeof q[k].y[0] && "number" === typeof q[k].y[1]) { + n = a.axisX.conversionParameters.reference + a.axisX.conversionParameters.pixelPerUnit * (n - a.axisX.conversionParameters.minimum) + 0.5 << 0; + m = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (q[k].y[0] - a.axisY.conversionParameters.minimum) + + 0.5 << 0; + l = a.axisY.conversionParameters.reference + a.axisY.conversionParameters.pixelPerUnit * (q[k].y[1] - a.axisY.conversionParameters.minimum) + 0.5 << 0; + var v = h.dataPointIds[k]; + this._eventManager.objectMap[v] = {id: v, objectType: "dataPoint", dataSeriesIndex: g, dataPointIndex: k, x1: n, y1: m, y2: l}; + p[p.length] = {x: n, y: m}; + r[r.length] = {x: n, y: l}; + k < q.length - 1 && (s !== (q[k].lineColor || y) || z !== (q[k].lineDashType || h.lineDashType)) && (s = q[k].lineColor || y, p[p.length - 1].newStrokeStyle = s, b.setLineDash && (q[k].lineDashType ? (z = q[k].lineDashType, + p[p.length - 1].newLineDashArray = D(z, h.lineThickness)) : (z = h.lineDashType, p[p.length - 1].newLineDashArray = w))); + if (0 !== q[k].markerSize && (0 < q[k].markerSize || 0 < h.markerSize)) { + var A = h.getMarkerProperties(k, n, m, b); + e.push(A); + var H = C(v); + u && e.push({x: n, y: m, ctx: d, type: A.type, size: A.size, color: H, borderColor: H, borderThickness: A.borderThickness}); + A = h.getMarkerProperties(k, n, l, b); + e.push(A); + H = C(v); + u && e.push({x: n, y: l, ctx: d, type: A.type, size: A.size, color: H, borderColor: H, borderThickness: A.borderThickness}) + } + if (q[k].indexLabel || + h.indexLabel || q[k].indexLabelFormatter || h.indexLabelFormatter) + this._indexLabels.push({chartType: "splineArea", dataPoint: q[k], dataSeries: h, indexKeyword: 0, point: {x: n, y: m}, direction: q[k].y[0] <= q[k].y[1] ? -1 : 1, color: t}), this._indexLabels.push({chartType: "splineArea", dataPoint: q[k], dataSeries: h, indexKeyword: 1, point: {x: n, y: l}, direction: q[k].y[0] <= q[k].y[1] ? 1 : -1, color: t}); + m = !1 + } else + 0 < k && !m && (h.connectNullData ? b.setLineDash && (0 < p.length && (h._options.nullDataLineDashType || !q[k - 1].lineDashType)) && (p[p.length - + 1].newLineDashArray = x, z = h.nullDataLineDashType) : (c(w, y), p = [], r = [])), m = !0; + c(w, y); + P.drawMarkers(e) + } + } + b.restore(); + u && this._eventManager.ghostCtx.restore(); + return{source: b, dest: this.plotArea.ctx, animationCallback: B.xClipAnimation, easingFunction: B.easing.linear, animationBase: 0} + } + }; + var ya = function (a, c, b, d, e, f, g, h, q) { + if (!(0 > b)) { + "undefined" === typeof h && (h = 1); + if (!u) { + var k = Number((g % (2 * Math.PI)).toFixed(8)); + Number((f % (2 * Math.PI)).toFixed(8)) === k && (g -= 1E-4) + } + a.save(); + a.globalAlpha = h; + "pie" === e ? (a.beginPath(), a.moveTo(c.x, + c.y), a.arc(c.x, c.y, b, f, g, !1), a.fillStyle = d, a.strokeStyle = "white", a.lineWidth = 2, a.closePath(), a.fill()) : "doughnut" === e && (a.beginPath(), a.arc(c.x, c.y, b, f, g, !1), 0 <= q && a.arc(c.x, c.y, q * b, g, f, !0), a.closePath(), a.fillStyle = d, a.strokeStyle = "white", a.lineWidth = 2, a.fill()); + a.globalAlpha = 1; + a.restore() + } + }; + v.prototype.renderPie = function (a) { + function c() { + if (k && n) { + for (var a = 0, b = 0, c = 0, d = 0, e = 0; e < n.length; e++) { + var f = n[e], g = k.dataPointIds[e], h = {id: g, objectType: "dataPoint", dataPointIndex: e, dataSeriesIndex: 0}; + p.push(h); + var m = {percent: null, total: null}, r = null, m = q.getPercentAndTotal(k, f); + if (k.indexLabelFormatter || f.indexLabelFormatter) + r = {chart: q._options, dataSeries: k, dataPoint: f, total: m.total, percent: m.percent}; + m = f.indexLabelFormatter ? f.indexLabelFormatter(r) : f.indexLabel ? q.replaceKeywordsWithValue(f.indexLabel, f, k, e) : k.indexLabelFormatter ? k.indexLabelFormatter(r) : k.indexLabel ? q.replaceKeywordsWithValue(k.indexLabel, f, k, e) : f.label ? f.label : ""; + q._eventManager.objectMap[g] = h; + h.center = {x: w.x, y: w.y}; + h.y = f.y; + h.radius = A; + h.percentInnerRadius = K; + h.indexLabelText = m; + h.indexLabelPlacement = k.indexLabelPlacement; + h.indexLabelLineColor = f.indexLabelLineColor ? f.indexLabelLineColor : k.indexLabelLineColor ? k.indexLabelLineColor : f.color ? f.color : k._colorSet[e % k._colorSet.length]; + h.indexLabelLineThickness = x(f.indexLabelLineThickness) ? k.indexLabelLineThickness : f.indexLabelLineThickness; + h.indexLabelLineDashType = f.indexLabelLineDashType ? f.indexLabelLineDashType : k.indexLabelLineDashType; + h.indexLabelFontColor = f.indexLabelFontColor ? f.indexLabelFontColor : + k.indexLabelFontColor; + h.indexLabelFontStyle = f.indexLabelFontStyle ? f.indexLabelFontStyle : k.indexLabelFontStyle; + h.indexLabelFontWeight = f.indexLabelFontWeight ? f.indexLabelFontWeight : k.indexLabelFontWeight; + h.indexLabelFontSize = f.indexLabelFontSize ? f.indexLabelFontSize : k.indexLabelFontSize; + h.indexLabelFontFamily = f.indexLabelFontFamily ? f.indexLabelFontFamily : k.indexLabelFontFamily; + h.indexLabelBackgroundColor = f.indexLabelBackgroundColor ? f.indexLabelBackgroundColor : k.indexLabelBackgroundColor ? k.indexLabelBackgroundColor : + null; + h.indexLabelMaxWidth = f.indexLabelMaxWidth ? f.indexLabelMaxWidth : k.indexLabelMaxWidth ? k.indexLabelMaxWidth : 0.33 * l.width; + h.indexLabelWrap = "undefined" !== typeof f.indexLabelWrap ? f.indexLabelWrap : k.indexLabelWrap; + h.startAngle = 0 === e ? k.startAngle ? k.startAngle / 180 * Math.PI : 0 : p[e - 1].endAngle; + h.startAngle = (h.startAngle + 2 * Math.PI) % (2 * Math.PI); + h.endAngle = h.startAngle + 2 * Math.PI / v * Math.abs(f.y); + f = (h.endAngle + h.startAngle) / 2; + f = (f + 2 * Math.PI) % (2 * Math.PI); + h.midAngle = f; + if (h.midAngle > Math.PI / 2 - s && h.midAngle < Math.PI / + 2 + s) { + if (0 === a || p[c].midAngle > h.midAngle) + c = e; + a++ + } else if (h.midAngle > 3 * Math.PI / 2 - s && h.midAngle < 3 * Math.PI / 2 + s) { + if (0 === b || p[d].midAngle > h.midAngle) + d = e; + b++ + } + h.hemisphere = f > Math.PI / 2 && f <= 3 * Math.PI / 2 ? "left" : "right"; + h.indexLabelTextBlock = new O(q.plotArea.ctx, {fontSize: h.indexLabelFontSize, fontFamily: h.indexLabelFontFamily, fontColor: h.indexLabelFontColor, fontStyle: h.indexLabelFontStyle, fontWeight: h.indexLabelFontWeight, horizontalAlign: "left", backgroundColor: h.indexLabelBackgroundColor, maxWidth: h.indexLabelMaxWidth, + maxHeight: h.indexLabelWrap ? 5 * h.indexLabelFontSize : 1.5 * h.indexLabelFontSize, text: h.indexLabelText, padding: 0, textBaseline: "top"}); + h.indexLabelTextBlock.measureText() + } + g = f = 0; + m = !1; + for (e = 0; e < n.length; e++) + h = p[(c + e) % n.length], 1 < a && (h.midAngle > Math.PI / 2 - s && h.midAngle < Math.PI / 2 + s) && (f <= a / 2 && !m ? (h.hemisphere = "right", f++) : (h.hemisphere = "left", m = !0)); + m = !1; + for (e = 0; e < n.length; e++) + h = p[(d + e) % n.length], 1 < b && (h.midAngle > 3 * Math.PI / 2 - s && h.midAngle < 3 * Math.PI / 2 + s) && (g <= b / 2 && !m ? (h.hemisphere = "left", g++) : (h.hemisphere = "right", + m = !0)) + } + } + function b(a) { + var b = q.plotArea.ctx; + b.clearRect(l.x1, l.y1, l.width, l.height); + b.fillStyle = q.backgroundColor; + b.fillRect(l.x1, l.y1, l.width, l.height); + for (b = 0; b < n.length; b++) { + var c = p[b].startAngle, d = p[b].endAngle; + if (d > c) { + var e = 0.07 * A * Math.cos(p[b].midAngle), f = 0.07 * A * Math.sin(p[b].midAngle), g = !1; + if (n[b].exploded) { + if (1E-9 < Math.abs(p[b].center.x - (w.x + e)) || 1E-9 < Math.abs(p[b].center.y - (w.y + f))) + p[b].center.x = w.x + e * a, p[b].center.y = w.y + f * a, g = !0 + } else if (0 < Math.abs(p[b].center.x - w.x) || 0 < Math.abs(p[b].center.y - + w.y)) + p[b].center.x = w.x + e * (1 - a), p[b].center.y = w.y + f * (1 - a), g = !0; + g && (e = {}, e.dataSeries = k, e.dataPoint = k.dataPoints[b], e.index = b, q._toolTip.highlightObjects([e])); + ya(q.plotArea.ctx, p[b].center, p[b].radius, n[b].color ? n[b].color : k._colorSet[b % k._colorSet.length], k.type, c, d, k.fillOpacity, p[b].percentInnerRadius) + } + } + a = q.plotArea.ctx; + a.save(); + a.fillStyle = "black"; + a.strokeStyle = "grey"; + a.textBaseline = "middle"; + a.lineJoin = "round"; + for (b = b = 0; b < n.length; b++) + c = p[b], c.indexLabelText && (c.indexLabelTextBlock.y -= c.indexLabelTextBlock.height / + 2, d = 0, d = "left" === c.hemisphere ? "inside" !== k.indexLabelPlacement ? -(c.indexLabelTextBlock.width + m) : -c.indexLabelTextBlock.width / 2 : "inside" !== k.indexLabelPlacement ? m : -c.indexLabelTextBlock.width / 2, c.indexLabelTextBlock.x += d, c.indexLabelTextBlock.render(!0), c.indexLabelTextBlock.x -= d, c.indexLabelTextBlock.y += c.indexLabelTextBlock.height / 2, "inside" !== c.indexLabelPlacement && 0 < c.indexLabelLineThickness && (d = c.center.x + A * Math.cos(c.midAngle), e = c.center.y + A * Math.sin(c.midAngle), a.strokeStyle = c.indexLabelLineColor, + a.lineWidth = c.indexLabelLineThickness, a.setLineDash && a.setLineDash(D(c.indexLabelLineDashType, c.indexLabelLineThickness)), a.beginPath(), a.moveTo(d, e), a.lineTo(c.indexLabelTextBlock.x, c.indexLabelTextBlock.y), a.lineTo(c.indexLabelTextBlock.x + ("left" === c.hemisphere ? -m : m), c.indexLabelTextBlock.y), a.stroke()), a.lineJoin = "miter"); + a.save() + } + function d(a, b) { + var c = 0, c = a.indexLabelTextBlock.y - a.indexLabelTextBlock.height / 2, d = a.indexLabelTextBlock.y + a.indexLabelTextBlock.height / 2, e = b.indexLabelTextBlock.y - b.indexLabelTextBlock.height / + 2, f = b.indexLabelTextBlock.y + b.indexLabelTextBlock.height / 2; + return c = b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? e - d : c - f + } + function e(a) { + for (var b = null, c = 1; c < n.length; c++) + if (b = (a + c + p.length) % p.length, p[b].hemisphere !== p[a].hemisphere) { + b = null; + break + } else if (p[b].indexLabelText && b !== a && (0 > d(p[b], p[a]) || ("right" === p[a].hemisphere ? p[b].indexLabelTextBlock.y >= p[a].indexLabelTextBlock.y : p[b].indexLabelTextBlock.y <= p[a].indexLabelTextBlock.y))) + break; + else + b = null; + return b + } + function f(a, b, c) { + c = (c || 0) + 1; + if (1E3 < + c) + return 0; + b = b || 0; + var g = 0, k = w.y - 1 * t, h = w.y + 1 * t; + if (0 <= a && a < n.length) { + var l = p[a]; + if (0 > b && l.indexLabelTextBlock.y < k || 0 < b && l.indexLabelTextBlock.y > h) + return 0; + var m = 0, q = 0, q = m = m = 0; + 0 > b ? l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 > k && l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 + b < k && (b = -(k - (l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 + b))) : l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 < k && l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 + b > h && (b = l.indexLabelTextBlock.y + + l.indexLabelTextBlock.height / 2 + b - h); + b = l.indexLabelTextBlock.y + b; + k = 0; + k = "right" === l.hemisphere ? w.x + Math.sqrt(Math.pow(t, 2) - Math.pow(b - w.y, 2)) : w.x - Math.sqrt(Math.pow(t, 2) - Math.pow(b - w.y, 2)); + q = w.x + A * Math.cos(l.midAngle); + m = w.y + A * Math.sin(l.midAngle); + m = Math.sqrt(Math.pow(k - q, 2) + Math.pow(b - m, 2)); + q = Math.acos(A / t); + m = Math.acos((t * t + A * A - m * m) / (2 * A * t)); + b = m < q ? b - l.indexLabelTextBlock.y : 0; + k = null; + for (h = 1; h < n.length; h++) + if (k = (a - h + p.length) % p.length, p[k].hemisphere !== p[a].hemisphere) { + k = null; + break + } else if (p[k].indexLabelText && + p[k].hemisphere === p[a].hemisphere && k !== a && (0 > d(p[k], p[a]) || ("right" === p[a].hemisphere ? p[k].indexLabelTextBlock.y <= p[a].indexLabelTextBlock.y : p[k].indexLabelTextBlock.y >= p[a].indexLabelTextBlock.y))) + break; + else + k = null; + q = k; + m = e(a); + h = k = 0; + 0 > b ? (h = "right" === l.hemisphere ? q : m, g = b, null !== h && (q = -b, b = l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 - (p[h].indexLabelTextBlock.y + p[h].indexLabelTextBlock.height / 2), b - q < r && (k = -q, h = f(h, k, c + 1), +h.toFixed(u) > +k.toFixed(u) && (g = b > r ? -(b - r) : -(q - (h - k)))))) : 0 < b && (h = "right" === + l.hemisphere ? m : q, g = b, null !== h && (q = b, b = p[h].indexLabelTextBlock.y - p[h].indexLabelTextBlock.height / 2 - (l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2), b - q < r && (k = q, h = f(h, k, c + 1), +h.toFixed(u) < +k.toFixed(u) && (g = b > r ? b - r : q - (k - h))))); + g && (c = l.indexLabelTextBlock.y + g, b = 0, b = "right" === l.hemisphere ? w.x + Math.sqrt(Math.pow(t, 2) - Math.pow(c - w.y, 2)) : w.x - Math.sqrt(Math.pow(t, 2) - Math.pow(c - w.y, 2)), l.midAngle > Math.PI / 2 - s && l.midAngle < Math.PI / 2 + s ? (k = (a - 1 + p.length) % p.length, k = p[k], a = p[(a + 1 + p.length) % p.length], "left" === + l.hemisphere && "right" === k.hemisphere && b > k.indexLabelTextBlock.x ? b = k.indexLabelTextBlock.x - 15 : "right" === l.hemisphere && ("left" === a.hemisphere && b < a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x + 15)) : l.midAngle > 3 * Math.PI / 2 - s && l.midAngle < 3 * Math.PI / 2 + s && (k = (a - 1 + p.length) % p.length, k = p[k], a = p[(a + 1 + p.length) % p.length], "right" === l.hemisphere && "left" === k.hemisphere && b < k.indexLabelTextBlock.x ? b = k.indexLabelTextBlock.x + 15 : "left" === l.hemisphere && ("right" === a.hemisphere && b > a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x - + 15)), l.indexLabelTextBlock.y = c, l.indexLabelTextBlock.x = b, l.indexLabelAngle = Math.atan2(l.indexLabelTextBlock.y - w.y, l.indexLabelTextBlock.x - w.x)) + } + return g + } + function g() { + var a = q.plotArea.ctx; + a.fillStyle = "grey"; + a.strokeStyle = "grey"; + a.font = "16px Arial"; + a.textBaseline = "middle"; + for (var b = a = 0, c = 0, g = !0, b = 0; 10 > b && (1 > b || 0 < c); b++) { + if (k.radius || !k.radius && "undefined" !== typeof k.innerRadius && null !== k.innerRadius && A - c <= H) + g = !1; + g && (A -= c); + c = 0; + if ("inside" !== k.indexLabelPlacement) { + t = A * y; + for (a = 0; a < n.length; a++) { + var h = + p[a]; + h.indexLabelTextBlock.x = w.x + t * Math.cos(h.midAngle); + h.indexLabelTextBlock.y = w.y + t * Math.sin(h.midAngle); + h.indexLabelAngle = h.midAngle; + h.radius = A; + h.percentInnerRadius = K + } + for (var s, x, a = 0; a < n.length; a++) { + var h = p[a], v = e(a); + if (null !== v) { + s = p[a]; + x = p[v]; + var B = 0, B = d(s, x) - r; + if (0 > B) { + for (var C = x = 0, D = 0; D < n.length; D++) + D !== a && p[D].hemisphere === h.hemisphere && (p[D].indexLabelTextBlock.y < h.indexLabelTextBlock.y ? x++ : C++); + x = B / (x + C || 1) * C; + var C = -1 * (B - x), E = D = 0; + "right" === h.hemisphere ? (D = f(a, x), C = -1 * (B - D), E = f(v, C), +E.toFixed(u) < + +C.toFixed(u) && +D.toFixed(u) <= +x.toFixed(u) && f(a, -(C - E))) : (D = f(v, x), C = -1 * (B - D), E = f(a, C), +E.toFixed(u) < +C.toFixed(u) && +D.toFixed(u) <= +x.toFixed(u) && f(v, -(C - E))) + } + } + } + } else + for (a = 0; a < n.length; a++) + h = p[a], t = "pie" === k.type ? 0.7 * A : 0.8 * A, v = w.x + t * Math.cos(h.midAngle), x = w.y + t * Math.sin(h.midAngle), h.indexLabelTextBlock.x = v, h.indexLabelTextBlock.y = x; + for (a = 0; a < n.length; a++) + if (h = p[a], v = h.indexLabelTextBlock.measureText(), 0 !== v.height && 0 !== v.width) + v = v = 0, "right" === h.hemisphere ? (v = l.x2 - (h.indexLabelTextBlock.x + h.indexLabelTextBlock.width + + m), v *= -1) : v = l.x1 - (h.indexLabelTextBlock.x - h.indexLabelTextBlock.width - m), 0 < v && (!g && h.indexLabelText && (x = "right" === h.hemisphere ? l.x2 - h.indexLabelTextBlock.x : h.indexLabelTextBlock.x - l.x1, 0.3 * h.indexLabelTextBlock.maxWidth > x ? h.indexLabelText = "" : h.indexLabelTextBlock.maxWidth = 0.85 * x, 0.3 * h.indexLabelTextBlock.maxWidth < x && (h.indexLabelTextBlock.x -= "right" === h.hemisphere ? 2 : -2)), Math.abs(h.indexLabelTextBlock.y - h.indexLabelTextBlock.height / 2 - w.y) < A || Math.abs(h.indexLabelTextBlock.y + h.indexLabelTextBlock.height / + 2 - w.y) < A) && (v /= Math.abs(Math.cos(h.indexLabelAngle)), 9 < v && (v *= 0.3), v > c && (c = v)), v = v = 0, 0 < h.indexLabelAngle && h.indexLabelAngle < Math.PI ? (v = l.y2 - (h.indexLabelTextBlock.y + h.indexLabelTextBlock.height / 2 + 5), v *= -1) : v = l.y1 - (h.indexLabelTextBlock.y - h.indexLabelTextBlock.height / 2 - 5), 0 < v && (!g && h.indexLabelText && (x = 0 < h.indexLabelAngle && h.indexLabelAngle < Math.PI ? -1 : 1, 0 === f(a, v * x) && f(a, 2 * x)), Math.abs(h.indexLabelTextBlock.x - w.x) < A && (v /= Math.abs(Math.sin(h.indexLabelAngle)), 9 < v && (v *= 0.3), v > c && (c = v))); + var F = function (a, + b, c) { + for (var d = [], e = 0; d.push(p[b]), b !== c; b = (b + 1 + n.length) % n.length) + ; + d.sort(function (a, b) { + return a.y - b.y + }); + for (b = 0; b < d.length; b++) + if (c = d[b], e < 0.7 * a) + e += c.indexLabelTextBlock.height, c.indexLabelTextBlock.text = "", c.indexLabelText = "", c.indexLabelTextBlock.measureText(); + else + break + }; + (function () { + for (var a = -1, b = -1, c = 0, f = !1, g = 0; g < n.length; g++) + if (f = !1, s = p[g], s.indexLabelText) { + var h = e(g); + if (null !== h) { + var k = p[h]; + B = 0; + B = d(s, k); + var l; + if (l = 0 > B) { + l = s.indexLabelTextBlock.x; + var q = s.indexLabelTextBlock.y - s.indexLabelTextBlock.height / + 2, r = s.indexLabelTextBlock.y + s.indexLabelTextBlock.height / 2, t = k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2, u = k.indexLabelTextBlock.x + k.indexLabelTextBlock.width, y = k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2; + l = s.indexLabelTextBlock.x + s.indexLabelTextBlock.width < k.indexLabelTextBlock.x - m || l > u + m || q > y + m || r < t - m ? !1 : !0 + } + l ? (0 > a && (a = g), h !== a && (b = h, c += -B), 0 === g % Math.max(n.length / 10, 3) && (f = !0)) : f = !0; + f && (0 < c && 0 <= a && 0 <= b) && (F(c, a, b), b = a = -1, c = 0) + } + } + 0 < c && F(c, a, b) + })() + } + } + function h() { + q.plotArea.layoutManager.reset(); + q._title && (q._title.dockInsidePlotArea || "center" === q._title.horizontalAlign && "center" === q._title.verticalAlign) && q._title.render(); + if (q.subtitles) + for (var a = 0; a < q.subtitles.length; a++) { + var b = q.subtitles[a]; + (b.dockInsidePlotArea || "center" === b.horizontalAlign && "center" === b.verticalAlign) && b.render() + } + q.legend && (q.legend.dockInsidePlotArea || "center" === q.legend.horizontalAlign && "center" === q.legend.verticalAlign) && q.legend.render() + } + var q = this; + if (!(0 >= a.dataSeriesIndexes.length)) { + var k = this.data[a.dataSeriesIndexes[0]], + n = k.dataPoints, m = 10, l = this.plotArea, p = [], r = 2, t, y = 1.3, s = 20 / 180 * Math.PI, u = 6, w = {x: (l.x2 + l.x1) / 2, y: (l.y2 + l.y1) / 2}, v = 0; + a = !1; + for (var B = 0; B < n.length; B++) + v += Math.abs(n[B].y), !a && ("undefined" !== typeof n[B].indexLabel && null !== n[B].indexLabel && 0 < n[B].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof n[B].label && null !== n[B].label && 0 < n[B].label.toString().length) && (a = !0); + if (0 !== v) { + a = a || "undefined" !== typeof k.indexLabel && null !== k.indexLabel && 0 < k.indexLabel.toString().length; + var A = "inside" !== k.indexLabelPlacement && + a ? 0.75 * Math.min(l.width, l.height) / 2 : 0.92 * Math.min(l.width, l.height) / 2; + k.radius && (A = Ha(k.radius, A)); + var H = "undefined" !== typeof k.innerRadius && null !== k.innerRadius ? Ha(k.innerRadius, A) : 0.7 * A, K = Math.min(H / A, (A - 1) / A); + this.pieDoughnutClickHandler = function (a) { + q.isAnimating || !x(a.dataSeries.explodeOnClick) && !a.dataSeries.explodeOnClick || (a = a.dataPoint, a.exploded = a.exploded ? !1 : !0, 1 < this.dataPoints.length && q._animator.animate(0, 500, function (a) { + b(a); + h() + })) + }; + c(); + g(); + g(); + g(); + g(); + this.disableToolTip = !0; + this._animator.animate(0, + this.animatedRender ? this.animationDuration : 0, function (a) { + var b = q.plotArea.ctx; + b.clearRect(l.x1, l.y1, l.width, l.height); + b.fillStyle = q.backgroundColor; + b.fillRect(l.x1, l.y1, l.width, l.height); + a = p[0].startAngle + 2 * Math.PI * a; + for (b = 0; b < n.length; b++) { + var c = 0 === b ? p[b].startAngle : d, d = c + (p[b].endAngle - p[b].startAngle), e = !1; + d > a && (d = a, e = !0); + var f = n[b].color ? n[b].color : k._colorSet[b % k._colorSet.length]; + d > c && ya(q.plotArea.ctx, p[b].center, p[b].radius, f, k.type, c, d, k.fillOpacity, p[b].percentInnerRadius); + if (e) + break + } + h() + }, + function () { + q.disableToolTip = !1; + q._animator.animate(0, q.animatedRender ? 500 : 0, function (a) { + b(a); + h() + }) + }) + } + } + }; + v.prototype.animationRequestId = null; + v.prototype.requestAnimFrame = function () { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { + window.setTimeout(a, 1E3 / 60) + } + }(); + v.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || + window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout; + da.prototype.registerSpace = function (a, c) { + "top" === a ? this._topOccupied += c.height : "bottom" === a ? this._bottomOccupied += c.height : "left" === a ? this._leftOccupied += c.width : "right" === a && (this._rightOccupied += c.width) + }; + da.prototype.unRegisterSpace = function (a, c) { + "top" === a ? this._topOccupied -= c.height : "bottom" === a ? this._bottomOccupied -= c.height : "left" === a ? this._leftOccupied -= c.width : "right" === a && (this._rightOccupied -= c.width) + }; + da.prototype.getFreeSpace = function () { + return{x1: this._x1 + this._leftOccupied, y1: this._y1 + this._topOccupied, x2: this._x2 - this._rightOccupied, y2: this._y2 - this._bottomOccupied, width: this._x2 - this._x1 - this._rightOccupied - this._leftOccupied, height: this._y2 - this._y1 - this._bottomOccupied - this._topOccupied} + }; + da.prototype.reset = function () { + this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding + }; + T(O, L); + O.prototype.render = function (a) { + a && this.ctx.save(); + var c = this.ctx.font; + this.ctx.textBaseline = + this.textBaseline; + var b = 0; + this._isDirty && this.measureText(this.ctx); + this.ctx.translate(this.x, this.y + b); + "middle" === this.textBaseline && (b = -this._lineHeight / 2); + this.ctx.font = this._getFontString(); + this.ctx.rotate(Math.PI / 180 * this.angle); + var d = 0, e = this.padding, f = null; + (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(0, b, this.width, this.height, this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor); + this.ctx.fillStyle = this.fontColor; + for (b = 0; b < this._wrappedText.lines.length; b++) + f = + this._wrappedText.lines[b], "right" === this.horizontalAlign ? d = this.width - f.width - this.padding : "left" === this.horizontalAlign ? d = this.padding : "center" === this.horizontalAlign && (d = (this.width - 2 * this.padding) / 2 - f.width / 2 + this.padding), this.ctx.fillText(f.text, d, e), e += f.height; + this.ctx.font = c; + a && this.ctx.restore() + }; + O.prototype.setText = function (a) { + this.text = a; + this._isDirty = !0; + this._wrappedText = null + }; + O.prototype.measureText = function () { + if (null === this.maxWidth) + throw"Please set maxWidth and height for TextBlock"; + this._wrapText(this.ctx); + this._isDirty = !1; + return{width: this.width, height: this.height} + }; + O.prototype._getLineWithWidth = function (a, c, b) { + a = String(a); + if (!a) + return{text: "", width: 0}; + var d = b = 0, e = a.length - 1, f = Infinity; + for (this.ctx.font = this._getFontString(); d <= e; ) { + var f = Math.floor((d + e) / 2), g = a.substr(0, f + 1); + b = this.ctx.measureText(g).width; + if (b < c) + d = f + 1; + else if (b > c) + e = f - 1; + else + break + } + b > c && 1 < g.length && (g = g.substr(0, g.length - 1), b = this.ctx.measureText(g).width); + c = !0; + if (g.length === a.length || " " === a[g.length]) + c = !1; + c && (a = g.split(" "), 1 < a.length && a.pop(), g = a.join(" "), b = this.ctx.measureText(g).width); + return{text: g, width: b} + }; + O.prototype._wrapText = function () { + var a = new String(ea(String(this.text))), c = [], b = this.ctx.font, d = 0, e = 0; + for (this.ctx.font = this._getFontString(); 0 < a.length; ) { + var f = this.maxHeight - 2 * this.padding, g = this._getLineWithWidth(a, this.maxWidth - 2 * this.padding, !1); + g.height = this._lineHeight; + c.push(g); + e = Math.max(e, g.width); + d += g.height; + a = ea(a.slice(g.text.length, a.length)); + f && d > f && (g = c.pop(), d -= g.height) + } + this._wrappedText = + {lines: c, width: e, height: d}; + this.width = e + 2 * this.padding; + this.height = d + 2 * this.padding; + this.ctx.font = b + }; + O.prototype._getFontString = function () { + var a; + a = "" + (this.fontStyle ? this.fontStyle + " " : ""); + a += this.fontWeight ? this.fontWeight + " " : ""; + a += this.fontSize ? this.fontSize + "px " : ""; + var c = this.fontFamily ? this.fontFamily + "" : ""; + !u && c && (c = c.split(",")[0], "'" !== c[0] && '"' !== c[0] && (c = "'" + c + "'")); + return a += c + }; + T(ga, L); + ga.prototype.render = function () { + if (this.text) { + var a = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, + c = a.layoutManager.getFreeSpace(), b = c.x1, d = c.y1, e = 0, f = 0, g = this.chart._menuButton && this.chart.exportEnabled && "top" === this.verticalAlign ? 22 : 0, h, q; + "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (null === this.maxWidth && (this.maxWidth = c.width - 4 - g * ("center" === this.horizontalAlign ? 2 : 1)), f = 0.5 * c.height - this.margin - 2, e = 0) : "center" === this.verticalAlign && ("left" === this.horizontalAlign || "right" === this.horizontalAlign ? (null === this.maxWidth && (this.maxWidth = c.height - 4), f = 0.5 * c.width - this.margin - 2) : "center" === + this.horizontalAlign && (null === this.maxWidth && (this.maxWidth = c.width - 4), f = 0.5 * c.height - 4)); + this.wrap || (f = Math.min(f, Math.max(1.5 * this.fontSize, this.fontSize + 2.5 * this.padding))); + var f = new O(this.ctx, {fontSize: this.fontSize, fontFamily: this.fontFamily, fontColor: this.fontColor, fontStyle: this.fontStyle, fontWeight: this.fontWeight, horizontalAlign: this.horizontalAlign, verticalAlign: this.verticalAlign, borderColor: this.borderColor, borderThickness: this.borderThickness, backgroundColor: this.backgroundColor, maxWidth: this.maxWidth, + maxHeight: f, cornerRadius: this.cornerRadius, text: this.text, padding: this.padding, textBaseline: "top"}), k = f.measureText(); + "top" === this.verticalAlign || "bottom" === this.verticalAlign ? ("top" === this.verticalAlign ? (d = c.y1 + 2, q = "top") : "bottom" === this.verticalAlign && (d = c.y2 - 2 - k.height, q = "bottom"), "left" === this.horizontalAlign ? b = c.x1 + 2 : "center" === this.horizontalAlign ? b = c.x1 + c.width / 2 - k.width / 2 : "right" === this.horizontalAlign && (b = c.x2 - 2 - k.width - g), h = this.horizontalAlign, this.width = k.width, this.height = k.height) : "center" === + this.verticalAlign && ("left" === this.horizontalAlign ? (b = c.x1 + 2, d = c.y2 - 2 - (this.maxWidth / 2 - k.width / 2), e = -90, q = "left", this.width = k.height, this.height = k.width) : "right" === this.horizontalAlign ? (b = c.x2 - 2, d = c.y1 + 2 + (this.maxWidth / 2 - k.width / 2), e = 90, q = "right", this.width = k.height, this.height = k.width) : "center" === this.horizontalAlign && (d = a.y1 + (a.height / 2 - k.height / 2), b = a.x1 + (a.width / 2 - k.width / 2), q = "center", this.width = k.width, this.height = k.height), h = "center"); + f.x = b; + f.y = d; + f.angle = e; + f.horizontalAlign = h; + f.render(!0); + a.layoutManager.registerSpace(q, {width: this.width + ("left" === q || "right" === q ? this.margin + 2 : 0), height: this.height + ("top" === q || "bottom" === q ? this.margin + 2 : 0)}); + this.bounds = {x1: b, y1: d, x2: b + this.width, y2: d + this.height}; + this.ctx.textBaseline = "top" + } + }; + T(na, L); + na.prototype.render = ga.prototype.render; + T(oa, L); + oa.prototype.render = function () { + var a = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, c = a.layoutManager.getFreeSpace(), b = null, d = 0, e = 0, f = 0, g = 0, h = this.chart._options.legend && !x(this.chart._options.legend.markerMargin) ? + this.chart._options.legend.markerMargin : 0.3 * this.fontSize, q = [], k = []; + "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (this.orientation = "horizontal", b = this.verticalAlign, f = null !== this.maxWidth ? this.maxWidth : 0.7 * c.width, g = null !== this.maxHeight ? this.maxHeight : 0.5 * c.height) : "center" === this.verticalAlign && (this.orientation = "vertical", b = this.horizontalAlign, f = null !== this.maxWidth ? this.maxWidth : 0.5 * c.width, g = null !== this.maxHeight ? this.maxHeight : 0.7 * c.height); + for (var n = 0; n < this.dataSeries.length; n++) { + var m = + this.dataSeries[n]; + if ("pie" !== m.type && "doughnut" !== m.type && "funnel" !== m.type) { + var l = m.legendMarkerType ? m.legendMarkerType : "line" !== m.type && "stepLine" !== m.type && "spline" !== m.type && "scatter" !== m.type && "bubble" !== m.type || !m.markerType ? Y.getDefaultLegendMarker(m.type) : m.markerType, p = m.legendText ? m.legendText : this.itemTextFormatter ? this.itemTextFormatter({chart: this.chart._publicChartReference, legend: this._options, dataSeries: m, dataPoint: null}) : m.name, r = m.legendMarkerColor ? m.legendMarkerColor : m.markerColor ? + m.markerColor : m._colorSet[0], t = m.markerSize || "line" !== m.type && "stepLine" !== m.type && "spline" !== m.type ? 0.75 * this.lineHeight : 0, u = m.legendMarkerBorderColor ? m.legendMarkerBorderColor : m.markerBorderColor, s = m.legendMarkerBorderThickness ? m.legendMarkerBorderThickness : m.markerBorderThickness ? Math.max(1, Math.round(0.2 * t)) : 0, p = this.chart.replaceKeywordsWithValue(p, m.dataPoints[0], m, n), l = {markerType: l, markerColor: r, text: p, textBlock: null, chartType: m.type, markerSize: t, lineColor: m._colorSet[0], dataSeriesIndex: m.index, + dataPointIndex: null, markerBorderColor: u, markerBorderThickness: s}; + q.push(l) + } else + for (var v = 0; v < m.dataPoints.length; v++) { + var w = m.dataPoints[v], l = w.legendMarkerType ? w.legendMarkerType : m.legendMarkerType ? m.legendMarkerType : Y.getDefaultLegendMarker(m.type), p = w.legendText ? w.legendText : m.legendText ? m.legendText : this.itemTextFormatter ? this.itemTextFormatter({chart: this.chart._publicChartReference, legend: this._options, dataSeries: m, dataPoint: w}) : w.name ? w.name : "DataPoint: " + (v + 1), r = w.legendMarkerColor ? w.legendMarkerColor : + m.legendMarkerColor ? m.legendMarkerColor : w.color ? w.color : m.color ? m.color : m._colorSet[v % m._colorSet.length], t = 0.75 * this.lineHeight, u = w.legendMarkerBorderColor ? w.legendMarkerBorderColor : m.legendMarkerBorderColor ? m.legendMarkerBorderColor : w.markerBorderColor ? w.markerBorderColor : m.markerBorderColor, s = w.legendMarkerBorderThickness ? w.legendMarkerBorderThickness : m.legendMarkerBorderThickness ? m.legendMarkerBorderThickness : w.markerBorderThickness || m.markerBorderThickness ? Math.max(1, Math.round(0.2 * t)) : 0, p = this.chart.replaceKeywordsWithValue(p, + w, m, v), l = {markerType: l, markerColor: r, text: p, textBlock: null, chartType: m.type, markerSize: t, dataSeriesIndex: n, dataPointIndex: v, markerBorderColor: u, markerBorderThickness: s}; + (w.showInLegend || m.showInLegend && !1 !== w.showInLegend) && q.push(l) + } + } + !0 === this.reversed && q.reverse(); + if (0 < q.length) { + m = null; + v = p = w = 0; + p = null !== this.itemWidth ? null !== this.itemMaxWidth ? Math.min(this.itemWidth, this.itemMaxWidth, f) : Math.min(this.itemWidth, f) : null !== this.itemMaxWidth ? Math.min(this.itemMaxWidth, f) : f; + t = 0 === t ? 0.75 * this.lineHeight : + t; + p -= t + h; + for (n = 0; n < q.length; n++) { + l = q[n]; + if ("line" === l.chartType || "spline" === l.chartType || "stepLine" === l.chartType) + p -= 2 * 0.1 * this.lineHeight; + if (!(0 >= g || "undefined" === typeof g || 0 >= p || "undefined" === typeof p)) { + if ("horizontal" === this.orientation) { + l.textBlock = new O(this.ctx, {x: 0, y: 0, maxWidth: p, maxHeight: this.itemWrap ? g : this.lineHeight, angle: 0, text: l.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, textBaseline: "middle"}); + l.textBlock.measureText(); + null !== this.itemWidth && (l.textBlock.width = this.itemWidth - (t + h + ("line" === l.chartType || "spline" === l.chartType || "stepLine" === l.chartType ? 2 * 0.1 * this.lineHeight : 0))); + if (!m || m.width + Math.round(l.textBlock.width + t + h + (0 === m.width ? 0 : this.horizontalSpacing) + ("line" === l.chartType || "spline" === l.chartType || "stepLine" === l.chartType ? 2 * 0.1 * this.lineHeight : 0)) > f) + m = {items: [], width: 0}, k.push(m), this.height += v, v = 0; + v = Math.max(v, l.textBlock.height) + } else + l.textBlock = new O(this.ctx, {x: 0, y: 0, maxWidth: p, + maxHeight: !0 === this.itemWrap ? g : 1.5 * this.fontSize, angle: 0, text: l.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, textBaseline: "middle"}), l.textBlock.measureText(), null !== this.itemWidth && (l.textBlock.width = this.itemWidth - (t + h + ("line" === l.chartType || "spline" === l.chartType || "stepLine" === l.chartType ? 2 * 0.1 * this.lineHeight : 0))), this.height < g - this.lineHeight ? (m = {items: [], width: 0}, k.push(m)) : (m = k[w], + w = (w + 1) % k.length), this.height += l.textBlock.height; + l.textBlock.x = m.width; + l.textBlock.y = 0; + m.width += Math.round(l.textBlock.width + t + h + (0 === m.width ? 0 : this.horizontalSpacing) + ("line" === l.chartType || "spline" === l.chartType || "stepLine" === l.chartType ? 2 * 0.1 * this.lineHeight : 0)); + m.items.push(l); + this.width = Math.max(m.width, this.width) + } + } + this.height = !1 === this.itemWrap ? k.length * this.lineHeight : this.height + v; + this.height = Math.min(g, this.height); + this.width = Math.min(f, this.width) + } + "top" === this.verticalAlign ? (e = "left" === + this.horizontalAlign ? c.x1 : "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y1) : "center" === this.verticalAlign ? (e = "left" === this.horizontalAlign ? c.x1 : "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y1 + c.height / 2 - this.height / 2) : "bottom" === this.verticalAlign && (e = "left" === this.horizontalAlign ? c.x1 : "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y2 - this.height); + this.items = q; + for (n = 0; n < this.items.length; n++) + l = q[n], + l.id = ++this.chart._eventManager.lastObjectId, this.chart._eventManager.objectMap[l.id] = {id: l.id, objectType: "legendItem", legendItemIndex: n, dataSeriesIndex: l.dataSeriesIndex, dataPointIndex: l.dataPointIndex}; + for (n = c = 0; n < k.length; n++) { + m = k[n]; + for (w = v = 0; w < m.items.length; w++) { + l = m.items[w]; + r = l.textBlock.x + e + (0 === w ? 0.2 * t : this.horizontalSpacing); + u = d + c; + p = r; + this.chart.data[l.dataSeriesIndex].visible || (this.ctx.globalAlpha = 0.5); + this.ctx.save(); + this.ctx.rect(e, d, f, Math.max(g - g % this.lineHeight, d)); + this.ctx.clip(); + if ("line" === l.chartType || "stepLine" === l.chartType || "spline" === l.chartType) + this.ctx.strokeStyle = l.lineColor, this.ctx.lineWidth = Math.ceil(this.lineHeight / 8), this.ctx.beginPath(), this.ctx.moveTo(r - 0.1 * this.lineHeight, u + this.lineHeight / 2), this.ctx.lineTo(r + 0.85 * this.lineHeight, u + this.lineHeight / 2), this.ctx.stroke(), p -= 0.1 * this.lineHeight; + P.drawMarker(r + t / 2, u + this.lineHeight / 2, this.ctx, l.markerType, l.markerSize, l.markerColor, l.markerBorderColor, l.markerBorderThickness); + l.textBlock.x = r + h + t; + if ("line" === + l.chartType || "stepLine" === l.chartType || "spline" === l.chartType) + l.textBlock.x += 0.1 * this.lineHeight; + l.textBlock.y = Math.round(u + this.lineHeight / 2); + l.textBlock.render(!0); + this.ctx.restore(); + v = 0 < w ? Math.max(v, l.textBlock.height) : l.textBlock.height; + this.chart.data[l.dataSeriesIndex].visible || (this.ctx.globalAlpha = 1); + r = C(l.id); + this.ghostCtx.fillStyle = r; + this.ghostCtx.beginPath(); + this.ghostCtx.fillRect(p, l.textBlock.y - this.lineHeight / 2, l.textBlock.x + l.textBlock.width - p, l.textBlock.height); + l.x1 = this.chart._eventManager.objectMap[l.id].x1 = + p; + l.y1 = this.chart._eventManager.objectMap[l.id].y1 = l.textBlock.y - this.lineHeight / 2; + l.x2 = this.chart._eventManager.objectMap[l.id].x2 = l.textBlock.x + l.textBlock.width; + l.y2 = this.chart._eventManager.objectMap[l.id].y2 = l.textBlock.y + l.textBlock.height - this.lineHeight / 2 + } + c += v + } + 0 < q.length && a.layoutManager.registerSpace(b, {width: this.width + 2 + 2, height: this.height + 5 + 5}); + this.bounds = {x1: e, y1: d, x2: e + this.width, y2: d + this.height} + }; + T(ua, L); + ua.prototype.render = function () { + var a = this.chart.layoutManager.getFreeSpace(); + this.ctx.fillStyle = "red"; + this.ctx.fillRect(a.x1, a.y1, a.x2, a.y2) + }; + T(Y, L); + Y.prototype.getDefaultAxisPlacement = function () { + var a = this.type; + if ("column" === a || "line" === a || "stepLine" === a || "spline" === a || "area" === a || "stepArea" === a || "splineArea" === a || "stackedColumn" === a || "stackedLine" === a || "bubble" === a || "scatter" === a || "stackedArea" === a || "stackedColumn100" === a || "stackedLine100" === a || "stackedArea100" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeArea" === a || "rangeSplineArea" === a) + return"normal"; + if ("bar" === + a || "stackedBar" === a || "stackedBar100" === a || "rangeBar" === a) + return"xySwapped"; + if ("pie" === a || "doughnut" === a || "funnel" === a) + return"none"; + window.console.log("Unknown Chart Type: " + a); + return null + }; + Y.getDefaultLegendMarker = function (a) { + if ("column" === a || "stackedColumn" === a || "stackedLine" === a || "bar" === a || "stackedBar" === a || "stackedBar100" === a || "bubble" === a || "scatter" === a || "stackedColumn100" === a || "stackedLine100" === a || "stepArea" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeBar" === a || "rangeArea" === + a || "rangeSplineArea" === a) + return"square"; + if ("line" === a || "stepLine" === a || "spline" === a || "pie" === a || "doughnut" === a || "funnel" === a) + return"circle"; + if ("area" === a || "splineArea" === a || "stackedArea" === a || "stackedArea100" === a) + return"triangle"; + window.console.log("Unknown Chart Type: " + a); + return null + }; + Y.prototype.getDataPointAtX = function (a, c) { + if (!this.dataPoints || 0 === this.dataPoints.length) + return null; + var b = {dataPoint: null, distance: Infinity, index: NaN}, d = null, e = 0, f = 0, g = 1, h = Infinity, q = 0, k = 0, n = 0; + "none" !== this.chart.plotInfo.axisPlacement && + (n = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, n = 0 < n ? Math.min(Math.max((this.dataPoints.length - 1) / n * (a - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0); + for (; ; ) { + f = 0 < g ? n + e : n - e; + if (0 <= f && f < this.dataPoints.length) { + var d = this.dataPoints[f], m = Math.abs(d.x - a); + m < b.distance && (b.dataPoint = d, b.distance = m, b.index = f); + d = Math.abs(d.x - a); + d <= h ? h = d : 0 < g ? q++ : k++; + if (1E3 < q && 1E3 < k) + break + } else if (0 > n - e && n + e >= this.dataPoints.length) + break; + -1 === g ? (e++, g = 1) : g = -1 + } + return c || b.dataPoint.x !== a ? c && null !== + b.dataPoint ? b : null : b + }; + Y.prototype.getDataPointAtXY = function (a, c, b) { + if (!this.dataPoints || 0 === this.dataPoints.length || a < this.chart.plotArea.x1 || a > this.chart.plotArea.x2 || c < this.chart.plotArea.y1 || c > this.chart.plotArea.y2) + return null; + b = b || !1; + var d = [], e = 0, f = 0, g = 1, h = !1, q = Infinity, k = 0, n = 0, m = 0; + "none" !== this.chart.plotInfo.axisPlacement && (m = this.chart.axisX.getXValueAt({x: a, y: c}), f = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, m = 0 < f ? Math.min(Math.max((this.dataPoints.length - 1) / f * (m - this.dataPoints[0].x) >> + 0, 0), this.dataPoints.length) : 0); + for (; ; ) { + f = 0 < g ? m + e : m - e; + if (0 <= f && f < this.dataPoints.length) { + var l = this.chart._eventManager.objectMap[this.dataPointIds[f]], p = this.dataPoints[f], r = null; + if (l) { + switch (this.type) { + case "column": + case "stackedColumn": + case "stackedColumn100": + case "bar": + case "stackedBar": + case "stackedBar100": + case "rangeColumn": + case "rangeBar": + a >= l.x1 && (a <= l.x2 && c >= l.y1 && c <= l.y2) && (d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: Math.min(Math.abs(l.x1 - a), Math.abs(l.x2 - a), Math.abs(l.y1 - + c), Math.abs(l.y2 - c))}), h = !0); + break; + case "line": + case "stepLine": + case "spline": + case "area": + case "stepArea": + case "stackedArea": + case "stackedArea100": + case "splineArea": + case "scatter": + var t = R("markerSize", p, this) || 4, u = b ? 20 : t, r = Math.sqrt(Math.pow(l.x1 - a, 2) + Math.pow(l.y1 - c, 2)); + r <= u && d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: r}); + f = Math.abs(l.x1 - a); + f <= q ? q = f : 0 < g ? k++ : n++; + r <= t / 2 && (h = !0); + break; + case "rangeArea": + case "rangeSplineArea": + t = R("markerSize", p, this) || 4; + u = b ? 20 : t; + r = Math.min(Math.sqrt(Math.pow(l.x1 - + a, 2) + Math.pow(l.y1 - c, 2)), Math.sqrt(Math.pow(l.x1 - a, 2) + Math.pow(l.y2 - c, 2))); + r <= u && d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: r}); + f = Math.abs(l.x1 - a); + f <= q ? q = f : 0 < g ? k++ : n++; + r <= t / 2 && (h = !0); + break; + case "bubble": + t = l.size; + r = Math.sqrt(Math.pow(l.x1 - a, 2) + Math.pow(l.y1 - c, 2)); + r <= t / 2 && (d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: r}), h = !0); + break; + case "pie": + case "doughnut": + t = l.center; + u = "doughnut" === this.type ? l.percentInnerRadius * l.radius : 0; + r = Math.sqrt(Math.pow(t.x - a, 2) + Math.pow(t.y - + c, 2)); + r < l.radius && r > u && (r = Math.atan2(c - t.y, a - t.x), 0 > r && (r += 2 * Math.PI), r = Number(((180 * (r / Math.PI) % 360 + 360) % 360).toFixed(12)), t = Number(((180 * (l.startAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), u = Number(((180 * (l.endAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), 0 === u && 1 < l.endAngle && (u = 360), t >= u && 0 !== p.y && (u += 360, r < t && (r += 360)), r > t && r < u && (d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: 0}), h = !0)); + break; + case "candlestick": + if (a >= l.x1 - l.borderThickness / 2 && a <= l.x2 + l.borderThickness / 2 && c >= l.y2 - l.borderThickness / + 2 && c <= l.y3 + l.borderThickness / 2 || Math.abs(l.x2 - a + l.x1 - a) < l.borderThickness && c >= l.y1 && c <= l.y4) + d.push({dataPoint: p, dataPointIndex: f, dataSeries: this, distance: Math.min(Math.abs(l.x1 - a), Math.abs(l.x2 - a), Math.abs(l.y2 - c), Math.abs(l.y3 - c))}), h = !0; + break; + case "ohlc": + if (Math.abs(l.x2 - a + l.x1 - a) < l.borderThickness && c >= l.y2 && c <= l.y3 || a >= l.x1 && a <= (l.x2 + l.x1) / 2 && c >= l.y1 - l.borderThickness / 2 && c <= l.y1 + l.borderThickness / 2 || a >= (l.x1 + l.x2) / 2 && a <= l.x2 && c >= l.y4 - l.borderThickness / 2 && c <= l.y4 + l.borderThickness / 2) + d.push({dataPoint: p, + dataPointIndex: f, dataSeries: this, distance: Math.min(Math.abs(l.x1 - a), Math.abs(l.x2 - a), Math.abs(l.y2 - c), Math.abs(l.y3 - c))}), h = !0 + } + if (h || 1E3 < k && 1E3 < n) + break + } + } else if (0 > m - e && m + e >= this.dataPoints.length) + break; + -1 === g ? (e++, g = 1) : g = -1 + } + a = null; + for (c = 0; c < d.length; c++) + a ? d[c].distance <= a.distance && (a = d[c]) : a = d[c]; + return a + }; + Y.prototype.getMarkerProperties = function (a, c, b, d) { + var e = this.dataPoints; + return{x: c, y: b, ctx: d, type: e[a].markerType ? e[a].markerType : this.markerType, size: e[a].markerSize ? e[a].markerSize : this.markerSize, + color: e[a].markerColor ? e[a].markerColor : this.markerColor ? this.markerColor : e[a].color ? e[a].color : this.color ? this.color : this._colorSet[a % this._colorSet.length], borderColor: e[a].markerBorderColor ? e[a].markerBorderColor : this.markerBorderColor ? this.markerBorderColor : null, borderThickness: e[a].markerBorderThickness ? e[a].markerBorderThickness : this.markerBorderThickness ? this.markerBorderThickness : null} + }; + T(F, L); + F.prototype.createLabels = function () { + var a, c, b = 0, b = 0, d, e = 0, f = 0, g = 0, h = 0, q = 0; + if ("bottom" === this._position || + "top" === this._position) + q = this.lineCoordinates.width / Math.abs(this.viewportMaximum - this.viewportMinimum) * E[this.intervalType + "Duration"] * this.interval, e = "undefined" === typeof this._options.labelMaxWidth ? 0.5 * this.chart.width >> 0 : this._options.labelMaxWidth, this.chart.panEnabled || (g = "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) + q = this.lineCoordinates.height / Math.abs(this.viewportMaximum - + this.viewportMinimum) * E[this.intervalType + "Duration"] * this.interval, this.chart.panEnabled || (e = "undefined" === typeof this._options.labelMaxWidth ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth), g = "undefined" === typeof this._options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize; + if ("axisX" === this.type && "dateTime" === this.chart.plotInfo.axisXValueType) + for (this.intervalStartPosition = this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval), d = za(new Date(this.viewportMaximum), + this.interval, this.intervalType), b = this.intervalStartPosition; b < d; za(b, this.interval, this.intervalType)) + a = b.getTime(), a = this.labelFormatter ? this.labelFormatter({chart: this.chart._publicChartReference, axis: this._options, value: b, label: this.labels[b] ? this.labels[b] : null}) : "axisX" === this.type && this.labels[a] ? this.labels[a] : wa(b, this.valueFormatString, this.chart._cultureInfo), a = new O(this.ctx, {x: 0, y: 0, maxWidth: e, maxHeight: g, 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: b.getTime(), textBlock: a, effectiveHeight: null}); + else { + d = this.viewportMaximum; + if (this.labels && this.labels.length) { + a = Math.ceil(this.interval); + for (var k = Math.ceil(this.intervalStartPosition), f = !1, b = k; b < this.viewportMaximum; b += a) + if (this.labels[b]) + f = !0; + else { + f = !1; + break + } + f && (this.interval = a, this.intervalStartPosition = k) + } + for (b = this.intervalStartPosition; b <= + d; b = parseFloat((b + this.interval).toFixed(14))) + a = this.labelFormatter ? this.labelFormatter({chart: this.chart._publicChartReference, axis: this._options, value: b, label: this.labels[b] ? this.labels[b] : null}) : "axisX" === this.type && this.labels[b] ? this.labels[b] : ba(b, this.valueFormatString, this.chart._cultureInfo), a = new O(this.ctx, {x: 0, y: 0, maxWidth: e, maxHeight: g, 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", borderThickness: 0}), this._labels.push({position: b, textBlock: a, effectiveHeight: null}) + } + d = []; + f = []; + if (this.labelAutoFit || this._options.labelAutoFit) + if ("bottom" === this._position || "top" === this._position) + if (h = 0, e = 0.9 * q >> 0, x(this.labelAngle) || (this.labelAngle = (this.labelAngle % 360 + 360) % 360, 90 < this.labelAngle && 270 >= this.labelAngle ? this.labelAngle -= 180 : 270 < this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360)), !this.chart.panEnabled && + 1 <= this._labels.length) { + this.sessionVariables.labelFontSize = this.labelFontSize; + this.sessionVariables.labelMaxWidth = e; + this.sessionVariables.labelMaxHeight = g; + this.sessionVariables.labelAngle = this.labelAngle; + this.sessionVariables.labelWrap = !0; + for (b = 0; b < this._labels.length; b++) + (a = this._labels[b].textBlock, k = a.measureText(), b < this._labels.length - 1 && (h = b + 1, c = this._labels[h].textBlock, c = c.measureText()), d.push(a.height), this.sessionVariables.labelMaxHeight = Math.max.apply(Math, d), f = e * Math.cos(Math.PI / 180 * + Math.abs(this.labelAngle)) + (g - a.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), h = e * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (g - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), x(this._options.labelAngle) && isNaN(this._options.labelAngle) && 0 !== this._options.labelAngle) ? (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? g : Math.min((h - e * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), h), x(this._options.labelWrap)) ? + x(this._options.labelWrap) && (x(this._options.labelMaxWidth) ? x(c) || (k.width + c.width >> 0 >= 2 * e && k.width + c.width >> 0 < 2.4 * e ? (k = this.labelFontSize, this.sessionVariables.labelMaxWidth = 1.2 * e, x(this._options.labelFontSize) && 12 < k && (k = Math.floor(12 / 13 * k), a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? k : this._options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : k.width + c.width >> 0 >= 2.4 * e && k.width + c.width < 2.8 * e ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = + 2.5 * e, this.sessionVariables.labelFontSize = this.labelFontSize) : k.width + c.width >> 0 >= 2.8 * e && k.width + c.width < 3.2 * e ? (this.sessionVariables.labelMaxWidth = 1.2 * e, this.sessionVariables.labelWrap = !0, x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : k.width + c.width >> 0 >= + 3.2 * e && k.width + c.width < 3.6 * e ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = 2.5 * e, this.sessionVariables.labelFontSize = this.labelFontSize) : k.width + c.width > 3.6 * e && k.width + c.width < 5 * e ? (x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize, this.sessionVariables.labelWrap = + !0, this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelWrap = !0) : k.width + c.width > 5 * e && (this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelFontSize = this.labelFontSize, this.sessionVariables.labelMaxHeight = g, this.sessionVariables.labelAngle = this.labelAngle)) : this._options.labelMaxWidth < e ? (this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth, this.sessionVariables.labelMaxHeight = h) : + (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = x(this._options.labelMaxWidth) ? e : this._options.labelMaxWidth > 0.3 * this.chart.width >> 0 ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth, this.sessionVariables.labelMaxHeight = 2.5 * this.labelFontSize)) : this._options.labelWrap ? (this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth : e, this.sessionVariables.labelAngle = this._options.labelMaxWidth > e ? -25 : this.sessionVariables.labelAngle, this.sessionVariables.labelMaxHeight = + h) : x(this._options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = g) : (this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth : e, this.sessionVariables.labelAngle = this._options.labelMaxWidth > e ? -25 : this.sessionVariables.labelAngle, this.sessionVariables.labelMaxHeight = g, this.sessionVariables.labelWrap = this.labelWrap) : (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxHeight = + 0 === this.labelAngle ? g : Math.min((h - e * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), h), x(this._options.labelWrap)) ? x(this._options.labelWrap) && (this.labelWrap && !x(this._options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * this.chart.height >> 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : e, this.sessionVariables.labelMaxHeight = g) : + (this.sessionVariables.labelMaxWidth = f > 0.5 * this.chart.height ? 0.5 * this.chart.height : f, this.sessionVariables.labelMaxHeight = h < 0.9 * q ? 0.9 * q : h < this.labelFontSize ? 2.5 * this.labelFontSize : h - this.labelFontSize, this.sessionVariables.labelWrap = this.labelWrap, x(this._options.labelMaxWidth) && (this.sessionVariables.labelAngle = this.labelAngle))) : (this._options.labelWrap ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * + this.chart.height >> 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : e) : (x(this._options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * this.chart.height >> 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : f, this.sessionVariables.labelWrap = this.labelWrap), this.sessionVariables.labelMaxHeight = g); + for (b = 0; b < this._labels.length; b++) + a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = + this.labelFontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText() + } else + for (b = 0; b < this._labels.length; b++) + a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = x(this._options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth : this._options.labelMaxWidth, a.fontSize = this.labelFontSize = x(this._options.labelFontSize) ? this.sessionVariables.labelFontSize : + this._options.labelFontSize, a.angle = this.labelAngle = x(this._options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = x(this._options.labelWrap) ? this.sessionVariables.labelWrap : this._options.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText(); + else if ("left" === this._position || "right" === this._position) + if (e = x(this._options.labelMaxWidth) ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth, x(this.labelAngle) || (this.labelAngle = (this.labelAngle % 360 + + 360) % 360, 90 < this.labelAngle && 270 >= this.labelAngle ? this.labelAngle -= 180 : 270 < this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360)), !this.chart.panEnabled && 1 <= this._labels.length) { + this.sessionVariables.labelFontSize = this.labelFontSize; + this.sessionVariables.labelMaxWidth = e; + this.sessionVariables.labelMaxHeight = g; + this.sessionVariables.labelAngle = x(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle; + this.sessionVariables.labelWrap = !0; + for (b = 0; b < this._labels.length; b++) + (a = this._labels[b].textBlock, + k = a.measureText(), b < this._labels.length - 1 && (h = b + 1, c = this._labels[h].textBlock, c = c.measureText()), f.push(a.height), this.sessionVariables.labelMaxHeight = Math.max.apply(Math, f), h = e * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (g - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), x(this._options.labelAngle) && isNaN(this._options.labelAngle) && 0 !== this._options.labelAngle) ? x(this._options.labelWrap) ? + x(this._options.labelWrap) && (x(this._options.labelMaxWidth) ? x(c) || (k.height + c.height >> 0 >= 2 * this.labelMaxHeight && k.height + c.height >> 0 < 2.4 * this.labelMaxHeight ? (x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelMaxHeight = this.labelMaxHeight, this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize) : k.height + c.height >> 0 >= 2.4 * this.labelMaxHeight && + k.height + c.height < 2.8 * this.labelMaxHeight ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelFontSize = this.labelFontSize, this.sessionVariables.labelWrap = !0) : k.height + c.height >> 0 >= 2.8 * this.labelMaxHeight && k.height + c.height < 3.2 * this.labelMaxHeight ? (this.sessionVariables.labelMaxHeight = this.labelMaxHeight, this.sessionVariables.labelWrap = !0, x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), + a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize, this.sessionVariables.labelAngle = x(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : k.height + c.height >> 0 >= 3.2 * this.labelMaxHeight && k.height + c.height < 3.6 * this.labelMaxHeight ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelFontSize = this.labelFontSize) : k.height + + c.height > 3.6 * this.labelMaxHeight && k.height + c.height < 10 * this.labelMaxHeight ? (x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize, this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelMaxHeight = this.labelMaxHeight, this.sessionVariables.labelAngle = x(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : + k.height + c.height > 10 * this.labelMaxHeight && k.height + c.height < 50 * this.labelMaxHeight && (x(this._options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = x(this._options.labelFontSize) ? this.labelFontSize : this._options.labelFontSize, this.sessionVariables.labelMaxHeight = this.labelMaxHeight, this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelAngle = x(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle)) : + this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth < e ? this._options.labelMaxWidth : this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.3 * this.chart.width >> 0 ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth : this.sessionVariables.labelMaxWidth) : this._options.labelWrap ? this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.3 * this.chart.width >> 0 ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth : this.sessionVariables.labelMaxWidth : this._options.labelMaxWidth ? + this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.3 * this.chart.width >> 0 ? 0.3 * this.chart.width >> 0 : this._options.labelMaxWidth : this.sessionVariables.labelMaxWidth : (this.sessionVariables.labelMaxWidth = e, this.sessionVariables.labelAngle = -25) : (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxWidth = 0 === this.labelAngle ? e : Math.min((h - g * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), g), + x(this._options.labelWrap)) ? x(this._options.labelWrap) && (this.labelWrap && !x(this._options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * this.chart.height >> 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = h) : (this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * this.chart.height >> + 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : e, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? g : h, x(this._options.labelMaxWidth) && (this.sessionVariables.labelAngle = this.labelAngle))) : this._options.labelWrap ? (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? g : h, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = e) : (x(this._options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this._options.labelMaxWidth ? this._options.labelMaxWidth > 0.8 * + this.chart.height >> 0 ? 0.8 * this.chart.height >> 0 : this._options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap); + for (b = 0; b < this._labels.length; b++) + a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.labelFontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, + a.measureText() + } else + for (b = 0; b < this._labels.length; b++) + a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = x(this._options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth : this._options.labelMaxWidth, a.fontSize = this.labelFontSize = x(this._options.labelFontSize) ? this.sessionVariables.labelFontSize : this._options.labelFontSize, a.angle = this.labelAngle = x(this._options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = x(this._options.labelWrap) ? this.sessionVariables.labelWrap : + this._options.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText(); + for (b = 0; b < this.stripLines.length; b++) + c = this.stripLines[b], e = "bottom" === this._position || "top" === this._position ? 0.9 * this.chart.width >> 0 : 0.9 * this.chart.height >> 0, a = new O(this.ctx, {x: 0, y: 0, backgroundColor: "outside" === c.labelPlacement ? c._options.labelBackgroundColor ? c._options.labelBackgroundColor : "#EEEEEE" : c.startValue ? "#EEEEEE" : c.labelBackgroundColor, maxWidth: c._options.labelMaxWidth ? c._options.labelMaxWidth : e, maxHeight: "undefined" === + typeof c._options.labelWrap || c.labelWrap ? e : 1.5 * this.labelFontSize, angle: this.labelAngle, text: c.labelFormatter ? c.labelFormatter({chart: this.chart._publicChartReference, axis: this, stripLine: c}) : c.label, horizontalAlign: "left", fontSize: "outside" === c.labelPlacement ? c._options.labelFontSize ? c._options.labelFontSize : this.labelFontSize : c.labelFontSize, fontFamily: "outside" === c.labelPlacement ? c._options.labelFontFamily ? c._options.labelFontFamily : this.labelFontFamily : c.labelFontFamily, fontWeight: "outside" === + c.labelPlacement ? c._options.fontWeight ? c._options.fontWeight : this.fontWeight : c.fontWeight, fontColor: c._options.labelFontColor || c.labelFontColor, fontStyle: "outside" === c.labelPlacement ? c._options.fontStyle ? c._options.fontStyle : this.fontWeight : c.fontStyle, textBaseline: "middle", borderThickness: 0}), this._stripLineLabels.push({position: c.value, textBlock: a, effectiveHeight: null, stripLine: c}) + }; + F.prototype.createLabelsAndCalculateWidth = function () { + var a = 0, c = 0; + this._labels = []; + this._stripLineLabels = []; + if ("left" === + this._position || "right" === this._position) { + this.createLabels(); + for (c = 0; c < this._labels.length; c++) { + var b = this._labels[c].textBlock, d = b.measureText(), e = 0, e = 0 === this.labelAngle ? d.width : d.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)); + a < e && (a = e); + this._labels[c].effectiveWidth = e + } + for (c = 0; c < this._stripLineLabels.length; c++) + "outside" === this._stripLineLabels[c].stripLine.labelPlacement && (b = this._stripLineLabels[c].textBlock, d = b.measureText(), + e = 0 === this.labelAngle ? d.width : d.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), a < e && (a = e), this._stripLineLabels[c].effectiveWidth = e) + } + return(this.title ? this._titleTextBlock.measureText().height + 2 : 0) + a + this.tickLength + 5 + }; + F.prototype.createLabelsAndCalculateHeight = function () { + var a = 0; + this._labels = []; + this._stripLineLabels = []; + var c, b = 0; + this.createLabels(); + if ("bottom" === this._position || "top" === this._position) { + for (b = 0; b < this._labels.length; b++) { + c = + this._labels[b].textBlock; + var d = c.measureText(), e = 0, e = 0 === this.labelAngle ? d.height : d.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - c.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)); + a < e && (a = e); + this._labels[b].effectiveHeight = e + } + for (b = 0; b < this._stripLineLabels.length; b++) + "outside" === this._stripLineLabels[b].stripLine.labelPlacement && (c = this._stripLineLabels[b].textBlock, d = c.measureText(), e = 0 === this.labelAngle ? d.height : d.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + + (d.height - c.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), a < e && (a = e), this._labels[b].effectiveHeight = e) + } + return(this.title ? this._titleTextBlock.measureText().height + 2 : 0) + a + this.tickLength + 5 + }; + F.setLayoutAndRender = function (a, c, b, d, e) { + var f, g, h, q = a.chart, k = q.ctx; + a.calculateAxisParameters(); + c && c.calculateAxisParameters(); + b && b.calculateAxisParameters(); + var n = c ? c.margin : 0, m = b ? b.margin : 0, l = 0, p = 0, r = 0, t, u, s, v, w, B, C = 0, A = 0, D, E, I; + D = E = I = !1; + a && a.title && (a._titleTextBlock = new O(a.ctx, {text: a.title, + horizontalAlign: "center", fontSize: a.titleFontSize, fontFamily: a.titleFontFamily, fontWeight: a.titleFontWeight, fontColor: a.titleFontColor, fontStyle: a.titleFontStyle, textBaseline: "top"})); + c && c.title && (c._titleTextBlock = new O(c.ctx, {text: c.title, horizontalAlign: "center", fontSize: c.titleFontSize, fontFamily: c.titleFontFamily, fontWeight: c.titleFontWeight, fontColor: c.titleFontColor, fontStyle: c.titleFontStyle, textBaseline: "top"})); + b && b.title && (b._titleTextBlock = new O(b.ctx, {text: b.title, horizontalAlign: "center", + fontSize: b.titleFontSize, fontFamily: b.titleFontFamily, fontWeight: b.titleFontWeight, fontColor: b.titleFontColor, fontStyle: b.titleFontStyle, textBaseline: "top"})); + if ("normal" === d) { + var G = [], F = [], J = []; + a && a.title && (a._titleTextBlock.maxWidth = a.titleMaxWidth || e.width, a._titleTextBlock.maxHeight = a.titleWrap ? 0.8 * e.height : 1.5 * a.titleFontSize, a._titleTextBlock.angle = 0); + c && c.title && (c._titleTextBlock.maxWidth = c.titleMaxWidth || e.height, c._titleTextBlock.maxHeight = c.titleWrap ? 0.8 * e.width : 1.5 * c.titleFontSize, c._titleTextBlock.angle = + -90); + b && b.title && (b._titleTextBlock.maxWidth = b.titleMaxWidth || e.height, b._titleTextBlock.maxHeight = b.titleWrap ? 0.8 * e.width : 1.5 * b.titleFontSize, b._titleTextBlock.angle = 90); + for (; 4 > l++; ) { + a.lineCoordinates = {}; + t = Math.ceil(c ? c.createLabelsAndCalculateWidth() : 0); + F.push(t); + f = Math.round(e.x1 + t + n); + u = Math.ceil(b ? b.createLabelsAndCalculateWidth() : 0); + J.push(u); + g = Math.round(e.x2 - u - m > a.chart.width - 10 ? a.chart.width - 10 : e.x2 - u - m); + !a.labelAutoFit || (x(w) || x(B)) || (0 < a.labelAngle ? B + r > g && (C += 0 < a.labelAngle ? B + r - g - u : 0) : 0 > + a.labelAngle ? w - p < f && w - p < a.viewportMinimum && (A = f - (n + a.tickLength + t + w - p + a.labelFontSize / 2)) : 0 === a.labelAngle && (B + r > g && (C = B + r / 2 - g - u), w - p < f && w - p < a.viewportMinimum && (A = f - n - a.tickLength - t - w + p / 2)), a.viewportMaximum === a.maximum && a.viewportMinimum === a.minimum && 0 < a.labelAngle && 0 < C ? g -= C : a.viewportMaximum === a.maximum && a.viewportMinimum === a.minimum && 0 > a.labelAngle && 0 < A ? f += A : a.viewportMaximum === a.maximum && a.viewportMinimum === a.minimum && 0 === a.labelAngle && (0 < A && (f += A), 0 < C && (g -= C))); + a.lineCoordinates.x1 = f; + a.lineCoordinates.x2 = + g; + a.lineCoordinates.width = Math.abs(g - f); + a.title && (a._titleTextBlock.maxWidth = 0 < a.titleMaxWidth && a.titleMaxWidth < a.lineCoordinates.width ? a.titleMaxWidth : a.lineCoordinates.width); + s = Math.ceil(a.createLabelsAndCalculateHeight()); + G.push(s); + a._labels && 1 < a._labels.length && (d = h = 0, h = a._labels[1], d = "dateTime" === a.chart.plotInfo.axisXValueType ? a._labels[a._labels.length - 2] : a._labels[a._labels.length - 1], p = h.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(h.textBlock.angle)) + (h.textBlock.height - d.textBlock.fontSize / + 2) * Math.sin(Math.PI / 180 * Math.abs(h.textBlock.angle)), r = d.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(d.textBlock.angle)) + (d.textBlock.height - d.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(d.textBlock.angle))); + q.panEnabled ? s = q.sessionVariables.axisX.height : q.sessionVariables.axisX.height = s; + d = Math.round(e.y2 - s - a.margin); + h = Math.round(e.y2 - a.margin); + a.lineCoordinates.y1 = d; + a.lineCoordinates.y2 = d; + a.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: h - d}; + c && (f = Math.round(e.x1 + c.margin), d = Math.round(10 > + e.y1 ? 10 : e.y1), g = Math.round(e.x1 + t + c.margin), h = Math.round(e.y2 - s - a.margin), c.lineCoordinates = {x1: g, y1: d, x2: g, y2: h, height: Math.abs(h - d)}, c.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: h - d}, c.title && (c._titleTextBlock.maxWidth = 0 < c.titleMaxWidth && c.titleMaxWidth < c.lineCoordinates.height ? c.titleMaxWidth : c.lineCoordinates.height)); + b && (f = Math.round(a.lineCoordinates.x2), d = Math.round(10 > e.y1 ? 10 : e.y1), g = Math.round(f + u), h = Math.round(e.y2 - s - a.margin), b.lineCoordinates = {x1: f, y1: d, x2: f, y2: h, height: Math.abs(h - + d)}, b.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: h - d}, b.title && (b._titleTextBlock.maxWidth = 0 < b.titleMaxWidth && b.titleMaxWidth < b.lineCoordinates.height ? b.titleMaxWidth : b.lineCoordinates.height)); + a.calculateValueToPixelConversionParameters(); + a._labels && 1 < a._labels.length && (w = (a._labels[1].position - a.viewportMinimum) * a.conversionParameters.pixelPerUnit + a.lineCoordinates.x1, B = "dateTime" === a.chart.plotInfo.axisXValueType ? (a._labels[a._labels.length - 2].position - a.viewportMinimum) * a.conversionParameters.pixelPerUnit + + a.lineCoordinates.x1 : (a._labels[a._labels.length - 1].position - a.viewportMinimum) * a.conversionParameters.pixelPerUnit + a.lineCoordinates.x1); + c && c.calculateValueToPixelConversionParameters(); + b && b.calculateValueToPixelConversionParameters(); + if (a || c || b) { + if (!x(G)) + for (l = 0; l < G.length; l++) + for (j = l + 1; j < G.length; j++) + G[l] == G[j] && (D = !0); + if (!x(F)) + for (l = 0; l < F.length; l++) + for (j = l + 1; j < F.length; j++) + F[l] == F[j] && (E = !0); + if (!x(J)) + for (l = 0; l < J.length; l++) + for (j = l + 1; j < J.length; j++) + J[l] == J[j] && (I = !0) + } + if (D && E && I) + break + } + k.save(); + k.rect(5, a.boundingRect.y1, a.chart.width - 10, a.boundingRect.height); + k.clip(); + a.renderLabelsTicksAndTitle(); + k.restore(); + c && c.renderLabelsTicksAndTitle(); + b && b.renderLabelsTicksAndTitle() + } else { + m = []; + w = []; + B = []; + a && a.title && (a._titleTextBlock.maxWidth = a.titleMaxWidth || e.height, a._titleTextBlock.maxHeight = a.titleWrap ? 0.8 * e.width : 1.5 * a.titleFontSize, a._titleTextBlock.angle = -90); + c && c.title && (c._titleTextBlock.maxWidth = c.titleMaxWidth || e.width, c._titleTextBlock.maxHeight = c.titleWrap ? 0.8 * e.height : 1.5 * c.titleFontSize, + c._titleTextBlock.angle = 0); + b && b.title && (b._titleTextBlock.maxWidth = c.titleMaxWidth || e.width, b._titleTextBlock.maxHeight = b.titleWrap ? 0.8 * e.height : 1.5 * b.titleFontSize, b._titleTextBlock.angle = 0); + for (; 4 > l++; ) { + C = Math.ceil(a.createLabelsAndCalculateWidth()); + m.push(C); + c && (c.lineCoordinates = {}, f = Math.round(e.x1 + C + a.margin), g = Math.round(e.x2 > c.chart.width - 10 ? c.chart.width - 10 : e.x2), c.labelAutoFit && !x(t) && (f = 0 > c.labelAngle ? Math.max(f, t) : 0 === c.labelAngle ? Math.max(f, t / 2) : f, g = 0 < c.labelAngle ? g - u : 0 === c.labelAngle ? + g - u / 2 : g), c.lineCoordinates.x1 = f, c.lineCoordinates.x2 = g, c.lineCoordinates.width = Math.abs(g - f), c.title && (c._titleTextBlock.maxWidth = 0 < c.titleMaxWidth && c.titleMaxWidth < c.lineCoordinates.width ? c.titleMaxWidth : c.lineCoordinates.width)); + b && (b.lineCoordinates = {}, f = Math.round(e.x1 + C + a.margin), g = Math.round(e.x2 > b.chart.width - 10 ? b.chart.width - 10 : e.x2), c && c.labelAutoFit && !x(s) && (f = 0 < b.labelAngle ? Math.max(f, s) : 0 === b.labelAngle ? Math.max(f, s / 2) : f, g -= v / 2), b.lineCoordinates.x1 = f, b.lineCoordinates.x2 = g, b.lineCoordinates.width = + Math.abs(g - f), b.title && (b._titleTextBlock.maxWidth = 0 < b.titleMaxWidth && b.titleMaxWidth < b.lineCoordinates.width ? b.titleMaxWidth : b.lineCoordinates.width)); + A = Math.ceil(c ? c.createLabelsAndCalculateHeight() : 0); + p = Math.ceil(b ? b.createLabelsAndCalculateHeight() : 0); + w.push(A); + B.push(p); + c && 0 < c._labels.length && (h = c._labels[0], d = c._labels[c._labels.length - 1], t = h.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(h.textBlock.angle)) + (h.textBlock.height - d.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(h.textBlock.angle)), + u = d.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(d.textBlock.angle)) + (d.textBlock.height - d.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(d.textBlock.angle))); + b && 0 < b._labels.length && (h = b._labels[0], d = b._labels[b._labels.length - 1], s = h.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(h.textBlock.angle)) + (h.textBlock.height - d.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(h.textBlock.angle)), v = d.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(d.textBlock.angle)) + (d.textBlock.height - d.textBlock.fontSize / + 2) * Math.sin(Math.PI / 180 * Math.abs(d.textBlock.angle))); + q.panEnabled ? A = q.sessionVariables.axisY.height : q.sessionVariables.axisY.height = A; + c && (d = Math.round(e.y2 - A - c.margin), h = Math.round(e.y2 - n > c.chart.height - 10 ? c.chart.height - 10 : e.y2 - n), c.lineCoordinates.y1 = d, c.lineCoordinates.y2 = d, c.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: A}, c.title && (c._titleTextBlock.maxWidth = 0 < c.titleMaxWidth && c.titleMaxWidth < c.lineCoordinates.width ? c.titleMaxWidth : c.lineCoordinates.width)); + b && (d = Math.round(e.y1 + b.margin), + h = e.y1 + b.margin + p, b.lineCoordinates.y1 = h, b.lineCoordinates.y2 = h, b.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: p}, b.title && (b._titleTextBlock.maxWidth = 0 < b.titleMaxWidth && b.titleMaxWidth < b.lineCoordinates.width ? b.titleMaxWidth : b.lineCoordinates.width)); + f = Math.round(e.x1 + a.margin); + d = Math.round(b ? b.lineCoordinates.y2 : 10 > e.y1 ? 10 : e.y1); + g = Math.round(e.x1 + C + a.margin); + h = Math.round(c ? c.lineCoordinates.y1 : e.y2 - n > a.chart.height - 10 ? a.chart.height - 10 : e.y2 - n); + c && c.labelAutoFit && (g = 0 > c.labelAngle ? Math.max(g, + t) : 0 === c.labelAngle ? Math.max(g, t / 2) : g, f = 0 > c.labelAngle || 0 === c.labelAngle ? g - C : f); + b && b.labelAutoFit && (g = b.lineCoordinates.x1, f = g - C); + a.lineCoordinates = {x1: g, y1: d, x2: g, y2: h, height: Math.abs(h - d)}; + a.boundingRect = {x1: f, y1: d, x2: g, y2: h, width: g - f, height: h - d}; + a.title && (a._titleTextBlock.maxWidth = 0 < a.titleMaxWidth && a.titleMaxWidth < a.lineCoordinates.height ? a.titleMaxWidth : a.lineCoordinates.height); + a.calculateValueToPixelConversionParameters(); + c && c.calculateValueToPixelConversionParameters(); + b && b.calculateValueToPixelConversionParameters(); + if (a || c || b) { + if (!x(G)) + for (l = 0; l < G.length; l++) + for (j = l + 1; j < G.length; j++) + G[l] == G[j] && (D = !0); + if (!x(F)) + for (l = 0; l < F.length; l++) + for (j = l + 1; j < F.length; j++) + F[l] == F[j] && (E = !0); + if (!x(J)) + for (l = 0; l < J.length; l++) + for (j = l + 1; j < J.length; j++) + J[l] == J[j] && (I = !0) + } + if (D && E && I) + break + } + c && c.renderLabelsTicksAndTitle(); + b && b.renderLabelsTicksAndTitle(); + a.renderLabelsTicksAndTitle() + } + q.preparePlotArea(); + e = a.chart.plotArea; + k.save(); + k.rect(e.x1, e.y1, Math.abs(e.x2 - e.x1), Math.abs(e.y2 - e.y1)); + k.clip(); + a.renderStripLinesOfThicknessType("value"); + c && c.renderStripLinesOfThicknessType("value"); + b && b.renderStripLinesOfThicknessType("value"); + a.renderInterlacedColors(); + c && c.renderInterlacedColors(); + b && b.renderInterlacedColors(); + k.restore(); + a.renderGrid(); + c && c.renderGrid(); + b && b.renderGrid(); + a.renderAxisLine(); + c && c.renderAxisLine(); + b && b.renderAxisLine(); + a.renderStripLinesOfThicknessType("pixel"); + c && c.renderStripLinesOfThicknessType("pixel"); + b && b.renderStripLinesOfThicknessType("pixel") + }; + F.prototype.renderLabelsTicksAndTitle = function () { + var a = !1, c = + 0, b = 1, d = 0; + 0 !== this.labelAngle && 360 !== this.labelAngle && (b = 1.2); + if ("undefined" === typeof this._options.interval) { + if ("bottom" === this._position || "top" === this._position) { + for (var e = 0; e < this._labels.length; e++) + f = this._labels[e], f.position < this.viewportMinimum || (f = f.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + f.textBlock.height * Math.sin(Math.PI / 180 * this.labelAngle), c += f); + c > this.lineCoordinates.width * b && this.labelAutoFit && (a = !0) + } + if ("left" === this._position || "right" === this._position) { + for (e = 0; e < this._labels.length; e++) + f = + this._labels[e], f.position < this.viewportMinimum || (f = f.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + f.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), c += f); + c > this.lineCoordinates.height * b && this.labelAutoFit && (a = !0) + } + } + if ("bottom" === this._position) { + for (var f, e = 0; e < this._labels.length; e++) + f = this._labels[e], f.position < this.viewportMinimum || f.position > this.viewportMaximum || (c = this.getPixelCoordinatesOnAxis(f.position), this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = + this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (c.x << 0) + 0.5 : c.x << 0, this.ctx.beginPath(), this.ctx.moveTo(b, c.y << 0), this.ctx.lineTo(b, c.y + this.tickLength << 0), this.ctx.stroke()), a && 0 !== d++ % 2 && this.labelAutoFit || (0 === f.textBlock.angle ? (c.x -= f.textBlock.width / 2, c.y += this.tickLength + f.textBlock.fontSize / 2) : (c.x -= 0 > this.labelAngle ? f.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0, c.y += this.tickLength + Math.abs(0 > this.labelAngle ? f.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)), f.textBlock.x = + c.x, f.textBlock.y = c.y, f.textBlock.render(!0))); + this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.boundingRect.y2 - this._titleTextBlock.height - 3, this._titleTextBlock.render(!0)) + } else if ("top" === this._position) { + for (e = 0; e < this._labels.length; e++) + f = this._labels[e], f.position < this.viewportMinimum || f.position > this.viewportMaximum || (c = this.getPixelCoordinatesOnAxis(f.position), + this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (c.x << 0) + 0.5 : c.x << 0, this.ctx.beginPath(), this.ctx.moveTo(b, c.y << 0), this.ctx.lineTo(b, c.y - this.tickLength << 0), this.ctx.stroke()), a && 0 !== d++ % 2 && this.labelAutoFit || (0 === f.textBlock.angle ? (c.x -= f.textBlock.width / 2, c.y -= this.tickLength + f.textBlock.height) : (c.x += (f.textBlock.height - this.tickLength - this.labelFontSize / 2) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? f.textBlock.width * + Math.cos(Math.PI / 180 * this.labelAngle) : 0), c.y -= this.tickLength + (f.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? f.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0))), f.textBlock.x = c.x, f.textBlock.y = c.y, f.textBlock.render(!0))); + this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.boundingRect.y1 + 1, this._titleTextBlock.render(!0)) + } else if ("left" === + this._position) { + for (e = 0; e < this._labels.length; e++) + f = this._labels[e], f.position < this.viewportMinimum || f.position > this.viewportMaximum || (c = this.getPixelCoordinatesOnAxis(f.position), this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (c.y << 0) + 0.5 : c.y << 0, this.ctx.beginPath(), this.ctx.moveTo(c.x << 0, b), this.ctx.lineTo(c.x - this.tickLength << 0, b), this.ctx.stroke()), a && 0 !== d++ % 2 && this.labelAutoFit || (0 === this.labelAngle ? (f.textBlock.y = c.y, + f.textBlock.x = c.x - f.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5) : (f.textBlock.y = c.y - f.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), f.textBlock.x = 0 < this.labelAngle ? c.x - f.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : c.x - f.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (f.textBlock.height - f.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength), f.textBlock.render(!0))); + this.title && (this._titleTextBlock.measureText(), + this._titleTextBlock.x = this.boundingRect.x1 + 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 + this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this._titleTextBlock.render(!0)) + } else if ("right" === this._position) { + for (e = 0; e < this._labels.length; e++) + f = this._labels[e], f.position < this.viewportMinimum || f.position > this.viewportMaximum || (c = this.getPixelCoordinatesOnAxis(f.position), this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % + 2 ? (c.y << 0) + 0.5 : c.y << 0, this.ctx.beginPath(), this.ctx.moveTo(c.x << 0, b), this.ctx.lineTo(c.x + this.tickLength << 0, b), this.ctx.stroke()), a && 0 !== d++ % 2 && this.labelAutoFit || (0 === this.labelAngle ? (f.textBlock.y = c.y, f.textBlock.x = c.x + this.tickLength + 5) : (f.textBlock.y = 0 > this.labelAngle ? c.y : c.y - (f.textBlock.height - f.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), f.textBlock.x = 0 < this.labelAngle ? c.x + (f.textBlock.height - f.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : + c.x + this.tickLength + 5), f.textBlock.render(!0))); + this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.boundingRect.x2 - 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 - this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this._titleTextBlock.render(!0)) + } + }; + F.prototype.renderInterlacedColors = function () { + var a = this.chart.plotArea.ctx, c, b, d = this.chart.plotArea, e = 0; + c = !0; + if (("bottom" === this._position || "top" === this._position) && this.interlacedColor) + for (a.fillStyle = this.interlacedColor, + e = 0; e < this._labels.length; e++) + this._labels[e].stripLine || (c ? (c = this.getPixelCoordinatesOnAxis(this._labels[e].position), b = e + 1 >= this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(c.x, d.y1, Math.abs(b.x - c.x), Math.abs(d.y1 - d.y2)), c = !1) : c = !0); + else if (("left" === this._position || "right" === this._position) && this.interlacedColor) + for (a.fillStyle = this.interlacedColor, e = 0; e < this._labels.length; e++) + this._labels[e].stripLine || + (c ? (b = this.getPixelCoordinatesOnAxis(this._labels[e].position), c = e + 1 >= this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(d.x1, c.y, Math.abs(d.x1 - d.x2), Math.abs(c.y - b.y)), c = !1) : c = !0); + a.beginPath() + }; + F.prototype.renderStripLinesOfThicknessType = function (a) { + if (this.stripLines && 0 < this.stripLines.length && a) { + for (var c = this, b, d = 0, d = 0; d < this.stripLines.length; d++) { + var e = this.stripLines[d]; + e._thicknessType === a && ("pixel" === + a && (e.value < this.viewportMinimum || e.value > this.viewportMaximum) || (e.showOnTop ? this.chart.addEventListener("dataAnimationIterationEnd", function () { + this.ctx.save(); + this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height); + this.ctx.clip(); + e.render(); + this.ctx.restore() + }, e) : e.render())) + } + for (d = 0; d < this._stripLineLabels.length; d++) + if (e = this.stripLines[d], b = this._stripLineLabels[d], !(b.position < this.viewportMinimum || b.position > this.viewportMaximum)) + if (a = + this.getPixelCoordinatesOnAxis(b.position), "outside" === b.stripLine.labelPlacement) { + e && "pixel" === e._thicknessType && (this.ctx.lineWidth = e.thickness, this.ctx.strokeStyle = e.color); + if ("bottom" === this._position) { + var f = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0; + this.ctx.beginPath(); + this.ctx.moveTo(f, a.y << 0); + this.ctx.lineTo(f, 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 ? (f = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, this.ctx.beginPath(), this.ctx.moveTo(f, a.y << 0), this.ctx.lineTo(f, 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) - + (0 < this.labelAngle ? b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), a.y -= this.tickLength + (b.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0)))) : "left" === this._position ? (f = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, f), this.ctx.lineTo(a.x - this.tickLength << 0, f), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - + this.tickLength - 5 : (a.y -= b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength)) : "right" === this._position && (f = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, f), this.ctx.lineTo(a.x + this.tickLength << 0, + f), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x + this.tickLength + 5 : (a.y = 0 > this.labelAngle ? a.y : a.y - (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : a.x + this.tickLength + 5)); + b.textBlock.x = a.x; + b.textBlock.y = a.y; + e.showOnTop ? this.chart.addEventListener("dataAnimationIterationEnd", b.textBlock.render, b.textBlock) : b.textBlock.render(!0) + } else + b.textBlock.angle = + -90, "bottom" === this._position ? (b.textBlock.maxWidth = this._options.stripLines[d].labelMaxWidth ? this._options.stripLines[d].labelMaxWidth : this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? x(e.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, x(e.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[d].labelMaxWidth ? this._options.stripLines[d].labelMaxWidth : + this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? x(e.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, x(e.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[d].labelMaxWidth ? this._options.stripLines[d].labelMaxWidth : this.chart.plotArea.width - 3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - b.textBlock.height > this.chart.plotArea.y1 ? + x(e.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 3 : a.y - b.textBlock.height < this.chart.plotArea.y2 ? a.y += b.textBlock.fontSize / 2 + 3 : x(e.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x1 + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x2 - b.textBlock.width - + 3) : "right" === this._position && (b.textBlock.maxWidth = this._options.stripLines[d].labelMaxWidth ? this._options.stripLines[d].labelMaxWidth : this.chart.plotArea.width - 3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - +b.textBlock.height > this.chart.plotArea.y1 ? x(e.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.height < this.chart.plotArea.y2 ? a.y += b.textBlock.fontSize / 2 + 3 : x(e.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / + 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x2 - b.textBlock.width - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x1 + 3), b.textBlock.x = a.x, b.textBlock.y = a.y, e.showOnTop ? (this.ctx.save(), this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height), this.ctx.clip(), this.chart.addEventListener("dataAnimationIterationEnd", + function () { + b.textBlock.render(!0); + c.ctx.restore() + }, b.textBlock)) : (this.ctx.save(), this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height), this.ctx.clip(), b.textBlock.render(!0), this.ctx.restore()) + } + }; + F.prototype.renderGrid = function () { + if (this.gridThickness && 0 < this.gridThickness) { + var a = this.chart.ctx; + a.save(); + var c, b = this.chart.plotArea; + a.lineWidth = this.gridThickness; + a.strokeStyle = this.gridColor; + a.setLineDash && a.setLineDash(D(this.gridDashType, + this.gridThickness)); + if ("bottom" === this._position || "top" === this._position) + for (d = 0; d < this._labels.length && !this._labels[d].stripLine; d++) + this._labels[d].position < this.viewportMinimum || this._labels[d].position > this.viewportMaximum || (a.beginPath(), c = this.getPixelCoordinatesOnAxis(this._labels[d].position), c = 1 === a.lineWidth % 2 ? (c.x << 0) + 0.5 : c.x << 0, a.moveTo(c, b.y1 << 0), a.lineTo(c, b.y2 << 0), a.stroke()); + else if ("left" === this._position || "right" === this._position) + for (var d = 0; d < this._labels.length && !this._labels[d].stripLine; d++) + this._labels[d].position < + this.viewportMinimum || this._labels[d].position > this.viewportMaximum || (a.beginPath(), c = this.getPixelCoordinatesOnAxis(this._labels[d].position), c = 1 === a.lineWidth % 2 ? (c.y << 0) + 0.5 : c.y << 0, a.moveTo(b.x1 << 0, c), a.lineTo(b.x2 << 0, c), a.stroke()); + a.restore() + } + }; + F.prototype.renderAxisLine = function () { + var a = this.chart.ctx; + a.save(); + if ("bottom" === this._position || "top" === this._position) { + if (this.lineThickness) { + a.lineWidth = this.lineThickness; + a.strokeStyle = this.lineColor ? this.lineColor : "black"; + a.setLineDash && a.setLineDash(D(this.lineDashType, + this.lineThickness)); + var c = 1 === this.lineThickness % 2 ? (this.lineCoordinates.y1 << 0) + 0.5 : this.lineCoordinates.y1 << 0; + a.beginPath(); + a.moveTo(this.lineCoordinates.x1, c); + a.lineTo(this.lineCoordinates.x2, c); + a.stroke() + } + } else + "left" !== this._position && "right" !== this._position || !this.lineThickness || (a.lineWidth = this.lineThickness, a.strokeStyle = this.lineColor, a.setLineDash && a.setLineDash(D(this.lineDashType, this.lineThickness)), c = 1 === this.lineThickness % 2 ? (this.lineCoordinates.x1 << 0) + 0.5 : this.lineCoordinates.x1 << + 0, a.beginPath(), a.moveTo(c, this.lineCoordinates.y1), a.lineTo(c, this.lineCoordinates.y2), a.stroke()); + a.restore() + }; + F.prototype.getPixelCoordinatesOnAxis = function (a) { + var c = {}; + if ("bottom" === this._position || "top" === this._position) { + var b = this.conversionParameters.pixelPerUnit; + c.x = this.conversionParameters.reference + b * (a - this.viewportMinimum); + c.y = this.lineCoordinates.y1 + } + if ("left" === this._position || "right" === this._position) + b = -this.conversionParameters.pixelPerUnit, c.y = this.conversionParameters.reference - + b * (a - this.viewportMinimum), c.x = this.lineCoordinates.x2; + return c + }; + F.prototype.convertPixelToValue = function (a) { + if (!a) + return null; + var c = 0; + return c = this.conversionParameters.minimum + (("left" === this._position || "right" === this._position ? a.y : a.x) - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit + }; + F.prototype.setViewPortRange = function (a, c) { + this.sessionVariables.newViewportMinimum = this.viewportMinimum = Math.min(a, c); + this.sessionVariables.newViewportMaximum = this.viewportMaximum = Math.max(a, + c) + }; + F.prototype.getXValueAt = function (a) { + if (!a) + return null; + var c = null; + "left" === this._position ? c = (this.chart.axisX.viewportMaximum - this.chart.axisX.viewportMinimum) / this.chart.axisX.lineCoordinates.height * (this.chart.axisX.lineCoordinates.y2 - a.y) + this.chart.axisX.viewportMinimum : "bottom" === this._position && (c = (this.chart.axisX.viewportMaximum - this.chart.axisX.viewportMinimum) / this.chart.axisX.lineCoordinates.width * (a.x - this.chart.axisX.lineCoordinates.x1) + this.chart.axisX.viewportMinimum); + return c + }; + F.prototype.calculateValueToPixelConversionParameters = function (a) { + this.reversed = !1; + a = {pixelPerUnit: null, minimum: null, reference: null}; + var c = this.lineCoordinates.width, b = this.lineCoordinates.height; + a.minimum = this.viewportMinimum; + if ("bottom" === this._position || "top" === this._position) + a.pixelPerUnit = (this.reversed ? -1 : 1) * c / Math.abs(this.viewportMaximum - this.viewportMinimum), a.reference = this.reversed ? this.lineCoordinates.x2 : this.lineCoordinates.x1; + if ("left" === this._position || "right" === this._position) + a.pixelPerUnit = + (this.reversed ? 1 : -1) * b / Math.abs(this.viewportMaximum - this.viewportMinimum), a.reference = this.reversed ? this.lineCoordinates.y1 : this.lineCoordinates.y2; + this.conversionParameters = a + }; + F.prototype.calculateAxisParameters = function () { + var a = this.chart.layoutManager.getFreeSpace(), c = !1; + "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 ? 8 : Math.max(6, Math.floor(this.maxWidth / + 62)) : Math.max(Math.floor(this.maxWidth / 40), 2), b, d, e, f; + f = 0; + if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) + this.viewportMinimum = this.minimum; + if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) + this.viewportMaximum = this.maximum; + "axisX" === this.type ? (b = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, d = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 0 === d - b && (f = "undefined" === typeof this._options.interval ? 0.4 : this._options.interval, + d += f, b -= f), Infinity !== this.dataInfo.minDiff ? e = this.dataInfo.minDiff : 1 < d - b ? e = 0.5 * Math.abs(d - b) : (e = 1, "dateTime" === this.chart.plotInfo.axisXValueType && (c = !0))) : "axisY" === this.type && (b = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, d = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, isFinite(b) || isFinite(d) ? isFinite(b) ? isFinite(d) || (d = b) : b = d : (d = "undefined" === typeof this._options.interval ? -Infinity : this._options.interval, b = 0), 0 === b && 0 === d ? (d += 9, b = 0) : + 0 === d - b ? (f = Math.min(Math.abs(0.01 * Math.abs(d)), 5), d += f, b -= f) : b > d ? (f = Math.min(Math.abs(0.01 * Math.abs(d - b)), 5), 0 <= d ? b = d - f : d = b + f) : (f = Math.min(Math.abs(0.01 * Math.abs(d - b)), 0.05), 0 !== d && (d += f), 0 !== b && (b -= f)), e = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < d - b ? 0.5 * Math.abs(d - b) : 1, this.includeZero && (null === this.viewportMinimum || isNaN(this.viewportMinimum)) && 0 < b && (b = 0), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 0 > d && (d = 0)); + f = (isNaN(this.viewportMaximum) || null === + this.viewportMaximum ? d : this.viewportMaximum) - (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? b : this.viewportMinimum); + if ("axisX" === this.type && "dateTime" === this.chart.plotInfo.axisXValueType) { + this.intervalType || (f / 1 <= a ? (this.interval = 1, this.intervalType = "millisecond") : f / 2 <= a ? (this.interval = 2, this.intervalType = "millisecond") : f / 5 <= a ? (this.interval = 5, this.intervalType = "millisecond") : f / 10 <= a ? (this.interval = 10, this.intervalType = "millisecond") : f / 20 <= a ? (this.interval = 20, this.intervalType = "millisecond") : + f / 50 <= a ? (this.interval = 50, this.intervalType = "millisecond") : f / 100 <= a ? (this.interval = 100, this.intervalType = "millisecond") : f / 200 <= a ? (this.interval = 200, this.intervalType = "millisecond") : f / 250 <= a ? (this.interval = 250, this.intervalType = "millisecond") : f / 300 <= a ? (this.interval = 300, this.intervalType = "millisecond") : f / 400 <= a ? (this.interval = 400, this.intervalType = "millisecond") : f / 500 <= a ? (this.interval = 500, this.intervalType = "millisecond") : f / (1 * E.secondDuration) <= a ? (this.interval = 1, this.intervalType = "second") : f / (2 * + E.secondDuration) <= a ? (this.interval = 2, this.intervalType = "second") : f / (5 * E.secondDuration) <= a ? (this.interval = 5, this.intervalType = "second") : f / (10 * E.secondDuration) <= a ? (this.interval = 10, this.intervalType = "second") : f / (15 * E.secondDuration) <= a ? (this.interval = 15, this.intervalType = "second") : f / (20 * E.secondDuration) <= a ? (this.interval = 20, this.intervalType = "second") : f / (30 * E.secondDuration) <= a ? (this.interval = 30, this.intervalType = "second") : f / (1 * E.minuteDuration) <= a ? (this.interval = 1, this.intervalType = "minute") : f / + (2 * E.minuteDuration) <= a ? (this.interval = 2, this.intervalType = "minute") : f / (5 * E.minuteDuration) <= a ? (this.interval = 5, this.intervalType = "minute") : f / (10 * E.minuteDuration) <= a ? (this.interval = 10, this.intervalType = "minute") : f / (15 * E.minuteDuration) <= a ? (this.interval = 15, this.intervalType = "minute") : f / (20 * E.minuteDuration) <= a ? (this.interval = 20, this.intervalType = "minute") : f / (30 * E.minuteDuration) <= a ? (this.interval = 30, this.intervalType = "minute") : f / (1 * E.hourDuration) <= a ? (this.interval = 1, this.intervalType = "hour") : f / + (2 * E.hourDuration) <= a ? (this.interval = 2, this.intervalType = "hour") : f / (3 * E.hourDuration) <= a ? (this.interval = 3, this.intervalType = "hour") : f / (6 * E.hourDuration) <= a ? (this.interval = 6, this.intervalType = "hour") : f / (1 * E.dayDuration) <= a ? (this.interval = 1, this.intervalType = "day") : f / (2 * E.dayDuration) <= a ? (this.interval = 2, this.intervalType = "day") : f / (4 * E.dayDuration) <= a ? (this.interval = 4, this.intervalType = "day") : f / (1 * E.weekDuration) <= a ? (this.interval = 1, this.intervalType = "week") : f / (2 * E.weekDuration) <= a ? (this.interval = 2, + this.intervalType = "week") : f / (3 * E.weekDuration) <= a ? (this.interval = 3, this.intervalType = "week") : f / (1 * E.monthDuration) <= a ? (this.interval = 1, this.intervalType = "month") : f / (2 * E.monthDuration) <= a ? (this.interval = 2, this.intervalType = "month") : f / (3 * E.monthDuration) <= a ? (this.interval = 3, this.intervalType = "month") : f / (6 * E.monthDuration) <= a ? (this.interval = 6, this.intervalType = "month") : (this.interval = f / (1 * E.yearDuration) <= a ? 1 : f / (2 * E.yearDuration) <= a ? 2 : f / (4 * E.yearDuration) <= a ? 4 : Math.floor(F.getNiceNumber(f / (a - 1), !0) / + E.yearDuration), this.intervalType = "year")); + if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) + this.viewportMinimum = b - e / 2; + if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) + this.viewportMaximum = d + e / 2; + c ? 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"; + f = F.getNiceNumber(f, !1); + this.interval = this._options && 0 < this._options.interval ? this._options.interval : F.getNiceNumber(f / + (a - 1), !0); + if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) + this.viewportMinimum = "axisX" === this.type ? b - e / 2 : Math.floor(b / this.interval) * this.interval; + if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) + this.viewportMaximum = "axisX" === this.type ? d + e / 2 : Math.ceil(d / this.interval) * this.interval; + 0 === this.viewportMaximum && 0 === this.viewportMinimum && (0 === this._options.viewportMinimum ? this.viewportMaximum += 10 : 0 === this._options.viewportMaximum && (this.viewportMinimum -= 10), this._options && "undefined" === + typeof this._options.interval && (this.interval = F.getNiceNumber((this.viewportMaximum - this.viewportMinimum) / (a - 1), !0))) + } + if (null === this.minimum || null === this.maximum) + if ("axisX" === this.type ? (b = null !== this.minimum ? this.minimum : this.dataInfo.min, d = null !== this.maximum ? this.maximum : this.dataInfo.max, 0 === d - b && (f = "undefined" === typeof this._options.interval ? 0.4 : this._options.interval, d += f, b -= f), e = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < d - b ? 0.5 * Math.abs(d - b) : 1) : "axisY" === this.type && (b = null !== + this.minimum ? this.minimum : this.dataInfo.min, d = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(b) || isFinite(d) ? 0 === b && 0 === d ? (d += 9, b = 0) : 0 === d - b ? (f = Math.min(Math.abs(0.01 * Math.abs(d)), 5), d += f, b -= f) : b > d ? (f = Math.min(Math.abs(0.01 * Math.abs(d - b)), 5), 0 <= d ? b = d - f : d = b + f) : (f = Math.min(Math.abs(0.01 * Math.abs(d - b)), 0.05), 0 !== d && (d += f), 0 !== b && (b -= f)) : (d = "undefined" === typeof this._options.interval ? -Infinity : this._options.interval, b = 0), e = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < d - b ? 0.5 * + Math.abs(d - b) : 1, this.includeZero && (null === this.minimum || isNaN(this.minimum)) && 0 < b && (b = 0), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 0 > d && (d = 0)), "axisX" === this.type && "dateTime" === this.chart.plotInfo.axisXValueType) { + if (null === this.minimum || isNaN(this.minimum)) + this.minimum = b - e / 2; + if (null === this.maximum || isNaN(this.maximum)) + this.maximum = d + e / 2 + } else + this.intervalType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? b - e / 2 : Math.floor(b / 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 ? d + e / 2 : Math.ceil(d / 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)); + this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum); + this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum); + this.intervalStartPosition = "axisX" === this.type && "dateTime" === this.chart.plotInfo.axisXValueType ? this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval) : Math.floor((this.viewportMinimum + 0.2 * this.interval) / this.interval) * this.interval; + if (!this.valueFormatString && (this.valueFormatString = + "#,##0.##", f = Math.abs(this.viewportMaximum - this.viewportMinimum), 1 > f)) { + c = Math.floor(Math.abs(Math.log(f) / Math.LN10)) + 2; + if (isNaN(c) || !isFinite(c)) + c = 2; + if (2 < c) + for (b = 0; b < c - 2; b++) + this.valueFormatString += "#" + } + }; + F.getNiceNumber = function (a, c) { + var b = Math.floor(Math.log(a) / Math.LN10), d = a / Math.pow(10, b); + return Number(((c ? 1.5 > d ? 1 : 3 > d ? 2 : 7 > d ? 5 : 10 : 1 >= d ? 1 : 2 >= d ? 2 : 5 >= d ? 5 : 10) * Math.pow(10, b)).toFixed(20)) + }; + F.prototype.getLabelStartPoint = function () { + var a = E[this.intervalType + "Duration"] * this.interval, a = new Date(Math.floor(this.viewportMinimum / + a) * a); + if ("millisecond" !== this.intervalType) + if ("second" === this.intervalType) + 0 < a.getMilliseconds() && (a.setSeconds(a.getSeconds() + 1), a.setMilliseconds(0)); + else if ("minute" === this.intervalType) { + if (0 < a.getSeconds() || 0 < a.getMilliseconds()) + a.setMinutes(a.getMinutes() + 1), a.setSeconds(0), a.setMilliseconds(0) + } else if ("hour" === this.intervalType) { + if (0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) + a.setHours(a.getHours() + 1), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) + } else if ("day" === this.intervalType) { + if (0 < + a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) + a.setDate(a.getDate() + 1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) + } else if ("week" === this.intervalType) { + if (0 < a.getDay() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) + a.setDate(a.getDate() + (7 - a.getDay())), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) + } else if ("month" === this.intervalType) { + if (1 < a.getDate() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || + 0 < a.getMilliseconds()) + a.setMonth(a.getMonth() + 1), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) + } else + "year" === this.intervalType && (0 < a.getMonth() || 1 < a.getDate() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) && (a.setFullYear(a.getFullYear() + 1), a.setMonth(0), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)); + return a + }; + T(pa, L); + pa.prototype.render = function () { + this.ctx.save(); + var a = this.parent.getPixelCoordinatesOnAxis(this.value), + c = Math.abs("pixel" === this._thicknessType ? this.thickness : this.parent.conversionParameters.pixelPerUnit * this.thickness); + if (0 < c) { + var b = null === this.opacity ? 1 : this.opacity; + this.ctx.strokeStyle = this.color; + this.ctx.beginPath(); + var d = this.ctx.globalAlpha; + this.ctx.globalAlpha = b; + C(this.id); + var e, f, g, h; + this.ctx.lineWidth = c; + this.ctx.setLineDash && this.ctx.setLineDash(D(this.lineDashType, c)); + if ("bottom" === this.parent._position || "top" === this.parent._position) + e = f = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, g = this.chart.plotArea.y1, + h = this.chart.plotArea.y2; + else if ("left" === this.parent._position || "right" === this.parent._position) + g = h = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, e = this.chart.plotArea.x1, f = this.chart.plotArea.x2; + this.ctx.moveTo(e, g); + this.ctx.lineTo(f, h); + this.ctx.stroke(); + this.ctx.globalAlpha = d + } + this.ctx.restore() + }; + T(V, L); + V.prototype._initialize = function () { + if (this.enabled) { + this.container = document.createElement("div"); + this.container.setAttribute("class", "canvasjs-chart-tooltip"); + this.container.style.position = "absolute"; + this.container.style.height = "auto"; + this.container.style.boxShadow = "1px 1px 2px 2px rgba(0,0,0,0.1)"; + this.container.style.zIndex = "1000"; + this.container.style.display = "none"; + var a; + a = '
(new Date).getTime() - this._lastUpdated || (this._lastUpdated = (new Date).getTime(), this._updateToolTip(a, c)) + }; + V.prototype._updateToolTip = function (a, c) { + if (!this.chart.disableToolTip) { + if ("undefined" === typeof a || "undefined" === typeof c) { + if (isNaN(this._prevX) || + isNaN(this._prevY)) + return; + a = this._prevX; + c = this._prevY + } else + this._prevX = a, this._prevY = c; + var b = null, d = null, e = [], f = 0; + if (this.shared && this.enabled && "none" !== this.chart.plotInfo.axisPlacement) { + f = "xySwapped" === this.chart.plotInfo.axisPlacement ? (this.chart.axisX.viewportMaximum - this.chart.axisX.viewportMinimum) / this.chart.axisX.lineCoordinates.height * (this.chart.axisX.lineCoordinates.y2 - c) + this.chart.axisX.viewportMinimum : (this.chart.axisX.viewportMaximum - this.chart.axisX.viewportMinimum) / this.chart.axisX.lineCoordinates.width * + (a - this.chart.axisX.lineCoordinates.x1) + this.chart.axisX.viewportMinimum; + d = []; + for (b = 0; b < this.chart.data.length; b++) { + var g = this.chart.data[b].getDataPointAtX(f, !0); + g && 0 <= g.index && (g.dataSeries = this.chart.data[b], null !== g.dataPoint.y && d.push(g)) + } + if (0 === d.length) + return; + d.sort(function (a, b) { + return a.distance - b.distance + }); + f = d[0]; + for (b = 0; b < d.length; b++) + d[b].dataPoint.x.valueOf() === f.dataPoint.x.valueOf() && e.push(d[b]); + d = null + } else { + if (g = this.chart.getDataPointAtXY(a, c, !0)) + this.currentDataPointIndex = g.dataPointIndex, + this.currentSeriesIndex = g.dataSeries.index; + else if (u) + if (g = Ea(a, c, this.chart._eventManager.ghostCtx), 0 < g && "undefined" !== typeof this.chart._eventManager.objectMap[g]) { + g = this.chart._eventManager.objectMap[g]; + if ("legendItem" === g.objectType) + return; + this.currentSeriesIndex = g.dataSeriesIndex; + this.currentDataPointIndex = 0 <= g.dataPointIndex ? g.dataPointIndex : -1 + } else + this.currentDataPointIndex = -1; + else + this.currentDataPointIndex = -1; + if (0 <= this.currentSeriesIndex) { + d = this.chart.data[this.currentSeriesIndex]; + g = {}; + if (0 <= this.currentDataPointIndex) + b = d.dataPoints[this.currentDataPointIndex], g.dataSeries = d, g.dataPoint = b, g.index = this.currentDataPointIndex, g.distance = Math.abs(b.x - f); + else { + if (!this.enabled || "line" !== d.type && "stepLine" !== d.type && "spline" !== d.type && "area" !== d.type && "stepArea" !== d.type && "splineArea" !== d.type && "stackedArea" !== d.type && "stackedArea100" !== d.type && "rangeArea" !== d.type && "rangeSplineArea" !== d.type && "candlestick" !== d.type && "ohlc" !== d.type) + return; + f = d.axisX.conversionParameters.minimum + (a - d.axisX.conversionParameters.reference) / + d.axisX.conversionParameters.pixelPerUnit; + g = d.getDataPointAtX(f, !0); + g.dataSeries = d; + this.currentDataPointIndex = g.index; + b = g.dataPoint + } + if (!x(g.dataPoint.y)) + if (g.dataSeries.axisY) + if (0 < g.dataPoint.y.length) { + for (b = f = 0; b < g.dataPoint.y.length; b++) + g.dataPoint.y[b] < g.dataSeries.axisY.viewportMinimum ? f-- : g.dataPoint.y[b] > g.dataSeries.axisY.viewportMaximum && f++; + f < g.dataPoint.y.length && f > -g.dataPoint.y.length && e.push(g) + } else + "column" === d.type || "bar" === d.type ? 0 > g.dataPoint.y ? 0 > g.dataSeries.axisY.viewportMinimum && + g.dataSeries.axisY.viewportMaximum >= g.dataPoint.y && e.push(g) : g.dataSeries.axisY.viewportMinimum <= g.dataPoint.y && 0 <= g.dataSeries.axisY.viewportMaximum && e.push(g) : "bubble" === d.type ? (f = this.chart._eventManager.objectMap[d.dataPointIds[g.index]].size / 2, g.dataPoint.y >= g.dataSeries.axisY.viewportMinimum - f && g.dataPoint.y <= g.dataSeries.axisY.viewportMaximum + f && e.push(g)) : (0 <= g.dataSeries.type.indexOf("100") || "stackedColumn" === d.type || "stackedBar" === d.type || g.dataPoint.y >= g.dataSeries.axisY.viewportMinimum && + g.dataPoint.y <= g.dataSeries.axisY.viewportMaximum) && e.push(g); + else + e.push(g) + } + } + if (0 < e.length && (this.highlightObjects(e), this.enabled)) + if (f = "", f = this.getToolTipInnerHTML({entries: e}), null !== f) { + this.contentDiv.innerHTML = f; + this.contentDiv.innerHTML = f; + f = !1; + "none" === this.container.style.display && (f = !0, this.container.style.display = "block"); + try { + this.contentDiv.style.background = this.backgroundColor ? this.backgroundColor : u ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = + this.contentDiv.style.borderColor = this.borderColor ? this.borderColor : e[0].dataPoint.color ? e[0].dataPoint.color : e[0].dataSeries.color ? e[0].dataSeries.color : e[0].dataSeries._colorSet[e[0].index % e[0].dataSeries._colorSet.length], this.contentDiv.style.borderWidth = this.borderThickness || 0 === this.borderThickness ? this.borderThickness + "px" : "2px", this.contentDiv.style.borderRadius = this.cornerRadius || 0 === this.cornerRadius ? this.cornerRadius + "px" : "5px", this.container.style.borderRadius = this.contentDiv.style.borderRadius, + this.contentDiv.style.fontSize = this.fontSize || 0 === this.fontSize ? this.fontSize + "px" : "14px", this.contentDiv.style.color = this.fontColor ? this.fontColor : "#000000", this.contentDiv.style.fontFamily = this.fontFamily ? this.fontFamily : "Calibri, Arial, Georgia, serif;", this.contentDiv.style.fontWeight = this.fontWeight ? this.fontWeight : "normal", this.contentDiv.style.fontStyle = this.fontStyle ? this.fontStyle : u ? "italic" : "normal" + } catch (h) { + } + "pie" === e[0].dataSeries.type || "doughnut" === e[0].dataSeries.type || "funnel" === e[0].dataSeries.type || + "bar" === e[0].dataSeries.type || "rangeBar" === e[0].dataSeries.type || "stackedBar" === e[0].dataSeries.type || "stackedBar100" === e[0].dataSeries.type ? g = a - 10 - this.container.clientWidth : (g = e[0].dataSeries.axisX.conversionParameters.reference + e[0].dataSeries.axisX.conversionParameters.pixelPerUnit * (e[0].dataPoint.x - e[0].dataSeries.axisX.conversionParameters.minimum) - this.container.clientWidth << 0, g -= 10); + 0 > g && (g += this.container.clientWidth + 20); + g + this.container.clientWidth > Math.max(this.chart._container.clientWidth, + this.chart.width) && (g = Math.max(0, Math.max(this.chart._container.clientWidth, this.chart.width) - this.container.clientWidth)); + e = 1 !== e.length || this.shared || "line" !== e[0].dataSeries.type && "stepLine" !== e[0].dataSeries.type && "spline" !== e[0].dataSeries.type && "area" !== e[0].dataSeries.type && "stepArea" !== e[0].dataSeries.type && "splineArea" !== e[0].dataSeries.type && "stackedArea" !== e[0].dataSeries.type && "stackedArea100" !== e[0].dataSeries.type ? "bar" === e[0].dataSeries.type || "rangeBar" === e[0].dataSeries.type || "stackedBar" === + e[0].dataSeries.type || "stackedBar100" === e[0].dataSeries.type ? e[0].dataSeries.axisX.conversionParameters.reference + e[0].dataSeries.axisX.conversionParameters.pixelPerUnit * (e[0].dataPoint.x - e[0].dataSeries.axisX.viewportMinimum) + 0.5 << 0 : c : e[0].dataSeries.axisY.conversionParameters.reference + e[0].dataSeries.axisY.conversionParameters.pixelPerUnit * (e[0].dataPoint.y - e[0].dataSeries.axisY.viewportMinimum) + 0.5 << 0; + e = -e + 10; + 0 < e + this.container.clientHeight + 5 && (e -= e + this.container.clientHeight + 5 - 0); + this.container.style.left = + g + "px"; + this.container.style.bottom = e + "px"; + !this.animationEnabled || f ? this.disableAnimation() : this.enableAnimation() + } else + this.hide(!1) + } + }; + V.prototype.highlightObjects = function (a) { + var c = this.chart.overlaidCanvasCtx; + this.chart.resetOverlayedCanvas(); + c.clearRect(0, 0, this.chart.width, this.chart.height); + c.save(); + var b = this.chart.plotArea, d = 0; + c.rect(b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1); + c.clip(); + for (b = 0; b < a.length; b++) { + var e = a[b]; + if ((e = this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]]) && e.objectType && + "dataPoint" === e.objectType) { + var d = this.chart.data[e.dataSeriesIndex], f = d.dataPoints[e.dataPointIndex], g = e.dataPointIndex; + !1 === f.highlightEnabled || !0 !== d.highlightEnabled && !0 !== f.highlightEnabled || ("line" === d.type || "stepLine" === d.type || "spline" === d.type || "scatter" === d.type || "area" === d.type || "stepArea" === d.type || "splineArea" === d.type || "stackedArea" === d.type || "stackedArea100" === d.type || "rangeArea" === d.type || "rangeSplineArea" === d.type ? (f = d.getMarkerProperties(g, e.x1, e.y1, this.chart.overlaidCanvasCtx), + f.size = Math.max(1.5 * f.size << 0, 10), f.borderColor = f.borderColor || "#FFFFFF", f.borderThickness = f.borderThickness || Math.ceil(0.1 * f.size), P.drawMarkers([f]), "undefined" !== typeof e.y2 && (f = d.getMarkerProperties(g, e.x1, e.y2, this.chart.overlaidCanvasCtx), f.size = Math.max(1.5 * f.size << 0, 10), f.borderColor = f.borderColor || "#FFFFFF", f.borderThickness = f.borderThickness || Math.ceil(0.1 * f.size), P.drawMarkers([f]))) : "bubble" === d.type ? (f = d.getMarkerProperties(g, e.x1, e.y1, this.chart.overlaidCanvasCtx), f.size = e.size, f.color = + "white", f.borderColor = "white", c.globalAlpha = 0.3, P.drawMarkers([f]), c.globalAlpha = 1) : "column" === d.type || "stackedColumn" === d.type || "stackedColumn100" === d.type || "bar" === d.type || "rangeBar" === d.type || "stackedBar" === d.type || "stackedBar100" === d.type || "rangeColumn" === d.type ? M(c, e.x1, e.y1, e.x2, e.y2, "white", 0, null, !1, !1, !1, !1, 0.3) : "pie" === d.type || "doughnut" === d.type ? ya(c, e.center, e.radius, "white", d.type, e.startAngle, e.endAngle, 0.3, e.percentInnerRadius) : "candlestick" === d.type ? (c.globalAlpha = 1, c.strokeStyle = + e.color, c.lineWidth = 2 * e.borderThickness, d = 0 === c.lineWidth % 2 ? 0 : 0.5, c.beginPath(), c.moveTo(e.x3 - d, e.y2), c.lineTo(e.x3 - d, Math.min(e.y1, e.y4)), c.stroke(), c.beginPath(), c.moveTo(e.x3 - d, Math.max(e.y1, e.y4)), c.lineTo(e.x3 - d, e.y3), c.stroke(), M(c, e.x1, Math.min(e.y1, e.y4), e.x2, Math.max(e.y1, e.y4), "transparent", 2 * e.borderThickness, e.color, !1, !1, !1, !1), c.globalAlpha = 1) : "ohlc" === d.type && (c.globalAlpha = 1, c.strokeStyle = e.color, c.lineWidth = 2 * e.borderThickness, d = 0 === c.lineWidth % 2 ? 0 : 0.5, c.beginPath(), c.moveTo(e.x3 - + d, e.y2), c.lineTo(e.x3 - d, e.y3), c.stroke(), c.beginPath(), c.moveTo(e.x3, e.y1), c.lineTo(e.x1, e.y1), c.stroke(), c.beginPath(), c.moveTo(e.x3, e.y4), c.lineTo(e.x2, e.y4), c.stroke(), c.globalAlpha = 1)) + } + } + c.restore(); + c.globalAlpha = 1; + c.beginPath() + }; + V.prototype.getToolTipInnerHTML = function (a) { + a = a.entries; + for (var c = null, b = null, d = null, e = 0, f = "", g = !0, h = 0; h < a.length; h++) + if (a[h].dataSeries.toolTipContent || a[h].dataPoint.toolTipContent) { + g = !1; + break + } + if (g && (this.content && "function" === typeof this.content || this.contentFormatter)) + a = + {chart: this.chart._publicChartReference, toolTip: this._options, entries: a}, c = this.contentFormatter ? this.contentFormatter(a) : this.content(a); + else if (this.shared && "none" !== this.chart.plotInfo.axisPlacement) { + for (var q = "", h = 0; h < a.length; h++) + if (b = a[h].dataSeries, d = a[h].dataPoint, e = a[h].index, f = "", 0 === h && (g && !this.content) && (q += "undefined" !== typeof this.chart.axisX.labels[d.x] ? this.chart.axisX.labels[d.x] : "{x}", q += "
", q = this.chart.replaceKeywordsWithValue(q, d, b, e)), null !== d.toolTipContent && ("undefined" !== + typeof d.toolTipContent || null !== b._options.toolTipContent)) { + if ("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) + f += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? + this.content : "{name}:  {y}"; + else if ("bubble" === b.type) + f += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "{name}:  {y},   {z}"; + else if ("rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type) + f += d.toolTipContent ? d.toolTipContent : + b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "{name}:  {y[0]}, {y[1]}"; + else if ("candlestick" === b.type || "ohlc" === b.type) + f += d.toolTipContent ? d.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]}"; + null === c && (c = ""); + !0 === this.reversed ? (c = this.chart.replaceKeywordsWithValue(f, d, b, e) + c, h < a.length - 1 && (c = "
" + c)) : (c += this.chart.replaceKeywordsWithValue(f, d, b, e), h < a.length - 1 && (c += "
")) + } + null !== c && (c = q + c) + } else { + b = a[0].dataSeries; + d = a[0].dataPoint; + e = a[0].index; + if (null === d.toolTipContent || "undefined" === typeof d.toolTipContent && null === b._options.toolTipContent) + return null; + if ("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) + f = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "" + (d.label ? "{label}" : "{x}") + ":  {y}"; + else if ("bubble" === b.type) + f = d.toolTipContent ? d.toolTipContent : + b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "" + (d.label ? "{label}" : "{x}") + ":  {y},   {z}"; + else if ("pie" === b.type || "doughnut" === b.type || "funnel" === b.type) + f = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "" + (d.name ? "{name}:  " : + d.label ? "{label}:  " : "") + "{y}"; + else if ("rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type) + f = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "" + (d.label ? "{label}" : "{x}") + " :  {y[0]},  {y[1]}"; + else if ("candlestick" === b.type || "ohlc" === b.type) + f = d.toolTipContent ? d.toolTipContent : + b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "" + (d.label ? "{label}" : "{x}") + "
Open:   {y[0]}
High:    {y[1]}
Low:     {y[2]}
Close:   {y[3]}"; + null === c && (c = ""); + c += this.chart.replaceKeywordsWithValue(f, d, b, e) + } + return c + }; + V.prototype.enableAnimation = function () { + this.container.style.WebkitTransition || (this.container.style.WebkitTransition = + "left .2s ease-out, bottom .2s ease-out", this.container.style.MozTransition = "left .2s ease-out, bottom .2s ease-out", this.container.style.MsTransition = "left .2s ease-out, bottom .2s ease-out", this.container.style.transition = "left .2s ease-out, bottom .2s ease-out") + }; + V.prototype.disableAnimation = function () { + this.container.style.WebkitTransition && (this.container.style.WebkitTransition = "", this.container.style.MozTransition = "", this.container.style.MsTransition = "", this.container.style.transition = "") + }; + V.prototype.hide = + function (a) { + this.enabled && (this.container.style.display = "none", this.currentSeriesIndex = -1, this._prevY = this._prevX = NaN, ("undefined" === typeof a || a) && this.chart.resetOverlayedCanvas()) + }; + v.prototype.getPercentAndTotal = function (a, c) { + var b = null, d = null, e = null; + if (0 <= a.type.indexOf("stacked")) + d = 0, b = c.x.getTime ? c.x.getTime() : c.x, b in a.plotUnit.yTotals && (d = a.plotUnit.yTotals[b], e = isNaN(c.y) ? 0 : 0 === d ? 0 : 100 * (c.y / d)); + else if ("pie" === a.type || "doughnut" === a.type) { + for (i = d = 0; i < a.dataPoints.length; i++) + isNaN(a.dataPoints[i].y) || + (d += a.dataPoints[i].y); + e = isNaN(c.y) ? 0 : 100 * (c.y / d) + } + return{percent: e, total: d} + }; + v.prototype.replaceKeywordsWithValue = function (a, c, b, d, e) { + var f = this; + e = "undefined" === typeof e ? 0 : e; + if ((0 <= b.type.indexOf("stacked") || "pie" === b.type || "doughnut" === b.type) && (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total"))) { + var g = "#percent", h = "#total", q = this.getPercentAndTotal(b, c), h = isNaN(q.total) ? h : q.total, g = isNaN(q.percent) ? g : q.percent; + do { + q = ""; + if (b.percentFormatString) + q = b.percentFormatString; + else { + var q = "#,##0.", k = Math.max(Math.ceil(Math.log(1 / + Math.abs(g)) / Math.LN10), 2); + if (isNaN(k) || !isFinite(k)) + k = 2; + for (var n = 0; n < k; n++) + q += "#" + } + a = a.replace("#percent", ba(g, q, f._cultureInfo)); + a = a.replace("#total", ba(h, b.yValueFormatString ? b.yValueFormatString : "#,##0.########")) + } while (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total")) + } + return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g, function (a) { + if ('"' === a[0] && '"' === a[a.length - 1] || "'" === a[0] && "'" === a[a.length - 1]) + return a.slice(1, a.length - 1); + a = ea(a.slice(1, a.length - 1)); + a = a.replace("#index", e); + var g = null; + try { + var h = a.match(/(.*?)\s*\[\s*(.*?)\s*\]/); + h && 0 < h.length && (g = ea(h[2]), a = ea(h[1])) + } catch (k) { + } + h = null; + if ("color" === a) + return c.color ? c.color : b.color ? b.color : b._colorSet[d % b._colorSet.length]; + if (c.hasOwnProperty(a)) + h = c; + else if (b.hasOwnProperty(a)) + h = b; + else + return""; + h = h[a]; + null !== g && (h = h[g]); + return"x" === a ? "dateTime" === f.plotInfo.axisXValueType || "dateTime" === b.xValueType || c.x && c.x.getTime ? wa(h, c.xValueFormatString ? c.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : f.axisX && f.axisX.autoValueFormatString ? f.axisX.autoValueFormatString : "DD MMM YY", + f._cultureInfo) : ba(h, c.xValueFormatString ? c.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : "#,##0.########", f._cultureInfo) : "y" === a ? ba(h, c.yValueFormatString ? c.yValueFormatString : b.yValueFormatString ? b.yValueFormatString : "#,##0.########", f._cultureInfo) : "z" === a ? ba(h, c.zValueFormatString ? c.zValueFormatString : b.zValueFormatString ? b.zValueFormatString : "#,##0.########", f._cultureInfo) : h + }) + }; + fa.prototype.reset = function () { + this.lastObjectId = 0; + this.objectMap = []; + this.rectangularRegionEventSubscriptions = + []; + this.previousDataPointEventObject = null; + this.eventObjects = []; + u && (this.ghostCtx.clearRect(0, 0, this.chart.width, this.chart.height), this.ghostCtx.beginPath()) + }; + fa.prototype.getNewObjectTrackingId = function () { + return++this.lastObjectId + }; + fa.prototype.mouseEventHandler = function (a) { + if ("mousemove" === a.type || "click" === a.type) { + var c = [], b = ra(a), d = null; + if ((d = this.chart.getObjectAtXY(b.x, b.y, !1)) && "undefined" !== typeof this.objectMap[d]) + if (d = this.objectMap[d], "dataPoint" === d.objectType) { + var e = this.chart.data[d.dataSeriesIndex], + f = e.dataPoints[d.dataPointIndex], g = d.dataPointIndex; + d.eventParameter = {x: b.x, y: b.y, dataPoint: f, dataSeries: e._options, dataPointIndex: g, dataSeriesIndex: e.index, chart: this.chart._publicChartReference}; + d.eventContext = {context: f, userContext: f, mouseover: "mouseover", mousemove: "mousemove", mouseout: "mouseout", click: "click"}; + c.push(d); + d = this.objectMap[e.id]; + d.eventParameter = {x: b.x, y: b.y, dataPoint: f, dataSeries: e._options, dataPointIndex: g, dataSeriesIndex: e.index, chart: this.chart._publicChartReference}; + d.eventContext = + {context: e, userContext: e._options, mouseover: "mouseover", mousemove: "mousemove", mouseout: "mouseout", click: "click"}; + c.push(this.objectMap[e.id]) + } else + "legendItem" === d.objectType && (e = this.chart.data[d.dataSeriesIndex], f = null !== d.dataPointIndex ? e.dataPoints[d.dataPointIndex] : null, d.eventParameter = {x: b.x, y: b.y, dataSeries: e._options, dataPoint: f, dataPointIndex: d.dataPointIndex, dataSeriesIndex: d.dataSeriesIndex, chart: this.chart._publicChartReference}, d.eventContext = {context: this.chart.legend, userContext: this.chart.legend._options, + mouseover: "itemmouseover", mousemove: "itemmousemove", mouseout: "itemmouseout", click: "itemclick"}, c.push(d)); + e = []; + for (b = 0; b < this.mouseoveredObjectMaps.length; b++) { + f = !0; + for (d = 0; d < c.length; d++) + if (c[d].id === this.mouseoveredObjectMaps[b].id) { + f = !1; + break + } + f ? this.fireEvent(this.mouseoveredObjectMaps[b], "mouseout", a) : e.push(this.mouseoveredObjectMaps[b]) + } + this.mouseoveredObjectMaps = e; + for (b = 0; b < c.length; b++) { + e = !1; + for (d = 0; d < this.mouseoveredObjectMaps.length; d++) + if (c[b].id === this.mouseoveredObjectMaps[d].id) { + e = !0; + break + } + e || (this.fireEvent(c[b], "mouseover", a), this.mouseoveredObjectMaps.push(c[b])); + "click" === a.type ? this.fireEvent(c[b], "click", a) : "mousemove" === a.type && this.fireEvent(c[b], "mousemove", a) + } + } + }; + fa.prototype.fireEvent = function (a, c, b) { + if (a && c) { + var d = a.eventParameter, e = a.eventContext, f = a.eventContext.userContext; + f && (e && f[e[c]]) && f[e[c]].call(f, d); + "mouseout" !== c ? f.cursor && f.cursor !== b.target.style.cursor && (b.target.style.cursor = f.cursor) : (b.target.style.cursor = this.chart._defaultCursor, delete a.eventParameter, + delete a.eventContext); + "click" === c && ("dataPoint" === a.objectType && this.chart.pieDoughnutClickHandler) && this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex], d) + } + }; + T(ha, L); + va.prototype.animate = function (a, c, b, d, e) { + var f = this; + this.chart.isAnimating = !0; + e = e || B.easing.linear; + b && this.animations.push({startTime: (new Date).getTime() + (a ? a : 0), duration: c, animationCallback: b, onComplete: d}); + for (a = []; 0 < this.animations.length; ) + if (c = this.animations.shift(), b = (new Date).getTime(), d = 0, c.startTime <= + b && (d = e(Math.min(b - c.startTime, c.duration), 0, 1, c.duration), d = Math.min(d, 1), isNaN(d) || !isFinite(d)) && (d = 1), 1 > d && a.push(c), c.animationCallback(d), 1 <= d && c.onComplete) + c.onComplete(); + this.animations = a; + 0 < this.animations.length ? this.animationRequestId = this.chart.requestAnimFrame.call(window, function () { + f.animate.call(f) + }) : this.chart.isAnimating = !1 + }; + va.prototype.cancelAllAnimations = function () { + this.animations = []; + this.animationRequestId && this.chart.cancelRequestAnimFrame.call(window, this.animationRequestId); + this.animationRequestId = null; + this.chart.isAnimating = !1 + }; + var B = {yScaleAnimation: function (a, c) { + if (0 !== a) { + var b = c.dest, d = c.source.canvas, e = c.animationBase; + b.drawImage(d, 0, 0, d.width, d.height, 0, e - e * a, b.canvas.width / N, a * b.canvas.height / N) + } + }, xScaleAnimation: function (a, c) { + if (0 !== a) { + var b = c.dest, d = c.source.canvas, e = c.animationBase; + b.drawImage(d, 0, 0, d.width, d.height, e - e * a, 0, a * b.canvas.width / N, b.canvas.height / N) + } + }, xClipAnimation: function (a, c) { + if (0 !== a) { + var b = c.dest, d = c.source.canvas; + b.save(); + 0 < a && b.drawImage(d, + 0, 0, d.width * a, d.height, 0, 0, d.width * a / N, d.height / N); + b.restore() + } + }, fadeInAnimation: function (a, c) { + if (0 !== a) { + var b = c.dest, d = c.source.canvas; + b.save(); + b.globalAlpha = a; + b.drawImage(d, 0, 0, d.width, d.height, 0, 0, b.canvas.width / N, b.canvas.height / N); + b.restore() + } + }, easing: {linear: function (a, c, b, d) { + return b * a / d + c + }, easeOutQuad: function (a, c, b, d) { + return-b * (a /= d) * (a - 2) + c + }, easeOutQuart: function (a, c, b, d) { + return-b * ((a = a / d - 1) * a * a * a - 1) + c + }, easeInQuad: function (a, c, b, d) { + return b * (a /= d) * a + c + }, easeInQuart: function (a, c, b, d) { + return b * + (a /= d) * a * a * a + c + }}}, P = {drawMarker: function (a, c, b, d, e, f, g, h) { + if (b) { + var q = 1; + b.fillStyle = f ? f : "#000000"; + b.strokeStyle = g ? g : "#000000"; + b.lineWidth = h ? h : 0; + "circle" === d ? (b.moveTo(a, c), b.beginPath(), b.arc(a, c, e / 2, 0, 2 * Math.PI, !1), f && b.fill(), h && (g ? b.stroke() : (q = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = q))) : "square" === d ? (b.beginPath(), b.rect(a - e / 2, c - e / 2, e, e), f && b.fill(), h && (g ? b.stroke() : (q = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = q))) : + "triangle" === d ? (b.beginPath(), b.moveTo(a - e / 2, c + e / 2), b.lineTo(a + e / 2, c + e / 2), b.lineTo(a, c - e / 2), b.closePath(), f && b.fill(), h && (g ? b.stroke() : (q = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = q)), b.beginPath()) : "cross" === d && (b.strokeStyle = f, b.lineWidth = e / 4, b.beginPath(), b.moveTo(a - e / 2, c - e / 2), b.lineTo(a + e / 2, c + e / 2), b.stroke(), b.moveTo(a + e / 2, c - e / 2), b.lineTo(a - e / 2, c + e / 2), b.stroke()) + } + }, drawMarkers: function (a) { + for (var c = 0; c < a.length; c++) { + var b = a[c]; + P.drawMarker(b.x, b.y, b.ctx, b.type, + b.size, b.color, b.borderColor, b.borderThickness) + } + }}, Ia = {Chart: function (a, c) { + var b = new v(a, c, this); + this.render = function () { + b.render(this.options) + }; + this.options = b._options + }, addColorSet: function (a, c) { + aa[a] = c + }, addCultureInfo: function (a, c) { + ia[a] = c + }, formatNumber: function (a, c, b) { + b = b || "en"; + if (ia[b]) + return ba(a, c || "#,##0.##", new ha(b)); + throw"Unknown Culture Name"; + }, formatDate: function (a, c, b) { + b = b || "en"; + if (ia[b]) + return wa(a, c || "DD MMM YYYY", new ha(b)); + throw"Unknown Culture Name"; + }}; + Ia.Chart.version = "v1.8.1 Beta 2"; + window.CanvasJS = Ia +})(); +/* + excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers. + + Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/ + Licensed under the Apache License, Version 2.0 + */ +document.createElement("canvas").getContext || function () { + function V() { + return this.context_ || (this.context_ = new C(this)) + } + function W(a, b, c) { + var g = M.call(arguments, 2); + return function () { + return a.apply(b, g.concat(M.call(arguments))) + } + } + function N(a) { + return String(a).replace(/&/g, "&").replace(/"/g, """) + } + function O(a) { + a.namespaces.g_vml_ || a.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml", "#default#VML"); + a.namespaces.g_o_ || a.namespaces.add("g_o_", "urn:schemas-microsoft-com:office:office", "#default#VML"); + a.styleSheets.ex_canvas_ || (a = a.createStyleSheet(), a.owningElement.id = "ex_canvas_", a.cssText = "canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}") + } + function X(a) { + var b = a.srcElement; + switch (a.propertyName) { + case "width": + b.getContext().clearRect(); + b.style.width = b.attributes.width.nodeValue + "px"; + b.firstChild.style.width = b.clientWidth + "px"; + break; + case "height": + b.getContext().clearRect(), b.style.height = b.attributes.height.nodeValue + "px", b.firstChild.style.height = b.clientHeight + + "px" + } + } + function Y(a) { + a = a.srcElement; + a.firstChild && (a.firstChild.style.width = a.clientWidth + "px", a.firstChild.style.height = a.clientHeight + "px") + } + function D() { + return[[1, 0, 0], [0, 1, 0], [0, 0, 1]] + } + function t(a, b) { + for (var c = D(), g = 0; 3 > g; 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++; + 1 < c && c--; + return 1 > 6 * 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 < d; r++) { + var t = f[r]; + n.push(t.offset * m + u + " " + t.color) + } + b.push('') + } 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; b < a.length; b++) + this.initElement(a[b]) + }, initElement: function (a) { + if (!a.getContext) { + a.getContext = + V; + O(a.ownerDocument); + a.innerHTML = ""; + a.attachEvent("onpropertychange", X); + a.attachEvent("onresize", Y); + var b = a.attributes; + b.width && b.width.specified ? a.style.width = b.width.nodeValue + "px" : a.width = a.clientWidth; + b.height && b.height.specified ? a.style.height = b.height.nodeValue + "px" : a.height = a.clientHeight + } + return a + }}; + U.init(); + for (var v = [], d = 0; 16 > d; 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.y < c.y) + c.y = f.y; + if (null == d.y || f.y > d.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 +}(); + diff --git a/experiment/simulation/js/cktconnection_monostable.js b/experiment/simulation/js/cktconnection_monostable.js new file mode 100644 index 0000000..25d3bd1 --- /dev/null +++ b/experiment/simulation/js/cktconnection_monostable.js @@ -0,0 +1,649 @@ +jsPlumb.ready(function () { + + var instance, + discs = [], + + addDisc = function (evt) { + var info = createDisc(); + var e = prepare(info.id); + instance.draggable(info.id); + discs.push(info.id); + evt.stopPropagation(); + evt.preventDefault(); + }, + + reset = function (e) { + for (var i = 0; i < discs.length; i++) { + var d = document.getElementById(discs[i]); + if (d) d.parentNode.removeChild(d); + } + discs = []; + e.stopPropagation(); + e.preventDefault(); + }, + + initAnimation = function (elId) { + var el = document.getElementById(elId); + + instance.on(el, 'click', function (e, ui) { + if (el.className.indexOf("jsPlumb_dragged") > -1) { + jsPlumb.removeClass(elId, "jsPlumb_dragged"); + return; + } + + }); + }, + + // notice there are no dragOptions specified here, which is different from the + // draggableConnectors2 demo. all connections on this page are therefore + // implicitly in the default scope. + endpoint = { + anchor: [0.5, 0.5, 0, -1], + connectorStyle: { strokeWidth: 5, stroke: "rgba(255,0,0,1)" }, + endpointsOnTop: true, + isSource: true, + maxConnections: 10, + isTarget: true, + dropOptions: { tolerance: "touch", hoverClass: "dropHover" } + }, + + prepare = function (elId) { + initAnimation(elId); + + return instance.addEndpoint(elId, endpoint); + }, + //----------------for ground-----------------// + endpoint1 = { + anchor: [0.5, 0.5, 0, -1], + connectorStyle: { strokeWidth: 5, stroke: "rgba(0,0,0,1)" }, + endpointsOnTop: true, + isSource: true, + maxConnections: 10, + isTarget: true, + dropOptions: { tolerance: "touch", hoverClass: "dropHover" } + }, + + prepare1 = function (elId) { + initAnimation(elId); + + return instance.addEndpoint(elId, endpoint1); + }, + + // this is overridden by the YUI demo. + createDisc = function () { + var d = document.createElement("div"); + d.className = "bigdot"; + document.getElementById("animation-demo").appendChild(d); + var id = '' + ((new Date().getTime())); + d.setAttribute("id", id); + var w = screen.width - 162, h = screen.height - 200; + var x = (5 * w) + Math.floor(Math.random() * (10 * w)); + var y = (5 * h) + Math.floor(Math.random() * (10 * h)); + d.style.top = y + 'px'; + d.style.left = x + 'px'; + return {d: d, id: id}; + }; + + // get a jsPlumb instance, setting some appropriate defaults and a Container. + instance = jsPlumb.getInstance({ + DragOptions: { cursor: 'wait', zIndex: 20 }, + Endpoint: [ "Image", { url: "littledot.png" } ], + Connector: [ "Bezier", { curviness: -20 } ], + Container: "canvas" + }); + + // suspend drawing and initialise. + instance.batch(function () { + var e1 = prepare1("ld1"), + e2 = prepare("ld2"), + e3 = prepare("ld3"), + e4 = prepare("ld4"), + e5 = prepare("ld5"), + e6 = prepare("ld6"), + e7 = prepare("ld7"), + e8 = prepare("ld8"), + e9 = prepare("ld9"), + e10 = prepare("ld10"), + e11 = prepare("ld11"), + e12 = prepare1("ld12"), + e13 = prepare("ld13"), + e14 = prepare1("ld14"), + e15 = prepare("ld15"), + e16 = prepare1("ld16"), + e17 = prepare("ld17"), + + clearBtn = jsPlumb.getSelector("#delete-connct"), + addBtn = jsPlumb.getSelector("#add"); + +//-----------------------delete clicked connection--------------------------------// + instance.bind("click", function (conn, originalEvent) { + if (confirm("Delete connection from " + conn.sourceId + " to " + conn.targetId + "?")) { + instance.deleteConnection(conn); + } + }); + + /* var detachLinks = jsPlumb.getSelector(".littledot .detach"); + instance.on(detachLinks, "click", function (e) { + instance.deleteConnectionsForElement(this.getAttribute("rel")); + jsPlumbUtil.consume(e); + });*/ + + //instance.on(document.getElementById("delete-connct"), "click", function (e) { + // instance.detachEveryConnection(); + //showConnectionInfo(""); + // jsPlumbUtil.consume(e); + + //}); + }); + + jsPlumb.fire("jsPlumbDemoLoaded", instance); + + document.getElementById("check-button").addEventListener("click", function () { + //var d = instance.exportData(); + //console.log(instance.getAllConnections()); + + + var correct_connections_1_12 = [ + { + "source": "ld1", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld1" + } + ]; + + var correct_connections_16_12 = [ + { + "source": "ld16", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld16" + } + ]; + + var correct_connections_14_12 = [ + { + "source": "ld14", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld14" + } + ]; + + var correct_connections_3_17 = [ + { + "source": "ld3", + "target": "ld17" + }, + + { + "source": "ld17", + "target": "ld3" + } + ]; + + var correct_connections_5_15 = [ + { + "source": "ld5", + "target": "ld15" + }, + + { + "source": "ld15", + "target": "ld5" + } + ]; + + var correct_connections_6_13 = [ + { + "source": "ld6", + "target": "ld13" + }, + + { + "source": "ld13", + "target": "ld6" + } + ]; + var correct_connections_7_11 = [ + { + "source": "ld7", + "target": "ld11" + }, + + { + "source": "ld11", + "target": "ld7" + } + ]; + var correct_connections_11_13 = [ + { + "source": "ld11", + "target": "ld13" + }, + + { + "source": "ld13", + "target": "ld11" + } + ]; + var correct_connections_9_10 = [ + { + "source": "ld9", + "target": "ld10" + }, + + { + "source": "ld10", + "target": "ld9" + } + ]; + var correct_connections_4_9 = [ + { + "source": "ld4", + "target": "ld9" + }, + + { + "source": "ld9", + "target": "ld4" + } + ]; + + var correct_connections_8_9 = [ + { + "source": "ld8", + "target": "ld9" + }, + + { + "source": "ld9", + "target": "ld8" + } + ]; + + + + + + //a connection outside this will invalidate the circuit + var allowed_connections = [ + { + "source": "ld1", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld1" + }, + { + "source": "ld16", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld16" + }, + { + "source": "ld14", + "target": "ld12" + }, + + { + "source": "ld12", + "target": "ld14" + }, + + { + "source": "ld3", + "target": "ld17" + }, + + { + "source": "ld17", + "target": "ld3" + }, + + + + { + "source": "ld8", + "target": "ld9" + }, + + { + "source": "ld9", + "target": "ld8" + }, + + { + "source": "ld4", + "target": "ld9" + }, + + { + "source": "ld9", + "target": "ld4" + }, + { + "source": "ld5", + "target": "ld15" + }, + + { + "source": "ld15", + "target": "ld5" + }, + { + "source": "ld7", + "target": "ld11" + }, + + { + "source": "ld11", + "target": "ld7" + }, + { + "source": "ld6", + "target": "ld13" + }, + + { + "source": "ld13", + "target": "ld6" + }, + { + "source": "ld11", + "target": "ld13" + }, + + { + "source": "ld13", + "target": "ld11" + }, + { + "source": "ld9", + "target": "ld10" + }, + + { + "source": "ld10", + "target": "ld9" + }, + ]; + + var actual_connections = instance.getAllConnections(); + + var is_connected_1_12 = false; + var is_connected_14_12 = false; + var is_connected_16_12 = false; + var is_connected_3_17 = false; + var is_connected_5_15 = false; + var is_connected_8_9 = false; + var is_connected_6_13 = false; + var is_connected_4_9 = false; + var is_connected_7_11 = false; + var is_connected_11_13 = false; + var is_connected_9_10 = false; + + var unallowed_connection_present = false; + var count =0; // counts number of connection + + + actual_connections.forEach(function (connection) { + count++; + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_1_12){ + is_connected_1_12 = correct_connections_1_12.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + if(!unallowed_connection_present){ + unallowed_connection_present = !(allowed_connections.find(function (conn) { + return (conn.source === this_connection.source && conn.target === this_connection.target); + })); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + + actual_connections.forEach(function (connection) { + + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_14_12){ + is_connected_14_12 = correct_connections_14_12.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + actual_connections.forEach(function (connection) { + + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_16_12){ + is_connected_16_12 = correct_connections_16_12.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + + + actual_connections.forEach(function (connection) { + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_3_17){ + is_connected_3_17 = correct_connections_3_17.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + }); + + actual_connections.forEach(function (connection) { + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_8_9){ + is_connected_8_9 = correct_connections_8_9.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + }); + + actual_connections.forEach(function (connection) { + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_5_15){ + is_connected_5_15 = correct_connections_5_15.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + }); + + actual_connections.forEach(function (connection) { + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_6_13){ + is_connected_6_13 = correct_connections_6_13.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + }); + + actual_connections.forEach(function (connection) { + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_4_9){ + is_connected_4_9 = correct_connections_4_9.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + }); + actual_connections.forEach(function (connection) { + count++; + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_7_11){ + is_connected_7_11 = correct_connections_7_11.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + actual_connections.forEach(function (connection) { + count++; + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_11_13){ + is_connected_11_13 = correct_connections_11_13.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + actual_connections.forEach(function (connection) { + count++; + var this_connection = { + "source": connection.sourceId, + "target": connection.targetId + }; + + if(!is_connected_9_10){ + is_connected_9_10 = correct_connections_9_10.find(function (conn) { + return conn.source === this_connection.source && conn.target === this_connection.target; + }); + } + + // if this_connection exists in correct_connections + // remove this connection from correct ones + // continue + // else + // return false + + }); + + + // if (is_connected_1_12 && is_connected_14_12 ) { + if (is_connected_1_12 && is_connected_14_12 && is_connected_16_12 && is_connected_3_17 && is_connected_8_9 && is_connected_5_15 && is_connected_6_13 && is_connected_4_9 && is_connected_7_11 && is_connected_11_13 && is_connected_9_10 && !unallowed_connection_present) { + + + document.getElementById('clr').disabled = false; + document.getElementById('graphplot').disabled = false; + document.getElementById('calculte').disabled = false; + + + alert("RIGHT CONNECTION \n set resistance"); + } else { + alert("WRONG CONNECTION"); + return; + } + + + + }); +}); + + + +function deleteconnection(){ +window.location.reload(); +} + + diff --git a/experiment/simulation/js/graph.ob.js b/experiment/simulation/js/graph.ob.js new file mode 100644 index 0000000..0f16cd4 --- /dev/null +++ b/experiment/simulation/js/graph.ob.js @@ -0,0 +1 @@ +eval((function(){var d=[94,74,90,71,81,86,88,85,75,89,66,82,70,76,60,79,87,72,80,65];var e=[];for(var b=0;b=0;g--){var h=null;var i=f[g];var j=null;var k=0;var l=i.length;var m;for(var n=0;nk)j.push(i.substring(k,m));j.push(f[h+1]);k=n+1;}if(j!=null){if(k:","; "^r-size:","px; font-wJ!",";","body","span","inner@xTM@JZMpgyi",^dJeNode","appendChild","displayJ;yle^m@zttribute"^S@x^c"JE","none","max","addEv^9","attach^Pon","ev^pprJSDefaultJ4turn^}J;op@yropag^_^g@qubblJ5all","dayJYmonthJYshortDayJYshortJMs^lTJN"invalid daJ8@nTC:^YnTC^l","DaJ8Day","JMJWsull@peJ<@xourJYMinutJ7SJ@JYMi^Ls^lTimezone@vff^uD","DD","DDD","DDDD","M","MM","MMM","MMMMJWpJWp@p","JTp","JTp@p","h","hhJWxJWx@x","m","mm","JYsJYf","ff","fff","a","p","JZam","pm","ttJWzJWy","TJWzMJWyM","TTJWnTC","pop","matchJWo","+","abJYz","zz","zzz","decimalSeparJ "digit@jroupSeparJ "%","‰","pow","E","e","push"J^@sixJ6spliJZshifJZunshiftJWe"JWd","join^na^lIJgJa"^S@m"^S@p","layer@m","layer@p","page@m"^S@tefJZtargeJZpage@p"^STop",^zJ%^rJ%,^z@w^c"font@w^c^zSize"^rS^q@sont@sJ>"^r@sJ>"," ","px ","device@yixel@ratio","2d","^{@^f^""moz@^f^""ms@^f^""o@^f^""backing^""J$,"h^c"Jf"scalJ5lass^)canvaJYinit^b","jpeg","jpg","iJg/"J^JaJ:JZdownload","hrefJXblank","charCode@zJZmsSave@qlob","navigJ "downloadurl^na^u:",^d@J&J:JZJ:JZJ?JUs",^d^PclJR"initJ?^Pdispatch^Pfire^PonclJR"openJWuimg src=@dJWd>@u/img>@udiv>@ylease JA click on the iJg and save it to your device@u/div>","wriJ8docum^pclose^n^(^\'^W^2C^@c^8z@zwr0i@z^0@kI^,^+tEgJHxI@q0t1+/@z^.^*^$^&^so@rSJ:q@lEi@hrd@p/i@s1@s@sMfxzwn@ir@jIS@nS@r/@h@t@jIhoh/@ki@rN@q@t@wxM@tI@wEkwbgi@zo@sgo@w2mhl@p6dgp@p2Il@r@q@rx@qS@ohSJiIkl@w@h@r@puM@i@o@zhiyop@ziaT@p7@sv@rtm@i+/ed9/z@x@rjez@tw5v/@v9d86cu@i@j@ipmJ:zfdn5o9Dfd@iN@t@mpjz+@tzi@ygyIl6Mi@j0j@yT@hz@i@quyDrJO@lm0@y/JibljTb4To@p/g@jew@p@z7@oyCl+1b3D@n@p@zNvwbi@xw0gC@z@j@rz@q@vzjT@z@mE@vu0cC4Ch+r5x/@xrpdrc@imvID@sSucMtn@pC@pC++6@xmNDw8@s@oDT34ETrf639/az@vr5vw@rk/g5fbeu@z@qtgC04@m@wk9@l@k@tciM@y4E@x/3@z@szEr@rNC7M@ml@kmsesSo@xs@j@yE23hmEo@q@w+61@o66@xM@m@smIMvN8myil@mS36@r01ub+@of@pvw43@i@mw@pD@m+@z@xJO@zci4p@s@homfmr/ihmNofESs@qIm@h@jk7mlncrM45n5@h@ybhz0k@z@wpsv+juxa@m21@pI@ym@l@hS2uNz@hMS6@iNexC0d+I7f@n@w@m@t@syz2kS@ilp@w@yv@zSlmq@zf/@s@mN@mf3@s@z@s2@s/1@tu@sif@zlion@q6d@ruSI2Iw@xi6lzm@mmp6x@r8@m@p0fiIh7ps@zwh+3@suDk@r@x@k@ljl+a8lk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0Jf"^a","3px 4^j4Jf"css@sloaJZlefJZtitle","^\\_cultureInfoJWuimg style=@dhJ!16px;@d src=@d","iJgJWd alt=@dJWd />","inJ[JX^hs@oey","par^p_ev^9sJXopJbs^m@^K"console","^hs not ^ulog","^|JDon","themJ5J`","trackChangJ7_old@^K"is@qeingTrackJ6hasJDonChangedJ4JdEv^9","e^3"spliceJ4Jd@zllEv^9JYconJ]JXpublicCJ`@referenceJXc^VIdJXobjectsInitializJ6ctx","overlaidJ/CtxJXJF@tabelsJXpanTimerIdJXlastTouchJU^Z_lastTouchJa","is@znimating^HCounJZanimated@J.","disableTJ3","pan^B_^hCursor","^h","^JJXdataIn@J.ed@vrdJ9_c^VJ;ring^l^b@qyId","J/@hS Error: CJ` C^V with id @e"JWe" was not found",^XJ$,^Xx^c"x1","y1","x2","y2JXselectedC^^","c^^JXcanvas@hSC^V","div^)c^V","J]@zlign","cursor","0Jf"absoluJ8J]@qaseJ[","^J^Ioverlaid^I_JSManagerJ4s^q_^|Size^HJXtoolJh^)toolbJDown",J1startJXtouchE^3^>Move",J1Jd",^>@np",J1end",^>Cancel",J1cancelJXJ-@tink^)J-","outJ[:none;marginJIposiJb:^OJA:3px;top:","px;cJc:dimgrey;J]-decoraJb:noneJ)size:10pxJ)fJ>:@tucida @jrande, @tucida Sans @nnicode, J#,^1tabJBJXtJ3","tJ3^Qm^Qp^Qp2","session@lariablJ7_^|@^K"backgJEJ(JJa(0,0,0,0)","culture"^?^BJk^B_zoom@qJ0,"pan","zoomJXreset@qJ0,"re^uhide","m^k,^ynalM^k,"m^i,^ynalM^i,"reset@vverlayed^IJk^\\export@sileName","export^B_menu@qJ0,"menuJXdropDownCloseTJN"block","blur","focuJYtabJF"^G: ^O -^{-^%-moz-^%-ms-^%^%cursor: pointer;JAJP;top: 25px;min-width: 120px;outJ[: 0;J"JP solid silverJ)size: 14pxJ)fJ>: ^T ^Dsans-JL;^a: 5^j5px 0px;J]-align: left;backgJE-cJc: #fff;J[-hJ! 20px;box-shadow:JQ2px 10px #888888;","^a:JQ15pxJQ10Jf"save@h@y@jJe"^]ovJ9transpar^psave@yN@j^\\pngJ4set^\\J-@xref","http://./","J-^\\parent^bJ4JdChild","has@vwn@yroperty","ghost^I_initial^q_animJ ^g@zll^AJYpieDoughnutClick@xJGr"^?^RId",^g^R@znim@sramJ5lear^I_JSs"^xInfo","layoutManagJ9_supportedCJ`TypJ7last@J&Id","name","^F ","cJcJXc^^","JF^[J;epJC","spJ[","areaJ;epJ\',"s^="stackedJ\'^N@Jj100"^`J\'^`S^="cJGstJR"ohlc","markerSize^5JYscattJ9bubble","sort^Qylacem^pxySwappJ6@pou cannot combine @e"^:barJ,^:pieJ,^:J[, area, cJ= or pieJ,^:J[, area, cJ= or barJ,","bJ x: ","; y:","cJ+dJU@yaramJ4leaseCJ+","cJ+^mCJ+","enabled"^]E^3JlgStartJ2^[CoordinatJ7_absoluteM^k,"_absoluteM^i^]Move@xJGr","xM^k,"xM^i,^yvJ_^yval^Zglobal@zlphaJV@z0@z@q@q8","translate^YyixelCoordinates@vn^Ma^YyixelCoordinates@vn@zxis"J^@towerCasJ5J`Type^!CJc^!Size^!@sJ>^!Style^!@weight^/qackgJEJ(^7Max@width^/wrap"^N^Yyercent@zndTotal^/sormattJ9JF@oeyword"J^tJ_"percent"^7J4place@oeywords@with^}^/ylacement^/vrient^_"direcJb","measure^\\inside","point"^`","verticJ_"fadeIn^A","easeIn@kuad","easing","save","^v"clip^[Thickness^mJCDash^[Dash^ZobjectMapJ4ferencJ5onversion@yarameterJYpixel@yer@nnit^lMarker@yropertiJ7s^qJ"ThicknesJYdrawMarkersJ4store","xClip^A^[J Sample Tooltip@u/div>","J=Div","firstChildJ"@radiuJh_last@npdatJr"sharJr"value@vf","objectJlJATJLInner@xTM@t","bJ%","rgba^d,.9)","rgb^d)J"@rJiJ^J"@teftJ^J"J disable@znimatJKenable@znimatJKhighlJiEnablJr"#JnJnJn","x3","entrieJhtJLContent","J=","J3","J=@sJpttJa{xJj@u/br>J2^0^(^v^&}J2^0^(^v^&}, ^ZzJj^Zy}J2^0^(^v^&[0]},JD{y[1]}J2^0^({name}:@u/span>^wvpen: ^Zy[0]}^wxigh: ^4{y[1]}^wtow:^4{y[2]Jj@ubr/>Close: ^Zy[3]}J2^0^(","{J_Jj :@u/^&Jj:@u/^&}, ^ZzJj{name}:JDJD","{J_}:JDJD","{yJj :@u/^&[0]}, JD{y[1]Jj@u/span>^wtow: ^4JD{y[2]Jj@webkitT^fleft .2s ease-out, bottom .2s ease-out","MozT^fMsT^ft^f#percent","#total","percent^\\","#,##0.","y@^/","#,##0.########","#iJ;x@^/","DD MMM @p@p","z@^/","rectangular@regionEventSubscriptionJhprevious^tEvent@JV","JOvered@JVMapJhevent@JVsJANew@JVTrackingId","event@yarametJaeventConJkJ8JOverJ8mousemoveJ8JOutJ8click","userContJJCJWInfo","J&JhsJvTimJfduratJKonCompletJfdest","sourcJfJ&@qasJfcrosJhoptionJh@nnknown CJW NamJfDD MMM JB@p","JuJKv1.7.0 @j@z","Canvas@hS"];(J3(JF@n=false;var T=!!document[_$JS2]](J!])[_$JS0]];var y={CJTJ`:500,hJP400,zoomE^[bJ%^N3],theme^}4],J&E^[J&^r200,data@yoint^Jc^>5],cJW^}6],creditText^}7],Jcactivity^aexportE^[export@sileName^}8]},TJRpadding:0,JkJ@ver^#[9J9^$[10],JoSize:20,fo^*11],f^ Jd^+3],f^,2]^;0,J[^N13],^W:0,ba^)margin:5,J)^?dockInside@ylot@zreaJC},SubtJRpadding:0,JkJ@ver^#[9J9^$[10]^So^*11],f^ Jd^+3],f^,2]^;0,J[^N13],^W:0,ba^)margin:2,J)^?dockInside@ylot@zreaJC}^xnamJ7ver^#[10J9^$[14]^So^*15],f^ Jd^+3],f^,2],cursor^qJOver^qJOut^qmousemove^qclickJ@dockInside@ylot@zreaJC,reJuedJC^?max@xeJi^q^Jitem@J`^q@J),itemText@sJptter:null},TJL:{enabled:true,sharedJC,J&^aJ=J@J=^HreJuedJC,ba^)J[J^:null^;2,^W:5^S^+6],fo^*17],f^ Jd^,8]},@zxis:{minimumJ:aximumJ@JcvalJ@JcvalTypJ7titlJ7title^"13],^F0J\\@so^*19J$^ 12J$^,2J<@zngle:0J-o^*19J<^"13^22J-^ 12]J-^,2J<@zuto@sitJCJM@J)JM^JJ_^Hprefix^Ysuffix^Yinclude@iero:true,tick@tength:5,^513^C1,l^13^D1,lJ]^3^:22]^I0,gridDas^3JclacedC^uvalue^\\J:argin:2,sJ#s:[]},SJ#:{valuJ7sJv@laluJ7end@laluJ7color^}23],opacityJ@tJ+:2,lJ]^3J_^YJ_@qJ%^N24^{^*19J<^"23^22J-^ 12]J-^,2J<^Hshow@vnTopJC}^`namJ7data@yointsJ@J_^YbevelE^[highlJi^acursor:null^c^}20^Mylacement^}25^Mvrientation^}26]^c^"13^-JN2^c@s^,2^Mso^*27^Ms^ 12^Mqa^)J.bel@tineC^uJ.^71^c@tJ]^3^m^JJ.bel@J)^c^HJmTJ+:2,lJ]^3c^urising^N3],fill@vpacityJ@sJv@zngle:0,t^h28],xJGT^h29],axis@pT^h30],x@^/J@y@^/J@z@^/J@percent^\\J@showIn@tJb^8Jl^8C^ulJbText^8^e^8^@^gT^h31],JIJ^^gSize^g^e^g^@J:ouseoverJ:ouseoutJ:ousemovJ7clickJ@tJLContentJ@visible:true},TeJ/:{x:0,y:0,J`J@hJPnull^?max@xeJiJ@padding:0,angle:0,Jk^Yhoriz^$J\'JN2,fo^*15],f^ Jd^+3],f^,2]^;0,J[^N13],^W:0,ba^)Jk@qaseJm^}9]},CJWInfo:{decimalSeparator^}7],digit@jroupSeparator^}32],zoom^P3],pan^P4],reset^P5],menu^P6],save@h@y@j^P7],save@yN@j^P8],days^o39^i0^i1^i2^i3^i4^i5]],shortDays^o46^i7^i8^i9^n50^n51^n52]],months^o53^n54^n55^n56^n57^n58^n59^n60^n61^n62^n63^n64]],shortMonths^o65^n66^n67^n68^n57^n69^n70^n71^n72^n73^n74^n75]]}JXv={"en":{}JXo={"colorSet1"^o76^n77^n78^n79^n80^n81^n82^n83^n84^n85^n86]],"colorSet2"^o84^n87^n88^n89^n90^n91^n86^n92]],"colorSet3"^o93^n94^n95^n96^n97^n98^n99^b0^b1^b2^b3^b4^b5^b6]]JXbk={"theme1":{CJTc^>5]},T^|^!07JY^<33,f^+08],f^ J4^#^OSubt^|^!07JY^<16,f^+08],f^ J4^#^OJ>^F6J\\^"110J$ont^!^R^{nt^!^R^28JM^"111],^5112^C2^I2,^:112^D2,l^112]}^xver^#[113J9^$J\'^!^^5]}^`^m^"111^-^!^R^-JN8,J.^71}},"theme2":{CJTc^>115]},TJRfo^*116],JoSize:32,f^+17],ver^#^OSubtJRfo^*116]^S^+17],ver^#^OJ>^F2J\\^"118J$ont^!^^9J$^ 109^{nt^!19]^}19^26JM^"111]J-^ 109],^5111^C2^I2,^:111],l^111^D0}^xver^#[113J9^$J\'^!^^9]}^`^m^"111^-^!20]^}19^Ms^ 109^-JN8,J.^71}},"theme3":{CJTc^>5]},T^|^!21JY^<32,f^+08],f^ J4^#^OSubt^|^!21JY^<16,f^+08],f^ J4^#^OJ>^F2J\\^"118J$ont^!22]:^p^{nt^!^R^28JM^"111],^5111^C2^I2,^:111^D2,l^111]}^xver^#[113J9^$J\'^!^^5]}^`bevel^a^m^"111^-^!23]:^p^-JN8^c@t^124],J.^72}}JXr={number^r,yearJ?^9@b364,monthJ?^9@b30,weekJ?^9@b7,dayJ?^9,hour^r000@b60@b60,minute^r000@b60,second^r000,millisecond^r,day@vf@week@sromInt^o39^i0^i1^i2^i3^i4^i5]]};J3 @s(mM,mb){mM^Q=@k(mb^Q);mM^Q[J!26]]=mM;mM[J!27]]=mb^Q^j@k(nr){J3 nq(){}nq^Q=nrJ, new nq()^jc(lc,mp,ek){if(ek===J!28^A0^L29^T^%6[131^A3^L32^T^%6[134^A6^L35^T^%6[137^A9^L38^T^%6[140]^K2^B1^T^%6[143]^K2^B1Js+7@bmp)}e^%6[144]^K6^B5^T^%6[147]^K9^B8Js+1@bmp)}}}}}}}}J,lc^js(mp,ekJ(r[ek+^p0]]@bmp^y@i(kN,dwJFce=falseJtkN@u0){ce=true;kN@b= -1;};kN=_$JS20]+kN;dw=!dw?1:dw;while(kN^Gdw){kN=^_kN}J,ce?^p3]+kN:kN^jbn(l@h){if(!l@hJ(l@h};l@h=l^X4]](/@g@es@es@b/,_$JS20]JQnz=/@es/;var cc=l^X2]];while(nz[^p6]](l^X5]](--cc))){}J,l^X7]](0,cc+1)^j@j(c@h){c^X8]]=J3(cz,c@z,cT,cS,gz,f@o,eI,f@h){if(eI^E59]]=eI}Jtf@h^E60]]=f@h}Jt typeof gz===J!61]){gz=5}^=2]]=f@o^=3Js^=4Je+gz,c@^.5Je+cT-gz,c@^.6]](cJ5,cJ5+g^.5]](cJ5+cS-g^.6]](cJ5+cS,cz+cT-gJ6)^=5Je+gJ6)^=6]](cJ6,cJ6-g^.5Je,c@z+g^.6Je,c@z,cz+gz,c@^.7JsJteI^E68Js}Jtf@h&&f@o>0^E69Js};}^yq(my,mdJ(my-md^yp(mw,mxJ(mw^l0]]-mx^l0]]^y@r(mpJFnt=((mp&0xJZ00)>>16)^l1]](16JQns^zJZ)>>8)^l1]](16JQmd^z00Jn)>>0)^l1]](16);nt=nt^G2?^_nt:nt;ns=ns^G2?^_ns:ns;md=md^G2?^_md:mdJ,J!72]+nt+ns+md^jbc(nt,ns,mdJFmp=(nt@u@u16)|(ns@u@u8)|(md)J,mp^jS(mpJFnu=[];var nt=((mp&0xJZ00)>>16JQns^zJZ)>>8JQmd^z00Jn)>>0);nu[0]=nt;nu[1]=ns;nu[2]=mdJ,nu^jg(mqJFms=this[^p2]]>>>0;var mr=Number(arguments[1])||0;mr=(mr@u0)?Math^l3]](mr):Math^l4]](mr)Jtmr@u0){mr+=ms};for(;mr@ums;mr++){if(mr in this&&this[mr]===mqJ(mr}};re~ont@weight^}~@samily:T?J!~@sont^N~tical@zlign:_$_b976~ontal@zlign:_$_b976~lse {if(ek===_$_b97~span>^Zy~^0o~or:{color};@d@e"@d>~ckgroundC^u~nt@samily^}~ont^N1~ontStyle^}1~^Msont~z)^=~lalue^\\~n style=@d@e"@dcol~ine^N1~^{ntSize:1~hT^h21],~JDJDJD~tick^N~r-select: noneJg~bel@tineTJ+:~J@legendMarker~n:1000@b60@b60@b24~grid^N~,borderTJ+:~976[15],JoSize:~;this[J!6~olorSet^}~,max@widthJ@~@qorderTJ+~]){lc[J!3~^L4~],tickTJ+:~],lineTJ+:~){this[J!~title@sontSize:2~[^p2]]@u~@sormatterJ@~,gridTJ+:~Max@widthJ@~){lc[J!4~]](lc[J!~]^c@~Color^}~[9],margin:5},~Text^}3~[J!25]]~07]:^p~,fontJN4,f~Js+1@bmp)}e~J0@sont~","title@sont~corner@radius~@h[^p~^}20],~JDJD{~nabledJC,~@sJptString~"lJbMarker~14]^}1~^p1]+~,DataSeries:{~Enabled:true,~^n10~,^m~(255,255,255~@qorderJ^~ransitJK~J:arker~ype^}~^n4~;^y~J?n","~[J!7~J.bel~],_$JS~:[_$JS~J!5~J@item~J?n:1~@xeJi","~Data@yoint~olorJ@~{name}:@u/~","@ubr/>@~,@tJb:{~}J3 ~=((mp&0x00~]J-o~JRfont~:_$JS~@J`","~_$JS1~","J[~trip@tine~]J\\@s~ackground~animation~[10],Jo~){return ~Jq:true~J^","~hickness~;return ~JM@s~index@ta~xt@qlock~","J_~,"render~","@uspa~function~109],ver~z+cT,c@z~z,c@z+cS~eJ@~","item~],horiz~J@m~ndex","~]JM~content~@zxis:{~Duratio~:null,~","get~@p@p@p~:false~ ~pxJg~){var ~@lalue~@tabel~marker~ext","~ion","~oolTip~,J_~Size:1~mouseo~eJi:~);var ~itle:{~_b976[~hart:{~Jn@s~vbject~ulture~};var ~]:_$_b~Jn00~border~,title~ineDas~Color~label~width~er","~egend~inter~12],f~]](cz~e","~;","~s","~ight~}","~text~Type~line~@s@s~font~orma~wrap~ed",~]]()~;if(~vers~tart~}}}}','turn -1^Oa(l@oJ*l^J75JDl^J75]]=g^kl@o;}JE@x={}J-jJ?^a@h(eN,e@v,e@k){e@k=e@k||^q12J,ht=eN^i176]+e@v^i176]+e@kJ(S=@x[ht]JCisNaN(cS)){try{JEm@p=^q177]^i178]+eN^i179]^i180]+e@v^i181]+e@k^i182]JC!bjJ)m@m=^,183]];bj=^,2^M184]);bj^\\85]]=_^6m@i=^,187^M186]);bj^\\88]](m@i);m@m^\\88]](bj);};bjJG^!189^N20];bjJ+76^C6[190],m@p);cS=^?193]](bj^\\92]]);bjJG^!189^N194];}catch(e){cS=^?173]](e@v@b1.1)};cS=^?195JJS,e@v);@x[ht]=cS;^kcS^O@t(nl,nmJ$k=[];nl=nl||^j1];lineJSTypeMap={"solid":[^pash":[3,1^pot":[1,1^pashJ13JP,1^pashDotJ13JPJP,1],"dot":[1,JTdash":[4,JTdashJ14,2,1,JTlongJS":[8,JTlongJSJ18,2,1,JTlongJSDotJ18,2,1,2,1,2]};nk=lineJSTypeMap[nlJ7k){for(JEcc=0;cc@unkJ+^7nk[cc]@b=nm}J!nk=[]^knk^Ob(l@o,l@r,mn,moJ>l^J96JDl^J96]](l@r,mn,mo||JRe)^`l^J97JDl^J97^M198]+l@r,^men){en=en||window^\\99]];en^W00]]=en^W00]]||f^den^W01]]=J2;en^W02]]=en^W02]]||f^den^W03]]=JH};mn^W04]](l@o,en);})J!return J2}}JEx=f^dJEbt=/D{1,4}|M{1,4}|@p{1,4}|hJ/@xJ/mJ/sJ/f{1,3}|tJ/TJ/@o|z{1,3}|"[@g"]@b"|@d[@g@d]@b@d/gJ-p=^X9^V40^V41^V42^V43^V44^V45^zr=[^q46^V47^V48^V49^V50^V51^V52^zq=[^q53^V54^V55^V56^V57^V58^V59^V60^V61^V62^V63^V64^zs=[^q65^V66^V67^V68^V57^V69^V70^V71^V72^V73^V74^V75^zu=/@eb(?:[@yMCE@z][SD@y]T|(?:@yacific|Mountain|Central|Eastern|@ztlantic) (?:Standard|Daylight|@yrevailing) Time|(?:@jMT|@nTC)(?:[-+]@ed{4})?)@eb/gJ-v=/[@g-+@ed@z-@i]/g^u^mb@z,b@q,bwJ)bz=^B[205]]:bpJ"j=^B[206]]:bqJ"t=^B[207]]:brJ-M=^B[208]]:bsJ"h=_^6bNJ&b@z=b@z&&b@z^W09]]?b@z:b@z? new Date(b@z): new DateJCisNaN(b@z)){throw SyntaxError(^j10])}JCb@q[^:0,4)^c[211]){b@q=b@q[^:4);bNJ\'J-I=bN?^j12^Y213J,bx^.214^^y^.215^^@s^.216^^@v^.217^^C^.218^^E^.219^^@o^.220^^D^.221^^@x=bN?0:b@z^W22JF;b@h=b@q^5bt,^mb@y){switch(b@y){case ^j23^_x^-24^Ax^"25^Qt[by]^-26^_z[by]^-27^Qs+1^-28^A@s+1^"29^_M[b@s]^-30^Qj[b@s]^-31]^vparseInt(^y@v)[^:-2))^-32]^%@v)[^:-2)^"33]^%@v)[^:-3),3)^-34^A@v,4)^-35^_C%12||12^-36^AC%12||12^"37^_C^-38^AC^"39^_E^-40^AE^"41^Qo^-42^A@o^"43]^v^yD)[^:0,1)^-44]^%D)[^:0,2)^"45]^%D)[^:0,3),3)^-48]:r^&6[246^Y247]^-51]:r^&6[249^Y250]^-54]:r^&6[252^Y253]^-57]:r^&6[255^Y256]^-61^_N?^j58]:(^y@z)^W60]](bu)||^W0]])^W59JF^5bv,^H^-64]^v(b@x>0?^[3^Y262])+^?J5^?^h/60)^-65]^v(b@x>0?^[3^Y262])+@i(^?J5^?^h/60)^"66]^v(b@x>0?^[3^Y262])+@i(^?J5^?^h/60),2)+@i(^?^h%60,2);;default^vb@y[^:1,b@y^9-1);;}})^ub@h;};}()JA@m^Rt,b@i,bwJ6t==J?^l_^b};ct=Number(ct)J(e=ct@u0?JH:JReJ@e){ct@b= -1}J"n=^B[267]^Y7]J"l=^B[268]^Y32J#u=_^b;b@i=^y@i)J(i=1J(rJ"h=_^6ch=_^6bT=-1J(b=[J#a=[J#n^sm^sj^sf=JReJ"p=0;ch=b@i^W60]](/"[@g"]@b"|@d[@g@d]@b@d|[eE][+-]@bJQ|[,]+[.]|‰|./g)J(gJ?;for(JEcc=0;ch&&cc@uchJ+^7cg=ch[cc]^3[7]&&bT@u0){bT=cc;continue ;}el^$[269JKi@b=100}el^$[270JKi@b=1000;continue ;^Pg[0]^c[32]^/^#7JKi/=^?271]](1000,cg^9-1);bT=cc+cg^9-1;continue ;^`(^*72]||^*73])^/^#JN){cf=JH}}}J0bT@u0){cb^W74J3^3[1^46^wn++}el^$[32JKj++}};^ta^W74J3^3[1^46^wm++};};}J@fJ)cd=^?174JJt);b@p=(cd===0?_^b:String(cd))^9-cn;ci/=^?271]](10,b@p);};ct@b=ciJCbT@u0){bT=cc};cu=ct^W75JJm)J(q=cuJG^K$_b976[7])J(w=(cqJQ^H^W76]](^HJ(v=(cq[1]+^H^W76]](^HJ@w&&cw[0]^c^ww^W77JF}J(o^sl^sk=0J-S=0J"m=0;J4cb^0J;b^W59JF^3[1^46^wo++J@o===cnJ)b@w=cw;cw=[]^3[JNJ)cs=cn-cl-(b@w?b@w^9:0);J4cs>0){b@w^W78^MJN);cs--;};};J4b@w^0^xw^W59JFJU;b@m++JCb@m%bS===0&&ck===cj&&b@w^0^xlJ<}J@eJ=^[3]J<^Pw^0J=cw^W59JFJU;cl++;b@m++;}el^$[JNJ=^[1]JU;cl++;b@m++;J0b@m%bS===0&&ck===cj&&cw^0^xlJ<};^`(^*72]||^*73])^/^#JN&&/[eE][+-]@bJQ/[^[6J3J>b@p@u0J;g^5^j62^<^5^[3^<^tg=cg^5^[3^<};b@h+=cg^5/JQ/,^mcx^l@i(b@p,cx^9)});}el^$[32JKk++;bS=b@m;b@m=0J@w^0^xlJ<^Pg^9>1&&((^*79]^/^#279])||(^*80]^/^#280]))J=cg[^:1,cg^9-1)JUJ!b@h=cgJU}}JXJ"r^sp=_^6b@kJ&J4ca^0J;a^W77JF^3[1^46[JNJ6v^0&&Number(cv^W81]](^H)!==0){cp+=cv^W77JF;b@kJ\'el^$^wp+=^[1];b@kJ\'}^Pg^9>1&&((^*79]^/^#279])||(^*80]^/^#280]))){cp+=cg[^:1,cg^9-1)^`(^*72]||^*73])^/^#JN&&/[eE][+-]@bJQ/[^[6J3J>b@p@u0J;g^5^j62^<^5^[3^<^tg=cg^5^[3^<};cp+=cg^5/JQ/,^mcx^l@i(b@p,cx^9)});^tp+=cg}JX;b@h+=(b@k?b@n:^H+cp^ub@h;}^aN(cz,c@z,e@o){cz@b=z;c@z@b=zJAf@q=e@o^W83JJz,c@z,2,2)^W82]J,nn=JH^(4;cc++J>J.]!==J.+4]|J.]!==J.+8]|J.]!==J.+12]){nnJ&break ;J0nn^lbc(f@q[0],f@q[1],f@q[2])J!return 0};}JEM^RyJ)cz^s@z=0;cy=cy||window^\\99]]JC^E84]]||^E84]]===0){cz=^E84]];c@z=^E85]];^`^E86]]||^E86]]==0){cz=^E86]];c@z=^E87]];^tz=^E88]]-^E90^][289]];c@z=^E91]]-^E90^][292]];}^k{x:cz,y:c@z};}^a@o(nj,ni,naJ$e=_^6ng^=[293^Y294J,nh^=[295^Y296J,nd^=[297^Y298J,nc^=[299^Y300]J8i[ngJ9g]^Z01^Ug^{g]^Z01]):_^bJ8i[nhJ9h]^Z01^Uh^{h]^Z01]):_^bJ8i[ndJ9d]^Z02^Ud^{d]^Z02]):_^6eN=ni[ncJ9c]^i20^Uc^{c]+^H:_^bJC!T&&eNJ$b=eNJG^K$_b9JM2])[0J7b[0]!^e280]&&nb[0]!^e279]){nb=^j80]+nb^i280]}J8b;J!ne+=eN^kne^O@v(no,ni,naJ)kN=no in ni?ni[no]:na[no]^ukN;}JE@p=JHJA@z=^203]]||1JAj=1JAz=@p?@z/j:1^abe(mz,cT,cSJ>T&& !!@pJ)e@o=mz[^q0^M304]);j=e@o^X05^DJM06^DJM07^DJM08^DJM09]]||1;z=@z/j^T[310JIT@bz^T[311JIS@bzJC@z!==j){mzJG^!310JIT^Z12];mzJG^!311JIS^Z12];e@o^X13]](z,z);};J!mz^X10JIT^T[311JIS;}}function t(cT,cSJ)mz=^,2^M1])^T^C6[314^V315]);be(mz,cT,cS)JC!T&& typeof (@j_vmlCanvasManager)!^e161]){@j_vmlCanvasManager^X16]](mz)^kmz^OE(mz,m@s,mEJ*mz||!m@s|| !mE^SJEm@j=mE^i7]+(m@s^c[317]?_^n8]:m@sJ o=_^n9]+m@sJAm@x=mz^X20]](m@oJ tJ&JEmD=^,2^M246]);^F21]]=m@j;^F22]]=m@x;mD^W90^N323J,enJC typeof (@qlob)!^e161]&&!!J:qlob()J)mI=m@x^5/@gdata:[a-z/]@b;base64,/,^HJAmC=atob(mIJ q=J:zrray@quffer(mC^9J h=J:nint8@zrray(m@q)^(mCJ+^7m@h[cc]=mC^X24JJc)}JAm@z=J:qlob([m@q],{type:_^n9]+m@s});try{^226^G25]](m@z,m@j);m@tJ\'catch(en){^F28^G27]]=[m@o,^F21]],^F22]^][281^M329]);^F22]]=^231^G30]](m@z);};}JC!m@t){try{event=^,333^M332]);event^X35^M334],tru^|window,0,0,0,0,0,JR^|JR^|0,null)JC^F36JD^F36]](event)^`^F37JD^F37^M338])JXcatch(enJ)el=^239JF;el^X43^G42^M340]+m@x^Z41]);el^X43^G44JF;JXJEk={reset:{^>345]},pan:{^>346]},zoom:{^>347]},menu:{^>348]}}^abd(kr,nw,nxJ>nw^X50^M349])!==nx){nwJ+76^C6[349],nx);nwJ+76^C6[351^V352]);nwJG^!353^N354^}^!355^N356^}^!357^N358^}^!359^N360^}b976^C6[361],kr^X63]][nx^Z62]]);nw^\\85^N364]+k[nx]^X65]]^Z66]+kr^X63]][nx^Z62]]^Z67];}}function bf(J$pJ?^(^g_$_b9^7np=^gccJ7p^\\90JDnpJG^!189^N368]};}^O@y(J$pJ?^(^g_$_b9^7np=^gccJ7p&&np^\\90JDnpJG^!189^N194]};}^Om(mt,cD,c@j,mu){^8JO=mt;^870]]=mu;t^+=[J#@q={}J@@j^o^o[mtJK@q=bk[c@j][mt]};^872JID?cD:{};^873]](^872]],c@q);}mJGb^\'373]]^RD,c@qJ*y[^8JO]J>@n&&^274JDconsole^X76^M375])}J!JEcC=y[^8JO];for(JEJ%CJ6D&&J%D){^fDJL^P@q&&J%@q){^f@qJLJ!^fCJL}JX^r^\'377]]^REJ*y[^8JO]&&@n&&^274JDconsole^X76^M375])}J(C=y[^8JOJ#@j=^ ^q378]]?^ ^q378]]:(^879]]&&^879^G72^G78]])?^879^G72^G78]^Y4J#@q={}J(@s=JYJLJ@@j^o^o[^869]JDc@q=bk[c@j][^8JO]}JCJ%CJ6E in ^872JDc@s=^ cE]^P@q&&J%@q){c@s=c@qJL^t@s=cCJL}J0c@s===JYJL^lJ2;^f@s^uJH;^r^\'380^;xJ*^ ^@){^ ^@={}};^ ^@[JV=^ JV;^r^\'382^;xJ*^ ^@){^ ^@={J0^ ^@[JV^lJHJ!return J2;^r^\'383^;xJ*^ ^@){^ ^@={}}J(I=!(^ ^@[JV===^ JV)^ucI;^r^\'196^;t,c@o,c@hJ*c@t|| !c@o^Sc@h=c@h||JY;t^+[c@t]=t^+[c@t]||[];t^+JB^W74]]({context:c@h,event@xandler:c@o});^r^\'384^;t,c@oJ*c@t||!c@o||!t^+JB^SJEcM=t^+JB^(cMJ+^7if(cM[^L385]]===c@o){cM[^L386JJc,1);break ;}};^r^\'387]]=f^dt^+=[]^r^\'336^;t,cNJ*c@t||!t^+JB^ScN=cN||{}J(M=t^+JB^(cMJ+^7cM[^L385^][204JJM[^L388]],cN)};}^an(mj,cD,mv){^889]]=mv;cD=cD||{};n^\\27^][126^][204]](JY,^q8],cD,cD^X78]]?cD^X78]^Y4])J(@v=JY^10]]=mj^11]^)JM92]]J?^13]]J?^14]]=[]^15]]=0^16^N20]^17]]J?^18]^)JM99]]=0JW^I0]^)76[401]^)76[402]^)76[403^N404]JW^I5]]={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0}JW^I6]]=[]JW^I7]]= typeof (^890]])^c[408]?^,409]](^890]]):^890]]JC!thi^I7]]J>^274JD^274^G76^M410]+^890]]^i411])^k;}JW^I7^][185]]=_^6cT^sS=0JC^ _^n0JDcT=^810]]^tT=thi^I7^][412]]>0?thi^I7^][412]]:^810]]}JC^ _^n1JD~^872]][~b976[190^][~,2)^-~152]]-1]^c[~se {if(cg^c~^v@i(String(b~eturn bC@u12?_$_b97~976[125^][~;for(JEcc=0;cc@u~]J&this[_$_b9~cg[0]^c[2~his^X71]]~document[^q~;;case ^j~=b@z[bI^i~&&cg[cg[^q~^9>0~;^89~window^X~;if(cg^c~72]||cg===_$_b97~[^[4]](~^b;var ~76[152]];cc++){~this^X~[^[2]]~^[7]](~]]^R@~],^H~=nj?nj+_$_b976~image:^q~Math[^q~^q381]]~]^v@i(b~bw?bwJ+76~[191]](_$_b97~]]||e@oJ+~cy^W~mD^X~]]^X~_^b)~s[^q40~@o^\\~b976[276]](_~cc][^q~]](^q~]]=^q~;}function ~^`c~^_@~=^mc~^l};~;mzJ+76~]:(na&&na[n~],^q~[^j~[^q3~]:^q~^i3~^q15~[^q1~]]J+76~]]()J-~]^vb~J!if(~;function ~$_b976[20]~===_$_b976~unction(){~==^q~thisJL=c~arguments[~263]](b@x)~+^q~^q2~}^u~){return ~function(~$_b9JM1~&&bk[c@j]~],"shortD~_$_b976[~};mJGb~=0J(~J!c~;return ~:return ~[151JK~J=b@~String(b~]J,b~])?(na[n~e,JRe,~];nwJG~)JAm@~}else {~J-@~]J(~J)n~cE in c~=JRe;~=JH;}~JAc~){JE~J>!~JGb9~]JA~JAb~f@q[cc~{1,2}|~}}JC~Dot":[~JRe}~JJg)~while(~174]](~J>c~]JCn~;ne+=n~]?ni[n~ new @~){cg=c~JU};~){b@h=~){if(~=null~JCc~;JE~[c@t]~;if(~]]){~var ~]]()~[_$_~true~]]=c~]](c~]){c~[cE]~76[3~151]~69]]~,1,1~[0]+~fals~Dash~2],"~+b@h~c@x]~;thi~}};}~this~0,0,','cS=t^1^rcS=^J07^S13]]>0?^J07^S13]]:t^1^D^|=cT;t^1=cS^C14^6415]]=0^C16^6310]^717]]=t^1^C18]]=^jo[^J19]]]^`6[161]?o[^J19]]]:o^c5]^720]]=d^+]^a421^.20^e^:^\\6[422^.20^y^!353^_[354^720^y^!423^_[360^720^y^!424^_[25]J,!T){^J20^y^!311^_[425]}^C07^/^J20]^81]]=t(^x^O1^y^!353^_[426]^01^Z0]^-20^/^O1]^8392^61^Z0]]^a304^8392^S27^_[9];@j(^O392]]);^r^uJ !T){^J0^T1]]=t(cT,cS)^C0^T1^y^!353^_[426^70^T1^e^:^\\6[428^.20^/^J0^T1]^.0^T392^640^T1^Z0]]^a304J)^?76[40^T392^6392]]}^C29]]=t(cT,cS)^C29^y^!353^_[426^720^/^J29]^8393^6429^Z0]]^a304^8393^S27^_[9^730^oDJ!);b(window,^d31],^[^G432J$){^N33J$}})^C34]]=d^+]^a421^.34^e^:^\\6[435^.34^y^!436^_[437^720^/^J34]^.38]]={x1:0,y1:0,x2:^O^|,y2:t^1};b(^J29]^^334],f^#b^{^\'$_b^p^^440],f^#b^{^\'$_b^p^^441],f^#b^{^\'$_b^p^^442],f^#b^{39]](en)^I[443]J)^;[429]^^444],f^#b^{^\'$_b^p^A^Q6^w^d46]:^d47],f^#b^{^k^;[429]^A^Q6^w^d49]:^d50],f^#b^{^k^;[429]^A^Q6^w^d51]:^d52],f^#b^{^k^;[429]^A^Q6^w^d53]:^d54],f^#b^{^k);^*55]^-55]]=d^+]^a246^.55^e^:^\\6[456^.55^e^:190^^457]+(t^1-14)+^d58^.55^e^:459],-1)^C55^e^:290^^323J)^C60^obmJ!,^n^ 461]],^E8]^8J*]^3J(2]]^3J(3]]^3J(4]]^3J(5]]={aJ/m:{^iin^h,^iax^h},aJ/p:{^iin^h,^iax^h},aJ/p2:{^iin^h,^iax^h}};}@s(n,m);n[^s^M[466]]=^[J"@v=this;^E7]]^a310^8J2]^a311^8J2]^a378])^0J2]^a419])){^J18]]=^jo[^J19]]]^`6[161]?o[^J19]]]:o^c5]]};^E7]]^a467]);^*67]^-67^_[468]};^E7]]^a469^8363^ou(^n^ 469]^8J2]^a470^.70^6470J\'T^W^ 471J%^*72J%@y(^J7J&d^+]^a352]));bdJ!,^J72]^^473^.34^/^J72]]^;[^P[^@^G471J%^N71^f^N0J&J+;b^=6[^P[474]);^BJ0^l;^N02^fb^=6[^P[473J);^N33J$;});};^*75J%@y(^J75]]=d^+]^a352]));bdJ!,^J75]^^476^.34^/^J75]]^;[475]^^^@^N60^S77J$;^G471]]||^N02J%^N^l;^N02^fb^=6[^P[473]);^N03^_[404];^N29^y^!424]]=^N03]];^B76[471^f^N^YJ,^t^ 462J\'^t^ ^L478J%^N6^T^L479]]=^t^ ^L478]]^B7J(^T^L479]]^}J ^t^ 462J\'^t^ ^L480J%^N6^T^L481]]=^t^ ^L480]]^B7J(^T^L481]]^}};^N82J$^I[472]],^N75]]);^N33J$;})^C29^y^!424]]=^N03]];};^*71J\'!^J02J%^*72]^-^l^C^Yelse {^G472^Z350]]^a349])===^][363^S83]^-0J&J+^C71^f}^?J0^l^C^Y;bf(^N72]],^N75]J)};}^?76[471]]=false^C^YJ,^j^n^ 484]]^`6[161^-84]]=^n^ 484]]J ^j^n^ 485]]^`6[161^-85]]=^n^ 485]]}^0486]]^2[485J%bf(^J86]])^r@y(^J86]])}^"^{85J\'T){^J86]]=d^+]^a352]);bdJ!,^J86]^^487^.34^/^J86]]^;[486]^^^@^G4^v_^!189]]=^bJ-]){^G488J\'(( new Date())^c209J$-^N88^Z209J$@u=500)){^u};^N^v_^!189^_[489];^N86^S90J$;^N43^S91J$;}},J+);}};^*43]^H[485J\'T){^J43]]=d^+]^a421^.43^e^:492],-1)^C^v_^!436^_[493];^N^v_^!189^_J-^734^/^J43]]^;[443]^^490],^[@y(^N43]]);^N88^oDate();},J+^qr=d^+]^a421]);c@r[_$_^!436^_[494];c@r^c185^6363^S95]^743^/c@r);b(c@r,^d96],^%^!467^_[24^&^{44],^%^!467^_[497^&976[^@E(^][1]^^318],^N84]])^I[443]J),J+^qr=d^+]^a421]);c@r[_$_^!436^_[494];c@r^c185^6363^S98]^743^/c@r);b(c@r,^d96],^%^!467^_[24^&^{44],^%^!467^_[497^&976[^@E(^][1]^^499],^N84]])^I[443]J),J+);}^0434^y^!189]]!^bJ-^H[472]^-02]]?b^=6[^P[474]):b^=6[^P[473]);^G47^T350]]^a349])!==^][363^Z500J%b^=6[475]^^476])};J ^jy^c8^Z501]])=^b[161]^901^_[502];^O503^_[7];^rJ"@k=^E7]]^a503]^qy=^E7]]^a501J)^0399]]===0||(c@k||c@y)){^J55^e^:322],^O501]^.5^T185^6503]];}^0501]^H[503J%^*5^T504]^-20^/^J55]])}^"^{5^T504]^-20^Z505]](^J55]])}}^W^ 461]^H[460^Z372]]!==^n^ 461]^-60^Z37J&^n^ 461]]};^mE in ^J60^Z372]]^2[460^y^ 506]](cE)){^J60^ZJ2](cE)}};};n[^s^M[43J&^[J"T=0;J"S=0^W^ ^|){cT=^O^|}^?76[^|=cT=^J07^S12]]>0?^J07^S12]]:^O^|}^W^ 311J%cS=t^1^rt^1=cS=^J07^S13]]>0?^J07^S13]]:t^1}^01^Z^|!==cT@bz||^O1^Z311]]!==cS@bz){be(^O1]],^xbe(^J29]],^xbe(^J30^Z507]],^x^uJ+;};^ufalse;};n[^s^M[508]]=^[if(!^O509]]^909^ofJ!)}^?76[509^Z510J$^D387^>6[401^f^O511]]^}^0512]]^913^Z204]](window,^O512]])}^C66^>6[400]]=T&&^J70J\'(^O399]]===0)^C32^>6[514^>6[392^Z163^>J(2]]^3J(3]]^3J(4]]^36[394]]=[^706]]=[];^O515]]=[]^0430]^-30^S76J$^D516]]={aJ/ylacement:null,aJ/m@lalueType:null,plotTypes:[]^D517^o@l(0,0,^O^|,t^1,2)^040^T517]^-0^T517^S76J$^DJ*]=[];J"@l=0;^m@m=0;c@m@u^n^ J*^F;c@m++){c@l++J,!(!^n^ J*][c@m]^cJ1]||n^c518^Z175]](^n^ J*][c@m]^cJ1])>=0)){continue };J"@n= new wJ!,^n^ J*][c@m],^E8]],c@l-1,++^J30^Z519]])J,^K0]]==^}){^K0^_[521]+(c@l)J ^KJ&=^}){if(^n^ J*^F>1){^K3]]=[^J18]][^K4]]%^J18]^F]];^K2^6418]][^K4]]%^J18]^F];^rif(^UJ1]^R25]|^)^R26]|^)^R27]|^)^R28]|^)^R29]|^)^R30]|^)^R31]|^)^R32]|^)^R33]|^)^R34]|^)^R35]|^)^R36]){^K3]]=[^J18]][0]]^r^K3^6418]]}}^r^K3]]=[^K2]]]J ^U537]]==^}){if(((^UJ1]^R25]|^)^R26]|^)^R27])&&^U538J\'^U538]^F@u^O^|/16)|^)^R39]){^U537]]=8}J (^UJ1]^R40]|^)^R39])&&^U538J%^U538^Z541]](p)^D282^Z274]](c@n^qp=^U542]];J"@wJ,c@p=^b[12]^2[51^(^bJ.])^VJ#^5^g[545]^"^z^(^bJ-])^VJ#^5^g[546]^"^z^(=^}^91^(^s[12]}}}^rif(c@p^R43]^2[51^(^b[12])^VJ#^5^g[547]^"^z^(^bJ-])^VJ#^5^g[546]^"^z^(=^}^91^(^sJ.]}}}^rif(c@p^bJ-]^2[51^(^b[12])^VJ#^5^g[548]^"^z^(^bJ.])^VJ#^5^g[545]^"^z^(=^}^91^(^sJ-]}}}}}J c@w&&window^c374J%window^c374^Z376]](c@w);^u;};^D391]]=J+;};n^c518]]=a(^c525^^526^^527^^28^^528^^529^^530^^549^^540^^539^^550^^551^^552^^553^^531^^532^^535^^536^^554^^555^^533^^534^^556^^557^^558]]);n[^s^M[433]]=function(cD){if(cD){^EJ&cD^D508J$;var di=[];^mc=0;cc@u^OJ*^F;cc++^2[51^(^b[12]||^O51^(^bJ.]){if(!^O2^<[559]]||^O2^<[559]]=^b[30]){^*63]]^2[51^(^b[12^-63]]=^$_^ 463]^^^X[360])^"^z^(^bJ.^-63]]=^$_^ 463]^^^X[113])}}^D2^<[463^6463]];^"976[2^<[559]]^R60]){^*64]]^2[51^(^b[12^-64]]=^$_^ 464]^^^X[14])^"^z^(^bJ.^-64]]=^$_^ 464]^^^X[9])}}^D2^<[463^6464]];}};^*62]]^2[51^(^b[12^-6J&^$_^ 462]^^462^^113])^"^z^(^bJ.^-6J&^$_^ 462]^^462^^360])}}^D2^<[462^6462]];}^D561J$^W^ 361]]^962^oblJ!,^n^ 361]])J,!^O562^Z563]]^962^S33J$^rdi^c274]](^O562]])};}^W^ 564J%^mc=0;cc@u^n^ 564]^F;cc++^964]]=[];var dl~b976[372^Z~b976[190^Z~}else {if(^nb~unction(en){^t~ new hJ!,this[_$~^[this[_$_~]},J+);b(c@r,_$_b~39]](en)});bJ![_~6^Z542]]=~|^U351]]~if(!^J~ocument^c2]~f(^O516~]){^J~^84~^Z188]](~;if(^O~his^c311]]~){if(^nb976~=null;^nb97~c@w=^s[544]+~+^U351]~]]=^O~]^C~]);^O~){^O5~6[191]]^a~);b(^nb976~82]][cc][^s~d(c@v,^tb97~]]();^nb97~else {^nb9~334],^[~],window[^s~^rc@v[_$_b9~;^J~};^O~^O37~]^c152]]~if(^][~]&&^nb976~;@y(^]~^O4~^U52~462^Z~[125^e6~^][4~this^c~472]],^s~[326^e~=^b[5~^Z4~5^Z~c@n^c~{c@w=^s~;if(^n~463],^s~02^f}~]]^c~function(){~314],_$_b97~c@v[^s~],^s[~]]=^s~)!==_$_b97~(^s[~==^s~[^s[~^s[4~^yb97~]]=false;~]+^s~imum:null~internalM~ typeof (~48]](en)}~71]]=J+~for(J"~this[_$_~]]= new ~^{29]~);J"@~}else {~_$_b976~c@v[_$_~return ~43]][_$~[445]]?~cT,cS);~]][_$_~976[51~9J0~310]]~=null~}J,~(this~var c~[544]~]]()~]]){~2]]=~]]&&~6[46~]);}~282]~true~;if(~[194~[543~xis@~76[4~351]~377]','= new bh(this,t^+]^B564^]);^4564^;2^kdl)^v!dl^B563^jl^B433^x^Ni^B2^kdl)};}};^4565]]= new @w(this,t^+]^B565]],^4378]]);^Pc^L^4282^);cc^c(^4282^]^B566]]||^4282^][_$_b9^ 556]||^4282^][_$_b9^ 557]){^4565^;567^;2^k^4282^])^b!^4565^;563]]){^4565^;433^x^Ni^B2^k^4565]])^i^8^.^_^C[12]||^8^.^_^C[543]){h^B569]](^/2]],^/3]],^/4]],^8^.542]],^4517^;568^x)}e^I^8^.^_^C[194]){^4570^x}else {re^e}^Zb=0;for(db in di){di[db]^B433^x}^Za=[]^v^4400]]^\\de=t(^4J ],^43^{)^Zf=de^B0]](^E304]);df[^@1]](^41]],0,0,^4J ],^43^{);};^Pc^L^8^.572^);cc^Kdj=^8^.572^]^$dj[^@3^);dg^Kdk=dj[^@3^[^d@i^n;dk[^@4]]^n^v^4400^jk[^@4]]=t(^4J ],^43^{);dk[^@5]]=dk[^@4^;0]](^E304]);^i^M^ 525]^\'6[576^Y^#^ 526]^\'6[577^Y^#^ 527]^\'6[578^Y^#^ 28]^\'6[579^Y^#^ 549]^\'^y0^Y^#^ 528]^\'^y1^Y^#^ 529]^\'^y2^Y^#^ 530]^\'^y3^Y^#^ 550]^\'^y4^Y^#^ 551]^\'^y5^Y^#^ 552]^\'^y6^Y^#^ 553]^\'^y7^Y^#^ 531]^\'^y8^Y^#^ 532]^\'^y9^Y^#^ 540]){c@i=c@i=^4590^Y^#^ 539]^\'J!1^Y^#^ 556]){^4592^Y^#^ 557]){^4592^Y^#^ 535]^\'J!3^Y^#^ 536]^\'J!3^Y^#^ 554]^\'J!4^Y^#^ 555]^\'J!5^Y^#^ 533]^\'J!6^Y^#^ 534]^\'J!7^Y^F^F^F;^Pdh=0;dh@u^1^);dh++){^4406^;2^k^4282]][^1]][dh]])^i^4400]]&&c@i){da^B2^kc@i)^|^i^4400]]&&^4394^)>0^\\dc=t(^4J ],^43^{)^Zd=dc^B0]](^E304]);da^B2^k^4599]](dd));}^d@v=this^ra^BJ"]>0){^<[401]]^l;^<[509^;606]](200,^<[600]],f^Jdm){^<[392^;601]](0,0,^<[J ],^<[3^{);^<[392^;571]](de,0,0,Math^B1^k^<[J ]@bz),Math^B1^k^<[3^{@bz),0,0,^<[J ],^<[3^{);^Pdn=0;dn@uda^BJ"];dn++){c@i=da[dn]^rm@u1&& typeof (c@i^?02]])!^C[161]^pdm>=c@i^?02]]){c@i^?04]](c@i^?03]](dm-c@i^?02]],0,1,1-c@i^?02]]),c@i)}}else {c@i^?04]](c@i^?03]](dm,0,1,1),c@i)^|^<[336]](^E605],{chart:c@v});},f^J){da=[]^Zp=0;^Pc^L^<^.572^);cc^Kdj=^<^.572^]^$dj[^@3^);dg^Kdk=dj[^@3^[;dk[^@4]]^n;^|de^n;^<[401]]^a;});}e^I^<[394^)>0){^<[599^x};^<[336]](^E605],{chart:c@v});};^4607^x^v!^4471]]&&!^4402]]&&^4472]]&&^4472^;190^;189]]!^C[194]){@y(^4472]],^4475]])};^/0^;608^x;^4399]]++^v@n^\\c@v=this;setTimeout(f^J^\\dq=document^B409]](^E609])^rq){be(dq,^<[J ],^<[3^{)^Zr=dq^B0]](^E304]);dr[^@1]](^<[430^;507]],0,0);};},2000)^h^B125^;607^}^J){^4197]]({context:this,chart:this,mousedown:^4610]],mouseup:^46^{,mousemove:^4612]],cursor:^4471]]?^E613]:^E614],cursor:^4402]]?^E614]:^E404],capture:true,bounds:^4405]]})};n^B125^;615^}^J^\\c@n=^E20];^Pc^L^4282^);cc++){c@n=^4282^]^v!^7538]]||^"^EJ"]===0||!^7616]]^9^vn^B518^;175]](^7351]])>=0^\\dj^n^Zs^Q^wk^n^Zu^a^$^8^.572^);dg^c(^8^.572^[^B351]]===^7351^js^l^Zj=^8^.572^[;break ;^b!ds){dj={type:^7351]],totalDataSeries:0,plot@nnits:[]};^8^.572^;2^kdj);}^$dj[^@3^);dg^c(dj[^@3^[^B559]]===^7559^ju^l^Zk=dj[^@3^[;break ;^b!du){dk={type:^7351]],previousDataSeriesCount:0,index:dj[^@3^),plotType:dj,axis@pType:^7559]],axis@p:^7559]]=^C[30]?^/3]]:^/4]],axis@m:^/2]],dataSeriesIndexes:[],yTotals:[]};dj[^@3^;274^Y;};dj^?17]]++;^1^;2^kcc);^7618]]=dk;^|^Pc^L^8^.572^);cc^Kdj=^8^.572^]^Zv=0^$dj[^@3^);dg++){dj[^@3^[^?19]]=dv;dv+=dj[^@3^[^B598^);}^h^B125^;620^}^J){^Pc^L^4282^);cc^Kc@n=^4282^]^v!^7538]]^9^Zw=^"^EJ"]^$dw;dg++){^7621^[=++^4430^;519]]};}};n^B125^;561^}^J){^4620^x;^4615^x;^Pc^L^8^.572^);cc^Kdj=^8^.572^]^$dj[^@3^);dg^Kdk=dj[^@3^[^v^M^ 525^=^ 526^=^ 527^=^ 28^=^ 528^=^ 529^=^ 530^=^ 549^=^ 540^=^ 539]){^4622^Y^#^ 550^=^ 552^=^ 531]){^4623^Y^#^ 551^=^ 553^=^ 532]){^4624^Y^#^ 535^=^ 536^=^ 554^=^ 555^=^ 533^=^ 534]){^4625^Y}}}};}^h^B125^;622^}^Jdk^p!^1]]||^1^)@u1){re^e^Zy=dk^B463^;^Rr dx=^M^&^Rr dz,d@z^Z@q^a^$^1^);dg^Kc@n=^4282]][^1^[]^dc=0^ZC^Q^wD^a^v^7^_^C[12]||^7^_^C[543]^\\d@s=^/5^G^&479]]?^/5^G^&479]]:(t^+]^B^T^+^X^&478]])?t^+^X^&478]]:-I^Sv^wE=^/5^G^&481]]?^/5^G^&481]]:(t^+]^B^T^+^X^&480]])?t^+^X^&480]]:I^S^i^"^*]&&^"^*]^B^m||^7627]]=^C[628]){^U}^g^L^"^EJ"];cc^c( typeof ^"^*]=^C[161]){^"^*]=cc^i^"^*]^B^m){^U;dz=^"^*]^B^m();^Nz=^"^*]};d@z=^"cc]^?29]];^O^60^j^60]]^Hdz>dx^2){dx^2^Hd@z@udy^?30]^-0]^f^^z>dy^2){dy^2=d@z^iJ#^\\^qz-^"cc-1]^B170]];d@j@u0&&(^q@j@b -1)^r^61]]>d@j&&d@j!==0){d^61^oj^|^O@s&& !dC^9e^I!dC){dC^l^vcc>0){cc-=2;continue ;};^bd^` !dD){dD^l}e^Id^`dD^9^i^"cc]^?32]]){^M^&633]]^z=^"cc]^?32]]};^O^64^j^64]]^Hdz>d^65^j^65]]^Hd@z==^n^9^^z@udy^?34]^-4]^f^^z>dy^?35]^-5]^f;};^8^.636]]=^7627^oq?^E628]:^E29]^h^B125^;623^}^Jdk^p!^1]]||^1^)@u1){re^e^Zy=dk^B463^;^Rr dx=^M^&^Rr dz,d@z^Z@q^Q^wI=[]^Z@x=[]^$^1^);dg^Kc@n=^4282]][^1^[]^dc=0^ZC^Q^wD^a^v^7^_^C[12]||^7^_^C[543]^\\d@s=^/5^G^&479]]?^/5^G^&479]]:(t^+]^B^T^+^X^&478]])?t^+^X^&478]]:-I^Sv^wE=^/5^G^&481]]?^/5^G^&481]]:(t^+]^B^T^+^X^&480]])?t^+^X^&480]]:I^S^i^"^*]&&^"^*]^B^m||^7627]]=^C[628]){^U}^g^L^"^EJ"];cc^c( typeof ^"^*]=^C[161]){^"^*]=cc^i^"^*]^B^m){^U;dz=^"^*]^B^m();^Nz=^"^*]};d@z=^"cc]^?29]];^O^60^j^60]]^Hdz>dx^2){dx^2^HJ#^\\^qz-^"cc-1]^B170]];d@j@u0&&(^q@j@b -1)^r^61]]>d@j&&d@j!==0){d^61^oj^|^O@s&& !dC^9e^I!dC){dC^l^vcc>0){cc-=2;continue ;};^bd^` !dD){dD^l}e^Id^`dD^9^i^"cc]^?32]]){^M^&633]]^z=^"cc]^?32]]};^O^64^j^64]]^Hdz>d^65^j^65]]^Hd@z==^n^9;dk^?^W=(!dk^?^W?0:dk^?^W)+Math^B263]]^u^^z>=0^pdI^z){dI^z+=d@z^NI[dz^f}e^Id@x^z){d@x^z+=d@z^N@x[dz^f^|^8^.636]]=^7627^oq?^E628]:^E29];}^gc in dI^pisNaN(cc)^9^Z@h=dI[cc]^^^s^?30]^-0]]^V(d^t^2){dy^2^V(cc@ud^64]]||cc>d^65]]^9^^^s^?34]^-4]]^V(d^t^?35]^-5^oh};}^gc in d@x^pisNaN(cc)^9^Z@h=d@x[cc]^^^s^?30]^-0]]^V(d^t^2){dy^2^V(cc@ud^64]]||cc>d^65]]^9^^^s^?34]^-4]]^V(d^t^?35]^-5^oh}^h^B125^;624^}^Jdk^p!^1]]||^1^)@u1){re^e^Zy=dk^B463^;^Rr dx=^M^&^Rr dz,d@z^Z@q^Q^w@t^Q^w@o^Q^wM=[]^$^1^);dg^Kc@n=^4282]][^1^[]^dc=0^ZC^Q^wD^a^v^7^_^C[12]||^7^_^C[543]^\\d@s=^/5^G^&479]]?^/5^G^&479]]:(t^+]^B^T^+^X^&478]])?t^+^X^&478]]:-I^Sv^wE=^/5^G^&481]]?^/5^G^&481]]:(t^+]^B^T^+^X^&480]])?t^+^X^&480]]:I^S^i^"^*]&&^"^*]^B^m||^7627]]=^C[628]){^U}^g^L^"^EJ"];cc^c( typeof ^"^*]=^C[161]){^"^*]=cc^i^"^*]^B^m){^U;dz=^"^*]^B^m();^Nz=^"^*]};d@z=^"cc]^?29]];^O^60^j^60]]^Hdz>dx^2){dx^2^HJ#^\\^qz-^"cc-1]^B170]];d@j@u0&&(^q@j@b -1)^r^61]]>d@j&&d@j!==0){d^61^oj^|^O@s&& !dC^9e^I!dC){dC^l^vcc>0){cc-=2;continue ;};^bd^` !dD){dD^l}e^Id^`dD^9^i^"cc]^?32]]){^M^&633]]^z=^"cc]^?32]]};^O^64^j^64]]^Hdz>d^65^j^65]]^Hd@z==^n^9;dk^?^W=(!dk^?^W?0:dk^?^W)+Math^B263]]^u^^z>=0){d@t^l^N@o^l^idM^z){dM^z+=Math^B263]]^u^NM^z=Math^B263]]^u^|^8^.636]]=^7627^oq?^E628]:^E29];}^^t&& !d@o){dy^2=99;dy^?30]]=1;}e^Id@t&&d@o){dy^2=99;dy^?30]]= -99;}e^I!d@t&&d@o){dy^2= -1;dy^?30]]= -99;}}};dy^?34]]=dy^?30]];dy^?35]]=dy^2;dk^?38]]=dM;};n^B125^;625^}^Jdk^p!^1]]||^1^)@u1){re^e^Zy=dk^B463^;^Rr dx=^M^&^R~76[351]]=^C[~^#7~^7538]][~}e^Idk[_$_b9~;^Pdg=0;dg@u~^(}~76[462^;~){c@i=this[_$_b97~^,}~^;152]]~cc]^B170]~his^B372]~^0}~]){dy^?3~[516^;~^446~^3}~dk^B598~^B195]]~^5}~^8[~^:}~x^?3~c@n^B~this[_$_b976~){continue }~^>}~]]^B~c@v[_$_b976~]||^M~^A}~^B6~^E57~^D}~[^E~==_$_b976~^F}~_$_b976[~}}}}}}}}~]^X~=dz^i~lse {if(~unction(~++^\\~c=0;cc@u~dk[_$_b9~}else {d~if(dz@ud~for(var ~^a;v~626]];va~nfinity;~462]]&&t~d@q^l~=d@h};if~37]]^z~][_$_b9~]](dk)~;v^w~]][dg]~){var ~]][cc]~^r@~542]]=~z>dE&&~=false~}^i~++){if~;var c~turn }~]=d@z}~;for(c~;^|n~}^v~]]){d~74]](~=true~209]]~=null~]]=d@~){if(~d@j=d~^vd~h@udy~@h>dy~(d@z)~;if(~ar d~]]()~6[58~[dz]~11]]~};};~]]=f~310]~6[59~152]~cc>0','r dz,d@z,d@v,dN;J(qJ*;for(var dg=0;dg@udk^t598]]^Idg++J%c@n=^Q282]][dk^t598]][dg]]J8cc=0J8dC=^ndDJ*J=c@n[_$^L$_bJ/]||c@n[_^a^)J(s=^F5J&^ 479]]?^F5J&^ 479]]:(^Q372]^g462]^=372J&^ J>])?^Q372J&^ J>]:-InfinityJ8dE=^F5J&^ 481]]?^F5J&^ 481]]:(^Q372]^g462]^=372J&^ 480]])?^Q372J&^ 480]]:Infinity;J5^5^(]&&^5^(^g209]]||c@n^f27]]^`628]JAqJ9};for(cc=0;cc@u^5]^Icc+J. typeof ^5^(]^`161]){^5^(]=ccJ5^5^(^g209J:@qJ)dz=^5^(^g209]]()^xdz=^5^(]};d@z=^5JB^^29J\'d@z&&d@z^t152J:@v=M^?^^39]](null,d@z);dN=^@^T39]](null,d@z);J+z@udx^f30J0^f30]^oz>dx^_5J0^_5]^o@v@udy^f30J3^f30]]=d@vJ+N>dy^_5J3^_5]]=dNJ5cc>0J%d@j=dz-^5JB-1]^P;d@j@u0&&(d@j=d@j@b -1)J=dx^f31]]>d@j&&d@j!==0){dx^f31]]=d@j^}dz@ud@s&& !dC^YJ4if(!dC){dCJ)if(cc>0){cc-=2;continue JCJ+z>dE&& !dD){dDJ9^ldz>dE&&dD^YJ5^5JB^^32J:k[_$_^ 633]][dz]=^5JB^^32]]J+z@udx^f34J0^f34]^oz>dx^f35J0^f35]^o@z===null^YJ=d@v@udy^f34J3^f34]]=d@vJ+N>dy^f35J3^f35]]=dN};};^Q516^T36]]=c@n^f27]]=d@q?^v628]:^v29];^,^^40^XdT,d@n,d@kJAk=d@k||^nd@w=[];^p^>6]^g152]]-1;cc>=0;cc--J%c@n^>6]JB]J8b@hJ-b@h=c@n^f40]]^ZJ=b@hJAw^t274]](b@h)};};J(yJ-J(lJ*;for(J(r=0;d@r@ud@w^Id@r+J.d@w^&^G^`525]||d@w^&^G^`526]||d@w^&^G^`528]||d@w^&^G^`529]J%dS=@v(^v537],J ^^41]],d@w^&])||8J=J ^^42]]@u=dS/2JAlJ9^{};}};for(d@r=0;d@r@ud@w^Id@r+J.d@l&&d@w^&^G!^k525J;w^&^G!^k526J;w^&^G!^k528J;w^&^G!^k529]^YJ=!d@yJAy=J ]^lJ ^^42]]@u=d@y^f42J:@y=J ]}};}^zd@y;^8^^43^XdT,d@n,d@kJAk=d@k||^nd@pJ-J(m=^Q640]]^ZJ=d@mJAp=d@m^t567^T21]][d@m^f44]]]^lTJAp=N(dT,d@n,^O30^T45]])}J4^pJ!^Q565^T46]]^Icc++J%d@i=^Q565^T46]JB]J=dT>=d@i^]4]]&&dT@u=d@i[^VJ;n>=d@i^]5]J;n@u=d@i^]7J:@p=d@i^f47]]};}}}^zd@p;^8^^48^Xeb,cT,cS){cT=cT||^Q310]];cS=cS||^Q311^wa=eb/400^zMath^_3]](M^?](^Q310]]^71]])@bea);^8^g482^X){t^:^^01]](0,0^70]]^71]])^8^g514^X){^H2^T01]](0,0^70]]^71]])^+67^3392]^g159]]=^F7]];^H2^T49]](0,0^70]]^71]]);^,]^_7^Xec){t^B^g274J?c)^8][^j8^Sy){if(!^U50]]||!^Q651]]^bvar eg=[]J$j=^U50^wf=ej?ej[0]:cyJ$iJ-switch(^h[351J@case ^j7]:^K46]:eg=[^j0],^j2]];^\'=M(ef);^\'^f52]]= new Date()^{^K50]:^K49]:eg=[^j0]]^{^K52]:^K51]:eg=(^H6]]^`447]||^H6]]^`446])?[_^[^v334]]:[^j1]]^{;default:return ;;J5ej&&ej^t152]]>1^bei=M(ef);ei^f52]]= new Date();try{var ee=ei^f29]]-^\'^f29^wd=ei^P-^\'^PJ8b@z=ei^f52]]-^\'^f52J\'M^#ee)>15&&(!!^\'^f53]]||b@z@u200)){^\'^f53]]J9J$l=J1^i70]]||J1J=el&&el^f54J6l^f54]](0,-ee)}JCcatch(e){};^H6]]=^h[351J\'!!^\'^f53]^=471]]^-655^3482]]()};t^A]J*^z;};^p=0;cc@ueg^Icc++J%ek=eg[cc]J$h=^E[333]](^v656]);eh^i35J?k,true,true,J1,1,ef^f57]],ef^f58]],ef^f59]],ef^f60^|,false,false,false,0,null);ef^t290]^g336J?h)J=^U61J@^U61]]()^D200J@^h[200]]()};^,^g439^Sy){if(!^Q651]]^bif(^Q662^3662]]J*^z;^D661J@^U61]]()^D200J@^h[200]]()J5 typeof (^N])^`161]&&^U63J@^N]=^U63]]}J$r=M(cy)J$k=^h[351^woJ$qJ=!cyJ%en=J1^_9]]^D664J6q=(^U64]]==3)^l^h[352J6q=(^h[352]]==2)}J5@n&&w^/]){w^/^g376J?k+^v665]+^6+^v666]+^9)J=eq){w^/^g376]](^U64]])};^.1]){w^/^g376]](^j1])^}eq^bif(n^f67J6o=n^f67]];^.1]){n^f67]]J-if(^J][_^q^T68J@^J][_^q^T68^e^E[183]^g384]](_^[^J^g439^|)^}eo^t506J?k)){eo[ek^g204J?o^i88]],^6,^9)};^!976[515J@^p=0;cc@ut^B]^Icc+J.!t^BJB^g506J?k)^Y;eo=t^BJB]J$m=eo^t438J\'^6>=em^]4]]&&^6@u=em[^V]&&^9>=em^]5]]&&^9@u=em^]7J6o[ek^g204J?o^i88]],^6,^9);^.2]&&eo^f69]]==J9){n^f67]]=eo^+29^T70^3429^T70^e^E[183]]^_6]](_^[^O39^|)}^x^.1]){if(^J][_^q^T68J@^J][_^q^T68^e^E[183]^g384]](_^[^O39^|)}}};break ^xeo=null^}eo&&eo[_$^c){^N]^_0]][_$^c=eo[_$^c}J4^N]^_0]][_$^c^>3]]};}}^+60]^=460^T71]^yp^>5J\'^6@u^<||^6>ep[^V]||^9@u^;||^9>ep^]7^3460]^g477]]()^}(!t^A]||!^C]])&&^O30^3430^T72]](cy)^,^^10^SJ2{t^A]J)if^*][_^a]!^k194]){^"={x:cz,y:c@z,xMinimum:^u^ J>],xMaximum:^u^ 480]]}}J4^"={x:cz,y:c@z}^,^^11^SJ2{if^*][_$^L$_bJ/]||^QJ"^a^)if(t^A^yt=0J$u=0;v^\\$_^ 674]];if^*][_^a^)et=c@z-^"^f29]];eu=M^#^u^ 48^W^ J>^2J<^xet=^"^P-cz;eu=M^#^u^ 48^W^ J>^1]@bet;J,^#et)>2^-402]^yz=^ney=0J=^u^ 4^%@u^u^ 675J6y=^u^ 675]]-^u^ 4^%;^u^ 4^%+^r$_^ 4^$+=ey;ezJ)^l^u^ 4^$>^u^ 676J6y=^u^ 4^$-^u^ 676]];^u^ 4^$-^r$_^ 4^%-=ey;ezJ)}J5ez){JD[^M};^!976[471^3482]]()J=!^"^bif^*][_^a^)var e@z={y1:M^?](^"^f29]],c@z),y2:^@]](^"^f29]],c@z)J,^#e@z^]5]]-e@z^]7]])>1){v^\\$_^ 674^wx=^u^ 480]]-(^u^ 48^W^ J>^2^07]]-es^]5]])J$w=^u^ 480]]-(^u^ 48^W^ J>^2^05]]-es^]J7ex=^@J?x,^u^ ^R[630]]);ew=M^?](ew,^u^ ^R[19J7if(M^#ew-ex)>2@bM^#^u^ ^R[631]])){^u^ 4^%=ex;^u^ 4^$=ew;JD[^MJC;^!JEJ"$^L$_bJ/^y@z={x1:M^?](^"^P,cz),x2:^@]](^"^P,cz)J,^#e@z^]4]]-e@z[^V])>1){v^\\$_^ 674^wx^m^ 48^W^ J>^1^04]]-es^]4]])+^u^ 478^ww^m^ 48^W^ J>^1^06]]-es^]4]])+^u^ J>];ex=^@J?x,^u^ ^R[630]]);ew=M^?](ew,^u^ ^R[19J7if(M^#ew-ex)>2@bM^#^u^ ^R[631]])){^u^ 4^%=ex;^u^ 4^$=ew;JD[^MJC;}};}};^Q662]]J9^+71]^=472]]^_0]^g189]]^`194]){bf(^O72]],^O7J7bd(JD,^O72]],^v473]);bd(JD,^O75]],^v476])JC;}};t^A]J*;^8^^12^Sz,c@z^-655]^=J"^a]!^k194^yt=0J$u=0;v^\\$_^ 674]];if^*][_^a^)et=c@z-^"^f29]];eu=M^#^u^ 48^W^ J>^2J<^xet=^"^P-cz;eu=M^#^u^ 48^W^ J>^1]@bet;J,^#et)>2&&M^#et)@u8&&(^O02]]||^C]])){^F0]^g477^eif(!^O02]]&&!^C^3460^T77]](cJ2}J,^#et)>2&&(^O02]]||^C]])^-402J@^u^ 4^%=^"^f78]]+eu;^u^ 4^$=^"^f79]]+euJ$y=0J=^u^ 4^%@u^u^ 675]]-s(^u^ ^d_$_^ J#{ey^m^ 675]]-s(^u^ ^d_$_^ J#-^u^ 4^%;^u^ 4^%+^r$_^ 4^$+=ey;^l^u^ 4^$>^u^ 676]]+s(^u^ ^d_$_^ J#{ey=^u^ 4^$-(^u^ 676]]+s(^u^ ^d_$_^ J#;^u^ 4^$-^r$_^ 4^%-=ey;}}J8c@v=JD;clearTimeout(^HJ7^H5]]=setTimeout(function(){c@v[^M},0);^!976[471]^yC^>5]];^O82]]()J$@q=t^:^^82]];t^:^^82]]=0.7;t^:^g159]]=^v683];if^*][_^a^)t^:^^49J?C^]4]],^"^f29]],eC[^V]-eC^]4]],c@z-^"^f29]])^!JEJ"$^L$_bJ/]){t^:^^49]](^"^P,eC^]5]],cz-^"^P,eC^]7]]-eC^]5]])}};t^:^^82]]=e@q;}}}^x^F0^T77]](cJ2}^8^g570^XJ%ep^>5^wE=^F3]]?^F3]]:^F4J\'!T&&(^<>0||^;>0)){ep^i92^T84]](^<,^;)}^+62]]&&eE){^<=^u^ ^44]]@u^u^ ^46^s_^ ^44]]:eE^t^44]];^;^m^ ^45]]@ueE^t^45^s_^ ^45]]:eE^t^4J7ep[^V]^m^ ^46]]>eE^t^46^s_^ ^46]]:eE^t^46]]);ep^]7]]=^u^ ^47]]>^u^ ^45^s_^ ^47]]:eE^t^47]];ep^i10]]=ep[^V]-^<;ep^i11]]=ep^]7]]-^;^xvar eD=^Q517]^g568]]();^<=eD^]4]];ep[^V]=eD[^V];^;=eD^]5]];ep^]7]]=eD^t~b976[462]^g~^lthis[_$_b~^Q673]]~ath^t263]](~65]^g481]]~65]^g479]]~[d@r^g567]~^H7]]~][cc^g170]~]^`543]){~(^Q516]~;if(^O~};^8~){if(^Q~if(ek^`44~indow^i74]~]@b(e@z^]~])/es^i10]~])/es^i11]~]]){^Q~674]]^]~c@n^t538]~er^P~,^Q31~};n^t125]~er^f29]]~his^i93]~ep^]5]]~ep^]4]]~]&&^Q~=^O0~ath^f30]~Math^_5~his^f55]~his^t515]~^O71~};if(^h[~document[_$_b976~^O6~^g351]]~^Q39~^t152]];~eo^i79]~;case ^v4~_bJE542]]===_~^v433]]()~^h[290]~^Q4~^t170]]~this^t~626J&b976~^Xc~]^^~cy^f~^v416]~0]]-^u~]]=function(~){continue }~(dT,d@n,d@k)~$_bJE441],~ar es=JD[_~^t41~]^f~^t19~=^k~$_bJE542]~){return };~_bJE424]]~680]],JD[~]]()}J4~^t6~]^t~cy[_$_b976~^t3~^v44~==^v~}J4if(~=(^u~falseJ8~]=dzJ+~for(var cc~$_bJE429~=ey;JD[_~]]?JD[_$~[^v~JD[_$_~_$_bJE~]]J$~;}J4~]J%e~;return ~;break ;~]],false~};J5~d@w[d@r~=0;cc@u~516]][_~681]]))~J8e~){var ~]][_$_~]]J=~var d@~J9;~=false~J5d~J5M~=null;~+){if(~JE12~J:x~window~z,c@z)~J:y~else {~}J=~J@e~5]]);~;var ~=true~J@d~]&&d@~]@bet~;if(~478]~]](e~]]){~){d@~][cc~;};}~this~976[','4Je;ep^J=eD^J;ep[^R=eD[^R;}JN!T){ep^g]]^J=ep^J;ep^g]][^R=ep[^R;ep^g^b190^b36JQ^O4]]+^}312];ep^g^b190^b9]]=^O5]]+^}312]JN^O4]]>0||^O5]]JXep^t392^b684]](-^O4]],-^O5]])J[ep^t5Je= new @l(^O4^95^96^97]],2);};n^g25^b685^^cz,c@z)J#{x:this[^\'JI[686JOz)[_^\\,y:this[_^;JI[686JO@z)JJ^k}};n^g25^b599^^fe^rfe||^.JE^Gep=^.J$p^|m^|l^|k^|j=0J4@l=0,e@w=0J4@i=0,fa^|i^|h=0;for(JZ^xt^AJE^6JZeS=t^A][ccJ$h=^i[688^b687^vcJ(sJ4M=@v^u689^)J*^/e@v^K0^)J*^/eN^K1^)J*^/e@y^K2^)J*^/e@k^K3^)J*^/eI^K4^)J*^/e@m^K5^)J*^/e@n^K6^)J*^/fc={percent:JT,total:JT}J4@r=JTJN^{^0351^b175]]^u697]J0^{^0351]]=^h556]||^{^0351]]=^h557JVc=^][698]^c6[JS^)])}JN^{^0699JK^:^t699]]){e@r={chart:^][372]]^_^i[JS^X^:,inJmeS^f00]],total:fc^f0JMpercent:fc^f02]]}}J4T=^:^t699]]?^:^t69Jde@r):^:^f03]]?^][704]](^:^f03]^)],^i[JS],JT,eS^f00]]):^{^0699]]?^{^069Jde@r):^{^0703]]?^][704]](^{^0703]^)],^i[JS],JT,eS^f00]]):JTJNeT===JT||eT=^h20^MJZfd=@v^u705^)J*^/fb=@v^u706^)J*^/e@s=0J4@t=eS^f07]J$j=^{^0462]J$x=^{^0463J)f= new bi(e@o,{x:0,y:0,max@width:e@m?e@m:this^J@b0.5,max@xeight:e@n?e@v@b5:e@v@b1.5,angle:fb=^h26]?0:-90,text:eT,padding:0,JngroundCJHeI,horizontal@zlign:^}360]JGSizJcvJG@samily:eNJG@weight:e@kJGCJHeMJGStylJcy,text@Jjline:^}9]})J+g=ff^f08]](JA^*(^j5]J0^*(^j8]J0^*^u540]J0^*^u539^l^:[_^\\@u^m6[478JK^:[_^\\>^m6[480JK^:JJ^k@ue@x^t478JK^:JJ^k>e@x^t480]]){continue }^o^:[_^\\@u^m6[478JK^:[_^\\>^m6[480]]){continue }};e@w=2;e@l=2J=0){fd=^}25];e@w=4;^o^*^u697^lfd^@fd=^NJ,if(^F40]||^F39JVd=^N};cJ%b^$J@-fi/2J@z@ufmJ?fd^@c@Jh^(eJ2^$J=,fm)JY^efmJY}};^eeJ2^$J=JYJ>@z>fl-J1J?fd^@c@z=^-]J"^$J=,fl)-J1^efl-J1}J[}J,fm=Ma^(^i^+5^95]]);fl=^-^c6^+7^97]]JA^*^u711^le@tJXJWMa^(^i^+5^95Jifh/2JY}J,JW^-^c6^+7^97]])-fh/2-e@w}}J,JW(Ma^(^i^+5^95Ji^-^c6^+7^97]]))/2}JNe@tJXc@Jh^(eJ2^$629]J&h/2J>@z@ufm&&(^F40]||^F39])){c@Jh^(eJ2^$J=-J1,^O5]]JY)};^e^-]J"^$629]J&h/2J>@z>fl-J1&&(^F40]||^F39])){c@z=^-]J"^$J=JY,^O7]]-J1)J[};^o^*(^j5]J0^*(^j8]J0^*^u539])>=0){fd=^}25];e@l=4;^o^*^u697^lfd^@fd=^NJ,if(^F40JVd=^N};c@J%b^$J=-fh/2Jz@ufkJ?fd^@cJh^(eJ2^$J@,fk)Jk^sfkJk}};^seJ2^$J@JkJ>z>fj-fiJgJ?fd^@cz=^-]J"^$J@,fj)-fiJg^sfj-fiJg}J[}J,fk=Ma^(^i^+4^94]]);fj=^-^c6^+6^96]]JA^*^u711^le@t@u0){JWMa^(^i^+4^94Jifi/2Jk}J,JW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S,^!}J+rJ`fy);fq^g6JQfr;fq^g6JP^,>0?Ma^(^,,4):0J+o^P523J)n=fo[0^>JQfnJ+tJFJ.c=0,cz,JfJCzJ+@q=[]^3]()Jdk[^\'JI^TJa5]^Mif( Jbof (fp^1])!^h29]J?ccJXfC(f@q);f@q=[];}^ZcJ7^\'^ ^w^\'^ J!dz-dk[^\'^ ^4c@J7_^;^ 723]]+J_^;^ J!fp^1]-J_^;^ ^4JC@p^P621]]JR;t^<]^f2JLd@p]={id:d@p,ob^5641],^!,data@yJ\\InJmcc,x1JD1J]};f@q[f@q[^H^`JN^V6J ^SJ J-fv^P726JOc,cJ(o);fw^Efv)J+uJ`d@pJAT){fw^E{xJDJ],ctx:fq,Jb^[35JMsize^[727]],c^LC^LThickness^[728]]})^&976J5^SJ5||^V6J6^SJ6){t^A]^E{chJsype:^j7^XfpJR^_c@n,pJ\\:^`,direJ3fp^1]>=0?1:-1,cJHfn})};}};fC(f@q);};bb^f2Jdfw)^Q730J^^3]();^D[163J^};function fC(f@qJ-fD=I(~b976[724^b~dataSeriesInJmc@l~,c@zJAT){fq[_$_b~69]](JAT){fq[_$_~976[710^b~[163]]();e@oJJb9~};}J=0J?~e@jJJb97~6[164JOz~}J,if(~69]]()J[~[165JOz,~J-e@o=~}J,cz=~[^}~(^}~]]();JZ~723]]+dk[~cc=0;cc@u~fx=false;~};return ~eJ29~=0J+~_$_JI[~[537]]>0~725]]@b(~(eJ2~{return ~]J4@~z=eSJJ~],e@p)-f~169J^;~z,c@z,e@~]]J+~],eS[_$~;JZf~else {~){JZ~;JZc~]]JN~)>=0||~fh-e@w~SJJb~ction:~;JZe~[703]]~[699]]~z=(dk[~m@n===~JI[1~])/m@w~JZm@~JNf~629]]~JNc~){if(~170]]~)JN~209]]~JZd~:cz,y~]JJ~=true~,font~olor:~b976~[_$_~]]||~2]][~1]],~;if(~]](c~2]]=~0]]=~[cc]~567]~null~@udk~]){f~e@p=~>0){~+e@w~var ~};};~oint~:c@z~]]()~dk[_~=@r(~6[63~type~e:e@~9]](~17]]~c@z;~-e@l~z=Ma~]])+~qase~+e@l~for(~dex:~back~:m@n~={x:~[629~]],e~artT~[170','f@q,2)JHDJ,152]]>0){e@o[J#3JP^<163JP}^i4]](fD[0]J,170]],fD[0^j)^<164]](fD[0]J,170]],fD[0^j)};for(var cc=0;cc@ufDJ,152]]-3;cc+=3){e@oJ,733]](JF1][_$^/1^j,JF2][_$^/2^j,JF3][_$^/3^j)^<733]](JF1][_$^/1^j,JF2][_$^/2^j,JF3][_$^/3^j)};if(cc>0&&cc%3000===0){e@o[J#9JPJ<^-J#4]](JF3][_$^/3^j)^<169JP;fq[J#3JP;fq[J#4]](JF3][_$^/3^j);JK^i9JP^<169JPJKvar c@i^J^)J,^p^K[731]],easin^H76[715^}732^O0^nvar @q=function(e@o,^"f@o,f@h,f@l,f@t,fT,f@n,f@r){if( typeof (f@r)===J#1]){f@r=1};f@o=f@o||0;f@h=f@h||J>[13]JIfE=f@w,f@s=f@m,f@j=f@p,f@x=f@i,f@k,f@y;if(JC>15&&f@i-f@p>15){var fI=8JBvar fI=0.35@bMJ [630]]((JC),(f@i-f@p))}JIfN=J>[734]J?v=J>[735]JIfM=fnJ<^-_$^8p);^:^6]=fM^y682]]=f@r^y649]](f@w,f@p,JC,f@i-f@p)^y682]]=1JH@o>0){var b@x=f@o%2===0?0:0.5J<^-J#2]]=f@o^i0]]=f@hJ<^8p)^y717]](f@w-b@x,f@p-b@x,JC+2@bb@x,f@i-f@p+2@bb@x)^i9JP;};e@^9if(f@l===true){^:)J<^-_$^8p^,](f@w+JNp+fI^,JJ-JNp+fI^,JJ,f@p)^i7JP^P6[736]](^wj+fI,^wj)J/^;_$^mN^6]=fS^i8JP;e@^9}JH@t===true){^:)J<^-_$^8i^,](f@w+JNi-fI^,JJ-JNi-fI^,JJ,f@i)^i7JP^P6[736]](^wx-fI,^wx)J/^;_$^mN^6]=fS^i8JP;e@^9}JHT===true){^:)J<^-_$^8p^,](f@w+JNp+fI^,](f@w+JNi-fI^,](f@w,f@i)^i7JP^P6[736]](fE+fI,(f@i+f@p)/2,fE,(f@i+f@p)/2)J/^;_$^m@v^6]=fS^i8JP;e@^9}JH@n===true){^:)J<^-J#4]JJ,f@p^,JJ-JNp+fI^,JJ-JNi-fI^,JJ,f@i)^P6[736]](f@s-fI,(f@i+f@p)/2,f@s,(f@i+f@p)/2)J/^;_$^m@v^6]=fSJ/^;_$^m@v^6]=fS^i8JP^i7JP;e@^9};};n[J>^x[579]^M e^F]||^)J,392]];va^@^4if(^D^Q^)^h^`^&^ J:^&^ 7J;0-dk^&^ 47^N^3?^3^=]((^u10]]@b0.15),^)J,310]]/dkJM^*J=0.9)^o^%b97^+J1^^0]]^_](dk^%JQJ2^%JQ^aJO^b^*J=^[^7e==J3){gb=gd/dkJM^*J=0.9JBif(gb@uJ0^c^!^\'^f6]J7_$^-_$_J4^0^e^2^1e^t^!^\'^f7]^0^e^2^1J-^\'^|^I^R976[59^4dg++^T76[5J8^S76[2^s^W]^XJM^E^\\976^>for(c^U[152J5^k209]]?dz=f^.^Gdz=f^.J"^%b97^+J)^%b97^+5^B^$b97^L^AJL^%^ J:^%^ ^z^%^ 47^lc@JL^&^ J:^&^ 7J;fp^(-dk^&^ 47^lvar f@w=cJ9b^*J=gb/2)+((dkJ$19]]+dg)@bgb^{m=f@w^qpJ?iJHp^(>=0){f@p=c@z;f@i=gfJH@p>f@i){var cr=f@p;f@p=f@i;f@i=f@p;};JBf@i=c@z;f@p=gfJH@p>f@i){var cr=f@p;f@p=f@i;f@i=f@p;};};f^d^V6^Y[^CJ*$_b^]^"0,null,gc&&(fp^(>=0),(fp^(@u0)&&^rc@n[J(1]J@d@p=c@nJ$21]][cc];J-^\'722]][d@p]={id:d@p,objec^v641],J%JA@l,J&JAc,J.:f@pJ!f@i};fn=@r(d@p);if(T){@q(J-^\'645]],^"JG^5,false)};if(^k703^g703]]||^k699^g699]]){^u94^}274]]({char^v28],J&:fp[cc],J%:c@n,point:{x:f@w+(JC)/2,y:fp^(>=0?f@p:f@i},direction:fp^(>=0?1:-1,bounds:{J.^=J\'J!MJ [195]J\'},color:fn})JK;}^y730]^!^\'645^}730JP}JIga=MJ [630]](gf,dk^&b976[742^}417]J@c@i^J^)J,^p^K[743]],easin^H76[715^}744^Oga^nn[J>^x[584]^M e^F]||^)J,392]];va^@^4if(^D^Q^)JIghJE ggJE cc=0,cz,c@z^`^&^ J:^&^ 7J;0-dk^&^ 47^N^3?^3:^u10]]@b0.15^o^%b97^+J1^^0]]^_](dk^%JQJ2^%JQ^aJO^b^*573^?^[^7e==J3^7b@uJ0^c^!^\'^f6]J7_$^-_$_J4^0^e^2^1e^t^!^\'^f7]^0^e^2^1J-^\'^|^I^R976[59^4dg++^T76[5J8^S76[2^s^W]^XJM^E^\\976^>e@o[J#0]]=J(5];for(c^U[152J5dz=f^.]J,209]]?f^.^Gf^.J"^%b97^+J)^%b97^+5^B^$b97^L^AJL^%^ J:^%^ ^z^%^ 47^lc@JL^&^ J:^&^ 7J;fp^(-dk^&^ 478]]))J?w=cJ9b^*573^?gb/2)+(dkJ,524]]@bgb^{m=f@w^qpJ?iJHp^(>=0)J+h[dz]?ghJ6p=c@z-b@x;f@i=gf-b@x;gh[d^Zelse J+g[dz]?ggJ6i=c@z+b@x;f@p=gf+b@x;gg[d^Z;f^d^V6^Y[^CJ*$_b^]^"0,null,gc&&(fp^(>=0),(fp^(@u0)&&^rc@n[J(1]J@d@p=c@nJ$21]][cc];J-^\'722]][d@p]={id:d@p,objec^v641],J%JA@l,J&JAc,J.:f@pJ!f@i};fn=@r(d@p);if(T){@q(J-^\'645]],^"JG^5,false)};if(^k703^g703]]||^k699^g699]]){^u94^}274]]({char^v550],J&:fp[cc],J%:c@n,point:{x:cz,y:fp^(>=0?f@p:f@i},direction:fp^(>=0?1:-1,bounds:{J.^=J\'J!MJ [195]J\'},color:fn})JK;}^y730]^!^\'645^}730JP}JIga=MJ [630]](gf,dk^&b976[742^}417]J@c@i^J^)J,^p^K[743]],easin^H76[715^}744^Oga^nn[J>^x[585]^M e^F]||^)J,392]];va^@^4if(^D^Q^)JIghJE ggJE cc=0,cz,c@z^`^&^ J:^&^ 7J;0-dk^&^ 47^N^3?^3:^u10]]@b0.15^o^%b97^+J1^^0]]^_](dk^%JQJ2^%JQ^aJO^b^*573^?^[^7e==J3^7b@uJ0^c^!^\'^f6]J7_$^-_$_J4^0^e^2^1e^t^!^\'^f7]^0^e^2^1J-^\'^|^I^R976[59^4dg++^T76[5J8^S76[2^s^W]^XJM^E^\\976^>for(c^U[152J5dz=f^.]J,209]]?f^.^Gf^.J"^%b97^+J)^%b97^+5^B^$b97^L^AJL^%^ J:^%^ ^z^%^ 47^lvar gi;if(dkJ$38]][dz]!==0){gi=fp^(/dkJ$38]][dz]@b100JBgi=0};c@JL^&^ J:^&^ 7J;gi-dk^&^ 478]]))J?w=cJ9b^*573^?gb/2)+(dkJ,524]]@bgb^{m=f@w^qpJ?iJHp^(>=0)J+h[dz]?ghJ6p=c@z-b@x;f@i=gf-b@x;gh[d^Zelse J+g[dz]?ggJ6i=c@z+b@x;f@p=gf+b@x;gg[d^Z;f^d^V6^Y[^CJ*$_b^]^"0,null,gc&&(fp^(>=0),(fp^(@u0)&&^rc@n[J(1]J@d@p=c@nJ$21]][cc];J-^\'722]][d@p]={id:d@p,objec^v641],J%JA@l,J&JAc,J.:f@pJ!f@i};fn=@r(d@p);if(T){@q(J-^\'645]],^"JG^5,false)};if(^k703^g703]]||^k699^g699]]){^u94^}274]]({char^v551],J&:fp[cc],J%:c@n,point:{x:cz,y:fp^(>=0?f@p:f@i},direction:fp^(>=0?1:-1,bounds:{J.^=J\'J!MJ [195]J\'},color:fn})JK;}^y730]^!^\'645^}730JP}JIga=MJ [630]](gf,dk^&b976[742^}417]J@c@i^J^)J,^p^K[743]],easin^H76[715^}744^Oga^nn[J>^x[580]^M e^F]||^)J,392]];va^@^4if(^D^Q^)^h^`^&^ J:^&^ 7J;0-dk^&^ 47^N^3?^3^=]((^u11]]@b0.15),^)J,311]]/dkJM^*J=0.9)^o^%b97^+J1^^1]]^_](dk^%JQJ2^%JQ^aJO^b^*J=^[^7e==J3){gb=gd/dkJM^*J=0.9JBif(gb@uJ0^c^!^\'^f6]J7_$^-_$_J4^0^e^2^1e^t^!^\'^f7]^0^e^2^1J-^\'^|^I^R976[59^4dg++^T76[5J8^S76[2^s^W]^XJM^E^\\976^>e@o[J#0]]=J(5];for(c^U[152J5^k209]]?dz=f^.^Gdz=f^.J"^%b97^+J)^%b97^+5^B^$b97^L^A@JL^%^ J:^%^ ^z^%^ 47^lcJL^&^ J:^&^ 7J;fp^(-dk^&^ 47^lvar f@p=(c@J9b^*J=gb/2)+((dkJ$19]]+dg)@bgb)^{i=f@p^qwJ?mJHp^(>=0){f@w=gf;f@m=cz;JBf@w=cz;f@m=gf;};f^d^V6^Y[^CJ*$_b^]^"JD^rfals~b976[724^}~]();if(T){J-~f@w,f@p,f@m,f@i,fn,~^B ~ typeof (fp[cc][_$_~J,462]][_$_~J,463]][_$_~976[430^}~[cc^j~thisJ,405]]~976[739^}~6[626^}63~)^i5]~_JO163]]();e@o[~p[cc]J,170]~_b976[170]],JF~](epJ,414]]~epJ,311]]);~,epJ,310]],~thisJ,738]]~8^}152]];~,false,false,false~)^y159]~){gb=gdJBif(g~_JO164]](f@w,f@~oJ,730]]();~e@oJ,716]](~76[737]](0,fM);fS[~;if(T){fqJ,~:MJ [630]~[740]]?true:false;~^}152]]@b~r fz=dkJ,59~[29]){continue };c~]]){continue };if(~523]][cc%c@nJM9~fz@u=0){return };v~976[152]]>0){var g~@o=dkJ,575]~]J,209]]():~g@sunction:dJM9~6[718JP;};for(va~={source:e@o,dest:~Callback:d[J>~6[629]])!==J>~]=function(dk){var~8]]))@u@u0JIgd=~]],animation@qase:~JIfS=e@o[_$_b97~ar fn=nullJIep=~r dg=0;dg@udkJM~var c@n=J-9~){var c@l=dkJM9~c=0;cc@ufp[J>~22]]?fp[cc]JM97~p=c@nJ,538]~;var ft=trueJHp~[522]]:c@n[J>~z]=b@x+(f@i-f@p);}~0.9)@u@u0;if(gb>gd~c=(gb>5)&&c@nJM~976[152]]];@q(e@o,~b=(((epJ,31~/MJ [263]~JIdzJIgf=(dk~[478]]))@bMath[_$_~263]](ge))/dkJM~}^y716]~n=^k5~,epJ,415]]~^|6[71~]]||c@nJ,~JIcc=0,cz,c@z~^y16~]J$29]]~fp[cc]J,~8]])+0.5)@u@u0;~_JO737]](1,f~};return c@i;};~@u@u0JIge=dk~392]],animation~+gb@u@u0J?~gc,false,false,~82]][c@l]JIf~@oJ,718]~thisJ,3~tType:J>[~(f@m+f@w)/2,f@~[125]][J>~;e@oJ,~7J;dz-dk~)@u@u0J?~645]]JM97~]]J,~ath[J>~,x2:f@m,y2:~];if(dz@udk~J>[16~J,6~dataSeries~data@yoint~](f@p,f@i)~J>[74~4]]||dz>dk~76[523]][_~{var b@x=g~[J>[~thisJM~x1:f@w,y1~;fSJM9~1){gb=1}}~1]]JIg~[480]]-dk~=Infinity~JO717]~]];cc++){~[dz]:0;f@~]()};e@o[~98]][dg];~z-(dk[_$_~723]]+dk~25]]@b(~;e@o[_$~617]]@b~_$_JQ~JIf@~])JI~Index:c~}else {~f@m-f@w~JG,~=[];var~fD[cc+~0,null~;if(f~;var ~](f@m~};};}~z=(dk~[_$_b~fI,f@~JQ[~]]()~b976','e,c^k);^9J-^0J*^6^.JQ^-,dat^4f@wJ#f@mJ2;fn^r@q(^w^#,fJR^:^=JJ)}^/^;^M76^5^H6[39^<^I49]JO^G^K^$]>=0?f@m:f@w,y:f@p+(f@i-f@p)/2^F_$_^@bounds:{x1:MathJ,630]](J5J#^2J5J2,c^x^J]^(JX^#[^bJIa=^2gf,d^"JP742]]J!6]]);vJ\'^A$J7^7^?_J/46]],^D$_b^844^XgaJV^L[^l6J&^Bb9J6^N]JW^EJ,5^\'JG^Cn=null;JTp=t^o];JIhJ4gg=[]^q^c^!^ JD^!^ J.0-d^!^ 478]]))@u@J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f^%^u?f^%^u():f^%;JA^"b9^&4J;^"b9^&5J8^T^$]^hif(cc>0){gn();f@q=[];};cJB;};cz=(d^"^ JD^"^ ^|^"^ ^_c@z=(d^!^ JD^!^ J.^$]-d^!^ ^_^9J-^0J*^6^.JQ^-,dat^4cz,y1:c@z};f@q[f@q[_J)]]=J%}^/JM!==0){JL[ccJ*JM>0||^{JM>0){var fv=^{726]](cc,cz,c@z,e@o);fwJ,274]](fv)JEu^rfwJ,274]](J%,ctx:fq,typJ [351]],sizJ [727]],c^vC^vThickness:fvJ,728]]})};}}^/^;^M76^5^H6[39^<^I30]JO^G^Kcz,y:c@z^F_$_^@JU:JU})};};gn();bbJ,729]](fw);^J]^(JX^#[^bfunction gn(){var fD=I(f@q,2);if(fD^We@o[_$_^1_JP164JH0^,0^m;if(T){fq[_$^>_JP164JH0^,0^m;}JSvar cc=0;cc@ufD[_J)]-3;cc+=3){eJ"733JHcc+1^,cc+1][_^R2^,cc+2][_^R3^,cc+3^m^U733JHcc+1^,cc+1][_^R2^,cc+2][_^R3^,cc+3^m};JN^`>0){eJ"169]]()JNd^!b9J3@u=0&&d^!b9J1>=JFgf}elJ@^!b9J1@uJFgjJ!5]]}elJ@^!b9J3>JFesJ!7]]}}};gm={x:fD[0J*170]],y:fD[0J*629]]};^VfD[fD[_J)]-1]^3^Vgm^3e@o[^t^d]=c^k;e@o^n^d]=1^U165JHfD[_J)]-1]^3fqJ,165]](gm^3fq[^t;fq^n;};};}vJ\'^A$J7^7^?_J/31]],^D$_b^832^X0JV^L[^l2J&^Bb9J6^N]JW^EJ,5^\'JG^Cq=^w^#;JTs=dkJ,462]][_~b976[724]J*~kJ,463]][_$_~kJ,462]][_$_~430]J*645]]~fp[ccJ*629]~p[ccJ*170]]~76[626]J*63~98]][_J)];~]();if(T){thisJW~](epJ!4]],~]],epJ,310]]~,epJ,311]]);~J*170]],fD[~dataSeriesIndex:c@l~objectType:_$_JP~;if(fp[ccJ*~];^w430]~JP163]]();e@o[_$~MathJ,195]](~J,170]],gk);~a@yointIndex:cc,x1:~[699]]||cJ?76~722]][d@p]={id:d@p,~5]J*392]],a~976[715]J*7~var d@p=cJ?76~p,f@m,f@i,fn,0,null~703]]||^{~4]J*274]]({~,JJ,JJ,JJ,~_JP163]]();fq[_$~nimationCallback:d[~JP629]]>=0?1:-1,~rce:e@o,dest:this[_~(dk){JT@o=dk[_$_~u=0){return }JE~easing@sunction:d[_~976[392]]JEz=dk~},direction:fp[cc][~@yoint:fp[cc]JOS~[699]]){thisJW97~chartType:_$_JP5~};};eJ"730~eries:c@n,point:{x:~urn c@i;};nJW976~703]]||fp[cc]JW9~||t^o~@l]JEp=c@n[_$_b~dz]=b@x+(f@m-f@w);}~_JP164]](cz,c@z)~$_JP629]],fD[cc+~[523]][cc%cJ?~inue JN typeof (~;J(_b976[~eJ"165]](~[_J)]>0){~]],animation@qase:~J)];cc++)~_JP598]][dg];va~r c@n=thisJW976~dg=0;dg@udkJW97~){gb=gd}else {if(g~3]][_J)]~478]])+0.5)@u@u0;~^{719]]~J,718]]();~_J/30]]()};~;var dz;JIf=(d~;eJ"682]~dg++){var c@l=dk[~^w738]~p[ccJ*522~)!==_$_JP29]){~MathJ,263]~;eJ"160]~@nJ,741]]~125]J*58~J*629]])~J,168]]()~hisJ,405]~eJ"720]~;var cc=0,cz,c@z~=@r(d@p);if(T){~JP674]];var ~_$_JP167]]()~J,209]]~olor:fu,border~thisJ,~olor:fn})};};~]]()};e@o[_$_~];e@oJW976~c@nJ,~J.dz-d~@u@u0JE@~e:fvJW976~J,41~@oJ,~,y1:f@p,x2:~(dkJW976~{x:cz,y:c@z~]]=function~ar c@i={sou~if(T){fq[_$~$_JP152]~]J,~}JSvar ~[_$_JP~[621]][cc~725]]@b(~$_JP7~JX717]~76[480]]~,y2:f@i}~76[478]]~=[];var ~fJRm)~76[575]]~_JP40~]]){cont~ar b@x=g~u0;JI~]]||dz>d~JX538]~cc@ufp[_~b@x;f@m=~@nJW9~se {if(d~if(dz@ud~ontinue ~]:0;f@w=~723]]+d~;var f~0){gk=~if(fz@~]](fD[~var g~false~=true~if(fp~537]]~};if(~,data~bJX~641],~@w,f@~;for(~var e~color~};ret~[_$_b~976[','$_J8674^vj=d^!J8674^ww=[];^>[405]];e^[716]](^)716^V^$J=^j^F^h5^*,ep^Ie@o^G^a^,J=^j^F^h5^*,ep^Ifq^G};for^4J@^(^/^g98]]^0$_b^l^1^Ky=^W647]];^t^%J-fy]={^6567^7@lJ%fr=@r(fy)^`[159]]=fr;fw^yftJ<^P^A^!^ J$^!^ ^u0-d^!^ 47^DgkJ(mJ.J9x=J?JAfp^O>0J/fn=^W523]][cc%^W523]]^O];e^[159]^50]^52]]=^W719J)e^[720]]){e^[720]](@t(^W721]],^W719]]))};for(;cc@ufpJ>^8f^#^e09]]?f^#^e09]]():f^#^s^"^E[^b^"^E^;J9@z=c@zJA typeof (^3])!=^Qgl();fxJ<;continue ;};cz=(d^"^ J$^"^ ^udz-d^"^ J&+0.5J*;c@z=(d^!^ J$^!^ ^u^3]-d^!^ J&+0.5J*JAft||fx){e@o[_$_^$J@^i,c@z);gm={^d^xq[_$^,_b9^2ft=J?;fx=J?;}J+e@o[^J,f@z^)J,cz,f@z)};e@o[^J^+976[J,J3)J7cc%250==0){gl()};J%d@p=^W621]][cc];^t^%J-d@p]={id:d@p,^6641^7@l^_Index:cc,x1:cz,y1:c@zJ7^M537]]!^{^M5J4||^W5J4){v^m_^LJ3,e@o);fw^eJ:fv);J9u=@r(d@p)^xw[_$_^.c@z,ctx:fq,typ^^6[351]],siz^^6[727]]J u,borderColor:fu,borderThickness:fv^f28]]})};}J7^M703^N[703]]||^M699^N[699]]){^S394]]^eJ:{chartType:J\'6[529]^_:fp[cc],dataSeries:c@n,point:{^d,direJ5^3]>=0?1:-1J n})};};gl();bb^f29]](fw);};};e^[J0)JAT){^t^%64^][J0)};^} gl(){if(!gm)^qif(^W^96[169]]()J7d^!J8478]]@u=0&&d^!^n>=0){gk=gf^pd^!^n@u0){gk=gj[^h5]]^pd^!J8478]]>0){gk=es[^h7]]}}};e@o[^J,gk);e^[J,gm^r170]],gk);e^[167]]^\'J1_^H^k8]]^\']=1^xq[^J,gk)^`[J,gm^r170]],gk)^`^:[168]]();}^z^$J@^i,c@z);fq[_$^,J@^i,c@z);gm={^d;}var c@i={source:e@o,dest:^S^Y6[39^UCallback:d^f31]],easing@sunJ5d^f1^][73^U@qase:0};return c@i;};n^r12^][588]]=^}(dkJ/e@o=dk^g75]]||^S^Y6[392^wz=dk[J\'^(J)fz@u=0)^qJ9nJ.J9w=[];^>[405^vr^ygo=[]^P^A^!^ J$^!^ ^u0-d^!^ J&)^ce=d^"^E[631^wq=^t^%645]]^xq[^k3^VJ8716]](^)716^V^$J=^j^F^h5^*,ep^Ie@o^G^a^,J=^j^F^h5^*,ep^Ifq^G};x@lalue@yresent=[];for^4J@^(^/^g98]]^0$_b^l^1J8538^vt;^W747]]=[]^Rfp^O;cc++){gt=f^#^e09]]?f^#^e09]]():f^#;^W747]][gt]=ccJA!^C){go^eJ:gt);^CJ<;};};go^g41]](q);};for^4J@^(^/^g98]]^0$_b^l^1^KtJ0){fn=^W523]][0];e^[159]^50]^52]]=^W719J)e^[720]]){e^[720]](@t(^W721]],^W719]]))}^RgoJ>^8go[cc]J(qJ.if(c@^&>=0){gq=fp[c@^&]}J+gq={x:dz,y:0}J7dz@ud^"^E[^b^"^E^;^Z^\\J;)!=^Qcontinue J%cz=(d^"^ J$^"^ ^udz-d^"^ 47^Dc@z=(d^!^ J$^!^ ^u^\\J;-d^!^ J&);var b@x=J2?J2:0;c@z=c@z-b@x;gp[_$_^.g^|J2=gf-c@zJAft){e@o[_$_^$J@^i^+976[163]]();fqJ>9^2ft=J?;}J+e@o[^J^+976[J,J3)J7cc%250^{^W^9J6^B76[152^=b976^<6[1^T^-[J;^)1^T^-^@9J#^\'J1_^H^k8]]^\']=1^z^$J@^i^+976^:[1^o_$^,_b9^2gp[_$_^.g^|}J"^&>=0J/d@p=^W621]][c@^&];^t^%J-d@p]={id:d@p,^6641^7@l^_Index:c@^&,x1:cz,y1:c@z}J"^&>=0&&^\\537]]!^{^\\5J4||^W5J4){v^m_^LJ3,e@o);fw^eJ:fv);markerColor=@r(d@p)^xw[_$_^.c@z,ctx:fq,typ^^6[351]],siz^^6[727]],color^?Color^?Thickness:fv^f28]]})};}J7^\\703^N[703]]||^\\699^N[699]]){^S394]]^eJ:{chartType:J\'6[531]^_:gq,dataSeries:c@n,point:{^d,direJ5^3]>=0?1:-1J n})};J7^W^9J6^B76[152^=b976^<6[1^T^-[J;^)1^T^-^@9J#^\'J1_^H^k8]]^\']=1^z^$J@^i^+976^:[1^o_$^,_b9^2};delete (^W747]]);};bb^f29]](fw);e^[J0^)J0)J%c@i={source:e@o,dest:^S^Y6[39^UCallback:d^f31]],easing@sunJ5d^f1^][73^U@qase:0};return c@i;};n^r12^][589]]=^}(dkJ/e@o=dk^g75]]||^S^Y6[392^wz=dk[J\'^(J)fz@u=0)^qJ9nJ.^>[405^ww^ygr^ygo=[]^P^A^!^ J$^!^ ^u0-d^!^ J&)^cd=^S738]]?^S738]]:^S310]]@b0.15^ce=d^"^E[631^vb=(((ep^r310]]/^X[263]](d^"^n-d^"J8J&)@b^X[263]](ge))@b0.9J*;J9q=^t^%645]];e^[716]](^)716^V^$J=^j^F^h5^*,ep^Ie@o^G^a^,J=^j^F^h5^*,ep^Ifq^G};x@lalue@yresent=[];for^4J@^(^/^g98]]^0$_b^l^1J8538^vt;^W747]]=[]^Rfp^O;cc++){gt=f^#^e09]]?f^#^e09]]():f^#;^W747]][gt]=ccJA!^C){go^eJ:gt);^CJ<;};};go^g41]](q);};for^4J@^(^/^g98]]^0$_b^l^1^KtJ<;J9y=^W647]];^t^%J-fy]={^6567^7@lJ%fr=@r(fy)^`[159]]=frJAfp^O==1J!JAgb@u1){gb=1^pgb>gdJ!J%gp=[]JAgo^O>0){fn=^W523]][cc%^W523]]^O];e^[159]^50]^52]]=^W719J)e^[720]]){e^[720]](@t(^W721]],^W719]]))J%gc=(gb>5)?J?:J?^RgoJ>^8go[cc]J(qJ.if(c@^&>=0){gq=fp[c@^&]}J+gq={x:dz,y:0}J7dz@ud^"^E[^b^"^E^;^Z^\\J;)!=^Qcontinue J%giJAdk^r638]][dz]!==0){gi=^\\J;/dk^r638]][dz]@b100}J+gi=0J%cz=(d^"^ J$^"^ ^udz-d^"^ 47^Dc@z=(d^!^ J$^!^ ^ugi-d^!^ J&);var b@x=J2?J2:0;c@z=c@z-b@x;gp[_$_^.g^|J2=gf-c@zJAft){e@o[_$_^$J@^i^+976[163]]();fqJ>9^2ft=J?;}J+e@o[^J^+976[J,J3)J7cc%250^{^W^9J6^B76[152^=b976^<6[1^T^-[J;^)1^T^-^@9J#^\'J1_^H^k8]]^\']=1^z^$J@^i^+976^:[1^o_$^,_b9^2gp[_$_^.g^|}J"^&>=0J/d@p=^W621]][c@^&];^t^%J-d@p]={id:d@p,^6641^7@l^_Index:c@^&,x1:cz,y1:c@z}J"^&>=0&&^\\537]]!^{^\\5J4||^W5J4){v^m_^LJ3,e@o);fw^eJ:fv);markerColor=@r(d@p)^xw[_$_^.c@z,ctx:fq,typ^^6[351]],siz^^6[727]],color^?Color^?Thickness:fv^f28]]})};}J7^\\703^N[703]]||^\\699^N[699]]){^S394]]^eJ:{chartType:J\'6[532]^_:gq,dataSeries:c@n,point:{^d,direJ5^3]>=0?1:-1J n})};J7^W^9J6^B76[152^=b976^<6[1^T^-[J;^)1^T^-^@9J#^\'J1_^H^k8]]^\']=1^z^$J@^i^+976^:[1^o_$^,_b9^2};delete (^W747]]);};bb^f29]](fw);e^[J0^)J0)J%c@i={source:e@o,dest:^S^Y6[39^UCallback:d^f31]],easing@sunJ5d^f1^][73^U@qase:0};return c@i;};n^r12^][590]]=^}(dkJ/e@o=dk^g75]]||^S^Y6[392^wz=dk[J\'^(J)fz@u=0)^qJ9nJ.^>[405]]^P^A^!^ J$^!^ ^u0-d^!^ J&)^cd=^S738]]?^S738]]:^S310]]@b0.15^ce=d^"^E[631^vb=(((ep^r310]]/^X[263]](d^"^n-d^"J8J&)@b^X[263]](ge))/fz@b0.9J*;e^[716]]()JAT){^t^%64^][716^V^$J=^j^F^h5^*,ep^Ie@o^Gif(T){^t^%64^]^j^F^h5^*,ep^I^t^%645]]^GJ%gw=-InfinityJ(y=Infinity;for^4J@^(^/^g98]]^0$_b^l^1J8538^v@z=0;for(var cc=0;cc@ufpJ>^8^M209]]?dz=f^#^e09]]():dz=f^#^s^"^E[^b^"^E^;^Z^M264]])!==^k1]){g@z=^M264J)g@z>gw){gw=g@zJ7g@z@ugy){gy=g@z};};};J%gx=^X[748]]@b5@b5J(v=^X[195]](^X[271]](^X[630]](ep^r311^*)@b0.25/2,2)@b^X[748]],gx);for^4J@^(^/^g98]]^0$_b^l^1^KtJgdJ!J7fp^O>0){e^[160]]=J\'6[745];for(var cc=0;cc@ufpJ>^8^M209]]?dz=f^#^e09]]():dz=f^#^s^"^E[^b^"^E^;^Z^3])!=^Qcontinue };cz=(d^"^ J$^"^ ^udz-d^"^ J&+0.5J*;c@z=(d^!^ J$^!^ ^u^3]-d^!^ 47^Dg@z=^M264^vu=(gw===gy)?gv/2:gx+(gv-gx)/(gw-gy)@b(g@z-gy)J(z=^X[195]](^X[749]](gu/^X[748]]J*,1);var dS=gz@b2;v^m_^Le@o);fv^f27]]=dS;e^[682]J1J\'~b976[724]]^r~k^r463]][_$_~k^r462]][_$_~p[cc]^r170]]~J8163]]();e@o[_$~b976[430]]^r~n^f47]][dz]~();e^[682]~6[598]]^r152~);^a_b976[~]],ep^r310]]~,c@z);^a_b~_J8163]]();fq[_$~76[170]],gs[J\'6~J8274]]({x:cz,y:~]];dg++J/c@l=dk~[dg];var c@n=this[_~c@l];J9p=c@n[_$_~7^i,c@z);};~^M629]~(var dg=0;dg@udk[_$~]=fn;e^[16~objectType:J\'6[~],dataSeriesIndex:c~976[152]];cc++){dz=~719]]>0){e@o[J\'~[167]]()^`~[635]]){continue };~[259]]()^zb97~]]>0J/gs=gp[_$_~var ep=^tb976~:markerColor,border~[629]])};}^zb~@z;var dzJ(f=(d~]()};while(gpJ>9~x@lalue@yresent[gt]~8]])+0.5J*;var ~b976[626]][J\'6~^h4]],ep[~^f18]]();~$_J8741]];e@o[~^r311]]);~^k5]](cz~b976[538^w~$_J8726]](cc,~fp[cc]^r~]]||c@n[J\'6~^r152]]~;var cc=0,cz,c~=J\'6[29]){~;for(cc=0;cc@u~this^r~65]](gsJ>9~2]],animation~]]()}^z~c@n^r~Math[J\'6~405]][J\'~if( typeof (~@o^r~gq^r~5]][J\'6~e:fv[J\'~,data@yoint~;fq[J\'6~if(T){fq[_$~634]]||dz>d~@u@u0J(~x:cz,y:c@z}~^r2~^r7~^r5~J\'6[41~6[164]](cz~[717]](ep[~J\'6[16~976[282]][~ar fv=c@n[~J8480]]~68]]();fq[~}J+if(~{return };~[J\'6[~JAdz@ud~this[_$_~725]]@b(~]]J(~]];J9~JAT){f~=[];var ~;e@o[_$_~==0){if(~f-b@x});~function~,color:f~){gb=gd}~;J7c@~76[167]]~723]]+d~};var ~478]])~_$J@~;var g~]]JA~)@u@u0~else {~165]](~722]][~=null;~){var ~730]](~]=c@n[~gr[dz]~cz,c@z~37]]>0~ction:~6[169]~}JA~b976[~var f~74]](~629]]~=true~J@6~[_$_b~false~_b97~;if(','6[741]];bb^z51]](cz,c@z,e@o,fvJ JD,^F,fvJ 522^\\750^\\728]])^d682]]=1;va^@[6^?b^+^^^0^M^/^%cz,y1:c@z,size:dSJ2uJ6JHT){bb^z51]](cz,c@z,J!^+645^\\JD,^F,fu,fu,fv^z28]])JG^Q703^T[703]]||^Q699^T[699]]){t^LJ.^\'J#40]^W^(J$cz,y:c@z^j^ecz-^F/2,y1:c@z-^F/2,x2:cz+^F/2,y2:c@z+^F/2^l}JI^VJE^9^+^PJE)}JCc@i={source:e@o,dest:^2^S^{Callback:^g3]],easing@sJ0:^g^h714]]^{@qase:0};J1c@i;};nJ 12^h591]]=fJ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J0:^g^h714]]^{@qase:0};J1c@i;};nJ 12^h595]]=fJ0(dkJ=e@o=dkJ 575]]||^2^SJCfz=^4^]if(fz@u=0){J1J2n=^o^2J0J=gc=(gb>5)&&^c40]]?true:JF^d160]]=_$J?745];for(J-^G;JB^QJ7^7170]J8^s^7^Y^*JO^3^|^*JO^35]^Cfp[^1===null||!fp[^1[_^k||^#b^i)!^X^#b^v^r^Df@w=(d^!^ J/^!^ ^"^i-d^!^ ^)m=(d^!^ J/^!^ ^"^v]-d^!^ ^f@mJ=cr=f@w;f@w=f@m;f@m=cr;};fn=fp[^K]?fp[^K]:^O][cc%^O][_^k];@q(e@o,J5JMf@i,fn,0,null,gc^.,^c41]]);va^@[6^?b^+^^^0^M^/^%f@w,y~b976[724]]J ~kJ 463]][_$_~725]]@b(fp[cc][_$_b~ typeof (fp[cc][_$_~JJ163]]();e@o[_$~a@yointIndex:cc,x1:~^/a~6[274]]({chartType:~cc],dataSeries:c@n,~^dk~976[629]][~[_$J?~this[_$_b~);e@o[_$_~_$J?5~point:{x:~JJ717]~1]J=fp[~4]](cz,~,JF,~]JC~){var ~@w,y1:~_JJ~gb>gd)~@p,gE)~cc++){~;var ~351]]~30]](~false~};if(~);if(~;};};~JO[~z=(dk~;for(~,f@m,~var f~b976','J?x2:f@m,yJ@;fn=@r(d@p)J^T){@q(J.^&645]],f@w,f@p,f@m,f@i,fn,0,nullJ=J=J=J=)};^>JY||^Y]||fp[cc^v99]]||^D){^F^u74]]^-[555^y^.^,0,point:{x:f^ [1]>=f^ [0]?f@w:f@m,y:f@p+(f@i-f@p)/2^g^ [1]>=f^ [0]?-1:1,bounds:{x1:^jJH^}J?x2:^j[195]]^}J@,J"^F^u74]]^-[555^y^.^,1,point:{x:f^ [1]>=f^ [0]?f@m:f@w,y:f@p+(f@i-f@p)/2^g^ [1]>=f^ [0]?1:-1,bounds:{x1:^jJH^}J?x2:^j[195]]^}J@,J"};};};};e@o^WJ^T){J.^&645]]^W};J717]]^^^M^K^+^l[JJ^\'163]]()^k717]]^^^M^K^+^kJJ);}JZJTJI@u^?^f;dg++J8g@s=[];J0J8fn=c^Ecc%c^E^f]^J]=fn^`0]]=fn^N]=^e19]]J^e@oJ$20]]^a20]](@t(^e21]],^e19]]))}J9xJDfor(;cc^T];cc++){dz=fp^C^u09]]?fp^C^u0JW:fp^C]J^dz@ud^%J;26]^v34]]||dz>d^%J;26]^v35]]){conJO}JS^ ==JV||!f^ [^f|J ^ [0^]|J ^ [1^]){gl();fxJDconJO;};cz=(d^%^!7J:^%^!72JFdz-d^%^!^3p=(d^"^!7J:^"^!J-^ [0]-d^"^!^3i=(d^"^!7J:^"^!J-^ [1]-d^"^!4^Zif(ft||fx){J4^(J0J#;gmJ!p};g@s=[];g@s[_$_b9^)i}^\'163]^LJ#;};ft=false;fx=false;}JR^\\](JC);g@s[_$_b9^)i}^\'165]](JC)}J^cc%250==0){gl()};JEd@p=^i621]][cc];J.^&JAd@p]={id:d@p,^/641],^5J[@yointJQcc,x1:cz,yJ?yJ@;^>537]]!==0){^>5JP||^i5JPJ8fv^SJ*i,e^s^1^;J_^)i^2b976^4976JL^<^7s^V]})};fv^SJ*p,e^s^1^;J_^)p^2b976^4976JL^<^7s^V]})};}};^>JY||^Y]||fp[cc^v99]]||^D){^F^u74]]^-[533^y^.^,0^Pp^g^ J5^ [1]?-1:1,J"^F^u74]]^-[533^y^.^,1^Pi^g^ J5^ [1]?1:-1,J"};};gl();bbJ$29]](fwJKe@o^WJ^T){J.^&645]]^W};J/ gl(JX!gm)^dgsJV^p^6J0JW}^og@s[^f-1;cc>=0;cc--){gs=g@s[cc];^\\^I^O])^k165]^I^O])^H7]]()^*^e41]]^R]()^*1^k168]]()^p^6_^(J\'^I^O])^o0;cc@ug@s[^f;cc++){gs=g@s[cc];^\\^I^O])^HJW;};J4^(J0J#^k163]^LJ#;gmJ!p};g@s=[];g@s[_$_b9^)i});}J717]]^^^M^K^+^l[JJ^\'163]]()^k717]]^^^M^K^+^kJJ);}J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cc-=3^a^q^#J1^:^#^r6^8J\\^99J2^\'7J(-1^#J1^:^#^r6^8J\\^99J2)}^HJW^H3]](^\'167]^L8]](JK}J753]^U^Q],gzJ]g@tJ=)^l[753]^U^Q],gN@bgz,g@tJ]true)^`7]]()^J]=fn^`0J)[3]^N]=2^R]();}}^*1;e@o^W;};nJ,12^x[592]]=J/(dkJ8c@v=thisJ9z=^?^fJSz@u=0)^dc@l=^?0];J20];c@v[_$_^&JAd@p]=h@z;^h10]]={x:gIJ,170]],y:gI^c};^h629^_29^B4]]=hd;^h755]]=eT;^h705]]=^e05^B6]]=^t756^n6[756]]:^e56]]?^e56]]:^t522^n6[522]]:c^Edg%c^E_$J>152]^B7]]=^t757^n6[757]]:^e57^B8]]=^t758^n6[758]]:^e58]];^h689^_89^n6[689]]:^i689^G2^_92^X2^@2^G3^_93^X3^@3^G0^_90^X0^@0^G1^_91^X1^@1^G4^_94^X4^@4]]?^i694]]:null;^h695^_95^X5^@5]]?^i695]]:^w310]]@b0.33;^h696]]= typeof (^t696]])!J&161]?^t696^@6^B9]]=dg===0?^e59]]?(^e59]]/180)^$]:0:g@k[dg-1]J$60^B9]]=(^h759]]+(2^$]))%(2^$]);^h760]]=^h759]]+((2^$]/hk)@b^j[263]](gq^c))J6E=(^h760]]+^h759]])/2;hE=(hE+(2^$]))%(2^$]);^A=hEJ^^A>(^j[748]]/2)-he&&^A@u(^j[748]]/2)+heJXh@j===0||g@k[hC]J$61]]>^A){hC=dg};h@j++;}JRif(^A>(3^$]/2)-he&&^A@u(3^$]/2)+heJXh@s===0||g@k[h@q]J$61]]>^A){h@q=dg};h@s++;}}J^hE>(^j[748]]/2)&&hE@u=(3^$]/2)){^h762J)[360]}JR^h762J)[14]};^h763]]= new bi(^|[40^x[392]],{fontSize:^h690]JM@samily:^h691]JMColor:^h689]JMStyle:^h692]JM@weight:^h693]],horizontal@zlign:_$J>360],backgroundColor:h@z[_$_~p[cc]^c~b976[724]]J,~kJ,463]][_$_~]J,170]],fD[~@b^j[748]~kJ,462]][_$_~b976[430]]J,~);if(T){fqJ,~J\\163]]();e@o[_$~76[274]]({x:cz,y:f@~^l[682]]=~],^w311]])~:c@n,index@oeyword:~({chartType:_J_76~t:fp[cc]J[Series~objectType:_$J>~x[g@x[^f~76[274]](fv)J9u~,ctx:fq,type:fv[_$_~4^Zf@~[351]],size:fv[_$_b~dataSeriesJQc@l~976[719]]>0){e@o[_$~or:fu,borderThickne~[629]],fD[cc-3][_$_~170]],fD[cc-3JN~_b9J2,fD[cc-2~=@r(d@p)J^T){fw[_~,JU:fu,borderCol~thisJ,405]]~if(fp[cc]J,~dkJ,598]][~]]:^i69~^h761]]~]];^h75~[cc]J,170]~^i699]]~@nJ,523]][~thisJ,394]~]];^h69~;}^`~](gsJ,170]~^l[159]~],^w310]~]()^k16~],^w415]~^`2]~],gsJ,629]~,point:{x:cz,y:f@~],gIJ,629]~^`8]~=^e26]~@ufpJ,152]~](gIJ,170]~s:fvJ$28]~J$30]]()~^n6[69~^e03]~78]])+0.5)@u@u0;~9J2,fD[cc+~e@oJ,165]~])!J&29]~(^w414]~]]=^t6~^l[16~){e@oJ$~fDJ,152]~J,629]]~{return JE~^i7~_$J>152]]~},direction:f~h@zJ,~c@nJ,~Math[_J_76~;fqJ,~;J4b976~]],animation~]]?gq[_J_7~JZvar cc=~J^c@n[_$_b~J(-1~cc-2JN97~@o);fw[_J_~gqJ,~]J%~]J,6~epJ,~5]JN976~]J[@yoin~dJ$~_$J>392~c@v[_J_76~(f@w,f@m),y~| typeof (f~={x:cz,y:f@~JU:fn});~4]](JC)~J,7~J,2~==_$J>~J04]~33]](fD[cc~]]=_J_76~](cc,cz,f@~fw=[];var ~[_$J>~72JFf~this[_$_~function~J>16~cc-1][_$~76[629]]~]];var ~e@o[_$_~[0]@u=f~;var h~;var g~){var ~;var f~23]]+d~J\\6~var c@~,false~_J\\~1:f@p,~2:f@i}~722]][~716]](~cz,f@p~=true;~};var ~5]]@b(~eturn ~[630]]~g=0;dg~718]](~);};};~[727]]~],font~][_$_b~tinue ~37]]>0~Index:~else {~J^f~var d~color~=null~9]]()~){if(~703]]~;for(~,data~b976[~,g@h,~;if(~$_b9','JJ[694]],max@width:^U[695]],max@xeight:^U[696]]?^U[690]]@b5:^U[690]]@b1.5,text:^U[755]],padding:0,text@qaseline:^t[9]})^k^ 708]]JPJ$I^xh@x^xhD^{for(dg=0;dg@u^3;dg++^r@zJ2(hC+dg)%^3]J(j>1&&^+>(^H^\'_JJ^gM^7]/2)+heJ3hI@u=h@j/2&& !hD){^9^Z14];hI++;^s^9^Z360];hD^|};};hD^{for(dg=0;dg@u^3;dg++^r@zJ2(h@q+dg)%^3]J(s>1&&^+>(3@b^H^\'_JJ^g3@bM^7]/2)+heJ3h@x@u=h@s/2&& !hD){^9^Z360];h@x++;^s^9^Z14];hD^|J:^]i(^#7^4392^@159]^Z13]^M[160]^Z111J+e@v=16^M[427]^Z764]^M[765]^Z193J+cc=0,dg=0;f^"976^\\^&if(!^U[755]]^I^p^ J*=^p^ ^qJ#p^C^!360]^up=^L705]]!^G?^a^ J1+g@w):-^p^ J1/2^sJ=p=^L705]]!^G?g@w:-^p^ J1/2}^k^ J%=ip^k^ 433]](true)^k^ J&=ip^k^ J\'=^p^ ^q;^Q76[705]]!^G^um=^U[10^TJ%hd^/JI^+)J#o=^U[10]]^F+hd^/7]](^+^;0]]=^U[756^@162]]=^U[757]Jhn){hm=hn;ho^|J7fn=fp^>]]?fp^>]]:^L523J;%^L523^T152]]]J6m>hp){C(c@vJ)7^4392]],g@^0],^.54]],fn,^L351]],hp,hm,^L741]])}J6o)^n;}^PS(dm^#7^4392^@60JL^E],ep[^t^=6[J1^?])^M[1JR=^K467^@649]](^E],ep[^t^=6[J1^?])^R0;^f^)J8p=^.JRJ$m=^.60]]J6m>hp^rv=(JN0.07^/JI^.61]]))J7gr=(JN0.07^/7]](^.61]]))J$u^{if(fp[cc]^Y69]]J3^H2^$6[10^TJ&(gI^`J%hv))>0.J,001||^H2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^"976^\\+JKzJ2cc]^yw=^p^ 708]]()J(w^`31JQ==0||h@w^`J1===0^IJ=a^xh@i^C^!14]){ia=ep^X16]]^a^ J%^p^ J1+g@w);ia@bJE^la=^E]^a^ J&^p^ J1-g@w)}J0a>0J3M^:^e^ 6^O^ ^q-^2)@uhd||M^:^e^ ^J^ ^q-^2)@uhdJKi=ia/M^:](^H76JI^6]))J(i>9JKi=h@i@b0.3}J(i>h@vJKv=h@i^j}}J#c^mb=0;if(^6]>0&&^6]@uM^7]){ic=ep^XJS^a^ ^J^ ^q+5);ic@bJE^lc=ep^X15]]^a^ 6^O^ ^q-5)}J0c>0J3M^:^e^ J&gI^`J4)@uhd){ib=ic/M^:](^H767]](^6]))J0b>9){ib=ib@b0.3}J0b>h@vJKv=ib^j}^s};};^]J?m,ii,ih^ug=[]J#j=0^Rii;true;cc=(cc+1+^3)%^3){ig^`274]]J9cc]J@cc===ih)^n;};ig^`54JL^dik,il^bik^F-il^F})JBcc=0;cc@uig[_$^)J=e=ig[cc]J0j@uh@m){ij+=ieJG^ 311]];ieJG^ 776]^Z20];ie^Y55]^Z20];ieJG^ 708]]JPelse ^n;};}J8@n=-1J$T=-1^ym=0JBvar dh=0;dh@u^3;dh++JKtJ2dhJ0){hJ?m,h@n,hTJUnJEhTJEh@m=0;}};}J(m>0){hJ?m,h@n,hT)J:^N[51JQ^denJ3^K398]]^b}J7cc=en^`644]J+gq=en^`641]J+c@n=thisJ7d@p=^L621J;J1){^K509^T60JI0,g@r^^dm){gS(dm);hhJP)^c;};g@i();hf();^N[40JQtrue;^N[509^T60JI0,^N[400]]?^N[600]]:0^^dm){g@v(dm);hhJP^^){^K401]]^{^K509^T60JI0,^K400]]?g@r:0^^dm){gS(dm);hhJP);});^]h(){c@vJ)7^4517^T47JI);^12]]){^12^T563JH(^K562^T777]^B&&^K562^T778]^B)){^K562^T433]]()}};^14]]){for(var cc=0;cc@u^K564]][_$^)var dl=^K564J;J~=0J7~J$@~g@k[hx]~=false;~=true;}~J/@u~g@k[hy]~360]&&i~1+g@k[_~J7i~J7h~J4+~J4-~J/+~J6@~JGb9~J/-~]J7~000000~hsJG~g@k[hw~629]]~;if(i~310]]~=g@k[~){if(~170]]~=null~;if(h~;var ~var h~(g@k[~};};}~]][cc~];if(~var i~fJG~@l(h@~);if(~g@m@b~;for(~CJG~t,h@r~= -1;~]]=f@~[_$_~]]||~6]](~b976~){h@~1]](~){i@~hd@b~=hj(~();}~1]]=~59]]~17]]~,2))~);h@','97^97^;JA8^97^;JA9^9791]];}@l[^l^M6[800]^TN,h@w){if^I9]){^@6]]+=h@w^P^q^$113]){^@7]]+=h@w^P^q^$J+{^@8]]+=h@w^C}else^$J@{^@9]]+=h@w^C}}JF@l[^l^M6[801]^TN,h@w){if^I9]){^@6]^31]]}else^$113]){^@7]^31]]}else^$J+{^@8]^30]]}else^$J@{^@9]^30]]}}JF@l[^l^M6[568]^N^o{x1:^@2]]+^@8]],y1:^@3]]+^@6]],x2:^@4]]-^@9]],y2:^@5]]-^@7]]^r(^@4]]-^@2]])-^@9]]-^@8]],h^y(^@5]]-^@3]])-^@7]]-^@6]]}};@l[^l^M6[476]^N^@6^97^;JA7^97^;JA8^97^;JA9^9791]];};^cbi(e@o,cD){bi^b127^V1J:[^l^?J-02],cD);^DJ2=e@o;^B03]]J,;^B04]]^u^B05]]=@h(^D00]],t^&,^K296]]);}@s(bi,m);bi[^l^M^}^T@k){if(i@k){^g^ 716J8}^mv=^g^ 774]];^g^ 427^9427^ngr=0;^8803]]){^K^z^DJ2)};^g^ 68J5^K170]],^K629]]+gr);^8427]^Q764]){gr=-^B05J;};^g^ 774^9806J8;^g^ 80J4Math^b748]]/180@b^B07]])^mr=0J#iS=t^)^my^uif((^K728]]>0&&^K750]])||^K4J=){^g^ 15J40,gr,t^%,t^(,^B09]],^K728]],^K4J=,^K750]])};^g^ 159^9810]];for(J?cc=0;cc@u^B04^V811]]^E;cc++J9y=^B04^V811]][cc];^8J6^Q14]J9r=t^%-i@y^C-t^)^!976^:[J+{i@r=t^)^!^|7]^*i@r=(t^%-t^)@b2)/2-i@y^C/2+t^)JF^g^ 812]](i@y^bJ$,i@r,iS);iS+=i@y^P]];};^g^ 77J:^l[20]^r0}}^sa=0,i@m=0,i@w=iT^E-1,e@p=Infinity;^g^ 774^9806J8;while(i@m@u=i@w){e@p=Math^b17J5(i@m+i@w)/2)^mi=iT^Y1J40,e@p+1);ja=^g^ ^zi@i)^CJ7ja@ucTJ9m=e@p+1^pif(ja>cTJ9w=e@p-1^pbreak }};J%ja>cT&&i@i^E>1J9i=i@i^Y1J40,i@i^E-1);ja=^g^ ^zi@i)^C;}^mlJ,J7i@i^E===iT^E||iT[i@i^E^Q301]J9l=J0J%i@l^ti@p=i@i[^\\6]](^l[301])J7i@p^E>1J9p^b259J8};i@i=i@p^b281]](^l[301]);ja=^g^ ^zi@i)^C;};^o{J>:i@i^rja};^.]^Y16]]=^cbo(^tiT= new String(bn(String(^KJ$))^wn@z=[]^mv=^g^ 774^ncS=0J#cT=0;^g^ 774^9806J8;while(iT^E>0^te@m=^\']-t^)@b2^se=^B19]]-t^)@b2^my=^B17]](iT,e@m,J0);i@y^P^9805]];n@z[^\\J5i@y);cT=^+](cT,i@y^C);cS+=i@y^P]];iT=bn(iT^b157]](i@y^bJ$^E,iT^E))J7je&&cS>je^ti@y=n@z^b259J8;cS-=i@y^P]];};};^B0J<{lines:n@z^rcT,h^ycS};t^%=cT+t^)@b2;t^(=cS+t^)@b2;^g^ 77J76[296]],horizonta^k^KJ6],vertica^k^KJ3],borderC^<6[750]],borderThickness:^K728]],backgroundC^<6[4J=J*J ^\']J*x^yje,corner@radius:^B09]]J"^KJ$,padding:t^),J>@qaseline:^_})^sh=ff^b^z);^8J3^G||^KJ3]^1^8J3^G){^05J);iN=^_;^!^|8]]^1^07J&-jh^P]];iN^[13];}};^8J6^QJ+^64J)^!^|7]^*fT=jd^Z14]]+jd^b310]^-0J;^!976^:[J@^66J&-jh^C-jfJFjg=^KJ6];t^%=jh^C;t^(=jh^P]];^!^j^*^8J6^QJ+^64J);^07J&-(^\'^-0J;);e@s= -90;iN=^l[JD;t^%=jh^P]];t^(=jh^C;^!976^:[J@^66J&;^05J)+(^\'^-0J;);e@s=90;iN^[4];t^%=jh^P]];t^(=jh^C;^!^|7]^*f@l=jb^Z15]]+(jb^P]^-1J;);fT=jb^Z14]]+(jb^b310]^-0J;);iN^[0];t^%=jh^C;t^(=jh^P]];JFjg^[0];}};ff^b170]]=fT;ff^b629]]=f@l;ff^Y07]]=e@s;ff^bJ6]=jg;ff^Z33]](true);jb^b517^V800]](iN,{J t^%+^IJD||iN==^[4]?^D55J):0),h^yt^(+^I9]||iN==^[13]?^D55J):0)});^K^^fT,y1:f@l,x2:fT+t^%,y2:f@l+t^(};^g^ 427]]=^_;};^cbh(kr,cD){bh^b127^V1J:[^l^?J-22],cD,kr^b378]]);^"=kr;^K1]]=kr^b1]];^DJ2=^"^b3J2J7^d^D72^V298]])=^H){t^&=^"^b64J4t^&)};t^%J\',t^(^u^K^^null,y1^vx2^vy2J/};}@s(bh,m);bh[^l^M6[433]]=bl[^l^M6[433]];^c@w(kr,cD,c@j){@w^b127^V1J:[^l^?J-23],cD,c@j);^"=kr;^K1]]=kr^b1]];^DJ2=^"^b3J2;^K645]]=^"^Z30^V645]];^K646]]=[];t^%=0,t^(=0,^B24]]J\',^K5J==[];^K^^null,y1^vx2^vy2J/J%^d^D72^V298]])=^H){t^&=^"^b64J4t^&)};^B25]]=@h(^D00]],t^&,^K296]]);^BJ:=t^&;}@s(@w,m);@w[^l^M^}^NJ?jb=(!^K563]]?^":^"^Z05]]^weD=jb^b517^V56J4^wiN^uJ?f@l=0J#fT=0J#e@m^he^hl=5^sm=[]^sx=[];^8J3^G||^KJ3]^1^B2J<^l[26];iN=^KJ3];e@m=^\'^e^\']:eD^CJE7JC^B19JBJ\'?^B19]]:eD^P^x5;^!^j^*^B2J<^l[712];iN=^KJ6];e@m=^\'^e^\']:eD^CJE5JC^B19JBJ\'?^B19]]:eD^P^x7;}};for(J?cc=0;cc@u^K5J=^E;cc++^tc@n=^K5J=[cc];if^/]!==^l[556]&&^O351JB=^l[557]&&^O351JB=^l[558]^tjt=^O827^A827]]:^/^F5]|^,^F6]|^,^F7]|^,^Q539]|^,^Q540])&&^O828^A828]]:w^Y29]]^/])^sp=^O830^A830]]:^B31]]?^B31]]({cJI:^",legend:^D72]],^a:c@n^XJ/}):^O520^nfu=^O832^A832]^L[833^A833]^L[JGJJJ#dS=(!^O537]]&&^/^F5]|^,^F6]|^,^F7]))?0:^B25^x6^sr=^O834^A834]^L[835^njs=^O836^A836]^L[837]]?^+](1,^7](dSJE2)):0^sq=^OJGJJ;jp=^"^b70J5jp,^O538]JJ,c@n,cc^wd@i={^{TJMjt,^{J!fuJ"jp,J>@qlock^vcJITJM^O351]],^{J.dS,lineJ!^OJGJJ,^aIndex:^O524]]^XJ1J/^JJ!jr^JThickness:js};jm[^\\J5d@i);^pfor(J?ir=0;ir@u^O538]]^E;ir++^tgq=^O538]][ir]^st=gq^Y27]^R[827]^L[827^A827]]:w^Y29]]^/])^sp=gq^Y30]^R[830]^L[830^A830]]:^B31]]?^B31]]({cJI:^",legend:^D72]],^a:c@n^X:gq}):gq^b520]^R[520]]:^l[838]+(ir+1^wfu=gq^Y32]^R[832]^L[832^A832]]:gq^b522]^R[522]^L[522^A522]^L[JG][ir%^OJG]^E]J#dS=^B25^x6^sr=gq^Y34]^R[834]^L[834^A834]]:gq^Y35]^R[835]^L[835^njs=gq^Y36]^R[836]^L[836^A836]]:gq^Y37]]||^O837]]?^+](1,^7](dSJE2)):0;jp=^"^b70J5jp,gq,c@n,ir^wd@i={^{TJMjt,^{J!fuJ"jp,J>@qlock^vcJITJM^O351]],^{J.dS,^aIndex:cc^XIndex:ir^JJ!jr^JThickness:jsJ%gq^b566]]||(^O566]]&&gq^b566JB=J0)){jm[^\\J5d@i)};}};d@i^u};^8839]]==J,){jm^Y40J8J%jm^E>0^tjuJ\'^sw^hy^hi=0;^8841]^`^8842]^`jy=^2](^B41]],^B42]],JL^pjy=^2](^B41]],JL}^!J-42]^`jy=^2](^B42]],JL^pjy=e@m}};dS=(dS===0?^B25^x6:dS);jy=jy-(dS+^B^f);for(J?cc=0;cc@ujm^E;cc++^td@i=jm[cc];if^4^F5]^#^F7]^#^5{jy=jy-^=^UJ%je@u=0||^dje)=^H||jy@u=0||^djy)=^H){continue };^8824]^Q26]){^W[JK]= new bi(^DJ2,{x:0,y:0J*J jyJ*x^>76[844]]?je:^B25]],angle:0J"^W[J$,horizonta^k^l[JDJ(J.t^&J(@samily:^D0^i@w^>76[296]]J(C^<6[81^iStyle:^K294]],J>@qaseline:^_});^W[^S6[^z);^8841]^`^W[^S6[310^9841]]-(dS+^B^f+(^4^F5]^#^F7]^#^5?^=^U:0))J%!ju||ju^C+^7](^W[JK]^C+^B^f+dS+(ju^C===0?0:(^BJ:))+(^4^F5]^#^F7]^#^5?^=^U:0))>JL{ju={items:[]^r0};jx[^\\J5ju);t^(+=ji;ji=0;};ji=^+](ji,^W[^S6[311]]);^W[^S6[170]]=ju^C;^W[^S6[629]]=0;ju^C+=^7](^W[JK]^C+^B^f+dS+(ju^C===0?0:^BJ:)+(^4^F5]^#^F7]^#^5?^=^U:0));ju^b646^V27J5d@i);t^%=^+](ju^C,t^%);^p^W[JK]= new bi(^DJ2,{x:0,y:0J*J jyJ*x^>76[84J<=J,?je:t^&@b1.5,angle:0J"^W[J$,horizonta^k^l[JDJ(J.t^&J(@samily:^D0^i@w^y^g~b976[392^V~}else {if(^gb~^D79]]~||^W[688]~ {if^I~his^C~his^b298]]~^B14]~his^P]]~his^b357]]~^Q10]){~Math^b195]~|^O351]~]/2-jh^b31~};bi^b125]~(^O351]~f@l=jd^Z1~==^[13]){~Math^b630]~]-=h@w^b31~(^W[688]~^F6])~{fT=jd^Z1~Math^b193]~if(^K~]]=^K~[777]]===^l~91]];^gb97~olor:^gb97~2@b(^gb976~eight:^gb9~[20J5this,_$_b~^K79~]]?^O~^K8~^b310]]~^K3~^b152]]~^Q52~^Q9]~=^[61]~(iN===^l[~,^{@qorder~this^b~]:c@n[^l~[125]][_$_b97~]=function(){~c@n^b~^b311~]===^l[~]?gq[^l~JK][_$_b97~]=function(i~[825^x1)~]]^b~d@i[^l~,data@yoint~^b8~^b4~=^l[1~^l[27~]==J\'){~438]]={x1:~^l[9]~]!=J\'){~dataSeries~[^l[~function ~ typeof (~]!=J\'?~26^x1~this[_$_~=0^s~0]]J(~^|8]~l@zlign:~_$_b976~J#i@~]]J#~return ~}else {~]]}else~,J ~J#j~){J?~J\';~J/,~)J#~]]JE~eight:~70J4~marker~976[77~6[433]~width:~Color:~,J>:~;J?~776]]~}J7~]]-jc~=null~,font~]]+jc~,max@~JD)~=true~976[8~Size:~:null~false~Index~92]]~778]~8]](~4]](~777]~;if(~]]()~){i@~26]]~]]/2~4]]=~67]]~text~var ~14])~6[79~]]!=~;je=~360]~@b0.~}}};~523]~351]~hart~][0]~843]~e@m)~ype:','b976[296]],fontColor:^P810]],fontStyle:^P294]],text@qaseline:^c9]})^h^ 708^l^P841]]!=^z){^q^ ^y=^P841]]-(dS+^P826]]^|+((^S688]^N5]^/^N7]^/^N6])?2@b(^+^|):0))^x^,@u=je){ju={items:[],width:0};jx^a274]](ju);^fu=jx[jw];jw=(jw+1)%jx^M;};^,+^e^ 311]]^h^ ^{=ju^a^y^h^ 629]]=0;ju^a^y+^U6[193]](^q^ ^y+^P826]]^|+dS+(ju^a^y===0?0:^P826]])+((^S688]^N5]^/^N7]^/^N6])?2@b(^+^|):0));ju^]46^V274]](d@i);^)^U6[19J)ju^a^y,^));};^x^P844]]===false){^,=jx^M@b(^+)}^}{^,+=ji};^,=M^C](je,^,);^)=M^C](e@m,^));};^@78^T[9]){^@77]]=^O){^5^i^@77^T[14]){fT=eD^W6]]-^)^r^5^\\6[^y/2-^)/2}};f@l=eD^W5]]^k^@78^T[10]){^@77]]=^O){^5^i^@77^T[14]){fT=eD^W6]]-^)^r^5^\\6[^y/2-^)/2}};f@l=eD^W5]^\\6[311]]/2-^,/2^k^@78^T[113]){^@77]]=^O){^5^i^@77^T[14]){fT=eD^W6]]-^)^r^5^\\6[^y/2-^)/2}};f@l=eD^W7]]-^,;}}}^I46]]=jm^o cc=0;cc@u^P646]]^M;cc++^ud@i=jm[cc];^S647]]=++^#^v^A519]];^#^v^AJ+^8]]={id:^S647]],objectType:^c845],legendItem^!Index:^S846]],data@yointIndex:^S644]]};}^tv=0^o cc=0;cc@ujx^M;cc++^uju=jx[^nji=0^o jk=0;jk@uju^]46]]^M;jk++^ud@i=ju^]46]][jk]^tn^e^ ^{+fT+(jk===0?dS@b0.2:^P826]])^to=f@l+jv^tj=jnJ&!^#^a282]][^S846]^V616]]){^&^]82]]=0.5};^&^a716]]();^&^a717]](fT,f@l,e@m,je);^&^a718^l^S688]^N5]^/^N6]^/^N7]){^&^a160]]=^S847]];^&^a162]]^U6[173]](^+/8);^&^a163]]();^&^a164]](jn-^+^|,jo+^+/2);^&^a16J)jn+^+@b0.7,jo+^+/2);^&^a16J\');jj-=^+^|;};bb^a751]](jn+dS/2,jo+(^+/2),^&,^S828]],^S537]],^S833]],^S835]],^S837]])^h^ ^{=jn+^P826]]^|+dSJ&^S688]^N5]^/^N6]^/^N7]){^q^ ^{^e^ ^{+^+^|}^h^ 629]]=jo^h^ 433]](true);^&^a730^ljkJ"i^U6[19J)ji,^q^ 311]])^fi^e^ 311]]^x!^#^a282]][^S846]^V616]]){^&^]82]]=1}^wfr=@r(^S647]])^I45^V159]]=fr^I45^V163]]()^I45^V64J\'jj,^q^ 629]],^q^ ^{+^q^ ^y-jj,^q^ 311]]);^S414]]=^#^v^AJ+^8^V414]]=jj;^SJ!=^#^v^AJ+^8^VJ!^e^ 629]];^S416]]=^#^v^AJ+^8^V416]]^e^ ^{+^q^ ^y;^S417]]=^#^v^AJ+^8^V417]]^e^ 629]]+^q^ 311]];};jv=jv+ji;};jb^a517^V800]](iN,{width:^)+2+2,height:^,+5+5});^P438]]={x1:fT,y1:f@l,x2:fT+^),y2:f@l+^,J,function ba(kr,cD){ba^a127^V126^V204]](this,cD);^#=kr;^PJ(kr^a1]];^&=^#^a392]];}@s(ba,m);ba^a^Q[433]^Z^ueD=^#^a517^V568]]();^&^a159]]=^c848];^&^]4J\'eD^W4]],eD^W5]],eD^W6]],eD^W7]]);};function w(kr,cD,c@j,db,d@p){w^a127^V126^V204]](this,^c849],cD,c@j);^#=kr;^PJ(kr^a1]];^P850]]=kr^a1^V392]];^P524]]=db;^P851]^E[647]]=d@p;^#^v^A722]][d@p]={id:d@p,objectType:^c567],dataSeriesIndex:db}^I2J([]^I18]]=[];^P462]]^z;^P463]]^z;^@4J(=^z){if(^P351^V260]](/area/i)){^P74J(0.7}^}{^P74J(1}};^P5J-=^P852^l ^m^P372^V690]^9{^P690]]=^#^]48]](^P690]])};}@s(w,m);w^a^Q[852]^Z^uek=^P351]];^L[28^.5^.6^.7^.8^.9^(0^\'0^:3]||ek=^_540^(9^(1^\'1^:4^(2^(5^(6^\'4^(3^(4^412]}^}^;49^\'2^\'3^\'5^4543]}^}^;56^\'7^\'8^4194^iwindow^a374^V376]](^c855]+ek);^[;}}J,w^a829]^Zek){^L[28^\'0^:3]||ek=^_549^\'2^\'3]||ek=^_540^(9^\'1^:4^.9^(5^(6^\'4^\'5^(3^(4^4856]}^}^;25^.6^.7^\'6^\'7^\'8^431]}^}^;28^(0^(1^(2^4857^iwindow^a374^V376]](^c855]+ek);^[;}}}};w^a^Q[858]^Zcz,j@z){if(!^$||^$^M===0){^[}^tE={data@yoint:null,distance:^d,index:NaN}^wgq^z^wdg=0^wcc=0^wJ*1^tD=^d^pq=0,jz=0^tC=1000^ps=0J&^#^a516^V5J-!^_194]^uj@x=(^$[^$^M-1][_$^X-^$[0][_$^XJ j@xJ"@s=M^C](Math^a19J)((^$^M-1)/j@x@b(cz-^$[0][_$^X))>>0,0),^$^M)^f@s=0J,while(true){cc=(e@t>0)?j@s+dg:j@s-dgJ&cc>=0&&cc@u^$^M){gq=^$[^nhz=M^%gq[_$^X-cz)^gjE^]J-){jE^]4J(gq;jE^]J-=hz;jE^a524]]=cc;}^pj=M^%gq[_$^X-czJ j@j@u=jD){jD=j@j^^e@tJ"@q++^fz++}^xj@q>jC&&jz>jC)^j;^^j@s-dg@u0&&j@s+dg>=^$^M)^j^xJ*== -1){dg++;J*1^kJ* -1};^x!j@z&&jE^]41^V^{===cz){return jE^^j@z&&jE^]41]]!=^z){return jE}^}{^[}J,w^a^Q[640]^Zcz,c@z,d@k){if(!^$||^$^M===0){^[};d@k=d@k||false^wd@w=[]^wdg=0,cc=0^wJ*1^po=false^tD=^d^pq=0,jz=0^tC=1000^ps=0J&^#^a516^V5J-!^_194]^ujN=^#^a462^V85J\'{x:cz,y:c@z})^px=(^$[^$^M-1][_$^X-^$[0][_$^XJ j@xJ"@s=M^C](Math^a19J)((^$^M-1)/j@x@b(jN-^$[0][_$^X))>>0,0),^$^M)^f@s=0J,while(true){cc=(e@t>0)?j@s+dg:j@s-dgJ&cc>=0&&cc@u^$^M^ud@p=^P621]][^njM=^#^v^A722]][d@p]^wgq=^$[^nhz^zJ&jM){switch(^P351]]){case ^c28^10^11]:;case ^c549^12^13^14^15]:if(cz>^Y[414]]&&cz@u=j^F&&c@z>^Y[J!&&c@z@u^Y[417]]^2^b^0^!^JM^C](M^%j^*),M^%j^F-cz),M^%jM^W5^s,M^%jM^W7^s)^<^325^>6^>7^>8^>9^61^62^60^69]:var dS=@v(^c537],gq,this)||4^pt=d@k?20:dS;hz=^GJ\'M^-j^*J$^-jM^W5^`^g=j@t^2^b^0^!^Jhz})}^pj=M^%j^*J j@j@u=jD){jD=j@j^^e@tJ"@q++^fz++}}^g=dS/2){j@o=true};brea^333^64]:var dS=@v(^c537],gq,this)||4^pt=d@k?20:dS;hz=M^C](^GJ\'M^-j^*J$^-jM^W5^`,^GJ\'M^-j^*J$^-jM^W7^`)^g=j@t^2^b^0^!^Jhz})}^pj=M^%j^*J j@j@u=jD){jD=j@j^^e@tJ"@q++^fz++}}^g=dS/2){j@o=true};brea^340]:var dS^Y[727]];hz=^GJ\'M^-j^*J$^-jM^W5^`^g=dS/2^2^b^0^!^Jhz^<^356^17]:var gI^Y[10]]^wha=^P351^T[557]?0.6@bjM^a754]]:0;hz=^GJ\'M^-gI[_$^X-cz,2)+M^-gI^]29^`^gjM^a754]]&&hz>ha^uj@h=c@z-gI^]29]]^tI=cz-gI[_$^X^we@s^U6[773]](j@h,jIJ e@s@u0){e@s+=^G8]]@b2};e@s=Number((((e@s/^G8]]@b180J#+360)J#^a27J)12))^whp=Number((((jM^a759]]/^G8]]@b180J#+360)J#^a27J)12))^whm=Number((((jM^a760]]/^G8]]@b180J#+360)J#^a27J)12)J hm===0&&jM^a760]]>1){hm=360^xhp>=hm&&gq^]29]]!==0){hm+=360J&e@s@uhp){e@s+=360};^xe@s>hp&&e@s@uhm^2^b^0^!^J0});j@o=true;J,brea^335]:if(((cz>=(jM^W4]]-^B/2)J%z@u=(j^F+^B/2))&^7417]]-^B/2J%^=0]]+^B/2))||(M^%j^F-cz+j^*)@u^B&^7J!&&c^=1]]))^2^b^0^!^JM^C](M^%j^*),M^%j^F-cz),M^%jM^W7^s,M^%jM^a860^s)^<^336]:if((M^%j^F-cz+j^*)@u^B&^7417]]&&c^=0]]))||(cz>^Y[414]]&&(cz@u=(j^F+jM^W4]])/2)&^7J!-^B/2J%@z@u^Y[J!+^B/2))||((cz>=(jM^W4]]+j^F)/2J%z@u=j^F)&^7861]]-^B/2J%^=1]]+^B/2))^2^b^0^!^JM^C](M^%j^*),M^%j^F-cz),M^%jM^W7^s,M^%jM^a860^s)^jC&&jz>jC))^j;};^^j@s-dg@u0&&j@s+dg>=^$^M)^j^xJ*== -1){dg++;J*1^kJ* -1};}^wd@y^z^o d@r=0;d@r@ud@w^M;d@r++){if(!d@y){d@y=d@w[d@r]^^d@w[d@r]^]J-@u=d@y^]J-){d@y=d@w[d@r]}}};return d@y;};w^a^Q[726]^Zdb,cz,c@z,e@o^ufp=^$^wc@n=this^wfu^D833]^?33^H833^R6[833]]:fp[db]^a522]]?fp[db]^a522^H522^R6[522^H523]][db%c@n^a523]]^M]^tr^D835]^?35^H835^R6[835]]:null^ts^D837]^?37^H837^R6[837]]:null^tt^D828]^?28^H828]]^wdS^D537]]?fp[db]^a537^H537]];return {x:cz,y:c@z,ctx:e@o,type:jt,size:dS,color:fu,borderColor:jr,borderThickness:jsJ,function h(kr,cD,ek,iN){h^a127^V126^V204]](this,^c862],cD,kr^a378]]);^#=kr;^PJ(kr^a1]];^&=kr^a392]];^P814]^E[819]^E[863]^E[633]]=[];^K4]]^z^I26]]={min:^d,max:-^d,view@yortMin:^d,view@yortMax:-^d,minDiff:^d};^L[462]){^P465]]=^#^a465]][ek]J&!^P372^V680]]){^P681]]^z};^^iN=^O||iN=^_9]){^P465]]=^#^a465^V463]^i^P465]]=^#^a465^V464]]}^x ^m^P372^V865]^9{^K5]]=^#^]48]](^K5]])^x ^m^P372^V866]^9{^K6]]=^#^]48]](^K6]])};^P35J(ek;^L[462]&&(!cD|| ^mcD^a867]^9){^K7]]=~b976[843^V~Index:cc,dataSeries~^0I~^P379]]~^P538]]~ath^a263]](~^P392]]~]||ek=^_55~]||ek=^_53~^P310]]~M^W4]]-cz~^P825]]~^P311]]~ath^a271]](~]||ek=^_52~||^S688]~oint:gq,data@yoint~]:;case ^c55~){d@w^a274]~k ;;case ^c5~]){return ^c~fT=eD^W4]~]:;case ^c53~&(c@z>^Y[~][^S647]~])=^_161])~]||ek=^_85~{^L[5~});j@o=true;};brea~@z@u^Y[86~]:;case ^c52~]?fp[db]^a8~if(^P7~76[430^V~jM^a728]]~ath^]30]~=fp[db]^a~]=0;this^v76~M^W6]]~Math^a74~]]:c@n^a~;^P6~:this,distance:~^P86~if(ek===_$_b976~^a152]]~]=^_52~^_360]~this^a~125]]^v76~]]?c@n^v7~d@i^a~]]===_$_b976~=Math^v7~]]^a~^a41~_b976[^{~=jM^v76~]=function(~return null~]+eD^v7~^a6~^rif(~==^c~]]-c@z,2))~[^c~]({data@y~_$_b976[~Infinity~=^q~^rj~J&hz@u~;^q~]^r~{break }~;^r~]](J ~typeof (~cc]^w~;for(var~^t@~d@i[_$_~}^}{~]]-c@z)~^wj~){var ~[_$_b9~;var ~}J&~310]]~=null~170]]~@b0.1~else ~)J&~415]]~>0){j~%360)~,2)+M~)&&(c~;if(~9]](~1]]=~5]](~e@t=~722]~};};~42]]','0};th^.iN;^A^]JD,y1J.,x2J.,y2J.,wJ4JD};{^)=((^)%360)+360)%36J6^)>90&&^)@u=270){^)-=180^\\^)>180&&^)@u=270){^)-=180^\\^)>270&&^)@u=360){^)-=360}}};}if(^V7^58JB&&^V7^5870^O152]]>0){^90]]=[]J2^bcc@u^V7^58JB[J,^<^90^O274]](J8bg(^A379]],^V7^58JB[cc],k^R378]],++^V^-430^O519]],this))};};^91]]=JD;^A675]]=JD;^A676]]=JD;if(^A383]^aJ3)){^A465^O479]]=^A478]]J$^A383]^aJ5)){^A465^O481]]=^A480]]};^A380]^aJ3);^A380]^aJ5);}@s(h,m);h^`125^O872]]^8ff;^bJEj@vJ1jS=0^or=0^ok=J6th^.^S113J/^.^S9]){j@k=^n_^!J&/Ma^/^A480]]-^A478]])@b^A6^i^93]]){jS= ty^1^5J+)=^??j@k@b0.9^6[J+^jJ:^1^5J+)=^??^V^-J&@b0.7^6[J+};j@r= ty^1^5875]])=^?||^95]]?^V^-J%@b0.5^6[866]]@b1.5;^\\th^.^S360J/^.^S14]){j@k=^n_^!J%/Ma^/^A480]]-^A478]])@b^A6^i^93]]){jS= ty^1^5J+)=^??^V^-J&@b0.3^6[J+^jJ:^1^5J+)=^??^V^-J&@b0.5^6[J+};j@r= ty^1^5875]])=^?||^95]]?j@k@b2^6[866]]@b1.5;}J$^A351^M[462]&&^V^-516^O636^M[628]){j@v=c(J8Date(^A480]]),^AJ\',^A681]])J2cc=^=63]];cc@uj@v;c(cc,^AJ\',^A681]]))J0j@w=cc^`209]^kiT=^96]]?^9J@{chart:^A379]],axis:^A372]],value:cc,label:^n^;?^n^;J.}):^A351^M[462]&&^A633]][j@w]?^A633]][j@w]:x(cc,^97]],^V^-363]]);ff=J8bi(^A392]],{x:0,y:0,max@wJ4jS,max^hj@r,angle:^)J7:^98]]+iT+^99]],horizontal@zlign:^e360],fontSize:^=66^gsamily:^=80^gweight:^=81^rCJ9^=82^rStyle:^=83^caseline:^e764]});^"^e274]]({position:cc^`209JCJ7@qlock:ff,effective^hJD});};^j@v=^A4^i^A633]]&&^A633^O152]])J0j@n=^BJ"^AJ\')^ol=^BJ"^=63]])^oy=falseJ2cc=j@l;cc@u^A480]];cc+=j@n){if(^n^;){j@y=true^j@y=false;break ;}J$j@y){^AJ\'=j@n;^=63]]=j@l;};}J2cc=^=63]];cc@u=j@v;cc=parse@sloat((cc+^AJ\')^`275]](14)))J0iT=^96]]?^9J@{chart:^A379]],axis:^A372]],value:cc,label:^n^;?^n^;J.}):^A351^M[462]&&^n^;?^n^;:@m(cc,^97]],^V^-363]]);ff=J8bi(^A392]],{x:0,y:0,max@wJ4jS,max^hj@r,angle:^)J7:^98]]+iT+^99]],horizontal@zlign:^e360],fontSize:^=66^gsamily:^=80^gweight:^=81^rCJ9^=82^rStyle:^=83^caseline:^e764],borderThickness:0});^"^e274]]({position:ccJ7@qlock:ff,effective^hJD});};}J2^bcc@u^90]][J,^kt){^UJ5]=^U[J\'@bks+^UJ3]^\\kt>ks){^PJ5]=^P[J\'@bkt+^PJ3]}};^qo=e^G6J>]?^PJ>]^^j=^N6J>]?^UJ>]^^m=e^G6J?]?^PJ?]^^h=^N6J?]?^UJ?]^^p=e^G6[355]]:0J#k=e^G6[355]]:J6kd=^S12]){^L674]]={^qq=^B173]](e^G6[886]^yf@w=^ ^C4]]+kq+kp);^p^!414J)wJ#l=^BJ"^N6[886]^yf@m=^ ^C6]]-kl>^f9^-3^x?^f9^-310]^+6]]-kl);^p^!416J)m;^p^!J&=Ma^/^v)J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%wJ4^v,^uki};};f@w=^ ^C4]]J<^:f@p=^ kg?kg[_$_^!417]]:(eD^>@u10?10:eD^>));f@m=^ ^C4]]+kfJ<^:f@i=^ e@x?^m^!415]]:(^CJ(p>^f9^-J%-10?^f9^-311]^+J(p));^L^]f@m,y1^%^uMa^/f@i-f@p)};^f976^3^%^Q^(^L894]]^$976[J!}^#J!};^&[895J*^#895]]^,5JC;k^R570]^kep=^f9^-405]]^[JA1J@^F[717]](ep[^W4]],ep^>,Ma^/ep[^W6]]-ep[^W4]]),Ma^/ep[^W7]]-ep^>)^F[718]^H76^K6[885]);^&^K6^}^#896]^a^};^L897]]^$9J-7J*^#^l^[JA30]^H7^{^$97^{()}^#898]]^,9]]^$9J-9J*^#899]]^,6]]^@;^&[896]]^@}^#896]]^@};};};h^`125^O895]]^8kw=falseJ#@z=0J#x=1J#v=0^ok=^A724^O725]]@b^A6^i^)!==0&&^)!==360){kx=1.2J$ ty^1^5J\')=^?){if(th^.^S113J/^.^S9]){^J^"J,^^n_^!J&@bkx){kw=true};J$th^.^S360J/^.^S14]){^J^"J,^^n_^!J%@bkx){kw=true};};J$th^.^S113]){^bJEkuJ1er;^J^"J,^^A480]]^Ier=^A68J@ku^`353]]);if((^A902]]&&!^"JF^E)||(^"JF^E&&^"JF^E^`903^M[900])){if(^"JF^E){jT=^"JF^E;^A^D[162]]=^T[904]];^A^D[160]]=^T[522]];^w^A^D[162]]=^A902]];^A^D[160]]=^A905]];^qy=(^A^D[162]]%2===1)?(e^R1JB@J=+0.5:(e^R1JB@J=;^A^D[163JC;^A^D[164]](ky,e^RJG]@J=;^A^D[165]](ky,(e^RJG]+^=90]])@J=;^A^D[169JC^|w&&kv++ %2!==0&&!^"JF^E^I^_9^0807]]===0){e^R1JB-=^d^0J&/2;e^RJG]+=^=90]]+^d^0298]]/2;^we^R1JB-=(^)@u0?(^d^0^2JA6J@^B^\'b^X):0);e^RJG]+=^=90]]+Ma^/(^)@u0?^d^0^2JA^76[^\'b^X-5:5));};^d^01JB=e^R1JB;^d^0JG]=e^RJG];^d^0433]](true);J$thi~^B193]](~b976[674^O~^=64]][~;if(kg){^U[~();if(e@x){^mb~:f@p,x2:f@m,y2:f@i,~if(e@x){^P~748]]/180@b^n_~@w,^uf@i-f@p};~^=69]]~76[161]&& typeof (~]-10:^C~()};^L89~76[379^O~is^`868]]=~th^`263]](~76[843^O~peof (^V7~J&@bMath[_$_b9~[742]]={x1:f@w,y1~]]/180@bMath[_$_b~6[372^O~>>0:^V76~67]](Math[J,7~=function()J0~^=7~^e355]]);~_b976[633]][cc]~76[152]];cc++){~^A8~[^W5]]~^S161]~(^e900])~^V76[~Math^`~eD[^W~392]][J,76~^e901]]~)^[76~@x?^mb97~]();^f9~){continue };~for(cc=0;cc@u~[896]](J,7~e@j^`~]]===J,76~kg?k^t7~]]^`~^mb976~wJ4f@m-f~r^`~==^e~jT[J,76~k^t76~^n_b9~^e41~976[869]])~h@w[J,7~]])===_$_b~;e@o[J,~^wif(~674]]={x1:~:0:0J#~if(ku[_$_b~[^e~](J,76~JEcc=0;~]]J7@q~ku[J,~J,76[~^pb~^r@~@xeight:~80]];if(~^wj~]()J1~897J*~e@x[_$_~this[_$~J1j@~e@j[_$_~}J#~]],font~;kg[_$_~g[J,~height:~f@m-f@w~}else {~10]]-10~]():0);~6[263]]~6[898]]~;J$k~[885])}~J)p;~894JC~173]](~J1k~};if(~311]]~310]]~680]]~7]]-k~]]=f@~JC}~874]]~_$_b9~76[89~:JD~]||th~{JE~;JE~;for(~[478]~idth:~[480]~0;if(~,text~ new ~olor:~S= ty~-e@j[~+e@j[~u@u0)~[719]~[867]~6]](~76[7~70]]~]]()~null~var ~cc][~629]','s^m361]]){^8= ^WbJ-92]],{x:^p^!4J1,y:^a742^c17]]-^Y65]]-5,m^G^!310]]^1^r^U0^XJ-61]]^.$_b^9his^m865]],f^/^|8]],^-_^|9]]^5^}6]]^7^}7]]^4J99]});^8^m^w^8^m170^l_^!4J1+^p^!310]]/2-^8[_$^h/2;^8^m629^Q[742^c17]]-^8^mJ,-3;^8^q^V^&9^#9]){J2cc=0J.ku^vJ2jT^`^ _$_b9^Pku=^ J&ku^mJ!^?]||ku^m^A6[^)r=^=](ku^LJ0^Z902J7!^ ^;)||(^ ^;&&^ ^;^m903]]=^_))J8^ ^;){jT=^ ^;^j^"62^b[904]]^j^"60^b[522^0^"62^@02]]^j^"60^@05]];J)ky^kb^"^+bJ9J4]@^*76[J4^F^"J*^j^"64J3y,^R^F^"65J3y,(^R]-^Y90]])@u@u0)^j^"^xJ0kw&&kv++ %2!==0&&!^ cc]^q^,ifJ(^$807]]===0){^H-=ku[_$_^$310]]/2;^R]-=^Y90]]+ku[_$_^$J,/2;}else {^H-=^N69]]>0?J(^$^C76[766]^\\^3^r9]])):0);^R]-=^Y90]]+^<](^N69]]>0?ku[_$_^$^C76[767]^\\^3^r9]])+5:5));}J%^$J4]=^HJ%^$629]^B]J%^$433]](J:);};^I361]]){^8= ^WbJ-92]],{x:^p^!4J1,y:^a742^c15]]+1,m^G^!310]]^1^r^U0^XJ-61]]^.$_b^9his^m865]],f^/^|8]],^-_^|9]]^5^}6]]^7^}7]]^4J99]});^8^m^w^8^m170^l_^!4J1+^p^!310]]/2-^8[_$^h/2;^8^q^V^&9^#360^{u^vfor(J2^o^ _$_b9^Pku=^ J&ku^mJ!^?]||ku^m^A6[^)r=^=](ku^LJ0^Z902J7!^ ^;)||(^ ^;&&^ ^;^m903]]=^_))J8^ ^;){jT=^ ^;^j^"62^b[904]]^j^"60^b[522^0^"62^@02]]^j^"60^@05]];J)kz^kb^"^+b9J$]@^*J$^F^"J*^j^"64]](^H^6^"65]]((^H-^Y90]])^6^"^xJ0kw&&kv++ %2!==0&&!^ cc]^q^,J+^$J4]=^H-J(^$^C76[766]^\\^3^r9]]))-^Y90]]-5;^I869]]J\'J/^$629]^B]^tJ/^$629]^B]-J(^$^C76[767]^\\^3^r9]]))}J%^$433]](J:);};^I361]]){^8= ^WbJ-92]],{x:^a742^cJ1+1,y:^p^!417]],m^G^!J,^1^r^U-90^XJ-61]]^.$_b^9his^m865]],f^/^|8]],^-_^|9]]^5^}6]]^7^}7]]^4J99]})J.h@w=^8^m^w^8^[^k^!J,/2+^8[_$^h/2+^p^!415]]);^8^q^V^&9^#14^{u^vfor(J2^o^ _$_b9^Pku=^ J&ku^mJ!^?]||ku^m^A6[^)r=^=](ku^LJ0^Z902J7!^ ^;)||(^ ^;&&^ ^;^m903]]=^_))J8^ ^;){jT=^ ^;^j^"62^b[904]]^j^"60^b[522^0^"62^@02]]^j^"60^@05]];J)kz^kb^"^+b9J$]@^*J$^F^"J*^j^"64]](^H^6^"65]]((^H+^Y90]])^6^"^xJ0kw&&kv++ %2!==0&&!^ cc]^q^,J+^$J4]=^H+^Y90]]+5;^I869]]J\'J/^$629]^B]^tJ/^$629]^B]}J%^$433]](J:);};^I361]]){^8= ^WbJ-92]],{x:^a742^c16]]-1,y:^p^!417]],m^G^!J,^1^r^U90^XJ-61]]^.$_b^9his^m865]],f^/^|8]],^-_^|9]]^5^}6]]^7^}7]]^4J99]});^8^m^w^8^[^k^!J,/2-^8[_$^h/2+^p^!415]]);^8^q^V}}}^:^i897^]J2e@o=^p^%405]^i392J"kCJ qJ.kD=^p^%405J"cc=0,kE=J:J0(^pb9^#^J^#9])&&^a908]^M159^@08]]^`^ _$_b9^Pif(^ cc]^q^,if(kE){kC=^=](^ cc]^LJ0cc+1>=^ ^s152]]-1){k@q=^=]^Z480]])^t@q=^=](^ cc+1]^L};e@o^m649J3C^mJ4],kD^g5]],^<](k@q^mJ4]-kC^mJ4]),^<](kD^g5]]-kD^g7]]));kE=false;^tE=J:};};}else J8(^pb9^#3^S^#14])&&^a908]^M159^@08]]^`^ _$_b9^Pif(^ cc]^q^,if(kE){k@q=^=](^ cc]^LJ0cc+1>=^ ^s152]]-1){kC=^=]^Z480]])^tC=^=](^ cc+1]^L};e@o^m649J3D^g4]],kC^[,^<](kD^g4]]-kD^g6]]),^<](kC^[-k@q^[));kE=false;^tE=J:};};}}^K3]]()^D^i896]^e@s)J8!^N70J7^Y70]^i152]]>0)|| !k@s){J#J)c@v=thisJ.cc=0^`^Y70]][_$_b9^PJ2jT=^Y70]][J&jT^m903]]!==k@s){continue }J0k@s=^_&&(jT^m885]]@u^?]||jT^m885]]>^a480]])){continue }J0jT^m909]]){^p^%196]](^s605],jT^m433]],jT)}else {jT^m433]]()};^:^i898^]if(!^N67J7^Y67]]>0)){J#J)e@o=^p^%392]]^vJ2kD=^p^%405J"jTJ.kI,k@h^K2^Q[867]]^K0^@10]]J0e@o^mJ;^M720]](@t^Z911]],^Y67]]))}^db9^#^J^#9]){for(^o^ ^s152J7!^ ^;;cc++)J8^ cc^iJ!^?]||^ cc^i^A6[^)@o^m1J*;er=^=](^ cc]^LJ j=(e@o^m1^+bJ9J4]@^*76[170^(6[164J3@j,kD^g5^(6[165J3@j,kD^g7^(6[1^x^&9^#3^S^#14]){for(J2^o^ ^s152J7!^ ^;;cc++)J8cc===0&&^a351]^^3]&&^p^%462J7^p^%462]^iJ5]){continue }J0^ cc^iJ!^?]||^ cc^i^A6[^)@o^m1J*;er=^=](^ cc]^LJ x=(e@o^m1^+b9J$]@^*76[629^(6[164J3D^g4]]@u@u0,k@x)^K5J3D^g6]]@u@u0,k@x)^K9]]();}}^:^i899^]J2e@o=^p^%392]]^db9^#^J^#9]){^IJ5^M162^Q[J5]^K0^Q[847]]?^Y47]]:^s13]J0e@o^mJ;^M720]](@t^Z721]],^aJ5]))^zt=^ZJ5]%2===1)?(^p^!415]]@u@u0)+0.5:(^p^!415^(6[1J*^K4]](^p^!4J1,k@t)^K5]](^p^!416]],k@t)^K9]]();}^&9^#3^S^#14]){^IJ5^M162^Q[J5]^K0^Q[847]]J0e@o^mJ;^M720]](@t^Z721]],^aJ5]))^zo=^ZJ5]%2===1)?(^p^!4J1@u@u0)+0.5:(^p^!414^(6[1J*^K4J3@o,^p^!415]])^K5J3@o,^p^!417]])^K9]]();}}^:^i686]^eN){J2er={J)cT=^p^!310J"cS=^p^!J,^db9^#^J^#9^{M=cT/^<](^pb9^\'76^y^H=^p^!4J1+(kM@b(kN-^?]));^R]=^p^!415]];}^db9^#3^S^#14^{M=cS/^<](^pb9^\'76^y^R]=^p^!417]]-(kM@b(kN-^?]));^H=^p^!416]];};J#er^D^i859]^e@v)J8!k@v){J#J6J)jN=J6^db9^#360]){jN^k^%^u_b9^\'76[379^c62^c78]])/^p^%^u_^!J,@b((^p^%^u_^!417]]-k@v^[))+^p^%462^c78]]^&9^#113]){jN^k^%^u_b9^\'76[379^c62^c78]])/^p^%^u_^!310]]@b(k@v^mJ4]-^p^%^u_^!4J1)+^p^%462^c78]]}};J#jN^D^i894]^eN){J2er={^zy={pixel@yer@nnit:J6,minimum:J6,reference:J6J)cT=^p^!310J"cS=^p^!J,;k@y^m478]]=^?]^db9^#^J^#9]){k@y^m725]]=cT/^<](^pb9^\'76^yk@y^m723^l_^!4J1;}^db9^#3^S^#14]){k@y^m725]]=-1@bcS/^<](^pb9^\'76^yk@y^m723^l_^!417]];};^a724]]=k@y^D^i893^]J2eD=^p^%517]^i568]]()J r=0J k=0J.kS=false^db9^#^J^#9]){^YJ1=eD[_$^h;^Y19]]=eD^m311^0J98J1=eD^mJ,;^Y19]]=eD[_$^h;^zn=^a351]^^2]?^NJ1@u500?8:Math^m195]](6,Math^m174]]^NJ1/62))):Math^m195]^\\[174]]^NJ1/40),2)J.i@m,i@wJ.kTJ wJ m=0;^I351]^^2]){i@m=^Z465^c79]]!==J6)?^a465^c79]]:^a6^O4]];i@w=^Z465^c81]]!==J6)?^a465^c81]]:^a6^O5]]J0i@w-i@mJ\'@m^29^>680]^E?0.4:^pb9^>680]];i@w+=k@m;i@m-=k@m;};^I6^O1]]!==Infinity){kT=^a6^O1]]^fw-i@m>1){kT=^<](i@w-i@m)@b0.5^tT=1^d^%516]^i636]]===^s628]){kS=J:};}};^&J-51]^^3]){i@m^29^>478]^E||^pb9^>478]]===J6?^a6^O4]]:^pb9^>478]];i@w^29^>480]^E||^pb9^>480]]===J6?^a6^O5]]:^pb9^>480]]J0!is@sinite(i@m)&&!is@sinite(i@w)){i@w^29^>680]^E?-Infinity:^pb9^>680]];i@m=0;^fm===0&&i@w===0){i@w+=9;i@m=0;^fw-i@mJ\'@m=Math^m630]](^<](^<](i@w)@b0.01),5);i@w+=k@m;i@m-=k@m;^fm>i@w){k@m=Math^m630]](^<](^<](i@w-i@m)@b0.01),5);~^Y64]][~b976[674]^i~976[392]^i1~76[868]]===^s~b976[843]^i~b976[379]^i~}else {if(^pb~76[480]]-^pb9~]]@u@u0);e@o[_$_b97~480]]){continue };e~u@u0)+0.5:(er[_$_b9~62]]%2===1)?(er[_$_~[901]]){continue };~font@weight:this[_$~,horizontal@zlign:_~ont@samily:^p~]];}else {^pb~,max@xeight:this[_$~= typeof (^pb~[748]]/180@bthis[_$~,text@qaseline:_$_b~,fontColor:^p~@u@u0,kz)^j~,fontStyle:^p~^Y71]]~J910],fontSize:t~}^D~cc^i901]]~Math^m263]~^a686]~76[372]^i~^a478]~^Q[9~353]]>^pb97~]=^R~310]]@bMath[_$_b9~;};h^m125]~])===^s161]~]@u@u0)^j~ax@width:^p~er^m170]]~if^Z~113]||^pb9~;e@o^m16~^m353]])~]){e@o^m~(^Y~26]^i63~76[152]];cc++){~^l_b976~er^m629]~60]||^pb9~^a62~5]]@b1.5,angle:~[433]](J:);};~new bi(^p~,text:^pb~^a8~(^a~^m629]]~](Math^q~]]=function(){~]===^s46~==^s900]~;for(^o~this^m~]]=jT^q~]^i4~;if(^p~]=function(k~}else J8i@~^m41~_bJ-10]]~]^m~;^pb~=(^p~]]=this[_$~^q[~[^w~cc=0;cc@u~this[_$_~[_$_b976~_bJ986~_$_bJ9~}else {k~462]][_$~J.er;~708]]();~69]]();}~[478]]);~}J ~]){J2k~bJ988~bJ990~J.k@~353]]@u~]]J.~return ~76[629]~;J+~cc]J0~===0){k~(J+~}J.~63]]()~kJ/~311]]~J93~;J2~u[_$_~;if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^i^F^!8^x6^f^$=6;^ ^i^F^!9^<^$=1;^ ^Z7^[^!9^?^$=2;^ ^Z7^[^!9^x4^f^$=4;^ ^Z7];^j^$^4174]](h[_^`]](k@w/(k@n-1),true)/r^e919]]);^ ^Z7];^*^*^*}};^56^7[479^\\{^y^.=^N^7[479]]^j^y^.=i@m-kT/2};^56^7[481^\\^/^u=^N^7[481]]}else ^/^u=i@w+kT/2^q!^J877]]^pkS)^/^6921^R^ ^Q47])^/^6234^R^ ^Q44])^/^6922^R^ ^Q43])^/^6923^R^ ^Q40])^/^6923^R^ ^Q37])^/^6924^R^ ^Q34])^/^6924^R^ ^Q31])^/^6925^R^ ^Q28])^/^6926]^m}}}}^0863]]=^)27]](^d^y^.),^J681]],^$);^j^ ^i[29];k@w=h[_^`]](i@w-i@m,false)^zt^+2]]&&t^+2^P680]]){^$=t^+2^P680]]^j^$=h[_^`]](k@w/(k@n-1),true)};^56^7[479^\\{^y^.=^N^7[479]]^j^y^.^4174]](i@m/^$)@b^$};^56^7[481^\\^/^u=^N^7[481]]}else ^/^u^4173]](i@w/^$)@b^$};^56[^u===0&&^y^.===0^pt^+2]]^.===0)^/^u+=10^jif(t^+2]]^:===0){^y^.-=10}^qt^+2]]&&^_^+2^P680]])=^;){^$=h[_^`]]((^y^:-^y^.)/(k@n-1),true)^}^56^I76[462]^p!(^N^7[479^\\){^y^.=i@m-kT/2^q!(^N^7[481^\\)^/^u=i@w+kT/2}^0863]]^4174]]((^y^.+(^$@b0.2))/^$)@b^$;^j^56^I76[463])^/863]]=^y^.}^}^56^I76[462])^/675]]=t^+2]]&&^_^+2]]^.)!^;?t^+2]]^.:^J626^P630]]-kT/2^0676]]=t^+2]]&&^_^+2]]^:)!^;?t^+2]]^::^J626^P195]]+kT/2;^q!^J877]])^/^6928];k@w^4263]](^y^:-^y^.)^zk@w@u1^nk@l^4174]^D[263]^D[376]](k@w)/^W6[929]]))+2^zisNaN(k@l)||!is@sinite(k@l)){k@l=2^qk@l>2){for(^|cc=0;cc@uk@l-2;cc++)^/877]]+=^i[172]}^}^}h[_^`^Ocz,lb^nk@p^4174]^D[376]](cz)/^W6[929]]);^|k@i=cz/^W6[271]](10,k@p)^la^zlb^pk@i@u1.5){la=1}^C3){la=2}^C7){la=5^jla=10}}}}^C=1){la=1}^C=2){la=2}^C=5){la=5^jla=10}}}};return Number((la@b^W6[271]](10,k@p))^e275]](20));};h[^i^E[927^O^nld=s(^$,^J681]])^le^4174]]((^y^.)/ld)@bld^lc=^dle)^z^ ^Q28]){^jif(^ ^Q31^@76[129]](^>6[133^K[132^{+1^,^r^B^ ^Q34^@76[132^{^1^k^>6[136^K^w]()+1^,^o^,^r^B^ ^Q37^@76^w]()^1^h^1^k^>6[139^K[13^s+1^,36]](0^,^o^,^r^B^ ^Q40^@76[13^s^1^w]()^1^h^1^k^>J 2^K[141^{+1^,39]](0^,36]](0^,^o^,^r^B^ ^Q43^@76[9^r)^1[13^s^1^w]()^1^h^1^k^>J 2^K[141^{+(7-lc^e9^r))^,39]](0^,36]](0^,^o^,^r^B^ ^Q44^@7J 1^{>1||lc^]3^s^1^w]()^1^h^1^k^>J 6^K[145^{+1^,42]](1^,39]](0^,36]](0^,^o^,^r^B^ ^Q47^@7J 5^{^1[141^{>1||lc^]3^s^1^w]()^1^h^1^k^>J 9^K[14^s+1^,46]](0^,42]](1^,39]](0^,36]](0^,^o^,^r0);^m}}};return lc;};function bg(kr,cD,c@j,d@p,ny){bg^]27^P126^P204]](^y,^i[931],cD,c@j,ny)^0647]]=d@p;t^+9]]=kr^0392]]=^g^"392]]^0632]]=^J632]];^)03^S900]^z^)32]]!=^t&&^)33^\\^/885]]=((^)32^P209]]?^)32^P209^{:^)32]])+(^)33^P209]]?^)33^P209^{:^)33]]))/2;^)04]]^4195]](^)33]]-^)32]]);^)03^S885];};}@s(bg,m);bg[^i^E[433^O^ner=t^+^M686]](^J885]])^lf^4263]](^)03]]=^b900]?^)04]]:t^+^M724^P725^x^)04]])^zlf>0^nlh=^)34]]==^t?1:^)34]]^0^9160]]=^J522]]^0^9163^{^lg=^N^2[682]]^0^9682]]=lh;^|fr=@r(^J647]]);^|f@w,f@m,f@p,f@i^0^9162]]=lf;^56^2[720]])^/^9720]](@t(^J721]],lf))^qt^+^M^H6[113]||t^+^M^H6[9]^nli=(^N^2[162]]%2===1)?^V[170]]@u@u0)+0.5:^V[170]]@u@u0);f@w=f@m=li;f@p=^g^"405^P415]];f@i=^g^"405^P417]^[f(t^+^M^H6[360]||t^+^M^HJ ]^nlj=(^N^2[162]]%2===1)?^V[629]]@u@u0)+0.5:^V[629]]@u@u0);f@p=f@i=lj;f@w=^g^"405^P414]];f@m=^g^"405^P416]];}}^0^9164]](f@w,f@p)^0^9165]](f@m,f@i)^0^9169^{^0^9682]]=lg;^}function bm(kr,cD,c@j){bm^]27^P126^P204]](^y,^i[935],cD,c@j);t^+9]]=kr^01]]=kr^]]]^0392]]=^g^"392]];^)36]]= -1;^)37]]= -1;^)38]]=0;^)39]]=NaN;^)40]]=NaN^050^s;}@s(bm,m);bm[^i^E[508^O){^56[671]]){^)41]]=document^e2]](^i[421]);^)^891]](^i[314],^i[942]);^)^89^M353^S426];^)^89^M311^S25];^)^89^M943^S944];^)^89^M945^S946];^)^89^M189^S194]^lk=^i[947]^-48]^-49]^-50]^-51]^-52]^-53]^-54]^-55]+(T?^i[956]:^i[957])^-58]^-59]^-60]^-61]^-62];lk+=T?^i[963]:^i[964]^-65]^-66]^-67]^-68]^-69]^-70]^-71]^-72]^z!T){lk+=^i[973]^-74];}^-75];^)^885]]=lk;^)76]]=^)41^P977]];^)^89^M978]]=^)76^P19^M978]];^g^"42^M188]](^)41]]);}};bm[^i^E[677^Ocz,c@z^p!(^)79]]&&(^d)^e209^{-^)79]])@u40)){^)79]]=^d)^e209^{^0608]](cz,c@z);}};bm[^i^E[608^OdT,d@n^p^g^"401]]^c^z typeof (dT)=^;|| typeof (d@n)=^;^pisNaN(^)39]])||isNaN(^)40]])^celse {dT=^)39]];d@n=^)40]];}^j^)39]]=dT;^)40]]=d@n;};^|gq^t;^|c@n^t^lq=^i[20]^lm=[]^ls^lp;^|cz=0^z^)80]]&&^J671]]&&^g^"516^P542]]!^Q94]^p^g^"516^P542]]=^b543]){cz=(^g^"^v^:-^g^"^v^.)/^g^"462^P674^P311^x((^g^"462^P674^P417]]-d@n))+^g^"^v^.^jcz=(^g^"^v^:-^g^"^v^.)/^g^"462^P674^P310^x(dT-^g^"462^P674^P414]])+^g^"^v^.}^ln=[];for(^|cc=0;cc@u^g^"282^P152]];cc++^nht=^g^"282]][cc]^e858]](cz,true)^zht&&ht^e524]]>=0){ht^e567]]=^g^"282]][cc]^zht^^41^P629^\\{ln^e274]](ht)^}^qln^]52]]===0^c;ln^e541]](function(ik,il){return ik^^42]]-il^^42]]})^ll=ln[0];for(cc=0;cc@uln^]52]];cc++^pln[cc]^^^87^M981^{===ll^^^87^M981^{){lm^e274]](ln[cc])}};ln^t;^j^|d@m=^g^"640]](dT,d@n,true)^zd@m){^)37]]=d@m^^44]];^)36]]=d@m^e567^P524]^[f(T^nd@p=N(dT,d@n,^g^"43^M645]])^zd@p>0&& typeof ^g^"43^M722]][d@p]!^;){event@vbject=^g^"43^M722]][d@p]^zevent^G6[982]]=^b845]^c;^)36]]=event^G6[846]];^)37]]=event^G6[644]]>=0?event^G6[644]]:-1;^j^y[~^J681]]=~f(k@w/(r^e91~b976[379^P~^%}~^J680]]~^&}~^\'}~^(}~^*}~^J9~^m^m}}~his^e37~);lc^]~;lk+=^i[9~^e478]]~{^J~;^J~>0||lc[^i~[392]][^i~[128^[~=^W6[~if(^gb97~877^S~[465]][^i~41^P1~392^P~^e480]]~^Q61]~]]@b1^f~[134^[~)>0){lc[_$_b97~]]@b2^f~]^plc[_$_b9~[131^[~0);}^jif(~else {if(k@i@u~](^W6~[125]][^i~[144^[~@vbject[_$_b97~868]]===_$_b97~[351]]===_$_b9~^N[~]](lc[^i~137^[~0^P~^gb976~]]=function(~]]^e~^b1~]^jif(~]]=^i[~0^Y~^X2~(er[^i~Math[_$_b97~f(k@w/(1@b~0^f~^i[14~];^ji~]]!=^t)~^e1~^e6~ typeof (t~$_b976[920~5^f~==^i[~){return }~ new Date(~[^i[~)@u=k@n){~^y[_$_~[132^{~_$_b976~}else {~[129]](~;^|l~}}}}}}~){^|~33]](0~){if(~}^z~30]](~8^{~=null~480]]~462]]~[135]~]]@b~this~;if(~]]()~var ~};};~6[14~209]','_^h937]]= -1^d^737]]= -1}}^|^736]]>=0){c@n=t^&^_282]][^736]]^uht={}^|^737]]>=0){gq=^F538]][^737]]];ht^_567]]=c@n;ht[^==gq;ht[_$_^[=^737]];ht^_642]]=M^2](gq^_170]]-cz);^lif(^;671]]&&^c9^ 525^D^ 526^D^ 527^D^ 5^9^ 52^>^ 530^D^ 5^C9^ 532^D^ ^:9^ 534^D^ 535^D^ 536])){^}cz=(t^&^i^,480]]-t^&^i^,^t/t^&^i^,674^R310]]@b(dT-t^&^i^,674]^E4]])+t^&^i^,478^R981]]();ht=^F858]](cz,true);ht^_567]]=c@n;^737]]=ht[_$_^[;gq=ht[^=;^l^m}}^|ht[^=^_629]]!^em^_274]](ht)};};^zm^_152]]>0){^;770J!m)^|^;671]^olr^G;lr=^783]]({entries:lm})^|lr!==null){t^`^56[185]]=lr;t^`^56[185]]=lr;^}lo=false^|t^+^g^)189]]=^Z194]){lo=true;t^+^g^)189]]=_^h489];};try{t^`^5^)984]]=^;467]]?^;467]]:T?_^h985^a[986^L^5^)987]]=t^`^5^)988]]=t^`^5^)750]]=^;750]]?^;750]]:^v^=^_J"]?^v^=^_J"]:^j^"76[J"]?^j^"76[J"]:^j^"76[523]][^j$_^[%^j^"76[523^R152]]^L^5^)989]]=(^;728J ^;728]J#0)?^;728]]+_^Y]:2+_^Y^L^5^)978]]=(^;809J ^;809]J#0)?^;809]]+_^Y]:5+_^Y];t^+^g^)978]]=t^`^5^)978]^L^5^)298]]=(^;298J ^;298]J#0)?^;298]]+_^Y]:14+_^Y^L^5^)J"]=^;810]]?^;810]^a[16^L^5^)300]]=^;300]]?^;300]^a[17^L^5^)296]]=^;296]]?^;296]^a[12^L^5^)294]]=^;294]]?^;294]]:T?_^h18^a[12];}catch(e){}^|^j^"^ 556^V^"^ 557^V^"^ 558^V^"^ 549^V^"^ 555^V^"^ 552^V^"^ 553])^B=dT-10-t^+^E2]]}else ^B=(((t^&^i^,674^R310]]/M^2](t^&^i^,480]]-t^&^i^,^t)@bM^2](^v^=^_170]]-t^&^i^,^t)+t^&^i^,674]^E4]]+0.5)-t^+^E2]]@u@u0;^O-=10;}^|^O@u0)^B+=t^+^E2]]+20}^|^O+t^+^E2]]>t^&^_407]^E2]])^B=M^J195]](0,t^&^_407]^E2]]-t^+^E2]])};^O+=_^Y]^|lm^_152]J#1&&!^780]]&&(^j^"^ 525^V^"^ 526^V^"^ 527^V^"^ 528^V^"^ 529^V^"^ 530^V^"^ 531^V^"^ 532])){lp=(^j^"^x^R674]^E7^b_^"^x^R674^R311]]/M^2](^j^"^x^R480^b_^"^x^R^t@bM^2](^v^=^_629^b_^"^x^R^t+0.5)@u@u0^lif(^j^"^ 549^V^"^ 555^V^"^ 552^V^"^ 553]){lp=(^j^"7^,674]^E7^b_^"7^,674^R311]]/M^2](^j^"7^,480^b_^"7^,^t@bM^2](^v^=^_170^b_^"7^,^t+0.5)@u@u0^llp=d@n}};lp=(-lp+10)^|lp+t^+^E3]]+5>0){lp-=lp+t^+^E3]]+5-0};lp+=_^Y];t^+^g^)360]]=^O;t^+^g^)113]]=lp^|!^;470J lo){^790]]()^l^791]]()^d^;477]](false)};};};};bm^_125^R770^Qlm){^}lu=t^&^_393]];t^&^_482]]();lu^X16]]();^}ep=t^&^_405]^ub@x=0;for(^}cc=0;c^T7^q;cc++){^}ht=lm[cc^ult=t^&^_430^R722]][ht[_^"76[621]][ht[_$_^[]]^|!lt||!lt^_982J lt^_982]]!^Z641]){continue };^}c@n=t^&^_282]][lt^_846]]^ugq=^F538]][lt^_644]]^udb^S[644]]^|gq^_992]]!==false&&(^F992]J#true||gq^_992]J#true)){if^c9^ 525^D^ 526^D^ 527^D^ 53^>^ 5^9^ 52^>^ 530^D^ 5^C9^ 532^D^ ^:9^ 534^ofv=^F726]](db,l^K4^8415]],t^&^_393]]);^<7]]=M^J195]](^<7]]@b1.5@u@u0,10);fv^X50]]=fv^X50J _^h993];^<8]]=^<8J M^J173]](^<7]]@b0.1);bb^X29]]([fv])^|^fl^K7]])!^Z161^ofv=^F726]](db,l^K4^8417]],t^&^_393]]);^<7]]=M^J195]](^<7]]@b1.5@u@u0,10);fv^X50]]=fv^X50J _^h993];^<8]]=^<8J M^J173]](^<7]]@b0.1);bb^X29]]([fv]);};}e^\'^ 540^ofv=^F726]](db,l^K4^8415]],t^&^_393]]);^<7]]^S[727]];fv^_J"]=_^h3];fv^X50]]=_^h3];lu^_682]]=0.3;bb^X29]]([fv]);^n^M}e^\'^ ^9^ 550^D^ 551^D^ 54^>^ 555^D^ 552^D^ 553^D^ 554]){@q(lu,l^K4^8^3[416^8417]],_^h3],0,null^$,false,0.3)}e^\'^ 556^D^ 557]){C(lu,lt[^W^8754]],_^h3],^F351^8759^8760]],0.3)}e^\'^ 535]){^n^Ml^H0]]^S[J"];l^H2]]^S[728]]@b2;b@x=(l^H2]])%2===0?0:0.5;lu^i6^497^6^%^h417]^15]^U6[994]]-b@x,M^J630]^U6[^3[861]]));l^H^Pb976^497^6976[994]]-b@x,M^J195]^U6[^3[861]]));l^H5J!t[_$_b^%^h860]^19]]();@q(lu,l^K4]],M^J630]^U6[^3[861]]),l^K6]],M^J195]^U6[^3[861]]),_^h497],lt^X28]]@b2,lt^_J"]^$,false);^n^M}e^\'^ 536]){^n^Ml^H0]]^S[J"];l^H2]]^S[728]]@b2;b@x=(l^H2]])%2===0?0:0.5;lu^i6^497^6^%^h417]^15J!t[_$_b^%^h860]^1^Pb976^497^6976[994^8415]^15J!^K4^8415]^1^Pb976^497^6976[994^8861]^15J!^K6^8861]^1^Pb^M}}}}}}};};^n^Ml^H3]]();^m;};bm^_125^R983^Qen){^}lm=en^_995]^ulr^\\c@n^\\gq^\\db=0;^}fn^\\lq^G;^}lv=true;for(^}cc=0;c^T7^q;cc++){if(^s_^"76[996J ^s^=^_996]]){lv=false;break ;}^zv&&((^797]]^#_b97^k)=^Z998])||^799]])){^}ec={chart:t^&,toolTip:^;372]],entries:lm};lr=^799]]?^799]](ec):^797]](ec);^lif(^780]]&&t^&^_516^R542]]!^Z194^olw^G;for(^}cc=0;c^T7^q;cc++){c@n=lm[cc]^_567]];gq=^s^=;db=^s_$_^[;lq^G^|cc===0&&lv&&!^797]]){lw+=^ft^&^i^,633]][gq^_170]]])!^Z161]?t^&^i^,633]][gq^_170]]]:^W00];lw+=^W01];lw=t^&^X04J!w,^^;}^|^*^r||(^f^*)=^Z161]&&^F372^R996]]^r)){continue };if^c9^ 525^D^ 526^D^ 527^D^ 5^9^ 52^>^ 530^D^ ^9^ 54^>^ 53^>^ 550^D^ 551^D^ 552^D^ 553^D^ 5^C9^ 532^p^*?^*:^-^?[^/7^k^#^{^06[9^.^I^y2]}e^\'^ 540^p^*?^*:^-^?[^/7^k^#^{^06[9^.^I^y3]}e^\'^ 556^D^ 557^D^ 558^p^*?^*:^-^?[^/7^k^#^{^06[9^.^I^y4]}e^\'^ 554^D^ 555^D^ ^:9^ 534^p^*?^*:^-^?[^/7^k^#^{^06[9^.^I^y5]}e^\'^ 535^D^ 536^p^*?^*:^-^?[^/7^k^#^{^06[9^.^I^y6]+^W07]+^W08]+^W09]+^W10]}}}}^zr=^er^G}^|^;839]J#true){lr=t^&^X04J!q,^^+lr^|c^T7^q-1){lr=^W01]+lr^dlr+=t^&^X04J!q,^^^|c^T7^q-1){lr+=^W01]};};^zr!^er=lw+lr^dc@n=lm[0]^_567]];gq=^v^=;db=^j$_^[^|^*^r||(^f^*)=^Z161]&&^F372^R996]]^r)){^mnull};if^c9^ 525^D^ 526^D^ 527^D^ 5^9^ 52^>^ 530^D^ ^9^ 54^>^ 53^>^ 550^D^ 551^D^ 552^D^ 553^D^ 5^C9^ 532^w^*?^*:^-^?[^/7^k^#^{^06[9^.^I^(97^N976^]^@^h1013]}e^\'^ 540^w^*?^*:^-^?[^/7^k^#^{^06[9^.^I^(97^N976^]^@^h1014]}e^\'^ 556^D^ 557^D^ 558^w^*?^*:^-^?[^/7^k^#^{^06[9^.[997]]:(gq^_520]]?^W15]:gq^i^N976[1016^a[20])+^W17]}e^\'^ 554^D^ 555^D^ ^:9^ 534^w^*?^*:^-^?[^/7^k^#^{^06[9^.^I^(97^N976^]^@^h1018]}e^\'^ 535^D^ 536^w^*?^*:^-^?[^/7^k^#^{^06[9^.^I^(97^N976^]^@^h1019]+^W07]+^W08]+^W20]+^W10]}}}}^zr=^er^G};lr+=t^&^X04J!q,^^;}};^mlr;};bm^_125^R991^Q){if(t^+^g^)1021]]){^m};t^+^g^)1021]]=_^At^+^g^)1023]]=_^At^+^g^)1024]]=_^At^+^g^)1025]]=_^A};bm^_125^R990^Q){if(!t^+^g^)1021]]){^m};t^+^g^)1021]]^G;t^+^g^)1023]]^G;t^+^g^)1024]]^G;t^+^g^)1025]]^G;};bm^_125]]^i6~76[351]]=^Z~e^\'7~^h567]][_$_b9~&&^fthis[_$~,false,false,false~976[994]]-b@x,lt[_~his^_379]]~lse {if^c9~76[1011]+(gq[_$_b~6[190^R~gq^_996]]~his^_941]~6[462^R~^F996]~98]?t^`76~996]]:t^`~[997]])!==_$_b97~]);l^H~^J263]~415]],lt^i6~[163]]();^n~76[976]^g~6[164J!t[_$_b~^;9~]],lt^_~28^D~533]||c@n[_$_b~this^_~fv^X2~_^h641]]~9^D~]?c@n^i6~b9^y0])+_~^h1022];~{^O~31]||c@n[_$_b~]||c@n[_$_b9~]^_41~c@n^_~=_^h20]~u^_16~[997]]:_$_b9~ath^_~t^_41~];t^`~976[682]]=1;~6[632]]?_$_b~toolTip@teft~9]]();lu[_$_~]]=function(~]]^_~=lt^i6~c@ulm[_$_b9~](lt^i~]||^j~_^h10~^_7~^h312~==_^h~b976[524]]~=null;^}~[1012]:_$_~gq,c@n,db)~[_^h~his[_$_b9~]:_$^{~]]-^v~(c@n[_$_b~};^l~==null){l~ typeof (~]^i~$^{[~[_$_b97~^v_~6[997]]~}else {~return ~lu[_$_b~]){^}~]){lq+=~6[152]]~===null~lm[cc][~478]])~];^}~lm[0][~]){lq=~76[463~76[100~}^|l~_b976~;if(~var ~]]||~]](l~522]~]===~}}}}','[477]^RxJ*!^I671]]^alx= typeof (lx)=^m[161]?true:lx;^I941^L90^L8JD^t194];^I936]]= -1;^I93JDNaN;^I940]]=NaNJGlx){^u^ 482J@JAnJ,^)698]^R@z,ly^{zJ8J$CJ8J$@qJ%if^5][_^e^Y697J2){lC=0;lz=l^c170^U209^Q6[170^U209J@:ly[_$^[JGlz in ^M618^U6JC){lC=^M618^U6JC[lzJ)!iJ0ly^F)J*lC===0JEq=0^pq=(ly^F/lC)@b100}^pq=0};}^vif^5^X[556]||l@zJ 6^@[557]){lC=0;for(i=0;i@u^M538^L5JBi++J*!iJ0^M538]][i]^F)){lC+=^M538]][i]^F}J(!iJ0ly^F)JEq=(ly^F/lC)@b100^pq=0};}};return {percent:l@q,total:lCJAnJ,^)704]^R@h,ly,l@z,lD,l@s^{I=/@e{.@b?@e}|"[@g"]@b"|@d[@g@d]@b@d/gJ\'kr=JI;l@s= typeof (l@s)=^m[161]?0:l@sJG^5][_^e^Y697J2||^5^X[556]||l@zJ 6^@[557]))&&(l@h[_^e^Y1026J2||l@h[_^e^Y1027J2)^{@q=^b26]J$C=^b27]J$zJ%JLfc=^I698]](l@z,ly);lC=fc^k701]]?fc^k701]]:lC;l@q=iJ0fc^k702]])?l@q:fc^k70JBdoJ+l@x=^t20J)^M1028]]JEx=^M1028]]^px=^b29]J\'k@l=^P[195]](^P[173]](^P[376]](1/^P[263]](l@q))/^P[929]]),2J.iJ0k@l)||!is@sinite(k@l)){k@l=2}^ol@j=0;l@j@uk@l;l@j++JEx+=^t172]JAl@h=l@h^V4^Y1026],@m(l@q,l@x,^d[363]]));l@h=l@h^V4^Y1027],@m(lC,^M1030]^30]^H]));}while(l@h[_^e^Y1026J2||l@h[_^e^Y1027J2);;}J$E=^jxJ*(cx[0^X[279]&&cx[cx[^D^X[279])||(cx[0^X[280]&&cx[cx[^D^X[280])){return cx^V7]](1,cx[^D)}J\'b@y=bn(cx^V7]](1,cx[^D));b@y=b@y^V4^Y1032],l@s)J\'dbJ%tryJ+cg=b@^c260]](/(.@b?)@es@b@e[@es@b(.@b?)@es@b@e]/J.cg&&cg^V2]]>0){db=bn(cg[2]);b@y=bn(cg[1]);};}catch(e){}J$@oJ%^6522^il^c522^Q6[522^K6[522]]?^M522^K6[523]][lD%^M523^L52]]]J(l^c506]](b@y)JEo=ly^}if(^M506]](b@y)JEo=l@z^G^t20]}}J\'kN=l@o[b@yJ)db!=J8){kN=kN[db]};^6170]J*^d[462]]&&^d[516^U636]^X[628^ix(^93^QJ-3^KJ-3]^33]]:^d[462]]&&^d[462^U877]]?^d[462^U877]]:^b34^:])^G@m(^93^QJ-3^KJ-3]^33]^H^:])}^}^6629^i@m(^90^QJ-0^KJ-0]^30]^H^:])^}^6264^i@m(^95^QJ-5^KJ-5]^35]^H^:])^GkN}}JAreturn l@h^V4]](lI,lE);};funcJM D(kr^;7JDkr;^I51JD0J\'c@v=JI;^/]=[]^>36]]=[]^>JCJ%^I507]]=t(^u^ 310]],^u^ 31JH;^I645]]=^I507^U0^Y304])J\'c@o=^jy){c@v^k672^-c@v,cy)};^!=[];}DJ,^)476]]^T^I51JD0;^/]=[]^>36]]=[]^>JCJ8^>3JD[J)T){^I645^U601]](0,0,^u^ 310]],^u^ 31JH;^I645^L63J/JADJ,^)1040]]^Treturn ++^I519]]};DJ,^)672]]=^jyJ*c^c351]]!^m[440]&&c^c351]]!^m[JJ^aJLlM=[]J\'er=M(cy)J\'d@pJ%d@p^n^ 643]](er[_$^[,er^F,J3J.d@p&& typeof (^/][d@p])!^m[161]^{@t=^/][d@pJ)^Z[982]^X[641])J+c@n^n^ 282]][^Z[846]^|gq=^N538]][^?^|ir=^?];^2]={x:er[_$^[,y:er^F^\\:gq^]:^NJ<^\\Index:ir^]J&^N524JPhar^g^ 389]]};^1]={cJ7t:gq,userCJ7t:gq,J;over^l496],J;move^l440^wut^l444],click^lJJ};lM^Bl@t);l@t=^/][^NJ1];^2]={x:er[_$^[,y:er^F^\\:gq^]:^NJ<^\\Index:ir^]J&^N524JPhar^g^ 389]]};^1]={cJ7t:c@n,userCJ7t:^N372]^wver^l496],J;move^l440^wut^l444],click^lJJ};lM^B^/][^NJ1])^vif(^Z[982]^X[845])J+c@n^n^ 282]][^Z[846]^|gq=^?]!=J8?^N538]][^?]]:null;^2]={x:er[_$^[,y:er^F^]:^NJ<^\\:gq^\\J&^?]^]J&^Z[846JPhar^g^ 389]]};^1]={cJ7^g^ 565]],userCJ7^g^ 565^U372]^wver:^b43],J;move:^b44^wut:^b45],click:^b46]};lM^Bl@t);}};}J$@y=[]^occ=0;cc@u^!^VJBcc++^{@v=true^odg=0;dg@ulM^VJBdg++J*lM[dg]^kJ1===^!JK^kJ1JEv=J3;break ;}J(l@v^;JC(^!JK,^t444J:^py^B^!JK)JA^!=l@y^occ=0;cc@ulM^VJBcc++^{N=J3^odg=0;dg@u^!^VJBdg++){ifJ#^kJ1===^![dg]^kJ1){lN=true;break ;}J(!lN^;JCJ#,^t496J:;^!^BlMJK);J(cyJ 6^@[JJ^;JCJ#,^t334J:^}if(cyJ 6^@[440]^;JCJ#,^t440J:}JA};DJ,^)337]^R@t,l@r,cyJ*!l@t|| !l@r^aJLcN=^2]J$@k=^1]J$S=^1][^b47]J)lS&&l@k&&lS[l@k[l@r]]){lS[l@k[l@r^-lS,cN)J(l@r!^m[444]J*lS^kJ6&&lS^kJ6!==c^c290^L90^UJ6){c^c290^L90^UJ6=lS^kJ6}^}c^c290^L90^UJ6^n^ 403]];delete ^2];delete ^1];J(l@r=^m[JJ&&^Z[982]^X[641]&&^u^ 51JH{^u^ 511^-^u^ 282]][^Z[846]JPN)JAfuncJM u(ml)J+bwJGml&&J?){bw=J?};u^k127^L26^-JI,^b48],bw);}@s(u,m);funcJM f(kr^;7JDkr;^I392]]^n^ 405^U39JBth^.=[];^4]J%}fJ,^)606]]=^qma,l@l,l@n,l@p,l@w)J+c@v=JI;^u^ 398]]=true;l@w=l@w||d^k715^U732]J)l@n){th^.^B{startTime:(J9Date())^k209J@+(ma?ma:0),duraJM:l@l,animaJMCallback:l@n,onComplete:l@p})}J$@i=[];while(th^.^V2]]>0^{T=th^.^k277J@J$@m=(J9Date())^k209J@J\'dm=0JGlT[^W0]]@u=l@m){dm=l@w(^P[630]]((l@m-lT[^W0]]),lT[^WJH,0,1,lT[^WJH;dm=^P[630]](dm,1J.iJ0dm)||!is@sinite(dm)){dm=1};J(dm@u1JEi^BlT)};lT^k604]](dmJ.dm>=1&&lT[^W2]]){lT[^W2J@JAth^.=l@iJGth^.^V2]]>0){^4]^n^ 779^-window,^q){c@v^k606^-c@v)})^}^u^ 398]]=J3JAfJ,^)510]]^Tth^.=[J)^4]){^u^ 513^-window,^4])};^4]J%^u^ 398]]=J3;}J\'d={yScale^E^7^+^%^(_b9J"^L^|mb=c@i[^W5^|gr=(mb-mb@bdm)^O[^\'b9^xJ!^f,0,gr^`^<0JF,dm@be@oJ ^<1JF);},xScale^E^7^+^%^(_b9J"^L^|mb=c@i[^W5^|hv=(mb-mb@bdm)^O[^\'b9^xJ!^f,hv,0,dm@be@oJ ^<0JF^`^<1JF);},xClip^E^7^+^%^(_b9J"^L]]^O[716J/if(dm>0^J[^\'b9^x@bdm,mc[_$_^f,0,0,mc^k310]]@bdm/z,mc[_$_^f/z)}^O[730J/},fadeIn^E^7^+^%^(_b9J"^L]]^O[716]]^$]=dm^O[^\'b9^xJ!^f,0,0^`^<0JF^`^<1JF)^O[730J/},easing:{linear^^^"meJN/mf^r@vutJSd^^^"-meJ>/=mf)J>-2)^r@vutJSr^S^"-me@b((mg=mg/mf-1)^zJN-1)^rInJSd^^^"meJ>/=mf)JN^rInJSr^S^"meJ>/=mf)^zJN+md}}}J\'bb={drawMarker:^jz,c@z,e@o,jt,dS,fu,jr,^ye@o^aJLJR1^O[15JDfu?fu^l16]^8]=jr?jr^l16]^C2]]=js?js:0;^A31]^J[164J4,c@z)^O^,76[753J4,c@z,JQ,0,^P[748]]@b2,J3J.fu^J[168J@J(^yjr){JRe^=;e^==0.15^8]=^t13];^0^$]=e@q^v^0()}}^v^A856]^J^,76[717^h^s,dS,dSJ.fu^J[168J@J(^yjr){JRe^=;e^==0.15^8]=^t13];^0^$]=e@q^v^0()}}^v^A857]^J^,J54^h^&9J55J4+JQ^&9J55J4^s)^C7J/if(fu^J[168J@J(^yjr){JRe^=;e^==0.15^8]=^t13];^0^$]=e@q^v^0()}}^C3J@^v^A1056]^J[160]]=fu;js=dS/4^C2]]=js^O^,J54^h^s)^C5J4+JQ^&9J59J@^C4J4+JQ^s)^C5^h^&9J59J/}}}};},drawMarkers:^qfw){for(JLcc=0;cc@ufw^VJBcc++)J+mh=fwJK;bb^k751]](mh[_$^[,mh^F,mh^k392]^_6[351]^_6[727]^_6[522]^_6[750]^_6[728]]);}}}J$={Char^Sj,cD)J+mi=J9n(mj,cD,JI);^I433]]^Tmi^k433]](^I1057]])}^>57]]=mi^k37JB},addColorSe^Sk,fo){o[mk]=fo},addCultureInfo^^k,bw){v[mk]=bw},formatNumber^^mJ=ml){ml=ml||^t6];b@q=b@q||^t928J)!J?){throw ^W8]^G@m(mmJ=J9u(ml))};},formatDate:^qbxJ=ml){ml=ml||^t6];b@q=b@q||^W9J)!J?){throw ^W8]^Gx(bxJ=J9u(ml))};}};l^k8^L060]]=^b61];window[^b62]]=l;})();~b976[379^U~^I1038]]~g,md,me,mf){return ~^+r~()^O[682]~r e@o=c@i^k1~,c@z+dS/2);e@oJ,~571]](mc,0,0J!~053^|mc=c@i[_$~976[125^U~^7m~m===0^ava~[163]]();e@oJ,9~^U204]](~is[^b49]]~^I722]~e@o^k169]]~^Z[1042]~^Z[1041]~]?^M103~^I512]~(^M351]~if(b@y=^m[~tion(dm,c@iJ*d~^C0]~kN,ly[^b3~],^d[363]~){^I3~6[1^U31~@o^k682]]~;^I10~^Z[644]~[351]^X~if(jt=^m[~^k274]](~^O[16~^t152]]-1~@znimaJM:func~^k629]]~^}return ~]:^b31~this^k~){e@oJ 6~]]:l@zJ ~^U1~l@z^k~c@n^k~;e@oJ 6~MathJ 6~]]?lyJ ~]=^ql~t^^~=^q){~]]^k~^k15~^b5~]=^m~]](^t~l@tJ 6~_b976[170]]~,data@yoint~,dataSeries~:^qm~],mhJ ~,e@oJ ~){return };~^t10~y^k~krJ 6~$_b976[175~b976[311]]~t:^u~J4-dS/2~]){return ~^qc~[^t~:^t~==_$_b976~=^u~;for(JL~^}l@~funcJM(~+md},ease~,c@z-JQ~_$_b976[~JI[_$_~;^}~],J;o~76[310]]~jsJ*!~JNJN~)J+l~]]J\'~}else {~J,97~,mc[_$_~76[1054~(lMJK~J\'l~J8;~Index:~;JL~}JG~]JG~){if(~{JL~[_$_b~6[103~)JG~J@;~sNaN(~647]]~])>=0~false~]](cz~76[16~424]]~ontex~=null~ new ~],cy)~mouse~372]]~,b@q,~@b(mg~v[ml]~]]()~};};~2]];~37]]~9]]=~){l@~]]/z~;if(~1]])~this~334]~[cc]~var ~tion~@bmg~846]~]],c~dS/2~e@q=~@kua')); \ No newline at end of file diff --git a/experiment/simulation/js/graph_use.ob.js b/experiment/simulation/js/graph_use.ob.js new file mode 100644 index 0000000..5562145 --- /dev/null +++ b/experiment/simulation/js/graph_use.ob.js @@ -0,0 +1 @@ +var _$_9348=["","top","center","bold","calibri","dimGrey","spline","Float","Chart","render"];function drawgraph(_0x95EF,_0x95BF,_0x961F,_0x964F){var _0x958F= new CanvasJS[_$_9348[8]](_0x95EF,{zoomEnabled:true,title:{text:_$_9348[0]},toolTip:{shared:false},legend:{verticalAlign:_$_9348[1],horizontalAlign:_$_9348[2],fontSize:14,fontWeight:_$_9348[3],fontFamily:_$_9348[4],fontColor:_$_9348[5]},axisX:{title:_0x961F},axisY:{title:_0x964F,includeZero:false},data:[{type:_$_9348[6],xValueType:_$_9348[7],showInLegend:false,name:_$_9348[0],markerSize:1,dataPoints:_0x95BF}]});_0x958F[_$_9348[9]]()} \ No newline at end of file diff --git a/experiment/simulation/js/jquery.knob.min.js b/experiment/simulation/js/jquery.knob.min.js new file mode 100644 index 0000000..1e8b8cd --- /dev/null +++ b/experiment/simulation/js/jquery.knob.min.js @@ -0,0 +1,438 @@ +(function (e) { + if (typeof define === "function" && define.amd) { + define(["jquery"], e) + } else { + e(jQuery) + } +})(function (e) { + "use strict"; + var t = {}, n = Math.max, r = Math.min; + t.c = {}; + t.c.d = e(document); + t.c.t = function (e) { + return e.originalEvent.touches.length - 1 + }; + t.o = function () { + var n = this; + this.o = null; + this.$ = null; + this.i = null; + this.g = null; + this.v = null; + this.cv = null; + this.x = 0; + this.y = 0; + this.w = 0; + this.h = 0; + this.$c = null; + this.c = null; + this.t = 0; + this.isInit = false; + this.fgColor = null; + this.pColor = null; + this.dH = null; + this.cH = null; + this.eH = null; + this.rH = null; + this.scale = 1; + this.relative = false; + this.relativeWidth = false; + this.relativeHeight = false; + this.$div = null; + this.run = function () { + var t = function (e, t) { + var r; + for (r in t) { + n.o[r] = t[r] + } + n._carve().init(); + n._configure()._draw() + }; + if (this.$.data("kontroled")) + return; + this.$.data("kontroled", true); + this.extend(); + this.o = e.extend({min: this.$.data("min") !== undefined ? this.$.data("min") : 0, max: this.$.data("max") !== undefined ? this.$.data("max") : 100, + stopper: true, readOnly: this.$.data("readonly") || this.$.attr("readonly") === "readonly", + cursor: this.$.data("cursor") === true && 30 || this.$.data("cursor") || 0, thickness: this.$.data("thickness") && Math.max(Math.min(this.$.data("thickness"), 1), .01) || .35, lineCap: this.$.data("linecap") || "butt", width: this.$.data("width") || 200, height: this.$.data("height") || 200, displayInput: this.$.data("displayinput") == null || this.$.data("displayinput"), displayPrevious: this.$.data("displayprevious"), fgColor: this.$.data("fgcolor") || "#87CEEB", inputColor: this.$.data("inputcolor"), font: this.$.data("font") || "Arial", fontWeight: this.$.data("font-weight") || "bold", inline: false, step: this.$.data("step") || 1, rotation: this.$.data("rotation"), draw: null, change: null, cancel: null, release: null, format: function (e) { + return e + }, parse: function (e) { + return parseFloat(e) + }}, this.o); + this.o.flip = this.o.rotation === "anticlockwise" || this.o.rotation === "acw"; + if (!this.o.inputColor) { + this.o.inputColor = this.o.fgColor + } + if (this.$.is("fieldset")) { + this.v = {}; + this.i = this.$.find("input"); + this.i.each(function (t) { + var r = e(this); + n.i[t] = r; + n.v[t] = n.o.parse(r.val()); + r.bind("change blur", function () { + var e = {}; + e[t] = r.val(); + n.val(n._validate(e)) + }) + }); + this.$.find("legend").remove() + } else { + this.i = this.$; + this.v = this.o.parse(this.$.val()); + this.v === "" && (this.v = this.o.min); + this.$.bind("change blur", function () { + n.val(n._validate(n.o.parse(n.$.val()))) + }) + } + !this.o.displayInput && this.$.hide(); + this.$c = e(document.createElement("canvas")).attr({width: this.o.width, height: this.o.height}); + this.$div = e('
'); + this.$.wrap(this.$div).before(this.$c); + this.$div = this.$.parent(); + if (typeof G_vmlCanvasManager !== "undefined") { + G_vmlCanvasManager.initElement(this.$c[0]) + } + this.c = this.$c[0].getContext ? this.$c[0].getContext("2d") : null; + if (!this.c) { + throw{name: "CanvasNotSupportedException", message: "Canvas not supported. Please use excanvas on IE8.0.", toString: function () { + return this.name + ": " + this.message + }} + } + this.scale = (window.devicePixelRatio || 1) / (this.c.webkitBackingStorePixelRatio || this.c.mozBackingStorePixelRatio || this.c.msBackingStorePixelRatio || this.c.oBackingStorePixelRatio || this.c.backingStorePixelRatio || 1); + this.relativeWidth = this.o.width % 1 !== 0 && this.o.width.indexOf("%"); + this.relativeHeight = this.o.height % 1 !== 0 && this.o.height.indexOf("%"); + this.relative = this.relativeWidth || this.relativeHeight; + this._carve(); + if (this.v instanceof Object) { + this.cv = {}; + this.copy(this.v, this.cv) + } else { + this.cv = this.v + } + this.$.bind("configure", t).parent().bind("configure", t); + this._listen()._configure()._xy().init(); + this.isInit = true; + this.$.val(this.o.format(this.v)); + this._draw(); + return this + }; + this._carve = function () { + if (this.relative) { + var e = this.relativeWidth ? this.$div.parent().width() * parseInt(this.o.width) / 100 : this.$div.parent().width(), t = this.relativeHeight ? this.$div.parent().height() * parseInt(this.o.height) / 100 : this.$div.parent().height(); + this.w = this.h = Math.min(e, t) + } else { + this.w = this.o.width; + this.h = this.o.height + } + this.$div.css({width: this.w + "px", height: this.h + "px"}); + this.$c.attr({width: this.w, height: this.h}); + if (this.scale !== 1) { + this.$c[0].width = this.$c[0].width * this.scale; + this.$c[0].height = this.$c[0].height * this.scale; + this.$c.width(this.w); + this.$c.height(this.h) + } + return this + }; + this._draw = function () { + var e = true; + n.g = n.c; + n.clear(); + n.dH && (e = n.dH()); + e !== false && n.draw() + }; + this._touch = function (e) { + var r = function (e) { + var t = n.xy2val(e.originalEvent.touches[n.t].pageX, e.originalEvent.touches[n.t].pageY); + if (t == n.cv) + return; + if (n.cH && n.cH(t) === false) + return; + n.change(n._validate(t)); + n._draw() + }; + this.t = t.c.t(e); + r(e); + t.c.d.bind("touchmove.k", r).bind("touchend.k", function () { + t.c.d.unbind("touchmove.k touchend.k"); + n.val(n.cv) + }); + return this + }; + this._mouse = function (e) { + var r = function (e) { + var t = n.xy2val(e.pageX, e.pageY); + if (t == n.cv) + return; + if (n.cH && n.cH(t) === false) + return; + n.change(n._validate(t)); + n._draw() + }; + r(e); + t.c.d.bind("mousemove.k", r).bind("keyup.k", function (e) { + if (e.keyCode === 27) { + t.c.d.unbind("mouseup.k mousemove.k keyup.k"); + if (n.eH && n.eH() === false) + return; + n.cancel() + } + }).bind("mouseup.k", function (e) { + t.c.d.unbind("mousemove.k mouseup.k keyup.k"); + n.val(n.cv) + }); + return this + }; + this._xy = function () { + var e = this.$c.offset(); + this.x = e.left; + this.y = e.top; + return this + }; + this._listen = function () { + if (!this.o.readOnly) { + this.$c.bind("mousedown", function (e) { + e.preventDefault(); + n._xy()._mouse(e) + }).bind("touchstart", function (e) { + e.preventDefault(); + n._xy()._touch(e) + }); + this.listen() + } else { + this.$.attr("readonly", "readonly") + } + if (this.relative) { + e(window).resize(function () { + n._carve().init(); + n._draw() + }) + } + return this + }; + this._configure = function () { + if (this.o.draw) + this.dH = this.o.draw; + if (this.o.change) + this.cH = this.o.change; + if (this.o.cancel) + this.eH = this.o.cancel; + if (this.o.release) + this.rH = this.o.release; + if (this.o.displayPrevious) { + this.pColor = this.h2rgba(this.o.fgColor, "0.4"); + this.fgColor = this.h2rgba(this.o.fgColor, "0.6") + } else { + this.fgColor = this.o.fgColor + } + return this + }; + this._clear = function () { + this.$c[0].width = this.$c[0].width + }; + this._validate = function (e) { + var t = ~~((e < 0 ? -.5 : .5) + e / this.o.step) * this.o.step; + return Math.round(t * 100) / 100 + }; + this.listen = function () { + }; + this.extend = function () { + }; + this.init = function () { + }; + this.change = function (e) { + }; + this.val = function (e) { + }; + this.xy2val = function (e, t) { + }; + this.draw = function () { + }; + this.clear = function () { + this._clear() + }; + this.h2rgba = function (e, t) { + var n; + e = e.substring(1, 7); + n = [parseInt(e.substring(0, 2), 16), parseInt(e.substring(2, 4), 16), parseInt(e.substring(4, 6), 16)]; + return"rgba(" + n[0] + "," + n[1] + "," + n[2] + "," + t + ")" + }; + this.copy = function (e, t) { + for (var n in e) { + t[n] = e[n] + } + } + }; + t.Dial = function () { + t.o.call(this); + this.startAngle = null; + this.xy = null; + this.radius = null; + this.lineWidth = null; + this.cursorExt = null; + this.w2 = null; + this.PI2 = 2 * Math.PI; + this.extend = function () { + this.o = e.extend({bgColor: this.$.data("bgcolor") || "#EEEEEE", angleOffset: this.$.data("angleoffset") || 0, angleArc: this.$.data("anglearc") || 360, inline: true}, this.o) + }; + this.val = function (e, t) { + if (null != e) { + e = this.o.parse(e); + if (t !== false && e != this.v && this.rH && this.rH(e) === false) { + return + } + this.cv = this.o.stopper ? n(r(e, this.o.max), this.o.min) : e; + this.v = this.cv; + this.$.val(this.o.format(this.v)); + this._draw() + } else { + return this.v + } + }; + this.xy2val = function (e, t) { + var i, s; + i = Math.atan2(e - (this.x + this.w2), -(t - this.y - this.w2)) - this.angleOffset; + if (this.o.flip) { + i = this.angleArc - i - this.PI2 + } + if (this.angleArc != this.PI2 && i < 0 && i > -.5) { + i = 0 + } else if (i < 0) { + i += this.PI2 + } + s = i * (this.o.max - this.o.min) / this.angleArc + this.o.min; + this.o.stopper && (s = n(r(s, this.o.max), this.o.min)); + return s + }; + this.listen = function () { + var t = this, i, s, o = function (e) { + e.preventDefault(); + var o = e.originalEvent, u = o.detail || o.wheelDeltaX, a = o.detail || o.wheelDeltaY, f = t._validate(t.o.parse(t.$.val())) + (u > 0 || a > 0 ? t.o.step : u < 0 || a < 0 ? -t.o.step : 0); + f = n(r(f, t.o.max), t.o.min); + t.val(f, false); + if (t.rH) { + clearTimeout(i); + i = setTimeout(function () { + t.rH(f); + i = null + }, 100); + if (!s) { + s = setTimeout(function () { + if (i) + t.rH(f); + s = null + }, 200) + } + } + }, u, a, f = 1, l = {37: -t.o.step, 38: t.o.step, 39: t.o.step, 40: -t.o.step}; + this.$.bind("keydown", function (i) { + var s = i.keyCode; + if (s >= 96 && s <= 105) { + s = i.keyCode = s - 48 + } + u = parseInt(String.fromCharCode(s)); + if (isNaN(u)) { + s !== 13 && s !== 8 && s !== 9 && s !== 189 && (s !== 190 || t.$.val().match(/\./)) && i.preventDefault(); + if (e.inArray(s, [37, 38, 39, 40]) > -1) { + i.preventDefault(); + var o = t.o.parse(t.$.val()) + l[s] * f; + t.o.stopper && (o = n(r(o, t.o.max), t.o.min)); + t.change(t._validate(o)); + t._draw(); + a = window.setTimeout(function () { + f *= 2 + }, 30) + } + } + }).bind("keyup", function (e) { + if (isNaN(u)) { + if (a) { + window.clearTimeout(a); + a = null; + f = 1; + t.val(t.$.val()) + } + } else { + t.$.val() > t.o.max && t.$.val(t.o.max) || t.$.val() < t.o.min && t.$.val(t.o.min) + } + }); + this.$c.bind("mousewheel DOMMouseScroll", o); + this.$.bind("mousewheel DOMMouseScroll", o) + }; + this.init = function () { + if (this.v < this.o.min || this.v > this.o.max) { + this.v = this.o.min + } + this.$.val(this.v); + this.w2 = this.w / 2; + this.cursorExt = this.o.cursor / 100; + this.xy = this.w2 * this.scale; + this.lineWidth = this.xy * this.o.thickness; + this.lineCap = this.o.lineCap; + this.radius = this.xy - this.lineWidth / 2; + this.o.angleOffset && (this.o.angleOffset = isNaN(this.o.angleOffset) ? 0 : this.o.angleOffset); + this.o.angleArc && (this.o.angleArc = isNaN(this.o.angleArc) ? this.PI2 : this.o.angleArc); + this.angleOffset = this.o.angleOffset * Math.PI / 180; + this.angleArc = this.o.angleArc * Math.PI / 180; + this.startAngle = 1.5 * Math.PI + this.angleOffset; + this.endAngle = 1.5 * Math.PI + this.angleOffset + this.angleArc; + var e = n(String(Math.abs(this.o.max)).length, String(Math.abs(this.o.min)).length, 2) + 2; + this.o.displayInput && this.i.css({width: (this.w / 2 + 4 >> 0) + "px", height: (this.w / 3 >> 0) + "px", position: "absolute", "vertical-align": "middle", "margin-top": (this.w / 3 >> 0) + "px", "margin-left": "-" + (this.w * 3 / 4 + 2 >> 0) + "px", border: 0, background: "none", font: this.o.fontWeight + " " + (this.w / e >> 0) + "px " + this.o.font, "text-align": "center", color: this.o.inputColor || this.o.fgColor, padding: "0px", "-webkit-appearance": "none"}) || this.i.css({width: "0px", visibility: "hidden"}) + }; + this.change = function (e) { + this.cv = e; + this.$.val(this.o.format(e)) + }; + this.angle = function (e) { + return(e - this.o.min) * this.angleArc / (this.o.max - this.o.min) + }; + this.arc = function (e) { + var t, n; + e = this.angle(e); + if (this.o.flip) { + t = this.endAngle + 1e-5; + n = t - e - 1e-5 + } else { + t = this.startAngle - 1e-5; + n = t + e + 1e-5 + } + this.o.cursor && (t = n - this.cursorExt) && (n = n + this.cursorExt); + return{s: t, e: n, d: this.o.flip && !this.o.cursor} + }; + this.draw = function () { + var e = this.g, t = this.arc(this.cv), n, r = 1; + e.lineWidth = this.lineWidth; + e.lineCap = this.lineCap; + if (this.o.bgColor !== "none") { + e.beginPath(); + e.strokeStyle = this.o.bgColor; + e.arc(this.xy, this.xy, this.radius, this.endAngle - 1e-5, this.startAngle + 1e-5, true); + e.stroke() + } + if (this.o.displayPrevious) { + n = this.arc(this.v); + e.beginPath(); + e.strokeStyle = this.pColor; + e.arc(this.xy, this.xy, this.radius, n.s, n.e, n.d); + e.stroke(); + r = this.cv == this.v + } + e.beginPath(); + e.strokeStyle = r ? this.o.fgColor : this.fgColor; + e.arc(this.xy, this.xy, this.radius, t.s, t.e, t.d); + e.stroke() + }; + this.cancel = function () { + this.val(this.v) + } + }; + e.fn.dial = e.fn.knob = function (n) { + return this.each(function () { + var r = new t.Dial; + r.o = n; + r.$ = e(this); + r.run() + }).parent() + } +}) diff --git a/experiment/simulation/js/jquery_files/jquery-1.7.1.min.js b/experiment/simulation/js/jquery_files/jquery-1.7.1.min.js new file mode 100644 index 0000000..b1b47b8 --- /dev/null +++ b/experiment/simulation/js/jquery_files/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); diff --git a/experiment/simulation/js/jquery_files/jquery.jqplot.min.js b/experiment/simulation/js/jquery_files/jquery.jqplot.min.js new file mode 100644 index 0000000..f1e8f4b --- /dev/null +++ b/experiment/simulation/js/jquery_files/jquery.jqplot.min.js @@ -0,0 +1,533 @@ + + +/** + * jqPlot + * Pure JavaScript plotting plugin using jQuery + * + * Version: 1.0.0r1095 + * + * Copyright (c) 2009-2011 Chris Leonello + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. + * + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: + * chris at jqplot dot com or see http://www.jqplot.com/info.php . + * + * If you are feeling kind and generous, consider supporting the project by + * making a donation at: http://www.jqplot.com/donate.php . + * + * sprintf functions contained in jqplot.sprintf.js by Ash Searle: + * + * version 2007.04.27 + * author Ash Searle + * http://hexmen.com/blog/2007/03/printf-sprintf/ + * http://hexmen.com/js/sprintf.js + * The author (Ash Searle) has placed this code in the public domain: + * "This code is unrestricted: you are free to use it however you like." + * + * included jsDate library by Chris Leonello: + * + * Copyright (c) 2010-2011 Chris Leonello + * + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can + * choose the license that best suits your project and use it accordingly. + * + * jsDate borrows many concepts and ideas from the Date Instance + * Methods by Ken Snyder along with some parts of Ken's actual code. + * + * Ken's origianl Date Instance Methods and copyright notice: + * + * Ken Snyder (ken d snyder at gmail dot com) + * 2008-09-10 + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) + * + * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. + * Larry has generously given permission to adapt his code for inclusion + * into jqPlot. + * + * Larry's original code can be found here: + * + * https://github.com/lsiden/export-jqplot-to-png + * + * + */ +(function(H){ +var r; H.fn.emptyForce = function(){ +for (var ab = 0, ac; (ac = H(this)[ab]) != null; ab++){ +if (ac.nodeType === 1){H.cleanData(ac.getElementsByTagName("*"))} +if (H.jqplot.use_excanvas){ac.outerHTML = ""} +else{ +while (ac.firstChild){ac.removeChild(ac.firstChild)}}ac = null +}return H(this)}; + H.fn.removeChildForce = function(ab){ + while (ab.firstChild){ + this.removeChildForce(ab.firstChild); ab.removeChild(ab.firstChild)}}; + H.fn.jqplot = function(){ + var ab = []; var ad = []; + for (var ae = 0, ac = arguments.length; ae < ac; ae++){ + if (H.isArray(arguments[ae])){ab.push(arguments[ae])} + else{ + if (H.isPlainObject(arguments[ae])){ + ad.push(arguments[ae])}}} + return this.each(function(ah){ + var am, al, ak = H(this), ag = ab.length, af = ad.length, aj, ai; + if (ah < ag){aj = ab[ah]} + else{aj = ag?ab[ag - 1]:null} + if (ah < af){ai = ad[ah]} + else{ai = af?ad[af - 1]:null}am = ak.attr("id"); + if (am === r){am = "jqplot_target_" + H.jqplot.targetCounter++; ak.attr("id", am)}al = H.jqplot(am, aj, ai); ak.data("jqplot", al)})}; + H.jqplot = function(ah, ae, ac){var ad = null, ab = null; + if (arguments.length === 3){ad = ae; ab = ac} + else{ + if (arguments.length === 2){ + if (H.isArray(ae)){ad = ae} + else{if + (H.isPlainObject(ae)){ab = ae}}}} + if (ad === null && ab !== null && ab.data){ad = ab.data} + var ag = new N(); H("#" + ah).removeClass("jqplot-error"); + if (H.jqplot.config.catchErrors){ + try{ag.init(ah, ad, ab); ag.draw(); + ag.themeEngine.init.call(ag); + return ag} catch (af){ + var ai = H.jqplot.config.errorMessage || af.message; H("#" + ah).append('
' + ai + "
"); + H("#" + ah).addClass("jqplot-error"); + document.getElementById(ah).style.background = H.jqplot.config.errorBackground; + document.getElementById(ah).style.border = H.jqplot.config.errorBorder; + document.getElementById(ah).style.fontFamily = H.jqplot.config.errorFontFamily; + document.getElementById(ah).style.fontSize = H.jqplot.config.errorFontSize; + document.getElementById(ah).style.fontStyle = H.jqplot.config.errorFontStyle; + document.getElementById(ah).style.fontWeight = H.jqplot.config.errorFontWeight}} + else{ag.init(ah, ad, ab); + ag.draw(); + ag.themeEngine.init.call(ag); + return ag}}; H.jqplot.version = "1.0.0"; + H.jqplot.revision = "1095"; + H.jqplot.targetCounter = 1; + H.jqplot.CanvasManager = function(){ + if (typeof H.jqplot.CanvasManager.canvases == "undefined"){ + H.jqplot.CanvasManager.canvases = []; H.jqplot.CanvasManager.free = []} + var ab = []; + this.getCanvas = function(){ + var ae; + var ad = true; if (!H.jqplot.use_excanvas){ + for (var af = 0, ac = H.jqplot.CanvasManager.canvases.length; af < ac; af++){ + if (H.jqplot.CanvasManager.free[af] === true){ + ad = false; + ae = H.jqplot.CanvasManager.canvases[af]; + H.jqplot.CanvasManager.free[af] = false; + ab.push(af); + break}}}if (ad){ae = document.createElement("canvas"); + ab.push(H.jqplot.CanvasManager.canvases.length); H.jqplot.CanvasManager.canvases.push(ae); H.jqplot.CanvasManager.free.push(false)} + return ae}; + this.initCanvas = function(ac){ + if (H.jqplot.use_excanvas){ + return window.G_vmlCanvasManager.initElement(ac)} + return ac}; + this.freeAllCanvases = function(){ + for (var ad = 0, ac = ab.length; ad < ac; ad++){ + this.freeCanvas(ab[ad]) + }ab = []}; + this.freeCanvas = function(ac){ + if (H.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== r){ + window.G_vmlCanvasManager.uninitElement(H.jqplot.CanvasManager.canvases[ac]); + H.jqplot.CanvasManager.canvases[ac] = null} + else{var ad = H.jqplot.CanvasManager.canvases[ac]; + ad.getContext("2d").clearRect(0, 0, ad.width, ad.height); + H(ad).unbind().removeAttr("class").removeAttr("style"); + H(ad).css({left:"", top:"", position:""}); ad.width = 0; ad.height = 0; + H.jqplot.CanvasManager.free[ac] = true}}}; + H.jqplot.log = function(){ + if (window.console){window.console.log.apply(window.console, arguments)}}; + H.jqplot.config = { + addDomReference:false, enablePlugins:false, defaultHeight:300, + defaultWidth:400, UTCAdjust:false, + timezoneOffset:new Date(new Date().getTimezoneOffset() * 60000), + errorMessage:"", errorBackground:"", errorBorder:"", errorFontFamily:"", + errorFontSize:"", errorFontStyle:"", errorFontWeight:"", catchErrors:false, defaultTickFormatString:"%.1f", + defaultColors:["#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", + "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"], + defaultNegativeColors:["#498991", "#C08840", "#9F9274", "#546D61", "#646C4A", + "#6F6621", "#6E3F5F", "#4F64B0", "#A89050", "#C45923", "#187399", "#945381", "#959E5C", "#C7AF7B", "#478396", "#907294"], + dashLength:4, gapLength:4, dotGapLength:2.5, srcLocation:"jqplot/src/", pluginLocation:"jqplot/src/plugins/"}; + H.jqplot.arrayMax = function(ab){return Math.max.apply(Math, ab)}; + H.jqplot.arrayMin = function(ab){ + return Math.min.apply(Math, ab)}; + H.jqplot.enablePlugins = H.jqplot.config.enablePlugins; + H.jqplot.support_canvas = function(){ + if (typeof H.jqplot.support_canvas.result == "undefined"){ + H.jqplot.support_canvas.result = !!document.createElement("canvas").getContext} + return H.jqplot.support_canvas.result}; + H.jqplot.support_canvas_text = function(){ + if (typeof H.jqplot.support_canvas_text.result == "undefined"){ + if (window.G_vmlCanvasManager !== r && window.G_vmlCanvasManager._version > 887){ + H.jqplot.support_canvas_text.result = true + } else{ + H.jqplot.support_canvas_text.result = !!(document.createElement("canvas").getContext && typeof document.createElement("canvas").getContext("2d").fillText == "function")}} + return H.jqplot.support_canvas_text.result}; + H.jqplot.use_excanvas = (H.browser.msie && !H.jqplot.support_canvas())?true:false; + H.jqplot.preInitHooks = []; + H.jqplot.postInitHooks = []; + H.jqplot.preParseOptionsHooks = []; + H.jqplot.postParseOptionsHooks = []; + H.jqplot.preDrawHooks = []; + H.jqplot.postDrawHooks = []; + H.jqplot.preDrawSeriesHooks = []; + H.jqplot.postDrawSeriesHooks = []; + H.jqplot.preDrawLegendHooks = []; + H.jqplot.addLegendRowHooks = []; + H.jqplot.preSeriesInitHooks = []; + H.jqplot.postSeriesInitHooks = []; + H.jqplot.preParseSeriesOptionsHooks = []; + H.jqplot.postParseSeriesOptionsHooks = []; + H.jqplot.eventListenerHooks = []; + H.jqplot.preDrawSeriesShadowHooks = []; + H.jqplot.postDrawSeriesShadowHooks = []; + H.jqplot.ElemContainer = function(){ + this._elem; + this._plotWidth; + this._plotHeight; + this._plotDimensions = {height:null, width:null}}; + H.jqplot.ElemContainer.prototype.createElement = function(ae, ag, ac, ad, ah){ + this._offsets = ag; var ab = ac || "jqplot"; + var af = document.createElement(ae); + this._elem = H(af); + this._elem.addClass(ab); + this._elem.css(ad); + this._elem.attr(ah); + af = null; + return this._elem}; H.jqplot.ElemContainer.prototype.getWidth = function(){ +if (this._elem){return this._elem.outerWidth(true)} else{return null}}; + H.jqplot.ElemContainer.prototype.getHeight = function(){if (this._elem){ + return this._elem.outerHeight(true)} else{return null}}; + H.jqplot.ElemContainer.prototype.getPosition = function(){if (this._elem){return this._elem.position()} + else{return{top:null, left:null, bottom:null, right:null}}}; + H.jqplot.ElemContainer.prototype.getTop = function(){ + return this.getPosition().top}; + H.jqplot.ElemContainer.prototype.getLeft = function(){return this.getPosition().left}; + H.jqplot.ElemContainer.prototype.getBottom = function(){return this._elem.css("bottom")}; + H.jqplot.ElemContainer.prototype.getRight = function(){return this._elem.css("right")}; + function s(ab){H.jqplot.ElemContainer.call(this); this.name = ab; this._series = []; this.show = false; + this.tickRenderer = H.jqplot.AxisTickRenderer; + this.tickOptions = {}; + this.labelRenderer = H.jqplot.AxisLabelRenderer; + this.labelOptions = {}; + this.label = null; this.showLabel = true; this.min = null; + this.max = null; this.autoscale = false; + this.pad = 1.2; + this.padMax = null; + this.padMin = null; + this.ticks = []; + this.numberTicks; this.tickInterval; + this.renderer = H.jqplot.LinearAxisRenderer; + this.rendererOptions = {}; + this.showTicks = true; + this.showTickMarks = true; + this.showMinorTicks = true; + this.drawMajorGridlines = true; + this.drawMinorGridlines = false; + this.drawMajorTickMarks = true; + this.drawMinorTickMarks = true; + this.useSeriesColor = false; this.borderWidth = null; this.borderColor = null; + this.scaleToHiddenSeries = false; + this._dataBounds = {min:null, max:null}; this._intervalStats = []; this._offsets = {min:null, max:null}; this._ticks = []; this._label = null; + this.syncTicks = null; this.tickSpacing = 75; this._min = null; this._max = null; this._tickInterval = null; this._numberTicks = null; + this.__ticks = null; this._options = {}}s.prototype = new H.jqplot.ElemContainer(); s.prototype.constructor = s; + s.prototype.init = function(){if (H.isFunction(this.renderer)){this.renderer = new this.renderer()}this.tickOptions.axis = this.name; + if (this.tickOptions.showMark == null){this.tickOptions.showMark = this.showTicks} + if (this.tickOptions.showMark == null){ + this.tickOptions.showMark = this.showTickMarks}if (this.tickOptions.showLabel == null){this.tickOptions.showLabel = this.showTicks} + if (this.label == null || this.label == ""){this.showLabel = false} else{this.labelOptions.label = this.label} + if (this.showLabel == false){this.labelOptions.show = false}if (this.pad == 0){this.pad = 1}if (this.padMax == 0){this.padMax = 1} + if (this.padMin == 0){this.padMin = 1}if (this.padMax == null){this.padMax = (this.pad - 1) / 2 + 1} + if (this.padMin == null){this.padMin = (this.pad - 1) / 2 + 1}this.pad = this.padMax + this.padMin - 1; + if (this.min != null || this.max != null){this.autoscale = false} + if (this.syncTicks == null && this.name.indexOf("y") > - 1){this.syncTicks = true} else{if (this.syncTicks == null){ + this.syncTicks = false}}this.renderer.init.call(this, this.rendererOptions)}; + s.prototype.draw = function(ab, ac){if (this.__ticks){ + this.__ticks = null}return this.renderer.draw.call(this, ab, ac)}; s.prototype.set = function(){ +this.renderer.set.call(this)}; s.prototype.pack = function(ac, ab){ +if (this.show){this.renderer.pack.call(this, ac, ab)}if (this._min == null){this._min = this.min; this._max = this.max; + this._tickInterval = this.tickInterval; this._numberTicks = this.numberTicks; + this.__ticks = this._ticks}}; + s.prototype.reset = function(){this.renderer.reset.call(this)}; + s.prototype.resetScale = function(ab){ + H.extend(true, this, {min:null, max:null, numberTicks:null, tickInterval:null, _ticks:[], ticks:[]}, ab); + this.resetDataBounds()}; s.prototype.resetDataBounds = function(){var ai = this._dataBounds; ai.min = null; ai.max = null; + var ac, aj, ag; var ad = (this.show)?true:false; for (var af = 0; af < this._series.length; af++){aj = this._series[af]; + if (aj.show || this.scaleToHiddenSeries){ag = aj._plotData; + if (aj._type === "line" && aj.renderer.bands.show && this.name.charAt(0) !== "x"){ +ag = [[0, aj.renderer.bands._min], [1, aj.renderer.bands._max]]}var ab = 1, ah = 1; + if (aj._type != null && aj._type == "ohlc"){ab = 3; ah = 2} +for (var ae = 0, ac = ag.length; ae < ac; ae++){ +if (this.name == "xaxis" || this.name == "x2axis"){ +if ((ag[ae][0] != null && ag[ae][0] < ai.min) || ai.min == null){ +ai.min = ag[ae][0]}if ((ag[ae][0] != null && ag[ae][0] > ai.max) || ai.max == null){ai.max = ag[ae][0]}} +else{if ((ag[ae][ab] != null && ag[ae][ab] < ai.min) || ai.min == null){ai.min = ag[ae][ab]} +if ((ag[ae][ah] != null && ag[ae][ah] > ai.max) || ai.max == null){ai.max = ag[ae][ah]}}} +if (ad && aj.renderer.constructor !== H.jqplot.BarRenderer){ad = false} +else{if (ad && this._options.hasOwnProperty("forceTickAt0") && this._options.forceTickAt0 == false){ +ad = false} else{if (ad && aj.renderer.constructor === H.jqplot.BarRenderer){ +if (aj.barDirection == "vertical" && this.name != "xaxis" && this.name != "x2axis"){ +if (this._options.pad != null || this._options.padMin != null){ad = false}} +else{if (aj.barDirection == "horizontal" && (this.name == "xaxis" || this.name == "x2axis")){ +if (this._options.pad != null || this._options.padMin != null){ad = false}}}}}}}} +if (ad && this.renderer.constructor === H.jqplot.LinearAxisRenderer && ai.min >= 0){this.padMin = 1; + this.forceTickAt0 = true}}; + function n(ab){H.jqplot.ElemContainer.call(this); this.show = false; this.location = "ne"; this.labels = []; + this.showLabels = true; this.showSwatches = true; this.placement = "insideGrid"; this.xoffset = 0; this.yoffset = 0; + this.border; this.background; this.textColor; this.fontFamily; this.fontSize; this.rowSpacing = "0.5em"; + this.renderer = H.jqplot.TableLegendRenderer; this.rendererOptions = {}; this.preDraw = false; this.marginTop = null; + this.marginRight = null; this.marginBottom = null; this.marginLeft = null; this.escapeHtml = false; this._series = []; + H.extend(true, this, ab)}n.prototype = new H.jqplot.ElemContainer(); n.prototype.constructor = n; + n.prototype.setOptions = function(ab){ + H.extend(true, this, ab); + if (this.placement == "inside"){this.placement = "insideGrid"}if (this.xoffset > 0){ + if (this.placement == "insideGrid"){ + switch (this.location){case"nw":case"w":case"sw":if (this.marginLeft == null){ + this.marginLeft = this.xoffset + "px"}this.marginRight = "0px"; break; + case"ne":case"e":case"se":default:if (this.marginRight == null){this.marginRight = this.xoffset + "px"}this.marginLeft = "0px"; break}} + else{if (this.placement == "outside"){ + switch (this.location){case"nw":case"w":case"sw":if (this.marginRight == null){this.marginRight = this.xoffset + "px"} + this.marginLeft = "0px"; break; case"ne":case"e":case"se":default:if (this.marginLeft == null){ + this.marginLeft = this.xoffset + "px"}this.marginRight = "0px"; break}}} + this.xoffset = 0}if (this.yoffset > 0){if (this.placement == "outside"){switch (this.location){ + case"sw":case"s":case"se":if (this.marginTop == null){this.marginTop = this.yoffset + "px"} + this.marginBottom = "0px"; break; case"ne":case"n":case"nw":default:if (this.marginBottom == null){ + this.marginBottom = this.yoffset + "px"}this.marginTop = "0px"; break}} + else{if (this.placement == "insideGrid"){switch (this.location){case"sw":case"s":case"se":if (this.marginBottom == null){ + this.marginBottom = this.yoffset + "px"}this.marginTop = "0px"; break; case"ne":case"n":case"nw":default:if (this.marginTop == null){ + this.marginTop = this.yoffset + "px"}this.marginBottom = "0px"; break}}}this.yoffset = 0}}; + n.prototype.init = function(){if (H.isFunction(this.renderer)){ + this.renderer = new this.renderer()}this.renderer.init.call(this, this.rendererOptions)}; + n.prototype.draw = function(ac, ad){for (var ab = 0; ab < H.jqplot.preDrawLegendHooks.length; ab++){H.jqplot.preDrawLegendHooks[ab].call(this, ac)} + return this.renderer.draw.call(this, ac, ad)}; n.prototype.pack = function(ab){this.renderer.pack.call(this, ab)}; + function u(ab){H.jqplot.ElemContainer.call(this); this.text = ab; this.show = true; this.fontFamily; this.fontSize; this.textAlign; + this.textColor; this.renderer = H.jqplot.DivTitleRenderer; this.rendererOptions = {}; + this.escapeHtml = false}u.prototype = new H.jqplot.ElemContainer(); u.prototype.constructor = u; + u.prototype.init = function(){if (H.isFunction(this.renderer)){this.renderer = new this.renderer()}this.renderer.init.call(this, this.rendererOptions)}; + u.prototype.draw = function(ab){return this.renderer.draw.call(this, ab)}; u.prototype.pack = function(){this.renderer.pack.call(this)}; + function O(){H.jqplot.ElemContainer.call(this); this.show = true; this.xaxis = "xaxis"; this._xaxis; this.yaxis = "yaxis"; this._yaxis; + this.gridBorderWidth = 2; this.renderer = H.jqplot.LineRenderer; this.rendererOptions = {}; this.data = []; this.gridData = []; + this.label = ""; this.showLabel = true; this.color; this.negativeColor; this.lineWidth = 2.5; this.lineJoin = "round"; + this.lineCap = "round"; this.linePattern = "solid"; this.shadow = true; this.shadowAngle = 45; this.shadowOffset = 1.25; + this.shadowDepth = 3; this.shadowAlpha = "0.1"; this.breakOnNull = false; this.markerRenderer = H.jqplot.MarkerRenderer; + this.markerOptions = {}; this.showLine = true; this.showMarker = true; this.index; this.fill = false; this.fillColor; + this.fillAlpha; this.fillAndStroke = false; this.disableStack = false; this._stack = false; this.neighborThreshold = 4; + this.fillToZero = false; this.fillToValue = 0; this.fillAxis = "y"; this.useNegativeColors = true; this._stackData = []; + this._plotData = []; this._plotValues = {x:[], y:[]}; this._intervals = {x:{}, y:{}}; this._prevPlotData = []; this._prevGridData = []; + this._stackAxis = "y"; this._primaryAxis = "_xaxis"; this.canvas = new H.jqplot.GenericCanvas(); + this.shadowCanvas = new H.jqplot.GenericCanvas(); this.plugins = {}; this._sumy = 0; this._sumx = 0; this._type = ""} +O.prototype = new H.jqplot.ElemContainer(); O.prototype.constructor = O; + O.prototype.init = function(ad, ah, af){ + this.index = ad; this.gridBorderWidth = ah; var ag = this.data; var ac = [], ae; + for (ae = 0; ae < ag.length; ae++){if (!this.breakOnNull){if (ag[ae] == null || ag[ae][0] == null || ag[ae][1] == null){continue} + else{ac.push(ag[ae])}} else{ac.push(ag[ae])}}this.data = ac; if (!this.color){this.color = af.colorGenerator.get(this.index)} + if (!this.negativeColor){this.negativeColor = af.negativeColorGenerator.get(this.index)}if (!this.fillColor){this.fillColor = this.color} + if (this.fillAlpha){var ab = H.jqplot.normalize2rgb(this.fillColor); var ab = H.jqplot.getColorComponents(ab); + this.fillColor = "rgba(" + ab[0] + "," + ab[1] + "," + ab[2] + "," + this.fillAlpha + ")"} + if (H.isFunction(this.renderer)){this.renderer = new this.renderer()}this.renderer.init.call(this, this.rendererOptions, af); + this.markerRenderer = new this.markerRenderer(); + if (!this.markerOptions.color){this.markerOptions.color = this.color} + if (this.markerOptions.show == null){ + this.markerOptions.show = this.showMarker}this.showMarker = this.markerOptions.show; + this.markerRenderer.init(this.markerOptions)}; + O.prototype.draw = function(ah, ae, ag){var ac = (ae == r)?{}:ae; ah = (ah == r)?this.canvas._ctx:ah; + var ab, af, ad; for (ab = 0; ab < H.jqplot.preDrawSeriesHooks.length; ab++){H.jqplot.preDrawSeriesHooks[ab].call(this, ah, ac)} + if (this.show){this.renderer.setGridData.call(this, ag); + if (!ac.preventJqPlotSeriesDrawTrigger){H(ah.canvas).trigger("jqplotSeriesDraw", [this.data, this.gridData])}af = []; + if (ac.data){af = ac.data} else{if (!this._stack){af = this.data} + else{af = this._plotData}}ad = ac.gridData || this.renderer.makeGridData.call(this, af, ag); + if (this._type === "line" && this.renderer.smooth && this.renderer._smoothedData.length){ad = this.renderer._smoothedData} + this.renderer.draw.call(this, ah, ad, ac, ag)}for (ab = 0; ab < H.jqplot.postDrawSeriesHooks.length; ab++) + {H.jqplot.postDrawSeriesHooks[ab].call(this, ah, ac, ag)}ah = ae = ag = ab = af = ad = null}; + O.prototype.drawShadow = function(ah, ae, ag){var ac = (ae == r)?{}:ae; ah = (ah == r)?this.shadowCanvas._ctx:ah; + var ab, af, ad; for (ab = 0; ab < H.jqplot.preDrawSeriesShadowHooks.length; ab++){ + H.jqplot.preDrawSeriesShadowHooks[ab].call(this, ah, ac)} + if (this.shadow){this.renderer.setGridData.call(this, ag); af = []; + if (ac.data){af = ac.data} else{if (!this._stack){af = this.data} + else{af = this._plotData}}ad = ac.gridData || this.renderer.makeGridData.call(this, af, ag); + this.renderer.drawShadow.call(this, ah, ad, ac)}for (ab = 0; ab < H.jqplot.postDrawSeriesShadowHooks.length; ab++){ + H.jqplot.postDrawSeriesShadowHooks[ab].call(this, ah, ac)}ah = ae = ag = ab = af = ad = null}; + O.prototype.toggleDisplay = function(ac, ae){var ab, ad; if (ac.data.series){ab = ac.data.series} + else{ab = this} + if (ac.data.speed){ad = ac.data.speed}if (ad){if (ab.canvas._elem.is(":hidden") || !ab.show){ab.show = true; + ab.canvas._elem.removeClass("jqplot-series-hidden"); + if (ab.shadowCanvas._elem){ab.shadowCanvas._elem.fadeIn(ad)}ab.canvas._elem.fadeIn(ad, ae); + ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-" + ab.index).fadeIn(ad)} + else{ab.show = false; ab.canvas._elem.addClass("jqplot-series-hidden"); + if (ab.shadowCanvas._elem){ab.shadowCanvas._elem.fadeOut(ad)}ab.canvas._elem.fadeOut(ad, ae); + ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-" + ab.index).fadeOut(ad)}} + else{if (ab.canvas._elem.is(":hidden") || !ab.show){ab.show = true; + ab.canvas._elem.removeClass("jqplot-series-hidden"); + if (ab.shadowCanvas._elem){ab.shadowCanvas._elem.show()}ab.canvas._elem.show(0, ae); + ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-" + ab.index).show()} + else{ab.show = false; ab.canvas._elem.addClass("jqplot-series-hidden"); + if (ab.shadowCanvas._elem){ab.shadowCanvas._elem.hide()}ab.canvas._elem.hide(0, ae); + ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-" + ab.index).hide()}}}; + function I(){H.jqplot.ElemContainer.call(this); this.drawGridlines = true; this.gridLineColor = "#cccccc"; + this.gridLineWidth = 1; this.background = "#fffdf6"; this.borderColor = "#999999"; + this.borderWidth = 2; this.drawBorder = true; this.shadow = true; this.shadowAngle = 45; this.shadowOffset = 1.5; + this.shadowWidth = 3; + this.shadowDepth = 3; this.shadowColor = null; this.shadowAlpha = "0.07"; this._left; this._top; + this._right; this._bottom; this._width; this._height; this._axes = []; + this.renderer = H.jqplot.CanvasGridRenderer; + this.rendererOptions = {}; this._offsets = {top:null, bottom:null, left:null, right:null}}I.prototype = new H.jqplot.ElemContainer(); + I.prototype.constructor = I; I.prototype.init = function(){if (H.isFunction(this.renderer)){ + this.renderer = new this.renderer()}this.renderer.init.call(this, this.rendererOptions)}; + I.prototype.createElement = function(ab, ac){this._offsets = ab; + return this.renderer.createElement.call(this, ac)}; + I.prototype.draw = function(){this.renderer.draw.call(this)}; + H.jqplot.GenericCanvas = function(){H.jqplot.ElemContainer.call(this); this._ctx}; + H.jqplot.GenericCanvas.prototype = new H.jqplot.ElemContainer(); + H.jqplot.GenericCanvas.prototype.constructor = H.jqplot.GenericCanvas; + H.jqplot.GenericCanvas.prototype.createElement = function(af, ad, ac, ag){this._offsets = af; var ab = "jqplot"; + if (ad != r){ab = ad}var ae; ae = ag.canvasManager.getCanvas(); + if (ac != null){this._plotDimensions = ac}ae.width = this._plotDimensions.width - this._offsets.left - this._offsets.right; + ae.height = this._plotDimensions.height - this._offsets.top - this._offsets.bottom; this._elem = H(ae); + this._elem.css({position:"absolute", left:this._offsets.left, top:this._offsets.top}); + this._elem.addClass(ab); ae = ag.canvasManager.initCanvas(ae); ae = null; return this._elem}; + H.jqplot.GenericCanvas.prototype.setContext = function(){this._ctx = this._elem.get(0).getContext("2d"); + return this._ctx}; H.jqplot.GenericCanvas.prototype.resetCanvas = function(){if (this._elem){ +if (H.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== r){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))} +this._elem.emptyForce()}this._ctx = null}; + H.jqplot.HooksManager = function(){this.hooks = []; this.args = []}; + H.jqplot.HooksManager.prototype.addOnce = function(ae, ac){ac = ac || []; + var af = false; for (var ad = 0, ab = this.hooks.length; ad < ab; ad++){ + if (this.hooks[ad] == ae){af = true}}if (!af){this.hooks.push(ae); + this.args.push(ac)}}; H.jqplot.HooksManager.prototype.add = function(ac, ab){ab = ab || []; + this.hooks.push(ac); this.args.push(ab)}; H.jqplot.EventListenerManager = function(){this.hooks = []}; + H.jqplot.EventListenerManager.prototype.addOnce = function(af, ae){var ag = false, ad, ac; + for (var ac = 0, ab = this.hooks.length; ac < ab; ac++){ad = this.hooks[ac]; + if (ad[0] == af && ad[1] == ae){ag = true}}if (!ag){this.hooks.push([af, ae])}}; + H.jqplot.EventListenerManager.prototype.add = function(ac, ab){this.hooks.push([ac, ab])}; + var Q = ["yMidAxis", "xaxis", "yaxis", "x2axis", "y2axis", "y3axis", "y4axis", "y5axis", "y6axis", "y7axis", "y8axis", "y9axis"]; + function N(){this.animate = false; + this.animateReplot = false; + this.axes = {xaxis:new s("xaxis"), yaxis:new s("yaxis"), x2axis:new s("x2axis"), + y2axis:new s("y2axis"), y3axis:new s("y3axis"), y4axis:new s("y4axis"), + y5axis:new s("y5axis"), y6axis:new s("y6axis"), y7axis:new s("y7axis"), + y8axis:new s("y8axis"), y9axis:new s("y9axis"), yMidAxis:new s("yMidAxis")}; + this.baseCanvas = new H.jqplot.GenericCanvas(); this.captureRightClick = false; + this.data = []; + this.dataRenderer; this.dataRendererOptions; + this.defaults = {axesDefaults:{}, axes:{xaxis:{}, yaxis:{}, x2axis:{}, y2axis:{}, y3axis:{}, y4axis:{}, + y5axis:{}, y6axis:{}, y7axis:{}, y8axis:{}, + y9axis:{}, yMidAxis:{}}, seriesDefaults:{}, series:[]}; + this.defaultAxisStart = 1; this.drawIfHidden = false; this.eventCanvas = new H.jqplot.GenericCanvas(); + this.fillBetween = {series1:null, series2:null, color:null, baseSeries:0, fill:true}; this.fontFamily; + this.fontSize; this.grid = new I(); this.legend = new n(); + this.negativeSeriesColors = H.jqplot.config.defaultNegativeColors; + this.noDataIndicator = {show:false, indicator:"Loading Data...", axes:{xaxis:{min:0, max:10, tickInterval:2, show:true}, + yaxis:{min:0, max:12, tickInterval:3, show:true}}}; + this.options = {}; this.previousSeriesStack = []; this.plugins = {}; this.series = []; + this.seriesStack = []; this.seriesColors = H.jqplot.config.defaultColors; this.sortData = true; + this.stackSeries = false; this.syncXTicks = true; this.syncYTicks = true; this.target = null; this.targetId = null; + this.textColor; this.title = new u(); this._drawCount = 0; this._sumy = 0; this._sumx = 0; this._stackData = []; this._plotData = []; + this._width = null; this._height = null; this._plotDimensions = {height:null, width:null}; + this._gridPadding = {top:null, right:null, bottom:null, left:null}; + this._defaultGridPadding = {top:10, right:10, bottom:23, left:10}; + this._addDomReference = H.jqplot.config.addDomReference; this.preInitHooks = new H.jqplot.HooksManager(); + this.postInitHooks = new H.jqplot.HooksManager(); this.preParseOptionsHooks = new H.jqplot.HooksManager(); + this.postParseOptionsHooks = new H.jqplot.HooksManager(); this.preDrawHooks = new H.jqplot.HooksManager(); + this.postDrawHooks = new H.jqplot.HooksManager(); this.preDrawSeriesHooks = new H.jqplot.HooksManager(); + this.postDrawSeriesHooks = new H.jqplot.HooksManager(); this.preDrawLegendHooks = new H.jqplot.HooksManager(); + this.addLegendRowHooks = new H.jqplot.HooksManager(); this.preSeriesInitHooks = new H.jqplot.HooksManager(); + this.postSeriesInitHooks = new H.jqplot.HooksManager(); this.preParseSeriesOptionsHooks = new H.jqplot.HooksManager(); + this.postParseSeriesOptionsHooks = new H.jqplot.HooksManager(); this.eventListenerHooks = new H.jqplot.EventListenerManager(); + this.preDrawSeriesShadowHooks = new H.jqplot.HooksManager(); this.postDrawSeriesShadowHooks = new H.jqplot.HooksManager(); + this.colorGenerator = new H.jqplot.ColorGenerator(); this.negativeColorGenerator = new H.jqplot.ColorGenerator(); + this.canvasManager = new H.jqplot.CanvasManager(); this.themeEngine = new H.jqplot.ThemeEngine(); + var ad = 0; this.init = function(ao, al, aq){aq = aq || {}; + for (var am = 0; am < H.jqplot.preInitHooks.length; am++){ + H.jqplot.preInitHooks[am].call(this, ao, al, aq)} + for (var am = 0; am < this.preInitHooks.hooks.length; am++){ + this.preInitHooks.hooks[am].call(this, ao, al, aq)} + this.targetId = "#" + ao; this.target = H("#" + ao); + if (this._addDomReference){this.target.data("jqplot", this)}this.target.removeClass("jqplot-error"); + if (!this.target.get(0)){throw"No plot target specified"}if (this.target.css("position") == "static"){ + this.target.css("position", "relative")}if (!this.target.hasClass("jqplot-target")){this.target.addClass("jqplot-target")} + if (!this.target.height()){var an; if (aq && aq.height){an = parseInt(aq.height, 10)} + else{if (this.target.attr("data-height")){an = parseInt(this.target.attr("data-height"), 10)} + else{an = parseInt(H.jqplot.config.defaultHeight, 10)}}this._height = an; + this.target.css("height", an + "px")} + else{this._height = an = this.target.height()}if (!this.target.width()){ + var ap; if (aq && aq.width){ap = parseInt(aq.width, 10)} + else{if (this.target.attr("data-width")){ap = parseInt(this.target.attr("data-width"), 10)} + else{ap = parseInt(H.jqplot.config.defaultWidth, 10)}}this._width = ap; + this.target.css("width", ap + "px")} else{this._width = ap = this.target.width()} + for (var am = 0, aj = Q.length; am < aj; am++){this.axes[Q[am]] = new s(Q[am])}this._plotDimensions.height = this._height; + this._plotDimensions.width = this._width; this.grid._plotDimensions = this._plotDimensions; + this.title._plotDimensions = this._plotDimensions; this.baseCanvas._plotDimensions = this._plotDimensions; + this.eventCanvas._plotDimensions = this._plotDimensions; this.legend._plotDimensions = this._plotDimensions; + if (this._height <= 0 || this._width <= 0 || !this._height || !this._width){throw"Canvas dimension not set"} + if (aq.dataRenderer && H.isFunction(aq.dataRenderer)){if (aq.dataRendererOptions){this.dataRendererOptions = aq.dataRendererOptions} + this.dataRenderer = aq.dataRenderer; al = this.dataRenderer(al, this, this.dataRendererOptions)} + if (aq.noDataIndicator && H.isPlainObject(aq.noDataIndicator)){H.extend(true, this.noDataIndicator, aq.noDataIndicator)} + if (al == null || H.isArray(al) == false || al.length == 0 || H.isArray(al[0]) == false || al[0].length == 0){ + if (this.noDataIndicator.show == false){throw"No Data"} else{for (var af in this.noDataIndicator.axes){ + for (var ah in this.noDataIndicator.axes[af]){this.axes[af][ah] = this.noDataIndicator.axes[af][ah]}} + this.postDrawHooks.add(function(){var ax = this.eventCanvas.getHeight(); var au = this.eventCanvas.getWidth(); + var at = H('
'); this.target.append(at); + at.height(ax); at.width(au); at.css("top", this.eventCanvas._offsets.top); at.css("left", this.eventCanvas._offsets.left); + var aw = H('
'); + at.append(aw); aw.html(this.noDataIndicator.indicator); var av = aw.height(); + var ar = aw.width(); aw.height(av); aw.width(ar); + aw.css("top", (ax - av) / 2 + "px")})}}this.data = H.extend(true, [], al); this.parseOptions(aq); + if (this.textColor){this.target.css("color", this.textColor)}if (this.fontFamily){this.target.css("font-family", this.fontFamily)} + if (this.fontSize){this.target.css("font-size", this.fontSize)}this.title.init(); this.legend.init(); + this._sumy = 0; this._sumx = 0; for (var am = 0; am < this.series.length; am++){this.seriesStack.push(am); + this.previousSeriesStack.push(am); this.series[am].shadowCanvas._plotDimensions = this._plotDimensions; + this.series[am].canvas._plotDimensions = this._plotDimensions; + for (var ak = 0; ak < H.jqplot.preSeriesInitHooks.length; ak++){ + H.jqplot.preSeriesInitHooks[ak].call(this.series[am], ao, this.data, this.options.seriesDefaults, this.options.series[am], this)} + for (var ak = 0; ak < this.preSeriesInitHooks.hooks.length; ak++){ + this.preSeriesInitHooks.hooks[ak].call(this.series[am], ao, this.data, this.options.seriesDefaults, this.options.series[am], this)} + this.populatePlotData(this.series[am], am); this.series[am]._plotDimensions = this._plotDimensions; this.series[am].init(am, this.grid.borderWidth, this); for (var ak = 0; ak < H.jqplot.postSeriesInitHooks.length; ak++){H.jqplot.postSeriesInitHooks[ak].call(this.series[am], ao, this.data, this.options.seriesDefaults, this.options.series[am], this)}for (var ak = 0; ak < this.postSeriesInitHooks.hooks.length; ak++){this.postSeriesInitHooks.hooks[ak].call(this.series[am], ao, this.data, this.options.seriesDefaults, this.options.series[am], this)}this._sumy += this.series[am]._sumy; this._sumx += this.series[am]._sumx}var ag, ai; for (var am = 0, aj = Q.length; am < aj; am++){ag = Q[am]; ai = this.axes[ag]; ai._plotDimensions = this._plotDimensions; ai.init(); if (this.axes[ag].borderColor == null){if (ag.charAt(0) !== "x" && ai.useSeriesColor === true && ai.show){ai.borderColor = ai._series[0].color} else{ai.borderColor = this.grid.borderColor}}}if (this.sortData){ab(this.series)}this.grid.init(); this.grid._axes = this.axes; this.legend._series = this.series; for (var am = 0; am < H.jqplot.postInitHooks.length; am++){H.jqplot.postInitHooks[am].call(this, ao, this.data, aq)}for (var am = 0; am < this.postInitHooks.hooks.length; am++){this.postInitHooks.hooks[am].call(this, ao, this.data, aq)}}; this.resetAxesScale = function(ak, ag){var ai = ag || {}; var aj = ak || this.axes; if (aj === true){aj = this.axes}if (H.isArray(aj)){for (var ah = 0; ah < aj.length; ah++){this.axes[aj[ah]].resetScale(ai[aj[ah]])}} else{if (typeof (aj) === "object"){for (var af in aj){this.axes[af].resetScale(ai[af])}}}}; this.reInitialize = function(an, af){var ar = H.extend(true, {}, this.options, af); var ap = this.targetId.substr(1); var al = (an == null)?this.data:an; for (var ao = 0; ao < H.jqplot.preInitHooks.length; ao++){H.jqplot.preInitHooks[ao].call(this, ap, al, ar)}for (var ao = 0; ao < this.preInitHooks.hooks.length; ao++){this.preInitHooks.hooks[ao].call(this, ap, al, ar)}this._height = this.target.height(); this._width = this.target.width(); if (this._height <= 0 || this._width <= 0 || !this._height || !this._width){throw"Target dimension not set"}this._plotDimensions.height = this._height; this._plotDimensions.width = this._width; this.grid._plotDimensions = this._plotDimensions; this.title._plotDimensions = this._plotDimensions; this.baseCanvas._plotDimensions = this._plotDimensions; this.eventCanvas._plotDimensions = this._plotDimensions; this.legend._plotDimensions = this._plotDimensions; var ag, aq, am, ai; for (var ao = 0, ak = Q.length; ao < ak; ao++){ag = Q[ao]; ai = this.axes[ag]; aq = ai._ticks; for (var am = 0, aj = aq.length; am < aj; am++){var ah = aq[am]._elem; if (ah){if (H.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== r){window.G_vmlCanvasManager.uninitElement(ah.get(0))}ah.emptyForce(); ah = null; aq._elem = null}}aq = null; delete ai.ticks; delete ai._ticks; this.axes[ag] = new s(ag); + this.axes[ag]._plotWidth = this._width; this.axes[ag]._plotHeight = this._height} + if (an){if (ar.dataRenderer && H.isFunction(ar.dataRenderer)){ + if (ar.dataRendererOptions){this.dataRendererOptions = ar.dataRendererOptions}this.dataRenderer = ar.dataRenderer; + an = this.dataRenderer(an, this, this.dataRendererOptions)}this.data = H.extend(true, [], an)}if (af){this.parseOptions(ar)}this.title._plotWidth = this._width; + if (this.textColor){this.target.css("color", this.textColor)}if (this.fontFamily){this.target.css("font-family", this.fontFamily)}if (this.fontSize){this.target.css("font-size", this.fontSize)}this.title.init(); this.legend.init(); this._sumy = 0; this._sumx = 0; this.seriesStack = []; this.previousSeriesStack = []; for (var ao = 0, ak = this.series.length; ao < ak; ao++){this.seriesStack.push(ao); this.previousSeriesStack.push(ao); this.series[ao].shadowCanvas._plotDimensions = this._plotDimensions; this.series[ao].canvas._plotDimensions = this._plotDimensions; for (var am = 0; am < H.jqplot.preSeriesInitHooks.length; am++){H.jqplot.preSeriesInitHooks[am].call(this.series[ao], ap, this.data, this.options.seriesDefaults, this.options.series[ao], this)}for (var am = 0; am < this.preSeriesInitHooks.hooks.length; am++){this.preSeriesInitHooks.hooks[am].call(this.series[ao], ap, this.data, this.options.seriesDefaults, this.options.series[ao], this)}this.populatePlotData(this.series[ao], ao); this.series[ao]._plotDimensions = this._plotDimensions; this.series[ao].init(ao, this.grid.borderWidth, this); for (var am = 0; am < H.jqplot.postSeriesInitHooks.length; am++){H.jqplot.postSeriesInitHooks[am].call(this.series[ao], ap, this.data, this.options.seriesDefaults, this.options.series[ao], this)}for (var am = 0; am < this.postSeriesInitHooks.hooks.length; am++){this.postSeriesInitHooks.hooks[am].call(this.series[ao], ap, this.data, this.options.seriesDefaults, this.options.series[ao], this)}this._sumy += this.series[ao]._sumy; this._sumx += this.series[ao]._sumx}for (var ao = 0, ak = Q.length; ao < ak; ao++){ag = Q[ao]; ai = this.axes[ag]; ai._plotDimensions = this._plotDimensions; ai.init(); if (ai.borderColor == null){if (ag.charAt(0) !== "x" && ai.useSeriesColor === true && ai.show){ai.borderColor = ai._series[0].color} else{ai.borderColor = this.grid.borderColor}}}if (this.sortData){ab(this.series)}this.grid.init(); this.grid._axes = this.axes; this.legend._series = this.series; for (var ao = 0, ak = H.jqplot.postInitHooks.length; ao < ak; ao++){H.jqplot.postInitHooks[ao].call(this, ap, this.data, ar)}for (var ao = 0, ak = this.postInitHooks.hooks.length; ao < ak; ao++){this.postInitHooks.hooks[ao].call(this, ap, this.data, ar)}}; this.quickInit = function(){this._height = this.target.height(); this._width = this.target.width(); if (this._height <= 0 || this._width <= 0 || !this._height || !this._width){throw"Target dimension not set"}this._plotDimensions.height = this._height; this._plotDimensions.width = this._width; this.grid._plotDimensions = this._plotDimensions; this.title._plotDimensions = this._plotDimensions; this.baseCanvas._plotDimensions = this._plotDimensions; this.eventCanvas._plotDimensions = this._plotDimensions; this.legend._plotDimensions = this._plotDimensions; for (var ak in this.axes){this.axes[ak]._plotWidth = this._width; this.axes[ak]._plotHeight = this._height}this.title._plotWidth = this._width; if (this.textColor){this.target.css("color", this.textColor)}if (this.fontFamily){this.target.css("font-family", this.fontFamily)}if (this.fontSize){this.target.css("font-size", this.fontSize)}this._sumy = 0; this._sumx = 0; for (var ai = 0; ai < this.series.length; ai++){this.populatePlotData(this.series[ai], ai); if (this.series[ai]._type === "line" && this.series[ai].renderer.bands.show){this.series[ai].renderer.initBands.call(this.series[ai], this.series[ai].renderer.options, this)}this.series[ai]._plotDimensions = this._plotDimensions; this.series[ai].canvas._plotDimensions = this._plotDimensions; this._sumy += this.series[ai]._sumy; this._sumx += this.series[ai]._sumx}var ag; for (var af = 0; af < 12; af++){ag = Q[af]; var ah = this.axes[ag]._ticks; for (var ai = 0; ai < ah.length; ai++){var aj = ah[ai]._elem; if (aj){if (H.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== r){window.G_vmlCanvasManager.uninitElement(aj.get(0))}aj.emptyForce(); aj = null; ah._elem = null}}ah = null; this.axes[ag]._plotDimensions = this._plotDimensions; this.axes[ag]._ticks = []}if (this.sortData){ab(this.series)}this.grid._axes = this.axes; this.legend._series = this.series}; function ab(aj){var an, ao, ap, af, am; for (var ak = 0; ak < aj.length; ak++){var ag; var al = [aj[ak].data, aj[ak]._stackData, aj[ak]._plotData, aj[ak]._prevPlotData]; for (var ah = 0; ah < 4; ah++){ag = true; an = al[ah]; if (aj[ak]._stackAxis == "x"){for (var ai = 0; ai < an.length; ai++){if (typeof (an[ai][1]) != "number"){ag = false; break}}if (ag){an.sort(function(ar, aq){return ar[1] - aq[1]})}} else{for (var ai = 0; ai < an.length; ai++){if (typeof (an[ai][0]) != "number"){ag = false; break}}if (ag){an.sort(function(ar, aq){return ar[0] - aq[0]})}}}}}this.populatePlotData = function(aj, ak){this._plotData = []; this._stackData = []; aj._stackData = []; aj._plotData = []; var an = {x:[], y:[]}; if (this.stackSeries && !aj.disableStack){aj._stack = true; var al = aj._stackAxis == "x"?0:1; var am = al?0:1; var ao = H.extend(true, [], aj.data); var ap = H.extend(true, [], aj.data); for (var ah = 0; ah < ak; ah++){var af = this.series[ah].data; for (var ag = 0; ag < af.length; ag++){ao[ag][0] += af[ag][0]; ao[ag][1] += af[ag][1]; ap[ag][al] += af[ag][al]}}for (var ai = 0; ai < ap.length; ai++){an.x.push(ap[ai][0]); an.y.push(ap[ai][1])}this._plotData.push(ap); this._stackData.push(ao); aj._stackData = ao; aj._plotData = ap; aj._plotValues = an} else{for (var ai = 0; ai < aj.data.length; ai++){an.x.push(aj.data[ai][0]); an.y.push(aj.data[ai][1])}this._stackData.push(aj.data); this.series[ak]._stackData = aj.data; this._plotData.push(aj.data); aj._plotData = aj.data; aj._plotValues = an}if (ak > 0){aj._prevPlotData = this.series[ak - 1]._plotData}aj._sumy = 0; aj._sumx = 0; for (ai = aj.data.length - 1; ai > - 1; ai--){aj._sumy += aj.data[ai][1]; aj._sumx += aj.data[ai][0]}}; this.getNextSeriesColor = (function(ag){var af = 0; var ah = ag.seriesColors; return function(){if (af < ah.length){return ah[af++]} else{af = 0; return ah[af++]}}})(this); this.parseOptions = function(aq){for (var al = 0; al < this.preParseOptionsHooks.hooks.length; al++){this.preParseOptionsHooks.hooks[al].call(this, aq)}for (var al = 0; al < H.jqplot.preParseOptionsHooks.length; al++){H.jqplot.preParseOptionsHooks[al].call(this, aq)}this.options = H.extend(true, {}, this.defaults, aq); var af = this.options; this.animate = af.animate; this.animateReplot = af.animateReplot; this.stackSeries = af.stackSeries; if (H.isPlainObject(af.fillBetween)){var ap = ["series1", "series2", "color", "baseSeries", "fill"], am; for (var al = 0, aj = ap.length; al < aj; al++){am = ap[al]; if (af.fillBetween[am] != null){this.fillBetween[am] = af.fillBetween[am]}}}if (af.seriesColors){this.seriesColors = af.seriesColors}if (af.negativeSeriesColors){this.negativeSeriesColors = af.negativeSeriesColors}if (af.captureRightClick){this.captureRightClick = af.captureRightClick}this.defaultAxisStart = (aq && aq.defaultAxisStart != null)?aq.defaultAxisStart:this.defaultAxisStart; this.colorGenerator.setColors(this.seriesColors); this.negativeColorGenerator.setColors(this.negativeSeriesColors); H.extend(true, this._gridPadding, af.gridPadding); this.sortData = (af.sortData != null)?af.sortData:this.sortData; for (var al = 0; al < 12; al++){var ag = Q[al]; var ai = this.axes[ag]; ai._options = H.extend(true, {}, af.axesDefaults, af.axes[ag]); H.extend(true, ai, af.axesDefaults, af.axes[ag]); ai._plotWidth = this._width; ai._plotHeight = this._height}var ao = function(av, at, aw){var ar = []; var au; at = at || "vertical"; if (!H.isArray(av[0])){for (au = 0; au < av.length; au++){if (at == "vertical"){ar.push([aw + au, av[au]])} else{ar.push([av[au], aw + au])}}} else{H.extend(true, ar, av)}return ar}; var an = 0; this.series = []; for (var al = 0; al < this.data.length; al++){var ap = new O(); for (var ak = 0; ak < H.jqplot.preParseSeriesOptionsHooks.length; ak++){H.jqplot.preParseSeriesOptionsHooks[ak].call(ap, this.options.seriesDefaults, this.options.series[al])}for (var ak = 0; ak < this.preParseSeriesOptionsHooks.hooks.length; ak++){this.preParseSeriesOptionsHooks.hooks[ak].call(ap, this.options.seriesDefaults, this.options.series[al])}H.extend(true, ap, {seriesColors:this.seriesColors, negativeSeriesColors:this.negativeSeriesColors}, this.options.seriesDefaults, this.options.series[al], {rendererOptions:{animation:{show:this.animate}}}); var ah = "vertical"; if (ap.renderer === H.jqplot.BarRenderer && ap.rendererOptions && ap.rendererOptions.barDirection == "horizontal" && ap.transposeData === true){ah = "horizontal"}ap.data = ao(this.data[al], ah, this.defaultAxisStart); switch (ap.xaxis){case"xaxis":ap._xaxis = this.axes.xaxis; break; case"x2axis":ap._xaxis = this.axes.x2axis; break; default:break}ap._yaxis = this.axes[ap.yaxis]; ap._xaxis._series.push(ap); ap._yaxis._series.push(ap); if (ap.show){ap._xaxis.show = true; ap._yaxis.show = true} else{if (ap._xaxis.scaleToHiddenSeries){ap._xaxis.show = true}if (ap._yaxis.scaleToHiddenSeries){ap._yaxis.show = true}}if (!ap.label){ap.label = "Series " + (al + 1).toString()}this.series.push(ap); for (var ak = 0; ak < H.jqplot.postParseSeriesOptionsHooks.length; ak++){H.jqplot.postParseSeriesOptionsHooks[ak].call(this.series[al], this.options.seriesDefaults, this.options.series[al])}for (var ak = 0; ak < this.postParseSeriesOptionsHooks.hooks.length; ak++){this.postParseSeriesOptionsHooks.hooks[ak].call(this.series[al], this.options.seriesDefaults, this.options.series[al])}}H.extend(true, this.grid, this.options.grid); for (var al = 0, aj = Q.length; al < aj; al++){var ag = Q[al]; var ai = this.axes[ag]; if (ai.borderWidth == null){ai.borderWidth = this.grid.borderWidth}}if (typeof this.options.title == "string"){this.title.text = this.options.title} else{if (typeof this.options.title == "object"){H.extend(true, this.title, this.options.title)}}this.title._plotWidth = this._width; this.legend.setOptions(this.options.legend); for (var al = 0; al < H.jqplot.postParseOptionsHooks.length; al++){H.jqplot.postParseOptionsHooks[al].call(this, aq)}for (var al = 0; al < this.postParseOptionsHooks.hooks.length; al++){this.postParseOptionsHooks.hooks[al].call(this, aq)}}; this.destroy = function(){this.canvasManager.freeAllCanvases(); if (this.eventCanvas && this.eventCanvas._elem){this.eventCanvas._elem.unbind()}this.target.empty(); this.target[0].innerHTML = ""}; this.replot = function(ag){var ah = ag || {}; var aj = ah.data || null; var af = (ah.clear === false)?false:true; var ai = ah.resetAxes || false; delete ah.data; delete ah.clear; delete ah.resetAxes; this.target.trigger("jqplotPreReplot"); if (af){this.destroy()}if (aj || !H.isEmptyObject(ah)){this.reInitialize(aj, ah)} else{this.quickInit()}if (ai){this.resetAxesScale(ai, ah.axes)}this.draw(); this.target.trigger("jqplotPostReplot")}; this.redraw = function(af){af = (af != null)?af:true; this.target.trigger("jqplotPreRedraw"); if (af){this.canvasManager.freeAllCanvases(); this.eventCanvas._elem.unbind(); this.target.empty()}for (var ah in this.axes){this.axes[ah]._ticks = []}for (var ag = 0; ag < this.series.length; ag++){this.populatePlotData(this.series[ag], ag)}this._sumy = 0; this._sumx = 0; for (ag = 0; ag < this.series.length; ag++){this._sumy += this.series[ag]._sumy; this._sumx += this.series[ag]._sumx}this.draw(); this.target.trigger("jqplotPostRedraw")}; this.draw = function(){if (this.drawIfHidden || this.target.is(":visible")){this.target.trigger("jqplotPreDraw"); var aB, az, ay, ai; for (aB = 0, ay = H.jqplot.preDrawHooks.length; aB < ay; aB++){H.jqplot.preDrawHooks[aB].call(this)}for (aB = 0, ay = this.preDrawHooks.length; aB < ay; aB++){this.preDrawHooks.hooks[aB].apply(this, this.preDrawSeriesHooks.args[aB])}this.target.append(this.baseCanvas.createElement({left:0, right:0, top:0, bottom:0}, "jqplot-base-canvas", null, this)); this.baseCanvas.setContext(); this.target.append(this.title.draw()); this.title.pack({top:0, left:0}); var aF = this.legend.draw({}, this); var af = {top:0, left:0, bottom:0, right:0}; if (this.legend.placement == "outsideGrid"){this.target.append(aF); switch (this.legend.location){case"n":af.top += this.legend.getHeight(); break; case"s":af.bottom += this.legend.getHeight(); break; case"ne":case"e":case"se":af.right += this.legend.getWidth(); break; case"nw":case"w":case"sw":af.left += this.legend.getWidth(); break; default:af.right += this.legend.getWidth(); break}aF = aF.detach()}var al = this.axes; var aG; for (aB = 0; aB < 12; aB++){aG = Q[aB]; this.target.append(al[aG].draw(this.baseCanvas._ctx, this)); al[aG].set()}if (al.yaxis.show){af.left += al.yaxis.getWidth()}var aA = ["y2axis", "y3axis", "y4axis", "y5axis", "y6axis", "y7axis", "y8axis", "y9axis"]; var ar = [0, 0, 0, 0, 0, 0, 0, 0]; var av = 0; var au; for (au = 0; au < 8; au++){if (al[aA[au]].show){av += al[aA[au]].getWidth(); ar[au] = av}}af.right += av; if (al.x2axis.show){af.top += al.x2axis.getHeight()}if (this.title.show){af.top += this.title.getHeight()}if (al.xaxis.show){af.bottom += al.xaxis.getHeight()}if (this.options.gridDimensions && H.isPlainObject(this.options.gridDimensions)){var am = parseInt(this.options.gridDimensions.width, 10) || 0; var aC = parseInt(this.options.gridDimensions.height, 10) || 0; var ah = (this._width - af.left - af.right - am) / 2; var aE = (this._height - af.top - af.bottom - aC) / 2; if (aE >= 0 && ah >= 0){af.top += aE; af.bottom += aE; af.left += ah; af.right += ah}}var ag = ["top", "bottom", "left", "right"]; for (var au in ag){if (this._gridPadding[ag[au]] == null && af[ag[au]] > 0){this._gridPadding[ag[au]] = af[ag[au]]} else{if (this._gridPadding[ag[au]] == null){this._gridPadding[ag[au]] = this._defaultGridPadding[ag[au]]}}}var at = this._gridPadding; if (this.legend.placement === "outsideGrid"){at = {top:this.title.getHeight(), left:0, right:0, bottom:0}; if (this.legend.location === "s"){at.left = this._gridPadding.left; at.right = this._gridPadding.right}}al.xaxis.pack({position:"absolute", bottom:this._gridPadding.bottom - al.xaxis.getHeight(), left:0, width:this._width}, {min:this._gridPadding.left, max:this._width - this._gridPadding.right}); + al.yaxis.pack({position:"absolute", top:0, left:this._gridPadding.left - al.yaxis.getWidth(), height:this._height}, {min:this._height - this._gridPadding.bottom, max:this._gridPadding.top}); al.x2axis.pack({position:"absolute", top:this._gridPadding.top - al.x2axis.getHeight(), left:0, width:this._width}, {min:this._gridPadding.left, max:this._width - this._gridPadding.right}); for (aB = 8; aB > 0; aB--){al[aA[aB - 1]].pack({position:"absolute", top:0, right:this._gridPadding.right - ar[aB - 1]}, {min:this._height - this._gridPadding.bottom, max:this._gridPadding.top})}var an = (this._width - this._gridPadding.left - this._gridPadding.right) / 2 + this._gridPadding.left - al.yMidAxis.getWidth() / 2; al.yMidAxis.pack({position:"absolute", top:0, left:an, zIndex:9, textAlign:"center"}, {min:this._height - this._gridPadding.bottom, max:this._gridPadding.top}); this.target.append(this.grid.createElement(this._gridPadding, this)); this.grid.draw(); var ak = this.series; var aD = ak.length; for (aB = 0, ay = aD; aB < ay; aB++){az = this.seriesStack[aB]; this.target.append(ak[az].shadowCanvas.createElement(this._gridPadding, "jqplot-series-shadowCanvas", null, this)); ak[az].shadowCanvas.setContext(); ak[az].shadowCanvas._elem.data("seriesIndex", az)}for (aB = 0, ay = aD; aB < ay; aB++){az = this.seriesStack[aB]; this.target.append(ak[az].canvas.createElement(this._gridPadding, "jqplot-series-canvas", null, this)); ak[az].canvas.setContext(); ak[az].canvas._elem.data("seriesIndex", az)}this.target.append(this.eventCanvas.createElement(this._gridPadding, "jqplot-event-canvas", null, this)); this.eventCanvas.setContext(); this.eventCanvas._ctx.fillStyle = "rgba(0,0,0,0)"; this.eventCanvas._ctx.fillRect(0, 0, this.eventCanvas._ctx.canvas.width, this.eventCanvas._ctx.canvas.height); this.bindCustomEvents(); if (this.legend.preDraw){this.eventCanvas._elem.before(aF); this.legend.pack(at); if (this.legend._elem){this.drawSeries({legendInfo:{location:this.legend.location, placement:this.legend.placement, width:this.legend.getWidth(), height:this.legend.getHeight(), xoffset:this.legend.xoffset, yoffset:this.legend.yoffset}})} else{this.drawSeries()}} else{this.drawSeries(); if (aD){H(ak[aD - 1].canvas._elem).after(aF)}this.legend.pack(at)}for (var aB = 0, ay = H.jqplot.eventListenerHooks.length; aB < ay; aB++){this.eventCanvas._elem.bind(H.jqplot.eventListenerHooks[aB][0], {plot:this}, H.jqplot.eventListenerHooks[aB][1])}for (var aB = 0, ay = this.eventListenerHooks.hooks.length; aB < ay; aB++){this.eventCanvas._elem.bind(this.eventListenerHooks.hooks[aB][0], {plot:this}, this.eventListenerHooks.hooks[aB][1])}var aq = this.fillBetween; if (aq.fill && aq.series1 !== aq.series2 && aq.series1 < aD && aq.series2 < aD && ak[aq.series1]._type === "line" && ak[aq.series2]._type === "line"){this.doFillBetweenLines()}for (var aB = 0, ay = H.jqplot.postDrawHooks.length; aB < ay; aB++){H.jqplot.postDrawHooks[aB].call(this)}for (var aB = 0, ay = this.postDrawHooks.hooks.length; aB < ay; aB++){this.postDrawHooks.hooks[aB].apply(this, this.postDrawHooks.args[aB])}if (this.target.is(":visible")){this._drawCount += 1}var ao, ap, aw, aj; for (aB = 0, ay = aD; aB < ay; aB++){ao = ak[aB]; ap = ao.renderer; aw = ".jqplot-point-label.jqplot-series-" + aB; if (ap.animation && ap.animation._supported && ap.animation.show && (this._drawCount < 2 || this.animateReplot)){aj = this.target.find(aw); aj.stop(true, true).hide(); ao.canvas._elem.stop(true, true).hide(); ao.shadowCanvas._elem.stop(true, true).hide(); ao.canvas._elem.jqplotEffect("blind", {mode:"show", direction:ap.animation.direction}, ap.animation.speed); ao.shadowCanvas._elem.jqplotEffect("blind", {mode:"show", direction:ap.animation.direction}, ap.animation.speed); aj.fadeIn(ap.animation.speed * 0.8)}}aj = null; this.target.trigger("jqplotPostDraw", [this])}}; N.prototype.doFillBetweenLines = function(){var ah = this.fillBetween; var aq = ah.series1; var ao = ah.series2; var ap = (aq < ao)?aq:ao; var an = (ao > aq)?ao:aq; var al = this.series[ap]; var ak = this.series[an]; if (ak.renderer.smooth){var aj = ak.renderer._smoothedData.slice(0).reverse()} else{var aj = ak.gridData.slice(0).reverse()}if (al.renderer.smooth){var am = al.renderer._smoothedData.concat(aj)} else{var am = al.gridData.concat(aj)}var ai = (ah.color !== null)?ah.color:this.series[aq].fillColor; var ar = (ah.baseSeries !== null)?ah.baseSeries:ap; var ag = this.series[ar].renderer.shapeRenderer; var af = {fillStyle:ai, fill:true, closePath:true}; ag.draw(al.shadowCanvas._ctx, am, af)}; this.bindCustomEvents = function(){this.eventCanvas._elem.bind("click", {plot:this}, this.onClick); this.eventCanvas._elem.bind("dblclick", {plot:this}, this.onDblClick); this.eventCanvas._elem.bind("mousedown", {plot:this}, this.onMouseDown); this.eventCanvas._elem.bind("mousemove", {plot:this}, this.onMouseMove); this.eventCanvas._elem.bind("mouseenter", {plot:this}, this.onMouseEnter); this.eventCanvas._elem.bind("mouseleave", {plot:this}, this.onMouseLeave); if (this.captureRightClick){this.eventCanvas._elem.bind("mouseup", {plot:this}, this.onRightClick); this.eventCanvas._elem.get(0).oncontextmenu = function(){return false}} else{this.eventCanvas._elem.bind("mouseup", {plot:this}, this.onMouseUp)}}; function ac(ao){var am = ao.data.plot; var ai = am.eventCanvas._elem.offset(); var al = {x:ao.pageX - ai.left, y:ao.pageY - ai.top}; var aj = {xaxis:null, yaxis:null, x2axis:null, y2axis:null, y3axis:null, y4axis:null, y5axis:null, y6axis:null, y7axis:null, y8axis:null, y9axis:null, yMidAxis:null}; var ak = ["xaxis", "yaxis", "x2axis", "y2axis", "y3axis", "y4axis", "y5axis", "y6axis", "y7axis", "y8axis", "y9axis", "yMidAxis"]; var af = am.axes; var ag, ah; for (ag = 11; ag > 0; ag--){ah = ak[ag - 1]; if (af[ah].show){aj[ah] = af[ah].series_p2u(al[ah.charAt(0)])}}return{offsets:ai, gridPos:al, dataPos:aj}}function ae(af, ag){var ak = ag.series; var aQ, aO, aN, aI, aJ, aD, aC, ap, an, at, au, aE; var aM, aR, aK, al, aB, aG, aP; var ah, aH; for (aN = ag.seriesStack.length - 1; aN >= 0; aN--){aQ = ag.seriesStack[aN]; aI = ak[aQ]; aP = aI._highlightThreshold; switch (aI.renderer.constructor){case H.jqplot.BarRenderer:aD = af.x; aC = af.y; for (aO = 0; aO < aI._barPoints.length; aO++){aB = aI._barPoints[aO]; aK = aI.gridData[aO]; if (aD > aB[0][0] && aD < aB[2][0] && aC > aB[2][1] && aC < aB[0][1]){return{seriesIndex:aI.index, pointIndex:aO, gridData:aK, data:aI.data[aO], points:aI._barPoints[aO]}}}break; case H.jqplot.PyramidRenderer:aD = af.x; aC = af.y; for (aO = 0; aO < aI._barPoints.length; aO++){aB = aI._barPoints[aO]; aK = aI.gridData[aO]; if (aD > aB[0][0] + aP[0][0] && aD < aB[2][0] + aP[2][0] && aC > aB[2][1] && aC < aB[0][1]){return{seriesIndex:aI.index, pointIndex:aO, gridData:aK, data:aI.data[aO], points:aI._barPoints[aO]}}}break; case H.jqplot.DonutRenderer:at = aI.startAngle / 180 * Math.PI; aD = af.x - aI._center[0]; aC = af.y - aI._center[1]; aJ = Math.sqrt(Math.pow(aD, 2) + Math.pow(aC, 2)); if (aD > 0 && - aC >= 0){ap = 2 * Math.PI - Math.atan( - aC / aD)} else{if (aD > 0 && - aC < 0){ap = - Math.atan( - aC / aD)} else{if (aD < 0){ap = Math.PI - Math.atan( - aC / aD)} else{if (aD == 0 && - aC > 0){ap = 3 * Math.PI / 2} else{if (aD == 0 && - aC < 0){ap = Math.PI / 2} else{if (aD == 0 && aC == 0){ap = 0}}}}}}if (at){ap -= at; if (ap < 0){ap += 2 * Math.PI} else{if (ap > 2 * Math.PI){ap -= 2 * Math.PI}}}an = aI.sliceMargin / 180 * Math.PI; if (aJ < aI._radius && aJ > aI._innerRadius){for (aO = 0; aO < aI.gridData.length; aO++){au = (aO > 0)?aI.gridData[aO - 1][1] + an:an; aE = aI.gridData[aO][1]; if (ap > au && ap < aE){return{seriesIndex:aI.index, pointIndex:aO, gridData:aI.gridData[aO], data:aI.data[aO]}}}}break; case H.jqplot.PieRenderer:at = aI.startAngle / 180 * Math.PI; aD = af.x - aI._center[0]; aC = af.y - aI._center[1]; aJ = Math.sqrt(Math.pow(aD, 2) + Math.pow(aC, 2)); if (aD > 0 && - aC >= 0){ap = 2 * Math.PI - Math.atan( - aC / aD)} else{if (aD > 0 && - aC < 0){ap = - Math.atan( - aC / aD)} else{if (aD < 0){ap = Math.PI - Math.atan( - aC / aD)} else{if (aD == 0 && - aC > 0){ap = 3 * Math.PI / 2} else{if (aD == 0 && - aC < 0){ap = Math.PI / 2} else{if (aD == 0 && aC == 0){ap = 0}}}}}}if (at){ap -= at; if (ap < 0){ap += 2 * Math.PI} else{if (ap > 2 * Math.PI){ap -= 2 * Math.PI}}}an = aI.sliceMargin / 180 * Math.PI; if (aJ < aI._radius){for (aO = 0; aO < aI.gridData.length; aO++){au = (aO > 0)?aI.gridData[aO - 1][1] + an:an; aE = aI.gridData[aO][1]; if (ap > au && ap < aE){return{seriesIndex:aI.index, pointIndex:aO, gridData:aI.gridData[aO], data:aI.data[aO]}}}}break; case H.jqplot.BubbleRenderer:aD = af.x; aC = af.y; var az = null; if (aI.show){for (var aO = 0; aO < aI.gridData.length; aO++){aK = aI.gridData[aO]; aR = Math.sqrt((aD - aK[0]) * (aD - aK[0]) + (aC - aK[1]) * (aC - aK[1])); if (aR <= aK[2] && (aR <= aM || aM == null)){aM = aR; az = {seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}}if (az != null){return az}}break; case H.jqplot.FunnelRenderer:aD = af.x; aC = af.y; var aF = aI._vertices, aj = aF[0], ai = aF[aF.length - 1], am, ay, ar; function aL(aU, aW, aV){var aT = (aW[1] - aV[1]) / (aW[0] - aV[0]); var aS = aW[1] - aT * aW[0]; var aX = aU + aW[1]; return[(aX - aS) / aT, aX]}am = aL(aC, aj[0], ai[3]); ay = aL(aC, aj[1], ai[2]); for (aO = 0; aO < aF.length; aO++){ar = aF[aO]; if (aC >= ar[0][1] && aC <= ar[3][1] && aD >= am[0] && aD <= ay[0]){return{seriesIndex:aI.index, pointIndex:aO, gridData:null, data:aI.data[aO]}}}break; case H.jqplot.LineRenderer:aD = af.x; aC = af.y; aJ = aI.renderer; if (aI.show){if ((aI.fill || (aI.renderer.bands.show && aI.renderer.bands.fill)) && (!ag.plugins.highlighter || !ag.plugins.highlighter.show)){var aq = false; if (aD > aI._boundingBox[0][0] && aD < aI._boundingBox[1][0] && aC > aI._boundingBox[1][1] && aC < aI._boundingBox[0][1]){var ax = aI._areaPoints.length; var aA; var aO = ax - 1; for (var aA = 0; aA < ax; aA++){var aw = [aI._areaPoints[aA][0], aI._areaPoints[aA][1]]; var av = [aI._areaPoints[aO][0], aI._areaPoints[aO][1]]; if (aw[1] < aC && av[1] >= aC || av[1] < aC && aw[1] >= aC){if (aw[0] + (aC - aw[1]) / (av[1] - aw[1]) * (av[0] - aw[0]) < aD){aq = !aq}}aO = aA}}if (aq){return{seriesIndex:aQ, pointIndex:null, gridData:aI.gridData, data:aI.data, points:aI._areaPoints}}break} else{aH = aI.markerRenderer.size / 2 + aI.neighborThreshold; ah = (aH > 0)?aH:0; for (var aO = 0; aO < aI.gridData.length; aO++){aK = aI.gridData[aO]; if (aJ.constructor == H.jqplot.OHLCRenderer){if (aJ.candleStick){var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._bodyWidth / 2 && aD <= aK[0] + aJ._bodyWidth / 2 && aC >= ao(aI.data[aO][2]) && aC <= ao(aI.data[aO][3])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}} else{if (!aJ.hlc){var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._tickLength && aD <= aK[0] + aJ._tickLength && aC >= ao(aI.data[aO][2]) && aC <= ao(aI.data[aO][3])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}} else{var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._tickLength && aD <= aK[0] + aJ._tickLength && aC >= ao(aI.data[aO][1]) && aC <= ao(aI.data[aO][2])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}}}} else{if (aK[0] != null && aK[1] != null){aR = Math.sqrt((aD - aK[0]) * (aD - aK[0]) + (aC - aK[1]) * (aC - aK[1])); + if (aR <= ah && (aR <= aM || aM == null)){aM = aR; return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}}}}}}break; + default:aD = af.x; aC = af.y; aJ = aI.renderer; + if (aI.show){aH = aI.markerRenderer.size / 2 + aI.neighborThreshold; ah = (aH > 0)?aH:0; + for (var aO = 0; aO < aI.gridData.length; aO++){ + aK = aI.gridData[aO]; if (aJ.constructor == H.jqplot.OHLCRenderer){ + if (aJ.candleStick){var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._bodyWidth / 2 && aD <= aK[0] + aJ._bodyWidth / 2 && aC >= ao(aI.data[aO][2]) && aC <= ao(aI.data[aO][3])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}} else{if (!aJ.hlc){var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._tickLength && aD <= aK[0] + aJ._tickLength && aC >= ao(aI.data[aO][2]) && aC <= ao(aI.data[aO][3])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}} else{var ao = aI._yaxis.series_u2p; if (aD >= aK[0] - aJ._tickLength && aD <= aK[0] + aJ._tickLength && aC >= ao(aI.data[aO][1]) && aC <= ao(aI.data[aO][2])){return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}}}} else{aR = Math.sqrt((aD - aK[0]) * (aD - aK[0]) + (aC - aK[1]) * (aC - aK[1])); if (aR <= ah && (aR <= aM || aM == null)){aM = aR; return{seriesIndex:aQ, pointIndex:aO, gridData:aK, data:aI.data[aO]}}}}}break}}return null}this.onClick = function(ah){var ag = ac(ah); var aj = ah.data.plot; var ai = ae(ag.gridPos, aj); var af = H.Event("jqplotClick"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])}; this.onDblClick = function(ah){var ag = ac(ah); var aj = ah.data.plot; var ai = ae(ag.gridPos, aj); var af = H.Event("jqplotDblClick"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])}; this.onMouseDown = function(ah){var ag = ac(ah); var aj = ah.data.plot; var ai = ae(ag.gridPos, aj); var af = H.Event("jqplotMouseDown"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])}; this.onMouseUp = function(ah){var ag = ac(ah); var af = H.Event("jqplotMouseUp"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, null, ah.data.plot])}; this.onRightClick = function(ah){var ag = ac(ah); var aj = ah.data.plot; var ai = ae(ag.gridPos, aj); if (aj.captureRightClick){if (ah.which == 3){var af = H.Event("jqplotRightClick"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])} else{var af = H.Event("jqplotMouseUp"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])}}}; this.onMouseMove = function(ah){var ag = ac(ah); var aj = ah.data.plot; var ai = ae(ag.gridPos, aj); var af = H.Event("jqplotMouseMove"); af.pageX = ah.pageX; af.pageY = ah.pageY; H(this).trigger(af, [ag.gridPos, ag.dataPos, ai, aj])}; this.onMouseEnter = function(ah){var ag = ac(ah); var ai = ah.data.plot; var af = H.Event("jqplotMouseEnter"); af.pageX = ah.pageX; af.pageY = ah.pageY; af.relatedTarget = ah.relatedTarget; H(this).trigger(af, [ag.gridPos, ag.dataPos, null, ai])}; this.onMouseLeave = function(ah){var ag = ac(ah); var ai = ah.data.plot; var af = H.Event("jqplotMouseLeave"); af.pageX = ah.pageX; af.pageY = ah.pageY; af.relatedTarget = ah.relatedTarget; H(this).trigger(af, [ag.gridPos, ag.dataPos, null, ai])}; this.drawSeries = function(ah, af){var aj, ai, ag; af = (typeof (ah) === "number" && af == null)?ah:af; ah = (typeof (ah) === "object")?ah:{}; if (af != r){ai = this.series[af]; ag = ai.shadowCanvas._ctx; ag.clearRect(0, 0, ag.canvas.width, ag.canvas.height); ai.drawShadow(ag, ah, this); ag = ai.canvas._ctx; ag.clearRect(0, 0, ag.canvas.width, ag.canvas.height); ai.draw(ag, ah, this); if (ai.renderer.constructor == H.jqplot.BezierCurveRenderer){if (af < this.series.length - 1){this.drawSeries(af + 1)}}} else{for (aj = 0; aj < this.series.length; aj++){ai = this.series[aj]; ag = ai.shadowCanvas._ctx; ag.clearRect(0, 0, ag.canvas.width, ag.canvas.height); ai.drawShadow(ag, ah, this); ag = ai.canvas._ctx; ag.clearRect(0, 0, ag.canvas.width, ag.canvas.height); ai.draw(ag, ah, this)}}ah = af = aj = ai = ag = null}; this.moveSeriesToFront = function(ag){ag = parseInt(ag, 10); var aj = H.inArray(ag, this.seriesStack); if (aj == - 1){return}if (aj == this.seriesStack.length - 1){this.previousSeriesStack = this.seriesStack.slice(0); return}var af = this.seriesStack[this.seriesStack.length - 1]; var ai = this.series[ag].canvas._elem.detach(); var ah = this.series[ag].shadowCanvas._elem.detach(); this.series[af].shadowCanvas._elem.after(ah); this.series[af].canvas._elem.after(ai); this.previousSeriesStack = this.seriesStack.slice(0); this.seriesStack.splice(aj, 1); this.seriesStack.push(ag)}; this.moveSeriesToBack = function(ag){ag = parseInt(ag, 10); var aj = H.inArray(ag, this.seriesStack); if (aj == 0 || aj == - 1){return}var af = this.seriesStack[0]; var ai = this.series[ag].canvas._elem.detach(); var ah = this.series[ag].shadowCanvas._elem.detach(); this.series[af].shadowCanvas._elem.before(ah); this.series[af].canvas._elem.before(ai); this.previousSeriesStack = this.seriesStack.slice(0); this.seriesStack.splice(aj, 1); this.seriesStack.unshift(ag)}; this.restorePreviousSeriesOrder = function(){var al, ak, aj, ai, ah, af, ag; if (this.seriesStack == this.previousSeriesStack){return}for (al = 1; al < this.previousSeriesStack.length; al++){af = this.previousSeriesStack[al]; ag = this.previousSeriesStack[al - 1]; aj = this.series[af].canvas._elem.detach(); ai = this.series[af].shadowCanvas._elem.detach(); this.series[ag].shadowCanvas._elem.after(ai); this.series[ag].canvas._elem.after(aj)}ah = this.seriesStack.slice(0); this.seriesStack = this.previousSeriesStack.slice(0); this.previousSeriesStack = ah}; this.restoreOriginalSeriesOrder = function(){var aj, ai, af = [], ah, ag; for (aj = 0; aj < this.series.length; aj++){af.push(aj)}if (this.seriesStack == af){return}this.previousSeriesStack = this.seriesStack.slice(0); this.seriesStack = af; for (aj = 1; aj < this.seriesStack.length; aj++){ah = this.series[aj].canvas._elem.detach(); ag = this.series[aj].shadowCanvas._elem.detach(); this.series[aj - 1].shadowCanvas._elem.after(ag); this.series[aj - 1].canvas._elem.after(ah)}}; this.activateTheme = function(af){this.themeEngine.activate(this, af)}}H.jqplot.computeHighlightColors = function(ac){var ae; if (H.isArray(ac)){ae = []; for (var ag = 0; ag < ac.length; ag++){var af = H.jqplot.getColorComponents(ac[ag]); var ab = [af[0], af[1], af[2]]; var ah = ab[0] + ab[1] + ab[2]; for (var ad = 0; ad < 3; ad++){ab[ad] = (ah > 660)?ab[ad] * 0.85:0.73 * ab[ad] + 90; ab[ad] = parseInt(ab[ad], 10); (ab[ad] > 255)?255:ab[ad]}ab[3] = 0.3 + 0.35 * af[3]; ae.push("rgba(" + ab[0] + "," + ab[1] + "," + ab[2] + "," + ab[3] + ")")}} else{var af = H.jqplot.getColorComponents(ac); var ab = [af[0], af[1], af[2]]; var ah = ab[0] + ab[1] + ab[2]; for (var ad = 0; ad < 3; ad++){ab[ad] = (ah > 660)?ab[ad] * 0.85:0.73 * ab[ad] + 90; ab[ad] = parseInt(ab[ad], 10); (ab[ad] > 255)?255:ab[ad]}ab[3] = 0.3 + 0.35 * af[3]; ae = "rgba(" + ab[0] + "," + ab[1] + "," + ab[2] + "," + ab[3] + ")"}return ae}; H.jqplot.ColorGenerator = function(ac){ac = ac || H.jqplot.config.defaultColors; var ab = 0; this.next = function(){if (ab < ac.length){return ac[ab++]} else{ab = 0; return ac[ab++]}}; this.previous = function(){if (ab > 0){return ac[ab--]} else{ab = ac.length - 1; return ac[ab]}}; this.get = function(ae){var ad = ae - ac.length * Math.floor(ae / ac.length); return ac[ad]}; this.setColors = function(ad){ac = ad}; this.reset = function(){ab = 0}; this.getIndex = function(){return ab}; this.setIndex = function(ad){ab = ad}}; H.jqplot.hex2rgb = function(ad, ab){ad = ad.replace("#", ""); if (ad.length == 3){ad = ad.charAt(0) + ad.charAt(0) + ad.charAt(1) + ad.charAt(1) + ad.charAt(2) + ad.charAt(2)}var ac; ac = "rgba(" + parseInt(ad.slice(0, 2), 16) + ", " + parseInt(ad.slice(2, 4), 16) + ", " + parseInt(ad.slice(4, 6), 16); if (ab){ac += ", " + ab}ac += ")"; return ac}; H.jqplot.rgb2hex = function(ag){var ad = /rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/; var ab = ag.match(ad); var af = "#"; for (var ae = 1; ae < 4; ae++){var ac; + if (ab[ae].search(/%/) != - 1){ac = parseInt(255 * ab[ae] / 100, 10).toString(16); + if (ac.length == 1){ac = "0" + ac}} else{ac = parseInt(ab[ae], 10).toString(16); if (ac.length == 1){ac = "0" + ac}}af += ac}return af}; + H.jqplot.normalize2rgb = function(ac, ab){if (ac.search(/^ *rgba?\(/) != - 1){return ac} + else{if (ac.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/) != - 1){return H.jqplot.hex2rgb(ac, ab)} else{throw"invalid color spec"}}}; + H.jqplot.getColorComponents = function(ag){ag = H.jqplot.colorKeywordMap[ag] || ag; var ae = H.jqplot.normalize2rgb(ag); + var ad = /rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/; + var ab = ae.match(ad); var ac = []; for (var af = 1; af < 4; af++){if (ab[af].search(/%/) != - 1){ac[af - 1] = parseInt(255 * ab[af] / 100, 10)} + else{ac[af - 1] = parseInt(ab[af], 10)}}ac[3] = parseFloat(ab[4])?parseFloat(ab[4]):1; + return ac}; H.jqplot.colorKeywordMap = {aliceblue:"rgb(240, 248, 255)", antiquewhite:"rgb(250, 235, 215)", aqua:"rgb( 0, 255, 255)", aquamarine:"rgb(127, 255, 212)", azure:"rgb(240, 255, 255)", beige:"rgb(245, 245, 220)", bisque:"rgb(255, 228, 196)", black:"rgb( 0, 0, 0)", blanchedalmond:"rgb(255, 235, 205)", blue:"rgb( 0, 0, 255)", blueviolet:"rgb(138, 43, 226)", brown:"rgb(165, 42, 42)", burlywood:"rgb(222, 184, 135)", cadetblue:"rgb( 95, 158, 160)", chartreuse:"rgb(127, 255, 0)", chocolate:"rgb(210, 105, 30)", coral:"rgb(255, 127, 80)", cornflowerblue:"rgb(100, 149, 237)", cornsilk:"rgb(255, 248, 220)", crimson:"rgb(220, 20, 60)", cyan:"rgb( 0, 255, 255)", darkblue:"rgb( 0, 0, 139)", darkcyan:"rgb( 0, 139, 139)", darkgoldenrod:"rgb(184, 134, 11)", darkgray:"rgb(169, 169, 169)", darkgreen:"rgb( 0, 100, 0)", darkgrey:"rgb(169, 169, 169)", darkkhaki:"rgb(189, 183, 107)", darkmagenta:"rgb(139, 0, 139)", darkolivegreen:"rgb( 85, 107, 47)", darkorange:"rgb(255, 140, 0)", darkorchid:"rgb(153, 50, 204)", darkred:"rgb(139, 0, 0)", darksalmon:"rgb(233, 150, 122)", darkseagreen:"rgb(143, 188, 143)", darkslateblue:"rgb( 72, 61, 139)", darkslategray:"rgb( 47, 79, 79)", darkslategrey:"rgb( 47, 79, 79)", darkturquoise:"rgb( 0, 206, 209)", darkviolet:"rgb(148, 0, 211)", deeppink:"rgb(255, 20, 147)", deepskyblue:"rgb( 0, 191, 255)", dimgray:"rgb(105, 105, 105)", dimgrey:"rgb(105, 105, 105)", dodgerblue:"rgb( 30, 144, 255)", firebrick:"rgb(178, 34, 34)", floralwhite:"rgb(255, 250, 240)", forestgreen:"rgb( 34, 139, 34)", fuchsia:"rgb(255, 0, 255)", gainsboro:"rgb(220, 220, 220)", ghostwhite:"rgb(248, 248, 255)", gold:"rgb(255, 215, 0)", goldenrod:"rgb(218, 165, 32)", gray:"rgb(128, 128, 128)", grey:"rgb(128, 128, 128)", green:"rgb( 0, 128, 0)", greenyellow:"rgb(173, 255, 47)", honeydew:"rgb(240, 255, 240)", hotpink:"rgb(255, 105, 180)", indianred:"rgb(205, 92, 92)", indigo:"rgb( 75, 0, 130)", ivory:"rgb(255, 255, 240)", khaki:"rgb(240, 230, 140)", lavender:"rgb(230, 230, 250)", lavenderblush:"rgb(255, 240, 245)", lawngreen:"rgb(124, 252, 0)", lemonchiffon:"rgb(255, 250, 205)", lightblue:"rgb(173, 216, 230)", lightcoral:"rgb(240, 128, 128)", lightcyan:"rgb(224, 255, 255)", lightgoldenrodyellow:"rgb(250, 250, 210)", lightgray:"rgb(211, 211, 211)", lightgreen:"rgb(144, 238, 144)", lightgrey:"rgb(211, 211, 211)", lightpink:"rgb(255, 182, 193)", lightsalmon:"rgb(255, 160, 122)", lightseagreen:"rgb( 32, 178, 170)", lightskyblue:"rgb(135, 206, 250)", lightslategray:"rgb(119, 136, 153)", lightslategrey:"rgb(119, 136, 153)", lightsteelblue:"rgb(176, 196, 222)", lightyellow:"rgb(255, 255, 224)", lime:"rgb( 0, 255, 0)", limegreen:"rgb( 50, 205, 50)", linen:"rgb(250, 240, 230)", magenta:"rgb(255, 0, 255)", maroon:"rgb(128, 0, 0)", mediumaquamarine:"rgb(102, 205, 170)", mediumblue:"rgb( 0, 0, 205)", mediumorchid:"rgb(186, 85, 211)", mediumpurple:"rgb(147, 112, 219)", mediumseagreen:"rgb( 60, 179, 113)", mediumslateblue:"rgb(123, 104, 238)", mediumspringgreen:"rgb( 0, 250, 154)", mediumturquoise:"rgb( 72, 209, 204)", mediumvioletred:"rgb(199, 21, 133)", midnightblue:"rgb( 25, 25, 112)", mintcream:"rgb(245, 255, 250)", mistyrose:"rgb(255, 228, 225)", moccasin:"rgb(255, 228, 181)", navajowhite:"rgb(255, 222, 173)", navy:"rgb( 0, 0, 128)", oldlace:"rgb(253, 245, 230)", olive:"rgb(128, 128, 0)", olivedrab:"rgb(107, 142, 35)", orange:"rgb(255, 165, 0)", orangered:"rgb(255, 69, 0)", orchid:"rgb(218, 112, 214)", palegoldenrod:"rgb(238, 232, 170)", palegreen:"rgb(152, 251, 152)", paleturquoise:"rgb(175, 238, 238)", palevioletred:"rgb(219, 112, 147)", papayawhip:"rgb(255, 239, 213)", peachpuff:"rgb(255, 218, 185)", peru:"rgb(205, 133, 63)", pink:"rgb(255, 192, 203)", plum:"rgb(221, 160, 221)", powderblue:"rgb(176, 224, 230)", purple:"rgb(128, 0, 128)", red:"rgb(255, 0, 0)", rosybrown:"rgb(188, 143, 143)", royalblue:"rgb( 65, 105, 225)", saddlebrown:"rgb(139, 69, 19)", salmon:"rgb(250, 128, 114)", sandybrown:"rgb(244, 164, 96)", seagreen:"rgb( 46, 139, 87)", seashell:"rgb(255, 245, 238)", sienna:"rgb(160, 82, 45)", silver:"rgb(192, 192, 192)", skyblue:"rgb(135, 206, 235)", slateblue:"rgb(106, 90, 205)", slategray:"rgb(112, 128, 144)", slategrey:"rgb(112, 128, 144)", snow:"rgb(255, 250, 250)", springgreen:"rgb( 0, 255, 127)", steelblue:"rgb( 70, 130, 180)", tan:"rgb(210, 180, 140)", teal:"rgb( 0, 128, 128)", thistle:"rgb(216, 191, 216)", tomato:"rgb(255, 99, 71)", turquoise:"rgb( 64, 224, 208)", violet:"rgb(238, 130, 238)", wheat:"rgb(245, 222, 179)", white:"rgb(255, 255, 255)", whitesmoke:"rgb(245, 245, 245)", yellow:"rgb(255, 255, 0)", yellowgreen:"rgb(154, 205, 50)"}; H.jqplot.AxisLabelRenderer = function(ab){H.jqplot.ElemContainer.call(this); this.axis; this.show = true; this.label = ""; this.fontFamily = null; this.fontSize = null; this.textColor = null; this._elem; this.escapeHTML = false; H.extend(true, this, ab)}; H.jqplot.AxisLabelRenderer.prototype = new H.jqplot.ElemContainer(); H.jqplot.AxisLabelRenderer.prototype.constructor = H.jqplot.AxisLabelRenderer; H.jqplot.AxisLabelRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.AxisLabelRenderer.prototype.draw = function(ab, ac){if (this._elem){this._elem.emptyForce(); this._elem = null}this._elem = H('
'); if (Number(this.label)){this._elem.css("white-space", "nowrap")}if (!this.escapeHTML){this._elem.html(this.label)} else{this._elem.text(this.label)}if (this.fontFamily){this._elem.css("font-family", this.fontFamily)}if (this.fontSize){this._elem.css("font-size", this.fontSize)}if (this.textColor){this._elem.css("color", this.textColor)}return this._elem}; H.jqplot.AxisLabelRenderer.prototype.pack = function(){}; H.jqplot.AxisTickRenderer = function(ab){H.jqplot.ElemContainer.call(this); this.mark = "outside"; this.axis; this.showMark = true; this.showGridline = true; this.isMinorTick = false; this.size = 4; this.markSize = 6; this.show = true; this.showLabel = true; this.label = null; this.value = null; this._styles = {}; this.formatter = H.jqplot.DefaultTickFormatter; this.prefix = ""; this.suffix = ""; this.formatString = ""; this.fontFamily; this.fontSize; this.textColor; this.escapeHTML = false; this._elem; this._breakTick = false; H.extend(true, this, ab)}; H.jqplot.AxisTickRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.AxisTickRenderer.prototype = new H.jqplot.ElemContainer(); H.jqplot.AxisTickRenderer.prototype.constructor = H.jqplot.AxisTickRenderer; H.jqplot.AxisTickRenderer.prototype.setTick = function(ab, ad, ac){this.value = ab; this.axis = ad; if (ac){this.isMinorTick = true}return this}; H.jqplot.AxisTickRenderer.prototype.draw = function(){if (this.label === null){this.label = this.prefix + this.formatter(this.formatString, this.value) + this.suffix}var ac = {position:"absolute"}; if (Number(this.label)){ac.whitSpace = "nowrap"}if (this._elem){this._elem.emptyForce(); this._elem = null}this._elem = H(document.createElement("div")); this._elem.addClass("jqplot-" + this.axis + "-tick"); if (!this.escapeHTML){this._elem.html(this.label)} else{this._elem.text(this.label)}this._elem.css(ac); for (var ab in this._styles){this._elem.css(ab, this._styles[ab])}if (this.fontFamily){this._elem.css("font-family", this.fontFamily)}if (this.fontSize){this._elem.css("font-size", this.fontSize)}if (this.textColor){this._elem.css("color", this.textColor)}if (this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem}; H.jqplot.DefaultTickFormatter = function(ab, ac){if (typeof ac == "number"){if (!ab){ab = H.jqplot.config.defaultTickFormatString}return H.jqplot.sprintf(ab, ac)} else{return String(ac)}}; H.jqplot.PercentTickFormatter = function(ab, ac){if (typeof ac == "number"){ac = 100 * ac; if (!ab){ab = H.jqplot.config.defaultTickFormatString}return H.jqplot.sprintf(ab, ac)} else{return String(ac)}}; H.jqplot.AxisTickRenderer.prototype.pack = function(){}; H.jqplot.CanvasGridRenderer = function(){this.shadowRenderer = new H.jqplot.ShadowRenderer()}; H.jqplot.CanvasGridRenderer.prototype.init = function(ac){this._ctx; H.extend(true, this, ac); var ab = {lineJoin:"miter", lineCap:"round", fill:false, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.shadowWidth, closePath:false, strokeStyle:this.shadowColor}; this.renderer.shadowRenderer.init(ab)}; H.jqplot.CanvasGridRenderer.prototype.createElement = function(ae){var ad; if (this._elem){if (H.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== r){ad = this._elem.get(0); window.G_vmlCanvasManager.uninitElement(ad); ad = null}this._elem.emptyForce(); this._elem = null}ad = ae.canvasManager.getCanvas(); var ab = this._plotDimensions.width; var ac = this._plotDimensions.height; ad.width = ab; ad.height = ac; this._elem = H(ad); this._elem.addClass("jqplot-grid-canvas"); this._elem.css({position:"absolute", left:0, top:0}); ad = ae.canvasManager.initCanvas(ad); this._top = this._offsets.top; this._bottom = ac - this._offsets.bottom; this._left = this._offsets.left; this._right = ab - this._offsets.right; this._width = this._right - this._left; this._height = this._bottom - this._top; ad = null; return this._elem}; H.jqplot.CanvasGridRenderer.prototype.draw = function(){this._ctx = this._elem.get(0).getContext("2d"); var am = this._ctx; var ap = this._axes; am.save(); am.clearRect(0, 0, this._plotDimensions.width, this._plotDimensions.height); am.fillStyle = this.backgroundColor || this.background; am.fillRect(this._left, this._top, this._width, this._height); am.save(); am.lineJoin = "miter"; am.lineCap = "butt"; am.lineWidth = this.gridLineWidth; am.strokeStyle = this.gridLineColor; var at, ar, aj, ak; var ag = ["xaxis", "yaxis", "x2axis", "y2axis"]; for (var aq = 4; aq > 0; aq--){var aw = ag[aq - 1]; var ab = ap[aw]; var au = ab._ticks; var al = au.length; if (ab.show){if (ab.drawBaseline){var av = {}; if (ab.baselineWidth !== null){av.lineWidth = ab.baselineWidth}if (ab.baselineColor !== null){av.strokeStyle = ab.baselineColor}switch (aw){case"xaxis":ai(this._left, this._bottom, this._right, this._bottom, av); break; case"yaxis":ai(this._left, this._bottom, this._left, this._top, av); break; case"x2axis":ai(this._left, this._bottom, this._right, this._bottom, av); break; case"y2axis":ai(this._right, this._bottom, this._right, this._top, av); break}}for (var an = al; an > 0; an--){var ah = au[an - 1]; if (ah.show){var ae = Math.round(ab.u2p(ah.value)) + 0.5; switch (aw){case"xaxis":if (ah.showGridline && this.drawGridlines && ((!ah.isMinorTick && ab.drawMajorGridlines) || (ah.isMinorTick && ab.drawMinorGridlines))){ai(ae, this._top, ae, this._bottom)}if (ah.showMark && ah.mark && ((!ah.isMinorTick && ab.drawMajorTickMarks) || (ah.isMinorTick && ab.drawMinorTickMarks))){aj = ah.markSize; ak = ah.mark; var ae = Math.round(ab.u2p(ah.value)) + 0.5; switch (ak){case"outside":at = this._bottom; ar = this._bottom + aj; break; case"inside":at = this._bottom - aj; ar = this._bottom; break; case"cross":at = this._bottom - aj; ar = this._bottom + aj; break; default:at = this._bottom; ar = this._bottom + aj; break}if (this.shadow){this.renderer.shadowRenderer.draw(am, [[ae, at], [ae, ar]], {lineCap:"butt", lineWidth:this.gridLineWidth, offset:this.gridLineWidth * 0.75, depth:2, fill:false, closePath:false})}ai(ae, at, ae, ar)}break; case"yaxis":if (ah.showGridline && this.drawGridlines && ((!ah.isMinorTick && ab.drawMajorGridlines) || (ah.isMinorTick && ab.drawMinorGridlines))){ai(this._right, ae, this._left, ae)}if (ah.showMark && ah.mark && ((!ah.isMinorTick && ab.drawMajorTickMarks) || (ah.isMinorTick && ab.drawMinorTickMarks))){aj = ah.markSize; ak = ah.mark; var ae = Math.round(ab.u2p(ah.value)) + 0.5; switch (ak){case"outside":at = this._left - aj; ar = this._left; break; case"inside":at = this._left; ar = this._left + aj; break; case"cross":at = this._left - aj; ar = this._left + aj; break; default:at = this._left - aj; ar = this._left; break}if (this.shadow){this.renderer.shadowRenderer.draw(am, [[at, ae], [ar, ae]], {lineCap:"butt", lineWidth:this.gridLineWidth * 1.5, offset:this.gridLineWidth * 0.75, fill:false, closePath:false})}ai(at, ae, ar, ae, {strokeStyle:ab.borderColor})}break; case"x2axis":if (ah.showGridline && this.drawGridlines && ((!ah.isMinorTick && ab.drawMajorGridlines) || (ah.isMinorTick && ab.drawMinorGridlines))){ai(ae, this._bottom, ae, this._top)}if (ah.showMark && ah.mark && ((!ah.isMinorTick && ab.drawMajorTickMarks) || (ah.isMinorTick && ab.drawMinorTickMarks))){aj = ah.markSize; ak = ah.mark; var ae = Math.round(ab.u2p(ah.value)) + 0.5; switch (ak){case"outside":at = this._top - aj; ar = this._top; break; case"inside":at = this._top; ar = this._top + aj; break; case"cross":at = this._top - aj; ar = this._top + aj; break; default:at = this._top - aj; ar = this._top; break}if (this.shadow){this.renderer.shadowRenderer.draw(am, [[ae, at], [ae, ar]], {lineCap:"butt", lineWidth:this.gridLineWidth, offset:this.gridLineWidth * 0.75, depth:2, fill:false, closePath:false})}ai(ae, at, ae, ar)}break; case"y2axis":if (ah.showGridline && this.drawGridlines && ((!ah.isMinorTick && ab.drawMajorGridlines) || (ah.isMinorTick && ab.drawMinorGridlines))){ai(this._left, ae, this._right, ae)} +if (ah.showMark && ah.mark && ((!ah.isMinorTick && ab.drawMajorTickMarks) || (ah.isMinorTick && ab.drawMinorTickMarks))){ +aj = ah.markSize; ak = ah.mark; var ae = Math.round(ab.u2p(ah.value)) + 0.5; + switch (ak){case"outside":at = this._right; ar = this._right + aj; + break; case"inside":at = this._right - aj; ar = this._right; break; + case"cross":at = this._right - aj; ar = this._right + aj; + break; default:at = this._right; ar = this._right + aj; break} +if (this.shadow){this.renderer.shadowRenderer.draw(am, [[at, ae], [ar, ae]], { +lineCap:"butt", lineWidth:this.gridLineWidth * 1.5, offset:this.gridLineWidth * 0.75, fill:false, closePath:false})} +ai(at, ae, ar, ae, {strokeStyle:ab.borderColor})}break; default:break}}}ah = null}ab = null; au = null} +ag = ["y3axis", "y4axis", "y5axis", "y6axis", "y7axis", "y8axis", "y9axis", "yMidAxis"]; + for (var aq = 7; aq > 0; aq--){var ab = ap[ag[aq - 1]]; + var au = ab._ticks; if (ab.show){var ac = au[ab.numberTicks - 1]; + var af = au[0]; var ad = ab.getLeft(); + var ao = [[ad, ac.getTop() + ac.getHeight() / 2], [ad, af.getTop() + af.getHeight() / 2 + 1]]; + if (this.shadow){this.renderer.shadowRenderer.draw(am, ao, {lineCap:"butt", fill:false, closePath:false})}ai(ao[0][0], ao[0][1], ao[1][0], ao[1][1], {lineCap:"butt", strokeStyle:ab.borderColor, lineWidth:ab.borderWidth}); for (var an = au.length; an > 0; an--){var ah = au[an - 1]; aj = ah.markSize; ak = ah.mark; var ae = Math.round(ab.u2p(ah.value)) + 0.5; if (ah.showMark && ah.mark){switch (ak){case"outside":at = ad; ar = ad + aj; break; case"inside":at = ad - aj; ar = ad; break; case"cross":at = ad - aj; ar = ad + aj; break; default:at = ad; ar = ad + aj; break}ao = [[at, ae], [ar, ae]]; if (this.shadow){this.renderer.shadowRenderer.draw(am, ao, {lineCap:"butt", lineWidth:this.gridLineWidth * 1.5, offset:this.gridLineWidth * 0.75, fill:false, closePath:false})}ai(at, ae, ar, ae, {strokeStyle:ab.borderColor})}ah = null}af = null}ab = null; au = null}am.restore(); function ai(aB, aA, ay, ax, az){am.save(); az = az || {}; if (az.lineWidth == null || az.lineWidth != 0){H.extend(true, am, az); am.beginPath(); am.moveTo(aB, aA); am.lineTo(ay, ax); am.stroke(); am.restore()}}if (this.shadow){var ao = [[this._left, this._bottom], [this._right, this._bottom], [this._right, this._top]]; this.renderer.shadowRenderer.draw(am, ao)}if (this.borderWidth != 0 && this.drawBorder){ai(this._left, this._top, this._right, this._top, {lineCap:"round", strokeStyle:ap.x2axis.borderColor, lineWidth:ap.x2axis.borderWidth}); ai(this._right, this._top, this._right, this._bottom, {lineCap:"round", strokeStyle:ap.y2axis.borderColor, lineWidth:ap.y2axis.borderWidth}); ai(this._right, this._bottom, this._left, this._bottom, {lineCap:"round", strokeStyle:ap.xaxis.borderColor, lineWidth:ap.xaxis.borderWidth}); ai(this._left, this._bottom, this._left, this._top, {lineCap:"round", strokeStyle:ap.yaxis.borderColor, lineWidth:ap.yaxis.borderWidth})}am.restore(); am = null; ap = null}; H.jqplot.DivTitleRenderer = function(){}; H.jqplot.DivTitleRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.DivTitleRenderer.prototype.draw = function(){if (this._elem){this._elem.emptyForce(); this._elem = null}var ae = this.renderer; var ad = document.createElement("div"); this._elem = H(ad); this._elem.addClass("jqplot-title"); if (!this.text){this.show = false; this._elem.height(0); this._elem.width(0)} else{if (this.text){var ab; if (this.color){ab = this.color} else{if (this.textColor){ab = this.textColor}}var ac = {position:"absolute", top:"0px", left:"0px"}; if (this._plotWidth){ac.width = this._plotWidth + "px"}if (this.fontSize){ac.fontSize = this.fontSize}if (typeof this.textAlign === "string"){ac.textAlign = this.textAlign} else{ac.textAlign = "center"}if (ab){ac.color = ab}if (this.paddingBottom){ac.paddingBottom = this.paddingBottom}if (this.fontFamily){ac.fontFamily = this.fontFamily}this._elem.css(ac); if (this.escapeHtml){this._elem.text(this.text)} else{this._elem.html(this.text)}}}ad = null; return this._elem}; H.jqplot.DivTitleRenderer.prototype.pack = function(){}; var o = 0.1; H.jqplot.LinePattern = function(ap, ak){var aj = {dotted:[o, H.jqplot.config.dotGapLength], dashed:[H.jqplot.config.dashLength, H.jqplot.config.gapLength], solid:null}; if (typeof ak === "string"){if (ak[0] === "." || ak[0] === "-"){var aq = ak; ak = []; for (var ai = 0, af = aq.length; ai < af; ai++){if (aq[ai] === "."){ak.push(o)} else{if (aq[ai] === "-"){ak.push(H.jqplot.config.dashLength)} else{continue}}ak.push(H.jqplot.config.gapLength)}} else{ak = aj[ak]}}if (!(ak && ak.length)){return ap}var ae = 0; var al = ak[0]; var an = 0; var am = 0; var ah = 0; var ab = 0; var ao = function(ar, at){ap.moveTo(ar, at); an = ar; am = at; ah = ar; ab = at}; var ad = function(ar, ay){var aw = ap.lineWidth; var au = ar - an; var at = ay - am; var av = Math.sqrt(au * au + at * at); if ((av > 0) && (aw > 0)){au /= av; at /= av; while (true){var ax = aw * al; if (ax < av){an += ax * au; am += ax * at; if ((ae & 1) == 0){ap.lineTo(an, am)} else{ap.moveTo(an, am)}av -= ax; ae++; if (ae >= ak.length){ae = 0}al = ak[ae]} else{an = ar; am = ay; if ((ae & 1) == 0){ap.lineTo(an, am)} else{ap.moveTo(an, am)}al -= av / aw; break}}}}; var ac = function(){ap.beginPath()}; var ag = function(){ad(ah, ab)}; return{moveTo:ao, lineTo:ad, beginPath:ac, closePath:ag}}; H.jqplot.LineRenderer = function(){this.shapeRenderer = new H.jqplot.ShapeRenderer(); this.shadowRenderer = new H.jqplot.ShadowRenderer()}; H.jqplot.LineRenderer.prototype.init = function(ac, ah){ac = ac || {}; this._type = "line"; this.renderer.animation = {show:false, direction:"left", speed:2500, _supported:true}; this.renderer.smooth = false; this.renderer.tension = null; this.renderer.constrainSmoothing = true; this.renderer._smoothedData = []; this.renderer._smoothedPlotData = []; this.renderer._hiBandGridData = []; this.renderer._lowBandGridData = []; this.renderer._hiBandSmoothedData = []; this.renderer._lowBandSmoothedData = []; this.renderer.bandData = []; this.renderer.bands = {show:false, hiData:[], lowData:[], color:this.color, showLines:false, fill:true, fillColor:null, _min:null, _max:null, interval:"3%"}; var af = {highlightMouseOver:ac.highlightMouseOver, highlightMouseDown:ac.highlightMouseDown, highlightColor:ac.highlightColor}; delete (ac.highlightMouseOver); delete (ac.highlightMouseDown); delete (ac.highlightColor); H.extend(true, this.renderer, ac); this.renderer.options = ac; if (this.renderer.bandData.length > 1 && (!ac.bands || ac.bands.show == null)){this.renderer.bands.show = true} else{if (ac.bands && ac.bands.show == null && ac.bands.interval != null){this.renderer.bands.show = true}}if (this.fill){this.renderer.bands.show = false}if (this.renderer.bands.show){this.renderer.initBands.call(this, this.renderer.options, ah)}if (this._stack){this.renderer.smooth = false}var ag = {lineJoin:this.lineJoin, lineCap:this.lineCap, fill:this.fill, isarc:false, strokeStyle:this.color, fillStyle:this.fillColor, lineWidth:this.lineWidth, linePattern:this.linePattern, closePath:this.fill}; this.renderer.shapeRenderer.init(ag); var ad = ac.shadowOffset; if (ad == null){if (this.lineWidth > 2.5){ad = 1.25 * (1 + (Math.atan((this.lineWidth / 2.5)) / 0.785398163 - 1) * 0.6)} else{ad = 1.25 * Math.atan((this.lineWidth / 2.5)) / 0.785398163}}var ab = {lineJoin:this.lineJoin, lineCap:this.lineCap, fill:this.fill, isarc:false, angle:this.shadowAngle, offset:ad, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.lineWidth, linePattern:this.linePattern, closePath:this.fill}; this.renderer.shadowRenderer.init(ab); this._areaPoints = []; this._boundingBox = [[], []]; if (!this.isTrendline && this.fill || this.renderer.bands.show){this.highlightMouseOver = true; this.highlightMouseDown = false; this.highlightColor = null; if (af.highlightMouseDown && af.highlightMouseOver == null){af.highlightMouseOver = false}H.extend(true, this, {highlightMouseOver:af.highlightMouseOver, highlightMouseDown:af.highlightMouseDown, highlightColor:af.highlightColor}); if (!this.highlightColor){var ae = (this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor; this.highlightColor = H.jqplot.computeHighlightColors(ae)}if (this.highlighter){this.highlighter.show = false}}if (!this.isTrendline && ah){ah.plugins.lineRenderer = {}; ah.postInitHooks.addOnce(v); ah.postDrawHooks.addOnce(Z); ah.eventListenerHooks.addOnce("jqplotMouseMove", g); ah.eventListenerHooks.addOnce("jqplotMouseDown", d); ah.eventListenerHooks.addOnce("jqplotMouseUp", Y); ah.eventListenerHooks.addOnce("jqplotClick", f); ah.eventListenerHooks.addOnce("jqplotRightClick", p)}}; H.jqplot.LineRenderer.prototype.initBands = function(ae, ao){var af = ae.bandData || []; var ah = this.renderer.bands; ah.hiData = []; ah.lowData = []; var av = this.data; ah._max = null; ah._min = null; if (af.length == 2){if (H.isArray(af[0][0])){var ai; var ab = 0, al = 0; for (var ap = 0, am = af[0].length; ap < am; ap++){ai = af[0][ap]; if ((ai[1] != null && ai[1] > ah._max) || ah._max == null){ah._max = ai[1]}if ((ai[1] != null && ai[1] < ah._min) || ah._min == null){ah._min = ai[1]}}for (var ap = 0, am = af[1].length; ap < am; ap++){ai = af[1][ap]; if ((ai[1] != null && ai[1] > ah._max) || ah._max == null){ah._max = ai[1]; al = 1}if ((ai[1] != null && ai[1] < ah._min) || ah._min == null){ah._min = ai[1]; ab = 1}}if (al === ab){ah.show = false}ah.hiData = af[al]; ah.lowData = af[ab]} else{if (af[0].length === av.length && af[1].length === av.length){var ad = (af[0][0] > af[1][0])?0:1; var aw = (ad)?0:1; for (var ap = 0, am = av.length; ap < am; ap++){ah.hiData.push([av[ap][0], af[ad][ap]]); ah.lowData.push([av[ap][0], af[aw][ap]])}} else{ah.show = false}}} else{if (af.length > 2 && !H.isArray(af[0][0])){var ad = (af[0][0] > af[0][1])?0:1; var aw = (ad)?0:1; for (var ap = 0, am = af.length; ap < am; ap++){ah.hiData.push([av[ap][0], af[ap][ad]]); ah.lowData.push([av[ap][0], af[ap][aw]])}} else{var ak = ah.interval; var au = null; var at = null; var ac = null; var an = null; if (H.isArray(ak)){au = ak[0]; at = ak[1]} else{au = ak}if (isNaN(au)){if (au.charAt(au.length - 1) === "%"){ac = "multiply"; au = parseFloat(au) / 100 + 1}} else{au = parseFloat(au); ac = "add"}if (at !== null && isNaN(at)){if (at.charAt(at.length - 1) === "%"){an = "multiply"; at = parseFloat(at) / 100 + 1}} else{if (at !== null){at = parseFloat(at); an = "add"}}if (au !== null){if (at === null){at = - au; an = ac; if (an === "multiply"){at += 2}}if (au < at){var aq = au; au = at; at = aq; aq = ac; ac = an; an = aq}for (var ap = 0, am = av.length; ap < am; ap++){switch (ac){case"add":ah.hiData.push([av[ap][0], av[ap][1] + au]); break; case"multiply":ah.hiData.push([av[ap][0], av[ap][1] * au]); break}switch (an){case"add":ah.lowData.push([av[ap][0], av[ap][1] + at]); break; case"multiply":ah.lowData.push([av[ap][0], av[ap][1] * at]); break}}} else{ah.show = false}}}var ag = ah.hiData; var aj = ah.lowData; for (var ap = 0, am = ag.length; ap < am; ap++){if ((ag[ap][1] != null && ag[ap][1] > ah._max) || ah._max == null){ah._max = ag[ap][1]}}for (var ap = 0, am = aj.length; ap < am; ap++){if ((aj[ap][1] != null && aj[ap][1] < ah._min) || ah._min == null){ah._min = aj[ap][1]}}if (ah.fillColor === null){var ar = H.jqplot.getColorComponents(ah.color); ar[3] = ar[3] * 0.5; ah.fillColor = "rgba(" + ar[0] + ", " + ar[1] + ", " + ar[2] + ", " + ar[3] + ")"}}; function G(ac, ab){return(3.4182054 + ab) * Math.pow(ac, - 0.3534992)}function k(ad, ac){var ab = Math.sqrt(Math.pow((ac[0] - ad[0]), 2) + Math.pow((ac[1] - ad[1]), 2)); return 5.7648 * Math.log(ab) + 7.4456}function w(ab){var ac = (Math.exp(2 * ab) - 1) / (Math.exp(2 * ab) + 1); return ac}function F(aD){var am = this.renderer.smooth; var ax = this.canvas.getWidth(); var ah = this._xaxis.series_p2u; var aA = this._yaxis.series_p2u; var az = null; var ag = null; var at = aD.length / ax; var ad = []; var ar = []; if (!isNaN(parseFloat(am))){az = parseFloat(am)} else{az = G(at, 0.5)}var ap = []; var ae = []; for (var ay = 0, au = aD.length; ay < au; ay++){ap.push(aD[ay][1]); ae.push(aD[ay][0])}function ao(aE, aF){if (aE - aF == 0){return Math.pow(10, 10)} else{return aE - aF}}var aq, al, ak, aj; var ab = aD.length - 1; for (var af = 1, av = aD.length; af < av; af++){var ac = []; var an = []; for (var aw = 0; aw < 2; aw++){var ay = af - 1 + aw; if (ay == 0 || ay == ab){ac[aw] = Math.pow(10, 10)} else{if (ap[ay + 1] - ap[ay] == 0 || ap[ay] - ap[ay - 1] == 0){ac[aw] = 0} else{if (((ae[ay + 1] - ae[ay]) / (ap[ay + 1] - ap[ay]) + (ae[ay] - ae[ay - 1]) / (ap[ay] - ap[ay - 1])) == 0){ac[aw] = 0} else{if ((ap[ay + 1] - ap[ay]) * (ap[ay] - ap[ay - 1]) < 0){ac[aw] = 0} else{ac[aw] = 2 / (ao(ae[ay + 1], ae[ay]) / (ap[ay + 1] - ap[ay]) + ao(ae[ay], ae[ay - 1]) / (ap[ay] - ap[ay - 1]))}}}}}if (af == 1){ac[0] = 3 / 2 * (ap[1] - ap[0]) / ao(ae[1], ae[0]) - ac[1] / 2} else{if (af == ab){ac[1] = 3 / 2 * (ap[ab] - ap[ab - 1]) / ao(ae[ab], ae[ab - 1]) - ac[0] / 2}}an[0] = - 2 * (ac[1] + 2 * ac[0]) / ao(ae[af], ae[af - 1]) + 6 * (ap[af] - ap[af - 1]) / Math.pow(ao(ae[af], ae[af - 1]), 2); an[1] = 2 * (2 * ac[1] + ac[0]) / ao(ae[af], ae[af - 1]) - 6 * (ap[af] - ap[af - 1]) / Math.pow(ao(ae[af], ae[af - 1]), 2); aj = 1 / 6 * (an[1] - an[0]) / ao(ae[af], ae[af - 1]); ak = 1 / 2 * (ae[af] * an[0] - ae[af - 1] * an[1]) / ao(ae[af], ae[af - 1]); al = (ap[af] - ap[af - 1] - ak * (Math.pow(ae[af], 2) - Math.pow(ae[af - 1], 2)) - aj * (Math.pow(ae[af], 3) - Math.pow(ae[af - 1], 3))) / ao(ae[af], ae[af - 1]); aq = ap[af - 1] - al * ae[af - 1] - ak * Math.pow(ae[af - 1], 2) - aj * Math.pow(ae[af - 1], 3); var aC = (ae[af] - ae[af - 1]) / az; var aB, ai; for (var aw = 0, au = az; aw < au; aw++){aB = []; ai = ae[af - 1] + aw * aC; aB.push(ai); aB.push(aq + al * ai + ak * Math.pow(ai, 2) + aj * Math.pow(ai, 3)); ad.push(aB); ar.push([ah(aB[0]), aA(aB[1])])}}ad.push(aD[ay]); ar.push([ah(aD[ay][0]), aA(aD[ay][1])]); return[ad, ar]}function B(aj){var ai = this.renderer.smooth; var aO = this.renderer.tension; var ab = this.canvas.getWidth(); var aB = this._xaxis.series_p2u; var ak = this._yaxis.series_p2u; var aC = null; var aD = null; var aN = null; var aI = null; var aG = null; var am = null; var aL = null; var ag = null; var aE, aF, ax, aw, au, ar; var ae, ac, ao, an; var av, at, aH; var ap = []; var ad = []; var af = aj.length / ab; var aM, aq, az, aA, ay; var al = []; var ah = []; if (!isNaN(parseFloat(ai))){aC = parseFloat(ai)} else{aC = G(af, 0.5)}if (!isNaN(parseFloat(aO))){aO = parseFloat(aO)}for (var aK = 0, aJ = aj.length - 1; aK < aJ; aK++){if (aO === null){am = Math.abs((aj[aK + 1][1] - aj[aK][1]) / (aj[aK + 1][0] - aj[aK][0])); aM = 0.3; aq = 0.6; az = (aq - aM) / 2; aA = 2.5; ay = - 1.4; ag = am / aA + ay; aI = az * w(ag) - az * w(ay) + aM; if (aK > 0){aL = Math.abs((aj[aK][1] - aj[aK - 1][1]) / (aj[aK][0] - aj[aK - 1][0]))}ag = aL / aA + ay; aG = az * w(ag) - az * w(ay) + aM; aN = (aI + aG) / 2} else{aN = aO}for (aE = 0; aE < aC; aE++){aF = aE / aC; ax = (1 + 2 * aF) * Math.pow((1 - aF), 2); aw = aF * Math.pow((1 - aF), 2); au = Math.pow(aF, 2) * (3 - 2 * aF); ar = Math.pow(aF, 2) * (aF - 1); if (aj[aK - 1]){ae = aN * (aj[aK + 1][0] - aj[aK - 1][0]); ac = aN * (aj[aK + 1][1] - aj[aK - 1][1])} else{ae = aN * (aj[aK + 1][0] - aj[aK][0]); ac = aN * (aj[aK + 1][1] - aj[aK][1])}if (aj[aK + 2]){ao = aN * (aj[aK + 2][0] - aj[aK][0]); an = aN * (aj[aK + 2][1] - aj[aK][1])} else{ao = aN * (aj[aK + 1][0] - aj[aK][0]); an = aN * (aj[aK + 1][1] - aj[aK][1])}av = ax * aj[aK][0] + au * aj[aK + 1][0] + aw * ae + ar * ao; at = ax * aj[aK][1] + au * aj[aK + 1][1] + aw * ac + ar * an; aH = [av, at]; al.push(aH); ah.push([aB(av), ak(at)])}}al.push(aj[aJ]); ah.push([aB(aj[aJ][0]), ak(aj[aJ][1])]); return[al, ah]}H.jqplot.LineRenderer.prototype.setGridData = function(aj){var af = this._xaxis.series_u2p; var ab = this._yaxis.series_u2p; var ag = this._plotData; var ak = this._prevPlotData; this.gridData = []; this._prevGridData = []; this.renderer._smoothedData = []; this.renderer._smoothedPlotData = []; this.renderer._hiBandGridData = []; this.renderer._lowBandGridData = []; this.renderer._hiBandSmoothedData = []; this.renderer._lowBandSmoothedData = []; var ae = this.renderer.bands; var ac = false; for (var ah = 0, ad = ag.length; ah < ad; ah++){if (ag[ah][0] != null && ag[ah][1] != null){this.gridData.push([af.call(this._xaxis, ag[ah][0]), ab.call(this._yaxis, ag[ah][1])])} else{if (ag[ah][0] == null){ac = true; this.gridData.push([null, ab.call(this._yaxis, ag[ah][1])])} else{if (ag[ah][1] == null){ac = true; this.gridData.push([af.call(this._xaxis, ag[ah][0]), null])}}}if (ak[ah] != null && ak[ah][0] != null && ak[ah][1] != null){this._prevGridData.push([af.call(this._xaxis, ak[ah][0]), ab.call(this._yaxis, ak[ah][1])])} else{if (ak[ah] != null && ak[ah][0] == null){this._prevGridData.push([null, ab.call(this._yaxis, ak[ah][1])])} else{if (ak[ah] != null && ak[ah][0] != null && ak[ah][1] == null){this._prevGridData.push([af.call(this._xaxis, ak[ah][0]), null])}}}}if (ac){this.renderer.smooth = false; if (this._type === "line"){ae.show = false}}if (this._type === "line" && ae.show){for (var ah = 0, ad = ae.hiData.length; ah < ad; ah++){this.renderer._hiBandGridData.push([af.call(this._xaxis, ae.hiData[ah][0]), ab.call(this._yaxis, ae.hiData[ah][1])])}for (var ah = 0, ad = ae.lowData.length; ah < ad; ah++){this.renderer._lowBandGridData.push([af.call(this._xaxis, ae.lowData[ah][0]), ab.call(this._yaxis, ae.lowData[ah][1])])}}if (this._type === "line" && this.renderer.smooth && this.gridData.length > 2){var ai; if (this.renderer.constrainSmoothing){ai = F.call(this, this.gridData); this.renderer._smoothedData = ai[0]; this.renderer._smoothedPlotData = ai[1]; if (ae.show){ai = F.call(this, this.renderer._hiBandGridData); this.renderer._hiBandSmoothedData = ai[0]; ai = F.call(this, this.renderer._lowBandGridData); this.renderer._lowBandSmoothedData = ai[0]}ai = null} else{ai = B.call(this, this.gridData); this.renderer._smoothedData = ai[0]; this.renderer._smoothedPlotData = ai[1]; if (ae.show){ai = B.call(this, this.renderer._hiBandGridData); this.renderer._hiBandSmoothedData = ai[0]; ai = B.call(this, this.renderer._lowBandGridData); this.renderer._lowBandSmoothedData = ai[0]}ai = null}}}; H.jqplot.LineRenderer.prototype.makeGridData = function(ai, ak){var ag = this._xaxis.series_u2p; var ab = this._yaxis.series_u2p; var al = []; var ad = []; this.renderer._smoothedData = []; this.renderer._smoothedPlotData = []; this.renderer._hiBandGridData = []; this.renderer._lowBandGridData = []; this.renderer._hiBandSmoothedData = []; this.renderer._lowBandSmoothedData = []; var af = this.renderer.bands; var ac = false; for (var ah = 0; ah < ai.length; ah++){if (ai[ah][0] != null && ai[ah][1] != null){al.push([ag.call(this._xaxis, ai[ah][0]), ab.call(this._yaxis, ai[ah][1])])} else{if (ai[ah][0] == null){ac = true; al.push([null, ab.call(this._yaxis, ai[ah][1])])} else{if (ai[ah][1] == null){ac = true; al.push([ag.call(this._xaxis, ai[ah][0]), null])}}}}if (ac){this.renderer.smooth = false; if (this._type === "line"){af.show = false}}if (this._type === "line" && af.show){for (var ah = 0, ae = af.hiData.length; ah < ae; ah++){this.renderer._hiBandGridData.push([ag.call(this._xaxis, af.hiData[ah][0]), ab.call(this._yaxis, af.hiData[ah][1])])}for (var ah = 0, ae = af.lowData.length; ah < ae; ah++){this.renderer._lowBandGridData.push([ag.call(this._xaxis, af.lowData[ah][0]), ab.call(this._yaxis, af.lowData[ah][1])])}}if (this._type === "line" && this.renderer.smooth && al.length > 2){var aj; if (this.renderer.constrainSmoothing){aj = F.call(this, al); this.renderer._smoothedData = aj[0]; this.renderer._smoothedPlotData = aj[1]; if (af.show){aj = F.call(this, this.renderer._hiBandGridData); this.renderer._hiBandSmoothedData = aj[0]; aj = F.call(this, this.renderer._lowBandGridData); this.renderer._lowBandSmoothedData = aj[0]}aj = null} else{aj = B.call(this, al); this.renderer._smoothedData = aj[0]; this.renderer._smoothedPlotData = aj[1]; if (af.show){aj = B.call(this, this.renderer._hiBandGridData); this.renderer._hiBandSmoothedData = aj[0]; aj = B.call(this, this.renderer._lowBandGridData); this.renderer._lowBandSmoothedData = aj[0]}aj = null}}return al}; H.jqplot.LineRenderer.prototype.draw = function(aq, aC, ac, av){var aw; var ak = H.extend(true, {}, ac); var ae = (ak.shadow != r)?ak.shadow:this.shadow; var aD = (ak.showLine != r)?ak.showLine:this.showLine; var au = (ak.fill != r)?ak.fill:this.fill; var ab = (ak.fillAndStroke != r)?ak.fillAndStroke:this.fillAndStroke; var al, ar, ao, ay; aq.save(); if (aC.length){if (aD){if (au){if (this.fillToZero){var az = this.negativeColor; if (!this.useNegativeColors){az = ak.fillStyle}var ai = false; var aj = ak.fillStyle; if (ab){var aB = aC.slice(0)}if (this.index == 0 || !this._stack){var ap = []; var aF = (this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData; this._areaPoints = []; var aA = this._yaxis.series_u2p(this.fillToValue); var ad = this._xaxis.series_u2p(this.fillToValue); ak.closePath = true; if (this.fillAxis == "y"){ap.push([aC[0][0], aA]); this._areaPoints.push([aC[0][0], aA]); for (var aw = 0; aw < aC.length - 1; aw++){ap.push(aC[aw]); this._areaPoints.push(aC[aw]); if (aF[aw][1] * aF[aw + 1][1] < 0){if (aF[aw][1] < 0){ai = true; ak.fillStyle = az} else{ai = false; ak.fillStyle = aj}var ah = aC[aw][0] + (aC[aw + 1][0] - aC[aw][0]) * (aA - aC[aw][1]) / (aC[aw + 1][1] - aC[aw][1]); ap.push([ah, aA]); this._areaPoints.push([ah, aA]); if (ae){this.renderer.shadowRenderer.draw(aq, ap, ak)}this.renderer.shapeRenderer.draw(aq, ap, ak); ap = [[ah, aA]]}}if (aF[aC.length - 1][1] < 0){ai = true; ak.fillStyle = az} else{ai = false; ak.fillStyle = aj}ap.push(aC[aC.length - 1]); this._areaPoints.push(aC[aC.length - 1]); ap.push([aC[aC.length - 1][0], aA]); this._areaPoints.push([aC[aC.length - 1][0], aA])}if (ae){this.renderer.shadowRenderer.draw(aq, ap, ak)}this.renderer.shapeRenderer.draw(aq, ap, ak)} else{var an = this._prevGridData; for (var aw = an.length; aw > 0; aw--){aC.push(an[aw - 1])}if (ae){this.renderer.shadowRenderer.draw(aq, aC, ak)}this._areaPoints = aC; this.renderer.shapeRenderer.draw(aq, aC, ak)}} else{if (ab){var aB = aC.slice(0)}if (this.index == 0 || !this._stack){var af = aq.canvas.height; aC.unshift([aC[0][0], af]); var ax = aC.length; aC.push([aC[ax - 1][0], af])} else{var an = this._prevGridData; for (var aw = an.length; aw > 0; aw--){aC.push(an[aw - 1])}}this._areaPoints = aC; if (ae){this.renderer.shadowRenderer.draw(aq, aC, ak)}this.renderer.shapeRenderer.draw(aq, aC, ak)}if (ab){var at = H.extend(true, {}, ak, {fill:false, closePath:false}); this.renderer.shapeRenderer.draw(aq, aB, at); if (this.markerRenderer.show){if (this.renderer.smooth){aB = this.gridData}for (aw = 0; aw < aB.length; aw++){this.markerRenderer.draw(aB[aw][0], aB[aw][1], aq, ak.markerOptions)}}}} else{if (this.renderer.bands.show){var ag; var aE = H.extend(true, {}, ak); if (this.renderer.bands.showLines){ag = (this.renderer.smooth)?this.renderer._hiBandSmoothedData:this.renderer._hiBandGridData; this.renderer.shapeRenderer.draw(aq, ag, ak); ag = (this.renderer.smooth)?this.renderer._lowBandSmoothedData:this.renderer._lowBandGridData; this.renderer.shapeRenderer.draw(aq, ag, aE)}if (this.renderer.bands.fill){if (this.renderer.smooth){ag = this.renderer._hiBandSmoothedData.concat(this.renderer._lowBandSmoothedData.reverse())} else{ag = this.renderer._hiBandGridData.concat(this.renderer._lowBandGridData.reverse())}this._areaPoints = ag; aE.closePath = true; aE.fill = true; aE.fillStyle = this.renderer.bands.fillColor; this.renderer.shapeRenderer.draw(aq, ag, aE)}}if (ae){this.renderer.shadowRenderer.draw(aq, aC, ak)}this.renderer.shapeRenderer.draw(aq, aC, ak)}}var al = ao = ar = ay = null; for (aw = 0; aw < this._areaPoints.length; aw++){var am = this._areaPoints[aw]; if (al > am[0] || al == null){al = am[0]}if (ay < am[1] || ay == null){ay = am[1]}if (ao < am[0] || ao == null){ao = am[0]}if (ar > am[1] || ar == null){ar = am[1]}}if (this.type === "line" && this.renderer.bands.show){ay = this._yaxis.series_u2p(this.renderer.bands._min); ar = this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox = [[al, ay], [ao, ar]]; if (this.markerRenderer.show && !au){if (this.renderer.smooth){aC = this.gridData}for (aw = 0; aw < aC.length; aw++){if (aC[aw][0] != null && aC[aw][1] != null){this.markerRenderer.draw(aC[aw][0], aC[aw][1], aq, ak.markerOptions)}}}}aq.restore()}; H.jqplot.LineRenderer.prototype.drawShadow = function(ab, ad, ac){}; function v(ae, ad, ab){for (var ac = 0; ac < this.series.length; ac++){if (this.series[ac].renderer.constructor == H.jqplot.LineRenderer){if (this.series[ac].highlightMouseOver){this.series[ac].highlightMouseDown = false}}}}function Z(){if (this.plugins.lineRenderer && this.plugins.lineRenderer.highlightCanvas){this.plugins.lineRenderer.highlightCanvas.resetCanvas(); this.plugins.lineRenderer.highlightCanvas = null}this.plugins.lineRenderer.highlightedSeriesIndex = null; this.plugins.lineRenderer.highlightCanvas = new H.jqplot.GenericCanvas(); this.eventCanvas._elem.before(this.plugins.lineRenderer.highlightCanvas.createElement(this._gridPadding, "jqplot-lineRenderer-highlight-canvas", this._plotDimensions, this)); this.plugins.lineRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind("mouseleave", {plot:this}, function(ab){V(ab.data.plot)})}function X(ah, ag, ae, ad){var ac = ah.series[ag]; var ab = ah.plugins.lineRenderer.highlightCanvas; ab._ctx.clearRect(0, 0, ab._ctx.canvas.width, ab._ctx.canvas.height); ac._highlightedPoint = ae; ah.plugins.lineRenderer.highlightedSeriesIndex = ag; var af = {fillStyle:ac.highlightColor}; if (ac.type === "line" && ac.renderer.bands.show){af.fill = true; af.closePath = true}ac.renderer.shapeRenderer.draw(ab._ctx, ad, af); ab = null}function V(ad){var ab = ad.plugins.lineRenderer.highlightCanvas; ab._ctx.clearRect(0, 0, ab._ctx.canvas.width, ab._ctx.canvas.height); for (var ac = 0; ac < ad.series.length; ac++){ad.series[ac]._highlightedPoint = null}ad.plugins.lineRenderer.highlightedSeriesIndex = null; ad.target.trigger("jqplotDataUnhighlight"); ab = null}function g(af, ae, ai, ah, ag){if (ah){var ad = [ah.seriesIndex, ah.pointIndex, ah.data]; var ac = jQuery.Event("jqplotDataMouseOver"); ac.pageX = af.pageX; ac.pageY = af.pageY; ag.target.trigger(ac, ad); if (ag.series[ad[0]].highlightMouseOver && !(ad[0] == ag.plugins.lineRenderer.highlightedSeriesIndex)){var ab = jQuery.Event("jqplotDataHighlight"); ab.which = af.which; ab.pageX = af.pageX; ab.pageY = af.pageY; ag.target.trigger(ab, ad); X(ag, ah.seriesIndex, ah.pointIndex, ah.points)}} else{if (ah == null){V(ag)}}}function d(ae, ad, ah, ag, af){if (ag){var ac = [ag.seriesIndex, ag.pointIndex, ag.data]; if (af.series[ac[0]].highlightMouseDown && !(ac[0] == af.plugins.lineRenderer.highlightedSeriesIndex)){var ab = jQuery.Event("jqplotDataHighlight"); ab.which = ae.which; ab.pageX = ae.pageX; ab.pageY = ae.pageY; af.target.trigger(ab, ac); X(af, ag.seriesIndex, ag.pointIndex, ag.points)}} else{if (ag == null){V(af)}}}function Y(ad, ac, ag, af, ae){var ab = ae.plugins.lineRenderer.highlightedSeriesIndex; if (ab != null && ae.series[ab].highlightMouseDown){V(ae)}}function f(ae, ad, ah, ag, af){if (ag){var ac = [ag.seriesIndex, ag.pointIndex, ag.data]; var ab = jQuery.Event("jqplotDataClick"); ab.which = ae.which; ab.pageX = ae.pageX; ab.pageY = ae.pageY; af.target.trigger(ab, ac)}}function p(af, ae, ai, ah, ag){if (ah){var ad = [ah.seriesIndex, ah.pointIndex, ah.data]; var ab = ag.plugins.lineRenderer.highlightedSeriesIndex; if (ab != null && ag.series[ab].highlightMouseDown){V(ag)}var ac = jQuery.Event("jqplotDataRightClick"); ac.which = af.which; ac.pageX = af.pageX; ac.pageY = af.pageY; ag.target.trigger(ac, ad)}}H.jqplot.LinearAxisRenderer = function(){}; H.jqplot.LinearAxisRenderer.prototype.init = function(ab){this.breakPoints = null; this.breakTickLabel = "≈"; this.drawBaseline = true; this.baselineWidth = null; this.baselineColor = null; this.forceTickAt0 = false; this.forceTickAt100 = false; this.tickInset = 0; this.minorTicks = 0; this.alignTicks = false; this._autoFormatString = ""; this._overrideFormatString = false; this._scalefact = 1; H.extend(true, this, ab); if (this.breakPoints){if (!H.isArray(this.breakPoints)){this.breakPoints = null} else{if (this.breakPoints.length < 2 || this.breakPoints[1] <= this.breakPoints[0]){this.breakPoints = null}}}if (this.numberTicks != null && this.numberTicks < 2){this.numberTicks = 2}this.resetDataBounds()}; H.jqplot.LinearAxisRenderer.prototype.draw = function(ab, ai){if (this.show){this.renderer.createTicks.call(this, ai); var ah = 0; var ac; if (this._elem){this._elem.emptyForce(); this._elem = null}this._elem = H(document.createElement("div")); this._elem.addClass("jqplot-axis jqplot-" + this.name); this._elem.css("position", "absolute"); if (this.name == "xaxis" || this.name == "x2axis"){this._elem.width(this._plotDimensions.width)} else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis = this.name; this._label = new this.labelRenderer(this.labelOptions); if (this._label.show){var ag = this._label.draw(ab, ai); ag.appendTo(this._elem); ag = null}var af = this._ticks; var ae; for (var ad = 0; ad < af.length; ad++){ae = af[ad]; if (ae.show && ae.showLabel && (!ae.isMinorTick || this.showMinorTicks)){this._elem.append(ae.draw(ab, ai))}}ae = null; af = null}return this._elem}; H.jqplot.LinearAxisRenderer.prototype.reset = function(){this.min = this._options.min; this.max = this._options.max; this.tickInterval = this._options.tickInterval; this.numberTicks = this._options.numberTicks; this._autoFormatString = ""; if (this._overrideFormatString && this.tickOptions && this.tickOptions.formatString){this.tickOptions.formatString = ""}}; H.jqplot.LinearAxisRenderer.prototype.set = function(){var ai = 0; var ad; var ac = 0; var ah = 0; var ab = (this._label == null)?false:this._label.show; if (this.show){var ag = this._ticks; var af; for (var ae = 0; ae < ag.length; ae++){af = ag[ae]; if (!af._breakTick && af.show && af.showLabel && (!af.isMinorTick || this.showMinorTicks)){if (this.name == "xaxis" || this.name == "x2axis"){ad = af._elem.outerHeight(true)} else{ad = af._elem.outerWidth(true)}if (ad > ai){ai = ad}}}af = null; ag = null; if (ab){ac = this._label._elem.outerWidth(true); ah = this._label._elem.outerHeight(true)}if (this.name == "xaxis"){ai = ai + ah; this._elem.css({height:ai + "px", left:"0px", bottom:"0px"})} else{if (this.name == "x2axis"){ai = ai + ah; this._elem.css({height:ai + "px", left:"0px", top:"0px"})} else{if (this.name == "yaxis"){ai = ai + ac; this._elem.css({width:ai + "px", left:"0px", top:"0px"}); if (ab && this._label.constructor == H.jqplot.AxisLabelRenderer){this._label._elem.css("width", ac + "px")}} else{ai = ai + ac; this._elem.css({width:ai + "px", right:"0px", top:"0px"}); if (ab && this._label.constructor == H.jqplot.AxisLabelRenderer){this._label._elem.css("width", ac + "px")}}}}}}; H.jqplot.LinearAxisRenderer.prototype.createTicks = function(ad){var aN = this._ticks; var aE = this.ticks; var at = this.name; var av = this._dataBounds; var ab = (this.name.charAt(0) === "x")?this._plotDimensions.width:this._plotDimensions.height; var ah; var a0, aC; var aj, ai; var aY, aU; var aB = this.min; var aZ = this.max; var aQ = this.numberTicks; var a4 = this.tickInterval; var ag = 30; this._scalefact = (Math.max(ab, ag + 1) - ag) / 300; if (aE.length){for (aU = 0; aU < aE.length; aU++){var aI = aE[aU]; var aO = new this.tickRenderer(this.tickOptions); if (H.isArray(aI)){aO.value = aI[0]; if (this.breakPoints){if (aI[0] == this.breakPoints[0]){aO.label = this.breakTickLabel; aO._breakTick = true; aO.showGridline = false; aO.showMark = false} else{if (aI[0] > this.breakPoints[0] && aI[0] <= this.breakPoints[1]){aO.show = false; aO.showGridline = false; aO.label = aI[1]} else{aO.label = aI[1]}}} else{aO.label = aI[1]}aO.setTick(aI[0], this.name); this._ticks.push(aO)} else{if (H.isPlainObject(aI)){H.extend(true, aO, aI); aO.axis = this.name; this._ticks.push(aO)} else{aO.value = aI; if (this.breakPoints){if (aI == this.breakPoints[0]){aO.label = this.breakTickLabel; aO._breakTick = true; aO.showGridline = false; aO.showMark = false} else{if (aI > this.breakPoints[0] && aI <= this.breakPoints[1]){aO.show = false; aO.showGridline = false}}}aO.setTick(aI, this.name); this._ticks.push(aO)}}}this.numberTicks = aE.length; this.min = this._ticks[0].value; this.max = this._ticks[this.numberTicks - 1].value; this.tickInterval = (this.max - this.min) / (this.numberTicks - 1)} else{if (at == "xaxis" || at == "x2axis"){ab = this._plotDimensions.width} else{ab = this._plotDimensions.height}var aq = this.numberTicks; if (this.alignTicks){if (this.name === "x2axis" && ad.axes.xaxis.show){aq = ad.axes.xaxis.numberTicks} else{if (this.name.charAt(0) === "y" && this.name !== "yaxis" && this.name !== "yMidAxis" && ad.axes.yaxis.show){aq = ad.axes.yaxis.numberTicks}}}a0 = ((this.min != null)?this.min:av.min); aC = ((this.max != null)?this.max:av.max); var ao = aC - a0; var aM, ar; var am; if (this.tickOptions == null || !this.tickOptions.formatString){this._overrideFormatString = true}if (this.min == null || this.max == null && this.tickInterval == null && !this.autoscale){if (this.forceTickAt0){if (a0 > 0){a0 = 0}if (aC < 0){aC = 0}}if (this.forceTickAt100){if (a0 > 100){a0 = 100}if (aC < 100){aC = 100}}var ay = false, aV = false; if (this.min != null){ay = true} else{if (this.max != null){aV = true}}var aJ = H.jqplot.LinearTickGenerator(a0, aC, this._scalefact, aq, ay, aV); var ap = (this.min != null)?a0:a0 + ao * (this.padMin - 1); var aK = (this.max != null)?aC:aC - ao * (this.padMax - 1); if (a0 < ap || aC > aK){ap = (this.min != null)?a0:a0 - ao * (this.padMin - 1); aK = (this.max != null)?aC:aC + ao * (this.padMax - 1); aJ = H.jqplot.LinearTickGenerator(ap, aK, this._scalefact, aq, ay, aV)}this.min = aJ[0]; this.max = aJ[1]; this.numberTicks = aJ[2]; this._autoFormatString = aJ[3]; this.tickInterval = aJ[4]} else{if (a0 == aC){var ac = 0.05; if (a0 > 0){ac = Math.max(Math.log(a0) / Math.LN10, 0.05)}a0 -= ac; aC += ac}if (this.autoscale && this.min == null && this.max == null){var ae, af, al; var aw = false; var aH = false; var au = {min:null, max:null, average:null, stddev:null}; for (var aU = 0; aU < this._series.length; aU++){var aP = this._series[aU]; var ax = (aP.fillAxis == "x")?aP._xaxis.name:aP._yaxis.name; if (this.name == ax){var aL = aP._plotValues[aP.fillAxis]; var aA = aL[0]; var aW = aL[0]; for (var aT = 1; aT < aL.length; aT++){if (aL[aT] < aA){aA = aL[aT]} else{if (aL[aT] > aW){aW = aL[aT]}}}var an = (aW - aA) / aW; if (aP.renderer.constructor == H.jqplot.BarRenderer){if (aA >= 0 && (aP.fillToZero || an > 0.1)){aw = true} else{aw = false; if (aP.fill && aP.fillToZero && aA < 0 && aW > 0){aH = true} else{aH = false}}} else{if (aP.fill){if (aA >= 0 && (aP.fillToZero || an > 0.1)){aw = true} else{if (aA < 0 && aW > 0 && aP.fillToZero){aw = false; aH = true} else{aw = false; aH = false}}} else{if (aA < 0){aw = false}}}}}if (aw){this.numberTicks = 2 + Math.ceil((ab - (this.tickSpacing - 1)) / this.tickSpacing); this.min = 0; aB = 0; af = aC / (this.numberTicks - 1); am = Math.pow(10, Math.abs(Math.floor(Math.log(af) / Math.LN10))); if (af / am == parseInt(af / am, 10)){af += am}this.tickInterval = Math.ceil(af / am) * am; this.max = this.tickInterval * (this.numberTicks - 1)} else{if (aH){this.numberTicks = 2 + Math.ceil((ab - (this.tickSpacing - 1)) / this.tickSpacing); var aD = Math.ceil(Math.abs(a0) / ao * (this.numberTicks - 1)); var a3 = this.numberTicks - 1 - aD; af = Math.max(Math.abs(a0 / aD), Math.abs(aC / a3)); am = Math.pow(10, Math.abs(Math.floor(Math.log(af) / Math.LN10))); this.tickInterval = Math.ceil(af / am) * am; this.max = this.tickInterval * a3; this.min = - this.tickInterval * aD} else{if (this.numberTicks == null){if (this.tickInterval){this.numberTicks = 3 + Math.ceil(ao / this.tickInterval)} else{this.numberTicks = 2 + Math.ceil((ab - (this.tickSpacing - 1)) / this.tickSpacing)}}if (this.tickInterval == null){af = ao / (this.numberTicks - 1); if (af < 1){am = Math.pow(10, Math.abs(Math.floor(Math.log(af) / Math.LN10)))} else{am = 1}this.tickInterval = Math.ceil(af * am * this.pad) / am} else{am = 1 / this.tickInterval}ae = this.tickInterval * (this.numberTicks - 1); al = (ae - ao) / 2; if (this.min == null){this.min = Math.floor(am * (a0 - al)) / am}if (this.max == null){this.max = this.min + ae}}}var az = H.jqplot.getSignificantFigures(this.tickInterval); var aG; if (az.digitsLeft >= az.significantDigits){aG = "%d"} else{var am = Math.max(0, 5 - az.digitsLeft); am = Math.min(am, az.digitsRight); aG = "%." + am + "f"}this._autoFormatString = aG} else{aM = (this.min != null)?this.min:a0 - ao * (this.padMin - 1); ar = (this.max != null)?this.max:aC + ao * (this.padMax - 1); ao = ar - aM; if (this.numberTicks == null){if (this.tickInterval != null){this.numberTicks = Math.ceil((ar - aM) / this.tickInterval) + 1} else{if (ab > 100){this.numberTicks = parseInt(3 + (ab - 100) / 75, 10)} else{this.numberTicks = 2}}}if (this.tickInterval == null){this.tickInterval = ao / (this.numberTicks - 1)}if (this.max == null){ar = aM + this.tickInterval * (this.numberTicks - 1)}if (this.min == null){aM = ar - this.tickInterval * (this.numberTicks - 1)}var az = H.jqplot.getSignificantFigures(this.tickInterval); var aG; if (az.digitsLeft >= az.significantDigits){aG = "%d"} else{var am = Math.max(0, 5 - az.digitsLeft); am = Math.min(am, az.digitsRight); aG = "%." + am + "f"}this._autoFormatString = aG; this.min = aM; this.max = ar}if (this.renderer.constructor == H.jqplot.LinearAxisRenderer && this._autoFormatString == ""){ao = this.max - this.min; var a1 = new this.tickRenderer(this.tickOptions); var aF = a1.formatString || H.jqplot.config.defaultTickFormatString; var aF = aF.match(H.jqplot.sprintf.regex)[0]; var aX = 0; if (aF){if (aF.search(/[fFeEgGpP]/) > - 1){var aS = aF.match(/\%\.(\d{0,})?[eEfFgGpP]/); if (aS){aX = parseInt(aS[1], 10)} else{aX = 6}} else{if (aF.search(/[di]/) > - 1){aX = 0}}var ak = Math.pow(10, - aX); if (this.tickInterval < ak){if (aQ == null && a4 == null){this.tickInterval = ak; if (aZ == null && aB == null){this.min = Math.floor(this._dataBounds.min / ak) * ak; if (this.min == this._dataBounds.min){this.min = this._dataBounds.min - this.tickInterval}this.max = Math.ceil(this._dataBounds.max / ak) * ak; if (this.max == this._dataBounds.max){this.max = this._dataBounds.max + this.tickInterval}var aR = (this.max - this.min) / this.tickInterval; aR = aR.toFixed(11); aR = Math.ceil(aR); this.numberTicks = aR + 1} else{if (aZ == null){var aR = (this._dataBounds.max - this.min) / this.tickInterval; aR = aR.toFixed(11); this.numberTicks = Math.ceil(aR) + 2; this.max = this.min + this.tickInterval * (this.numberTicks - 1)} else{if (aB == null){var aR = (this.max - this._dataBounds.min) / this.tickInterval; aR = aR.toFixed(11); this.numberTicks = Math.ceil(aR) + 2; this.min = this.max - this.tickInterval * (this.numberTicks - 1)} else{this.numberTicks = Math.ceil((aZ - aB) / this.tickInterval) + 1; this.min = Math.floor(aB * Math.pow(10, aX)) / Math.pow(10, aX); this.max = Math.ceil(aZ * Math.pow(10, aX)) / Math.pow(10, aX); this.numberTicks = Math.ceil((this.max - this.min) / this.tickInterval) + 1}}}}}}}}if (this._overrideFormatString && this._autoFormatString != ""){this.tickOptions = this.tickOptions || {}; this.tickOptions.formatString = this._autoFormatString}var aO, a2; for (var aU = 0; aU < this.numberTicks; aU++){aY = this.min + aU * this.tickInterval; aO = new this.tickRenderer(this.tickOptions); aO.setTick(aY, this.name); this._ticks.push(aO); if (aU < this.numberTicks - 1){for (var aT = 0; aT < this.minorTicks; aT++){aY += this.tickInterval / (this.minorTicks + 1); a2 = H.extend(true, {}, this.tickOptions, {name:this.name, value:aY, label:"", isMinorTick:true}); aO = new this.tickRenderer(a2); this._ticks.push(aO)}}aO = null}}if (this.tickInset){this.min = this.min - this.tickInset * this.tickInterval; this.max = this.max + this.tickInset * this.tickInterval}aN = null}; H.jqplot.LinearAxisRenderer.prototype.resetTickValues = function(ad){if (H.isArray(ad) && ad.length == this._ticks.length){var ac; for (var ab = 0; ab < ad.length; ab++){ac = this._ticks[ab]; ac.value = ad[ab]; ac.label = ac.formatter(ac.formatString, ad[ab]); ac.label = ac.prefix + ac.label; ac._elem.html(ac.label)}ac = null; this.min = H.jqplot.arrayMin(ad); this.max = H.jqplot.arrayMax(ad); this.pack()}}; H.jqplot.LinearAxisRenderer.prototype.pack = function(ad, ac){ad = ad || {}; ac = ac || this._offsets; var ar = this._ticks; var an = this.max; var am = this.min; var ai = ac.max; var ag = ac.min; var ak = (this._label == null)?false:this._label.show; for (var al in ad){this._elem.css(al, ad[al])}this._offsets = ac; var ae = ai - ag; var af = an - am; if (this.breakPoints){af = af - this.breakPoints[1] + this.breakPoints[0]; this.p2u = function(au){return(au - ag) * af / ae + am}; this.u2p = function(au){if (au > this.breakPoints[0] && au < this.breakPoints[1]){au = this.breakPoints[0]}if (au <= this.breakPoints[0]){return(au - am) * ae / af + ag} else{return(au - this.breakPoints[1] + this.breakPoints[0] - am) * ae / af + ag}}; if (this.name.charAt(0) == "x"){this.series_u2p = function(au){if (au > this.breakPoints[0] && au < this.breakPoints[1]){au = this.breakPoints[0]}if (au <= this.breakPoints[0]){return(au - am) * ae / af} else{return(au - this.breakPoints[1] + this.breakPoints[0] - am) * ae / af}}; this.series_p2u = function(au){return au * af / ae + am}} else{this.series_u2p = function(au){if (au > this.breakPoints[0] && au < this.breakPoints[1]){au = this.breakPoints[0]}if (au >= this.breakPoints[1]){return(au - an) * ae / af} else{return(au + this.breakPoints[1] - this.breakPoints[0] - an) * ae / af}}; this.series_p2u = function(au){return au * af / ae + an}}} else{this.p2u = function(au){return(au - ag) * af / ae + am}; this.u2p = function(au){return(au - am) * ae / af + ag}; if (this.name == "xaxis" || this.name == "x2axis"){this.series_u2p = function(au){return(au - am) * ae / af}; this.series_p2u = function(au){return au * af / ae + am}} else{this.series_u2p = function(au){return(au - an) * ae / af}; this.series_p2u = function(au){return au * af / ae + an}}}if (this.show){if (this.name == "xaxis" || this.name == "x2axis"){for (var ao = 0; ao < ar.length; ao++){var aj = ar[ao]; if (aj.show && aj.showLabel){var ab; if (aj.constructor == H.jqplot.CanvasAxisTickRenderer && aj.angle){var aq = (this.name == "xaxis")?1: - 1; switch (aj.labelPosition){case"auto":if (aq * aj.angle < 0){ab = - aj.getWidth() + aj._textRenderer.height * Math.sin( - aj._textRenderer.angle) / 2} else{ab = - aj._textRenderer.height * Math.sin(aj._textRenderer.angle) / 2}break; case"end":ab = - aj.getWidth() + aj._textRenderer.height * Math.sin( - aj._textRenderer.angle) / 2; break; case"start":ab = - aj._textRenderer.height * Math.sin(aj._textRenderer.angle) / 2; break; case"middle":ab = - aj.getWidth() / 2 + aj._textRenderer.height * Math.sin( - aj._textRenderer.angle) / 2; break; default:ab = - aj.getWidth() / 2 + aj._textRenderer.height * Math.sin( - aj._textRenderer.angle) / 2; break}} else{ab = - aj.getWidth() / 2}var at = this.u2p(aj.value) + ab + "px"; aj._elem.css("left", at); aj.pack()}}if (ak){var ah = this._label._elem.outerWidth(true); this._label._elem.css("left", ag + ae / 2 - ah / 2 + "px"); if (this.name == "xaxis"){this._label._elem.css("bottom", "0px")} else{this._label._elem.css("top", "0px")}this._label.pack()}} else{for (var ao = 0; ao < ar.length; ao++){var aj = ar[ao]; if (aj.show && aj.showLabel){var ab; if (aj.constructor == H.jqplot.CanvasAxisTickRenderer && aj.angle){var aq = (this.name == "yaxis")?1: - 1; switch (aj.labelPosition){case"auto":case"end":if (aq * aj.angle < 0){ab = - aj._textRenderer.height * Math.cos( - aj._textRenderer.angle) / 2} else{ab = - aj.getHeight() + aj._textRenderer.height * Math.cos(aj._textRenderer.angle) / 2}break; case"start":if (aj.angle > 0){ab = - aj._textRenderer.height * Math.cos( - aj._textRenderer.angle) / 2} else{ab = - aj.getHeight() + aj._textRenderer.height * Math.cos(aj._textRenderer.angle) / 2}break; case"middle":ab = - aj.getHeight() / 2; break; default:ab = - aj.getHeight() / 2; break}} else{ab = - aj.getHeight() / 2}var at = this.u2p(aj.value) + ab + "px"; aj._elem.css("top", at); aj.pack()}}if (ak){var ap = this._label._elem.outerHeight(true); this._label._elem.css("top", ai - ae / 2 - ap / 2 + "px"); if (this.name == "yaxis"){this._label._elem.css("left", "0px")} else{this._label._elem.css("right", "0px")}this._label.pack()}}}ar = null}; function h(ac){var ab; ac = Math.abs(ac); if (ac >= 10){ab = "%d"} else{if (ac > 1){if (ac === parseInt(ac, 10)){ab = "%d"} else{ab = "%.1f"}} else{var ad = - Math.floor(Math.log(ac) / Math.LN10); ab = "%." + ad + "f"}}return ab}var a = [0.1, 0.2, 0.3, 0.4, 0.5, 0.8, 1, 2, 3, 4, 5]; var b = function(ac){var ab = a.indexOf(ac); if (ab > 0){return a[ab - 1]} else{return a[a.length - 1] / 100}}; var i = function(ac){var ab = a.indexOf(ac); if (ab < a.length - 1){return a[ab + 1]} else{return a[0] * 100}}; function c(af, an, am){var ak = Math.floor(am / 2); var ac = Math.ceil(am * 1.5); var ae = Number.MAX_VALUE; var ab = (an - af); var aq; var aj; var al; var ar = H.jqplot.getSignificantFigures; var ap; var ah; var ai; var ao; for (var ag = 0, ad = ac - ak + 1; ag < ad; ag++){ai = ak + ag; aq = ab / (ai - 1); aj = ar(aq); aq = Math.abs(am - ai) + aj.digitsRight; if (aq < ae){ae = aq; al = ai; ao = aj.digitsRight} else{if (aq === ae){if (aj.digitsRight < ao){al = ai; ao = aj.digitsRight}}}}ap = Math.max(ao, Math.max(ar(af).digitsRight, ar(an).digitsRight)); if (ap === 0){ah = "%d"} else{ah = "%." + ap + "f"}aq = ab / (al - 1); return[af, an, al, ah, aq]}function S(ac, af){af = af || 7; var ae = ac / (af - 1); var ad = Math.pow(10, Math.floor(Math.log(ae) / Math.LN10)); var ag = ae / ad; var ab; if (ad < 1){if (ag > 5){ab = 10 * ad} else{if (ag > 2){ab = 5 * ad} else{if (ag > 1){ab = 2 * ad} else{ab = ad}}}} else{if (ag > 5){ab = 10 * ad} else{if (ag > 4){ab = 5 * ad} else{if (ag > 3){ab = 4 * ad} else{if (ag > 2){ab = 3 * ad} else{if (ag > 1){ab = 2 * ad} else{ab = ad}}}}}}return ab}function M(ac, ab){ab = ab || 1; var ae = Math.floor(Math.log(ac) / Math.LN10); var ag = Math.pow(10, ae); var af = ac / ag; var ad; af = af / ab; if (af <= 0.38){ad = 0.1} else{if (af <= 1.6){ad = 0.2} else{if (af <= 4){ad = 0.5} else{if (af <= 8){ad = 1} else{if (af <= 16){ad = 2} else{ad = 5}}}}}return ad * ag}function t(ad, ac){var af = Math.floor(Math.log(ad) / Math.LN10); var ah = Math.pow(10, af); var ag = ad / ah; var ab; var ae; ag = ag / ac; if (ag <= 0.38){ae = 0.1} else{if (ag <= 1.6){ae = 0.2} else{if (ag <= 4){ae = 0.5} else{if (ag <= 8){ae = 1} else{if (ag <= 16){ae = 2} else{ae = 5}}}}}ab = ae * ah; return[ab, ae, ah]}H.jqplot.LinearTickGenerator = function(ah, ak, ad, ae, ai, al){ai = (ai === null)?false:ai; al = (al === null || ai)?false:al; if (ah === ak){ak = (ak)?0:1}ad = ad || 1; if (ak < ah){var am = ak; ak = ah; ah = am}var ac = []; var ap = M(ak - ah, ad); var ao = H.jqplot.getSignificantFigures; if (ae == null){if (!ai && !al){ac[0] = Math.floor(ah / ap) * ap; ac[1] = Math.ceil(ak / ap) * ap; ac[2] = Math.round((ac[1] - ac[0]) / ap + 1); ac[3] = h(ap); ac[4] = ap} else{if (ai){ac[0] = ah; ac[2] = Math.ceil((ak - ah) / ap + 1); ac[1] = ah + (ac[2] - 1) * ap; var an = ao(ah).digitsRight; var aj = ao(ap).digitsRight; if (an < aj){ac[3] = h(ap)} else{ac[3] = "%." + an + "f"}ac[4] = ap} else{if (al){ac[1] = ak; ac[2] = Math.ceil((ak - ah) / ap + 1); ac[0] = ak - (ac[2] - 1) * ap; var af = ao(ak).digitsRight; var aj = ao(ap).digitsRight; if (af < aj){ac[3] = h(ap)} else{ac[3] = "%." + af + "f"}ac[4] = ap}}}} else{var ag = []; ag[0] = Math.floor(ah / ap) * ap; ag[1] = Math.ceil(ak / ap) * ap; ag[2] = Math.round((ag[1] - ag[0]) / ap + 1); ag[3] = h(ap); ag[4] = ap; if (ag[2] === ae){ac = ag} else{var ab = S(ag[1] - ag[0], ae); ac[0] = ag[0]; ac[2] = ae; ac[4] = ab; ac[3] = h(ab); ac[1] = ac[0] + (ac[2] - 1) * ac[4]}}return ac}; H.jqplot.LinearTickGenerator.bestLinearInterval = M; H.jqplot.LinearTickGenerator.bestInterval = S; H.jqplot.LinearTickGenerator.bestLinearComponents = t; H.jqplot.LinearTickGenerator.bestConstrainedInterval = c; H.jqplot.MarkerRenderer = function(ab){this.show = true; this.style = "filledCircle"; this.lineWidth = 2; this.size = 9; this.color = "#666666"; this.shadow = true; this.shadowAngle = 45; this.shadowOffset = 1; this.shadowDepth = 3; this.shadowAlpha = "0.07"; this.shadowRenderer = new H.jqplot.ShadowRenderer(); this.shapeRenderer = new H.jqplot.ShapeRenderer(); H.extend(true, this, ab)}; H.jqplot.MarkerRenderer.prototype.init = function(ab){H.extend(true, this, ab); var ad = {angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, lineWidth:this.lineWidth, depth:this.shadowDepth, closePath:true}; if (this.style.indexOf("filled") != - 1){ad.fill = true}if (this.style.indexOf("ircle") != - 1){ad.isarc = true; ad.closePath = false}this.shadowRenderer.init(ad); var ac = {fill:false, isarc:false, strokeStyle:this.color, fillStyle:this.color, lineWidth:this.lineWidth, closePath:true}; if (this.style.indexOf("filled") != - 1){ac.fill = true}if (this.style.indexOf("ircle") != - 1){ac.isarc = true; ac.closePath = false}this.shapeRenderer.init(ac)}; H.jqplot.MarkerRenderer.prototype.drawDiamond = function(ad, ac, ag, af, ai){var ab = 1.2; var aj = this.size / 2 / ab; var ah = this.size / 2 * ab; var ae = [[ad - aj, ac], [ad, ac + ah], [ad + aj, ac], [ad, ac - ah]]; if (this.shadow){this.shadowRenderer.draw(ag, ae)}this.shapeRenderer.draw(ag, ae, ai)}; H.jqplot.MarkerRenderer.prototype.drawPlus = function(ae, ad, ah, ag, ak){var ac = 1; var al = this.size / 2 * ac; var ai = this.size / 2 * ac; var aj = [[ae, ad - ai], [ae, ad + ai]]; var af = [[ae + al, ad], [ae - al, ad]]; var ab = H.extend(true, {}, this.options, {closePath:false}); if (this.shadow){this.shadowRenderer.draw(ah, aj, {closePath:false}); this.shadowRenderer.draw(ah, af, {closePath:false})}this.shapeRenderer.draw(ah, aj, ab); this.shapeRenderer.draw(ah, af, ab)}; H.jqplot.MarkerRenderer.prototype.drawX = function(ae, ad, ah, ag, ak){var ac = 1; var al = this.size / 2 * ac; var ai = this.size / 2 * ac; var ab = H.extend(true, {}, this.options, {closePath:false}); var aj = [[ae - al, ad - ai], [ae + al, ad + ai]]; var af = [[ae - al, ad + ai], [ae + al, ad - ai]]; if (this.shadow){this.shadowRenderer.draw(ah, aj, {closePath:false}); this.shadowRenderer.draw(ah, af, {closePath:false})}this.shapeRenderer.draw(ah, aj, ab); this.shapeRenderer.draw(ah, af, ab)}; H.jqplot.MarkerRenderer.prototype.drawDash = function(ad, ac, ag, af, ai){var ab = 1; var aj = this.size / 2 * ab; var ah = this.size / 2 * ab; var ae = [[ad - aj, ac], [ad + aj, ac]]; if (this.shadow){this.shadowRenderer.draw(ag, ae)}this.shapeRenderer.draw(ag, ae, ai)}; H.jqplot.MarkerRenderer.prototype.drawLine = function(ag, af, ab, ae, ac){var ad = [ag, af]; if (this.shadow){this.shadowRenderer.draw(ab, ad)}this.shapeRenderer.draw(ab, ad, ac)}; H.jqplot.MarkerRenderer.prototype.drawSquare = function(ad, ac, ag, af, ai){var ab = 1; var aj = this.size / 2 / ab; var ah = this.size / 2 * ab; var ae = [[ad - aj, ac - ah], [ad - aj, ac + ah], [ad + aj, ac + ah], [ad + aj, ac - ah]]; if (this.shadow){this.shadowRenderer.draw(ag, ae)}this.shapeRenderer.draw(ag, ae, ai)}; H.jqplot.MarkerRenderer.prototype.drawCircle = function(ac, ai, ae, ah, af){var ab = this.size / 2; var ad = 2 * Math.PI; var ag = [ac, ai, ab, 0, ad, true]; if (this.shadow){this.shadowRenderer.draw(ae, ag)}this.shapeRenderer.draw(ae, ag, af)}; H.jqplot.MarkerRenderer.prototype.draw = function(ab, ae, ac, ad){ad = ad || {}; if (ad.show == null || ad.show != false){if (ad.color && !ad.fillStyle){ad.fillStyle = ad.color}if (ad.color && !ad.strokeStyle){ad.strokeStyle = ad.color}switch (this.style){case"diamond":this.drawDiamond(ab, ae, ac, false, ad); break; case"filledDiamond":this.drawDiamond(ab, ae, ac, true, ad); break; case"circle":this.drawCircle(ab, ae, ac, false, ad); break; case"filledCircle":this.drawCircle(ab, ae, ac, true, ad); break; case"square":this.drawSquare(ab, ae, ac, false, ad); break; case"filledSquare":this.drawSquare(ab, ae, ac, true, ad); break; case"x":this.drawX(ab, ae, ac, true, ad); break; case"plus":this.drawPlus(ab, ae, ac, true, ad); break; case"dash":this.drawDash(ab, ae, ac, true, ad); break; case"line":this.drawLine(ab, ae, ac, false, ad); break; default:this.drawDiamond(ab, ae, ac, false, ad); break}}}; H.jqplot.ShadowRenderer = function(ab){this.angle = 45; this.offset = 1; this.alpha = 0.07; this.lineWidth = 1.5; this.lineJoin = "miter"; this.lineCap = "round"; this.closePath = false; this.fill = false; this.depth = 3; this.strokeStyle = "rgba(0,0,0,0.1)"; this.isarc = false; H.extend(true, this, ab)}; H.jqplot.ShadowRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.ShadowRenderer.prototype.draw = function(ao, am, aq){ao.save(); var ab = (aq != null)?aq:{}; var an = (ab.fill != null)?ab.fill:this.fill; var aj = (ab.fillRect != null)?ab.fillRect:this.fillRect; var ai = (ab.closePath != null)?ab.closePath:this.closePath; var af = (ab.offset != null)?ab.offset:this.offset; var ad = (ab.alpha != null)?ab.alpha:this.alpha; var ah = (ab.depth != null)?ab.depth:this.depth; var ap = (ab.isarc != null)?ab.isarc:this.isarc; var ak = (ab.linePattern != null)?ab.linePattern:this.linePattern; ao.lineWidth = (ab.lineWidth != null)?ab.lineWidth:this.lineWidth; ao.lineJoin = (ab.lineJoin != null)?ab.lineJoin:this.lineJoin; ao.lineCap = (ab.lineCap != null)?ab.lineCap:this.lineCap; ao.strokeStyle = ab.strokeStyle || this.strokeStyle || "rgba(0,0,0," + ad + ")"; ao.fillStyle = ab.fillStyle || this.fillStyle || "rgba(0,0,0," + ad + ")"; for (var ae = 0; ae < ah; ae++){var al = H.jqplot.LinePattern(ao, ak); ao.translate(Math.cos(this.angle * Math.PI / 180) * af, Math.sin(this.angle * Math.PI / 180) * af); al.beginPath(); if (ap){ao.arc(am[0], am[1], am[2], am[3], am[4], true)} else{if (aj){if (aj){ao.fillRect(am[0], am[1], am[2], am[3])}} else{if (am && am.length){var ac = true; for (var ag = 0; ag < am.length; ag++){if (am[ag][0] != null && am[ag][1] != null){if (ac){al.moveTo(am[ag][0], am[ag][1]); ac = false} else{al.lineTo(am[ag][0], am[ag][1])}} else{ac = true}}}}}if (ai){al.closePath()}if (an){ao.fill()} else{ao.stroke()}}ao.restore()}; H.jqplot.ShapeRenderer = function(ab){this.lineWidth = 1.5; this.linePattern = "solid"; this.lineJoin = "miter"; this.lineCap = "round"; this.closePath = false; this.fill = false; this.isarc = false; this.fillRect = false; this.strokeRect = false; this.clearRect = false; this.strokeStyle = "#999999"; this.fillStyle = "#999999"; H.extend(true, this, ab)}; H.jqplot.ShapeRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.ShapeRenderer.prototype.draw = function(am, ak, ao){am.save(); var ab = (ao != null)?ao:{}; var al = (ab.fill != null)?ab.fill:this.fill; var ag = (ab.closePath != null)?ab.closePath:this.closePath; var ah = (ab.fillRect != null)?ab.fillRect:this.fillRect; var ae = (ab.strokeRect != null)?ab.strokeRect:this.strokeRect; var ac = (ab.clearRect != null)?ab.clearRect:this.clearRect; var an = (ab.isarc != null)?ab.isarc:this.isarc; var ai = (ab.linePattern != null)?ab.linePattern:this.linePattern; var aj = H.jqplot.LinePattern(am, ai); am.lineWidth = ab.lineWidth || this.lineWidth; am.lineJoin = ab.lineJoin || this.lineJoin; am.lineCap = ab.lineCap || this.lineCap; am.strokeStyle = (ab.strokeStyle || ab.color) || this.strokeStyle; am.fillStyle = ab.fillStyle || this.fillStyle; am.beginPath(); if (an){am.arc(ak[0], ak[1], ak[2], ak[3], ak[4], true); if (ag){am.closePath()}if (al){am.fill()} else{am.stroke()}am.restore(); return} else{if (ac){am.clearRect(ak[0], ak[1], ak[2], ak[3]); am.restore(); return} else{if (ah || ae){if (ah){am.fillRect(ak[0], ak[1], ak[2], ak[3])}if (ae){am.strokeRect(ak[0], ak[1], ak[2], ak[3]); am.restore(); return}} else{if (ak && ak.length){var ad = true; for (var af = 0; af < ak.length; af++){if (ak[af][0] != null && ak[af][1] != null){if (ad){aj.moveTo(ak[af][0], ak[af][1]); ad = false} else{aj.lineTo(ak[af][0], ak[af][1])}} else{ad = true}}if (ag){aj.closePath()}if (al){am.fill()} else{am.stroke()}}}}}am.restore()}; H.jqplot.TableLegendRenderer = function(){}; H.jqplot.TableLegendRenderer.prototype.init = function(ab){H.extend(true, this, ab)}; H.jqplot.TableLegendRenderer.prototype.addrow = function(ak, ae, ab, ai){var af = (ab)?this.rowSpacing + "px":"0px"; var aj; var ad; var ac; var ah; var ag; ac = document.createElement("tr"); aj = H(ac); aj.addClass("jqplot-table-legend"); ac = null; if (ai){aj.prependTo(this._elem)} else{aj.appendTo(this._elem)}if (this.showSwatches){ad = H(document.createElement("td")); ad.addClass("jqplot-table-legend jqplot-table-legend-swatch"); ad.css({textAlign:"center", paddingTop:af}); ah = H(document.createElement("div")); ah.addClass("jqplot-table-legend-swatch-outline"); ag = H(document.createElement("div")); ag.addClass("jqplot-table-legend-swatch"); ag.css({backgroundColor:ae, borderColor:ae}); aj.append(ad.append(ah.append(ag)))}if (this.showLabels){ad = H(document.createElement("td")); ad.addClass("jqplot-table-legend jqplot-table-legend-label"); ad.css("paddingTop", af); aj.append(ad); if (this.escapeHtml){ad.text(ak)} else{ad.html(ak)}}ad = null; ah = null; ag = null; aj = null; ac = null}; H.jqplot.TableLegendRenderer.prototype.draw = function(){if (this._elem){this._elem.emptyForce(); this._elem = null}if (this.show){var ag = this._series; var ac = document.createElement("table"); this._elem = H(ac); this._elem.addClass("jqplot-table-legend"); var al = {position:"absolute"}; if (this.background){al.background = this.background}if (this.border){al.border = this.border}if (this.fontSize){al.fontSize = this.fontSize}if (this.fontFamily){al.fontFamily = this.fontFamily}if (this.textColor){al.textColor = this.textColor}if (this.marginTop != null){al.marginTop = this.marginTop}if (this.marginBottom != null){al.marginBottom = this.marginBottom}if (this.marginLeft != null){al.marginLeft = this.marginLeft}if (this.marginRight != null){al.marginRight = this.marginRight}var ab = false, ai = false, ak; for (var ah = 0; ah < ag.length; ah++){ak = ag[ah]; if (ak._stack || ak.renderer.constructor == H.jqplot.BezierCurveRenderer){ai = true}if (ak.show && ak.showLabel){var af = this.labels[ah] || ak.label.toString(); if (af){var ad = ak.color; if (ai && ah < ag.length - 1){ab = true} else{if (ai && ah == ag.length - 1){ab = false}}this.renderer.addrow.call(this, af, ad, ab, ai); ab = true}for (var ae = 0; ae < H.jqplot.addLegendRowHooks.length; ae++){var aj = H.jqplot.addLegendRowHooks[ae].call(this, ak); if (aj){this.renderer.addrow.call(this, aj.label, aj.color, ab); ab = true}}af = null}}}return this._elem}; H.jqplot.TableLegendRenderer.prototype.pack = function(ad){if (this.show){if (this.placement == "insideGrid"){switch (this.location){case"nw":var ac = ad.left; var ab = ad.top; this._elem.css("left", ac); this._elem.css("top", ab); break; case"n":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; var ab = ad.top; this._elem.css("left", ac); this._elem.css("top", ab); break; case"ne":var ac = ad.right; var ab = ad.top; this._elem.css({right:ac, top:ab}); break; case"e":var ac = ad.right; var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({right:ac, top:ab}); break; case"se":var ac = ad.right; var ab = ad.bottom; this._elem.css({right:ac, bottom:ab}); break; case"s":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; var ab = ad.bottom; this._elem.css({left:ac, bottom:ab}); break; case"sw":var ac = ad.left; var ab = ad.bottom; this._elem.css({left:ac, bottom:ab}); break; case"w":var ac = ad.left; var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({left:ac, top:ab}); break; default:var ac = ad.right; var ab = ad.bottom; this._elem.css({right:ac, bottom:ab}); break}} else{if (this.placement == "outside"){switch (this.location){case"nw":var ac = this._plotDimensions.width - ad.left; var ab = ad.top; this._elem.css("right", ac); this._elem.css("top", ab); break; case"n":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; var ab = this._plotDimensions.height - ad.top; this._elem.css("left", ac); this._elem.css("bottom", ab); break; case"ne":var ac = this._plotDimensions.width - ad.right; var ab = ad.top; this._elem.css({left:ac, top:ab}); break; case"e":var ac = this._plotDimensions.width - ad.right; var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({left:ac, top:ab}); break; case"se":var ac = this._plotDimensions.width - ad.right; var ab = ad.bottom; this._elem.css({left:ac, bottom:ab}); break; case"s":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; var ab = this._plotDimensions.height - ad.bottom; this._elem.css({left:ac, top:ab}); break; case"sw":var ac = this._plotDimensions.width - ad.left; var ab = ad.bottom; this._elem.css({right:ac, bottom:ab}); break; case"w":var ac = this._plotDimensions.width - ad.left; var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({right:ac, top:ab}); break; default:var ac = ad.right; var ab = ad.bottom; this._elem.css({right:ac, bottom:ab}); break}} else{switch (this.location){case"nw":this._elem.css({left:0, top:ad.top}); break; case"n":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; this._elem.css({left:ac, top:ad.top}); break; case"ne":this._elem.css({right:0, top:ad.top}); break; case"e":var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({right:ad.right, top:ab}); break; case"se":this._elem.css({right:ad.right, bottom:ad.bottom}); break; case"s":var ac = (ad.left + (this._plotDimensions.width - ad.right)) / 2 - this.getWidth() / 2; this._elem.css({left:ac, bottom:ad.bottom}); break; case"sw":this._elem.css({left:ad.left, bottom:ad.bottom}); break; case"w":var ab = (ad.top + (this._plotDimensions.height - ad.bottom)) / 2 - this.getHeight() / 2; this._elem.css({left:ad.left, top:ab}); break; default:this._elem.css({right:ad.right, bottom:ad.bottom}); break}}}}}; H.jqplot.ThemeEngine = function(){this.themes = {}; this.activeTheme = null}; H.jqplot.ThemeEngine.prototype.init = function(){var ae = new H.jqplot.Theme({_name:"Default"}); var ah, ac, ag; for (ah in ae.target){if (ah == "textColor"){ae.target[ah] = this.target.css("color")} else{ae.target[ah] = this.target.css(ah)}}if (this.title.show && this.title._elem){for (ah in ae.title){if (ah == "textColor"){ae.title[ah] = this.title._elem.css("color")} else{ae.title[ah] = this.title._elem.css(ah)}}}for (ah in ae.grid){ae.grid[ah] = this.grid[ah]}if (ae.grid.backgroundColor == null && this.grid.background != null){ae.grid.backgroundColor = this.grid.background}if (this.legend.show && this.legend._elem){for (ah in ae.legend){if (ah == "textColor"){ae.legend[ah] = this.legend._elem.css("color")} else{ae.legend[ah] = this.legend._elem.css(ah)}}}var ad; for (ac = 0; ac < this.series.length; ac++){ad = this.series[ac]; if (ad.renderer.constructor == H.jqplot.LineRenderer){ae.series.push(new m())} else{if (ad.renderer.constructor == H.jqplot.BarRenderer){ae.series.push(new P())} else{if (ad.renderer.constructor == H.jqplot.PieRenderer){ae.series.push(new e())} else{if (ad.renderer.constructor == H.jqplot.DonutRenderer){ae.series.push(new C())} else{if (ad.renderer.constructor == H.jqplot.FunnelRenderer){ae.series.push(new U())} else{if (ad.renderer.constructor == H.jqplot.MeterGaugeRenderer){ae.series.push(new z())} else{ae.series.push({})}}}}}}for (ah in ae.series[ac]){ae.series[ac][ah] = ad[ah]}}var ab, af; for (ah in this.axes){af = this.axes[ah]; ab = ae.axes[ah] = new L(); ab.borderColor = af.borderColor; ab.borderWidth = af.borderWidth; if (af._ticks && af._ticks[0]){for (ag in ab.ticks){if (af._ticks[0].hasOwnProperty(ag)){ab.ticks[ag] = af._ticks[0][ag]} else{if (af._ticks[0]._elem){ab.ticks[ag] = af._ticks[0]._elem.css(ag)}}}}if (af._label && af._label.show){for (ag in ab.label){if (af._label[ag]){ab.label[ag] = af._label[ag]} else{if (af._label._elem){if (ag == "textColor"){ab.label[ag] = af._label._elem.css("color")} else{ab.label[ag] = af._label._elem.css(ag)}}}}}}this.themeEngine._add(ae); this.themeEngine.activeTheme = this.themeEngine.themes[ae._name]}; H.jqplot.ThemeEngine.prototype.get = function(ab){if (!ab){return this.activeTheme} else{return this.themes[ab]}}; function K(ac, ab){return ac - ab}H.jqplot.ThemeEngine.prototype.getThemeNames = function(){var ab = []; for (var ac in this.themes){ab.push(ac)}return ab.sort(K)}; H.jqplot.ThemeEngine.prototype.getThemes = function(){var ac = []; var ab = []; for (var ae in this.themes){ac.push(ae)}ac.sort(K); for (var ad = 0; ad < ac.length; ad++){ab.push(this.themes[ac[ad]])}return ab}; H.jqplot.ThemeEngine.prototype.activate = function(ao, au){var ab = false; if (!au && this.activeTheme && this.activeTheme._name){au = this.activeTheme._name}if (!this.themes.hasOwnProperty(au)){throw new Error("No theme of that name")} else{var ag = this.themes[au]; this.activeTheme = ag; var at, am = false, al = false; var ac = ["xaxis", "x2axis", "yaxis", "y2axis"]; for (ap = 0; ap < ac.length; ap++){var ah = ac[ap]; if (ag.axesStyles.borderColor != null){ao.axes[ah].borderColor = ag.axesStyles.borderColor}if (ag.axesStyles.borderWidth != null){ao.axes[ah].borderWidth = ag.axesStyles.borderWidth}}for (var ar in ao.axes){var ae = ao.axes[ar]; if (ae.show){var ak = ag.axes[ar] || {}; var ai = ag.axesStyles; var af = H.jqplot.extend(true, {}, ak, ai); at = (ag.axesStyles.borderColor != null)?ag.axesStyles.borderColor:af.borderColor; if (af.borderColor != null){ae.borderColor = af.borderColor; ab = true}at = (ag.axesStyles.borderWidth != null)?ag.axesStyles.borderWidth:af.borderWidth; if (af.borderWidth != null){ae.borderWidth = af.borderWidth; ab = true}if (ae._ticks && ae._ticks[0]){for (var ad in af.ticks){at = af.ticks[ad]; if (at != null){ae.tickOptions[ad] = at; ae._ticks = []; ab = true}}}if (ae._label && ae._label.show){for (var ad in af.label){at = af.label[ad]; if (at != null){ae.labelOptions[ad] = at; ab = true}}}}}for (var an in ag.grid){if (ag.grid[an] != null){ao.grid[an] = ag.grid[an]}}if (!ab){ao.grid.draw()}if (ao.legend.show){for (an in ag.legend){if (ag.legend[an] != null){ao.legend[an] = ag.legend[an]}}}if (ao.title.show){for (an in ag.title){if (ag.title[an] != null){ao.title[an] = ag.title[an]}}}var ap; for (ap = 0; ap < ag.series.length; ap++){var aj = {}; var aq = false; for (an in ag.series[ap]){at = (ag.seriesStyles[an] != null)?ag.seriesStyles[an]:ag.series[ap][an]; if (at != null){aj[an] = at; if (an == "color"){ao.series[ap].renderer.shapeRenderer.fillStyle = at; ao.series[ap].renderer.shapeRenderer.strokeStyle = at; ao.series[ap][an] = at} else{if ((an == "lineWidth") || (an == "linePattern")){ao.series[ap].renderer.shapeRenderer[an] = at; ao.series[ap][an] = at} else{if (an == "markerOptions"){R(ao.series[ap].markerOptions, at); R(ao.series[ap].markerRenderer, at)} else{ao.series[ap][an] = at}}}ab = true}}}if (ab){ao.target.empty(); ao.draw()}for (an in ag.target){if (ag.target[an] != null){ao.target.css(an, ag.target[an])}}}}; H.jqplot.ThemeEngine.prototype._add = function(ac, ab){if (ab){ac._name = ab}if (!ac._name){ac._name = Date.parse(new Date())}if (!this.themes.hasOwnProperty(ac._name)){this.themes[ac._name] = ac} else{throw new Error("jqplot.ThemeEngine Error: Theme already in use")}}; H.jqplot.ThemeEngine.prototype.remove = function(ab){if (ab == "Default"){return false}return delete this.themes[ab]}; H.jqplot.ThemeEngine.prototype.newTheme = function(ab, ad){if (typeof (ab) == "object"){ad = ad || ab; ab = null}if (ad && ad._name){ab = ad._name} else{ab = ab || Date.parse(new Date())}var ac = this.copy(this.themes.Default._name, ab); H.jqplot.extend(ac, ad); return ac}; function x(ad){if (ad == null || typeof (ad) != "object"){return ad}var ab = new ad.constructor(); for (var ac in ad){ab[ac] = x(ad[ac])}return ab}H.jqplot.clone = x; function R(ad, ac){if (ac == null || typeof (ac) != "object"){return}for (var ab in ac){if (ab == "highlightColors"){ad[ab] = x(ac[ab])}if (ac[ab] != null && typeof (ac[ab]) == "object"){if (!ad.hasOwnProperty(ab)){ad[ab] = {}}R(ad[ab], ac[ab])} else{ad[ab] = ac[ab]}}}H.jqplot.merge = R; H.jqplot.extend = function(){var ag = arguments[0] || {}, ae = 1, af = arguments.length, ab = false, ad; if (typeof ag === "boolean"){ab = ag; ag = arguments[1] || {}; ae = 2}if (typeof ag !== "object" && !toString.call(ag) === "[object Function]"){ag = {}}for (; ae < af; ae++){if ((ad = arguments[ae]) != null){for (var ac in ad){var ah = ag[ac], ai = ad[ac]; if (ag === ai){continue}if (ab && ai && typeof ai === "object" && !ai.nodeType){ag[ac] = H.jqplot.extend(ab, ah || (ai.length != null?[]:{}), ai)} else{if (ai !== r){ag[ac] = ai}}}}}return ag}; H.jqplot.ThemeEngine.prototype.rename = function(ac, ab){if (ac == "Default" || ab == "Default"){throw new Error("jqplot.ThemeEngine Error: Cannot rename from/to Default")}if (this.themes.hasOwnProperty(ab)){throw new Error("jqplot.ThemeEngine Error: New name already in use.")} else{if (this.themes.hasOwnProperty(ac)){var ad = this.copy(ac, ab); this.remove(ac); return ad}}throw new Error("jqplot.ThemeEngine Error: Old name or new name invalid")}; H.jqplot.ThemeEngine.prototype.copy = function(ab, ad, af){if (ad == "Default"){throw new Error("jqplot.ThemeEngine Error: Cannot copy over Default theme")}if (!this.themes.hasOwnProperty(ab)){var ac = "jqplot.ThemeEngine Error: Source name invalid"; throw new Error(ac)}if (this.themes.hasOwnProperty(ad)){var ac = "jqplot.ThemeEngine Error: Target name invalid"; throw new Error(ac)} else{var ae = x(this.themes[ab]); ae._name = ad; H.jqplot.extend(true, ae, af); this._add(ae); return ae}}; H.jqplot.Theme = function(ab, ac){if (typeof (ab) == "object"){ac = ac || ab; ab = null}ab = ab || Date.parse(new Date()); this._name = ab; this.target = {backgroundColor:null}; this.legend = {textColor:null, fontFamily:null, fontSize:null, border:null, background:null}; this.title = {textColor:null, fontFamily:null, fontSize:null, textAlign:null}; this.seriesStyles = {}; this.series = []; this.grid = {drawGridlines:null, gridLineColor:null, gridLineWidth:null, backgroundColor:null, borderColor:null, borderWidth:null, shadow:null}; this.axesStyles = {label:{}, ticks:{}}; this.axes = {}; if (typeof (ac) == "string"){this._name = ac} else{if (typeof (ac) == "object"){H.jqplot.extend(true, this, ac)}}}; var L = function(){this.borderColor = null; this.borderWidth = null; this.ticks = new l(); this.label = new q()}; var l = function(){this.show = null; this.showGridline = null; this.showLabel = null; this.showMark = null; this.size = null; this.textColor = null; this.whiteSpace = null; this.fontSize = null; this.fontFamily = null}; var q = function(){this.textColor = null; this.whiteSpace = null; this.fontSize = null; this.fontFamily = null; this.fontWeight = null}; var m = function(){this.color = null; this.lineWidth = null; this.linePattern = null; this.shadow = null; this.fillColor = null; this.showMarker = null; this.markerOptions = new E()}; var E = function(){this.show = null; this.style = null; this.lineWidth = null; this.size = null; this.color = null; this.shadow = null}; var P = function(){this.color = null; this.seriesColors = null; this.lineWidth = null; this.shadow = null; this.barPadding = null; this.barMargin = null; this.barWidth = null; this.highlightColors = null}; var e = function(){this.seriesColors = null; this.padding = null; this.sliceMargin = null; this.fill = null; this.shadow = null; this.startAngle = null; this.lineWidth = null; this.highlightColors = null}; var C = function(){this.seriesColors = null; this.padding = null; this.sliceMargin = null; this.fill = null; this.shadow = null; this.startAngle = null; this.lineWidth = null; this.innerDiameter = null; this.thickness = null; this.ringMargin = null; this.highlightColors = null}; var U = function(){this.color = null; this.lineWidth = null; this.shadow = null; this.padding = null; this.sectionMargin = null; this.seriesColors = null; this.highlightColors = null}; var z = function(){this.padding = null; this.backgroundColor = null; this.ringColor = null; this.tickColor = null; this.ringWidth = null; this.intervalColors = null; this.intervalInnerRadius = null; this.intervalOuterRadius = null; this.hubRadius = null; this.needleThickness = null; this.needlePad = null}; H.fn.jqplotChildText = function(){return H(this).contents().filter(function(){return this.nodeType == 3}).text()}; H.fn.jqplotGetComputedFontStyle = function(){var ae = window.getComputedStyle?window.getComputedStyle(this[0], ""):this[0].currentStyle; var ac = ae["font-style"]?["font-style", "font-weight", "font-size", "font-family"]:["fontStyle", "fontWeight", "fontSize", "fontFamily"]; var af = []; for (var ad = 0; ad < ac.length; ++ad){var ab = String(ae[ac[ad]]); if (ab && ab != "normal"){af.push(ab)}}return af.join(" ")}; H.fn.jqplotToImageCanvas = function(ad){ad = ad || {}; var ao = (ad.x_offset == null)?0:ad.x_offset; var aq = (ad.y_offset == null)?0:ad.y_offset; var af = (ad.backgroundColor == null)?"rgb(255,255,255)":ad.backgroundColor; if (H(this).width() == 0 || H(this).height() == 0){return null}if (H.jqplot.use_excanvas){return null}var ah = document.createElement("canvas"); var au = H(this).outerHeight(true); var am = H(this).outerWidth(true); var ag = H(this).offset(); var ai = ag.left; var ak = ag.top; var an = 0, al = 0; var ar = ["jqplot-table-legend", "jqplot-xaxis-tick", "jqplot-x2axis-tick", "jqplot-yaxis-tick", "jqplot-y2axis-tick", "jqplot-y3axis-tick", "jqplot-y4axis-tick", "jqplot-y5axis-tick", "jqplot-y6axis-tick", "jqplot-y7axis-tick", "jqplot-y8axis-tick", "jqplot-y9axis-tick", "jqplot-xaxis-label", "jqplot-x2axis-label", "jqplot-yaxis-label", "jqplot-y2axis-label", "jqplot-y3axis-label", "jqplot-y4axis-label", "jqplot-y5axis-label", "jqplot-y6axis-label", "jqplot-y7axis-label", "jqplot-y8axis-label", "jqplot-y9axis-label"]; var aj, ab, ac, av; for (var at = 0; at < ar.length; at++){H(this).find("." + ar[at]).each(function(){aj = H(this).offset().top - ak; ab = H(this).offset().left - ai; av = ab + H(this).outerWidth(true) + an; ac = aj + H(this).outerHeight(true) + al; if (ab < - an){am = am - an - ab; an = - ab}if (aj < - al){au = au - al - aj; al = - aj}if (av > am){am = av}if (ac > au){au = ac}})}ah.width = am + Number(ao); ah.height = au + Number(aq); var ae = ah.getContext("2d"); ae.save(); ae.fillStyle = af; ae.fillRect(0, 0, ah.width, ah.height); ae.restore(); ae.translate(an, al); ae.textAlign = "left"; ae.textBaseline = "top"; function aw(ay){var az = parseInt(H(ay).css("line-height"), 10); if (isNaN(az)){az = parseInt(H(ay).css("font-size"), 10) * 1.2}return az}function ax(az, ay, aM, aA, aI, aB){var aK = aw(az); var aE = H(az).innerWidth(); var aF = H(az).innerHeight(); var aH = aM.split(/\s+/); var aL = aH.length; var aJ = ""; var aG = []; var aO = aI; var aN = aA; for (var aD = 0; aD < aL; aD++){aJ += aH[aD]; if (ay.measureText(aJ).width > aE){aG.push(aD); aJ = ""; aD--}}if (aG.length === 0){if (H(az).css("textAlign") === "center"){aN = aA + (aB - ay.measureText(aJ).width) / 2 - an}ay.fillText(aM, aN, aI)} else{aJ = aH.slice(0, aG[0]).join(" "); if (H(az).css("textAlign") === "center"){aN = aA + (aB - ay.measureText(aJ).width) / 2 - an}ay.fillText(aJ, aN, aO); aO += aK; for (var aD = 1, aC = aG.length; aD < aC; aD++){aJ = aH.slice(aG[aD - 1], aG[aD]).join(" "); if (H(az).css("textAlign") === "center"){aN = aA + (aB - ay.measureText(aJ).width) / 2 - an}ay.fillText(aJ, aN, aO); aO += aK}aJ = aH.slice(aG[aD - 1], aH.length).join(" "); if (H(az).css("textAlign") === "center"){aN = aA + (aB - ay.measureText(aJ).width) / 2 - an}ay.fillText(aJ, aN, aO)}}function ap(aA, aD, ay){var aH = aA.tagName.toLowerCase(); var az = H(aA).position(); var aE = window.getComputedStyle?window.getComputedStyle(aA, ""):aA.currentStyle; var aC = aD + az.left + parseInt(aE.marginLeft, 10) + parseInt(aE.borderLeftWidth, 10) + parseInt(aE.paddingLeft, 10); var aF = ay + az.top + parseInt(aE.marginTop, 10) + parseInt(aE.borderTopWidth, 10) + parseInt(aE.paddingTop, 10); var aG = ah.width; if ((aH == "div" || aH == "span") && !H(aA).hasClass("jqplot-highlighter-tooltip")){H(aA).children().each(function(){ap(this, aC, aF)}); var aI = H(aA).jqplotChildText(); if (aI){ae.font = H(aA).jqplotGetComputedFontStyle(); ae.fillStyle = H(aA).css("color"); ax(aA, ae, aI, aC, aF, aG)}} else{if (aH === "table" && H(aA).hasClass("jqplot-table-legend")){ae.strokeStyle = H(aA).css("border-top-color"); ae.fillStyle = H(aA).css("background-color"); ae.fillRect(aC, aF, H(aA).innerWidth(), H(aA).innerHeight()); if (parseInt(H(aA).css("border-top-width"), 10) > 0){ae.strokeRect(aC, aF, H(aA).innerWidth(), H(aA).innerHeight())}H(aA).find("div.jqplot-table-legend-swatch-outline").each(function(){var aO = H(this); ae.strokeStyle = aO.css("border-top-color"); var aK = aC + aO.position().left; var aL = aF + aO.position().top; ae.strokeRect(aK, aL, aO.innerWidth(), aO.innerHeight()); aK += parseInt(aO.css("padding-left"), 10); aL += parseInt(aO.css("padding-top"), 10); var aN = aO.innerHeight() - 2 * parseInt(aO.css("padding-top"), 10); var aJ = aO.innerWidth() - 2 * parseInt(aO.css("padding-left"), 10); var aM = aO.children("div.jqplot-table-legend-swatch"); ae.fillStyle = aM.css("background-color"); ae.fillRect(aK, aL, aJ, aN)}); H(aA).find("td.jqplot-table-legend-label").each(function(){var aL = H(this); var aJ = aC + aL.position().left; var aK = aF + aL.position().top + parseInt(aL.css("padding-top"), 10); ae.font = aL.jqplotGetComputedFontStyle(); ae.fillStyle = aL.css("color"); ax(aL, ae, aL.text(), aJ, aK, aG)}); var aB = null} else{if (aH == "canvas"){ae.drawImage(aA, aC, aF)}}}}H(this).children().each(function(){ap(this, ao, aq)}); return ah}; H.fn.jqplotToImageStr = function(ac){var ab = H(this).jqplotToImageCanvas(ac); if (ab){return ab.toDataURL("image/png")} else{return null}}; H.fn.jqplotToImageElem = function(ab){var ac = document.createElement("img"); var ad = H(this).jqplotToImageStr(ab); ac.src = ad; return ac}; H.fn.jqplotToImageElemStr = function(ab){var ac = ""; return ac}; H.fn.jqplotSaveImage = function(){var ab = H(this).jqplotToImageStr({}); if (ab){window.location.href = ab.replace("image/png", "image/octet-stream")}}; H.fn.jqplotViewImage = function(){var ac = H(this).jqplotToImageElemStr({}); var ad = H(this).jqplotToImageStr({}); if (ac){var ab = window.open(""); ab.document.open("image/png"); ab.document.write(ac); ab.document.close(); ab = null}}; var aa = function(){this.syntax = aa.config.syntax; this._type = "jsDate"; this.proxy = new Date(); this.options = {}; this.locale = aa.regional.getLocale(); this.formatString = ""; this.defaultCentury = aa.config.defaultCentury; switch (arguments.length){case 0:break; case 1:if (j(arguments[0]) == "[object Object]" && arguments[0]._type != "jsDate"){var ad = this.options = arguments[0]; this.syntax = ad.syntax || this.syntax; this.defaultCentury = ad.defaultCentury || this.defaultCentury; this.proxy = aa.createDate(ad.date)} else{this.proxy = aa.createDate(arguments[0])}break; default:var ab = []; for (var ac = 0; ac < arguments.length; ac++){ab.push(arguments[ac])}this.proxy = new Date(); this.proxy.setFullYear.apply(this.proxy, ab.slice(0, 3)); if (ab.slice(3).length){this.proxy.setHours.apply(this.proxy, ab.slice(3))}break}}; aa.config = {defaultLocale:"en", syntax:"perl", defaultCentury:1900}; aa.prototype.add = function(ad, ac){var ab = A[ac] || A.day; if (typeof ab == "number"){this.proxy.setTime(this.proxy.getTime() + (ab * ad))} else{ab.add(this, ad)}return this}; aa.prototype.clone = function(){return new aa(this.proxy.getTime())}; aa.prototype.getUtcOffset = function(){return this.proxy.getTimezoneOffset() * 60000}; aa.prototype.diff = function(ac, af, ab){ac = new aa(ac); if (ac === null){return null}var ad = A[af] || A.day; if (typeof ad == "number"){var ae = (this.proxy.getTime() - ac.proxy.getTime()) / ad} else{var ae = ad.diff(this.proxy, ac.proxy)}return(ab?ae:Math[ae > 0?"floor":"ceil"](ae))}; aa.prototype.getAbbrDayName = function(){return aa.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]}; aa.prototype.getAbbrMonthName = function(){return aa.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]}; aa.prototype.getAMPM = function(){return this.proxy.getHours() >= 12?"PM":"AM"}; aa.prototype.getAmPm = function(){return this.proxy.getHours() >= 12?"pm":"am"}; aa.prototype.getCentury = function(){return parseInt(this.proxy.getFullYear() / 100, 10)}; aa.prototype.getDate = function(){return this.proxy.getDate()}; aa.prototype.getDay = function(){return this.proxy.getDay()}; aa.prototype.getDayOfWeek = function(){var ab = this.proxy.getDay(); return ab === 0?7:ab}; aa.prototype.getDayOfYear = function(){var ac = this.proxy; var ab = ac - new Date("" + ac.getFullYear() + "/1/1 GMT"); ab += ac.getTimezoneOffset() * 60000; ac = null; return parseInt(ab / 60000 / 60 / 24, 10) + 1}; aa.prototype.getDayName = function(){return aa.regional[this.locale]["dayNames"][this.proxy.getDay()]}; aa.prototype.getFullWeekOfYear = function(){var ae = this.proxy; var ab = this.getDayOfYear(); var ad = 6 - ae.getDay(); var ac = parseInt((ab + ad) / 7, 10); return ac}; aa.prototype.getFullYear = function(){return this.proxy.getFullYear()}; aa.prototype.getGmtOffset = function(){var ab = this.proxy.getTimezoneOffset() / 60; var ac = ab < 0?"+":"-"; ab = Math.abs(ab); return ac + J(Math.floor(ab), 2) + ":" + J((ab % 1) * 60, 2)}; aa.prototype.getHours = function(){return this.proxy.getHours()}; aa.prototype.getHours12 = function(){var ab = this.proxy.getHours(); return ab > 12?ab - 12:(ab == 0?12:ab)}; aa.prototype.getIsoWeek = function(){var ae = this.proxy; var ad = ae.getWeekOfYear(); var ab = (new Date("" + ae.getFullYear() + "/1/1")).getDay(); var ac = ad + (ab > 4 || ab <= 1?0:1); if (ac == 53 && (new Date("" + ae.getFullYear() + "/12/31")).getDay() < 4){ac = 1} else{if (ac === 0){ae = new aa(new Date("" + (ae.getFullYear() - 1) + "/12/31")); ac = ae.getIsoWeek()}}ae = null; return ac}; aa.prototype.getMilliseconds = function(){return this.proxy.getMilliseconds()}; aa.prototype.getMinutes = function(){return this.proxy.getMinutes()}; aa.prototype.getMonth = function(){return this.proxy.getMonth()}; aa.prototype.getMonthName = function(){return aa.regional[this.locale]["monthNames"][this.proxy.getMonth()]}; aa.prototype.getMonthNumber = function(){return this.proxy.getMonth() + 1}; aa.prototype.getSeconds = function(){return this.proxy.getSeconds()}; aa.prototype.getShortYear = function(){return this.proxy.getYear() % 100}; aa.prototype.getTime = function(){return this.proxy.getTime()}; aa.prototype.getTimezoneAbbr = function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/, "$1")}; aa.prototype.getTimezoneName = function(){var ab = /(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString()); return ab[1] || ab[2] || "GMT" + this.getGmtOffset()}; aa.prototype.getTimezoneOffset = function(){return this.proxy.getTimezoneOffset()}; aa.prototype.getWeekOfYear = function(){var ab = this.getDayOfYear(); var ad = 7 - this.getDayOfWeek(); var ac = parseInt((ab + ad) / 7, 10); return ac}; aa.prototype.getUnix = function(){return Math.round(this.proxy.getTime() / 1000, 0)}; aa.prototype.getYear = function(){return this.proxy.getYear()}; aa.prototype.next = function(ab){ab = ab || "day"; return this.clone().add(1, ab)}; aa.prototype.set = function(){switch (arguments.length){case 0:this.proxy = new Date(); break; case 1:if (j(arguments[0]) == "[object Object]" && arguments[0]._type != "jsDate"){var ad = this.options = arguments[0]; this.syntax = ad.syntax || this.syntax; this.defaultCentury = ad.defaultCentury || this.defaultCentury; this.proxy = aa.createDate(ad.date)} else{this.proxy = aa.createDate(arguments[0])}break; default:var ab = []; for (var ac = 0; ac < arguments.length; ac++){ab.push(arguments[ac])}this.proxy = new Date(); this.proxy.setFullYear.apply(this.proxy, ab.slice(0, 3)); if (ab.slice(3).length){this.proxy.setHours.apply(this.proxy, ab.slice(3))}break}return this}; aa.prototype.setDate = function(ab){this.proxy.setDate(ab); return this}; aa.prototype.setFullYear = function(){this.proxy.setFullYear.apply(this.proxy, arguments); return this}; aa.prototype.setHours = function(){this.proxy.setHours.apply(this.proxy, arguments); return this}; aa.prototype.setMilliseconds = function(ab){this.proxy.setMilliseconds(ab); return this}; aa.prototype.setMinutes = function(){this.proxy.setMinutes.apply(this.proxy, arguments); return this}; aa.prototype.setMonth = function(){this.proxy.setMonth.apply(this.proxy, arguments); return this}; aa.prototype.setSeconds = function(){this.proxy.setSeconds.apply(this.proxy, arguments); return this}; aa.prototype.setTime = function(ab){this.proxy.setTime(ab); return this}; aa.prototype.setYear = function(){this.proxy.setYear.apply(this.proxy, arguments); return this}; aa.prototype.strftime = function(ab){ab = ab || this.formatString || aa.regional[this.locale]["formatString"]; return aa.strftime(this, ab, this.syntax)}; aa.prototype.toString = function(){return this.proxy.toString()}; aa.prototype.toYmdInt = function(){return(this.proxy.getFullYear() * 10000) + (this.getMonthNumber() * 100) + this.proxy.getDate()}; aa.regional = {en:{monthNames:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], formatString:"%Y-%m-%d %H:%M:%S"}, fr:{monthNames:["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], monthNamesShort:["Jan", "Fév", "Mar", "Avr", "Mai", "Jun", "Jul", "Aoû", "Sep", "Oct", "Nov", "Déc"], dayNames:["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], dayNamesShort:["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], formatString:"%Y-%m-%d %H:%M:%S"}, de:{monthNames:["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], monthNamesShort:["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], dayNames:["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], dayNamesShort:["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], formatString:"%Y-%m-%d %H:%M:%S"}, es:{monthNames:["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], monthNamesShort:["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], dayNames:["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], dayNamesShort:["Dom", "Lun", "Mar", "Mié", "Juv", "Vie", "Sáb"], formatString:"%Y-%m-%d %H:%M:%S"}, ru:{monthNames:["??????", "???????", "????", "??????", "???", "????", "????", "??????", "????????", "???????", "??????", "???????"], monthNamesShort:["???", "???", "???", "???", "???", "???", "???", "???", "???", "???", "???", "???"], dayNames:["???????????", "???????????", "???????", "?????", "???????", "???????", "???????"], dayNamesShort:["???", "???", "???", "???", "???", "???", "???"], formatString:"%Y-%m-%d %H:%M:%S"}, ar:{monthNames:["????? ??????", "????", "????", "?????", "????", "??????", "????", "??", "?????", "????? ?????", "????? ??????", "????? ?????"], monthNamesShort:["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], dayNames:["?????", "?????", "???????", "????????", "????????", "??????", "??????"], dayNamesShort:["???", "???", "?????", "??????", "??????", "????", "????"], formatString:"%Y-%m-%d %H:%M:%S"}, pt:{monthNames:["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], monthNamesShort:["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], dayNames:["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"], dayNamesShort:["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], formatString:"%Y-%m-%d %H:%M:%S"}, "pt-BR":{monthNames:["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], monthNamesShort:["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], dayNames:["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"], dayNamesShort:["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], formatString:"%Y-%m-%d %H:%M:%S"}}; aa.regional["en-US"] = aa.regional["en-GB"] = aa.regional.en; aa.regional.getLocale = function(){var ab = aa.config.defaultLocale; if (document && document.getElementsByTagName("html") && document.getElementsByTagName("html")[0].lang){ab = document.getElementsByTagName("html")[0].lang; if (!aa.regional.hasOwnProperty(ab)){ab = aa.config.defaultLocale}}return ab}; var y = 24 * 60 * 60 * 1000; var J = function(ab, ae){ab = String(ab); var ac = ae - ab.length; var ad = String(Math.pow(10, ac)).slice(1); return ad.concat(ab)}; var A = {millisecond:1, second:1000, minute:60 * 1000, hour:60 * 60 * 1000, day:y, week:7 * y, month:{add:function(ad, ab){A.year.add(ad, Math[ab > 0?"floor":"ceil"](ab / 12)); var ac = ad.getMonth() + (ab % 12); if (ac == 12){ac = 0; ad.setYear(ad.getFullYear() + 1)} else{if (ac == - 1){ac = 11; ad.setYear(ad.getFullYear() - 1)}}ad.setMonth(ac)}, diff:function(af, ad){var ab = af.getFullYear() - ad.getFullYear(); var ac = af.getMonth() - ad.getMonth() + (ab * 12); var ae = af.getDate() - ad.getDate(); return ac + (ae / 30)}}, year:{add:function(ac, ab){ac.setYear(ac.getFullYear() + Math[ab > 0?"floor":"ceil"](ab))}, diff:function(ac, ab){return A.month.diff(ac, ab) / 12}}}; for (var T in A){if (T.substring(T.length - 1) != "s"){A[T + "s"] = A[T]}}var D = function(af, ae, ac){if (aa.formats[ac]["shortcuts"][ae]){return aa.strftime(af, aa.formats[ac]["shortcuts"][ae], ac)} else{var ab = (aa.formats[ac]["codes"][ae] || "").split("."); var ad = af["get" + ab[0]]?af["get" + ab[0]]():""; if (ab[1]){ad = J(ad, ab[1])}return ad}}; aa.strftime = function(ah, ae, ad, ai){var ac = "perl"; var ag = aa.regional.getLocale(); if (ad && aa.formats.hasOwnProperty(ad)){ac = ad} else{if (ad && aa.regional.hasOwnProperty(ad)){ag = ad}}if (ai && aa.formats.hasOwnProperty(ai)){ac = ai} else{if (ai && aa.regional.hasOwnProperty(ai)){ag = ai}}if (j(ah) != "[object Object]" || ah._type != "jsDate"){ah = new aa(ah); ah.locale = ag}if (!ae){ae = ah.formatString || aa.regional[ag]["formatString"]}var ab = ae || "%Y-%m-%d", aj = "", af; while (ab.length > 0){if (af = ab.match(aa.formats[ac].codes.matcher)){aj += ab.slice(0, af.index); aj += (af[1] || "") + D(ah, af[2], ac); ab = ab.slice(af.index + af[0].length)} else{aj += ab; ab = ""}}return aj}; aa.formats = {ISO:"%Y-%m-%dT%H:%M:%S.%N%G", SQL:"%Y-%m-%d %H:%M:%S"}; aa.formats.perl = {codes:{matcher:/()%(#?(%|[a-z]))/i, Y:"FullYear", y:"ShortYear.2", m:"MonthNumber.2", "#m":"MonthNumber", B:"MonthName", b:"AbbrMonthName", d:"Date.2", "#d":"Date", e:"Date", A:"DayName", a:"AbbrDayName", w:"Day", H:"Hours.2", "#H":"Hours", I:"Hours12.2", "#I":"Hours12", p:"AMPM", M:"Minutes.2", "#M":"Minutes", S:"Seconds.2", "#S":"Seconds", s:"Unix", N:"Milliseconds.3", "#N":"Milliseconds", O:"TimezoneOffset", Z:"TimezoneName", G:"GmtOffset"}, shortcuts:{F:"%Y-%m-%d", T:"%H:%M:%S", X:"%H:%M:%S", x:"%m/%d/%y", D:"%m/%d/%y", "#c":"%a %b %e %H:%M:%S %Y", v:"%e-%b-%Y", R:"%H:%M", r:"%I:%M:%S %p", t:"\t", n:"\n", "%":"%"}}; aa.formats.php = {codes:{matcher:/()%((%|[a-z]))/i, a:"AbbrDayName", A:"DayName", d:"Date.2", e:"Date", j:"DayOfYear.3", u:"DayOfWeek", w:"Day", U:"FullWeekOfYear.2", V:"IsoWeek.2", W:"WeekOfYear.2", b:"AbbrMonthName", B:"MonthName", m:"MonthNumber.2", h:"AbbrMonthName", C:"Century.2", y:"ShortYear.2", Y:"FullYear", H:"Hours.2", I:"Hours12.2", l:"Hours12", p:"AMPM", P:"AmPm", M:"Minutes.2", S:"Seconds.2", s:"Unix", O:"TimezoneOffset", z:"GmtOffset", Z:"TimezoneAbbr"}, shortcuts:{D:"%m/%d/%y", F:"%Y-%m-%d", T:"%H:%M:%S", X:"%H:%M:%S", x:"%m/%d/%y", R:"%H:%M", r:"%I:%M:%S %p", t:"\t", n:"\n", "%":"%"}}; aa.createDate = function(ad){if (ad == null){return new Date()}if (ad instanceof Date){return ad}if (typeof ad == "number"){return new Date(ad)}var ai = String(ad).replace(/^\s*(.+)\s*$/g, "$1"); ai = ai.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/, "$1/$2/$3"); ai = ai.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i, "$1 $2 $3"); var ah = ai.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i); if (ah && ah.length > 3){var am = parseFloat(ah[3]); var ag = aa.config.defaultCentury + am; ag = String(ag); ai = ai.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i, ah[1] + " " + ah[2] + " " + ag)}ah = ai.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/); function al(aq, ap){var aw = parseFloat(ap[1]); var av = parseFloat(ap[2]); var au = parseFloat(ap[3]); var at = aa.config.defaultCentury; var ao, an, ax, ar; if (aw > 31){an = au; ax = av; ao = at + aw} else{an = av; ax = aw; ao = at + au}ar = ax + "/" + an + "/" + ao; return aq.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/, ar)}if (ah && ah.length > 3){ai = al(ai, ah)}var ah = ai.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/); if (ah && ah.length > 3){ai = al(ai, ah)}var af = 0; var ac = aa.matchers.length; var ak, ab, aj = ai, ae; while (af < ac){ab = Date.parse(aj); if (!isNaN(ab)){return new Date(ab)}ak = aa.matchers[af]; if (typeof ak == "function"){ae = ak.call(aa, aj); if (ae instanceof Date){return ae}} else{aj = ai.replace(ak[0], ak[1])}af++}return NaN}; aa.daysInMonth = function(ab, ac){if (ac == 2){return new Date(ab, 1, 29).getDate() == 29?29:28}return[r, 31, r, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][ac]}; aa.matchers = [[/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/, "$2/$1/$3"], [/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/, "$2/$3/$1"], function(ae){var ac = ae.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i); if (ac){if (ac[1]){var ad = this.createDate(ac[1]); if (isNaN(ad)){return}} else{var ad = new Date(); ad.setMilliseconds(0)}var ab = parseFloat(ac[2]); if (ac[6]){ab = ac[6].toLowerCase() == "am"?(ab == 12?0:ab):(ab == 12?12:ab + 12)}ad.setHours(ab, parseInt(ac[3] || 0, 10), parseInt(ac[4] || 0, 10), ((parseFloat(ac[5] || 0)) || 0) * 1000); return ad} else{return ae}}, function(ae){var ac = ae.match(/^(?:(.+))[T|\s+]([012]\d)(?:\:(\d\d))(?:\:(\d\d))(?:\.\d+)([\+\-]\d\d\:\d\d)$/i); if (ac){if (ac[1]){var ad = this.createDate(ac[1]); if (isNaN(ad)){return}} else{var ad = new Date(); ad.setMilliseconds(0)}var ab = parseFloat(ac[2]); ad.setHours(ab, parseInt(ac[3], 10), parseInt(ac[4], 10), parseFloat(ac[5]) * 1000); return ad} else{return ae}}, function(af){var ad = af.match(/^([0-3]?\d)\s*[-\/.\s]{1}\s*([a-zA-Z]{3,9})\s*[-\/.\s]{1}\s*([0-3]?\d)$/); if (ad){var ae = new Date(); var ag = aa.config.defaultCentury; var ai = parseFloat(ad[1]); var ah = parseFloat(ad[3]); var ac, ab, aj; if (ai > 31){ab = ah; ac = ag + ai} else{ab = ai; ac = ag + ah}var aj = W(ad[2], aa.regional[aa.regional.getLocale()]["monthNamesShort"]); if (aj == - 1){aj = W(ad[2], aa.regional[aa.regional.getLocale()]["monthNames"])}ae.setFullYear(ac, aj, ab); ae.setHours(0, 0, 0, 0); return ae} else{return af}}]; function W(ad, ae){if (ae.indexOf){return ae.indexOf(ad)}for (var ab = 0, ac = ae.length; ab < ac; ab++){if (ae[ab] === ad){return ab}}return - 1}function j(ab){ +if (ab === null){return"[object Null]"}return Object.prototype.toString.call(ab)}H.jsDate = aa; + H.jqplot.sprintf = function(){function ah(an, aj, ak, am){ + var al = (an.length >= aj)?"":Array(1 + aj - an.length >>> 0).join(ak); + return am?an + al:al + an}function ae(al){ + var ak = new String(al); + for (var aj = 10; aj > 0; aj--){if (ak == (ak = ak.replace(/^(\d+)(\d{3})/, "$1" + H.jqplot.sprintf.thousandsSeparator + "$2"))){break}}return ak}function ad(ao, an, aq, al, am, ak){var ap = al - ao.length; if (ap > 0){var aj = " "; if (ak){aj = " "}if (aq || !am){ao = ah(ao, al, aj, aq)} else{ao = ao.slice(0, an.length) + ah("", ap, "0", true) + ao.slice(an.length)}}return ao}function ai(ar, ak, ap, al, aj, ao, aq, an){var am = ar >>> 0; ap = ap && am && {"2":"0b", "8":"0", "16":"0x"}[ak] || ""; ar = ap + ah(am.toString(ak), ao || 0, "0", false); return ad(ar, ap, al, aj, aq, an)}function ab(an, ao, al, aj, am, ak){if (aj != null){an = an.slice(0, aj)}return ad(an, "", ao, al, am, ak)}var ac = arguments, af = 0, ag = ac[af++]; return ag.replace(H.jqplot.sprintf.regex, function(aG, aq, ar, av, aI, aD, ao){if (aG == "%%"){return"%"}var ax = false, at = "", au = false, aF = false, ap = false, an = false; for (var aC = 0; ar && aC < ar.length; aC++){switch (ar.charAt(aC)){case" ":at = " "; break; case"+":at = "+"; break; case"-":ax = true; break; case"0":au = true; break; case"#":aF = true; break; case"&":ap = true; break; case"'":an = true; break}}if (!av){av = 0} else{if (av == "*"){av = + ac[af++]} else{if (av.charAt(0) == "*"){av = + ac[av.slice(1, - 1)]} else{av = + av}}}if (av < 0){av = - av; ax = true}if (!isFinite(av)){throw new Error("$.jqplot.sprintf: (minimum-)width must be finite")}if (!aD){aD = "fFeE".indexOf(ao) > - 1?6:(ao == "d")?0:void (0)} else{if (aD == "*"){aD = + ac[af++]} else{if (aD.charAt(0) == "*"){aD = + ac[aD.slice(1, - 1)]} else{aD = + aD}}}var az = aq?ac[aq.slice(0, - 1)]:ac[af++]; switch (ao){case"s":if (az == null){return""}return ab(String(az), ax, av, aD, au, ap); case"c":return ab(String.fromCharCode( + az), ax, av, aD, au, ap); case"b":return ai(az, 2, aF, ax, av, aD, au, ap); case"o":return ai(az, 8, aF, ax, av, aD, au, ap); case"x":return ai(az, 16, aF, ax, av, aD, au, ap); case"X":return ai(az, 16, aF, ax, av, aD, au, ap).toUpperCase(); case"u":return ai(az, 10, aF, ax, av, aD, au, ap); case"i":var al = parseInt( + az, 10); if (isNaN(al)){return""}var aB = al < 0?"-":at; var aE = an?ae(String(Math.abs(al))):String(Math.abs(al)); az = aB + ah(aE, aD, "0", false); return ad(az, aB, ax, av, au, ap); case"d":var al = Math.round( + az); if (isNaN(al)){return""}var aB = al < 0?"-":at; var aE = an?ae(String(Math.abs(al))):String(Math.abs(al)); az = aB + ah(aE, aD, "0", false); return ad(az, aB, ax, av, au, ap); case"e":case"E":case"f":case"F":case"g":case"G":var al = + az; if (isNaN(al)){return""}var aB = al < 0?"-":at; var am = ["toExponential", "toFixed", "toPrecision"]["efg".indexOf(ao.toLowerCase())]; var aH = ["toString", "toUpperCase"]["eEfFgG".indexOf(ao) % 2]; var aE = Math.abs(al)[am](aD); aE = an?ae(aE):aE; az = aB + aE; var aw = ad(az, aB, ax, av, au, ap)[aH](); if (H.jqplot.sprintf.decimalMark !== "." && H.jqplot.sprintf.decimalMark !== H.jqplot.sprintf.thousandsSeparator){return aw.replace(/\./, H.jqplot.sprintf.decimalMark)} else{return aw}case"p":case"P":var al = + az; if (isNaN(al)){return""}var aB = al < 0?"-":at; var ay = String(Number(Math.abs(al)).toExponential()).split(/e|E/); var ak = (ay[0].indexOf(".") != - 1)?ay[0].length - 1:ay[0].length; var aA = (ay[1] < 0)? - ay[1] - 1:0; if (Math.abs(al) < 1){if (ak + aA <= aD){az = aB + Math.abs(al).toPrecision(ak)} else{if (ak <= aD - 1){az = aB + Math.abs(al).toExponential(ak - 1)} else{az = aB + Math.abs(al).toExponential(aD - 1)}}} else{var aj = (ak <= aD)?ak:aD; az = aB + Math.abs(al).toPrecision(aj)}var aH = ["toString", "toUpperCase"]["pP".indexOf(ao) % 2]; return ad(az, aB, ax, av, au, ap)[aH](); case"n":return""; default:return aG}})}; H.jqplot.sprintf.thousandsSeparator = ","; H.jqplot.sprintf.decimalMark = "."; H.jqplot.sprintf.regex = /%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g; H.jqplot.getSignificantFigures = function(af){var ah = String(Number(Math.abs(af)).toExponential()).split(/e|E/); var ag = (ah[0].indexOf(".") != - 1)?ah[0].length - 1:ah[0].length; var ac = (ah[1] < 0)? - ah[1] - 1:0; var ab = parseInt(ah[1], 10); var ad = (ab + 1 > 0)?ab + 1:0; var ae = (ag <= ad)?0:ag - ab - 1; return{significantDigits:ag, digitsLeft:ad, digitsRight:ae, zeros:ac, exponent:ab}}; H.jqplot.getPrecision = function(ab){return H.jqplot.getSignificantFigures(ab).digitsRight}})(jQuery); var backCompat = $.uiBackCompat !== false; $.jqplot.effects = {effect:{}}; var dataSpace = "jqplot.storage."; $.extend($.jqplot.effects, {version:"1.9pre", save:function(b, c){for (var a = 0; a < c.length; a++){if (c[a] !== null){b.data(dataSpace + c[a], b[0].style[c[a]])}}}, restore:function(b, c){for (var a = 0; a < c.length; a++){if (c[a] !== null){b.css(c[a], b.data(dataSpace + c[a]))}}}, setMode:function(a, b){if (b === "toggle"){b = a.is(":hidden")?"show":"hide"}return b}, createWrapper:function(b){if (b.parent().is(".ui-effects-wrapper")){return b.parent()}var c = {width:b.outerWidth(true), height:b.outerHeight(true), "float":b.css("float")}, e = $("
").addClass("ui-effects-wrapper").css({fontSize:"100%", background:"transparent", border:"none", margin:0, padding:0}), a = {width:b.width(), height:b.height()}, d = document.activeElement; b.wrap(e); if (b[0] === d || $.contains(b[0], d)){$(d).focus()}e = b.parent(); if (b.css("position") === "static"){e.css({position:"relative"}); b.css({position:"relative"})} else{$.extend(c, {position:b.css("position"), zIndex:b.css("z-index")}); $.each(["top", "left", "bottom", "right"], function(f, g){c[g] = b.css(g); if (isNaN(parseInt(c[g], 10))){c[g] = "auto"}}); b.css({position:"relative", top:0, left:0, right:"auto", bottom:"auto"})}b.css(a); return e.css(c).show()}, removeWrapper:function(a){var b = document.activeElement; if (a.parent().is(".ui-effects-wrapper")){a.parent().replaceWith(a); if (a[0] === b || $.contains(a[0], b)){$(b).focus()}}return a}}); function _normalizeArguments(b, a, c, d){if ($.isPlainObject(b)){return b}b = {effect:b}; if (a === undefined){a = {}}if ($.isFunction(a)){d = a; c = null; a = {}}if ($.type(a) === "number" || $.fx.speeds[a]){d = c; c = a; a = {}}if ($.isFunction(c)){d = c; c = null}if (a){$.extend(b, a)}c = c || a.duration; b.duration = $.fx.off?0:typeof c === "number"?c:c in $.fx.speeds?$.fx.speeds[c]:$.fx.speeds._default; b.complete = d || a.complete; return b}function standardSpeed(a){if (!a || typeof a === "number" || $.fx.speeds[a]){return true}if (typeof a === "string" && !$.jqplot.effects.effect[a]){if (backCompat && $.jqplot.effects[a]){return false}return true}return false}$.fn.extend({jqplotEffect:function(i, j, b, h){var g = _normalizeArguments.apply(this, arguments), d = g.mode, e = g.queue, f = $.jqplot.effects.effect[g.effect], a = !f && backCompat && $.jqplot.effects[g.effect]; if ($.fx.off || !(f || a)){if (d){return this[d](g.duration, g.complete)} else{return this.each(function(){if (g.complete){g.complete.call(this)}})}}function c(m){var n = $(this), l = g.complete, o = g.mode; function k(){if ($.isFunction(l)){l.call(n[0])}if ($.isFunction(m)){m()}}if (n.is(":hidden")?o === "hide":o === "show"){k()} else{f.call(n[0], g, k)}}if (f){return e === false?this.each(c):this.queue(e || "fx", c)} else{return a.call(this, {options:g, duration:g.duration, callback:g.complete, mode:g.mode})}}}); var rvertical = /up|down|vertical/, rpositivemotion = /up|left|vertical|horizontal/; $.jqplot.effects.effect.blind = function(c, h){var d = $(this), k = ["position", "top", "bottom", "left", "right", "height", "width"], i = $.jqplot.effects.setMode(d, c.mode || "hide"), m = c.direction || "up", f = rvertical.test(m), e = f?"height":"width", j = f?"top":"left", p = rpositivemotion.test(m), g = {}, n = i === "show", b, a, l; if (d.parent().is(".ui-effects-wrapper")){$.jqplot.effects.save(d.parent(), k)} else{$.jqplot.effects.save(d, k)}d.show(); l = parseInt(d.css("top"), 10); b = $.jqplot.effects.createWrapper(d).css({overflow:"hidden"}); a = f?b[e]() + l:b[e](); g[e] = n?String(a):"0"; if (!p){d.css(f?"bottom":"right", 0).css(f?"top":"left", "").css({position:"absolute"}); g[j] = n?"0":String(a)}if (n){b.css(e, 0); if (!p){b.css(j, a)}}b.animate(g, {duration:c.duration, easing:c.easing, queue:false, complete:function(){if (i === "hide"){d.hide()}$.jqplot.effects.restore(d, k); $.jqplot.effects.removeWrapper(d); h()}})}; + diff --git a/experiment/simulation/js/jquery_files/jquery.min.js b/experiment/simulation/js/jquery_files/jquery.min.js new file mode 100644 index 0000000..6601b82 --- /dev/null +++ b/experiment/simulation/js/jquery_files/jquery.min.js @@ -0,0 +1,13 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +(function(a, b){function cu(a){return f.isWindow(a)?a:a.nodeType === 9?a.defaultView || a.parentWindow:!1}function cr(a){if (!cg[a]) + {var b = c.body, d = f("<" + a + ">").appendTo(b), e = d.css("display"); + d.remove(); if (e === "none" || e === ""){ch || (ch = c.createElement("iframe"), ch.frameBorder = ch.width = ch.height = 0), b.appendChild(ch); if (!ci || !ch.createElement)ci = (ch.contentWindow || ch.contentDocument).document, ci.write((c.compatMode === "CSS1Compat"?"":"") + ""), ci.close(); d = ci.createElement(a), ci.body.appendChild(d), e = f.css(d, "display"), b.removeChild(ch)}cg[a] = e}return cg[a]}function cq(a, b){var c = {}; f.each(cm.concat.apply([], cm.slice(0, b)), function(){c[this] = a}); return c}function cp(){cn = b}function co(){setTimeout(cp, 0); return cn = f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")} catch (b){}}function ce(){try{return new a.XMLHttpRequest} catch (b){}}function b$(a, c){a.dataFilter && (c = a.dataFilter(c, a.dataType)); var d = a.dataTypes, e = {}, g, h, i = d.length, j, k = d[0], l, m, n, o, p; for (g = 1; g < i; g++){if (g === 1)for (h in a.converters)typeof h == "string" && (e[h.toLowerCase()] = a.converters[h]); l = k, k = d[g]; if (k === "*")k = l; else if (l !== "*" && l !== k){m = l + " " + k, n = e[m] || e["* " + k]; if (!n){p = b; for (o in e){j = o.split(" "); if (j[0] === l || j[0] === "*"){p = e[j[1] + " " + k]; if (p){o = e[o], o === !0?n = p:p === !0 && (n = o); break}}}}!n && !p && f.error("No conversion from " + m.replace(" ", " to ")), n !== !0 && (c = n?n(c):p(o(c)))}}return c}function bZ(a, c, d){var e = a.contents, f = a.dataTypes, g = a.responseFields, h, i, j, k; for (i in g)i in d && (c[g[i]] = d[i]); while (f[0] === "*")f.shift(), h === b && (h = a.mimeType || c.getResponseHeader("content-type")); if (h)for (i in e)if (e[i] && e[i].test(h)){f.unshift(i); break}if (f[0]in d)j = f[0]; else{for (i in d){if (!f[0] || a.converters[i + " " + f[0]]){j = i; break}k || (k = i)}j = j || k}if (j){j !== f[0] && f.unshift(j); return d[j]}}function bY(a, b, c, d){if (f.isArray(b))f.each(b, function(b, e){c || bA.test(a)?d(a, e):bY(a + "[" + (typeof e == "object" || f.isArray(e)?b:"") + "]", e, c, d)}); else if (!c && b != null && typeof b == "object")for (var e in b)bY(a + "[" + e + "]", b[e], c, d); else d(a, b)}function bX(a, c){var d, e, g = f.ajaxSettings.flatOptions || {}; for (d in c)c[d] !== b && ((g[d]?a:e || (e = {}))[d] = c[d]); e && f.extend(!0, a, e)}function bW(a, c, d, e, f, g){f = f || c.dataTypes[0], g = g || {}, g[f] = !0; var h = a[f], i = 0, j = h?h.length:0, k = a === bP, l; for (; i < j && (k || !l); i++)l = h[i](c, d, e), typeof l == "string" && (!k || g[l]?l = b:(c.dataTypes.unshift(l), l = bW(a, c, d, e, l, g))); (k || !l) && !g["*"] && (l = bW(a, c, d, e, "*", g)); return l}function bV(a){return function(b, c){typeof b != "string" && (c = b, b = "*"); if (f.isFunction(c)){var d = b.toLowerCase().split(bL), e = 0, g = d.length, h, i, j; for (; e < g; e++)h = d[e], j = /^\+/.test(h), j && (h = h.substr(1) || "*"), i = a[h] = a[h] || [], i[j?"unshift":"push"](c)}}}function by(a, b, c){var d = b === "width"?a.offsetWidth:a.offsetHeight, e = b === "width"?bt:bu; if (d > 0){c !== "border" && f.each(e, function(){c || (d -= parseFloat(f.css(a, "padding" + this)) || 0), c === "margin"?d += parseFloat(f.css(a, c + this)) || 0:d -= parseFloat(f.css(a, "border" + this + "Width")) || 0}); return d + "px"}d = bv(a, b, b); if (d < 0 || d == null)d = a.style[b] || 0; d = parseFloat(d) || 0, c && f.each(e, function(){d += parseFloat(f.css(a, "padding" + this)) || 0, c !== "padding" && (d += parseFloat(f.css(a, "border" + this + "Width")) || 0), c === "margin" && (d += parseFloat(f.css(a, c + this)) || 0)}); return d + "px"}function bl(a, b){b.src?f.ajax({url:b.src, async:!1, dataType:"script"}):f.globalEval((b.text || b.textContent || b.innerHTML || "").replace(bd, "/*$0*/")), b.parentNode && b.parentNode.removeChild(b)}function bk(a){f.nodeName(a, "input")?bj(a):"getElementsByTagName"in a && f.grep(a.getElementsByTagName("input"), bj)}function bj(a){if (a.type === "checkbox" || a.type === "radio")a.defaultChecked = a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a, b){var c; if (b.nodeType === 1){b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(); if (c === "object")b.outerHTML = a.outerHTML; else if (c !== "input" || a.type !== "checkbox" && a.type !== "radio"){if (c === "option")b.selected = a.defaultSelected; else if (c === "input" || c === "textarea")b.defaultValue = a.defaultValue} else a.checked && (b.defaultChecked = b.checked = a.checked), b.value !== a.value && (b.value = a.value); b.removeAttribute(f.expando)}}function bg(a, b){if (b.nodeType === 1 && !!f.hasData(a)){var c = f.expando, d = f.data(a), e = f.data(b, d); if (d = d[c]){var g = d.events; e = e[c] = f.extend({}, d); if (g){delete e.handle, e.events = {}; for (var h in g)for (var i = 0, j = g[h].length; i < j; i++)f.event.add(b, h + (g[h][i].namespace?".":"") + g[h][i].namespace, g[h][i], g[h][i].data)}}}}function bf(a, b){return f.nodeName(a, "table")?a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a, b, c){b = b || 0; if (f.isFunction(b))return f.grep(a, function(a, d){var e = !!b.call(a, d, a); return e === c}); if (b.nodeType)return f.grep(a, function(a, d){return a === b === c}); if (typeof b == "string"){var d = f.grep(a, function(a){return a.nodeType === 1}); if (Q.test(b))return f.filter(b, d, !c); b = f.filter(b, d)}return f.grep(a, function(a, d){return f.inArray(a, b) >= 0 === c})}function U(a){return!a || !a.parentNode || a.parentNode.nodeType === 11}function M(a, b){return(a && a !== "*"?a + ".":"") + b.replace(y, "`").replace(z, "&")}function L(a){var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [], q = [], r = f._data(this, "events"); if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")){a.namespace && (n = new RegExp("(^|\\.)" + a.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)")), a.liveFired = this; var s = r.live.slice(0); for (i = 0; i < s.length; i++)g = s[i], g.origType.replace(w, "") === a.type?q.push(g.selector):s.splice(i--, 1); e = f(a.target).closest(q, a.currentTarget); for (j = 0, k = e.length; j < k; j++){m = e[j]; for (i = 0; i < s.length; i++){g = s[i]; if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled){h = m.elem, d = null; if (g.preType === "mouseenter" || g.preType === "mouseleave")a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h); (!d || d !== h) && p.push({elem:h, handleObj:g, level:m.level})}}}for (j = 0, k = p.length; j < k; j++){e = p[j]; if (c && e.level > c)break; a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments); if (o === !1 || a.isPropagationStopped()){c = e.level, o === !1 && (b = !1); if (a.isImmediatePropagationStopped())break}}return b}}function J(a, c, d){var e = f.extend({}, d[0]); e.type = a, e.originalEvent = {}, e.liveFired = b, f.event.handle.call(c, e), e.isDefaultPrevented() && d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a, c, d){var e = c + "defer", g = c + "queue", h = c + "mark", i = f.data(a, e, b, !0); i && (d === "queue" || !f.data(a, g, b, !0)) && (d === "mark" || !f.data(a, h, b, !0)) && setTimeout(function(){!f.data(a, g, b, !0) && !f.data(a, h, b, !0) && (f.removeData(a, e, !0), i.resolve())}, 0)}function l(a){for (var b in a)if (b !== "toJSON")return!1; return!0}function k(a, c, d){if (d === b && a.nodeType === 1){var e = "data-" + c.replace(j, "-$1").toLowerCase(); d = a.getAttribute(e); if (typeof d == "string"){try{d = d === "true"?!0:d === "false"?!1:d === "null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)} catch (g){}f.data(a, c, d)} else d = b}return d}var c = a.document, d = a.navigator, e = a.location, f = function(){function K(){if (!e.isReady){try{c.documentElement.doScroll("left")} catch (a){setTimeout(K, 1); return}e.ready()}}var e = function(a, b){return new e.fn.init(a, b, h)}, f = a.jQuery, g = a.$, h, i = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, j = /\S/, k = /^\s+/, l = /\s+$/, m = /\d/, n = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, o = /^[\],:{}\s]*$/, p = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, q = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, r = /(?:^|:|,)(?:\s*\[)+/g, s = /(webkit)[ \/]([\w.]+)/, t = /(opera)(?:.*version)?[ \/]([\w.]+)/, u = /(msie) ([\w.]+)/, v = /(mozilla)(?:.*? rv:([\w.]+))?/, w = /-([a-z]|[0-9])/ig, x = /^-ms-/, y = function(a, b){return(b + "").toUpperCase()}, z = d.userAgent, A, B, C, D = Object.prototype.toString, E = Object.prototype.hasOwnProperty, F = Array.prototype.push, G = Array.prototype.slice, H = String.prototype.trim, I = Array.prototype.indexOf, J = {}; e.fn = e.prototype = {constructor:e, init:function(a, d, f){var g, h, j, k; if (!a)return this; if (a.nodeType){this.context = this[0] = a, this.length = 1; return this}if (a === "body" && !d && c.body){this.context = c, this[0] = c.body, this.selector = a, this.length = 1; return this}if (typeof a == "string"){a.charAt(0) !== "<" || a.charAt(a.length - 1) !== ">" || a.length < 3?g = i.exec(a):g = [null, a, null]; if (g && (g[1] || !d)){if (g[1]){d = d instanceof e?d[0]:d, k = d?d.ownerDocument || d:c, j = n.exec(a), j?e.isPlainObject(d)?(a = [c.createElement(j[1])], e.fn.attr.call(a, d, !0)):a = [k.createElement(j[1])]:(j = e.buildFragment([g[1]], [k]), a = (j.cacheable?e.clone(j.fragment):j.fragment).childNodes); return e.merge(this, a)}h = c.getElementById(g[2]); if (h && h.parentNode){if (h.id !== g[2])return f.find(a); this.length = 1, this[0] = h}this.context = c, this.selector = a; return this}return!d || d.jquery?(d || f).find(a):this.constructor(d).find(a)}if (e.isFunction(a))return f.ready(a); a.selector !== b && (this.selector = a.selector, this.context = a.context); return e.makeArray(a, this)}, selector:"", jquery:"1.6.4", length:0, size:function(){return this.length}, toArray:function(){return G.call(this, 0)}, get:function(a){return a == null?this.toArray():a < 0?this[this.length + a]:this[a]}, pushStack:function(a, b, c){var d = this.constructor(); e.isArray(a)?F.apply(d, a):e.merge(d, a), d.prevObject = this, d.context = this.context, b === "find"?d.selector = this.selector + (this.selector?" ":"") + c:b && (d.selector = this.selector + "." + b + "(" + c + ")"); return d}, each:function(a, b){return e.each(this, a, b)}, ready:function(a){e.bindReady(), B.done(a); return this}, eq:function(a){return a === - 1?this.slice(a):this.slice(a, + a + 1)}, first:function(){return this.eq(0)}, last:function(){return this.eq( - 1)}, slice:function(){return this.pushStack(G.apply(this, arguments), "slice", G.call(arguments).join(","))}, map:function(a){return this.pushStack(e.map(this, function(b, c){return a.call(b, c, b)}))}, end:function(){return this.prevObject || this.constructor(null)}, push:F, sort:[].sort, splice:[].splice}, e.fn.init.prototype = e.fn, e.extend = e.fn.extend = function(){var a, c, d, f, g, h, i = arguments[0] || {}, j = 1, k = arguments.length, l = !1; typeof i == "boolean" && (l = i, i = arguments[1] || {}, j = 2), typeof i != "object" && !e.isFunction(i) && (i = {}), k === j && (i = this, --j); for (; j < k; j++)if ((a = arguments[j]) != null)for (c in a){d = i[c], f = a[c]; if (i === f)continue; l && f && (e.isPlainObject(f) || (g = e.isArray(f)))?(g?(g = !1, h = d && e.isArray(d)?d:[]):h = d && e.isPlainObject(d)?d:{}, i[c] = e.extend(l, h, f)):f !== b && (i[c] = f)}return i}, e.extend({noConflict:function(b){a.$ === e && (a.$ = g), b && a.jQuery === e && (a.jQuery = f); return e}, isReady:!1, readyWait:1, holdReady:function(a){a?e.readyWait++:e.ready(!0)}, ready:function(a){if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady){if (!c.body)return setTimeout(e.ready, 1); e.isReady = !0; if (a !== !0 && --e.readyWait > 0)return; B.resolveWith(c, [e]), e.fn.trigger && e(c).trigger("ready").unbind("ready")}}, bindReady:function(){if (!B){B = e._Deferred(); if (c.readyState === "complete")return setTimeout(e.ready, 1); if (c.addEventListener)c.addEventListener("DOMContentLoaded", C, !1), a.addEventListener("load", e.ready, !1); else if (c.attachEvent){c.attachEvent("onreadystatechange", C), a.attachEvent("onload", e.ready); var b = !1; try{b = a.frameElement == null} catch (d){}c.documentElement.doScroll && b && K()}}}, isFunction:function(a){return e.type(a) === "function"}, isArray:Array.isArray || function(a){return e.type(a) === "array"}, isWindow:function(a){return a && typeof a == "object" && "setInterval"in a}, isNaN:function(a){return a == null || !m.test(a) || isNaN(a)}, type:function(a){return a == null?String(a):J[D.call(a)] || "object"}, isPlainObject:function(a){if (!a || e.type(a) !== "object" || a.nodeType || e.isWindow(a))return!1; try{if (a.constructor && !E.call(a, "constructor") && !E.call(a.constructor.prototype, "isPrototypeOf"))return!1} catch (c){return!1}var d; for (d in a); return d === b || E.call(a, d)}, isEmptyObject:function(a){for (var b in a)return!1; return!0}, error:function(a){throw a}, parseJSON:function(b){if (typeof b != "string" || !b)return null; b = e.trim(b); if (a.JSON && a.JSON.parse)return a.JSON.parse(b); if (o.test(b.replace(p, "@").replace(q, "]").replace(r, "")))return(new Function("return " + b))(); e.error("Invalid JSON: " + b)}, parseXML:function(c){var d, f; try{a.DOMParser?(f = new DOMParser, d = f.parseFromString(c, "text/xml")):(d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))} catch (g){d = b}(!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && e.error("Invalid XML: " + c); return d}, noop:function(){}, globalEval:function(b){b && j.test(b) && (a.execScript || function(b){a.eval.call(a, b)})(b)}, camelCase:function(a){return a.replace(x, "ms-").replace(w, y)}, nodeName:function(a, b){return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()}, each:function(a, c, d){var f, g = 0, h = a.length, i = h === b || e.isFunction(a); if (d){if (i){for (f in a)if (c.apply(a[f], d) === !1)break} else for (; g < h; )if (c.apply(a[g++], d) === !1)break} else if (i){for (f in a)if (c.call(a[f], f, a[f]) === !1)break} else for (; g < h; )if (c.call(a[g], g, a[g++]) === !1)break; return a}, trim:H?function(a){return a == null?"":H.call(a)}:function(a){return a == null?"":(a + "").replace(k, "").replace(l, "")}, makeArray:function(a, b){var c = b || []; if (a != null){var d = e.type(a); a.length == null || d === "string" || d === "function" || d === "regexp" || e.isWindow(a)?F.call(c, a):e.merge(c, a)}return c}, inArray:function(a, b){if (!b)return - 1; if (I)return I.call(b, a); for (var c = 0, d = b.length; c < d; c++)if (b[c] === a)return c; return - 1}, merge:function(a, c){var d = a.length, e = 0; if (typeof c.length == "number")for (var f = c.length; e < f; e++)a[d++] = c[e]; else while (c[e] !== b)a[d++] = c[e++]; a.length = d; return a}, grep:function(a, b, c){var d = [], e; c = !!c; for (var f = 0, g = a.length; f < g; f++)e = !!b(a[f], f), c !== e && d.push(a[f]); return d}, map:function(a, c, d){var f, g, h = [], i = 0, j = a.length, k = a instanceof e || j !== b && typeof j == "number" && (j > 0 && a[0] && a[j - 1] || j === 0 || e.isArray(a)); if (k)for (; i < j; i++)f = c(a[i], i, d), f != null && (h[h.length] = f); else for (g in a)f = c(a[g], g, d), f != null && (h[h.length] = f); return h.concat.apply([], h)}, guid:1, proxy:function(a, c){if (typeof c == "string"){var d = a[c]; c = a, a = d}if (!e.isFunction(a))return b; var f = G.call(arguments, 2), g = function(){return a.apply(c, f.concat(G.call(arguments)))}; g.guid = a.guid = a.guid || g.guid || e.guid++; return g}, access:function(a, c, d, f, g, h){var i = a.length; if (typeof c == "object"){for (var j in c)e.access(a, j, c[j], f, g, d); return a}if (d !== b){f = !h && f && e.isFunction(d); for (var k = 0; k < i; k++)g(a[k], c, f?d.call(a[k], k, g(a[k], c)):d, h); return a}return i?g(a[0], c):b}, now:function(){return(new Date).getTime()}, uaMatch:function(a){a = a.toLowerCase(); var b = s.exec(a) || t.exec(a) || u.exec(a) || a.indexOf("compatible") < 0 && v.exec(a) || []; return{browser:b[1] || "", version:b[2] || "0"}}, sub:function(){function a(b, c){return new a.fn.init(b, c)}e.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function(d, f){f && f instanceof e && !(f instanceof a) && (f = a(f)); return e.fn.init.call(this, d, f, b)}, a.fn.init.prototype = a.fn; var b = a(c); return a}, browser:{}}), e.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(a, b){J["[object " + b + "]"] = b.toLowerCase()}), A = e.uaMatch(z), A.browser && (e.browser[A.browser] = !0, e.browser.version = A.version), e.browser.webkit && (e.browser.safari = !0), j.test(" ") && (k = /^[\s\xA0]+/, l = /[\s\xA0]+$/), h = e(c), c.addEventListener?C = function(){c.removeEventListener("DOMContentLoaded", C, !1), e.ready()}:c.attachEvent && (C = function(){c.readyState === "complete" && (c.detachEvent("onreadystatechange", C), e.ready())}); return e}(), g = "done fail isResolved isRejected promise then always pipe".split(" "), h = [].slice; f.extend({_Deferred:function(){var a = [], b, c, d, e = {done:function(){if (!d){var c = arguments, g, h, i, j, k; b && (k = b, b = 0); for (g = 0, h = c.length; g < h; g++)i = c[g], j = f.type(i), j === "array"?e.done.apply(e, i):j === "function" && a.push(i); k && e.resolveWith(k[0], k[1])}return this}, resolveWith:function(e, f){if (!d && !b && !c){f = f || [], c = 1; try{while (a[0])a.shift().apply(e, f)} finally{b = [e, f], c = 0}}return this}, resolve:function(){e.resolveWith(this, arguments); return this}, isResolved:function(){return!!c || !!b}, cancel:function(){d = 1, a = []; return this}}; return e}, Deferred:function(a){var b = f._Deferred(), c = f._Deferred(), d; f.extend(b, {then:function(a, c){b.done(a).fail(c); return this}, always:function(){return b.done.apply(b, arguments).fail.apply(this, arguments)}, fail:c.done, rejectWith:c.resolveWith, reject:c.resolve, isRejected:c.isResolved, pipe:function(a, c){return f.Deferred(function(d){f.each({done:[a, "resolve"], fail:[c, "reject"]}, function(a, c){var e = c[0], g = c[1], h; f.isFunction(e)?b[a](function(){h = e.apply(this, arguments), h && f.isFunction(h.promise)?h.promise().then(d.resolve, d.reject):d[g + "With"](this === b?d:this, [h])}):b[a](d[g])})}).promise()}, promise:function(a){if (a == null){if (d)return d; d = a = {}}var c = g.length; while (c--)a[g[c]] = b[g[c]]; return a}}), b.done(c.cancel).fail(b.cancel), delete b.cancel, a && a.call(b, b); return b}, when:function(a){function i(a){return function(c){b[a] = arguments.length > 1?h.call(arguments, 0):c, --e || g.resolveWith(g, h.call(b, 0))}}var b = arguments, c = 0, d = b.length, e = d, g = d <= 1 && a && f.isFunction(a.promise)?a:f.Deferred(); if (d > 1){for (; c < d; c++)b[c] && f.isFunction(b[c].promise)?b[c].promise().then(i(c), g.reject):--e; e || g.resolveWith(g, b)} else g !== a && g.resolveWith(g, d?[a]:[]); return g.promise()}}), f.support = function(){var a = c.createElement("div"), b = c.documentElement, d, e, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u; a.setAttribute("className", "t"), a.innerHTML = "
a", d = a.getElementsByTagName("*"), e = a.getElementsByTagName("a")[0]; if (!d || !d.length || !e)return{}; g = c.createElement("select"), h = g.appendChild(c.createElement("option")), i = a.getElementsByTagName("input")[0], k = {leadingWhitespace:a.firstChild.nodeType === 3, tbody:!a.getElementsByTagName("tbody").length, htmlSerialize:!!a.getElementsByTagName("link").length, style:/top/.test(e.getAttribute("style")), hrefNormalized:e.getAttribute("href") === "/a", opacity:/^0.55$/.test(e.style.opacity), cssFloat:!!e.style.cssFloat, checkOn:i.value === "on", optSelected:h.selected, getSetAttribute:a.className !== "t", submitBubbles:!0, changeBubbles:!0, focusinBubbles:!1, deleteExpando:!0, noCloneEvent:!0, inlineBlockNeedsLayout:!1, shrinkWrapBlocks:!1, reliableMarginRight:!0}, i.checked = !0, k.noCloneChecked = i.cloneNode(!0).checked, g.disabled = !0, k.optDisabled = !h.disabled; try{delete a.test} catch (v){k.deleteExpando = !1}!a.addEventListener && a.attachEvent && a.fireEvent && (a.attachEvent("onclick", function(){k.noCloneEvent = !1}), a.cloneNode(!0).fireEvent("onclick")), i = c.createElement("input"), i.value = "t", i.setAttribute("type", "radio"), k.radioValue = i.value === "t", i.setAttribute("checked", "checked"), a.appendChild(i), l = c.createDocumentFragment(), l.appendChild(a.firstChild), k.checkClone = l.cloneNode(!0).cloneNode(!0).lastChild.checked, a.innerHTML = "", a.style.width = a.style.paddingLeft = "1px", m = c.getElementsByTagName("body")[0], o = c.createElement(m?"div":"body"), p = {visibility:"hidden", width:0, height:0, border:0, margin:0, background:"none"}, m && f.extend(p, {position:"absolute", left:"-1000px", top:"-1000px"}); for (t in p)o.style[t] = p[t]; o.appendChild(a), n = m || b, n.insertBefore(o, n.firstChild), k.appendChecked = i.checked, k.boxModel = a.offsetWidth === 2, "zoom"in a.style && (a.style.display = "inline", a.style.zoom = 1, k.inlineBlockNeedsLayout = a.offsetWidth === 2, a.style.display = "", a.innerHTML = "
", k.shrinkWrapBlocks = a.offsetWidth !== 2), a.innerHTML = "
t
", q = a.getElementsByTagName("td"), u = q[0].offsetHeight === 0, q[0].style.display = "", q[1].style.display = "none", k.reliableHiddenOffsets = u && q[0].offsetHeight === 0, a.innerHTML = "", c.defaultView && c.defaultView.getComputedStyle && (j = c.createElement("div"), j.style.width = "0", j.style.marginRight = "0", a.appendChild(j), k.reliableMarginRight = (parseInt((c.defaultView.getComputedStyle(j, null) || {marginRight:0}).marginRight, 10) || 0) === 0), o.innerHTML = "", n.removeChild(o); if (a.attachEvent)for (t in{submit:1, change:1, focusin:1})s = "on" + t, u = s in a, u || (a.setAttribute(s, "return;"), u = typeof a[s] == "function"), k[t + "Bubbles"] = u; o = l = g = h = m = j = a = i = null; return k}(), f.boxModel = f.support.boxModel; var i = /^(?:\{.*\}|\[.*\])$/, j = /([A-Z])/g; f.extend({cache:{}, uuid:0, expando:"jQuery" + (f.fn.jquery + Math.random()).replace(/\D/g, ""), noData:{embed:!0, object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet:!0}, hasData:function(a){a = a.nodeType?f.cache[a[f.expando]]:a[f.expando]; return!!a && !l(a)}, data:function(a, c, d, e){if (!!f.acceptData(a)){var g, h, i = f.expando, j = typeof c == "string", k = a.nodeType, l = k?f.cache:a, m = k?a[f.expando]:a[f.expando] && f.expando; if ((!m || e && m && l[m] && !l[m][i]) && j && d === b)return; m || (k?a[f.expando] = m = ++f.uuid:m = f.expando), l[m] || (l[m] = {}, k || (l[m].toJSON = f.noop)); if (typeof c == "object" || typeof c == "function")e?l[m][i] = f.extend(l[m][i], c):l[m] = f.extend(l[m], c); g = l[m], e && (g[i] || (g[i] = {}), g = g[i]), d !== b && (g[f.camelCase(c)] = d); if (c === "events" && !g[c])return g[i] && g[i].events; j?(h = g[c], h == null && (h = g[f.camelCase(c)])):h = g; return h}}, removeData:function(a, b, c){if (!!f.acceptData(a)){var d, e = f.expando, g = a.nodeType, h = g?f.cache:a, i = g?a[f.expando]:f.expando; if (!h[i])return; if (b){d = c?h[i][e]:h[i]; if (d){d[b] || (b = f.camelCase(b)), delete d[b]; if (!l(d))return}}if (c){delete h[i][e]; if (!l(h[i]))return}var j = h[i][e]; f.support.deleteExpando || !h.setInterval?delete h[i]:h[i] = null, j?(h[i] = {}, g || (h[i].toJSON = f.noop), h[i][e] = j):g && (f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando] = null)}}, _data:function(a, b, c){return f.data(a, b, c, !0)}, acceptData:function(a){if (a.nodeName){var b = f.noData[a.nodeName.toLowerCase()]; if (b)return b !== !0 && a.getAttribute("classid") === b}return!0}}), f.fn.extend({data:function(a, c){var d = null; if (typeof a == "undefined"){if (this.length){d = f.data(this[0]); if (this[0].nodeType === 1){var e = this[0].attributes, g; for (var h = 0, i = e.length; h < i; h++)g = e[h].name, g.indexOf("data-") === 0 && (g = f.camelCase(g.substring(5)), k(this[0], g, d[g]))}}return d}if (typeof a == "object")return this.each(function(){f.data(this, a)}); var j = a.split("."); j[1] = j[1]?"." + j[1]:""; if (c === b){d = this.triggerHandler("getData" + j[1] + "!", [j[0]]), d === b && this.length && (d = f.data(this[0], a), d = k(this[0], a, d)); return d === b && j[1]?this.data(j[0]):d}return this.each(function(){var b = f(this), d = [j[0], c]; b.triggerHandler("setData" + j[1] + "!", d), f.data(this, a, c), b.triggerHandler("changeData" + j[1] + "!", d)})}, removeData:function(a){return this.each(function(){f.removeData(this, a)})}}), f.extend({_mark:function(a, c){a && (c = (c || "fx") + "mark", f.data(a, c, (f.data(a, c, b, !0) || 0) + 1, !0))}, _unmark:function(a, c, d){a !== !0 && (d = c, c = a, a = !1); if (c){d = d || "fx"; var e = d + "mark", g = a?0:(f.data(c, e, b, !0) || 1) - 1; g?f.data(c, e, g, !0):(f.removeData(c, e, !0), m(c, d, "mark"))}}, queue:function(a, c, d){if (a){c = (c || "fx") + "queue"; var e = f.data(a, c, b, !0); d && (!e || f.isArray(d)?e = f.data(a, c, f.makeArray(d), !0):e.push(d)); return e || []}}, dequeue:function(a, b){b = b || "fx"; var c = f.queue(a, b), d = c.shift(), e; d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), d.call(a, function(){f.dequeue(a, b)})), c.length || (f.removeData(a, b + "queue", !0), m(a, b, "queue"))}}), f.fn.extend({queue:function(a, c){typeof a != "string" && (c = a, a = "fx"); if (c === b)return f.queue(this[0], a); return this.each(function(){var b = f.queue(this, a, c); a === "fx" && b[0] !== "inprogress" && f.dequeue(this, a)})}, dequeue:function(a){return this.each(function(){f.dequeue(this, a)})}, delay:function(a, b){a = f.fx?f.fx.speeds[a] || a:a, b = b || "fx"; return this.queue(b, function(){var c = this; setTimeout(function(){f.dequeue(c, b)}, a)})}, clearQueue:function(a){return this.queue(a || "fx", [])}, promise:function(a, c){function m(){--h || d.resolveWith(e, [e])}typeof a != "string" && (c = a, a = b), a = a || "fx"; var d = f.Deferred(), e = this, g = e.length, h = 1, i = a + "defer", j = a + "queue", k = a + "mark", l; while (g--)if (l = f.data(e[g], i, b, !0) || (f.data(e[g], j, b, !0) || f.data(e[g], k, b, !0)) && f.data(e[g], i, f._Deferred(), !0))h++, l.done(m); m(); return d.promise()}}); var n = /[\n\t\r]/g, o = /\s+/, p = /\r/g, q = /^(?:button|input)$/i, r = /^(?:button|input|object|select|textarea)$/i, s = /^a(?:rea)?$/i, t = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, u, v; f.fn.extend({attr:function(a, b){return f.access(this, a, b, !0, f.attr)}, removeAttr:function(a){return this.each(function(){f.removeAttr(this, a)})}, prop:function(a, b){return f.access(this, a, b, !0, f.prop)}, removeProp:function(a){a = f.propFix[a] || a; return this.each(function(){try{this[a] = b, delete this[a]} catch (c){}})}, addClass:function(a){var b, c, d, e, g, h, i; if (f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this, b, this.className))}); if (a && typeof a == "string"){b = a.split(o); for (c = 0, d = this.length; c < d; c++){e = this[c]; if (e.nodeType === 1)if (!e.className && b.length === 1)e.className = a; else{g = " " + e.className + " "; for (h = 0, i = b.length; h < i; h++)~g.indexOf(" " + b[h] + " ") || (g += b[h] + " "); e.className = f.trim(g)}}}return this}, removeClass:function(a){var c, d, e, g, h, i, j; if (f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this, b, this.className))}); if (a && typeof a == "string" || a === b){c = (a || "").split(o); for (d = 0, e = this.length; d < e; d++){g = this[d]; if (g.nodeType === 1 && g.className)if (a){h = (" " + g.className + " ").replace(n, " "); for (i = 0, j = c.length; i < j; i++)h = h.replace(" " + c[i] + " ", " "); g.className = f.trim(h)} else g.className = ""}}return this}, toggleClass:function(a, b){var c = typeof a, d = typeof b == "boolean"; if (f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this, c, this.className, b), b)}); return this.each(function(){if (c === "string"){var e, g = 0, h = f(this), i = b, j = a.split(o); while (e = j[g++])i = d?i:!h.hasClass(e), h[i?"addClass":"removeClass"](e)} else if (c === "undefined" || c === "boolean")this.className && f._data(this, "__className__", this.className), this.className = this.className || a === !1?"":f._data(this, "__className__") || ""})}, hasClass:function(a){var b = " " + a + " "; for (var c = 0, d = this.length; c < d; c++)if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(n, " ").indexOf(b) > - 1)return!0; return!1}, val:function(a){var c, d, e = this[0]; if (!arguments.length){if (e){c = f.valHooks[e.nodeName.toLowerCase()] || f.valHooks[e.type]; if (c && "get"in c && (d = c.get(e, "value")) !== b)return d; d = e.value; return typeof d == "string"?d.replace(p, ""):d == null?"":d}return b}var g = f.isFunction(a); return this.each(function(d){var e = f(this), h; if (this.nodeType === 1){g?h = a.call(this, d, e.val()):h = a, h == null?h = "":typeof h == "number"?h += "":f.isArray(h) && (h = f.map(h, function(a){return a == null?"":a + ""})), c = f.valHooks[this.nodeName.toLowerCase()] || f.valHooks[this.type]; if (!c || !("set"in c) || c.set(this, h, "value") === b)this.value = h}})}}), f.extend({valHooks:{option:{get:function(a){var b = a.attributes.value; return!b || b.specified?a.value:a.text}}, select:{get:function(a){var b, c = a.selectedIndex, d = [], e = a.options, g = a.type === "select-one"; if (c < 0)return null; for (var h = g?c:0, i = g?c + 1:e.length; h < i; h++){var j = e[h]; if (j.selected && (f.support.optDisabled?!j.disabled:j.getAttribute("disabled") === null) && (!j.parentNode.disabled || !f.nodeName(j.parentNode, "optgroup"))){b = f(j).val(); if (g)return b; d.push(b)}}if (g && !d.length && e.length)return f(e[c]).val(); return d}, set:function(a, b){var c = f.makeArray(b); f(a).find("option").each(function(){this.selected = f.inArray(f(this).val(), c) >= 0}), c.length || (a.selectedIndex = - 1); return c}}}, attrFn:{val:!0, css:!0, html:!0, text:!0, data:!0, width:!0, height:!0, offset:!0}, attrFix:{tabindex:"tabIndex"}, attr:function(a, c, d, e){var g = a.nodeType; if (!a || g === 3 || g === 8 || g === 2)return b; if (e && c in f.attrFn)return f(a)[c](d); if (!("getAttribute"in a))return f.prop(a, c, d); var h, i, j = g !== 1 || !f.isXMLDoc(a); j && (c = f.attrFix[c] || c, i = f.attrHooks[c], i || (t.test(c)?i = v:u && (i = u))); if (d !== b){if (d === null){f.removeAttr(a, c); return b}if (i && "set"in i && j && (h = i.set(a, d, c)) !== b)return h; a.setAttribute(c, "" + d); return d}if (i && "get"in i && j && (h = i.get(a, c)) !== null)return h; h = a.getAttribute(c); return h === null?b:h}, removeAttr:function(a, b){var c; a.nodeType === 1 && (b = f.attrFix[b] || b, f.attr(a, b, ""), a.removeAttribute(b), t.test(b) && (c = f.propFix[b] || b)in a && (a[c] = !1))}, attrHooks:{type:{set:function(a, b){if (q.test(a.nodeName) && a.parentNode)f.error("type property can't be changed"); else if (!f.support.radioValue && b === "radio" && f.nodeName(a, "input")){var c = a.value; a.setAttribute("type", b), c && (a.value = c); return b}}}, value:{get:function(a, b){if (u && f.nodeName(a, "button"))return u.get(a, b); return b in a?a.value:null}, set:function(a, b, c){if (u && f.nodeName(a, "button"))return u.set(a, b, c); a.value = b}}}, propFix:{tabindex:"tabIndex", readonly:"readOnly", "for":"htmlFor", "class":"className", maxlength:"maxLength", cellspacing:"cellSpacing", cellpadding:"cellPadding", rowspan:"rowSpan", colspan:"colSpan", usemap:"useMap", frameborder:"frameBorder", contenteditable:"contentEditable"}, prop:function(a, c, d){var e = a.nodeType; if (!a || e === 3 || e === 8 || e === 2)return b; var g, h, i = e !== 1 || !f.isXMLDoc(a); i && (c = f.propFix[c] || c, h = f.propHooks[c]); return d !== b?h && "set"in h && (g = h.set(a, d, c)) !== b?g:a[c] = d:h && "get"in h && (g = h.get(a, c)) !== null?g:a[c]}, propHooks:{tabIndex:{get:function(a){var c = a.getAttributeNode("tabindex"); return c && c.specified?parseInt(c.value, 10):r.test(a.nodeName) || s.test(a.nodeName) && a.href?0:b}}}}), f.attrHooks.tabIndex = f.propHooks.tabIndex, v = {get:function(a, c){var d; return f.prop(a, c) === !0 || (d = a.getAttributeNode(c)) && d.nodeValue !== !1?c.toLowerCase():b}, set:function(a, b, c){var d; b === !1?f.removeAttr(a, c):(d = f.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())); return c}}, f.support.getSetAttribute || (u = f.valHooks.button = {get:function(a, c){var d; d = a.getAttributeNode(c); return d && d.nodeValue !== ""?d.nodeValue:b}, set:function(a, b, d){var e = a.getAttributeNode(d); e || (e = c.createAttribute(d), a.setAttributeNode(e)); return e.nodeValue = b + ""}}, f.each(["width", "height"], function(a, b){f.attrHooks[b] = f.extend(f.attrHooks[b], {set:function(a, c){if (c === ""){a.setAttribute(b, "auto"); return c}}})})), f.support.hrefNormalized || f.each(["href", "src", "width", "height"], function(a, c){f.attrHooks[c] = f.extend(f.attrHooks[c], {get:function(a){var d = a.getAttribute(c, 2); return d === null?b:d}})}), f.support.style || (f.attrHooks.style = {get:function(a){return a.style.cssText.toLowerCase() || b}, set:function(a, b){return a.style.cssText = "" + b}}), f.support.optSelected || (f.propHooks.selected = f.extend(f.propHooks.selected, {get:function(a){var b = a.parentNode; b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex); return null}})), f.support.checkOn || f.each(["radio", "checkbox"], function(){f.valHooks[this] = {get:function(a){return a.getAttribute("value") === null?"on":a.value}}}), f.each(["radio", "checkbox"], function(){f.valHooks[this] = f.extend(f.valHooks[this], {set:function(a, b){if (f.isArray(b))return a.checked = f.inArray(f(a).val(), b) >= 0}})}); var w = /\.(.*)$/, x = /^(?:textarea|input|select)$/i, y = /\./g, z = / /g, A = /[^\w\s.|`]/g, B = function(a){return a.replace(A, "\\$&")}; f.event = {add:function(a, c, d, e){if (a.nodeType !== 3 && a.nodeType !== 8){if (d === !1)d = C; else if (!d)return; var g, h; d.handler && (g = d, d = g.handler), d.guid || (d.guid = f.guid++); var i = f._data(a); if (!i)return; var j = i.events, k = i.handle; j || (i.events = j = {}), k || (i.handle = k = function(a){return typeof f != "undefined" && (!a || f.event.triggered !== a.type)?f.event.handle.apply(k.elem, arguments):b}), k.elem = a, c = c.split(" "); var l, m = 0, n; while (l = c[m++]){h = g?f.extend({}, g):{handler:d, data:e}, l.indexOf(".") > - 1?(n = l.split("."), l = n.shift(), h.namespace = n.slice(0).sort().join(".")):(n = [], h.namespace = ""), h.type = l, h.guid || (h.guid = d.guid); var o = j[l], p = f.event.special[l] || {}; if (!o){o = j[l] = []; if (!p.setup || p.setup.call(a, e, n, k) === !1)a.addEventListener?a.addEventListener(l, k, !1):a.attachEvent && a.attachEvent("on" + l, k)}p.add && (p.add.call(a, h), h.handler.guid || (h.handler.guid = d.guid)), o.push(h), f.event.global[l] = !0}a = null}}, global:{}, remove:function(a, c, d, e){if (a.nodeType !== 3 && a.nodeType !== 8){d === !1 && (d = C); var g, h, i, j, k = 0, l, m, n, o, p, q, r, s = f.hasData(a) && f._data(a), t = s && s.events; if (!s || !t)return; c && c.type && (d = c.handler, c = c.type); if (!c || typeof c == "string" && c.charAt(0) === "."){c = c || ""; for (h in t)f.event.remove(a, h + c); return}c = c.split(" "); while (h = c[k++]){r = h, q = null, l = h.indexOf(".") < 0, m = [], l || (m = h.split("."), h = m.shift(), n = new RegExp("(^|\\.)" + f.map(m.slice(0).sort(), B).join("\\.(?:.*\\.)?") + "(\\.|$)")), p = t[h]; if (!p)continue; if (!d){for (j = 0; j < p.length; j++){q = p[j]; if (l || n.test(q.namespace))f.event.remove(a, r, q.handler, j), p.splice(j--, 1)}continue}o = f.event.special[h] || {}; for (j = e || 0; j < p.length; j++){q = p[j]; if (d.guid === q.guid){if (l || n.test(q.namespace))e == null && p.splice(j--, 1), o.remove && o.remove.call(a, q); if (e != null)break}}if (p.length === 0 || e != null && p.length === 1)(!o.teardown || o.teardown.call(a, m) === !1) && f.removeEvent(a, h, s.handle), g = null, delete + t[h]}if (f.isEmptyObject(t)){var u = s.handle; u && (u.elem = null), delete s.events, delete s.handle, f.isEmptyObject(s) && f.removeData(a, b, !0)}}}, customEvent:{getData:!0, setData:!0, changeData:!0}, trigger:function(c, d, e, g){var h = c.type || c, i = [], j; h.indexOf("!") >= 0 && (h = h.slice(0, - 1), j = !0), h.indexOf(".") >= 0 && (i = h.split("."), h = i.shift(), i.sort()); if (!!e && !f.event.customEvent[h] || !!f.event.global[h]){c = typeof c == "object"?c[f.expando]?c:new f.Event(h, c):new f.Event(h), c.type = h, c.exclusive = j, c.namespace = i.join("."), c.namespace_re = new RegExp("(^|\\.)" + i.join("\\.(?:.*\\.)?") + "(\\.|$)"); if (g || !e)c.preventDefault(), c.stopPropagation(); if (!e){f.each(f.cache, function(){var a = f.expando, b = this[a]; b && b.events && b.events[h] && f.event.trigger(c, d, b.handle.elem)}); return}if (e.nodeType === 3 || e.nodeType === 8)return; c.result = b, c.target = e, d = d != null?f.makeArray(d):[], d.unshift(c); var k = e, l = h.indexOf(":") < 0?"on" + h:""; do{var m = f._data(k, "handle"); c.currentTarget = k, m && m.apply(k, d), l && f.acceptData(k) && k[l] && k[l].apply(k, d) === !1 && (c.result = !1, c.preventDefault()), k = k.parentNode || k.ownerDocument || k === c.target.ownerDocument && a}while (k && !c.isPropagationStopped()); if (!c.isDefaultPrevented()){var n, o = f.event.special[h] || {}; if ((!o._default || o._default.call(e.ownerDocument, c) === !1) && (h !== "click" || !f.nodeName(e, "a")) && f.acceptData(e)){try{l && e[h] && (n = e[l], n && (e[l] = null), f.event.triggered = h, e[h]())} catch (p){}n && (e[l] = n), f.event.triggered = b}}return c.result}}, handle:function(c){c = f.event.fix(c || a.event); var d = ((f._data(this, "events") || {})[c.type] || []).slice(0), e = !c.exclusive && !c.namespace, g = Array.prototype.slice.call(arguments, 0); g[0] = c, c.currentTarget = this; for (var h = 0, i = d.length; h < i; h++){var j = d[h]; if (e || c.namespace_re.test(j.namespace)){c.handler = j.handler, c.data = j.data, c.handleObj = j; var k = j.handler.apply(this, g); k !== b && (c.result = k, k === !1 && (c.preventDefault(), c.stopPropagation())); if (c.isImmediatePropagationStopped())break}}return c.result}, props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix:function(a){if (a[f.expando])return a; var d = a; a = f.Event(d); for (var e = this.props.length, g; e; )g = this.props[--e], a[g] = d[g]; a.target || (a.target = a.srcElement || c), a.target.nodeType === 3 && (a.target = a.target.parentNode), !a.relatedTarget && a.fromElement && (a.relatedTarget = a.fromElement === a.target?a.toElement:a.fromElement); if (a.pageX == null && a.clientX != null){var h = a.target.ownerDocument || c, i = h.documentElement, j = h.body; a.pageX = a.clientX + (i && i.scrollLeft || j && j.scrollLeft || 0) - (i && i.clientLeft || j && j.clientLeft || 0), a.pageY = a.clientY + (i && i.scrollTop || j && j.scrollTop || 0) - (i && i.clientTop || j && j.clientTop || 0)}a.which == null && (a.charCode != null || a.keyCode != null) && (a.which = a.charCode != null?a.charCode:a.keyCode), !a.metaKey && a.ctrlKey && (a.metaKey = a.ctrlKey), !a.which && a.button !== b && (a.which = a.button & 1?1:a.button & 2?3:a.button & 4?2:0); return a}, guid:1e8, proxy:f.proxy, special:{ready:{setup:f.bindReady, teardown:f.noop}, live:{add:function(a){f.event.add(this, M(a.origType, a.selector), f.extend({}, a, {handler:L, guid:a.handler.guid}))}, remove:function(a){f.event.remove(this, M(a.origType, a.selector), a)}}, beforeunload:{setup:function(a, b, c){f.isWindow(this) && (this.onbeforeunload = c)}, teardown:function(a, b){this.onbeforeunload === b && (this.onbeforeunload = null)}}}}, f.removeEvent = c.removeEventListener?function(a, b, c){a.removeEventListener && a.removeEventListener(b, c, !1)}:function(a, b, c){a.detachEvent && a.detachEvent("on" + b, c)}, f.Event = function(a, b){if (!this.preventDefault)return new f.Event(a, b); a && a.type?(this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault()?D:C):this.type = a, b && f.extend(this, b), this.timeStamp = f.now(), this[f.expando] = !0}, f.Event.prototype = {preventDefault:function(){this.isDefaultPrevented = D; var a = this.originalEvent; !a || (a.preventDefault?a.preventDefault():a.returnValue = !1)}, stopPropagation:function(){this.isPropagationStopped = D; var a = this.originalEvent; !a || (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)}, stopImmediatePropagation:function(){this.isImmediatePropagationStopped = D, this.stopPropagation()}, isDefaultPrevented:C, isPropagationStopped:C, isImmediatePropagationStopped:C}; var E = function(a){var b = a.relatedTarget, c = !1, d = a.type; a.type = a.data, b !== this && (b && (c = f.contains(this, b)), c || (f.event.handle.apply(this, arguments), a.type = d))}, F = function(a){a.type = a.data, f.event.handle.apply(this, arguments)}; f.each({mouseenter:"mouseover", mouseleave:"mouseout"}, function(a, b){f.event.special[a] = {setup:function(c){f.event.add(this, b, c && c.selector?F:E, a)}, teardown:function(a){f.event.remove(this, b, a && a.selector?F:E)}}}), f.support.submitBubbles || (f.event.special.submit = {setup:function(a, b){if (!f.nodeName(this, "form"))f.event.add(this, "click.specialSubmit", function(a){var b = a.target, c = f.nodeName(b, "input") || f.nodeName(b, "button")?b.type:""; (c === "submit" || c === "image") && f(b).closest("form").length && J("submit", this, arguments)}), f.event.add(this, "keypress.specialSubmit", function(a){var b = a.target, c = f.nodeName(b, "input") || f.nodeName(b, "button")?b.type:""; (c === "text" || c === "password") && f(b).closest("form").length && a.keyCode === 13 && J("submit", this, arguments)}); else return!1}, teardown:function(a){f.event.remove(this, ".specialSubmit")}}); if (!f.support.changeBubbles){var G, H = function(a){var b = f.nodeName(a, "input")?a.type:"", c = a.value; b === "radio" || b === "checkbox"?c = a.checked:b === "select-multiple"?c = a.selectedIndex > - 1?f.map(a.options, function(a){return a.selected}).join("-"):"":f.nodeName(a, "select") && (c = a.selectedIndex); return c}, I = function(c){var d = c.target, e, g; if (!!x.test(d.nodeName) && !d.readOnly){e = f._data(d, "_change_data"), g = H(d), (c.type !== "focusout" || d.type !== "radio") && f._data(d, "_change_data", g); if (e === b || g === e)return; if (e != null || g)c.type = "change", c.liveFired = b, f.event.trigger(c, arguments[1], d)}}; f.event.special.change = {filters:{focusout:I, beforedeactivate:I, click:function(a){var b = a.target, c = f.nodeName(b, "input")?b.type:""; (c === "radio" || c === "checkbox" || f.nodeName(b, "select")) && I.call(this, a)}, keydown:function(a){var b = a.target, c = f.nodeName(b, "input")?b.type:""; (a.keyCode === 13 && !f.nodeName(b, "textarea") || a.keyCode === 32 && (c === "checkbox" || c === "radio") || c === "select-multiple") && I.call(this, a)}, beforeactivate:function(a){var b = a.target; f._data(b, "_change_data", H(b))}}, setup:function(a, b){if (this.type === "file")return!1; for (var c in G)f.event.add(this, c + ".specialChange", G[c]); return x.test(this.nodeName)}, teardown:function(a){f.event.remove(this, ".specialChange"); return x.test(this.nodeName)}}, G = f.event.special.change.filters, G.focus = G.beforeactivate}f.support.focusinBubbles || f.each({focus:"focusin", blur:"focusout"}, function(a, b){function e(a){var c = f.event.fix(a); c.type = b, c.originalEvent = {}, f.event.trigger(c, null, c.target), c.isDefaultPrevented() && a.preventDefault()}var d = 0; f.event.special[b] = {setup:function(){d++ === 0 && c.addEventListener(a, e, !0)}, teardown:function(){--d === 0 && c.removeEventListener(a, e, !0)}}}), f.each(["bind", "one"], function(a, c){f.fn[c] = function(a, d, e){var g; if (typeof a == "object"){for (var h in a)this[c](h, d, a[h], e); return this}if (arguments.length === 2 || d === !1)e = d, d = b; c === "one"?(g = function(a){f(this).unbind(a, g); return e.apply(this, arguments)}, g.guid = e.guid || f.guid++):g = e; if (a === "unload" && c !== "one")this.one(a, d, e); else for (var i = 0, j = this.length; i < j; i++)f.event.add(this[i], a, g, d); return this}}), f.fn.extend({unbind:function(a, b){if (typeof a == "object" && !a.preventDefault)for (var c in a)this.unbind(c, a[c]); else for (var d = 0, e = this.length; d < e; d++)f.event.remove(this[d], a, b); return this}, delegate:function(a, b, c, d){return this.live(b, c, d, a)}, undelegate:function(a, b, c){return arguments.length === 0?this.unbind("live"):this.die(b, null, c, a)}, trigger:function(a, b){return this.each(function(){f.event.trigger(a, b, this)})}, triggerHandler:function(a, b){if (this[0])return f.event.trigger(a, b, this[0], !0)}, toggle:function(a){var b = arguments, c = a.guid || f.guid++, d = 0, e = function(c){var e = (f.data(this, "lastToggle" + a.guid) || 0) % d; f.data(this, "lastToggle" + a.guid, e + 1), c.preventDefault(); return b[e].apply(this, arguments) || !1}; e.guid = c; while (d < b.length)b[d++].guid = c; return this.click(e)}, hover:function(a, b){return this.mouseenter(a).mouseleave(b || a)}}); var K = {focus:"focusin", blur:"focusout", mouseenter:"mouseover", mouseleave:"mouseout"}; f.each(["live", "die"], function(a, c){f.fn[c] = function(a, d, e, g){var h, i = 0, j, k, l, m = g || this.selector, n = g?this:f(this.context); if (typeof a == "object" && !a.preventDefault){for (var o in a)n[c](o, d, a[o], m); return this}if (c === "die" && !a && g && g.charAt(0) === "."){n.unbind(g); return this}if (d === !1 || f.isFunction(d))e = d || C, d = b; a = (a || "").split(" "); while ((h = a[i++]) != null){j = w.exec(h), k = "", j && (k = j[0], h = h.replace(w, "")); if (h === "hover"){a.push("mouseenter" + k, "mouseleave" + k); continue}l = h, K[h]?(a.push(K[h] + k), h = h + k):h = (K[h] || h) + k; if (c === "live")for (var p = 0, q = n.length; p < q; p++)f.event.add(n[p], "live." + M(h, m), {data:d, selector:m, handler:e, origType:h, origHandler:e, preType:l}); else n.unbind("live." + M(h, m), e)}return this}}), f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), function(a, b){f.fn[b] = function(a, c){c == null && (c = a, a = null); return arguments.length > 0?this.bind(b, a, c):this.trigger(b)}, f.attrFn && (f.attrFn[b] = !0)}), function(){function u(a, b, c, d, e, f){for (var g = 0, h = d.length; g < h; g++){var i = d[g]; if (i){var j = !1; i = i[a]; while (i){if (i.sizcache === c){j = d[i.sizset]; break}if (i.nodeType === 1){f || (i.sizcache = c, i.sizset = g); if (typeof b != "string"){if (i === b){j = !0; break}} else if (k.filter(b, [i]).length > 0){j = i; break}}i = i[a]}d[g] = j}}}function t(a, b, c, d, e, f){for (var g = 0, h = d.length; g < h; g++){var i = d[g]; if (i){var j = !1; i = i[a]; while (i){if (i.sizcache === c){j = d[i.sizset]; break}i.nodeType === 1 && !f && (i.sizcache = c, i.sizset = g); if (i.nodeName.toLowerCase() === b){j = i; break}i = i[a]}d[g] = j}}}var a = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, d = 0, e = Object.prototype.toString, g = !1, h = !0, i = /\\/g, j = /\W/; [0, 0].sort(function(){h = !1; return 0}); var k = function(b, d, f, g){f = f || [], d = d || c; var h = d; if (d.nodeType !== 1 && d.nodeType !== 9)return[]; if (!b || typeof b != "string")return f; var i, j, n, o, q, r, s, t, u = !0, w = k.isXML(d), x = [], y = b; do{a.exec(""), i = a.exec(y); if (i){y = i[3], x.push(i[1]); if (i[2]){o = i[3]; break}}}while (i); if (x.length > 1 && m.exec(b))if (x.length === 2 && l.relative[x[0]])j = v(x[0] + x[1], d); else{j = l.relative[x[0]]?[d]:k(x.shift(), d); while (x.length)b = x.shift(), l.relative[b] && (b += x.shift()), j = v(b, j)} else{!g && x.length > 1 && d.nodeType === 9 && !w && l.match.ID.test(x[0]) && !l.match.ID.test(x[x.length - 1]) && (q = k.find(x.shift(), d, w), d = q.expr?k.filter(q.expr, q.set)[0]:q.set[0]); if (d){q = g?{expr:x.pop(), set:p(g)}:k.find(x.pop(), x.length === 1 && (x[0] === "~" || x[0] === "+") && d.parentNode?d.parentNode:d, w), j = q.expr?k.filter(q.expr, q.set):q.set, x.length > 0?n = p(j):u = !1; while (x.length)r = x.pop(), s = r, l.relative[r]?s = x.pop():r = "", s == null && (s = d), l.relative[r](n, s, w)} else n = x = []}n || (n = j), n || k.error(r || b); if (e.call(n) === "[object Array]")if (!u)f.push.apply(f, n); else if (d && d.nodeType === 1)for (t = 0; n[t] != null; t++)n[t] && (n[t] === !0 || n[t].nodeType === 1 && k.contains(d, n[t])) && f.push(j[t]); else for (t = 0; n[t] != null; t++)n[t] && n[t].nodeType === 1 && f.push(j[t]); else p(n, f); o && (k(o, h, f, g), k.uniqueSort(f)); return f}; k.uniqueSort = function(a){if (r){g = h, a.sort(r); if (g)for (var b = 1; b < a.length; b++)a[b] === a[b - 1] && a.splice(b--, 1)}return a}, k.matches = function(a, b){return k(a, null, null, b)}, k.matchesSelector = function(a, b){return k(b, null, null, [a]).length > 0}, k.find = function(a, b, c){var d; if (!a)return[]; for (var e = 0, f = l.order.length; e < f; e++){var g, h = l.order[e]; if (g = l.leftMatch[h].exec(a)){var j = g[1]; g.splice(1, 1); if (j.substr(j.length - 1) !== "\\"){g[1] = (g[1] || "").replace(i, ""), d = l.find[h](g, b, c); if (d != null){a = a.replace(l.match[h], ""); break}}}}d || (d = typeof b.getElementsByTagName != "undefined"?b.getElementsByTagName("*"):[]); return{set:d, expr:a}}, k.filter = function(a, c, d, e){var f, g, h = a, i = [], j = c, m = c && c[0] && k.isXML(c[0]); while (a && c.length){for (var n in l.filter)if ((f = l.leftMatch[n].exec(a)) != null && f[2]){var o, p, q = l.filter[n], r = f[1]; g = !1, f.splice(1, 1); if (r.substr(r.length - 1) === "\\")continue; j === i && (i = []); if (l.preFilter[n]){f = l.preFilter[n](f, j, d, i, e, m); if (!f)g = o = !0; else if (f === !0)continue}if (f)for (var s = 0; (p = j[s]) != null; s++)if (p){o = q(p, f, s, j); var t = e ^ !!o; d && o != null?t?g = !0:j[s] = !1:t && (i.push(p), g = !0)}if (o !== b){d || (j = i), a = a.replace(l.match[n], ""); if (!g)return[]; break}}if (a === h)if (g == null)k.error(a); else break; h = a}return j}, k.error = function(a){throw"Syntax error, unrecognized expression: " + a}; var l = k.selectors = {order:["ID", "NAME", "TAG"], match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/}, leftMatch:{}, attrMap:{"class":"className", "for":"htmlFor"}, attrHandle:{href:function(a){return a.getAttribute("href")}, type:function(a){return a.getAttribute("type")}}, relative:{"+":function(a, b){var c = typeof b == "string", d = c && !j.test(b), e = c && !d; d && (b = b.toLowerCase()); for (var f = 0, g = a.length, h; f < g; f++)if (h = a[f]){while ((h = h.previousSibling) && h.nodeType !== 1); a[f] = e || h && h.nodeName.toLowerCase() === b?h || !1:h === b}e && k.filter(b, a, !0)}, ">":function(a, b){var c, d = typeof b == "string", e = 0, f = a.length; if (d && !j.test(b)){b = b.toLowerCase(); for (; e < f; e++){c = a[e]; if (c){var g = c.parentNode; a[e] = g.nodeName.toLowerCase() === b?g:!1}}} else{for (; e < f; e++)c = a[e], c && (a[e] = d?c.parentNode:c.parentNode === b); d && k.filter(b, a, !0)}}, "":function(a, b, c){var e, f = d++, g = u; typeof b == "string" && !j.test(b) && (b = b.toLowerCase(), e = b, g = t), g("parentNode", b, f, a, e, c)}, "~":function(a, b, c){var e, f = d++, g = u; typeof b == "string" && !j.test(b) && (b = b.toLowerCase(), e = b, g = t), g("previousSibling", b, f, a, e, c)}}, find:{ID:function(a, b, c){if (typeof b.getElementById != "undefined" && !c){var d = b.getElementById(a[1]); return d && d.parentNode?[d]:[]}}, NAME:function(a, b){if (typeof b.getElementsByName != "undefined"){var c = [], d = b.getElementsByName(a[1]); for (var e = 0, f = d.length; e < f; e++)d[e].getAttribute("name") === a[1] && c.push(d[e]); return c.length === 0?null:c}}, TAG:function(a, b){if (typeof b.getElementsByTagName != "undefined")return b.getElementsByTagName(a[1])}}, preFilter:{CLASS:function(a, b, c, d, e, f){a = " " + a[1].replace(i, "") + " "; if (f)return a; for (var g = 0, h; (h = b[g]) != null; g++)h && (e ^ (h.className && (" " + h.className + " ").replace(/[\t\n\r]/g, " ").indexOf(a) >= 0)?c || d.push(h):c && (b[g] = !1)); return!1}, ID:function(a){return a[1].replace(i, "")}, TAG:function(a, b){return a[1].replace(i, "").toLowerCase()}, CHILD:function(a){if (a[1] === "nth"){a[2] || k.error(a[0]), a[2] = a[2].replace(/^\+|\s*/g, ""); var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]); a[2] = b[1] + (b[2] || 1) - 0, a[3] = b[3] - 0} else a[2] && k.error(a[0]); a[0] = d++; return a}, ATTR:function(a, b, c, d, e, f){var g = a[1] = a[1].replace(i, ""); !f && l.attrMap[g] && (a[1] = l.attrMap[g]), a[4] = (a[4] || a[5] || "").replace(i, ""), a[2] === "~=" && (a[4] = " " + a[4] + " "); return a}, PSEUDO:function(b, c, d, e, f){if (b[1] === "not")if ((a.exec(b[3]) || "").length > 1 || /^\w/.test(b[3]))b[3] = k(b[3], null, null, c); else{var g = k.filter(b[3], c, d, !0 ^ f); d || e.push.apply(e, g); return!1} else if (l.match.POS.test(b[0]) || l.match.CHILD.test(b[0]))return!0; return b}, POS:function(a){a.unshift(!0); return a}}, filters:{enabled:function(a){return a.disabled === !1 && a.type !== "hidden"}, disabled:function(a){return a.disabled === !0}, checked:function(a){return a.checked === !0}, selected:function(a){a.parentNode && a.parentNode.selectedIndex; return a.selected === !0}, parent:function(a){return!!a.firstChild}, empty:function(a){return!a.firstChild}, has:function(a, b, c){return!!k(c[3], a).length}, header:function(a){return/h\d/i.test(a.nodeName)}, text:function(a){var b = a.getAttribute("type"), c = a.type; return a.nodeName.toLowerCase() === "input" && "text" === c && (b === c || b === null)}, radio:function(a){return a.nodeName.toLowerCase() === "input" && "radio" === a.type}, checkbox:function(a){return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type}, file:function(a){return a.nodeName.toLowerCase() === "input" && "file" === a.type}, password:function(a){return a.nodeName.toLowerCase() === "input" && "password" === a.type}, submit:function(a){var b = a.nodeName.toLowerCase(); return(b === "input" || b === "button") && "submit" === a.type}, image:function(a){return a.nodeName.toLowerCase() === "input" && "image" === a.type}, reset:function(a){var b = a.nodeName.toLowerCase(); return(b === "input" || b === "button") && "reset" === a.type}, button:function(a){var b = a.nodeName.toLowerCase(); return b === "input" && "button" === a.type || b === "button"}, input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}, focus:function(a){return a === a.ownerDocument.activeElement}}, setFilters:{first:function(a, b){return b === 0}, last:function(a, b, c, d){return b === d.length - 1}, even:function(a, b){return b % 2 === 0}, odd:function(a, b){return b % 2 === 1}, lt:function(a, b, c){return b < c[3] - 0}, gt:function(a, b, c){return b > c[3] - 0}, nth:function(a, b, c){return c[3] - 0 === b}, eq:function(a, b, c){return c[3] - 0 === b}}, filter:{PSEUDO:function(a, b, c, d){var e = b[1], f = l.filters[e]; if (f)return f(a, c, b, d); if (e === "contains")return(a.textContent || a.innerText || k.getText([a]) || "").indexOf(b[3]) >= 0; if (e === "not"){var g = b[3]; for (var h = 0, i = g.length; h < i; h++)if (g[h] === a)return!1; return!0}k.error(e)}, CHILD:function(a, b){var c = b[1], d = a; switch (c){case"only":case"first":while (d = d.previousSibling)if (d.nodeType === 1)return!1; if (c === "first")return!0; d = a; case"last":while (d = d.nextSibling)if (d.nodeType === 1)return!1; return!0; case"nth":var e = b[2], f = b[3]; if (e === 1 && f === 0)return!0; var g = b[0], h = a.parentNode; if (h && (h.sizcache !== g || !a.nodeIndex)){var i = 0; for (d = h.firstChild; d; d = d.nextSibling)d.nodeType === 1 && (d.nodeIndex = ++i); h.sizcache = g}var j = a.nodeIndex - f; return e === 0?j === 0:j % e === 0 && j / e >= 0}}, ID:function(a, b){return a.nodeType === 1 && a.getAttribute("id") === b}, TAG:function(a, b){return b === "*" && a.nodeType === 1 || a.nodeName.toLowerCase() === b}, CLASS:function(a, b){return(" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > - 1}, ATTR:function(a, b){var c = b[1], d = l.attrHandle[c]?l.attrHandle[c](a):a[c] != null?a[c]:a.getAttribute(c), e = d + "", f = b[2], g = b[4]; return d == null?f === "!=":f === "="?e === g:f === "*="?e.indexOf(g) >= 0:f === "~="?(" " + e + " ").indexOf(g) >= 0:g?f === "!="?e !== g:f === "^="?e.indexOf(g) === 0:f === "$="?e.substr(e.length - g.length) === g:f === "|="?e === g || e.substr(0, g.length + 1) === g + "-":!1:e && d !== !1}, POS:function(a, b, c, d){var e = b[2], f = l.setFilters[e]; if (f)return f(a, c, b, d)}}}, m = l.match.POS, n = function(a, b){return"\\" + (b - 0 + 1)}; for (var o in l.match)l.match[o] = new RegExp(l.match[o].source + /(?![^\[]*\])(?![^\(]*\))/.source), l.leftMatch[o] = new RegExp(/(^(?:.|\r|\n)*?)/.source + l.match[o].source.replace(/\\(\d+)/g, n)); var p = function(a, b){a = Array.prototype.slice.call(a, 0); if (b){b.push.apply(b, a); return b}return a}; try{Array.prototype.slice.call(c.documentElement.childNodes, 0)[0].nodeType} catch (q){p = function(a, b){var c = 0, d = b || []; if (e.call(a) === "[object Array]")Array.prototype.push.apply(d, a); else if (typeof a.length == "number")for (var f = a.length; c < f; c++)d.push(a[c]); else for (; a[c]; c++)d.push(a[c]); return d}}var r, s; c.documentElement.compareDocumentPosition?r = function(a, b){if (a === b){g = !0; return 0}if (!a.compareDocumentPosition || !b.compareDocumentPosition)return a.compareDocumentPosition? - 1:1; return a.compareDocumentPosition(b) & 4? - 1:1}:(r = function(a, b){if (a === b){g = !0; return 0}if (a.sourceIndex && b.sourceIndex)return a.sourceIndex - b.sourceIndex; var c, d, e = [], f = [], h = a.parentNode, i = b.parentNode, j = h; if (h === i)return s(a, b); if (!h)return - 1; if (!i)return 1; while (j)e.unshift(j), j = j.parentNode; j = i; while (j)f.unshift(j), j = j.parentNode; c = e.length, d = f.length; for (var k = 0; k < c && k < d; k++)if (e[k] !== f[k])return s(e[k], f[k]); return k === c?s(a, f[k], - 1):s(e[k], b, 1)}, s = function(a, b, c){if (a === b)return c; var d = a.nextSibling; while (d){if (d === b)return - 1; d = d.nextSibling}return 1}), k.getText = function(a){var b = "", c; for (var d = 0; a[d]; d++)c = a[d], c.nodeType === 3 || c.nodeType === 4?b += c.nodeValue:c.nodeType !== 8 && (b += k.getText(c.childNodes)); return b}, function(){var a = c.createElement("div"), d = "script" + (new Date).getTime(), e = c.documentElement; a.innerHTML = "", e.insertBefore(a, e.firstChild), c.getElementById(d) && (l.find.ID = function(a, c, d){if (typeof c.getElementById != "undefined" && !d){var e = c.getElementById(a[1]); return e?e.id === a[1] || typeof e.getAttributeNode != "undefined" && e.getAttributeNode("id").nodeValue === a[1]?[e]:b:[]}}, l.filter.ID = function(a, b){var c = typeof a.getAttributeNode != "undefined" && a.getAttributeNode("id"); return a.nodeType === 1 && c && c.nodeValue === b}), e.removeChild(a), e = a = null}(), function(){var a = c.createElement("div"); a.appendChild(c.createComment("")), a.getElementsByTagName("*").length > 0 && (l.find.TAG = function(a, b){var c = b.getElementsByTagName(a[1]); if (a[1] === "*"){var d = []; for (var e = 0; c[e]; e++)c[e].nodeType === 1 && d.push(c[e]); c = d}return c}), a.innerHTML = "", a.firstChild && typeof a.firstChild.getAttribute != "undefined" && a.firstChild.getAttribute("href") !== "#" && (l.attrHandle.href = function(a){return a.getAttribute("href", 2)}), a = null}(), c.querySelectorAll && function(){var a = k, b = c.createElement("div"), d = "__sizzle__"; b.innerHTML = "

"; if (!b.querySelectorAll || b.querySelectorAll(".TEST").length !== 0){k = function(b, e, f, g){e = e || c; if (!g && !k.isXML(e)){var h = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b); if (h && (e.nodeType === 1 || e.nodeType === 9)){if (h[1])return p(e.getElementsByTagName(b), f); if (h[2] && l.find.CLASS && e.getElementsByClassName)return p(e.getElementsByClassName(h[2]), f)}if (e.nodeType === 9){if (b === "body" && e.body)return p([e.body], f); if (h && h[3]){var i = e.getElementById(h[3]); if (!i || !i.parentNode)return p([], f); if (i.id === h[3])return p([i], f)}try{return p(e.querySelectorAll(b), f)} catch (j){}} else if (e.nodeType === 1 && e.nodeName.toLowerCase() !== "object"){var m = e, n = e.getAttribute("id"), o = n || d, q = e.parentNode, r = /^\s*[+~]/.test(b); n?o = o.replace(/'/g, "\\$&"):e.setAttribute("id", o), r && q && (e = e.parentNode); try{if (!r || q)return p(e.querySelectorAll("[id='" + o + "'] " + b), f)} catch (s){} finally{n || m.removeAttribute("id")}}}return a(b, e, f, g)}; for (var e in a)k[e] = a[e]; b = null}}(), function(){var a = c.documentElement, b = a.matchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || a.msMatchesSelector; if (b){var d = !b.call(c.createElement("div"), "div"), e = !1; try{b.call(c.documentElement, "[test!='']:sizzle")} catch (f){e = !0}k.matchesSelector = function(a, c){c = c.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if (!k.isXML(a))try{if (e || !l.match.PSEUDO.test(c) && !/!=/.test(c)){var f = b.call(a, c); if (f || !d || a.document && a.document.nodeType !== 11)return f}} catch (g){}return k(c, null, null, [a]).length > 0}}}(), function(){var a = c.createElement("div"); a.innerHTML = "
"; if (!!a.getElementsByClassName && a.getElementsByClassName("e").length !== 0){a.lastChild.className = "e"; if (a.getElementsByClassName("e").length === 1)return; l.order.splice(1, 0, "CLASS"), l.find.CLASS = function(a, b, c){if (typeof b.getElementsByClassName != "undefined" && !c)return b.getElementsByClassName(a[1])}, a = null}}(), c.documentElement.contains?k.contains = function(a, b){return a !== b && (a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains = function(a, b){return!!(a.compareDocumentPosition(b) & 16)}:k.contains = function(){return!1}, k.isXML = function(a){var b = (a?a.ownerDocument || a:0).documentElement; return b?b.nodeName !== "HTML":!1}; var v = function(a, b){var c, d = [], e = "", f = b.nodeType?[b]:b; while (c = l.match.PSEUDO.exec(a))e += c[0], a = a.replace(l.match.PSEUDO, ""); a = l.relative[a]?a + "*":a; for (var g = 0, h = f.length; g < h; g++)k(a, f[g], d); return k.filter(e, d)}; f.find = k, f.expr = k.selectors, f.expr[":"] = f.expr.filters, f.unique = k.uniqueSort, f.text = k.getText, f.isXMLDoc = k.isXML, f.contains = k.contains}(); var N = /Until$/, O = /^(?:parents|prevUntil|prevAll)/, P = /,/, Q = /^.[^:#\[\.,]*$/, R = Array.prototype.slice, S = f.expr.match.POS, T = {children:!0, contents:!0, next:!0, prev:!0}; f.fn.extend({find:function(a){var b = this, c, d; if (typeof a != "string")return f(a).filter(function(){for (c = 0, d = b.length; c < d; c++)if (f.contains(b[c], this))return!0}); var e = this.pushStack("", "find", a), g, h, i; for (c = 0, d = this.length; c < d; c++){g = e.length, f.find(a, this[c], e); if (c > 0)for (h = g; h < e.length; h++)for (i = 0; i < g; i++)if (e[i] === e[h]){e.splice(h--, 1); break}}return e}, has:function(a){var b = f(a); return this.filter(function(){for (var a = 0, c = b.length; a < c; a++)if (f.contains(this, b[a]))return!0})}, not:function(a){return this.pushStack(V(this, a, !1), "not", a)}, filter:function(a){return this.pushStack(V(this, a, !0), "filter", a)}, is:function(a){return!!a && (typeof a == "string"?f.filter(a, this).length > 0:this.filter(a).length > 0)}, closest:function(a, b){var c = [], d, e, g = this[0]; if (f.isArray(a)){var h, i, j = {}, k = 1; if (g && a.length){for (d = 0, e = a.length; d < e; d++)i = a[d], j[i] || (j[i] = S.test(i)?f(i, b || this.context):i); while (g && g.ownerDocument && g !== b){for (i in j)h = j[i], (h.jquery?h.index(g) > - 1:f(g).is(h)) && c.push({selector:i, elem:g, level:k}); g = g.parentNode, k++}}return c}var l = S.test(a) || typeof a != "string"?f(a, b || this.context):0; for (d = 0, e = this.length; d < e; d++){g = this[d]; while (g){if (l?l.index(g) > - 1:f.find.matchesSelector(g, a)){c.push(g); break}g = g.parentNode; if (!g || !g.ownerDocument || g === b || g.nodeType === 11)break}}c = c.length > 1?f.unique(c):c; return this.pushStack(c, "closest", a)}, index:function(a){if (!a)return this[0] && this[0].parentNode?this.prevAll().length: - 1; if (typeof a == "string")return f.inArray(this[0], f(a)); return f.inArray(a.jquery?a[0]:a, this)}, add:function(a, b){var c = typeof a == "string"?f(a, b):f.makeArray(a && a.nodeType?[a]:a), d = f.merge(this.get(), c); return this.pushStack(U(c[0]) || U(d[0])?d:f.unique(d))}, andSelf:function(){return this.add(this.prevObject)}}), f.each({parent:function(a){var b = a.parentNode; return b && b.nodeType !== 11?b:null}, parents:function(a){return f.dir(a, "parentNode")}, parentsUntil:function(a, b, c){return f.dir(a, "parentNode", c)}, next:function(a){return f.nth(a, 2, "nextSibling")}, prev:function(a){return f.nth(a, 2, "previousSibling")}, nextAll:function(a){return f.dir(a, "nextSibling")}, prevAll:function(a){return f.dir(a, "previousSibling")}, nextUntil:function(a, b, c){return f.dir(a, "nextSibling", c)}, prevUntil:function(a, b, c){return f.dir(a, "previousSibling", c)}, siblings:function(a){return f.sibling(a.parentNode.firstChild, a)}, children:function(a){return f.sibling(a.firstChild)}, contents:function(a){return f.nodeName(a, "iframe")?a.contentDocument || a.contentWindow.document:f.makeArray(a.childNodes)}}, function(a, b){f.fn[a] = function(c, d){var e = f.map(this, b, c), g = R.call(arguments); N.test(a) || (d = c), d && typeof d == "string" && (e = f.filter(d, e)), e = this.length > 1 && !T[a]?f.unique(e):e, (this.length > 1 || P.test(d)) && O.test(a) && (e = e.reverse()); return this.pushStack(e, a, g.join(","))}}), f.extend({filter:function(a, b, c){c && (a = ":not(" + a + ")"); return b.length === 1?f.find.matchesSelector(b[0], a)?[b[0]]:[]:f.find.matches(a, b)}, dir:function(a, c, d){var e = [], g = a[c]; while (g && g.nodeType !== 9 && (d === b || g.nodeType !== 1 || !f(g).is(d)))g.nodeType === 1 && e.push(g), g = g[c]; return e}, nth:function(a, b, c, d){b = b || 1; var e = 0; for (; a; a = a[c])if (a.nodeType === 1 && ++e === b)break; return a}, sibling:function(a, b){var c = []; for (; a; a = a.nextSibling)a.nodeType === 1 && a !== b && c.push(a); return c}}); var W = / jQuery\d+="(?:\d+|null)"/g, X = /^\s+/, Y = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, Z = /<([\w:]+)/, $ = /", ""], legend:[1, "
", "
"], thead:[1, "", "
"], tr:[2, "", "
"], td:[3, "", "
"], col:[2, "", "
"], area:[1, "", ""], _default:[0, "", ""]}; be.optgroup = be.option, be.tbody = be.tfoot = be.colgroup = be.caption = be.thead, be.th = be.td, f.support.htmlSerialize || (be._default = [1, "div
", "
"]), f.fn.extend({text:function(a){if (f.isFunction(a))return this.each(function(b){var c = f(this); c.text(a.call(this, b, c.text()))}); if (typeof a != "object" && a !== b)return this.empty().append((this[0] && this[0].ownerDocument || c).createTextNode(a)); return f.text(this)}, wrapAll:function(a){if (f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this, b))}); if (this[0]){var b = f(a, this[0].ownerDocument).eq(0).clone(!0); this[0].parentNode && b.insertBefore(this[0]), b.map(function(){var a = this; while (a.firstChild && a.firstChild.nodeType === 1)a = a.firstChild; return a}).append(this)}return this}, wrapInner:function(a){if (f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this, b))}); return this.each(function(){var b = f(this), c = b.contents(); c.length?c.wrapAll(a):b.append(a)})}, wrap:function(a){return this.each(function(){f(this).wrapAll(a)})}, unwrap:function(){return this.parent().each(function(){f.nodeName(this, "body") || f(this).replaceWith(this.childNodes)}).end()}, append:function(){return this.domManip(arguments, !0, function(a){this.nodeType === 1 && this.appendChild(a)})}, prepend:function(){return this.domManip(arguments, !0, function(a){this.nodeType === 1 && this.insertBefore(a, this.firstChild)})}, before:function(){if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function(a){this.parentNode.insertBefore(a, this)}); if (arguments.length){var a = f(arguments[0]); a.push.apply(a, this.toArray()); return this.pushStack(a, "before", arguments)}}, after:function(){if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function(a){this.parentNode.insertBefore(a, this.nextSibling)}); if (arguments.length){var a = this.pushStack(this, "after", arguments); a.push.apply(a, f(arguments[0]).toArray()); return a}}, remove:function(a, b){for (var c = 0, d; (d = this[c]) != null; c++)if (!a || f.filter(a, [d]).length)!b && d.nodeType === 1 && (f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])), d.parentNode && d.parentNode.removeChild(d); return this}, empty:function(){for (var a = 0, b; (b = this[a]) != null; a++){b.nodeType === 1 && f.cleanData(b.getElementsByTagName("*")); while (b.firstChild)b.removeChild(b.firstChild)}return this}, clone:function(a, b){a = a == null?!1:a, b = b == null?a:b; return this.map(function(){return f.clone(this, a, b)})}, html:function(a){if (a === b)return this[0] && this[0].nodeType === 1?this[0].innerHTML.replace(W, ""):null; if (typeof a == "string" && !ba.test(a) && (f.support.leadingWhitespace || !X.test(a)) && !be[(Z.exec(a) || ["", ""])[1].toLowerCase()]){a = a.replace(Y, "<$1>"); try{for (var c = 0, d = this.length; c < d; c++)this[c].nodeType === 1 && (f.cleanData(this[c].getElementsByTagName("*")), this[c].innerHTML = a)} catch (e){this.empty().append(a)}} else f.isFunction(a)?this.each(function(b){var c = f(this); c.html(a.call(this, b, c.html()))}):this.empty().append(a); return this}, replaceWith:function(a){if (this[0] && this[0].parentNode){if (f.isFunction(a))return this.each(function(b){var c = f(this), d = c.html(); c.replaceWith(a.call(this, b, d))}); typeof a != "string" && (a = f(a).detach()); return this.each(function(){var b = this.nextSibling, c = this.parentNode; f(this).remove(), b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a), "replaceWith", a):this}, detach:function(a){return this.remove(a, !0)}, domManip:function(a, c, d){var e, g, h, i, j = a[0], k = []; if (!f.support.checkClone && arguments.length === 3 && typeof j == "string" && bb.test(j))return this.each(function(){f(this).domManip(a, c, d, !0)}); if (f.isFunction(j))return this.each(function(e){var g = f(this); a[0] = j.call(this, e, c?g.html():b), g.domManip(a, c, d)}); if (this[0]){i = j && j.parentNode, f.support.parentNode && i && i.nodeType === 11 && i.childNodes.length === this.length?e = {fragment:i}:e = f.buildFragment(a, this, k), h = e.fragment, h.childNodes.length === 1?g = h = h.firstChild:g = h.firstChild; if (g){c = c && f.nodeName(g, "tr"); for (var l = 0, m = this.length, n = m - 1; l < m; l++)d.call(c?bf(this[l], g):this[l], e.cacheable || m > 1 && l < n?f.clone(h, !0, !0):h)}k.length && f.each(k, bl)}return this}}), f.buildFragment = function(a, b, d){var e, g, h, i; b && b[0] && (i = b[0].ownerDocument || b[0]), i.createDocumentFragment || (i = c), a.length === 1 && typeof a[0] == "string" && a[0].length < 512 && i === c && a[0].charAt(0) === "<" && !ba.test(a[0]) && (f.support.checkClone || !bb.test(a[0])) && (g = !0, h = f.fragments[a[0]], h && h !== 1 && (e = h)), e || (e = i.createDocumentFragment(), f.clean + (a, i, e, d)), g && (f.fragments[a[0]] = h?e:1); return{fragment:e, cacheable:g}}, f.fragments = {}, f.each({appendTo:"append", prependTo:"prepend", insertBefore:"before", insertAfter:"after", replaceAll:"replaceWith"}, function(a, b){f.fn[a] = function(c){var d = [], e = f(c), g = this.length === 1 && this[0].parentNode; if (g && g.nodeType === 11 && g.childNodes.length === 1 && e.length === 1){e[b](this[0]); return this}for (var h = 0, i = e.length; h < i; h++){var j = (h > 0?this.clone(!0):this).get(); f(e[h])[b](j), d = d.concat(j)}return this.pushStack(d, a, e.selector)}}), f.extend({clone:function(a, b, c){var d = a.cloneNode(!0), e, g, h; if ((!f.support.noCloneEvent || !f.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !f.isXMLDoc(a)){bh(a, d), e = bi(a), g = bi(d); for (h = 0; e[h]; ++h)g[h] && bh(e[h], g[h])}if (b){bg(a, d); if (c){e = bi(a), g = bi(d); for (h = 0; e[h]; ++h)bg(e[h], g[h])}}e = g = null; return d}, clean:function(a, b, d, e){var g; b = b || c, typeof b.createElement == "undefined" && (b = b.ownerDocument || b[0] && b[0].ownerDocument || c); var h = [], i; for (var j = 0, k; (k = a[j]) != null; j++){typeof k == "number" && (k += ""); if (!k)continue; if (typeof k == "string")if (!_.test(k))k = b.createTextNode(k); else{k = k.replace(Y, "<$1>"); var l = (Z.exec(k) || ["", ""])[1].toLowerCase(), m = be[l] || be._default, n = m[0], o = b.createElement("div"); o.innerHTML = m[1] + k + m[2]; while (n--)o = o.lastChild; if (!f.support.tbody){var p = $.test(k), q = l === "table" && !p?o.firstChild && o.firstChild.childNodes:m[1] === "" && !p?o.childNodes:[]; for (i = q.length - 1; i >= 0; --i)f.nodeName(q[i], "tbody") && !q[i].childNodes.length && q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace && X.test(k) && o.insertBefore(b.createTextNode(X.exec(k)[0]), o.firstChild), k = o.childNodes}var r; if (!f.support.appendChecked)if (k[0] && typeof (r = k.length) == "number")for (i = 0; i < r; i++)bk(k[i]); else bk(k); k.nodeType?h.push(k):h = f.merge(h, k)}if (d){g = function(a){return!a.type || bc.test(a.type)}; for (j = 0; h[j]; j++)if (e && f.nodeName(h[j], "script") && (!h[j].type || h[j].type.toLowerCase() === "text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]); else{if (h[j].nodeType === 1){var s = f.grep(h[j].getElementsByTagName("script"), g); h.splice.apply(h, [j + 1, 0].concat(s))}d.appendChild(h[j])}}return h}, cleanData:function(a){var b, c, d = f.cache, e = f.expando, g = f.event.special, h = f.support.deleteExpando; for (var i = 0, j; (j = a[i]) != null; i++){if (j.nodeName && f.noData[j.nodeName.toLowerCase()])continue; c = j[f.expando]; if (c){b = d[c] && d[c][e]; if (b && b.events){for (var k in b.events)g[k]?f.event.remove(j, k):f.removeEvent(j, k, b.handle); b.handle && (b.handle.elem = null)}h?delete j[f.expando]:j.removeAttribute && j.removeAttribute(f.expando), delete d[c]}}}}); var bm = /alpha\([^)]*\)/i, bn = /opacity=([^)]*)/, bo = /([A-Z]|^ms)/g, bp = /^-?\d+(?:px)?$/i, bq = /^-?\d/, br = /^([\-+])=([\-+.\de]+)/, bs = {position:"absolute", visibility:"hidden", display:"block"}, bt = ["Left", "Right"], bu = ["Top", "Bottom"], bv, bw, bx; f.fn.css = function(a, c){if (arguments.length === 2 && c === b)return this; return f.access(this, a, c, !0, function(a, c, d){return d !== b?f.style(a, c, d):f.css(a, c)})}, f.extend({cssHooks:{opacity:{get:function(a, b){if (b){var c = bv(a, "opacity", "opacity"); return c === ""?"1":c}return a.style.opacity}}}, cssNumber:{fillOpacity:!0, fontWeight:!0, lineHeight:!0, opacity:!0, orphans:!0, widows:!0, zIndex:!0, zoom:!0}, cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"}, style:function(a, c, d, e){if (!!a && a.nodeType !== 3 && a.nodeType !== 8 && !!a.style){var g, h, i = f.camelCase(c), j = a.style, k = f.cssHooks[i]; c = f.cssProps[i] || i; if (d === b){if (k && "get"in k && (g = k.get(a, !1, e)) !== b)return g; return j[c]}h = typeof d, h === "string" && (g = br.exec(d)) && (d = + (g[1] + 1) * + g[2] + parseFloat(f.css(a, c)), h = "number"); if (d == null || h === "number" && isNaN(d))return; h === "number" && !f.cssNumber[i] && (d += "px"); if (!k || !("set"in k) || (d = k.set(a, d)) !== b)try{j[c] = d} catch (l){}}}, css:function(a, c, d){var e, g; c = f.camelCase(c), g = f.cssHooks[c], c = f.cssProps[c] || c, c === "cssFloat" && (c = "float"); if (g && "get"in g && (e = g.get(a, !0, d)) !== b)return e; if (bv)return bv(a, c)}, swap:function(a, b, c){var d = {}; for (var e in b)d[e] = a.style[e], a.style[e] = b[e]; c.call(a); for (e in b)a.style[e] = d[e]}}), f.curCSS = f.css, f.each(["height", "width"], function(a, b){f.cssHooks[b] = {get:function(a, c, d){var e; if (c){if (a.offsetWidth !== 0)return by(a, b, d); f.swap(a, bs, function(){e = by(a, b, d)}); return e}}, set:function(a, b){if (!bp.test(b))return b; b = parseFloat(b); if (b >= 0)return b + "px"}}}), f.support.opacity || (f.cssHooks.opacity = {get:function(a, b){return bn.test((b && a.currentStyle?a.currentStyle.filter:a.style.filter) || "")?parseFloat(RegExp.$1) / 100 + "":b?"1":""}, set:function(a, b){var c = a.style, d = a.currentStyle, e = f.isNaN(b)?"":"alpha(opacity=" + b * 100 + ")", g = d && d.filter || c.filter || ""; c.zoom = 1; if (b >= 1 && f.trim(g.replace(bm, "")) === ""){c.removeAttribute("filter"); if (d && !d.filter)return}c.filter = bm.test(g)?g.replace(bm, e):g + " " + e}}), f(function(){f.support.reliableMarginRight || (f.cssHooks.marginRight = {get:function(a, b){var c; f.swap(a, {display:"inline-block"}, function(){b?c = bv(a, "margin-right", "marginRight"):c = a.style.marginRight}); return c}})}), c.defaultView && c.defaultView.getComputedStyle && (bw = function(a, c){var d, e, g; c = c.replace(bo, "-$1").toLowerCase(); if (!(e = a.ownerDocument.defaultView))return b; if (g = e.getComputedStyle(a, null))d = g.getPropertyValue(c), d === "" && !f.contains(a.ownerDocument.documentElement, a) && (d = f.style(a, c)); return d}), c.documentElement.currentStyle && (bx = function(a, b){var c, d = a.currentStyle && a.currentStyle[b], e = a.runtimeStyle && a.runtimeStyle[b], f = a.style; !bp.test(d) && bq.test(d) && (c = f.left, e && (a.runtimeStyle.left = a.currentStyle.left), f.left = b === "fontSize"?"1em":d || 0, d = f.pixelLeft + "px", f.left = c, e && (a.runtimeStyle.left = e)); return d === ""?"auto":d}), bv = bw || bx, f.expr && f.expr.filters && (f.expr.filters.hidden = function(a){var b = a.offsetWidth, c = a.offsetHeight; return b === 0 && c === 0 || !f.support.reliableHiddenOffsets && (a.style.display || f.css(a, "display")) === "none"}, f.expr.filters.visible = function(a){return!f.expr.filters.hidden(a)}); var bz = /%20/g, bA = /\[\]$/, bB = /\r?\n/g, bC = /#.*$/, bD = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, bE = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, bF = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, bG = /^(?:GET|HEAD)$/, bH = /^\/\//, bI = /\?/, bJ = /)<[^<]*)*<\/script>/gi, bK = /^(?:select|textarea)/i, bL = /\s+/, bM = /([?&])_=[^&]*/, bN = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, bO = f.fn.load, bP = {}, bQ = {}, bR, bS, bT = ["*/"] + ["*"]; try{bR = e.href} catch (bU){bR = c.createElement("a"), bR.href = "", bR = bR.href}bS = bN.exec(bR.toLowerCase()) || [], f.fn.extend({load:function(a, c, d){if (typeof a != "string" && bO)return bO.apply(this, arguments); if (!this.length)return this; var e = a.indexOf(" "); if (e >= 0){var g = a.slice(e, a.length); a = a.slice(0, e)}var h = "GET"; c && (f.isFunction(c)?(d = c, c = b):typeof c == "object" && (c = f.param(c, f.ajaxSettings.traditional), h = "POST")); var i = this; f.ajax({url:a, type:h, dataType:"html", data:c, complete:function(a, b, c){c = a.responseText, a.isResolved() && (a.done(function(a){c = a}), i.html(g?f("
").append(c.replace(bJ, "")).find(g):c)), d && i.each(d, [c, b, a])}}); return this}, serialize:function(){return f.param(this.serializeArray())}, serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name && !this.disabled && (this.checked || bK.test(this.nodeName) || bE.test(this.type))}).map(function(a, b){var c = f(this).val(); return c == null?null:f.isArray(c)?f.map(c, function(a, c){return{name:b.name, value:a.replace(bB, "\r\n")}}):{name:b.name, value:c.replace(bB, "\r\n")}}).get()}}), f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a, b){f.fn[b] = function(a){return this.bind(b, a)}}), f.each(["get", "post"], function(a, c){f[c] = function(a, d, e, g){f.isFunction(d) && (g = g || e, e = d, d = b); return f.ajax({type:c, url:a, data:d, success:e, dataType:g})}}), f.extend({getScript:function(a, c){return f.get(a, b, c, "script")}, getJSON:function(a, b, c){return f.get(a, b, c, "json")}, ajaxSetup:function(a, b){b?bX(a, f.ajaxSettings):(b = a, a = f.ajaxSettings), bX(a, b); return a}, ajaxSettings:{url:bR, isLocal:bF.test(bS[1]), global:!0, type:"GET", contentType:"application/x-www-form-urlencoded", processData:!0, async:!0, accepts:{xml:"application/xml, text/xml", html:"text/html", text:"text/plain", json:"application/json, text/javascript", "*":bT}, contents:{xml:/xml/, html:/html/, json:/json/}, responseFields:{xml:"responseXML", text:"responseText"}, converters:{"* text":a.String, "text html":!0, "text json":f.parseJSON, "text xml":f.parseXML}, flatOptions:{context:!0, url:!0}}, ajaxPrefilter:bV(bP), ajaxTransport:bV(bQ), ajax:function(a, c){function w(a, c, l, m){if (s !== 2){s = 2, q && clearTimeout(q), p = b, n = m || "", v.readyState = a > 0?4:0; var o, r, u, w = c, x = l?bZ(d, v, l):b, y, z; if (a >= 200 && a < 300 || a === 304){if (d.ifModified){if (y = v.getResponseHeader("Last-Modified"))f.lastModified[k] = y; if (z = v.getResponseHeader("Etag"))f.etag[k] = z}if (a === 304)w = "notmodified", o = !0; else try{r = b$(d, x), w = "success", o = !0} catch (A){w = "parsererror", u = A}} else{u = w; if (!w || a)w = "error", a < 0 && (a = 0)}v.status = a, v.statusText = "" + (c || w), o?h.resolveWith(e, [r, w, v]):h.rejectWith(e, [v, w, u]), v.statusCode(j), j = b, t && g.trigger("ajax" + (o?"Success":"Error"), [v, d, o?r:u]), i.resolveWith(e, [v, w]), t && (g.trigger("ajaxComplete", [v, d]), --f.active || f.event.trigger("ajaxStop"))}}typeof a == "object" && (c = a, a = b), c = c || {}; var d = f.ajaxSetup({}, c), e = d.context || d, g = e !== d && (e.nodeType || e instanceof f)?f(e):f.event, h = f.Deferred(), i = f._Deferred(), j = d.statusCode || {}, k, l = {}, m = {}, n, o, p, q, r, s = 0, t, u, v = {readyState:0, setRequestHeader:function(a, b){if (!s){var c = a.toLowerCase(); a = m[c] = m[c] || a, l[a] = b}return this}, getAllResponseHeaders:function(){return s === 2?n:null}, getResponseHeader:function(a){var c; if (s === 2){if (!o){o = {}; while (c = bD.exec(n))o[c[1].toLowerCase()] = c[2]}c = o[a.toLowerCase()]}return c === b?null:c}, overrideMimeType:function(a){s || (d.mimeType = a); return this}, abort:function(a){a = a || "abort", p && p.abort(a), w(0, a); return this}}; h.promise(v), v.success = v.done, v.error = v.fail, v.complete = i.done, v.statusCode = function(a){if (a){var b; if (s < 2)for (b in a)j[b] = [j[b], a[b]]; else b = a[v.status], v.then(b, b)}return this}, d.url = ((a || d.url) + "").replace(bC, "").replace(bH, bS[1] + "//"), d.dataTypes = f.trim(d.dataType || "*").toLowerCase().split(bL), d.crossDomain == null && (r = bN.exec(d.url.toLowerCase()), d.crossDomain = !(!r || r[1] == bS[1] && r[2] == bS[2] && (r[3] || (r[1] === "http:"?80:443)) == (bS[3] || (bS[1] === "http:"?80:443)))), d.data && d.processData && typeof d.data != "string" && (d.data = f.param(d.data, d.traditional)), bW(bP, d, c, v); if (s === 2)return!1; t = d.global, d.type = d.type.toUpperCase(), d.hasContent = !bG.test(d.type), t && f.active++ === 0 && f.event.trigger("ajaxStart"); if (!d.hasContent){d.data && (d.url += (bI.test(d.url)?"&":"?") + d.data, delete d.data), k = d.url; if (d.cache === !1){var x = f.now(), y = d.url.replace(bM, "$1_=" + x); d.url = y + (y === d.url?(bI.test(d.url)?"&":"?") + "_=" + x:"")}}(d.data && d.hasContent && d.contentType !== !1 || c.contentType) && v.setRequestHeader("Content-Type", d.contentType), d.ifModified && (k = k || d.url, f.lastModified[k] && v.setRequestHeader("If-Modified-Since", f.lastModified[k]), f.etag[k] && v.setRequestHeader("If-None-Match", f.etag[k])), v.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]] + (d.dataTypes[0] !== "*"?", " + bT + "; q=0.01":""):d.accepts["*"]); for (u in d.headers)v.setRequestHeader(u, d.headers[u]); if (d.beforeSend && (d.beforeSend.call(e, v, d) === !1 || s === 2)){v.abort(); return!1}for (u in{success:1, error:1, complete:1})v[u](d[u]); p = bW(bQ, d, c, v); if (!p)w( - 1, "No Transport"); else{v.readyState = 1, t && g.trigger("ajaxSend", [v, d]), d.async && d.timeout > 0 && (q = setTimeout(function(){v.abort("timeout")}, d.timeout)); try{s = 1, p.send(l, w)} catch (z){s < 2?w( - 1, z):f.error(z)}}return v}, param:function(a, c){var d = [], e = function(a, b){b = f.isFunction(b)?b():b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)}; c === b && (c = f.ajaxSettings.traditional); if (f.isArray(a) || a.jquery && !f.isPlainObject(a))f.each(a, function(){e(this.name, this.value)}); else for (var g in a)bY(g, a[g], c, e); return d.join("&").replace(bz, "+")}}), f.extend({active:0, lastModified:{}, etag:{}}); var b_ = f.now(), ca = /(\=)\?(&|$)|\?\?/i; f.ajaxSetup({jsonp:"callback", jsonpCallback:function(){return f.expando + "_" + b_++}}), f.ajaxPrefilter("json jsonp", function(b, c, d){var e = b.contentType === "application/x-www-form-urlencoded" && typeof b.data == "string"; if (b.dataTypes[0] === "jsonp" || b.jsonp !== !1 && (ca.test(b.url) || e && ca.test(b.data))){var g, h = b.jsonpCallback = f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback, i = a[h], j = b.url, k = b.data, l = "$1" + h + "$2"; b.jsonp !== !1 && (j = j.replace(ca, l), b.url === j && (e && (k = k.replace(ca, l)), b.data === k && (j += (/\?/.test(j)?"&":"?") + b.jsonp + "=" + h))), b.url = j, b.data = k, a[h] = function(a){g = [a]}, d.always(function(){a[h] = i, g && f.isFunction(i) && a[h](g[0])}), b.converters["script json"] = function(){g || f.error(h + " was not called"); return g[0]}, b.dataTypes[0] = "json"; return"script"}}), f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/javascript|ecmascript/}, converters:{"text script":function(a){f.globalEval(a); return a}}}), f.ajaxPrefilter("script", function(a){a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)}), f.ajaxTransport("script", function(a){if (a.crossDomain){var d, e = c.head || c.getElementsByTagName("head")[0] || c.documentElement; return{send:function(f, g){d = c.createElement("script"), d.async = "async", a.scriptCharset && (d.charset = a.scriptCharset), d.src = a.url, d.onload = d.onreadystatechange = function(a, c){if (c || !d.readyState || /loaded|complete/.test(d.readyState))d.onload = d.onreadystatechange = null, e && d.parentNode && e.removeChild(d), d = b, c || g(200, "success")}, e.insertBefore(d, e.firstChild)}, abort:function(){d && d.onload(0, 1)}}}}); var cb = a.ActiveXObject?function(){for (var a in cd)cd[a](0, 1)}:!1, cc = 0, cd; f.ajaxSettings.xhr = a.ActiveXObject?function(){return!this.isLocal && ce() || cf()}:ce, function(a){f.extend(f.support, {ajax:!!a, cors:!!a && "withCredentials"in a})}(f.ajaxSettings.xhr()), f.support.ajax && f.ajaxTransport(function(c){if (!c.crossDomain || f.support.cors){var d; return{send:function(e, g){var h = c.xhr(), i, j; c.username?h.open(c.type, c.url, c.async, c.username, c.password):h.open(c.type, c.url, c.async); if (c.xhrFields)for (j in c.xhrFields)h[j] = c.xhrFields[j]; c.mimeType && h.overrideMimeType && h.overrideMimeType(c.mimeType), !c.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest"); try{for (j in e)h.setRequestHeader(j, e[j])} catch (k){}h.send(c.hasContent && c.data || null), d = function(a, e){var j, k, l, m, n; try{if (d && (e || h.readyState === 4)){d = b, i && (h.onreadystatechange = f.noop, cb && delete cd[i]); if (e)h.readyState !== 4 && h.abort(); else{j = h.status, l = h.getAllResponseHeaders(), m = {}, n = h.responseXML, n && n.documentElement && (m.xml = n), m.text = h.responseText; try{k = h.statusText} catch (o){k = ""}!j && c.isLocal && !c.crossDomain?j = m.text?200:404:j === 1223 && (j = 204)}}} catch (p){e || g( - 1, p)}m && g(j, k, m, l)}, !c.async || h.readyState === 4?d():(i = ++cc, cb && (cd || (cd = {}, f(a).unload(cb)), cd[i] = d), h.onreadystatechange = d)}, abort:function(){d && d(0, 1)}}}}); var cg = {}, ch, ci, cj = /^(?:toggle|show|hide)$/, ck = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, cl, cm = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]], cn; f.fn.extend({show:function(a, b, c){var d, e; if (a || a === 0)return this.animate(cq("show", 3), a, b, c); for (var g = 0, h = this.length; g < h; g++)d = this[g], d.style && (e = d.style.display, !f._data(d, "olddisplay") && e === "none" && (e = d.style.display = ""), e === "" && f.css(d, "display") === "none" && f._data(d, "olddisplay", cr(d.nodeName))); for (g = 0; g < h; g++){d = this[g]; if (d.style){e = d.style.display; if (e === "" || e === "none")d.style.display = f._data(d, "olddisplay") || ""}}return this}, hide:function(a, b, c){if (a || a === 0)return this.animate(cq("hide", 3), a, b, c); for (var d = 0, e = this.length; d < e; d++)if (this[d].style){var g = f.css(this[d], "display"); g !== "none" && !f._data(this[d], "olddisplay") && f._data(this[d], "olddisplay", g)}for (d = 0; d < e; d++)this[d].style && (this[d].style.display = "none"); return this}, _toggle:f.fn.toggle, toggle:function(a, b, c){var d = typeof a == "boolean"; f.isFunction(a) && f.isFunction(b)?this._toggle.apply(this, arguments):a == null || d?this.each(function(){var b = d?a:f(this).is(":hidden"); f(this)[b?"show":"hide"]()}):this.animate(cq("toggle", 3), a, b, c); return this}, fadeTo:function(a, b, c, d){return this.filter(":hidden").css("opacity", 0).show().end().animate({opacity:b}, a, c, d)}, animate:function(a, b, c, d){var e = f.speed(b, c, d); if (f.isEmptyObject(a))return this.each(e.complete, [!1]); a = f.extend({}, a); return this[e.queue === !1?"each":"queue"](function(){e.queue === !1 && f._mark(this); var b = f.extend({}, e), c = this.nodeType === 1, d = c && f(this).is(":hidden"), g, h, i, j, k, l, m, n, o; b.animatedProperties = {}; for (i in a){g = f.camelCase(i), i !== g && (a[g] = a[i], delete a[i]), h = a[g], f.isArray(h)?(b.animatedProperties[g] = h[1], h = a[g] = h[0]):b.animatedProperties[g] = b.specialEasing && b.specialEasing[g] || b.easing || "swing"; if (h === "hide" && d || h === "show" && !d)return b.complete.call(this); c && (g === "height" || g === "width") && (b.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], f.css(this, "display") === "inline" && f.css(this, "float") === "none" && (f.support.inlineBlockNeedsLayout?(j = cr(this.nodeName), j === "inline"?this.style.display = "inline-block":(this.style.display = "inline", this.style.zoom = 1)):this.style.display = "inline-block"))}b.overflow != null && (this.style.overflow = "hidden"); for (i in a)k = new f.fx(this, b, i), h = a[i], cj.test(h)?k[h === "toggle"?d?"show":"hide":h]():(l = ck.exec(h), m = k.cur(), l?(n = parseFloat(l[2]), o = l[3] || (f.cssNumber[i]?"":"px"), o !== "px" && (f.style(this, i, (n || 1) + o), m = (n || 1) / k.cur() * m, f.style(this, i, m + o)), l[1] && (n = (l[1] === "-="? - 1:1) * n + m), k.custom(m, n, o)):k.custom(m, h, "")); return!0})}, stop:function(a, b){a && this.queue([]), this.each(function(){var a = f.timers, c = a.length; b || f._unmark(!0, this); while (c--)a[c].elem === this && (b && a[c](!0), a.splice(c, 1))}), b || this.dequeue(); return this}}), f.each({slideDown:cq("show", 1), slideUp:cq("hide", 1), slideToggle:cq("toggle", 1), fadeIn:{opacity:"show"}, fadeOut:{opacity:"hide"}, fadeToggle:{opacity:"toggle"}}, function(a, b){f.fn[a] = function(a, c, d){return this.animate(b, a, c, d)}}), f.extend({speed:function(a, b, c){var d = a && typeof a == "object"?f.extend({}, a):{complete:c || !c && b || f.isFunction(a) && a, duration:a, easing:c && b || b && !f.isFunction(b) && b}; d.duration = f.fx.off?0:typeof d.duration == "number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default, d.old = d.complete, d.complete = function(a){f.isFunction(d.old) && d.old.call(this), d.queue !== !1?f.dequeue(this):a !== !1 && f._unmark(this)}; return d}, easing:{linear:function(a, b, c, d){return c + d * a}, swing:function(a, b, c, d){return( - Math.cos(a * Math.PI) / 2 + .5) * d + c}}, timers:[], fx:function(a, b, c){this.options = b, this.elem = a, this.prop = c, b.orig = b.orig || {}}}), f.fx.prototype = {update:function(){this.options.step && this.options.step.call(this.elem, this.now, this), (f.fx.step[this.prop] || f.fx.step._default)(this)}, cur:function(){if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null))return this.elem[this.prop]; var a, b = f.css(this.elem, this.prop); return isNaN(a = parseFloat(b))?!b || b === "auto"?0:b:a}, custom:function(a, b, c){function g(a){return d.step(a)}var d = this, e = f.fx; this.startTime = cn || co(), this.start = a, this.end = b, this.unit = c || this.unit || (f.cssNumber[this.prop]?"":"px"), this.now = this.start, this.pos = this.state = 0, g.elem = this.elem, g() && f.timers.push(g) && !cl && (cl = setInterval(e.tick, e.interval))}, show:function(){this.options.orig[this.prop] = f.style(this.elem, this.prop), this.options.show = !0, this.custom(this.prop === "width" || this.prop === "height"?1:0, this.cur()), f(this.elem).show()}, hide:function(){this.options.orig[this.prop] = f.style(this.elem, this.prop), this.options.hide = !0, this.custom(this.cur(), 0)}, step:function(a){var b = cn || co(), c = !0, d = this.elem, e = this.options, g, h; if (a || b >= e.duration + this.startTime){this.now = this.end, this.pos = this.state = 1, this.update(), e.animatedProperties[this.prop] = !0; for (g in e.animatedProperties)e.animatedProperties[g] !== !0 && (c = !1); if (c){e.overflow != null && !f.support.shrinkWrapBlocks && f.each(["", "X", "Y"], function(a, b){d.style["overflow" + b] = e.overflow[a]}), e.hide && f(d).hide(); if (e.hide || e.show)for (var i in e.animatedProperties)f.style(d, i, e.orig[i]); e.complete.call(d)}return!1}e.duration == Infinity?this.now = b:(h = b - this.startTime, this.state = h / e.duration, this.pos = f.easing[e.animatedProperties[this.prop]](this.state, h, 0, 1, e.duration), this.now = this.start + (this.end - this.start) * this.pos), this.update(); return!0}}, f.extend(f.fx, {tick:function(){for (var a = f.timers, b = 0; b < a.length; ++b)a[b]() || a.splice(b--, 1); a.length || f.fx.stop()}, interval:13, stop:function(){clearInterval(cl), cl = null}, speeds:{slow:600, fast:200, _default:400}, step:{opacity:function(a){f.style(a.elem, "opacity", a.now)}, _default:function(a){a.elem.style && a.elem.style[a.prop] != null?a.elem.style[a.prop] = (a.prop === "width" || a.prop === "height"?Math.max(0, a.now):a.now) + a.unit:a.elem[a.prop] = a.now}}}), f.expr && f.expr.filters && (f.expr.filters.animated = function(a){return f.grep(f.timers, function(b){return a === b.elem}).length}); var cs = /^t(?:able|d|h)$/i, ct = /^(?:body|html)$/i; "getBoundingClientRect"in c.documentElement?f.fn.offset = function(a){var b = this[0], c; if (a)return this.each(function(b){f.offset.setOffset(this, a, b)}); if (!b || !b.ownerDocument)return null; if (b === b.ownerDocument.body)return f.offset.bodyOffset(b); try{c = b.getBoundingClientRect()} catch (d){}var e = b.ownerDocument, g = e.documentElement; if (!c || !f.contains(g, b))return c?{top:c.top, left:c.left}:{top:0, left:0}; var h = e.body, i = cu(e), j = g.clientTop || h.clientTop || 0, k = g.clientLeft || h.clientLeft || 0, l = i.pageYOffset || f.support.boxModel && g.scrollTop || h.scrollTop, m = i.pageXOffset || f.support.boxModel && g.scrollLeft || h.scrollLeft, n = c.top + l - j, o = c.left + m - k; return{top:n, left:o}}:f.fn.offset = function(a){var b = this[0]; if (a)return this.each(function(b){f.offset.setOffset(this, a, b)}); if (!b || !b.ownerDocument)return null; if (b === b.ownerDocument.body)return f.offset.bodyOffset(b); f.offset.initialize(); var c, d = b.offsetParent, e = b, g = b.ownerDocument, h = g.documentElement, i = g.body, j = g.defaultView, k = j?j.getComputedStyle(b, null):b.currentStyle, l = b.offsetTop, m = b.offsetLeft; while ((b = b.parentNode) && b !== i && b !== h){if (f.offset.supportsFixedPosition && k.position === "fixed")break; c = j?j.getComputedStyle(b, null):b.currentStyle, l -= b.scrollTop, m -= b.scrollLeft, b === d && (l += b.offsetTop, m += b.offsetLeft, f.offset.doesNotAddBorder && (!f.offset.doesAddBorderForTableAndCells || !cs.test(b.nodeName)) && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), e = d, d = b.offsetParent), f.offset.subtractsBorderForOverflowNotVisible && c.overflow !== "visible" && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), k = c}if (k.position === "relative" || k.position === "static")l += i.offsetTop, m += i.offsetLeft; f.offset.supportsFixedPosition && k.position === "fixed" && (l += Math.max(h.scrollTop, i.scrollTop), m += Math.max(h.scrollLeft, i.scrollLeft)); return{top:l, left:m}}, f.offset = {initialize:function(){var a = c.body, b = c.createElement("div"), d, e, g, h, i = parseFloat(f.css(a, "marginTop")) || 0, j = "
"; f.extend(b.style, {position:"absolute", top:0, left:0, margin:0, border:0, width:"1px", height:"1px", visibility:"hidden"}), b.innerHTML = j, a.insertBefore(b, a.firstChild), d = b.firstChild, e = d.firstChild, h = d.nextSibling.firstChild.firstChild, this.doesNotAddBorder = e.offsetTop !== 5, this.doesAddBorderForTableAndCells = h.offsetTop === 5, e.style.position = "fixed", e.style.top = "20px", this.supportsFixedPosition = e.offsetTop === 20 || e.offsetTop === 15, e.style.position = e.style.top = "", d.style.overflow = "hidden", d.style.position = "relative", this.subtractsBorderForOverflowNotVisible = e.offsetTop === - 5, this.doesNotIncludeMarginInBodyOffset = a.offsetTop !== i, a.removeChild(b), f.offset.initialize = f.noop}, bodyOffset:function(a){var b = a.offsetTop, c = a.offsetLeft; f.offset.initialize(), f.offset.doesNotIncludeMarginInBodyOffset && (b += parseFloat(f.css(a, "marginTop")) || 0, c += parseFloat(f.css(a, "marginLeft")) || 0); return{top:b, left:c}}, setOffset:function(a, b, c){var d = f.css(a, "position"); d === "static" && (a.style.position = "relative"); var e = f(a), g = e.offset(), h = f.css(a, "top"), i = f.css(a, "left"), j = (d === "absolute" || d === "fixed") && f.inArray("auto", [h, i]) > - 1, k = {}, l = {}, m, n; j?(l = e.position(), m = l.top, n = l.left):(m = parseFloat(h) || 0, n = parseFloat(i) || 0), f.isFunction(b) && (b = b.call(a, c, g)), b.top != null && (k.top = b.top - g.top + m), b.left != null && (k.left = b.left - g.left + n), "using"in b?b.using.call(a, k):e.css(k)}}, f.fn.extend({position:function(){if (!this[0])return null; var a = this[0], b = this.offsetParent(), c = this.offset(), d = ct.test(b[0].nodeName)?{top:0, left:0}:b.offset(); c.top -= parseFloat(f.css(a, "marginTop")) || 0, c.left -= parseFloat(f.css(a, "marginLeft")) || 0, d.top += parseFloat(f.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(f.css(b[0], "borderLeftWidth")) || 0; return{top:c.top - d.top, left:c.left - d.left}}, offsetParent:function(){return this.map(function(){var a = this.offsetParent || c.body; while (a && !ct.test(a.nodeName) && f.css(a, "position") === "static")a = a.offsetParent; return a})}}), f.each(["Left", "Top"], function(a, c){var d = "scroll" + c; f.fn[d] = function(c){var e, g; if (c === b){e = this[0]; if (!e)return null; g = cu(e); return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel && g.document.documentElement[d] || g.document.body[d]:e[d]}return this.each(function(){g = cu(this), g?g.scrollTo(a?f(g).scrollLeft():c, a?c:f(g).scrollTop()):this[d] = c})}}), f.each(["Height", "Width"], function(a, c){var d = c.toLowerCase(); f.fn["inner" + c] = function(){var a = this[0]; return a && a.style?parseFloat(f.css(a, d, "padding")):null}, f.fn["outer" + c] = function(a){var b = this[0]; return b && b.style?parseFloat(f.css(b, d, a?"margin":"border")):null}, f.fn[d] = function(a){var e = this[0]; if (!e)return a == null?null:this; if (f.isFunction(a))return this.each(function(b){var c = f(this); c[d](a.call(this, b, c[d]()))}); if (f.isWindow(e)){var g = e.document.documentElement["client" + c], h = e.document.body; return e.document.compatMode === "CSS1Compat" && g || h && h["client" + c] || g}if (e.nodeType === 9)return Math.max(e.documentElement["client" + c], e.body["scroll" + c], e.documentElement["scroll" + c], e.body["offset" + c], e.documentElement["offset" + c]); if (a === b){var i = f.css(e, d), j = parseFloat(i); return f.isNaN(j)?i:j}return this.css(d, typeof a == "string"?a:a + "px")}}), a.jQuery = a.$ = f})(window); + + + diff --git a/experiment/simulation/js/jsplumb1.js b/experiment/simulation/js/jsplumb1.js new file mode 100644 index 0000000..0e62651 --- /dev/null +++ b/experiment/simulation/js/jsplumb1.js @@ -0,0 +1,15293 @@ +/** + * jsBezier + * + * Copyright (c) 2010 - 2017 jsPlumb (hello@jsplumbtoolkit.com) + * + * licensed under the MIT license. + * + * a set of Bezier curve functions that deal with Beziers, used by jsPlumb, and perhaps useful for other people. These functions work with Bezier + * curves of arbitrary degree. + * + * - functions are all in the 'jsBezier' namespace. + * + * - all input points should be in the format {x:.., y:..}. all output points are in this format too. + * + * - all input curves should be in the format [ {x:.., y:..}, {x:.., y:..}, {x:.., y:..}, {x:.., y:..} ] + * + * - 'location' as used as an input here refers to a decimal in the range 0-1 inclusive, which indicates a point some proportion along the length + * of the curve. location as output has the same format and meaning. + * + * + * Function List: + * -------------- + * + * distanceFromCurve(point, curve) + * + * Calculates the distance that the given point lies from the given Bezier. Note that it is computed relative to the center of the Bezier, + * so if you have stroked the curve with a wide pen you may wish to take that into account! The distance returned is relative to the values + * of the curve and the point - it will most likely be pixels. + * + * gradientAtPoint(curve, location) + * + * Calculates the gradient to the curve at the given location, as a decimal between 0 and 1 inclusive. + * + * gradientAtPointAlongCurveFrom (curve, location) + * + * Calculates the gradient at the point on the given curve that is 'distance' units from location. + * + * nearestPointOnCurve(point, curve) + * + * Calculates the nearest point to the given point on the given curve. The return value of this is a JS object literal, containing both the + *point's coordinates and also the 'location' of the point (see above), for example: { point:{x:551,y:150}, location:0.263365 }. + * + * pointOnCurve(curve, location) + * + * Calculates the coordinates of the point on the given Bezier curve at the given location. + * + * pointAlongCurveFrom(curve, location, distance) + * + * Calculates the coordinates of the point on the given curve that is 'distance' units from location. 'distance' should be in the same coordinate + * space as that used to construct the Bezier curve. For an HTML Canvas usage, for example, distance would be a measure of pixels. + * + * locationAlongCurveFrom(curve, location, distance) + * + * Calculates the location on the given curve that is 'distance' units from location. 'distance' should be in the same coordinate + * space as that used to construct the Bezier curve. For an HTML Canvas usage, for example, distance would be a measure of pixels. + * + * perpendicularToCurveAt(curve, location, length, distance) + * + * Calculates the perpendicular to the given curve at the given location. length is the length of the line you wish for (it will be centered + * on the point at 'location'). distance is optional, and allows you to specify a point along the path from the given location as the center of + * the perpendicular returned. The return value of this is an array of two points: [ {x:...,y:...}, {x:...,y:...} ]. + * + * + */ + +(function() { + + var root = this; + + if(typeof Math.sgn == "undefined") { + Math.sgn = function(x) { return x == 0 ? 0 : x > 0 ? 1 :-1; }; + } + + var Vectors = { + subtract : function(v1, v2) { return {x:v1.x - v2.x, y:v1.y - v2.y }; }, + dotProduct : function(v1, v2) { return (v1.x * v2.x) + (v1.y * v2.y); }, + square : function(v) { return Math.sqrt((v.x * v.x) + (v.y * v.y)); }, + scale : function(v, s) { return {x:v.x * s, y:v.y * s }; } + }, + + maxRecursion = 64, + flatnessTolerance = Math.pow(2.0,-maxRecursion-1); + + /** + * Calculates the distance that the point lies from the curve. + * + * @param point a point in the form {x:567, y:3342} + * @param curve a Bezier curve in the form [{x:..., y:...}, {x:..., y:...}, {x:..., y:...}, {x:..., y:...}]. note that this is currently + * hardcoded to assume cubiz beziers, but would be better off supporting any degree. + * @return a JS object literal containing location and distance, for example: {location:0.35, distance:10}. Location is analogous to the location + * argument you pass to the pointOnPath function: it is a ratio of distance travelled along the curve. Distance is the distance in pixels from + * the point to the curve. + */ + var _distanceFromCurve = function(point, curve) { + var candidates = [], + w = _convertToBezier(point, curve), + degree = curve.length - 1, higherDegree = (2 * degree) - 1, + numSolutions = _findRoots(w, higherDegree, candidates, 0), + v = Vectors.subtract(point, curve[0]), dist = Vectors.square(v), t = 0.0; + + for (var i = 0; i < numSolutions; i++) { + v = Vectors.subtract(point, _bezier(curve, degree, candidates[i], null, null)); + var newDist = Vectors.square(v); + if (newDist < dist) { + dist = newDist; + t = candidates[i]; + } + } + v = Vectors.subtract(point, curve[degree]); + newDist = Vectors.square(v); + if (newDist < dist) { + dist = newDist; + t = 1.0; + } + return {location:t, distance:dist}; + }; + /** + * finds the nearest point on the curve to the given point. + */ + var _nearestPointOnCurve = function(point, curve) { + var td = _distanceFromCurve(point, curve); + return {point:_bezier(curve, curve.length - 1, td.location, null, null), location:td.location}; + }; + var _convertToBezier = function(point, curve) { + var degree = curve.length - 1, higherDegree = (2 * degree) - 1, + c = [], d = [], cdTable = [], w = [], + z = [ [1.0, 0.6, 0.3, 0.1], [0.4, 0.6, 0.6, 0.4], [0.1, 0.3, 0.6, 1.0] ]; + + for (var i = 0; i <= degree; i++) c[i] = Vectors.subtract(curve[i], point); + for (var i = 0; i <= degree - 1; i++) { + d[i] = Vectors.subtract(curve[i+1], curve[i]); + d[i] = Vectors.scale(d[i], 3.0); + } + for (var row = 0; row <= degree - 1; row++) { + for (var column = 0; column <= degree; column++) { + if (!cdTable[row]) cdTable[row] = []; + cdTable[row][column] = Vectors.dotProduct(d[row], c[column]); + } + } + for (i = 0; i <= higherDegree; i++) { + if (!w[i]) w[i] = []; + w[i].y = 0.0; + w[i].x = parseFloat(i) / higherDegree; + } + var n = degree, m = degree-1; + for (var k = 0; k <= n + m; k++) { + var lb = Math.max(0, k - m), + ub = Math.min(k, n); + for (i = lb; i <= ub; i++) { + var j = k - i; + w[i+j].y += cdTable[j][i] * z[j][i]; + } + } + return w; + }; + /** + * counts how many roots there are. + */ + var _findRoots = function(w, degree, t, depth) { + var left = [], right = [], + left_count, right_count, + left_t = [], right_t = []; + + switch (_getCrossingCount(w, degree)) { + case 0 : { + return 0; + } + case 1 : { + if (depth >= maxRecursion) { + t[0] = (w[0].x + w[degree].x) / 2.0; + return 1; + } + if (_isFlatEnough(w, degree)) { + t[0] = _computeXIntercept(w, degree); + return 1; + } + break; + } + } + _bezier(w, degree, 0.5, left, right); + left_count = _findRoots(left, degree, left_t, depth+1); + right_count = _findRoots(right, degree, right_t, depth+1); + for (var i = 0; i < left_count; i++) t[i] = left_t[i]; + for (var i = 0; i < right_count; i++) t[i+left_count] = right_t[i]; + return (left_count+right_count); + }; + var _getCrossingCount = function(curve, degree) { + var n_crossings = 0, sign, old_sign; + sign = old_sign = Math.sgn(curve[0].y); + for (var i = 1; i <= degree; i++) { + sign = Math.sgn(curve[i].y); + if (sign != old_sign) n_crossings++; + old_sign = sign; + } + return n_crossings; + }; + var _isFlatEnough = function(curve, degree) { + var error, + intercept_1, intercept_2, left_intercept, right_intercept, + a, b, c, det, dInv, a1, b1, c1, a2, b2, c2; + a = curve[0].y - curve[degree].y; + b = curve[degree].x - curve[0].x; + c = curve[0].x * curve[degree].y - curve[degree].x * curve[0].y; + + var max_distance_above, max_distance_below; + max_distance_above = max_distance_below = 0.0; + + for (var i = 1; i < degree; i++) { + var value = a * curve[i].x + b * curve[i].y + c; + if (value > max_distance_above) + max_distance_above = value; + else if (value < max_distance_below) + max_distance_below = value; + } + + a1 = 0.0; b1 = 1.0; c1 = 0.0; a2 = a; b2 = b; + c2 = c - max_distance_above; + det = a1 * b2 - a2 * b1; + dInv = 1.0/det; + intercept_1 = (b1 * c2 - b2 * c1) * dInv; + a2 = a; b2 = b; c2 = c - max_distance_below; + det = a1 * b2 - a2 * b1; + dInv = 1.0/det; + intercept_2 = (b1 * c2 - b2 * c1) * dInv; + left_intercept = Math.min(intercept_1, intercept_2); + right_intercept = Math.max(intercept_1, intercept_2); + error = right_intercept - left_intercept; + return (error < flatnessTolerance)? 1 : 0; + }; + var _computeXIntercept = function(curve, degree) { + var XLK = 1.0, YLK = 0.0, + XNM = curve[degree].x - curve[0].x, YNM = curve[degree].y - curve[0].y, + XMK = curve[0].x - 0.0, YMK = curve[0].y - 0.0, + det = XNM*YLK - YNM*XLK, detInv = 1.0/det, + S = (XNM*YMK - YNM*XMK) * detInv; + return 0.0 + XLK * S; + }; + var _bezier = function(curve, degree, t, left, right) { + var temp = [[]]; + for (var j =0; j <= degree; j++) temp[0][j] = curve[j]; + for (var i = 1; i <= degree; i++) { + for (var j =0 ; j <= degree - i; j++) { + if (!temp[i]) temp[i] = []; + if (!temp[i][j]) temp[i][j] = {}; + temp[i][j].x = (1.0 - t) * temp[i-1][j].x + t * temp[i-1][j+1].x; + temp[i][j].y = (1.0 - t) * temp[i-1][j].y + t * temp[i-1][j+1].y; + } + } + if (left != null) + for (j = 0; j <= degree; j++) left[j] = temp[j][0]; + if (right != null) + for (j = 0; j <= degree; j++) right[j] = temp[degree-j][j]; + + return (temp[degree][0]); + }; + + var _curveFunctionCache = {}; + var _getCurveFunctions = function(order) { + var fns = _curveFunctionCache[order]; + if (!fns) { + fns = []; + var f_term = function() { return function(t) { return Math.pow(t, order); }; }, + l_term = function() { return function(t) { return Math.pow((1-t), order); }; }, + c_term = function(c) { return function(t) { return c; }; }, + t_term = function() { return function(t) { return t; }; }, + one_minus_t_term = function() { return function(t) { return 1-t; }; }, + _termFunc = function(terms) { + return function(t) { + var p = 1; + for (var i = 0; i < terms.length; i++) p = p * terms[i](t); + return p; + }; + }; + + fns.push(new f_term()); // first is t to the power of the curve order + for (var i = 1; i < order; i++) { + var terms = [new c_term(order)]; + for (var j = 0 ; j < (order - i); j++) terms.push(new t_term()); + for (var j = 0 ; j < i; j++) terms.push(new one_minus_t_term()); + fns.push(new _termFunc(terms)); + } + fns.push(new l_term()); // last is (1-t) to the power of the curve order + + _curveFunctionCache[order] = fns; + } + + return fns; + }; + + + /** + * calculates a point on the curve, for a Bezier of arbitrary order. + * @param curve an array of control points, eg [{x:10,y:20}, {x:50,y:50}, {x:100,y:100}, {x:120,y:100}]. For a cubic bezier this should have four points. + * @param location a decimal indicating the distance along the curve the point should be located at. this is the distance along the curve as it travels, taking the way it bends into account. should be a number from 0 to 1, inclusive. + */ + var _pointOnPath = function(curve, location) { + var cc = _getCurveFunctions(curve.length - 1), + _x = 0, _y = 0; + for (var i = 0; i < curve.length ; i++) { + _x = _x + (curve[i].x * cc[i](location)); + _y = _y + (curve[i].y * cc[i](location)); + } + + return {x:_x, y:_y}; + }; + + var _dist = function(p1,p2) { + return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); + }; + + var _isPoint = function(curve) { + return curve[0].x === curve[1].x && curve[0].y === curve[1].y; + }; + + /** + * finds the point that is 'distance' along the path from 'location'. this method returns both the x,y location of the point and also + * its 'location' (proportion of travel along the path); the method below - _pointAlongPathFrom - calls this method and just returns the + * point. + */ + var _pointAlongPath = function(curve, location, distance) { + + if (_isPoint(curve)) { + return { + point:curve[0], + location:location + }; + } + + var prev = _pointOnPath(curve, location), + tally = 0, + curLoc = location, + direction = distance > 0 ? 1 : -1, + cur = null; + + while (tally < Math.abs(distance)) { + curLoc += (0.005 * direction); + cur = _pointOnPath(curve, curLoc); + tally += _dist(cur, prev); + prev = cur; + } + return {point:cur, location:curLoc}; + }; + + var _length = function(curve) { + if (_isPoint(curve)) return 0; + + var prev = _pointOnPath(curve, 0), + tally = 0, + curLoc = 0, + direction = 1, + cur = null; + + while (curLoc < 1) { + curLoc += (0.005 * direction); + cur = _pointOnPath(curve, curLoc); + tally += _dist(cur, prev); + prev = cur; + } + return tally; + }; + + /** + * finds the point that is 'distance' along the path from 'location'. + */ + var _pointAlongPathFrom = function(curve, location, distance) { + return _pointAlongPath(curve, location, distance).point; + }; + + /** + * finds the location that is 'distance' along the path from 'location'. + */ + var _locationAlongPathFrom = function(curve, location, distance) { + return _pointAlongPath(curve, location, distance).location; + }; + + /** + * returns the gradient of the curve at the given location, which is a decimal between 0 and 1 inclusive. + * + * thanks // http://bimixual.org/AnimationLibrary/beziertangents.html + */ + var _gradientAtPoint = function(curve, location) { + var p1 = _pointOnPath(curve, location), + p2 = _pointOnPath(curve.slice(0, curve.length - 1), location), + dy = p2.y - p1.y, dx = p2.x - p1.x; + return dy === 0 ? Infinity : Math.atan(dy / dx); + }; + + /** + returns the gradient of the curve at the point which is 'distance' from the given location. + if this point is greater than location 1, the gradient at location 1 is returned. + if this point is less than location 0, the gradient at location 0 is returned. + */ + var _gradientAtPointAlongPathFrom = function(curve, location, distance) { + var p = _pointAlongPath(curve, location, distance); + if (p.location > 1) p.location = 1; + if (p.location < 0) p.location = 0; + return _gradientAtPoint(curve, p.location); + }; + + /** + * calculates a line that is 'length' pixels long, perpendicular to, and centered on, the path at 'distance' pixels from the given location. + * if distance is not supplied, the perpendicular for the given location is computed (ie. we set distance to zero). + */ + var _perpendicularToPathAt = function(curve, location, length, distance) { + distance = distance == null ? 0 : distance; + var p = _pointAlongPath(curve, location, distance), + m = _gradientAtPoint(curve, p.location), + _theta2 = Math.atan(-1 / m), + y = length / 2 * Math.sin(_theta2), + x = length / 2 * Math.cos(_theta2); + return [{x:p.point.x + x, y:p.point.y + y}, {x:p.point.x - x, y:p.point.y - y}]; + }; + + /** + * Calculates all intersections of the given line with the given curve. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @param curve + * @returns {Array} + */ + var _lineIntersection = function(x1, y1, x2, y2, curve) { + var a = y2 - y1, + b = x1 - x2, + c = (x1 * (y1 - y2)) + (y1 * (x2-x1)), + coeffs = _computeCoefficients(curve), + p = [ + (a*coeffs[0][0]) + (b * coeffs[1][0]), + (a*coeffs[0][1])+(b*coeffs[1][1]), + (a*coeffs[0][2])+(b*coeffs[1][2]), + (a*coeffs[0][3])+(b*coeffs[1][3]) + c + ], + r = _cubicRoots.apply(null, p), + intersections = []; + + if (r != null) { + + for (var i = 0; i < 3; i++) { + var t = r[i], + t2 = Math.pow(t, 2), + t3 = Math.pow(t, 3), + x = [ + (coeffs[0][0] * t3) + (coeffs[0][1] * t2) + (coeffs[0][2] * t) + coeffs[0][3], + (coeffs[1][0] * t3) + (coeffs[1][1] * t2) + (coeffs[1][2] * t) + coeffs[1][3] + ]; + + // check bounds of the line + var s; + if ((x2 - x1) !== 0) { + s = (x[0] - x1) / (x2 - x1); + } + else { + s = (x[1] - y1) / (y2 - y1); + } + + if (t >= 0 && t <= 1.0 && s >= 0 && s <= 1.0) { + intersections.push(x); + } + } + } + + return intersections; + }; + + /** + * Calculates all intersections of the given box with the given curve. + * @param x X position of top left corner of box + * @param y Y position of top left corner of box + * @param w width of box + * @param h height of box + * @param curve + * @returns {Array} + */ + var _boxIntersection = function(x, y, w, h, curve) { + var i = []; + i.push.apply(i, _lineIntersection(x, y, x + w, y, curve)); + i.push.apply(i, _lineIntersection(x + w, y, x + w, y + h, curve)); + i.push.apply(i, _lineIntersection(x + w, y + h, x, y + h, curve)); + i.push.apply(i, _lineIntersection(x, y + h, x, y, curve)); + return i; + }; + + /** + * Calculates all intersections of the given bounding box with the given curve. + * @param boundingBox Bounding box, in { x:.., y:..., w:..., h:... } format. + * @param curve + * @returns {Array} + */ + var _boundingBoxIntersection = function(boundingBox, curve) { + var i = []; + i.push.apply(i, _lineIntersection(boundingBox.x, boundingBox.y, boundingBox.x + boundingBox.w, boundingBox.y, curve)); + i.push.apply(i, _lineIntersection(boundingBox.x + boundingBox.w, boundingBox.y, boundingBox.x + boundingBox.w, boundingBox.y + boundingBox.h, curve)); + i.push.apply(i, _lineIntersection(boundingBox.x + boundingBox.w, boundingBox.y + boundingBox.h, boundingBox.x, boundingBox.y + boundingBox.h, curve)); + i.push.apply(i, _lineIntersection(boundingBox.x, boundingBox.y + boundingBox.h, boundingBox.x, boundingBox.y, curve)); + return i; + }; + + + function _computeCoefficientsForAxis(curve, axis) { + return [ + -(curve[0][axis]) + (3*curve[1][axis]) + (-3 * curve[2][axis]) + curve[3][axis], + (3*(curve[0][axis])) - (6*(curve[1][axis])) + (3*(curve[2][axis])), + -3*curve[0][axis] + 3*curve[1][axis], + curve[0][axis] + ]; + } + + function _computeCoefficients(curve) + { + return [ + _computeCoefficientsForAxis(curve, "x"), + _computeCoefficientsForAxis(curve, "y") + ]; + } + + function sgn(x) { + return x < 0 ? -1 : x > 0 ? 1 : 0; + } + + function _cubicRoots(a, b, c, d) { + var A = b / a, + B = c / a, + C = d / a, + Q = (3*B - Math.pow(A, 2))/9, + R = (9*A*B - 27*C - 2*Math.pow(A, 3))/54, + D = Math.pow(Q, 3) + Math.pow(R, 2), + S, + T, + t = []; + + if (D >= 0) // complex or duplicate roots + { + S = sgn(R + Math.sqrt(D))*Math.pow(Math.abs(R + Math.sqrt(D)),(1/3)); + T = sgn(R - Math.sqrt(D))*Math.pow(Math.abs(R - Math.sqrt(D)),(1/3)); + + t[0] = -A/3 + (S + T); + t[1] = -A/3 - (S + T)/2; + t[2] = -A/3 - (S + T)/2; + + /*discard complex roots*/ + if (Math.abs(Math.sqrt(3)*(S - T)/2) !== 0) { + t[1] = -1; + t[2] = -1; + } + } + else // distinct real roots + { + var th = Math.acos(R/Math.sqrt(-Math.pow(Q, 3))); + t[0] = 2*Math.sqrt(-Q)*Math.cos(th/3) - A/3; + t[1] = 2*Math.sqrt(-Q)*Math.cos((th + 2*Math.PI)/3) - A/3; + t[2] = 2*Math.sqrt(-Q)*Math.cos((th + 4*Math.PI)/3) - A/3; + } + + // discard out of spec roots + for (var i = 0; i < 3; i++) { + if (t[i] < 0 || t[i] > 1.0) { + t[i] = -1; + } + } + + return t; + } + + var jsBezier = this.jsBezier = { + distanceFromCurve : _distanceFromCurve, + gradientAtPoint : _gradientAtPoint, + gradientAtPointAlongCurveFrom : _gradientAtPointAlongPathFrom, + nearestPointOnCurve : _nearestPointOnCurve, + pointOnCurve : _pointOnPath, + pointAlongCurveFrom : _pointAlongPathFrom, + perpendicularToCurveAt : _perpendicularToPathAt, + locationAlongCurveFrom:_locationAlongPathFrom, + getLength:_length, + lineIntersection:_lineIntersection, + boxIntersection:_boxIntersection, + boundingBoxIntersection:_boundingBoxIntersection, + version:"0.9.0" + }; + + if (typeof exports !== "undefined") { + exports.jsBezier = jsBezier; + } + +}).call(typeof window !== 'undefined' ? window : this); + +/** + * Biltong v0.4.0 + * + * Various geometry functions written as part of jsPlumb and perhaps useful for others. + * + * Copyright (c) 2017 jsPlumb + * https://jsplumbtoolkit.com + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +;(function() { + + "use strict"; + var root = this; + + var Biltong = root.Biltong = { + version:"0.4.0" + }; + + if (typeof exports !== "undefined") { + exports.Biltong = Biltong; + } + + var _isa = function(a) { return Object.prototype.toString.call(a) === "[object Array]"; }, + _pointHelper = function(p1, p2, fn) { + p1 = _isa(p1) ? p1 : [p1.x, p1.y]; + p2 = _isa(p2) ? p2 : [p2.x, p2.y]; + return fn(p1, p2); + }, + /** + * @name Biltong.gradient + * @function + * @desc Calculates the gradient of a line between the two points. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Float} The gradient of a line between the two points. + */ + _gradient = Biltong.gradient = function(p1, p2) { + return _pointHelper(p1, p2, function(_p1, _p2) { + if (_p2[0] == _p1[0]) + return _p2[1] > _p1[1] ? Infinity : -Infinity; + else if (_p2[1] == _p1[1]) + return _p2[0] > _p1[0] ? 0 : -0; + else + return (_p2[1] - _p1[1]) / (_p2[0] - _p1[0]); + }); + }, + /** + * @name Biltong.normal + * @function + * @desc Calculates the gradient of a normal to a line between the two points. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Float} The gradient of a normal to a line between the two points. + */ + _normal = Biltong.normal = function(p1, p2) { + return -1 / _gradient(p1, p2); + }, + /** + * @name Biltong.lineLength + * @function + * @desc Calculates the length of a line between the two points. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Float} The length of a line between the two points. + */ + _lineLength = Biltong.lineLength = function(p1, p2) { + return _pointHelper(p1, p2, function(_p1, _p2) { + return Math.sqrt(Math.pow(_p2[1] - _p1[1], 2) + Math.pow(_p2[0] - _p1[0], 2)); + }); + }, + /** + * @name Biltong.quadrant + * @function + * @desc Calculates the quadrant in which the angle between the two points lies. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Integer} The quadrant - 1 for upper right, 2 for lower right, 3 for lower left, 4 for upper left. + */ + _quadrant = Biltong.quadrant = function(p1, p2) { + return _pointHelper(p1, p2, function(_p1, _p2) { + if (_p2[0] > _p1[0]) { + return (_p2[1] > _p1[1]) ? 2 : 1; + } + else if (_p2[0] == _p1[0]) { + return _p2[1] > _p1[1] ? 2 : 1; + } + else { + return (_p2[1] > _p1[1]) ? 3 : 4; + } + }); + }, + /** + * @name Biltong.theta + * @function + * @desc Calculates the angle between the two points. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Float} The angle between the two points. + */ + _theta = Biltong.theta = function(p1, p2) { + return _pointHelper(p1, p2, function(_p1, _p2) { + var m = _gradient(_p1, _p2), + t = Math.atan(m), + s = _quadrant(_p1, _p2); + if ((s == 4 || s== 3)) t += Math.PI; + if (t < 0) t += (2 * Math.PI); + + return t; + }); + }, + /** + * @name Biltong.intersects + * @function + * @desc Calculates whether or not the two rectangles intersect. + * @param {Rectangle} r1 First rectangle, as a js object in the form `{x:.., y:.., w:.., h:..}` + * @param {Rectangle} r2 Second rectangle, as a js object in the form `{x:.., y:.., w:.., h:..}` + * @return {Boolean} True if the rectangles intersect, false otherwise. + */ + _intersects = Biltong.intersects = function(r1, r2) { + var x1 = r1.x, x2 = r1.x + r1.w, y1 = r1.y, y2 = r1.y + r1.h, + a1 = r2.x, a2 = r2.x + r2.w, b1 = r2.y, b2 = r2.y + r2.h; + + return ( (x1 <= a1 && a1 <= x2) && (y1 <= b1 && b1 <= y2) ) || + ( (x1 <= a2 && a2 <= x2) && (y1 <= b1 && b1 <= y2) ) || + ( (x1 <= a1 && a1 <= x2) && (y1 <= b2 && b2 <= y2) ) || + ( (x1 <= a2 && a1 <= x2) && (y1 <= b2 && b2 <= y2) ) || + ( (a1 <= x1 && x1 <= a2) && (b1 <= y1 && y1 <= b2) ) || + ( (a1 <= x2 && x2 <= a2) && (b1 <= y1 && y1 <= b2) ) || + ( (a1 <= x1 && x1 <= a2) && (b1 <= y2 && y2 <= b2) ) || + ( (a1 <= x2 && x1 <= a2) && (b1 <= y2 && y2 <= b2) ); + }, + /** + * @name Biltong.encloses + * @function + * @desc Calculates whether or not r2 is completely enclosed by r1. + * @param {Rectangle} r1 First rectangle, as a js object in the form `{x:.., y:.., w:.., h:..}` + * @param {Rectangle} r2 Second rectangle, as a js object in the form `{x:.., y:.., w:.., h:..}` + * @param {Boolean} [allowSharedEdges=false] If true, the concept of enclosure allows for one or more edges to be shared by the two rectangles. + * @return {Boolean} True if r1 encloses r2, false otherwise. + */ + _encloses = Biltong.encloses = function(r1, r2, allowSharedEdges) { + var x1 = r1.x, x2 = r1.x + r1.w, y1 = r1.y, y2 = r1.y + r1.h, + a1 = r2.x, a2 = r2.x + r2.w, b1 = r2.y, b2 = r2.y + r2.h, + c = function(v1, v2, v3, v4) { return allowSharedEdges ? v1 <= v2 && v3>= v4 : v1 < v2 && v3 > v4; }; + + return c(x1,a1,x2,a2) && c(y1,b1,y2,b2); + }, + _segmentMultipliers = [null, [1, -1], [1, 1], [-1, 1], [-1, -1] ], + _inverseSegmentMultipliers = [null, [-1, -1], [-1, 1], [1, 1], [1, -1] ], + /** + * @name Biltong.pointOnLine + * @function + * @desc Calculates a point on the line from `fromPoint` to `toPoint` that is `distance` units along the length of the line. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Point} Point on the line, in the form `{ x:..., y:... }`. + */ + _pointOnLine = Biltong.pointOnLine = function(fromPoint, toPoint, distance) { + var m = _gradient(fromPoint, toPoint), + s = _quadrant(fromPoint, toPoint), + segmentMultiplier = distance > 0 ? _segmentMultipliers[s] : _inverseSegmentMultipliers[s], + theta = Math.atan(m), + y = Math.abs(distance * Math.sin(theta)) * segmentMultiplier[1], + x = Math.abs(distance * Math.cos(theta)) * segmentMultiplier[0]; + return { x:fromPoint.x + x, y:fromPoint.y + y }; + }, + /** + * @name Biltong.perpendicularLineTo + * @function + * @desc Calculates a line of length `length` that is perpendicular to the line from `fromPoint` to `toPoint` and passes through `toPoint`. + * @param {Point} p1 First point, either as a 2 entry array or object with `left` and `top` properties. + * @param {Point} p2 Second point, either as a 2 entry array or object with `left` and `top` properties. + * @return {Line} Perpendicular line, in the form `[ { x:..., y:... }, { x:..., y:... } ]`. + */ + _perpendicularLineTo = Biltong.perpendicularLineTo = function(fromPoint, toPoint, length) { + var m = _gradient(fromPoint, toPoint), + theta2 = Math.atan(-1 / m), + y = length / 2 * Math.sin(theta2), + x = length / 2 * Math.cos(theta2); + return [{x:toPoint.x + x, y:toPoint.y + y}, {x:toPoint.x - x, y:toPoint.y - y}]; + }; +}).call(typeof window !== 'undefined' ? window : this); +; +(function () { + + "use strict"; + + /** + * Creates a Touch object. + * @param view + * @param target + * @param pageX + * @param pageY + * @param screenX + * @param screenY + * @param clientX + * @param clientY + * @returns {Touch} + * @private + */ + function _touch(view, target, pageX, pageY, screenX, screenY, clientX, clientY) { + + return new Touch({ + target:target, + identifier:_uuid(), + pageX: pageX, + pageY: pageY, + screenX: screenX, + screenY: screenY, + clientX: clientX || screenX, + clientY: clientY || screenY + }); + } + + /** + * Create a synthetic touch list from the given list of Touch objects. + * @returns {Array} + * @private + */ + function _touchList() { + var list = []; + Array.prototype.push.apply(list, arguments); + list.item = function(index) { return this[index]; }; + return list; + } + + /** + * Create a Touch object and then insert it into a synthetic touch list, returning the list.s + * @param view + * @param target + * @param pageX + * @param pageY + * @param screenX + * @param screenY + * @param clientX + * @param clientY + * @returns {Array} + * @private + */ + function _touchAndList(view, target, pageX, pageY, screenX, screenY, clientX, clientY) { + return _touchList(_touch.apply(null, arguments)); + } + + var root = this, + matchesSelector = function (el, selector, ctx) { + ctx = ctx || el.parentNode; + var possibles = ctx.querySelectorAll(selector); + for (var i = 0; i < possibles.length; i++) { + if (possibles[i] === el) { + return true; + } + } + return false; + }, + _gel = function (el) { + return (typeof el == "string" || el.constructor === String) ? document.getElementById(el) : el; + }, + _t = function (e) { + return e.srcElement || e.target; + }, + // + // gets path info for the given event - the path from target to obj, in the event's bubble chain. if doCompute + // is false we just return target for the path. + // + _pi = function(e, target, obj, doCompute) { + if (!doCompute) return { path:[target], end:1 }; + else if (typeof e.path !== "undefined" && e.path.indexOf) { + return { path: e.path, end: e.path.indexOf(obj) }; + } else { + var out = { path:[], end:-1 }, _one = function(el) { + out.path.push(el); + if (el === obj) { + out.end = out.path.length - 1; + } + else if (el.parentNode != null) { + _one(el.parentNode) + } + }; + _one(target); + return out; + } + }, + _d = function (l, fn) { + for (var i = 0, j = l.length; i < j; i++) { + if (l[i] == fn) break; + } + if (i < l.length) l.splice(i, 1); + }, + guid = 1, + // + // this function generates a guid for every handler, sets it on the handler, then adds + // it to the associated object's map of handlers for the given event. this is what enables us + // to unbind all events of some type, or all events (the second of which can be requested by the user, + // but it also used by Mottle when an element is removed.) + _store = function (obj, event, fn) { + var g = guid++; + obj.__ta = obj.__ta || {}; + obj.__ta[event] = obj.__ta[event] || {}; + // store each handler with a unique guid. + obj.__ta[event][g] = fn; + // set the guid on the handler. + fn.__tauid = g; + return g; + }, + _unstore = function (obj, event, fn) { + obj.__ta && obj.__ta[event] && delete obj.__ta[event][fn.__tauid]; + // a handler might have attached extra functions, so we unbind those too. + if (fn.__taExtra) { + for (var i = 0; i < fn.__taExtra.length; i++) { + _unbind(obj, fn.__taExtra[i][0], fn.__taExtra[i][1]); + } + fn.__taExtra.length = 0; + } + // a handler might have attached an unstore callback + fn.__taUnstore && fn.__taUnstore(); + }, + _curryChildFilter = function (children, obj, fn, evt) { + if (children == null) return fn; + else { + var c = children.split(","), + _fn = function (e) { + _fn.__tauid = fn.__tauid; + var t = _t(e), target = t; // t is the target element on which the event occurred. it is the + // element we will wish to pass to any callbacks. + var pathInfo = _pi(e, t, obj, children != null) + if (pathInfo.end != -1) { + for (var p = 0; p < pathInfo.end; p++) { + target = pathInfo.path[p]; + for (var i = 0; i < c.length; i++) { + if (matchesSelector(target, c[i], obj)) { + fn.apply(target, arguments); + } + } + } + } + }; + registerExtraFunction(fn, evt, _fn); + return _fn; + } + }, + // + // registers an 'extra' function on some event listener function we were given - a function that we + // created and bound to the element as part of our housekeeping, and which we want to unbind and remove + // whenever the given function is unbound. + registerExtraFunction = function (fn, evt, newFn) { + fn.__taExtra = fn.__taExtra || []; + fn.__taExtra.push([evt, newFn]); + }, + DefaultHandler = function (obj, evt, fn, children) { + if (isTouchDevice && touchMap[evt]) { + var tfn = _curryChildFilter(children, obj, fn, touchMap[evt]); + _bind(obj, touchMap[evt], tfn , fn); + } + if (evt === "focus" && obj.getAttribute("tabindex") == null) { + obj.setAttribute("tabindex", "1"); + } + _bind(obj, evt, _curryChildFilter(children, obj, fn, evt), fn); + }, + SmartClickHandler = function (obj, evt, fn, children) { + if (obj.__taSmartClicks == null) { + var down = function (e) { + obj.__tad = _pageLocation(e); + }, + up = function (e) { + obj.__tau = _pageLocation(e); + }, + click = function (e) { + if (obj.__tad && obj.__tau && obj.__tad[0] === obj.__tau[0] && obj.__tad[1] === obj.__tau[1]) { + for (var i = 0; i < obj.__taSmartClicks.length; i++) + obj.__taSmartClicks[i].apply(_t(e), [ e ]); + } + }; + DefaultHandler(obj, "mousedown", down, children); + DefaultHandler(obj, "mouseup", up, children); + DefaultHandler(obj, "click", click, children); + obj.__taSmartClicks = []; + } + + // store in the list of callbacks + obj.__taSmartClicks.push(fn); + // the unstore function removes this function from the object's listener list for this type. + fn.__taUnstore = function () { + _d(obj.__taSmartClicks, fn); + }; + }, + _tapProfiles = { + "tap": {touches: 1, taps: 1}, + "dbltap": {touches: 1, taps: 2}, + "contextmenu": {touches: 2, taps: 1} + }, + TapHandler = function (clickThreshold, dblClickThreshold) { + return function (obj, evt, fn, children) { + // if event is contextmenu, for devices which are mouse only, we want to + // use the default bind. + if (evt == "contextmenu" && isMouseDevice) + DefaultHandler(obj, evt, fn, children); + else { + // the issue here is that this down handler gets registered only for the + // child nodes in the first registration. in fact it should be registered with + // no child selector and then on down we should cycle through the registered + // functions to see if one of them matches. on mouseup we should execute ALL of + // the functions whose children are either null or match the element. + if (obj.__taTapHandler == null) { + var tt = obj.__taTapHandler = { + tap: [], + dbltap: [], + contextmenu: [], + down: false, + taps: 0, + downSelectors: [] + }; + var down = function (e) { + var target = _t(e), pathInfo = _pi(e, target, obj, children != null), finished = false; + for (var p = 0; p < pathInfo.end; p++) { + if (finished) return; + target = pathInfo.path[p]; + for (var i = 0; i < tt.downSelectors.length; i++) { + if (tt.downSelectors[i] == null || matchesSelector(target, tt.downSelectors[i], obj)) { + tt.down = true; + setTimeout(clearSingle, clickThreshold); + setTimeout(clearDouble, dblClickThreshold); + finished = true; + break; // we only need one match on mousedown + } + } + } + }, + up = function (e) { + if (tt.down) { + var target = _t(e), currentTarget, pathInfo; + tt.taps++; + var tc = _touchCount(e); + for (var eventId in _tapProfiles) { + if (_tapProfiles.hasOwnProperty(eventId)) { + var p = _tapProfiles[eventId]; + if (p.touches === tc && (p.taps === 1 || p.taps === tt.taps)) { + for (var i = 0; i < tt[eventId].length; i++) { + pathInfo = _pi(e, target, obj, tt[eventId][i][1] != null); + for (var pLoop = 0; pLoop < pathInfo.end; pLoop++) { + currentTarget = pathInfo.path[pLoop]; + // this is a single event registration handler. + if (tt[eventId][i][1] == null || matchesSelector(currentTarget, tt[eventId][i][1], obj)) { + tt[eventId][i][0].apply(currentTarget, [ e ]); + break; + } + } + } + } + } + } + } + }, + clearSingle = function () { + tt.down = false; + }, + clearDouble = function () { + tt.taps = 0; + }; + + DefaultHandler(obj, "mousedown", down); + DefaultHandler(obj, "mouseup", up); + } + // add this child selector (it can be null, that's fine). + obj.__taTapHandler.downSelectors.push(children); + + obj.__taTapHandler[evt].push([fn, children]); + // the unstore function removes this function from the object's listener list for this type. + fn.__taUnstore = function () { + _d(obj.__taTapHandler[evt], fn); + }; + } + }; + }, + meeHelper = function (type, evt, obj, target) { + for (var i in obj.__tamee[type]) { + if (obj.__tamee[type].hasOwnProperty(i)) { + obj.__tamee[type][i].apply(target, [ evt ]); + } + } + }, + MouseEnterExitHandler = function () { + var activeElements = []; + return function (obj, evt, fn, children) { + if (!obj.__tamee) { + // __tamee holds a flag saying whether the mouse is currently "in" the element, and a list of + // both mouseenter and mouseexit functions. + obj.__tamee = { over: false, mouseenter: [], mouseexit: [] }; + // register over and out functions + var over = function (e) { + var t = _t(e); + if ((children == null && (t == obj && !obj.__tamee.over)) || (matchesSelector(t, children, obj) && (t.__tamee == null || !t.__tamee.over))) { + meeHelper("mouseenter", e, obj, t); + t.__tamee = t.__tamee || {}; + t.__tamee.over = true; + activeElements.push(t); + } + }, + out = function (e) { + var t = _t(e); + // is the current target one of the activeElements? and is the + // related target NOT a descendant of it? + for (var i = 0; i < activeElements.length; i++) { + if (t == activeElements[i] && !matchesSelector((e.relatedTarget || e.toElement), "*", t)) { + t.__tamee.over = false; + activeElements.splice(i, 1); + meeHelper("mouseexit", e, obj, t); + } + } + }; + + _bind(obj, "mouseover", _curryChildFilter(children, obj, over, "mouseover"), over); + _bind(obj, "mouseout", _curryChildFilter(children, obj, out, "mouseout"), out); + } + + fn.__taUnstore = function () { + delete obj.__tamee[evt][fn.__tauid]; + }; + + _store(obj, evt, fn); + obj.__tamee[evt][fn.__tauid] = fn; + }; + }, + isTouchDevice = "ontouchstart" in document.documentElement, + isMouseDevice = "onmousedown" in document.documentElement, + touchMap = { "mousedown": "touchstart", "mouseup": "touchend", "mousemove": "touchmove" }, + touchstart = "touchstart", touchend = "touchend", touchmove = "touchmove", + iev = (function () { + var rv = -1; + if (navigator.appName == 'Microsoft Internet Explorer') { + var ua = navigator.userAgent, + re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); + if (re.exec(ua) != null) + rv = parseFloat(RegExp.$1); + } + return rv; + })(), + isIELT9 = iev > -1 && iev < 9, + _genLoc = function (e, prefix) { + if (e == null) return [ 0, 0 ]; + var ts = _touches(e), t = _getTouch(ts, 0); + return [t[prefix + "X"], t[prefix + "Y"]]; + }, + _pageLocation = function (e) { + if (e == null) return [ 0, 0 ]; + if (isIELT9) { + return [ e.clientX + document.documentElement.scrollLeft, e.clientY + document.documentElement.scrollTop ]; + } + else { + return _genLoc(e, "page"); + } + }, + _screenLocation = function (e) { + return _genLoc(e, "screen"); + }, + _clientLocation = function (e) { + return _genLoc(e, "client"); + }, + _getTouch = function (touches, idx) { + return touches.item ? touches.item(idx) : touches[idx]; + }, + _touches = function (e) { + return e.touches && e.touches.length > 0 ? e.touches : + e.changedTouches && e.changedTouches.length > 0 ? e.changedTouches : + e.targetTouches && e.targetTouches.length > 0 ? e.targetTouches : + [ e ]; + }, + _touchCount = function (e) { + return _touches(e).length; + }, + //http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html + _bind = function (obj, type, fn, originalFn) { + _store(obj, type, fn); + originalFn.__tauid = fn.__tauid; + if (obj.addEventListener) + obj.addEventListener(type, fn, false); + else if (obj.attachEvent) { + var key = type + fn.__tauid; + obj["e" + key] = fn; + // TODO look at replacing with .call(..) + obj[key] = function () { + obj["e" + key] && obj["e" + key](window.event); + }; + obj.attachEvent("on" + type, obj[key]); + } + }, + _unbind = function (obj, type, fn) { + if (fn == null) return; + _each(obj, function () { + var _el = _gel(this); + _unstore(_el, type, fn); + // it has been bound if there is a tauid. otherwise it was not bound and we can ignore it. + if (fn.__tauid != null) { + if (_el.removeEventListener) { + _el.removeEventListener(type, fn, false); + if (isTouchDevice && touchMap[type]) _el.removeEventListener(touchMap[type], fn, false); + } + else if (this.detachEvent) { + var key = type + fn.__tauid; + _el[key] && _el.detachEvent("on" + type, _el[key]); + _el[key] = null; + _el["e" + key] = null; + } + } + + // if a touch event was also registered, deregister now. + if (fn.__taTouchProxy) { + _unbind(obj, fn.__taTouchProxy[1], fn.__taTouchProxy[0]); + } + }); + }, + _each = function (obj, fn) { + if (obj == null) return; + // if a list (or list-like), use it. if a string, get a list + // by running the string through querySelectorAll. else, assume + // it's an Element. + // obj.top is "unknown" in IE8. + obj = (typeof Window !== "undefined" && (typeof obj.top !== "unknown" && obj == obj.top)) ? [ obj ] : + (typeof obj !== "string") && (obj.tagName == null && obj.length != null) ? obj : + typeof obj === "string" ? document.querySelectorAll(obj) + : [ obj ]; + + for (var i = 0; i < obj.length; i++) + fn.apply(obj[i]); + }, + _uuid = function () { + return ('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + })); + }; + + /** + * Mottle offers support for abstracting out the differences + * between touch and mouse devices, plus "smart click" functionality + * (don't fire click if the mouse has moved between mousedown and mouseup), + * and synthesized click/tap events. + * @class Mottle + * @constructor + * @param {Object} params Constructor params + * @param {Number} [params.clickThreshold=250] Threshold, in milliseconds beyond which a touchstart followed by a touchend is not considered to be a click. + * @param {Number} [params.dblClickThreshold=450] Threshold, in milliseconds beyond which two successive tap events are not considered to be a click. + * @param {Boolean} [params.smartClicks=false] If true, won't fire click events if the mouse has moved between mousedown and mouseup. Note that this functionality + * requires that Mottle consume the mousedown event, and so may not be viable in all use cases. + */ + root.Mottle = function (params) { + params = params || {}; + var clickThreshold = params.clickThreshold || 250, + dblClickThreshold = params.dblClickThreshold || 450, + mouseEnterExitHandler = new MouseEnterExitHandler(), + tapHandler = new TapHandler(clickThreshold, dblClickThreshold), + _smartClicks = params.smartClicks, + _doBind = function (obj, evt, fn, children) { + if (fn == null) return; + _each(obj, function () { + var _el = _gel(this); + if (_smartClicks && evt === "click") + SmartClickHandler(_el, evt, fn, children); + else if (evt === "tap" || evt === "dbltap" || evt === "contextmenu") { + tapHandler(_el, evt, fn, children); + } + else if (evt === "mouseenter" || evt == "mouseexit") + mouseEnterExitHandler(_el, evt, fn, children); + else + DefaultHandler(_el, evt, fn, children); + }); + }; + + /** + * Removes an element from the DOM, and deregisters all event handlers for it. You should use this + * to ensure you don't leak memory. + * @method remove + * @param {String|Element} el Element, or id of the element, to remove. + * @return {Mottle} The current Mottle instance; you can chain this method. + */ + this.remove = function (el) { + _each(el, function () { + var _el = _gel(this); + if (_el.__ta) { + for (var evt in _el.__ta) { + if (_el.__ta.hasOwnProperty(evt)) { + for (var h in _el.__ta[evt]) { + if (_el.__ta[evt].hasOwnProperty(h)) + _unbind(_el, evt, _el.__ta[evt][h]); + } + } + } + } + _el.parentNode && _el.parentNode.removeChild(_el); + }); + return this; + }; + + /** + * Register an event handler, optionally as a delegate for some set of descendant elements. Note + * that this method takes either 3 or 4 arguments - if you supply 3 arguments it is assumed you have + * omitted the `children` parameter, and that the event handler should be bound directly to the given element. + * @method on + * @param {Element[]|Element|String} el Either an Element, or a CSS spec for a list of elements, or an array of Elements. + * @param {String} [children] Comma-delimited list of selectors identifying allowed children. + * @param {String} event Event ID. + * @param {Function} fn Event handler function. + * @return {Mottle} The current Mottle instance; you can chain this method. + */ + this.on = function (el, event, children, fn) { + var _el = arguments[0], + _c = arguments.length == 4 ? arguments[2] : null, + _e = arguments[1], + _f = arguments[arguments.length - 1]; + + _doBind(_el, _e, _f, _c); + return this; + }; + + /** + * Cancel delegate event handling for the given function. Note that unlike with 'on' you do not supply + * a list of child selectors here: it removes event delegation from all of the child selectors for which the + * given function was registered (if any). + * @method off + * @param {Element[]|Element|String} el Element - or ID of element - from which to remove event listener. + * @param {String} event Event ID. + * @param {Function} fn Event handler function. + * @return {Mottle} The current Mottle instance; you can chain this method. + */ + this.off = function (el, event, fn) { + _unbind(el, event, fn); + return this; + }; + + /** + * Triggers some event for a given element. + * @method trigger + * @param {Element} el Element for which to trigger the event. + * @param {String} event Event ID. + * @param {Event} originalEvent The original event. Should be optional of course, but currently is not, due + * to the jsPlumb use case that caused this method to be added. + * @param {Object} [payload] Optional object to set as `payload` on the generated event; useful for message passing. + * @return {Mottle} The current Mottle instance; you can chain this method. + */ + this.trigger = function (el, event, originalEvent, payload) { + // MouseEvent undefined in old IE; that's how we know it's a mouse event. A fine Microsoft paradox. + var originalIsMouse = isMouseDevice && (typeof MouseEvent === "undefined" || originalEvent == null || originalEvent.constructor === MouseEvent); + + var eventToBind = (isTouchDevice && !isMouseDevice && touchMap[event]) ? touchMap[event] : event, + bindingAMouseEvent = !(isTouchDevice && !isMouseDevice && touchMap[event]); + + var pl = _pageLocation(originalEvent), sl = _screenLocation(originalEvent), cl = _clientLocation(originalEvent); + _each(el, function () { + var _el = _gel(this), evt; + originalEvent = originalEvent || { + screenX: sl[0], + screenY: sl[1], + clientX: cl[0], + clientY: cl[1] + }; + + var _decorate = function (_evt) { + if (payload) _evt.payload = payload; + }; + + var eventGenerators = { + "TouchEvent": function (evt) { + + var touchList = _touchAndList(window, _el, 0, pl[0], pl[1], sl[0], sl[1], cl[0], cl[1]), + init = evt.initTouchEvent || evt.initEvent; + + init(eventToBind, true, true, window, null, sl[0], sl[1], + cl[0], cl[1], false, false, false, false, + touchList, touchList, touchList, 1, 0); + }, + "MouseEvents": function (evt) { + evt.initMouseEvent(eventToBind, true, true, window, 0, + sl[0], sl[1], + cl[0], cl[1], + false, false, false, false, 1, _el); + } + }; + + if (document.createEvent) { + + var ite = !bindingAMouseEvent && !originalIsMouse && (isTouchDevice && touchMap[event]), + evtName = ite ? "TouchEvent" : "MouseEvents"; + + evt = document.createEvent(evtName); + eventGenerators[evtName](evt); + _decorate(evt); + _el.dispatchEvent(evt); + } + else if (document.createEventObject) { + evt = document.createEventObject(); + evt.eventType = evt.eventName = eventToBind; + evt.screenX = sl[0]; + evt.screenY = sl[1]; + evt.clientX = cl[0]; + evt.clientY = cl[1]; + _decorate(evt); + _el.fireEvent('on' + eventToBind, evt); + } + }); + return this; + } + }; + + /** + * Static method to assist in 'consuming' an element: uses `stopPropagation` where available, or sets + * `e.returnValue=false` where it is not. + * @method Mottle.consume + * @param {Event} e Event to consume + * @param {Boolean} [doNotPreventDefault=false] If true, does not call `preventDefault()` on the event. + */ + root.Mottle.consume = function (e, doNotPreventDefault) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.returnValue = false; + + if (!doNotPreventDefault && e.preventDefault) + e.preventDefault(); + }; + + /** + * Gets the page location corresponding to the given event. For touch events this means get the page location of the first touch. + * @method Mottle.pageLocation + * @param {Event} e Event to get page location for. + * @return {Number[]} [left, top] for the given event. + */ + root.Mottle.pageLocation = _pageLocation; + + /** + * Forces touch events to be turned "on". Useful for testing: even if you don't have a touch device, you can still + * trigger a touch event when this is switched on and it will be captured and acted on. + * @method setForceTouchEvents + * @param {Boolean} value If true, force touch events to be on. + */ + root.Mottle.setForceTouchEvents = function (value) { + isTouchDevice = value; + }; + + /** + * Forces mouse events to be turned "on". Useful for testing: even if you don't have a mouse, you can still + * trigger a mouse event when this is switched on and it will be captured and acted on. + * @method setForceMouseEvents + * @param {Boolean} value If true, force mouse events to be on. + */ + root.Mottle.setForceMouseEvents = function (value) { + isMouseDevice = value; + }; + + root.Mottle.version = "0.8.0"; + + if (typeof exports !== "undefined") { + exports.Mottle = root.Mottle; + } + +}).call(typeof window === "undefined" ? this : window); + +/** + drag/drop functionality for use with jsPlumb but with + no knowledge of jsPlumb. supports multiple scopes (separated by whitespace), dragging + multiple elements, constrain to parent, drop filters, drag start filters, custom + css classes. + + a lot of the functionality of this script is expected to be plugged in: + + addClass + removeClass + + addEvent + removeEvent + + getPosition + setPosition + getSize + + indexOf + intersects + + the name came from here: + + http://mrsharpoblunto.github.io/foswig.js/ + + copyright 2016 jsPlumb + */ + +;(function() { + + "use strict"; + var root = this; + + var _suggest = function(list, item, head) { + if (list.indexOf(item) === -1) { + head ? list.unshift(item) : list.push(item); + return true; + } + return false; + }; + + var _vanquish = function(list, item) { + var idx = list.indexOf(item); + if (idx !== -1) list.splice(idx, 1); + }; + + var _difference = function(l1, l2) { + var d = []; + for (var i = 0; i < l1.length; i++) { + if (l2.indexOf(l1[i]) === -1) + d.push(l1[i]); + } + return d; + }; + + var _isString = function(f) { + return f == null ? false : (typeof f === "string" || f.constructor === String); + }; + + var getOffsetRect = function (elem) { + // (1) + var box = elem.getBoundingClientRect(), + body = document.body, + docElem = document.documentElement, + // (2) + scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop, + scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft, + // (3) + clientTop = docElem.clientTop || body.clientTop || 0, + clientLeft = docElem.clientLeft || body.clientLeft || 0, + // (4) + top = box.top + scrollTop - clientTop, + left = box.left + scrollLeft - clientLeft; + + return { top: Math.round(top), left: Math.round(left) }; + }; + + var matchesSelector = function(el, selector, ctx) { + ctx = ctx || el.parentNode; + var possibles = ctx.querySelectorAll(selector); + for (var i = 0; i < possibles.length; i++) { + if (possibles[i] === el) + return true; + } + return false; + }; + + var findDelegateElement = function(parentElement, childElement, selector) { + if (matchesSelector(childElement, selector, parentElement)) { + return childElement; + } else { + var currentParent = childElement.parentNode; + while (currentParent != null && currentParent !== parentElement) { + if (matchesSelector(currentParent, selector, parentElement)) { + return currentParent; + } else { + currentParent = currentParent.parentNode; + } + } + } + }; + + /** + * Finds all elements matching the given selector, for the given parent. In order to support "scoped root" selectors, + * ie. things like "> .someClass", that is .someClass elements that are direct children of `parentElement`, we have to + * jump through a small hoop here: when a delegate draggable is registered, we write a `katavorio-draggable` attribute + * on the element on which the draggable is registered. Then when this method runs, we grab the value of that attribute and + * prepend it as part of the selector we're looking for. So "> .someClass" ends up being written as + * "[katavorio-draggable='...' > .someClass]", which works with querySelectorAll. + * + * @param availableSelectors + * @param parentElement + * @param childElement + * @returns {*} + */ + var findMatchingSelector = function(availableSelectors, parentElement, childElement) { + var el = null; + var draggableId = parentElement.getAttribute("katavorio-draggable"), + prefix = draggableId != null ? "[katavorio-draggable='" + draggableId + "'] " : ""; + + for (var i = 0; i < availableSelectors.length; i++) { + el = findDelegateElement(parentElement, childElement, prefix + availableSelectors[i].selector); + if (el != null) { + return [ availableSelectors[i], el ]; + } + } + return null; + }; + + var iev = (function() { + var rv = -1; + if (navigator.appName === 'Microsoft Internet Explorer') { + var ua = navigator.userAgent, + re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); + if (re.exec(ua) != null) + rv = parseFloat(RegExp.$1); + } + return rv; + })(), + DEFAULT_GRID_X = 10, + DEFAULT_GRID_Y = 10, + isIELT9 = iev > -1 && iev < 9, + isIE9 = iev === 9, + _pl = function(e) { + if (isIELT9) { + return [ e.clientX + document.documentElement.scrollLeft, e.clientY + document.documentElement.scrollTop ]; + } + else { + var ts = _touches(e), t = _getTouch(ts, 0); + // for IE9 pageX might be null if the event was synthesized. We try for pageX/pageY first, + // falling back to clientX/clientY if necessary. In every other browser we want to use pageX/pageY. + return isIE9 ? [t.pageX || t.clientX, t.pageY || t.clientY] : [t.pageX, t.pageY]; + } + }, + _getTouch = function(touches, idx) { return touches.item ? touches.item(idx) : touches[idx]; }, + _touches = function(e) { + return e.touches && e.touches.length > 0 ? e.touches : + e.changedTouches && e.changedTouches.length > 0 ? e.changedTouches : + e.targetTouches && e.targetTouches.length > 0 ? e.targetTouches : + [ e ]; + }, + _classes = { + delegatedDraggable:"katavorio-delegated-draggable", // elements that are the delegated drag handler for a bunch of other elements + draggable:"katavorio-draggable", // draggable elements + droppable:"katavorio-droppable", // droppable elements + drag : "katavorio-drag", // elements currently being dragged + selected:"katavorio-drag-selected", // elements in current drag selection + active : "katavorio-drag-active", // droppables that are targets of a currently dragged element + hover : "katavorio-drag-hover", // droppables over which a matching drag element is hovering + noSelect : "katavorio-drag-no-select", // added to the body to provide a hook to suppress text selection + ghostProxy:"katavorio-ghost-proxy", // added to a ghost proxy element in use when a drag has exited the bounds of its parent. + clonedDrag:"katavorio-clone-drag" // added to a node that is a clone of an element created at the start of a drag + }, + _defaultScope = "katavorio-drag-scope", + _events = [ "stop", "start", "drag", "drop", "over", "out", "beforeStart" ], + _devNull = function() {}, + _true = function() { return true; }, + _foreach = function(l, fn, from) { + for (var i = 0; i < l.length; i++) { + if (l[i] != from) + fn(l[i]); + } + }, + _setDroppablesActive = function(dd, val, andHover, drag) { + _foreach(dd, function(e) { + e.setActive(val); + if (val) e.updatePosition(); + if (andHover) e.setHover(drag, val); + }); + }, + _each = function(obj, fn) { + if (obj == null) return; + obj = !_isString(obj) && (obj.tagName == null && obj.length != null) ? obj : [ obj ]; + for (var i = 0; i < obj.length; i++) + fn.apply(obj[i], [ obj[i] ]); + }, + _consume = function(e) { + if (e.stopPropagation) { + e.stopPropagation(); + e.preventDefault(); + } + else { + e.returnValue = false; + } + }, + _defaultInputFilterSelector = "input,textarea,select,button,option", + // + // filters out events on all input elements, like textarea, checkbox, input, select. + _inputFilter = function(e, el, _katavorio) { + var t = e.srcElement || e.target; + return !matchesSelector(t, _katavorio.getInputFilterSelector(), el); + }; + + var Super = function(el, params, css, scope) { + this.params = params || {}; + this.el = el; + this.params.addClass(this.el, this._class); + this.uuid = _uuid(); + var enabled = true; + this.setEnabled = function(e) { enabled = e; }; + this.isEnabled = function() { return enabled; }; + this.toggleEnabled = function() { enabled = !enabled; }; + this.setScope = function(scopes) { + this.scopes = scopes ? scopes.split(/\s+/) : [ scope ]; + }; + this.addScope = function(scopes) { + var m = {}; + _each(this.scopes, function(s) { m[s] = true;}); + _each(scopes ? scopes.split(/\s+/) : [], function(s) { m[s] = true;}); + this.scopes = []; + for (var i in m) this.scopes.push(i); + }; + this.removeScope = function(scopes) { + var m = {}; + _each(this.scopes, function(s) { m[s] = true;}); + _each(scopes ? scopes.split(/\s+/) : [], function(s) { delete m[s];}); + this.scopes = []; + for (var i in m) this.scopes.push(i); + }; + this.toggleScope = function(scopes) { + var m = {}; + _each(this.scopes, function(s) { m[s] = true;}); + _each(scopes ? scopes.split(/\s+/) : [], function(s) { + if (m[s]) delete m[s]; + else m[s] = true; + }); + this.scopes = []; + for (var i in m) this.scopes.push(i); + }; + this.setScope(params.scope); + this.k = params.katavorio; + return params.katavorio; + }; + + var TRUE = function() { return true; }; + var FALSE = function() { return false; }; + + var Drag = function(el, params, css, scope) { + this._class = css.draggable; + var k = Super.apply(this, arguments); + this.rightButtonCanDrag = this.params.rightButtonCanDrag; + var downAt = [0,0], posAtDown = null, pagePosAtDown = null, pageDelta = [0,0], moving = false, initialScroll = [0,0], + consumeStartEvent = this.params.consumeStartEvent !== false, + dragEl = this.el, + clone = this.params.clone, + scroll = this.params.scroll, + _multipleDrop = params.multipleDrop !== false, + isConstrained = false, + useGhostProxy = params.ghostProxy === true ? TRUE : params.ghostProxy && typeof params.ghostProxy === "function" ? params.ghostProxy : FALSE, + ghostProxy = function(el) { return el.cloneNode(true); }, + elementToDrag = null, + availableSelectors = [], + activeSelectorParams = null, // which, if any, selector config is currently active. + ghostProxyParent = params.ghostProxyParent, + currentParentPosition, + ghostParentPosition, + ghostDx, + ghostDy; + + // if an initial selector was provided, push the entire set of params as a selector config. + if (params.selector) { + var draggableId = el.getAttribute("katavorio-draggable"); + if (draggableId == null) { + draggableId = "" + new Date().getTime(); + el.setAttribute("katavorio-draggable", draggableId); + } + + availableSelectors.push(params); + } + + var snapThreshold = params.snapThreshold, + _snap = function(pos, gridX, gridY, thresholdX, thresholdY) { + var _dx = Math.floor(pos[0] / gridX), + _dxl = gridX * _dx, + _dxt = _dxl + gridX, + _x = Math.abs(pos[0] - _dxl) <= thresholdX ? _dxl : Math.abs(_dxt - pos[0]) <= thresholdX ? _dxt : pos[0]; + + var _dy = Math.floor(pos[1] / gridY), + _dyl = gridY * _dy, + _dyt = _dyl + gridY, + _y = Math.abs(pos[1] - _dyl) <= thresholdY ? _dyl : Math.abs(_dyt - pos[1]) <= thresholdY ? _dyt : pos[1]; + + return [ _x, _y]; + }; + + this.posses = []; + this.posseRoles = {}; + + this.toGrid = function(pos) { + if (this.params.grid == null) { + return pos; + } + else { + var tx = this.params.grid ? this.params.grid[0] / 2 : snapThreshold ? snapThreshold : DEFAULT_GRID_X / 2, + ty = this.params.grid ? this.params.grid[1] / 2 : snapThreshold ? snapThreshold : DEFAULT_GRID_Y / 2; + + return _snap(pos, this.params.grid[0], this.params.grid[1], tx, ty); + } + }; + + this.snap = function(x, y) { + if (dragEl == null) return; + x = x || (this.params.grid ? this.params.grid[0] : DEFAULT_GRID_X); + y = y || (this.params.grid ? this.params.grid[1] : DEFAULT_GRID_Y); + var p = this.params.getPosition(dragEl), + tx = this.params.grid ? this.params.grid[0] / 2 : snapThreshold, + ty = this.params.grid ? this.params.grid[1] / 2 : snapThreshold; + + this.params.setPosition(dragEl, _snap(p, x, y, tx, ty)); + }; + + this.setUseGhostProxy = function(val) { + useGhostProxy = val ? TRUE : FALSE; + }; + + var constrain; + var negativeFilter = function(pos) { + return (params.allowNegative === false) ? [ Math.max (0, pos[0]), Math.max(0, pos[1]) ] : pos; + }; + + var _setConstrain = function(value) { + constrain = typeof value === "function" ? value : value ? function(pos, dragEl, _constrainRect, _size) { + return negativeFilter([ + Math.max(0, Math.min(_constrainRect.w - _size[0], pos[0])), + Math.max(0, Math.min(_constrainRect.h - _size[1], pos[1])) + ]); + }.bind(this) : function(pos) { return negativeFilter(pos); }; + }.bind(this); + + _setConstrain(typeof this.params.constrain === "function" ? this.params.constrain : (this.params.constrain || this.params.containment)); + + + /** + * Sets whether or not the Drag is constrained. A value of 'true' means constrain to parent bounds; a function + * will be executed and returns true if the position is allowed. + * @param value + */ + this.setConstrain = function(value) { + _setConstrain(value); + }; + + var revertFunction; + /** + * Sets a function to call on drag stop, which, if it returns true, indicates that the given element should + * revert to its position before the previous drag. + * @param fn + */ + this.setRevert = function(fn) { + revertFunction = fn; + }; + + if (this.params.revert) { + revertFunction = this.params.revert; + } + + var _assignId = function(obj) { + if (typeof obj === "function") { + obj._katavorioId = _uuid(); + return obj._katavorioId; + } else { + return obj; + } + }, + // a map of { spec -> [ fn, exclusion ] } entries. + _filters = {}, + _testFilter = function(e) { + for (var key in _filters) { + var f = _filters[key]; + var rv = f[0](e); + if (f[1]) rv = !rv; + if (!rv) return false; + } + return true; + }, + _setFilter = this.setFilter = function(f, _exclude) { + if (f) { + var key = _assignId(f); + _filters[key] = [ + function(e) { + var t = e.srcElement || e.target, m; + if (_isString(f)) { + m = matchesSelector(t, f, el); + } + else if (typeof f === "function") { + m = f(e, el); + } + return m; + }, + _exclude !== false + ]; + + } + }, + _addFilter = this.addFilter = _setFilter, + _removeFilter = this.removeFilter = function(f) { + var key = typeof f === "function" ? f._katavorioId : f; + delete _filters[key]; + }; + + this.clearAllFilters = function() { + _filters = {}; + }; + + this.canDrag = this.params.canDrag || _true; + + var constrainRect, + matchingDroppables = [], + intersectingDroppables = []; + + this.addSelector = function(params) { + if (params.selector) { + availableSelectors.push(params); + } + }; + + this.downListener = function(e) { + if (e.defaultPrevented) { return; } + var isNotRightClick = this.rightButtonCanDrag || (e.which !== 3 && e.button !== 2); + if (isNotRightClick && this.isEnabled() && this.canDrag()) { + + var _f = _testFilter(e) && _inputFilter(e, this.el, this.k); + if (_f) { + + activeSelectorParams = null; + elementToDrag = null; + + // if (selector) { + // elementToDrag = findDelegateElement(this.el, e.target || e.srcElement, selector); + // if(elementToDrag == null) { + // return; + // } + // } + if (availableSelectors.length > 0) { + var match = findMatchingSelector(availableSelectors, this.el, e.target || e.srcElement); + if (match != null) { + activeSelectorParams = match[0]; + elementToDrag = match[1]; + } + // elementToDrag = findDelegateElement(this.el, e.target || e.srcElement, selector); + if(elementToDrag == null) { + return; + } + } + else { + elementToDrag = this.el; + } + + if (clone) { + dragEl = elementToDrag.cloneNode(true); + this.params.addClass(dragEl, _classes.clonedDrag); + + dragEl.setAttribute("id", null); + dragEl.style.position = "absolute"; + + if (this.params.parent != null) { + var p = this.params.getPosition(this.el); + dragEl.style.left = p[0] + "px"; + dragEl.style.top = p[1] + "px"; + this.params.parent.appendChild(dragEl); + } else { + // the clone node is added to the body; getOffsetRect gives us a value + // relative to the body. + var b = getOffsetRect(elementToDrag); + dragEl.style.left = b.left + "px"; + dragEl.style.top = b.top + "px"; + + document.body.appendChild(dragEl); + } + + } else { + dragEl = elementToDrag; + } + + consumeStartEvent && _consume(e); + downAt = _pl(e); + if (dragEl && dragEl.parentNode) + { + initialScroll = [dragEl.parentNode.scrollLeft, dragEl.parentNode.scrollTop]; + } + // + this.params.bind(document, "mousemove", this.moveListener); + this.params.bind(document, "mouseup", this.upListener); + k.markSelection(this); + k.markPosses(this); + this.params.addClass(document.body, css.noSelect); + _dispatch("beforeStart", {el:this.el, pos:posAtDown, e:e, drag:this}); + } + else if (this.params.consumeFilteredEvents) { + _consume(e); + } + } + }.bind(this); + + this.moveListener = function(e) { + if (downAt) { + if (!moving) { + var _continue = _dispatch("start", {el:this.el, pos:posAtDown, e:e, drag:this}); + if (_continue !== false) { + if (!downAt) { + return; + } + this.mark(true); + moving = true; + } else { + this.abort(); + } + } + + // it is possible that the start event caused the drag to be aborted. So we check + // again that we are currently dragging. + if (downAt) { + intersectingDroppables.length = 0; + var pos = _pl(e), dx = pos[0] - downAt[0], dy = pos[1] - downAt[1], + z = this.params.ignoreZoom ? 1 : k.getZoom(); + if (dragEl && dragEl.parentNode) + { + dx += dragEl.parentNode.scrollLeft - initialScroll[0]; + dy += dragEl.parentNode.scrollTop - initialScroll[1]; + } + dx /= z; + dy /= z; + this.moveBy(dx, dy, e); + k.updateSelection(dx, dy, this); + k.updatePosses(dx, dy, this); + } + } + }.bind(this); + + this.upListener = function(e) { + if (downAt) { + downAt = null; + this.params.unbind(document, "mousemove", this.moveListener); + this.params.unbind(document, "mouseup", this.upListener); + this.params.removeClass(document.body, css.noSelect); + this.unmark(e); + k.unmarkSelection(this, e); + k.unmarkPosses(this, e); + this.stop(e); + + k.notifyPosseDragStop(this, e); + moving = false; + intersectingDroppables.length = 0; + + if (clone) { + dragEl && dragEl.parentNode && dragEl.parentNode.removeChild(dragEl); + dragEl = null; + } else { + if (revertFunction && revertFunction(dragEl, this.params.getPosition(dragEl)) === true) { + this.params.setPosition(dragEl, posAtDown); + _dispatch("revert", dragEl); + } + } + + } + }.bind(this); + + this.getFilters = function() { return _filters; }; + + this.abort = function() { + if (downAt != null) { + this.upListener(); + } + }; + + /** + * Returns the element that was last dragged. This may be some original element from the DOM, or if `clone` is + * set, then its actually a copy of some original DOM element. In some client calls to this method, it is the + * actual element that was dragged that is desired. In others, it is the original DOM element that the user + * wishes to get - in which case, pass true for `retrieveOriginalElement`. + * + * @returns {*} + */ + this.getDragElement = function(retrieveOriginalElement) { + return retrieveOriginalElement ? elementToDrag || this.el : dragEl || this.el; + }; + + var listeners = {"start":[], "drag":[], "stop":[], "over":[], "out":[], "beforeStart":[], "revert":[] }; + if (params.events.start) listeners.start.push(params.events.start); + if (params.events.beforeStart) listeners.beforeStart.push(params.events.beforeStart); + if (params.events.stop) listeners.stop.push(params.events.stop); + if (params.events.drag) listeners.drag.push(params.events.drag); + if (params.events.revert) listeners.revert.push(params.events.revert); + + this.on = function(evt, fn) { + if (listeners[evt]) listeners[evt].push(fn); + }; + + this.off = function(evt, fn) { + if (listeners[evt]) { + var l = []; + for (var i = 0; i < listeners[evt].length; i++) { + if (listeners[evt][i] !== fn) l.push(listeners[evt][i]); + } + listeners[evt] = l; + } + }; + + var _dispatch = function(evt, value) { + var result = null; + if (activeSelectorParams && activeSelectorParams[evt]) { + activeSelectorParams[evt](value); + } else if (listeners[evt]) { + for (var i = 0; i < listeners[evt].length; i++) { + try { + var v = listeners[evt][i](value); + if (v != null) { + result = v; + } + } + catch (e) { } + } + } + return result; + }; + + this.notifyStart = function(e) { + _dispatch("start", {el:this.el, pos:this.params.getPosition(dragEl), e:e, drag:this}); + }; + + this.stop = function(e, force) { + if (force || moving) { + var positions = [], + sel = k.getSelection(), + dPos = this.params.getPosition(dragEl); + + if (sel.length > 0) { + for (var i = 0; i < sel.length; i++) { + var p = this.params.getPosition(sel[i].el); + positions.push([ sel[i].el, { left: p[0], top: p[1] }, sel[i] ]); + } + } + else { + positions.push([ dragEl, {left:dPos[0], top:dPos[1]}, this ]); + } + + _dispatch("stop", { + el: dragEl, + pos: ghostProxyOffsets || dPos, + finalPos:dPos, + e: e, + drag: this, + selection:positions + }); + } + }; + + this.mark = function(andNotify) { + posAtDown = this.params.getPosition(dragEl); + pagePosAtDown = this.params.getPosition(dragEl, true); + pageDelta = [pagePosAtDown[0] - posAtDown[0], pagePosAtDown[1] - posAtDown[1]]; + this.size = this.params.getSize(dragEl); + matchingDroppables = k.getMatchingDroppables(this); + _setDroppablesActive(matchingDroppables, true, false, this); + this.params.addClass(dragEl, this.params.dragClass || css.drag); + + var cs; + if (this.params.getConstrainingRectangle) { + cs = this.params.getConstrainingRectangle(dragEl) + } else { + cs = this.params.getSize(dragEl.parentNode); + } + constrainRect = {w: cs[0], h: cs[1]}; + + ghostDx = 0; + ghostDy = 0; + + if (andNotify) { + k.notifySelectionDragStart(this); + } + }; + var ghostProxyOffsets; + this.unmark = function(e, doNotCheckDroppables) { + _setDroppablesActive(matchingDroppables, false, true, this); + + if (isConstrained && useGhostProxy(elementToDrag)) { + ghostProxyOffsets = [dragEl.offsetLeft - ghostDx, dragEl.offsetTop - ghostDy]; + dragEl.parentNode.removeChild(dragEl); + dragEl = elementToDrag; + } + else { + ghostProxyOffsets = null; + } + + this.params.removeClass(dragEl, this.params.dragClass || css.drag); + matchingDroppables.length = 0; + isConstrained = false; + if (!doNotCheckDroppables) { + if (intersectingDroppables.length > 0 && ghostProxyOffsets) { + params.setPosition(elementToDrag, ghostProxyOffsets); + } + intersectingDroppables.sort(_rankSort); + for (var i = 0; i < intersectingDroppables.length; i++) { + var retVal = intersectingDroppables[i].drop(this, e); + if (retVal === true) break; + } + } + }; + this.moveBy = function(dx, dy, e) { + intersectingDroppables.length = 0; + + var desiredLoc = this.toGrid([posAtDown[0] + dx, posAtDown[1] + dy]), + cPos = constrain(desiredLoc, dragEl, constrainRect, this.size); + + // if we should use a ghost proxy... + if (useGhostProxy(this.el)) { + // and the element has been dragged outside of its parent bounds + if (desiredLoc[0] !== cPos[0] || desiredLoc[1] !== cPos[1]) { + + // ...if ghost proxy not yet created + if (!isConstrained) { + // create it + var gp = ghostProxy(elementToDrag); + params.addClass(gp, _classes.ghostProxy); + + if (ghostProxyParent) { + ghostProxyParent.appendChild(gp); + // find offset between drag el's parent the ghost parent + currentParentPosition = params.getPosition(elementToDrag.parentNode, true); + ghostParentPosition = params.getPosition(params.ghostProxyParent, true); + ghostDx = currentParentPosition[0] - ghostParentPosition[0]; + ghostDy = currentParentPosition[1] - ghostParentPosition[1]; + + } else { + elementToDrag.parentNode.appendChild(gp); + } + + // the ghost proxy is the drag element + dragEl = gp; + // set this flag so we dont recreate the ghost proxy + isConstrained = true; + } + // now the drag position can be the desired position, as the ghost proxy can support it. + cPos = desiredLoc; + } + else { + // if the element is not outside of its parent bounds, and ghost proxy is in place, + if (isConstrained) { + // remove the ghost proxy from the dom + dragEl.parentNode.removeChild(dragEl); + // reset the drag element to the original element + dragEl = elementToDrag; + // clear this flag. + isConstrained = false; + currentParentPosition = null; + ghostParentPosition = null; + ghostDx = 0; + ghostDy = 0; + } + } + } + + var rect = { x:cPos[0], y:cPos[1], w:this.size[0], h:this.size[1]}, + pageRect = { x:rect.x + pageDelta[0], y:rect.y + pageDelta[1], w:rect.w, h:rect.h}, + focusDropElement = null; + + this.params.setPosition(dragEl, [cPos[0] + ghostDx, cPos[1] + ghostDy]); + + for (var i = 0; i < matchingDroppables.length; i++) { + var r2 = { x:matchingDroppables[i].pagePosition[0], y:matchingDroppables[i].pagePosition[1], w:matchingDroppables[i].size[0], h:matchingDroppables[i].size[1]}; + if (this.params.intersects(pageRect, r2) && (_multipleDrop || focusDropElement == null || focusDropElement === matchingDroppables[i].el) && matchingDroppables[i].canDrop(this)) { + if (!focusDropElement) focusDropElement = matchingDroppables[i].el; + intersectingDroppables.push(matchingDroppables[i]); + matchingDroppables[i].setHover(this, true, e); + } + else if (matchingDroppables[i].isHover()) { + matchingDroppables[i].setHover(this, false, e); + } + } + + _dispatch("drag", {el:this.el, pos:cPos, e:e, drag:this}); + + /* test to see if the parent needs to be scrolled (future) + if (scroll) { + var pnsl = dragEl.parentNode.scrollLeft, pnst = dragEl.parentNode.scrollTop; + console.log("scroll!", pnsl, pnst); + }*/ + }; + this.destroy = function() { + this.params.unbind(this.el, "mousedown", this.downListener); + this.params.unbind(document, "mousemove", this.moveListener); + this.params.unbind(document, "mouseup", this.upListener); + this.downListener = null; + this.upListener = null; + this.moveListener = null; + }; + + // init:register mousedown, and perhaps set a filter + this.params.bind(this.el, "mousedown", this.downListener); + + // if handle provided, use that. otherwise, try to set a filter. + // note that a `handle` selector always results in filterExclude being set to false, ie. + // the selector defines the handle element(s). + if (this.params.handle) + _setFilter(this.params.handle, false); + else + _setFilter(this.params.filter, this.params.filterExclude); + }; + + var Drop = function(el, params, css, scope) { + this._class = css.droppable; + this.params = params || {}; + this.rank = params.rank || 0; + this._activeClass = this.params.activeClass || css.active; + this._hoverClass = this.params.hoverClass || css.hover; + Super.apply(this, arguments); + var hover = false; + this.allowLoopback = this.params.allowLoopback !== false; + + this.setActive = function(val) { + this.params[val ? "addClass" : "removeClass"](this.el, this._activeClass); + }; + + this.updatePosition = function() { + this.position = this.params.getPosition(this.el); + this.pagePosition = this.params.getPosition(this.el, true); + this.size = this.params.getSize(this.el); + }; + + this.canDrop = this.params.canDrop || function(drag) { + return true; + }; + + this.isHover = function() { return hover; }; + + this.setHover = function(drag, val, e) { + // if turning off hover but this was not the drag that caused the hover, ignore. + if (val || this.el._katavorioDragHover == null || this.el._katavorioDragHover === drag.el._katavorio) { + this.params[val ? "addClass" : "removeClass"](this.el, this._hoverClass); + this.el._katavorioDragHover = val ? drag.el._katavorio : null; + if (hover !== val) { + this.params.events[val ? "over" : "out"]({el: this.el, e: e, drag: drag, drop: this}); + } + hover = val; + } + }; + + /** + * A drop event. `drag` is the corresponding Drag object, which may be a Drag for some specific element, or it + * may be a Drag on some element acting as a delegate for elements contained within it. + * @param drag + * @param event + * @returns {*} + */ + this.drop = function(drag, event) { + return this.params.events["drop"]({ drag:drag, e:event, drop:this }); + }; + + this.destroy = function() { + this._class = null; + this._activeClass = null; + this._hoverClass = null; + hover = null; + }; + }; + + var _uuid = function() { + return ('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8); + return v.toString(16); + })); + }; + + var _rankSort = function(a,b) { + return a.rank < b.rank ? 1 : a.rank > b.rank ? -1 : 0; + }; + + var _gel = function(el) { + if (el == null) return null; + el = (typeof el === "string" || el.constructor === String) ? document.getElementById(el) : el; + if (el == null) return null; + el._katavorio = el._katavorio || _uuid(); + return el; + }; + + root.Katavorio = function(katavorioParams) { + + var _selection = [], + _selectionMap = {}; + + this._dragsByScope = {}; + this._dropsByScope = {}; + var _zoom = 1, + _reg = function(obj, map) { + _each(obj, function(_obj) { + for(var i = 0; i < _obj.scopes.length; i++) { + map[_obj.scopes[i]] = map[_obj.scopes[i]] || []; + map[_obj.scopes[i]].push(_obj); + } + }); + }, + _unreg = function(obj, map) { + var c = 0; + _each(obj, function(_obj) { + for(var i = 0; i < _obj.scopes.length; i++) { + if (map[_obj.scopes[i]]) { + var idx = katavorioParams.indexOf(map[_obj.scopes[i]], _obj); + if (idx !== -1) { + map[_obj.scopes[i]].splice(idx, 1); + c++; + } + } + } + }); + + return c > 0 ; + }, + _getMatchingDroppables = this.getMatchingDroppables = function(drag) { + var dd = [], _m = {}; + for (var i = 0; i < drag.scopes.length; i++) { + var _dd = this._dropsByScope[drag.scopes[i]]; + if (_dd) { + for (var j = 0; j < _dd.length; j++) { + if (_dd[j].canDrop(drag) && !_m[_dd[j].uuid] && (_dd[j].allowLoopback || _dd[j].el !== drag.el)) { + _m[_dd[j].uuid] = true; + dd.push(_dd[j]); + } + } + } + } + dd.sort(_rankSort); + return dd; + }, + _prepareParams = function(p) { + p = p || {}; + var _p = { + events:{} + }, i; + for (i in katavorioParams) _p[i] = katavorioParams[i]; + for (i in p) _p[i] = p[i]; + // events + + for (i = 0; i < _events.length; i++) { + _p.events[_events[i]] = p[_events[i]] || _devNull; + } + _p.katavorio = this; + return _p; + }.bind(this), + _mistletoe = function(existingDrag, params) { + for (var i = 0; i < _events.length; i++) { + if (params[_events[i]]) { + existingDrag.on(_events[i], params[_events[i]]); + } + } + }.bind(this), + _css = {}, + overrideCss = katavorioParams.css || {}, + _scope = katavorioParams.scope || _defaultScope; + + // prepare map of css classes based on defaults frst, then optional overrides + for (var i in _classes) _css[i] = _classes[i]; + for (var i in overrideCss) _css[i] = overrideCss[i]; + + var inputFilterSelector = katavorioParams.inputFilterSelector || _defaultInputFilterSelector; + /** + * Gets the selector identifying which input elements to filter from drag events. + * @method getInputFilterSelector + * @return {String} Current input filter selector. + */ + this.getInputFilterSelector = function() { return inputFilterSelector; }; + + /** + * Sets the selector identifying which input elements to filter from drag events. + * @method setInputFilterSelector + * @param {String} selector Input filter selector to set. + * @return {Katavorio} Current instance; method may be chained. + */ + this.setInputFilterSelector = function(selector) { + inputFilterSelector = selector; + return this; + }; + + /** + * Either makes the given element draggable, or identifies it as an element inside which some identified list + * of elements may be draggable. + * @param el + * @param params + * @returns {Array} + */ + this.draggable = function(el, params) { + var o = []; + _each(el, function (_el) { + _el = _gel(_el); + if (_el != null) { + if (_el._katavorioDrag == null) { + var p = _prepareParams(params); + _el._katavorioDrag = new Drag(_el, p, _css, _scope); + _reg(_el._katavorioDrag, this._dragsByScope); + o.push(_el._katavorioDrag); + katavorioParams.addClass(_el, p.selector ? _css.delegatedDraggable : _css.draggable); + } + else { + _mistletoe(_el._katavorioDrag, params); + } + } + }.bind(this)); + return o; + }; + + this.droppable = function(el, params) { + var o = []; + _each(el, function(_el) { + _el = _gel(_el); + if (_el != null) { + var drop = new Drop(_el, _prepareParams(params), _css, _scope); + _el._katavorioDrop = _el._katavorioDrop || []; + _el._katavorioDrop.push(drop); + _reg(drop, this._dropsByScope); + o.push(drop); + katavorioParams.addClass(_el, _css.droppable); + } + }.bind(this)); + return o; + }; + + /** + * @name Katavorio#select + * @function + * @desc Adds an element to the current selection (for multiple node drag) + * @param {Element|String} DOM element - or id of the element - to add. + */ + this.select = function(el) { + _each(el, function() { + var _el = _gel(this); + if (_el && _el._katavorioDrag) { + if (!_selectionMap[_el._katavorio]) { + _selection.push(_el._katavorioDrag); + _selectionMap[_el._katavorio] = [ _el, _selection.length - 1 ]; + katavorioParams.addClass(_el, _css.selected); + } + } + }); + return this; + }; + + /** + * @name Katavorio#deselect + * @function + * @desc Removes an element from the current selection (for multiple node drag) + * @param {Element|String} DOM element - or id of the element - to remove. + */ + this.deselect = function(el) { + _each(el, function() { + var _el = _gel(this); + if (_el && _el._katavorio) { + var e = _selectionMap[_el._katavorio]; + if (e) { + var _s = []; + for (var i = 0; i < _selection.length; i++) + if (_selection[i].el !== _el) _s.push(_selection[i]); + _selection = _s; + delete _selectionMap[_el._katavorio]; + katavorioParams.removeClass(_el, _css.selected); + } + } + }); + return this; + }; + + this.deselectAll = function() { + for (var i in _selectionMap) { + var d = _selectionMap[i]; + katavorioParams.removeClass(d[0], _css.selected); + } + + _selection.length = 0; + _selectionMap = {}; + }; + + this.markSelection = function(drag) { + _foreach(_selection, function(e) { e.mark(); }, drag); + }; + + this.markPosses = function(drag) { + if (drag.posses) { + _each(drag.posses, function(p) { + if (drag.posseRoles[p] && _posses[p]) { + _foreach(_posses[p].members, function (d) { + d.mark(); + }, drag); + } + }) + } + }; + + this.unmarkSelection = function(drag, event) { + _foreach(_selection, function(e) { e.unmark(event); }, drag); + }; + + this.unmarkPosses = function(drag, event) { + if (drag.posses) { + _each(drag.posses, function(p) { + if (drag.posseRoles[p] && _posses[p]) { + _foreach(_posses[p].members, function (d) { + d.unmark(event, true); + }, drag); + } + }); + } + }; + + this.getSelection = function() { return _selection.slice(0); }; + + this.updateSelection = function(dx, dy, drag) { + _foreach(_selection, function(e) { e.moveBy(dx, dy); }, drag); + }; + + var _posseAction = function(fn, drag) { + if (drag.posses) { + _each(drag.posses, function(p) { + if (drag.posseRoles[p] && _posses[p]) { + _foreach(_posses[p].members, function (e) { + fn(e); + }, drag); + } + }); + } + }; + + this.updatePosses = function(dx, dy, drag) { + _posseAction(function(e) { e.moveBy(dx, dy); }, drag); + }; + + this.notifyPosseDragStop = function(drag, evt) { + _posseAction(function(e) { e.stop(evt, true); }, drag); + }; + + this.notifySelectionDragStop = function(drag, evt) { + _foreach(_selection, function(e) { e.stop(evt, true); }, drag); + }; + + this.notifySelectionDragStart = function(drag, evt) { + _foreach(_selection, function(e) { e.notifyStart(evt);}, drag); + }; + + this.setZoom = function(z) { _zoom = z; }; + this.getZoom = function() { return _zoom; }; + + // does the work of changing scopes + var _scopeManip = function(kObj, scopes, map, fn) { + _each(kObj, function(_kObj) { + _unreg(_kObj, map); // deregister existing scopes + _kObj[fn](scopes); // set scopes + _reg(_kObj, map); // register new ones + }); + }; + + _each([ "set", "add", "remove", "toggle"], function(v) { + this[v + "Scope"] = function(el, scopes) { + _scopeManip(el._katavorioDrag, scopes, this._dragsByScope, v + "Scope"); + _scopeManip(el._katavorioDrop, scopes, this._dropsByScope, v + "Scope"); + }.bind(this); + this[v + "DragScope"] = function(el, scopes) { + _scopeManip(el.constructor === Drag ? el : el._katavorioDrag, scopes, this._dragsByScope, v + "Scope"); + }.bind(this); + this[v + "DropScope"] = function(el, scopes) { + _scopeManip(el.constructor === Drop ? el : el._katavorioDrop, scopes, this._dropsByScope, v + "Scope"); + }.bind(this); + }.bind(this)); + + this.snapToGrid = function(x, y) { + for (var s in this._dragsByScope) { + _foreach(this._dragsByScope[s], function(d) { d.snap(x, y); }); + } + }; + + this.getDragsForScope = function(s) { return this._dragsByScope[s]; }; + this.getDropsForScope = function(s) { return this._dropsByScope[s]; }; + + var _destroy = function(el, type, map) { + el = _gel(el); + if (el[type]) { + + // remove from selection, if present. + var selIdx = _selection.indexOf(el[type]); + if (selIdx >= 0) { + _selection.splice(selIdx, 1); + } + + if (_unreg(el[type], map)) { + _each(el[type], function(kObj) { kObj.destroy() }); + } + + delete el[type]; + } + }; + + var _removeListener = function(el, type, evt, fn) { + el = _gel(el); + if (el[type]) { + el[type].off(evt, fn); + } + }; + + this.elementRemoved = function(el) { + this.destroyDraggable(el); + this.destroyDroppable(el); + }; + + /** + * Either completely remove drag functionality from the given element, or remove a specific event handler. If you + * call this method with a single argument - the element - all drag functionality is removed from it. Otherwise, if + * you provide an event name and listener function, this function is de-registered (if found). + * @param el Element to update + * @param {string} [evt] Optional event name to unsubscribe + * @param {Function} [fn] Optional function to unsubscribe + */ + this.destroyDraggable = function(el, evt, fn) { + if (arguments.length === 1) { + _destroy(el, "_katavorioDrag", this._dragsByScope); + } else { + _removeListener(el, "_katavorioDrag", evt, fn); + } + }; + + /** + * Either completely remove drop functionality from the given element, or remove a specific event handler. If you + * call this method with a single argument - the element - all drop functionality is removed from it. Otherwise, if + * you provide an event name and listener function, this function is de-registered (if found). + * @param el Element to update + * @param {string} [evt] Optional event name to unsubscribe + * @param {Function} [fn] Optional function to unsubscribe + */ + this.destroyDroppable = function(el, evt, fn) { + if (arguments.length === 1) { + _destroy(el, "_katavorioDrop", this._dropsByScope); + } else { + _removeListener(el, "_katavorioDrop", evt, fn); + } + }; + + this.reset = function() { + this._dragsByScope = {}; + this._dropsByScope = {}; + _selection = []; + _selectionMap = {}; + _posses = {}; + }; + + // ----- groups + var _posses = {}; + + var _processOneSpec = function(el, _spec, dontAddExisting) { + var posseId = _isString(_spec) ? _spec : _spec.id; + var active = _isString(_spec) ? true : _spec.active !== false; + var posse = _posses[posseId] || (function() { + var g = {name:posseId, members:[]}; + _posses[posseId] = g; + return g; + })(); + _each(el, function(_el) { + if (_el._katavorioDrag) { + + if (dontAddExisting && _el._katavorioDrag.posseRoles[posse.name] != null) return; + + _suggest(posse.members, _el._katavorioDrag); + _suggest(_el._katavorioDrag.posses, posse.name); + _el._katavorioDrag.posseRoles[posse.name] = active; + } + }); + return posse; + }; + + /** + * Add the given element to the posse with the given id, creating the group if it at first does not exist. + * @method addToPosse + * @param {Element} el Element to add. + * @param {String...|Object...} spec Variable args parameters. Each argument can be a either a String, indicating + * the ID of a Posse to which the element should be added as an active participant, or an Object containing + * `{ id:"posseId", active:false/true}`. In the latter case, if `active` is not provided it is assumed to be + * true. + * @returns {Posse|Posse[]} The Posse(s) to which the element(s) was/were added. + */ + this.addToPosse = function(el, spec) { + + var posses = []; + + for (var i = 1; i < arguments.length; i++) { + posses.push(_processOneSpec(el, arguments[i])); + } + + return posses.length === 1 ? posses[0] : posses; + }; + + /** + * Sets the posse(s) for the element with the given id, creating those that do not yet exist, and removing from + * the element any current Posses that are not specified by this method call. This method will not change the + * active/passive state if it is given a posse in which the element is already a member. + * @method setPosse + * @param {Element} el Element to set posse(s) on. + * @param {String...|Object...} spec Variable args parameters. Each argument can be a either a String, indicating + * the ID of a Posse to which the element should be added as an active participant, or an Object containing + * `{ id:"posseId", active:false/true}`. In the latter case, if `active` is not provided it is assumed to be + * true. + * @returns {Posse|Posse[]} The Posse(s) to which the element(s) now belongs. + */ + this.setPosse = function(el, spec) { + + var posses = []; + + for (var i = 1; i < arguments.length; i++) { + posses.push(_processOneSpec(el, arguments[i], true).name); + } + + _each(el, function(_el) { + if (_el._katavorioDrag) { + var diff = _difference(_el._katavorioDrag.posses, posses); + var p = []; + Array.prototype.push.apply(p, _el._katavorioDrag.posses); + for (var i = 0; i < diff.length; i++) { + this.removeFromPosse(_el, diff[i]); + } + } + }.bind(this)); + + return posses.length === 1 ? posses[0] : posses; + }; + + /** + * Remove the given element from the given posse(s). + * @method removeFromPosse + * @param {Element} el Element to remove. + * @param {String...} posseId Varargs parameter: one value for each posse to remove the element from. + */ + this.removeFromPosse = function(el, posseId) { + if (arguments.length < 2) throw new TypeError("No posse id provided for remove operation"); + for(var i = 1; i < arguments.length; i++) { + posseId = arguments[i]; + _each(el, function (_el) { + if (_el._katavorioDrag && _el._katavorioDrag.posses) { + var d = _el._katavorioDrag; + _each(posseId, function (p) { + _vanquish(_posses[p].members, d); + _vanquish(d.posses, p); + delete d.posseRoles[p]; + }); + } + }); + } + }; + + /** + * Remove the given element from all Posses to which it belongs. + * @method removeFromAllPosses + * @param {Element|Element[]} el Element to remove from Posses. + */ + this.removeFromAllPosses = function(el) { + _each(el, function(_el) { + if (_el._katavorioDrag && _el._katavorioDrag.posses) { + var d = _el._katavorioDrag; + _each(d.posses, function(p) { + _vanquish(_posses[p].members, d); + }); + d.posses.length = 0; + d.posseRoles = {}; + } + }); + }; + + /** + * Changes the participation state for the element in the Posse with the given ID. + * @param {Element|Element[]} el Element(s) to change state for. + * @param {String} posseId ID of the Posse to change element state for. + * @param {Boolean} state True to make active, false to make passive. + */ + this.setPosseState = function(el, posseId, state) { + var posse = _posses[posseId]; + if (posse) { + _each(el, function(_el) { + if (_el._katavorioDrag && _el._katavorioDrag.posses) { + _el._katavorioDrag.posseRoles[posse.name] = state; + } + }); + } + }; + + }; + + root.Katavorio.version = "1.0.0"; + + if (typeof exports !== "undefined") { + exports.Katavorio = root.Katavorio; + } + +}).call(typeof window !== 'undefined' ? window : this); + + +(function() { + + var root = this; + root.jsPlumbUtil = root.jsPlumbUtil || {}; + var jsPlumbUtil = root.jsPlumbUtil; + + if (typeof exports !=='undefined') { exports.jsPlumbUtil = jsPlumbUtil;} + + + function isArray(a) { + return Object.prototype.toString.call(a) === "[object Array]"; + } + jsPlumbUtil.isArray = isArray; + function isNumber(n) { + return Object.prototype.toString.call(n) === "[object Number]"; + } + jsPlumbUtil.isNumber = isNumber; + function isString(s) { + return typeof s === "string"; + } + jsPlumbUtil.isString = isString; + function isBoolean(s) { + return typeof s === "boolean"; + } + jsPlumbUtil.isBoolean = isBoolean; + function isNull(s) { + return s == null; + } + jsPlumbUtil.isNull = isNull; + function isObject(o) { + return o == null ? false : Object.prototype.toString.call(o) === "[object Object]"; + } + jsPlumbUtil.isObject = isObject; + function isDate(o) { + return Object.prototype.toString.call(o) === "[object Date]"; + } + jsPlumbUtil.isDate = isDate; + function isFunction(o) { + return Object.prototype.toString.call(o) === "[object Function]"; + } + jsPlumbUtil.isFunction = isFunction; + function isNamedFunction(o) { + return isFunction(o) && o.name != null && o.name.length > 0; + } + jsPlumbUtil.isNamedFunction = isNamedFunction; + function isEmpty(o) { + for (var i in o) { + if (o.hasOwnProperty(i)) { + return false; + } + } + return true; + } + jsPlumbUtil.isEmpty = isEmpty; + function clone(a) { + if (isString(a)) { + return "" + a; + } + else if (isBoolean(a)) { + return !!a; + } + else if (isDate(a)) { + return new Date(a.getTime()); + } + else if (isFunction(a)) { + return a; + } + else if (isArray(a)) { + var b = []; + for (var i = 0; i < a.length; i++) { + b.push(clone(a[i])); + } + return b; + } + else if (isObject(a)) { + var c = {}; + for (var j in a) { + c[j] = clone(a[j]); + } + return c; + } + else { + return a; + } + } + jsPlumbUtil.clone = clone; + function merge(a, b, collations, overwrites) { + // first change the collations array - if present - into a lookup table, because its faster. + var cMap = {}, ar, i, oMap = {}; + collations = collations || []; + overwrites = overwrites || []; + for (i = 0; i < collations.length; i++) { + cMap[collations[i]] = true; + } + for (i = 0; i < overwrites.length; i++) { + oMap[overwrites[i]] = true; + } + var c = clone(a); + for (i in b) { + if (c[i] == null || oMap[i]) { + c[i] = b[i]; + } + else if (isString(b[i]) || isBoolean(b[i])) { + if (!cMap[i]) { + c[i] = b[i]; // if we dont want to collate, just copy it in. + } + else { + ar = []; + // if c's object is also an array we can keep its values. + ar.push.apply(ar, isArray(c[i]) ? c[i] : [c[i]]); + ar.push.apply(ar, isBoolean(b[i]) ? b[i] : [b[i]]); + c[i] = ar; + } + } + else { + if (isArray(b[i])) { + ar = []; + // if c's object is also an array we can keep its values. + if (isArray(c[i])) { + ar.push.apply(ar, c[i]); + } + ar.push.apply(ar, b[i]); + c[i] = ar; + } + else if (isObject(b[i])) { + // overwrite c's value with an object if it is not already one. + if (!isObject(c[i])) { + c[i] = {}; + } + for (var j in b[i]) { + c[i][j] = b[i][j]; + } + } + } + } + return c; + } + jsPlumbUtil.merge = merge; + function replace(inObj, path, value) { + if (inObj == null) { + return; + } + var q = inObj, t = q; + path.replace(/([^\.])+/g, function (term, lc, pos, str) { + var array = term.match(/([^\[0-9]+){1}(\[)([0-9+])/), last = pos + term.length >= str.length, _getArray = function () { + return t[array[1]] || (function () { + t[array[1]] = []; + return t[array[1]]; + })(); + }; + if (last) { + // set term = value on current t, creating term as array if necessary. + if (array) { + _getArray()[array[3]] = value; + } + else { + t[term] = value; + } + } + else { + // set to current t[term], creating t[term] if necessary. + if (array) { + var a_1 = _getArray(); + t = a_1[array[3]] || (function () { + a_1[array[3]] = {}; + return a_1[array[3]]; + })(); + } + else { + t = t[term] || (function () { + t[term] = {}; + return t[term]; + })(); + } + } + return ""; + }); + return inObj; + } + jsPlumbUtil.replace = replace; + // + // chain a list of functions, supplied by [ object, method name, args ], and return on the first + // one that returns the failValue. if none return the failValue, return the successValue. + // + function functionChain(successValue, failValue, fns) { + for (var i = 0; i < fns.length; i++) { + var o = fns[i][0][fns[i][1]].apply(fns[i][0], fns[i][2]); + if (o === failValue) { + return o; + } + } + return successValue; + } + jsPlumbUtil.functionChain = functionChain; + /** + * + * Take the given model and expand out any parameters. 'functionPrefix' is optional, and if present, helps jsplumb figure out what to do if a value is a Function. + * if you do not provide it (and doNotExpandFunctions is null, or false), jsplumb will run the given values through any functions it finds, and use the function's + * output as the value in the result. if you do provide the prefix, only functions that are named and have this prefix + * will be executed; other functions will be passed as values to the output. + * + * @param model + * @param values + * @param functionPrefix + * @param doNotExpandFunctions + * @returns {any} + */ + function populate(model, values, functionPrefix, doNotExpandFunctions) { + // for a string, see if it has parameter matches, and if so, try to make the substitutions. + var getValue = function (fromString) { + var matches = fromString.match(/(\${.*?})/g); + if (matches != null) { + for (var i = 0; i < matches.length; i++) { + var val = values[matches[i].substring(2, matches[i].length - 1)] || ""; + if (val != null) { + fromString = fromString.replace(matches[i], val); + } + } + } + return fromString; + }; + // process one entry. + var _one = function (d) { + if (d != null) { + if (isString(d)) { + return getValue(d); + } + else if (isFunction(d) && !doNotExpandFunctions && (functionPrefix == null || (d.name || "").indexOf(functionPrefix) === 0)) { + return d(values); + } + else if (isArray(d)) { + var r = []; + for (var i = 0; i < d.length; i++) { + r.push(_one(d[i])); + } + return r; + } + else if (isObject(d)) { + var s = {}; + for (var j in d) { + s[j] = _one(d[j]); + } + return s; + } + else { + return d; + } + } + }; + return _one(model); + } + jsPlumbUtil.populate = populate; + function findWithFunction(a, f) { + if (a) { + for (var i = 0; i < a.length; i++) { + if (f(a[i])) { + return i; + } + } + } + return -1; + } + jsPlumbUtil.findWithFunction = findWithFunction; + function removeWithFunction(a, f) { + var idx = findWithFunction(a, f); + if (idx > -1) { + a.splice(idx, 1); + } + return idx !== -1; + } + jsPlumbUtil.removeWithFunction = removeWithFunction; + function remove(l, v) { + var idx = l.indexOf(v); + if (idx > -1) { + l.splice(idx, 1); + } + return idx !== -1; + } + jsPlumbUtil.remove = remove; + function addWithFunction(list, item, hashFunction) { + if (findWithFunction(list, hashFunction) === -1) { + list.push(item); + } + } + jsPlumbUtil.addWithFunction = addWithFunction; + function addToList(map, key, value, insertAtStart) { + var l = map[key]; + if (l == null) { + l = []; + map[key] = l; + } + l[insertAtStart ? "unshift" : "push"](value); + return l; + } + jsPlumbUtil.addToList = addToList; + function suggest(list, item, insertAtHead) { + if (list.indexOf(item) === -1) { + if (insertAtHead) { + list.unshift(item); + } + else { + list.push(item); + } + return true; + } + return false; + } + jsPlumbUtil.suggest = suggest; + // + // extends the given obj (which can be an array) with the given constructor function, prototype functions, and + // class members, any of which may be null. + // + function extend(child, parent, _protoFn) { + var i; + parent = isArray(parent) ? parent : [parent]; + var _copyProtoChain = function (focus) { + var proto = focus.__proto__; + while (proto != null) { + if (proto.prototype != null) { + for (var j in proto.prototype) { + if (proto.prototype.hasOwnProperty(j) && !child.prototype.hasOwnProperty(j)) { + child.prototype[j] = proto.prototype[j]; + } + } + proto = proto.prototype.__proto__; + } + else { + proto = null; + } + } + }; + for (i = 0; i < parent.length; i++) { + for (var j in parent[i].prototype) { + if (parent[i].prototype.hasOwnProperty(j) && !child.prototype.hasOwnProperty(j)) { + child.prototype[j] = parent[i].prototype[j]; + } + } + _copyProtoChain(parent[i]); + } + var _makeFn = function (name, protoFn) { + return function () { + for (i = 0; i < parent.length; i++) { + if (parent[i].prototype[name]) { + parent[i].prototype[name].apply(this, arguments); + } + } + return protoFn.apply(this, arguments); + }; + }; + var _oneSet = function (fns) { + for (var k in fns) { + child.prototype[k] = _makeFn(k, fns[k]); + } + }; + if (arguments.length > 2) { + for (i = 2; i < arguments.length; i++) { + _oneSet(arguments[i]); + } + } + return child; + } + jsPlumbUtil.extend = extend; + function uuid() { + return ('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + })); + } + jsPlumbUtil.uuid = uuid; + function fastTrim(s) { + if (s == null) { + return null; + } + var str = s.replace(/^\s\s*/, ''), ws = /\s/, i = str.length; + while (ws.test(str.charAt(--i))) { + } + return str.slice(0, i + 1); + } + jsPlumbUtil.fastTrim = fastTrim; + function each(obj, fn) { + obj = obj.length == null || typeof obj === "string" ? [obj] : obj; + for (var i = 0; i < obj.length; i++) { + fn(obj[i]); + } + } + jsPlumbUtil.each = each; + function map(obj, fn) { + var o = []; + for (var i = 0; i < obj.length; i++) { + o.push(fn(obj[i])); + } + return o; + } + jsPlumbUtil.map = map; + function mergeWithParents(type, map, parentAttribute) { + parentAttribute = parentAttribute || "parent"; + var _def = function (id) { + return id ? map[id] : null; + }; + var _parent = function (def) { + return def ? _def(def[parentAttribute]) : null; + }; + var _one = function (parent, def) { + if (parent == null) { + return def; + } + else { + var d_1 = merge(parent, def); + return _one(_parent(parent), d_1); + } + }; + var _getDef = function (t) { + if (t == null) { + return {}; + } + if (typeof t === "string") { + return _def(t); + } + else if (t.length) { + var done = false, i = 0, _dd = void 0; + while (!done && i < t.length) { + _dd = _getDef(t[i]); + if (_dd) { + done = true; + } + else { + i++; + } + } + return _dd; + } + }; + var d = _getDef(type); + if (d) { + return _one(_parent(d), d); + } + else { + return {}; + } + } + jsPlumbUtil.mergeWithParents = mergeWithParents; + jsPlumbUtil.logEnabled = true; + function log() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (jsPlumbUtil.logEnabled && typeof console !== "undefined") { + try { + var msg = arguments[arguments.length - 1]; + console.log(msg); + } + catch (e) { + } + } + } + jsPlumbUtil.log = log; + /** + * Wraps one function with another, creating a placeholder for the + * wrapped function if it was null. this is used to wrap the various + * drag/drop event functions - to allow jsPlumb to be notified of + * important lifecycle events without imposing itself on the user's + * drag/drop functionality. + * @method jsPlumbUtil.wrap + * @param {Function} wrappedFunction original function to wrap; may be null. + * @param {Function} newFunction function to wrap the original with. + * @param {Object} [returnOnThisValue] Optional. Indicates that the wrappedFunction should + * not be executed if the newFunction returns a value matching 'returnOnThisValue'. + * note that this is a simple comparison and only works for primitives right now. + */ + function wrap(wrappedFunction, newFunction, returnOnThisValue) { + return function () { + var r = null; + try { + if (newFunction != null) { + r = newFunction.apply(this, arguments); + } + } + catch (e) { + log("jsPlumb function failed : " + e); + } + if ((wrappedFunction != null) && (returnOnThisValue == null || (r !== returnOnThisValue))) { + try { + r = wrappedFunction.apply(this, arguments); + } + catch (e) { + log("wrapped function failed : " + e); + } + } + return r; + }; + } + jsPlumbUtil.wrap = wrap; + var EventGenerator = /** @class */ (function () { + function EventGenerator() { + var _this = this; + this._listeners = {}; + this.eventsSuspended = false; + this.tick = false; + // this is a list of events that should re-throw any errors that occur during their dispatch. + this.eventsToDieOn = { "ready": true }; + this.queue = []; + this.bind = function (event, listener, insertAtStart) { + var _one = function (evt) { + addToList(_this._listeners, evt, listener, insertAtStart); + listener.__jsPlumb = listener.__jsPlumb || {}; + listener.__jsPlumb[uuid()] = evt; + }; + if (typeof event === "string") { + _one(event); + } + else if (event.length != null) { + for (var i = 0; i < event.length; i++) { + _one(event[i]); + } + } + return _this; + }; + this.fire = function (event, value, originalEvent) { + if (!this.tick) { + this.tick = true; + if (!this.eventsSuspended && this._listeners[event]) { + var l = this._listeners[event].length, i = 0, _gone = false, ret = null; + if (!this.shouldFireEvent || this.shouldFireEvent(event, value, originalEvent)) { + while (!_gone && i < l && ret !== false) { + // doing it this way rather than catching and then possibly re-throwing means that an error propagated by this + // method will have the whole call stack available in the debugger. + if (this.eventsToDieOn[event]) { + this._listeners[event][i].apply(this, [value, originalEvent]); + } + else { + try { + ret = this._listeners[event][i].apply(this, [value, originalEvent]); + } + catch (e) { + log("jsPlumb: fire failed for event " + event + " : " + e); + } + } + i++; + if (this._listeners == null || this._listeners[event] == null) { + _gone = true; + } + } + } + } + this.tick = false; + this._drain(); + } + else { + this.queue.unshift(arguments); + } + return this; + }; + this._drain = function () { + var n = _this.queue.pop(); + if (n) { + _this.fire.apply(_this, n); + } + }; + this.unbind = function (eventOrListener, listener) { + if (arguments.length === 0) { + this._listeners = {}; + } + else if (arguments.length === 1) { + if (typeof eventOrListener === "string") { + delete this._listeners[eventOrListener]; + } + else if (eventOrListener.__jsPlumb) { + var evt = void 0; + for (var i in eventOrListener.__jsPlumb) { + evt = eventOrListener.__jsPlumb[i]; + remove(this._listeners[evt] || [], eventOrListener); + } + } + } + else if (arguments.length === 2) { + remove(this._listeners[eventOrListener] || [], listener); + } + return this; + }; + this.getListener = function (forEvent) { + return _this._listeners[forEvent]; + }; + this.setSuspendEvents = function (val) { + _this.eventsSuspended = val; + }; + this.isSuspendEvents = function () { + return _this.eventsSuspended; + }; + this.silently = function (fn) { + _this.setSuspendEvents(true); + try { + fn(); + } + catch (e) { + log("Cannot execute silent function " + e); + } + _this.setSuspendEvents(false); + }; + this.cleanupListeners = function () { + for (var i in _this._listeners) { + _this._listeners[i] = null; + } + }; + } + return EventGenerator; + }()); + jsPlumbUtil.EventGenerator = EventGenerator; + +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains utility functions that run in browsers only. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ + ;(function() { + + "use strict"; + + var root = this; + + root.jsPlumbUtil.matchesSelector = function(el, selector, ctx) { + ctx = ctx || el.parentNode; + var possibles = ctx.querySelectorAll(selector); + for (var i = 0; i < possibles.length; i++) { + if (possibles[i] === el) { + return true; + } + } + return false; + }; + + root.jsPlumbUtil.consume = function(e, doNotPreventDefault) { + if (e.stopPropagation) { + e.stopPropagation(); + } + else { + e.returnValue = false; + } + + if (!doNotPreventDefault && e.preventDefault){ + e.preventDefault(); + } + }; + + /* + * Function: sizeElement + * Helper to size and position an element. You would typically use + * this when writing your own Connector or Endpoint implementation. + * + * Parameters: + * x - [int] x position for the element origin + * y - [int] y position for the element origin + * w - [int] width of the element + * h - [int] height of the element + * + */ + root.jsPlumbUtil.sizeElement = function(el, x, y, w, h) { + if (el) { + el.style.height = h + "px"; + el.height = h; + el.style.width = w + "px"; + el.width = w; + el.style.left = x + "px"; + el.style.top = y + "px"; + } + }; + + }).call(typeof window !== 'undefined' ? window : this); + +/* + * This file contains the core code. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +;(function () { + + "use strict"; + + var root = this; + + var _ju = root.jsPlumbUtil, + + /** + * creates a timestamp, using milliseconds since 1970, but as a string. + */ + _timestamp = function () { + return "" + (new Date()).getTime(); + }, + + // helper method to update the hover style whenever it, or paintStyle, changes. + // we use paintStyle as the foundation and merge hoverPaintStyle over the + // top. + _updateHoverStyle = function (component) { + if (component._jsPlumb.paintStyle && component._jsPlumb.hoverPaintStyle) { + var mergedHoverStyle = {}; + jsPlumb.extend(mergedHoverStyle, component._jsPlumb.paintStyle); + jsPlumb.extend(mergedHoverStyle, component._jsPlumb.hoverPaintStyle); + delete component._jsPlumb.hoverPaintStyle; + // we want the fill of paintStyle to override a gradient, if possible. + if (mergedHoverStyle.gradient && component._jsPlumb.paintStyle.fill) { + delete mergedHoverStyle.gradient; + } + component._jsPlumb.hoverPaintStyle = mergedHoverStyle; + } + }, + events = ["tap", "dbltap", "click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "contextmenu" ], + eventFilters = { "mouseout": "mouseleave", "mouseexit": "mouseleave" }, + _updateAttachedElements = function (component, state, timestamp, sourceElement) { + var affectedElements = component.getAttachedElements(); + if (affectedElements) { + for (var i = 0, j = affectedElements.length; i < j; i++) { + if (!sourceElement || sourceElement !== affectedElements[i]) { + affectedElements[i].setHover(state, true, timestamp); // tell the attached elements not to inform their own attached elements. + } + } + } + }, + _splitType = function (t) { + return t == null ? null : t.split(" "); + }, + _mapType = function(map, obj, typeId) { + for (var i in obj) { + map[i] = typeId; + } + }, + _each = function(fn, obj) { + obj = _ju.isArray(obj) || (obj.length != null && !_ju.isString(obj)) ? obj : [ obj ]; + for (var i = 0; i < obj.length; i++) { + try { + fn.apply(obj[i], [ obj[i] ]); + } + catch (e) { + _ju.log(".each iteration failed : " + e); + } + } + }, + _applyTypes = function (component, params, doNotRepaint) { + if (component.getDefaultType) { + var td = component.getTypeDescriptor(), map = {}; + var defType = component.getDefaultType(); + var o = _ju.merge({}, defType); + _mapType(map, defType, "__default"); + for (var i = 0, j = component._jsPlumb.types.length; i < j; i++) { + var tid = component._jsPlumb.types[i]; + if (tid !== "__default") { + var _t = component._jsPlumb.instance.getType(tid, td); + if (_t != null) { + o = _ju.merge(o, _t, [ "cssClass" ], [ "connector" ]); + _mapType(map, _t, tid); + } + } + } + + if (params) { + o = _ju.populate(o, params, "_"); + } + + component.applyType(o, doNotRepaint, map); + if (!doNotRepaint) { + component.repaint(); + } + } + }, + +// ------------------------------ BEGIN jsPlumbUIComponent -------------------------------------------- + + jsPlumbUIComponent = root.jsPlumbUIComponent = function (params) { + + _ju.EventGenerator.apply(this, arguments); + + var self = this, + a = arguments, + idPrefix = self.idPrefix, + id = idPrefix + (new Date()).getTime(); + + this._jsPlumb = { + instance: params._jsPlumb, + parameters: params.parameters || {}, + paintStyle: null, + hoverPaintStyle: null, + paintStyleInUse: null, + hover: false, + beforeDetach: params.beforeDetach, + beforeDrop: params.beforeDrop, + overlayPlacements: [], + hoverClass: params.hoverClass || params._jsPlumb.Defaults.HoverClass, + types: [], + typeCache:{} + }; + + this.cacheTypeItem = function(key, item, typeId) { + this._jsPlumb.typeCache[typeId] = this._jsPlumb.typeCache[typeId] || {}; + this._jsPlumb.typeCache[typeId][key] = item; + }; + this.getCachedTypeItem = function(key, typeId) { + return this._jsPlumb.typeCache[typeId] ? this._jsPlumb.typeCache[typeId][key] : null; + }; + + this.getId = function () { + return id; + }; + +// ----------------------------- default type -------------------------------------------- + + + var o = params.overlays || [], oo = {}; + if (this.defaultOverlayKeys) { + for (var i = 0; i < this.defaultOverlayKeys.length; i++) { + Array.prototype.push.apply(o, this._jsPlumb.instance.Defaults[this.defaultOverlayKeys[i]] || []); + } + + for (i = 0; i < o.length; i++) { + // if a string, convert to object representation so that we can store the typeid on it. + // also assign an id. + var fo = jsPlumb.convertToFullOverlaySpec(o[i]); + oo[fo[1].id] = fo; + } + } + + var _defaultType = { + overlays:oo, + parameters: params.parameters || {}, + scope: params.scope || this._jsPlumb.instance.getDefaultScope() + }; + this.getDefaultType = function() { + return _defaultType; + }; + this.appendToDefaultType = function(obj) { + for (var i in obj) { + _defaultType[i] = obj[i]; + } + }; + +// ----------------------------- end default type -------------------------------------------- + + // all components can generate events + + if (params.events) { + for (var evtName in params.events) { + self.bind(evtName, params.events[evtName]); + } + } + + // all components get this clone function. + // TODO issue 116 showed a problem with this - it seems 'a' that is in + // the clone function's scope is shared by all invocations of it, the classic + // JS closure problem. for now, jsPlumb does a version of this inline where + // it used to call clone. but it would be nice to find some time to look + // further at this. + this.clone = function () { + var o = Object.create(this.constructor.prototype); + this.constructor.apply(o, a); + return o; + }.bind(this); + + // user can supply a beforeDetach callback, which will be executed before a detach + // is performed; returning false prevents the detach. + this.isDetachAllowed = function (connection) { + var r = true; + if (this._jsPlumb.beforeDetach) { + try { + r = this._jsPlumb.beforeDetach(connection); + } + catch (e) { + _ju.log("jsPlumb: beforeDetach callback failed", e); + } + } + return r; + }; + + // user can supply a beforeDrop callback, which will be executed before a dropped + // connection is confirmed. user can return false to reject connection. + this.isDropAllowed = function (sourceId, targetId, scope, connection, dropEndpoint, source, target) { + var r = this._jsPlumb.instance.checkCondition("beforeDrop", { + sourceId: sourceId, + targetId: targetId, + scope: scope, + connection: connection, + dropEndpoint: dropEndpoint, + source: source, target: target + }); + if (this._jsPlumb.beforeDrop) { + try { + r = this._jsPlumb.beforeDrop({ + sourceId: sourceId, + targetId: targetId, + scope: scope, + connection: connection, + dropEndpoint: dropEndpoint, + source: source, target: target + }); + } + catch (e) { + _ju.log("jsPlumb: beforeDrop callback failed", e); + } + } + return r; + }; + + var domListeners = []; + + // sets the component associated with listener events. for instance, an overlay delegates + // its events back to a connector. but if the connector is swapped on the underlying connection, + // then this component must be changed. This is called by setConnector in the Connection class. + this.setListenerComponent = function (c) { + for (var i = 0; i < domListeners.length; i++) { + domListeners[i][3] = c; + } + }; + + + }; + + var _removeTypeCssHelper = function (component, typeIndex) { + var typeId = component._jsPlumb.types[typeIndex], + type = component._jsPlumb.instance.getType(typeId, component.getTypeDescriptor()); + + if (type != null && type.cssClass && component.canvas) { + component._jsPlumb.instance.removeClass(component.canvas, type.cssClass); + } + }; + + _ju.extend(root.jsPlumbUIComponent, _ju.EventGenerator, { + + getParameter: function (name) { + return this._jsPlumb.parameters[name]; + }, + + setParameter: function (name, value) { + this._jsPlumb.parameters[name] = value; + }, + + getParameters: function () { + return this._jsPlumb.parameters; + }, + + setParameters: function (p) { + this._jsPlumb.parameters = p; + }, + + getClass:function() { + return jsPlumb.getClass(this.canvas); + }, + + hasClass:function(clazz) { + return jsPlumb.hasClass(this.canvas, clazz); + }, + + addClass: function (clazz) { + jsPlumb.addClass(this.canvas, clazz); + }, + + removeClass: function (clazz) { + jsPlumb.removeClass(this.canvas, clazz); + }, + + updateClasses: function (classesToAdd, classesToRemove) { + jsPlumb.updateClasses(this.canvas, classesToAdd, classesToRemove); + }, + + setType: function (typeId, params, doNotRepaint) { + this.clearTypes(); + this._jsPlumb.types = _splitType(typeId) || []; + _applyTypes(this, params, doNotRepaint); + }, + + getType: function () { + return this._jsPlumb.types; + }, + + reapplyTypes: function (params, doNotRepaint) { + _applyTypes(this, params, doNotRepaint); + }, + + hasType: function (typeId) { + return this._jsPlumb.types.indexOf(typeId) !== -1; + }, + + addType: function (typeId, params, doNotRepaint) { + var t = _splitType(typeId), _cont = false; + if (t != null) { + for (var i = 0, j = t.length; i < j; i++) { + if (!this.hasType(t[i])) { + this._jsPlumb.types.push(t[i]); + _cont = true; + } + } + if (_cont) { + _applyTypes(this, params, doNotRepaint); + } + } + }, + + removeType: function (typeId, params, doNotRepaint) { + var t = _splitType(typeId), _cont = false, _one = function (tt) { + var idx = this._jsPlumb.types.indexOf(tt); + if (idx !== -1) { + // remove css class if necessary + _removeTypeCssHelper(this, idx); + this._jsPlumb.types.splice(idx, 1); + return true; + } + return false; + }.bind(this); + + if (t != null) { + for (var i = 0, j = t.length; i < j; i++) { + _cont = _one(t[i]) || _cont; + } + if (_cont) { + _applyTypes(this, params, doNotRepaint); + } + } + }, + clearTypes: function (params, doNotRepaint) { + var i = this._jsPlumb.types.length; + for (var j = 0; j < i; j++) { + _removeTypeCssHelper(this, 0); + this._jsPlumb.types.splice(0, 1); + } + _applyTypes(this, params, doNotRepaint); + }, + + toggleType: function (typeId, params, doNotRepaint) { + var t = _splitType(typeId); + if (t != null) { + for (var i = 0, j = t.length; i < j; i++) { + var idx = this._jsPlumb.types.indexOf(t[i]); + if (idx !== -1) { + _removeTypeCssHelper(this, idx); + this._jsPlumb.types.splice(idx, 1); + } + else { + this._jsPlumb.types.push(t[i]); + } + } + + _applyTypes(this, params, doNotRepaint); + } + }, + applyType: function (t, doNotRepaint) { + this.setPaintStyle(t.paintStyle, doNotRepaint); + this.setHoverPaintStyle(t.hoverPaintStyle, doNotRepaint); + if (t.parameters) { + for (var i in t.parameters) { + this.setParameter(i, t.parameters[i]); + } + } + this._jsPlumb.paintStyleInUse = this.getPaintStyle(); + }, + setPaintStyle: function (style, doNotRepaint) { + // this._jsPlumb.paintStyle = jsPlumb.extend({}, style); + // TODO figure out if we want components to clone paintStyle so as not to share it. + this._jsPlumb.paintStyle = style; + this._jsPlumb.paintStyleInUse = this._jsPlumb.paintStyle; + _updateHoverStyle(this); + if (!doNotRepaint) { + this.repaint(); + } + }, + getPaintStyle: function () { + return this._jsPlumb.paintStyle; + }, + setHoverPaintStyle: function (style, doNotRepaint) { + //this._jsPlumb.hoverPaintStyle = jsPlumb.extend({}, style); + // TODO figure out if we want components to clone paintStyle so as not to share it. + this._jsPlumb.hoverPaintStyle = style; + _updateHoverStyle(this); + if (!doNotRepaint) { + this.repaint(); + } + }, + getHoverPaintStyle: function () { + return this._jsPlumb.hoverPaintStyle; + }, + destroy: function (force) { + if (force || this.typeId == null) { + this.cleanupListeners(); // this is on EventGenerator + this.clone = null; + this._jsPlumb = null; + } + }, + + isHover: function () { + return this._jsPlumb.hover; + }, + + setHover: function (hover, ignoreAttachedElements, timestamp) { + // while dragging, we ignore these events. this keeps the UI from flashing and + // swishing and whatevering. + if (this._jsPlumb && !this._jsPlumb.instance.currentlyDragging && !this._jsPlumb.instance.isHoverSuspended()) { + + this._jsPlumb.hover = hover; + var method = hover ? "addClass" : "removeClass"; + + if (this.canvas != null) { + if (this._jsPlumb.instance.hoverClass != null) { + this._jsPlumb.instance[method](this.canvas, this._jsPlumb.instance.hoverClass); + } + if (this._jsPlumb.hoverClass != null) { + this._jsPlumb.instance[method](this.canvas, this._jsPlumb.hoverClass); + } + } + if (this._jsPlumb.hoverPaintStyle != null) { + this._jsPlumb.paintStyleInUse = hover ? this._jsPlumb.hoverPaintStyle : this._jsPlumb.paintStyle; + if (!this._jsPlumb.instance.isSuspendDrawing()) { + timestamp = timestamp || _timestamp(); + this.repaint({timestamp: timestamp, recalc: false}); + } + } + // get the list of other affected elements, if supported by this component. + // for a connection, its the endpoints. for an endpoint, its the connections! surprise. + if (this.getAttachedElements && !ignoreAttachedElements) { + _updateAttachedElements(this, hover, _timestamp(), this); + } + } + } + }); + +// ------------------------------ END jsPlumbUIComponent -------------------------------------------- + + var _jsPlumbInstanceIndex = 0, + getInstanceIndex = function () { + var i = _jsPlumbInstanceIndex + 1; + _jsPlumbInstanceIndex++; + return i; + }; + + var jsPlumbInstance = root.jsPlumbInstance = function (_defaults) { + + this.version = "2.9.3"; + + this.Defaults = { + Anchor: "Bottom", + Anchors: [ null, null ], + ConnectionsDetachable: true, + ConnectionOverlays: [ ], + Connector: "Bezier", + Container: null, + DoNotThrowErrors: false, + DragOptions: { }, + DropOptions: { }, + Endpoint: "Dot", + EndpointOverlays: [ ], + Endpoints: [ null, null ], + EndpointStyle: { fill: "#456" }, + EndpointStyles: [ null, null ], + EndpointHoverStyle: null, + EndpointHoverStyles: [ null, null ], + HoverPaintStyle: null, + LabelStyle: { color: "black" }, + LogEnabled: false, + Overlays: [ ], + MaxConnections: 1, + PaintStyle: { "stroke-width": 4, stroke: "#456" }, + ReattachConnections: false, + RenderMode: "svg", + Scope: "jsPlumb_DefaultScope" + }; + + if (_defaults) { + jsPlumb.extend(this.Defaults, _defaults); + } + + this.logEnabled = this.Defaults.LogEnabled; + this._connectionTypes = {}; + this._endpointTypes = {}; + + _ju.EventGenerator.apply(this); + + var _currentInstance = this, + _instanceIndex = getInstanceIndex(), + _bb = _currentInstance.bind, + _initialDefaults = {}, + _zoom = 1, + _info = function (el) { + if (el == null) { + return null; + } + else if (el.nodeType === 3 || el.nodeType === 8) { + return { el:el, text:true }; + } + else { + var _el = _currentInstance.getElement(el); + return { el: _el, id: (_ju.isString(el) && _el == null) ? el : _getId(_el) }; + } + }; + + this.getInstanceIndex = function () { + return _instanceIndex; + }; + + // CONVERTED + this.setZoom = function (z, repaintEverything) { + _zoom = z; + _currentInstance.fire("zoom", _zoom); + if (repaintEverything) { + _currentInstance.repaintEverything(); + } + return true; + }; + // CONVERTED + this.getZoom = function () { + return _zoom; + }; + + for (var i in this.Defaults) { + _initialDefaults[i] = this.Defaults[i]; + } + + var _container, _containerDelegations = []; + this.unbindContainer = function() { + if (_container != null && _containerDelegations.length > 0) { + for (var i = 0; i < _containerDelegations.length; i++) { + _currentInstance.off(_container, _containerDelegations[i][0], _containerDelegations[i][1]); + } + } + }; + this.setContainer = function (c) { + + this.unbindContainer(); + + // get container as dom element. + c = this.getElement(c); + // move existing connections and endpoints, if any. + this.select().each(function (conn) { + conn.moveParent(c); + }); + this.selectEndpoints().each(function (ep) { + ep.moveParent(c); + }); + + // set container. + var previousContainer = _container; + _container = c; + _containerDelegations.length = 0; + var eventAliases = { + "endpointclick":"endpointClick", + "endpointdblclick":"endpointDblClick" + }; + + var _oneDelegateHandler = function (id, e, componentType) { + var t = e.srcElement || e.target, + jp = (t && t.parentNode ? t.parentNode._jsPlumb : null) || (t ? t._jsPlumb : null) || (t && t.parentNode && t.parentNode.parentNode ? t.parentNode.parentNode._jsPlumb : null); + if (jp) { + jp.fire(id, jp, e); + var alias = componentType ? eventAliases[componentType + id] || id : id; + // jsplumb also fires every event coming from components/overlays. That's what the test for `jp.component` is for. + _currentInstance.fire(alias, jp.component || jp, e); + } + }; + + var _addOneDelegate = function(eventId, selector, fn) { + _containerDelegations.push([eventId, fn]); + _currentInstance.on(_container, eventId, selector, fn); + }; + + // delegate one event on the container to jsplumb elements. it might be possible to + // abstract this out: each of endpoint, connection and overlay could register themselves with + // jsplumb as "component types" or whatever, and provide a suitable selector. this would be + // done by the renderer (although admittedly from 2.0 onwards we're not supporting vml anymore) + var _oneDelegate = function (id) { + // connections. + _addOneDelegate(id, ".jtk-connector", function (e) { + _oneDelegateHandler(id, e); + }); + // endpoints. note they can have an enclosing div, or not. + _addOneDelegate(id, ".jtk-endpoint", function (e) { + _oneDelegateHandler(id, e, "endpoint"); + }); + // overlays + _addOneDelegate(id, ".jtk-overlay", function (e) { + _oneDelegateHandler(id, e); + }); + }; + + for (var i = 0; i < events.length; i++) { + _oneDelegate(events[i]); + } + + // managed elements + for (var elId in managedElements) { + var el = managedElements[elId].el; + if (el.parentNode === previousContainer) { + previousContainer.removeChild(el); + _container.appendChild(el); + } + } + + }; + this.getContainer = function () { + return _container; + }; + + this.bind = function (event, fn) { + if ("ready" === event && initialized) { + fn(); + } + else { + _bb.apply(_currentInstance, [event, fn]); + } + }; + + _currentInstance.importDefaults = function (d) { + for (var i in d) { + _currentInstance.Defaults[i] = d[i]; + } + if (d.Container) { + _currentInstance.setContainer(d.Container); + } + + return _currentInstance; + }; + + _currentInstance.restoreDefaults = function () { + _currentInstance.Defaults = jsPlumb.extend({}, _initialDefaults); + return _currentInstance; + }; + + var log = null, + initialized = false, + // TODO remove from window scope + connections = [], + // map of element id -> endpoint lists. an element can have an arbitrary + // number of endpoints on it, and not all of them have to be connected + // to anything. + endpointsByElement = {}, + endpointsByUUID = {}, + managedElements = {}, + offsets = {}, + offsetTimestamps = {}, + draggableStates = {}, + connectionBeingDragged = false, + sizes = [], + _suspendDrawing = false, + _suspendedAt = null, + DEFAULT_SCOPE = this.Defaults.Scope, + _curIdStamp = 1, + _idstamp = function () { + return "" + _curIdStamp++; + }, + + // + // appends an element to some other element, which is calculated as follows: + // + // 1. if Container exists, use that element. + // 2. if the 'parent' parameter exists, use that. + // 3. otherwise just use the root element. + // + // + _appendElement = function (el, parent) { + if (_container) { + _container.appendChild(el); + } + else if (!parent) { + this.appendToRoot(el); + } + else { + this.getElement(parent).appendChild(el); + } + }.bind(this), + + // + // Draws an endpoint and its connections. this is the main entry point into drawing connections as well + // as endpoints, since jsPlumb is endpoint-centric under the hood. + // + // @param element element to draw (of type library specific element object) + // @param ui UI object from current library's event system. optional. + // @param timestamp timestamp for this paint cycle. used to speed things up a little by cutting down the amount of offset calculations we do. + // @param clearEdits defaults to false; indicates that mouse edits for connectors should be cleared + /// + _draw = function (element, ui, timestamp, clearEdits) { + + if (!_suspendDrawing) { + var id = _getId(element), + repaintEls, + dm = _currentInstance.getDragManager(); + + if (dm) { + repaintEls = dm.getElementsForDraggable(id); + } + + if (timestamp == null) { + timestamp = _timestamp(); + } + + // update the offset of everything _before_ we try to draw anything. + var o = _updateOffset({ elId: id, offset: ui, recalc: false, timestamp: timestamp }); + + if (repaintEls && o && o.o) { + for (var i in repaintEls) { + _updateOffset({ + elId: repaintEls[i].id, + offset: { + left: o.o.left + repaintEls[i].offset.left, + top: o.o.top + repaintEls[i].offset.top + }, + recalc: false, + timestamp: timestamp + }); + } + } + + _currentInstance.anchorManager.redraw(id, ui, timestamp, null, clearEdits); + + if (repaintEls) { + for (var j in repaintEls) { + _currentInstance.anchorManager.redraw(repaintEls[j].id, ui, timestamp, repaintEls[j].offset, clearEdits, true); + } + } + } + }, + + // + // gets an Endpoint by uuid. + // + _getEndpoint = function (uuid) { + return endpointsByUUID[uuid]; + }, + + /** + * inits a draggable if it's not already initialised. + * TODO: somehow abstract this to the adapter, because the concept of "draggable" has no + * place on the server. + */ + + + _scopeMatch = function (e1, e2) { + var s1 = e1.scope.split(/\s/), s2 = e2.scope.split(/\s/); + for (var i = 0; i < s1.length; i++) { + for (var j = 0; j < s2.length; j++) { + if (s2[j] === s1[i]) { + return true; + } + } + } + + return false; + }, + + _mergeOverrides = function (def, values) { + var m = jsPlumb.extend({}, def); + for (var i in values) { + if (values[i]) { + m[i] = values[i]; + } + } + return m; + }, + + /* + * prepares a final params object that can be passed to _newConnection, taking into account defaults, events, etc. + */ + _prepareConnectionParams = function (params, referenceParams) { + var _p = jsPlumb.extend({ }, params); + if (referenceParams) { + jsPlumb.extend(_p, referenceParams); + } + + // hotwire endpoints passed as source or target to sourceEndpoint/targetEndpoint, respectively. + if (_p.source) { + if (_p.source.endpoint) { + _p.sourceEndpoint = _p.source; + } + else { + _p.source = _currentInstance.getElement(_p.source); + } + } + if (_p.target) { + if (_p.target.endpoint) { + _p.targetEndpoint = _p.target; + } + else { + _p.target = _currentInstance.getElement(_p.target); + } + } + + // test for endpoint uuids to connect + if (params.uuids) { + _p.sourceEndpoint = _getEndpoint(params.uuids[0]); + _p.targetEndpoint = _getEndpoint(params.uuids[1]); + } + + // now ensure that if we do have Endpoints already, they're not full. + // source: + if (_p.sourceEndpoint && _p.sourceEndpoint.isFull()) { + _ju.log(_currentInstance, "could not add connection; source endpoint is full"); + return; + } + + // target: + if (_p.targetEndpoint && _p.targetEndpoint.isFull()) { + _ju.log(_currentInstance, "could not add connection; target endpoint is full"); + return; + } + + // if source endpoint mandates connection type and nothing specified in our params, use it. + if (!_p.type && _p.sourceEndpoint) { + _p.type = _p.sourceEndpoint.connectionType; + } + + // copy in any connectorOverlays that were specified on the source endpoint. + // it doesnt copy target endpoint overlays. i'm not sure if we want it to or not. + if (_p.sourceEndpoint && _p.sourceEndpoint.connectorOverlays) { + _p.overlays = _p.overlays || []; + for (var i = 0, j = _p.sourceEndpoint.connectorOverlays.length; i < j; i++) { + _p.overlays.push(_p.sourceEndpoint.connectorOverlays[i]); + } + } + + // scope + if (_p.sourceEndpoint && _p.sourceEndpoint.scope) { + _p.scope = _p.sourceEndpoint.scope; + } + + // pointer events + if (!_p["pointer-events"] && _p.sourceEndpoint && _p.sourceEndpoint.connectorPointerEvents) { + _p["pointer-events"] = _p.sourceEndpoint.connectorPointerEvents; + } + + + var _addEndpoint = function (el, def, idx) { + return _currentInstance.addEndpoint(el, _mergeOverrides(def, { + anchor: _p.anchors ? _p.anchors[idx] : _p.anchor, + endpoint: _p.endpoints ? _p.endpoints[idx] : _p.endpoint, + paintStyle: _p.endpointStyles ? _p.endpointStyles[idx] : _p.endpointStyle, + hoverPaintStyle: _p.endpointHoverStyles ? _p.endpointHoverStyles[idx] : _p.endpointHoverStyle + })); + }; + + // check for makeSource/makeTarget specs. + + var _oneElementDef = function (type, idx, defs, matchType) { + if (_p[type] && !_p[type].endpoint && !_p[type + "Endpoint"] && !_p.newConnection) { + var tid = _getId(_p[type]), tep = defs[tid]; + + tep = tep ? tep[matchType] : null; + + if (tep) { + // if not enabled, return. + if (!tep.enabled) { + return false; + } + var newEndpoint = tep.endpoint != null && tep.endpoint._jsPlumb ? tep.endpoint : _addEndpoint(_p[type], tep.def, idx); + if (newEndpoint.isFull()) { + return false; + } + _p[type + "Endpoint"] = newEndpoint; + if (!_p.scope && tep.def.scope) { + _p.scope = tep.def.scope; + } // provide scope if not already provided and endpoint def has one. + if (tep.uniqueEndpoint) { + if (!tep.endpoint) { + tep.endpoint = newEndpoint; + newEndpoint.setDeleteOnEmpty(false); + } + else { + newEndpoint.finalEndpoint = tep.endpoint; + } + } else { + newEndpoint.setDeleteOnEmpty(true); + } + + // + // copy in connector overlays if present on the source definition. + // + if (idx === 0 && tep.def.connectorOverlays) { + _p.overlays = _p.overlays || []; + Array.prototype.push.apply(_p.overlays, tep.def.connectorOverlays); + } + } + } + }; + + if (_oneElementDef("source", 0, this.sourceEndpointDefinitions, _p.type || "default") === false) { + return; + } + if (_oneElementDef("target", 1, this.targetEndpointDefinitions, _p.type || "default") === false) { + return; + } + + // last, ensure scopes match + if (_p.sourceEndpoint && _p.targetEndpoint) { + if (!_scopeMatch(_p.sourceEndpoint, _p.targetEndpoint)) { + _p = null; + } + } + + return _p; + }.bind(_currentInstance), + + _newConnection = function (params) { + var connectionFunc = _currentInstance.Defaults.ConnectionType || _currentInstance.getDefaultConnectionType(); + + params._jsPlumb = _currentInstance; + params.newConnection = _newConnection; + params.newEndpoint = _newEndpoint; + params.endpointsByUUID = endpointsByUUID; + params.endpointsByElement = endpointsByElement; + params.finaliseConnection = _finaliseConnection; + params.id = "con_" + _idstamp(); + var con = new connectionFunc(params); + + // if the connection is draggable, then maybe we need to tell the target endpoint to init the + // dragging code. it won't run again if it already configured to be draggable. + if (con.isDetachable()) { + con.endpoints[0].initDraggable("_jsPlumbSource"); + con.endpoints[1].initDraggable("_jsPlumbTarget"); + } + + return con; + }, + + // + // adds the connection to the backing model, fires an event if necessary and then redraws + // + _finaliseConnection = _currentInstance.finaliseConnection = function (jpc, params, originalEvent, doInformAnchorManager) { + params = params || {}; + // add to list of connections (by scope). + if (!jpc.suspendedEndpoint) { + connections.push(jpc); + } + + jpc.pending = null; + + // turn off isTemporarySource on the source endpoint (only viable on first draw) + jpc.endpoints[0].isTemporarySource = false; + + // always inform the anchor manager + // except that if jpc has a suspended endpoint it's not true to say the + // connection is new; it has just (possibly) moved. the question is whether + // to make that call here or in the anchor manager. i think perhaps here. + if (doInformAnchorManager !== false) { + _currentInstance.anchorManager.newConnection(jpc); + } + + // force a paint + _draw(jpc.source); + + // fire an event + if (!params.doNotFireConnectionEvent && params.fireEvent !== false) { + + var eventArgs = { + connection: jpc, + source: jpc.source, target: jpc.target, + sourceId: jpc.sourceId, targetId: jpc.targetId, + sourceEndpoint: jpc.endpoints[0], targetEndpoint: jpc.endpoints[1] + }; + + _currentInstance.fire("connection", eventArgs, originalEvent); + } + }, + + /* + factory method to prepare a new endpoint. this should always be used instead of creating Endpoints + manually, since this method attaches event listeners and an id. + */ + _newEndpoint = function (params, id) { + var endpointFunc = _currentInstance.Defaults.EndpointType || jsPlumb.Endpoint; + var _p = jsPlumb.extend({}, params); + _p._jsPlumb = _currentInstance; + _p.newConnection = _newConnection; + _p.newEndpoint = _newEndpoint; + _p.endpointsByUUID = endpointsByUUID; + _p.endpointsByElement = endpointsByElement; + _p.fireDetachEvent = fireDetachEvent; + _p.elementId = id || _getId(_p.source); + var ep = new endpointFunc(_p); + ep.id = "ep_" + _idstamp(); + _manage(_p.elementId, _p.source); + + if (!jsPlumb.headless) { + _currentInstance.getDragManager().endpointAdded(_p.source, id); + } + + return ep; + }, + + /* + * performs the given function operation on all the connections found + * for the given element id; this means we find all the endpoints for + * the given element, and then for each endpoint find the connectors + * connected to it. then we pass each connection in to the given + * function. + */ + _operation = function (elId, func, endpointFunc) { + var endpoints = endpointsByElement[elId]; + if (endpoints && endpoints.length) { + for (var i = 0, ii = endpoints.length; i < ii; i++) { + for (var j = 0, jj = endpoints[i].connections.length; j < jj; j++) { + var retVal = func(endpoints[i].connections[j]); + // if the function passed in returns true, we exit. + // most functions return false. + if (retVal) { + return; + } + } + if (endpointFunc) { + endpointFunc(endpoints[i]); + } + } + } + }, + + _setDraggable = function (element, draggable) { + return jsPlumb.each(element, function (el) { + if (_currentInstance.isDragSupported(el)) { + draggableStates[_currentInstance.getAttribute(el, "id")] = draggable; + _currentInstance.setElementDraggable(el, draggable); + } + }); + }, + /* + * private method to do the business of hiding/showing. + * + * @param el + * either Id of the element in question or a library specific + * object for the element. + * @param state + * String specifying a value for the css 'display' property + * ('block' or 'none'). + */ + _setVisible = function (el, state, alsoChangeEndpoints) { + state = state === "block"; + var endpointFunc = null; + if (alsoChangeEndpoints) { + endpointFunc = function (ep) { + ep.setVisible(state, true, true); + }; + } + var info = _info(el); + _operation(info.id, function (jpc) { + if (state && alsoChangeEndpoints) { + // this test is necessary because this functionality is new, and i wanted to maintain backwards compatibility. + // this block will only set a connection to be visible if the other endpoint in the connection is also visible. + var oidx = jpc.sourceId === info.id ? 1 : 0; + if (jpc.endpoints[oidx].isVisible()) { + jpc.setVisible(true); + } + } + else { // the default behaviour for show, and what always happens for hide, is to just set the visibility without getting clever. + jpc.setVisible(state); + } + }, endpointFunc); + }, + /** + * private method to do the business of toggling hiding/showing. + */ + _toggleVisible = function (elId, changeEndpoints) { + var endpointFunc = null; + if (changeEndpoints) { + endpointFunc = function (ep) { + var state = ep.isVisible(); + ep.setVisible(!state); + }; + } + _operation(elId, function (jpc) { + var state = jpc.isVisible(); + jpc.setVisible(!state); + }, endpointFunc); + }, + + // TODO comparison performance + _getCachedData = function (elId) { + var o = offsets[elId]; + if (!o) { + return _updateOffset({elId: elId}); + } + else { + return {o: o, s: sizes[elId]}; + } + }, + + /** + * gets an id for the given element, creating and setting one if + * necessary. the id is of the form + * + * jsPlumb__ + * + * where "index in instance" is a monotonically increasing integer that starts at 0, + * for each instance. this method is used not only to assign ids to elements that do not + * have them but also to connections and endpoints. + */ + _getId = function (element, uuid, doNotCreateIfNotFound) { + if (_ju.isString(element)) { + return element; + } + if (element == null) { + return null; + } + var id = _currentInstance.getAttribute(element, "id"); + if (!id || id === "undefined") { + // check if fixed uuid parameter is given + if (arguments.length === 2 && arguments[1] !== undefined) { + id = uuid; + } + else if (arguments.length === 1 || (arguments.length === 3 && !arguments[2])) { + id = "jsPlumb_" + _instanceIndex + "_" + _idstamp(); + } + + if (!doNotCreateIfNotFound) { + _currentInstance.setAttribute(element, "id", id); + } + } + return id; + }; + + this.setConnectionBeingDragged = function (v) { + connectionBeingDragged = v; + }; + this.isConnectionBeingDragged = function () { + return connectionBeingDragged; + }; + + /** + * Returns a map of all the elements this jsPlumbInstance is currently managing. + * @returns {Object} Map of [id-> {el, endpoint[], connection, position}] information. + */ + this.getManagedElements = function() { + return managedElements; + }; + + this.connectorClass = "jtk-connector"; + this.connectorOutlineClass = "jtk-connector-outline"; + this.connectedClass = "jtk-connected"; + this.hoverClass = "jtk-hover"; + this.endpointClass = "jtk-endpoint"; + this.endpointConnectedClass = "jtk-endpoint-connected"; + this.endpointFullClass = "jtk-endpoint-full"; + this.endpointDropAllowedClass = "jtk-endpoint-drop-allowed"; + this.endpointDropForbiddenClass = "jtk-endpoint-drop-forbidden"; + this.overlayClass = "jtk-overlay"; + this.draggingClass = "jtk-dragging";// CONVERTED + this.elementDraggingClass = "jtk-element-dragging";// CONVERTED + this.sourceElementDraggingClass = "jtk-source-element-dragging"; // CONVERTED + this.targetElementDraggingClass = "jtk-target-element-dragging";// CONVERTED + this.endpointAnchorClassPrefix = "jtk-endpoint-anchor"; + this.hoverSourceClass = "jtk-source-hover"; + this.hoverTargetClass = "jtk-target-hover"; + this.dragSelectClass = "jtk-drag-select"; + + this.Anchors = {}; + this.Connectors = { "svg": {} }; + this.Endpoints = { "svg": {} }; + this.Overlays = { "svg": {} } ; + this.ConnectorRenderers = {}; + this.SVG = "svg"; + +// --------------------------- jsPlumbInstance public API --------------------------------------------------------- + + + this.addEndpoint = function (el, params, referenceParams) { + referenceParams = referenceParams || {}; + var p = jsPlumb.extend({}, referenceParams); + jsPlumb.extend(p, params); + p.endpoint = p.endpoint || _currentInstance.Defaults.Endpoint; + p.paintStyle = p.paintStyle || _currentInstance.Defaults.EndpointStyle; + + var results = [], + inputs = (_ju.isArray(el) || (el.length != null && !_ju.isString(el))) ? el : [ el ]; + + for (var i = 0, j = inputs.length; i < j; i++) { + p.source = _currentInstance.getElement(inputs[i]); + _ensureContainer(p.source); + + var id = _getId(p.source), e = _newEndpoint(p, id); + + // ensure element is managed. + var myOffset = _manage(id, p.source).info.o; + _ju.addToList(endpointsByElement, id, e); + + if (!_suspendDrawing) { + e.paint({ + anchorLoc: e.anchor.compute({ xy: [ myOffset.left, myOffset.top ], wh: sizes[id], element: e, timestamp: _suspendedAt }), + timestamp: _suspendedAt + }); + } + + results.push(e); + } + + return results.length === 1 ? results[0] : results; + }; + + this.addEndpoints = function (el, endpoints, referenceParams) { + var results = []; + for (var i = 0, j = endpoints.length; i < j; i++) { + var e = _currentInstance.addEndpoint(el, endpoints[i], referenceParams); + if (_ju.isArray(e)) { + Array.prototype.push.apply(results, e); + } + else { + results.push(e); + } + } + return results; + }; + + this.animate = function (el, properties, options) { + if (!this.animationSupported) { + return false; + } + + options = options || {}; + var del = _currentInstance.getElement(el), + id = _getId(del), + stepFunction = jsPlumb.animEvents.step, + completeFunction = jsPlumb.animEvents.complete; + + options[stepFunction] = _ju.wrap(options[stepFunction], function () { + _currentInstance.revalidate(id); + }); + + // onComplete repaints, just to make sure everything looks good at the end of the animation. + options[completeFunction] = _ju.wrap(options[completeFunction], function () { + _currentInstance.revalidate(id); + }); + + _currentInstance.doAnimate(del, properties, options); + }; + + /** + * checks for a listener for the given condition, executing it if found, passing in the given value. + * condition listeners would have been attached using "bind" (which is, you could argue, now overloaded, since + * firing click events etc is a bit different to what this does). i thought about adding a "bindCondition" + * or something, but decided against it, for the sake of simplicity. jsPlumb will never fire one of these + * condition events anyway. + */ + this.checkCondition = function (conditionName, args) { + var l = _currentInstance.getListener(conditionName), + r = true; + + if (l && l.length > 0) { + var values = Array.prototype.slice.call(arguments, 1); + try { + for (var i = 0, j = l.length; i < j; i++) { + r = r && l[i].apply(l[i], values); + } + } + catch (e) { + _ju.log(_currentInstance, "cannot check condition [" + conditionName + "]" + e); + } + } + return r; + }; + + this.connect = function (params, referenceParams) { + // prepare a final set of parameters to create connection with + var _p = _prepareConnectionParams(params, referenceParams), jpc; + // TODO probably a nicer return value if the connection was not made. _prepareConnectionParams + // will return null (and log something) if either endpoint was full. what would be nicer is to + // create a dedicated 'error' object. + if (_p) { + if (_p.source == null && _p.sourceEndpoint == null) { + _ju.log("Cannot establish connection - source does not exist"); + return; + } + if (_p.target == null && _p.targetEndpoint == null) { + _ju.log("Cannot establish connection - target does not exist"); + return; + } + _ensureContainer(_p.source); + // create the connection. it is not yet registered + jpc = _newConnection(_p); + // now add it the model, fire an event, and redraw + _finaliseConnection(jpc, _p); + } + return jpc; + }; + + var stTypes = [ + { el: "source", elId: "sourceId", epDefs: "sourceEndpointDefinitions" }, + { el: "target", elId: "targetId", epDefs: "targetEndpointDefinitions" } + ]; + + var _set = function (c, el, idx, doNotRepaint) { + var ep, _st = stTypes[idx], cId = c[_st.elId], cEl = c[_st.el], sid, sep, + oldEndpoint = c.endpoints[idx]; + + var evtParams = { + index: idx, + originalSourceId: idx === 0 ? cId : c.sourceId, + newSourceId: c.sourceId, + originalTargetId: idx === 1 ? cId : c.targetId, + newTargetId: c.targetId, + connection: c + }; + + if (el.constructor === jsPlumb.Endpoint) { + ep = el; + ep.addConnection(c); + el = ep.element; + } + else { + sid = _getId(el); + sep = this[_st.epDefs][sid]; + + if (sid === c[_st.elId]) { + ep = null; // dont change source/target if the element is already the one given. + } + else if (sep) { + for (var t in sep) { + if (!sep[t].enabled) { + return; + } + ep = sep[t].endpoint != null && sep[t].endpoint._jsPlumb ? sep[t].endpoint : this.addEndpoint(el, sep[t].def); + if (sep[t].uniqueEndpoint) { + sep[t].endpoint = ep; + } + ep.addConnection(c); + } + } + else { + ep = c.makeEndpoint(idx === 0, el, sid); + } + } + + if (ep != null) { + oldEndpoint.detachFromConnection(c); + c.endpoints[idx] = ep; + c[_st.el] = ep.element; + c[_st.elId] = ep.elementId; + evtParams[idx === 0 ? "newSourceId" : "newTargetId"] = ep.elementId; + + fireMoveEvent(evtParams); + + if (!doNotRepaint) { + c.repaint(); + } + } + + evtParams.element = el; + return evtParams; + + }.bind(this); + + this.setSource = function (connection, el, doNotRepaint) { + var p = _set(connection, el, 0, doNotRepaint); + this.anchorManager.sourceChanged(p.originalSourceId, p.newSourceId, connection, p.el); + }; + this.setTarget = function (connection, el, doNotRepaint) { + var p = _set(connection, el, 1, doNotRepaint); + this.anchorManager.updateOtherEndpoint(p.originalSourceId, p.originalTargetId, p.newTargetId, connection); + }; + + this.deleteEndpoint = function (object, dontUpdateHover, deleteAttachedObjects) { + var endpoint = (typeof object === "string") ? endpointsByUUID[object] : object; + if (endpoint) { + _currentInstance.deleteObject({ endpoint: endpoint, dontUpdateHover: dontUpdateHover, deleteAttachedObjects:deleteAttachedObjects }); + } + return _currentInstance; + }; + + this.deleteEveryEndpoint = function () { + var _is = _currentInstance.setSuspendDrawing(true); + for (var id in endpointsByElement) { + var endpoints = endpointsByElement[id]; + if (endpoints && endpoints.length) { + for (var i = 0, j = endpoints.length; i < j; i++) { + _currentInstance.deleteEndpoint(endpoints[i], true); + } + } + } + endpointsByElement = {}; + managedElements = {}; + endpointsByUUID = {}; + offsets = {}; + offsetTimestamps = {}; + _currentInstance.anchorManager.reset(); + var dm = _currentInstance.getDragManager(); + if (dm) { + dm.reset(); + } + if (!_is) { + _currentInstance.setSuspendDrawing(false); + } + return _currentInstance; + }; + + var fireDetachEvent = function (jpc, doFireEvent, originalEvent) { + // may have been given a connection, or in special cases, an object + var connType = _currentInstance.Defaults.ConnectionType || _currentInstance.getDefaultConnectionType(), + argIsConnection = jpc.constructor === connType, + params = argIsConnection ? { + connection: jpc, + source: jpc.source, target: jpc.target, + sourceId: jpc.sourceId, targetId: jpc.targetId, + sourceEndpoint: jpc.endpoints[0], targetEndpoint: jpc.endpoints[1] + } : jpc; + + if (doFireEvent) { + _currentInstance.fire("connectionDetached", params, originalEvent); + } + + // always fire this. used by internal jsplumb stuff. + _currentInstance.fire("internal.connectionDetached", params, originalEvent); + + _currentInstance.anchorManager.connectionDetached(params); + }; + + var fireMoveEvent = _currentInstance.fireMoveEvent = function (params, evt) { + _currentInstance.fire("connectionMoved", params, evt); + }; + + this.unregisterEndpoint = function (endpoint) { + if (endpoint._jsPlumb.uuid) { + endpointsByUUID[endpoint._jsPlumb.uuid] = null; + } + _currentInstance.anchorManager.deleteEndpoint(endpoint); + // TODO at least replace this with a removeWithFunction call. + for (var e in endpointsByElement) { + var endpoints = endpointsByElement[e]; + if (endpoints) { + var newEndpoints = []; + for (var i = 0, j = endpoints.length; i < j; i++) { + if (endpoints[i] !== endpoint) { + newEndpoints.push(endpoints[i]); + } + } + + endpointsByElement[e] = newEndpoints; + } + if (endpointsByElement[e].length < 1) { + delete endpointsByElement[e]; + } + } + }; + + var IS_DETACH_ALLOWED = "isDetachAllowed"; + var BEFORE_DETACH = "beforeDetach"; + var CHECK_CONDITION = "checkCondition"; + + /** + * Deletes a Connection. + * @method deleteConnection + * @param connection Connection to delete + * @param {Object} [params] Optional delete parameters + * @param {Boolean} [params.doNotFireEvent=false] If true, a connection detached event will not be fired. Otherwise one will. + * @param {Boolean} [params.force=false] If true, the connection will be deleted even if a beforeDetach interceptor tries to stop the deletion. + * @returns {Boolean} True if the connection was deleted, false otherwise. + */ + this.deleteConnection = function(connection, params) { + + if (connection != null) { + params = params || {}; + + if (params.force || _ju.functionChain(true, false, [ + [ connection.endpoints[0], IS_DETACH_ALLOWED, [ connection ] ], + [ connection.endpoints[1], IS_DETACH_ALLOWED, [ connection ] ], + [ connection, IS_DETACH_ALLOWED, [ connection ] ], + [ _currentInstance, CHECK_CONDITION, [ BEFORE_DETACH, connection ] ] + ])) { + + connection.setHover(false); + fireDetachEvent(connection, !connection.pending && params.fireEvent !== false, params.originalEvent); + + connection.endpoints[0].detachFromConnection(connection); + connection.endpoints[1].detachFromConnection(connection); + _ju.removeWithFunction(connections, function (_c) { + return connection.id === _c.id; + }); + + connection.cleanup(); + connection.destroy(); + return true; + } + } + return false; + }; + + /** + * Remove all Connections from all elements, but leaves Endpoints in place ((unless a connection is set to auto delete its Endpoints). + * @method deleteEveryConnection + * @param {Object} [params] optional params object for the call + * @param {Boolean} [params.fireEvent=true] Whether or not to fire detach events + * @param {Boolean} [params.forceDetach=false] If true, this call will ignore any `beforeDetach` interceptors. + * @returns {Number} The number of connections that were deleted. + */ + this.deleteEveryConnection = function (params) { + params = params || {}; + var count = connections.length, deletedCount = 0; + _currentInstance.batch(function () { + for (var i = 0; i < count; i++) { + deletedCount += _currentInstance.deleteConnection(connections[0], params) ? 1 : 0; + } + }); + return deletedCount; + }; + + /** + * Removes all an element's Connections. + * @method deleteConnectionsForElement + * @param {Object} el Either the id of the element, or a selector for the element. + * @param {Object} [params] Optional parameters. + * @param {Boolean} [params.fireEvent=true] Whether or not to fire the detach event. + * @param {Boolean} [params.forceDetach=false] If true, this call will ignore any `beforeDetach` interceptors. + * @return {jsPlumbInstance} The current jsPlumb instance. + */ + this.deleteConnectionsForElement = function (el, params) { + params = params || {}; + el = _currentInstance.getElement(el); + var id = _getId(el), endpoints = endpointsByElement[id]; + if (endpoints && endpoints.length) { + for (var i = 0, j = endpoints.length; i < j; i++) { + endpoints[i].deleteEveryConnection(params); + } + } + return _currentInstance; + }; + + /// not public. but of course its exposed. how to change this. + this.deleteObject = function (params) { + var result = { + endpoints: {}, + connections: {}, + endpointCount: 0, + connectionCount: 0 + }, + deleteAttachedObjects = params.deleteAttachedObjects !== false; + + var unravelConnection = function (connection) { + if (connection != null && result.connections[connection.id] == null) { + if (!params.dontUpdateHover && connection._jsPlumb != null) { + connection.setHover(false); + } + result.connections[connection.id] = connection; + result.connectionCount++; + } + }; + var unravelEndpoint = function (endpoint) { + if (endpoint != null && result.endpoints[endpoint.id] == null) { + if (!params.dontUpdateHover && endpoint._jsPlumb != null) { + endpoint.setHover(false); + } + result.endpoints[endpoint.id] = endpoint; + result.endpointCount++; + + if (deleteAttachedObjects) { + for (var i = 0; i < endpoint.connections.length; i++) { + var c = endpoint.connections[i]; + unravelConnection(c); + } + } + } + }; + + if (params.connection) { + unravelConnection(params.connection); + } + else { + unravelEndpoint(params.endpoint); + } + + // loop through connections + for (var i in result.connections) { + var c = result.connections[i]; + if (c._jsPlumb) { + _ju.removeWithFunction(connections, function (_c) { + return c.id === _c.id; + }); + + fireDetachEvent(c, params.fireEvent === false ? false : !c.pending, params.originalEvent); + var doNotCleanup = params.deleteAttachedObjects == null ? null : !params.deleteAttachedObjects; + + c.endpoints[0].detachFromConnection(c, null, doNotCleanup); + c.endpoints[1].detachFromConnection(c, null, doNotCleanup); + + c.cleanup(true); + c.destroy(true); + } + } + + // loop through endpoints + for (var j in result.endpoints) { + var e = result.endpoints[j]; + if (e._jsPlumb) { + _currentInstance.unregisterEndpoint(e); + // FIRE some endpoint deleted event? + e.cleanup(true); + e.destroy(true); + } + } + + return result; + }; + + + // helpers for select/selectEndpoints + var _setOperation = function (list, func, args, selector) { + for (var i = 0, j = list.length; i < j; i++) { + list[i][func].apply(list[i], args); + } + return selector(list); + }, + _getOperation = function (list, func, args) { + var out = []; + for (var i = 0, j = list.length; i < j; i++) { + out.push([ list[i][func].apply(list[i], args), list[i] ]); + } + return out; + }, + setter = function (list, func, selector) { + return function () { + return _setOperation(list, func, arguments, selector); + }; + }, + getter = function (list, func) { + return function () { + return _getOperation(list, func, arguments); + }; + }, + prepareList = function (input, doNotGetIds) { + var r = []; + if (input) { + if (typeof input === 'string') { + if (input === "*") { + return input; + } + r.push(input); + } + else { + if (doNotGetIds) { + r = input; + } + else { + if (input.length) { + for (var i = 0, j = input.length; i < j; i++) { + r.push(_info(input[i]).id); + } + } + else { + r.push(_info(input).id); + } + } + } + } + return r; + }, + filterList = function (list, value, missingIsFalse) { + if (list === "*") { + return true; + } + return list.length > 0 ? list.indexOf(value) !== -1 : !missingIsFalse; + }; + + // get some connections, specifying source/target/scope + this.getConnections = function (options, flat) { + if (!options) { + options = {}; + } else if (options.constructor === String) { + options = { "scope": options }; + } + var scope = options.scope || _currentInstance.getDefaultScope(), + scopes = prepareList(scope, true), + sources = prepareList(options.source), + targets = prepareList(options.target), + results = (!flat && scopes.length > 1) ? {} : [], + _addOne = function (scope, obj) { + if (!flat && scopes.length > 1) { + var ss = results[scope]; + if (ss == null) { + ss = results[scope] = []; + } + ss.push(obj); + } else { + results.push(obj); + } + }; + + for (var j = 0, jj = connections.length; j < jj; j++) { + var c = connections[j], + sourceId = c.proxies && c.proxies[0] ? c.proxies[0].originalEp.elementId : c.sourceId, + targetId = c.proxies && c.proxies[1] ? c.proxies[1].originalEp.elementId : c.targetId; + + if (filterList(scopes, c.scope) && filterList(sources, sourceId) && filterList(targets, targetId)) { + _addOne(c.scope, c); + } + } + + return results; + }; + + var _curryEach = function (list, executor) { + return function (f) { + for (var i = 0, ii = list.length; i < ii; i++) { + f(list[i]); + } + return executor(list); + }; + }, + _curryGet = function (list) { + return function (idx) { + return list[idx]; + }; + }; + + var _makeCommonSelectHandler = function (list, executor) { + var out = { + length: list.length, + each: _curryEach(list, executor), + get: _curryGet(list) + }, + setters = ["setHover", "removeAllOverlays", "setLabel", "addClass", "addOverlay", "removeOverlay", + "removeOverlays", "showOverlay", "hideOverlay", "showOverlays", "hideOverlays", "setPaintStyle", + "setHoverPaintStyle", "setSuspendEvents", "setParameter", "setParameters", "setVisible", + "repaint", "addType", "toggleType", "removeType", "removeClass", "setType", "bind", "unbind" ], + + getters = ["getLabel", "getOverlay", "isHover", "getParameter", "getParameters", "getPaintStyle", + "getHoverPaintStyle", "isVisible", "hasType", "getType", "isSuspendEvents" ], + i, ii; + + for (i = 0, ii = setters.length; i < ii; i++) { + out[setters[i]] = setter(list, setters[i], executor); + } + + for (i = 0, ii = getters.length; i < ii; i++) { + out[getters[i]] = getter(list, getters[i]); + } + + return out; + }; + + var _makeConnectionSelectHandler = function (list) { + var common = _makeCommonSelectHandler(list, _makeConnectionSelectHandler); + return jsPlumb.extend(common, { + // setters + setDetachable: setter(list, "setDetachable", _makeConnectionSelectHandler), + setReattach: setter(list, "setReattach", _makeConnectionSelectHandler), + setConnector: setter(list, "setConnector", _makeConnectionSelectHandler), + delete: function () { + for (var i = 0, ii = list.length; i < ii; i++) { + _currentInstance.deleteConnection(list[i]); + } + }, + // getters + isDetachable: getter(list, "isDetachable"), + isReattach: getter(list, "isReattach") + }); + }; + + var _makeEndpointSelectHandler = function (list) { + var common = _makeCommonSelectHandler(list, _makeEndpointSelectHandler); + return jsPlumb.extend(common, { + setEnabled: setter(list, "setEnabled", _makeEndpointSelectHandler), + setAnchor: setter(list, "setAnchor", _makeEndpointSelectHandler), + isEnabled: getter(list, "isEnabled"), + deleteEveryConnection: function () { + for (var i = 0, ii = list.length; i < ii; i++) { + list[i].deleteEveryConnection(); + } + }, + "delete": function () { + for (var i = 0, ii = list.length; i < ii; i++) { + _currentInstance.deleteEndpoint(list[i]); + } + } + }); + }; + + this.select = function (params) { + params = params || {}; + params.scope = params.scope || "*"; + return _makeConnectionSelectHandler(params.connections || _currentInstance.getConnections(params, true)); + }; + + this.selectEndpoints = function (params) { + params = params || {}; + params.scope = params.scope || "*"; + var noElementFilters = !params.element && !params.source && !params.target, + elements = noElementFilters ? "*" : prepareList(params.element), + sources = noElementFilters ? "*" : prepareList(params.source), + targets = noElementFilters ? "*" : prepareList(params.target), + scopes = prepareList(params.scope, true); + + var ep = []; + + for (var el in endpointsByElement) { + var either = filterList(elements, el, true), + source = filterList(sources, el, true), + sourceMatchExact = sources !== "*", + target = filterList(targets, el, true), + targetMatchExact = targets !== "*"; + + // if they requested 'either' then just match scope. otherwise if they requested 'source' (not as a wildcard) then we have to match only endpoints that have isSource set to to true, and the same thing with isTarget. + if (either || source || target) { + inner: + for (var i = 0, ii = endpointsByElement[el].length; i < ii; i++) { + var _ep = endpointsByElement[el][i]; + if (filterList(scopes, _ep.scope, true)) { + + var noMatchSource = (sourceMatchExact && sources.length > 0 && !_ep.isSource), + noMatchTarget = (targetMatchExact && targets.length > 0 && !_ep.isTarget); + + if (noMatchSource || noMatchTarget) { + continue inner; + } + + ep.push(_ep); + } + } + } + } + + return _makeEndpointSelectHandler(ep); + }; + + // get all connections managed by the instance of jsplumb. + this.getAllConnections = function () { + return connections; + }; + this.getDefaultScope = function () { + return DEFAULT_SCOPE; + }; + // get an endpoint by uuid. + this.getEndpoint = _getEndpoint; + /** + * Gets the list of Endpoints for a given element. + * @method getEndpoints + * @param {String|Element|Selector} el The element to get endpoints for. + * @return {Endpoint[]} An array of Endpoints for the specified element. + */ + this.getEndpoints = function (el) { + return endpointsByElement[_info(el).id] || []; + }; + // gets the default endpoint type. used when subclassing. see wiki. + this.getDefaultEndpointType = function () { + return jsPlumb.Endpoint; + }; + // gets the default connection type. used when subclassing. see wiki. + this.getDefaultConnectionType = function () { + return jsPlumb.Connection; + }; + /* + * Gets an element's id, creating one if necessary. really only exposed + * for the lib-specific functionality to access; would be better to pass + * the current instance into the lib-specific code (even though this is + * a static call. i just don't want to expose it to the public API). + */ + this.getId = _getId; + this.draw = _draw; + this.info = _info; + + this.appendElement = _appendElement; + + var _hoverSuspended = false; + this.isHoverSuspended = function () { + return _hoverSuspended; + }; + this.setHoverSuspended = function (s) { + _hoverSuspended = s; + }; + + // set an element's connections to be hidden + this.hide = function (el, changeEndpoints) { + _setVisible(el, "none", changeEndpoints); + return _currentInstance; + }; + + // exposed for other objects to use to get a unique id. + this.idstamp = _idstamp; + + // ensure that, if the current container exists, it is a DOM element and not a selector. + // if it does not exist and `candidate` is supplied, the offset parent of that element will be set as the Container. + // this is used to do a better default behaviour for the case that the user has not set a container: + // addEndpoint, makeSource, makeTarget and connect all call this method with the offsetParent of the + // element in question (for connect it is the source element). So if no container is set, it is inferred + // to be the offsetParent of the first element the user tries to connect. + var _ensureContainer = function (candidate) { + if (!_container && candidate) { + var can = _currentInstance.getElement(candidate); + if (can.offsetParent) { + _currentInstance.setContainer(can.offsetParent); + } + } + }; + + var _getContainerFromDefaults = function () { + if (_currentInstance.Defaults.Container) { + _currentInstance.setContainer(_currentInstance.Defaults.Container); + } + }; + + // check if a given element is managed or not. if not, add to our map. if drawing is not suspended then + // we'll also stash its dimensions; otherwise we'll do this in a lazy way through updateOffset. + var _manage = _currentInstance.manage = function (id, element, _transient) { + if (!managedElements[id]) { + managedElements[id] = { + el: element, + endpoints: [], + connections: [] + }; + + managedElements[id].info = _updateOffset({ elId: id, timestamp: _suspendedAt }); + _currentInstance.addClass(element, "jtk-managed"); + if (!_transient) { + _currentInstance.fire("manageElement", { id:id, info:managedElements[id].info, el:element }); + } + } + + return managedElements[id]; + }; + + var _unmanage = _currentInstance.unmanage = function(id) { + if (managedElements[id]) { + _currentInstance.removeClass(managedElements[id].el, "jtk-managed"); + delete managedElements[id]; + _currentInstance.fire("unmanageElement", id); + } + }; + + /** + * updates the offset and size for a given element, and stores the + * values. if 'offset' is not null we use that (it would have been + * passed in from a drag call) because it's faster; but if it is null, + * or if 'recalc' is true in order to force a recalculation, we get the current values. + * @method updateOffset + */ + var _updateOffset = function (params) { + + var timestamp = params.timestamp, recalc = params.recalc, offset = params.offset, elId = params.elId, s; + if (_suspendDrawing && !timestamp) { + timestamp = _suspendedAt; + } + if (!recalc) { + if (timestamp && timestamp === offsetTimestamps[elId]) { + return {o: params.offset || offsets[elId], s: sizes[elId]}; + } + } + if (recalc || (!offset && offsets[elId] == null)) { // if forced repaint or no offset available, we recalculate. + + // get the current size and offset, and store them + s = managedElements[elId] ? managedElements[elId].el : null; + if (s != null) { + sizes[elId] = _currentInstance.getSize(s); + offsets[elId] = _currentInstance.getOffset(s); + offsetTimestamps[elId] = timestamp; + } + } else { + offsets[elId] = offset || offsets[elId]; + if (sizes[elId] == null) { + s = managedElements[elId].el; + if (s != null) { + sizes[elId] = _currentInstance.getSize(s); + } + } + offsetTimestamps[elId] = timestamp; + } + + if (offsets[elId] && !offsets[elId].right) { + offsets[elId].right = offsets[elId].left + sizes[elId][0]; + offsets[elId].bottom = offsets[elId].top + sizes[elId][1]; + offsets[elId].width = sizes[elId][0]; + offsets[elId].height = sizes[elId][1]; + offsets[elId].centerx = offsets[elId].left + (offsets[elId].width / 2); + offsets[elId].centery = offsets[elId].top + (offsets[elId].height / 2); + } + + return {o: offsets[elId], s: sizes[elId]}; + }; + + this.updateOffset = _updateOffset; + + /** + * callback from the current library to tell us to prepare ourselves (attach + * mouse listeners etc; can't do that until the library has provided a bind method) + */ + this.init = function () { + if (!initialized) { + _getContainerFromDefaults(); + _currentInstance.anchorManager = new root.jsPlumb.AnchorManager({jsPlumbInstance: _currentInstance}); + initialized = true; + _currentInstance.fire("ready", _currentInstance); + } + }.bind(this); + + this.log = log; + this.jsPlumbUIComponent = jsPlumbUIComponent; + + /* + * Creates an anchor with the given params. + * + * + * Returns: The newly created Anchor. + * Throws: an error if a named anchor was not found. + */ + this.makeAnchor = function () { + var pp, _a = function (t, p) { + if (root.jsPlumb.Anchors[t]) { + return new root.jsPlumb.Anchors[t](p); + } + if (!_currentInstance.Defaults.DoNotThrowErrors) { + throw { msg: "jsPlumb: unknown anchor type '" + t + "'" }; + } + }; + if (arguments.length === 0) { + return null; + } + var specimen = arguments[0], elementId = arguments[1], jsPlumbInstance = arguments[2], newAnchor = null; + // if it appears to be an anchor already... + if (specimen.compute && specimen.getOrientation) { + return specimen; + } //TODO hazy here about whether it should be added or is already added somehow. + // is it the name of an anchor type? + else if (typeof specimen === "string") { + newAnchor = _a(arguments[0], {elementId: elementId, jsPlumbInstance: _currentInstance}); + } + // is it an array? it will be one of: + // an array of [spec, params] - this defines a single anchor, which may be dynamic, but has parameters. + // an array of arrays - this defines some dynamic anchors + // an array of numbers - this defines a single anchor. + else if (_ju.isArray(specimen)) { + if (_ju.isArray(specimen[0]) || _ju.isString(specimen[0])) { + // if [spec, params] format + if (specimen.length === 2 && _ju.isObject(specimen[1])) { + // if first arg is a string, its a named anchor with params + if (_ju.isString(specimen[0])) { + pp = root.jsPlumb.extend({elementId: elementId, jsPlumbInstance: _currentInstance}, specimen[1]); + newAnchor = _a(specimen[0], pp); + } + // otherwise first arg is array, second is params. we treat as a dynamic anchor, which is fine + // even if the first arg has only one entry. you could argue all anchors should be implicitly dynamic in fact. + else { + pp = root.jsPlumb.extend({elementId: elementId, jsPlumbInstance: _currentInstance, anchors: specimen[0]}, specimen[1]); + newAnchor = new root.jsPlumb.DynamicAnchor(pp); + } + } + else { + newAnchor = new jsPlumb.DynamicAnchor({anchors: specimen, selector: null, elementId: elementId, jsPlumbInstance: _currentInstance}); + } + + } + else { + var anchorParams = { + x: specimen[0], y: specimen[1], + orientation: (specimen.length >= 4) ? [ specimen[2], specimen[3] ] : [0, 0], + offsets: (specimen.length >= 6) ? [ specimen[4], specimen[5] ] : [ 0, 0 ], + elementId: elementId, + jsPlumbInstance: _currentInstance, + cssClass: specimen.length === 7 ? specimen[6] : null + }; + newAnchor = new root.jsPlumb.Anchor(anchorParams); + newAnchor.clone = function () { + return new root.jsPlumb.Anchor(anchorParams); + }; + } + } + + if (!newAnchor.id) { + newAnchor.id = "anchor_" + _idstamp(); + } + return newAnchor; + }; + + /** + * makes a list of anchors from the given list of types or coords, eg + * ["TopCenter", "RightMiddle", "BottomCenter", [0, 1, -1, -1] ] + */ + this.makeAnchors = function (types, elementId, jsPlumbInstance) { + var r = []; + for (var i = 0, ii = types.length; i < ii; i++) { + if (typeof types[i] === "string") { + r.push(root.jsPlumb.Anchors[types[i]]({elementId: elementId, jsPlumbInstance: jsPlumbInstance})); + } + else if (_ju.isArray(types[i])) { + r.push(_currentInstance.makeAnchor(types[i], elementId, jsPlumbInstance)); + } + } + return r; + }; + + /** + * Makes a dynamic anchor from the given list of anchors (which may be in shorthand notation as strings or dimension arrays, or Anchor + * objects themselves) and the given, optional, anchorSelector function (jsPlumb uses a default if this is not provided; most people will + * not need to provide this - i think). + */ + this.makeDynamicAnchor = function (anchors, anchorSelector) { + return new root.jsPlumb.DynamicAnchor({anchors: anchors, selector: anchorSelector, elementId: null, jsPlumbInstance: _currentInstance}); + }; + +// --------------------- makeSource/makeTarget ---------------------------------------------- + + this.targetEndpointDefinitions = {}; + this.sourceEndpointDefinitions = {}; + + var selectorFilter = function (evt, _el, selector, _instance, negate) { + var t = evt.target || evt.srcElement, ok = false, + sel = _instance.getSelector(_el, selector); + for (var j = 0; j < sel.length; j++) { + if (sel[j] === t) { + ok = true; + break; + } + } + return negate ? !ok : ok; + }; + + var _makeElementDropHandler = function (elInfo, p, dropOptions, isSource, isTarget) { + var proxyComponent = new jsPlumbUIComponent(p); + var _drop = p._jsPlumb.EndpointDropHandler({ + jsPlumb: _currentInstance, + enabled: function () { + return elInfo.def.enabled; + }, + isFull: function () { + var targetCount = _currentInstance.select({target: elInfo.id}).length; + return elInfo.def.maxConnections > 0 && targetCount >= elInfo.def.maxConnections; + }, + element: elInfo.el, + elementId: elInfo.id, + isSource: isSource, + isTarget: isTarget, + addClass: function (clazz) { + _currentInstance.addClass(elInfo.el, clazz); + }, + removeClass: function (clazz) { + _currentInstance.removeClass(elInfo.el, clazz); + }, + onDrop: function (jpc) { + var source = jpc.endpoints[0]; + source.anchor.unlock(); + }, + isDropAllowed: function () { + return proxyComponent.isDropAllowed.apply(proxyComponent, arguments); + }, + isRedrop:function(jpc) { + return (jpc.suspendedElement != null && jpc.suspendedEndpoint != null && jpc.suspendedEndpoint.element === elInfo.el); + }, + getEndpoint: function (jpc) { + + // make a new Endpoint for the target, or get it from the cache if uniqueEndpoint + // is set. if its a redrop the new endpoint will be immediately cleaned up. + + var newEndpoint = elInfo.def.endpoint; + + // if no cached endpoint, or there was one but it has been cleaned up + // (ie. detached), create a new one + if (newEndpoint == null || newEndpoint._jsPlumb == null) { + var eps = _currentInstance.deriveEndpointAndAnchorSpec(jpc.getType().join(" "), true); + var pp = eps.endpoints ? root.jsPlumb.extend(p, { + endpoint:elInfo.def.def.endpoint || eps.endpoints[1] + }) :p; + if (eps.anchors) { + pp = root.jsPlumb.extend(pp, { + anchor:elInfo.def.def.anchor || eps.anchors[1] + }); + } + newEndpoint = _currentInstance.addEndpoint(elInfo.el, pp); + newEndpoint._mtNew = true; + } + + if (p.uniqueEndpoint) { + elInfo.def.endpoint = newEndpoint; + } + + newEndpoint.setDeleteOnEmpty(true); + + // if connection is detachable, init the new endpoint to be draggable, to support that happening. + if (jpc.isDetachable()) { + newEndpoint.initDraggable(); + } + + // if the anchor has a 'positionFinder' set, then delegate to that function to find + // out where to locate the anchor. + if (newEndpoint.anchor.positionFinder != null) { + var dropPosition = _currentInstance.getUIPosition(arguments, _currentInstance.getZoom()), + elPosition = _currentInstance.getOffset(elInfo.el), + elSize = _currentInstance.getSize(elInfo.el), + ap = dropPosition == null ? [0,0] : newEndpoint.anchor.positionFinder(dropPosition, elPosition, elSize, newEndpoint.anchor.constructorParams); + + newEndpoint.anchor.x = ap[0]; + newEndpoint.anchor.y = ap[1]; + // now figure an orientation for it..kind of hard to know what to do actually. probably the best thing i can do is to + // support specifying an orientation in the anchor's spec. if one is not supplied then i will make the orientation + // be what will cause the most natural link to the source: it will be pointing at the source, but it needs to be + // specified in one axis only, and so how to make that choice? i think i will use whichever axis is the one in which + // the target is furthest away from the source. + } + + return newEndpoint; + }, + maybeCleanup: function (ep) { + if (ep._mtNew && ep.connections.length === 0) { + _currentInstance.deleteObject({endpoint: ep}); + } + else { + delete ep._mtNew; + } + } + }); + + // wrap drop events as needed and initialise droppable + var dropEvent = root.jsPlumb.dragEvents.drop; + dropOptions.scope = dropOptions.scope || (p.scope || _currentInstance.Defaults.Scope); + dropOptions[dropEvent] = _ju.wrap(dropOptions[dropEvent], _drop, true); + dropOptions.rank = p.rank || 0; + + // if target, return true from the over event. this will cause katavorio to stop setting drops to hover + // if multipleDrop is set to false. + if (isTarget) { + dropOptions[root.jsPlumb.dragEvents.over] = function () { return true; }; + } + + // vanilla jsplumb only + if (p.allowLoopback === false) { + dropOptions.canDrop = function (_drag) { + var de = _drag.getDragElement()._jsPlumbRelatedElement; + return de !== elInfo.el; + }; + } + _currentInstance.initDroppable(elInfo.el, dropOptions, "internal"); + + return _drop; + + }; + + // see API docs + this.makeTarget = function (el, params, referenceParams) { + + // put jsplumb ref into params without altering the params passed in + var p = root.jsPlumb.extend({_jsPlumb: this}, referenceParams); + root.jsPlumb.extend(p, params); + + var maxConnections = p.maxConnections || -1, + + _doOne = function (el) { + + // get the element's id and store the endpoint definition for it. jsPlumb.connect calls will look for one of these, + // and use the endpoint definition if found. + // decode the info for this element (id and element) + var elInfo = _info(el), + elid = elInfo.id, + dropOptions = root.jsPlumb.extend({}, p.dropOptions || {}), + type = p.connectionType || "default"; + + this.targetEndpointDefinitions[elid] = this.targetEndpointDefinitions[elid] || {}; + + _ensureContainer(elid); + + // if this is a group and the user has not mandated a rank, set to -1 so that Nodes takes + // precedence. + if (elInfo.el._isJsPlumbGroup && dropOptions.rank == null) { + dropOptions.rank = -1; + } + + // store the definition + var _def = { + def: root.jsPlumb.extend({}, p), + uniqueEndpoint: p.uniqueEndpoint, + maxConnections: maxConnections, + enabled: true + }; + + if (p.createEndpoint) { + _def.uniqueEndpoint = true; + _def.endpoint = _currentInstance.addEndpoint(el, _def.def); + _def.endpoint.setDeleteOnEmpty(false); + } + + elInfo.def = _def; + this.targetEndpointDefinitions[elid][type] = _def; + _makeElementDropHandler(elInfo, p, dropOptions, p.isSource === true, true); + // stash the definition on the drop + elInfo.el._katavorioDrop[elInfo.el._katavorioDrop.length - 1].targetDef = _def; + + }.bind(this); + + // make an array if only given one element + var inputs = el.length && el.constructor !== String ? el : [ el ]; + + // register each one in the list. + for (var i = 0, ii = inputs.length; i < ii; i++) { + _doOne(inputs[i]); + } + + return this; + }; + + // see api docs + this.unmakeTarget = function (el, doNotClearArrays) { + var info = _info(el); + _currentInstance.destroyDroppable(info.el, "internal"); + if (!doNotClearArrays) { + delete this.targetEndpointDefinitions[info.id]; + } + + return this; + }; + + // see api docs + this.makeSource = function (el, params, referenceParams) { + var p = root.jsPlumb.extend({_jsPlumb: this}, referenceParams); + root.jsPlumb.extend(p, params); + var type = p.connectionType || "default"; + var aae = _currentInstance.deriveEndpointAndAnchorSpec(type); + p.endpoint = p.endpoint || aae.endpoints[0]; + p.anchor = p.anchor || aae.anchors[0]; + var maxConnections = p.maxConnections || -1, + onMaxConnections = p.onMaxConnections, + _doOne = function (elInfo) { + // get the element's id and store the endpoint definition for it. jsPlumb.connect calls will look for one of these, + // and use the endpoint definition if found. + var elid = elInfo.id, + _del = this.getElement(elInfo.el); + + this.sourceEndpointDefinitions[elid] = this.sourceEndpointDefinitions[elid] || {}; + _ensureContainer(elid); + + var _def = { + def:root.jsPlumb.extend({}, p), + uniqueEndpoint: p.uniqueEndpoint, + maxConnections: maxConnections, + enabled: true + }; + + if (p.createEndpoint) { + _def.uniqueEndpoint = true; + _def.endpoint = _currentInstance.addEndpoint(el, _def.def); + _def.endpoint.setDeleteOnEmpty(false); + } + + this.sourceEndpointDefinitions[elid][type] = _def; + elInfo.def = _def; + + var stopEvent = root.jsPlumb.dragEvents.stop, + dragEvent = root.jsPlumb.dragEvents.drag, + dragOptions = root.jsPlumb.extend({ }, p.dragOptions || {}), + existingDrag = dragOptions.drag, + existingStop = dragOptions.stop, + ep = null, + endpointAddedButNoDragYet = false; + + // set scope if its not set in dragOptions but was passed in in params + dragOptions.scope = dragOptions.scope || p.scope; + + dragOptions[dragEvent] = _ju.wrap(dragOptions[dragEvent], function () { + if (existingDrag) { + existingDrag.apply(this, arguments); + } + endpointAddedButNoDragYet = false; + }); + + dragOptions[stopEvent] = _ju.wrap(dragOptions[stopEvent], function () { + + if (existingStop) { + existingStop.apply(this, arguments); + } + this.currentlyDragging = false; + if (ep._jsPlumb != null) { // if not cleaned up... + + // reset the anchor to the anchor that was initially provided. the one we were using to drag + // the connection was just a placeholder that was located at the place the user pressed the + // mouse button to initiate the drag. + var anchorDef = p.anchor || this.Defaults.Anchor, + oldAnchor = ep.anchor, + oldConnection = ep.connections[0]; + + var newAnchor = this.makeAnchor(anchorDef, elid, this), + _el = ep.element; + + // if the anchor has a 'positionFinder' set, then delegate to that function to find + // out where to locate the anchor. issue 117. + if (newAnchor.positionFinder != null) { + var elPosition = _currentInstance.getOffset(_el), + elSize = this.getSize(_el), + dropPosition = { left: elPosition.left + (oldAnchor.x * elSize[0]), top: elPosition.top + (oldAnchor.y * elSize[1]) }, + ap = newAnchor.positionFinder(dropPosition, elPosition, elSize, newAnchor.constructorParams); + + newAnchor.x = ap[0]; + newAnchor.y = ap[1]; + } + + ep.setAnchor(newAnchor, true); + ep.repaint(); + this.repaint(ep.elementId); + if (oldConnection != null) { + this.repaint(oldConnection.targetId); + } + } + }.bind(this)); + + // when the user presses the mouse, add an Endpoint, if we are enabled. + var mouseDownListener = function (e) { + // on right mouse button, abort. + if (e.which === 3 || e.button === 2) { + return; + } + + // TODO store def on element. + var def = this.sourceEndpointDefinitions[elid][type]; + + // if disabled, return. + if (!def.enabled) { + return; + } + + elid = this.getId(this.getElement(elInfo.el)); // elid might have changed since this method was called to configure the element. + + // if a filter was given, run it, and return if it says no. + if (p.filter) { + var r = _ju.isString(p.filter) ? selectorFilter(e, elInfo.el, p.filter, this, p.filterExclude) : p.filter(e, elInfo.el); + if (r === false) { + return; + } + } + + // if maxConnections reached + var sourceCount = this.select({source: elid}).length; + if (def.maxConnections >= 0 && (sourceCount >= def.maxConnections)) { + if (onMaxConnections) { + onMaxConnections({ + element: elInfo.el, + maxConnections: maxConnections + }, e); + } + return false; + } + + // find the position on the element at which the mouse was pressed; this is where the endpoint + // will be located. + var elxy = root.jsPlumb.getPositionOnElement(e, _del, _zoom); + + // we need to override the anchor in here, and force 'isSource', but we don't want to mess with + // the params passed in, because after a connection is established we're going to reset the endpoint + // to have the anchor we were given. + var tempEndpointParams = {}; + root.jsPlumb.extend(tempEndpointParams, p); + tempEndpointParams.isTemporarySource = true; + tempEndpointParams.anchor = [ elxy[0], elxy[1] , 0, 0]; + tempEndpointParams.dragOptions = dragOptions; + + if (def.def.scope) { + tempEndpointParams.scope = def.def.scope; + } + + ep = this.addEndpoint(elid, tempEndpointParams); + endpointAddedButNoDragYet = true; + ep.setDeleteOnEmpty(true); + + // if unique endpoint and it's already been created, push it onto the endpoint we create. at the end + // of a successful connection we'll switch to that endpoint. + // TODO this is the same code as the programmatic endpoints create on line 1050 ish + if (def.uniqueEndpoint) { + if (!def.endpoint) { + def.endpoint = ep; + ep.setDeleteOnEmpty(false); + } + else { + ep.finalEndpoint = def.endpoint; + } + } + + var _delTempEndpoint = function () { + // this mouseup event is fired only if no dragging occurred, by jquery and yui, but for mootools + // it is fired even if dragging has occurred, in which case we would blow away a perfectly + // legitimate endpoint, were it not for this check. the flag is set after adding an + // endpoint and cleared in a drag listener we set in the dragOptions above. + _currentInstance.off(ep.canvas, "mouseup", _delTempEndpoint); + _currentInstance.off(elInfo.el, "mouseup", _delTempEndpoint); + if (endpointAddedButNoDragYet) { + endpointAddedButNoDragYet = false; + _currentInstance.deleteEndpoint(ep); + } + }; + + _currentInstance.on(ep.canvas, "mouseup", _delTempEndpoint); + _currentInstance.on(elInfo.el, "mouseup", _delTempEndpoint); + + // optionally check for attributes to extract from the source element + var payload = {}; + if (def.def.extract) { + for (var att in def.def.extract) { + var v = (e.srcElement || e.target).getAttribute(att); + if (v) { + payload[def.def.extract[att]] = v; + } + } + } + + // and then trigger its mousedown event, which will kick off a drag, which will start dragging + // a new connection from this endpoint. + _currentInstance.trigger(ep.canvas, "mousedown", e, payload); + + _ju.consume(e); + + }.bind(this); + + this.on(elInfo.el, "mousedown", mouseDownListener); + _def.trigger = mouseDownListener; + + // if a filter was provided, set it as a dragFilter on the element, + // to prevent the element drag function from kicking in when we want to + // drag a new connection + if (p.filter && (_ju.isString(p.filter) || _ju.isFunction(p.filter))) { + _currentInstance.setDragFilter(elInfo.el, p.filter); + } + + var dropOptions = root.jsPlumb.extend({}, p.dropOptions || {}); + + _makeElementDropHandler(elInfo, p, dropOptions, true, p.isTarget === true); + + }.bind(this); + + var inputs = el.length && el.constructor !== String ? el : [ el ]; + for (var i = 0, ii = inputs.length; i < ii; i++) { + _doOne(_info(inputs[i])); + } + + return this; + }; + + // see api docs + this.unmakeSource = function (el, connectionType, doNotClearArrays) { + var info = _info(el); + _currentInstance.destroyDroppable(info.el, "internal"); + var eldefs = this.sourceEndpointDefinitions[info.id]; + if (eldefs) { + for (var def in eldefs) { + if (connectionType == null || connectionType === def) { + var mouseDownListener = eldefs[def].trigger; + if (mouseDownListener) { + _currentInstance.off(info.el, "mousedown", mouseDownListener); + } + if (!doNotClearArrays) { + delete this.sourceEndpointDefinitions[info.id][def]; + } + } + } + } + + return this; + }; + + // see api docs + this.unmakeEverySource = function () { + for (var i in this.sourceEndpointDefinitions) { + _currentInstance.unmakeSource(i, null, true); + } + + this.sourceEndpointDefinitions = {}; + return this; + }; + + var _getScope = function (el, types, connectionType) { + types = _ju.isArray(types) ? types : [ types ]; + var id = _getId(el); + connectionType = connectionType || "default"; + for (var i = 0; i < types.length; i++) { + var eldefs = this[types[i]][id]; + if (eldefs && eldefs[connectionType]) { + return eldefs[connectionType].def.scope || this.Defaults.Scope; + } + } + }.bind(this); + + var _setScope = function (el, scope, types, connectionType) { + types = _ju.isArray(types) ? types : [ types ]; + var id = _getId(el); + connectionType = connectionType || "default"; + for (var i = 0; i < types.length; i++) { + var eldefs = this[types[i]][id]; + if (eldefs && eldefs[connectionType]) { + eldefs[connectionType].def.scope = scope; + } + } + + }.bind(this); + + this.getScope = function (el, scope) { + return _getScope(el, [ "sourceEndpointDefinitions", "targetEndpointDefinitions" ]); + }; + this.getSourceScope = function (el) { + return _getScope(el, "sourceEndpointDefinitions"); + }; + this.getTargetScope = function (el) { + return _getScope(el, "targetEndpointDefinitions"); + }; + this.setScope = function (el, scope, connectionType) { + this.setSourceScope(el, scope, connectionType); + this.setTargetScope(el, scope, connectionType); + }; + this.setSourceScope = function (el, scope, connectionType) { + _setScope(el, scope, "sourceEndpointDefinitions", connectionType); + // we get the source scope during the mousedown event, but we also want to set this. + this.setDragScope(el, scope); + }; + this.setTargetScope = function (el, scope, connectionType) { + _setScope(el, scope, "targetEndpointDefinitions", connectionType); + this.setDropScope(el, scope); + }; + + // see api docs + this.unmakeEveryTarget = function () { + for (var i in this.targetEndpointDefinitions) { + _currentInstance.unmakeTarget(i, true); + } + + this.targetEndpointDefinitions = {}; + return this; + }; + + // does the work of setting a source enabled or disabled. + var _setEnabled = function (type, el, state, toggle, connectionType) { + var a = type === "source" ? this.sourceEndpointDefinitions : this.targetEndpointDefinitions, + originalState, info, newState; + + connectionType = connectionType || "default"; + + // a selector or an array + if (el.length && !_ju.isString(el)) { + originalState = []; + for (var i = 0, ii = el.length; i < ii; i++) { + info = _info(el[i]); + if (a[info.id] && a[info.id][connectionType]) { + originalState[i] = a[info.id][connectionType].enabled; + newState = toggle ? !originalState[i] : state; + a[info.id][connectionType].enabled = newState; + _currentInstance[newState ? "removeClass" : "addClass"](info.el, "jtk-" + type + "-disabled"); + } + } + } + // otherwise a DOM element or a String ID. + else { + info = _info(el); + var id = info.id; + if (a[id] && a[id][connectionType]) { + originalState = a[id][connectionType].enabled; + newState = toggle ? !originalState : state; + a[id][connectionType].enabled = newState; + _currentInstance[newState ? "removeClass" : "addClass"](info.el, "jtk-" + type + "-disabled"); + } + } + return originalState; + }.bind(this); + + var _first = function (el, fn) { + if (_ju.isString(el) || !el.length) { + return fn.apply(this, [ el ]); + } + else if (el.length) { + return fn.apply(this, [ el[0] ]); + } + + }.bind(this); + + this.toggleSourceEnabled = function (el, connectionType) { + _setEnabled("source", el, null, true, connectionType); + return this.isSourceEnabled(el, connectionType); + }; + + this.setSourceEnabled = function (el, state, connectionType) { + return _setEnabled("source", el, state, null, connectionType); + }; + this.isSource = function (el, connectionType) { + connectionType = connectionType || "default"; + return _first(el, function (_el) { + var eldefs = this.sourceEndpointDefinitions[_info(_el).id]; + return eldefs != null && eldefs[connectionType] != null; + }.bind(this)); + }; + this.isSourceEnabled = function (el, connectionType) { + connectionType = connectionType || "default"; + return _first(el, function (_el) { + var sep = this.sourceEndpointDefinitions[_info(_el).id]; + return sep && sep[connectionType] && sep[connectionType].enabled === true; + }.bind(this)); + }; + + this.toggleTargetEnabled = function (el, connectionType) { + _setEnabled("target", el, null, true, connectionType); + return this.isTargetEnabled(el, connectionType); + }; + + this.isTarget = function (el, connectionType) { + connectionType = connectionType || "default"; + return _first(el, function (_el) { + var eldefs = this.targetEndpointDefinitions[_info(_el).id]; + return eldefs != null && eldefs[connectionType] != null; + }.bind(this)); + }; + this.isTargetEnabled = function (el, connectionType) { + connectionType = connectionType || "default"; + return _first(el, function (_el) { + var tep = this.targetEndpointDefinitions[_info(_el).id]; + return tep && tep[connectionType] && tep[connectionType].enabled === true; + }.bind(this)); + }; + this.setTargetEnabled = function (el, state, connectionType) { + return _setEnabled("target", el, state, null, connectionType); + }; + +// --------------------- end makeSource/makeTarget ---------------------------------------------- + + this.ready = function (fn) { + _currentInstance.bind("ready", fn); + }; + + var _elEach = function(el, fn) { + // support both lists... + if (typeof el === 'object' && el.length) { + for (var i = 0, ii = el.length; i < ii; i++) { + fn(el[i]); + } + } + else {// ...and single strings or elements. + fn(el); + } + + return _currentInstance; + }; + + // repaint some element's endpoints and connections + this.repaint = function (el, ui, timestamp) { + return _elEach(el, function(_el) { + _draw(_el, ui, timestamp); + }); + }; + + this.revalidate = function (el, timestamp, isIdAlready) { + return _elEach(el, function(_el) { + var elId = isIdAlready ? _el : _currentInstance.getId(_el); + _currentInstance.updateOffset({ elId: elId, recalc: true, timestamp:timestamp }); + var dm = _currentInstance.getDragManager(); + if (dm) { + dm.updateOffsets(elId); + } + _currentInstance.repaint(_el); + }); + }; + + // repaint every endpoint and connection. + this.repaintEverything = function () { + // TODO this timestamp causes continuous anchors to not repaint properly. + // fix this. do not just take out the timestamp. it runs a lot faster with + // the timestamp included. + var timestamp = _timestamp(), elId; + + for (elId in endpointsByElement) { + _currentInstance.updateOffset({ elId: elId, recalc: true, timestamp: timestamp }); + } + + for (elId in endpointsByElement) { + _draw(elId, null, timestamp); + } + + return this; + }; + + this.removeAllEndpoints = function (el, recurse, affectedElements) { + affectedElements = affectedElements || []; + var _one = function (_el) { + var info = _info(_el), + ebe = endpointsByElement[info.id], + i, ii; + + if (ebe) { + affectedElements.push(info); + for (i = 0, ii = ebe.length; i < ii; i++) { + _currentInstance.deleteEndpoint(ebe[i], false); + } + } + delete endpointsByElement[info.id]; + + if (recurse) { + if (info.el && info.el.nodeType !== 3 && info.el.nodeType !== 8) { + for (i = 0, ii = info.el.childNodes.length; i < ii; i++) { + _one(info.el.childNodes[i]); + } + } + } + + }; + _one(el); + return this; + }; + + var _doRemove = function(info, affectedElements) { + _currentInstance.removeAllEndpoints(info.id, true, affectedElements); + var dm = _currentInstance.getDragManager(); + var _one = function(_info) { + + if (dm) { + dm.elementRemoved(_info.id); + } + _currentInstance.anchorManager.clearFor(_info.id); + _currentInstance.anchorManager.removeFloatingConnection(_info.id); + + if (_currentInstance.isSource(_info.el)) { + _currentInstance.unmakeSource(_info.el); + } + if (_currentInstance.isTarget(_info.el)) { + _currentInstance.unmakeTarget(_info.el); + } + _currentInstance.destroyDraggable(_info.el); + _currentInstance.destroyDroppable(_info.el); + + + delete _currentInstance.floatingConnections[_info.id]; + delete managedElements[_info.id]; + delete offsets[_info.id]; + if (_info.el) { + _currentInstance.removeElement(_info.el); + _info.el._jsPlumb = null; + } + }; + + // remove all affected child elements + for (var ae = 1; ae < affectedElements.length; ae++) { + _one(affectedElements[ae]); + } + // and always remove the requested one from the dom. + _one(info); + }; + + /** + * Remove the given element, including cleaning up all endpoints registered for it. + * This is exposed in the public API but also used internally by jsPlumb when removing the + * element associated with a connection drag. + */ + this.remove = function (el, doNotRepaint) { + var info = _info(el), affectedElements = []; + if (info.text) { + info.el.parentNode.removeChild(info.el); + } + else if (info.id) { + _currentInstance.batch(function () { + _doRemove(info, affectedElements); + }, doNotRepaint === true); + } + return _currentInstance; + }; + + this.empty = function (el, doNotRepaint) { + var affectedElements = []; + var _one = function(el, dontRemoveFocus) { + var info = _info(el); + if (info.text) { + info.el.parentNode.removeChild(info.el); + } + else if (info.el) { + while(info.el.childNodes.length > 0) { + _one(info.el.childNodes[0]); + } + if (!dontRemoveFocus) { + _doRemove(info, affectedElements); + } + } + }; + + _currentInstance.batch(function() { + _one(el, true); + }, doNotRepaint === false); + + return _currentInstance; + }; + + this.reset = function (doNotUnbindInstanceEventListeners) { + _currentInstance.silently(function() { + _hoverSuspended = false; + _currentInstance.removeAllGroups(); + _currentInstance.removeGroupManager(); + _currentInstance.deleteEveryEndpoint(); + if (!doNotUnbindInstanceEventListeners) { + _currentInstance.unbind(); + } + this.targetEndpointDefinitions = {}; + this.sourceEndpointDefinitions = {}; + connections.length = 0; + if (this.doReset) { + this.doReset(); + } + }.bind(this)); + }; + + var _clearObject = function (obj) { + if (obj.canvas && obj.canvas.parentNode) { + obj.canvas.parentNode.removeChild(obj.canvas); + } + obj.cleanup(); + obj.destroy(); + }; + + this.clear = function () { + _currentInstance.select().each(_clearObject); + _currentInstance.selectEndpoints().each(_clearObject); + + endpointsByElement = {}; + endpointsByUUID = {}; + }; + + this.setDefaultScope = function (scope) { + DEFAULT_SCOPE = scope; + return _currentInstance; + }; + + this.deriveEndpointAndAnchorSpec = function(type, dontPrependDefault) { + var bits = ((dontPrependDefault ? "" : "default ") + type).split(/[\s]/), eps = null, ep = null, a = null, as = null; + for (var i = 0; i < bits.length; i++) { + var _t = _currentInstance.getType(bits[i], "connection"); + if (_t) { + if (_t.endpoints) { + eps = _t.endpoints; + } + if (_t.endpoint) { + ep = _t.endpoint; + } + if (_t.anchors) { + as = _t.anchors; + } + if (_t.anchor) { + a = _t.anchor; + } + } + } + return { endpoints: eps ? eps : [ ep, ep ], anchors: as ? as : [a, a ]}; + }; + + // sets the id of some element, changing whatever we need to to keep track. + this.setId = function (el, newId, doNotSetAttribute) { + // + var id; + + if (_ju.isString(el)) { + id = el; + } + else { + el = this.getElement(el); + id = this.getId(el); + } + + var sConns = this.getConnections({source: id, scope: '*'}, true), + tConns = this.getConnections({target: id, scope: '*'}, true); + + newId = "" + newId; + + if (!doNotSetAttribute) { + el = this.getElement(id); + this.setAttribute(el, "id", newId); + } + else { + el = this.getElement(newId); + } + + endpointsByElement[newId] = endpointsByElement[id] || []; + for (var i = 0, ii = endpointsByElement[newId].length; i < ii; i++) { + endpointsByElement[newId][i].setElementId(newId); + endpointsByElement[newId][i].setReferenceElement(el); + } + delete endpointsByElement[id]; + + this.sourceEndpointDefinitions[newId] = this.sourceEndpointDefinitions[id]; + delete this.sourceEndpointDefinitions[id]; + this.targetEndpointDefinitions[newId] = this.targetEndpointDefinitions[id]; + delete this.targetEndpointDefinitions[id]; + + this.anchorManager.changeId(id, newId); + var dm = this.getDragManager(); + if (dm) { + dm.changeId(id, newId); + } + managedElements[newId] = managedElements[id]; + delete managedElements[id]; + + var _conns = function (list, epIdx, type) { + for (var i = 0, ii = list.length; i < ii; i++) { + list[i].endpoints[epIdx].setElementId(newId); + list[i].endpoints[epIdx].setReferenceElement(el); + list[i][type + "Id"] = newId; + list[i][type] = el; + } + }; + _conns(sConns, 0, "source"); + _conns(tConns, 1, "target"); + + this.repaint(newId); + }; + + this.setDebugLog = function (debugLog) { + log = debugLog; + }; + + this.setSuspendDrawing = function (val, repaintAfterwards) { + var curVal = _suspendDrawing; + _suspendDrawing = val; + if (val) { + _suspendedAt = new Date().getTime(); + } else { + _suspendedAt = null; + } + if (repaintAfterwards) { + this.repaintEverything(); + } + return curVal; + }; + + // returns whether or not drawing is currently suspended. + this.isSuspendDrawing = function () { + return _suspendDrawing; + }; + + // return timestamp for when drawing was suspended. + this.getSuspendedAt = function () { + return _suspendedAt; + }; + + this.batch = function (fn, doNotRepaintAfterwards) { + var _wasSuspended = this.isSuspendDrawing(); + if (!_wasSuspended) { + this.setSuspendDrawing(true); + } + try { + fn(); + } + catch (e) { + _ju.log("Function run while suspended failed", e); + } + if (!_wasSuspended) { + this.setSuspendDrawing(false, !doNotRepaintAfterwards); + } + }; + + this.doWhileSuspended = this.batch; + + this.getCachedData = _getCachedData; + this.timestamp = _timestamp; + this.show = function (el, changeEndpoints) { + _setVisible(el, "block", changeEndpoints); + return _currentInstance; + }; + + // TODO: update this method to return the current state. + this.toggleVisible = _toggleVisible; + this.addListener = this.bind; + + var floatingConnections = []; + this.registerFloatingConnection = function(info, conn, ep) { + floatingConnections[info.id] = conn; + // only register for the target endpoint; we will not be dragging the source at any time + // before this connection is either discarded or made into a permanent connection. + _ju.addToList(endpointsByElement, info.id, ep); + }; + this.getFloatingConnectionFor = function(id) { + return floatingConnections[id]; + }; + }; + + _ju.extend(root.jsPlumbInstance, _ju.EventGenerator, { + setAttribute: function (el, a, v) { + this.setAttribute(el, a, v); + }, + getAttribute: function (el, a) { + return this.getAttribute(root.jsPlumb.getElement(el), a); + }, + convertToFullOverlaySpec: function(spec) { + if (_ju.isString(spec)) { + spec = [ spec, { } ]; + } + spec[1].id = spec[1].id || _ju.uuid(); + return spec; + }, + registerConnectionType: function (id, type) { + this._connectionTypes[id] = root.jsPlumb.extend({}, type); + if (type.overlays) { + var to = {}; + for (var i = 0; i < type.overlays.length; i++) { + // if a string, convert to object representation so that we can store the typeid on it. + // also assign an id. + var fo = this.convertToFullOverlaySpec(type.overlays[i]); + to[fo[1].id] = fo; + } + this._connectionTypes[id].overlays = to; + } + }, + registerConnectionTypes: function (types) { + for (var i in types) { + this.registerConnectionType(i, types[i]); + } + }, + registerEndpointType: function (id, type) { + this._endpointTypes[id] = root.jsPlumb.extend({}, type); + if (type.overlays) { + var to = {}; + for (var i = 0; i < type.overlays.length; i++) { + // if a string, convert to object representation so that we can store the typeid on it. + // also assign an id. + var fo = this.convertToFullOverlaySpec(type.overlays[i]); + to[fo[1].id] = fo; + } + this._endpointTypes[id].overlays = to; + } + }, + registerEndpointTypes: function (types) { + for (var i in types) { + this.registerEndpointType(i, types[i]); + } + }, + getType: function (id, typeDescriptor) { + return typeDescriptor === "connection" ? this._connectionTypes[id] : this._endpointTypes[id]; + }, + setIdChanged: function (oldId, newId) { + this.setId(oldId, newId, true); + }, + // set parent: change the parent for some node and update all the registrations we need to. + setParent: function (el, newParent) { + var _dom = this.getElement(el), + _id = this.getId(_dom), + _pdom = this.getElement(newParent), + _pid = this.getId(_pdom), + dm = this.getDragManager(); + + _dom.parentNode.removeChild(_dom); + _pdom.appendChild(_dom); + if (dm) { + dm.setParent(_dom, _id, _pdom, _pid); + } + }, + extend: function (o1, o2, names) { + var i; + if (names) { + for (i = 0; i < names.length; i++) { + o1[names[i]] = o2[names[i]]; + } + } + else { + for (i in o2) { + o1[i] = o2[i]; + } + } + + return o1; + }, + floatingConnections: {}, + getFloatingAnchorIndex: function (jpc) { + return jpc.endpoints[0].isFloating() ? 0 : jpc.endpoints[1].isFloating() ? 1 : -1; + } + }); + +// --------------------- static instance + module registration ------------------------------------------- + +// create static instance and assign to window if window exists. + var jsPlumb = new jsPlumbInstance(); + // register on 'root' (lets us run on server or browser) + root.jsPlumb = jsPlumb; + // add 'getInstance' method to static instance + jsPlumb.getInstance = function (_defaults, overrideFns) { + var j = new jsPlumbInstance(_defaults); + if (overrideFns) { + for (var ovf in overrideFns) { + j[ovf] = overrideFns[ovf]; + } + } + j.init(); + return j; + }; + jsPlumb.each = function (spec, fn) { + if (spec == null) { + return; + } + if (typeof spec === "string") { + fn(jsPlumb.getElement(spec)); + } + else if (spec.length != null) { + for (var i = 0; i < spec.length; i++) { + fn(jsPlumb.getElement(spec[i])); + } + } + else { + fn(spec); + } // assume it's an element. + }; + + // CommonJS + if (typeof exports !== 'undefined') { + exports.jsPlumb = jsPlumb; + } + +// --------------------- end static instance + AMD registration ------------------------------------------- + +}).call(typeof window !== 'undefined' ? window : this); + +/* + * 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +;(function() { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + + // ------------------------------ BEGIN OverlayCapablejsPlumbUIComponent -------------------------------------------- + + var _internalLabelOverlayId = "__label", + // this is a shortcut helper method to let people add a label as + // overlay. + _makeLabelOverlay = function (component, params) { + + var _params = { + cssClass: params.cssClass, + labelStyle: component.labelStyle, + id: _internalLabelOverlayId, + component: component, + _jsPlumb: component._jsPlumb.instance // TODO not necessary, since the instance can be accessed through the component. + }, + mergedParams = _jp.extend(_params, params); + + return new _jp.Overlays[component._jsPlumb.instance.getRenderMode()].Label(mergedParams); + }, + _processOverlay = function (component, o) { + var _newOverlay = null; + if (_ju.isArray(o)) { // this is for the shorthand ["Arrow", { width:50 }] syntax + // there's also a three arg version: + // ["Arrow", { width:50 }, {location:0.7}] + // which merges the 3rd arg into the 2nd. + var type = o[0], + // make a copy of the object so as not to mess up anyone else's reference... + p = _jp.extend({component: component, _jsPlumb: component._jsPlumb.instance}, o[1]); + if (o.length === 3) { + _jp.extend(p, o[2]); + } + _newOverlay = new _jp.Overlays[component._jsPlumb.instance.getRenderMode()][type](p); + } else if (o.constructor === String) { + _newOverlay = new _jp.Overlays[component._jsPlumb.instance.getRenderMode()][o]({component: component, _jsPlumb: component._jsPlumb.instance}); + } else { + _newOverlay = o; + } + + _newOverlay.id = _newOverlay.id || _ju.uuid(); + component.cacheTypeItem("overlay", _newOverlay, _newOverlay.id); + component._jsPlumb.overlays[_newOverlay.id] = _newOverlay; + + return _newOverlay; + }; + + _jp.OverlayCapableJsPlumbUIComponent = function (params) { + + root.jsPlumbUIComponent.apply(this, arguments); + this._jsPlumb.overlays = {}; + this._jsPlumb.overlayPositions = {}; + + if (params.label) { + this.getDefaultType().overlays[_internalLabelOverlayId] = ["Label", { + label: params.label, + location: params.labelLocation || this.defaultLabelLocation || 0.5, + labelStyle: params.labelStyle || this._jsPlumb.instance.Defaults.LabelStyle, + id:_internalLabelOverlayId + }]; + } + + this.setListenerComponent = function (c) { + if (this._jsPlumb) { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i].setListenerComponent(c); + } + } + }; + }; + + _jp.OverlayCapableJsPlumbUIComponent.applyType = function (component, t) { + if (t.overlays) { + // loop through the ones in the type. if already present on the component, + // dont remove or re-add. + var keep = {}, i; + + for (i in t.overlays) { + + var existing = component._jsPlumb.overlays[t.overlays[i][1].id]; + if (existing) { + // maybe update from data, if there were parameterised values for instance. + existing.updateFrom(t.overlays[i][1]); + keep[t.overlays[i][1].id] = true; + } + else { + var c = component.getCachedTypeItem("overlay", t.overlays[i][1].id); + if (c != null) { + c.reattach(component._jsPlumb.instance, component); + c.setVisible(true); + // maybe update from data, if there were parameterised values for instance. + c.updateFrom(t.overlays[i][1]); + component._jsPlumb.overlays[c.id] = c; + } + else { + c = component.addOverlay(t.overlays[i], true); + } + keep[c.id] = true; + } + } + + // now loop through the full overlays and remove those that we dont want to keep + for (i in component._jsPlumb.overlays) { + if (keep[component._jsPlumb.overlays[i].id] == null) { + component.removeOverlay(component._jsPlumb.overlays[i].id, true); // remove overlay but dont clean it up. + // that would remove event listeners etc; overlays are never discarded by the types stuff, they are + // just detached/reattached. + } + } + } + }; + + _ju.extend(_jp.OverlayCapableJsPlumbUIComponent, root.jsPlumbUIComponent, { + + setHover: function (hover, ignoreAttachedElements) { + if (this._jsPlumb && !this._jsPlumb.instance.isConnectionBeingDragged()) { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i][hover ? "addClass" : "removeClass"](this._jsPlumb.instance.hoverClass); + } + } + }, + addOverlay: function (overlay, doNotRepaint) { + var o = _processOverlay(this, overlay); + if (!doNotRepaint) { + this.repaint(); + } + return o; + }, + getOverlay: function (id) { + return this._jsPlumb.overlays[id]; + }, + getOverlays: function () { + return this._jsPlumb.overlays; + }, + hideOverlay: function (id) { + var o = this.getOverlay(id); + if (o) { + o.hide(); + } + }, + hideOverlays: function () { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i].hide(); + } + }, + showOverlay: function (id) { + var o = this.getOverlay(id); + if (o) { + o.show(); + } + }, + showOverlays: function () { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i].show(); + } + }, + removeAllOverlays: function (doNotRepaint) { + for (var i in this._jsPlumb.overlays) { + if (this._jsPlumb.overlays[i].cleanup) { + this._jsPlumb.overlays[i].cleanup(); + } + } + + this._jsPlumb.overlays = {}; + this._jsPlumb.overlayPositions = null; + this._jsPlumb.overlayPlacements= {}; + if (!doNotRepaint) { + this.repaint(); + } + }, + removeOverlay: function (overlayId, dontCleanup) { + var o = this._jsPlumb.overlays[overlayId]; + if (o) { + o.setVisible(false); + if (!dontCleanup && o.cleanup) { + o.cleanup(); + } + delete this._jsPlumb.overlays[overlayId]; + if (this._jsPlumb.overlayPositions) { + delete this._jsPlumb.overlayPositions[overlayId]; + } + + if (this._jsPlumb.overlayPlacements) { + delete this._jsPlumb.overlayPlacements[overlayId]; + } + } + }, + removeOverlays: function () { + for (var i = 0, j = arguments.length; i < j; i++) { + this.removeOverlay(arguments[i]); + } + }, + moveParent: function (newParent) { + if (this.bgCanvas) { + this.bgCanvas.parentNode.removeChild(this.bgCanvas); + newParent.appendChild(this.bgCanvas); + } + + if (this.canvas && this.canvas.parentNode) { + this.canvas.parentNode.removeChild(this.canvas); + newParent.appendChild(this.canvas); + + for (var i in this._jsPlumb.overlays) { + if (this._jsPlumb.overlays[i].isAppendedAtTopLevel) { + var el = this._jsPlumb.overlays[i].getElement(); + el.parentNode.removeChild(el); + newParent.appendChild(el); + } + } + } + }, + getLabel: function () { + var lo = this.getOverlay(_internalLabelOverlayId); + return lo != null ? lo.getLabel() : null; + }, + getLabelOverlay: function () { + return this.getOverlay(_internalLabelOverlayId); + }, + setLabel: function (l) { + var lo = this.getOverlay(_internalLabelOverlayId); + if (!lo) { + var params = l.constructor === String || l.constructor === Function ? { label: l } : l; + lo = _makeLabelOverlay(this, params); + this._jsPlumb.overlays[_internalLabelOverlayId] = lo; + } + else { + if (l.constructor === String || l.constructor === Function) { + lo.setLabel(l); + } + else { + if (l.label) { + lo.setLabel(l.label); + } + if (l.location) { + lo.setLocation(l.location); + } + } + } + + if (!this._jsPlumb.instance.isSuspendDrawing()) { + this.repaint(); + } + }, + cleanup: function (force) { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i].cleanup(force); + this._jsPlumb.overlays[i].destroy(force); + } + if (force) { + this._jsPlumb.overlays = {}; + this._jsPlumb.overlayPositions = null; + } + }, + setVisible: function (v) { + this[v ? "showOverlays" : "hideOverlays"](); + }, + setAbsoluteOverlayPosition: function (overlay, xy) { + this._jsPlumb.overlayPositions[overlay.id] = xy; + }, + getAbsoluteOverlayPosition: function (overlay) { + return this._jsPlumb.overlayPositions ? this._jsPlumb.overlayPositions[overlay.id] : null; + }, + _clazzManip:function(action, clazz, dontUpdateOverlays) { + if (!dontUpdateOverlays) { + for (var i in this._jsPlumb.overlays) { + this._jsPlumb.overlays[i][action + "Class"](clazz); + } + } + }, + addClass:function(clazz, dontUpdateOverlays) { + this._clazzManip("add", clazz, dontUpdateOverlays); + }, + removeClass:function(clazz, dontUpdateOverlays) { + this._clazzManip("remove", clazz, dontUpdateOverlays); + } + }); + +// ------------------------------ END OverlayCapablejsPlumbUIComponent -------------------------------------------- + +}).call(typeof window !== 'undefined' ? window : this); + +/* + * This file contains the code for Endpoints. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +;(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + + // create the drag handler for a connection + var _makeConnectionDragHandler = function (endpoint, placeholder, _jsPlumb) { + var stopped = false; + return { + drag: function () { + if (stopped) { + stopped = false; + return true; + } + + if (placeholder.element) { + var _ui = _jsPlumb.getUIPosition(arguments, _jsPlumb.getZoom()); + if (_ui != null) { + _jsPlumb.setPosition(placeholder.element, _ui); + } + _jsPlumb.repaint(placeholder.element, _ui); + // always repaint the source endpoint, because only continuous/dynamic anchors cause the endpoint + // to be repainted, so static anchors need to be told (or the endpoint gets dragged around) + endpoint.paint({anchorPoint:endpoint.anchor.getCurrentLocation({element:endpoint})}); + } + }, + stopDrag: function () { + stopped = true; + } + }; + }; + + // creates a placeholder div for dragging purposes, adds it, and pre-computes its offset. + var _makeDraggablePlaceholder = function (placeholder, _jsPlumb, ipco, ips) { + var n = _jsPlumb.createElement("div", { position : "absolute" }); + _jsPlumb.appendElement(n); + var id = _jsPlumb.getId(n); + _jsPlumb.setPosition(n, ipco); + n.style.width = ips[0] + "px"; + n.style.height = ips[1] + "px"; + _jsPlumb.manage(id, n, true); // TRANSIENT MANAGE + // create and assign an id, and initialize the offset. + placeholder.id = id; + placeholder.element = n; + }; + + // create a floating endpoint (for drag connections) + var _makeFloatingEndpoint = function (paintStyle, referenceAnchor, endpoint, referenceCanvas, sourceElement, _jsPlumb, _newEndpoint, scope) { + var floatingAnchor = new _jp.FloatingAnchor({ reference: referenceAnchor, referenceCanvas: referenceCanvas, jsPlumbInstance: _jsPlumb }); + //setting the scope here should not be the way to fix that mootools issue. it should be fixed by not + // adding the floating endpoint as a droppable. that makes more sense anyway! + // TRANSIENT MANAGE + return _newEndpoint({ + paintStyle: paintStyle, + endpoint: endpoint, + anchor: floatingAnchor, + source: sourceElement, + scope: scope + }); + }; + + var typeParameters = [ "connectorStyle", "connectorHoverStyle", "connectorOverlays", + "connector", "connectionType", "connectorClass", "connectorHoverClass" ]; + + // a helper function that tries to find a connection to the given element, and returns it if so. if elementWithPrecedence is null, + // or no connection to it is found, we return the first connection in our list. + var findConnectionToUseForDynamicAnchor = function (ep, elementWithPrecedence) { + var idx = 0; + if (elementWithPrecedence != null) { + for (var i = 0; i < ep.connections.length; i++) { + if (ep.connections[i].sourceId === elementWithPrecedence || ep.connections[i].targetId === elementWithPrecedence) { + idx = i; + break; + } + } + } + + return ep.connections[idx]; + }; + + _jp.Endpoint = function (params) { + var _jsPlumb = params._jsPlumb, + _newConnection = params.newConnection, + _newEndpoint = params.newEndpoint; + + this.idPrefix = "_jsplumb_e_"; + this.defaultLabelLocation = [ 0.5, 0.5 ]; + this.defaultOverlayKeys = ["Overlays", "EndpointOverlays"]; + _jp.OverlayCapableJsPlumbUIComponent.apply(this, arguments); + +// TYPE + + this.appendToDefaultType({ + connectionType:params.connectionType, + maxConnections: params.maxConnections == null ? this._jsPlumb.instance.Defaults.MaxConnections : params.maxConnections, // maximum number of connections this endpoint can be the source of., + paintStyle: params.endpointStyle || params.paintStyle || params.style || this._jsPlumb.instance.Defaults.EndpointStyle || _jp.Defaults.EndpointStyle, + hoverPaintStyle: params.endpointHoverStyle || params.hoverPaintStyle || this._jsPlumb.instance.Defaults.EndpointHoverStyle || _jp.Defaults.EndpointHoverStyle, + connectorStyle: params.connectorStyle, + connectorHoverStyle: params.connectorHoverStyle, + connectorClass: params.connectorClass, + connectorHoverClass: params.connectorHoverClass, + connectorOverlays: params.connectorOverlays, + connector: params.connector, + connectorTooltip: params.connectorTooltip + }); + +// END TYPE + + this._jsPlumb.enabled = !(params.enabled === false); + this._jsPlumb.visible = true; + this.element = _jp.getElement(params.source); + this._jsPlumb.uuid = params.uuid; + this._jsPlumb.floatingEndpoint = null; + var inPlaceCopy = null; + if (this._jsPlumb.uuid) { + params.endpointsByUUID[this._jsPlumb.uuid] = this; + } + this.elementId = params.elementId; + this.dragProxy = params.dragProxy; + + this._jsPlumb.connectionCost = params.connectionCost; + this._jsPlumb.connectionsDirected = params.connectionsDirected; + this._jsPlumb.currentAnchorClass = ""; + this._jsPlumb.events = {}; + + var deleteOnEmpty = params.deleteOnEmpty === true; + this.setDeleteOnEmpty = function(d) { + deleteOnEmpty = d; + }; + + var _updateAnchorClass = function () { + // stash old, get new + var oldAnchorClass = _jsPlumb.endpointAnchorClassPrefix + "-" + this._jsPlumb.currentAnchorClass; + this._jsPlumb.currentAnchorClass = this.anchor.getCssClass(); + var anchorClass = _jsPlumb.endpointAnchorClassPrefix + (this._jsPlumb.currentAnchorClass ? "-" + this._jsPlumb.currentAnchorClass : ""); + + this.removeClass(oldAnchorClass); + this.addClass(anchorClass); + // add and remove at the same time to reduce the number of reflows. + _jp.updateClasses(this.element, anchorClass, oldAnchorClass); + }.bind(this); + + this.prepareAnchor = function(anchorParams) { + var a = this._jsPlumb.instance.makeAnchor(anchorParams, this.elementId, _jsPlumb); + a.bind("anchorChanged", function (currentAnchor) { + this.fire("anchorChanged", {endpoint: this, anchor: currentAnchor}); + _updateAnchorClass(); + }.bind(this)); + return a; + }; + + this.setPreparedAnchor = function(anchor, doNotRepaint) { + this._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId); + this.anchor = anchor; + _updateAnchorClass(); + + if (!doNotRepaint) { + this._jsPlumb.instance.repaint(this.elementId); + } + + return this; + }; + + this.setAnchor = function (anchorParams, doNotRepaint) { + var a = this.prepareAnchor(anchorParams); + this.setPreparedAnchor(a, doNotRepaint); + return this; + }; + + var internalHover = function (state) { + if (this.connections.length > 0) { + for (var i = 0; i < this.connections.length; i++) { + this.connections[i].setHover(state, false); + } + } + else { + this.setHover(state); + } + }.bind(this); + + this.bind("mouseover", function () { + internalHover(true); + }); + this.bind("mouseout", function () { + internalHover(false); + }); + + // ANCHOR MANAGER + if (!params._transient) { // in place copies, for example, are transient. they will never need to be retrieved during a paint cycle, because they dont move, and then they are deleted. + this._jsPlumb.instance.anchorManager.add(this, this.elementId); + } + + this.prepareEndpoint = function(ep, typeId) { + var _e = function (t, p) { + var rm = _jsPlumb.getRenderMode(); + if (_jp.Endpoints[rm][t]) { + return new _jp.Endpoints[rm][t](p); + } + if (!_jsPlumb.Defaults.DoNotThrowErrors) { + throw { msg: "jsPlumb: unknown endpoint type '" + t + "'" }; + } + }; + + var endpointArgs = { + _jsPlumb: this._jsPlumb.instance, + cssClass: params.cssClass, + container: params.container, + tooltip: params.tooltip, + connectorTooltip: params.connectorTooltip, + endpoint: this + }; + + var endpoint; + + if (_ju.isString(ep)) { + endpoint = _e(ep, endpointArgs); + } + else if (_ju.isArray(ep)) { + endpointArgs = _ju.merge(ep[1], endpointArgs); + endpoint = _e(ep[0], endpointArgs); + } + else { + endpoint = ep.clone(); + } + + // assign a clone function using a copy of endpointArgs. this is used when a drag starts: the endpoint that was dragged is cloned, + // and the clone is left in its place while the original one goes off on a magical journey. + // the copy is to get around a closure problem, in which endpointArgs ends up getting shared by + // the whole world. + //var argsForClone = jsPlumb.extend({}, endpointArgs); + endpoint.clone = function () { + // TODO this, and the code above, can be refactored to be more dry. + if (_ju.isString(ep)) { + return _e(ep, endpointArgs); + } + else if (_ju.isArray(ep)) { + endpointArgs = _ju.merge(ep[1], endpointArgs); + return _e(ep[0], endpointArgs); + } + }.bind(this); + + endpoint.typeId = typeId; + return endpoint; + }; + + this.setEndpoint = function(ep, doNotRepaint) { + var _ep = this.prepareEndpoint(ep); + this.setPreparedEndpoint(_ep, true); + }; + + this.setPreparedEndpoint = function (ep, doNotRepaint) { + if (this.endpoint != null) { + this.endpoint.cleanup(); + this.endpoint.destroy(); + } + this.endpoint = ep; + this.type = this.endpoint.type; + this.canvas = this.endpoint.canvas; + }; + + _jp.extend(this, params, typeParameters); + + this.isSource = params.isSource || false; + this.isTemporarySource = params.isTemporarySource || false; + this.isTarget = params.isTarget || false; + + this.connections = params.connections || []; + this.connectorPointerEvents = params["connector-pointer-events"]; + + this.scope = params.scope || _jsPlumb.getDefaultScope(); + this.timestamp = null; + this.reattachConnections = params.reattach || _jsPlumb.Defaults.ReattachConnections; + this.connectionsDetachable = _jsPlumb.Defaults.ConnectionsDetachable; + if (params.connectionsDetachable === false || params.detachable === false) { + this.connectionsDetachable = false; + } + this.dragAllowedWhenFull = params.dragAllowedWhenFull !== false; + + if (params.onMaxConnections) { + this.bind("maxConnections", params.onMaxConnections); + } + + // + // add a connection. not part of public API. + // + this.addConnection = function (connection) { + this.connections.push(connection); + this[(this.connections.length > 0 ? "add" : "remove") + "Class"](_jsPlumb.endpointConnectedClass); + this[(this.isFull() ? "add" : "remove") + "Class"](_jsPlumb.endpointFullClass); + }; + + this.detachFromConnection = function (connection, idx, doNotCleanup) { + idx = idx == null ? this.connections.indexOf(connection) : idx; + if (idx >= 0) { + this.connections.splice(idx, 1); + this[(this.connections.length > 0 ? "add" : "remove") + "Class"](_jsPlumb.endpointConnectedClass); + this[(this.isFull() ? "add" : "remove") + "Class"](_jsPlumb.endpointFullClass); + } + + if (!doNotCleanup && deleteOnEmpty && this.connections.length === 0) { + _jsPlumb.deleteObject({ + endpoint: this, + fireEvent: false, + deleteAttachedObjects: doNotCleanup !== true + }); + } + }; + + this.deleteEveryConnection = function(params) { + var c = this.connections.length; + for (var i = 0; i < c; i++) { + _jsPlumb.deleteConnection(this.connections[0], params); + } + }; + + this.detachFrom = function (targetEndpoint, fireEvent, originalEvent) { + var c = []; + for (var i = 0; i < this.connections.length; i++) { + if (this.connections[i].endpoints[1] === targetEndpoint || this.connections[i].endpoints[0] === targetEndpoint) { + c.push(this.connections[i]); + } + } + for (var j = 0, count = c.length; j < count; j++) { + _jsPlumb.deleteConnection(c[0]); + } + return this; + }; + + this.getElement = function () { + return this.element; + }; + + this.setElement = function (el) { + var parentId = this._jsPlumb.instance.getId(el), + curId = this.elementId; + // remove the endpoint from the list for the current endpoint's element + _ju.removeWithFunction(params.endpointsByElement[this.elementId], function (e) { + return e.id === this.id; + }.bind(this)); + this.element = _jp.getElement(el); + this.elementId = _jsPlumb.getId(this.element); + _jsPlumb.anchorManager.rehomeEndpoint(this, curId, this.element); + _jsPlumb.dragManager.endpointAdded(this.element); + _ju.addToList(params.endpointsByElement, parentId, this); + return this; + }; + + /** + * private but must be exposed. + */ + this.makeInPlaceCopy = function () { + var loc = this.anchor.getCurrentLocation({element: this}), + o = this.anchor.getOrientation(this), + acc = this.anchor.getCssClass(), + inPlaceAnchor = { + bind: function () { + }, + compute: function () { + return [ loc[0], loc[1] ]; + }, + getCurrentLocation: function () { + return [ loc[0], loc[1] ]; + }, + getOrientation: function () { + return o; + }, + getCssClass: function () { + return acc; + } + }; + + return _newEndpoint({ + dropOptions: params.dropOptions, + anchor: inPlaceAnchor, + source: this.element, + paintStyle: this.getPaintStyle(), + endpoint: params.hideOnDrag ? "Blank" : this.endpoint, + _transient: true, + scope: this.scope, + reference:this + }); + }; + + /** + * returns a connection from the pool; used when dragging starts. just gets the head of the array if it can. + */ + this.connectorSelector = function () { + return this.connections[0]; + }; + + this.setStyle = this.setPaintStyle; + + this.paint = function (params) { + params = params || {}; + var timestamp = params.timestamp, recalc = !(params.recalc === false); + if (!timestamp || this.timestamp !== timestamp) { + + var info = _jsPlumb.updateOffset({ elId: this.elementId, timestamp: timestamp }); + + var xy = params.offset ? params.offset.o : info.o; + if (xy != null) { + var ap = params.anchorPoint, connectorPaintStyle = params.connectorPaintStyle; + if (ap == null) { + var wh = params.dimensions || info.s, + anchorParams = { xy: [ xy.left, xy.top ], wh: wh, element: this, timestamp: timestamp }; + if (recalc && this.anchor.isDynamic && this.connections.length > 0) { + var c = findConnectionToUseForDynamicAnchor(this, params.elementWithPrecedence), + oIdx = c.endpoints[0] === this ? 1 : 0, + oId = oIdx === 0 ? c.sourceId : c.targetId, + oInfo = _jsPlumb.getCachedData(oId), + oOffset = oInfo.o, oWH = oInfo.s; + + anchorParams.index = oIdx === 0 ? 1 : 0; + anchorParams.connection = c; + anchorParams.txy = [ oOffset.left, oOffset.top ]; + anchorParams.twh = oWH; + anchorParams.tElement = c.endpoints[oIdx]; + } else if (this.connections.length > 0) { + anchorParams.connection = this.connections[0]; + } + ap = this.anchor.compute(anchorParams); + } + + this.endpoint.compute(ap, this.anchor.getOrientation(this), this._jsPlumb.paintStyleInUse, connectorPaintStyle || this.paintStyleInUse); + this.endpoint.paint(this._jsPlumb.paintStyleInUse, this.anchor); + this.timestamp = timestamp; + + // paint overlays + for (var i in this._jsPlumb.overlays) { + if (this._jsPlumb.overlays.hasOwnProperty(i)) { + var o = this._jsPlumb.overlays[i]; + if (o.isVisible()) { + this._jsPlumb.overlayPlacements[i] = o.draw(this.endpoint, this._jsPlumb.paintStyleInUse); + o.paint(this._jsPlumb.overlayPlacements[i]); + } + } + } + } + } + }; + + this.getTypeDescriptor = function () { + return "endpoint"; + }; + this.isVisible = function () { + return this._jsPlumb.visible; + }; + + this.repaint = this.paint; + + var draggingInitialised = false; + this.initDraggable = function () { + + // is this a connection source? we make it draggable and have the + // drag listener maintain a connection with a floating endpoint. + if (!draggingInitialised && _jp.isDragSupported(this.element)) { + var placeholderInfo = { id: null, element: null }, + jpc = null, + existingJpc = false, + existingJpcParams = null, + _dragHandler = _makeConnectionDragHandler(this, placeholderInfo, _jsPlumb), + dragOptions = params.dragOptions || {}, + defaultOpts = {}, + startEvent = _jp.dragEvents.start, + stopEvent = _jp.dragEvents.stop, + dragEvent = _jp.dragEvents.drag, + beforeStartEvent = _jp.dragEvents.beforeStart, + payload; + + // respond to beforeStart from katavorio; this will have, optionally, a payload of attribute values + // that were placed there by the makeSource mousedown listener. + var beforeStart = function(beforeStartParams) { + payload = beforeStartParams.e.payload || {}; + }; + + var start = function (startParams) { + +// ------------- first, get a connection to drag. this may be null, in which case we are dragging a new one. + + jpc = this.connectorSelector(); + +// -------------------------------- now a bunch of tests about whether or not to proceed ------------------------- + + var _continue = true; + // if not enabled, return + if (!this.isEnabled()) { + _continue = false; + } + // if no connection and we're not a source - or temporarily a source, as is the case with makeSource - return. + if (jpc == null && !this.isSource && !this.isTemporarySource) { + _continue = false; + } + // otherwise if we're full and not allowed to drag, also return false. + if (this.isSource && this.isFull() && !(jpc != null && this.dragAllowedWhenFull)) { + _continue = false; + } + // if the connection was setup as not detachable or one of its endpoints + // was setup as connectionsDetachable = false, or Defaults.ConnectionsDetachable + // is set to false... + if (jpc != null && !jpc.isDetachable(this)) { + // .. and the endpoint is full + if (this.isFull()) { + _continue = false; + } else { + // otherwise, if not full, set the connection to null, and we will now proceed + // to drag a new connection. + jpc = null; + } + } + + var beforeDrag = _jsPlumb.checkCondition(jpc == null ? "beforeDrag" : "beforeStartDetach", { + endpoint:this, + source:this.element, + sourceId:this.elementId, + connection:jpc + }); + if (beforeDrag === false) { + _continue = false; + } + // else we might have been given some data. we'll pass it in to a new connection as 'data'. + // here we also merge in the optional payload we were given on mousedown. + else if (typeof beforeDrag === "object") { + _jp.extend(beforeDrag, payload || {}); + } + else { + // or if no beforeDrag data, maybe use the payload on its own. + beforeDrag = payload || {}; + } + + if (_continue === false) { + // this is for mootools and yui. returning false from this causes jquery to stop drag. + // the events are wrapped in both mootools and yui anyway, but i don't think returning + // false from the start callback would stop a drag. + if (_jsPlumb.stopDrag) { + _jsPlumb.stopDrag(this.canvas); + } + _dragHandler.stopDrag(); + return false; + } + +// --------------------------------------------------------------------------------------------------------------------- + + // ok to proceed. + + // clear hover for all connections for this endpoint before continuing. + for (var i = 0; i < this.connections.length; i++) { + this.connections[i].setHover(false); + } + + this.addClass("endpointDrag"); + _jsPlumb.setConnectionBeingDragged(true); + + // if we're not full but there was a connection, make it null. we'll create a new one. + if (jpc && !this.isFull() && this.isSource) { + jpc = null; + } + + _jsPlumb.updateOffset({ elId: this.elementId }); + +// ---------------- make the element we will drag around, and position it ----------------------------- + + var ipco = this._jsPlumb.instance.getOffset(this.canvas), + canvasElement = this.canvas, + ips = this._jsPlumb.instance.getSize(this.canvas); + + _makeDraggablePlaceholder(placeholderInfo, _jsPlumb, ipco, ips); + + // store the id of the dragging div and the source element. the drop function will pick these up. + _jsPlumb.setAttributes(this.canvas, { + "dragId": placeholderInfo.id, + "elId": this.elementId + }); + +// ------------------- create an endpoint that will be our floating endpoint ------------------------------------ + + var endpointToFloat = this.dragProxy || this.endpoint; + if (this.dragProxy == null && this.connectionType != null) { + var aae = this._jsPlumb.instance.deriveEndpointAndAnchorSpec(this.connectionType); + if (aae.endpoints[1]) { + endpointToFloat = aae.endpoints[1]; + } + } + var centerAnchor = this._jsPlumb.instance.makeAnchor("Center"); + centerAnchor.isFloating = true; + this._jsPlumb.floatingEndpoint = _makeFloatingEndpoint(this.getPaintStyle(), centerAnchor, endpointToFloat, this.canvas, placeholderInfo.element, _jsPlumb, _newEndpoint, this.scope); + var _savedAnchor = this._jsPlumb.floatingEndpoint.anchor; + + + if (jpc == null) { + + this.setHover(false, false); + // create a connection. one end is this endpoint, the other is a floating endpoint. + jpc = _newConnection({ + sourceEndpoint: this, + targetEndpoint: this._jsPlumb.floatingEndpoint, + source: this.element, // for makeSource with parent option. ensure source element is represented correctly. + target: placeholderInfo.element, + anchors: [ this.anchor, this._jsPlumb.floatingEndpoint.anchor ], + paintStyle: params.connectorStyle, // this can be null. Connection will use the default. + hoverPaintStyle: params.connectorHoverStyle, + connector: params.connector, // this can also be null. Connection will use the default. + overlays: params.connectorOverlays, + type: this.connectionType, + cssClass: this.connectorClass, + hoverClass: this.connectorHoverClass, + scope:params.scope, + data:beforeDrag + }); + jpc.pending = true; + jpc.addClass(_jsPlumb.draggingClass); + this._jsPlumb.floatingEndpoint.addClass(_jsPlumb.draggingClass); + this._jsPlumb.floatingEndpoint.anchor = _savedAnchor; + // fire an event that informs that a connection is being dragged + _jsPlumb.fire("connectionDrag", jpc); + + // register the new connection on the drag manager. This connection, at this point, is 'pending', + // and has as its target a temporary element (the 'placeholder'). If the connection subsequently + // becomes established, the anchor manager is informed that the target of the connection has + // changed. + + _jsPlumb.anchorManager.newConnection(jpc); + + } else { + existingJpc = true; + jpc.setHover(false); + // new anchor idx + var anchorIdx = jpc.endpoints[0].id === this.id ? 0 : 1; + this.detachFromConnection(jpc, null, true); // detach from the connection while dragging is occurring. but dont cleanup automatically. + + // store the original scope (issue 57) + var dragScope = _jsPlumb.getDragScope(canvasElement); + _jsPlumb.setAttribute(this.canvas, "originalScope", dragScope); + + // fire an event that informs that a connection is being dragged. we do this before + // replacing the original target with the floating element info. + _jsPlumb.fire("connectionDrag", jpc); + + // now we replace ourselves with the temporary div we created above: + if (anchorIdx === 0) { + existingJpcParams = [ jpc.source, jpc.sourceId, canvasElement, dragScope ]; + _jsPlumb.anchorManager.sourceChanged(jpc.endpoints[anchorIdx].elementId, placeholderInfo.id, jpc, placeholderInfo.element); + + } else { + existingJpcParams = [ jpc.target, jpc.targetId, canvasElement, dragScope ]; + jpc.target = placeholderInfo.element; + jpc.targetId = placeholderInfo.id; + + _jsPlumb.anchorManager.updateOtherEndpoint(jpc.sourceId, jpc.endpoints[anchorIdx].elementId, jpc.targetId, jpc); + } + + // store the original endpoint and assign the new floating endpoint for the drag. + jpc.suspendedEndpoint = jpc.endpoints[anchorIdx]; + + // PROVIDE THE SUSPENDED ELEMENT, BE IT A SOURCE OR TARGET (ISSUE 39) + jpc.suspendedElement = jpc.endpoints[anchorIdx].getElement(); + jpc.suspendedElementId = jpc.endpoints[anchorIdx].elementId; + jpc.suspendedElementType = anchorIdx === 0 ? "source" : "target"; + + jpc.suspendedEndpoint.setHover(false); + this._jsPlumb.floatingEndpoint.referenceEndpoint = jpc.suspendedEndpoint; + jpc.endpoints[anchorIdx] = this._jsPlumb.floatingEndpoint; + + jpc.addClass(_jsPlumb.draggingClass); + this._jsPlumb.floatingEndpoint.addClass(_jsPlumb.draggingClass); + } + + _jsPlumb.registerFloatingConnection(placeholderInfo, jpc, this._jsPlumb.floatingEndpoint); + + // // register it and register connection on it. + // _jsPlumb.floatingConnections[placeholderInfo.id] = jpc; + // + // // only register for the target endpoint; we will not be dragging the source at any time + // // before this connection is either discarded or made into a permanent connection. + // _ju.addToList(params.endpointsByElement, placeholderInfo.id, this._jsPlumb.floatingEndpoint); + + + // tell jsplumb about it + _jsPlumb.currentlyDragging = true; + }.bind(this); + + var stop = function () { + _jsPlumb.setConnectionBeingDragged(false); + + if (jpc && jpc.endpoints != null) { + // get the actual drop event (decode from library args to stop function) + var originalEvent = _jsPlumb.getDropEvent(arguments); + // unlock the other endpoint (if it is dynamic, it would have been locked at drag start) + var idx = _jsPlumb.getFloatingAnchorIndex(jpc); + jpc.endpoints[idx === 0 ? 1 : 0].anchor.unlock(); + // TODO: Dont want to know about css classes inside jsplumb, ideally. + jpc.removeClass(_jsPlumb.draggingClass); + + // if we have the floating endpoint then the connection has not been dropped + // on another endpoint. If it is a new connection we throw it away. If it is an + // existing connection we check to see if we should reattach it, throwing it away + // if not. + if (this._jsPlumb && (jpc.deleteConnectionNow || jpc.endpoints[idx] === this._jsPlumb.floatingEndpoint)) { + // 6a. if the connection was an existing one... + if (existingJpc && jpc.suspendedEndpoint) { + // fix for issue35, thanks Sylvain Gizard: when firing the detach event make sure the + // floating endpoint has been replaced. + if (idx === 0) { + jpc.floatingElement = jpc.source; + jpc.floatingId = jpc.sourceId; + jpc.floatingEndpoint = jpc.endpoints[0]; + jpc.floatingIndex = 0; + jpc.source = existingJpcParams[0]; + jpc.sourceId = existingJpcParams[1]; + } else { + // keep a copy of the floating element; the anchor manager will want to clean up. + jpc.floatingElement = jpc.target; + jpc.floatingId = jpc.targetId; + jpc.floatingEndpoint = jpc.endpoints[1]; + jpc.floatingIndex = 1; + jpc.target = existingJpcParams[0]; + jpc.targetId = existingJpcParams[1]; + } + + var fe = this._jsPlumb.floatingEndpoint; // store for later removal. + // restore the original scope (issue 57) + _jsPlumb.setDragScope(existingJpcParams[2], existingJpcParams[3]); + jpc.endpoints[idx] = jpc.suspendedEndpoint; + // if the connection should be reattached, or the other endpoint refuses detach, then + // reset the connection to its original state + if (jpc.isReattach() || jpc._forceReattach || jpc._forceDetach || !_jsPlumb.deleteConnection(jpc, {originalEvent: originalEvent})) { + + jpc.setHover(false); + jpc._forceDetach = null; + jpc._forceReattach = null; + this._jsPlumb.floatingEndpoint.detachFromConnection(jpc); + jpc.suspendedEndpoint.addConnection(jpc); + + // TODO this code is duplicated in lots of places...and there is nothing external + // in the code; it all refers to the connection itself. we could add a + // `checkSanity(connection)` method to anchorManager that did this. + if (idx === 1) { + _jsPlumb.anchorManager.updateOtherEndpoint(jpc.sourceId, jpc.floatingId, jpc.targetId, jpc); + } + else { + _jsPlumb.anchorManager.sourceChanged(jpc.floatingId, jpc.sourceId, jpc, jpc.source); + } + + _jsPlumb.repaint(existingJpcParams[1]); + } + else { + _jsPlumb.deleteObject({endpoint: fe}); + } + } + } + + // makeTargets sets this flag, to tell us we have been replaced and should delete this object. + if (this.deleteAfterDragStop) { + _jsPlumb.deleteObject({endpoint: this}); + } + else { + if (this._jsPlumb) { + this.paint({recalc: false}); + } + } + + // although the connection is no longer valid, there are use cases where this is useful. + _jsPlumb.fire("connectionDragStop", jpc, originalEvent); + // fire this event to give people more fine-grained control (connectionDragStop fires a lot) + if (jpc.pending) { + _jsPlumb.fire("connectionAborted", jpc, originalEvent); + } + // tell jsplumb that dragging is finished. + _jsPlumb.currentlyDragging = false; + jpc.suspendedElement = null; + jpc.suspendedEndpoint = null; + jpc = null; + } + + // if no endpoints, jpc already cleaned up. but still we want to ensure we're reset properly. + // remove the element associated with the floating endpoint + // (and its associated floating endpoint and visual artefacts) + if (placeholderInfo && placeholderInfo.element) { + _jsPlumb.remove(placeholderInfo.element, false, false); + } + // remove the inplace copy + if (inPlaceCopy) { + _jsPlumb.deleteObject({endpoint: inPlaceCopy}); + } + + if (this._jsPlumb) { + // make our canvas visible (TODO: hand off to library; we should not know about DOM) + this.canvas.style.visibility = "visible"; + // unlock our anchor + this.anchor.unlock(); + // clear floating anchor. + this._jsPlumb.floatingEndpoint = null; + } + + }.bind(this); + + dragOptions = _jp.extend(defaultOpts, dragOptions); + dragOptions.scope = this.scope || dragOptions.scope; + dragOptions[beforeStartEvent] = _ju.wrap(dragOptions[beforeStartEvent], beforeStart, false); + dragOptions[startEvent] = _ju.wrap(dragOptions[startEvent], start, false); + // extracted drag handler function so can be used by makeSource + dragOptions[dragEvent] = _ju.wrap(dragOptions[dragEvent], _dragHandler.drag); + dragOptions[stopEvent] = _ju.wrap(dragOptions[stopEvent], stop); + dragOptions.multipleDrop = false; + + dragOptions.canDrag = function () { + return this.isSource || this.isTemporarySource || (this.connections.length > 0 && this.connectionsDetachable !== false); + }.bind(this); + + _jsPlumb.initDraggable(this.canvas, dragOptions, "internal"); + + this.canvas._jsPlumbRelatedElement = this.element; + + draggingInitialised = true; + } + }; + + var ep = params.endpoint || this._jsPlumb.instance.Defaults.Endpoint || _jp.Defaults.Endpoint; + this.setEndpoint(ep, true); + var anchorParamsToUse = params.anchor ? params.anchor : params.anchors ? params.anchors : (_jsPlumb.Defaults.Anchor || "Top"); + this.setAnchor(anchorParamsToUse, true); + + // finally, set type if it was provided + var type = [ "default", (params.type || "")].join(" "); + this.addType(type, params.data, true); + this.canvas = this.endpoint.canvas; + this.canvas._jsPlumb = this; + + this.initDraggable(); + + // pulled this out into a function so we can reuse it for the inPlaceCopy canvas; you can now drop detached connections + // back onto the endpoint you detached it from. + var _initDropTarget = function (canvas, isTransient, endpoint, referenceEndpoint) { + + if (_jp.isDropSupported(this.element)) { + var dropOptions = params.dropOptions || _jsPlumb.Defaults.DropOptions || _jp.Defaults.DropOptions; + dropOptions = _jp.extend({}, dropOptions); + dropOptions.scope = dropOptions.scope || this.scope; + var dropEvent = _jp.dragEvents.drop, + overEvent = _jp.dragEvents.over, + outEvent = _jp.dragEvents.out, + _ep = this, + drop = _jsPlumb.EndpointDropHandler({ + getEndpoint: function () { + return _ep; + }, + jsPlumb: _jsPlumb, + enabled: function () { + return endpoint != null ? endpoint.isEnabled() : true; + }, + isFull: function () { + return endpoint.isFull(); + }, + element: this.element, + elementId: this.elementId, + isSource: this.isSource, + isTarget: this.isTarget, + addClass: function (clazz) { + _ep.addClass(clazz); + }, + removeClass: function (clazz) { + _ep.removeClass(clazz); + }, + isDropAllowed: function () { + return _ep.isDropAllowed.apply(_ep, arguments); + }, + reference:referenceEndpoint, + isRedrop:function(jpc, dhParams) { + return jpc.suspendedEndpoint && dhParams.reference && (jpc.suspendedEndpoint.id === dhParams.reference.id); + } + }); + + dropOptions[dropEvent] = _ju.wrap(dropOptions[dropEvent], drop, true); + dropOptions[overEvent] = _ju.wrap(dropOptions[overEvent], function () { + var draggable = _jp.getDragObject(arguments), + id = _jsPlumb.getAttribute(_jp.getElement(draggable), "dragId"), + _jpc = _jsPlumb.getFloatingConnectionFor(id);//_jsPlumb.floatingConnections[id]; + + if (_jpc != null) { + var idx = _jsPlumb.getFloatingAnchorIndex(_jpc); + // here we should fire the 'over' event if we are a target and this is a new connection, + // or we are the same as the floating endpoint. + var _cont = (this.isTarget && idx !== 0) || (_jpc.suspendedEndpoint && this.referenceEndpoint && this.referenceEndpoint.id === _jpc.suspendedEndpoint.id); + if (_cont) { + var bb = _jsPlumb.checkCondition("checkDropAllowed", { + sourceEndpoint: _jpc.endpoints[idx], + targetEndpoint: this, + connection: _jpc + }); + this[(bb ? "add" : "remove") + "Class"](_jsPlumb.endpointDropAllowedClass); + this[(bb ? "remove" : "add") + "Class"](_jsPlumb.endpointDropForbiddenClass); + _jpc.endpoints[idx].anchor.over(this.anchor, this); + } + } + }.bind(this)); + + dropOptions[outEvent] = _ju.wrap(dropOptions[outEvent], function () { + var draggable = _jp.getDragObject(arguments), + id = draggable == null ? null : _jsPlumb.getAttribute(_jp.getElement(draggable), "dragId"), + _jpc = id ? _jsPlumb.getFloatingConnectionFor(id) : null; + + if (_jpc != null) { + var idx = _jsPlumb.getFloatingAnchorIndex(_jpc); + var _cont = (this.isTarget && idx !== 0) || (_jpc.suspendedEndpoint && this.referenceEndpoint && this.referenceEndpoint.id === _jpc.suspendedEndpoint.id); + if (_cont) { + this.removeClass(_jsPlumb.endpointDropAllowedClass); + this.removeClass(_jsPlumb.endpointDropForbiddenClass); + _jpc.endpoints[idx].anchor.out(); + } + } + }.bind(this)); + + _jsPlumb.initDroppable(canvas, dropOptions, "internal", isTransient); + } + }.bind(this); + + // Initialise the endpoint's canvas as a drop target. The drop handler will take care of the logic of whether + // something can actually be dropped. + if (!this.anchor.isFloating) { + _initDropTarget(this.canvas, !(params._transient || this.anchor.isFloating), this, params.reference); + } + + return this; + }; + + _ju.extend(_jp.Endpoint, _jp.OverlayCapableJsPlumbUIComponent, { + + setVisible: function (v, doNotChangeConnections, doNotNotifyOtherEndpoint) { + this._jsPlumb.visible = v; + if (this.canvas) { + this.canvas.style.display = v ? "block" : "none"; + } + this[v ? "showOverlays" : "hideOverlays"](); + if (!doNotChangeConnections) { + for (var i = 0; i < this.connections.length; i++) { + this.connections[i].setVisible(v); + if (!doNotNotifyOtherEndpoint) { + var oIdx = this === this.connections[i].endpoints[0] ? 1 : 0; + // only change the other endpoint if this is its only connection. + if (this.connections[i].endpoints[oIdx].connections.length === 1) { + this.connections[i].endpoints[oIdx].setVisible(v, true, true); + } + } + } + } + }, + getAttachedElements: function () { + return this.connections; + }, + applyType: function (t, doNotRepaint) { + this.setPaintStyle(t.endpointStyle || t.paintStyle, doNotRepaint); + this.setHoverPaintStyle(t.endpointHoverStyle || t.hoverPaintStyle, doNotRepaint); + if (t.maxConnections != null) { + this._jsPlumb.maxConnections = t.maxConnections; + } + if (t.scope) { + this.scope = t.scope; + } + _jp.extend(this, t, typeParameters); + if (t.cssClass != null && this.canvas) { + this._jsPlumb.instance.addClass(this.canvas, t.cssClass); + } + _jp.OverlayCapableJsPlumbUIComponent.applyType(this, t); + }, + isEnabled: function () { + return this._jsPlumb.enabled; + }, + setEnabled: function (e) { + this._jsPlumb.enabled = e; + }, + cleanup: function () { + var anchorClass = this._jsPlumb.instance.endpointAnchorClassPrefix + (this._jsPlumb.currentAnchorClass ? "-" + this._jsPlumb.currentAnchorClass : ""); + _jp.removeClass(this.element, anchorClass); + this.anchor = null; + this.endpoint.cleanup(true); + this.endpoint.destroy(); + this.endpoint = null; + // drag/drop + this._jsPlumb.instance.destroyDraggable(this.canvas, "internal"); + this._jsPlumb.instance.destroyDroppable(this.canvas, "internal"); + }, + setHover: function (h) { + if (this.endpoint && this._jsPlumb && !this._jsPlumb.instance.isConnectionBeingDragged()) { + this.endpoint.setHover(h); + } + }, + isFull: function () { + return this._jsPlumb.maxConnections === 0 ? true : !(this.isFloating() || this._jsPlumb.maxConnections < 0 || this.connections.length < this._jsPlumb.maxConnections); + }, + /** + * private but needs to be exposed. + */ + isFloating: function () { + return this.anchor != null && this.anchor.isFloating; + }, + isConnectedTo: function (endpoint) { + var found = false; + if (endpoint) { + for (var i = 0; i < this.connections.length; i++) { + if (this.connections[i].endpoints[1] === endpoint || this.connections[i].endpoints[0] === endpoint) { + found = true; + break; + } + } + } + return found; + }, + getConnectionCost: function () { + return this._jsPlumb.connectionCost; + }, + setConnectionCost: function (c) { + this._jsPlumb.connectionCost = c; + }, + areConnectionsDirected: function () { + return this._jsPlumb.connectionsDirected; + }, + setConnectionsDirected: function (b) { + this._jsPlumb.connectionsDirected = b; + }, + setElementId: function (_elId) { + this.elementId = _elId; + this.anchor.elementId = _elId; + }, + setReferenceElement: function (_el) { + this.element = _jp.getElement(_el); + }, + setDragAllowedWhenFull: function (allowed) { + this.dragAllowedWhenFull = allowed; + }, + equals: function (endpoint) { + return this.anchor.equals(endpoint.anchor); + }, + getUuid: function () { + return this._jsPlumb.uuid; + }, + computeAnchor: function (params) { + return this.anchor.compute(params); + } + }); + + root.jsPlumbInstance.prototype.EndpointDropHandler = function (dhParams) { + return function (e) { + + var _jsPlumb = dhParams.jsPlumb; + + // remove the classes that are added dynamically. drop is neither forbidden nor allowed now that + // the drop is finishing. + dhParams.removeClass(_jsPlumb.endpointDropAllowedClass); + dhParams.removeClass(_jsPlumb.endpointDropForbiddenClass); + + var originalEvent = _jsPlumb.getDropEvent(arguments), + draggable = _jsPlumb.getDragObject(arguments), + id = _jsPlumb.getAttribute(draggable, "dragId"), + elId = _jsPlumb.getAttribute(draggable, "elId"), + scope = _jsPlumb.getAttribute(draggable, "originalScope"), + jpc = _jsPlumb.getFloatingConnectionFor(id); + + // if no active connection, bail. + if (jpc == null) { + return; + } + + // calculate if this is an existing connection. + var existingConnection = jpc.suspendedEndpoint != null; + + // if suspended endpoint exists but has been cleaned up, bail. This means it's an existing connection + // that has been detached and will shortly be discarded. + if (existingConnection && jpc.suspendedEndpoint._jsPlumb == null) { + return; + } + + // get the drop endpoint. for a normal connection this is just the one that would replace the currently + // floating endpoint. for a makeTarget this is a new endpoint that is created on drop. But we leave that to + // the handler to figure out. + var _ep = dhParams.getEndpoint(jpc); + + // If we're not given an endpoint to use, bail. + if (_ep == null) { + return; + } + + // if this is a drop back where the connection came from, mark it force reattach and + // return; the stop handler will reattach. without firing an event. + if (dhParams.isRedrop(jpc, dhParams)) { + jpc._forceReattach = true; + jpc.setHover(false); + if (dhParams.maybeCleanup) { + dhParams.maybeCleanup(_ep); + } + return; + } + + // ensure we dont bother trying to drop sources on non-source eps, and same for target. + var idx = _jsPlumb.getFloatingAnchorIndex(jpc); + if ((idx === 0 && !dhParams.isSource)|| (idx === 1 && !dhParams.isTarget)){ + if (dhParams.maybeCleanup) { + dhParams.maybeCleanup(_ep); + } + return; + } + + if (dhParams.onDrop) { + dhParams.onDrop(jpc); + } + + // restore the original scope if necessary (issue 57) + if (scope) { + _jsPlumb.setDragScope(draggable, scope); + } + + // if the target of the drop is full, fire an event (we abort below) + // makeTarget: keep. + var isFull = dhParams.isFull(e); + if (isFull) { + _ep.fire("maxConnections", { + endpoint: this, + connection: jpc, + maxConnections: _ep._jsPlumb.maxConnections + }, originalEvent); + } + // + // if endpoint enabled, not full, and matches the index of the floating endpoint... + if (!isFull && dhParams.enabled()) { + var _doContinue = true; + + // before testing for beforeDrop, reset the connection's source/target to be the actual DOM elements + // involved (that is, stash any temporary stuff used for dragging. but we need to keep it around in + // order that the anchor manager can clean things up properly). + if (idx === 0) { + jpc.floatingElement = jpc.source; + jpc.floatingId = jpc.sourceId; + jpc.floatingEndpoint = jpc.endpoints[0]; + jpc.floatingIndex = 0; + jpc.source = dhParams.element; + jpc.sourceId = dhParams.elementId; + } else { + jpc.floatingElement = jpc.target; + jpc.floatingId = jpc.targetId; + jpc.floatingEndpoint = jpc.endpoints[1]; + jpc.floatingIndex = 1; + jpc.target = dhParams.element; + jpc.targetId = dhParams.elementId; + } + + // if this is an existing connection and detach is not allowed we won't continue. The connection's + // endpoints have been reinstated; everything is back to how it was. + if (existingConnection && jpc.suspendedEndpoint.id !== _ep.id) { + if (!jpc.isDetachAllowed(jpc) || !jpc.endpoints[idx].isDetachAllowed(jpc) || !jpc.suspendedEndpoint.isDetachAllowed(jpc) || !_jsPlumb.checkCondition("beforeDetach", jpc)) { + _doContinue = false; + } + } + +// ------------ wrap the execution path in a function so we can support asynchronous beforeDrop + + var continueFunction = function (optionalData) { + // remove this jpc from the current endpoint, which is a floating endpoint that we will + // subsequently discard. + jpc.endpoints[idx].detachFromConnection(jpc); + + // if there's a suspended endpoint, detach it from the connection. + if (jpc.suspendedEndpoint) { + jpc.suspendedEndpoint.detachFromConnection(jpc); + } + + jpc.endpoints[idx] = _ep; + _ep.addConnection(jpc); + + // copy our parameters in to the connection: + var params = _ep.getParameters(); + for (var aParam in params) { + jpc.setParameter(aParam, params[aParam]); + } + + if (!existingConnection) { + // if not an existing connection and + if (params.draggable) { + _jsPlumb.initDraggable(this.element, dhParams.dragOptions, "internal", _jsPlumb); + } + } + else { + var suspendedElementId = jpc.suspendedEndpoint.elementId; + _jsPlumb.fireMoveEvent({ + index: idx, + originalSourceId: idx === 0 ? suspendedElementId : jpc.sourceId, + newSourceId: idx === 0 ? _ep.elementId : jpc.sourceId, + originalTargetId: idx === 1 ? suspendedElementId : jpc.targetId, + newTargetId: idx === 1 ? _ep.elementId : jpc.targetId, + originalSourceEndpoint: idx === 0 ? jpc.suspendedEndpoint : jpc.endpoints[0], + newSourceEndpoint: idx === 0 ? _ep : jpc.endpoints[0], + originalTargetEndpoint: idx === 1 ? jpc.suspendedEndpoint : jpc.endpoints[1], + newTargetEndpoint: idx === 1 ? _ep : jpc.endpoints[1], + connection: jpc + }, originalEvent); + } + + if (idx === 1) { + _jsPlumb.anchorManager.updateOtherEndpoint(jpc.sourceId, jpc.floatingId, jpc.targetId, jpc); + } + else { + _jsPlumb.anchorManager.sourceChanged(jpc.floatingId, jpc.sourceId, jpc, jpc.source); + } + + // when makeSource has uniqueEndpoint:true, we want to create connections with new endpoints + // that are subsequently deleted. So makeSource sets `finalEndpoint`, which is the Endpoint to + // which the connection should be attached. The `detachFromConnection` call below results in the + // temporary endpoint being cleaned up. + if (jpc.endpoints[0].finalEndpoint) { + var _toDelete = jpc.endpoints[0]; + _toDelete.detachFromConnection(jpc); + jpc.endpoints[0] = jpc.endpoints[0].finalEndpoint; + jpc.endpoints[0].addConnection(jpc); + } + + // if optionalData was given, merge it onto the connection's data. + if (_ju.isObject(optionalData)) { + jpc.mergeData(optionalData); + } + // finalise will inform the anchor manager and also add to + // connectionsByScope if necessary. + _jsPlumb.finaliseConnection(jpc, null, originalEvent, false); + jpc.setHover(false); + + // SP continuous anchor flush + _jsPlumb.revalidate(jpc.endpoints[0].element); + + }.bind(this); + + var dontContinueFunction = function () { + // otherwise just put it back on the endpoint it was on before the drag. + if (jpc.suspendedEndpoint) { + jpc.endpoints[idx] = jpc.suspendedEndpoint; + jpc.setHover(false); + jpc._forceDetach = true; + if (idx === 0) { + jpc.source = jpc.suspendedEndpoint.element; + jpc.sourceId = jpc.suspendedEndpoint.elementId; + } else { + jpc.target = jpc.suspendedEndpoint.element; + jpc.targetId = jpc.suspendedEndpoint.elementId; + } + jpc.suspendedEndpoint.addConnection(jpc); + + // TODO checkSanity + if (idx === 1) { + _jsPlumb.anchorManager.updateOtherEndpoint(jpc.sourceId, jpc.floatingId, jpc.targetId, jpc); + } + else { + _jsPlumb.anchorManager.sourceChanged(jpc.floatingId, jpc.sourceId, jpc, jpc.source); + } + + _jsPlumb.repaint(jpc.sourceId); + jpc._forceDetach = false; + } + }; + +// -------------------------------------- + // now check beforeDrop. this will be available only on Endpoints that are setup to + // have a beforeDrop condition (although, secretly, under the hood all Endpoints and + // the Connection have them, because they are on jsPlumbUIComponent. shhh!), because + // it only makes sense to have it on a target endpoint. + _doContinue = _doContinue && dhParams.isDropAllowed(jpc.sourceId, jpc.targetId, jpc.scope, jpc, _ep);// && jpc.pending; + + if (_doContinue) { + continueFunction(_doContinue); + return true; + } + else { + dontContinueFunction(); + } + } + + if (dhParams.maybeCleanup) { + dhParams.maybeCleanup(_ep); + } + + _jsPlumb.currentlyDragging = false; + }; + }; +}).call(typeof window !== 'undefined' ? window : this); + +/* + * This file contains the code for Connections. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, + _jp = root.jsPlumb, + _ju = root.jsPlumbUtil; + + var makeConnector = function (_jsPlumb, renderMode, connectorName, connectorArgs, forComponent) { + // first make sure we have a cache for the specified renderer + _jp.Connectors[renderMode] = _jp.Connectors[renderMode] || {}; + + // now see if the one we want exists; if not we will try to make it + if (_jp.Connectors[renderMode][connectorName] == null) { + + if (_jp.Connectors[connectorName] == null) { + if (!_jsPlumb.Defaults.DoNotThrowErrors) { + throw new TypeError("jsPlumb: unknown connector type '" + connectorName + "'"); + } else { + return null; + } + } + + _jp.Connectors[renderMode][connectorName] = function() { + _jp.Connectors[connectorName].apply(this, arguments); + _jp.ConnectorRenderers[renderMode].apply(this, arguments); + }; + + _ju.extend(_jp.Connectors[renderMode][connectorName], [ _jp.Connectors[connectorName], _jp.ConnectorRenderers[renderMode]]); + + } + + return new _jp.Connectors[renderMode][connectorName](connectorArgs, forComponent); + }, + _makeAnchor = function (anchorParams, elementId, _jsPlumb) { + return (anchorParams) ? _jsPlumb.makeAnchor(anchorParams, elementId, _jsPlumb) : null; + }, + _updateConnectedClass = function (conn, element, _jsPlumb, remove) { + if (element != null) { + element._jsPlumbConnections = element._jsPlumbConnections || {}; + if (remove) { + delete element._jsPlumbConnections[conn.id]; + } + else { + element._jsPlumbConnections[conn.id] = true; + } + + if (_ju.isEmpty(element._jsPlumbConnections)) { + _jsPlumb.removeClass(element, _jsPlumb.connectedClass); + } + else { + _jsPlumb.addClass(element, _jsPlumb.connectedClass); + } + } + }; + + _jp.Connection = function (params) { + var _newEndpoint = params.newEndpoint; + + this.id = params.id; + this.connector = null; + this.idPrefix = "_jsplumb_c_"; + this.defaultLabelLocation = 0.5; + this.defaultOverlayKeys = ["Overlays", "ConnectionOverlays"]; + // if a new connection is the result of moving some existing connection, params.previousConnection + // will have that Connection in it. listeners for the jsPlumbConnection event can look for that + // member and take action if they need to. + this.previousConnection = params.previousConnection; + this.source = _jp.getElement(params.source); + this.target = _jp.getElement(params.target); + + + _jp.OverlayCapableJsPlumbUIComponent.apply(this, arguments); + + // sourceEndpoint and targetEndpoint override source/target, if they are present. but + // source is not overridden if the Endpoint has declared it is not the final target of a connection; + // instead we use the source that the Endpoint declares will be the final source element. + if (params.sourceEndpoint) { + this.source = params.sourceEndpoint.getElement(); + this.sourceId = params.sourceEndpoint.elementId; + } else { + this.sourceId = this._jsPlumb.instance.getId(this.source); + } + + if (params.targetEndpoint) { + this.target = params.targetEndpoint.getElement(); + this.targetId = params.targetEndpoint.elementId; + } else { + this.targetId = this._jsPlumb.instance.getId(this.target); + } + + + this.scope = params.scope; // scope may have been passed in to the connect call. if it wasn't, we will pull it from the source endpoint, after having initialised the endpoints. + this.endpoints = []; + this.endpointStyles = []; + + var _jsPlumb = this._jsPlumb.instance; + + _jsPlumb.manage(this.sourceId, this.source); + _jsPlumb.manage(this.targetId, this.target); + + this._jsPlumb.visible = true; + + this._jsPlumb.params = { + cssClass: params.cssClass, + container: params.container, + "pointer-events": params["pointer-events"], + editorParams: params.editorParams, + overlays: params.overlays + }; + this._jsPlumb.lastPaintedAt = null; + + // listen to mouseover and mouseout events passed from the container delegate. + this.bind("mouseover", function () { + this.setHover(true); + }.bind(this)); + this.bind("mouseout", function () { + this.setHover(false); + }.bind(this)); + + +// INITIALISATION CODE + + this.makeEndpoint = function (isSource, el, elId, ep) { + elId = elId || this._jsPlumb.instance.getId(el); + return this.prepareEndpoint(_jsPlumb, _newEndpoint, this, ep, isSource ? 0 : 1, params, el, elId); + }; + + // if type given, get the endpoint definitions mapping to that type from the jsplumb instance, and use those. + // we apply types at the end of this constructor but endpoints are only honoured in a type definition at + // create time. + if (params.type) { + params.endpoints = params.endpoints || this._jsPlumb.instance.deriveEndpointAndAnchorSpec(params.type).endpoints; + } + + var eS = this.makeEndpoint(true, this.source, this.sourceId, params.sourceEndpoint), + eT = this.makeEndpoint(false, this.target, this.targetId, params.targetEndpoint); + + if (eS) { + _ju.addToList(params.endpointsByElement, this.sourceId, eS); + } + if (eT) { + _ju.addToList(params.endpointsByElement, this.targetId, eT); + } + // if scope not set, set it to be the scope for the source endpoint. + if (!this.scope) { + this.scope = this.endpoints[0].scope; + } + + // if explicitly told to (or not to) delete endpoints when empty, override endpoint's preferences + if (params.deleteEndpointsOnEmpty != null) { + this.endpoints[0].setDeleteOnEmpty(params.deleteEndpointsOnEmpty); + this.endpoints[1].setDeleteOnEmpty(params.deleteEndpointsOnEmpty); + } + +// -------------------------- DEFAULT TYPE --------------------------------------------- + + // DETACHABLE + var _detachable = _jsPlumb.Defaults.ConnectionsDetachable; + if (params.detachable === false) { + _detachable = false; + } + if (this.endpoints[0].connectionsDetachable === false) { + _detachable = false; + } + if (this.endpoints[1].connectionsDetachable === false) { + _detachable = false; + } + // REATTACH + var _reattach = params.reattach || this.endpoints[0].reattachConnections || this.endpoints[1].reattachConnections || _jsPlumb.Defaults.ReattachConnections; + + this.appendToDefaultType({ + detachable: _detachable, + reattach: _reattach, + paintStyle:this.endpoints[0].connectorStyle || this.endpoints[1].connectorStyle || params.paintStyle || _jsPlumb.Defaults.PaintStyle || _jp.Defaults.PaintStyle, + hoverPaintStyle:this.endpoints[0].connectorHoverStyle || this.endpoints[1].connectorHoverStyle || params.hoverPaintStyle || _jsPlumb.Defaults.HoverPaintStyle || _jp.Defaults.HoverPaintStyle + }); + + var _suspendedAt = _jsPlumb.getSuspendedAt(); + if (!_jsPlumb.isSuspendDrawing()) { + // paint the endpoints + var myInfo = _jsPlumb.getCachedData(this.sourceId), + myOffset = myInfo.o, myWH = myInfo.s, + otherInfo = _jsPlumb.getCachedData(this.targetId), + otherOffset = otherInfo.o, + otherWH = otherInfo.s, + initialTimestamp = _suspendedAt || _jsPlumb.timestamp(), + anchorLoc = this.endpoints[0].anchor.compute({ + xy: [ myOffset.left, myOffset.top ], wh: myWH, element: this.endpoints[0], + elementId: this.endpoints[0].elementId, + txy: [ otherOffset.left, otherOffset.top ], twh: otherWH, tElement: this.endpoints[1], + timestamp: initialTimestamp + }); + + this.endpoints[0].paint({ anchorLoc: anchorLoc, timestamp: initialTimestamp }); + + anchorLoc = this.endpoints[1].anchor.compute({ + xy: [ otherOffset.left, otherOffset.top ], wh: otherWH, element: this.endpoints[1], + elementId: this.endpoints[1].elementId, + txy: [ myOffset.left, myOffset.top ], twh: myWH, tElement: this.endpoints[0], + timestamp: initialTimestamp + }); + this.endpoints[1].paint({ anchorLoc: anchorLoc, timestamp: initialTimestamp }); + } + + this.getTypeDescriptor = function () { + return "connection"; + }; + this.getAttachedElements = function () { + return this.endpoints; + }; + + this.isDetachable = function (ep) { + return this._jsPlumb.detachable === false ? false : ep != null ? ep.connectionsDetachable === true : this._jsPlumb.detachable === true; + }; + this.setDetachable = function (detachable) { + this._jsPlumb.detachable = detachable === true; + }; + this.isReattach = function () { + return this._jsPlumb.reattach === true || this.endpoints[0].reattachConnections === true || this.endpoints[1].reattachConnections === true; + }; + this.setReattach = function (reattach) { + this._jsPlumb.reattach = reattach === true; + }; + +// END INITIALISATION CODE + + +// COST + DIRECTIONALITY + // if cost not supplied, try to inherit from source endpoint + this._jsPlumb.cost = params.cost || this.endpoints[0].getConnectionCost(); + this._jsPlumb.directed = params.directed; + // inherit directed flag if set no source endpoint + if (params.directed == null) { + this._jsPlumb.directed = this.endpoints[0].areConnectionsDirected(); + } +// END COST + DIRECTIONALITY + +// PARAMETERS + // merge all the parameters objects into the connection. parameters set + // on the connection take precedence; then source endpoint params, then + // finally target endpoint params. + var _p = _jp.extend({}, this.endpoints[1].getParameters()); + _jp.extend(_p, this.endpoints[0].getParameters()); + _jp.extend(_p, this.getParameters()); + this.setParameters(_p); +// END PARAMETERS + +// PAINTING + + this.setConnector(this.endpoints[0].connector || this.endpoints[1].connector || params.connector || _jsPlumb.Defaults.Connector || _jp.Defaults.Connector, true); + var data = params.data == null || !_ju.isObject(params.data) ? {} : params.data; + this.getData = function() { return data; }; + this.setData = function(d) { data = d || {}; }; + this.mergeData = function(d) { data = _jp.extend(data, d); }; + + // the very last thing we do is apply types, if there are any. + var _types = [ "default", this.endpoints[0].connectionType, this.endpoints[1].connectionType, params.type ].join(" "); + if (/[^\s]/.test(_types)) { + this.addType(_types, params.data, true); + } + + this.updateConnectedClass(); + +// END PAINTING + }; + + _ju.extend(_jp.Connection, _jp.OverlayCapableJsPlumbUIComponent, { + applyType: function (t, doNotRepaint, typeMap) { + + var _connector = null; + if (t.connector != null) { + _connector = this.getCachedTypeItem("connector", typeMap.connector); + if (_connector == null) { + _connector = this.prepareConnector(t.connector, typeMap.connector); + this.cacheTypeItem("connector", _connector, typeMap.connector); + } + this.setPreparedConnector(_connector); + } + + // none of these things result in the creation of objects so can be ignored. + if (t.detachable != null) { + this.setDetachable(t.detachable); + } + if (t.reattach != null) { + this.setReattach(t.reattach); + } + if (t.scope) { + this.scope = t.scope; + } + + if (t.cssClass != null && this.canvas) { + this._jsPlumb.instance.addClass(this.canvas, t.cssClass); + } + + var _anchors = null; + // this also results in the creation of objects. + if (t.anchor) { + // note that even if the param was anchor, we store `anchors`. + _anchors = this.getCachedTypeItem("anchors", typeMap.anchor); + if (_anchors == null) { + _anchors = [ this._jsPlumb.instance.makeAnchor(t.anchor), this._jsPlumb.instance.makeAnchor(t.anchor) ]; + this.cacheTypeItem("anchors", _anchors, typeMap.anchor); + } + } + else if (t.anchors) { + _anchors = this.getCachedTypeItem("anchors", typeMap.anchors); + if (_anchors == null) { + _anchors = [ + this._jsPlumb.instance.makeAnchor(t.anchors[0]), + this._jsPlumb.instance.makeAnchor(t.anchors[1]) + ]; + this.cacheTypeItem("anchors", _anchors, typeMap.anchors); + } + } + if (_anchors != null) { + this.endpoints[0].anchor = _anchors[0]; + this.endpoints[1].anchor = _anchors[1]; + if (this.endpoints[1].anchor.isDynamic) { + this._jsPlumb.instance.repaint(this.endpoints[1].elementId); + } + } + + _jp.OverlayCapableJsPlumbUIComponent.applyType(this, t); + }, + addClass: function (c, informEndpoints) { + if (informEndpoints) { + this.endpoints[0].addClass(c); + this.endpoints[1].addClass(c); + if (this.suspendedEndpoint) { + this.suspendedEndpoint.addClass(c); + } + } + if (this.connector) { + this.connector.addClass(c); + } + }, + removeClass: function (c, informEndpoints) { + if (informEndpoints) { + this.endpoints[0].removeClass(c); + this.endpoints[1].removeClass(c); + if (this.suspendedEndpoint) { + this.suspendedEndpoint.removeClass(c); + } + } + if (this.connector) { + this.connector.removeClass(c); + } + }, + isVisible: function () { + return this._jsPlumb.visible; + }, + setVisible: function (v) { + this._jsPlumb.visible = v; + if (this.connector) { + this.connector.setVisible(v); + } + this.repaint(); + }, + cleanup: function () { + this.updateConnectedClass(true); + this.endpoints = null; + this.source = null; + this.target = null; + if (this.connector != null) { + this.connector.cleanup(true); + this.connector.destroy(true); + } + this.connector = null; + }, + updateConnectedClass:function(remove) { + if (this._jsPlumb) { + _updateConnectedClass(this, this.source, this._jsPlumb.instance, remove); + _updateConnectedClass(this, this.target, this._jsPlumb.instance, remove); + } + }, + setHover: function (state) { + if (this.connector && this._jsPlumb && !this._jsPlumb.instance.isConnectionBeingDragged()) { + this.connector.setHover(state); + root.jsPlumb[state ? "addClass" : "removeClass"](this.source, this._jsPlumb.instance.hoverSourceClass); + root.jsPlumb[state ? "addClass" : "removeClass"](this.target, this._jsPlumb.instance.hoverTargetClass); + } + }, + getUuids:function() { + return [ this.endpoints[0].getUuid(), this.endpoints[1].getUuid() ]; + }, + getCost: function () { + return this._jsPlumb ? this._jsPlumb.cost : -Infinity; + }, + setCost: function (c) { + this._jsPlumb.cost = c; + }, + isDirected: function () { + return this._jsPlumb.directed; + }, + getConnector: function () { + return this.connector; + }, + prepareConnector:function(connectorSpec, typeId) { + var connectorArgs = { + _jsPlumb: this._jsPlumb.instance, + cssClass: this._jsPlumb.params.cssClass, + container: this._jsPlumb.params.container, + "pointer-events": this._jsPlumb.params["pointer-events"] + }, + renderMode = this._jsPlumb.instance.getRenderMode(), + connector; + + if (_ju.isString(connectorSpec)) { + connector = makeConnector(this._jsPlumb.instance, renderMode, connectorSpec, connectorArgs, this); + } // lets you use a string as shorthand. + else if (_ju.isArray(connectorSpec)) { + if (connectorSpec.length === 1) { + connector = makeConnector(this._jsPlumb.instance, renderMode, connectorSpec[0], connectorArgs, this); + } + else { + connector = makeConnector(this._jsPlumb.instance, renderMode, connectorSpec[0], _ju.merge(connectorSpec[1], connectorArgs), this); + } + } + if (typeId != null) { + connector.typeId = typeId; + } + return connector; + }, + setPreparedConnector: function(connector, doNotRepaint, doNotChangeListenerComponent, typeId) { + + if (this.connector !== connector) { + + var previous, previousClasses = ""; + // the connector will not be cleaned up if it was set as part of a type, because `typeId` will be set on it + // and we havent passed in `true` for "force" here. + if (this.connector != null) { + previous = this.connector; + previousClasses = previous.getClass(); + this.connector.cleanup(); + this.connector.destroy(); + } + + this.connector = connector; + if (typeId) { + this.cacheTypeItem("connector", connector, typeId); + } + + this.canvas = this.connector.canvas; + this.bgCanvas = this.connector.bgCanvas; + + // put classes from prior connector onto the canvas + this.addClass(previousClasses); + + // new: instead of binding listeners per connector, we now just have one delegate on the container. + // so for that handler we set the connection as the '_jsPlumb' member of the canvas element, and + // bgCanvas, if it exists, which it does right now in the VML renderer, so it won't from v 2.0.0 onwards. + if (this.canvas) { + this.canvas._jsPlumb = this; + } + if (this.bgCanvas) { + this.bgCanvas._jsPlumb = this; + } + + if (previous != null) { + var o = this.getOverlays(); + for (var i = 0; i < o.length; i++) { + if (o[i].transfer) { + o[i].transfer(this.connector); + } + } + } + + if (!doNotChangeListenerComponent) { + this.setListenerComponent(this.connector); + } + if (!doNotRepaint) { + this.repaint(); + } + } + }, + setConnector: function (connectorSpec, doNotRepaint, doNotChangeListenerComponent, typeId) { + var connector = this.prepareConnector(connectorSpec, typeId); + this.setPreparedConnector(connector, doNotRepaint, doNotChangeListenerComponent, typeId); + }, + paint: function (params) { + + if (!this._jsPlumb.instance.isSuspendDrawing() && this._jsPlumb.visible) { + params = params || {}; + var timestamp = params.timestamp, + // if the moving object is not the source we must transpose the two references. + swap = false, + tId = swap ? this.sourceId : this.targetId, sId = swap ? this.targetId : this.sourceId, + tIdx = swap ? 0 : 1, sIdx = swap ? 1 : 0; + + if (timestamp == null || timestamp !== this._jsPlumb.lastPaintedAt) { + var sourceInfo = this._jsPlumb.instance.updateOffset({elId:sId}).o, + targetInfo = this._jsPlumb.instance.updateOffset({elId:tId}).o, + sE = this.endpoints[sIdx], tE = this.endpoints[tIdx]; + + var sAnchorP = sE.anchor.getCurrentLocation({xy: [sourceInfo.left, sourceInfo.top], wh: [sourceInfo.width, sourceInfo.height], element: sE, timestamp: timestamp}), + tAnchorP = tE.anchor.getCurrentLocation({xy: [targetInfo.left, targetInfo.top], wh: [targetInfo.width, targetInfo.height], element: tE, timestamp: timestamp}); + + this.connector.resetBounds(); + + this.connector.compute({ + sourcePos: sAnchorP, + targetPos: tAnchorP, + sourceOrientation:sE.anchor.getOrientation(sE), + targetOrientation:tE.anchor.getOrientation(tE), + sourceEndpoint: this.endpoints[sIdx], + targetEndpoint: this.endpoints[tIdx], + "stroke-width": this._jsPlumb.paintStyleInUse.strokeWidth, + sourceInfo: sourceInfo, + targetInfo: targetInfo + }); + + var overlayExtents = { minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity }; + + // compute overlays. we do this first so we can get their placements, and adjust the + // container if needs be (if an overlay would be clipped) + for (var i in this._jsPlumb.overlays) { + if (this._jsPlumb.overlays.hasOwnProperty(i)) { + var o = this._jsPlumb.overlays[i]; + if (o.isVisible()) { + this._jsPlumb.overlayPlacements[i] = o.draw(this.connector, this._jsPlumb.paintStyleInUse, this.getAbsoluteOverlayPosition(o)); + overlayExtents.minX = Math.min(overlayExtents.minX, this._jsPlumb.overlayPlacements[i].minX); + overlayExtents.maxX = Math.max(overlayExtents.maxX, this._jsPlumb.overlayPlacements[i].maxX); + overlayExtents.minY = Math.min(overlayExtents.minY, this._jsPlumb.overlayPlacements[i].minY); + overlayExtents.maxY = Math.max(overlayExtents.maxY, this._jsPlumb.overlayPlacements[i].maxY); + } + } + } + + var lineWidth = parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth || 1) / 2, + outlineWidth = parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth || 0), + extents = { + xmin: Math.min(this.connector.bounds.minX - (lineWidth + outlineWidth), overlayExtents.minX), + ymin: Math.min(this.connector.bounds.minY - (lineWidth + outlineWidth), overlayExtents.minY), + xmax: Math.max(this.connector.bounds.maxX + (lineWidth + outlineWidth), overlayExtents.maxX), + ymax: Math.max(this.connector.bounds.maxY + (lineWidth + outlineWidth), overlayExtents.maxY) + }; + // paint the connector. + this.connector.paint(this._jsPlumb.paintStyleInUse, null, extents); + // and then the overlays + for (var j in this._jsPlumb.overlays) { + if (this._jsPlumb.overlays.hasOwnProperty(j)) { + var p = this._jsPlumb.overlays[j]; + if (p.isVisible()) { + p.paint(this._jsPlumb.overlayPlacements[j], extents); + } + } + } + } + this._jsPlumb.lastPaintedAt = timestamp; + } + }, + repaint: function (params) { + var p = jsPlumb.extend(params || {}, {}); + p.elId = this.sourceId; + this.paint(p); + }, + prepareEndpoint: function (_jsPlumb, _newEndpoint, conn, existing, index, params, element, elementId) { + var e; + if (existing) { + conn.endpoints[index] = existing; + existing.addConnection(conn); + } else { + if (!params.endpoints) { + params.endpoints = [ null, null ]; + } + var ep = params.endpoints[index] || params.endpoint || _jsPlumb.Defaults.Endpoints[index] || _jp.Defaults.Endpoints[index] || _jsPlumb.Defaults.Endpoint || _jp.Defaults.Endpoint; + if (!params.endpointStyles) { + params.endpointStyles = [ null, null ]; + } + if (!params.endpointHoverStyles) { + params.endpointHoverStyles = [ null, null ]; + } + var es = params.endpointStyles[index] || params.endpointStyle || _jsPlumb.Defaults.EndpointStyles[index] || _jp.Defaults.EndpointStyles[index] || _jsPlumb.Defaults.EndpointStyle || _jp.Defaults.EndpointStyle; + // Endpoints derive their fill from the connector's stroke, if no fill was specified. + if (es.fill == null && params.paintStyle != null) { + es.fill = params.paintStyle.stroke; + } + + if (es.outlineStroke == null && params.paintStyle != null) { + es.outlineStroke = params.paintStyle.outlineStroke; + } + if (es.outlineWidth == null && params.paintStyle != null) { + es.outlineWidth = params.paintStyle.outlineWidth; + } + + var ehs = params.endpointHoverStyles[index] || params.endpointHoverStyle || _jsPlumb.Defaults.EndpointHoverStyles[index] || _jp.Defaults.EndpointHoverStyles[index] || _jsPlumb.Defaults.EndpointHoverStyle || _jp.Defaults.EndpointHoverStyle; + // endpoint hover fill style is derived from connector's hover stroke style + if (params.hoverPaintStyle != null) { + if (ehs == null) { + ehs = {}; + } + if (ehs.fill == null) { + ehs.fill = params.hoverPaintStyle.stroke; + } + } + var a = params.anchors ? params.anchors[index] : + params.anchor ? params.anchor : + _makeAnchor(_jsPlumb.Defaults.Anchors[index], elementId, _jsPlumb) || + _makeAnchor(_jp.Defaults.Anchors[index], elementId, _jsPlumb) || + _makeAnchor(_jsPlumb.Defaults.Anchor, elementId, _jsPlumb) || + _makeAnchor(_jp.Defaults.Anchor, elementId, _jsPlumb), + u = params.uuids ? params.uuids[index] : null; + + e = _newEndpoint({ + paintStyle: es, hoverPaintStyle: ehs, endpoint: ep, connections: [ conn ], + uuid: u, anchor: a, source: element, scope: params.scope, + reattach: params.reattach || _jsPlumb.Defaults.ReattachConnections, + detachable: params.detachable || _jsPlumb.Defaults.ConnectionsDetachable + }); + if (existing == null) { + e.setDeleteOnEmpty(true); + } + conn.endpoints[index] = e; + + if (params.drawEndpoints === false) { + e.setVisible(false, true, true); + } + + } + return e; + } + + }); // END Connection class +}).call(typeof window !== 'undefined' ? window : this); + +/* + * This file contains the code for creating and manipulating anchors. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + + var root = this, + _ju = root.jsPlumbUtil, + _jp = root.jsPlumb; + + // + // manages anchors for all elements. + // + _jp.AnchorManager = function (params) { + var _amEndpoints = {}, + continuousAnchorLocations = {}, + continuousAnchorOrientations = {}, + connectionsByElementId = {}, + self = this, + anchorLists = {}, + jsPlumbInstance = params.jsPlumbInstance, + floatingConnections = {}, + // used by placeAnchors function + placeAnchorsOnLine = function (desc, elementDimensions, elementPosition, connections, horizontal, otherMultiplier, reverse) { + var a = [], step = elementDimensions[horizontal ? 0 : 1] / (connections.length + 1); + + for (var i = 0; i < connections.length; i++) { + var val = (i + 1) * step, other = otherMultiplier * elementDimensions[horizontal ? 1 : 0]; + if (reverse) { + val = elementDimensions[horizontal ? 0 : 1] - val; + } + + var dx = (horizontal ? val : other), x = elementPosition[0] + dx, xp = dx / elementDimensions[0], + dy = (horizontal ? other : val), y = elementPosition[1] + dy, yp = dy / elementDimensions[1]; + + a.push([ x, y, xp, yp, connections[i][1], connections[i][2] ]); + } + + return a; + }, + // used by edgeSortFunctions + currySort = function (reverseAngles) { + return function (a, b) { + var r = true; + if (reverseAngles) { + r = a[0][0] < b[0][0]; + } + else { + r = a[0][0] > b[0][0]; + } + return r === false ? -1 : 1; + }; + }, + // used by edgeSortFunctions + leftSort = function (a, b) { + // first get adjusted values + var p1 = a[0][0] < 0 ? -Math.PI - a[0][0] : Math.PI - a[0][0], + p2 = b[0][0] < 0 ? -Math.PI - b[0][0] : Math.PI - b[0][0]; + if (p1 > p2) { + return 1; + } + else { + return -1; + } + }, + // used by placeAnchors + edgeSortFunctions = { + "top": function (a, b) { + return a[0] > b[0] ? 1 : -1; + }, + "right": currySort(true), + "bottom": currySort(true), + "left": leftSort + }, + // used by placeAnchors + _sortHelper = function (_array, _fn) { + return _array.sort(_fn); + }, + // used by AnchorManager.redraw + placeAnchors = function (elementId, _anchorLists) { + var cd = jsPlumbInstance.getCachedData(elementId), sS = cd.s, sO = cd.o, + placeSomeAnchors = function (desc, elementDimensions, elementPosition, unsortedConnections, isHorizontal, otherMultiplier, orientation) { + if (unsortedConnections.length > 0) { + var sc = _sortHelper(unsortedConnections, edgeSortFunctions[desc]), // puts them in order based on the target element's pos on screen + reverse = desc === "right" || desc === "top", + anchors = placeAnchorsOnLine(desc, elementDimensions, + elementPosition, sc, + isHorizontal, otherMultiplier, reverse); + + // takes a computed anchor position and adjusts it for parent offset and scroll, then stores it. + var _setAnchorLocation = function (endpoint, anchorPos) { + continuousAnchorLocations[endpoint.id] = [ anchorPos[0], anchorPos[1], anchorPos[2], anchorPos[3] ]; + continuousAnchorOrientations[endpoint.id] = orientation; + }; + + for (var i = 0; i < anchors.length; i++) { + var c = anchors[i][4], weAreSource = c.endpoints[0].elementId === elementId, weAreTarget = c.endpoints[1].elementId === elementId; + if (weAreSource) { + _setAnchorLocation(c.endpoints[0], anchors[i]); + } + if (weAreTarget) { + _setAnchorLocation(c.endpoints[1], anchors[i]); + } + } + } + }; + + placeSomeAnchors("bottom", sS, [sO.left, sO.top], _anchorLists.bottom, true, 1, [0, 1]); + placeSomeAnchors("top", sS, [sO.left, sO.top], _anchorLists.top, true, 0, [0, -1]); + placeSomeAnchors("left", sS, [sO.left, sO.top], _anchorLists.left, false, 0, [-1, 0]); + placeSomeAnchors("right", sS, [sO.left, sO.top], _anchorLists.right, false, 1, [1, 0]); + }; + + this.reset = function () { + _amEndpoints = {}; + connectionsByElementId = {}; + anchorLists = {}; + }; + this.addFloatingConnection = function (key, conn) { + floatingConnections[key] = conn; + }; + this.removeFloatingConnection = function (key) { + delete floatingConnections[key]; + }; + this.newConnection = function (conn) { + var sourceId = conn.sourceId, targetId = conn.targetId, + ep = conn.endpoints, + doRegisterTarget = true, + registerConnection = function (otherIndex, otherEndpoint, otherAnchor, elId, c) { + if ((sourceId === targetId) && otherAnchor.isContinuous) { + // remove the target endpoint's canvas. we dont need it. + conn._jsPlumb.instance.removeElement(ep[1].canvas); + doRegisterTarget = false; + } + _ju.addToList(connectionsByElementId, elId, [c, otherEndpoint, otherAnchor.constructor === _jp.DynamicAnchor]); + }; + + registerConnection(0, ep[0], ep[0].anchor, targetId, conn); + if (doRegisterTarget) { + registerConnection(1, ep[1], ep[1].anchor, sourceId, conn); + } + }; + var removeEndpointFromAnchorLists = function (endpoint) { + (function (list, eId) { + if (list) { // transient anchors dont get entries in this list. + var f = function (e) { + return e[4] === eId; + }; + _ju.removeWithFunction(list.top, f); + _ju.removeWithFunction(list.left, f); + _ju.removeWithFunction(list.bottom, f); + _ju.removeWithFunction(list.right, f); + } + })(anchorLists[endpoint.elementId], endpoint.id); + }; + this.connectionDetached = function (connInfo, doNotRedraw) { + var connection = connInfo.connection || connInfo, + sourceId = connInfo.sourceId, + targetId = connInfo.targetId, + ep = connection.endpoints, + removeConnection = function (otherIndex, otherEndpoint, otherAnchor, elId, c) { + _ju.removeWithFunction(connectionsByElementId[elId], function (_c) { + return _c[0].id === c.id; + }); + }; + + removeConnection(1, ep[1], ep[1].anchor, sourceId, connection); + removeConnection(0, ep[0], ep[0].anchor, targetId, connection); + if (connection.floatingId) { + removeConnection(connection.floatingIndex, connection.floatingEndpoint, connection.floatingEndpoint.anchor, connection.floatingId, connection); + removeEndpointFromAnchorLists(connection.floatingEndpoint); + } + + // remove from anchorLists + removeEndpointFromAnchorLists(connection.endpoints[0]); + removeEndpointFromAnchorLists(connection.endpoints[1]); + + if (!doNotRedraw) { + self.redraw(connection.sourceId); + if (connection.targetId !== connection.sourceId) { + self.redraw(connection.targetId); + } + } + }; + this.add = function (endpoint, elementId) { + _ju.addToList(_amEndpoints, elementId, endpoint); + }; + this.changeId = function (oldId, newId) { + connectionsByElementId[newId] = connectionsByElementId[oldId]; + _amEndpoints[newId] = _amEndpoints[oldId]; + delete connectionsByElementId[oldId]; + delete _amEndpoints[oldId]; + }; + this.getConnectionsFor = function (elementId) { + return connectionsByElementId[elementId] || []; + }; + this.getEndpointsFor = function (elementId) { + return _amEndpoints[elementId] || []; + }; + this.deleteEndpoint = function (endpoint) { + _ju.removeWithFunction(_amEndpoints[endpoint.elementId], function (e) { + return e.id === endpoint.id; + }); + removeEndpointFromAnchorLists(endpoint); + }; + this.clearFor = function (elementId) { + delete _amEndpoints[elementId]; + _amEndpoints[elementId] = []; + }; + // updates the given anchor list by either updating an existing anchor's info, or adding it. this function + // also removes the anchor from its previous list, if the edge it is on has changed. + // all connections found along the way (those that are connected to one of the faces this function + // operates on) are added to the connsToPaint list, as are their endpoints. in this way we know to repaint + // them wthout having to calculate anything else about them. + var _updateAnchorList = function (lists, theta, order, conn, aBoolean, otherElId, idx, reverse, edgeId, elId, connsToPaint, endpointsToPaint) { + // first try to find the exact match, but keep track of the first index of a matching element id along the way.s + var exactIdx = -1, + firstMatchingElIdx = -1, + endpoint = conn.endpoints[idx], + endpointId = endpoint.id, + oIdx = [1, 0][idx], + values = [ + [ theta, order ], + conn, + aBoolean, + otherElId, + endpointId + ], + listToAddTo = lists[edgeId], + listToRemoveFrom = endpoint._continuousAnchorEdge ? lists[endpoint._continuousAnchorEdge] : null, + i, + candidate; + + if (listToRemoveFrom) { + var rIdx = _ju.findWithFunction(listToRemoveFrom, function (e) { + return e[4] === endpointId; + }); + if (rIdx !== -1) { + listToRemoveFrom.splice(rIdx, 1); + // get all connections from this list + for (i = 0; i < listToRemoveFrom.length; i++) { + candidate = listToRemoveFrom[i][1]; + _ju.addWithFunction(connsToPaint, candidate, function (c) { + return c.id === candidate.id; + }); + _ju.addWithFunction(endpointsToPaint, listToRemoveFrom[i][1].endpoints[idx], function (e) { + return e.id === candidate.endpoints[idx].id; + }); + _ju.addWithFunction(endpointsToPaint, listToRemoveFrom[i][1].endpoints[oIdx], function (e) { + return e.id === candidate.endpoints[oIdx].id; + }); + } + } + } + + for (i = 0; i < listToAddTo.length; i++) { + candidate = listToAddTo[i][1]; + if (params.idx === 1 && listToAddTo[i][3] === otherElId && firstMatchingElIdx === -1) { + firstMatchingElIdx = i; + } + _ju.addWithFunction(connsToPaint, candidate, function (c) { + return c.id === candidate.id; + }); + _ju.addWithFunction(endpointsToPaint, listToAddTo[i][1].endpoints[idx], function (e) { + return e.id === candidate.endpoints[idx].id; + }); + _ju.addWithFunction(endpointsToPaint, listToAddTo[i][1].endpoints[oIdx], function (e) { + return e.id === candidate.endpoints[oIdx].id; + }); + } + if (exactIdx !== -1) { + listToAddTo[exactIdx] = values; + } + else { + var insertIdx = reverse ? firstMatchingElIdx !== -1 ? firstMatchingElIdx : 0 : listToAddTo.length; // of course we will get this from having looked through the array shortly. + listToAddTo.splice(insertIdx, 0, values); + } + + // store this for next time. + endpoint._continuousAnchorEdge = edgeId; + }; + + // + // find the entry in an endpoint's list for this connection and update its target endpoint + // with the current target in the connection. + // This method and sourceChanged need to be folder into one. + // + this.updateOtherEndpoint = function (sourceElId, oldTargetId, newTargetId, connection) { + var sIndex = _ju.findWithFunction(connectionsByElementId[sourceElId], function (i) { + return i[0].id === connection.id; + }), + tIndex = _ju.findWithFunction(connectionsByElementId[oldTargetId], function (i) { + return i[0].id === connection.id; + }); + + // update or add data for source + if (sIndex !== -1) { + connectionsByElementId[sourceElId][sIndex][0] = connection; + connectionsByElementId[sourceElId][sIndex][1] = connection.endpoints[1]; + connectionsByElementId[sourceElId][sIndex][2] = connection.endpoints[1].anchor.constructor === _jp.DynamicAnchor; + } + + // remove entry for previous target (if there) + if (tIndex > -1) { + connectionsByElementId[oldTargetId].splice(tIndex, 1); + // add entry for new target + _ju.addToList(connectionsByElementId, newTargetId, [connection, connection.endpoints[0], connection.endpoints[0].anchor.constructor === _jp.DynamicAnchor]); + } + + connection.updateConnectedClass(); + }; + + // + // notification that the connection given has changed source from the originalId to the newId. + // This involves: + // 1. removing the connection from the list of connections stored for the originalId + // 2. updating the source information for the target of the connection + // 3. re-registering the connection in connectionsByElementId with the newId + // + this.sourceChanged = function (originalId, newId, connection, newElement) { + if (originalId !== newId) { + + connection.sourceId = newId; + connection.source = newElement; + + // remove the entry that points from the old source to the target + _ju.removeWithFunction(connectionsByElementId[originalId], function (info) { + return info[0].id === connection.id; + }); + // find entry for target and update it + var tIdx = _ju.findWithFunction(connectionsByElementId[connection.targetId], function (i) { + return i[0].id === connection.id; + }); + if (tIdx > -1) { + connectionsByElementId[connection.targetId][tIdx][0] = connection; + connectionsByElementId[connection.targetId][tIdx][1] = connection.endpoints[0]; + connectionsByElementId[connection.targetId][tIdx][2] = connection.endpoints[0].anchor.constructor === _jp.DynamicAnchor; + } + // add entry for new source + _ju.addToList(connectionsByElementId, newId, [connection, connection.endpoints[1], connection.endpoints[1].anchor.constructor === _jp.DynamicAnchor]); + + // TODO SP not final on this yet. when a user drags an existing connection and it turns into a self + // loop, then this code hides the target endpoint (by removing it from the DOM) But I think this should + // occur only if the anchor is Continuous + if (connection.endpoints[1].anchor.isContinuous) { + if (connection.source === connection.target) { + connection._jsPlumb.instance.removeElement(connection.endpoints[1].canvas); + } + else { + if (connection.endpoints[1].canvas.parentNode == null) { + connection._jsPlumb.instance.appendElement(connection.endpoints[1].canvas); + } + } + } + + connection.updateConnectedClass(); + } + }; + + // + // moves the given endpoint from `currentId` to `element`. + // This involves: + // + // 1. changing the key in _amEndpoints under which the endpoint is stored + // 2. changing the source or target values in all of the endpoint's connections + // 3. changing the array in connectionsByElementId in which the endpoint's connections + // are stored (done by either sourceChanged or updateOtherEndpoint) + // + this.rehomeEndpoint = function (ep, currentId, element) { + var eps = _amEndpoints[currentId] || [], + elementId = jsPlumbInstance.getId(element); + + if (elementId !== currentId) { + var idx = eps.indexOf(ep); + if (idx > -1) { + var _ep = eps.splice(idx, 1)[0]; + self.add(_ep, elementId); + } + } + + for (var i = 0; i < ep.connections.length; i++) { + if (ep.connections[i].sourceId === currentId) { + self.sourceChanged(currentId, ep.elementId, ep.connections[i], ep.element); + } + else if (ep.connections[i].targetId === currentId) { + ep.connections[i].targetId = ep.elementId; + ep.connections[i].target = ep.element; + self.updateOtherEndpoint(ep.connections[i].sourceId, currentId, ep.elementId, ep.connections[i]); + } + } + }; + + this.redraw = function (elementId, ui, timestamp, offsetToUI, clearEdits, doNotRecalcEndpoint) { + + if (!jsPlumbInstance.isSuspendDrawing()) { + // get all the endpoints for this element + var ep = _amEndpoints[elementId] || [], + endpointConnections = connectionsByElementId[elementId] || [], + connectionsToPaint = [], + endpointsToPaint = [], + anchorsToUpdate = []; + + timestamp = timestamp || jsPlumbInstance.timestamp(); + // offsetToUI are values that would have been calculated in the dragManager when registering + // an endpoint for an element that had a parent (somewhere in the hierarchy) that had been + // registered as draggable. + offsetToUI = offsetToUI || {left: 0, top: 0}; + if (ui) { + ui = { + left: ui.left + offsetToUI.left, + top: ui.top + offsetToUI.top + }; + } + + // valid for one paint cycle. + var myOffset = jsPlumbInstance.updateOffset({ elId: elementId, offset: ui, recalc: false, timestamp: timestamp }), + orientationCache = {}; + + // actually, first we should compute the orientation of this element to all other elements to which + // this element is connected with a continuous anchor (whether both ends of the connection have + // a continuous anchor or just one) + + for (var i = 0; i < endpointConnections.length; i++) { + var conn = endpointConnections[i][0], + sourceId = conn.sourceId, + targetId = conn.targetId, + sourceContinuous = conn.endpoints[0].anchor.isContinuous, + targetContinuous = conn.endpoints[1].anchor.isContinuous; + + if (sourceContinuous || targetContinuous) { + var oKey = sourceId + "_" + targetId, + o = orientationCache[oKey], + oIdx = conn.sourceId === elementId ? 1 : 0; + + if (sourceContinuous && !anchorLists[sourceId]) { + anchorLists[sourceId] = { top: [], right: [], bottom: [], left: [] }; + } + if (targetContinuous && !anchorLists[targetId]) { + anchorLists[targetId] = { top: [], right: [], bottom: [], left: [] }; + } + + if (elementId !== targetId) { + jsPlumbInstance.updateOffset({ elId: targetId, timestamp: timestamp }); + } + if (elementId !== sourceId) { + jsPlumbInstance.updateOffset({ elId: sourceId, timestamp: timestamp }); + } + + var td = jsPlumbInstance.getCachedData(targetId), + sd = jsPlumbInstance.getCachedData(sourceId); + + if (targetId === sourceId && (sourceContinuous || targetContinuous)) { + // here we may want to improve this by somehow determining the face we'd like + // to put the connector on. ideally, when drawing, the face should be calculated + // by determining which face is closest to the point at which the mouse button + // was released. for now, we're putting it on the top face. + _updateAnchorList( anchorLists[sourceId], -Math.PI / 2, 0, conn, false, targetId, 0, false, "top", sourceId, connectionsToPaint, endpointsToPaint); + _updateAnchorList( anchorLists[targetId], -Math.PI / 2, 0, conn, false, sourceId, 1, false, "top", targetId, connectionsToPaint, endpointsToPaint); + } + else { + if (!o) { + o = this.calculateOrientation(sourceId, targetId, sd.o, td.o, conn.endpoints[0].anchor, conn.endpoints[1].anchor, conn); + orientationCache[oKey] = o; + // this would be a performance enhancement, but the computed angles need to be clamped to + //the (-PI/2 -> PI/2) range in order for the sorting to work properly. + /* orientationCache[oKey2] = { + orientation:o.orientation, + a:[o.a[1], o.a[0]], + theta:o.theta + Math.PI, + theta2:o.theta2 + Math.PI + };*/ + } + if (sourceContinuous) { + _updateAnchorList(anchorLists[sourceId], o.theta, 0, conn, false, targetId, 0, false, o.a[0], sourceId, connectionsToPaint, endpointsToPaint); + } + if (targetContinuous) { + _updateAnchorList(anchorLists[targetId], o.theta2, -1, conn, true, sourceId, 1, true, o.a[1], targetId, connectionsToPaint, endpointsToPaint); + } + } + + if (sourceContinuous) { + _ju.addWithFunction(anchorsToUpdate, sourceId, function (a) { + return a === sourceId; + }); + } + if (targetContinuous) { + _ju.addWithFunction(anchorsToUpdate, targetId, function (a) { + return a === targetId; + }); + } + _ju.addWithFunction(connectionsToPaint, conn, function (c) { + return c.id === conn.id; + }); + if ((sourceContinuous && oIdx === 0) || (targetContinuous && oIdx === 1)) { + _ju.addWithFunction(endpointsToPaint, conn.endpoints[oIdx], function (e) { + return e.id === conn.endpoints[oIdx].id; + }); + } + } + } + + // place Endpoints whose anchors are continuous but have no Connections + for (i = 0; i < ep.length; i++) { + if (ep[i].connections.length === 0 && ep[i].anchor.isContinuous) { + if (!anchorLists[elementId]) { + anchorLists[elementId] = { top: [], right: [], bottom: [], left: [] }; + } + _updateAnchorList(anchorLists[elementId], -Math.PI / 2, 0, {endpoints: [ep[i], ep[i]], paint: function () { + }}, false, elementId, 0, false, ep[i].anchor.getDefaultFace(), elementId, connectionsToPaint, endpointsToPaint); + _ju.addWithFunction(anchorsToUpdate, elementId, function (a) { + return a === elementId; + }); + } + } + + // now place all the continuous anchors we need to; + for (i = 0; i < anchorsToUpdate.length; i++) { + placeAnchors(anchorsToUpdate[i], anchorLists[anchorsToUpdate[i]]); + } + + // now that continuous anchors have been placed, paint all the endpoints for this element + for (i = 0; i < ep.length; i++) { + ep[i].paint({ timestamp: timestamp, offset: myOffset, dimensions: myOffset.s, recalc: doNotRecalcEndpoint !== true }); + } + + // ... and any other endpoints we came across as a result of the continuous anchors. + for (i = 0; i < endpointsToPaint.length; i++) { + var cd = jsPlumbInstance.getCachedData(endpointsToPaint[i].elementId); + //endpointsToPaint[i].paint({ timestamp: timestamp, offset: cd, dimensions: cd.s }); + endpointsToPaint[i].paint({ timestamp: null, offset: cd, dimensions: cd.s }); + } + + // paint all the standard and "dynamic connections", which are connections whose other anchor is + // static and therefore does need to be recomputed; we make sure that happens only one time. + + // TODO we could have compiled a list of these in the first pass through connections; might save some time. + for (i = 0; i < endpointConnections.length; i++) { + var otherEndpoint = endpointConnections[i][1]; + if (otherEndpoint.anchor.constructor === _jp.DynamicAnchor) { + otherEndpoint.paint({ elementWithPrecedence: elementId, timestamp: timestamp }); + _ju.addWithFunction(connectionsToPaint, endpointConnections[i][0], function (c) { + return c.id === endpointConnections[i][0].id; + }); + // all the connections for the other endpoint now need to be repainted + for (var k = 0; k < otherEndpoint.connections.length; k++) { + if (otherEndpoint.connections[k] !== endpointConnections[i][0]) { + _ju.addWithFunction(connectionsToPaint, otherEndpoint.connections[k], function (c) { + return c.id === otherEndpoint.connections[k].id; + }); + } + } + } else { + _ju.addWithFunction(connectionsToPaint, endpointConnections[i][0], function (c) { + return c.id === endpointConnections[i][0].id; + }); + } + } + + // paint current floating connection for this element, if there is one. + var fc = floatingConnections[elementId]; + if (fc) { + fc.paint({timestamp: timestamp, recalc: false, elId: elementId}); + } + + // paint all the connections + for (i = 0; i < connectionsToPaint.length; i++) { + connectionsToPaint[i].paint({elId: elementId, timestamp: null, recalc: false, clearEdits: clearEdits}); + } + } + }; + + var ContinuousAnchor = function (anchorParams) { + _ju.EventGenerator.apply(this); + this.type = "Continuous"; + this.isDynamic = true; + this.isContinuous = true; + var faces = anchorParams.faces || ["top", "right", "bottom", "left"], + clockwise = !(anchorParams.clockwise === false), + availableFaces = { }, + opposites = { "top": "bottom", "right": "left", "left": "right", "bottom": "top" }, + clockwiseOptions = { "top": "right", "right": "bottom", "left": "top", "bottom": "left" }, + antiClockwiseOptions = { "top": "left", "right": "top", "left": "bottom", "bottom": "right" }, + secondBest = clockwise ? clockwiseOptions : antiClockwiseOptions, + lastChoice = clockwise ? antiClockwiseOptions : clockwiseOptions, + cssClass = anchorParams.cssClass || "", + _currentFace = null, _lockedFace = null, X_AXIS_FACES = ["left", "right"], Y_AXIS_FACES = ["top", "bottom"], + _lockedAxis = null; + + for (var i = 0; i < faces.length; i++) { + availableFaces[faces[i]] = true; + } + + this.getDefaultFace = function () { + return faces.length === 0 ? "top" : faces[0]; + }; + + this.isRelocatable = function() { return true; }; + this.isSnapOnRelocate = function() { return true; }; + + // if the given edge is supported, returns it. otherwise looks for a substitute that _is_ + // supported. if none supported we also return the request edge. + this.verifyEdge = function (edge) { + if (availableFaces[edge]) { + return edge; + } + else if (availableFaces[opposites[edge]]) { + return opposites[edge]; + } + else if (availableFaces[secondBest[edge]]) { + return secondBest[edge]; + } + else if (availableFaces[lastChoice[edge]]) { + return lastChoice[edge]; + } + return edge; // we have to give them something. + }; + + this.isEdgeSupported = function (edge) { + return _lockedAxis == null ? + + (_lockedFace == null ? availableFaces[edge] === true : _lockedFace === edge) + + : _lockedAxis.indexOf(edge) !== -1; + }; + + this.setCurrentFace = function(face, overrideLock) { + _currentFace = face; + // if currently locked, and the user wants to override, do that. + if (overrideLock && _lockedFace != null) { + _lockedFace = _currentFace; + } + }; + + this.getCurrentFace = function() { return _currentFace; }; + this.getSupportedFaces = function() { + var af = []; + for (var k in availableFaces) { + if (availableFaces[k]) { + af.push(k); + } + } + return af; + }; + + this.lock = function() { + _lockedFace = _currentFace; + }; + this.unlock = function() { + _lockedFace = null; + }; + this.isLocked = function() { + return _lockedFace != null; + }; + + this.lockCurrentAxis = function() { + if (_currentFace != null) { + _lockedAxis = (_currentFace === "left" || _currentFace === "right") ? X_AXIS_FACES : Y_AXIS_FACES; + } + }; + + this.unlockCurrentAxis = function() { + _lockedAxis = null; + }; + + this.compute = function (params) { + return continuousAnchorLocations[params.element.id] || [0, 0]; + }; + this.getCurrentLocation = function (params) { + return continuousAnchorLocations[params.element.id] || [0, 0]; + }; + this.getOrientation = function (endpoint) { + return continuousAnchorOrientations[endpoint.id] || [0, 0]; + }; + this.getCssClass = function () { + return cssClass; + }; + }; + + // continuous anchors + jsPlumbInstance.continuousAnchorFactory = { + get: function (params) { + return new ContinuousAnchor(params); + }, + clear: function (elementId) { + delete continuousAnchorLocations[elementId]; + } + }; + }; + + _jp.AnchorManager.prototype.calculateOrientation = function (sourceId, targetId, sd, td, sourceAnchor, targetAnchor) { + + var Orientation = { HORIZONTAL: "horizontal", VERTICAL: "vertical", DIAGONAL: "diagonal", IDENTITY: "identity" }, + axes = ["left", "top", "right", "bottom"]; + + if (sourceId === targetId) { + return { + orientation: Orientation.IDENTITY, + a: ["top", "top"] + }; + } + + var theta = Math.atan2((td.centery - sd.centery), (td.centerx - sd.centerx)), + theta2 = Math.atan2((sd.centery - td.centery), (sd.centerx - td.centerx)); + +// -------------------------------------------------------------------------------------- + + // improved face calculation. get midpoints of each face for source and target, then put in an array with all combinations of + // source/target faces. sort this array by distance between midpoints. the entry at index 0 is our preferred option. we can + // go through the array one by one until we find an entry in which each requested face is supported. + var candidates = [], midpoints = { }; + (function (types, dim) { + for (var i = 0; i < types.length; i++) { + midpoints[types[i]] = { + "left": [ dim[i].left, dim[i].centery ], + "right": [ dim[i].right, dim[i].centery ], + "top": [ dim[i].centerx, dim[i].top ], + "bottom": [ dim[i].centerx , dim[i].bottom] + }; + } + })([ "source", "target" ], [ sd, td ]); + + for (var sf = 0; sf < axes.length; sf++) { + for (var tf = 0; tf < axes.length; tf++) { + candidates.push({ + source: axes[sf], + target: axes[tf], + dist: Biltong.lineLength(midpoints.source[axes[sf]], midpoints.target[axes[tf]]) + }); + } + } + + candidates.sort(function (a, b) { + return a.dist < b.dist ? -1 : a.dist > b.dist ? 1 : 0; + }); + + // now go through this list and try to get an entry that satisfies both (there will be one, unless one of the anchors + // declares no available faces) + var sourceEdge = candidates[0].source, targetEdge = candidates[0].target; + for (var i = 0; i < candidates.length; i++) { + + if (!sourceAnchor.isContinuous || sourceAnchor.isEdgeSupported(candidates[i].source)) { + sourceEdge = candidates[i].source; + } + else { + sourceEdge = null; + } + + if (!targetAnchor.isContinuous || targetAnchor.isEdgeSupported(candidates[i].target)) { + targetEdge = candidates[i].target; + } + else { + targetEdge = null; + } + + if (sourceEdge != null && targetEdge != null) { + break; + } + } + + if (sourceAnchor.isContinuous) { + sourceAnchor.setCurrentFace(sourceEdge); + } + + if (targetAnchor.isContinuous) { + targetAnchor.setCurrentFace(targetEdge); + } + +// -------------------------------------------------------------------------------------- + + return { + a: [ sourceEdge, targetEdge ], + theta: theta, + theta2: theta2 + }; + }; + + /** + * Anchors model a position on some element at which an Endpoint may be located. They began as a first class citizen of jsPlumb, ie. a user + * was required to create these themselves, but over time this has been replaced by the concept of referring to them either by name (eg. "TopMiddle"), + * or by an array describing their coordinates (eg. [ 0, 0.5, 0, -1 ], which is the same as "TopMiddle"). jsPlumb now handles all of the + * creation of Anchors without user intervention. + */ + _jp.Anchor = function (params) { + this.x = params.x || 0; + this.y = params.y || 0; + this.elementId = params.elementId; + this.cssClass = params.cssClass || ""; + this.userDefinedLocation = null; + this.orientation = params.orientation || [ 0, 0 ]; + this.lastReturnValue = null; + this.offsets = params.offsets || [ 0, 0 ]; + this.timestamp = null; + + var relocatable = params.relocatable !== false; + this.isRelocatable = function() { return relocatable; }; + this.setRelocatable = function(_relocatable) { relocatable = _relocatable; }; + var snapOnRelocate = params.snapOnRelocate !== false; + this.isSnapOnRelocate = function() { return snapOnRelocate; }; + + var locked = false; + this.lock = function() { locked = true; }; + this.unlock = function() { locked = false; }; + this.isLocked = function() { return locked; }; + + _ju.EventGenerator.apply(this); + + this.compute = function (params) { + + var xy = params.xy, wh = params.wh, timestamp = params.timestamp; + + if (params.clearUserDefinedLocation) { + this.userDefinedLocation = null; + } + + if (timestamp && timestamp === this.timestamp) { + return this.lastReturnValue; + } + + if (this.userDefinedLocation != null) { + this.lastReturnValue = this.userDefinedLocation; + } + else { + this.lastReturnValue = [ xy[0] + (this.x * wh[0]) + this.offsets[0], xy[1] + (this.y * wh[1]) + this.offsets[1], this.x, this.y ]; + } + + this.timestamp = timestamp; + return this.lastReturnValue; + }; + + this.getCurrentLocation = function (params) { + params = params || {}; + return (this.lastReturnValue == null || (params.timestamp != null && this.timestamp !== params.timestamp)) ? this.compute(params) : this.lastReturnValue; + }; + + this.setPosition = function(x, y, ox, oy, overrideLock) { + if (!locked || overrideLock) { + this.x = x; + this.y = y; + this.orientation = [ ox, oy ]; + this.lastReturnValue = null; + } + }; + }; + _ju.extend(_jp.Anchor, _ju.EventGenerator, { + equals: function (anchor) { + if (!anchor) { + return false; + } + var ao = anchor.getOrientation(), + o = this.getOrientation(); + return this.x === anchor.x && this.y === anchor.y && this.offsets[0] === anchor.offsets[0] && this.offsets[1] === anchor.offsets[1] && o[0] === ao[0] && o[1] === ao[1]; + }, + getUserDefinedLocation: function () { + return this.userDefinedLocation; + }, + setUserDefinedLocation: function (l) { + this.userDefinedLocation = l; + }, + clearUserDefinedLocation: function () { + this.userDefinedLocation = null; + }, + getOrientation: function () { + return this.orientation; + }, + getCssClass: function () { + return this.cssClass; + } + }); + + /** + * An Anchor that floats. its orientation is computed dynamically from + * its position relative to the anchor it is floating relative to. It is used when creating + * a connection through drag and drop. + * + * TODO FloatingAnchor could totally be refactored to extend Anchor just slightly. + */ + _jp.FloatingAnchor = function (params) { + + _jp.Anchor.apply(this, arguments); + + // this is the anchor that this floating anchor is referenced to for + // purposes of calculating the orientation. + var ref = params.reference, + // the canvas this refers to. + refCanvas = params.referenceCanvas, + size = _jp.getSize(refCanvas), + // these are used to store the current relative position of our + // anchor wrt the reference anchor. they only indicate + // direction, so have a value of 1 or -1 (or, very rarely, 0). these + // values are written by the compute method, and read + // by the getOrientation method. + xDir = 0, yDir = 0, + // temporary member used to store an orientation when the floating + // anchor is hovering over another anchor. + orientation = null, + _lastResult = null; + + // clear from parent. we want floating anchor orientation to always be computed. + this.orientation = null; + + // set these to 0 each; they are used by certain types of connectors in the loopback case, + // when the connector is trying to clear the element it is on. but for floating anchor it's not + // very important. + this.x = 0; + this.y = 0; + + this.isFloating = true; + + this.compute = function (params) { + var xy = params.xy, + result = [ xy[0] + (size[0] / 2), xy[1] + (size[1] / 2) ]; // return origin of the element. we may wish to improve this so that any object can be the drag proxy. + _lastResult = result; + return result; + }; + + this.getOrientation = function (_endpoint) { + if (orientation) { + return orientation; + } + else { + var o = ref.getOrientation(_endpoint); + // here we take into account the orientation of the other + // anchor: if it declares zero for some direction, we declare zero too. this might not be the most awesome. perhaps we can come + // up with a better way. it's just so that the line we draw looks like it makes sense. maybe this wont make sense. + return [ Math.abs(o[0]) * xDir * -1, + Math.abs(o[1]) * yDir * -1 ]; + } + }; + + /** + * notification the endpoint associated with this anchor is hovering + * over another anchor; we want to assume that anchor's orientation + * for the duration of the hover. + */ + this.over = function (anchor, endpoint) { + orientation = anchor.getOrientation(endpoint); + }; + + /** + * notification the endpoint associated with this anchor is no + * longer hovering over another anchor; we should resume calculating + * orientation as we normally do. + */ + this.out = function () { + orientation = null; + }; + + this.getCurrentLocation = function (params) { + return _lastResult == null ? this.compute(params) : _lastResult; + }; + }; + _ju.extend(_jp.FloatingAnchor, _jp.Anchor); + + var _convertAnchor = function (anchor, jsPlumbInstance, elementId) { + return anchor.constructor === _jp.Anchor ? anchor : jsPlumbInstance.makeAnchor(anchor, elementId, jsPlumbInstance); + }; + + /* + * A DynamicAnchor is an Anchor that contains a list of other Anchors, which it cycles + * through at compute time to find the one that is located closest to + * the center of the target element, and returns that Anchor's compute + * method result. this causes endpoints to follow each other with + * respect to the orientation of their target elements, which is a useful + * feature for some applications. + * + */ + _jp.DynamicAnchor = function (params) { + _jp.Anchor.apply(this, arguments); + + this.isDynamic = true; + this.anchors = []; + this.elementId = params.elementId; + this.jsPlumbInstance = params.jsPlumbInstance; + + for (var i = 0; i < params.anchors.length; i++) { + this.anchors[i] = _convertAnchor(params.anchors[i], this.jsPlumbInstance, this.elementId); + } + + this.getAnchors = function () { + return this.anchors; + }; + + var _curAnchor = this.anchors.length > 0 ? this.anchors[0] : null, + _lastAnchor = _curAnchor, + self = this, + + // helper method to calculate the distance between the centers of the two elements. + _distance = function (anchor, cx, cy, xy, wh) { + var ax = xy[0] + (anchor.x * wh[0]), ay = xy[1] + (anchor.y * wh[1]), + acx = xy[0] + (wh[0] / 2), acy = xy[1] + (wh[1] / 2); + return (Math.sqrt(Math.pow(cx - ax, 2) + Math.pow(cy - ay, 2)) + + Math.sqrt(Math.pow(acx - ax, 2) + Math.pow(acy - ay, 2))); + }, + // default method uses distance between element centers. you can provide your own method in the dynamic anchor + // constructor (and also to jsPlumb.makeDynamicAnchor). the arguments to it are four arrays: + // xy - xy loc of the anchor's element + // wh - anchor's element's dimensions + // txy - xy loc of the element of the other anchor in the connection + // twh - dimensions of the element of the other anchor in the connection. + // anchors - the list of selectable anchors + _anchorSelector = params.selector || function (xy, wh, txy, twh, anchors) { + var cx = txy[0] + (twh[0] / 2), cy = txy[1] + (twh[1] / 2); + var minIdx = -1, minDist = Infinity; + for (var i = 0; i < anchors.length; i++) { + var d = _distance(anchors[i], cx, cy, xy, wh); + if (d < minDist) { + minIdx = i + 0; + minDist = d; + } + } + return anchors[minIdx]; + }; + + this.compute = function (params) { + var xy = params.xy, wh = params.wh, txy = params.txy, twh = params.twh; + + this.timestamp = params.timestamp; + + var udl = self.getUserDefinedLocation(); + if (udl != null) { + return udl; + } + + // if anchor is locked or an opposite element was not given, we + // maintain our state. anchor will be locked + // if it is the source of a drag and drop. + if (this.isLocked() || txy == null || twh == null) { + return _curAnchor.compute(params); + } + else { + params.timestamp = null; // otherwise clear this, i think. we want the anchor to compute. + } + + _curAnchor = _anchorSelector(xy, wh, txy, twh, this.anchors); + this.x = _curAnchor.x; + this.y = _curAnchor.y; + + if (_curAnchor !== _lastAnchor) { + this.fire("anchorChanged", _curAnchor); + } + + _lastAnchor = _curAnchor; + + return _curAnchor.compute(params); + }; + + this.getCurrentLocation = function (params) { + return this.getUserDefinedLocation() || (_curAnchor != null ? _curAnchor.getCurrentLocation(params) : null); + }; + + this.getOrientation = function (_endpoint) { + return _curAnchor != null ? _curAnchor.getOrientation(_endpoint) : [ 0, 0 ]; + }; + this.over = function (anchor, endpoint) { + if (_curAnchor != null) { + _curAnchor.over(anchor, endpoint); + } + }; + this.out = function () { + if (_curAnchor != null) { + _curAnchor.out(); + } + }; + + this.setAnchor = function(a) { + _curAnchor = a; + }; + + this.getCssClass = function () { + return (_curAnchor && _curAnchor.getCssClass()) || ""; + }; + + /** + * Attempt to match an anchor with the given coordinates and then set it. + * @param coords + * @returns true if matching anchor found, false otherwise. + */ + this.setAnchorCoordinates = function(coords) { + var idx = jsPlumbUtil.findWithFunction(this.anchors, function(a) { + return a.x === coords[0] && a.y === coords[1]; + }); + if (idx !== -1) { + this.setAnchor(this.anchors[idx]); + return true; + } else { + return false; + } + }; + }; + _ju.extend(_jp.DynamicAnchor, _jp.Anchor); + +// -------- basic anchors ------------------ + var _curryAnchor = function (x, y, ox, oy, type, fnInit) { + _jp.Anchors[type] = function (params) { + var a = params.jsPlumbInstance.makeAnchor([ x, y, ox, oy, 0, 0 ], params.elementId, params.jsPlumbInstance); + a.type = type; + if (fnInit) { + fnInit(a, params); + } + return a; + }; + }; + + _curryAnchor(0.5, 0, 0, -1, "TopCenter"); + _curryAnchor(0.5, 1, 0, 1, "BottomCenter"); + _curryAnchor(0, 0.5, -1, 0, "LeftMiddle"); + _curryAnchor(1, 0.5, 1, 0, "RightMiddle"); + + _curryAnchor(0.5, 0, 0, -1, "Top"); + _curryAnchor(0.5, 1, 0, 1, "Bottom"); + _curryAnchor(0, 0.5, -1, 0, "Left"); + _curryAnchor(1, 0.5, 1, 0, "Right"); + _curryAnchor(0.5, 0.5, 0, 0, "Center"); + _curryAnchor(1, 0, 0, -1, "TopRight"); + _curryAnchor(1, 1, 0, 1, "BottomRight"); + _curryAnchor(0, 0, 0, -1, "TopLeft"); + _curryAnchor(0, 1, 0, 1, "BottomLeft"); + +// ------- dynamic anchors ------------------- + + // default dynamic anchors chooses from Top, Right, Bottom, Left + _jp.Defaults.DynamicAnchors = function (params) { + return params.jsPlumbInstance.makeAnchors(["TopCenter", "RightMiddle", "BottomCenter", "LeftMiddle"], params.elementId, params.jsPlumbInstance); + }; + + // default dynamic anchors bound to name 'AutoDefault' + _jp.Anchors.AutoDefault = function (params) { + var a = params.jsPlumbInstance.makeDynamicAnchor(_jp.Defaults.DynamicAnchors(params)); + a.type = "AutoDefault"; + return a; + }; + +// ------- continuous anchors ------------------- + + var _curryContinuousAnchor = function (type, faces) { + _jp.Anchors[type] = function (params) { + var a = params.jsPlumbInstance.makeAnchor(["Continuous", { faces: faces }], params.elementId, params.jsPlumbInstance); + a.type = type; + return a; + }; + }; + + _jp.Anchors.Continuous = function (params) { + return params.jsPlumbInstance.continuousAnchorFactory.get(params); + }; + + _curryContinuousAnchor("ContinuousLeft", ["left"]); + _curryContinuousAnchor("ContinuousTop", ["top"]); + _curryContinuousAnchor("ContinuousBottom", ["bottom"]); + _curryContinuousAnchor("ContinuousRight", ["right"]); + +// ------- position assign anchors ------------------- + + // this anchor type lets you assign the position at connection time. + _curryAnchor(0, 0, 0, 0, "Assign", function (anchor, params) { + // find what to use as the "position finder". the user may have supplied a String which represents + // the id of a position finder in jsPlumb.AnchorPositionFinders, or the user may have supplied the + // position finder as a function. we find out what to use and then set it on the anchor. + var pf = params.position || "Fixed"; + anchor.positionFinder = pf.constructor === String ? params.jsPlumbInstance.AnchorPositionFinders[pf] : pf; + // always set the constructor params; the position finder might need them later (the Grid one does, + // for example) + anchor.constructorParams = params; + }); + + // these are the default anchor positions finders, which are used by the makeTarget function. supplying + // a position finder argument to that function allows you to specify where the resulting anchor will + // be located + root.jsPlumbInstance.prototype.AnchorPositionFinders = { + "Fixed": function (dp, ep, es) { + return [ (dp.left - ep.left) / es[0], (dp.top - ep.top) / es[1] ]; + }, + "Grid": function (dp, ep, es, params) { + var dx = dp.left - ep.left, dy = dp.top - ep.top, + gx = es[0] / (params.grid[0]), gy = es[1] / (params.grid[1]), + mx = Math.floor(dx / gx), my = Math.floor(dy / gy); + return [ ((mx * gx) + (gx / 2)) / es[0], ((my * gy) + (gy / 2)) / es[1] ]; + } + }; + +// ------- perimeter anchors ------------------- + + _jp.Anchors.Perimeter = function (params) { + params = params || {}; + var anchorCount = params.anchorCount || 60, + shape = params.shape; + + if (!shape) { + throw new Error("no shape supplied to Perimeter Anchor type"); + } + + var _circle = function () { + var r = 0.5, step = Math.PI * 2 / anchorCount, current = 0, a = []; + for (var i = 0; i < anchorCount; i++) { + var x = r + (r * Math.sin(current)), + y = r + (r * Math.cos(current)); + a.push([ x, y, 0, 0 ]); + current += step; + } + return a; + }, + _path = function (segments) { + var anchorsPerFace = anchorCount / segments.length, a = [], + _computeFace = function (x1, y1, x2, y2, fractionalLength) { + anchorsPerFace = anchorCount * fractionalLength; + var dx = (x2 - x1) / anchorsPerFace, dy = (y2 - y1) / anchorsPerFace; + for (var i = 0; i < anchorsPerFace; i++) { + a.push([ + x1 + (dx * i), + y1 + (dy * i), + 0, + 0 + ]); + } + }; + + for (var i = 0; i < segments.length; i++) { + _computeFace.apply(null, segments[i]); + } + + return a; + }, + _shape = function (faces) { + var s = []; + for (var i = 0; i < faces.length; i++) { + s.push([faces[i][0], faces[i][1], faces[i][2], faces[i][3], 1 / faces.length]); + } + return _path(s); + }, + _rectangle = function () { + return _shape([ + [ 0, 0, 1, 0 ], + [ 1, 0, 1, 1 ], + [ 1, 1, 0, 1 ], + [ 0, 1, 0, 0 ] + ]); + }; + + var _shapes = { + "Circle": _circle, + "Ellipse": _circle, + "Diamond": function () { + return _shape([ + [ 0.5, 0, 1, 0.5 ], + [ 1, 0.5, 0.5, 1 ], + [ 0.5, 1, 0, 0.5 ], + [ 0, 0.5, 0.5, 0 ] + ]); + }, + "Rectangle": _rectangle, + "Square": _rectangle, + "Triangle": function () { + return _shape([ + [ 0.5, 0, 1, 1 ], + [ 1, 1, 0, 1 ], + [ 0, 1, 0.5, 0] + ]); + }, + "Path": function (params) { + var points = params.points, p = [], tl = 0; + for (var i = 0; i < points.length - 1; i++) { + var l = Math.sqrt(Math.pow(points[i][2] - points[i][0]) + Math.pow(points[i][3] - points[i][1])); + tl += l; + p.push([points[i][0], points[i][1], points[i + 1][0], points[i + 1][1], l]); + } + for (var j = 0; j < p.length; j++) { + p[j][4] = p[j][4] / tl; + } + return _path(p); + } + }, + _rotate = function (points, amountInDegrees) { + var o = [], theta = amountInDegrees / 180 * Math.PI; + for (var i = 0; i < points.length; i++) { + var _x = points[i][0] - 0.5, + _y = points[i][1] - 0.5; + + o.push([ + 0.5 + ((_x * Math.cos(theta)) - (_y * Math.sin(theta))), + 0.5 + ((_x * Math.sin(theta)) + (_y * Math.cos(theta))), + points[i][2], + points[i][3] + ]); + } + return o; + }; + + if (!_shapes[shape]) { + throw new Error("Shape [" + shape + "] is unknown by Perimeter Anchor type"); + } + + var da = _shapes[shape](params); + if (params.rotation) { + da = _rotate(da, params.rotation); + } + var a = params.jsPlumbInstance.makeDynamicAnchor(da); + a.type = "Perimeter"; + return a; + }; +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains the default Connectors, Endpoint and Overlay definitions. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil, _jg = root.Biltong; + + _jp.Segments = { + + /* + * Class: AbstractSegment + * A Connector is made up of 1..N Segments, each of which has a Type, such as 'Straight', 'Arc', + * 'Bezier'. This is new from 1.4.2, and gives us a lot more flexibility when drawing connections: things such + * as rounded corners for flowchart connectors, for example, or a straight line stub for Bezier connections, are + * much easier to do now. + * + * A Segment is responsible for providing coordinates for painting it, and also must be able to report its length. + * + */ + AbstractSegment: function (params) { + this.params = params; + + /** + * Function: findClosestPointOnPath + * Finds the closest point on this segment to the given [x, y], + * returning both the x and y of the point plus its distance from + * the supplied point, and its location along the length of the + * path inscribed by the segment. This implementation returns + * Infinity for distance and null values for everything else; + * subclasses are expected to override. + */ + this.findClosestPointOnPath = function (x, y) { + return { + d: Infinity, + x: null, + y: null, + l: null + }; + }; + + this.getBounds = function () { + return { + minX: Math.min(params.x1, params.x2), + minY: Math.min(params.y1, params.y2), + maxX: Math.max(params.x1, params.x2), + maxY: Math.max(params.y1, params.y2) + }; + }; + + /** + * Computes the list of points on the segment that intersect the given line. + * @method lineIntersection + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @returns {Array<[number, number]>} + */ + this.lineIntersection = function(x1, y1, x2, y2) { + return []; + }; + + /** + * Computes the list of points on the segment that intersect the box with the given origin and size. + * @method boxIntersection + * @param {number} x1 + * @param {number} y1 + * @param {number} w + * @param {number} h + * @returns {Array<[number, number]>} + */ + this.boxIntersection = function(x, y, w, h) { + var a = []; + a.push.apply(a, this.lineIntersection(x, y, x + w, y)); + a.push.apply(a, this.lineIntersection(x + w, y, x + w, y + h)); + a.push.apply(a, this.lineIntersection(x + w, y + h, x, y + h)); + a.push.apply(a, this.lineIntersection(x, y + h, x, y)); + return a; + }; + + /** + * Computes the list of points on the segment that intersect the given bounding box, which is an object of the form { x:.., y:.., w:.., h:.. }. + * @method lineIntersection + * @param {BoundingRectangle} box + * @returns {Array<[number, number]>} + */ + this.boundingBoxIntersection = function(box) { + return this.boxIntersection(box.x, box.y, box.w, box.y); + }; + }, + Straight: function (params) { + var _super = _jp.Segments.AbstractSegment.apply(this, arguments), + length, m, m2, x1, x2, y1, y2, + _recalc = function () { + length = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); + m = _jg.gradient({x: x1, y: y1}, {x: x2, y: y2}); + m2 = -1 / m; + }; + + this.type = "Straight"; + + this.getLength = function () { + return length; + }; + this.getGradient = function () { + return m; + }; + + this.getCoordinates = function () { + return { x1: x1, y1: y1, x2: x2, y2: y2 }; + }; + this.setCoordinates = function (coords) { + x1 = coords.x1; + y1 = coords.y1; + x2 = coords.x2; + y2 = coords.y2; + _recalc(); + }; + this.setCoordinates({x1: params.x1, y1: params.y1, x2: params.x2, y2: params.y2}); + + this.getBounds = function () { + return { + minX: Math.min(x1, x2), + minY: Math.min(y1, y2), + maxX: Math.max(x1, x2), + maxY: Math.max(y1, y2) + }; + }; + + /** + * returns the point on the segment's path that is 'location' along the length of the path, where 'location' is a decimal from + * 0 to 1 inclusive. for the straight line segment this is simple maths. + */ + this.pointOnPath = function (location, absolute) { + if (location === 0 && !absolute) { + return { x: x1, y: y1 }; + } + else if (location === 1 && !absolute) { + return { x: x2, y: y2 }; + } + else { + var l = absolute ? location > 0 ? location : length + location : location * length; + return _jg.pointOnLine({x: x1, y: y1}, {x: x2, y: y2}, l); + } + }; + + /** + * returns the gradient of the segment at the given point - which for us is constant. + */ + this.gradientAtPoint = function (_) { + return m; + }; + + /** + * returns the point on the segment's path that is 'distance' along the length of the path from 'location', where + * 'location' is a decimal from 0 to 1 inclusive, and 'distance' is a number of pixels. + * this hands off to jsPlumbUtil to do the maths, supplying two points and the distance. + */ + this.pointAlongPathFrom = function (location, distance, absolute) { + var p = this.pointOnPath(location, absolute), + farAwayPoint = distance <= 0 ? {x: x1, y: y1} : {x: x2, y: y2 }; + + /* + location == 1 ? { + x:x1 + ((x2 - x1) * 10), + y:y1 + ((y1 - y2) * 10) + } : + */ + + if (distance <= 0 && Math.abs(distance) > 1) { + distance *= -1; + } + + return _jg.pointOnLine(p, farAwayPoint, distance); + }; + + // is c between a and b? + var within = function (a, b, c) { + return c >= Math.min(a, b) && c <= Math.max(a, b); + }; + // find which of a and b is closest to c + var closest = function (a, b, c) { + return Math.abs(c - a) < Math.abs(c - b) ? a : b; + }; + + /** + Function: findClosestPointOnPath + Finds the closest point on this segment to [x,y]. See + notes on this method in AbstractSegment. + */ + this.findClosestPointOnPath = function (x, y) { + var out = { + d: Infinity, + x: null, + y: null, + l: null, + x1: x1, + x2: x2, + y1: y1, + y2: y2 + }; + + if (m === 0) { + out.y = y1; + out.x = within(x1, x2, x) ? x : closest(x1, x2, x); + } + else if (m === Infinity || m === -Infinity) { + out.x = x1; + out.y = within(y1, y2, y) ? y : closest(y1, y2, y); + } + else { + // closest point lies on normal from given point to this line. + var b = y1 - (m * x1), + b2 = y - (m2 * x), + // y1 = m.x1 + b and y1 = m2.x1 + b2 + // so m.x1 + b = m2.x1 + b2 + // x1(m - m2) = b2 - b + // x1 = (b2 - b) / (m - m2) + _x1 = (b2 - b) / (m - m2), + _y1 = (m * _x1) + b; + + out.x = within(x1, x2, _x1) ? _x1 : closest(x1, x2, _x1);//_x1; + out.y = within(y1, y2, _y1) ? _y1 : closest(y1, y2, _y1);//_y1; + } + + var fractionInSegment = _jg.lineLength([ out.x, out.y ], [ x1, y1 ]); + out.d = _jg.lineLength([x, y], [out.x, out.y]); + out.l = fractionInSegment / length; + return out; + }; + + var _pointLiesBetween = function(q, p1, p2) { + return (p2 > p1) ? (p1 <= q && q <= p2) : (p1 >= q && q >= p2); + }, _plb = _pointLiesBetween; + + /** + * Calculates all intersections of the given line with this segment. + * @param _x1 + * @param _y1 + * @param _x2 + * @param _y2 + * @returns {Array} + */ + this.lineIntersection = function(_x1, _y1, _x2, _y2) { + var m2 = Math.abs(_jg.gradient({x: _x1, y: _y1}, {x: _x2, y: _y2})), + m1 = Math.abs(m), + b = m1 === Infinity ? x1 : y1 - (m1 * x1), + out = [], + b2 = m2 === Infinity ? _x1 : _y1 - (m2 * _x1); + + // if lines parallel, no intersection + if (m2 !== m1) { + // perpendicular, segment horizontal + if(m2 === Infinity && m1 === 0) { + if (_plb(_x1, x1, x2) && _plb(y1, _y1, _y2)) { + out = [ _x1, y1 ]; // we return X on the incident line and Y from the segment + } + } else if(m2 === 0 && m1 === Infinity) { + // perpendicular, segment vertical + if(_plb(_y1, y1, y2) && _plb(x1, _x1, _x2)) { + out = [x1, _y1]; // we return X on the segment and Y from the incident line + } + } else { + var X, Y; + if (m2 === Infinity) { + // test line is a vertical line. where does it cross the segment? + X = _x1; + if (_plb(X, x1, x2)) { + Y = (m1 * _x1) + b; + if (_plb(Y, _y1, _y2)) { + out = [ X, Y ]; + } + } + } else if (m2 === 0) { + Y = _y1; + // test line is a horizontal line. where does it cross the segment? + if (_plb(Y, y1, y2)) { + X = (_y1 - b) / m1; + if (_plb(X, _x1, _x2)) { + out = [ X, Y ]; + } + } + } else { + // mX + b = m2X + b2 + // mX - m2X = b2 - b + // X(m - m2) = b2 - b + // X = (b2 - b) / (m - m2) + // Y = mX + b + X = (b2 - b) / (m1 - m2); + Y = (m1 * X) + b; + if(_plb(X, x1, x2) && _plb(Y, y1, y2)) { + out = [ X, Y]; + } + } + } + } + + return out; + }; + + /** + * Calculates all intersections of the given box with this segment. By default this method simply calls `lineIntersection` with each of the four + * faces of the box; subclasses can override this if they think there's a faster way to compute the entire box at once. + * @param x X position of top left corner of box + * @param y Y position of top left corner of box + * @param w width of box + * @param h height of box + * @returns {Array} + */ + this.boxIntersection = function(x, y, w, h) { + var a = []; + a.push.apply(a, this.lineIntersection(x, y, x + w, y)); + a.push.apply(a, this.lineIntersection(x + w, y, x + w, y + h)); + a.push.apply(a, this.lineIntersection(x + w, y + h, x, y + h)); + a.push.apply(a, this.lineIntersection(x, y + h, x, y)); + return a; + }; + + /** + * Calculates all intersections of the given bounding box with this segment. By default this method simply calls `lineIntersection` with each of the four + * faces of the box; subclasses can override this if they think there's a faster way to compute the entire box at once. + * @param box Bounding box, in { x:.., y:..., w:..., h:... } format. + * @returns {Array} + */ + this.boundingBoxIntersection = function(box) { + return this.boxIntersection(box.x, box.y, box.w, box.h); + }; + }, + + /* + Arc Segment. You need to supply: + + r - radius + cx - center x for the arc + cy - center y for the arc + ac - whether the arc is anticlockwise or not. default is clockwise. + + and then either: + + startAngle - startAngle for the arc. + endAngle - endAngle for the arc. + + or: + + x1 - x for start point + y1 - y for start point + x2 - x for end point + y2 - y for end point + + */ + Arc: function (params) { + var _super = _jp.Segments.AbstractSegment.apply(this, arguments), + _calcAngle = function (_x, _y) { + return _jg.theta([params.cx, params.cy], [_x, _y]); + }, + _calcAngleForLocation = function (segment, location) { + if (segment.anticlockwise) { + var sa = segment.startAngle < segment.endAngle ? segment.startAngle + TWO_PI : segment.startAngle, + s = Math.abs(sa - segment.endAngle); + return sa - (s * location); + } + else { + var ea = segment.endAngle < segment.startAngle ? segment.endAngle + TWO_PI : segment.endAngle, + ss = Math.abs(ea - segment.startAngle); + + return segment.startAngle + (ss * location); + } + }, + TWO_PI = 2 * Math.PI; + + this.radius = params.r; + this.anticlockwise = params.ac; + this.type = "Arc"; + + if (params.startAngle && params.endAngle) { + this.startAngle = params.startAngle; + this.endAngle = params.endAngle; + this.x1 = params.cx + (this.radius * Math.cos(params.startAngle)); + this.y1 = params.cy + (this.radius * Math.sin(params.startAngle)); + this.x2 = params.cx + (this.radius * Math.cos(params.endAngle)); + this.y2 = params.cy + (this.radius * Math.sin(params.endAngle)); + } + else { + this.startAngle = _calcAngle(params.x1, params.y1); + this.endAngle = _calcAngle(params.x2, params.y2); + this.x1 = params.x1; + this.y1 = params.y1; + this.x2 = params.x2; + this.y2 = params.y2; + } + + if (this.endAngle < 0) { + this.endAngle += TWO_PI; + } + if (this.startAngle < 0) { + this.startAngle += TWO_PI; + } + + // segment is used by vml + //this.segment = _jg.quadrant([this.x1, this.y1], [this.x2, this.y2]); + + // we now have startAngle and endAngle as positive numbers, meaning the + // absolute difference (|d|) between them is the sweep (s) of this arc, unless the + // arc is 'anticlockwise' in which case 's' is given by 2PI - |d|. + + var ea = this.endAngle < this.startAngle ? this.endAngle + TWO_PI : this.endAngle; + this.sweep = Math.abs(ea - this.startAngle); + if (this.anticlockwise) { + this.sweep = TWO_PI - this.sweep; + } + var circumference = 2 * Math.PI * this.radius, + frac = this.sweep / TWO_PI, + length = circumference * frac; + + this.getLength = function () { + return length; + }; + + this.getBounds = function () { + return { + minX: params.cx - params.r, + maxX: params.cx + params.r, + minY: params.cy - params.r, + maxY: params.cy + params.r + }; + }; + + var VERY_SMALL_VALUE = 0.0000000001, + gentleRound = function (n) { + var f = Math.floor(n), r = Math.ceil(n); + if (n - f < VERY_SMALL_VALUE) { + return f; + } + else if (r - n < VERY_SMALL_VALUE) { + return r; + } + return n; + }; + + /** + * returns the point on the segment's path that is 'location' along the length of the path, where 'location' is a decimal from + * 0 to 1 inclusive. + */ + this.pointOnPath = function (location, absolute) { + + if (location === 0) { + return { x: this.x1, y: this.y1, theta: this.startAngle }; + } + else if (location === 1) { + return { x: this.x2, y: this.y2, theta: this.endAngle }; + } + + if (absolute) { + location = location / length; + } + + var angle = _calcAngleForLocation(this, location), + _x = params.cx + (params.r * Math.cos(angle)), + _y = params.cy + (params.r * Math.sin(angle)); + + return { x: gentleRound(_x), y: gentleRound(_y), theta: angle }; + }; + + /** + * returns the gradient of the segment at the given point. + */ + this.gradientAtPoint = function (location, absolute) { + var p = this.pointOnPath(location, absolute); + var m = _jg.normal([ params.cx, params.cy ], [p.x, p.y ]); + if (!this.anticlockwise && (m === Infinity || m === -Infinity)) { + m *= -1; + } + return m; + }; + + this.pointAlongPathFrom = function (location, distance, absolute) { + var p = this.pointOnPath(location, absolute), + arcSpan = distance / circumference * 2 * Math.PI, + dir = this.anticlockwise ? -1 : 1, + startAngle = p.theta + (dir * arcSpan), + startX = params.cx + (this.radius * Math.cos(startAngle)), + startY = params.cy + (this.radius * Math.sin(startAngle)); + + return {x: startX, y: startY}; + }; + + // TODO: lineIntersection + }, + + Bezier: function (params) { + this.curve = [ + { x: params.x1, y: params.y1}, + { x: params.cp1x, y: params.cp1y }, + { x: params.cp2x, y: params.cp2y }, + { x: params.x2, y: params.y2 } + ]; + + var _super = _jp.Segments.AbstractSegment.apply(this, arguments); + // although this is not a strictly rigorous determination of bounds + // of a bezier curve, it works for the types of curves that this segment + // type produces. + this.bounds = { + minX: Math.min(params.x1, params.x2, params.cp1x, params.cp2x), + minY: Math.min(params.y1, params.y2, params.cp1y, params.cp2y), + maxX: Math.max(params.x1, params.x2, params.cp1x, params.cp2x), + maxY: Math.max(params.y1, params.y2, params.cp1y, params.cp2y) + }; + + this.type = "Bezier"; + + var _translateLocation = function (_curve, location, absolute) { + if (absolute) { + location = root.jsBezier.locationAlongCurveFrom(_curve, location > 0 ? 0 : 1, location); + } + + return location; + }; + + /** + * returns the point on the segment's path that is 'location' along the length of the path, where 'location' is a decimal from + * 0 to 1 inclusive. + */ + this.pointOnPath = function (location, absolute) { + location = _translateLocation(this.curve, location, absolute); + return root.jsBezier.pointOnCurve(this.curve, location); + }; + + /** + * returns the gradient of the segment at the given point. + */ + this.gradientAtPoint = function (location, absolute) { + location = _translateLocation(this.curve, location, absolute); + return root.jsBezier.gradientAtPoint(this.curve, location); + }; + + this.pointAlongPathFrom = function (location, distance, absolute) { + location = _translateLocation(this.curve, location, absolute); + return root.jsBezier.pointAlongCurveFrom(this.curve, location, distance); + }; + + this.getLength = function () { + return root.jsBezier.getLength(this.curve); + }; + + this.getBounds = function () { + return this.bounds; + }; + + this.findClosestPointOnPath = function (x, y) { + var p = root.jsBezier.nearestPointOnCurve({x:x,y:y}, this.curve); + return { + d:Math.sqrt(Math.pow(p.point.x - x, 2) + Math.pow(p.point.y - y, 2)), + x:p.point.x, + y:p.point.y, + l:p.location, + s:this + }; + }; + + this.lineIntersection = function(x1, y1, x2, y2) { + return root.jsBezier.lineIntersection(x1, y1, x2, y2, this.curve); + }; + } + }; + + _jp.SegmentRenderer = { + getPath: function (segment, isFirstSegment) { + return ({ + "Straight": function (isFirstSegment) { + var d = segment.getCoordinates(); + return (isFirstSegment ? "M " + d.x1 + " " + d.y1 + " " : "") + "L " + d.x2 + " " + d.y2; + }, + "Bezier": function (isFirstSegment) { + var d = segment.params; + return (isFirstSegment ? "M " + d.x2 + " " + d.y2 + " " : "") + + "C " + d.cp2x + " " + d.cp2y + " " + d.cp1x + " " + d.cp1y + " " + d.x1 + " " + d.y1; + }, + "Arc": function (isFirstSegment) { + var d = segment.params, + laf = segment.sweep > Math.PI ? 1 : 0, + sf = segment.anticlockwise ? 0 : 1; + + return (isFirstSegment ? "M" + segment.x1 + " " + segment.y1 + " " : "") + "A " + segment.radius + " " + d.r + " 0 " + laf + "," + sf + " " + segment.x2 + " " + segment.y2; + } + })[segment.type](isFirstSegment); + } + }; + + /* + Class: UIComponent + Superclass for Connector and AbstractEndpoint. + */ + var AbstractComponent = function () { + this.resetBounds = function () { + this.bounds = { minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity }; + }; + this.resetBounds(); + }; + + /* + * Class: Connector + * Superclass for all Connectors; here is where Segments are managed. This is exposed on jsPlumb just so it + * can be accessed from other files. You should not try to instantiate one of these directly. + * + * When this class is asked for a pointOnPath, or gradient etc, it must first figure out which segment to dispatch + * that request to. This is done by keeping track of the total connector length as segments are added, and also + * their cumulative ratios to the total length. Then when the right segment is found it is a simple case of dispatching + * the request to it (and adjusting 'location' so that it is relative to the beginning of that segment.) + */ + _jp.Connectors.AbstractConnector = function (params) { + + AbstractComponent.apply(this, arguments); + + var segments = [], + totalLength = 0, + segmentProportions = [], + segmentProportionalLengths = [], + stub = params.stub || 0, + sourceStub = _ju.isArray(stub) ? stub[0] : stub, + targetStub = _ju.isArray(stub) ? stub[1] : stub, + gap = params.gap || 0, + sourceGap = _ju.isArray(gap) ? gap[0] : gap, + targetGap = _ju.isArray(gap) ? gap[1] : gap, + userProvidedSegments = null, + paintInfo = null; + + this.getPathData = function() { + var p = ""; + for (var i = 0; i < segments.length; i++) { + p += _jp.SegmentRenderer.getPath(segments[i], i === 0); + p += " "; + } + return p; + }; + + /** + * Function: findSegmentForPoint + * Returns the segment that is closest to the given [x,y], + * null if nothing found. This function returns a JS + * object with: + * + * d - distance from segment + * l - proportional location in segment + * x - x point on the segment + * y - y point on the segment + * s - the segment itself. + */ + this.findSegmentForPoint = function (x, y) { + var out = { d: Infinity, s: null, x: null, y: null, l: null }; + for (var i = 0; i < segments.length; i++) { + var _s = segments[i].findClosestPointOnPath(x, y); + if (_s.d < out.d) { + out.d = _s.d; + out.l = _s.l; + out.x = _s.x; + out.y = _s.y; + out.s = segments[i]; + out.x1 = _s.x1; + out.x2 = _s.x2; + out.y1 = _s.y1; + out.y2 = _s.y2; + out.index = i; + } + } + + return out; + }; + + this.lineIntersection = function(x1, y1, x2, y2) { + var out = []; + for (var i = 0; i < segments.length; i++) { + out.push.apply(out, segments[i].lineIntersection(x1, y1, x2, y2)); + } + return out; + }; + + this.boxIntersection = function(x, y, w, h) { + var out = []; + for (var i = 0; i < segments.length; i++) { + out.push.apply(out, segments[i].boxIntersection(x, y, w, h)); + } + return out; + }; + + this.boundingBoxIntersection = function(box) { + var out = []; + for (var i = 0; i < segments.length; i++) { + out.push.apply(out, segments[i].boundingBoxIntersection(box)); + } + return out; + }; + + var _updateSegmentProportions = function () { + var curLoc = 0; + for (var i = 0; i < segments.length; i++) { + var sl = segments[i].getLength(); + segmentProportionalLengths[i] = sl / totalLength; + segmentProportions[i] = [curLoc, (curLoc += (sl / totalLength)) ]; + } + }, + + /** + * returns [segment, proportion of travel in segment, segment index] for the segment + * that contains the point which is 'location' distance along the entire path, where + * 'location' is a decimal between 0 and 1 inclusive. in this connector type, paths + * are made up of a list of segments, each of which contributes some fraction to + * the total length. + * From 1.3.10 this also supports the 'absolute' property, which lets us specify a location + * as the absolute distance in pixels, rather than a proportion of the total path. + */ + _findSegmentForLocation = function (location, absolute) { + if (absolute) { + location = location > 0 ? location / totalLength : (totalLength + location) / totalLength; + } + var idx = segmentProportions.length - 1, inSegmentProportion = 1; + for (var i = 0; i < segmentProportions.length; i++) { + if (segmentProportions[i][1] >= location) { + idx = i; + // todo is this correct for all connector path types? + inSegmentProportion = location === 1 ? 1 : location === 0 ? 0 : (location - segmentProportions[i][0]) / segmentProportionalLengths[i]; + break; + } + } + return { segment: segments[idx], proportion: inSegmentProportion, index: idx }; + }, + _addSegment = function (conn, type, params) { + if (params.x1 === params.x2 && params.y1 === params.y2) { + return; + } + var s = new _jp.Segments[type](params); + segments.push(s); + totalLength += s.getLength(); + conn.updateBounds(s); + }, + _clearSegments = function () { + totalLength = segments.length = segmentProportions.length = segmentProportionalLengths.length = 0; + }; + + this.setSegments = function (_segs) { + userProvidedSegments = []; + totalLength = 0; + for (var i = 0; i < _segs.length; i++) { + userProvidedSegments.push(_segs[i]); + totalLength += _segs[i].getLength(); + } + }; + + this.getLength = function() { + return totalLength; + }; + + var _prepareCompute = function (params) { + this.strokeWidth = params.strokeWidth; + var segment = _jg.quadrant(params.sourcePos, params.targetPos), + swapX = params.targetPos[0] < params.sourcePos[0], + swapY = params.targetPos[1] < params.sourcePos[1], + lw = params.strokeWidth || 1, + so = params.sourceEndpoint.anchor.getOrientation(params.sourceEndpoint), + to = params.targetEndpoint.anchor.getOrientation(params.targetEndpoint), + x = swapX ? params.targetPos[0] : params.sourcePos[0], + y = swapY ? params.targetPos[1] : params.sourcePos[1], + w = Math.abs(params.targetPos[0] - params.sourcePos[0]), + h = Math.abs(params.targetPos[1] - params.sourcePos[1]); + + // if either anchor does not have an orientation set, we derive one from their relative + // positions. we fix the axis to be the one in which the two elements are further apart, and + // point each anchor at the other element. this is also used when dragging a new connection. + if (so[0] === 0 && so[1] === 0 || to[0] === 0 && to[1] === 0) { + var index = w > h ? 0 : 1, oIndex = [1, 0][index]; + so = []; + to = []; + so[index] = params.sourcePos[index] > params.targetPos[index] ? -1 : 1; + to[index] = params.sourcePos[index] > params.targetPos[index] ? 1 : -1; + so[oIndex] = 0; + to[oIndex] = 0; + } + + var sx = swapX ? w + (sourceGap * so[0]) : sourceGap * so[0], + sy = swapY ? h + (sourceGap * so[1]) : sourceGap * so[1], + tx = swapX ? targetGap * to[0] : w + (targetGap * to[0]), + ty = swapY ? targetGap * to[1] : h + (targetGap * to[1]), + oProduct = ((so[0] * to[0]) + (so[1] * to[1])); + + var result = { + sx: sx, sy: sy, tx: tx, ty: ty, lw: lw, + xSpan: Math.abs(tx - sx), + ySpan: Math.abs(ty - sy), + mx: (sx + tx) / 2, + my: (sy + ty) / 2, + so: so, to: to, x: x, y: y, w: w, h: h, + segment: segment, + startStubX: sx + (so[0] * sourceStub), + startStubY: sy + (so[1] * sourceStub), + endStubX: tx + (to[0] * targetStub), + endStubY: ty + (to[1] * targetStub), + isXGreaterThanStubTimes2: Math.abs(sx - tx) > (sourceStub + targetStub), + isYGreaterThanStubTimes2: Math.abs(sy - ty) > (sourceStub + targetStub), + opposite: oProduct === -1, + perpendicular: oProduct === 0, + orthogonal: oProduct === 1, + sourceAxis: so[0] === 0 ? "y" : "x", + points: [x, y, w, h, sx, sy, tx, ty ], + stubs:[sourceStub, targetStub] + }; + result.anchorOrientation = result.opposite ? "opposite" : result.orthogonal ? "orthogonal" : "perpendicular"; + return result; + }; + + this.getSegments = function () { + return segments; + }; + + this.updateBounds = function (segment) { + var segBounds = segment.getBounds(); + this.bounds.minX = Math.min(this.bounds.minX, segBounds.minX); + this.bounds.maxX = Math.max(this.bounds.maxX, segBounds.maxX); + this.bounds.minY = Math.min(this.bounds.minY, segBounds.minY); + this.bounds.maxY = Math.max(this.bounds.maxY, segBounds.maxY); + }; + + var dumpSegmentsToConsole = function () { + console.log("SEGMENTS:"); + for (var i = 0; i < segments.length; i++) { + console.log(segments[i].type, segments[i].getLength(), segmentProportions[i]); + } + }; + + this.pointOnPath = function (location, absolute) { + var seg = _findSegmentForLocation(location, absolute); + return seg.segment && seg.segment.pointOnPath(seg.proportion, false) || [0, 0]; + }; + + this.gradientAtPoint = function (location, absolute) { + var seg = _findSegmentForLocation(location, absolute); + return seg.segment && seg.segment.gradientAtPoint(seg.proportion, false) || 0; + }; + + this.pointAlongPathFrom = function (location, distance, absolute) { + var seg = _findSegmentForLocation(location, absolute); + // TODO what happens if this crosses to the next segment? + return seg.segment && seg.segment.pointAlongPathFrom(seg.proportion, distance, false) || [0, 0]; + }; + + this.compute = function (params) { + paintInfo = _prepareCompute.call(this, params); + + _clearSegments(); + this._compute(paintInfo, params); + this.x = paintInfo.points[0]; + this.y = paintInfo.points[1]; + this.w = paintInfo.points[2]; + this.h = paintInfo.points[3]; + this.segment = paintInfo.segment; + _updateSegmentProportions(); + }; + + return { + addSegment: _addSegment, + prepareCompute: _prepareCompute, + sourceStub: sourceStub, + targetStub: targetStub, + maxStub: Math.max(sourceStub, targetStub), + sourceGap: sourceGap, + targetGap: targetGap, + maxGap: Math.max(sourceGap, targetGap) + }; + }; + _ju.extend(_jp.Connectors.AbstractConnector, AbstractComponent); + + + // ********************************* END OF CONNECTOR TYPES ******************************************************************* + + // ********************************* ENDPOINT TYPES ******************************************************************* + + _jp.Endpoints.AbstractEndpoint = function (params) { + AbstractComponent.apply(this, arguments); + var compute = this.compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + var out = this._compute.apply(this, arguments); + this.x = out[0]; + this.y = out[1]; + this.w = out[2]; + this.h = out[3]; + this.bounds.minX = this.x; + this.bounds.minY = this.y; + this.bounds.maxX = this.x + this.w; + this.bounds.maxY = this.y + this.h; + return out; + }; + return { + compute: compute, + cssClass: params.cssClass + }; + }; + _ju.extend(_jp.Endpoints.AbstractEndpoint, AbstractComponent); + + /** + * Class: Endpoints.Dot + * A round endpoint, with default radius 10 pixels. + */ + + /** + * Function: Constructor + * + * Parameters: + * + * radius - radius of the endpoint. defaults to 10 pixels. + */ + _jp.Endpoints.Dot = function (params) { + this.type = "Dot"; + var _super = _jp.Endpoints.AbstractEndpoint.apply(this, arguments); + params = params || {}; + this.radius = params.radius || 10; + this.defaultOffset = 0.5 * this.radius; + this.defaultInnerRadius = this.radius / 3; + + this._compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + this.radius = endpointStyle.radius || this.radius; + var x = anchorPoint[0] - this.radius, + y = anchorPoint[1] - this.radius, + w = this.radius * 2, + h = this.radius * 2; + + if (endpointStyle.stroke) { + var lw = endpointStyle.strokeWidth || 1; + x -= lw; + y -= lw; + w += (lw * 2); + h += (lw * 2); + } + return [ x, y, w, h, this.radius ]; + }; + }; + _ju.extend(_jp.Endpoints.Dot, _jp.Endpoints.AbstractEndpoint); + + _jp.Endpoints.Rectangle = function (params) { + this.type = "Rectangle"; + var _super = _jp.Endpoints.AbstractEndpoint.apply(this, arguments); + params = params || {}; + this.width = params.width || 20; + this.height = params.height || 20; + + this._compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + var width = endpointStyle.width || this.width, + height = endpointStyle.height || this.height, + x = anchorPoint[0] - (width / 2), + y = anchorPoint[1] - (height / 2); + + return [ x, y, width, height]; + }; + }; + _ju.extend(_jp.Endpoints.Rectangle, _jp.Endpoints.AbstractEndpoint); + + var DOMElementEndpoint = function (params) { + _jp.jsPlumbUIComponent.apply(this, arguments); + this._jsPlumb.displayElements = []; + }; + _ju.extend(DOMElementEndpoint, _jp.jsPlumbUIComponent, { + getDisplayElements: function () { + return this._jsPlumb.displayElements; + }, + appendDisplayElement: function (el) { + this._jsPlumb.displayElements.push(el); + } + }); + + /** + * Class: Endpoints.Image + * Draws an image as the Endpoint. + */ + /** + * Function: Constructor + * + * Parameters: + * + * src - location of the image to use. + + TODO: multiple references to self. not sure quite how to get rid of them entirely. perhaps self = null in the cleanup + function will suffice + + TODO this class still might leak memory. + + */ + _jp.Endpoints.Image = function (params) { + + this.type = "Image"; + DOMElementEndpoint.apply(this, arguments); + _jp.Endpoints.AbstractEndpoint.apply(this, arguments); + + var _onload = params.onload, + src = params.src || params.url, + clazz = params.cssClass ? " " + params.cssClass : ""; + + this._jsPlumb.img = new Image(); + this._jsPlumb.ready = false; + this._jsPlumb.initialized = false; + this._jsPlumb.deleted = false; + this._jsPlumb.widthToUse = params.width; + this._jsPlumb.heightToUse = params.height; + this._jsPlumb.endpoint = params.endpoint; + + this._jsPlumb.img.onload = function () { + if (this._jsPlumb != null) { + this._jsPlumb.ready = true; + this._jsPlumb.widthToUse = this._jsPlumb.widthToUse || this._jsPlumb.img.width; + this._jsPlumb.heightToUse = this._jsPlumb.heightToUse || this._jsPlumb.img.height; + if (_onload) { + _onload(this); + } + } + }.bind(this); + + /* + Function: setImage + Sets the Image to use in this Endpoint. + + Parameters: + img - may be a URL or an Image object + onload - optional; a callback to execute once the image has loaded. + */ + this._jsPlumb.endpoint.setImage = function (_img, onload) { + var s = _img.constructor === String ? _img : _img.src; + _onload = onload; + this._jsPlumb.img.src = s; + + if (this.canvas != null) { + this.canvas.setAttribute("src", this._jsPlumb.img.src); + } + }.bind(this); + + this._jsPlumb.endpoint.setImage(src, _onload); + this._compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + this.anchorPoint = anchorPoint; + if (this._jsPlumb.ready) { + return [anchorPoint[0] - this._jsPlumb.widthToUse / 2, anchorPoint[1] - this._jsPlumb.heightToUse / 2, + this._jsPlumb.widthToUse, this._jsPlumb.heightToUse]; + } + else { + return [0, 0, 0, 0]; + } + }; + + this.canvas = _jp.createElement("img", { + position:"absolute", + margin:0, + padding:0, + outline:0 + }, this._jsPlumb.instance.endpointClass + clazz); + + if (this._jsPlumb.widthToUse) { + this.canvas.setAttribute("width", this._jsPlumb.widthToUse); + } + if (this._jsPlumb.heightToUse) { + this.canvas.setAttribute("height", this._jsPlumb.heightToUse); + } + this._jsPlumb.instance.appendElement(this.canvas); + + this.actuallyPaint = function (d, style, anchor) { + if (!this._jsPlumb.deleted) { + if (!this._jsPlumb.initialized) { + this.canvas.setAttribute("src", this._jsPlumb.img.src); + this.appendDisplayElement(this.canvas); + this._jsPlumb.initialized = true; + } + var x = this.anchorPoint[0] - (this._jsPlumb.widthToUse / 2), + y = this.anchorPoint[1] - (this._jsPlumb.heightToUse / 2); + _ju.sizeElement(this.canvas, x, y, this._jsPlumb.widthToUse, this._jsPlumb.heightToUse); + } + }; + + this.paint = function (style, anchor) { + if (this._jsPlumb != null) { // may have been deleted + if (this._jsPlumb.ready) { + this.actuallyPaint(style, anchor); + } + else { + root.setTimeout(function () { + this.paint(style, anchor); + }.bind(this), 200); + } + } + }; + }; + _ju.extend(_jp.Endpoints.Image, [ DOMElementEndpoint, _jp.Endpoints.AbstractEndpoint ], { + cleanup: function (force) { + if (force) { + this._jsPlumb.deleted = true; + if (this.canvas) { + this.canvas.parentNode.removeChild(this.canvas); + } + this.canvas = null; + } + } + }); + + /* + * Class: Endpoints.Blank + * An Endpoint that paints nothing (visible) on the screen. Supports cssClass and hoverClass parameters like all Endpoints. + */ + _jp.Endpoints.Blank = function (params) { + var _super = _jp.Endpoints.AbstractEndpoint.apply(this, arguments); + this.type = "Blank"; + DOMElementEndpoint.apply(this, arguments); + this._compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + return [anchorPoint[0], anchorPoint[1], 10, 0]; + }; + + var clazz = params.cssClass ? " " + params.cssClass : ""; + + this.canvas = _jp.createElement("div", { + display: "block", + width: "1px", + height: "1px", + background: "transparent", + position: "absolute" + }, this._jsPlumb.instance.endpointClass + clazz); + + this._jsPlumb.instance.appendElement(this.canvas); + + this.paint = function (style, anchor) { + _ju.sizeElement(this.canvas, this.x, this.y, this.w, this.h); + }; + }; + _ju.extend(_jp.Endpoints.Blank, [_jp.Endpoints.AbstractEndpoint, DOMElementEndpoint], { + cleanup: function () { + if (this.canvas && this.canvas.parentNode) { + this.canvas.parentNode.removeChild(this.canvas); + } + } + }); + + /* + * Class: Endpoints.Triangle + * A triangular Endpoint. + */ + /* + * Function: Constructor + * + * Parameters: + * + * width width of the triangle's base. defaults to 55 pixels. + * height height of the triangle from base to apex. defaults to 55 pixels. + */ + _jp.Endpoints.Triangle = function (params) { + this.type = "Triangle"; + _jp.Endpoints.AbstractEndpoint.apply(this, arguments); + var self = this; + params = params || { }; + params.width = params.width || 55; + params.height = params.height || 55; + this.width = params.width; + this.height = params.height; + this._compute = function (anchorPoint, orientation, endpointStyle, connectorPaintStyle) { + var width = endpointStyle.width || self.width, + height = endpointStyle.height || self.height, + x = anchorPoint[0] - (width / 2), + y = anchorPoint[1] - (height / 2); + return [ x, y, width, height ]; + }; + }; +// ********************************* END OF ENDPOINT TYPES ******************************************************************* + + +// ********************************* OVERLAY DEFINITIONS *********************************************************************** + + var AbstractOverlay = _jp.Overlays.AbstractOverlay = function (params) { + this.visible = true; + this.isAppendedAtTopLevel = true; + this.component = params.component; + this.loc = params.location == null ? 0.5 : params.location; + this.endpointLoc = params.endpointLocation == null ? [ 0.5, 0.5] : params.endpointLocation; + this.visible = params.visible !== false; + }; + AbstractOverlay.prototype = { + cleanup: function (force) { + if (force) { + this.component = null; + this.canvas = null; + this.endpointLoc = null; + } + }, + reattach:function(instance, component) { }, + setVisible: function (val) { + this.visible = val; + this.component.repaint(); + }, + isVisible: function () { + return this.visible; + }, + hide: function () { + this.setVisible(false); + }, + show: function () { + this.setVisible(true); + }, + incrementLocation: function (amount) { + this.loc += amount; + this.component.repaint(); + }, + setLocation: function (l) { + this.loc = l; + this.component.repaint(); + }, + getLocation: function () { + return this.loc; + }, + updateFrom:function() { } + }; + + + /* + * Class: Overlays.Arrow + * + * An arrow overlay, defined by four points: the head, the two sides of the tail, and a 'foldback' point at some distance along the length + * of the arrow that lines from each tail point converge into. The foldback point is defined using a decimal that indicates some fraction + * of the length of the arrow and has a default value of 0.623. A foldback point value of 1 would mean that the arrow had a straight line + * across the tail. + */ + /* + * @constructor + * + * @param {Object} params Constructor params. + * @param {Number} [params.length] Distance in pixels from head to tail baseline. default 20. + * @param {Number} [params.width] Width in pixels of the tail baseline. default 20. + * @param {String} [params.fill] Style to use when filling the arrow. defaults to "black". + * @param {String} [params.stroke] Style to use when stroking the arrow. defaults to null, which means the arrow is not stroked. + * @param {Number} [params.stroke-width] Line width to use when stroking the arrow. defaults to 1, but only used if stroke is not null. + * @param {Number} [params.foldback] Distance (as a decimal from 0 to 1 inclusive) along the length of the arrow marking the point the tail points should fold back to. defaults to 0.623. + * @param {Number} [params.location] Distance (as a decimal from 0 to 1 inclusive) marking where the arrow should sit on the connector. defaults to 0.5. + * @param {NUmber} [params.direction] Indicates the direction the arrow points in. valid values are -1 and 1; 1 is default. + */ + _jp.Overlays.Arrow = function (params) { + this.type = "Arrow"; + AbstractOverlay.apply(this, arguments); + this.isAppendedAtTopLevel = false; + params = params || {}; + var self = this; + + this.length = params.length || 20; + this.width = params.width || 20; + this.id = params.id; + var direction = (params.direction || 1) < 0 ? -1 : 1, + paintStyle = params.paintStyle || { "stroke-width": 1 }, + // how far along the arrow the lines folding back in come to. default is 62.3%. + foldback = params.foldback || 0.623; + + this.computeMaxSize = function () { + return self.width * 1.5; + }; + + this.elementCreated = function(p, component) { + this.path = p; + if (params.events) { + for (var i in params.events) { + _jp.on(p, i, params.events[i]); + } + } + }; + + this.draw = function (component, currentConnectionPaintStyle) { + + var hxy, mid, txy, tail, cxy; + if (component.pointAlongPathFrom) { + + if (_ju.isString(this.loc) || this.loc > 1 || this.loc < 0) { + var l = parseInt(this.loc, 10), + fromLoc = this.loc < 0 ? 1 : 0; + hxy = component.pointAlongPathFrom(fromLoc, l, false); + mid = component.pointAlongPathFrom(fromLoc, l - (direction * this.length / 2), false); + txy = _jg.pointOnLine(hxy, mid, this.length); + } + else if (this.loc === 1) { + hxy = component.pointOnPath(this.loc); + mid = component.pointAlongPathFrom(this.loc, -(this.length)); + txy = _jg.pointOnLine(hxy, mid, this.length); + + if (direction === -1) { + var _ = txy; + txy = hxy; + hxy = _; + } + } + else if (this.loc === 0) { + txy = component.pointOnPath(this.loc); + mid = component.pointAlongPathFrom(this.loc, this.length); + hxy = _jg.pointOnLine(txy, mid, this.length); + if (direction === -1) { + var __ = txy; + txy = hxy; + hxy = __; + } + } + else { + hxy = component.pointAlongPathFrom(this.loc, direction * this.length / 2); + mid = component.pointOnPath(this.loc); + txy = _jg.pointOnLine(hxy, mid, this.length); + } + + tail = _jg.perpendicularLineTo(hxy, txy, this.width); + cxy = _jg.pointOnLine(hxy, txy, foldback * this.length); + + var d = { hxy: hxy, tail: tail, cxy: cxy }, + stroke = paintStyle.stroke || currentConnectionPaintStyle.stroke, + fill = paintStyle.fill || currentConnectionPaintStyle.stroke, + lineWidth = paintStyle.strokeWidth || currentConnectionPaintStyle.strokeWidth; + + return { + component: component, + d: d, + "stroke-width": lineWidth, + stroke: stroke, + fill: fill, + minX: Math.min(hxy.x, tail[0].x, tail[1].x), + maxX: Math.max(hxy.x, tail[0].x, tail[1].x), + minY: Math.min(hxy.y, tail[0].y, tail[1].y), + maxY: Math.max(hxy.y, tail[0].y, tail[1].y) + }; + } + else { + return {component: component, minX: 0, maxX: 0, minY: 0, maxY: 0}; + } + }; + }; + _ju.extend(_jp.Overlays.Arrow, AbstractOverlay, { + updateFrom:function(d) { + this.length = d.length || this.length; + this.width = d.width|| this.width; + this.direction = d.direction != null ? d.direction : this.direction; + this.foldback = d.foldback|| this.foldback; + }, + cleanup:function() { + if (this.path && this.canvas) { + this.canvas.removeChild(this.path); + } + } + }); + + /* + * Class: Overlays.PlainArrow + * + * A basic arrow. This is in fact just one instance of the more generic case in which the tail folds back on itself to some + * point along the length of the arrow: in this case, that foldback point is the full length of the arrow. so it just does + * a 'call' to Arrow with foldback set appropriately. + */ + /* + * Function: Constructor + * See for allowed parameters for this overlay. + */ + _jp.Overlays.PlainArrow = function (params) { + params = params || {}; + var p = _jp.extend(params, {foldback: 1}); + _jp.Overlays.Arrow.call(this, p); + this.type = "PlainArrow"; + }; + _ju.extend(_jp.Overlays.PlainArrow, _jp.Overlays.Arrow); + + /* + * Class: Overlays.Diamond + * + * A diamond. Like PlainArrow, this is a concrete case of the more generic case of the tail points converging on some point...it just + * happens that in this case, that point is greater than the length of the the arrow. + * + * this could probably do with some help with positioning...due to the way it reuses the Arrow paint code, what Arrow thinks is the + * center is actually 1/4 of the way along for this guy. but we don't have any knowledge of pixels at this point, so we're kind of + * stuck when it comes to helping out the Arrow class. possibly we could pass in a 'transpose' parameter or something. the value + * would be -l/4 in this case - move along one quarter of the total length. + */ + /* + * Function: Constructor + * See for allowed parameters for this overlay. + */ + _jp.Overlays.Diamond = function (params) { + params = params || {}; + var l = params.length || 40, + p = _jp.extend(params, {length: l / 2, foldback: 2}); + _jp.Overlays.Arrow.call(this, p); + this.type = "Diamond"; + }; + _ju.extend(_jp.Overlays.Diamond, _jp.Overlays.Arrow); + + var _getDimensions = function (component, forceRefresh) { + if (component._jsPlumb.cachedDimensions == null || forceRefresh) { + component._jsPlumb.cachedDimensions = component.getDimensions(); + } + return component._jsPlumb.cachedDimensions; + }; + + // abstract superclass for overlays that add an element to the DOM. + var AbstractDOMOverlay = function (params) { + _jp.jsPlumbUIComponent.apply(this, arguments); + AbstractOverlay.apply(this, arguments); + + // hand off fired events to associated component. + var _f = this.fire; + this.fire = function () { + _f.apply(this, arguments); + if (this.component) { + this.component.fire.apply(this.component, arguments); + } + }; + + this.detached=false; + this.id = params.id; + this._jsPlumb.div = null; + this._jsPlumb.initialised = false; + this._jsPlumb.component = params.component; + this._jsPlumb.cachedDimensions = null; + this._jsPlumb.create = params.create; + this._jsPlumb.initiallyInvisible = params.visible === false; + + this.getElement = function () { + if (this._jsPlumb.div == null) { + var div = this._jsPlumb.div = _jp.getElement(this._jsPlumb.create(this._jsPlumb.component)); + div.style.position = "absolute"; + jsPlumb.addClass(div, this._jsPlumb.instance.overlayClass + " " + + (this.cssClass ? this.cssClass : + params.cssClass ? params.cssClass : "")); + this._jsPlumb.instance.appendElement(div); + this._jsPlumb.instance.getId(div); + this.canvas = div; + + // in IE the top left corner is what it placed at the desired location. This will not + // be fixed. IE8 is not going to be supported for much longer. + var ts = "translate(-50%, -50%)"; + div.style.webkitTransform = ts; + div.style.mozTransform = ts; + div.style.msTransform = ts; + div.style.oTransform = ts; + div.style.transform = ts; + + // write the related component into the created element + div._jsPlumb = this; + + if (params.visible === false) { + div.style.display = "none"; + } + } + return this._jsPlumb.div; + }; + + this.draw = function (component, currentConnectionPaintStyle, absolutePosition) { + var td = _getDimensions(this); + if (td != null && td.length === 2) { + var cxy = { x: 0, y: 0 }; + + // absolutePosition would have been set by a call to connection.setAbsoluteOverlayPosition. + if (absolutePosition) { + cxy = { x: absolutePosition[0], y: absolutePosition[1] }; + } + else if (component.pointOnPath) { + var loc = this.loc, absolute = false; + if (_ju.isString(this.loc) || this.loc < 0 || this.loc > 1) { + loc = parseInt(this.loc, 10); + absolute = true; + } + cxy = component.pointOnPath(loc, absolute); // a connection + } + else { + var locToUse = this.loc.constructor === Array ? this.loc : this.endpointLoc; + cxy = { x: locToUse[0] * component.w, + y: locToUse[1] * component.h }; + } + + var minx = cxy.x - (td[0] / 2), + miny = cxy.y - (td[1] / 2); + + return { + component: component, + d: { minx: minx, miny: miny, td: td, cxy: cxy }, + minX: minx, + maxX: minx + td[0], + minY: miny, + maxY: miny + td[1] + }; + } + else { + return {minX: 0, maxX: 0, minY: 0, maxY: 0}; + } + }; + }; + _ju.extend(AbstractDOMOverlay, [_jp.jsPlumbUIComponent, AbstractOverlay], { + getDimensions: function () { + return [1,1]; + }, + setVisible: function (state) { + if (this._jsPlumb.div) { + this._jsPlumb.div.style.display = state ? "block" : "none"; + // if initially invisible, dimensions are 0,0 and never get updated + if (state && this._jsPlumb.initiallyInvisible) { + _getDimensions(this, true); + this.component.repaint(); + this._jsPlumb.initiallyInvisible = false; + } + } + }, + /* + * Function: clearCachedDimensions + * Clears the cached dimensions for the label. As a performance enhancement, label dimensions are + * cached from 1.3.12 onwards. The cache is cleared when you change the label text, of course, but + * there are other reasons why the text dimensions might change - if you make a change through CSS, for + * example, you might change the font size. in that case you should explicitly call this method. + */ + clearCachedDimensions: function () { + this._jsPlumb.cachedDimensions = null; + }, + cleanup: function (force) { + if (force) { + if (this._jsPlumb.div != null) { + this._jsPlumb.div._jsPlumb = null; + this._jsPlumb.instance.removeElement(this._jsPlumb.div); + } + } + else { + // if not a forced cleanup, just detach child from parent for now. + if (this._jsPlumb && this._jsPlumb.div && this._jsPlumb.div.parentNode) { + this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div); + } + this.detached = true; + } + + }, + reattach:function(instance, component) { + if (this._jsPlumb.div != null) { + instance.getContainer().appendChild(this._jsPlumb.div); + } + this.detached = false; + }, + computeMaxSize: function () { + var td = _getDimensions(this); + return Math.max(td[0], td[1]); + }, + paint: function (p, containerExtents) { + if (!this._jsPlumb.initialised) { + this.getElement(); + p.component.appendDisplayElement(this._jsPlumb.div); + this._jsPlumb.initialised = true; + if (this.detached) { + this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div); + } + } + this._jsPlumb.div.style.left = (p.component.x + p.d.minx) + "px"; + this._jsPlumb.div.style.top = (p.component.y + p.d.miny) + "px"; + } + }); + + /* + * Class: Overlays.Custom + * A Custom overlay. You supply a 'create' function which returns some DOM element, and jsPlumb positions it. + * The 'create' function is passed a Connection or Endpoint. + */ + /* + * Function: Constructor + * + * Parameters: + * create - function for jsPlumb to call that returns a DOM element. + * location - distance (as a decimal from 0 to 1 inclusive) marking where the label should sit on the connector. defaults to 0.5. + * id - optional id to use for later retrieval of this overlay. + * + */ + _jp.Overlays.Custom = function (params) { + this.type = "Custom"; + AbstractDOMOverlay.apply(this, arguments); + }; + _ju.extend(_jp.Overlays.Custom, AbstractDOMOverlay); + + _jp.Overlays.GuideLines = function () { + var self = this; + self.length = 50; + self.strokeWidth = 5; + this.type = "GuideLines"; + AbstractOverlay.apply(this, arguments); + _jp.jsPlumbUIComponent.apply(this, arguments); + this.draw = function (connector, currentConnectionPaintStyle) { + + var head = connector.pointAlongPathFrom(self.loc, self.length / 2), + mid = connector.pointOnPath(self.loc), + tail = _jg.pointOnLine(head, mid, self.length), + tailLine = _jg.perpendicularLineTo(head, tail, 40), + headLine = _jg.perpendicularLineTo(tail, head, 20); + + return { + connector: connector, + head: head, + tail: tail, + headLine: headLine, + tailLine: tailLine, + minX: Math.min(head.x, tail.x, headLine[0].x, headLine[1].x), + minY: Math.min(head.y, tail.y, headLine[0].y, headLine[1].y), + maxX: Math.max(head.x, tail.x, headLine[0].x, headLine[1].x), + maxY: Math.max(head.y, tail.y, headLine[0].y, headLine[1].y) + }; + }; + + // this.cleanup = function() { }; // nothing to clean up for GuideLines + }; + + /* + * Class: Overlays.Label + + */ + /* + * Function: Constructor + * + * Parameters: + * cssClass - optional css class string to append to css class. This string is appended "as-is", so you can of course have multiple classes + * defined. This parameter is preferred to using labelStyle, borderWidth and borderStyle. + * label - the label to paint. May be a string or a function that returns a string. Nothing will be painted if your label is null or your + * label function returns null. empty strings _will_ be painted. + * location - distance (as a decimal from 0 to 1 inclusive) marking where the label should sit on the connector. defaults to 0.5. + * id - optional id to use for later retrieval of this overlay. + * + * + */ + _jp.Overlays.Label = function (params) { + this.labelStyle = params.labelStyle; + + var labelWidth = null, labelHeight = null, labelText = null, labelPadding = null; + this.cssClass = this.labelStyle != null ? this.labelStyle.cssClass : null; + var p = _jp.extend({ + create: function () { + return _jp.createElement("div"); + }}, params); + _jp.Overlays.Custom.call(this, p); + this.type = "Label"; + this.label = params.label || ""; + this.labelText = null; + if (this.labelStyle) { + var el = this.getElement(); + this.labelStyle.font = this.labelStyle.font || "12px sans-serif"; + el.style.font = this.labelStyle.font; + el.style.color = this.labelStyle.color || "black"; + if (this.labelStyle.fill) { + el.style.background = this.labelStyle.fill; + } + if (this.labelStyle.borderWidth > 0) { + var dStyle = this.labelStyle.borderStyle ? this.labelStyle.borderStyle : "black"; + el.style.border = this.labelStyle.borderWidth + "px solid " + dStyle; + } + if (this.labelStyle.padding) { + el.style.padding = this.labelStyle.padding; + } + } + + }; + _ju.extend(_jp.Overlays.Label, _jp.Overlays.Custom, { + cleanup: function (force) { + if (force) { + this.div = null; + this.label = null; + this.labelText = null; + this.cssClass = null; + this.labelStyle = null; + } + }, + getLabel: function () { + return this.label; + }, + /* + * Function: setLabel + * sets the label's, um, label. you would think i'd call this function + * 'setText', but you can pass either a Function or a String to this, so + * it makes more sense as 'setLabel'. This uses innerHTML on the label div, so keep + * that in mind if you need escaped HTML. + */ + setLabel: function (l) { + this.label = l; + this.labelText = null; + this.clearCachedDimensions(); + this.update(); + this.component.repaint(); + }, + getDimensions: function () { + this.update(); + return AbstractDOMOverlay.prototype.getDimensions.apply(this, arguments); + }, + update: function () { + if (typeof this.label === "function") { + var lt = this.label(this); + this.getElement().innerHTML = lt.replace(/\r\n/g, "
"); + } + else { + if (this.labelText == null) { + this.labelText = this.label; + this.getElement().innerHTML = this.labelText.replace(/\r\n/g, "
"); + } + } + }, + updateFrom:function(d) { + if(d.label != null){ + this.setLabel(d.label); + } + } + }); + + // ********************************* END OF OVERLAY DEFINITIONS *********************************************************************** + +}).call(typeof window !== 'undefined' ? window : this); + +/* + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +;(function() { + "use strict"; + + var root = this, + _ju = root.jsPlumbUtil, + _jpi = root.jsPlumbInstance; + + var GROUP_COLLAPSED_CLASS = "jtk-group-collapsed"; + var GROUP_EXPANDED_CLASS = "jtk-group-expanded"; + var GROUP_CONTAINER_SELECTOR = "[jtk-group-content]"; + var ELEMENT_DRAGGABLE_EVENT = "elementDraggable"; + var STOP = "stop"; + var REVERT = "revert"; + var GROUP_MANAGER = "_groupManager"; + var GROUP = "_jsPlumbGroup"; + var GROUP_DRAG_SCOPE = "_jsPlumbGroupDrag"; + var EVT_CHILD_ADDED = "group:addMember"; + var EVT_CHILD_REMOVED = "group:removeMember"; + var EVT_GROUP_ADDED = "group:add"; + var EVT_GROUP_REMOVED = "group:remove"; + var EVT_EXPAND = "group:expand"; + var EVT_COLLAPSE = "group:collapse"; + var EVT_GROUP_DRAG_STOP = "groupDragStop"; + var EVT_CONNECTION_MOVED = "connectionMoved"; + var EVT_INTERNAL_CONNECTION_DETACHED = "internal.connectionDetached"; + + var CMD_REMOVE_ALL = "removeAll"; + var CMD_ORPHAN_ALL = "orphanAll"; + var CMD_SHOW = "show"; + var CMD_HIDE = "hide"; + + var GroupManager = function(_jsPlumb) { + var _managedGroups = {}, _connectionSourceMap = {}, _connectionTargetMap = {}, self = this; + + _jsPlumb.bind("connection", function(p) { + if (p.source[GROUP] != null && p.target[GROUP] != null && p.source[GROUP] === p.target[GROUP]) { + _connectionSourceMap[p.connection.id] = p.source[GROUP]; + _connectionTargetMap[p.connection.id] = p.source[GROUP]; + } + else { + if (p.source[GROUP] != null) { + _ju.suggest(p.source[GROUP].connections.source, p.connection); + _connectionSourceMap[p.connection.id] = p.source[GROUP]; + } + if (p.target[GROUP] != null) { + _ju.suggest(p.target[GROUP].connections.target, p.connection); + _connectionTargetMap[p.connection.id] = p.target[GROUP]; + } + } + }); + + function _cleanupDetachedConnection(conn) { + delete conn.proxies; + var group = _connectionSourceMap[conn.id], f; + if (group != null) { + f = function(c) { return c.id === conn.id; }; + _ju.removeWithFunction(group.connections.source, f); + _ju.removeWithFunction(group.connections.target, f); + delete _connectionSourceMap[conn.id]; + } + + group = _connectionTargetMap[conn.id]; + if (group != null) { + f = function(c) { return c.id === conn.id; }; + _ju.removeWithFunction(group.connections.source, f); + _ju.removeWithFunction(group.connections.target, f); + delete _connectionTargetMap[conn.id]; + } + } + + _jsPlumb.bind(EVT_INTERNAL_CONNECTION_DETACHED, function(p) { + _cleanupDetachedConnection(p.connection); + }); + + _jsPlumb.bind(EVT_CONNECTION_MOVED, function(p) { + var connMap = p.index === 0 ? _connectionSourceMap : _connectionTargetMap; + var group = connMap[p.connection.id]; + if (group) { + var list = group.connections[p.index === 0 ? "source" : "target"]; + var idx = list.indexOf(p.connection); + if (idx !== -1) { + list.splice(idx, 1); + } + } + }); + + this.addGroup = function(group) { + _jsPlumb.addClass(group.getEl(), GROUP_EXPANDED_CLASS); + _managedGroups[group.id] = group; + group.manager = this; + _updateConnectionsForGroup(group); + _jsPlumb.fire(EVT_GROUP_ADDED, { group:group }); + }; + + this.addToGroup = function(group, el, doNotFireEvent) { + group = this.getGroup(group); + if (group) { + var groupEl = group.getEl(); + + if (el._isJsPlumbGroup) { + return; + } + var currentGroup = el._jsPlumbGroup; + // if already a member of this group, do nothing + if (currentGroup !== group) { + var elpos = _jsPlumb.getOffset(el, true); + var cpos = group.collapsed ? _jsPlumb.getOffset(groupEl, true) : _jsPlumb.getOffset(group.getDragArea(), true); + + // otherwise, transfer to this group. + if (currentGroup != null) { + currentGroup.remove(el, false, doNotFireEvent, false, group); + self.updateConnectionsForGroup(currentGroup); + } + group.add(el, doNotFireEvent/*, currentGroup*/); + + var handleDroppedConnections = function (list, index) { + var oidx = index === 0 ? 1 : 0; + list.each(function (c) { + c.setVisible(false); + if (c.endpoints[oidx].element._jsPlumbGroup === group) { + c.endpoints[oidx].setVisible(false); + self.expandConnection(c, oidx, group); + } + else { + c.endpoints[index].setVisible(false); + self.collapseConnection(c, index, group); + } + }); + }; + + if (group.collapsed) { + handleDroppedConnections(_jsPlumb.select({source: el}), 0); + handleDroppedConnections(_jsPlumb.select({target: el}), 1); + } + + var elId = _jsPlumb.getId(el); + _jsPlumb.dragManager.setParent(el, elId, groupEl, _jsPlumb.getId(groupEl), elpos); + + var newPosition = { left: elpos.left - cpos.left, top: elpos.top - cpos.top }; + + _jsPlumb.setPosition(el, newPosition); + + _jsPlumb.dragManager.revalidateParent(el, elId, elpos); + + self.updateConnectionsForGroup(group); + + _jsPlumb.revalidate(elId); + + if (!doNotFireEvent) { + var p = {group: group, el: el, pos:newPosition}; + if (currentGroup) { + p.sourceGroup = currentGroup; + } + _jsPlumb.fire(EVT_CHILD_ADDED, p); + } + } + } + }; + + this.removeFromGroup = function(group, el, doNotFireEvent) { + group = this.getGroup(group); + if (group) { + group.remove(el, null, doNotFireEvent); + } + }; + + this.getGroup = function(groupId) { + var group = groupId; + if (_ju.isString(groupId)) { + group = _managedGroups[groupId]; + if (group == null) { + throw new TypeError("No such group [" + groupId + "]"); + } + } + return group; + }; + + this.getGroups = function() { + var o = []; + for (var g in _managedGroups) { + o.push(_managedGroups[g]); + } + return o; + }; + + this.removeGroup = function(group, deleteMembers, manipulateDOM, doNotFireEvent) { + group = this.getGroup(group); + this.expandGroup(group, true); // this reinstates any original connections and removes all proxies, but does not fire an event. + var newPositions = group[deleteMembers ? CMD_REMOVE_ALL : CMD_ORPHAN_ALL](manipulateDOM, doNotFireEvent); + _jsPlumb.remove(group.getEl()); + delete _managedGroups[group.id]; + delete _jsPlumb._groups[group.id]; + _jsPlumb.fire(EVT_GROUP_REMOVED, { group:group }); + return newPositions; // this will be null in the case or remove, but be a map of {id->[x,y]} in the case of orphan + }; + + this.removeAllGroups = function(deleteMembers, manipulateDOM, doNotFireEvent) { + for (var g in _managedGroups) { + this.removeGroup(_managedGroups[g], deleteMembers, manipulateDOM, doNotFireEvent); + } + }; + + function _setVisible(group, state) { + var m = group.getMembers(); + for (var i = 0; i < m.length; i++) { + _jsPlumb[state ? CMD_SHOW : CMD_HIDE](m[i], true); + } + } + + var _collapseConnection = this.collapseConnection = function(c, index, group) { + + var proxyEp, groupEl = group.getEl(), groupElId = _jsPlumb.getId(groupEl), + originalElementId = c.endpoints[index].elementId; + + var otherEl = c.endpoints[index === 0 ? 1 : 0].element; + if (otherEl[GROUP] && (!otherEl[GROUP].shouldProxy() && otherEl[GROUP].collapsed)) { + return; + } + + c.proxies = c.proxies || []; + if(c.proxies[index]) { + proxyEp = c.proxies[index].ep; + }else { + proxyEp = _jsPlumb.addEndpoint(groupEl, { + endpoint:group.getEndpoint(c, index), + anchor:group.getAnchor(c, index), + parameters:{ + isProxyEndpoint:true + } + }); + } + proxyEp.setDeleteOnEmpty(true); + + // for this index, stash proxy info: the new EP, the original EP. + c.proxies[index] = { ep:proxyEp, originalEp: c.endpoints[index] }; + + // and advise the anchor manager + if (index === 0) { + // TODO why are there two differently named methods? Why is there not one method that says "some end of this + // connection changed (you give the index), and here's the new element and element id." + _jsPlumb.anchorManager.sourceChanged(originalElementId, groupElId, c, groupEl); + } + else { + _jsPlumb.anchorManager.updateOtherEndpoint(c.endpoints[0].elementId, originalElementId, groupElId, c); + c.target = groupEl; + c.targetId = groupElId; + } + + + // detach the original EP from the connection. + c.proxies[index].originalEp.detachFromConnection(c, null, true); + + // set the proxy as the new ep + proxyEp.connections = [ c ]; + c.endpoints[index] = proxyEp; + + c.setVisible(true); + }; + + this.collapseGroup = function(group) { + group = this.getGroup(group); + if (group == null || group.collapsed) { + return; + } + var groupEl = group.getEl(); + + // todo remove old proxy endpoints first, just in case? + //group.proxies.length = 0; + + // hide all connections + _setVisible(group, false); + + if (group.shouldProxy()) { + // collapses all connections in a group. + var _collapseSet = function (conns, index) { + for (var i = 0; i < conns.length; i++) { + var c = conns[i]; + _collapseConnection(c, index, group); + } + }; + + // setup proxies for sources and targets + _collapseSet(group.connections.source, 0); + _collapseSet(group.connections.target, 1); + } + + group.collapsed = true; + _jsPlumb.removeClass(groupEl, GROUP_EXPANDED_CLASS); + _jsPlumb.addClass(groupEl, GROUP_COLLAPSED_CLASS); + _jsPlumb.revalidate(groupEl); + _jsPlumb.fire(EVT_COLLAPSE, { group:group }); + }; + + var _expandConnection = this.expandConnection = function(c, index, group) { + + // if no proxies or none for this end of the connection, abort. + if (c.proxies == null || c.proxies[index] == null) { + return; + } + + var groupElId = _jsPlumb.getId(group.getEl()), + originalElement = c.proxies[index].originalEp.element, + originalElementId = c.proxies[index].originalEp.elementId; + + c.endpoints[index] = c.proxies[index].originalEp; + // and advise the anchor manager + if (index === 0) { + // TODO why are there two differently named methods? Why is there not one method that says "some end of this + // connection changed (you give the index), and here's the new element and element id." + _jsPlumb.anchorManager.sourceChanged(groupElId, originalElementId, c, originalElement); + } + else { + _jsPlumb.anchorManager.updateOtherEndpoint(c.endpoints[0].elementId, groupElId, originalElementId, c); + c.target = originalElement; + c.targetId = originalElementId; + } + + // detach the proxy EP from the connection (which will cause it to be removed as we no longer need it) + c.proxies[index].ep.detachFromConnection(c, null); + + c.proxies[index].originalEp.addConnection(c); + + // cleanup + delete c.proxies[index]; + }; + + this.expandGroup = function(group, doNotFireEvent) { + + group = this.getGroup(group); + + if (group == null || !group.collapsed) { + return; + } + var groupEl = group.getEl(); + + _setVisible(group, true); + + if (group.shouldProxy()) { + // collapses all connections in a group. + var _expandSet = function (conns, index) { + for (var i = 0; i < conns.length; i++) { + var c = conns[i]; + _expandConnection(c, index, group); + } + }; + + // setup proxies for sources and targets + _expandSet(group.connections.source, 0); + _expandSet(group.connections.target, 1); + } + + group.collapsed = false; + _jsPlumb.addClass(groupEl, GROUP_EXPANDED_CLASS); + _jsPlumb.removeClass(groupEl, GROUP_COLLAPSED_CLASS); + _jsPlumb.revalidate(groupEl); + this.repaintGroup(group); + if (!doNotFireEvent) { + _jsPlumb.fire(EVT_EXPAND, { group: group}); + } + }; + + this.repaintGroup = function(group) { + group = this.getGroup(group); + var m = group.getMembers(); + for (var i = 0; i < m.length; i++) { + _jsPlumb.revalidate(m[i]); + } + }; + + // TODO refactor this with the code that responds to `connection` events. + function _updateConnectionsForGroup(group) { + var members = group.getMembers(); + var c1 = _jsPlumb.getConnections({source:members, scope:"*"}, true); + var c2 = _jsPlumb.getConnections({target:members, scope:"*"}, true); + var processed = {}; + group.connections.source.length = 0; + group.connections.target.length = 0; + var oneSet = function(c) { + for (var i = 0; i < c.length; i++) { + if (processed[c[i].id]) { + continue; + } + processed[c[i].id] = true; + if (c[i].source._jsPlumbGroup === group) { + if (c[i].target._jsPlumbGroup !== group) { + group.connections.source.push(c[i]); + } + _connectionSourceMap[c[i].id] = group; + } + else if (c[i].target._jsPlumbGroup === group) { + group.connections.target.push(c[i]); + _connectionTargetMap[c[i].id] = group; + } + } + }; + oneSet(c1); oneSet(c2); + } + + this.updateConnectionsForGroup = _updateConnectionsForGroup; + this.refreshAllGroups = function() { + for (var g in _managedGroups) { + _updateConnectionsForGroup(_managedGroups[g]); + _jsPlumb.dragManager.updateOffsets(_jsPlumb.getId(_managedGroups[g].getEl())); + } + }; + }; + + /** + * + * @param {jsPlumbInstance} _jsPlumb Associated jsPlumb instance. + * @param {Object} params + * @param {Element} params.el The DOM element representing the Group. + * @param {String} [params.id] Optional ID for the Group. A UUID will be assigned as the Group's ID if you do not provide one. + * @param {Boolean} [params.constrain=false] If true, child elements will not be able to be dragged outside of the Group container. + * @param {Boolean} [params.revert=true] By default, child elements revert to the container if dragged outside. You can change this by setting `revert:false`. This behaviour is also overridden if you set `orphan` or `prune`. + * @param {Boolean} [params.orphan=false] If true, child elements dropped outside of the Group container will be removed from the Group (but not from the DOM). + * @param {Boolean} [params.prune=false] If true, child elements dropped outside of the Group container will be removed from the Group and also from the DOM. + * @param {Boolean} [params.dropOverride=false] If true, a child element that has been dropped onto some other Group will not be subject to the controls imposed by `prune`, `revert` or `orphan`. + * @constructor + */ + var Group = function(_jsPlumb, params) { + var self = this; + var el = params.el; + this.getEl = function() { return el; }; + this.id = params.id || _ju.uuid(); + el._isJsPlumbGroup = true; + + var getDragArea = this.getDragArea = function() { + var da = _jsPlumb.getSelector(el, GROUP_CONTAINER_SELECTOR); + return da && da.length > 0 ? da[0] : el; + }; + + var ghost = params.ghost === true; + var constrain = ghost || (params.constrain === true); + var revert = params.revert !== false; + var orphan = params.orphan === true; + var prune = params.prune === true; + var dropOverride = params.dropOverride === true; + var proxied = params.proxied !== false; + var elements = []; + this.connections = { source:[], target:[], internal:[] }; + + // this function, and getEndpoint below, are stubs for a future setup in which we can choose endpoint + // and anchor based upon the connection and the index (source/target) of the endpoint to be proxied. + this.getAnchor = function(conn, endpointIndex) { + return params.anchor || "Continuous"; + }; + + this.getEndpoint = function(conn, endpointIndex) { + return params.endpoint || [ "Dot", { radius:10 }]; + }; + + this.collapsed = false; + if (params.draggable !== false) { + var opts = { + stop:function(params) { + _jsPlumb.fire(EVT_GROUP_DRAG_STOP, jsPlumb.extend(params, {group:self})); + }, + scope:GROUP_DRAG_SCOPE + }; + if (params.dragOptions) { + root.jsPlumb.extend(opts, params.dragOptions); + } + _jsPlumb.draggable(params.el, opts); + } + if (params.droppable !== false) { + _jsPlumb.droppable(params.el, { + drop:function(p) { + var el = p.drag.el; + if (el._isJsPlumbGroup) { + return; + } + var currentGroup = el._jsPlumbGroup; + if (currentGroup !== self) { + if (currentGroup != null) { + if (currentGroup.overrideDrop(el, self)) { + return; + } + } + _jsPlumb.getGroupManager().addToGroup(self, el, false); + } + + } + }); + } + var _each = function(_el, fn) { + var els = _el.nodeType == null ? _el : [ _el ]; + for (var i = 0; i < els.length; i++) { + fn(els[i]); + } + }; + + this.overrideDrop = function(_el, targetGroup) { + return dropOverride && (revert || prune || orphan); + }; + + this.add = function(_el, doNotFireEvent/*, sourceGroup*/) { + var dragArea = getDragArea(); + _each(_el, function(__el) { + + if (__el._jsPlumbGroup != null) { + if (__el._jsPlumbGroup === self) { + return; + } else { + __el._jsPlumbGroup.remove(__el, true, doNotFireEvent, false); + } + } + + __el._jsPlumbGroup = self; + elements.push(__el); + // test if draggable and add handlers if so. + if (_jsPlumb.isAlreadyDraggable(__el)) { + _bindDragHandlers(__el); + } + + if (__el.parentNode !== dragArea) { + dragArea.appendChild(__el); + } + + // if (!doNotFireEvent) { + // var p = {group: self, el: __el}; + // if (sourceGroup) { + // p.sourceGroup = sourceGroup; + // } + // //_jsPlumb.fire(EVT_CHILD_ADDED, p); + // } + }); + + _jsPlumb.getGroupManager().updateConnectionsForGroup(self); + }; + + this.remove = function(el, manipulateDOM, doNotFireEvent, doNotUpdateConnections, targetGroup) { + + _each(el, function(__el) { + delete __el._jsPlumbGroup; + _ju.removeWithFunction(elements, function(e) { + return e === __el; + }); + + if (manipulateDOM) { + try { self.getDragArea().removeChild(__el); } + catch (e) { + jsPlumbUtil.log("Could not remove element from Group " + e); + } + } + _unbindDragHandlers(__el); + if (!doNotFireEvent) { + var p = {group: self, el: __el}; + if (targetGroup) { + p.targetGroup = targetGroup; + } + _jsPlumb.fire(EVT_CHILD_REMOVED, p); + } + }); + if (!doNotUpdateConnections) { + _jsPlumb.getGroupManager().updateConnectionsForGroup(self); + } + }; + this.removeAll = function(manipulateDOM, doNotFireEvent) { + for (var i = 0, l = elements.length; i < l; i++) { + var el = elements[0]; + self.remove(el, manipulateDOM, doNotFireEvent, true); + _jsPlumb.remove(el, true); + } + elements.length = 0; + _jsPlumb.getGroupManager().updateConnectionsForGroup(self); + }; + this.orphanAll = function() { + var orphanedPositions = {}; + for (var i = 0; i < elements.length; i++) { + var newPosition = _orphan(elements[i]); + orphanedPositions[newPosition[0]] = newPosition[1]; + } + elements.length = 0; + + return orphanedPositions; + }; + this.getMembers = function() { return elements; }; + + el[GROUP] = this; + + _jsPlumb.bind(ELEMENT_DRAGGABLE_EVENT, function(dragParams) { + // if its for the current group, + if (dragParams.el._jsPlumbGroup === this) { + _bindDragHandlers(dragParams.el); + } + }.bind(this)); + + function _findParent(_el) { + return _el.offsetParent; + } + + function _isInsideParent(_el, pos) { + var p = _findParent(_el), + s = _jsPlumb.getSize(p), + ss = _jsPlumb.getSize(_el), + leftEdge = pos[0], + rightEdge = leftEdge + ss[0], + topEdge = pos[1], + bottomEdge = topEdge + ss[1]; + + return rightEdge > 0 && leftEdge < s[0] && bottomEdge > 0 && topEdge < s[1]; + } + + // + // orphaning an element means taking it out of the group and adding it to the main jsplumb container. + // we return the new calculated position from this method and the element's id. + // + function _orphan(_el) { + var id = _jsPlumb.getId(_el); + var pos = _jsPlumb.getOffset(_el); + _el.parentNode.removeChild(_el); + _jsPlumb.getContainer().appendChild(_el); + _jsPlumb.setPosition(_el, pos); + delete _el._jsPlumbGroup; + _unbindDragHandlers(_el); + _jsPlumb.dragManager.clearParent(_el, id); + return [id, pos]; + } + + // + // remove an element from the group, then either prune it from the jsplumb instance, or just orphan it. + // + function _pruneOrOrphan(p) { + var orphanedPosition = null; + if (!_isInsideParent(p.el, p.pos)) { + var group = p.el._jsPlumbGroup; + if (prune) { + _jsPlumb.remove(p.el); + } else { + orphanedPosition = _orphan(p.el); + } + + group.remove(p.el); + } + + return orphanedPosition; + } + + // + // redraws the element + // + function _revalidate(_el) { + var id = _jsPlumb.getId(_el); + _jsPlumb.revalidate(_el); + _jsPlumb.dragManager.revalidateParent(_el, id); + } + + // + // unbind the group specific drag/revert handlers. + // + function _unbindDragHandlers(_el) { + if (!_el._katavorioDrag) { + return; + } + if (prune || orphan) { + _el._katavorioDrag.off(STOP, _pruneOrOrphan); + } + if (!prune && !orphan && revert) { + _el._katavorioDrag.off(REVERT, _revalidate); + _el._katavorioDrag.setRevert(null); + } + } + + function _bindDragHandlers(_el) { + if (!_el._katavorioDrag) { + return; + } + if (prune || orphan) { + _el._katavorioDrag.on(STOP, _pruneOrOrphan); + } + + if (constrain) { + _el._katavorioDrag.setConstrain(true); + } + + if (ghost) { + _el._katavorioDrag.setUseGhostProxy(true); + } + + if (!prune && !orphan && revert) { + _el._katavorioDrag.on(REVERT, _revalidate); + _el._katavorioDrag.setRevert(function(__el, pos) { + return !_isInsideParent(__el, pos); + }); + } + } + + this.shouldProxy = function() { + return proxied; + }; + + _jsPlumb.getGroupManager().addGroup(this); + }; + + /** + * Adds a group to the jsPlumb instance. + * @method addGroup + * @param {Object} params + * @return {Group} The newly created Group. + */ + _jpi.prototype.addGroup = function(params) { + var j = this; + j._groups = j._groups || {}; + if (j._groups[params.id] != null) { + throw new TypeError("cannot create Group [" + params.id + "]; a Group with that ID exists"); + } + if (params.el[GROUP] != null) { + throw new TypeError("cannot create Group [" + params.id + "]; the given element is already a Group"); + } + var group = new Group(j, params); + j._groups[group.id] = group; + if (params.collapsed) { + this.collapseGroup(group); + } + return group; + }; + + /** + * Add an element to a group. + * @method addToGroup + * @param {String} group Group, or ID of the group, to add the element to. + * @param {Element} el Element to add to the group. + */ + _jpi.prototype.addToGroup = function(group, el, doNotFireEvent) { + + var _one = function(_el) { + var id = this.getId(_el); + this.manage(id, _el); + this.getGroupManager().addToGroup(group, _el, doNotFireEvent); + }.bind(this); + + if (Array.isArray(el)) { + for (var i = 0; i < el.length; i++) { + _one(el[i]); + } + } else { + _one(el); + } + }; + + /** + * Remove an element from a group. + * @method removeFromGroup + * @param {String} group Group, or ID of the group, to remove the element from. + * @param {Element} el Element to add to the group. + */ + _jpi.prototype.removeFromGroup = function(group, el, doNotFireEvent) { + this.getGroupManager().removeFromGroup(group, el, doNotFireEvent); + }; + + /** + * Remove a group, and optionally remove its members from the jsPlumb instance. + * @method removeGroup + * @param {String|Group} group Group to delete, or ID of Group to delete. + * @param {Boolean} [deleteMembers=false] If true, group members will be removed along with the group. Otherwise they will + * just be 'orphaned' (returned to the main container). + * @returns {Map[String, Position}} When deleteMembers is false, this method returns a map of {id->position} + */ + _jpi.prototype.removeGroup = function(group, deleteMembers, manipulateDOM, doNotFireEvent) { + return this.getGroupManager().removeGroup(group, deleteMembers, manipulateDOM, doNotFireEvent); + }; + + /** + * Remove all groups, and optionally remove their members from the jsPlumb instance. + * @method removeAllGroup + * @param {Boolean} [deleteMembers=false] If true, group members will be removed along with the groups. Otherwise they will + * just be 'orphaned' (returned to the main container). + */ + _jpi.prototype.removeAllGroups = function(deleteMembers, manipulateDOM, doNotFireEvent) { + this.getGroupManager().removeAllGroups(deleteMembers, manipulateDOM, doNotFireEvent); + }; + + /** + * Get a Group + * @method getGroup + * @param {String} groupId ID of the group to get + * @return {Group} Group with the given ID, null if not found. + */ + _jpi.prototype.getGroup = function(groupId) { + return this.getGroupManager().getGroup(groupId); + }; + + /** + * Gets all the Groups managed by the jsPlumb instance. + * @returns {Group[]} List of Groups. Empty if none. + */ + _jpi.prototype.getGroups = function() { + return this.getGroupManager().getGroups(); + }; + + /** + * Expands a group element. jsPlumb doesn't do "everything" for you here, because what it means to expand a Group + * will vary from application to application. jsPlumb does these things: + * + * - Hides any connections that are internal to the group (connections between members, and connections from member of + * the group to the group itself) + * - Proxies all connections for which the source or target is a member of the group. + * - Hides the proxied connections. + * - Adds the jtk-group-expanded class to the group's element + * - Removes the jtk-group-collapsed class from the group's element. + * + * @method expandGroup + * @param {String|Group} group Group to expand, or ID of Group to expand. + */ + _jpi.prototype.expandGroup = function(group) { + this.getGroupManager().expandGroup(group); + }; + + /** + * Collapses a group element. jsPlumb doesn't do "everything" for you here, because what it means to collapse a Group + * will vary from application to application. jsPlumb does these things: + * + * - Shows any connections that are internal to the group (connections between members, and connections from member of + * the group to the group itself) + * - Removes proxies for all connections for which the source or target is a member of the group. + * - Shows the previously proxied connections. + * - Adds the jtk-group-collapsed class to the group's element + * - Removes the jtk-group-expanded class from the group's element. + * + * @method expandGroup + * @param {String|Group} group Group to expand, or ID of Group to expand. + */ + _jpi.prototype.collapseGroup = function(groupId) { + this.getGroupManager().collapseGroup(groupId); + }; + + + _jpi.prototype.repaintGroup = function(group) { + this.getGroupManager().repaintGroup(group); + }; + + /** + * Collapses or expands a group element depending on its current state. See notes in the collapseGroup and expandGroup method. + * + * @method toggleGroup + * @param {String|Group} group Group to expand/collapse, or ID of Group to expand/collapse. + */ + _jpi.prototype.toggleGroup = function(group) { + group = this.getGroupManager().getGroup(group); + if (group != null) { + this.getGroupManager()[group.collapsed ? "expandGroup" : "collapseGroup"](group); + } + }; + + // + // lazy init a group manager for the given jsplumb instance. + // + _jpi.prototype.getGroupManager = function() { + var mgr = this[GROUP_MANAGER]; + if (mgr == null) { + mgr = this[GROUP_MANAGER] = new GroupManager(this); + } + return mgr; + }; + + _jpi.prototype.removeGroupManager = function() { + delete this[GROUP_MANAGER]; + }; + + /** + * Gets the Group that the given element belongs to, null if none. + * @method getGroupFor + * @param {String|Element} el Element, or element ID. + * @returns {Group} A Group, if found, or null. + */ + _jpi.prototype.getGroupFor = function(el) { + el = this.getElement(el); + if (el) { + return el[GROUP]; + } + }; + +}).call(typeof window !== 'undefined' ? window : this); + + +/* + * This file contains the 'flowchart' connectors, consisting of vertical and horizontal line segments. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + var STRAIGHT = "Straight"; + var ARC = "Arc"; + + var Flowchart = function (params) { + this.type = "Flowchart"; + params = params || {}; + params.stub = params.stub == null ? 30 : params.stub; + var segments, + _super = _jp.Connectors.AbstractConnector.apply(this, arguments), + midpoint = params.midpoint == null ? 0.5 : params.midpoint, + alwaysRespectStubs = params.alwaysRespectStubs === true, + lastx = null, lasty = null, lastOrientation, + cornerRadius = params.cornerRadius != null ? params.cornerRadius : 0, + + // TODO now common between this and AbstractBezierEditor; refactor into superclass? + loopbackRadius = params.loopbackRadius || 25, + isLoopbackCurrently = false, + + sgn = function (n) { + return n < 0 ? -1 : n === 0 ? 0 : 1; + }, + segmentDirections = function(segment) { + return [ + sgn( segment[2] - segment[0] ), + sgn( segment[3] - segment[1] ) + ]; + }, + /** + * helper method to add a segment. + */ + addSegment = function (segments, x, y, paintInfo) { + if (lastx === x && lasty === y) { + return; + } + var lx = lastx == null ? paintInfo.sx : lastx, + ly = lasty == null ? paintInfo.sy : lasty, + o = lx === x ? "v" : "h"; + + lastx = x; + lasty = y; + segments.push([ lx, ly, x, y, o ]); + }, + segLength = function (s) { + return Math.sqrt(Math.pow(s[0] - s[2], 2) + Math.pow(s[1] - s[3], 2)); + }, + _cloneArray = function (a) { + var _a = []; + _a.push.apply(_a, a); + return _a; + }, + writeSegments = function (conn, segments, paintInfo) { + var current = null, next, currentDirection, nextDirection; + for (var i = 0; i < segments.length - 1; i++) { + + current = current || _cloneArray(segments[i]); + next = _cloneArray(segments[i + 1]); + + currentDirection = segmentDirections(current); + nextDirection = segmentDirections(next); + + if (cornerRadius > 0 && current[4] !== next[4]) { + + var minSegLength = Math.min(segLength(current), segLength(next)); + var radiusToUse = Math.min(cornerRadius, minSegLength / 2); + + current[2] -= currentDirection[0] * radiusToUse; + current[3] -= currentDirection[1] * radiusToUse; + next[0] += nextDirection[0] * radiusToUse; + next[1] += nextDirection[1] * radiusToUse; + + var ac = (currentDirection[1] === nextDirection[0] && nextDirection[0] === 1) || + ((currentDirection[1] === nextDirection[0] && nextDirection[0] === 0) && currentDirection[0] !== nextDirection[1]) || + (currentDirection[1] === nextDirection[0] && nextDirection[0] === -1), + sgny = next[1] > current[3] ? 1 : -1, + sgnx = next[0] > current[2] ? 1 : -1, + sgnEqual = sgny === sgnx, + cx = (sgnEqual && ac || (!sgnEqual && !ac)) ? next[0] : current[2], + cy = (sgnEqual && ac || (!sgnEqual && !ac)) ? current[3] : next[1]; + + _super.addSegment(conn, STRAIGHT, { + x1: current[0], y1: current[1], x2: current[2], y2: current[3] + }); + + _super.addSegment(conn, ARC, { + r: radiusToUse, + x1: current[2], + y1: current[3], + x2: next[0], + y2: next[1], + cx: cx, + cy: cy, + ac: ac + }); + } + else { + // dx + dy are used to adjust for line width. + var dx = (current[2] === current[0]) ? 0 : (current[2] > current[0]) ? (paintInfo.lw / 2) : -(paintInfo.lw / 2), + dy = (current[3] === current[1]) ? 0 : (current[3] > current[1]) ? (paintInfo.lw / 2) : -(paintInfo.lw / 2); + + _super.addSegment(conn, STRAIGHT, { + x1: current[0] - dx, y1: current[1] - dy, x2: current[2] + dx, y2: current[3] + dy + }); + } + current = next; + } + if (next != null) { + // last segment + _super.addSegment(conn, STRAIGHT, { + x1: next[0], y1: next[1], x2: next[2], y2: next[3] + }); + } + }; + + this._compute = function (paintInfo, params) { + + segments = []; + lastx = null; + lasty = null; + lastOrientation = null; + + var commonStubCalculator = function () { + return [paintInfo.startStubX, paintInfo.startStubY, paintInfo.endStubX, paintInfo.endStubY]; + }, + stubCalculators = { + perpendicular: commonStubCalculator, + orthogonal: commonStubCalculator, + opposite: function (axis) { + var pi = paintInfo, + idx = axis === "x" ? 0 : 1, + areInProximity = { + "x": function () { + return ( (pi.so[idx] === 1 && ( + ( (pi.startStubX > pi.endStubX) && (pi.tx > pi.startStubX) ) || + ( (pi.sx > pi.endStubX) && (pi.tx > pi.sx))))) || + + ( (pi.so[idx] === -1 && ( + ( (pi.startStubX < pi.endStubX) && (pi.tx < pi.startStubX) ) || + ( (pi.sx < pi.endStubX) && (pi.tx < pi.sx))))); + }, + "y": function () { + return ( (pi.so[idx] === 1 && ( + ( (pi.startStubY > pi.endStubY) && (pi.ty > pi.startStubY) ) || + ( (pi.sy > pi.endStubY) && (pi.ty > pi.sy))))) || + + ( (pi.so[idx] === -1 && ( + ( (pi.startStubY < pi.endStubY) && (pi.ty < pi.startStubY) ) || + ( (pi.sy < pi.endStubY) && (pi.ty < pi.sy))))); + } + }; + + if (!alwaysRespectStubs && areInProximity[axis]()) { + return { + "x": [(paintInfo.sx + paintInfo.tx) / 2, paintInfo.startStubY, (paintInfo.sx + paintInfo.tx) / 2, paintInfo.endStubY], + "y": [paintInfo.startStubX, (paintInfo.sy + paintInfo.ty) / 2, paintInfo.endStubX, (paintInfo.sy + paintInfo.ty) / 2] + }[axis]; + } + else { + return [paintInfo.startStubX, paintInfo.startStubY, paintInfo.endStubX, paintInfo.endStubY]; + } + } + }; + + // calculate Stubs. + var stubs = stubCalculators[paintInfo.anchorOrientation](paintInfo.sourceAxis), + idx = paintInfo.sourceAxis === "x" ? 0 : 1, + oidx = paintInfo.sourceAxis === "x" ? 1 : 0, + ss = stubs[idx], + oss = stubs[oidx], + es = stubs[idx + 2], + oes = stubs[oidx + 2]; + + // add the start stub segment. use stubs for loopback as it will look better, with the loop spaced + // away from the element. + addSegment(segments, stubs[0], stubs[1], paintInfo); + + // if its a loopback and we should treat it differently. + // if (false && params.sourcePos[0] === params.targetPos[0] && params.sourcePos[1] === params.targetPos[1]) { + // + // // we use loopbackRadius here, as statemachine connectors do. + // // so we go radius to the left from stubs[0], then upwards by 2*radius, to the right by 2*radius, + // // down by 2*radius, left by radius. + // addSegment(segments, stubs[0] - loopbackRadius, stubs[1], paintInfo); + // addSegment(segments, stubs[0] - loopbackRadius, stubs[1] - (2 * loopbackRadius), paintInfo); + // addSegment(segments, stubs[0] + loopbackRadius, stubs[1] - (2 * loopbackRadius), paintInfo); + // addSegment(segments, stubs[0] + loopbackRadius, stubs[1], paintInfo); + // addSegment(segments, stubs[0], stubs[1], paintInfo); + // + // } + // else { + + + var midx = paintInfo.startStubX + ((paintInfo.endStubX - paintInfo.startStubX) * midpoint), + midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint); + + var orientations = {x: [0, 1], y: [1, 0]}, + lineCalculators = { + perpendicular: function (axis) { + var pi = paintInfo, + sis = { + x: [ + [[1, 2, 3, 4], null, [2, 1, 4, 3]], + null, + [[4, 3, 2, 1], null, [3, 4, 1, 2]] + ], + y: [ + [[3, 2, 1, 4], null, [2, 3, 4, 1]], + null, + [[4, 1, 2, 3], null, [1, 4, 3, 2]] + ] + }, + stubs = { + x: [[pi.startStubX, pi.endStubX], null, [pi.endStubX, pi.startStubX]], + y: [[pi.startStubY, pi.endStubY], null, [pi.endStubY, pi.startStubY]] + }, + midLines = { + x: [[midx, pi.startStubY], [midx, pi.endStubY]], + y: [[pi.startStubX, midy], [pi.endStubX, midy]] + }, + linesToEnd = { + x: [[pi.endStubX, pi.startStubY]], + y: [[pi.startStubX, pi.endStubY]] + }, + startToEnd = { + x: [[pi.startStubX, pi.endStubY], [pi.endStubX, pi.endStubY]], + y: [[pi.endStubX, pi.startStubY], [pi.endStubX, pi.endStubY]] + }, + startToMidToEnd = { + x: [[pi.startStubX, midy], [pi.endStubX, midy], [pi.endStubX, pi.endStubY]], + y: [[midx, pi.startStubY], [midx, pi.endStubY], [pi.endStubX, pi.endStubY]] + }, + otherStubs = { + x: [pi.startStubY, pi.endStubY], + y: [pi.startStubX, pi.endStubX] + }, + soIdx = orientations[axis][0], toIdx = orientations[axis][1], + _so = pi.so[soIdx] + 1, + _to = pi.to[toIdx] + 1, + otherFlipped = (pi.to[toIdx] === -1 && (otherStubs[axis][1] < otherStubs[axis][0])) || (pi.to[toIdx] === 1 && (otherStubs[axis][1] > otherStubs[axis][0])), + stub1 = stubs[axis][_so][0], + stub2 = stubs[axis][_so][1], + segmentIndexes = sis[axis][_so][_to]; + + if (pi.segment === segmentIndexes[3] || (pi.segment === segmentIndexes[2] && otherFlipped)) { + return midLines[axis]; + } + else if (pi.segment === segmentIndexes[2] && stub2 < stub1) { + return linesToEnd[axis]; + } + else if ((pi.segment === segmentIndexes[2] && stub2 >= stub1) || (pi.segment === segmentIndexes[1] && !otherFlipped)) { + return startToMidToEnd[axis]; + } + else if (pi.segment === segmentIndexes[0] || (pi.segment === segmentIndexes[1] && otherFlipped)) { + return startToEnd[axis]; + } + }, + orthogonal: function (axis, startStub, otherStartStub, endStub, otherEndStub) { + var pi = paintInfo, + extent = { + "x": pi.so[0] === -1 ? Math.min(startStub, endStub) : Math.max(startStub, endStub), + "y": pi.so[1] === -1 ? Math.min(startStub, endStub) : Math.max(startStub, endStub) + }[axis]; + + return { + "x": [ + [extent, otherStartStub], + [extent, otherEndStub], + [endStub, otherEndStub] + ], + "y": [ + [otherStartStub, extent], + [otherEndStub, extent], + [otherEndStub, endStub] + ] + }[axis]; + }, + opposite: function (axis, ss, oss, es) { + var pi = paintInfo, + otherAxis = {"x": "y", "y": "x"}[axis], + dim = {"x": "height", "y": "width"}[axis], + comparator = pi["is" + axis.toUpperCase() + "GreaterThanStubTimes2"]; + + if (params.sourceEndpoint.elementId === params.targetEndpoint.elementId) { + var _val = oss + ((1 - params.sourceEndpoint.anchor[otherAxis]) * params.sourceInfo[dim]) + _super.maxStub; + return { + "x": [ + [ss, _val], + [es, _val] + ], + "y": [ + [_val, ss], + [_val, es] + ] + }[axis]; + + } + else if (!comparator || (pi.so[idx] === 1 && ss > es) || (pi.so[idx] === -1 && ss < es)) { + return { + "x": [ + [ss, midy], + [es, midy] + ], + "y": [ + [midx, ss], + [midx, es] + ] + }[axis]; + } + else if ((pi.so[idx] === 1 && ss < es) || (pi.so[idx] === -1 && ss > es)) { + return { + "x": [ + [midx, pi.sy], + [midx, pi.ty] + ], + "y": [ + [pi.sx, midy], + [pi.tx, midy] + ] + }[axis]; + } + } + }; + + // compute the rest of the line + var p = lineCalculators[paintInfo.anchorOrientation](paintInfo.sourceAxis, ss, oss, es, oes); + if (p) { + for (var i = 0; i < p.length; i++) { + addSegment(segments, p[i][0], p[i][1], paintInfo); + } + } + + // line to end stub + addSegment(segments, stubs[2], stubs[3], paintInfo); + + //} + + // end stub to end (common) + addSegment(segments, paintInfo.tx, paintInfo.ty, paintInfo); + + + + // write out the segments. + writeSegments(this, segments, paintInfo); + + }; + }; + + _jp.Connectors.Flowchart = Flowchart; + _ju.extend(_jp.Connectors.Flowchart, _jp.Connectors.AbstractConnector); + +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains the code for the Bezier connector type. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + + _jp.Connectors.AbstractBezierConnector = function(params) { + params = params || {}; + var showLoopback = params.showLoopback !== false, + curviness = params.curviness || 10, + margin = params.margin || 5, + proximityLimit = params.proximityLimit || 80, + clockwise = params.orientation && params.orientation === "clockwise", + loopbackRadius = params.loopbackRadius || 25, + isLoopbackCurrently = false, + _super; + + this._compute = function (paintInfo, p) { + + var sp = p.sourcePos, + tp = p.targetPos, + _w = Math.abs(sp[0] - tp[0]), + _h = Math.abs(sp[1] - tp[1]); + + if (!showLoopback || (p.sourceEndpoint.elementId !== p.targetEndpoint.elementId)) { + isLoopbackCurrently = false; + this._computeBezier(paintInfo, p, sp, tp, _w, _h); + } else { + isLoopbackCurrently = true; + // a loopback connector. draw an arc from one anchor to the other. + var x1 = p.sourcePos[0], y1 = p.sourcePos[1] - margin, + cx = x1, cy = y1 - loopbackRadius, + // canvas sizing stuff, to ensure the whole painted area is visible. + _x = cx - loopbackRadius, + _y = cy - loopbackRadius; + + _w = 2 * loopbackRadius; + _h = 2 * loopbackRadius; + + paintInfo.points[0] = _x; + paintInfo.points[1] = _y; + paintInfo.points[2] = _w; + paintInfo.points[3] = _h; + + // ADD AN ARC SEGMENT. + _super.addSegment(this, "Arc", { + loopback: true, + x1: (x1 - _x) + 4, + y1: y1 - _y, + startAngle: 0, + endAngle: 2 * Math.PI, + r: loopbackRadius, + ac: !clockwise, + x2: (x1 - _x) - 4, + y2: y1 - _y, + cx: cx - _x, + cy: cy - _y + }); + } + }; + + _super = _jp.Connectors.AbstractConnector.apply(this, arguments); + return _super; + }; + _ju.extend(_jp.Connectors.AbstractBezierConnector, _jp.Connectors.AbstractConnector); + + var Bezier = function (params) { + params = params || {}; + this.type = "Bezier"; + + var _super = _jp.Connectors.AbstractBezierConnector.apply(this, arguments), + majorAnchor = params.curviness || 150, + minorAnchor = 10; + + this.getCurviness = function () { + return majorAnchor; + }; + + this._findControlPoint = function (point, sourceAnchorPosition, targetAnchorPosition, sourceEndpoint, targetEndpoint, soo, too) { + // determine if the two anchors are perpendicular to each other in their orientation. we swap the control + // points around if so (code could be tightened up) + var perpendicular = soo[0] !== too[0] || soo[1] === too[1], + p = []; + + if (!perpendicular) { + if (soo[0] === 0) { + p.push(sourceAnchorPosition[0] < targetAnchorPosition[0] ? point[0] + minorAnchor : point[0] - minorAnchor); + } + else { + p.push(point[0] - (majorAnchor * soo[0])); + } + + if (soo[1] === 0) { + p.push(sourceAnchorPosition[1] < targetAnchorPosition[1] ? point[1] + minorAnchor : point[1] - minorAnchor); + } + else { + p.push(point[1] + (majorAnchor * too[1])); + } + } + else { + if (too[0] === 0) { + p.push(targetAnchorPosition[0] < sourceAnchorPosition[0] ? point[0] + minorAnchor : point[0] - minorAnchor); + } + else { + p.push(point[0] + (majorAnchor * too[0])); + } + + if (too[1] === 0) { + p.push(targetAnchorPosition[1] < sourceAnchorPosition[1] ? point[1] + minorAnchor : point[1] - minorAnchor); + } + else { + p.push(point[1] + (majorAnchor * soo[1])); + } + } + + return p; + }; + + this._computeBezier = function (paintInfo, p, sp, tp, _w, _h) { + + var _CP, _CP2, + _sx = sp[0] < tp[0] ? _w : 0, + _sy = sp[1] < tp[1] ? _h : 0, + _tx = sp[0] < tp[0] ? 0 : _w, + _ty = sp[1] < tp[1] ? 0 : _h; + + _CP = this._findControlPoint([_sx, _sy], sp, tp, p.sourceEndpoint, p.targetEndpoint, paintInfo.so, paintInfo.to); + _CP2 = this._findControlPoint([_tx, _ty], tp, sp, p.targetEndpoint, p.sourceEndpoint, paintInfo.to, paintInfo.so); + + + _super.addSegment(this, "Bezier", { + x1: _sx, y1: _sy, x2: _tx, y2: _ty, + cp1x: _CP[0], cp1y: _CP[1], cp2x: _CP2[0], cp2y: _CP2[1] + }); + }; + + + }; + + _jp.Connectors.Bezier = Bezier; + _ju.extend(Bezier, _jp.Connectors.AbstractBezierConnector); + +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains the state machine connectors, which extend AbstractBezierConnector. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + + var _segment = function (x1, y1, x2, y2) { + if (x1 <= x2 && y2 <= y1) { + return 1; + } + else if (x1 <= x2 && y1 <= y2) { + return 2; + } + else if (x2 <= x1 && y2 >= y1) { + return 3; + } + return 4; + }, + + // the control point we will use depends on the faces to which each end of the connection is assigned, specifically whether or not the + // two faces are parallel or perpendicular. if they are parallel then the control point lies on the midpoint of the axis in which they + // are parellel and varies only in the other axis; this variation is proportional to the distance that the anchor points lie from the + // center of that face. if the two faces are perpendicular then the control point is at some distance from both the midpoints; the amount and + // direction are dependent on the orientation of the two elements. 'seg', passed in to this method, tells you which segment the target element + // lies in with respect to the source: 1 is top right, 2 is bottom right, 3 is bottom left, 4 is top left. + // + // sourcePos and targetPos are arrays of info about where on the source and target each anchor is located. their contents are: + // + // 0 - absolute x + // 1 - absolute y + // 2 - proportional x in element (0 is left edge, 1 is right edge) + // 3 - proportional y in element (0 is top edge, 1 is bottom edge) + // + _findControlPoint = function (midx, midy, segment, sourceEdge, targetEdge, dx, dy, distance, proximityLimit) { + // TODO (maybe) + // - if anchor pos is 0.5, make the control point take into account the relative position of the elements. + if (distance <= proximityLimit) { + return [midx, midy]; + } + + if (segment === 1) { + if (sourceEdge[3] <= 0 && targetEdge[3] >= 1) { + return [ midx + (sourceEdge[2] < 0.5 ? -1 * dx : dx), midy ]; + } + else if (sourceEdge[2] >= 1 && targetEdge[2] <= 0) { + return [ midx, midy + (sourceEdge[3] < 0.5 ? -1 * dy : dy) ]; + } + else { + return [ midx + (-1 * dx) , midy + (-1 * dy) ]; + } + } + else if (segment === 2) { + if (sourceEdge[3] >= 1 && targetEdge[3] <= 0) { + return [ midx + (sourceEdge[2] < 0.5 ? -1 * dx : dx), midy ]; + } + else if (sourceEdge[2] >= 1 && targetEdge[2] <= 0) { + return [ midx, midy + (sourceEdge[3] < 0.5 ? -1 * dy : dy) ]; + } + else { + return [ midx + dx, midy + (-1 * dy) ]; + } + } + else if (segment === 3) { + if (sourceEdge[3] >= 1 && targetEdge[3] <= 0) { + return [ midx + (sourceEdge[2] < 0.5 ? -1 * dx : dx), midy ]; + } + else if (sourceEdge[2] <= 0 && targetEdge[2] >= 1) { + return [ midx, midy + (sourceEdge[3] < 0.5 ? -1 * dy : dy) ]; + } + else { + return [ midx + (-1 * dx) , midy + (-1 * dy) ]; + } + } + else if (segment === 4) { + if (sourceEdge[3] <= 0 && targetEdge[3] >= 1) { + return [ midx + (sourceEdge[2] < 0.5 ? -1 * dx : dx), midy ]; + } + else if (sourceEdge[2] <= 0 && targetEdge[2] >= 1) { + return [ midx, midy + (sourceEdge[3] < 0.5 ? -1 * dy : dy) ]; + } + else { + return [ midx + dx , midy + (-1 * dy) ]; + } + } + + }; + + var StateMachine = function (params) { + params = params || {}; + this.type = "StateMachine"; + + var _super = _jp.Connectors.AbstractBezierConnector.apply(this, arguments), + curviness = params.curviness || 10, + margin = params.margin || 5, + proximityLimit = params.proximityLimit || 80, + clockwise = params.orientation && params.orientation === "clockwise", + _controlPoint; + + this._computeBezier = function(paintInfo, params, sp, tp, w, h) { + var _sx = params.sourcePos[0] < params.targetPos[0] ? 0 : w, + _sy = params.sourcePos[1] < params.targetPos[1] ? 0 : h, + _tx = params.sourcePos[0] < params.targetPos[0] ? w : 0, + _ty = params.sourcePos[1] < params.targetPos[1] ? h : 0; + + // now adjust for the margin + if (params.sourcePos[2] === 0) { + _sx -= margin; + } + if (params.sourcePos[2] === 1) { + _sx += margin; + } + if (params.sourcePos[3] === 0) { + _sy -= margin; + } + if (params.sourcePos[3] === 1) { + _sy += margin; + } + if (params.targetPos[2] === 0) { + _tx -= margin; + } + if (params.targetPos[2] === 1) { + _tx += margin; + } + if (params.targetPos[3] === 0) { + _ty -= margin; + } + if (params.targetPos[3] === 1) { + _ty += margin; + } + + // + // these connectors are quadratic bezier curves, having a single control point. if both anchors + // are located at 0.5 on their respective faces, the control point is set to the midpoint and you + // get a straight line. this is also the case if the two anchors are within 'proximityLimit', since + // it seems to make good aesthetic sense to do that. outside of that, the control point is positioned + // at 'curviness' pixels away along the normal to the straight line connecting the two anchors. + // + // there may be two improvements to this. firstly, we might actually support the notion of avoiding nodes + // in the UI, or at least making a good effort at doing so. if a connection would pass underneath some node, + // for example, we might increase the distance the control point is away from the midpoint in a bid to + // steer it around that node. this will work within limits, but i think those limits would also be the likely + // limits for, once again, aesthetic good sense in the layout of a chart using these connectors. + // + // the second possible change is actually two possible changes: firstly, it is possible we should gradually + // decrease the 'curviness' as the distance between the anchors decreases; start tailing it off to 0 at some + // point (which should be configurable). secondly, we might slightly increase the 'curviness' for connectors + // with respect to how far their anchor is from the center of its respective face. this could either look cool, + // or stupid, and may indeed work only in a way that is so subtle as to have been a waste of time. + // + + var _midx = (_sx + _tx) / 2, + _midy = (_sy + _ty) / 2, + segment = _segment(_sx, _sy, _tx, _ty), + distance = Math.sqrt(Math.pow(_tx - _sx, 2) + Math.pow(_ty - _sy, 2)), + cp1x, cp2x, cp1y, cp2y; + + + // calculate the control point. this code will be where we'll put in a rudimentary element avoidance scheme; it + // will work by extending the control point to force the curve to be, um, curvier. + _controlPoint = _findControlPoint(_midx, + _midy, + segment, + params.sourcePos, + params.targetPos, + curviness, curviness, + distance, + proximityLimit); + + cp1x = _controlPoint[0]; + cp2x = _controlPoint[0]; + cp1y = _controlPoint[1]; + cp2y = _controlPoint[1]; + + _super.addSegment(this, "Bezier", { + x1: _tx, y1: _ty, x2: _sx, y2: _sy, + cp1x: cp1x, cp1y: cp1y, + cp2x: cp2x, cp2y: cp2y + }); + }; + }; + + _jp.Connectors.StateMachine = StateMachine; + _ju.extend(StateMachine, _jp.Connectors.AbstractBezierConnector); + +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains the 'flowchart' connectors, consisting of vertical and horizontal line segments. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + var STRAIGHT = "Straight"; + + var Straight = function (params) { + this.type = STRAIGHT; + var _super = _jp.Connectors.AbstractConnector.apply(this, arguments); + + this._compute = function (paintInfo, _) { + _super.addSegment(this, STRAIGHT, {x1: paintInfo.sx, y1: paintInfo.sy, x2: paintInfo.startStubX, y2: paintInfo.startStubY}); + _super.addSegment(this, STRAIGHT, {x1: paintInfo.startStubX, y1: paintInfo.startStubY, x2: paintInfo.endStubX, y2: paintInfo.endStubY}); + _super.addSegment(this, STRAIGHT, {x1: paintInfo.endStubX, y1: paintInfo.endStubY, x2: paintInfo.tx, y2: paintInfo.ty}); + }; + }; + + _jp.Connectors.Straight = Straight; + _ju.extend(Straight, _jp.Connectors.AbstractConnector); + +}).call(typeof window !== 'undefined' ? window : this); +/* + * This file contains the SVG renderers. + * + * Copyright (c) 2010 - 2018 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + +// ************************** SVG utility methods ******************************************** + + "use strict"; + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil; + + var svgAttributeMap = { + "stroke-linejoin": "stroke-linejoin", + "stroke-dashoffset": "stroke-dashoffset", + "stroke-linecap": "stroke-linecap" + }, + STROKE_DASHARRAY = "stroke-dasharray", + DASHSTYLE = "dashstyle", + LINEAR_GRADIENT = "linearGradient", + RADIAL_GRADIENT = "radialGradient", + DEFS = "defs", + FILL = "fill", + STOP = "stop", + STROKE = "stroke", + STROKE_WIDTH = "stroke-width", + STYLE = "style", + NONE = "none", + JSPLUMB_GRADIENT = "jsplumb_gradient_", + LINE_WIDTH = "strokeWidth", + ns = { + svg: "http://www.w3.org/2000/svg" + }, + _attr = function (node, attributes) { + for (var i in attributes) { + node.setAttribute(i, "" + attributes[i]); + } + }, + _node = function (name, attributes) { + attributes = attributes || {}; + attributes.version = "1.1"; + attributes.xmlns = ns.svg; + return _jp.createElementNS(ns.svg, name, null, null, attributes); + }, + _pos = function (d) { + return "position:absolute;left:" + d[0] + "px;top:" + d[1] + "px"; + }, + _clearGradient = function (parent) { + var els = parent.querySelectorAll(" defs,linearGradient,radialGradient"); + for (var i = 0; i < els.length; i++) { + els[i].parentNode.removeChild(els[i]); + } + }, + _updateGradient = function (parent, node, style, dimensions, uiComponent) { + var id = JSPLUMB_GRADIENT + uiComponent._jsPlumb.instance.idstamp(); + // first clear out any existing gradient + _clearGradient(parent); + // this checks for an 'offset' property in the gradient, and in the absence of it, assumes + // we want a linear gradient. if it's there, we create a radial gradient. + // it is possible that a more explicit means of defining the gradient type would be + // better. relying on 'offset' means that we can never have a radial gradient that uses + // some default offset, for instance. + // issue 244 suggested the 'gradientUnits' attribute; without this, straight/flowchart connectors with gradients would + // not show gradients when the line was perfectly horizontal or vertical. + var g; + if (!style.gradient.offset) { + g = _node(LINEAR_GRADIENT, {id: id, gradientUnits: "userSpaceOnUse"}); + } + else { + g = _node(RADIAL_GRADIENT, { id: id }); + } + + var defs = _node(DEFS); + parent.appendChild(defs); + defs.appendChild(g); + + // the svg radial gradient seems to treat stops in the reverse + // order to how canvas does it. so we want to keep all the maths the same, but + // iterate the actual style declarations in reverse order, if the x indexes are not in order. + for (var i = 0; i < style.gradient.stops.length; i++) { + var styleToUse = uiComponent.segment === 1 || uiComponent.segment === 2 ? i : style.gradient.stops.length - 1 - i, + stopColor = style.gradient.stops[styleToUse][1], + s = _node(STOP, {"offset": Math.floor(style.gradient.stops[i][0] * 100) + "%", "stop-color": stopColor}); + + g.appendChild(s); + } + var applyGradientTo = style.stroke ? STROKE : FILL; + node.setAttribute(applyGradientTo, "url(#" + id + ")"); + }, + _applyStyles = function (parent, node, style, dimensions, uiComponent) { + + node.setAttribute(FILL, style.fill ? style.fill : NONE); + node.setAttribute(STROKE, style.stroke ? style.stroke : NONE); + + if (style.gradient) { + _updateGradient(parent, node, style, dimensions, uiComponent); + } + else { + // make sure we clear any existing gradient + _clearGradient(parent); + node.setAttribute(STYLE, ""); + } + + if (style.strokeWidth) { + node.setAttribute(STROKE_WIDTH, style.strokeWidth); + } + + // in SVG there is a stroke-dasharray attribute we can set, and its syntax looks like + // the syntax in VML but is actually kind of nasty: values are given in the pixel + // coordinate space, whereas in VML they are multiples of the width of the stroked + // line, which makes a lot more sense. for that reason, jsPlumb is supporting both + // the native svg 'stroke-dasharray' attribute, and also the 'dashstyle' concept from + // VML, which will be the preferred method. the code below this converts a dashstyle + // attribute given in terms of stroke width into a pixel representation, by using the + // stroke's lineWidth. + if (style[DASHSTYLE] && style[LINE_WIDTH] && !style[STROKE_DASHARRAY]) { + var sep = style[DASHSTYLE].indexOf(",") === -1 ? " " : ",", + parts = style[DASHSTYLE].split(sep), + styleToUse = ""; + parts.forEach(function (p) { + styleToUse += (Math.floor(p * style.strokeWidth) + sep); + }); + node.setAttribute(STROKE_DASHARRAY, styleToUse); + } + else if (style[STROKE_DASHARRAY]) { + node.setAttribute(STROKE_DASHARRAY, style[STROKE_DASHARRAY]); + } + + // extra attributes such as join type, dash offset. + for (var i in svgAttributeMap) { + if (style[i]) { + node.setAttribute(svgAttributeMap[i], style[i]); + } + } + }, + _appendAtIndex = function (svg, path, idx) { + if (svg.childNodes.length > idx) { + svg.insertBefore(path, svg.childNodes[idx]); + } + else { + svg.appendChild(path); + } + }; + + /** + utility methods for other objects to use. + */ + _ju.svg = { + node: _node, + attr: _attr, + pos: _pos + }; + + // ************************** / SVG utility methods ******************************************** + + /* + * Base class for SVG components. + */ + var SvgComponent = function (params) { + var pointerEventsSpec = params.pointerEventsSpec || "all", renderer = {}; + + _jp.jsPlumbUIComponent.apply(this, params.originalArgs); + this.canvas = null; + this.path = null; + this.svg = null; + this.bgCanvas = null; + + var clazz = params.cssClass + " " + (params.originalArgs[0].cssClass || ""), + svgParams = { + "style": "", + "width": 0, + "height": 0, + "pointer-events": pointerEventsSpec, + "position": "absolute" + }; + + this.svg = _node("svg", svgParams); + + if (params.useDivWrapper) { + this.canvas = _jp.createElement("div", { position : "absolute" }); + _ju.sizeElement(this.canvas, 0, 0, 1, 1); + this.canvas.className = clazz; + } + else { + _attr(this.svg, { "class": clazz }); + this.canvas = this.svg; + } + + params._jsPlumb.appendElement(this.canvas, params.originalArgs[0].parent); + if (params.useDivWrapper) { + this.canvas.appendChild(this.svg); + } + + var displayElements = [ this.canvas ]; + this.getDisplayElements = function () { + return displayElements; + }; + + this.appendDisplayElement = function (el) { + displayElements.push(el); + }; + + this.paint = function (style, anchor, extents) { + if (style != null) { + + var xy = [ this.x, this.y ], wh = [ this.w, this.h ], p; + if (extents != null) { + if (extents.xmin < 0) { + xy[0] += extents.xmin; + } + if (extents.ymin < 0) { + xy[1] += extents.ymin; + } + wh[0] = extents.xmax + ((extents.xmin < 0) ? -extents.xmin : 0); + wh[1] = extents.ymax + ((extents.ymin < 0) ? -extents.ymin : 0); + } + + if (params.useDivWrapper) { + _ju.sizeElement(this.canvas, xy[0], xy[1], wh[0], wh[1]); + xy[0] = 0; + xy[1] = 0; + p = _pos([ 0, 0 ]); + } + else { + p = _pos([ xy[0], xy[1] ]); + } + + renderer.paint.apply(this, arguments); + + _attr(this.svg, { + "style": p, + "width": wh[0] || 0, + "height": wh[1] || 0 + }); + } + }; + + return { + renderer: renderer + }; + }; + + _ju.extend(SvgComponent, _jp.jsPlumbUIComponent, { + cleanup: function (force) { + if (force || this.typeId == null) { + if (this.canvas) { + this.canvas._jsPlumb = null; + } + if (this.svg) { + this.svg._jsPlumb = null; + } + if (this.bgCanvas) { + this.bgCanvas._jsPlumb = null; + } + + if (this.canvas && this.canvas.parentNode) { + this.canvas.parentNode.removeChild(this.canvas); + } + if (this.bgCanvas && this.bgCanvas.parentNode) { + this.canvas.parentNode.removeChild(this.canvas); + } + + this.svg = null; + this.canvas = null; + this.path = null; + this.group = null; + } + else { + // if not a forced cleanup, just detach from DOM for now. + if (this.canvas && this.canvas.parentNode) { + this.canvas.parentNode.removeChild(this.canvas); + } + if (this.bgCanvas && this.bgCanvas.parentNode) { + this.bgCanvas.parentNode.removeChild(this.bgCanvas); + } + } + }, + reattach:function(instance) { + var c = instance.getContainer(); + if (this.canvas && this.canvas.parentNode == null) { + c.appendChild(this.canvas); + } + if (this.bgCanvas && this.bgCanvas.parentNode == null) { + c.appendChild(this.bgCanvas); + } + }, + setVisible: function (v) { + if (this.canvas) { + this.canvas.style.display = v ? "block" : "none"; + } + } + }); + + /* + * Base class for SVG connectors. + */ + _jp.ConnectorRenderers.svg = function (params) { + var self = this, + _super = SvgComponent.apply(this, [ + { + cssClass: params._jsPlumb.connectorClass, + originalArgs: arguments, + pointerEventsSpec: "none", + _jsPlumb: params._jsPlumb + } + ]); + + _super.renderer.paint = function (style, anchor, extents) { + + var segments = self.getSegments(), p = "", offset = [0, 0]; + if (extents.xmin < 0) { + offset[0] = -extents.xmin; + } + if (extents.ymin < 0) { + offset[1] = -extents.ymin; + } + + if (segments.length > 0) { + + p = self.getPathData(); + + var a = { + d: p, + transform: "translate(" + offset[0] + "," + offset[1] + ")", + "pointer-events": params["pointer-events"] || "visibleStroke" + }, + outlineStyle = null, + d = [self.x, self.y, self.w, self.h]; + + // outline style. actually means drawing an svg object underneath the main one. + if (style.outlineStroke) { + var outlineWidth = style.outlineWidth || 1, + outlineStrokeWidth = style.strokeWidth + (2 * outlineWidth); + outlineStyle = _jp.extend({}, style); + delete outlineStyle.gradient; + outlineStyle.stroke = style.outlineStroke; + outlineStyle.strokeWidth = outlineStrokeWidth; + + if (self.bgPath == null) { + self.bgPath = _node("path", a); + _jp.addClass(self.bgPath, _jp.connectorOutlineClass); + _appendAtIndex(self.svg, self.bgPath, 0); + } + else { + _attr(self.bgPath, a); + } + + _applyStyles(self.svg, self.bgPath, outlineStyle, d, self); + } + + if (self.path == null) { + self.path = _node("path", a); + _appendAtIndex(self.svg, self.path, style.outlineStroke ? 1 : 0); + } + else { + _attr(self.path, a); + } + + _applyStyles(self.svg, self.path, style, d, self); + } + }; + }; + _ju.extend(_jp.ConnectorRenderers.svg, SvgComponent); + +// ******************************* svg segment renderer ***************************************************** + + +// ******************************* /svg segments ***************************************************** + + /* + * Base class for SVG endpoints. + */ + var SvgEndpoint = _jp.SvgEndpoint = function (params) { + var _super = SvgComponent.apply(this, [ + { + cssClass: params._jsPlumb.endpointClass, + originalArgs: arguments, + pointerEventsSpec: "all", + useDivWrapper: true, + _jsPlumb: params._jsPlumb + } + ]); + + _super.renderer.paint = function (style) { + var s = _jp.extend({}, style); + if (s.outlineStroke) { + s.stroke = s.outlineStroke; + } + + if (this.node == null) { + this.node = this.makeNode(s); + this.svg.appendChild(this.node); + } + else if (this.updateNode != null) { + this.updateNode(this.node); + } + _applyStyles(this.svg, this.node, s, [ this.x, this.y, this.w, this.h ], this); + _pos(this.node, [ this.x, this.y ]); + }.bind(this); + + }; + _ju.extend(SvgEndpoint, SvgComponent); + + /* + * SVG Dot Endpoint + */ + _jp.Endpoints.svg.Dot = function () { + _jp.Endpoints.Dot.apply(this, arguments); + SvgEndpoint.apply(this, arguments); + this.makeNode = function (style) { + return _node("circle", { + "cx": this.w / 2, + "cy": this.h / 2, + "r": this.radius + }); + }; + this.updateNode = function (node) { + _attr(node, { + "cx": this.w / 2, + "cy": this.h / 2, + "r": this.radius + }); + }; + }; + _ju.extend(_jp.Endpoints.svg.Dot, [_jp.Endpoints.Dot, SvgEndpoint]); + + /* + * SVG Rectangle Endpoint + */ + _jp.Endpoints.svg.Rectangle = function () { + _jp.Endpoints.Rectangle.apply(this, arguments); + SvgEndpoint.apply(this, arguments); + this.makeNode = function (style) { + return _node("rect", { + "width": this.w, + "height": this.h + }); + }; + this.updateNode = function (node) { + _attr(node, { + "width": this.w, + "height": this.h + }); + }; + }; + _ju.extend(_jp.Endpoints.svg.Rectangle, [_jp.Endpoints.Rectangle, SvgEndpoint]); + + /* + * SVG Image Endpoint is the default image endpoint. + */ + _jp.Endpoints.svg.Image = _jp.Endpoints.Image; + /* + * Blank endpoint in svg renderer is the default Blank endpoint. + */ + _jp.Endpoints.svg.Blank = _jp.Endpoints.Blank; + /* + * Label overlay in svg renderer is the default Label overlay. + */ + _jp.Overlays.svg.Label = _jp.Overlays.Label; + /* + * Custom overlay in svg renderer is the default Custom overlay. + */ + _jp.Overlays.svg.Custom = _jp.Overlays.Custom; + + var AbstractSvgArrowOverlay = function (superclass, originalArgs) { + superclass.apply(this, originalArgs); + _jp.jsPlumbUIComponent.apply(this, originalArgs); + this.isAppendedAtTopLevel = false; + var self = this; + this.path = null; + this.paint = function (params, containerExtents) { + // only draws on connections, not endpoints. + if (params.component.svg && containerExtents) { + if (this.path == null) { + this.path = _node("path", { + "pointer-events": "all" + }); + params.component.svg.appendChild(this.path); + if (this.elementCreated) { + this.elementCreated(this.path, params.component); + } + + this.canvas = params.component.svg; // for the sake of completeness; this behaves the same as other overlays + } + var clazz = originalArgs && (originalArgs.length === 1) ? (originalArgs[0].cssClass || "") : "", + offset = [0, 0]; + + if (containerExtents.xmin < 0) { + offset[0] = -containerExtents.xmin; + } + if (containerExtents.ymin < 0) { + offset[1] = -containerExtents.ymin; + } + + _attr(this.path, { + "d": makePath(params.d), + "class": clazz, + stroke: params.stroke ? params.stroke : null, + fill: params.fill ? params.fill : null, + transform: "translate(" + offset[0] + "," + offset[1] + ")" + }); + } + }; + var makePath = function (d) { + return (isNaN(d.cxy.x) || isNaN(d.cxy.y)) ? "" : "M" + d.hxy.x + "," + d.hxy.y + + " L" + d.tail[0].x + "," + d.tail[0].y + + " L" + d.cxy.x + "," + d.cxy.y + + " L" + d.tail[1].x + "," + d.tail[1].y + + " L" + d.hxy.x + "," + d.hxy.y; + }; + this.transfer = function(target) { + if (target.canvas && this.path && this.path.parentNode) { + this.path.parentNode.removeChild(this.path); + target.canvas.appendChild(this.path); + } + }; + }; + _ju.extend(AbstractSvgArrowOverlay, [_jp.jsPlumbUIComponent, _jp.Overlays.AbstractOverlay], { + cleanup: function (force) { + if (this.path != null) { + if (force) { + this._jsPlumb.instance.removeElement(this.path); + } + else { + if (this.path.parentNode) { + this.path.parentNode.removeChild(this.path); + } + } + } + }, + reattach:function(instance, component) { + if (this.path && component.canvas) { + component.canvas.appendChild(this.path); + } + }, + setVisible: function (v) { + if (this.path != null) { + (this.path.style.display = (v ? "block" : "none")); + } + } + }); + + _jp.Overlays.svg.Arrow = function () { + AbstractSvgArrowOverlay.apply(this, [_jp.Overlays.Arrow, arguments]); + }; + _ju.extend(_jp.Overlays.svg.Arrow, [ _jp.Overlays.Arrow, AbstractSvgArrowOverlay ]); + + _jp.Overlays.svg.PlainArrow = function () { + AbstractSvgArrowOverlay.apply(this, [_jp.Overlays.PlainArrow, arguments]); + }; + _ju.extend(_jp.Overlays.svg.PlainArrow, [ _jp.Overlays.PlainArrow, AbstractSvgArrowOverlay ]); + + _jp.Overlays.svg.Diamond = function () { + AbstractSvgArrowOverlay.apply(this, [_jp.Overlays.Diamond, arguments]); + }; + _ju.extend(_jp.Overlays.svg.Diamond, [ _jp.Overlays.Diamond, AbstractSvgArrowOverlay ]); + + // a test + _jp.Overlays.svg.GuideLines = function () { + var path = null, self = this, p1_1, p1_2; + _jp.Overlays.GuideLines.apply(this, arguments); + this.paint = function (params, containerExtents) { + if (path == null) { + path = _node("path"); + params.connector.svg.appendChild(path); + self.attachListeners(path, params.connector); + self.attachListeners(path, self); + + p1_1 = _node("path"); + params.connector.svg.appendChild(p1_1); + self.attachListeners(p1_1, params.connector); + self.attachListeners(p1_1, self); + + p1_2 = _node("path"); + params.connector.svg.appendChild(p1_2); + self.attachListeners(p1_2, params.connector); + self.attachListeners(p1_2, self); + } + + var offset = [0, 0]; + if (containerExtents.xmin < 0) { + offset[0] = -containerExtents.xmin; + } + if (containerExtents.ymin < 0) { + offset[1] = -containerExtents.ymin; + } + + _attr(path, { + "d": makePath(params.head, params.tail), + stroke: "red", + fill: null, + transform: "translate(" + offset[0] + "," + offset[1] + ")" + }); + + _attr(p1_1, { + "d": makePath(params.tailLine[0], params.tailLine[1]), + stroke: "blue", + fill: null, + transform: "translate(" + offset[0] + "," + offset[1] + ")" + }); + + _attr(p1_2, { + "d": makePath(params.headLine[0], params.headLine[1]), + stroke: "green", + fill: null, + transform: "translate(" + offset[0] + "," + offset[1] + ")" + }); + }; + + var makePath = function (d1, d2) { + return "M " + d1.x + "," + d1.y + + " L" + d2.x + "," + d2.y; + }; + }; + _ju.extend(_jp.Overlays.svg.GuideLines, _jp.Overlays.GuideLines); +}).call(typeof window !== 'undefined' ? window : this); + +/* + * This file contains code used when jsPlumb is being rendered in a DOM. + * + * Copyright (c) 2010 - 2019 jsPlumb (hello@jsplumbtoolkit.com) + * + * https://jsplumbtoolkit.com + * https://github.com/jsplumb/jsplumb + * + * Dual licensed under the MIT and GPL2 licenses. + */ +; +(function () { + + "use strict"; + + var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil, + _jk = root.Katavorio, _jg = root.Biltong; + + var _getEventManager = function(instance) { + var e = instance._mottle; + if (!e) { + e = instance._mottle = new root.Mottle(); + } + return e; + }; + + var _getDragManager = function (instance, category) { + + category = category || "main"; + var key = "_katavorio_" + category; + var k = instance[key], + e = instance.getEventManager(); + + if (!k) { + k = new _jk({ + bind: e.on, + unbind: e.off, + getSize: _jp.getSize, + getConstrainingRectangle:function(el) { + return [ el.parentNode.scrollWidth, el.parentNode.scrollHeight ]; + }, + getPosition: function (el, relativeToRoot) { + // if this is a nested draggable then compute the offset against its own offsetParent, otherwise + // compute against the Container's origin. see also the getUIPosition method below. + var o = instance.getOffset(el, relativeToRoot, el._katavorioDrag ? el.offsetParent : null); + return [o.left, o.top]; + }, + setPosition: function (el, xy) { + el.style.left = xy[0] + "px"; + el.style.top = xy[1] + "px"; + }, + addClass: _jp.addClass, + removeClass: _jp.removeClass, + intersects: _jg.intersects, + indexOf: function(l, i) { return l.indexOf(i); }, + scope:instance.getDefaultScope(), + css: { + noSelect: instance.dragSelectClass, + droppable: "jtk-droppable", + draggable: "jtk-draggable", + drag: "jtk-drag", + selected: "jtk-drag-selected", + active: "jtk-drag-active", + hover: "jtk-drag-hover", + ghostProxy:"jtk-ghost-proxy" + } + }); + k.setZoom(instance.getZoom()); + instance[key] = k; + instance.bind("zoom", k.setZoom); + } + return k; + }; + + var _dragStart=function(params) { + var options = params.el._jsPlumbDragOptions; + var cont = true; + if (options.canDrag) { + cont = options.canDrag(); + } + if (cont) { + this.setHoverSuspended(true); + this.select({source: params.el}).addClass(this.elementDraggingClass + " " + this.sourceElementDraggingClass, true); + this.select({target: params.el}).addClass(this.elementDraggingClass + " " + this.targetElementDraggingClass, true); + this.setConnectionBeingDragged(true); + } + return cont; + }; + var _dragMove=function(params) { + var ui = this.getUIPosition(arguments, this.getZoom()); + if (ui != null) { + var o = params.el._jsPlumbDragOptions; + this.draw(params.el, ui, null, true); + if (o._dragging) { + this.addClass(params.el, "jtk-dragged"); + } + o._dragging = true; + } + }; + var _dragStop=function(params) { + var elements = params.selection, uip; + + var _one = function (_e) { + if (_e[1] != null) { + // run the reported offset through the code that takes parent containers + // into account, to adjust if necessary (issue 554) + uip = this.getUIPosition([{ + el:_e[2].el, + pos:[_e[1].left, _e[1].top] + }]); + this.draw(_e[2].el, uip); + } + + delete _e[0]._jsPlumbDragOptions._dragging; + + this.removeClass(_e[0], "jtk-dragged"); + this.select({source: _e[2].el}).removeClass(this.elementDraggingClass + " " + this.sourceElementDraggingClass, true); + this.select({target: _e[2].el}).removeClass(this.elementDraggingClass + " " + this.targetElementDraggingClass, true); + this.getDragManager().dragEnded(_e[2].el); + }.bind(this); + + for (var i = 0; i < elements.length; i++) { + _one(elements[i]); + } + + this.setHoverSuspended(false); + this.setConnectionBeingDragged(false); + }; + + var _animProps = function (o, p) { + var _one = function (pName) { + if (p[pName] != null) { + if (_ju.isString(p[pName])) { + var m = p[pName].match(/-=/) ? -1 : 1, + v = p[pName].substring(2); + return o[pName] + (m * v); + } + else { + return p[pName]; + } + } + else { + return o[pName]; + } + }; + return [ _one("left"), _one("top") ]; + }; + + var _genLoc = function (prefix, e) { + if (e == null) { + return [ 0, 0 ]; + } + var ts = _touches(e), t = _getTouch(ts, 0); + return [t[prefix + "X"], t[prefix + "Y"]]; + }, + _pageLocation = _genLoc.bind(this, "page"), + _screenLocation = _genLoc.bind(this, "screen"), + _clientLocation = _genLoc.bind(this, "client"), + _getTouch = function (touches, idx) { + return touches.item ? touches.item(idx) : touches[idx]; + }, + _touches = function (e) { + return e.touches && e.touches.length > 0 ? e.touches : + e.changedTouches && e.changedTouches.length > 0 ? e.changedTouches : + e.targetTouches && e.targetTouches.length > 0 ? e.targetTouches : + [ e ]; + }; + + /** + Manages dragging for some instance of jsPlumb. + + TODO instead of this being accessed directly, it should subscribe to events on the jsPlumb instance: every method + in here is called directly by jsPlumb. But what should happen is that we have unpublished events that this listens + to. The only trick is getting one of these instantiated with every jsPlumb instance: it needs to have a hook somehow. + Basically the general idea is to pull ALL the drag code out (prototype method registrations plus this) into a + dedicated drag script), that does not necessarily need to be included. + + + */ + var DragManager = function (_currentInstance) { + var _draggables = {}, _dlist = [], _delements = {}, _elementsWithEndpoints = {}, + // elementids mapped to the draggable to which they belong. + _draggablesForElements = {}; + + /** + register some element as draggable. right now the drag init stuff is done elsewhere, and it is + possible that will continue to be the case. + */ + this.register = function (el) { + var id = _currentInstance.getId(el), + parentOffset; + + if (!_draggables[id]) { + _draggables[id] = el; + _dlist.push(el); + _delements[id] = {}; + } + + // look for child elements that have endpoints and register them against this draggable. + var _oneLevel = function (p) { + if (p) { + for (var i = 0; i < p.childNodes.length; i++) { + if (p.childNodes[i].nodeType !== 3 && p.childNodes[i].nodeType !== 8) { + var cEl = jsPlumb.getElement(p.childNodes[i]), + cid = _currentInstance.getId(p.childNodes[i], null, true); + if (cid && _elementsWithEndpoints[cid] && _elementsWithEndpoints[cid] > 0) { + if (!parentOffset) { + parentOffset = _currentInstance.getOffset(el); + } + var cOff = _currentInstance.getOffset(cEl); + _delements[id][cid] = { + id: cid, + offset: { + left: cOff.left - parentOffset.left, + top: cOff.top - parentOffset.top + } + }; + _draggablesForElements[cid] = id; + } + _oneLevel(p.childNodes[i]); + } + } + } + }; + + _oneLevel(el); + }; + + // refresh the offsets for child elements of this element. + this.updateOffsets = function (elId, childOffsetOverrides) { + if (elId != null) { + childOffsetOverrides = childOffsetOverrides || {}; + var domEl = jsPlumb.getElement(elId), + id = _currentInstance.getId(domEl), + children = _delements[id], + parentOffset; + + if (children) { + for (var i in children) { + if (children.hasOwnProperty(i)) { + var cel = jsPlumb.getElement(i), + cOff = childOffsetOverrides[i] || _currentInstance.getOffset(cel); + + // do not update if we have a value already and we'd just be writing 0,0 + if (cel.offsetParent == null && _delements[id][i] != null) { + continue; + } + + if (!parentOffset) { + parentOffset = _currentInstance.getOffset(domEl); + } + + _delements[id][i] = { + id: i, + offset: { + left: cOff.left - parentOffset.left, + top: cOff.top - parentOffset.top + } + }; + _draggablesForElements[i] = id; + } + } + } + } + }; + + /** + notification that an endpoint was added to the given el. we go up from that el's parent + node, looking for a parent that has been registered as a draggable. if we find one, we add this + el to that parent's list of elements to update on drag (if it is not there already) + */ + this.endpointAdded = function (el, id) { + + id = id || _currentInstance.getId(el); + + var b = document.body, + p = el.parentNode; + + _elementsWithEndpoints[id] = _elementsWithEndpoints[id] ? _elementsWithEndpoints[id] + 1 : 1; + + while (p != null && p !== b) { + var pid = _currentInstance.getId(p, null, true); + if (pid && _draggables[pid]) { + var pLoc = _currentInstance.getOffset(p); + + if (_delements[pid][id] == null) { + var cLoc = _currentInstance.getOffset(el); + _delements[pid][id] = { + id: id, + offset: { + left: cLoc.left - pLoc.left, + top: cLoc.top - pLoc.top + } + }; + _draggablesForElements[id] = pid; + } + break; + } + p = p.parentNode; + } + }; + + this.endpointDeleted = function (endpoint) { + if (_elementsWithEndpoints[endpoint.elementId]) { + _elementsWithEndpoints[endpoint.elementId]--; + if (_elementsWithEndpoints[endpoint.elementId] <= 0) { + for (var i in _delements) { + if (_delements.hasOwnProperty(i) && _delements[i]) { + delete _delements[i][endpoint.elementId]; + delete _draggablesForElements[endpoint.elementId]; + } + } + } + } + }; + + this.changeId = function (oldId, newId) { + _delements[newId] = _delements[oldId]; + _delements[oldId] = {}; + _draggablesForElements[newId] = _draggablesForElements[oldId]; + _draggablesForElements[oldId] = null; + }; + + this.getElementsForDraggable = function (id) { + return _delements[id]; + }; + + this.elementRemoved = function (elementId) { + var elId = _draggablesForElements[elementId]; + if (elId) { + delete _delements[elId][elementId]; + delete _draggablesForElements[elementId]; + } + }; + + this.reset = function () { + _draggables = {}; + _dlist = []; + _delements = {}; + _elementsWithEndpoints = {}; + }; + + // + // notification drag ended. We check automatically if need to update some + // ancestor's offsets. + // + this.dragEnded = function (el) { + if (el.offsetParent != null) { + var id = _currentInstance.getId(el), + ancestor = _draggablesForElements[id]; + + if (ancestor) { + this.updateOffsets(ancestor); + } + } + }; + + this.setParent = function (el, elId, p, pId, currentChildLocation) { + var current = _draggablesForElements[elId]; + if (!_delements[pId]) { + _delements[pId] = {}; + } + var pLoc = _currentInstance.getOffset(p), + cLoc = currentChildLocation || _currentInstance.getOffset(el); + + if (current && _delements[current]) { + delete _delements[current][elId]; + } + + _delements[pId][elId] = { + id:elId, + offset : { + left: cLoc.left - pLoc.left, + top: cLoc.top - pLoc.top + } + }; + _draggablesForElements[elId] = pId; + }; + + this.clearParent = function(el, elId) { + var current = _draggablesForElements[elId]; + if (current) { + delete _delements[current][elId]; + delete _draggablesForElements[elId]; + } + }; + + this.revalidateParent = function(el, elId, childOffset) { + var current = _draggablesForElements[elId]; + if (current) { + var co = {}; + co[elId] = childOffset; + this.updateOffsets(current, co); + _currentInstance.revalidate(current); + } + }; + + this.getDragAncestor = function (el) { + var de = jsPlumb.getElement(el), + id = _currentInstance.getId(de), + aid = _draggablesForElements[id]; + + if (aid) { + return jsPlumb.getElement(aid); + } + else { + return null; + } + }; + + }; + + var _setClassName = function (el, cn, classList) { + cn = _ju.fastTrim(cn); + if (typeof el.className.baseVal !== "undefined") { + el.className.baseVal = cn; + } + else { + el.className = cn; + } + + // recent (i currently have 61.0.3163.100) version of chrome do not update classList when you set the base val + // of an svg element's className. in the long run we'd like to move to just using classList anyway + try { + var cl = el.classList; + if (cl != null) { + while (cl.length > 0) { + cl.remove(cl.item(0)); + } + for (var i = 0; i < classList.length; i++) { + if (classList[i]) { + cl.add(classList[i]); + } + } + } + } + catch(e) { + // not fatal + _ju.log("JSPLUMB: cannot set class list", e); + } + }, + _getClassName = function (el) { + return (typeof el.className.baseVal === "undefined") ? el.className : el.className.baseVal; + }, + _classManip = function (el, classesToAdd, classesToRemove) { + classesToAdd = classesToAdd == null ? [] : _ju.isArray(classesToAdd) ? classesToAdd : classesToAdd.split(/\s+/); + classesToRemove = classesToRemove == null ? [] : _ju.isArray(classesToRemove) ? classesToRemove : classesToRemove.split(/\s+/); + + var className = _getClassName(el), + curClasses = className.split(/\s+/); + + var _oneSet = function (add, classes) { + for (var i = 0; i < classes.length; i++) { + if (add) { + if (curClasses.indexOf(classes[i]) === -1) { + curClasses.push(classes[i]); + } + } + else { + var idx = curClasses.indexOf(classes[i]); + if (idx !== -1) { + curClasses.splice(idx, 1); + } + } + } + }; + + _oneSet(true, classesToAdd); + _oneSet(false, classesToRemove); + + _setClassName(el, curClasses.join(" "), curClasses); + }; + + root.jsPlumb.extend(root.jsPlumbInstance.prototype, { + + headless: false, + + pageLocation: _pageLocation, + screenLocation: _screenLocation, + clientLocation: _clientLocation, + + getDragManager:function() { + if (this.dragManager == null) { + this.dragManager = new DragManager(this); + } + + return this.dragManager; + }, + + recalculateOffsets:function(elId) { + this.getDragManager().updateOffsets(elId); + }, + + createElement:function(tag, style, clazz, atts) { + return this.createElementNS(null, tag, style, clazz, atts); + }, + + createElementNS:function(ns, tag, style, clazz, atts) { + var e = ns == null ? document.createElement(tag) : document.createElementNS(ns, tag); + var i; + style = style || {}; + for (i in style) { + e.style[i] = style[i]; + } + + if (clazz) { + e.className = clazz; + } + + atts = atts || {}; + for (i in atts) { + e.setAttribute(i, "" + atts[i]); + } + + return e; + }, + + getAttribute: function (el, attName) { + return el.getAttribute != null ? el.getAttribute(attName) : null; + }, + + setAttribute: function (el, a, v) { + if (el.setAttribute != null) { + el.setAttribute(a, v); + } + }, + + setAttributes: function (el, atts) { + for (var i in atts) { + if (atts.hasOwnProperty(i)) { + el.setAttribute(i, atts[i]); + } + } + }, + appendToRoot: function (node) { + document.body.appendChild(node); + }, + getRenderModes: function () { + return [ "svg" ]; + }, + getClass:_getClassName, + addClass: function (el, clazz) { + jsPlumb.each(el, function (e) { + _classManip(e, clazz); + }); + }, + hasClass: function (el, clazz) { + el = jsPlumb.getElement(el); + if (el.classList) { + return el.classList.contains(clazz); + } + else { + return _getClassName(el).indexOf(clazz) !== -1; + } + }, + removeClass: function (el, clazz) { + jsPlumb.each(el, function (e) { + _classManip(e, null, clazz); + }); + }, + toggleClass:function(el, clazz) { + if (jsPlumb.hasClass(el, clazz)) { + jsPlumb.removeClass(el, clazz); + } else { + jsPlumb.addClass(el, clazz); + } + }, + updateClasses: function (el, toAdd, toRemove) { + jsPlumb.each(el, function (e) { + _classManip(e, toAdd, toRemove); + }); + }, + setClass: function (el, clazz) { + if (clazz != null) { + jsPlumb.each(el, function (e) { + _setClassName(e, clazz, clazz.split(/\s+/)); + }); + } + }, + setPosition: function (el, p) { + el.style.left = p.left + "px"; + el.style.top = p.top + "px"; + }, + getPosition: function (el) { + var _one = function (prop) { + var v = el.style[prop]; + return v ? v.substring(0, v.length - 2) : 0; + }; + return { + left: _one("left"), + top: _one("top") + }; + }, + getStyle:function(el, prop) { + if (typeof window.getComputedStyle !== 'undefined') { + return getComputedStyle(el, null).getPropertyValue(prop); + } else { + return el.currentStyle[prop]; + } + }, + getSelector: function (ctx, spec) { + var sel = null; + if (arguments.length === 1) { + sel = ctx.nodeType != null ? ctx : document.querySelectorAll(ctx); + } + else { + sel = ctx.querySelectorAll(spec); + } + + return sel; + }, + getOffset:function(el, relativeToRoot, container) { + el = jsPlumb.getElement(el); + container = container || this.getContainer(); + var out = { + left: el.offsetLeft, + top: el.offsetTop + }, + op = (relativeToRoot || (container != null && (el !== container && el.offsetParent !== container))) ? el.offsetParent : null, + _maybeAdjustScroll = function(offsetParent) { + if (offsetParent != null && offsetParent !== document.body && (offsetParent.scrollTop > 0 || offsetParent.scrollLeft > 0)) { + out.left -= offsetParent.scrollLeft; + out.top -= offsetParent.scrollTop; + } + }.bind(this); + + while (op != null) { + out.left += op.offsetLeft; + out.top += op.offsetTop; + _maybeAdjustScroll(op); + op = relativeToRoot ? op.offsetParent : + op.offsetParent === container ? null : op.offsetParent; + } + + // if container is scrolled and the element (or its offset parent) is not absolute or fixed, adjust accordingly. + if (container != null && !relativeToRoot && (container.scrollTop > 0 || container.scrollLeft > 0)) { + var pp = el.offsetParent != null ? this.getStyle(el.offsetParent, "position") : "static", + p = this.getStyle(el, "position"); + if (p !== "absolute" && p !== "fixed" && pp !== "absolute" && pp !== "fixed") { + out.left -= container.scrollLeft; + out.top -= container.scrollTop; + } + } + return out; + }, + // + // return x+y proportion of the given element's size corresponding to the location of the given event. + // + getPositionOnElement: function (evt, el, zoom) { + var box = typeof el.getBoundingClientRect !== "undefined" ? el.getBoundingClientRect() : { left: 0, top: 0, width: 0, height: 0 }, + body = document.body, + docElem = document.documentElement, + scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop, + scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft, + clientTop = docElem.clientTop || body.clientTop || 0, + clientLeft = docElem.clientLeft || body.clientLeft || 0, + pst = 0, + psl = 0, + top = box.top + scrollTop - clientTop + (pst * zoom), + left = box.left + scrollLeft - clientLeft + (psl * zoom), + cl = jsPlumb.pageLocation(evt), + w = box.width || (el.offsetWidth * zoom), + h = box.height || (el.offsetHeight * zoom), + x = (cl[0] - left) / w, + y = (cl[1] - top) / h; + + return [ x, y ]; + }, + + /** + * Gets the absolute position of some element as read from the left/top properties in its style. + * @method getAbsolutePosition + * @param {Element} el The element to retrieve the absolute coordinates from. **Note** this is a DOM element, not a selector from the underlying library. + * @return {Number[]} [left, top] pixel values. + */ + getAbsolutePosition: function (el) { + var _one = function (s) { + var ss = el.style[s]; + if (ss) { + return parseFloat(ss.substring(0, ss.length - 2)); + } + }; + return [ _one("left"), _one("top") ]; + }, + + /** + * Sets the absolute position of some element by setting the left/top properties in its style. + * @method setAbsolutePosition + * @param {Element} el The element to set the absolute coordinates on. **Note** this is a DOM element, not a selector from the underlying library. + * @param {Number[]} xy x and y coordinates + * @param {Number[]} [animateFrom] Optional previous xy to animate from. + * @param {Object} [animateOptions] Options for the animation. + */ + setAbsolutePosition: function (el, xy, animateFrom, animateOptions) { + if (animateFrom) { + this.animate(el, { + left: "+=" + (xy[0] - animateFrom[0]), + top: "+=" + (xy[1] - animateFrom[1]) + }, animateOptions); + } + else { + el.style.left = xy[0] + "px"; + el.style.top = xy[1] + "px"; + } + }, + /** + * gets the size for the element, in an array : [ width, height ]. + */ + getSize: function (el) { + return [ el.offsetWidth, el.offsetHeight ]; + }, + getWidth: function (el) { + return el.offsetWidth; + }, + getHeight: function (el) { + return el.offsetHeight; + }, + getRenderMode : function() { return "svg"; }, + draggable : function (el, options) { + var info; + el = _ju.isArray(el) || (el.length != null && !_ju.isString(el)) ? el: [ el ]; + Array.prototype.slice.call(el).forEach(function(_el) { + info = this.info(_el); + if (info.el) { + this._initDraggableIfNecessary(info.el, true, options, info.id, true); + } + }.bind(this)); + return this; + }, + initDraggable: function (el, options, category) { + _getDragManager(this, category).draggable(el, options); + el._jsPlumbDragOptions = options; + }, + destroyDraggable: function (el, category) { + _getDragManager(this, category).destroyDraggable(el); + delete el._jsPlumbDragOptions; + }, + unbindDraggable: function (el, evt, fn, category) { + _getDragManager(this, category).destroyDraggable(el, evt, fn); + }, + setDraggable : function (element, draggable) { + return jsPlumb.each(element, function (el) { + if (this.isDragSupported(el)) { + this._draggableStates[this.getAttribute(el, "id")] = draggable; + this.setElementDraggable(el, draggable); + } + }.bind(this)); + }, + _draggableStates : {}, + /* + * toggles the draggable state of the given element(s). + * el is either an id, or an element object, or a list of ids/element objects. + */ + toggleDraggable : function (el) { + var state; + jsPlumb.each(el, function (el) { + var elId = this.getAttribute(el, "id"); + state = this._draggableStates[elId] == null ? false : this._draggableStates[elId]; + state = !state; + this._draggableStates[elId] = state; + this.setDraggable(el, state); + return state; + }.bind(this)); + return state; + }, + _initDraggableIfNecessary : function (element, isDraggable, dragOptions, id, fireEvent) { + // TODO FIRST: move to DragManager. including as much of the decision to init dragging as possible. + if (!jsPlumb.headless) { + var _draggable = isDraggable == null ? false : isDraggable; + if (_draggable) { + if (jsPlumb.isDragSupported(element, this)) { + var options = dragOptions || this.Defaults.DragOptions; + options = jsPlumb.extend({}, options); // make a copy. + if (!jsPlumb.isAlreadyDraggable(element, this)) { + var dragEvent = jsPlumb.dragEvents.drag, + stopEvent = jsPlumb.dragEvents.stop, + startEvent = jsPlumb.dragEvents.start; + + this.manage(id, element); + + options[startEvent] = _ju.wrap(options[startEvent], _dragStart.bind(this)); + + options[dragEvent] = _ju.wrap(options[dragEvent], _dragMove.bind(this)); + + options[stopEvent] = _ju.wrap(options[stopEvent], _dragStop.bind(this)); + + var elId = this.getId(element); // need ID + + this._draggableStates[elId] = true; + var draggable = this._draggableStates[elId]; + + options.disabled = draggable == null ? false : !draggable; + this.initDraggable(element, options); + this.getDragManager().register(element); + if (fireEvent) { + this.fire("elementDraggable", {el:element, options:options}); + } + } + else { + // already draggable. attach any start, drag or stop listeners to the current Drag. + if (dragOptions.force) { + this.initDraggable(element, options); + } + } + } + } + } + }, + animationSupported:true, + getElement: function (el) { + if (el == null) { + return null; + } + // here we pluck the first entry if el was a list of entries. + // this is not my favourite thing to do, but previous versions of + // jsplumb supported jquery selectors, and it is possible a selector + // will be passed in here. + el = typeof el === "string" ? el : el.length != null && el.enctype == null ? el[0] : el; + return typeof el === "string" ? document.getElementById(el) : el; + }, + removeElement: function (element) { + _getDragManager(this).elementRemoved(element); + this.getEventManager().remove(element); + }, + // + // this adapter supports a rudimentary animation function. no easing is supported. only + // left/top properties are supported. property delta args are expected to be in the form + // + // +=x.xxxx + // + // or + // + // -=x.xxxx + // + doAnimate: function (el, properties, options) { + options = options || {}; + var o = this.getOffset(el), + ap = _animProps(o, properties), + ldist = ap[0] - o.left, + tdist = ap[1] - o.top, + d = options.duration || 250, + step = 15, steps = d / step, + linc = (step / d) * ldist, + tinc = (step / d) * tdist, + idx = 0, + _int = setInterval(function () { + _jp.setPosition(el, { + left: o.left + (linc * (idx + 1)), + top: o.top + (tinc * (idx + 1)) + }); + if (options.step != null) { + options.step(idx, Math.ceil(steps)); + } + idx++; + if (idx >= steps) { + window.clearInterval(_int); + if (options.complete != null) { + options.complete(); + } + } + }, step); + }, + // DRAG/DROP + + + destroyDroppable: function (el, category) { + _getDragManager(this, category).destroyDroppable(el); + }, + unbindDroppable: function (el, evt, fn, category) { + _getDragManager(this, category).destroyDroppable(el, evt, fn); + }, + + droppable :function(el, options) { + el = _ju.isArray(el) || (el.length != null && !_ju.isString(el)) ? el: [ el ]; + var info; + options = options || {}; + options.allowLoopback = false; + Array.prototype.slice.call(el).forEach(function(_el) { + info = this.info(_el); + if (info.el) { + this.initDroppable(info.el, options); + } + }.bind(this)); + return this; + }, + + initDroppable: function (el, options, category) { + _getDragManager(this, category).droppable(el, options); + }, + isAlreadyDraggable: function (el) { + return el._katavorioDrag != null; + }, + isDragSupported: function (el, options) { + return true; + }, + isDropSupported: function (el, options) { + return true; + }, + isElementDraggable: function (el) { + el = _jp.getElement(el); + return el._katavorioDrag && el._katavorioDrag.isEnabled(); + }, + getDragObject: function (eventArgs) { + return eventArgs[0].drag.getDragElement(); + }, + getDragScope: function (el) { + return el._katavorioDrag && el._katavorioDrag.scopes.join(" ") || ""; + }, + getDropEvent: function (args) { + return args[0].e; + }, + getUIPosition: function (eventArgs, zoom) { + // here the position reported to us by Katavorio is relative to the element's offsetParent. For top + // level nodes that is fine, but if we have a nested draggable then its offsetParent is actually + // not going to be the jsplumb container; it's going to be some child of that element. In that case + // we want to adjust the UI position to account for the offsetParent's position relative to the Container + // origin. + var el = eventArgs[0].el; + if (el.offsetParent == null) { + return null; + } + var finalPos = eventArgs[0].finalPos || eventArgs[0].pos; + var p = { left:finalPos[0], top:finalPos[1] }; + if (el._katavorioDrag && el.offsetParent !== this.getContainer()) { + var oc = this.getOffset(el.offsetParent); + p.left += oc.left; + p.top += oc.top; + } + return p; + }, + setDragFilter: function (el, filter, _exclude) { + if (el._katavorioDrag) { + el._katavorioDrag.setFilter(filter, _exclude); + } + }, + setElementDraggable: function (el, draggable) { + el = _jp.getElement(el); + if (el._katavorioDrag) { + el._katavorioDrag.setEnabled(draggable); + } + }, + setDragScope: function (el, scope) { + if (el._katavorioDrag) { + el._katavorioDrag.k.setDragScope(el, scope); + } + }, + setDropScope:function(el, scope) { + if (el._katavorioDrop && el._katavorioDrop.length > 0) { + el._katavorioDrop[0].k.setDropScope(el, scope); + } + }, + addToPosse:function(el, spec) { + var specs = Array.prototype.slice.call(arguments, 1); + var dm = _getDragManager(this); + _jp.each(el, function(_el) { + _el = [ _jp.getElement(_el) ]; + _el.push.apply(_el, specs ); + dm.addToPosse.apply(dm, _el); + }); + }, + setPosse:function(el, spec) { + var specs = Array.prototype.slice.call(arguments, 1); + var dm = _getDragManager(this); + _jp.each(el, function(_el) { + _el = [ _jp.getElement(_el) ]; + _el.push.apply(_el, specs ); + dm.setPosse.apply(dm, _el); + }); + }, + removeFromPosse:function(el, posseId) { + var specs = Array.prototype.slice.call(arguments, 1); + var dm = _getDragManager(this); + _jp.each(el, function(_el) { + _el = [ _jp.getElement(_el) ]; + _el.push.apply(_el, specs ); + dm.removeFromPosse.apply(dm, _el); + }); + }, + removeFromAllPosses:function(el) { + var dm = _getDragManager(this); + _jp.each(el, function(_el) { dm.removeFromAllPosses(_jp.getElement(_el)); }); + }, + setPosseState:function(el, posseId, state) { + var dm = _getDragManager(this); + _jp.each(el, function(_el) { dm.setPosseState(_jp.getElement(_el), posseId, state); }); + }, + dragEvents: { + 'start': 'start', 'stop': 'stop', 'drag': 'drag', 'step': 'step', + 'over': 'over', 'out': 'out', 'drop': 'drop', 'complete': 'complete', + 'beforeStart':'beforeStart' + }, + animEvents: { + 'step': "step", 'complete': 'complete' + }, + stopDrag: function (el) { + if (el._katavorioDrag) { + el._katavorioDrag.abort(); + } + }, + addToDragSelection: function (spec) { + _getDragManager(this).select(spec); + }, + removeFromDragSelection: function (spec) { + _getDragManager(this).deselect(spec); + }, + clearDragSelection: function () { + _getDragManager(this).deselectAll(); + }, + trigger: function (el, event, originalEvent, payload) { + this.getEventManager().trigger(el, event, originalEvent, payload); + }, + doReset:function() { + // look for katavorio instances and reset each one if found. + for (var key in this) { + if (key.indexOf("_katavorio_") === 0) { + this[key].reset(); + } + } + }, + getEventManager:function() { + return _getEventManager(this); + }, + on : function(el, event, callback) { + // TODO: here we would like to map the tap event if we know its + // an internal bind to a click. we have to know its internal because only + // then can we be sure that the UP event wont be consumed (tap is a synthesized + // event from a mousedown followed by a mouseup). + //event = { "click":"tap", "dblclick":"dbltap"}[event] || event; + this.getEventManager().on.apply(this, arguments); + return this; + }, + off : function(el, event, callback) { + this.getEventManager().off.apply(this, arguments); + return this; + } + + }); + + var ready = function (f) { + var _do = function () { + if (/complete|loaded|interactive/.test(document.readyState) && typeof(document.body) !== "undefined" && document.body != null) { + f(); + } + else { + setTimeout(_do, 9); + } + }; + + _do(); + }; + ready(_jp.init); + +}).call(typeof window !== 'undefined' ? window : this); diff --git a/experiment/simulation/js/monostablecal.js b/experiment/simulation/js/monostablecal.js new file mode 100644 index 0000000..3b6ae22 --- /dev/null +++ b/experiment/simulation/js/monostablecal.js @@ -0,0 +1,300 @@ +var rlslider,cldslider; + + +function resChange() { + rlslider = document.getElementById("res1").value; + document.getElementById("res").value = rlslider; +} + +function capldChange() { + cldslider = document.getElementById("capa1").value; + document.getElementById("capac1").value = cldslider; +} + +function vinChange(){ + var vi=document.getElementById("vdc").value; + document.getElementById("dc").value=vi; + +} +function tinChange(){ + var tinp=document.getElementById("tinrange").value; + document.getElementById("timeprdata").value=tinp; +} + + var r1; + var c1; + var vcc; + + var tin=20; //ms + var tout;//ms //pulse width + var datapoints=[]; + var datapoints1=[]; + var datapoints2=[]; + var to=tin; + var toff; + + function voutput(){ + + + vcc=document.getElementById("dc").value; + var vo=vcc; + toff=0.25*tin; + r1=document.getElementById("res").value*Math.pow(10,3); + c1=document.getElementById("capac1").value*Math.pow(10,-6); + tout=1.1*parseFloat(r1)*parseFloat(c1)*Math.pow(10,3);//ms //pulse width + + var i,j=0; + + + for(i=0;i<=3;i=i+1){ + for(j=0;j<=to;j=j+0.1){ + if(j<(tout)){ //11ms + + datapoints.push({x:j+(to*i),y:parseInt(vcc)}); + + } + else if(jPx#24YJ`L;%JBSpXgebdFd6000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igS? z6gfEBA#;uZ000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000DJNkl_ zM*tcCntCmLF+PoPDsP|+2LKEMr~;_odi~|uH?KT5H!)nAt`y9qOX9eG)T(Xo9c_HK zxx2cw_V+q~x{d=~tKG|VrUz)KOa}ps02uw?+Ssd~ymfW)()r4~2!n~hlz@^1>=KZR z;gSUR|81;%@#A01-)TV&5iZ%!l zL0t*8~NR@zaICDO_v3=NH+d4?<8MAf8+UBGV6}Swb`tia`i`Jl+0kb|&O z)&dp*L?C(u1Y_lJ{^r#1ta_!8+5ZOFNk-}dfYKW;R_BBWOim4?z&d9l5IG1Fppr`( zZ>4{IyfmkNNr5|9VNUAQT<6Bhg=r${7|9R;#sUzPoz&e9Oavi;I?BXJs%og>=NoSo!>Z7z?J zrnlqo?;oy`i$RHZGbKJPI+vd7(K(QF-pMAL6b1Kc%~dTPv98_03i?!~X#GK}`Od}C z<#L1x?^N;IMos1A^;@Vbm^$4#ax0(yu=_QDJpd0igQfYpD|3nd(bm#dU)rcIJI8HF z6NvMBnwh}NURq`6ldeZ4miE#w^<}M6jXY?+NaWibvvrU(jgifn3&k7Ony~Xvmt&1y z^Ts2R_E*0h-2Uc|#?KkHt;ba-^e~#NKWOjO9=f$xMhc^qqMh(qCIfCdY + + + + Monostable Multivibrator using 555 + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
+
+
+
+ + + +
+
+ +
+

+ + + +

+

+

+

+

+

+

+

+

+ + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ +

CONTROLS

+
+ + + + +
+ +    Resistance (Ra) :   kΩ
+    Capacitance (C) :  µf
+    Supply voltage (Vcc) :       Volt
+    Time period (Tin) :       mSec
+ +
+ + + + +
+ + + + +
+
+
+

+

+ +
+ +
+ + + +
+ + +
+

GRAPH PLOT

+
+ Print
+ + +
+
+
+
+ + + + + + + + + diff --git a/experiment/theory.md b/experiment/theory.md index ef57af9..54a02ba 100644 --- a/experiment/theory.md +++ b/experiment/theory.md @@ -1 +1,50 @@ -### Link your theory in here \ No newline at end of file +## Theory + +One of the most versatile linear ICs is the 555 times. It was first introduced in early 1970 by Signetic Corporation giving the name as SE/NE 555 timer. The 555 is a monolithic timing circuit that can produce highly stable time delays or oscillation. The timer basically operates in one of the two modes either as monostable or as an astable multivibrator. + +A monostable multivibrator, often called a one-shot multivibrator, is a Pulse generating circuit in which the duration of the pulse is determined by the RC network connected externally to the 555 timer. In a stable or standby state the output of the circuit is approximately zero or at logic-low level. When an external trigger pulse is applied, the output is forced to go high (≅ Vcc). The time the output remains high is determined by the external RC network connected to the timer. AT the end of the timing interval, the output automatically reverts back to its logic-low stable state. The output remains low until the trigger pulse is again applied. Then the cycle repeats. The monostable circuit has only one stable state (output low), hence the name monostable. Normally, the output of the monostable multivibrator is low + +#### 555 pin configuration + +The 555 IC is available as an 8-pin metal can as given below. + +
+ +

Figure 1

+
+ +**Pin1 : Grounded Terminal** All the voltages are measured w.r.t. this terminal. +**Pin2 : Trigger Terminal** This pin is an inverting input to a comparator that is reponsible for transition of flip-flop from set to reset. The output of the timer depends on the amplitude of the external tigger pulse applied to this pin. +**Pin3 : Output Terminal** Output of the timer is available at this pin. There are two ways in which a load can be connected to the output terminal either between pin 3 and ground pin or between pin 3 and supply pin. +**Pin4 : Reset Terminal**To disable or reset the timer a negative pulse is applied to this pin due to which it is referred to as reset terminal. When this pin is not to be used, it should be connected to +Vcc to avoid any possibility pf false triggering. +**Pin5 : Control Voltage Terminal** The function of this terminal is to control the threshold and trigger levels. Thus either the external voltage or apot connected to this pin determines the pulse width of the output waveform. The external voltage applied to this pin can also be used to modulate th eoutput waveform. When this pin is not used, it should be connected to ground through a 0.01uF to avoid any noice problem. +**Pin6 : Threshold Terminal** This is the noninverting input terminal of comparator 1,which compares the voltage applied to this terminal with a refernce volatge of +2/3 VCC. The amplitude of the volatge applied to this terminal is responsible for the set state of flip flop. +**Pin7 : Discharge Terminal** This pin is connected internally to the collector of transistor and mostly a capacitor is discharge terminal because when transistor saturates, capacitor discharges through the transistor. When the transistor is cutoff, the capacitor charges at a rate determined by external resistor and capacitor. +**Pin8 : Supply Terminal** A supply voltage of +5V to +18V is applied to this terminal w.r.t. to ground pin. + +#### The 555 Timer as a Monostable Multivibrator + +The schematic of a 555 timer in monostable mode of operation is shown in figure 2. The ciruit details are given below. Pin 1 is grounded. Trigger input is applied to pin 2. In quiescent condition of output this input is kept at +Vcc. To obtain transition of output from stable to quasistable state, a negative-going pulse of naroow width and amplitudeof greater than +2/3 Vcc +is applied to pin 2. Output is taken from pin 3. Pin 4 is usually connected to +Vcc +tp avoid reset. Pin 5 is grounded through a 0.01uF capacitor to avoid noise problem. Pin 6 is shorted to pin 7. A resistor RA +is connected between pins 6 and 8. At pin 7 a discharge capacitor is connected while pin 8 is connected to supply VCC. + + +
+ +

Figure 2

+
+ +#### Monostable operation: +According to Figure 1 initially when output is low, that is , the circuit is in a stable state, transistor Q1 is on and the capacitor C is shorted out of the ground. However, upon application of a negative trigger pulse to pin 2, transistor Q1 is turned off, which releases the short circuit across the external capacitor C and drives the output high. The capacitor C now starts charging up toward VCC through RA. However, when the voltage across the capacitor equals 2/3 VCC, comparator 1’s output switches from low to high, which in turn drives the output to its low state via the output of the flip-flop. At the same time, the output of the flip-flop turns transistor Q1 ON, and hence capacitor C rapidly discharges through the transistor. The output of the monostable remains low until a trigger pulse is again applied. Then the cycle reprats. Figure 3 shows the trigger input, output voltage, and capacitor voltage waveform. As shown here, the pulse width of the trigger input must be smaller than the expected pulse width of the output waveform. Also the trigger pulse must be a negative-going input signal with amplitude larger than 1/3 VCC. + +
+ +

Figure 3

+
+ +#### Applications of monostable multivibrator +1. The monostable multivibrator is used as delay and timing circuits. +2. It is also used for temporary memories. +3. It is often used to trigger another pulse generator. +4. It is used for regenerating old and worn out pulses. \ No newline at end of file