baidu_ueditor_rails5 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (277) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/baidu_ueditor.js +1 -1
  4. data/app/assets/javascripts/ueditor/dialogs/anchor/anchor.html +40 -0
  5. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.css +681 -0
  6. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.html +60 -0
  7. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.js +754 -0
  8. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
  9. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  10. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  11. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  12. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  13. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  14. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  15. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  16. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  17. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  18. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  19. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  20. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  21. data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
  22. data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png +0 -0
  23. data/app/assets/javascripts/ueditor/dialogs/attachment/images/bg.png +0 -0
  24. data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
  25. data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
  26. data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
  27. data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
  28. data/app/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
  29. data/app/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
  30. data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
  31. data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
  32. data/app/assets/javascripts/ueditor/dialogs/background/background.css +94 -0
  33. data/app/assets/javascripts/ueditor/dialogs/background/background.html +56 -0
  34. data/app/assets/javascripts/ueditor/dialogs/background/background.js +376 -0
  35. data/app/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
  36. data/app/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
  37. data/app/assets/javascripts/ueditor/dialogs/charts/chart.config.js +65 -0
  38. data/app/assets/javascripts/ueditor/dialogs/charts/charts.css +165 -0
  39. data/app/assets/javascripts/ueditor/dialogs/charts/charts.html +89 -0
  40. data/app/assets/javascripts/ueditor/dialogs/charts/charts.js +519 -0
  41. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
  42. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
  43. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
  44. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
  45. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
  46. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
  47. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.css +43 -0
  48. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.html +54 -0
  49. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
  50. data/app/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
  51. data/app/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
  52. data/app/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
  53. data/app/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
  54. data/app/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
  55. data/app/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  56. data/app/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
  57. data/app/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
  58. data/app/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
  59. data/app/assets/javascripts/ueditor/dialogs/gmap/gmap.html +89 -0
  60. data/app/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
  61. data/app/assets/javascripts/ueditor/dialogs/help/help.html +82 -0
  62. data/app/assets/javascripts/ueditor/dialogs/help/help.js +56 -0
  63. data/app/assets/javascripts/ueditor/dialogs/image/image.css +894 -0
  64. data/app/assets/javascripts/ueditor/dialogs/image/image.html +120 -0
  65. data/app/assets/javascripts/ueditor/dialogs/image/image.js +1142 -0
  66. data/app/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
  67. data/app/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
  68. data/app/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
  69. data/app/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
  70. data/app/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
  71. data/app/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
  72. data/app/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
  73. data/app/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
  74. data/app/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +98 -0
  75. data/app/assets/javascripts/ueditor/dialogs/internal.js +81 -0
  76. data/app/assets/javascripts/ueditor/dialogs/link/link.html +126 -0
  77. data/app/assets/javascripts/ueditor/dialogs/map/map.html +135 -0
  78. data/app/assets/javascripts/ueditor/dialogs/map/show.html +118 -0
  79. data/app/assets/javascripts/ueditor/dialogs/music/music.css +30 -0
  80. data/app/assets/javascripts/ueditor/dialogs/music/music.html +32 -0
  81. data/app/assets/javascripts/ueditor/dialogs/music/music.js +192 -0
  82. data/app/assets/javascripts/ueditor/dialogs/preview/preview.html +40 -0
  83. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
  84. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
  85. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
  86. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
  87. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
  88. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
  89. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
  90. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
  91. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
  92. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
  93. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
  94. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
  95. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
  96. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
  97. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +72 -0
  98. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +95 -0
  99. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +671 -0
  100. data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
  101. data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
  102. data/app/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
  103. data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.html +21 -0
  104. data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.js +57 -0
  105. data/app/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
  106. data/app/assets/javascripts/ueditor/dialogs/table/edittable.css +84 -0
  107. data/app/assets/javascripts/ueditor/dialogs/table/edittable.html +64 -0
  108. data/app/assets/javascripts/ueditor/dialogs/table/edittable.js +237 -0
  109. data/app/assets/javascripts/ueditor/dialogs/table/edittd.html +61 -0
  110. data/app/assets/javascripts/ueditor/dialogs/table/edittip.html +33 -0
  111. data/app/assets/javascripts/ueditor/dialogs/template/config.js +42 -0
  112. data/app/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
  113. data/app/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
  114. data/app/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
  115. data/app/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
  116. data/app/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
  117. data/app/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
  118. data/app/assets/javascripts/ueditor/dialogs/template/template.css +18 -0
  119. data/app/assets/javascripts/ueditor/dialogs/template/template.html +26 -0
  120. data/app/assets/javascripts/ueditor/dialogs/template/template.js +53 -0
  121. data/app/assets/javascripts/ueditor/dialogs/video/images/bg.png +0 -0
  122. data/app/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
  123. data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
  124. data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
  125. data/app/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
  126. data/app/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
  127. data/app/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
  128. data/app/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
  129. data/app/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
  130. data/app/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
  131. data/app/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
  132. data/app/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
  133. data/app/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
  134. data/app/assets/javascripts/ueditor/dialogs/video/video.css +635 -0
  135. data/app/assets/javascripts/ueditor/dialogs/video/video.html +86 -0
  136. data/app/assets/javascripts/ueditor/dialogs/video/video.js +791 -0
  137. data/app/assets/javascripts/ueditor/dialogs/webapp/webapp.html +53 -0
  138. data/app/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  139. data/app/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
  140. data/app/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +1495 -0
  141. data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +111 -0
  142. data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +157 -0
  143. data/app/assets/javascripts/ueditor/index.html +175 -0
  144. data/app/assets/javascripts/ueditor/lang/en/en.js +684 -0
  145. data/app/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
  146. data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  147. data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
  148. data/app/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
  149. data/app/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
  150. data/app/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
  151. data/app/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
  152. data/app/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
  153. data/app/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
  154. data/app/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
  155. data/app/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
  156. data/app/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
  157. data/app/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
  158. data/app/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
  159. data/app/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
  160. data/app/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
  161. data/app/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
  162. data/app/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
  163. data/app/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
  164. data/app/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
  165. data/app/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +669 -0
  166. data/app/assets/javascripts/ueditor/themes/default/css/ueditor.css +1903 -0
  167. data/app/assets/javascripts/ueditor/themes/default/css/ueditor.min.css +8 -0
  168. data/app/assets/javascripts/ueditor/themes/default/dialogbase.css +100 -0
  169. data/app/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
  170. data/app/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
  171. data/app/assets/javascripts/ueditor/themes/default/images/arrow_down.png +0 -0
  172. data/app/assets/javascripts/ueditor/themes/default/images/arrow_up.png +0 -0
  173. data/app/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
  174. data/app/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
  175. data/app/assets/javascripts/ueditor/themes/default/images/charts.png +0 -0
  176. data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
  177. data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
  178. data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
  179. data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
  180. data/app/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
  181. data/app/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
  182. data/app/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
  183. data/app/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
  184. data/app/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
  185. data/app/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
  186. data/app/assets/javascripts/ueditor/themes/default/images/loaderror.png +0 -0
  187. data/app/assets/javascripts/ueditor/themes/default/images/loading.gif +0 -0
  188. data/app/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
  189. data/app/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
  190. data/app/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
  191. data/app/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
  192. data/app/assets/javascripts/ueditor/themes/default/images/sortable.png +0 -0
  193. data/app/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
  194. data/app/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
  195. data/app/assets/javascripts/ueditor/themes/default/images/table-cell-align.png +0 -0
  196. data/app/assets/javascripts/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
  197. data/app/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
  198. data/app/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
  199. data/app/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
  200. data/app/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
  201. data/app/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
  202. data/app/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
  203. data/app/assets/javascripts/ueditor/themes/iframe.css +1 -0
  204. data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCore.js +3655 -0
  205. data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
  206. data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
  207. data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
  208. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.js +13 -0
  209. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js +313 -0
  210. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.js +15 -0
  211. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js +316 -0
  212. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.js +17 -0
  213. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.src.js +583 -0
  214. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.js +50 -0
  215. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.src.js +2430 -0
  216. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.js +283 -0
  217. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.src.js +16974 -0
  218. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.js +7 -0
  219. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.src.js +401 -0
  220. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.js +133 -0
  221. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.src.js +3113 -0
  222. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.js +17 -0
  223. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.src.js +582 -0
  224. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.js +11 -0
  225. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.src.js +447 -0
  226. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.js +22 -0
  227. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.src.js +709 -0
  228. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.js +12 -0
  229. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.src.js +289 -0
  230. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.js +1 -0
  231. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js +53 -0
  232. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.js +27 -0
  233. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.src.js +1002 -0
  234. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.js +12 -0
  235. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.src.js +128 -0
  236. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-blue.js +254 -0
  237. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-green.js +255 -0
  238. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/gray.js +257 -0
  239. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/grid.js +103 -0
  240. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/skies.js +89 -0
  241. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.js +9789 -0
  242. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.js +6 -0
  243. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.map +1 -0
  244. data/app/assets/javascripts/ueditor/third-party/snapscreen/UEditorSnapscreen.exe +0 -0
  245. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.eot +0 -0
  246. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.svg +65 -0
  247. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.ttf +0 -0
  248. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.woff +0 -0
  249. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.css +766 -0
  250. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.min.css +5 -0
  251. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.swf +0 -0
  252. data/app/assets/javascripts/ueditor/third-party/video-js/video.dev.js +7108 -0
  253. data/app/assets/javascripts/ueditor/third-party/video-js/video.js +129 -0
  254. data/app/assets/javascripts/ueditor/third-party/webuploader/Uploader.swf +0 -0
  255. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.css +28 -0
  256. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.js +5670 -0
  257. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.min.js +2 -0
  258. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.js +4176 -0
  259. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.min.js +2 -0
  260. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.js +5559 -0
  261. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.min.js +2 -0
  262. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.js +6733 -0
  263. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.min.js +2 -0
  264. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.js +4593 -0
  265. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.min.js +2 -0
  266. data/app/assets/javascripts/ueditor/third-party/xss.min.js +1 -0
  267. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
  268. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
  269. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  270. data/app/assets/javascripts/ueditor/ueditor.all.js +29568 -0
  271. data/app/assets/javascripts/ueditor/ueditor.all.min.js +18 -0
  272. data/app/assets/javascripts/ueditor/ueditor.config.js +497 -0
  273. data/app/assets/javascripts/ueditor/ueditor.parse.js +1022 -0
  274. data/app/assets/javascripts/ueditor/ueditor.parse.min.js +7 -0
  275. data/app/assets/javascripts/{ueditor → ueditor_custom}/preinit.js.erb +0 -0
  276. data/lib/baidu_ueditor_rails/version.rb +1 -1
  277. metadata +292 -21
@@ -0,0 +1,7 @@
1
+ (function(i,C){function m(a){return typeof a==="number"}function n(a){return a!==D&&a!==null}var D,p,r,s=i.Chart,t=i.extend,z=i.each;r=["path","rect","circle"];p={top:0,left:0,center:0.5,middle:0.5,bottom:1,right:1};var u=C.inArray,A=i.merge,B=function(){this.init.apply(this,arguments)};B.prototype={init:function(a,d){var c=d.shape&&d.shape.type;this.chart=a;var b,f;f={xAxis:0,yAxis:0,title:{style:{},text:"",x:0,y:0},shape:{params:{stroke:"#000000",fill:"transparent",strokeWidth:2}}};b={circle:{params:{x:0,
2
+ y:0}}};if(b[c])f.shape=A(f.shape,b[c]);this.options=A({},f,d)},render:function(a){var d=this.chart,c=this.chart.renderer,b=this.group,f=this.title,e=this.shape,h=this.options,i=h.title,l=h.shape;if(!b)b=this.group=c.g();if(!e&&l&&u(l.type,r)!==-1)e=this.shape=c[h.shape.type](l.params),e.add(b);if(!f&&i)f=this.title=c.label(i),f.add(b);b.add(d.annotations.group);this.linkObjects();a!==!1&&this.redraw()},redraw:function(){var a=this.options,d=this.chart,c=this.group,b=this.title,f=this.shape,e=this.linkedObject,
3
+ h=d.xAxis[a.xAxis],v=d.yAxis[a.yAxis],l=a.width,w=a.height,x=p[a.anchorY],y=p[a.anchorX],j,o,g,q;if(e)j=e instanceof i.Point?"point":e instanceof i.Series?"series":null,j==="point"?(a.xValue=e.x,a.yValue=e.y,o=e.series):j==="series"&&(o=e),c.visibility!==o.group.visibility&&c.attr({visibility:o.group.visibility});e=n(a.xValue)?h.toPixels(a.xValue+h.minPointOffset)-h.minPixelPadding:a.x;j=n(a.yValue)?v.toPixels(a.yValue):a.y;if(!isNaN(e)&&!isNaN(j)&&m(e)&&m(j)){b&&(b.attr(a.title),b.css(a.title.style));
4
+ if(f){b=t({},a.shape.params);if(a.units==="values"){for(g in b)u(g,["width","x"])>-1?b[g]=h.translate(b[g]):u(g,["height","y"])>-1&&(b[g]=v.translate(b[g]));b.width&&(b.width-=h.toPixels(0)-h.left);b.x&&(b.x+=h.minPixelPadding);if(a.shape.type==="path"){g=b.d;o=e;for(var r=j,s=g.length,k=0;k<s;)typeof g[k]==="number"&&typeof g[k+1]==="number"?(g[k]=h.toPixels(g[k])-o,g[k+1]=v.toPixels(g[k+1])-r,k+=2):k+=1}}a.shape.type==="circle"&&(b.x+=b.r,b.y+=b.r);f.attr(b)}c.bBox=null;if(!m(l))q=c.getBBox(),l=
5
+ q.width;if(!m(w))q||(q=c.getBBox()),w=q.height;if(!m(y))y=p.center;if(!m(x))x=p.center;e-=l*y;j-=w*x;d.animation&&n(c.translateX)&&n(c.translateY)?c.animate({translateX:e,translateY:j}):c.translate(e,j)}},destroy:function(){var a=this,d=this.chart.annotations.allItems,c=d.indexOf(a);c>-1&&d.splice(c,1);z(["title","shape","group"],function(b){a[b]&&(a[b].destroy(),a[b]=null)});a.group=a.title=a.shape=a.chart=a.options=null},update:function(a,d){t(this.options,a);this.linkObjects();this.render(d)},
6
+ linkObjects:function(){var a=this.chart,d=this.linkedObject,c=d&&(d.id||d.options.id),b=this.options.linkedTo;if(n(b)){if(!n(d)||b!==c)this.linkedObject=a.get(b)}else this.linkedObject=null}};t(s.prototype,{annotations:{add:function(a,d){var c=this.allItems,b=this.chart,f,e;Object.prototype.toString.call(a)==="[object Array]"||(a=[a]);for(e=a.length;e--;)f=new B(b,a[e]),c.push(f),f.render(d)},redraw:function(){z(this.allItems,function(a){a.redraw()})}}});s.prototype.callbacks.push(function(a){var d=
7
+ a.options.annotations,c;c=a.renderer.g("annotations");c.attr({zIndex:7});c.add();a.annotations.allItems=[];a.annotations.chart=a;a.annotations.group=c;Object.prototype.toString.call(d)==="[object Array]"&&d.length>0&&a.annotations.add(a.options.annotations);i.addEvent(a,"redraw",function(){a.annotations.redraw()})})})(Highcharts,HighchartsAdapter);
@@ -0,0 +1,401 @@
1
+ (function (Highcharts, HighchartsAdapter) {
2
+
3
+ var UNDEFINED,
4
+ ALIGN_FACTOR,
5
+ ALLOWED_SHAPES,
6
+ Chart = Highcharts.Chart,
7
+ extend = Highcharts.extend,
8
+ each = Highcharts.each;
9
+
10
+ ALLOWED_SHAPES = ["path", "rect", "circle"];
11
+
12
+ ALIGN_FACTOR = {
13
+ top: 0,
14
+ left: 0,
15
+ center: 0.5,
16
+ middle: 0.5,
17
+ bottom: 1,
18
+ right: 1
19
+ };
20
+
21
+
22
+ // Highcharts helper methods
23
+ var inArray = HighchartsAdapter.inArray,
24
+ merge = Highcharts.merge;
25
+
26
+ function defaultOptions(shapeType) {
27
+ var shapeOptions,
28
+ options;
29
+
30
+ options = {
31
+ xAxis: 0,
32
+ yAxis: 0,
33
+ title: {
34
+ style: {},
35
+ text: "",
36
+ x: 0,
37
+ y: 0
38
+ },
39
+ shape: {
40
+ params: {
41
+ stroke: "#000000",
42
+ fill: "transparent",
43
+ strokeWidth: 2
44
+ }
45
+ }
46
+ };
47
+
48
+ shapeOptions = {
49
+ circle: {
50
+ params: {
51
+ x: 0,
52
+ y: 0
53
+ }
54
+ }
55
+ };
56
+
57
+ if (shapeOptions[shapeType]) {
58
+ options.shape = merge(options.shape, shapeOptions[shapeType]);
59
+ }
60
+
61
+ return options;
62
+ }
63
+
64
+ function isArray(obj) {
65
+ return Object.prototype.toString.call(obj) === '[object Array]';
66
+ }
67
+
68
+ function isNumber(n) {
69
+ return typeof n === 'number';
70
+ }
71
+
72
+ function defined(obj) {
73
+ return obj !== UNDEFINED && obj !== null;
74
+ }
75
+
76
+ function translatePath(d, xAxis, yAxis, xOffset, yOffset) {
77
+ var len = d.length,
78
+ i = 0;
79
+
80
+ while (i < len) {
81
+ if (typeof d[i] === 'number' && typeof d[i + 1] === 'number') {
82
+ d[i] = xAxis.toPixels(d[i]) - xOffset;
83
+ d[i + 1] = yAxis.toPixels(d[i + 1]) - yOffset;
84
+ i += 2;
85
+ } else {
86
+ i += 1;
87
+ }
88
+ }
89
+
90
+ return d;
91
+ }
92
+
93
+
94
+ // Define annotation prototype
95
+ var Annotation = function () {
96
+ this.init.apply(this, arguments);
97
+ };
98
+ Annotation.prototype = {
99
+ /*
100
+ * Initialize the annotation
101
+ */
102
+ init: function (chart, options) {
103
+ var shapeType = options.shape && options.shape.type;
104
+
105
+ this.chart = chart;
106
+ this.options = merge({}, defaultOptions(shapeType), options);
107
+ },
108
+
109
+ /*
110
+ * Render the annotation
111
+ */
112
+ render: function (redraw) {
113
+ var annotation = this,
114
+ chart = this.chart,
115
+ renderer = annotation.chart.renderer,
116
+ group = annotation.group,
117
+ title = annotation.title,
118
+ shape = annotation.shape,
119
+ options = annotation.options,
120
+ titleOptions = options.title,
121
+ shapeOptions = options.shape;
122
+
123
+ if (!group) {
124
+ group = annotation.group = renderer.g();
125
+ }
126
+
127
+
128
+ if (!shape && shapeOptions && inArray(shapeOptions.type, ALLOWED_SHAPES) !== -1) {
129
+ shape = annotation.shape = renderer[options.shape.type](shapeOptions.params);
130
+ shape.add(group);
131
+ }
132
+
133
+ if (!title && titleOptions) {
134
+ title = annotation.title = renderer.label(titleOptions);
135
+ title.add(group);
136
+ }
137
+
138
+ group.add(chart.annotations.group);
139
+
140
+ // link annotations to point or series
141
+ annotation.linkObjects();
142
+
143
+ if (redraw !== false) {
144
+ annotation.redraw();
145
+ }
146
+ },
147
+
148
+ /*
149
+ * Redraw the annotation title or shape after options update
150
+ */
151
+ redraw: function () {
152
+ var options = this.options,
153
+ chart = this.chart,
154
+ group = this.group,
155
+ title = this.title,
156
+ shape = this.shape,
157
+ linkedTo = this.linkedObject,
158
+ xAxis = chart.xAxis[options.xAxis],
159
+ yAxis = chart.yAxis[options.yAxis],
160
+ width = options.width,
161
+ height = options.height,
162
+ anchorY = ALIGN_FACTOR[options.anchorY],
163
+ anchorX = ALIGN_FACTOR[options.anchorX],
164
+ resetBBox = false,
165
+ shapeParams,
166
+ linkType,
167
+ series,
168
+ param,
169
+ bbox,
170
+ x,
171
+ y;
172
+
173
+ if (linkedTo) {
174
+ linkType = (linkedTo instanceof Highcharts.Point) ? 'point' :
175
+ (linkedTo instanceof Highcharts.Series) ? 'series' : null;
176
+
177
+ if (linkType === 'point') {
178
+ options.xValue = linkedTo.x;
179
+ options.yValue = linkedTo.y;
180
+ series = linkedTo.series;
181
+ } else if (linkType === 'series') {
182
+ series = linkedTo;
183
+ }
184
+
185
+ if (group.visibility !== series.group.visibility) {
186
+ group.attr({
187
+ visibility: series.group.visibility
188
+ });
189
+ }
190
+ }
191
+
192
+
193
+ // Based on given options find annotation pixel position
194
+ x = (defined(options.xValue) ? xAxis.toPixels(options.xValue + xAxis.minPointOffset) - xAxis.minPixelPadding : options.x);
195
+ y = defined(options.yValue) ? yAxis.toPixels(options.yValue) : options.y;
196
+
197
+ if (isNaN(x) || isNaN(y) || !isNumber(x) || !isNumber(y)) {
198
+ return;
199
+ }
200
+
201
+
202
+ if (title) {
203
+ title.attr(options.title);
204
+ title.css(options.title.style);
205
+ resetBBox = true;
206
+ }
207
+
208
+ if (shape) {
209
+ shapeParams = extend({}, options.shape.params);
210
+
211
+ if (options.units === 'values') {
212
+ for (param in shapeParams) {
213
+ if (inArray(param, ['width', 'x']) > -1) {
214
+ shapeParams[param] = xAxis.translate(shapeParams[param]);
215
+ } else if (inArray(param, ['height', 'y']) > -1) {
216
+ shapeParams[param] = yAxis.translate(shapeParams[param]);
217
+ }
218
+ }
219
+
220
+ if (shapeParams.width) {
221
+ shapeParams.width -= xAxis.toPixels(0) - xAxis.left;
222
+ }
223
+
224
+ if (shapeParams.x) {
225
+ shapeParams.x += xAxis.minPixelPadding;
226
+ }
227
+
228
+ if (options.shape.type === 'path') {
229
+ translatePath(shapeParams.d, xAxis, yAxis, x, y);
230
+ }
231
+ }
232
+
233
+ // move the center of the circle to shape x/y
234
+ if (options.shape.type === 'circle') {
235
+ shapeParams.x += shapeParams.r;
236
+ shapeParams.y += shapeParams.r;
237
+ }
238
+
239
+ resetBBox = true;
240
+ shape.attr(shapeParams);
241
+ }
242
+
243
+ group.bBox = null;
244
+
245
+ // If annotation width or height is not defined in options use bounding box size
246
+ if (!isNumber(width)) {
247
+ bbox = group.getBBox();
248
+ width = bbox.width;
249
+ }
250
+
251
+ if (!isNumber(height)) {
252
+ // get bbox only if it wasn't set before
253
+ if (!bbox) {
254
+ bbox = group.getBBox();
255
+ }
256
+
257
+ height = bbox.height;
258
+ }
259
+
260
+ // Calculate anchor point
261
+ if (!isNumber(anchorX)) {
262
+ anchorX = ALIGN_FACTOR.center;
263
+ }
264
+
265
+ if (!isNumber(anchorY)) {
266
+ anchorY = ALIGN_FACTOR.center;
267
+ }
268
+
269
+ // Translate group according to its dimension and anchor point
270
+ x = x - width * anchorX;
271
+ y = y - height * anchorY;
272
+
273
+ if (chart.animation && defined(group.translateX) && defined(group.translateY)) {
274
+ group.animate({
275
+ translateX: x,
276
+ translateY: y
277
+ });
278
+ } else {
279
+ group.translate(x, y);
280
+ }
281
+ },
282
+
283
+ /*
284
+ * Destroy the annotation
285
+ */
286
+ destroy: function () {
287
+ var annotation = this,
288
+ chart = this.chart,
289
+ allItems = chart.annotations.allItems,
290
+ index = allItems.indexOf(annotation);
291
+
292
+ if (index > -1) {
293
+ allItems.splice(index, 1);
294
+ }
295
+
296
+ each(['title', 'shape', 'group'], function (element) {
297
+ if (annotation[element]) {
298
+ annotation[element].destroy();
299
+ annotation[element] = null;
300
+ }
301
+ });
302
+
303
+ annotation.group = annotation.title = annotation.shape = annotation.chart = annotation.options = null;
304
+ },
305
+
306
+ /*
307
+ * Update the annotation with a given options
308
+ */
309
+ update: function (options, redraw) {
310
+ extend(this.options, options);
311
+
312
+ // update link to point or series
313
+ this.linkObjects();
314
+
315
+ this.render(redraw);
316
+ },
317
+
318
+ linkObjects: function () {
319
+ var annotation = this,
320
+ chart = annotation.chart,
321
+ linkedTo = annotation.linkedObject,
322
+ linkedId = linkedTo && (linkedTo.id || linkedTo.options.id),
323
+ options = annotation.options,
324
+ id = options.linkedTo;
325
+
326
+ if (!defined(id)) {
327
+ annotation.linkedObject = null;
328
+ } else if (!defined(linkedTo) || id !== linkedId) {
329
+ annotation.linkedObject = chart.get(id);
330
+ }
331
+ }
332
+ };
333
+
334
+
335
+ // Add annotations methods to chart prototype
336
+ extend(Chart.prototype, {
337
+ annotations: {
338
+ /*
339
+ * Unified method for adding annotations to the chart
340
+ */
341
+ add: function (options, redraw) {
342
+ var annotations = this.allItems,
343
+ chart = this.chart,
344
+ item,
345
+ len;
346
+
347
+ if (!isArray(options)) {
348
+ options = [options];
349
+ }
350
+
351
+ len = options.length;
352
+
353
+ while (len--) {
354
+ item = new Annotation(chart, options[len]);
355
+ annotations.push(item);
356
+ item.render(redraw);
357
+ }
358
+ },
359
+
360
+ /**
361
+ * Redraw all annotations, method used in chart events
362
+ */
363
+ redraw: function () {
364
+ each(this.allItems, function (annotation) {
365
+ annotation.redraw();
366
+ });
367
+ }
368
+ }
369
+ });
370
+
371
+
372
+ // Initialize on chart load
373
+ Chart.prototype.callbacks.push(function (chart) {
374
+ var options = chart.options.annotations,
375
+ group;
376
+
377
+ group = chart.renderer.g("annotations");
378
+ group.attr({
379
+ zIndex: 7
380
+ });
381
+ group.add();
382
+
383
+ // initialize empty array for annotations
384
+ chart.annotations.allItems = [];
385
+
386
+ // link chart object to annotations
387
+ chart.annotations.chart = chart;
388
+
389
+ // link annotations group element to the chart
390
+ chart.annotations.group = group;
391
+
392
+ if (isArray(options) && options.length > 0) {
393
+ chart.annotations.add(chart.options.annotations);
394
+ }
395
+
396
+ // update annotations after chart redraw
397
+ Highcharts.addEvent(chart, 'redraw', function () {
398
+ chart.annotations.redraw();
399
+ });
400
+ });
401
+ }(Highcharts, HighchartsAdapter));
@@ -0,0 +1,133 @@
1
+ /*
2
+ A class to parse color values
3
+ @author Stoyan Stefanov <sstoo@gmail.com>
4
+ @link http://www.phpied.com/rgb-color-parser-in-javascript/
5
+ Use it if you like it
6
+
7
+ canvg.js - Javascript SVG parser and renderer on Canvas
8
+ MIT Licensed
9
+ Gabe Lerner (gabelerner@gmail.com)
10
+ http://code.google.com/p/canvg/
11
+
12
+ Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
13
+
14
+ Highcharts JS v3.0.6 (2013-10-04)
15
+ CanVGRenderer Extension module
16
+
17
+ (c) 2011-2012 Torstein Hønsi, Erik Olsson
18
+
19
+ License: www.highcharts.com/license
20
+ */
21
+ function RGBColor(m){this.ok=!1;m.charAt(0)=="#"&&(m=m.substr(1,6));var m=m.replace(/ /g,""),m=m.toLowerCase(),a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",
22
+ darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",
23
+ gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",
24
+ lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",
25
+ oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",
26
+ slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},c;for(c in a)m==c&&(m=a[c]);var d=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(b){return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,
27
+ example:["#00ff00","336699"],process:function(b){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(b){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]}}];for(c=0;c<d.length;c++){var b=d[c].process,k=d[c].re.exec(m);if(k)channels=b(k),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r;this.g=this.g<0||isNaN(this.g)?0:
28
+ this.g>255?255:this.g;this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var b=this.r.toString(16),a=this.g.toString(16),d=this.b.toString(16);b.length==1&&(b="0"+b);a.length==1&&(a="0"+a);d.length==1&&(d="0"+d);return"#"+b+a+d};this.getHelpXML=function(){for(var b=[],k=0;k<d.length;k++)for(var c=d[k].example,j=0;j<c.length;j++)b[b.length]=c[j];for(var h in a)b[b.length]=h;c=document.createElement("ul");
29
+ c.setAttribute("id","rgbcolor-examples");for(k=0;k<b.length;k++)try{var l=document.createElement("li"),o=new RGBColor(b[k]),n=document.createElement("div");n.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex();n.appendChild(document.createTextNode("test"));var q=document.createTextNode(" "+b[k]+" -> "+o.toRGB()+" -> "+o.toHex());l.appendChild(n);l.appendChild(q);c.appendChild(l)}catch(p){}return c}}
30
+ if(!window.console)window.console={},window.console.log=function(){},window.console.dir=function(){};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(m){for(var a=0;a<this.length;a++)if(this[a]==m)return a;return-1};
31
+ (function(){function m(){var a={FRAMERATE:30,MAX_VIRTUAL_PIXELS:3E4};a.init=function(c){a.Definitions={};a.Styles={};a.Animations=[];a.Images=[];a.ctx=c;a.ViewPort=new function(){this.viewPorts=[];this.Clear=function(){this.viewPorts=[]};this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})};this.RemoveCurrent=function(){this.viewPorts.pop()};this.Current=function(){return this.viewPorts[this.viewPorts.length-1]};this.width=function(){return this.Current().width};this.height=function(){return this.Current().height};
32
+ this.ComputeSize=function(a){return a!=null&&typeof a=="number"?a:a=="x"?this.width():a=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}};a.init();a.ImagesLoaded=function(){for(var c=0;c<a.Images.length;c++)if(!a.Images[c].loaded)return!1;return!0};a.trim=function(a){return a.replace(/^\s+|\s+$/g,"")};a.compressSpaces=function(a){return a.replace(/[\s\r\t\n]+/gm," ")};a.ajax=function(a){var d;return(d=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?
33
+ (d.open("GET",a,!1),d.send(null),d.responseText):null};a.parseXml=function(a){if(window.DOMParser)return(new DOMParser).parseFromString(a,"text/xml");else{var a=a.replace(/<!DOCTYPE svg[^>]*>/,""),d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(a);return d}};a.Property=function(c,d){this.name=c;this.value=d;this.hasValue=function(){return this.value!=null&&this.value!==""};this.numValue=function(){if(!this.hasValue())return 0;var b=parseFloat(this.value);(this.value+"").match(/%$/)&&
34
+ (b/=100);return b};this.valueOrDefault=function(b){return this.hasValue()?this.value:b};this.numValueOrDefault=function(b){return this.hasValue()?this.numValue():b};var b=this;this.Color={addOpacity:function(d){var c=b.value;if(d!=null&&d!=""){var f=new RGBColor(b.value);f.ok&&(c="rgba("+f.r+", "+f.g+", "+f.b+", "+d+")")}return new a.Property(b.name,c)}};this.Definition={getDefinition:function(){var d=b.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return a.Definitions[d]},isUrl:function(){return b.value.indexOf("url(")==
35
+ 0},getFillStyle:function(b){var d=this.getDefinition();return d!=null&&d.createGradient?d.createGradient(a.ctx,b):d!=null&&d.createPattern?d.createPattern(a.ctx,b):null}};this.Length={DPI:function(){return 96},EM:function(b){var d=12,c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);c.hasValue()&&(d=c.Length.toPixels(b));return d},toPixels:function(d){if(!b.hasValue())return 0;var c=b.value+"";return c.match(/em$/)?b.numValue()*this.EM(d):c.match(/ex$/)?b.numValue()*this.EM(d)/2:c.match(/px$/)?
36
+ b.numValue():c.match(/pt$/)?b.numValue()*1.25:c.match(/pc$/)?b.numValue()*15:c.match(/cm$/)?b.numValue()*this.DPI(d)/2.54:c.match(/mm$/)?b.numValue()*this.DPI(d)/25.4:c.match(/in$/)?b.numValue()*this.DPI(d):c.match(/%$/)?b.numValue()*a.ViewPort.ComputeSize(d):b.numValue()}};this.Time={toMilliseconds:function(){if(!b.hasValue())return 0;var a=b.value+"";if(a.match(/s$/))return b.numValue()*1E3;a.match(/ms$/);return b.numValue()}};this.Angle={toRadians:function(){if(!b.hasValue())return 0;var a=b.value+
37
+ "";return a.match(/deg$/)?b.numValue()*(Math.PI/180):a.match(/grad$/)?b.numValue()*(Math.PI/200):a.match(/rad$/)?b.numValue():b.numValue()*(Math.PI/180)}}};a.Font=new function(){this.Styles=["normal","italic","oblique","inherit"];this.Variants=["normal","small-caps","inherit"];this.Weights="normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",");this.CreateFont=function(d,b,c,e,f,g){g=g!=null?this.Parse(g):this.CreateFont("","","","","",a.ctx.font);return{fontFamily:f||
38
+ g.fontFamily,fontSize:e||g.fontSize,fontStyle:d||g.fontStyle,fontWeight:c||g.fontWeight,fontVariant:b||g.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var c=this;this.Parse=function(d){for(var b={},d=a.trim(a.compressSpaces(d||"")).split(" "),k=!1,e=!1,f=!1,g=!1,j="",h=0;h<d.length;h++)if(!e&&c.Styles.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontStyle=d[h];e=!0}else if(!g&&c.Variants.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontVariant=
39
+ d[h];e=g=!0}else if(!f&&c.Weights.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontWeight=d[h];e=g=f=!0}else if(k)d[h]!="inherit"&&(j+=d[h]);else{if(d[h]!="inherit")b.fontSize=d[h].split("/")[0];e=g=f=k=!0}if(j!="")b.fontFamily=j;return b}};a.ToNumberArray=function(c){for(var c=a.trim(a.compressSpaces((c||"").replace(/,/g," "))).split(" "),d=0;d<c.length;d++)c[d]=parseFloat(c[d]);return c};a.Point=function(a,d){this.x=a;this.y=d;this.angleTo=function(b){return Math.atan2(b.y-this.y,b.x-this.x)};this.applyTransform=
40
+ function(b){var a=this.x*b[1]+this.y*b[3]+b[5];this.x=this.x*b[0]+this.y*b[2]+b[4];this.y=a}};a.CreatePoint=function(c){c=a.ToNumberArray(c);return new a.Point(c[0],c[1])};a.CreatePath=function(c){for(var c=a.ToNumberArray(c),d=[],b=0;b<c.length;b+=2)d.push(new a.Point(c[b],c[b+1]));return d};a.BoundingBox=function(a,d,b,k){this.y2=this.x2=this.y1=this.x1=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-
41
+ this.y1};this.addPoint=function(b,a){if(b!=null){if(isNaN(this.x1)||isNaN(this.x2))this.x2=this.x1=b;if(b<this.x1)this.x1=b;if(b>this.x2)this.x2=b}if(a!=null){if(isNaN(this.y1)||isNaN(this.y2))this.y2=this.y1=a;if(a<this.y1)this.y1=a;if(a>this.y2)this.y2=a}};this.addX=function(b){this.addPoint(b,null)};this.addY=function(b){this.addPoint(null,b)};this.addBoundingBox=function(b){this.addPoint(b.x1,b.y1);this.addPoint(b.x2,b.y2)};this.addQuadraticCurve=function(b,a,d,c,k,l){d=b+2/3*(d-b);c=a+2/3*(c-
42
+ a);this.addBezierCurve(b,a,d,d+1/3*(k-b),c,c+1/3*(l-a),k,l)};this.addBezierCurve=function(b,a,d,c,k,l,o,n){var q=[b,a],p=[d,c],t=[k,l],m=[o,n];this.addPoint(q[0],q[1]);this.addPoint(m[0],m[1]);for(i=0;i<=1;i++)b=function(b){return Math.pow(1-b,3)*q[i]+3*Math.pow(1-b,2)*b*p[i]+3*(1-b)*Math.pow(b,2)*t[i]+Math.pow(b,3)*m[i]},a=6*q[i]-12*p[i]+6*t[i],d=-3*q[i]+9*p[i]-9*t[i]+3*m[i],c=3*p[i]-3*q[i],d==0?a!=0&&(a=-c/a,0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))):(c=Math.pow(a,2)-4*c*d,c<0||(k=
43
+ (-a+Math.sqrt(c))/(2*d),0<k&&k<1&&(i==0&&this.addX(b(k)),i==1&&this.addY(b(k))),a=(-a-Math.sqrt(c))/(2*d),0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))))};this.isPointInBox=function(b,a){return this.x1<=b&&b<=this.x2&&this.y1<=a&&a<=this.y2};this.addPoint(a,d);this.addPoint(b,k)};a.Transform=function(c){var d=this;this.Type={};this.Type.translate=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.translate(this.p.x||0,this.p.y||0)};this.applyToPoint=function(b){b.applyTransform([1,
44
+ 0,0,1,this.p.x||0,this.p.y||0])}};this.Type.rotate=function(b){b=a.ToNumberArray(b);this.angle=new a.Property("angle",b[0]);this.cx=b[1]||0;this.cy=b[2]||0;this.apply=function(b){b.translate(this.cx,this.cy);b.rotate(this.angle.Angle.toRadians());b.translate(-this.cx,-this.cy)};this.applyToPoint=function(b){var a=this.angle.Angle.toRadians();b.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]);b.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]);b.applyTransform([1,0,0,1,-this.p.x||
45
+ 0,-this.p.y||0])}};this.Type.scale=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.scale(this.p.x||1,this.p.y||this.p.x||1)};this.applyToPoint=function(b){b.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}};this.Type.matrix=function(b){this.m=a.ToNumberArray(b);this.apply=function(b){b.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])};this.applyToPoint=function(b){b.applyTransform(this.m)}};this.Type.SkewBase=function(b){this.base=d.Type.matrix;this.base(b);this.angle=
46
+ new a.Property("angle",b)};this.Type.SkewBase.prototype=new this.Type.matrix;this.Type.skewX=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,0,Math.tan(this.angle.Angle.toRadians()),1,0,0]};this.Type.skewX.prototype=new this.Type.SkewBase;this.Type.skewY=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,Math.tan(this.angle.Angle.toRadians()),0,1,0,0]};this.Type.skewY.prototype=new this.Type.SkewBase;this.transforms=[];this.apply=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].apply(b)};
47
+ this.applyToPoint=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].applyToPoint(b)};for(var c=a.trim(a.compressSpaces(c)).split(/\s(?=[a-z])/),b=0;b<c.length;b++){var k=c[b].split("(")[0],e=c[b].split("(")[1].replace(")","");this.transforms.push(new this.Type[k](e))}};a.AspectRatio=function(c,d,b,k,e,f,g,j,h,l){var d=a.compressSpaces(d),d=d.replace(/^defer\s/,""),o=d.split(" ")[0]||"xMidYMid",d=d.split(" ")[1]||"meet",n=b/k,q=e/f,p=Math.min(n,q),m=Math.max(n,q);d=="meet"&&(k*=
48
+ p,f*=p);d=="slice"&&(k*=m,f*=m);h=new a.Property("refX",h);l=new a.Property("refY",l);h.hasValue()&&l.hasValue()?c.translate(-p*h.Length.toPixels("x"),-p*l.Length.toPixels("y")):(o.match(/^xMid/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b/2-k/2,0),o.match(/YMid$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e/2-f/2),o.match(/^xMax/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b-k,0),o.match(/YMax$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e-f));o=="none"?c.scale(n,
49
+ q):d=="meet"?c.scale(p,p):d=="slice"&&c.scale(m,m);c.translate(g==null?0:-g,j==null?0:-j)};a.Element={};a.Element.ElementBase=function(c){this.attributes={};this.styles={};this.children=[];this.attribute=function(b,d){var c=this.attributes[b];if(c!=null)return c;c=new a.Property(b,"");d==!0&&(this.attributes[b]=c);return c};this.style=function(b,d){var c=this.styles[b];if(c!=null)return c;c=this.attribute(b);if(c!=null&&c.hasValue())return c;c=this.parent;if(c!=null&&(c=c.style(b),c!=null&&c.hasValue()))return c;
50
+ c=new a.Property(b,"");d==!0&&(this.styles[b]=c);return c};this.render=function(b){if(this.style("display").value!="none"&&this.attribute("visibility").value!="hidden"){b.save();this.setContext(b);if(this.attribute("mask").hasValue()){var a=this.attribute("mask").Definition.getDefinition();a!=null&&a.apply(b,this)}else this.style("filter").hasValue()?(a=this.style("filter").Definition.getDefinition(),a!=null&&a.apply(b,this)):this.renderChildren(b);this.clearContext(b);b.restore()}};this.setContext=
51
+ function(){};this.clearContext=function(){};this.renderChildren=function(b){for(var a=0;a<this.children.length;a++)this.children[a].render(b)};this.addChild=function(b,d){var c=b;d&&(c=a.CreateElement(b));c.parent=this;this.children.push(c)};if(c!=null&&c.nodeType==1){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1&&this.addChild(b,!0)}for(d=0;d<c.attributes.length;d++)b=c.attributes[d],this.attributes[b.nodeName]=new a.Property(b.nodeName,b.nodeValue);b=a.Styles[c.nodeName];
52
+ if(b!=null)for(var k in b)this.styles[k]=b[k];if(this.attribute("class").hasValue())for(var d=a.compressSpaces(this.attribute("class").value).split(" "),e=0;e<d.length;e++){b=a.Styles["."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k];b=a.Styles[c.nodeName+"."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k]}if(this.attribute("style").hasValue()){b=this.attribute("style").value.split(";");for(d=0;d<b.length;d++)a.trim(b[d])!=""&&(c=b[d].split(":"),k=a.trim(c[0]),c=a.trim(c[1]),this.styles[k]=new a.Property(k,
53
+ c))}this.attribute("id").hasValue()&&a.Definitions[this.attribute("id").value]==null&&(a.Definitions[this.attribute("id").value]=this)}};a.Element.RenderedElementBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.setContext=function(d){if(this.style("fill").Definition.isUrl()){var b=this.style("fill").Definition.getFillStyle(this);if(b!=null)d.fillStyle=b}else if(this.style("fill").hasValue())b=this.style("fill"),this.style("fill-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("fill-opacity").value)),
54
+ d.fillStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke").Definition.isUrl()){if(b=this.style("stroke").Definition.getFillStyle(this),b!=null)d.strokeStyle=b}else if(this.style("stroke").hasValue())b=this.style("stroke"),this.style("stroke-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("stroke-opacity").value)),d.strokeStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke-width").hasValue())d.lineWidth=this.style("stroke-width").Length.toPixels();if(this.style("stroke-linecap").hasValue())d.lineCap=
55
+ this.style("stroke-linecap").value;if(this.style("stroke-linejoin").hasValue())d.lineJoin=this.style("stroke-linejoin").value;if(this.style("stroke-miterlimit").hasValue())d.miterLimit=this.style("stroke-miterlimit").value;if(typeof d.font!="undefined")d.font=a.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").Length.toPixels()+"px":"",this.style("font-family").value).toString();
56
+ this.attribute("transform").hasValue()&&(new a.Transform(this.attribute("transform").value)).apply(d);this.attribute("clip-path").hasValue()&&(b=this.attribute("clip-path").Definition.getDefinition(),b!=null&&b.apply(d));if(this.style("opacity").hasValue())d.globalAlpha=this.style("opacity").numValue()}};a.Element.RenderedElementBase.prototype=new a.Element.ElementBase;a.Element.PathElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.path=function(d){d!=null&&d.beginPath();
57
+ return new a.BoundingBox};this.renderChildren=function(d){this.path(d);a.Mouse.checkPath(this,d);d.fillStyle!=""&&d.fill();d.strokeStyle!=""&&d.stroke();var b=this.getMarkers();if(b!=null){if(this.style("marker-start").Definition.isUrl()){var c=this.style("marker-start").Definition.getDefinition();c.render(d,b[0][0],b[0][1])}if(this.style("marker-mid").Definition.isUrl())for(var c=this.style("marker-mid").Definition.getDefinition(),e=1;e<b.length-1;e++)c.render(d,b[e][0],b[e][1]);this.style("marker-end").Definition.isUrl()&&
58
+ (c=this.style("marker-end").Definition.getDefinition(),c.render(d,b[b.length-1][0],b[b.length-1][1]))}};this.getBoundingBox=function(){return this.path()};this.getMarkers=function(){return null}};a.Element.PathElementBase.prototype=new a.Element.RenderedElementBase;a.Element.svg=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseClearContext=this.clearContext;this.clearContext=function(d){this.baseClearContext(d);a.ViewPort.RemoveCurrent()};this.baseSetContext=this.setContext;
59
+ this.setContext=function(d){d.strokeStyle="rgba(0,0,0,0)";d.lineCap="butt";d.lineJoin="miter";d.miterLimit=4;this.baseSetContext(d);this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&d.translate(this.attribute("x").Length.toPixels("x"),this.attribute("y").Length.toPixels("y"));var b=a.ViewPort.width(),c=a.ViewPort.height();if(typeof this.root=="undefined"&&this.attribute("width").hasValue()&&this.attribute("height").hasValue()){var b=this.attribute("width").Length.toPixels("x"),c=this.attribute("height").Length.toPixels("y"),
60
+ e=0,f=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(e=-this.attribute("refX").Length.toPixels("x"),f=-this.attribute("refY").Length.toPixels("y"));d.beginPath();d.moveTo(e,f);d.lineTo(b,f);d.lineTo(b,c);d.lineTo(e,c);d.closePath();d.clip()}a.ViewPort.SetCurrent(b,c);if(this.attribute("viewBox").hasValue()){var e=a.ToNumberArray(this.attribute("viewBox").value),f=e[0],g=e[1],b=e[2],c=e[3];a.AspectRatio(d,this.attribute("preserveAspectRatio").value,a.ViewPort.width(),b,a.ViewPort.height(),
61
+ c,f,g,this.attribute("refX").value,this.attribute("refY").value);a.ViewPort.RemoveCurrent();a.ViewPort.SetCurrent(e[2],e[3])}}};a.Element.svg.prototype=new a.Element.RenderedElementBase;a.Element.rect=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("x").Length.toPixels("x"),c=this.attribute("y").Length.toPixels("y"),e=this.attribute("width").Length.toPixels("x"),f=this.attribute("height").Length.toPixels("y"),g=this.attribute("rx").Length.toPixels("x"),
62
+ j=this.attribute("ry").Length.toPixels("y");this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(j=g);this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=j);d!=null&&(d.beginPath(),d.moveTo(b+g,c),d.lineTo(b+e-g,c),d.quadraticCurveTo(b+e,c,b+e,c+j),d.lineTo(b+e,c+f-j),d.quadraticCurveTo(b+e,c+f,b+e-g,c+f),d.lineTo(b+g,c+f),d.quadraticCurveTo(b,c+f,b,c+f-j),d.lineTo(b,c+j),d.quadraticCurveTo(b,c,b+g,c),d.closePath());return new a.BoundingBox(b,c,b+e,c+f)}};a.Element.rect.prototype=
63
+ new a.Element.PathElementBase;a.Element.circle=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("cx").Length.toPixels("x"),c=this.attribute("cy").Length.toPixels("y"),e=this.attribute("r").Length.toPixels();d!=null&&(d.beginPath(),d.arc(b,c,e,0,Math.PI*2,!0),d.closePath());return new a.BoundingBox(b-e,c-e,b+e,c+e)}};a.Element.circle.prototype=new a.Element.PathElementBase;a.Element.ellipse=function(c){this.base=a.Element.PathElementBase;this.base(c);
64
+ this.path=function(d){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").Length.toPixels("x"),e=this.attribute("ry").Length.toPixels("y"),f=this.attribute("cx").Length.toPixels("x"),g=this.attribute("cy").Length.toPixels("y");d!=null&&(d.beginPath(),d.moveTo(f,g-e),d.bezierCurveTo(f+b*c,g-e,f+c,g-b*e,f+c,g),d.bezierCurveTo(f+c,g+b*e,f+b*c,g+e,f,g+e),d.bezierCurveTo(f-b*c,g+e,f-c,g+b*e,f-c,g),d.bezierCurveTo(f-c,g-b*e,f-b*c,g-e,f,g-e),d.closePath());return new a.BoundingBox(f-c,g-e,f+c,g+e)}};a.Element.ellipse.prototype=
65
+ new a.Element.PathElementBase;a.Element.line=function(c){this.base=a.Element.PathElementBase;this.base(c);this.getPoints=function(){return[new a.Point(this.attribute("x1").Length.toPixels("x"),this.attribute("y1").Length.toPixels("y")),new a.Point(this.attribute("x2").Length.toPixels("x"),this.attribute("y2").Length.toPixels("y"))]};this.path=function(d){var b=this.getPoints();d!=null&&(d.beginPath(),d.moveTo(b[0].x,b[0].y),d.lineTo(b[1].x,b[1].y));return new a.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)};
66
+ this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}};a.Element.line.prototype=new a.Element.PathElementBase;a.Element.polyline=function(c){this.base=a.Element.PathElementBase;this.base(c);this.points=a.CreatePath(this.attribute("points").value);this.path=function(d){var b=new a.BoundingBox(this.points[0].x,this.points[0].y);d!=null&&(d.beginPath(),d.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,
67
+ this.points[c].y),d!=null&&d.lineTo(this.points[c].x,this.points[c].y);return b};this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);a.push([this.points[this.points.length-1],a[a.length-1][1]]);return a}};a.Element.polyline.prototype=new a.Element.PathElementBase;a.Element.polygon=function(c){this.base=a.Element.polyline;this.base(c);this.basePath=this.path;this.path=function(a){var b=this.basePath(a);a!=null&&(a.lineTo(this.points[0].x,
68
+ this.points[0].y),a.closePath());return b}};a.Element.polygon.prototype=new a.Element.polyline;a.Element.path=function(c){this.base=a.Element.PathElementBase;this.base(c);c=this.attribute("d").value;c=c.replace(/,/gm," ");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");c=c.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([0-9])([+\-])/gm,
69
+ "$1 $2");c=c.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");c=c.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");c=a.compressSpaces(c);c=a.trim(c);this.PathParser=new function(d){this.tokens=d.split(" ");this.reset=function(){this.i=-1;this.previousCommand=this.command="";this.start=new a.Point(0,0);this.control=new a.Point(0,0);this.current=new a.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){return this.isEnd()?
70
+ !0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()};this.getToken=function(){this.i+=1;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){return this.makeAbsolute(new a.Point(this.getScalar(),this.getScalar()))};this.getAsControlPoint=function(){var b=this.getPoint();
71
+ return this.control=b};this.getAsCurrentPoint=function(){var b=this.getPoint();return this.current=b};this.getReflectedControlPoint=function(){return this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"?this.current:new a.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)};this.makeAbsolute=function(b){if(this.isRelativeCommand())b.x=this.current.x+b.x,b.y=this.current.y+b.y;return b};this.addMarker=function(b,a,d){d!=null&&this.angles.length>0&&this.angles[this.angles.length-
72
+ 1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(d));this.addMarkerAngle(b,a==null?null:a.angleTo(b))};this.addMarkerAngle=function(b,a){this.points.push(b);this.angles.push(a)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var b=0;b<this.angles.length;b++)if(this.angles[b]==null)for(var a=b+1;a<this.angles.length;a++)if(this.angles[a]!=null){this.angles[b]=this.angles[a];break}return this.angles}}(c);this.path=function(d){var b=
73
+ this.PathParser;b.reset();var c=new a.BoundingBox;for(d!=null&&d.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command.toUpperCase()){case "M":var e=b.getAsCurrentPoint();b.addMarker(e);c.addPoint(e.x,e.y);d!=null&&d.moveTo(e.x,e.y);for(b.start=b.current;!b.isCommandOrEnd();)e=b.getAsCurrentPoint(),b.addMarker(e,b.start),c.addPoint(e.x,e.y),d!=null&&d.lineTo(e.x,e.y);break;case "L":for(;!b.isCommandOrEnd();){var f=b.current,e=b.getAsCurrentPoint();b.addMarker(e,f);c.addPoint(e.x,e.y);d!=null&&
74
+ d.lineTo(e.x,e.y)}break;case "H":for(;!b.isCommandOrEnd();)e=new a.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "V":for(;!b.isCommandOrEnd();)e=new a.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar()),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "C":for(;!b.isCommandOrEnd();){var g=
75
+ b.current,f=b.getPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint();b.addMarker(e,j,f);c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y);d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y)}break;case "S":for(;!b.isCommandOrEnd();)g=b.current,f=b.getReflectedControlPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint(),b.addMarker(e,j,f),c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y),d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y);break;case "Q":for(;!b.isCommandOrEnd();)g=b.current,j=b.getAsControlPoint(),
76
+ e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "T":for(;!b.isCommandOrEnd();)g=b.current,j=b.getReflectedControlPoint(),b.control=j,e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "A":for(;!b.isCommandOrEnd();){var g=b.current,h=b.getScalar(),l=b.getScalar(),f=b.getScalar()*(Math.PI/180),o=b.getScalar(),j=b.getScalar(),
77
+ e=b.getAsCurrentPoint(),n=new a.Point(Math.cos(f)*(g.x-e.x)/2+Math.sin(f)*(g.y-e.y)/2,-Math.sin(f)*(g.x-e.x)/2+Math.cos(f)*(g.y-e.y)/2),q=Math.pow(n.x,2)/Math.pow(h,2)+Math.pow(n.y,2)/Math.pow(l,2);q>1&&(h*=Math.sqrt(q),l*=Math.sqrt(q));o=(o==j?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(l,2)-Math.pow(h,2)*Math.pow(n.y,2)-Math.pow(l,2)*Math.pow(n.x,2))/(Math.pow(h,2)*Math.pow(n.y,2)+Math.pow(l,2)*Math.pow(n.x,2)));isNaN(o)&&(o=0);var p=new a.Point(o*h*n.y/l,o*-l*n.x/h),g=new a.Point((g.x+e.x)/2+Math.cos(f)*
78
+ p.x-Math.sin(f)*p.y,(g.y+e.y)/2+Math.sin(f)*p.x+Math.cos(f)*p.y),m=function(b,a){return(b[0]*a[0]+b[1]*a[1])/(Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2))*Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)))},s=function(b,a){return(b[0]*a[1]<b[1]*a[0]?-1:1)*Math.acos(m(b,a))},o=s([1,0],[(n.x-p.x)/h,(n.y-p.y)/l]),q=[(n.x-p.x)/h,(n.y-p.y)/l],p=[(-n.x-p.x)/h,(-n.y-p.y)/l],n=s(q,p);if(m(q,p)<=-1)n=Math.PI;m(q,p)>=1&&(n=0);j==0&&n>0&&(n-=2*Math.PI);j==1&&n<0&&(n+=2*Math.PI);q=new a.Point(g.x-h*Math.cos((o+n)/
79
+ 2),g.y-l*Math.sin((o+n)/2));b.addMarkerAngle(q,(o+n)/2+(j==0?1:-1)*Math.PI/2);b.addMarkerAngle(e,n+(j==0?1:-1)*Math.PI/2);c.addPoint(e.x,e.y);d!=null&&(m=h>l?h:l,e=h>l?1:h/l,h=h>l?l/h:1,d.translate(g.x,g.y),d.rotate(f),d.scale(e,h),d.arc(0,0,m,o,o+n,1-j),d.scale(1/e,1/h),d.rotate(-f),d.translate(-g.x,-g.y))}break;case "Z":d!=null&&d.closePath(),b.current=b.start}return c};this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],e=0;e<a.length;e++)c.push([a[e],
80
+ b[e]]);return c}};a.Element.path.prototype=new a.Element.PathElementBase;a.Element.pattern=function(c){this.base=a.Element.ElementBase;this.base(c);this.createPattern=function(d){var b=new a.Element.svg;b.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);b.attributes.x=new a.Property("x",this.attribute("x").value);b.attributes.y=new a.Property("y",this.attribute("y").value);b.attributes.width=new a.Property("width",this.attribute("width").value);b.attributes.height=new a.Property("height",
81
+ this.attribute("height").value);b.children=this.children;var c=document.createElement("canvas");c.width=this.attribute("width").Length.toPixels("x");c.height=this.attribute("height").Length.toPixels("y");b.render(c.getContext("2d"));return d.createPattern(c,"repeat")}};a.Element.pattern.prototype=new a.Element.ElementBase;a.Element.marker=function(c){this.base=a.Element.ElementBase;this.base(c);this.baseRender=this.render;this.render=function(d,b,c){d.translate(b.x,b.y);this.attribute("orient").valueOrDefault("auto")==
82
+ "auto"&&d.rotate(c);this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(d.lineWidth,d.lineWidth);d.save();var e=new a.Element.svg;e.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);e.attributes.refX=new a.Property("refX",this.attribute("refX").value);e.attributes.refY=new a.Property("refY",this.attribute("refY").value);e.attributes.width=new a.Property("width",this.attribute("markerWidth").value);e.attributes.height=new a.Property("height",
83
+ this.attribute("markerHeight").value);e.attributes.fill=new a.Property("fill",this.attribute("fill").valueOrDefault("black"));e.attributes.stroke=new a.Property("stroke",this.attribute("stroke").valueOrDefault("none"));e.children=this.children;e.render(d);d.restore();this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(1/d.lineWidth,1/d.lineWidth);this.attribute("orient").valueOrDefault("auto")=="auto"&&d.rotate(-c);d.translate(-b.x,-b.y)}};a.Element.marker.prototype=
84
+ new a.Element.ElementBase;a.Element.defs=function(c){this.base=a.Element.ElementBase;this.base(c);this.render=function(){}};a.Element.defs.prototype=new a.Element.ElementBase;a.Element.GradientBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox");this.stops=[];for(c=0;c<this.children.length;c++)this.stops.push(this.children[c]);this.getGradient=function(){};this.createGradient=function(d,b){var c=this;this.attribute("xlink:href").hasValue()&&
85
+ (c=this.attribute("xlink:href").Definition.getDefinition());for(var e=this.getGradient(d,b),f=0;f<c.stops.length;f++)e.addColorStop(c.stops[f].offset,c.stops[f].color);if(this.attribute("gradientTransform").hasValue()){c=a.ViewPort.viewPorts[0];f=new a.Element.rect;f.attributes.x=new a.Property("x",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.y=new a.Property("y",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.width=new a.Property("width",a.MAX_VIRTUAL_PIXELS);f.attributes.height=new a.Property("height",a.MAX_VIRTUAL_PIXELS);
86
+ var g=new a.Element.g;g.attributes.transform=new a.Property("transform",this.attribute("gradientTransform").value);g.children=[f];f=new a.Element.svg;f.attributes.x=new a.Property("x",0);f.attributes.y=new a.Property("y",0);f.attributes.width=new a.Property("width",c.width);f.attributes.height=new a.Property("height",c.height);f.children=[g];g=document.createElement("canvas");g.width=c.width;g.height=c.height;c=g.getContext("2d");c.fillStyle=e;f.render(c);return c.createPattern(g,"no-repeat")}return e}};
87
+ a.Element.GradientBase.prototype=new a.Element.ElementBase;a.Element.linearGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").Length.toPixels("y"),g=this.gradientUnits=="objectBoundingBox"?
88
+ c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").Length.toPixels("x"),c=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").Length.toPixels("y");return a.createLinearGradient(e,f,g,c)}};a.Element.linearGradient.prototype=new a.Element.GradientBase;a.Element.radialGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?
89
+ c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").Length.toPixels("y"),g=e,j=f;this.attribute("fx").hasValue()&&(g=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").Length.toPixels("x"));this.attribute("fy").hasValue()&&(j=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("fy").numValue():
90
+ this.attribute("fy").Length.toPixels("y"));c=this.gradientUnits=="objectBoundingBox"?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").Length.toPixels();return a.createRadialGradient(g,j,0,e,f,c)}};a.Element.radialGradient.prototype=new a.Element.GradientBase;a.Element.stop=function(c){this.base=a.Element.ElementBase;this.base(c);this.offset=this.attribute("offset").numValue();c=this.style("stop-color");this.style("stop-opacity").hasValue()&&(c=c.Color.addOpacity(this.style("stop-opacity").value));
91
+ this.color=c.value};a.Element.stop.prototype=new a.Element.ElementBase;a.Element.AnimateBase=function(c){this.base=a.Element.ElementBase;this.base(c);a.Animations.push(this);this.duration=0;this.begin=this.attribute("begin").Time.toMilliseconds();this.maxDuration=this.begin+this.attribute("dur").Time.toMilliseconds();this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return a=="CSS"?this.parent.style(b,!0):this.parent.attribute(b,!0)};this.initialValue=
92
+ null;this.removed=!1;this.calcValue=function(){return""};this.update=function(a){if(this.initialValue==null)this.initialValue=this.getProperty().value;if(this.duration>this.maxDuration)if(this.attribute("repeatCount").value=="indefinite")this.duration=0;else return this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed?(this.removed=!0,this.getProperty().value=this.initialValue,!0):!1;this.duration+=a;a=!1;if(this.begin<this.duration)a=this.calcValue(),this.attribute("type").hasValue()&&
93
+ (a=this.attribute("type").value+"("+a+")"),this.getProperty().value=a,a=!0;return a};this.progress=function(){return(this.duration-this.begin)/(this.maxDuration-this.begin)}};a.Element.AnimateBase.prototype=new a.Element.ElementBase;a.Element.animate=function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=this.attribute("from").numValue(),b=this.attribute("to").numValue();return a+(b-a)*this.progress()}};a.Element.animate.prototype=new a.Element.AnimateBase;a.Element.animateColor=
94
+ function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=new RGBColor(this.attribute("from").value),b=new RGBColor(this.attribute("to").value);if(a.ok&&b.ok){var c=a.r+(b.r-a.r)*this.progress(),e=a.g+(b.g-a.g)*this.progress(),a=a.b+(b.b-a.b)*this.progress();return"rgb("+parseInt(c,10)+","+parseInt(e,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}};a.Element.animateColor.prototype=new a.Element.AnimateBase;a.Element.animateTransform=function(c){this.base=
95
+ a.Element.animate;this.base(c)};a.Element.animateTransform.prototype=new a.Element.animate;a.Element.font=function(c){this.base=a.Element.ElementBase;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.isArabic=this.isRTL=!1;this.missingGlyph=this.fontFace=null;this.glyphs=[];for(c=0;c<this.children.length;c++){var d=this.children[c];if(d.type=="font-face")this.fontFace=d,d.style("font-family").hasValue()&&(a.Definitions[d.style("font-family").value]=this);else if(d.type=="missing-glyph")this.missingGlyph=
96
+ d;else if(d.type=="glyph")d.arabicForm!=""?(this.isArabic=this.isRTL=!0,typeof this.glyphs[d.unicode]=="undefined"&&(this.glyphs[d.unicode]=[]),this.glyphs[d.unicode][d.arabicForm]=d):this.glyphs[d.unicode]=d}};a.Element.font.prototype=new a.Element.ElementBase;a.Element.fontface=function(c){this.base=a.Element.ElementBase;this.base(c);this.ascent=this.attribute("ascent").value;this.descent=this.attribute("descent").value;this.unitsPerEm=this.attribute("units-per-em").numValue()};a.Element.fontface.prototype=
97
+ new a.Element.ElementBase;a.Element.missingglyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=0};a.Element.missingglyph.prototype=new a.Element.path;a.Element.glyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.unicode=this.attribute("unicode").value;this.arabicForm=this.attribute("arabic-form").value};a.Element.glyph.prototype=new a.Element.path;a.Element.text=function(c){this.base=a.Element.RenderedElementBase;
98
+ this.base(c);if(c!=null){this.children=[];for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1?this.addChild(b,!0):b.nodeType==3&&this.addChild(new a.Element.tspan(b),!1)}}this.baseSetContext=this.setContext;this.setContext=function(b){this.baseSetContext(b);if(this.style("dominant-baseline").hasValue())b.textBaseline=this.style("dominant-baseline").value;if(this.style("alignment-baseline").hasValue())b.textBaseline=this.style("alignment-baseline").value};this.renderChildren=
99
+ function(b){for(var a=this.style("text-anchor").valueOrDefault("start"),c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),j=0;j<this.children.length;j++){var h=this.children[j];h.attribute("x").hasValue()?h.x=h.attribute("x").Length.toPixels("x"):(h.attribute("dx").hasValue()&&(c+=h.attribute("dx").Length.toPixels("x")),h.x=c);c=h.measureText(b);if(a!="start"&&(j==0||h.attribute("x").hasValue())){for(var l=c,o=j+1;o<this.children.length;o++){var n=this.children[o];
100
+ if(n.attribute("x").hasValue())break;l+=n.measureText(b)}h.x-=a=="end"?l:l/2}c=h.x+c;h.attribute("y").hasValue()?h.y=h.attribute("y").Length.toPixels("y"):(h.attribute("dy").hasValue()&&(d+=h.attribute("dy").Length.toPixels("y")),h.y=d);d=h.y;h.render(b)}}};a.Element.text.prototype=new a.Element.RenderedElementBase;a.Element.TextElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getGlyph=function(a,b,c){var e=b[c],f=null;if(a.isArabic){var g="isolated";if((c==0||b[c-
101
+ 1]==" ")&&c<b.length-2&&b[c+1]!=" ")g="terminal";c>0&&b[c-1]!=" "&&c<b.length-2&&b[c+1]!=" "&&(g="medial");if(c>0&&b[c-1]!=" "&&(c==b.length-1||b[c+1]==" "))g="initial";typeof a.glyphs[e]!="undefined"&&(f=a.glyphs[e][g],f==null&&a.glyphs[e].type=="glyph"&&(f=a.glyphs[e]))}else f=a.glyphs[e];if(f==null)f=a.missingGlyph;return f};this.renderChildren=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var k=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
102
+ e=this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle),f=this.getText();b.isRTL&&(f=f.split("").reverse().join(""));for(var g=a.ToNumberArray(this.parent.attribute("dx").value),j=0;j<f.length;j++){var h=this.getGlyph(b,f,j),l=k/b.fontFace.unitsPerEm;c.translate(this.x,this.y);c.scale(l,-l);var o=c.lineWidth;c.lineWidth=c.lineWidth*b.fontFace.unitsPerEm/k;e=="italic"&&c.transform(1,0,0.4,1,0,0);h.render(c);e=="italic"&&c.transform(1,0,-0.4,1,0,0);c.lineWidth=o;c.scale(1/
103
+ l,-1/l);c.translate(-this.x,-this.y);this.x+=k*(h.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm;typeof g[j]!="undefined"&&!isNaN(g[j])&&(this.x+=g[j])}}else c.strokeStyle!=""&&c.strokeText(a.compressSpaces(this.getText()),this.x,this.y),c.fillStyle!=""&&c.fillText(a.compressSpaces(this.getText()),this.x,this.y)};this.getText=function(){};this.measureText=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var c=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
104
+ k=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var f=a.ToNumberArray(this.parent.attribute("dx").value),g=0;g<e.length;g++){var j=this.getGlyph(b,e,g);k+=(j.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm;typeof f[g]!="undefined"&&!isNaN(f[g])&&(k+=f[g])}return k}b=a.compressSpaces(this.getText());if(!c.measureText)return b.length*10;c.save();this.setContext(c);b=c.measureText(b).width;c.restore();return b}};a.Element.TextElementBase.prototype=new a.Element.RenderedElementBase;
105
+ a.Element.tspan=function(c){this.base=a.Element.TextElementBase;this.base(c);this.text=c.nodeType==3?c.nodeValue:c.childNodes.length>0?c.childNodes[0].nodeValue:c.text;this.getText=function(){return this.text}};a.Element.tspan.prototype=new a.Element.TextElementBase;a.Element.tref=function(c){this.base=a.Element.TextElementBase;this.base(c);this.getText=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(a!=null)return a.children[0].getText()}};a.Element.tref.prototype=new a.Element.TextElementBase;
106
+ a.Element.a=function(c){this.base=a.Element.TextElementBase;this.base(c);this.hasText=!0;for(var d=0;d<c.childNodes.length;d++)if(c.childNodes[d].nodeType!=3)this.hasText=!1;this.text=this.hasText?c.childNodes[0].nodeValue:"";this.getText=function(){return this.text};this.baseRenderChildren=this.renderChildren;this.renderChildren=function(b){if(this.hasText){this.baseRenderChildren(b);var c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);a.Mouse.checkBoundingBox(this,new a.BoundingBox(this.x,
107
+ this.y-c.Length.toPixels("y"),this.x+this.measureText(b),this.y))}else c=new a.Element.g,c.children=this.children,c.parent=this,c.render(b)};this.onclick=function(){window.open(this.attribute("xlink:href").value)};this.onmousemove=function(){a.ctx.canvas.style.cursor="pointer"}};a.Element.a.prototype=new a.Element.TextElementBase;a.Element.image=function(c){this.base=a.Element.RenderedElementBase;this.base(c);a.Images.push(this);this.img=document.createElement("img");this.loaded=!1;var d=this;this.img.onload=
108
+ function(){d.loaded=!0};this.img.src=this.attribute("xlink:href").value;this.renderChildren=function(b){var c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y");f==0||g==0||(b.save(),b.translate(c,d),a.AspectRatio(b,this.attribute("preserveAspectRatio").value,f,this.img.width,g,this.img.height,0,0),b.drawImage(this.img,0,0),b.restore())}};a.Element.image.prototype=new a.Element.RenderedElementBase;
109
+ a.Element.g=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getBoundingBox=function(){for(var c=new a.BoundingBox,b=0;b<this.children.length;b++)c.addBoundingBox(this.children[b].getBoundingBox());return c}};a.Element.g.prototype=new a.Element.RenderedElementBase;a.Element.symbol=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(c){this.baseSetContext(c);if(this.attribute("viewBox").hasValue()){var b=
110
+ a.ToNumberArray(this.attribute("viewBox").value),k=b[0],e=b[1];width=b[2];height=b[3];a.AspectRatio(c,this.attribute("preserveAspectRatio").value,this.attribute("width").Length.toPixels("x"),width,this.attribute("height").Length.toPixels("y"),height,k,e);a.ViewPort.SetCurrent(b[2],b[3])}}};a.Element.symbol.prototype=new a.Element.RenderedElementBase;a.Element.style=function(c){this.base=a.Element.ElementBase;this.base(c);for(var c=c.childNodes[0].nodeValue+(c.childNodes.length>1?c.childNodes[1].nodeValue:
111
+ ""),c=c.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),c=a.compressSpaces(c),c=c.split("}"),d=0;d<c.length;d++)if(a.trim(c[d])!="")for(var b=c[d].split("{"),k=b[0].split(","),b=b[1].split(";"),e=0;e<k.length;e++){var f=a.trim(k[e]);if(f!=""){for(var g={},j=0;j<b.length;j++){var h=b[j].indexOf(":"),l=b[j].substr(0,h),h=b[j].substr(h+1,b[j].length-h);l!=null&&h!=null&&(g[a.trim(l)]=new a.Property(a.trim(l),a.trim(h)))}a.Styles[f]=g;if(f=="@font-face"){f=g["font-family"].value.replace(/"/g,
112
+ "");g=g.src.value.split(",");for(j=0;j<g.length;j++)if(g[j].indexOf('format("svg")')>0){l=g[j].indexOf("url");h=g[j].indexOf(")",l);l=g[j].substr(l+5,h-l-6);l=a.parseXml(a.ajax(l)).getElementsByTagName("font");for(h=0;h<l.length;h++){var o=a.CreateElement(l[h]);a.Definitions[f]=o}}}}}};a.Element.style.prototype=new a.Element.ElementBase;a.Element.use=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(a){this.baseSetContext(a);
113
+ this.attribute("x").hasValue()&&a.translate(this.attribute("x").Length.toPixels("x"),0);this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").Length.toPixels("y"))};this.getDefinition=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(this.attribute("width").hasValue())a.attribute("width",!0).value=this.attribute("width").value;if(this.attribute("height").hasValue())a.attribute("height",!0).value=this.attribute("height").value;return a};this.path=function(a){var b=
114
+ this.getDefinition();b!=null&&b.path(a)};this.renderChildren=function(a){var b=this.getDefinition();b!=null&&b.render(a)}};a.Element.use.prototype=new a.Element.RenderedElementBase;a.Element.mask=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=this.attribute("x").Length.toPixels("x"),e=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y"),j=b.attribute("mask").value;b.attribute("mask").value=
115
+ "";var h=document.createElement("canvas");h.width=c+f;h.height=e+g;var l=h.getContext("2d");this.renderChildren(l);var o=document.createElement("canvas");o.width=c+f;o.height=e+g;var n=o.getContext("2d");b.render(n);n.globalCompositeOperation="destination-in";n.fillStyle=l.createPattern(h,"no-repeat");n.fillRect(0,0,c+f,e+g);a.fillStyle=n.createPattern(o,"no-repeat");a.fillRect(0,0,c+f,e+g);b.attribute("mask").value=j};this.render=function(){}};a.Element.mask.prototype=new a.Element.ElementBase;a.Element.clipPath=
116
+ function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a){for(var b=0;b<this.children.length;b++)this.children[b].path&&(this.children[b].path(a),a.clip())};this.render=function(){}};a.Element.clipPath.prototype=new a.Element.ElementBase;a.Element.filter=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=b.getBoundingBox(),e=this.attribute("x").Length.toPixels("x"),f=this.attribute("y").Length.toPixels("y");if(e==0||f==0)e=c.x1,f=c.y1;var g=
117
+ this.attribute("width").Length.toPixels("x"),j=this.attribute("height").Length.toPixels("y");if(g==0||j==0)g=c.width(),j=c.height();c=b.style("filter").value;b.style("filter").value="";var h=0.2*g,l=0.2*j,o=document.createElement("canvas");o.width=g+2*h;o.height=j+2*l;var n=o.getContext("2d");n.translate(-e+h,-f+l);b.render(n);for(var q=0;q<this.children.length;q++)this.children[q].apply(n,0,0,g+2*h,j+2*l);a.drawImage(o,0,0,g+2*h,j+2*l,e-h,f-l,g+2*h,j+2*l);b.style("filter",!0).value=c};this.render=
118
+ function(){}};a.Element.filter.prototype=new a.Element.ElementBase;a.Element.feGaussianBlur=function(c){function d(a,c,d,f,g){for(var j=0;j<g;j++)for(var h=0;h<f;h++)for(var l=a[j*f*4+h*4+3]/255,o=0;o<4;o++){for(var n=d[0]*(l==0?255:a[j*f*4+h*4+o])*(l==0||o==3?1:l),q=1;q<d.length;q++){var p=Math.max(h-q,0),m=a[j*f*4+p*4+3]/255,p=Math.min(h+q,f-1),p=a[j*f*4+p*4+3]/255,s=d[q],r;m==0?r=255:(r=Math.max(h-q,0),r=a[j*f*4+r*4+o]);m=r*(m==0||o==3?1:m);p==0?r=255:(r=Math.min(h+q,f-1),r=a[j*f*4+r*4+o]);n+=
119
+ s*(m+r*(p==0||o==3?1:p))}c[h*g*4+j*4+o]=n}}this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,c,e,f,g){var e=this.attribute("stdDeviation").numValue(),c=a.getImageData(0,0,f,g),e=Math.max(e,0.01),j=Math.ceil(e*4)+1;mask=[];for(var h=0;h<j;h++)mask[h]=Math.exp(-0.5*(h/e)*(h/e));e=mask;j=0;for(h=1;h<e.length;h++)j+=Math.abs(e[h]);j=2*j+Math.abs(e[0]);for(h=0;h<e.length;h++)e[h]/=j;tmp=[];d(c.data,tmp,e,f,g);d(tmp,c.data,e,g,f);a.clearRect(0,0,f,g);a.putImageData(c,0,0)}};a.Element.filter.prototype=
120
+ new a.Element.feGaussianBlur;a.Element.title=function(){};a.Element.title.prototype=new a.Element.ElementBase;a.Element.desc=function(){};a.Element.desc.prototype=new a.Element.ElementBase;a.Element.MISSING=function(a){console.log("ERROR: Element '"+a.nodeName+"' not yet implemented.")};a.Element.MISSING.prototype=new a.Element.ElementBase;a.CreateElement=function(c){var d=c.nodeName.replace(/^[^:]+:/,""),d=d.replace(/\-/g,""),b=null,b=typeof a.Element[d]!="undefined"?new a.Element[d](c):new a.Element.MISSING(c);
121
+ b.type=c.nodeName;return b};a.load=function(c,d){a.loadXml(c,a.ajax(d))};a.loadXml=function(c,d){a.loadXmlDoc(c,a.parseXml(d))};a.loadXmlDoc=function(c,d){a.init(c);var b=function(a){for(var b=c.canvas;b;)a.x-=b.offsetLeft,a.y-=b.offsetTop,b=b.offsetParent;window.scrollX&&(a.x+=window.scrollX);window.scrollY&&(a.y+=window.scrollY);return a};if(a.opts.ignoreMouse!=!0)c.canvas.onclick=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onclick(c.x,c.y)},
122
+ c.canvas.onmousemove=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onmousemove(c.x,c.y)};var k=a.CreateElement(d.documentElement),e=k.root=!0,f=function(){a.ViewPort.Clear();c.canvas.parentNode&&a.ViewPort.SetCurrent(c.canvas.parentNode.clientWidth,c.canvas.parentNode.clientHeight);if(a.opts.ignoreDimensions!=!0){if(k.style("width").hasValue())c.canvas.width=k.style("width").Length.toPixels("x"),c.canvas.style.width=c.canvas.width+"px";if(k.style("height").hasValue())c.canvas.height=
123
+ k.style("height").Length.toPixels("y"),c.canvas.style.height=c.canvas.height+"px"}var b=c.canvas.clientWidth||c.canvas.width,d=c.canvas.clientHeight||c.canvas.height;a.ViewPort.SetCurrent(b,d);if(a.opts!=null&&a.opts.offsetX!=null)k.attribute("x",!0).value=a.opts.offsetX;if(a.opts!=null&&a.opts.offsetY!=null)k.attribute("y",!0).value=a.opts.offsetY;if(a.opts!=null&&a.opts.scaleWidth!=null&&a.opts.scaleHeight!=null){var f=1,g=1;k.attribute("width").hasValue()&&(f=k.attribute("width").Length.toPixels("x")/
124
+ a.opts.scaleWidth);k.attribute("height").hasValue()&&(g=k.attribute("height").Length.toPixels("y")/a.opts.scaleHeight);k.attribute("width",!0).value=a.opts.scaleWidth;k.attribute("height",!0).value=a.opts.scaleHeight;k.attribute("viewBox",!0).value="0 0 "+b*f+" "+d*g;k.attribute("preserveAspectRatio",!0).value="none"}a.opts.ignoreClear!=!0&&c.clearRect(0,0,b,d);k.render(c);e&&(e=!1,a.opts!=null&&typeof a.opts.renderCallback=="function"&&a.opts.renderCallback())},g=!0;a.ImagesLoaded()&&(g=!1,f());
125
+ a.intervalID=setInterval(function(){var b=!1;g&&a.ImagesLoaded()&&(g=!1,b=!0);a.opts.ignoreMouse!=!0&&(b|=a.Mouse.hasEvents());if(a.opts.ignoreAnimation!=!0)for(var c=0;c<a.Animations.length;c++)b|=a.Animations[c].update(1E3/a.FRAMERATE);a.opts!=null&&typeof a.opts.forceRedraw=="function"&&a.opts.forceRedraw()==!0&&(b=!0);b&&(f(),a.Mouse.runEvents())},1E3/a.FRAMERATE)};a.stop=function(){a.intervalID&&clearInterval(a.intervalID)};a.Mouse=new function(){this.events=[];this.hasEvents=function(){return this.events.length!=
126
+ 0};this.onclick=function(a,d){this.events.push({type:"onclick",x:a,y:d,run:function(a){if(a.onclick)a.onclick()}})};this.onmousemove=function(a,d){this.events.push({type:"onmousemove",x:a,y:d,run:function(a){if(a.onmousemove)a.onmousemove()}})};this.eventElements=[];this.checkPath=function(a,d){for(var b=0;b<this.events.length;b++){var k=this.events[b];d.isPointInPath&&d.isPointInPath(k.x,k.y)&&(this.eventElements[b]=a)}};this.checkBoundingBox=function(a,d){for(var b=0;b<this.events.length;b++){var k=
127
+ this.events[b];d.isPointInBox(k.x,k.y)&&(this.eventElements[b]=a)}};this.runEvents=function(){a.ctx.canvas.style.cursor="";for(var c=0;c<this.events.length;c++)for(var d=this.events[c],b=this.eventElements[c];b;)d.run(b),b=b.parent;this.events=[];this.eventElements=[]}};return a}this.canvg=function(a,c,d){if(a==null&&c==null&&d==null)for(var c=document.getElementsByTagName("svg"),b=0;b<c.length;b++){a=c[b];d=document.createElement("canvas");d.width=a.clientWidth;d.height=a.clientHeight;a.parentNode.insertBefore(d,
128
+ a);a.parentNode.removeChild(a);var k=document.createElement("div");k.appendChild(a);canvg(d,k.innerHTML)}else d=d||{},typeof a=="string"&&(a=document.getElementById(a)),a.svg==null?(b=m(),a.svg=b):(b=a.svg,b.stop()),b.opts=d,a=a.getContext("2d"),typeof c.documentElement!="undefined"?b.loadXmlDoc(a,c):c.substr(0,1)=="<"?b.loadXml(a,c):b.load(a,c)}})();
129
+ if(CanvasRenderingContext2D)CanvasRenderingContext2D.prototype.drawSvg=function(m,a,c,d,b){canvg(this.canvas,m,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:a,offsetY:c,scaleWidth:d,scaleHeight:b})};
130
+ (function(m){var a=m.css,c=m.CanVGRenderer,d=m.SVGRenderer,b=m.extend,k=m.merge,e=m.addEvent,f=m.createElement,g=m.discardElement;b(c.prototype,d.prototype);b(c.prototype,{create:function(a,b,c,d){this.setContainer(b,c,d);this.configure(a)},setContainer:function(a,b,c){var d=a.style,e=a.parentNode,g=d.left,d=d.top,k=a.offsetWidth,m=a.offsetHeight,s={visibility:"hidden",position:"absolute"};this.init.apply(this,[a,b,c]);this.canvas=f("canvas",{width:k,height:m},{position:"relative",left:g,top:d},a);
131
+ this.ttLine=f("div",null,s,e);this.ttDiv=f("div",null,s,e);this.ttTimer=void 0;this.hiddenSvg=a=f("div",{width:k,height:m},{visibility:"hidden",left:g,top:d},e);a.appendChild(this.box)},configure:function(b){var c=this,d=b.options.tooltip,f=d.borderWidth,g=c.ttDiv,m=d.style,p=c.ttLine,t=parseInt(m.padding,10),m=k(m,{padding:t+"px","background-color":d.backgroundColor,"border-style":"solid","border-width":f+"px","border-radius":d.borderRadius+"px"});d.shadow&&(m=k(m,{"box-shadow":"1px 1px 3px gray",
132
+ "-webkit-box-shadow":"1px 1px 3px gray"}));a(g,m);a(p,{"border-left":"1px solid darkgray"});e(b,"tooltipRefresh",function(d){var e=b.container,f=e.offsetLeft,e=e.offsetTop,k;g.innerHTML=d.text;k=b.tooltip.getPosition(g.offsetWidth,g.offsetHeight,{plotX:d.x,plotY:d.y});a(g,{visibility:"visible",left:k.x+"px",top:k.y+"px","border-color":d.borderColor});a(p,{visibility:"visible",left:f+d.x+"px",top:e+b.plotTop+"px",height:b.plotHeight+"px"});c.ttTimer!==void 0&&clearTimeout(c.ttTimer);c.ttTimer=setTimeout(function(){a(g,
133
+ {visibility:"hidden"});a(p,{visibility:"hidden"})},3E3)})},destroy:function(){g(this.canvas);this.ttTimer!==void 0&&clearTimeout(this.ttTimer);g(this.ttLine);g(this.ttDiv);g(this.hiddenSvg);return d.prototype.destroy.apply(this)},color:function(a,b,c){a&&a.linearGradient&&(a=a.stops[a.stops.length-1][1]);return d.prototype.color.call(this,a,b,c)},draw:function(){window.canvg(this.canvas,this.hiddenSvg.innerHTML)}})})(Highcharts);