kirgudu_base 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (360) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/images/kirgudu_base/404-fry.png +0 -0
  6. data/app/assets/images/kirgudu_base/Documents.gif +0 -0
  7. data/app/assets/images/kirgudu_base/Meetings.gif +0 -0
  8. data/app/assets/images/kirgudu_base/Repair.gif +0 -0
  9. data/app/assets/images/kirgudu_base/ajax-loader.gif +0 -0
  10. data/app/assets/images/kirgudu_base/alpha.png +0 -0
  11. data/app/assets/images/kirgudu_base/alpha2.png +0 -0
  12. data/app/assets/images/kirgudu_base/arrow.png +0 -0
  13. data/app/assets/images/kirgudu_base/box.gif +0 -0
  14. data/app/assets/images/kirgudu_base/chosen-sprite.png +0 -0
  15. data/app/assets/images/kirgudu_base/company_pxg.png +0 -0
  16. data/app/assets/images/kirgudu_base/datatables/back_disabled.png +0 -0
  17. data/app/assets/images/kirgudu_base/datatables/back_enabled.png +0 -0
  18. data/app/assets/images/kirgudu_base/datatables/back_enabled_hover.png +0 -0
  19. data/app/assets/images/kirgudu_base/datatables/forward_disabled.png +0 -0
  20. data/app/assets/images/kirgudu_base/datatables/forward_enabled.png +0 -0
  21. data/app/assets/images/kirgudu_base/datatables/forward_enabled_hover.png +0 -0
  22. data/app/assets/images/kirgudu_base/datatables/sort_asc.png +0 -0
  23. data/app/assets/images/kirgudu_base/datatables/sort_asc_disabled.png +0 -0
  24. data/app/assets/images/kirgudu_base/datatables/sort_both.png +0 -0
  25. data/app/assets/images/kirgudu_base/datatables/sort_desc.png +0 -0
  26. data/app/assets/images/kirgudu_base/datatables/sort_desc_disabled.png +0 -0
  27. data/app/assets/images/kirgudu_base/fancybox/blank.gif +0 -0
  28. data/app/assets/images/kirgudu_base/fancybox/fancybox_buttons.png +0 -0
  29. data/app/assets/images/kirgudu_base/fancybox/fancybox_loading.gif +0 -0
  30. data/app/assets/images/kirgudu_base/fancybox/fancybox_overlay.png +0 -0
  31. data/app/assets/images/kirgudu_base/fancybox/fancybox_sprite.png +0 -0
  32. data/app/assets/images/kirgudu_base/favicon.png +0 -0
  33. data/app/assets/images/kirgudu_base/general/clock.png +0 -0
  34. data/app/assets/images/kirgudu_base/general/clock2.png +0 -0
  35. data/app/assets/images/kirgudu_base/general/coffee.png +0 -0
  36. data/app/assets/images/kirgudu_base/general/coffee2.png +0 -0
  37. data/app/assets/images/kirgudu_base/general/flipchart.png +0 -0
  38. data/app/assets/images/kirgudu_base/general/flipchart2.png +0 -0
  39. data/app/assets/images/kirgudu_base/general/sun.png +0 -0
  40. data/app/assets/images/kirgudu_base/general/sun2.png +0 -0
  41. data/app/assets/images/kirgudu_base/glyphicons-halflings-white.png +0 -0
  42. data/app/assets/images/kirgudu_base/glyphicons-halflings.png +0 -0
  43. data/app/assets/images/kirgudu_base/gradient1.png +0 -0
  44. data/app/assets/images/kirgudu_base/hue2.png +0 -0
  45. data/app/assets/images/kirgudu_base/ico_16_4_d.gif +0 -0
  46. data/app/assets/images/kirgudu_base/ico_18_1010.gif +0 -0
  47. data/app/assets/images/kirgudu_base/ico_18_112.gif +0 -0
  48. data/app/assets/images/kirgudu_base/ico_18_2020.gif +0 -0
  49. data/app/assets/images/kirgudu_base/icon-contacts.gif +0 -0
  50. data/app/assets/images/kirgudu_base/icon-employees.gif +0 -0
  51. data/app/assets/images/kirgudu_base/icon-list.gif +0 -0
  52. data/app/assets/images/kirgudu_base/icon-orders-green.gif +0 -0
  53. data/app/assets/images/kirgudu_base/icon-orders.gif +0 -0
  54. data/app/assets/images/kirgudu_base/icon-tenders.gif +0 -0
  55. data/app/assets/images/kirgudu_base/icons-sa7c41345d9.png +0 -0
  56. data/app/assets/images/kirgudu_base/login-corner.png +0 -0
  57. data/app/assets/images/kirgudu_base/login-corner2.png +0 -0
  58. data/app/assets/images/kirgudu_base/logo.png +0 -0
  59. data/app/assets/images/kirgudu_base/maps/m1.png +0 -0
  60. data/app/assets/images/kirgudu_base/maps/m2.png +0 -0
  61. data/app/assets/images/kirgudu_base/maps/m3.png +0 -0
  62. data/app/assets/images/kirgudu_base/meeting-schedule.gif +0 -0
  63. data/app/assets/images/kirgudu_base/menu_icons/calendar.png +0 -0
  64. data/app/assets/images/kirgudu_base/menu_icons/dashboard.png +0 -0
  65. data/app/assets/images/kirgudu_base/menu_icons/forms.png +0 -0
  66. data/app/assets/images/kirgudu_base/menu_icons/gallery.png +0 -0
  67. data/app/assets/images/kirgudu_base/menu_icons/grid.png +0 -0
  68. data/app/assets/images/kirgudu_base/menu_icons/maps.png +0 -0
  69. data/app/assets/images/kirgudu_base/menu_icons/others.png +0 -0
  70. data/app/assets/images/kirgudu_base/menu_icons/statistics.png +0 -0
  71. data/app/assets/images/kirgudu_base/menu_icons/tables.png +0 -0
  72. data/app/assets/images/kirgudu_base/menu_icons/widgets.png +0 -0
  73. data/app/assets/images/kirgudu_base/menu_top/profile-avatar.png +0 -0
  74. data/app/assets/images/kirgudu_base/menu_top/profile-messages.png +0 -0
  75. data/app/assets/images/kirgudu_base/message_avatar1.png +0 -0
  76. data/app/assets/images/kirgudu_base/message_avatar2.png +0 -0
  77. data/app/assets/images/kirgudu_base/message_avatar3.png +0 -0
  78. data/app/assets/images/kirgudu_base/message_avatar4.png +0 -0
  79. data/app/assets/images/kirgudu_base/message_avatar5.png +0 -0
  80. data/app/assets/images/kirgudu_base/message_avatar6.png +0 -0
  81. data/app/assets/images/kirgudu_base/message_avatar7.png +0 -0
  82. data/app/assets/images/kirgudu_base/news-icon-16.gif +0 -0
  83. data/app/assets/images/kirgudu_base/operator-def.png +0 -0
  84. data/app/assets/images/kirgudu_base/patterns/bg_dark.png +0 -0
  85. data/app/assets/images/kirgudu_base/patterns/bg_dark2.png +0 -0
  86. data/app/assets/images/kirgudu_base/patterns/bg_dark3.png +0 -0
  87. data/app/assets/images/kirgudu_base/patterns/whitey.png +0 -0
  88. data/app/assets/images/kirgudu_base/people-16-16-256.gif +0 -0
  89. data/app/assets/images/kirgudu_base/sales_24x24 (1).gif +0 -0
  90. data/app/assets/images/kirgudu_base/sample_avatar_big.jpg +0 -0
  91. data/app/assets/images/kirgudu_base/saturation2.png +0 -0
  92. data/app/assets/images/kirgudu_base/search.png +0 -0
  93. data/app/assets/images/kirgudu_base/toggle.png +0 -0
  94. data/app/assets/images/kirgudu_base/ui-bg_fine-grain_10_e7e7e7_60x60.png +0 -0
  95. data/app/assets/images/kirgudu_base/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  96. data/app/assets/images/kirgudu_base/ui-bg_flat_0_ef4622_40x100.png +0 -0
  97. data/app/assets/images/kirgudu_base/ui-bg_glass_65_ffffff_1x400.png +0 -0
  98. data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_100_e1e1e1_1x100.png +0 -0
  99. data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_100_eeeeee_1x100.png +0 -0
  100. data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_75_dddddd_1x100.png +0 -0
  101. data/app/assets/images/kirgudu_base/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  102. data/app/assets/images/kirgudu_base/ui-icons_454545_256x240.png +0 -0
  103. data/app/assets/images/kirgudu_base/ui-icons_525d66_256x240.png +0 -0
  104. data/app/assets/images/kirgudu_base/ui-icons_cd0a0a_256x240.png +0 -0
  105. data/app/assets/images/kirgudu_base/ui-icons_ffffff_256x240.png +0 -0
  106. data/app/assets/images/kirgudu_base/uploadify-cancel.png +0 -0
  107. data/app/assets/javascripts/kirgudu_base/ajax_form.js +52 -0
  108. data/app/assets/javascripts/kirgudu_base/application.js +15 -0
  109. data/app/assets/javascripts/kirgudu_base/avgrund.js +85 -0
  110. data/app/assets/javascripts/kirgudu_base/bootstrap-alert.js +90 -0
  111. data/app/assets/javascripts/kirgudu_base/bootstrap-button.js +96 -0
  112. data/app/assets/javascripts/kirgudu_base/bootstrap-carousel.js +176 -0
  113. data/app/assets/javascripts/kirgudu_base/bootstrap-collapse.js +158 -0
  114. data/app/assets/javascripts/kirgudu_base/bootstrap-colorpicker.js +520 -0
  115. data/app/assets/javascripts/kirgudu_base/bootstrap-datepicker.js +401 -0
  116. data/app/assets/javascripts/kirgudu_base/bootstrap-dropdown.js +150 -0
  117. data/app/assets/javascripts/kirgudu_base/bootstrap-modal.js +239 -0
  118. data/app/assets/javascripts/kirgudu_base/bootstrap-popover.js +103 -0
  119. data/app/assets/javascripts/kirgudu_base/bootstrap-scrollspy.js +151 -0
  120. data/app/assets/javascripts/kirgudu_base/bootstrap-tab.js +135 -0
  121. data/app/assets/javascripts/kirgudu_base/bootstrap-tooltip.js +275 -0
  122. data/app/assets/javascripts/kirgudu_base/bootstrap-transition.js +60 -0
  123. data/app/assets/javascripts/kirgudu_base/bootstrap-typeahead.js +300 -0
  124. data/app/assets/javascripts/kirgudu_base/bootstrap-wysihtml5.js +458 -0
  125. data/app/assets/javascripts/kirgudu_base/bootstrap.js +6 -0
  126. data/app/assets/javascripts/kirgudu_base/character-limit.js +18 -0
  127. data/app/assets/javascripts/kirgudu_base/chosen.jquery.min.js +10 -0
  128. data/app/assets/javascripts/kirgudu_base/client_main.js +1017 -0
  129. data/app/assets/javascripts/kirgudu_base/delete.js +67 -0
  130. data/app/assets/javascripts/kirgudu_base/excanvas.compiled.js +35 -0
  131. data/app/assets/javascripts/kirgudu_base/fileinput.jquery.js +98 -0
  132. data/app/assets/javascripts/kirgudu_base/fullcalendar.js +5220 -0
  133. data/app/assets/javascripts/kirgudu_base/gmap3.min.js +39 -0
  134. data/app/assets/javascripts/kirgudu_base/highcharts.js +246 -0
  135. data/app/assets/javascripts/kirgudu_base/jdpicker.js +555 -0
  136. data/app/assets/javascripts/kirgudu_base/jnavigate.jquery.min.js +2 -0
  137. data/app/assets/javascripts/kirgudu_base/jquery-ui-1.8.23.custom.min.js +125 -0
  138. data/app/assets/javascripts/kirgudu_base/jquery-ui-1.8.23.custom.min_d9931121.js +125 -0
  139. data/app/assets/javascripts/kirgudu_base/jquery.blockUI.js +534 -0
  140. data/app/assets/javascripts/kirgudu_base/jquery.bookblock.js +533 -0
  141. data/app/assets/javascripts/kirgudu_base/jquery.cookie.js +94 -0
  142. data/app/assets/javascripts/kirgudu_base/jquery.dataTables.js +12092 -0
  143. data/app/assets/javascripts/kirgudu_base/jquery.endless-scroll.js +343 -0
  144. data/app/assets/javascripts/kirgudu_base/jquery.fancybox-buttons.js +121 -0
  145. data/app/assets/javascripts/kirgudu_base/jquery.fancybox-media.js +196 -0
  146. data/app/assets/javascripts/kirgudu_base/jquery.fancybox-thumbs.js +162 -0
  147. data/app/assets/javascripts/kirgudu_base/jquery.fancybox.js +1985 -0
  148. data/app/assets/javascripts/kirgudu_base/jquery.flot.crosshair.js +167 -0
  149. data/app/assets/javascripts/kirgudu_base/jquery.flot.js +2599 -0
  150. data/app/assets/javascripts/kirgudu_base/jquery.flot.pie.js +751 -0
  151. data/app/assets/javascripts/kirgudu_base/jquery.flot.resize.js +60 -0
  152. data/app/assets/javascripts/kirgudu_base/jquery.flot.spider.js +314 -0
  153. data/app/assets/javascripts/kirgudu_base/jquery.flot.stack.js +184 -0
  154. data/app/assets/javascripts/kirgudu_base/jquery.history.js +1 -0
  155. data/app/assets/javascripts/kirgudu_base/jquery.jcarousel.min.js +16 -0
  156. data/app/assets/javascripts/kirgudu_base/jquery.jeditable.js +543 -0
  157. data/app/assets/javascripts/kirgudu_base/jquery.js +2 -0
  158. data/app/assets/javascripts/kirgudu_base/jquery.json-2.3.min.js +23 -0
  159. data/app/assets/javascripts/kirgudu_base/jquery.maskedinput-1.3.js +258 -0
  160. data/app/assets/javascripts/kirgudu_base/jquery.mousewheel-min.js +12 -0
  161. data/app/assets/javascripts/kirgudu_base/jquery.peity.min.js +11 -0
  162. data/app/assets/javascripts/kirgudu_base/jquery.simplemodal-1.4.4.js +716 -0
  163. data/app/assets/javascripts/kirgudu_base/jquery.slides.min.js +7 -0
  164. data/app/assets/javascripts/kirgudu_base/jquery.sparkline.min.js +5 -0
  165. data/app/assets/javascripts/kirgudu_base/jquery.tagsinput.js +354 -0
  166. data/app/assets/javascripts/kirgudu_base/jquery.tools.min.js +17 -0
  167. data/app/assets/javascripts/kirgudu_base/jquery.touchdown.js +54 -0
  168. data/app/assets/javascripts/kirgudu_base/jquery.uniform.min.js +17 -0
  169. data/app/assets/javascripts/kirgudu_base/jquery.uploadify-3.1.js +975 -0
  170. data/app/assets/javascripts/kirgudu_base/jquery.uploadify.min.js +16 -0
  171. data/app/assets/javascripts/kirgudu_base/jquery.url-2.0.js +174 -0
  172. data/app/assets/javascripts/kirgudu_base/jquery.validate.min.js +4 -0
  173. data/app/assets/javascripts/kirgudu_base/jquerypp.custom.js +301 -0
  174. data/app/assets/javascripts/kirgudu_base/justgage.1.0.1.min.js +12 -0
  175. data/app/assets/javascripts/kirgudu_base/main.js +157 -0
  176. data/app/assets/javascripts/kirgudu_base/modernizr.custom.32549.js +815 -0
  177. data/app/assets/javascripts/kirgudu_base/mustache.js +532 -0
  178. data/app/assets/javascripts/kirgudu_base/popbox.js +57 -0
  179. data/app/assets/javascripts/kirgudu_base/raphael.2.1.0.min.js +10 -0
  180. data/app/assets/javascripts/kirgudu_base/scripts.js +1277 -0
  181. data/app/assets/javascripts/kirgudu_base/scripts_OLD.js +204 -0
  182. data/app/assets/javascripts/kirgudu_base/sub_select.js +50 -0
  183. data/app/assets/javascripts/kirgudu_base/swfobject.js +5 -0
  184. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shAutoloader.js +17 -0
  185. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushAS3.js +59 -0
  186. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushAppleScript.js +75 -0
  187. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushBash.js +59 -0
  188. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCSharp.js +65 -0
  189. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushColdFusion.js +100 -0
  190. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCpp.js +97 -0
  191. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCss.js +91 -0
  192. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushDelphi.js +55 -0
  193. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushDiff.js +41 -0
  194. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushErlang.js +52 -0
  195. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushGroovy.js +67 -0
  196. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJScript.js +52 -0
  197. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJava.js +57 -0
  198. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJavaFX.js +58 -0
  199. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPerl.js +72 -0
  200. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPhp.js +88 -0
  201. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPlain.js +33 -0
  202. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPowerShell.js +74 -0
  203. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPython.js +64 -0
  204. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushRuby.js +55 -0
  205. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushSass.js +94 -0
  206. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushScala.js +51 -0
  207. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushSql.js +66 -0
  208. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushVb.js +56 -0
  209. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushXml.js +69 -0
  210. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shCore.js +17 -0
  211. data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shLegacy.js +17 -0
  212. data/app/assets/javascripts/kirgudu_base/textarea-autogrow.js +55 -0
  213. data/app/assets/javascripts/kirgudu_base/tiny_mce.js +1 -0
  214. data/app/assets/javascripts/kirgudu_base/watch.js +81 -0
  215. data/app/assets/javascripts/kirgudu_base/web/inputPlaceholder.js +82 -0
  216. data/app/assets/javascripts/kirgudu_base/web/js.js +91 -0
  217. data/app/assets/javascripts/kirgudu_base/web/navigate.js +20 -0
  218. data/app/assets/javascripts/kirgudu_base/web/watch.js +1706 -0
  219. data/app/assets/javascripts/kirgudu_base/wysihtml5-0.3.0.min.js +261 -0
  220. data/app/assets/stylesheets/kirgudu_base/bootstrap.css +4551 -0
  221. data/app/assets/stylesheets/kirgudu_base/chosen.css +397 -0
  222. data/app/assets/stylesheets/kirgudu_base/fullcalendar.css +655 -0
  223. data/app/assets/stylesheets/kirgudu_base/info-message.css +79 -0
  224. data/app/assets/stylesheets/kirgudu_base/jdpicker.css +200 -0
  225. data/app/assets/stylesheets/kirgudu_base/jquery-ui-1.8.23.custom.css +1235 -0
  226. data/app/assets/stylesheets/kirgudu_base/jquery.fancybox-buttons.css +96 -0
  227. data/app/assets/stylesheets/kirgudu_base/jquery.fancybox-thumbs.css +54 -0
  228. data/app/assets/stylesheets/kirgudu_base/jquery.fancybox.css +249 -0
  229. data/app/assets/stylesheets/kirgudu_base/jquery.tagsinput.css +7 -0
  230. data/app/assets/stylesheets/kirgudu_base/main.css +1368 -0
  231. data/app/assets/stylesheets/kirgudu_base/menu.css +159 -0
  232. data/app/assets/stylesheets/kirgudu_base/popbox.css +58 -0
  233. data/app/assets/stylesheets/kirgudu_base/responsive.css +2249 -0
  234. data/app/assets/stylesheets/kirgudu_base/switcher.css +80 -0
  235. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCore.css +226 -0
  236. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreDefault.css +328 -0
  237. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreDjango.css +331 -0
  238. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreEclipse.css +339 -0
  239. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreEmacs.css +324 -0
  240. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreFadeToGrey.css +328 -0
  241. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreMDUltra.css +324 -0
  242. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreMidnight.css +324 -0
  243. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreRDark.css +324 -0
  244. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeDefault.css +117 -0
  245. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeDjango.css +120 -0
  246. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeEclipse.css +128 -0
  247. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeEmacs.css +113 -0
  248. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeFadeToGrey.css +117 -0
  249. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeMDUltra.css +113 -0
  250. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeMidnight.css +113 -0
  251. data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeRDark.css +113 -0
  252. data/app/assets/stylesheets/kirgudu_base/uploadify.css +92 -0
  253. data/app/controllers/kirgudu_base/admin_controller.rb +91 -0
  254. data/app/controllers/kirgudu_base/application_controller.rb +676 -0
  255. data/app/controllers/kirgudu_base/cabinet_controller.rb +93 -0
  256. data/app/controllers/kirgudu_base/facade_controller.rb +82 -0
  257. data/app/helpers/kirgudu_base/application_helper.rb +486 -0
  258. data/app/helpers/kirgudu_base/breadcrumbs_helper.rb +27 -0
  259. data/app/helpers/kirgudu_base/class_helper.rb +32 -0
  260. data/app/helpers/kirgudu_base/controllers/basic_actions.rb +625 -0
  261. data/app/helpers/kirgudu_base/controllers/container_items_management_actions.rb +118 -0
  262. data/app/helpers/kirgudu_base/controllers/container_items_sorting_actions.rb +64 -0
  263. data/app/helpers/kirgudu_base/controllers/dynamic_pages.rb +30 -0
  264. data/app/helpers/kirgudu_base/controllers/obligatory_filters.rb +29 -0
  265. data/app/helpers/kirgudu_base/controllers/transaction_wrapper.rb +138 -0
  266. data/app/helpers/kirgudu_base/form_builder.rb +474 -0
  267. data/app/helpers/kirgudu_base/gui_helper.rb +443 -0
  268. data/app/helpers/kirgudu_base/models/basic_management_urls.rb +104 -0
  269. data/app/helpers/kirgudu_base/models/data_filter.rb +236 -0
  270. data/app/helpers/kirgudu_base/models/exports.rb +167 -0
  271. data/app/helpers/kirgudu_base/models/filters.rb +32 -0
  272. data/app/helpers/kirgudu_base/models/form_properties.rb +108 -0
  273. data/app/helpers/kirgudu_base/models/form_property.rb +335 -0
  274. data/app/helpers/kirgudu_base/models/methods.rb +64 -0
  275. data/app/helpers/kirgudu_base/models/scopes.rb +157 -0
  276. data/app/helpers/kirgudu_base/models/sorting.rb +99 -0
  277. data/app/helpers/kirgudu_base/models/standard_actions.rb +50 -0
  278. data/app/helpers/kirgudu_base/models/uncloneable_properties.rb +21 -0
  279. data/app/helpers/kirgudu_base/old_form_builder.rb +340 -0
  280. data/app/helpers/kirgudu_base/url_helper.rb +18 -0
  281. data/app/models/kirgudu_base/base_model.rb +293 -0
  282. data/app/models/kirgudu_base/dynamic_pages/action_for.rb +78 -0
  283. data/app/models/kirgudu_base/dynamic_pages/action_for_builder.rb +46 -0
  284. data/app/models/kirgudu_base/dynamic_pages/data_source.rb +111 -0
  285. data/app/models/kirgudu_base/dynamic_pages/data_source_builder.rb +79 -0
  286. data/app/models/kirgudu_base/dynamic_pages/form.rb +99 -0
  287. data/app/models/kirgudu_base/dynamic_pages/form_builder.rb +85 -0
  288. data/app/models/kirgudu_base/dynamic_pages/input_type.rb +17 -0
  289. data/app/models/kirgudu_base/dynamic_pages/on_change.rb +40 -0
  290. data/app/models/kirgudu_base/dynamic_pages/on_change_builder.rb +38 -0
  291. data/app/models/kirgudu_base/dynamic_pages/page.rb +55 -0
  292. data/app/models/kirgudu_base/dynamic_pages/page_builder.rb +63 -0
  293. data/app/models/kirgudu_base/dynamic_pages/property.rb +185 -0
  294. data/app/models/kirgudu_base/dynamic_pages/property_builder.rb +123 -0
  295. data/app/models/kirgudu_base/template.rb +6 -0
  296. data/app/models/kirgudu_base/template_element.rb +6 -0
  297. data/app/views/layouts/kirgudu_base/application.html.erb +141 -0
  298. data/app/views/shared/kirgudu_base/_body_javascripts_files.html.erb +71 -0
  299. data/app/views/shared/kirgudu_base/_body_javascripts_scripts.html.erb +1099 -0
  300. data/app/views/shared/kirgudu_base/_breadcrumbs.html.erb +36 -0
  301. data/app/views/shared/kirgudu_base/_head_javascripts.html.erb +21 -0
  302. data/app/views/shared/kirgudu_base/_head_stylesheets.html.erb +21 -0
  303. data/app/views/shared/kirgudu_base/_index_page_filter.html.erb +43 -0
  304. data/app/views/shared/kirgudu_base/_left_menu_standard_actions.html.erb +57 -0
  305. data/app/views/shared/kirgudu_base/_services_top_line.html.erb +5 -0
  306. data/app/views/shared/kirgudu_base/_top_nav_bar.html.erb +58 -0
  307. data/app/views/shared/kirgudu_base/entry_edit_form_renderer.html.erb +70 -0
  308. data/app/views/shared/kirgudu_base/entry_index_renderer.html.erb +98 -0
  309. data/app/views/shared/kirgudu_base/entry_new_form_renderer.html.erb +68 -0
  310. data/app/views/shared/kirgudu_base/entry_not_found_renderer.html.erb +15 -0
  311. data/app/views/shared/kirgudu_base/entry_show_renderer.html.erb +28 -0
  312. data/app/views/shared/kirgudu_base/manage_images/managing_items_index.html.erb +34 -0
  313. data/app/views/shared/kirgudu_base/manage_images/managing_items_manage.html.erb +72 -0
  314. data/app/views/shared/kirgudu_base/manage_images/managing_items_sort_index.html.erb +33 -0
  315. data/app/views/shared/kirgudu_base/manage_items/managing_items_index.html.erb +42 -0
  316. data/app/views/shared/kirgudu_base/manage_items/managing_items_manage.html.erb +66 -0
  317. data/app/views/shared/kirgudu_base/manage_items/managing_items_sort_index.html.erb +33 -0
  318. data/config/routes.rb +3 -0
  319. data/db/migrate/20131114161828_create_kirgudu_base_templates.rb +17 -0
  320. data/db/migrate/20131114165013_create_kirgudu_base_template_elements.rb +18 -0
  321. data/lib/kirgudu_base/engine.rb +6 -0
  322. data/lib/kirgudu_base/version.rb +4 -0
  323. data/lib/kirgudu_base.rb +5 -0
  324. data/lib/tasks/kirgudu_base_tasks.rake +4 -0
  325. data/test/dummy/README.rdoc +261 -0
  326. data/test/dummy/Rakefile +7 -0
  327. data/test/dummy/app/assets/javascripts/application.js +15 -0
  328. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  329. data/test/dummy/app/controllers/application_controller.rb +4 -0
  330. data/test/dummy/app/helpers/application_helper.rb +3 -0
  331. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  332. data/test/dummy/config/application.rb +60 -0
  333. data/test/dummy/config/boot.rb +11 -0
  334. data/test/dummy/config/database.yml +25 -0
  335. data/test/dummy/config/environment.rb +6 -0
  336. data/test/dummy/config/environments/development.rb +38 -0
  337. data/test/dummy/config/environments/production.rb +68 -0
  338. data/test/dummy/config/environments/test.rb +38 -0
  339. data/test/dummy/config/initializers/backtrace_silencers.rb +8 -0
  340. data/test/dummy/config/initializers/inflections.rb +16 -0
  341. data/test/dummy/config/initializers/mime_types.rb +6 -0
  342. data/test/dummy/config/initializers/secret_token.rb +8 -0
  343. data/test/dummy/config/initializers/session_store.rb +9 -0
  344. data/test/dummy/config/initializers/wrap_parameters.rb +15 -0
  345. data/test/dummy/config/locales/en.yml +5 -0
  346. data/test/dummy/config/routes.rb +5 -0
  347. data/test/dummy/config.ru +4 -0
  348. data/test/dummy/public/404.html +26 -0
  349. data/test/dummy/public/422.html +26 -0
  350. data/test/dummy/public/500.html +25 -0
  351. data/test/dummy/public/favicon.ico +0 -0
  352. data/test/dummy/script/rails +6 -0
  353. data/test/fixtures/kirgudu_base/template_elements.yml +17 -0
  354. data/test/fixtures/kirgudu_base/templates.yml +15 -0
  355. data/test/integration/navigation_test.rb +11 -0
  356. data/test/kirgudu_base_test.rb +8 -0
  357. data/test/test_helper.rb +16 -0
  358. data/test/unit/kirgudu_base/template_element_test.rb +10 -0
  359. data/test/unit/kirgudu_base/template_test.rb +10 -0
  360. metadata +492 -0
@@ -0,0 +1,1706 @@
1
+ (function (d, b, X) {
2
+ function yb(b) {
3
+ return b ? ("" + b).replace(/^\s+/, "").replace(/\s+$/, "") : ""
4
+ }
5
+
6
+ function bb() {
7
+ var d = b.documentElement, o = b.doctype, q = d.attributes, cb = "", p = "", t = "", p = d.outerHTML;
8
+ if (!p) {
9
+ for (p = 0; p < q.length; p++) {
10
+ var w = q[p];
11
+ w && (cb += " " + w.name + '="' + (w.value || "") + '"')
12
+ }
13
+ p = "<html" + cb + ">" + d.innerHTML + "</html>"
14
+ }
15
+ o && (t = "<!DOCTYPE " + o.name + (o.publicId ? ' PUBLIC "' + o.publicId + '"' : "") + (o.systemId ? ' "' + o.systemId + '"' : "") + ">\n");
16
+ return t + p
17
+ }
18
+
19
+ function db(b) {
20
+ var d = [], q;
21
+ for (q in b)b.hasOwnProperty(q) && (d[d.length] =
22
+ q + "=" + encodeURIComponent(b[q]));
23
+ return d.join("&")
24
+ }
25
+
26
+ function C(b) {
27
+ for (var d = 1, q = b.length; d < arguments.length; d++)b[q++] = arguments[d];
28
+ return b.length
29
+ }
30
+
31
+ function ta(b) {
32
+ for (var d = "string" == typeof b ? function (d) {
33
+ return b.charCodeAt(d)
34
+ } : function (d) {
35
+ return b[d]
36
+ }, q = b.length, t = 0, p = 255, F = 255; q;) {
37
+ var w = 21 < q ? 21 : q, q = q - w;
38
+ do {
39
+ var J = d(t++);
40
+ if (255 < J)var C = J >> 8, J = J & 255, J = J ^ C;
41
+ p += J;
42
+ F += p
43
+ } while (--w);
44
+ p = (p & 255) + (p >> 8);
45
+ F = (F & 255) + (F >> 8)
46
+ }
47
+ d = (p & 255) + (p >> 8) << 8 | (F & 255) + (F >> 8);
48
+ return 65535 == d ? 0 : d
49
+ }
50
+
51
+ function ua(d, o, q, t) {
52
+ var p = "";
53
+ q && (p =
54
+ new Date, p.setTime(p.getTime() + 6E4 * q), p = ";expires=" + p.toGMTString());
55
+ b.cookie = d + "=" + o + p + ";path=" + (t || "/")
56
+ }
57
+
58
+ function Ga(d) {
59
+ return b.cookie.match(RegExp("(?:^|;\\s*)" + d + "=([^;]*)")) ? RegExp.$1 : null
60
+ }
61
+
62
+ function eb() {
63
+ ua("_metrika_enabled", "1", 60);
64
+ var b = !!Ga("_metrika_enabled");
65
+ ua("_metrika_enabled", "", -1);
66
+ return b
67
+ }
68
+
69
+ function t() {
70
+ for (var b = {}, o = "hash host hostname href pathname port protocol search".split(" "), q = o.length, t = q; t--;)b[o[t]] = "";
71
+ try {
72
+ for (var p = d.location, t = q; t--;) {
73
+ var F = o[t];
74
+ b[F] = "" + p[F]
75
+ }
76
+ } catch (w) {
77
+ N &&
78
+ (b = N)
79
+ }
80
+ return b
81
+ }
82
+
83
+ function aa(b) {
84
+ try {
85
+ delete d[b]
86
+ } catch (t) {
87
+ d[b] = X
88
+ }
89
+ }
90
+
91
+ function ia(d) {
92
+ var t = b.createElement("script");
93
+ t.type = "text/javascript";
94
+ t.async = !0;
95
+ t.src = d;
96
+ try {
97
+ var q = b.getElementsByTagName("html")[0];
98
+ b.getElementsByTagName("head")[0] || q.appendChild(b.createElement("head"));
99
+ var C = b.getElementsByTagName("head")[0];
100
+ C.insertBefore(t, C.firstChild)
101
+ } catch (p) {
102
+ }
103
+ }
104
+
105
+ function ja(b) {
106
+ ia(va + "//metrika.yandex.ru/js/" + b + "/_loader.js")
107
+ }
108
+
109
+ function fb(x, o, q, I, p, F) {
110
+ function w(f) {
111
+ return function () {
112
+ try {
113
+ return f.apply(this, arguments)
114
+ } catch (B) {
115
+ var a =
116
+ f && f.name ? f.name : "anonym";
117
+ (new Image).src = "//an.yandex.ru/jserr/" + x + "?" + db({"cnt-class": 100 + o, errmsg: B.name + ": " + B.message + ", line: " + (B.number || B.lineNumber) + ", func: " + a})
118
+ }
119
+ }
120
+ }
121
+
122
+ function J() {
123
+ var f = b.documentElement;
124
+ return"CSS1Compat" == b.compatMode ? f : b.body || f
125
+ }
126
+
127
+ function N() {
128
+ var f = J();
129
+ return[f.clientWidth, f.clientHeight]
130
+ }
131
+
132
+ function M() {
133
+ var f = J(), B = N();
134
+ return[Math.max(f.scrollWidth, B[0]), Math.max(f.scrollHeight, B[1])]
135
+ }
136
+
137
+ function W() {
138
+ return[d.pageXOffset || b.documentElement && b.documentElement.scrollLeft || b.body &&
139
+ b.body.scrollLeft || 0, d.pageYOffset || b.documentElement && b.documentElement.scrollTop || b.body && b.body.scrollTop || 0]
140
+ }
141
+
142
+ function X(f) {
143
+ if (!f.ownerDocument || "PARAM" == f.tagName || f == b.body || f == b.documentElement)return[0, 0];
144
+ if (f.getBoundingClientRect)return f = f.getBoundingClientRect(), [Math.round(f.left + O[0]), Math.round(f.top + O[1])];
145
+ for (var B = 0, a = 0; f;)B += f.offsetLeft, a += f.offsetTop, f = f.offsetParent;
146
+ return[B, a]
147
+ }
148
+
149
+ function P(f, B) {
150
+ return f == b.documentElement ? null : !B ? f == b.body ? b.documentElement : f.parentNode : f.tagName.toLowerCase() ===
151
+ B ? f : P(f.parentNode, B)
152
+ }
153
+
154
+ function Y(f, B) {
155
+ var a = [];
156
+ if (f)for (var b = f.childNodes, c = 0, e = b.length; c < e; c++) {
157
+ var g = b[c];
158
+ !("INPUT" == g.nodeName && g.type && "hidden" == g.type.toLocaleLowerCase()) && (!B || g.nodeName == B) && C(a, g)
159
+ }
160
+ return a
161
+ }
162
+
163
+ function K(f) {
164
+ var B = X(f), f = f == b.body || f == b.documentElement ? M() : [f.offsetWidth, f.offsetHeight];
165
+ return[B[0], B[1], f[0], f[1]]
166
+ }
167
+
168
+ function Z(f) {
169
+ for (var B = "", f = f.childNodes, a = 0, c = f.length; a < c; a++)3 == f[a].nodeType && (B += f[a].nodeValue);
170
+ return ta(B.replace(/[\u0000-\u0020]+/g, ""))
171
+ }
172
+
173
+ function ka(f) {
174
+ var a =
175
+ "", l = "className width height align title alt name".split(" ");
176
+ "IMG" == f.tagName && (a += f.src.toLowerCase());
177
+ "A" == f.tagName && (a += f.href.toLowerCase());
178
+ for (var c = 0; c < l.length; c++)f.getAttribute && (a += ("" + (f.getAttribute(l[c]) || "")).toLowerCase());
179
+ return ta(a.replace(/[\u0000-\u0020]+/g, ""))
180
+ }
181
+
182
+ function ba(f) {
183
+ for (var a = b.getElementsByTagName("form"), l = 0, c = a.length; l < c; l++)if (a[l] == f)return l;
184
+ return-1
185
+ }
186
+
187
+ function la(f) {
188
+ return"INPUT" == f.nodeName && "submit" != f.type && "image" != f.type && "hidden" != f.type ? "radio" == f.type ||
189
+ "checkbox" == f.type ? !f.checked : !f.value : "TEXTAREA" == f.nodeName ? !f.value : "SELECT" == f.nodeName ? 0 > f.selectedIndex : !0
190
+ }
191
+
192
+ function s(f, a, l) {
193
+ var c = w(function (f) {
194
+ return l(f || d.event)
195
+ });
196
+ S[S.length] = [f, a, l, c];
197
+ f.addEventListener ? f.addEventListener(a, c, !0) : f.attachEvent && f.attachEvent("on" + a, c)
198
+ }
199
+
200
+ function r(f, a, l) {
201
+ for (var c = 0; c < S.length; c++)if (S[c] && S[c][0] == f && S[c][1] == a && S[c][2] == l) {
202
+ var b = S[c][3];
203
+ delete S[c];
204
+ break
205
+ }
206
+ b && (f.removeEventListener ? f.removeEventListener(a, b, !0) : f.detachEvent && f.detachEvent("on" + a, b))
207
+ }
208
+
209
+ function ca(f) {
210
+ var a =
211
+ J();
212
+ return[f.pageX || f.clientX + O[0] - (a.clientLeft || 0) || 0, f.pageY || f.clientY + O[1] - (a.clientTop || 0) || 0]
213
+ }
214
+
215
+ function Q(f) {
216
+ return f.target || f.srcElement
217
+ }
218
+
219
+ function $(f) {
220
+ return(f.shiftKey ? zb : 0) | (f.ctrlKey ? gb : 0) | (f.altKey ? Ab : 0) | (f.metaKey ? Lb : 0) | (f.ctrlKey || f.altKey ? Ha : 0)
221
+ }
222
+
223
+ function ga(f) {
224
+ var a = (new Date).getTime();
225
+ f && a < f && (hb += f - a + ib);
226
+ d.setTimeout(w(function () {
227
+ ga(a)
228
+ }), ib)
229
+ }
230
+
231
+ function ma() {
232
+ var f = (new Date).getTime() + hb;
233
+ f < jb && (f = jb + ib / 2);
234
+ return jb = f
235
+ }
236
+
237
+ function H() {
238
+ return Math.round((ma() - Nb) / Ob)
239
+ }
240
+
241
+ function da(f, a) {
242
+ a = Math.max(0,
243
+ Math.min(a, 65535));
244
+ C(f, a >> 8, a & 255)
245
+ }
246
+
247
+ function y(f, a) {
248
+ C(f, a & 255)
249
+ }
250
+
251
+ function j(f, a) {
252
+ for (a = Math.max(0, a | 0); 127 < a;)C(f, a & 127 | 128), a >>= 7;
253
+ C(f, a)
254
+ }
255
+
256
+ function wa(f, a) {
257
+ 255 < a.length && (a = a.substr(0, 255));
258
+ C(f, a.length);
259
+ for (var l = 0; l < a.length; l++)da(f, a.charCodeAt(l))
260
+ }
261
+
262
+ function xa(f, a) {
263
+ j(f, a.length);
264
+ for (var l = 0; l < a.length; l++)j(f, a.charCodeAt(l))
265
+ }
266
+
267
+ function qa(f) {
268
+ if (!f.nodeName)return f[E] = -1, null;
269
+ var a = +f[E];
270
+ if (!isFinite(a) || 0 >= a)return null;
271
+ var l = Qb, c = 0, b = P(f), g = b && b[E] ? b[E] : 0;
272
+ 0 > g && (g = 0);
273
+ var e = f.nodeName.toUpperCase(),
274
+ d = Rb[e];
275
+ d || (l |= Sb);
276
+ var h;
277
+ a:{
278
+ h = Y(P(f), f.nodeName);
279
+ for (var i = 0; i < h.length; i++)if (h[i] == f) {
280
+ h = i;
281
+ break a
282
+ }
283
+ h = 0
284
+ }
285
+ h || (l |= Tb);
286
+ i = K(f);
287
+ (b = b ? K(b) : null) && (i[0] == b[0] && i[1] == b[1] && i[2] == b[2] && i[3] == b[3]) && (l |= Bb);
288
+ Ia[a].pos = i[0] + "x" + i[1];
289
+ Ia[a].size = i[2] + "x" + i[3];
290
+ f.id && "string" == typeof f.id && (l |= Cb);
291
+ (b = Z(f)) && (l |= Ub);
292
+ var L = ka(f);
293
+ L && (c |= Vb);
294
+ var k;
295
+ a:{
296
+ k = Y(P(f), f.tagName);
297
+ for (var n = 0; n < k.length; n++)if (!(k[n].id && "string" == typeof k[n].id) && ka(k[n]) == L && Z(k[n]) == b) {
298
+ k = !0;
299
+ break a
300
+ }
301
+ k = !1
302
+ }
303
+ if (k)var l = l | Db, v = ta((f.innerHTML || "").replace(/(<[^>]*>|[\u0000-\u0020])/g,
304
+ ""));
305
+ k = [];
306
+ y(k, Wb);
307
+ j(k, a);
308
+ y(k, l);
309
+ j(k, g);
310
+ d ? y(k, d) : wa(k, e);
311
+ h && j(k, h);
312
+ l & Bb || (j(k, i[0]), j(k, i[1]), j(k, i[2]), j(k, i[3]));
313
+ l & Cb && wa(k, f.id);
314
+ b && da(k, b);
315
+ l & Db && da(k, v);
316
+ y(k, c);
317
+ L && da(k, L);
318
+ return k
319
+ }
320
+
321
+ function na(f, a, l, c, b, g) {
322
+ for (; l && (!l.offsetWidth || !l.offsetHeight);)l = P(l);
323
+ if (!l)return null;
324
+ var e = l[E];
325
+ if (!e || 0 > e)return null;
326
+ var d = {mousemove: Xb, click: Yb, mousedown: Ga, mouseup: xb, touch: Za}[a];
327
+ if (!d)return null;
328
+ var h = X(l), l = [];
329
+ y(l, d);
330
+ j(l, f);
331
+ j(l, e);
332
+ j(l, Math.max(0, c[0] - h[0]));
333
+ j(l, Math.max(0, c[1] - h[1]));
334
+ /^mouse(up|down)|click$/.test(a) &&
335
+ (f = b || g, y(l, 2 > f ? Zb : f == (b ? 2 : 4) ? $b : ac));
336
+ return l
337
+ }
338
+
339
+ function ra(f, a) {
340
+ var l = [];
341
+ y(l, va);
342
+ j(l, f);
343
+ j(l, a[0]);
344
+ j(l, a[1]);
345
+ return l
346
+ }
347
+
348
+ function m(f, a, l) {
349
+ var c = [], l = l[E];
350
+ if (!l || 0 > l)return null;
351
+ y(c, Fa);
352
+ j(c, f);
353
+ j(c, a[0]);
354
+ j(c, a[1]);
355
+ j(c, l);
356
+ return c
357
+ }
358
+
359
+ function ya(f, a, c) {
360
+ var b = [];
361
+ y(b, vb);
362
+ j(b, f);
363
+ j(b, a[0]);
364
+ j(b, a[1]);
365
+ j(b, c[0]);
366
+ j(b, c[1]);
367
+ return b
368
+ }
369
+
370
+ function za(f, a, c, b) {
371
+ var g = [];
372
+ y(g, aa);
373
+ j(g, f);
374
+ da(g, a);
375
+ y(g, c);
376
+ f = b[E];
377
+ if (!f || 0 > f)f = 0;
378
+ j(g, f);
379
+ return g
380
+ }
381
+
382
+ function ea(f, a) {
383
+ var c, b;
384
+ 0 == a.length ? b = c = "" : 100 >= a.length ? (c = a, b = "") : 200 >= a.length ? (c =
385
+ a.substr(0, 100), b = a.substr(100)) : (c = a.substr(0, 97), b = a.substr(a.length - 97));
386
+ var g = [];
387
+ y(g, wb);
388
+ j(g, f);
389
+ xa(g, c);
390
+ xa(g, b);
391
+ return g
392
+ }
393
+
394
+ function Ja(f) {
395
+ var a = [];
396
+ y(a, ub);
397
+ j(a, f);
398
+ return a
399
+ }
400
+
401
+ function Ka(f) {
402
+ var a = [];
403
+ y(a, ab);
404
+ j(a, f);
405
+ return a
406
+ }
407
+
408
+ function G(f) {
409
+ var a = [];
410
+ y(a, ha);
411
+ j(a, f);
412
+ return a
413
+ }
414
+
415
+ function La(f, a) {
416
+ var c = [];
417
+ y(c, sa);
418
+ j(c, f);
419
+ j(c, a[E]);
420
+ return c
421
+ }
422
+
423
+ function ua(f, a) {
424
+ var c = [];
425
+ y(c, eb);
426
+ j(c, f);
427
+ j(c, a[E]);
428
+ return c
429
+ }
430
+
431
+ function T(f, a, c) {
432
+ var b = [];
433
+ y(b, fb);
434
+ j(b, f);
435
+ j(b, a[E]);
436
+ wa(b, "" + c);
437
+ return b
438
+ }
439
+
440
+ function Aa(f, a) {
441
+ var c = a[E];
442
+ if (0 < c) {
443
+ var b =
444
+ [], g = K(a), e = Ia[c], d = g[0] + "x" + g[1], h = g[2] + "x" + g[3];
445
+ d != e.pos && (e.pos = d, y(b, ja), j(b, f), j(b, c), j(b, g[0]), j(b, g[1]));
446
+ h != e.size && (e.size = h, y(b, Wa), j(b, f), j(b, c), j(b, g[2]), j(b, g[3]));
447
+ if (b.length)return b
448
+ }
449
+ return null
450
+ }
451
+
452
+ function Ba(f) {
453
+ var a = f[E];
454
+ if (!a || (0 > a || !/^INPUT|SELECT|TEXTAREA$/.test(f.nodeName)) || !f.form || /(?:^|\s)-metrika-noform(?:\s|$)/.test(f.form.className))return null;
455
+ var c = ba(f.form);
456
+ if (0 > c)return null;
457
+ var b;
458
+ b = "INPUT" == f.nodeName ? {text: 0, password: 2, radio: 3, checkbox: 4, file: 6, image: 7}[f.type] : {SELECT: 1,
459
+ TEXTAREA: 5}[f.nodeName];
460
+ if ("number" != typeof b)return null;
461
+ for (var g = -1, e = f.form.elements, d = e.length, h = 0, i = 0; h < d; h++)if (e[h].name == f.name) {
462
+ if (e[h] == f) {
463
+ g = i;
464
+ break
465
+ }
466
+ i++
467
+ }
468
+ if (0 > g)return null;
469
+ e = [];
470
+ y(e, ia);
471
+ j(e, a);
472
+ j(e, c);
473
+ j(e, b);
474
+ xa(e, f.name || "");
475
+ j(e, g);
476
+ return e
477
+ }
478
+
479
+ function oa(a, c) {
480
+ var b = ba(c);
481
+ if (0 > b)return null;
482
+ for (var g = c.elements, e = g.length, d = [], h = 0; h < e; h++)if (!la(g[h])) {
483
+ var i = g[h][E];
484
+ i && 0 < i && C(d, i)
485
+ }
486
+ g = [];
487
+ y(g, Xa);
488
+ j(g, a);
489
+ j(g, b);
490
+ j(g, d.length);
491
+ for (b = 0; b < d.length; b++)j(g, d[b]);
492
+ return g
493
+ }
494
+
495
+ function Ma() {
496
+ var a = [];
497
+ y(a, $a);
498
+ return a
499
+ }
500
+
501
+ function fa(a) {
502
+ clearTimeout(Eb);
503
+ for (var c = (new Date).getTime() + n; Na.length && (a || +(new Date).getTime() < c);) {
504
+ var b = Na.shift();
505
+ if (b = b[0].apply(d, b[1])) {
506
+ var g = b;
507
+ 6500 < pa.length + g.length && Oa();
508
+ for (var b = pa, e = 0, h = b.length; e < g.length; e++)b[h++] = g[e];
509
+ Pa || (Pa = d.setTimeout(w(Oa), dc))
510
+ }
511
+ }
512
+ !0 === a && Oa(!0);
513
+ Na.length && (Eb = d.setTimeout(w(fa), u))
514
+ }
515
+
516
+ function A(a, b, c) {
517
+ C(Na, [a, b]);
518
+ fa(c)
519
+ }
520
+
521
+ function D(a) {
522
+ if (a[E])A(Aa, [H(), a]); else {
523
+ var b = P(a);
524
+ b && D(b);
525
+ a[E] = kb;
526
+ Ia[kb] = {};
527
+ kb++;
528
+ A(qa, [a]);
529
+ A(Ba, [a])
530
+ }
531
+ }
532
+
533
+ function U(a) {
534
+ var b = Q(a),
535
+ c, g, e = 0;
536
+ if (b && "SCROLLBAR" != b.nodeName) {
537
+ if (b && /^INPUT|SELECT|TEXTAREA|BUTTON$/.test(b.tagName))if (b[E])D(b); else if (c = P(b, "form")) {
538
+ c = c.elements;
539
+ for (g = c.length; e < g; e++)/
540
+ ^
541
+ INPUT | SELECT | TEXTAREA | BUTTON$ /
542
+ .
543
+ test(c[e].tagName) && !c[e][E] && D(c[e])
544
+ } else D(b); else D(b);
545
+ A(na, [H(), a.type, b, ca(a), a.which, a.button])
546
+ }
547
+ }
548
+
549
+ function Ca(a) {
550
+ U(a);
551
+ var c, g;
552
+ d.getSelection ? (a = d.getSelection(), c = a.toString(), g = a.anchorNode) : b.selection && b.selection.createRange && (a = b.selection.createRange(), c = a.text, g = a.parentElement());
553
+ for (; g &&
554
+ 1 != g.nodeType;)g = g.parentNode;
555
+ if (!g || !("INPUT" == g.tagName && "password" == g.type))if ((!g || !/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(g.className)) && c != lb)lb = c, A(ea, [H(), c])
556
+ }
557
+
558
+ function R(a) {
559
+ var b = ma(), c = b - Fb;
560
+ if (!(c < Gb)) {
561
+ var g = ca(a), e = mb[0] - g[0], d = mb[1] - g[1], e = e * e + d * d;
562
+ !(0 >= e) && (!(16 > e && 100 > c) && !(20 > c && 256 > e)) && (Fb = b, mb = g, U(a))
563
+ }
564
+ }
565
+
566
+ function a() {
567
+ O = W();
568
+ var a = ma();
569
+ a - Hb < Gb || 10 > Math.abs(O[0] - nb[0]) && 10 > Math.abs(O[1] - nb[1]) || (Hb = a, nb = O, A(ra, [H(), O]))
570
+ }
571
+
572
+ function g(a) {
573
+ var a = Q(a), c = Math.random(), g = [a.scrollLeft, a.scrollTop];
574
+ if (a.localId) {
575
+ if (10 > Math.abs(g[0] - Qa[a.localId][0]) && 10 > Math.abs(g[1] - Qa[a.localId][1]))return
576
+ } else {
577
+ for (; Qa[c];)c = Math.random();
578
+ a.localId = c
579
+ }
580
+ Qa[a.localId] = g;
581
+ a !== b && (D(a), A(m, [H(), g, a]))
582
+ }
583
+
584
+ function c() {
585
+ A(ya, [H(), N(), M()])
586
+ }
587
+
588
+ function e(a) {
589
+ A(Ma, [], !0);
590
+ Oa(!0);
591
+ if ("beforeunload" == a.type)for (a = +new Date + 50; +new Date < a;);
592
+ }
593
+
594
+ function h(a, c, b) {
595
+ a = Q(a);
596
+ !("INPUT" == a.tagName && "password" == a.type) && !/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(a.className) && (D(a), A(za, [H(), c, b, a]))
597
+ }
598
+
599
+ function i(a) {
600
+ var c = a.keyCode, b = $(a);
601
+ if ({3: 1,
602
+ 8: 1, 9: 1, 13: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 27: 1, 33: 1, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 45: 1, 46: 1, 91: 1, 92: 1, 93: 1, 106: 1, 110: 1, 111: 1, 144: 1, 145: 1}[c] || (112 <= c && 123 >= c || 96 <= c && 105 >= c) || b & Ha)19 == c && (b & ~Ha) == gb && (c = 144), h(a, c, b | Ha), ob = !1, d.setTimeout(w(function () {
603
+ ob = !0
604
+ }), 1), 67 == c && (b & gb && !(b & Ab) && !(b & zb)) && pb()
605
+ }
606
+
607
+ function k(a) {
608
+ ob && (!qb && 0 !== a.which) && (h(a, a.charCode || a.keyCode, $(a)), qb = !0, d.setTimeout(w(function () {
609
+ qb = !1
610
+ }), 1))
611
+ }
612
+
613
+ function pb() {
614
+ rb || (rb = !0, lb && A(Ja, [H()]), d.setTimeout(w(function () {
615
+ rb = !1
616
+ }), 1))
617
+ }
618
+
619
+ function sb() {
620
+ Da ||
621
+ (Da = !0, A(Ka, [H()]))
622
+ }
623
+
624
+ function Ea() {
625
+ Da && (Da = !1, A(G, [H()]))
626
+ }
627
+
628
+ function v(a) {
629
+ (!Da || a && !a.fromElement) && sb()
630
+ }
631
+
632
+ function Ib(a) {
633
+ a && !a.toElement && Ea()
634
+ }
635
+
636
+ function z(a) {
637
+ var a = Q(a), c, b, g = 0;
638
+ if (a && /^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)) {
639
+ if (a[E])D(a); else if (c = P(a, "form")) {
640
+ c = c.elements;
641
+ for (b = c.length; g < b; g++)/
642
+ ^
643
+ INPUT | SELECT | TEXTAREA | BUTTON$ /
644
+ .
645
+ test(c[g].tagName) && !c[g][E] && D(c[g])
646
+ } else D(a);
647
+ A(La, [H(), a])
648
+ }
649
+ }
650
+
651
+ function Ra(a) {
652
+ if ((a = Q(a)) && /^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName))D(a), A(ua, [H(), a])
653
+ }
654
+
655
+ function Sa(a) {
656
+ a =
657
+ Q(a);
658
+ if (!("INPUT" == a.tagName && "password" == a.type) && (!a || !/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(a.className)) && a && /^INPUT|SELECT|TEXTAREA$/.test(a.tagName)) {
659
+ var c = /^(checkbox|radio)$/.test(a.type) ? a.checked : a.value;
660
+ D(a);
661
+ A(T, [H(), a, c])
662
+ }
663
+ }
664
+
665
+ function L(a) {
666
+ a = Q(a);
667
+ if (!/(?:^|\s)-metrika-noform(?:\s|$)/.test(a.className) && "FORM" == a.nodeName) {
668
+ for (var c = a.elements, b = 0; b < c.length; b++)la(c[b]) || D(c[b]);
669
+ A(oa, [H(), a], !0)
670
+ }
671
+ }
672
+
673
+ function Ta(c) {
674
+ a();
675
+ if (c.touches && c.touches.length) {
676
+ var b = Q(c);
677
+ if (b) {
678
+ D(b);
679
+ for (var g = 0; g < c.touches.length; g++)A(na,
680
+ [H(), "touch", b, [c.touches[g].pageX, c.touches[g].pageY], 0, 0])
681
+ }
682
+ }
683
+ }
684
+
685
+ function Oa() {
686
+ clearTimeout(Pa);
687
+ Pa = 0;
688
+ if (pa.length) {
689
+ for (var a = {rn: Math.round(1E5 * Math.random()), "wv-type": 0, "cnt-class": o, "page-url": t().href, wmode: 0, "wv-hit": I, "wv-part": ec++, "wv-check": ta(pa), "browser-info": ["z", tb, "i", Ua].join(":")}, c = pa, b = c.length, g = [], e = b - b % 3, d, h = 0; h < e; h += 3)d = (c[h] << 16) + (c[h + 1] << 8) + c[h + 2], C(g, V[d >> 18 & 63], V[d >> 12 & 63], V[d >> 6 & 63], V[d & 63]);
690
+ switch (b - e) {
691
+ case 1:
692
+ d = c[e] << 4;
693
+ C(g, V[d >> 6 & 63], V[d & 63], "__");
694
+ break;
695
+ case 2:
696
+ d = (c[e] <<
697
+ 10) + (c[e + 1] << 2), C(g, V[d >> 12 & 63], V[d >> 6 & 63], V[d & 63], "_")
698
+ }
699
+ c = {"wv-data": g.join("")};
700
+ p.send("visor", "webvisor", a, c);
701
+ pa.length = 0
702
+ }
703
+ }
704
+
705
+ var n = 100, u = 200, dc = 15E3, ib = 20, Ob = 50, Gb = 10, Wb = 1, Xb = 2, va = 3, Fa = 16, Ga = 4, aa = 5, ia = 7, ja = 9, Wa = 10, Xa = 11, Za = 12, $a = 13, ab = 14, ha = 15, sa = 17, eb = 18, fb = 19, ub = 27, vb = 28, wb = 29, xb = 30, Yb = 32, Zb = 1, ac = 2, $b = 4, Db = 1, Sb = 2, Tb = 4, Bb = 8, Ub = 16, Cb = 32, Qb = 64, Vb = 2, Ab = 1, zb = 2, gb = 4, Lb = 8, Ha = 16, Rb = {A: 1, ABBR: 2, ACRONYM: 3, ADDRESS: 4, APPLET: 5, AREA: 6, B: 7, BASE: 8, BASEFONT: 9, BDO: 10, BIG: 11, BLOCKQUOTE: 12, BODY: 13, BR: 14, BUTTON: 15,
706
+ CAPTION: 16, CENTER: 17, CITE: 18, CODE: 19, COL: 20, COLGROUP: 21, DD: 22, DEL: 23, DFN: 24, DIR: 25, DIV: 26, DL: 27, DT: 28, EM: 29, FIELDSET: 30, FONT: 31, FORM: 32, FRAME: 33, FRAMESET: 34, H1: 35, H2: 36, H3: 37, H4: 38, H5: 39, H6: 40, HEAD: 41, HR: 42, HTML: 43, I: 44, IFRAME: 45, IMG: 46, INPUT: 47, INS: 48, ISINDEX: 49, KBD: 50, LABEL: 51, LEGEND: 52, LI: 53, LINK: 54, MAP: 55, MENU: 56, META: 57, NOFRAMES: 58, NOSCRIPT: 59, OBJECT: 60, OL: 61, OPTGROUP: 62, OPTION: 63, P: 64, PARAM: 65, PRE: 66, Q: 67, S: 68, SAMP: 69, SCRIPT: 70, SELECT: 71, SMALL: 72, SPAN: 73, STRIKE: 74, STRONG: 75, STYLE: 76, SUB: 77,
707
+ SUP: 78, TABLE: 79, TBODY: 80, TD: 81, TEXTAREA: 82, TFOOT: 83, TH: 84, THEAD: 85, TITLE: 86, TR: 87, TT: 88, U: 89, UL: 90, VAR: 91, NOINDEX: 100}, O = W(), S = [], hb = 0;
708
+ ga(0);
709
+ var jb = 0, Na = [], Eb, kb = 1, Fb = 0, mb = [0, 0], Hb = 0, nb = [0, 0], Qa = {}, ob = !0, qb = !1, lb = "", rb = !1, Da = !0, V = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*-".split(""), pa = [], Pa, ec = 1, Nb = ma(), E = "metrikaId_" + Math.random(), Ia = {}, Va = ":submit" + Math.random();
710
+ if ("MetrikaPlayer" != d.name) {
711
+ s(b, "mousemove", R);
712
+ s(b, "click", U);
713
+ s(b, "mousedown", U);
714
+ s(b, "mouseup", Ca);
715
+ s(d, "scroll",
716
+ a);
717
+ s(d, "beforeunload", e);
718
+ Jb || s(d, "unload", e);
719
+ s(d, "resize", c);
720
+ c();
721
+ s(b, "keydown", i);
722
+ s(b, "keypress", k);
723
+ s(b, "copy", pb);
724
+ s(b, "touchmove", Ta);
725
+ s(b, "touchstart", Ta);
726
+ b.attachEvent && !d.opera ? (s(b, "focusin", v), s(b, "focusout", Ib)) : (s(d, "focus", sb), s(d, "blur", Ea), s(b, "blur", Ea));
727
+ b.addEventListener ? (b.addEventListener("scroll", g, !0), b.addEventListener("focus", z, !0), b.addEventListener("blur", Ra, !0), b.addEventListener("change", Sa, !0), b.addEventListener("submit", L, !0)) : b.attachEvent && (s(b, "focusin", z), s(b, "focusout",
728
+ Ra), function () {
729
+ for (var a = b.getElementsByTagName("form"), c = 0; c < a.length; c++) {
730
+ for (var g = a[c].getElementsByTagName("*"), e = 0; e < g.length; e++)/
731
+ ^
732
+ INPUT | SELECT | TEXTAREA$ /
733
+ .
734
+ test(g[e].tagName) && s(g[e], "change", Sa);
735
+ s(a[c], "submit", L)
736
+ }
737
+ }());
738
+ (function () {
739
+ var a = b.getElementsByTagName("form");
740
+ if (a.length)for (var c = 0; c < a.length; c++) {
741
+ a[c][Va] = a[c].submit;
742
+ a[c].submit = function () {
743
+ L({target: this});
744
+ return this[Va]()
745
+ }
746
+ }
747
+ })();
748
+ "0:0" != O.join(":") && a();
749
+ var Kb = function (a, c) {
750
+ if (a) {
751
+ var g = {"wv-type": 1, "cnt-class": o, "page-url": t().href,
752
+ "wv-hit": I, "browser-info": ["z", tb, "i", Ua, "pct", c || ""].join(":")}, e = 2;
753
+ if (b.all)a = a.replace(/\r\n/g, "\n"); else {
754
+ for (var e = a.replace(/\r\n/g, "\n"), d = [], h = String.fromCharCode, i = 0, L = e.length; i < L; i++) {
755
+ var k = e.charCodeAt(i);
756
+ if (k < 128)d.push(h(k)); else {
757
+ if (k > 127 && k < 2048)d.push(h(k >> 6 | 192)); else {
758
+ d.push(h(k >> 12 | 224));
759
+ d.push(h(k >> 6 & 63 | 128))
760
+ }
761
+ d.push(h(k & 63 | 128))
762
+ }
763
+ }
764
+ for (var e = d.join(""), d = [], n, j, v, k = 0, u = e.length; k < u;) {
765
+ n = e.charCodeAt(k++);
766
+ h = e.charCodeAt(k++);
767
+ i = e.charCodeAt(k++);
768
+ L = n >> 2;
769
+ n = (n & 3) << 4 | h >> 4;
770
+ j = (h & 15) << 2 | i >>
771
+ 6;
772
+ v = i & 63;
773
+ isNaN(h) ? j = v = 64 : isNaN(i) && (v = 64);
774
+ d.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(L) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(n) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(j) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(v))
775
+ }
776
+ a = d.join("");
777
+ e = 3
778
+ }
779
+ p.sendMultipart("webvisor", g, {"wv-data": a}, e)
780
+ }
781
+ };
782
+ F.uploadPage = function (a) {
783
+ if (typeof d.toStaticHTML == "function")return false;
784
+ var c = b.documentElement;
785
+ if (c && ("" + c.innerHTML).length > 19E4)return false;
786
+ var g = d.XMLHttpRequest ? new d.XMLHttpRequest : new ActiveXObject("Msxml2.XMLHTTP"), e = ("" + (b.characterSet || b.charset || "")).toLowerCase(), c = "text/html" + (e ? ";charset=" + e : "");
787
+ if (a == "html") {
788
+ e = RegExp("<script.*?//mc\\.yandex\\.ru/watch/.*?<\/script>", "gi");
789
+ a = bb().replace(e, "");
790
+ Kb(a.replace(e, ""), c);
791
+ return true
792
+ }
793
+ if (g) {
794
+ g.open("get", t().href, true);
795
+ g.onreadystatechange = function () {
796
+ g.readyState == 4 && Kb(g.responseText, g.getResponseHeader("content-type"))
797
+ };
798
+ g.overrideMimeType && e && g.overrideMimeType(c);
799
+ g.send(null)
800
+ }
801
+ return true
802
+ }
803
+ }
804
+ return{stop: function () {
805
+ r(b, "mousemove", R);
806
+ r(b, "click", U);
807
+ r(b, "mousedown", U);
808
+ r(b, "mouseup", Ca);
809
+ r(d, "scroll", a);
810
+ r(d, "beforeunload", e);
811
+ r(d, "unload", e);
812
+ r(d, "resize", c);
813
+ r(b, "keydown", i);
814
+ r(b, "keypress", k);
815
+ r(b, "copy", pb);
816
+ r(b, "touchmove", Ta);
817
+ r(b, "touchstart", Ta);
818
+ r(b, "focusin", v);
819
+ r(b, "focusout", Ib);
820
+ r(d, "focus", sb);
821
+ r(d, "blur", Ea);
822
+ r(b, "blur", Ea);
823
+ b.removeEventListener ? (b.removeEventListener("scroll", g, !0), b.removeEventListener("focus", z, !0),
824
+ b.removeEventListener("blur", Ra, !0), b.removeEventListener("change", Sa, !0), b.removeEventListener("submit", L, !0)) : b.detachEvent && (r(b, "focusin", z), r(b, "focusout", Ra), function () {
825
+ for (var a = b.getElementsByTagName("form"), c = 0; c < a.length; c++) {
826
+ for (var g = a[c].getElementsByTagName("*"), e = 0; e < g.length; e++)/
827
+ ^
828
+ INPUT | SELECT | TEXTAREA$ /
829
+ .
830
+ test(g[e].tagName) && r(g[e], "change", Sa);
831
+ r(a[c], "submit", L)
832
+ }
833
+ }());
834
+ (function () {
835
+ for (var a = b.getElementsByTagName("form"), c = 0; c < a.length; c++)if (a[c][Va])a[c].submit = a[c][Va]
836
+ })()
837
+ }, uploadPages: function (a, c) {
838
+ for (var b = a.split(/\n/), g = t().href, e = /regexp:/, d = 0; d < b.length; d++) {
839
+ var h = b[d];
840
+ if (h)if (e.test(h)) {
841
+ if (h = yb(h.replace(e, "")), RegExp(h).test(g)) {
842
+ F.uploadPage(c);
843
+ break
844
+ }
845
+ } else if (-1 !== g.indexOf(h)) {
846
+ F.uploadPage(c);
847
+ break
848
+ }
849
+ }
850
+ }}
851
+ }
852
+
853
+ var ub = !1, Jb = -1 === ("" + d.navigator.userAgent).toLowerCase().search(/webkit/) && -1 !== ("" + d.navigator.userAgent).toLowerCase().search(/gecko/);
854
+ d.Ya = d.Ya || {};
855
+ Ya._metrika = Ya._metrika || {};
856
+ Ya._metrika.hitParam = Ya._metrika.hitParam || {};
857
+ var vb = !1, N = t(), tb, Ua, W = d.navigator, Y = d.screen, va = "https:" ==
858
+ N.protocol ? "https:" : "http:", wb = "$Rev: 1825 $".match(/(\d+)/)[1], Z = "object" == typeof b.all, Wa = 64, $ = Z ? 512 : 2048, Xa = Z ? 512 : 2048, Za = Z ? 100 : 400, ga = "noindex", qa = 50, $a = RegExp("\\.(3gp|7z|aac|ac3|acs|ai|avi|ape|apk|asf|bmp|bz2|cab|cdr|crc32|css|csv|cue|divx|dmg|djvu?|doc(x|m|b)?|emf|eps|exe|flac?|flv|iso|swf|gif|t?gz|jpe?g?|js|m3u8?|m4a|mp(3|4|e?g?)|m4v|md5|mkv|mov|msi|ods|og(g|m|v)|pdf|phps|png|ppt(x|m|b)?|psd|rar|rss|rtf|sea|sfv|sit|sha1|svg|tar|tif?f|torrent|ts|txt|vob|wave?|wma|wmv|wmf|webm|xls(x|m|b)?|xpi|g?zip)$",
859
+ "i"), xb = +new Date, ab = "_ym_visorc", Fa, ra;
860
+ d.Ya.Metrika = function (x, o, q, I) {
861
+ function p(a, b, c) {
862
+ T[T.length] = [c, c];
863
+ a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent && a.attachEvent("on" + b, c)
864
+ }
865
+
866
+ function F(a, b, c) {
867
+ for (var e = 0; e < T.length; e++)if (T[e] && T[e][0] == c) {
868
+ var d = T[e][1];
869
+ delete T[e];
870
+ break
871
+ }
872
+ d && (a.removeEventListener ? a.removeEventListener(b, d, !1) : a.detachEvent && a.detachEvent("on" + b, d))
873
+ }
874
+
875
+ function w(a, b) {
876
+ b = b || 256;
877
+ if (!a)return"";
878
+ a.length > b && (a = a.substr(0, b));
879
+ return(d.encodeURIComponent || d.escape)(a).replace(/\+/g,
880
+ "%2B")
881
+ }
882
+
883
+ function J(a) {
884
+ function b(a) {
885
+ return a ? a.replace(/\\/g, "\\\\").replace(/"/g, '\\"') : ""
886
+ }
887
+
888
+ if (a === X)return"";
889
+ if (null === a)return"null";
890
+ switch (a.constructor) {
891
+ case Boolean:
892
+ return a.toString();
893
+ case Number:
894
+ return isFinite(a) ? a.toString() : "null";
895
+ case String:
896
+ return'"' + b(a) + '"';
897
+ case Array:
898
+ for (var c = [], e = 0, d = a.length; e < d; e++)c[c.length] = J(a[e]);
899
+ return"[" + c.join(",") + "]";
900
+ case Object:
901
+ c = "{";
902
+ e = 0;
903
+ for (d in a)if (a.hasOwnProperty(d)) {
904
+ var i = a[d];
905
+ i !== X && (c += (e ? "," : "") + '"' + b(d) + '":' + J(i), e++)
906
+ }
907
+ return c + "}";
908
+ default:
909
+ return"null"
910
+ }
911
+ }
912
+
913
+ function M(a) {
914
+ for (var b = +new Date, c = 1; 0 < c; c++)if (0 == c % 1E3) {
915
+ var e = +new Date;
916
+ if (b > e)break;
917
+ if (e - b > a)break
918
+ }
919
+ }
920
+
921
+ function aa(a, b) {
922
+ if (!a || !b)return!1;
923
+ for (var c = [], e = 0; e < b.length; e++)c.push(b[e].replace(/\^/g, "\\^").replace(/\$/g, "\\$").replace(/\./g, "\\.").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/\|/g, "\\|").replace(/\(/g, "\\(").replace(/\)/g, "\\)").replace(/\?/g, "\\?").replace(/\*/g, "\\*").replace(/\+/g, "\\+").replace(/\{/g, "\\{").replace(/\}/g, "\\}"));
924
+ return RegExp("\\.(" + c.join("|") + ")$", "i").test(a)
925
+ }
926
+
927
+ function ia(a) {
928
+ a = a.target || a.srcElement;
929
+ if (!a)return!1;
930
+ 3 == a.nodeType && (a = a.parentNode);
931
+ for (var b = a.nodeName.toString().toLowerCase(); a.parentNode && a.parentNode.nodeName && ("a" != b && "area" != b || !a.href);)a = a.parentNode, b = a.nodeName.toString().toLowerCase();
932
+ return!a.href ? !1 : a
933
+ }
934
+
935
+ function ja(a, b) {
936
+ return(a ? a.replace(/^www\./, "") : "") == (b ? b.replace(/^www\./, "") : "") ? !0 : !1
937
+ }
938
+
939
+ function P(a, b) {
940
+ function c(a) {
941
+ a = a.split(":");
942
+ a = a[1] || "";
943
+ a = a.replace(/^\/*/, "").replace(/^www\./, "");
944
+ return a.split("/")[0]
945
+ }
946
+
947
+ return!a || !b ? !a && !b ? !0 : !1 : c(a) == c(b) ? !0 : !1
948
+ }
949
+
950
+ function ha(a, b) {
951
+ var c = b.target, e = !1;
952
+ if (!b.hostname)return!1;
953
+ if (!c || "_self" == c || "_top" == c || "_parent" == c)e = !0;
954
+ (c = a.shiftKey || a.ctrlKey || a.altKey) || a.modifiers && d.Event && (c = a.modifiers & d.Event.CONTROL_MASK || a.modifiers & d.Event.SHIFT_MASK || a.modifiers & d.Event.ALT_MASK);
955
+ return e && !c
956
+ }
957
+
958
+ function K(a, b, c, e, h) {
959
+ function i(a, c) {
960
+ k[k.length] = a;
961
+ k[k.length] = c
962
+ }
963
+
964
+ var h = h || {}, c = "undefined" != typeof c ? c : ea, k = [];
965
+ h.ar && !h.onlyData && (c = ba(c), a = ba(a));
966
+ i("page-ref", w(c, $));
967
+ i("page-url", w(a, $));
968
+ i("browser-info",
969
+ s(b, h));
970
+ -1 != t().hostname.search(/(?:^|\.)(?:ya|yandex|narod|narod2)\.(?:\w+|com\.\w+)$/) ? i("ut", ga) : "undefined" != typeof h.ut && i("ut", w("" + h.ut, Wa));
971
+ e && i("site-info", w(J(e), Xa));
972
+ h.saveRef && (ea = c);
973
+ a = ka(La, k);
974
+ "MetrikaPlayer" != d.name && ((new Image).src = a, la(a), h.isDelay && M(h.delay));
975
+ return a
976
+ }
977
+
978
+ function sa(a, g, c, e, h, i, k) {
979
+ function j(a, c) {
980
+ m[m.length] = a;
981
+ m[m.length] = c
982
+ }
983
+
984
+ var h = h || {}, c = "undefined" != typeof c ? c : ea, m = [];
985
+ h.ar && !h.onlyData && (c = ba(c), a = ba(a));
986
+ if ("MetrikaPlayer" != d.name) {
987
+ var q = "_ymjsp" + Math.floor(1E6 * Math.random()),
988
+ v = b.createElement("script");
989
+ d[q] = function (a) {
990
+ try {
991
+ delete d[q]
992
+ } catch (c) {
993
+ d[q] = X
994
+ }
995
+ k(a);
996
+ v.parentNode && v.parentNode.removeChild(v)
997
+ };
998
+ j("wmode", 5);
999
+ j("callback", q);
1000
+ j("page-ref", w(c, $));
1001
+ j("page-url", w(a, $));
1002
+ a = s(g, h);
1003
+ i && (a = ["vc", i, a].join(":"));
1004
+ j("browser-info", a);
1005
+ -1 != t().hostname.search(/(?:^|\.)(?:ya|yandex|narod|narod2)\.(?:\w+|com\.\w+)$/) ? j("ut", ga) : "undefined" != typeof h.ut && j("ut", w("" + h.ut, Wa));
1006
+ e && j("site-info", w(J(e), Xa));
1007
+ h.saveRef && (ea = c);
1008
+ e = ka(La, m);
1009
+ v.type = "text/javascript";
1010
+ v.src = e;
1011
+ h = b.getElementsByTagName("head")[0];
1012
+ h.insertBefore(v, h.firstChild);
1013
+ la(e)
1014
+ }
1015
+ }
1016
+
1017
+ function ka(a, b) {
1018
+ for (var c = ["rn", Math.floor(1E6 * Math.random()), "cnt-class", q].concat(b), e = [], d = 0; d < c.length; d += 2) {
1019
+ var i = c[d + 1];
1020
+ i && (e[e.length] = c[d] + "=" + i)
1021
+ }
1022
+ return va + a + x + "?" + e.join("&")
1023
+ }
1024
+
1025
+ function ba(a) {
1026
+ var b = t(), c = b.host, b = b.href;
1027
+ if (!a)return b;
1028
+ if (-1 != a.search(/^\w+:\/\//))return a;
1029
+ var e = a.charAt(0);
1030
+ if ("?" == e)return e = b.search(/\?/), -1 == e ? b + a : b.substr(0, e) + a;
1031
+ if ("#" == e)return e = b.search(/#/), -1 == e ? b + a : b.substr(0, e) + a;
1032
+ if ("/" == e) {
1033
+ if (e = b.search(c), -1 != e)return b.substr(0,
1034
+ e + c.length) + a
1035
+ } else return c = b.split("/"), c[c.length - 1] = a, c.join("/");
1036
+ return a
1037
+ }
1038
+
1039
+ function la(a) {
1040
+ "function" == typeof d.ymLog && d.ymLog(a)
1041
+ }
1042
+
1043
+ function s(a, g) {
1044
+ function c(a, c) {
1045
+ a && c && (h[h.length] = [a, c].join(":"))
1046
+ }
1047
+
1048
+ function e(a) {
1049
+ c(a, g[a] ? "1" : "")
1050
+ }
1051
+
1052
+ var g = g || {}, h = [], i = -1 * (new Date).getTimezoneOffset(), k = bb();
1053
+ Ua || (Ua = k, tb = i);
1054
+ c("j", W.javaEnabled() ? "1" : "");
1055
+ Y && c("s", Y.width + "x" + Y.height + "x" + (Y.colorDepth || Y.pixelDepth));
1056
+ null === Aa && (Aa = r());
1057
+ c("f", Aa);
1058
+ c("w", Mb() + "x" + ma());
1059
+ c("z", i);
1060
+ c("i", k);
1061
+ null === Ba && (Ba = Q());
1062
+ c("l", Ba || "");
1063
+ c("en", ("" + (b.characterSet || b.charset || "")).toLowerCase());
1064
+ c("v", wb);
1065
+ c("c", W.cookieEnabled ? "1" : "");
1066
+ Z && b.documentMode && (null === oa && (oa = Function("return /*@cc_on @_jscript_version @*/;")()), oa && c("jv", oa));
1067
+ c("la", (W && (W.language || W.browserLanguage) || "").toLowerCase());
1068
+ c("ex", "prerender" == b.webkitVisibilityState ? "pre1" : "");
1069
+ R && c("wh", "1");
1070
+ k = "ar ln dl ad nb pa".split(" ");
1071
+ for (i = 0; i < k.length; i++)e(k[i]);
1072
+ k = ["va", "vt", "sn", "sa", "he"];
1073
+ g.nb && k.push("cl");
1074
+ for (i = 0; i < k.length; i++) {
1075
+ var j = k[i];
1076
+ c(j, g[j])
1077
+ }
1078
+ c("hid",
1079
+ ya);
1080
+ g.ar || c("ds", H());
1081
+ if (m._webvisor) {
1082
+ d.name || (d.name = Math.round(65535 * Math.random()));
1083
+ if (i = +d.name)0 > i && (i *= -1), i %= 65535;
1084
+ c("wn", i || ta(d.name));
1085
+ try {
1086
+ d.history && c("hl", "" + d.history.length)
1087
+ } catch (q) {
1088
+ }
1089
+ }
1090
+ i = "undefined" == typeof a ? (i = ca()) ? w(i, Za) : "" : w(a, Za);
1091
+ c("t", i);
1092
+ return h.join(":")
1093
+ }
1094
+
1095
+ function r() {
1096
+ var a = null, b = null, c, e = d.navigator;
1097
+ if ("undefined" != typeof e.plugins && "object" == typeof e.plugins["Shockwave Flash"])(a = e.plugins["Shockwave Flash"].description) && !("undefined" != typeof e.mimeTypes && e.mimeTypes["application/x-shockwave-flash"] && !e.mimeTypes["application/x-shockwave-flash"].enabledPlugin) && (b = a.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".")); else if ("undefined" != typeof d.ActiveXObject)try {
1098
+ if (c = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))(a = c.GetVariable("$version")) && (b = a.split(" ")[1].replace(/,/g, ".").replace(/[^.\d]/g, ""))
1099
+ } catch (h) {
1100
+ }
1101
+ return b
1102
+ }
1103
+
1104
+ function ca() {
1105
+ var a = b.title;
1106
+ "string" != typeof a && (a = (a = b.getElementsByTagName("title")) && a.length ? a[0].innerHTML : "");
1107
+ return a
1108
+ }
1109
+
1110
+ function Q() {
1111
+ var a = null;
1112
+ if (d.ActiveXObject)try {
1113
+ var b =
1114
+ new ActiveXObject("AgControl.AgControl"), c = function (a, b, c, e) {
1115
+ for (; a.isVersionSupported(b[0] + "." + b[1] + "." + b[2] + "." + b[3]);)b[c] += e;
1116
+ b[c] -= e
1117
+ }, e = [1, 0, 0, 0];
1118
+ c(b, e, 0, 1);
1119
+ c(b, e, 1, 1);
1120
+ c(b, e, 2, 1E4);
1121
+ c(b, e, 2, 1E3);
1122
+ c(b, e, 2, 100);
1123
+ c(b, e, 2, 10);
1124
+ c(b, e, 2, 1);
1125
+ c(b, e, 3, 1);
1126
+ a = e.join(".")
1127
+ } catch (h) {
1128
+ } else if (b = W.plugins["Silverlight Plug-In"])a = b.description;
1129
+ return a
1130
+ }
1131
+
1132
+ function bb() {
1133
+ for (var a = new Date, a = [a.getFullYear(), a.getMonth() + 1, a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds()], b = "", c = 0; c < a.length; c++)b += 10 > a[c] ? "0" + a[c] :
1134
+ a[c];
1135
+ return b
1136
+ }
1137
+
1138
+ function Mb() {
1139
+ var a = -1;
1140
+ b.documentElement && "CSS1Compat" == b.compatMode ? a = b.documentElement.clientWidth : b.body && (a = b.body.clientWidth);
1141
+ return a
1142
+ }
1143
+
1144
+ function ma() {
1145
+ var a = -1;
1146
+ b.documentElement && "CSS1Compat" == b.compatMode ? a = b.documentElement.clientHeight : b.body && (a = b.body.clientHeight);
1147
+ return a
1148
+ }
1149
+
1150
+ function H() {
1151
+ var a = d.performance || d.webkitPerformance;
1152
+ if (a = a && a.timing) {
1153
+ var b = a.navigationStart;
1154
+ if (b) {
1155
+ var c = [a.domainLookupEnd - a.domainLookupStart, a.connectEnd - a.connectStart, a.responseStart - a.requestStart,
1156
+ a.responseEnd - a.responseStart, a.fetchStart - b];
1157
+ a.loadEventStart && c.push(a.loadEventStart - b);
1158
+ return c.join(",")
1159
+ }
1160
+ }
1161
+ return""
1162
+ }
1163
+
1164
+ function da() {
1165
+ Ya._metrika.counters = Ya._metrika.counters || {};
1166
+ var a = !1, g = x + ":" + q;
1167
+ if (Ya._metrika.hitParam[g])if (1 == q && !Ya._metrika.counters[g])a = !0; else return!1;
1168
+ Ya._metrika.counters[g] = m;
1169
+ Ya._metrika.hitParam[g] = 1;
1170
+ m._webvisor = !I && (G && G.webvisor || ub || vb);
1171
+ G && G.trackHash && m.trackHash(!0);
1172
+ if (!I && !a) {
1173
+ var c = Ga(ab);
1174
+ "b" != c && "w" != c && (c = "");
1175
+ eb() || (c = "b");
1176
+ Fa = +new Date;
1177
+ sa(N.href, ca(), b.referrer,
1178
+ o, {ut: za, he: G ? ~~G.httpError : 0, ad: 1 == q && d.Ya && d.Ya.Direct ? !0 : !1, saveRef: !0}, c, function (a) {
1179
+ ra || (ra = +new Date);
1180
+ var a = a || {}, b = a.webvisor || {}, a = [];
1181
+ if (fa) {
1182
+ var d = +b.recp;
1183
+ if (!isFinite(d) || 0 > d || 1 < d)c = "w";
1184
+ c || (c = ya % 1E4 / 1E4 < d ? "w" : "b");
1185
+ ua(ab, c, 30);
1186
+ "w" == c ? (C(a, "visor"), d = b.arch_type, (b = b.urls) && d && fa.uploadPages(b, d)) : fa.stop()
1187
+ }
1188
+ Ma.init(a)
1189
+ })
1190
+ }
1191
+ j();
1192
+ G && (G.enableAll ? m.enableAll() : (G.clickmap && m.clickmap(G.clickmap), G.trackLinks && m.trackLinks(G.trackLinks), G.accurateTrackBounce && m.accurateTrackBounce(G.accurateTrackBounce)));
1193
+ m._webvisor && (fa = new fb(x, q, G, ya, Ma, m))
1194
+ }
1195
+
1196
+ function y(a) {
1197
+ var b = {delay: qa};
1198
+ switch (typeof a) {
1199
+ case "string":
1200
+ b.on = !0;
1201
+ break;
1202
+ case "object":
1203
+ b.on = !0;
1204
+ b.delay = "number" != typeof a.delay ? qa : a.delay;
1205
+ break;
1206
+ case "boolean":
1207
+ b.on = a;
1208
+ break;
1209
+ default:
1210
+ return
1211
+ }
1212
+ A = b
1213
+ }
1214
+
1215
+ function j() {
1216
+ y(!1);
1217
+ p(b, "click", function (a) {
1218
+ A.on && wa(a)
1219
+ })
1220
+ }
1221
+
1222
+ function wa(a) {
1223
+ function b(a) {
1224
+ var e = yb(c.innerHTML ? c.innerHTML.toString().replace(/<\/?[^>]+>/gi, "") : "");
1225
+ K(d, d == e ? "" : e, t().href, null, a)
1226
+ }
1227
+
1228
+ var c = ia(a);
1229
+ if (c) {
1230
+ var e = !1, d = "" + c.href, i = d ? d.split(/\?/)[0] : "";
1231
+ if ($a.test(i) ||
1232
+ $a.test(d) || aa(d, D) || aa(i, D))e = !0;
1233
+ var k = c.className, i = k && -1 != k.search(/ym-disable-tracklink/) ? !0 : !1, k = k && -1 != k.search(/ym-external-link/) ? !0 : !1;
1234
+ i || (a = {ln: !0, dl: e, isDelay: ha(a, c), delay: A.delay}, k ? b(a) : ja(t().hostname, c.hostname) ? e && (a.ln = !1, b(a)) : d && -1 != d.search(/^ *javascript:/i) || (a.ut = ga, b(a)))
1235
+ }
1236
+ }
1237
+
1238
+ function xa(a, g) {
1239
+ function c() {
1240
+ if (!t) {
1241
+ v && clearTimeout(v);
1242
+ var b = g, c;
1243
+ c = j ? m : m + +new Date - q;
1244
+ b -= c;
1245
+ 0 > b && (b = 0);
1246
+ v = setTimeout(function () {
1247
+ t = !0;
1248
+ h(!1);
1249
+ a()
1250
+ }, b)
1251
+ }
1252
+ }
1253
+
1254
+ function e() {
1255
+ k || (i = !0, j = !1, k = !0, c())
1256
+ }
1257
+
1258
+ function h(a) {
1259
+ for (var b =
1260
+ 0; b < z.length; b += 3)a ? p(z[b], z[b + 1], z[b + 2]) : F(z[b], z[b + 1], z[b + 2])
1261
+ }
1262
+
1263
+ var i = !1, k = !1, j = !0, m = 0, q = +new Date, v = null, t = !1, z = [d, "blur", function () {
1264
+ j = i = k = !0;
1265
+ m += +new Date - q;
1266
+ q = +new Date;
1267
+ c()
1268
+ }, d, "focus", function () {
1269
+ !i && !k && (m = 0);
1270
+ q = +new Date;
1271
+ i = k = !0;
1272
+ j = !1;
1273
+ c()
1274
+ }, b, "click", e, b, "mousemove", e, b, "keydown", e, b, "scroll", e];
1275
+ h(!0);
1276
+ c()
1277
+ }
1278
+
1279
+ function Pb(a) {
1280
+ function b() {
1281
+ var a = t().hash.split("#")[1];
1282
+ if ("undefined" == typeof a)return!1;
1283
+ var c = a.indexOf("?");
1284
+ 0 < c && (a = a.substring(0, c));
1285
+ return a
1286
+ }
1287
+
1288
+ var c = b();
1289
+ (function h() {
1290
+ var d = b();
1291
+ d !== c && (a(), c = d);
1292
+ Ca = setTimeout(h, 200)
1293
+ })()
1294
+ }
1295
+
1296
+ function na() {
1297
+ Ka = ea = Ja;
1298
+ K(t().href, ca(), Ka, null, {ut: za, ad: 1 == q && d.Ya && d.Ya.Direct ? !0 : !1, wh: !0, saveRef: !0});
1299
+ Ja = t().href
1300
+ }
1301
+
1302
+ function bc(a) {
1303
+ function g() {
1304
+ var a = b.documentElement;
1305
+ return Math.max(a.scrollWidth, b.body.scrollWidth, a.clientWidth)
1306
+ }
1307
+
1308
+ function c(a) {
1309
+ function c(a) {
1310
+ var a = a.getBoundingClientRect(), e = b.body, g = b.documentElement, h = a.left + (d.pageXOffset || g.scrollLeft || e.scrollLeft) - (g.clientLeft || e.clientLeft || 0);
1311
+ return{top: Math.round(a.top + (d.pageYOffset || g.scrollTop || e.scrollTop) -
1312
+ (g.clientTop || e.clientTop || 0)), left: Math.round(h)}
1313
+ }
1314
+
1315
+ return a.getBoundingClientRect ? c(a) : function (a) {
1316
+ for (var b = 0, c = 0; a;)b += parseInt(a.offsetTop), c += parseInt(a.offsetLeft), a = a.offsetParent;
1317
+ return{top: b, left: c}
1318
+ }(a)
1319
+ }
1320
+
1321
+ function e(a) {
1322
+ return a.toString().toUpperCase()
1323
+ }
1324
+
1325
+ function h(a) {
1326
+ return a && (a = "" + a.className) && -1 != a.search(/ym-clickmap-ignore/) ? !0 : !1
1327
+ }
1328
+
1329
+ function i(a) {
1330
+ if (null == a.pageX && null != a.clientX) {
1331
+ var c = b.documentElement, e = b.body;
1332
+ a.pageX = a.clientX + (c && c.scrollLeft || e && e.scrollLeft || 0) - (c.clientLeft || 0);
1333
+ a.pageY =
1334
+ a.clientY + (c && c.scrollTop || e && e.scrollTop || 0) - (c.clientTop || 0)
1335
+ }
1336
+ return{x: a.pageX, y: a.pageY}
1337
+ }
1338
+
1339
+ function k(a) {
1340
+ for (var b = e(a.nodeName); a.parentNode && "BODY" != b && "HTML" != b;) {
1341
+ if ("A" == b || "INPUT" == b || "TEXTAREA" == b)return!0;
1342
+ a = a.parentNode;
1343
+ b = a.nodeName
1344
+ }
1345
+ return!1
1346
+ }
1347
+
1348
+ for (var j = this, m = 0, q = null, v = "A B BIG BODY BUTTON DD DIV DL DT EM FIELDSET FORM H1 H2 H3 H4 H5 H6 HR I IMG INPUT LI OL P PRE SELECT SMALL SPAN STRONG SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TR U UL ABBR AREA BLOCKQUOTE CAPTION CENTER CITE CODE CANVAS DFN EMBED FONT INS KBD LEGEND LABEL MAP OBJECT Q S SAMP STRIKE TT ARTICLE AUDIO ASIDE FOOTER HEADER MENU METER NAV PROGRESS SECTION TIME VIDEO NOINDEX NOBR".split(" "),
1349
+ o = 59, z = String.fromCharCode, y = {}, s = 0; s < v.length; s++)y[v[s]] = z(o), z(o), o++;
1350
+ this.handler = function (a) {
1351
+ var v = b.getElementsByTagName("body")[0];
1352
+ if (!d.ymDisabledClickmap && !h(v)) {
1353
+ if (j._prefs.hasQuota) {
1354
+ if (!j._prefs.quota)return;
1355
+ j._prefs.quota--
1356
+ }
1357
+ var p = a.target || a.srcElement;
1358
+ 3 == p.nodeType && (p = p.parentNode);
1359
+ var v = e(p.nodeName), n = i(a), u;
1360
+ !a.which && a.button !== X && (a.which = a.button & 1 ? 1 : a.button & 2 ? 3 : a.button & 4 ? 2 : 0);
1361
+ u = a.which;
1362
+ if (u = !((2 == u || 3 == u) && "A" != v))if (u = p.offsetHeight, u = !(0 === p.offsetWidth && 0 === u || p.style && "none" ===
1363
+ p.style.display)) {
1364
+ b:{
1365
+ for (u = p; u.parentNode;) {
1366
+ if (h(u)) {
1367
+ u = !0;
1368
+ break b
1369
+ }
1370
+ u = u.parentNode
1371
+ }
1372
+ u = !1
1373
+ }
1374
+ if (u = !u) {
1375
+ b:{
1376
+ u = j._prefs.ignoreTags;
1377
+ for (var z = 0; z < u.length; z++)if (e(u[z]) == e(v)) {
1378
+ u = !0;
1379
+ break b
1380
+ }
1381
+ u = !1
1382
+ }
1383
+ u = !u && j._prefs.filter(p, v)
1384
+ }
1385
+ }
1386
+ if (u) {
1387
+ v = +new Date;
1388
+ p = {dom: p, x: n.x, y: n.y, time: v};
1389
+ if (n = 50 < v - m)if (!(n = !j._prefs.ignoreSameClicks)) {
1390
+ if (n = q) {
1391
+ u = Math.abs(n.x - p.x);
1392
+ var z = Math.abs(n.y - p.y), o = p.time - n.time, n = n.dom == p.dom && 2 > u && 2 > z && 1E3 > o ? !0 : !1
1393
+ } else n = !1;
1394
+ n = !n
1395
+ }
1396
+ if (n && "MetrikaPlayer" != d.name) {
1397
+ u = i(a);
1398
+ n = u.x;
1399
+ u = u.y;
1400
+ var o = a.target || a.srcElement,
1401
+ s = j._prefs, x = c(o), r = "", z = t().href;
1402
+ switch (s.mode) {
1403
+ case "fixed":
1404
+ r = "0";
1405
+ k(o) && (r += "u");
1406
+ break;
1407
+ case "centered":
1408
+ r = "1";
1409
+ x = Math.floor(g() / 2);
1410
+ n = n > x ? n - x + 32768 : n;
1411
+ k(o) && (r += "u");
1412
+ break;
1413
+ default:
1414
+ r = e(o.nodeName);
1415
+ r = "BODY" == r || "HTML" == r ? g() : o.offsetWidth;
1416
+ s = e(o.nodeName);
1417
+ "BODY" == s || "HTML" == s ? (s = b.documentElement, s = Math.max(s.scrollHeight, b.body.scrollHeight, s.clientHeight)) : s = o.offsetHeight;
1418
+ r || (r = 1);
1419
+ s || (s = 1);
1420
+ n = Math.floor(65535 * (n - x.left) / r);
1421
+ u = Math.floor(65535 * (u - x.top) / s);
1422
+ for (x = ""; o.parentNode && "BODY" != e(o.nodeName) &&
1423
+ "HTML" != e(o.nodeName);) {
1424
+ x += y[o.nodeName] || "*";
1425
+ b:{
1426
+ for (var r = o.parentNode, A = s = 0; A < r.childNodes.length; A++)if (o.nodeName == r.childNodes[A].nodeName) {
1427
+ if (o == r.childNodes[A]) {
1428
+ r = s;
1429
+ break b
1430
+ }
1431
+ s++
1432
+ }
1433
+ r = 0
1434
+ }
1435
+ x += r || "";
1436
+ o = o.parentNode
1437
+ }
1438
+ r = w(x, 128)
1439
+ }
1440
+ R || (z = z ? z.replace(/\#.*$/, "") : z);
1441
+ "function" == typeof j._prefs.urlFilter && (z = j._prefs.urlFilter(z));
1442
+ n = ka(cc, ["page-url", w(z, $), "pointer-click", "x:" + n + ":y:" + u + ":t:" + Math.floor(Math.floor(+new Date - xb) / 100) + ":p:" + r]);
1443
+ (new Image).src = n;
1444
+ la(n);
1445
+ if (n = a.target || a.srcElement) {
1446
+ 3 == n.nodeType &&
1447
+ (n = n.parentNode);
1448
+ for (u = e(n.nodeName); n.parentNode && n.parentNode.nodeName && ("A" != u && "AREA" != u || !n.href);)n = n.parentNode, u = e(n.nodeName);
1449
+ n = !n.href ? !1 : n
1450
+ } else n = !1;
1451
+ n && ha(a, n) && M(j._prefs.delay)
1452
+ }
1453
+ m = v;
1454
+ q = p
1455
+ }
1456
+ }
1457
+ };
1458
+ this.setPrefs = function (a) {
1459
+ function b() {
1460
+ return!0
1461
+ }
1462
+
1463
+ this._prefs = "undefined" == typeof a || !1 === a || !0 === a ? {filter: b, ignoreTags: [], mode: "", delay: qa, quota: 0, hasQuota: !1, ignoreSameClicks: !0} : {filter: a.filter || b, ignoreTags: a.ignoreTags || [], mode: a.mode || "", delay: "undefined" == typeof a.delay ? qa : a.delay, quota: a.quota ||
1464
+ 0, hasQuota: !!a.quota, ignoreSameClicks: "undefined" == typeof a.ignoreSameClicks ? !0 : !1, urlFilter: a.urlFilter}
1465
+ };
1466
+ this.updateStatus = function (a) {
1467
+ switch (typeof a) {
1468
+ case "undefined":
1469
+ this.start(!0);
1470
+ break;
1471
+ case "boolean":
1472
+ a ? this.start(a) : this.stop();
1473
+ break;
1474
+ case "object":
1475
+ this.start(a)
1476
+ }
1477
+ };
1478
+ this._start = !1;
1479
+ this.start = function (a) {
1480
+ this.setPrefs(a);
1481
+ this._start || p(b, "click", this.handler);
1482
+ this._start = !0
1483
+ };
1484
+ this.stop = function () {
1485
+ this._start && F(b, "click", this.handler);
1486
+ this._start = !1
1487
+ };
1488
+ this.start(a)
1489
+ }
1490
+
1491
+ var m = this, ya = Math.round(1073741824 *
1492
+ Math.random()), za = "", ea = N.href, Ja = N.href, Ka = "";
1493
+ Ya._metrika.counter || (Ya._metrika.counter = m);
1494
+ var G;
1495
+ "object" == typeof x && (G = x, I = x.defer, za = x.ut, q = x.type, o = x.params, x = x.id);
1496
+ var x = x || 0, q = q || 0, La = "//mc.yandex.ru/watch/", cc = "//mc.yandex.ru/clmap/", T = [], Aa = null, Ba = null, oa = null, Ma = new function (a, g) {
1497
+ function c(a, b, c) {
1498
+ if (j)e(j, h(a, b, 0), c, "application/x-www-form-urlencoded"); else {
1499
+ if ("XMLHttpRequest"in d) {
1500
+ var g = new XMLHttpRequest;
1501
+ if ("withCredentials"in g) {
1502
+ var i = c ? "POST" : "GET", a = h(a, b, i == "POST" ? 1 : 0);
1503
+ g.open(i, a,
1504
+ true);
1505
+ g.withCredentials = true;
1506
+ i == "POST" && !Jb && g.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
1507
+ g.send(i == "POST" ? db(c) : null);
1508
+ return
1509
+ }
1510
+ }
1511
+ for (i in c)c.hasOwnProperty(i) && (b[i] = c[i]);
1512
+ (new Image).src = h(a, b, 0)
1513
+ }
1514
+ }
1515
+
1516
+ function e(a, b, c, e) {
1517
+ var d = "ifr" + Math.round(Math.random() * 1E10), g = a.createElement("div");
1518
+ g.style.position = "absolute";
1519
+ g.style.left = "-99999px";
1520
+ g.style.top = "-99999px";
1521
+ var b = ['<iframe name="', d, '"></iframe>', '<form action="', b, '" method="post" target="', d, '" enctype="', e, '">'], h;
1522
+ for (h in c)c.hasOwnProperty(h) &&
1523
+ C(b, '<textarea name="', h, '"></textarea>');
1524
+ C(b, "</form>");
1525
+ g.innerHTML = b.join("");
1526
+ a.body.appendChild(g);
1527
+ h = g.getElementsByTagName("form")[0];
1528
+ for (var i in c)if (c.hasOwnProperty(i))h[i].value = c[i];
1529
+ h.submit();
1530
+ setTimeout(function () {
1531
+ a.body.removeChild(g)
1532
+ }, 1E4)
1533
+ }
1534
+
1535
+ function h(b, c, e) {
1536
+ c["browser-info"] = ["ct", e, c["browser-info"]].join(":");
1537
+ return"//" + a + "/" + b + "/" + g + "?" + db(c)
1538
+ }
1539
+
1540
+ function i() {
1541
+ if (d.ActiveXObject) {
1542
+ var a = new ActiveXObject("htmlfile");
1543
+ a.open();
1544
+ a.write("<html><body></body></html>");
1545
+ a.close();
1546
+ return a
1547
+ }
1548
+ return null
1549
+ }
1550
+
1551
+ try {
1552
+ var j = i()
1553
+ } catch (p) {
1554
+ }
1555
+ var m = "", o = [];
1556
+ return{send: function (a, b, e, d) {
1557
+ a ? m ? m.indexOf("|" + a + "|") > -1 && c(b, e, d) : C(o, arguments) : c(b, e, d)
1558
+ }, sendMultipart: function (a, c, d, g) {
1559
+ e(j || b, h(a, c, g), d, "multipart/form-data")
1560
+ }, init: function (a) {
1561
+ m = "|" + a.join("|") + "|";
1562
+ for (a = 0; a < o.length; a++)m.indexOf("|" + o[a][0] + "|") > -1 && c(o[a][1], o[a][2], o[a][3]);
1563
+ o.length = 0
1564
+ }}
1565
+ }("mc.yandex.ru", x), fa;
1566
+ m.reachGoal = function (a, d) {
1567
+ var c = a ? "goal://" + t().hostname + "/" + a : t().href, e = ca(), h = a ? t().href : b.referrer;
1568
+ K(c, e, h, d, {ar: true, isDelay: a ? true : false,
1569
+ delay: 100});
1570
+ return true
1571
+ };
1572
+ var A;
1573
+ m.trackLinks = y;
1574
+ m.hit = function (a, b, c, e, d) {
1575
+ a && K(a, b, c, e, {ut: d, ar: true, saveRef: true})
1576
+ };
1577
+ m.params = function (a) {
1578
+ if (a) {
1579
+ var b = arguments.length;
1580
+ if (b > 1) {
1581
+ for (var c = {}, e = c, d = 0; d < b - 1; d++) {
1582
+ var i = "" + arguments[d];
1583
+ e[i] = {};
1584
+ d < b - 2 && (e = e[i])
1585
+ }
1586
+ e[i] = arguments[b - 1];
1587
+ a = c
1588
+ }
1589
+ K("", "", "", a, {ar: true, pa: true, onlyData: true})
1590
+ }
1591
+ };
1592
+ m.file = function (a, b, c, d) {
1593
+ a && K(a, "", t().href, d, {ar: true, ln: true, dl: true})
1594
+ };
1595
+ m.extLink = function (a, b, c, d) {
1596
+ a && K(a, "", t().href, d, {ar: true, ln: true, ut: ga})
1597
+ };
1598
+ m.notBounce = function () {
1599
+ var a =
1600
+ 0;
1601
+ Fa && ra && (a = ra - Fa);
1602
+ K("", "", "", null, {cl: a, ar: true, nb: true, onlyData: true})
1603
+ };
1604
+ var D = [];
1605
+ m.addFileExtension = function (a) {
1606
+ typeof a == "string" ? D.push(a) : D = D.concat(a)
1607
+ };
1608
+ m.clickmap = function (a) {
1609
+ m._clickmap ? m._clickmap.updateStatus(a) : m._clickmap = new bc(a)
1610
+ };
1611
+ var U = !1;
1612
+ m.accurateTrackBounce = function (a) {
1613
+ function d() {
1614
+ m.notBounce()
1615
+ }
1616
+
1617
+ if (!U) {
1618
+ U = true;
1619
+ if (!P(b.referrer, t().href)) {
1620
+ typeof a != "number" && (a = 15E3);
1621
+ Z ? setTimeout(d, a) : xa(d, a)
1622
+ }
1623
+ }
1624
+ };
1625
+ var Ca = null, R = !1;
1626
+ m.trackHash = function (a) {
1627
+ if (a === false) {
1628
+ if (R) {
1629
+ "onhashchange"in d ? F(d, "hashchange",
1630
+ na) : clearInterval(Ca);
1631
+ R = false
1632
+ }
1633
+ } else if (!R) {
1634
+ "onhashchange"in d ? p(d, "hashchange", na) : Pb(na);
1635
+ R = true
1636
+ }
1637
+ m._trackHash = R
1638
+ };
1639
+ m.video = function (a, b, c, d) {
1640
+ var h = ["end", "play", "pause", "seek"];
1641
+ if (a && c) {
1642
+ a:{
1643
+ for (var i = 0, j = h.length; i < j; i = i + 1)if (a === h[i]) {
1644
+ h = i;
1645
+ break a
1646
+ }
1647
+ h = false
1648
+ }
1649
+ h !== false && K(c, d || "", "", null, {ar: true, va: a, vt: ~~b})
1650
+ }
1651
+ };
1652
+ m.social = function (a, b, c) {
1653
+ a && b && K(c || t().href, "", "", null, {ar: true, sn: w(a, 64), sa: w(b, 64)})
1654
+ };
1655
+ m.enableAll = function () {
1656
+ m.trackLinks(true);
1657
+ m.clickmap(true);
1658
+ m.accurateTrackBounce()
1659
+ };
1660
+ m.pause = M;
1661
+ m.uploadPage =
1662
+ function () {
1663
+ };
1664
+ x && da()
1665
+ };
1666
+ d.ya_cid && new Ya.Metrika(d.ya_cid, d.ya_params, d.ya_class);
1667
+ d.ya_cid && !d.ya_hit && (d.ya_hit = function (b, d) {
1668
+ Ya._metrika.counter && Ya._metrika.counter.reachGoal(b, d)
1669
+ });
1670
+ var M = d.yandex_metrika_callback, I = d.yandex_metrika_callbacks;
1671
+ "function" == typeof M && M();
1672
+ if ("object" == typeof I)for (M = 0; M < I.length; M++) {
1673
+ var ha = I[M];
1674
+ ha && (I[M] = null, ha())
1675
+ }
1676
+ aa("yandex_metrika_callback");
1677
+ aa("yandex_metrika_callbacks");
1678
+ I = N.href;
1679
+ -1 != I.search("ym_playback=linkmap") ? ja("linkmap") : -1 != I.search("ym_playback=clickmap") &&
1680
+ ja("clickmap");
1681
+ d.Ya.Metrika.informer = function (b) {
1682
+ var d = !!Ya.Metrika._informer;
1683
+ Ya.Metrika._informer = b;
1684
+ d || ia(va + "//bs.yandex.ru/metrika/informer.js")
1685
+ };
1686
+ if (top != d && parent == top && d.postMessage && !Ya.Metrika_visorPlayerOn) {
1687
+ Ya.Metrika_visorPlayerOn = !0;
1688
+ I = b.createElement("div");
1689
+ I.innerHTML = '<iframe name="RemoteIframe" allowtransparency="true" style="position: absolute; left: -999px; top: -999px; width: 1px; height: 1px;"></iframe>';
1690
+ var sa = I.firstChild;
1691
+ setTimeout(function () {
1692
+ var d = b.body || b.documentElement;
1693
+ d.insertBefore(sa,
1694
+ d.firstChild);
1695
+ try {
1696
+ var o = sa.contentWindow.document
1697
+ } catch (q) {
1698
+ }
1699
+ if (o) {
1700
+ o.open();
1701
+ o.write('<!doctype html><html><head><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7,IE=edge" /></head><body><script type="text/javascript">var newversion = true;try {if (top.postMessage) {window.onmessage = function(evt) {evt = evt || window.event;try {var message = new Function("return " + evt.data)();} catch (e) {return;}if (/(^|\\.)yandex\\.(ru|com|ua|kz|by|com\\.tr)(:\\d{4})?$/.test(evt.origin) && message.name == "script" && message.data) {var head = document.getElementsByTagName("head")[0];var base = document.createElement("base");base.href = message.data;head.appendChild(base);var script = document.createElement("script");script.src = message.data;head.appendChild(script);parent.removeEventListener("message", window.onmessage, false);window.onmessage = null;}};if (navigator.userAgent.indexOf("Firefox/3.6.") > -1) {parent.addEventListener("message", window.onmessage, false);}top.postMessage(\'{"name":"ping"}\', "*");}} catch (e) {}<\/script></body></html>');
1702
+ o.close()
1703
+ }
1704
+ }, 500)
1705
+ }
1706
+ })(this, this.document);