jsduck 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. data/lib/jsduck/class.rb +2 -2
  2. data/lib/jsduck/guide_anchors.rb +8 -1
  3. data/lib/jsduck/guide_toc.rb +1 -1
  4. data/lib/jsduck/js/associator.rb +3 -1
  5. data/lib/jsduck/js/method.rb +5 -0
  6. data/lib/jsduck/js/node.rb +17 -0
  7. data/lib/jsduck/js/parser.rb +15 -1
  8. data/lib/jsduck/js/property.rb +9 -1
  9. data/lib/jsduck/js/rkelly_adapter.rb +29 -2
  10. data/lib/jsduck/members_index.rb +4 -5
  11. data/lib/jsduck/options.rb +1 -1
  12. data/lib/jsduck/process/inherit_doc.rb +4 -0
  13. data/lib/jsduck/process/inherit_members.rb +0 -2
  14. data/lib/jsduck/tag/cfg.rb +6 -1
  15. data/lib/jsduck/tag/property.rb +1 -0
  16. data/template-min/README.md +14 -0
  17. data/template-min/app-8718a7273ffcf400247ec95230aa1737.js +1 -0
  18. data/template-min/eg-iframe.html +26 -0
  19. data/template-min/extjs/ext-all.js +38 -0
  20. data/template-min/extjs/resources/themes/images/default/boundlist/trigger-arrow.png +0 -0
  21. data/template-min/extjs/resources/themes/images/default/box/corners-blue.gif +0 -0
  22. data/template-min/extjs/resources/themes/images/default/box/corners.gif +0 -0
  23. data/template-min/extjs/resources/themes/images/default/box/l-blue.gif +0 -0
  24. data/template-min/extjs/resources/themes/images/default/box/l.gif +0 -0
  25. data/template-min/extjs/resources/themes/images/default/box/r-blue.gif +0 -0
  26. data/template-min/extjs/resources/themes/images/default/box/r.gif +0 -0
  27. data/template-min/extjs/resources/themes/images/default/box/tb-blue.gif +0 -0
  28. data/template-min/extjs/resources/themes/images/default/box/tb.gif +0 -0
  29. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-corners.gif +0 -0
  30. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-corners.gif +0 -0
  31. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-sides.gif +0 -0
  32. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-sides.gif +0 -0
  33. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-bg.gif +0 -0
  34. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-corners.gif +0 -0
  35. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif +0 -0
  36. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-corners.gif +0 -0
  37. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-sides.gif +0 -0
  38. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-bg.gif +0 -0
  39. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-corners.gif +0 -0
  40. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-sides.gif +0 -0
  41. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-bg.gif +0 -0
  42. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-corners.gif +0 -0
  43. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-sides.gif +0 -0
  44. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif +0 -0
  45. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-corners.gif +0 -0
  46. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-sides.gif +0 -0
  47. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-sides.gif +0 -0
  48. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-bg.gif +0 -0
  49. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-corners.gif +0 -0
  50. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif +0 -0
  51. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-corners.gif +0 -0
  52. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-sides.gif +0 -0
  53. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif +0 -0
  54. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-corners.gif +0 -0
  55. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-sides.gif +0 -0
  56. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-bg.gif +0 -0
  57. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-corners.gif +0 -0
  58. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-sides.gif +0 -0
  59. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif +0 -0
  60. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-corners.gif +0 -0
  61. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-sides.gif +0 -0
  62. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-sides.gif +0 -0
  63. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-bg.gif +0 -0
  64. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-corners.gif +0 -0
  65. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif +0 -0
  66. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-corners.gif +0 -0
  67. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-sides.gif +0 -0
  68. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-bg.gif +0 -0
  69. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-corners.gif +0 -0
  70. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-sides.gif +0 -0
  71. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-bg.gif +0 -0
  72. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-corners.gif +0 -0
  73. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-sides.gif +0 -0
  74. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif +0 -0
  75. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-corners.gif +0 -0
  76. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-sides.gif +0 -0
  77. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-sides.gif +0 -0
  78. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-corners.gif +0 -0
  79. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-corners.gif +0 -0
  80. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-sides.gif +0 -0
  81. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif +0 -0
  82. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-corners.gif +0 -0
  83. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-sides.gif +0 -0
  84. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif +0 -0
  85. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-corners.gif +0 -0
  86. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-sides.gif +0 -0
  87. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif +0 -0
  88. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-corners.gif +0 -0
  89. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-sides.gif +0 -0
  90. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-sides.gif +0 -0
  91. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-corners.gif +0 -0
  92. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-corners.gif +0 -0
  93. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-sides.gif +0 -0
  94. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif +0 -0
  95. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-corners.gif +0 -0
  96. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-sides.gif +0 -0
  97. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif +0 -0
  98. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-corners.gif +0 -0
  99. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-sides.gif +0 -0
  100. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif +0 -0
  101. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-corners.gif +0 -0
  102. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-sides.gif +0 -0
  103. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-sides.gif +0 -0
  104. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-corners.gif +0 -0
  105. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-corners.gif +0 -0
  106. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-sides.gif +0 -0
  107. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif +0 -0
  108. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-corners.gif +0 -0
  109. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-sides.gif +0 -0
  110. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif +0 -0
  111. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-corners.gif +0 -0
  112. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-sides.gif +0 -0
  113. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif +0 -0
  114. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-corners.gif +0 -0
  115. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-sides.gif +0 -0
  116. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-sides.gif +0 -0
  117. data/template-min/extjs/resources/themes/images/default/button/arrow.gif +0 -0
  118. data/template-min/extjs/resources/themes/images/default/button/btn.gif +0 -0
  119. data/template-min/extjs/resources/themes/images/default/button/group-cs.gif +0 -0
  120. data/template-min/extjs/resources/themes/images/default/button/group-lr.gif +0 -0
  121. data/template-min/extjs/resources/themes/images/default/button/group-tb.gif +0 -0
  122. data/template-min/extjs/resources/themes/images/default/button/s-arrow-b-noline.gif +0 -0
  123. data/template-min/extjs/resources/themes/images/default/button/s-arrow-b.gif +0 -0
  124. data/template-min/extjs/resources/themes/images/default/button/s-arrow-bo.gif +0 -0
  125. data/template-min/extjs/resources/themes/images/default/button/s-arrow-light.gif +0 -0
  126. data/template-min/extjs/resources/themes/images/default/button/s-arrow-noline.gif +0 -0
  127. data/template-min/extjs/resources/themes/images/default/button/s-arrow-o.gif +0 -0
  128. data/template-min/extjs/resources/themes/images/default/button/s-arrow.gif +0 -0
  129. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-footer-bg.gif +0 -0
  130. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-footer-bg.png +0 -0
  131. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-header-bg.gif +0 -0
  132. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-header-bg.png +0 -0
  133. data/template-min/extjs/resources/themes/images/default/dd/drop-add.gif +0 -0
  134. data/template-min/extjs/resources/themes/images/default/dd/drop-no.gif +0 -0
  135. data/template-min/extjs/resources/themes/images/default/dd/drop-yes.gif +0 -0
  136. data/template-min/extjs/resources/themes/images/default/editor/tb-sprite.gif +0 -0
  137. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-corners.gif +0 -0
  138. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-corners.gif +0 -0
  139. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-sides.gif +0 -0
  140. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-sides.gif +0 -0
  141. data/template-min/extjs/resources/themes/images/default/form/checkbox.gif +0 -0
  142. data/template-min/extjs/resources/themes/images/default/form/clear-trigger.gif +0 -0
  143. data/template-min/extjs/resources/themes/images/default/form/date-trigger.gif +0 -0
  144. data/template-min/extjs/resources/themes/images/default/form/error-tip-corners.gif +0 -0
  145. data/template-min/extjs/resources/themes/images/default/form/exclamation.gif +0 -0
  146. data/template-min/extjs/resources/themes/images/default/form/radio.gif +0 -0
  147. data/template-min/extjs/resources/themes/images/default/form/search-trigger.gif +0 -0
  148. data/template-min/extjs/resources/themes/images/default/form/spinner-small.gif +0 -0
  149. data/template-min/extjs/resources/themes/images/default/form/spinner.gif +0 -0
  150. data/template-min/extjs/resources/themes/images/default/form/text-bg.gif +0 -0
  151. data/template-min/extjs/resources/themes/images/default/form/trigger-square.gif +0 -0
  152. data/template-min/extjs/resources/themes/images/default/form/trigger-tpl.gif +0 -0
  153. data/template-min/extjs/resources/themes/images/default/form/trigger.gif +0 -0
  154. data/template-min/extjs/resources/themes/images/default/grid/arrow-left-white.gif +0 -0
  155. data/template-min/extjs/resources/themes/images/default/grid/arrow-right-white.gif +0 -0
  156. data/template-min/extjs/resources/themes/images/default/grid/cell-special-bg.gif +0 -0
  157. data/template-min/extjs/resources/themes/images/default/grid/cell-special-bg.png +0 -0
  158. data/template-min/extjs/resources/themes/images/default/grid/cell-special-selected-bg.gif +0 -0
  159. data/template-min/extjs/resources/themes/images/default/grid/cell-special-selected-bg.png +0 -0
  160. data/template-min/extjs/resources/themes/images/default/grid/checked.gif +0 -0
  161. data/template-min/extjs/resources/themes/images/default/grid/col-move-bottom.gif +0 -0
  162. data/template-min/extjs/resources/themes/images/default/grid/col-move-top.gif +0 -0
  163. data/template-min/extjs/resources/themes/images/default/grid/column-header-bg.gif +0 -0
  164. data/template-min/extjs/resources/themes/images/default/grid/column-header-bg.png +0 -0
  165. data/template-min/extjs/resources/themes/images/default/grid/column-header-over-bg.gif +0 -0
  166. data/template-min/extjs/resources/themes/images/default/grid/column-header-over-bg.png +0 -0
  167. data/template-min/extjs/resources/themes/images/default/grid/columns.gif +0 -0
  168. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-left.gif +0 -0
  169. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-left.png +0 -0
  170. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-right.gif +0 -0
  171. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-right.png +0 -0
  172. data/template-min/extjs/resources/themes/images/default/grid/dirty.gif +0 -0
  173. data/template-min/extjs/resources/themes/images/default/grid/done.gif +0 -0
  174. data/template-min/extjs/resources/themes/images/default/grid/drop-no.gif +0 -0
  175. data/template-min/extjs/resources/themes/images/default/grid/drop-yes.gif +0 -0
  176. data/template-min/extjs/resources/themes/images/default/grid/footer-bg.gif +0 -0
  177. data/template-min/extjs/resources/themes/images/default/grid/grid-blue-hd.gif +0 -0
  178. data/template-min/extjs/resources/themes/images/default/grid/grid-blue-split.gif +0 -0
  179. data/template-min/extjs/resources/themes/images/default/grid/grid-hrow.gif +0 -0
  180. data/template-min/extjs/resources/themes/images/default/grid/grid-loading.gif +0 -0
  181. data/template-min/extjs/resources/themes/images/default/grid/grid-split.gif +0 -0
  182. data/template-min/extjs/resources/themes/images/default/grid/grid-vista-hd.gif +0 -0
  183. data/template-min/extjs/resources/themes/images/default/grid/grid3-hd-btn.gif +0 -0
  184. data/template-min/extjs/resources/themes/images/default/grid/grid3-hrow-over.gif +0 -0
  185. data/template-min/extjs/resources/themes/images/default/grid/grid3-hrow.gif +0 -0
  186. data/template-min/extjs/resources/themes/images/default/grid/grid3-rowheader.gif +0 -0
  187. data/template-min/extjs/resources/themes/images/default/grid/group-by.gif +0 -0
  188. data/template-min/extjs/resources/themes/images/default/grid/group-collapse.gif +0 -0
  189. data/template-min/extjs/resources/themes/images/default/grid/group-expand-sprite.gif +0 -0
  190. data/template-min/extjs/resources/themes/images/default/grid/group-expand.gif +0 -0
  191. data/template-min/extjs/resources/themes/images/default/grid/hd-pop.gif +0 -0
  192. data/template-min/extjs/resources/themes/images/default/grid/hmenu-asc.gif +0 -0
  193. data/template-min/extjs/resources/themes/images/default/grid/hmenu-desc.gif +0 -0
  194. data/template-min/extjs/resources/themes/images/default/grid/hmenu-lock.gif +0 -0
  195. data/template-min/extjs/resources/themes/images/default/grid/hmenu-lock.png +0 -0
  196. data/template-min/extjs/resources/themes/images/default/grid/hmenu-unlock.gif +0 -0
  197. data/template-min/extjs/resources/themes/images/default/grid/hmenu-unlock.png +0 -0
  198. data/template-min/extjs/resources/themes/images/default/grid/invalid_line.gif +0 -0
  199. data/template-min/extjs/resources/themes/images/default/grid/loading.gif +0 -0
  200. data/template-min/extjs/resources/themes/images/default/grid/mso-hd.gif +0 -0
  201. data/template-min/extjs/resources/themes/images/default/grid/nowait.gif +0 -0
  202. data/template-min/extjs/resources/themes/images/default/grid/page-first-disabled.gif +0 -0
  203. data/template-min/extjs/resources/themes/images/default/grid/page-first.gif +0 -0
  204. data/template-min/extjs/resources/themes/images/default/grid/page-last-disabled.gif +0 -0
  205. data/template-min/extjs/resources/themes/images/default/grid/page-last.gif +0 -0
  206. data/template-min/extjs/resources/themes/images/default/grid/page-next-disabled.gif +0 -0
  207. data/template-min/extjs/resources/themes/images/default/grid/page-next.gif +0 -0
  208. data/template-min/extjs/resources/themes/images/default/grid/page-prev-disabled.gif +0 -0
  209. data/template-min/extjs/resources/themes/images/default/grid/page-prev.gif +0 -0
  210. data/template-min/extjs/resources/themes/images/default/grid/pick-button.gif +0 -0
  211. data/template-min/extjs/resources/themes/images/default/grid/property-cell-bg.gif +0 -0
  212. data/template-min/extjs/resources/themes/images/default/grid/property-cell-selected-bg.gif +0 -0
  213. data/template-min/extjs/resources/themes/images/default/grid/refresh-disabled.gif +0 -0
  214. data/template-min/extjs/resources/themes/images/default/grid/refresh.gif +0 -0
  215. data/template-min/extjs/resources/themes/images/default/grid/row-check-sprite.gif +0 -0
  216. data/template-min/extjs/resources/themes/images/default/grid/row-expand-sprite.gif +0 -0
  217. data/template-min/extjs/resources/themes/images/default/grid/row-over.gif +0 -0
  218. data/template-min/extjs/resources/themes/images/default/grid/row-sel.gif +0 -0
  219. data/template-min/extjs/resources/themes/images/default/grid/sort-hd.gif +0 -0
  220. data/template-min/extjs/resources/themes/images/default/grid/sort_asc.gif +0 -0
  221. data/template-min/extjs/resources/themes/images/default/grid/sort_desc.gif +0 -0
  222. data/template-min/extjs/resources/themes/images/default/grid/unchecked.gif +0 -0
  223. data/template-min/extjs/resources/themes/images/default/grid/wait.gif +0 -0
  224. data/template-min/extjs/resources/themes/images/default/layout/mini-bottom.gif +0 -0
  225. data/template-min/extjs/resources/themes/images/default/layout/mini-left.gif +0 -0
  226. data/template-min/extjs/resources/themes/images/default/layout/mini-right.gif +0 -0
  227. data/template-min/extjs/resources/themes/images/default/layout/mini-top.gif +0 -0
  228. data/template-min/extjs/resources/themes/images/default/menu/checked.gif +0 -0
  229. data/template-min/extjs/resources/themes/images/default/menu/group-checked.gif +0 -0
  230. data/template-min/extjs/resources/themes/images/default/menu/item-over.gif +0 -0
  231. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-bg.gif +0 -0
  232. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-corners.gif +0 -0
  233. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-sides.gif +0 -0
  234. data/template-min/extjs/resources/themes/images/default/menu/menu-parent.gif +0 -0
  235. data/template-min/extjs/resources/themes/images/default/menu/menu.gif +0 -0
  236. data/template-min/extjs/resources/themes/images/default/menu/unchecked.gif +0 -0
  237. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif +0 -0
  238. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif +0 -0
  239. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-corners.gif +0 -0
  240. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-sides.gif +0 -0
  241. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-bg.gif +0 -0
  242. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-corners.gif +0 -0
  243. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-sides.gif +0 -0
  244. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-bg.gif +0 -0
  245. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-corners.gif +0 -0
  246. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-sides.gif +0 -0
  247. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-bg.gif +0 -0
  248. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-corners.gif +0 -0
  249. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-sides.gif +0 -0
  250. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-bg.gif +0 -0
  251. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-corners.gif +0 -0
  252. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-sides.gif +0 -0
  253. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif +0 -0
  254. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-corners.gif +0 -0
  255. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-sides.gif +0 -0
  256. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif +0 -0
  257. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-corners.gif +0 -0
  258. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-sides.gif +0 -0
  259. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif +0 -0
  260. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-corners.gif +0 -0
  261. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-sides.gif +0 -0
  262. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif +0 -0
  263. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif +0 -0
  264. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif +0 -0
  265. data/template-min/extjs/resources/themes/images/default/panel/panel-default-framed-corners.gif +0 -0
  266. data/template-min/extjs/resources/themes/images/default/panel/panel-default-framed-sides.gif +0 -0
  267. data/template-min/extjs/resources/themes/images/default/progress/progress-default-bg.gif +0 -0
  268. data/template-min/extjs/resources/themes/images/default/shared/blue-loading.gif +0 -0
  269. data/template-min/extjs/resources/themes/images/default/shared/calendar.gif +0 -0
  270. data/template-min/extjs/resources/themes/images/default/shared/glass-bg.gif +0 -0
  271. data/template-min/extjs/resources/themes/images/default/shared/hd-sprite.gif +0 -0
  272. data/template-min/extjs/resources/themes/images/default/shared/icon-error.gif +0 -0
  273. data/template-min/extjs/resources/themes/images/default/shared/icon-info.gif +0 -0
  274. data/template-min/extjs/resources/themes/images/default/shared/icon-question.gif +0 -0
  275. data/template-min/extjs/resources/themes/images/default/shared/icon-warning.gif +0 -0
  276. data/template-min/extjs/resources/themes/images/default/shared/large-loading.gif +0 -0
  277. data/template-min/extjs/resources/themes/images/default/shared/left-btn.gif +0 -0
  278. data/template-min/extjs/resources/themes/images/default/shared/loading-balls.gif +0 -0
  279. data/template-min/extjs/resources/themes/images/default/shared/right-btn.gif +0 -0
  280. data/template-min/extjs/resources/themes/images/default/shared/shadow-c.png +0 -0
  281. data/template-min/extjs/resources/themes/images/default/shared/shadow-lr.png +0 -0
  282. data/template-min/extjs/resources/themes/images/default/shared/shadow.png +0 -0
  283. data/template-min/extjs/resources/themes/images/default/shared/warning.gif +0 -0
  284. data/template-min/extjs/resources/themes/images/default/sizer/e-handle-dark.gif +0 -0
  285. data/template-min/extjs/resources/themes/images/default/sizer/e-handle.gif +0 -0
  286. data/template-min/extjs/resources/themes/images/default/sizer/ne-handle-dark.gif +0 -0
  287. data/template-min/extjs/resources/themes/images/default/sizer/ne-handle.gif +0 -0
  288. data/template-min/extjs/resources/themes/images/default/sizer/nw-handle-dark.gif +0 -0
  289. data/template-min/extjs/resources/themes/images/default/sizer/nw-handle.gif +0 -0
  290. data/template-min/extjs/resources/themes/images/default/sizer/s-handle-dark.gif +0 -0
  291. data/template-min/extjs/resources/themes/images/default/sizer/s-handle.gif +0 -0
  292. data/template-min/extjs/resources/themes/images/default/sizer/se-handle-dark.gif +0 -0
  293. data/template-min/extjs/resources/themes/images/default/sizer/se-handle.gif +0 -0
  294. data/template-min/extjs/resources/themes/images/default/sizer/square.gif +0 -0
  295. data/template-min/extjs/resources/themes/images/default/sizer/sw-handle-dark.gif +0 -0
  296. data/template-min/extjs/resources/themes/images/default/sizer/sw-handle.gif +0 -0
  297. data/template-min/extjs/resources/themes/images/default/slider/slider-bg.gif +0 -0
  298. data/template-min/extjs/resources/themes/images/default/slider/slider-bg.png +0 -0
  299. data/template-min/extjs/resources/themes/images/default/slider/slider-thumb.gif +0 -0
  300. data/template-min/extjs/resources/themes/images/default/slider/slider-thumb.png +0 -0
  301. data/template-min/extjs/resources/themes/images/default/slider/slider-v-bg.gif +0 -0
  302. data/template-min/extjs/resources/themes/images/default/slider/slider-v-bg.png +0 -0
  303. data/template-min/extjs/resources/themes/images/default/slider/slider-v-thumb.gif +0 -0
  304. data/template-min/extjs/resources/themes/images/default/slider/slider-v-thumb.png +0 -0
  305. data/template-min/extjs/resources/themes/images/default/tab-bar/scroll-left.gif +0 -0
  306. data/template-min/extjs/resources/themes/images/default/tab-bar/scroll-right.gif +0 -0
  307. data/template-min/extjs/resources/themes/images/default/tab-bar/tab-bar-default-bg.gif +0 -0
  308. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif +0 -0
  309. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-corners.gif +0 -0
  310. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-sides.gif +0 -0
  311. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-bg.gif +0 -0
  312. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-corners.gif +0 -0
  313. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif +0 -0
  314. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-corners.gif +0 -0
  315. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-sides.gif +0 -0
  316. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif +0 -0
  317. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-corners.gif +0 -0
  318. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-sides.gif +0 -0
  319. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-sides.gif +0 -0
  320. data/template-min/extjs/resources/themes/images/default/tab/tab-default-close.gif +0 -0
  321. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-bg.gif +0 -0
  322. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-corners.gif +0 -0
  323. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-sides.gif +0 -0
  324. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-bg.gif +0 -0
  325. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-corners.gif +0 -0
  326. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif +0 -0
  327. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-corners.gif +0 -0
  328. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-sides.gif +0 -0
  329. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-bg.gif +0 -0
  330. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-corners.gif +0 -0
  331. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-sides.gif +0 -0
  332. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-sides.gif +0 -0
  333. data/template-min/extjs/resources/themes/images/default/tip/tip-corners.gif +0 -0
  334. data/template-min/extjs/resources/themes/images/default/tip/tip-sides.gif +0 -0
  335. data/template-min/extjs/resources/themes/images/default/toolbar/more.gif +0 -0
  336. data/template-min/extjs/resources/themes/images/default/toolbar/scroll-left.gif +0 -0
  337. data/template-min/extjs/resources/themes/images/default/toolbar/scroll-right.gif +0 -0
  338. data/template-min/extjs/resources/themes/images/default/toolbar/toolbar-default-bg.gif +0 -0
  339. data/template-min/extjs/resources/themes/images/default/tools/tool-sprite-tpl.gif +0 -0
  340. data/template-min/extjs/resources/themes/images/default/tools/tool-sprites.gif +0 -0
  341. data/template-min/extjs/resources/themes/images/default/tools/tools-sprites-trans.gif +0 -0
  342. data/template-min/extjs/resources/themes/images/default/tree/arrows.gif +0 -0
  343. data/template-min/extjs/resources/themes/images/default/tree/drop-above.gif +0 -0
  344. data/template-min/extjs/resources/themes/images/default/tree/drop-add.gif +0 -0
  345. data/template-min/extjs/resources/themes/images/default/tree/drop-append.gif +0 -0
  346. data/template-min/extjs/resources/themes/images/default/tree/drop-below.gif +0 -0
  347. data/template-min/extjs/resources/themes/images/default/tree/drop-between.gif +0 -0
  348. data/template-min/extjs/resources/themes/images/default/tree/drop-no.gif +0 -0
  349. data/template-min/extjs/resources/themes/images/default/tree/drop-over.gif +0 -0
  350. data/template-min/extjs/resources/themes/images/default/tree/drop-under.gif +0 -0
  351. data/template-min/extjs/resources/themes/images/default/tree/drop-yes.gif +0 -0
  352. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-minus-nl.gif +0 -0
  353. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-minus.gif +0 -0
  354. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-plus-nl.gif +0 -0
  355. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-plus.gif +0 -0
  356. data/template-min/extjs/resources/themes/images/default/tree/elbow-end.gif +0 -0
  357. data/template-min/extjs/resources/themes/images/default/tree/elbow-line.gif +0 -0
  358. data/template-min/extjs/resources/themes/images/default/tree/elbow-minus-nl.gif +0 -0
  359. data/template-min/extjs/resources/themes/images/default/tree/elbow-minus.gif +0 -0
  360. data/template-min/extjs/resources/themes/images/default/tree/elbow-plus-nl.gif +0 -0
  361. data/template-min/extjs/resources/themes/images/default/tree/elbow-plus.gif +0 -0
  362. data/template-min/extjs/resources/themes/images/default/tree/elbow.gif +0 -0
  363. data/template-min/extjs/resources/themes/images/default/tree/folder-open.gif +0 -0
  364. data/template-min/extjs/resources/themes/images/default/tree/folder.gif +0 -0
  365. data/template-min/extjs/resources/themes/images/default/tree/leaf.gif +0 -0
  366. data/template-min/extjs/resources/themes/images/default/tree/loading.gif +0 -0
  367. data/template-min/extjs/resources/themes/images/default/tree/s.gif +0 -0
  368. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-bottom.gif +0 -0
  369. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-left.gif +0 -0
  370. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-right.gif +0 -0
  371. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-top.gif +0 -0
  372. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-bottom-corners.gif +0 -0
  373. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-bottom-sides.gif +0 -0
  374. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-corners.gif +0 -0
  375. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-sides.gif +0 -0
  376. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-corners.gif +0 -0
  377. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-sides.gif +0 -0
  378. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-corners.gif +0 -0
  379. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-sides.gif +0 -0
  380. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-corners.gif +0 -0
  381. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-sides.gif +0 -0
  382. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-left-corners.gif +0 -0
  383. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-left-sides.gif +0 -0
  384. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-right-corners.gif +0 -0
  385. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-right-sides.gif +0 -0
  386. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-top-corners.gif +0 -0
  387. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-top-sides.gif +0 -0
  388. data/template-min/extjs/resources/themes/images/default/window/window-default-corners.gif +0 -0
  389. data/template-min/extjs/resources/themes/images/default/window/window-default-sides.gif +0 -0
  390. data/template-min/favicon.ico +0 -0
  391. data/template-min/index-template.html +35 -0
  392. data/template-min/index.php +94 -0
  393. data/template-min/mobile-redirect.js +1 -0
  394. data/template-min/print-template.html +52 -0
  395. data/template-min/resources/css/app-68f1acb2324b20262c41507f2e1b4b0b.css +1 -0
  396. data/template-min/resources/images/ajax-loader.gif +0 -0
  397. data/template-min/resources/images/arrows.png +0 -0
  398. data/template-min/resources/images/class-m.png +0 -0
  399. data/template-min/resources/images/comment-bubble.png +0 -0
  400. data/template-min/resources/images/comment.png +0 -0
  401. data/template-min/resources/images/component-m.png +0 -0
  402. data/template-min/resources/images/default-guide.png +0 -0
  403. data/template-min/resources/images/doc-m.png +0 -0
  404. data/template-min/resources/images/down-arr.png +0 -0
  405. data/template-min/resources/images/elbow-end.gif +0 -0
  406. data/template-min/resources/images/example-icons.png +0 -0
  407. data/template-min/resources/images/expandcollapse.png +0 -0
  408. data/template-min/resources/images/group-expand-sprite.gif +0 -0
  409. data/template-min/resources/images/header.png +0 -0
  410. data/template-min/resources/images/hero-extjs4-alt.png +0 -0
  411. data/template-min/resources/images/icons.png +0 -0
  412. data/template-min/resources/images/link-green-standard-over.png +0 -0
  413. data/template-min/resources/images/link-green-standard.png +0 -0
  414. data/template-min/resources/images/loading.gif +0 -0
  415. data/template-min/resources/images/logo-screen-noglow.png +0 -0
  416. data/template-min/resources/images/logo.png +0 -0
  417. data/template-min/resources/images/member-collapsed.gif +0 -0
  418. data/template-min/resources/images/member-expanded.gif +0 -0
  419. data/template-min/resources/images/member-hover.gif +0 -0
  420. data/template-min/resources/images/more.png +0 -0
  421. data/template-min/resources/images/phone-l.jpg +0 -0
  422. data/template-min/resources/images/phone-p.jpg +0 -0
  423. data/template-min/resources/images/phone-small-l.jpg +0 -0
  424. data/template-min/resources/images/phone-small-p.jpg +0 -0
  425. data/template-min/resources/images/print.png +0 -0
  426. data/template-min/resources/images/sample-over.gif +0 -0
  427. data/template-min/resources/images/search-box.png +0 -0
  428. data/template-min/resources/images/singleton-m.png +0 -0
  429. data/template-min/resources/images/tablet-l.jpg +0 -0
  430. data/template-min/resources/images/tablet-p.jpg +0 -0
  431. data/template-min/resources/images/tabs.png +0 -0
  432. data/template-min/resources/images/text-bg.gif +0 -0
  433. data/template-min/resources/images/vote-arrows.png +0 -0
  434. data/template-min/resources/images/welcome-bg-js4.gif +0 -0
  435. data/template-min/resources/images/x.png +0 -0
  436. data/template-min/resources/images/x12.png +0 -0
  437. data/template-min/resources/prettify/prettify.css +1 -0
  438. data/template-min/resources/prettify/prettify.js +30 -0
  439. data/template-min/template.html +44 -0
  440. metadata +196 -201
  441. data/.gitignore +0 -6
  442. data/.travis.yml +0 -12
  443. data/Rakefile +0 -302
  444. data/bin/compare +0 -374
  445. data/bin/graph +0 -52
  446. data/jsduck.gemspec +0 -33
data/lib/jsduck/class.rb CHANGED
@@ -171,8 +171,8 @@ module JsDuck
171
171
 
172
172
  # This must be called whenever member hashes are changed.
173
173
  # It updates the :id fields of members and clears the caches.
174
- def update_members!(members)
175
- members.each do |m|
174
+ def refresh_member_ids!
175
+ @doc[:members].each do |m|
176
176
  m[:id] = Class.member_id(m)
177
177
  end
178
178
  @members_index.invalidate!
@@ -1,3 +1,5 @@
1
+ require 'cgi'
2
+
1
3
  module JsDuck
2
4
 
3
5
  # Transforms in-page links so they won't break docs app #!-navigation.
@@ -9,7 +11,7 @@ module JsDuck
9
11
 
10
12
  def self.transform(html, guide_name)
11
13
  html.gsub(/(<a\s+(?:[^<>]*\s+)?href=['"]#)([^!\/].*?)(['"])/i) do |m|
12
- "#{$1}!/guide/#{guide_name}-section-#{$2}#{$3}"
14
+ $1 + "!/guide/" + transform_id($2, guide_name) + $3
13
15
 
14
16
  end.gsub(/(<a\s+(?:[^<>]*\s+)?name=['"])(.*?)(['"])/i) do |m|
15
17
  $1 + transform_id($2, guide_name) + $3
@@ -23,6 +25,11 @@ module JsDuck
23
25
  if id =~ /^#{guide_name}-section-/
24
26
  id
25
27
  else
28
+ # Escape the ID if it's not already escaped. This check is
29
+ # needed to avoid re-escaping anchor-links created with
30
+ # Markdown - these get auto-escaped by RDiscount.
31
+ id = (id =~ /%[0-9A-F]{2}/) ? id : CGI::escape(id)
32
+
26
33
  "#{guide_name}-section-#{id}"
27
34
  end
28
35
  end
@@ -41,7 +41,7 @@ module JsDuck
41
41
  end
42
42
 
43
43
  def self.title_to_id(title)
44
- title.downcase.gsub(/[^\w]+/, "-")
44
+ CGI::escape(title.downcase.gsub(/ /, "-"))
45
45
  end
46
46
 
47
47
  end
@@ -161,7 +161,9 @@ module JsDuck
161
161
  exit(1)
162
162
  end
163
163
 
164
- properties.map {|p| node[p] }.compact.flatten
164
+ # First flatten, then get rid of all nils, because the inner
165
+ # arrays may also contain nils.
166
+ properties.map {|p| node[p] }.flatten.compact
165
167
  end
166
168
 
167
169
  # All possible node types in Esprima-created abstract syntax tree
@@ -37,6 +37,11 @@ module JsDuck
37
37
  elsif ast.property? && ast["value"].function?
38
38
  make(ast["key"].key_value, ast["value"])
39
39
 
40
+ # Object.defineProperty(obj, "prop", {value: function() {} })
41
+ elsif exp && (value = exp.object_descriptor("value")) && detect(value)
42
+ name = exp["arguments"][1].to_value
43
+ make(name, value)
44
+
40
45
  else
41
46
  nil
42
47
  end
@@ -120,6 +120,19 @@ module JsDuck
120
120
  end
121
121
  end
122
122
 
123
+ # Returns value of a given field from Object.defineProperty call
124
+ # descriptor object.
125
+ def object_descriptor(descriptor_key)
126
+ return unless define_property?
127
+
128
+ descriptor = child("arguments")[2]
129
+ descriptor.each_property do |key, value, prop|
130
+ return value if key == descriptor_key
131
+ end
132
+
133
+ return nil
134
+ end
135
+
123
136
  # Returns line number in parsed source where the Node resides.
124
137
  def linenr
125
138
  # Get line number from third place at range array.
@@ -139,6 +152,10 @@ module JsDuck
139
152
  call_expression? && child("callee").to_s == "this.fireEvent"
140
153
  end
141
154
 
155
+ def define_property?
156
+ call_expression? && child("callee").to_s == "Object.defineProperty"
157
+ end
158
+
142
159
  def string?
143
160
  literal? && @node["value"].is_a?(String)
144
161
  end
@@ -18,12 +18,26 @@ module JsDuck
18
18
  # Parses JavaScript source code with RKelly, turns RKelly AST
19
19
  # into Esprima AST, and associate comments with syntax nodes.
20
20
  def parse
21
- ast = RKelly::Parser.new.parse(@input)
21
+ parser = RKelly::Parser.new
22
+ ast = parser.parse(@input)
23
+ unless ast
24
+ raise syntax_error(parser)
25
+ end
26
+
22
27
  ast = ADAPTER.adapt(ast)
23
28
  # Adjust Program node range
24
29
  ast["range"] = [0, @input.length-1]
25
30
  return Js::Associator.new(@input).associate(ast)
26
31
  end
32
+
33
+ def syntax_error(parser)
34
+ token = parser.stopped_at
35
+ if token
36
+ "Invalid JavaScript syntax: Unexpected '#{token.value}' on line #{token.range.from.line}"
37
+ else
38
+ "Invalid JavaScript syntax: Unexpected end of file"
39
+ end
40
+ end
27
41
  end
28
42
 
29
43
  end
@@ -38,18 +38,26 @@ module JsDuck
38
38
  elsif exp && exp.string?
39
39
  make(exp.to_value)
40
40
 
41
+ # Object.defineProperty(obj, "prop", {value: x})
42
+ elsif exp && exp.define_property?
43
+ name = exp["arguments"][1].to_value
44
+ writable = exp.object_descriptor("writable")
45
+ readonly = writable ? !writable.to_value : true
46
+ make(name, exp.object_descriptor("value"), readonly)
47
+
41
48
  else
42
49
  nil
43
50
  end
44
51
  end
45
52
 
46
53
  # Produces a doc-hash for a property.
47
- def make(name=nil, ast=nil)
54
+ def make(name=nil, ast=nil, readonly=nil)
48
55
  return {
49
56
  :tagname => :property,
50
57
  :name => name,
51
58
  :type => ast && ast.value_type,
52
59
  :default => ast && default(ast),
60
+ :readonly => readonly,
53
61
  }
54
62
  end
55
63
 
@@ -65,7 +65,7 @@ module JsDuck
65
65
  when RKelly::Nodes::StringNode == node.class
66
66
  make(node, {
67
67
  "type" => "Literal",
68
- "value" => eval(node.value),
68
+ "value" => string_value(node.value),
69
69
  "raw" => node.value,
70
70
  })
71
71
  when RKelly::Nodes::RegexpNode == node.class
@@ -227,7 +227,7 @@ module JsDuck
227
227
  elsif node.name =~ /['"]/
228
228
  {
229
229
  "type" => "Literal",
230
- "value" => eval(node.name),
230
+ "value" => string_value(node.name),
231
231
  "raw" => node.name,
232
232
  "range" => offset_range(node, :name),
233
233
  }
@@ -458,6 +458,33 @@ module JsDuck
458
458
  }
459
459
  end
460
460
 
461
+ # Evaluates the actual value of a JavaScript string.
462
+ # Importantly we avoid using Ruby's eval().
463
+ def string_value(string)
464
+ string[1..-2].gsub(/\\([0-9]{1,3}|x[0-9A-F]{1,2}|u[0-9A-F]{4}|.)/) do |s|
465
+ if STRING_ESCAPES[s]
466
+ STRING_ESCAPES[s]
467
+ elsif s =~ /^\\[0-9]/
468
+ s[1..-1].oct.chr
469
+ elsif s =~ /^\\x[0-9A-F]/
470
+ s[2..-1].hex.chr
471
+ elsif s =~ /^\\u[0-9A-F]/
472
+ [s[2..-1].hex].pack("U")
473
+ else
474
+ s[1, 1]
475
+ end
476
+ end
477
+ end
478
+
479
+ STRING_ESCAPES = {
480
+ '\b' => "\b",
481
+ '\f' => "\f",
482
+ '\n' => "\n",
483
+ '\r' => "\r",
484
+ '\t' => "\t",
485
+ '\v' => "\v",
486
+ }
487
+
461
488
  BINARY_NODES = {
462
489
  RKelly::Nodes::SubtractNode => "-",
463
490
  RKelly::Nodes::LessOrEqualNode => "<=",
@@ -42,15 +42,14 @@ module JsDuck
42
42
  end
43
43
 
44
44
  # Clears the search cache.
45
- # Using this is REALLY BAD - try to get rid of it.
45
+ #
46
+ # Using this degrades performance. It's currently triggered just
47
+ # once after InheritDoc process is run. Avoid using it in other
48
+ # places.
46
49
  def invalidate!
47
50
  @map_by_id = nil
48
51
  @global_map_by_id = nil
49
52
  @global_map_by_name = nil
50
-
51
- @cls.parent.members_index.invalidate! if @cls.parent
52
-
53
- @cls.mixins.each {|mix| mix.members_index.invalidate! }
54
53
  end
55
54
 
56
55
  protected
@@ -94,7 +94,7 @@ module JsDuck
94
94
  ]
95
95
  @ext4_events = nil
96
96
 
97
- @version = "5.0.0"
97
+ @version = "5.0.1"
98
98
  # Customizing output
99
99
  @title = "Documentation - JSDuck"
100
100
  @header = "<strong>Documentation</strong> JSDuck"
@@ -20,6 +20,10 @@ module JsDuck
20
20
  @inherit_class.resolve(cls)
21
21
  @inherit_members.resolve(cls)
22
22
  end
23
+
24
+ @relations.each do |cls|
25
+ cls.refresh_member_ids!
26
+ end
23
27
  end
24
28
 
25
29
  end
@@ -126,8 +126,6 @@ module JsDuck
126
126
  members.each do |m|
127
127
  m[:tagname] = :cfg
128
128
  end
129
- # Ask class to update its internal caches for these members
130
- cls.update_members!(members)
131
129
  end
132
130
 
133
131
  # For auto-detected members/classes (which have @private == :inherit)
@@ -28,7 +28,12 @@ module JsDuck::Tag
28
28
  :default => true,
29
29
  :optional => true
30
30
  })
31
- tag[:optional] = false if parse_required(p)
31
+
32
+ # don't parse (required) after subproperties
33
+ unless tag[:name] =~ /\./
34
+ tag[:optional] = false if parse_required(p)
35
+ end
36
+
32
37
  tag[:doc] = :multiline
33
38
  tag
34
39
  end
@@ -49,6 +49,7 @@ module JsDuck::Tag
49
49
  h = super(code)
50
50
  h[:type] = code[:type]
51
51
  h[:default] = code[:default]
52
+ h[:readonly] = code[:readonly]
52
53
  h
53
54
  end
54
55
 
@@ -0,0 +1,14 @@
1
+ Manyally create extjs/ directory inside this dir.
2
+
3
+ Either copy over ExtJS directory or create symlink to it.
4
+
5
+ $ cp -r /path/to/ext-4.0.0 template/extjs
6
+
7
+ or
8
+
9
+ $ ln -s /path/to/ext-4.0.0 template/extjs
10
+
11
+ Then run compass to generate custom ExtJS theme:
12
+
13
+ $ compass template/resources/sass
14
+
@@ -0,0 +1 @@
1
+ var CodeMirror=(function(){function u(aM,aJ){var b1={},bj=u.defaults;for(var az in bj){if(bj.hasOwnProperty(az)){b1[az]=(aJ&&aJ.hasOwnProperty(az)?aJ:bj)[az]}}var aD=document.createElement("div");aD.className="CodeMirror"+(b1.lineWrapping?" CodeMirror-wrap":"");aD.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor">&#160;</pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>';if(aM.appendChild){aM.appendChild(aD)}else{aM(aD)}var bX=aD.firstChild,bm=bX.firstChild,bk=aD.lastChild,bM=bk.firstChild,cg=bM.firstChild,aH=cg.firstChild,aY=aH.firstChild,bu=aH.nextSibling.firstChild,av=bu.firstChild,bc=av.nextSibling,bg=bc.nextSibling,aq=bg.nextSibling;cD();if(s){bm.style.width="0px"}if(!f){bu.draggable=true}bu.style.outline="none";if(b1.tabindex!=null){bm.tabIndex=b1.tabindex}if(b1.autofocus){bz()}if(!b1.gutter&&!b1.lineNumbers){aH.style.display="none"}if(m){bX.style.height="1px",bX.style.position="absolute"}try{ct("x")}catch(b8){if(b8.message.match(/runtime/i)){b8=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")}throw b8}var b7=new z(),aw=new z(),cP;var cb,cy=new i([new ah([new e("")])]),ch,cj;bT();var cW={from:{line:0,ch:0},to:{line:0,ch:0},inverted:false};var ci,bq,aZ,bF=0,bb,cn=false,cs=false;var cp,b6,aB,cN,aP,bf,aS,cA;var bd=0,cQ=0,bL=0,bN=0;var b4;var bD="",aF;var ap={};ar(function(){aW(b1.value||"");cp=false})();var a8=new k();r(bk,"mousedown",ar(ck));r(bk,"dblclick",ar(bW));r(bu,"selectstart",T);if(!N){r(bk,"contextmenu",a1)}r(bk,"scroll",function(){bF=bk.scrollTop;cd([]);if(b1.fixedGutter){aH.style.left=bk.scrollLeft+"px"}if(b1.onScroll){b1.onScroll(b9)}});r(window,"resize",function(){cd(true)});r(bm,"keyup",ar(cl));r(bm,"input",aQ);r(bm,"keydown",ar(cc));r(bm,"keypress",ar(bn));r(bm,"focus",cU);r(bm,"blur",aE);if(b1.dragDrop){r(bu,"dragstart",aI);function bC(cZ){if(b1.onDragEvent&&b1.onDragEvent(b9,O(cZ))){return}w(cZ)}r(bk,"dragenter",bC);r(bk,"dragover",bC);r(bk,"drop",ar(an))}r(bk,"paste",function(){bz();aQ()});r(bm,"paste",aQ);r(bm,"cut",ar(function(){if(!b1.readOnly){bs("")}}));if(m){r(bM,"mouseup",function(){if(document.activeElement==bm){bm.blur()}bz()})}var cw;try{cw=(document.activeElement==bm)}catch(b8){}if(cw||b1.autofocus){setTimeout(cU,20)}else{aE()}function br(cZ){return cZ>=0&&cZ<cy.size}var b9=aD.CodeMirror={getValue:b2,setValue:ar(aW),getSelection:b3,replaceSelection:ar(bs),focus:function(){window.focus();bz();cU();aQ()},setOption:function(c0,c1){var cZ=b1[c0];b1[c0]=c1;if(c0=="mode"||c0=="indentUnit"){bT()}else{if(c0=="readOnly"&&c1=="nocursor"){aE();bm.blur()}else{if(c0=="readOnly"&&!c1){cC(true)}else{if(c0=="theme"){cD()}else{if(c0=="lineWrapping"&&cZ!=c1){ar(cG)()}else{if(c0=="tabSize"){cd(true)}}}}}}if(c0=="lineNumbers"||c0=="gutter"||c0=="firstLineNumber"||c0=="theme"){be();cd(true)}},getOption:function(cZ){return b1[cZ]},undo:ar(cT),redo:ar(cJ),indentLine:ar(function(c0,cZ){if(typeof cZ!="string"){if(cZ==null){cZ=b1.smartIndent?"smart":"prev"}else{cZ=cZ?"add":"subtract"}}if(br(c0)){by(c0,cZ)}}),indentSelection:ar(cB),historySize:function(){return{undo:a8.done.length,redo:a8.undone.length}},clearHistory:function(){a8=new k()},matchBrackets:ar(function(){ce(true)}),getTokenAt:ar(function(cZ){cZ=aT(cZ);return cF(cZ.line).getTokenAt(cb,cu(cZ.line),cZ.ch)}),getStateAfter:function(cZ){cZ=bZ(cZ==null?cy.size-1:cZ);return cu(cZ+1)},cursorCoords:function(c0,cZ){if(c0==null){c0=cW.inverted}return this.charCoords(c0?cW.from:cW.to,cZ)},charCoords:function(c0,cZ){c0=aT(c0);if(cZ=="local"){return cR(c0,false)}if(cZ=="div"){return cR(c0,true)}return ao(c0)},coordsChar:function(cZ){var c0=ak(bu);return bH(cZ.x-c0.left,cZ.y-c0.top)},markText:ar(bE),setBookmark:aU,findMarksAt:bo,setMarker:ar(bV),clearMarker:ar(au),setLineClass:ar(bl),hideLine:ar(function(cZ){return cK(cZ,true)}),showLine:ar(function(cZ){return cK(cZ,false)}),onDeleteLine:function(cZ,c0){if(typeof cZ=="number"){if(!br(cZ)){return null}cZ=cF(cZ)}(cZ.handlers||(cZ.handlers=[])).push(c0);return cZ},lineInfo:aV,addWidget:function(c3,c1,c5,c2,c7){c3=cR(aT(c3));var c4=c3.yBot,c0=c3.x;c1.style.position="absolute";bM.appendChild(c1);if(c2=="over"){c4=c3.y}else{if(c2=="near"){var cZ=Math.max(bk.offsetHeight,cy.height*bP()),c6=Math.max(bM.clientWidth,bu.clientWidth)-a5();if(c3.yBot+c1.offsetHeight>cZ&&c3.y>c1.offsetHeight){c4=c3.y-c1.offsetHeight}if(c0+c1.offsetWidth>c6){c0=c6-c1.offsetWidth}}}c1.style.top=(c4+cr())+"px";c1.style.left=c1.style.right="";if(c7=="right"){c0=bM.clientWidth-c1.offsetWidth;c1.style.right="0px"}else{if(c7=="left"){c0=0}else{if(c7=="middle"){c0=(bM.clientWidth-c1.offsetWidth)/2}}c1.style.left=(c0+a5())+"px"}if(c5){aA(c0,c4,c0+c1.offsetWidth,c4+c1.offsetHeight)}},lineCount:function(){return cy.size},clipPos:aT,getCursor:function(cZ){if(cZ==null){cZ=cW.inverted}return aa(cZ?cW.from:cW.to)},somethingSelected:function(){return !ad(cW.from,cW.to)},setCursor:ar(function(cZ,c1,c0){if(c1==null&&typeof cZ.line=="number"){a6(cZ.line,cZ.ch,c0)}else{a6(cZ,c1,c0)}}),setSelection:ar(function(c1,c0,cZ){(cZ?bx:bw)(aT(c1),aT(c0||c1))}),getLine:function(cZ){if(br(cZ)){return cF(cZ).text}},getLineHandle:function(cZ){if(br(cZ)){return cF(cZ)}},setLine:ar(function(cZ,c0){if(br(cZ)){bQ(c0,{line:cZ,ch:0},{line:cZ,ch:cF(cZ).text.length})}}),removeLine:ar(function(cZ){if(br(cZ)){bQ("",{line:cZ,ch:0},aT({line:cZ+1,ch:0}))}}),replaceRange:ar(bQ),getRange:function(c0,cZ){return cO(aT(c0),aT(cZ))},triggerOnKeyDown:ar(cc),execCommand:function(cZ){return L[cZ](b9)},moveH:ar(cE),deleteH:ar(cm),moveV:ar(cx),toggleOverwrite:function(){if(cn){cn=false;bc.className=bc.className.replace(" CodeMirror-overwrite","")}else{cn=true;bc.className+=" CodeMirror-overwrite"}},posFromIndex:function(c0){var c1=0,cZ;cy.iter(0,cy.size,function(c2){var c3=c2.text.length+1;if(c3>c0){cZ=c0;return true}c0-=c3;++c1});return aT({line:c1,ch:cZ})},indexFromPos:function(c0){if(c0.line<0||c0.ch<0){return 0}var cZ=c0.ch;cy.iter(0,c0.line,function(c1){cZ+=c1.text.length+1});return cZ},scrollTo:function(cZ,c0){if(cZ!=null){bk.scrollLeft=cZ}if(c0!=null){bk.scrollTop=c0}cd([])},operation:function(cZ){return ar(cZ)()},compoundChange:function(cZ){return bO(cZ)},refresh:function(){cd(true);if(bk.scrollHeight>bF){bk.scrollTop=bF}},getInputField:function(){return bm},getWrapperElement:function(){return aD},getScrollerElement:function(){return bk},getGutterElement:function(){return aH}};function cF(cZ){return C(cy,cZ)}function a3(c0,cZ){aS=true;var c1=cZ-c0.height;for(var c2=c0;c2;c2=c2.parent){c2.height+=c1}}function aW(cZ){var c0={line:0,ch:0};aO(c0,{line:cy.size-1,ch:cF(cy.size-1).text.length},A(cZ),c0,c0);cp=true}function b2(){var cZ=[];cy.iter(0,cy.size,function(c0){cZ.push(c0.text)});return cZ.join("\n")}function ck(c8){a4(y(c8,"shiftKey"));for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==bM&&c3!=cg){return}}for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==aY){if(b1.onGutterClick){b1.onGutterClick(b9,q(aY.childNodes,c3)+cQ,c8)}return T(c8)}}var cZ=a2(c8);switch(x(c8)){case 3:if(N&&!M){a1(c8)}return;case 2:if(cZ){a6(cZ.line,cZ.ch,true)}return}if(!cZ){if(j(c8)==bk){T(c8)}return}if(!cj){cU()}var c0=+new Date;if(aZ&&aZ.time>c0-400&&ad(aZ.pos,cZ)){T(c8);setTimeout(bz,20);return aK(cZ.line)}else{if(bq&&bq.time>c0-400&&ad(bq.pos,cZ)){aZ={time:c0,pos:cZ};T(c8);return bI(cZ)}else{bq={time:c0,pos:cZ}}}var da=cZ,c1;if(b1.dragDrop&&F&&!b1.readOnly&&!ad(cW.from,cW.to)&&!Z(cZ,cW.from)&&!Z(cW.to,cZ)){if(f){bu.draggable=true}function c4(db){if(f){bu.draggable=false}bb=false;c7();c2();if(Math.abs(c8.clientX-db.clientX)+Math.abs(c8.clientY-db.clientY)<10){T(db);a6(cZ.line,cZ.ch,true);bz()}}var c7=r(document,"mouseup",ar(c4),true);var c2=r(bk,"drop",ar(c4),true);bb=true;if(bu.dragDrop){bu.dragDrop()}return}T(c8);a6(cZ.line,cZ.ch,true);function c9(db){var dd=a2(db,true);if(dd&&!ad(dd,da)){if(!cj){cU()}da=dd;bx(cZ,dd);cp=false;var dc=bA();if(dd.line>=dc.to||dd.line<dc.from){c1=setTimeout(ar(function(){c9(db)}),150)}}}function c6(db){clearTimeout(c1);var dc=a2(db);if(dc){bx(cZ,dc)}T(db);bz();cp=true;c5();c7()}var c5=r(document,"mousemove",ar(function(db){clearTimeout(c1);T(db);if(!I&&!x(db)){c6(db)}else{c9(db)}}),true);var c7=r(document,"mouseup",ar(c6),true)}function bW(cZ){for(var c1=j(cZ);c1!=aD;c1=c1.parentNode){if(c1.parentNode==aY){return T(cZ)}}var c0=a2(cZ);if(!c0){return}aZ={time:+new Date,pos:c0};T(cZ);bI(c0)}function an(c3){if(b1.onDragEvent&&b1.onDragEvent(b9,O(c3))){return}c3.preventDefault();var c6=a2(c3,true),c0=c3.dataTransfer.files;if(!c6||b1.readOnly){return}if(c0&&c0.length&&window.FileReader&&window.File){function c2(c9,c8){var c7=new FileReader;c7.onload=function(){c4[c8]=c7.result;if(++c1==c5){c6=aT(c6);ar(function(){var da=bQ(c4.join(""),c6,c6);bx(c6,da)})()}};c7.readAsText(c9)}var c5=c0.length,c4=Array(c5),c1=0;for(var cZ=0;cZ<c5;++cZ){c2(c0[cZ],cZ)}}else{try{var c4=c3.dataTransfer.getData("Text");if(c4){bO(function(){var c8=cW.from,c7=cW.to;bx(c6,c6);if(bb){bQ("",c8,c7)}bs(c4);bz()})}}catch(c3){}}}function aI(c1){var cZ=b3();c1.dataTransfer.setData("Text",cZ);if(N||af){var c0=document.createElement("img");c0.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=";c1.dataTransfer.setDragImage(c0,0,0)}}function bi(c1,cZ){if(typeof c1=="string"){c1=L[c1];if(!c1){return false}}var c0=ci;try{if(b1.readOnly){cs=true}if(cZ){ci=null}c1(b9)}catch(c2){if(c2!=ab){throw c2}return false}finally{ci=c0;cs=false}return true}function cL(c5){var cZ=c(b1.keyMap),c2=cZ.auto;clearTimeout(bB);if(c2&&!Q(c5)){bB=setTimeout(function(){if(c(b1.keyMap)==cZ){b1.keyMap=(c2.call?c2.call(null,b9):c2)}},50)}var c0=R[y(c5,"keyCode")],c4=false;if(c0==null||c5.altGraphKey){return false}if(y(c5,"altKey")){c0="Alt-"+c0}if(y(c5,"ctrlKey")){c0="Ctrl-"+c0}if(y(c5,"metaKey")){c0="Cmd-"+c0}var c3=false;function c1(){c3=true}if(y(c5,"shiftKey")){c4=l("Shift-"+c0,b1.extraKeys,b1.keyMap,function(c6){return bi(c6,true)},c1)||l(c0,b1.extraKeys,b1.keyMap,function(c6){if(typeof c6=="string"&&/^go[A-Z]/.test(c6)){return bi(c6)}},c1)}else{c4=l(c0,b1.extraKeys,b1.keyMap,bi,c1)}if(c3){c4=false}if(c4){T(c5);if(I){c5.oldKeyCode=c5.keyCode;c5.keyCode=0}}return c4}function bY(c1,cZ){var c0=l("'"+cZ+"'",b1.extraKeys,b1.keyMap,function(c2){return bi(c2,true)});if(c0){T(c1)}return c0}var cI=null,bB;function cc(c1){if(!cj){cU()}if(I&&c1.keyCode==27){c1.returnValue=false}if(bt){if(bK()){bt=false}}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c1))){return}var cZ=y(c1,"keyCode");a4(cZ==16||y(c1,"shiftKey"));var c0=cL(c1);if(window.opera){cI=c0?cZ:null;if(!c0&&cZ==88&&y(c1,M?"metaKey":"ctrlKey")){bs("")}}}function bn(c2){if(bt){bK()}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c2))){return}var c1=y(c2,"keyCode"),cZ=y(c2,"charCode");if(window.opera&&c1==cI){cI=null;T(c2);return}if(((window.opera&&!c2.which)||m)&&cL(c2)){return}var c0=String.fromCharCode(cZ==null?c1:cZ);if(b1.electricChars&&cb.electricChars&&b1.smartIndent&&!b1.readOnly){if(cb.electricChars.indexOf(c0)>-1){setTimeout(ar(function(){by(cW.to.line,"smart")}),75)}}if(bY(c2,c0)){return}aQ()}function cl(cZ){if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(cZ))){return}if(y(cZ,"keyCode")==16){ci=null}}function cU(){if(b1.readOnly=="nocursor"){return}if(!cj){if(b1.onFocus){b1.onFocus(b9)}cj=true;if(aD.className.search(/\bCodeMirror-focused\b/)==-1){aD.className+=" CodeMirror-focused"}if(!bf){cC(true)}}am();cM()}function aE(){if(cj){if(b1.onBlur){b1.onBlur(b9)}cj=false;if(b4){ar(function(){if(b4){b4();b4=null}})()}aD.className=aD.className.replace(" CodeMirror-focused","")}clearInterval(cP);setTimeout(function(){if(!cj){ci=null}},150)}function aO(c4,c3,c2,c0,cZ){if(cs){return}if(a8){var c1=[];cy.iter(c4.line,c3.line+1,function(c5){c1.push(c5.text)});a8.addChange(c4.line,c2.length,c1);while(a8.done.length>b1.undoDepth){a8.done.shift()}}at(c4,c3,c2,c0,cZ)}function ca(c4,c5){if(!c4.length){return}var c6=c4.pop(),c0=[];for(var c1=c6.length-1;c1>=0;c1-=1){var c3=c6[c1];var c7=[],cZ=c3.start+c3.added;cy.iter(c3.start,cZ,function(c8){c7.push(c8.text)});c0.push({start:c3.start,added:c3.old.length,old:c7});var c2=aT({line:c3.start+c3.old.length-1,ch:W(c7[c7.length-1],c3.old[c3.old.length-1])});at({line:c3.start,ch:0},{line:cZ-1,ch:cF(cZ-1).text.length},c3.old,c2,c2)}cp=true;c5.push(c0)}function cT(){ca(a8.done,a8.undone)}function cJ(){ca(a8.undone,a8.done)}function at(de,c3,dk,cZ,dl){if(cs){return}var dj=false,c2=bD.length;if(!b1.lineWrapping){cy.iter(de.line,c3.line+1,function(dm){if(dm.text.length==c2){dj=true;return true}})}if(de.line!=c3.line||dk.length>1){aS=true}var db=c3.line-de.line,da=cF(de.line),c0=cF(c3.line);if(de.ch==0&&c3.ch==0&&dk[dk.length-1]==""){var c8=[],c9=null;if(de.line){c9=cF(de.line-1);c9.fixMarkEnds(c0)}else{c0.fixMarkStarts()}for(var dg=0,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],c9))}if(db){cy.remove(de.line,db,cA)}if(c8.length){cy.insert(de.line,c8)}}else{if(da==c0){if(dk.length==1){da.replace(de.ch,c3.ch,dk[0])}else{c0=da.split(c3.ch,dk[dk.length-1]);da.replace(de.ch,null,dk[0]);da.fixMarkEnds(c0);var c8=[];for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}c8.push(c0);cy.insert(de.line+1,c8)}}else{if(dk.length==1){da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,"");da.append(c0);cy.remove(de.line+1,db,cA)}else{var c8=[];da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,dk[dk.length-1]);da.fixMarkEnds(c0);for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}if(db>1){cy.remove(de.line+1,db-1,cA)}cy.insert(de.line+1,c8)}}}if(b1.lineWrapping){var c5=Math.max(5,bk.clientWidth/bh()-3);cy.iter(de.line,de.line+dk.length,function(dm){if(dm.hidden){return}var dn=Math.ceil(dm.text.length/c5)||1;if(dn!=dm.height){a3(dm,dn)}})}else{cy.iter(de.line,de.line+dk.length,function(dn){var dm=dn.text;if(dm.length>c2){bD=dm;c2=dm.length;aF=null;dj=false}});if(dj){c2=0;bD="";aF=null;cy.iter(0,cy.size,function(dn){var dm=dn.text;if(dm.length>c2){c2=dm.length;bD=dm}})}}var c1=[],c7=dk.length-db-1;for(var dg=0,dd=ch.length;dg<dd;++dg){var dh=ch[dg];if(dh<de.line){c1.push(dh)}else{if(dh>c3.line){c1.push(dh+c7)}}}var df=de.line+Math.min(dk.length,500);cH(de.line,df);c1.push(df);ch=c1;bG(100);aB.push({from:de.line,to:c3.line+1,diff:c7});var c6={from:de,to:c3,text:dk};if(cN){for(var c4=cN;c4.next;c4=c4.next){}c4.next=c6}else{cN=c6}function dc(dm){return dm<=Math.min(c3.line,c3.line+c7)?dm:dm+c7}bw(cZ,dl,dc(cW.from.line),dc(cW.to.line));if(bk.clientHeight){bM.style.height=(cy.height*bP()+2*cr())+"px"}}function bQ(c0,c3,c2){c3=aT(c3);if(!c2){c2=c3}else{c2=aT(c2)}c0=A(c0);function c1(c6){if(Z(c6,c3)){return c6}if(!Z(c2,c6)){return cZ}var c4=c6.line+c0.length-(c2.line-c3.line)-1;var c5=c6.ch;if(c6.line==c2.line){c5+=c0[c0.length-1].length-(c2.ch-(c2.line==c3.line?c3.ch:0))}return{line:c4,ch:c5}}var cZ;aC(c0,c3,c2,function(c4){cZ=c4;return{from:c1(cW.from),to:c1(cW.to)}});return cZ}function bs(cZ,c0){aC(A(cZ),cW.from,cW.to,function(c1){if(c0=="end"){return{from:c1,to:c1}}else{if(c0=="start"){return{from:cW.from,to:cW.from}}else{return{from:cW.from,to:c1}}}})}function aC(c2,c4,c3,cZ){var c1=c2.length==1?c2[0].length+c4.ch:c2[c2.length-1].length;var c0=cZ({line:c4.line+c2.length-1,ch:c1});aO(c4,c3,c2,c0.from,c0.to)}function cO(c3,c2){var c0=c3.line,cZ=c2.line;if(c0==cZ){return cF(c0).text.slice(c3.ch,c2.ch)}var c1=[cF(c0).text.slice(c3.ch)];cy.iter(c0+1,cZ,function(c4){c1.push(c4.text)});c1.push(cF(cZ).text.slice(0,c2.ch));return c1.join("\n")}function b3(){return cO(cW.from,cW.to)}var bt=false;function am(){if(bt){return}b7.set(b1.pollInterval,function(){aN();bK();if(cj){am()}ay()})}function aQ(){var cZ=false;bt=true;function c0(){aN();var c1=bK();if(!c1&&!cZ){cZ=true;b7.set(60,c0)}else{bt=false;am()}ay()}b7.set(20,c0)}var ba="";function bK(){if(bf||!cj||ae(bm)||b1.readOnly){return false}var c0=bm.value;if(c0==ba){return false}ci=null;var c1=0,cZ=Math.min(ba.length,c0.length);while(c1<cZ&&ba[c1]==c0[c1]){++c1}if(c1<ba.length){cW.from={line:cW.from.line,ch:cW.from.ch-(ba.length-c1)}}else{if(cn&&ad(cW.from,cW.to)){cW.to={line:cW.to.line,ch:Math.min(cF(cW.to.line).text.length,cW.to.ch+(c0.length-c1))}}}bs(c0.slice(c1),"end");ba=c0;return true}function cC(cZ){if(!ad(cW.from,cW.to)){ba="";bm.value=b3();a(bm)}else{if(cZ){ba=bm.value=""}}}function bz(){if(b1.readOnly!="nocursor"){bm.focus()}}function cY(){if(!bc.getBoundingClientRect){return}var cZ=bc.getBoundingClientRect();if(I&&cZ.top==cZ.bottom){return}var c0=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);if(cZ.top<0||cZ.bottom>c0){bc.scrollIntoView()}}function cf(){var c0=cR(cW.inverted?cW.from:cW.to);var cZ=b1.lineWrapping?Math.min(c0.x,bu.offsetWidth):c0.x;return aA(cZ,c0.y,cZ,c0.yBot)}function aA(c1,c7,cZ,c6){var c4=a5(),dc=cr();c7+=dc;c6+=dc;c1+=c4;cZ+=c4;var c9=bk.clientHeight,c2=bk.scrollTop,c0=false,db=true;if(c7<c2){bk.scrollTop=Math.max(0,c7);c0=true}else{if(c6>c2+c9){bk.scrollTop=c6-c9;c0=true}}var c8=bk.clientWidth,da=bk.scrollLeft;var c5=b1.fixedGutter?aH.clientWidth:0;var c3=c1<c5+c4+10;if(c1<da+c5||c3){if(c3){c1=0}bk.scrollLeft=Math.max(0,c1-10-c5);c0=true}else{if(cZ>c8+da-3){bk.scrollLeft=cZ+10-c8;c0=true;if(cZ>bM.clientWidth){db=false}}}if(c0&&b1.onScroll){b1.onScroll(b9)}return db}function bA(){var cZ=bP(),c2=bk.scrollTop-cr();var c1=Math.max(0,Math.floor(c2/cZ));var c0=Math.ceil((c2+bk.clientHeight)/cZ);return{from:X(cy,c1),to:X(cy,c0)}}function cd(c7,c3){if(!bk.clientWidth){cQ=bL=bd=0;return}var c2=bA();if(c7!==true&&c7.length==0&&c2.from>cQ&&c2.to<bL){return}var c8=Math.max(c2.from-100,0),c9=Math.min(cy.size,c2.to+100);if(cQ<c8&&c8-cQ<20){c8=cQ}if(bL>c9&&bL-c9<20){c9=Math.min(cy.size,bL)}var db=c7===true?[]:b0([{from:cQ,to:bL,domStart:0}],c7);var c6=0;for(var c4=0;c4<db.length;++c4){var c5=db[c4];if(c5.from<c8){c5.domStart+=(c8-c5.from);c5.from=c8}if(c5.to>c9){c5.to=c9}if(c5.from>=c5.to){db.splice(c4--,1)}else{c6+=c5.to-c5.from}}if(c6==c9-c8&&c8==cQ&&c9==bL){return}db.sort(function(dd,dc){return dd.domStart-dc.domStart});var c1=bP(),cZ=aH.style.display;aq.style.display="none";aR(c8,c9,db);aq.style.display=aH.style.display="";var c0=c8!=cQ||c9!=bL||bN!=bk.clientHeight+c1;if(c0){bN=bk.clientHeight+c1}cQ=c8;bL=c9;bd=g(cy,c8);cg.style.top=(bd*c1)+"px";if(bk.clientHeight){bM.style.height=(cy.height*c1+2*cr())+"px"}if(aq.childNodes.length!=bL-cQ){throw new Error("BAD PATCH! "+JSON.stringify(db)+" size="+(bL-cQ)+" nodes="+aq.childNodes.length)}function da(){aF=bk.clientWidth;var dd=aq.firstChild,dc=false;cy.iter(cQ,bL,function(df){if(!df.hidden){var de=Math.round(dd.offsetHeight/c1)||1;if(df.height!=de){a3(df,de);aS=dc=true}}dd=dd.nextSibling});if(dc){bM.style.height=(cy.height*c1+2*cr())+"px"}return dc}if(b1.lineWrapping){da()}else{if(aF==null){aF=ct(bD)}if(aF>bk.clientWidth){bu.style.width=aF+"px";bM.style.width="";bM.style.width=bk.scrollWidth+"px"}else{bu.style.width=bM.style.width=""}}aH.style.display=cZ;if(c0||aS){aL()&&b1.lineWrapping&&da()&&aL()}cV();if(!c3&&b1.onUpdate){b1.onUpdate(b9)}return true}function b0(c8,c6){for(var c3=0,c1=c6.length||0;c3<c1;++c3){var c5=c6[c3],cZ=[],c7=c5.diff||0;for(var c2=0,c0=c8.length;c2<c0;++c2){var c4=c8[c2];if(c5.to<=c4.from&&c5.diff){cZ.push({from:c4.from+c7,to:c4.to+c7,domStart:c4.domStart})}else{if(c5.to<=c4.from||c5.from>=c4.to){cZ.push(c4)}else{if(c5.from>c4.from){cZ.push({from:c4.from,to:c5.from,domStart:c4.domStart})}if(c5.to<c4.to){cZ.push({from:c5.to+c7,to:c4.to+c7,domStart:c4.domStart+(c5.to-c4.from)})}}}}c8=cZ}return c8}function aR(c8,c9,db){if(!db.length){aq.innerHTML=""}else{function cZ(dd){var dc=dd.nextSibling;dd.parentNode.removeChild(dd);return dc}var c3=0,c1=aq.firstChild,c0;for(var c4=0;c4<db.length;++c4){var da=db[c4];while(da.domStart>c3){c1=cZ(c1);c3++}for(var c2=0,c6=da.to-da.from;c2<c6;++c2){c1=c1.nextSibling;c3++}}while(c1){c1=cZ(c1)}}var c5=db.shift(),c1=aq.firstChild,c2=c8;var c7=document.createElement("div");cy.iter(c8,c9,function(dc){if(c5&&c5.to==c2){c5=db.shift()}if(!c5||c5.from>c2){if(dc.hidden){var dd=c7.innerHTML="<pre></pre>"}else{var dd="<pre"+(dc.className?' class="'+dc.className+'"':"")+">"+dc.getHTML(a9)+"</pre>";if(dc.bgClassName){dd='<div style="position: relative"><pre class="'+dc.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2">&#160;</pre>'+dd+"</div>"}}c7.innerHTML=dd;aq.insertBefore(c7.firstChild,c1)}else{c1=c1.nextSibling}++c2})}function aL(){if(!b1.gutter&&!b1.lineNumbers){return}var c0=cg.offsetHeight,c8=bk.clientHeight;aH.style.height=(c0-c8<2?c8:c0)+"px";var c6=[],c4=cQ,c7;cy.iter(cQ,Math.max(bL,cQ+1),function(da){if(da.hidden){c6.push("<pre></pre>")}else{var c9=da.gutterMarker;var dc=b1.lineNumbers?c4+b1.firstLineNumber:null;if(c9&&c9.text){dc=c9.text.replace("%N%",dc!=null?dc:"")}else{if(dc==null){dc="\u00a0"}}c6.push((c9&&c9.style?'<pre class="'+c9.style+'">':"<pre>"),dc);for(var db=1;db<da.height;++db){c6.push("<br/>&#160;")}c6.push("</pre>");if(!c9){c7=c4}}++c4});aH.style.display="none";aY.innerHTML=c6.join("");if(c7!=null){var c2=aY.childNodes[c7-cQ];var c3=String(cy.size).length,cZ=H(c2),c1="";while(cZ.length+c1.length<c3){c1+="\u00a0"}if(c1){c2.insertBefore(document.createTextNode(c1),c2.firstChild)}}aH.style.display="";var c5=Math.abs((parseInt(bu.style.marginLeft)||0)-aH.offsetWidth)>2;bu.style.marginLeft=aH.offsetWidth+"px";aS=false;return c5}function cV(){var c2=ad(cW.from,cW.to);var dd=cR(cW.from,true);var c8=c2?dd:cR(cW.to,true);var c6=cW.inverted?dd:c8,c0=bP();var cZ=ak(aD),c1=ak(aq);bX.style.top=Math.max(0,Math.min(bk.offsetHeight,c6.y+c1.top-cZ.top))+"px";bX.style.left=Math.max(0,Math.min(bk.offsetWidth,c6.x+c1.left-cZ.left))+"px";if(c2){bc.style.top=c6.y+"px";bc.style.left=(b1.lineWrapping?Math.min(c6.x,bu.offsetWidth):c6.x)+"px";bc.style.display="";bg.style.display="none"}else{var db=dd.y==c8.y,c4="";var c9=bu.clientWidth||bu.offsetWidth;var c5=bu.clientHeight||bu.offsetHeight;function dc(di,dh,dg,de){var df=E?"width: "+(!dg?c9:c9-dg-di)+"px":"right: "+dg+"px";c4+='<div class="CodeMirror-selected" style="position: absolute; left: '+di+"px; top: "+dh+"px; "+df+"; height: "+de+'px"></div>'}if(cW.from.ch&&dd.y>=0){var da=db?c9-c8.x:0;dc(dd.x,dd.y,da,c0)}var c3=Math.max(0,dd.y+(cW.from.ch?c0:0));var c7=Math.min(c8.y,c5)-c3;if(c7>0.2*c0){dc(0,c3,0,c7)}if((!db||!cW.from.ch)&&c8.y<c5-0.5*c0){dc(0,c8.y,c9-c8.x,c0)}bg.innerHTML=c4;bc.style.display="none";bg.style.display=""}}function a4(cZ){if(cZ){ci=ci||(cW.inverted?cW.to:cW.from)}else{ci=null}}function bx(c1,c0){var cZ=ci&&aT(ci);if(cZ){if(Z(cZ,c1)){c1=cZ}else{if(Z(c0,cZ)){c0=cZ}}}bw(c1,c0);b6=true}function bw(c6,c5,cZ,c4){cv=null;if(cZ==null){cZ=cW.from.line;c4=cW.to.line}if(ad(cW.from,c6)&&ad(cW.to,c5)){return}if(Z(c5,c6)){var c2=c5;c5=c6;c6=c2}if(c6.line!=cZ){var c3=bR(c6,cZ,cW.from.ch);if(!c3){cK(c6.line,false)}else{c6=c3}}if(c5.line!=c4){c5=bR(c5,c4,cW.to.ch)}if(ad(c6,c5)){cW.inverted=false}else{if(ad(c6,cW.to)){cW.inverted=false}else{if(ad(c5,cW.from)){cW.inverted=true}}}if(b1.autoClearEmptyLines&&ad(cW.from,cW.to)){var c1=cW.inverted?c6:c5;if(c1.line!=cW.from.line&&cW.from.line<cy.size){var c0=cF(cW.from.line);if(/^\s+$/.test(c0.text)){setTimeout(ar(function(){if(c0.parent&&/^\s+$/.test(c0.text)){var c7=Y(c0);bQ("",{line:c7,ch:0},{line:c7,ch:c0.text.length})}},10))}}}cW.from=c6;cW.to=c5;aP=true}function bR(c4,c0,c1){function c3(c7){var c9=c4.line+c7,c6=c7==1?cy.size:-1;while(c9!=c6){var c5=cF(c9);if(!c5.hidden){var c8=c4.ch;if(c2||c8>c1||c8>c5.text.length){c8=c5.text.length}return{line:c9,ch:c8}}c9+=c7}}var cZ=cF(c4.line);var c2=c4.ch==cZ.text.length&&c4.ch!=c1;if(!cZ.hidden){return c4}if(c4.line>=c0){return c3(1)||c3(-1)}else{return c3(-1)||c3(1)}}function a6(cZ,c1,c0){var c2=aT({line:cZ,ch:c1||0});(c0?bx:bw)(c2,c2)}function bZ(cZ){return Math.max(0,Math.min(cZ,cy.size-1))}function aT(c1){if(c1.line<0){return{line:0,ch:0}}if(c1.line>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var cZ=c1.ch,c0=cF(c1.line).text.length;if(cZ==null||cZ>c0){return{line:c1.line,ch:c0}}else{if(cZ<0){return{line:c1.line,ch:0}}else{return c1}}}function co(c2,c6){var c3=cW.inverted?cW.from:cW.to,c7=c3.line,cZ=c3.ch;var c5=cF(c7);function c0(){for(var c8=c7+c2,da=c2<0?-1:cy.size;c8!=da;c8+=c2){var c9=cF(c8);if(!c9.hidden){c7=c8;c5=c9;return true}}}function c4(c8){if(cZ==(c2<0?0:c5.text.length)){if(!c8&&c0()){cZ=c2<0?c5.text.length:0}else{return false}}else{cZ+=c2}return true}if(c6=="char"){c4()}else{if(c6=="column"){c4(true)}else{if(c6=="word"){var c1=false;for(;;){if(c2<0){if(!c4()){break}}if(ag(c5.text.charAt(cZ))){c1=true}else{if(c1){if(c2<0){c2=1;c4()}break}}if(c2>0){if(!c4()){break}}}}}}return{line:c7,ch:cZ}}function cE(cZ,c0){var c1=cZ<0?cW.from:cW.to;if(ci||ad(cW.from,cW.to)){c1=co(cZ,c0)}a6(c1.line,c1.ch,true)}function cm(cZ,c0){if(!ad(cW.from,cW.to)){bQ("",cW.from,cW.to)}else{if(cZ<0){bQ("",co(cZ,c0),cW.to)}else{bQ("",cW.from,co(cZ,c0))}}b6=true}var cv=null;function cx(cZ,c0){var c2=0,c3=cR(cW.inverted?cW.from:cW.to,true);if(cv!=null){c3.x=cv}if(c0=="page"){c2=Math.min(bk.clientHeight,window.innerHeight||document.documentElement.clientHeight)}else{if(c0=="line"){c2=bP()}}var c1=bH(c3.x,c3.y+c2*cZ+2);if(c0=="page"){bk.scrollTop+=cR(c1,true).y-c3.y}a6(c1.line,c1.ch,true);cv=c3.x}function bI(c2){var c0=cF(c2.line).text;var c1=c2.ch,cZ=c2.ch;while(c1>0&&ag(c0.charAt(c1-1))){--c1}while(cZ<c0.length&&ag(c0.charAt(cZ))){++cZ}bx({line:c2.line,ch:c1},{line:c2.line,ch:cZ})}function aK(cZ){bx({line:cZ,ch:0},aT({line:cZ+1,ch:0}))}function cB(c1){if(ad(cW.from,cW.to)){return by(cW.from.line,c1)}var c0=cW.to.line-(cW.to.ch?0:1);for(var cZ=cW.from.line;cZ<=c0;++cZ){by(cZ,c1)}}function by(c1,c8){if(!c8){c8="add"}if(c8=="smart"){if(!cb.indent){c8="prev"}else{var cZ=cu(c1)}}var c9=cF(c1),c3=c9.indentation(b1.tabSize),c0=c9.text.match(/^\s*/)[0],c5;if(c8=="prev"){if(c1){c5=cF(c1-1).indentation(b1.tabSize)}else{c5=0}}else{if(c8=="smart"){c5=cb.indent(cZ,c9.text.slice(c0.length),c9.text)}else{if(c8=="add"){c5=c3+b1.indentUnit}else{if(c8=="subtract"){c5=c3-b1.indentUnit}}}}c5=Math.max(0,c5);var c7=c5-c3;if(!c7){if(cW.from.line!=c1&&cW.to.line!=c1){return}var c6=c0}else{var c6="",c4=0;if(b1.indentWithTabs){for(var c2=Math.floor(c5/b1.tabSize);c2;--c2){c4+=b1.tabSize;c6+="\t"}}while(c4<c5){++c4;c6+=" "}}bQ(c6,{line:c1,ch:0},{line:c1,ch:c0.length})}function bT(){cb=u.getMode(b1,b1.mode);cy.iter(0,cy.size,function(cZ){cZ.stateAfter=null});ch=[0];bG()}function be(){var cZ=b1.gutter||b1.lineNumbers;aH.style.display=cZ?"":"none";if(cZ){aS=true}else{aq.parentNode.style.marginLeft=0}}function cG(c1,c0){if(b1.lineWrapping){aD.className+=" CodeMirror-wrap";var cZ=bk.clientWidth/bh()-3;cy.iter(0,cy.size,function(c2){if(c2.hidden){return}var c3=Math.ceil(c2.text.length/cZ)||1;if(c3!=1){a3(c2,c3)}});bu.style.width=bM.style.width=""}else{aD.className=aD.className.replace(" CodeMirror-wrap","");aF=null;bD="";cy.iter(0,cy.size,function(c2){if(c2.height!=1&&!c2.hidden){a3(c2,1)}if(c2.text.length>bD.length){bD=c2.text}})}aB.push({from:0,to:cy.size})}function a9(c0){var cZ=b1.tabSize-c0%b1.tabSize,c2=ap[cZ];if(c2){return c2}for(var c3='<span class="cm-tab">',c1=0;c1<cZ;++c1){c3+=" "}return(ap[cZ]={html:c3+"</span>",width:cZ})}function cD(){bk.className=bk.className.replace(/\s*cm-s-\S+/g,"")+b1.theme.replace(/(^|\s)\s*/g," cm-s-")}function cX(){this.set=[]}cX.prototype.clear=ar(function(){var c4=Infinity,c0=-Infinity;for(var c3=0,c6=this.set.length;c3<c6;++c3){var c1=this.set[c3],cZ=c1.marked;if(!cZ||!c1.parent){continue}var c5=Y(c1);c4=Math.min(c4,c5);c0=Math.max(c0,c5);for(var c2=0;c2<cZ.length;++c2){if(cZ[c2].marker==this){cZ.splice(c2--,1)}}}if(c4!=Infinity){aB.push({from:c4,to:c0+1})}});cX.prototype.find=function(){var c4,c5;for(var c1=0,c3=this.set.length;c1<c3;++c1){var c7=this.set[c1],c2=c7.marked;for(var c0=0;c0<c2.length;++c0){var cZ=c2[c0];if(cZ.marker==this){if(cZ.from!=null||cZ.to!=null){var c6=Y(c7);if(c6!=null){if(cZ.from!=null){c4={line:c6,ch:cZ.from}}if(cZ.to!=null){c5={line:c6,ch:cZ.to}}}}}}}return{from:c4,to:c5}};function bE(c5,c4,c1){c5=aT(c5);c4=aT(c4);var cZ=new cX();if(!Z(c5,c4)){return cZ}function c3(c6,c9,c8,c7){cF(c6).addMark(new K(c9,c8,c7,cZ))}if(c5.line==c4.line){c3(c5.line,c5.ch,c4.ch,c1)}else{c3(c5.line,c5.ch,null,c1);for(var c0=c5.line+1,c2=c4.line;c0<c2;++c0){c3(c0,null,null,c1)}c3(c4.line,null,c4.ch,c1)}aB.push({from:c5.line,to:c4.line+1});return cZ}function aU(c0){c0=aT(c0);var cZ=new G(c0.ch);cF(c0.line).addMark(cZ);return cZ}function bo(c4){c4=aT(c4);var c3=[],c1=cF(c4.line).marked;if(!c1){return c3}for(var c0=0,c2=c1.length;c0<c2;++c0){var cZ=c1[c0];if((cZ.from==null||cZ.from<=c4.ch)&&(cZ.to==null||cZ.to>=c4.ch)){c3.push(cZ.marker||cZ)}}return c3}function bV(cZ,c1,c0){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker={text:c1,style:c0};aS=true;return cZ}function au(cZ){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker=null;aS=true}function aX(c0,c2){var c1=c0,cZ=c0;if(typeof c0=="number"){cZ=cF(bZ(c0))}else{c1=Y(c0)}if(c1==null){return null}if(c2(cZ,c1)){aB.push({from:c1,to:c1+1})}else{return null}return cZ}function bl(c0,cZ,c1){return aX(c0,function(c2){if(c2.className!=cZ||c2.bgClassName!=c1){c2.className=cZ;c2.bgClassName=c1;return true}})}function cK(c0,cZ){return aX(c0,function(c1,c4){if(c1.hidden!=cZ){c1.hidden=cZ;a3(c1,cZ?0:1);var c3=cW.from.line,c2=cW.to.line;if(cZ&&(c3==c4||c2==c4)){var c6=c3==c4?bR({line:c3,ch:0},c3,0):cW.from;var c5=c2==c4?bR({line:c2,ch:0},c2,0):cW.to;if(!c5){return}bw(c6,c5)}return(aS=true)}})}function aV(c0){if(typeof c0=="number"){if(!br(c0)){return null}var c1=c0;c0=cF(c0);if(!c0){return null}}else{var c1=Y(c0);if(c1==null){return null}}var cZ=c0.gutterMarker;return{line:c1,handle:c0,text:c0.text,markerText:cZ&&cZ.text,markerClass:cZ&&cZ.style,lineClass:c0.className,bgClass:c0.bgClassName}}function ct(cZ){av.innerHTML="<pre><span>x</span></pre>";av.firstChild.firstChild.firstChild.nodeValue=cZ;return av.firstChild.firstChild.offsetWidth||10}function aG(db,c5){if(c5<=0){return 0}var c2=cF(db),c8=c2.text;function c9(dc){return b5(c2,dc).left}var c6=0,c4=0,c7=c8.length,c3;var c0=Math.min(c7,Math.ceil(c5/bh()));for(;;){var c1=c9(c0);if(c1<=c5&&c0<c7){c0=Math.min(c7,Math.ceil(c0*1.2))}else{c3=c1;c7=c0;break}}if(c5>c3){return c7}c0=Math.floor(c7*0.8);c1=c9(c0);if(c1<c5){c6=c0;c4=c1}for(;;){if(c7-c6<=1){return(c3-c5>c5-c4)?c6:c7}var da=Math.ceil((c6+c7)/2),cZ=c9(da);if(cZ>c5){c7=da;c3=cZ}else{c6=da;c4=cZ}}}var cz="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16);function b5(c0,c3){if(c3==0){return{top:0,left:0}}var cZ=b1.lineWrapping&&c3<c0.text.length&&o.test(c0.text.slice(c3-1,c3+1));av.innerHTML="<pre>"+c0.getHTML(a9,c3,cz,cZ)+"</pre>";var c2=document.getElementById(cz);var c5=c2.offsetTop,c4=c2.offsetLeft;if(I&&c5==0&&c4==0){var c1=document.createElement("span");c1.innerHTML="x";c2.parentNode.insertBefore(c1,c2.nextSibling);c5=c1.offsetTop}return{top:c5,left:c4}}function cR(c4,c2){var cZ,c0=bP(),c3=c0*(g(cy,c4.line)-(c2?bd:0));if(c4.ch==0){cZ=0}else{var c1=b5(cF(c4.line),c4.ch);cZ=c1.left;if(b1.lineWrapping){c3+=Math.max(0,c1.top)}}return{x:cZ,y:c3,yBot:c3+c0}}function bH(c8,c7){if(c7<0){c7=0}var c5=bP(),c3=bh(),de=bd+Math.floor(c7/c5);var c9=X(cy,de);if(c9>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var c0=cF(c9),db=c0.text;var dg=b1.lineWrapping,c6=dg?de-g(cy,c9):0;if(c8<=0&&c6==0){return{line:c9,ch:0}}function df(di){var dj=b5(c0,di);if(dg){var dk=Math.round(dj.top/c5);return Math.max(0,dj.left+(dk-c6)*bk.clientWidth)}return dj.left}var dd=0,dc=0,c1=db.length,cZ;var da=Math.min(c1,Math.ceil((c8+c6*bk.clientWidth*0.9)/c3));for(;;){var c4=df(da);if(c4<=c8&&da<c1){da=Math.min(c1,Math.ceil(da*1.2))}else{cZ=c4;c1=da;break}}if(c8>cZ){return{line:c9,ch:c1}}da=Math.floor(c1*0.8);c4=df(da);if(c4<c8){dd=da;dc=c4}for(;;){if(c1-dd<=1){return{line:c9,ch:(cZ-c8>c8-dc)?dd:c1}}var dh=Math.ceil((dd+c1)/2),c2=df(dh);if(c2>c8){c1=dh;cZ=c2}else{dd=dh;dc=c2}}}function ao(c1){var cZ=cR(c1,true),c0=ak(bu);return{x:c0.left+cZ.x,y:c0.top+cZ.y,yBot:c0.top+cZ.yBot}}var a0,ax,bU;function bP(){if(bU==null){bU="<pre>";for(var c0=0;c0<49;++c0){bU+="x<br/>"}bU+="x</pre>"}var cZ=aq.clientHeight;if(cZ==ax){return a0}ax=cZ;av.innerHTML=bU;a0=av.firstChild.offsetHeight/50||1;av.innerHTML="";return a0}var cS,bv=0;function bh(){if(bk.clientWidth==bv){return cS}bv=bk.clientWidth;return(cS=ct("x"))}function cr(){return bu.offsetTop}function a5(){return bu.offsetLeft}function a2(c3,c2){var c1=ak(bk,true),cZ,c4;try{cZ=c3.clientX;c4=c3.clientY}catch(c3){return null}if(!c2&&(cZ-c1.left>bk.clientWidth||c4-c1.top>bk.clientHeight)){return null}var c0=ak(bu,true);return bH(cZ-c0.left,c4-c0.top)}function a1(c0){var c5=a2(c0),c4=bk.scrollTop;if(!c5||window.opera){return}if(ad(cW.from,cW.to)||Z(c5,cW.from)||!Z(c5,cW.to)){ar(a6)(c5.line,c5.ch)}var c3=bm.style.cssText;bX.style.position="absolute";bm.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c0.clientY-5)+"px; left: "+(c0.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";bf=true;var c2=bm.value=b3();bz();a(bm);function cZ(){var c6=A(bm.value).join("\n");if(c6!=c2){ar(bs)(c6,"end")}bX.style.position="relative";bm.style.cssText=c3;if(B){bk.scrollTop=c4}bf=false;cC(true);am()}if(N){w(c0);var c1=r(window,"mouseup",function(){c1();setTimeout(cZ,20)},true)}else{setTimeout(cZ,50)}}function cM(){clearInterval(cP);var cZ=true;bc.style.visibility="";cP=setInterval(function(){bc.style.visibility=(cZ=!cZ)?"":"hidden"},650)}var bp={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function ce(c5){var cZ=cW.inverted?cW.from:cW.to,c7=cF(cZ.line),c0=cZ.ch-1;var c4=(c0>=0&&bp[c7.text.charAt(c0)])||bp[c7.text.charAt(++c0)];if(!c4){return}var c8=c4.charAt(0),c6=c4.charAt(1)==">",di=c6?1:-1,dd=c7.styles;for(var dj=c0+1,df=0,dh=dd.length;df<dh;df+=2){if((dj-=dd[df].length)<=0){var dg=dd[df+1];break}}var c2=[c7.text.charAt(c0)],dc=/[(){}[\]]/;function da(dw,dr,ds){if(!dw.text){return}var dv=dw.styles,dq=c6?0:dw.text.length-1,dt;for(var dm=c6?0:dv.length-2,dp=c6?dv.length:-2;dm!=dp;dm+=2*di){var du=dv[dm];if(dv[dm+1]!=null&&dv[dm+1]!=dg){dq+=di*du.length;continue}for(var dl=c6?0:du.length-1,dk=c6?du.length:-1;dl!=dk;dl+=di,dq+=di){if(dq>=dr&&dq<ds&&dc.test(dt=du.charAt(dl))){var dn=bp[dt];if(dn.charAt(1)==">"==c6){c2.push(dt)}else{if(c2.pop()!=dn.charAt(0)){return{pos:dq,match:false}}else{if(!c2.length){return{pos:dq,match:true}}}}}}}}for(var df=cZ.line,dh=c6?Math.min(df+100,cy.size):Math.max(-1,df-100);df!=dh;df+=di){var c7=cF(df),c3=df==cZ.line;var c9=da(c7,c3&&c6?c0+1:0,c3&&!c6?c0:c7.text.length);if(c9){break}}if(!c9){c9={pos:null,match:false}}var dg=c9.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var de=bE({line:cZ.line,ch:c0},{line:cZ.line,ch:c0+1},dg),c1=c9.pos!=null&&bE({line:df,ch:c9.pos},{line:df,ch:c9.pos+1},dg);var db=ar(function(){de.clear();c1&&c1.clear()});if(c5){setTimeout(db,800)}else{b4=db}}function a7(c5){var c4,c1;for(var c0=c5,c2=c5-40;c0>c2;--c0){if(c0==0){return 0}var cZ=cF(c0-1);if(cZ.stateAfter){return c0}var c3=cZ.indentation(b1.tabSize);if(c1==null||c4>c3){c1=c0-1;c4=c3}}return c1}function cu(c1){var c0=a7(c1),cZ=c0&&cF(c0-1).stateAfter;if(!cZ){cZ=V(cb)}else{cZ=p(cb,cZ)}cy.iter(c0,c1,function(c2){c2.highlight(cb,cZ,b1.tabSize);c2.stateAfter=p(cb,cZ)});if(c0<c1){aB.push({from:c0,to:c1})}if(c1<cy.size&&!cF(c1).stateAfter){ch.push(c1)}return cZ}function cH(c1,cZ){var c0=cu(c1);cy.iter(c1,cZ,function(c2){c2.highlight(cb,c0,b1.tabSize);c2.stateAfter=p(cb,c0)})}function bS(){var c5=+new Date+b1.workTime;var c8=ch.length;while(ch.length){if(!cF(cQ).stateAfter){var c2=cQ}else{var c2=ch.pop()}if(c2>=cy.size){continue}var c0=a7(c2),cZ=c0&&cF(c0-1).stateAfter;if(cZ){cZ=p(cb,cZ)}else{cZ=V(cb)}var c4=0,c1=cb.compareStates,c7=false,c6=c0,c3=false;cy.iter(c6,cy.size,function(da){var db=da.stateAfter;if(+new Date>c5){ch.push(c6);bG(b1.workDelay);if(c7){aB.push({from:c2,to:c6+1})}return(c3=true)}var dc=da.highlight(cb,cZ,b1.tabSize);if(dc){c7=true}da.stateAfter=p(cb,cZ);var c9=null;if(c1){var dd=db&&c1(db,cZ);if(dd!=ab){c9=!!dd}}if(c9==null){if(dc!==false||!db){c4=0}else{if(++c4>3&&(!cb.indent||cb.indent(db,"")==cb.indent(cZ,""))){c9=true}}}if(c9){return true}++c6});if(c3){return}if(c7){aB.push({from:c2,to:c6+1})}}if(c8&&b1.onHighlightComplete){b1.onHighlightComplete(b9)}}function bG(cZ){if(!ch.length){return}aw.set(cZ,ar(bS))}function aN(){cp=b6=cN=null;aB=[];aP=false;cA=[]}function ay(){var c3=false,c0;if(aP){c3=!cf()}if(aB.length){c0=cd(aB,true)}else{if(aP){cV()}if(aS){aL()}}if(c3){cf()}if(aP){cY();cM()}if(cj&&!bf&&(cp===true||(cp!==false&&aP))){cC(b6)}if(aP&&b1.matchBrackets){setTimeout(ar(function(){if(b4){b4();b4=null}if(ad(cW.from,cW.to)){ce(false)}}),20)}var cZ=cN,c1=cA;if(aP&&b1.onCursorActivity){b1.onCursorActivity(b9)}if(cZ&&b1.onChange&&b9){b1.onChange(b9,cZ)}for(var c2=0;c2<c1.length;++c2){c1[c2](b9)}if(c0&&b1.onUpdate){b1.onUpdate(b9)}}var cq=0;function ar(cZ){return function(){if(!cq++){aN()}try{var c0=cZ.apply(this,arguments)}finally{if(!--cq){ay()}}return c0}}function bO(cZ){a8.startCompound();try{return cZ()}finally{a8.endCompound()}}for(var bJ in ac){if(ac.propertyIsEnumerable(bJ)&&!b9.propertyIsEnumerable(bJ)){b9[bJ]=ac[bJ]}}return b9}u.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:false,smartIndent:true,tabSize:4,keyMap:"default",extraKeys:null,electricChars:true,autoClearEmptyLines:false,onKeyEvent:null,onDragEvent:null,lineWrapping:false,lineNumbers:false,gutter:false,fixedGutter:false,firstLineNumber:1,readOnly:false,dragDrop:true,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:false,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null};var s=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var M=s||/Mac/.test(navigator.platform);var U=/Win/.test(navigator.platform);var aj=u.modes={},S=u.mimeModes={};u.defineMode=function(am,ao){if(!u.defaults.mode&&am!="null"){u.defaults.mode=am}if(arguments.length>2){ao.dependencies=[];for(var an=2;an<arguments.length;++an){ao.dependencies.push(arguments[an])}}aj[am]=ao};u.defineMIME=function(an,am){S[an]=am};u.resolveMode=function(am){if(typeof am=="string"&&S.hasOwnProperty(am)){am=S[am]}else{if(typeof am=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(am)){return u.resolveMode("application/xml")}}if(typeof am=="string"){return{name:am}}else{return am||{name:"null"}}};u.getMode=function(an,am){var am=u.resolveMode(am);var ao=aj[am.name];if(!ao){return u.getMode(an,"text/plain")}return ao(an,am)};u.listModes=function(){var an=[];for(var am in aj){if(aj.propertyIsEnumerable(am)){an.push(am)}}return an};u.listMIMEs=function(){var an=[];for(var am in S){if(S.propertyIsEnumerable(am)){an.push({mime:am,mode:S[am]})}}return an};var ac=u.extensions={};u.defineExtension=function(am,an){ac[am]=an};var L=u.commands={selectAll:function(am){am.setSelection({line:0,ch:0},{line:am.lineCount()-1})},killLine:function(am){var ap=am.getCursor(true),ao=am.getCursor(false),an=!ad(ap,ao);if(!an&&am.getLine(ap.line).length==ap.ch){am.replaceRange("",ap,{line:ap.line+1,ch:0})}else{am.replaceRange("",ap,an?ao:{line:ap.line})}},deleteLine:function(am){var an=am.getCursor().line;am.replaceRange("",{line:an,ch:0},{line:an})},undo:function(am){am.undo()},redo:function(am){am.redo()},goDocStart:function(am){am.setCursor(0,0,true)},goDocEnd:function(am){am.setSelection({line:am.lineCount()-1},null,true)},goLineStart:function(am){am.setCursor(am.getCursor().line,0,true)},goLineStartSmart:function(am){var ap=am.getCursor();var ao=am.getLine(ap.line),an=Math.max(0,ao.search(/\S/));am.setCursor(ap.line,ap.ch<=an&&ap.ch?0:an,true)},goLineEnd:function(am){am.setSelection({line:am.getCursor().line},null,true)},goLineUp:function(am){am.moveV(-1,"line")},goLineDown:function(am){am.moveV(1,"line")},goPageUp:function(am){am.moveV(-1,"page")},goPageDown:function(am){am.moveV(1,"page")},goCharLeft:function(am){am.moveH(-1,"char")},goCharRight:function(am){am.moveH(1,"char")},goColumnLeft:function(am){am.moveH(-1,"column")},goColumnRight:function(am){am.moveH(1,"column")},goWordLeft:function(am){am.moveH(-1,"word")},goWordRight:function(am){am.moveH(1,"word")},delCharLeft:function(am){am.deleteH(-1,"char")},delCharRight:function(am){am.deleteH(1,"char")},delWordLeft:function(am){am.deleteH(-1,"word")},delWordRight:function(am){am.deleteH(1,"word")},indentAuto:function(am){am.indentSelection("smart")},indentMore:function(am){am.indentSelection("add")},indentLess:function(am){am.indentSelection("subtract")},insertTab:function(am){am.replaceSelection("\t","end")},transposeChars:function(am){var ao=am.getCursor(),an=am.getLine(ao.line);if(ao.ch>0&&ao.ch<an.length-1){am.replaceRange(an.charAt(ao.ch)+an.charAt(ao.ch-1),{line:ao.line,ch:ao.ch-1},{line:ao.line,ch:ao.ch+1})}},newlineAndIndent:function(am){am.replaceSelection("\n","end");am.indentLine(am.getCursor().line)},toggleOverwrite:function(am){am.toggleOverwrite()}};var v=u.keyMap={};v.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"insertTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};v.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"};v.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]};v["default"]=M?v.macDefault:v.pcDefault;v.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};function c(am){if(typeof am=="string"){return v[am]}else{return am}}function l(an,am,ar,ap,ao){function aq(ax){ax=c(ax);var av=ax[an];if(av!=null&&ap(av)){return true}if(ax.nofallthrough){if(ao){ao()}return true}var au=ax.fallthrough;if(au==null){return false}if(Object.prototype.toString.call(au)!="[object Array]"){return aq(au)}for(var at=0,aw=au.length;at<aw;++at){if(aq(au[at])){return true}}return false}if(am&&aq(am)){return true}return aq(ar)}function Q(an){var am=R[y(an,"keyCode")];return am=="Ctrl"||am=="Alt"||am=="Shift"||am=="Mod"}u.fromTextArea=function(an,ap){if(!ap){ap={}}ap.value=an.value;if(!ap.tabindex&&an.tabindex){ap.tabindex=an.tabindex}if(ap.autofocus==null&&an.getAttribute("autofocus")!=null){ap.autofocus=true}function ar(){an.value=am.getValue()}if(an.form){var aq=r(an.form,"submit",ar,true);if(typeof an.form.submit=="function"){var ao=an.form.submit;function at(){ar();an.form.submit=ao;an.form.submit();an.form.submit=at}an.form.submit=at}}an.style.display="none";var am=u(function(au){an.parentNode.insertBefore(au,an.nextSibling)},ap);am.save=ar;am.getTextArea=function(){return an};am.toTextArea=function(){ar();an.parentNode.removeChild(am.getWrapperElement());an.style.display="";if(an.form){aq();if(typeof an.form.submit=="function"){an.form.submit=ao}}};return am};function p(ap,am){if(am===true){return am}if(ap.copyState){return ap.copyState(am)}var ao={};for(var aq in am){var an=am[aq];if(an instanceof Array){an=an.concat([])}ao[aq]=an}return ao}u.copyState=p;function V(ao,an,am){return ao.startState?ao.startState(an,am):true}u.startState=V;function b(am,an){this.pos=this.start=0;this.string=am;this.tabSize=an||8}b.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(am){var ao=this.string.charAt(this.pos);if(typeof am=="string"){var an=ao==am}else{var an=ao&&(am.test?am.test(ao):am(ao))}if(an){++this.pos;return ao}},eatWhile:function(am){var an=this.pos;while(this.eat(am)){}return this.pos>an},eatSpace:function(){var am=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>am},skipToEnd:function(){this.pos=this.string.length},skipTo:function(am){var an=this.string.indexOf(am,this.pos);if(an>-1){this.pos=an;return true}},backUp:function(am){this.pos-=am},column:function(){return n(this.string,this.start,this.tabSize)},indentation:function(){return n(this.string,null,this.tabSize)},match:function(ap,an,am){if(typeof ap=="string"){function aq(ar){return am?ar.toLowerCase():ar}if(aq(this.string).indexOf(aq(ap),this.pos)==this.pos){if(an!==false){this.pos+=ap.length}return true}}else{var ao=this.string.slice(this.pos).match(ap);if(ao&&an!==false){this.pos+=ao[0].length}return ao}},current:function(){return this.string.slice(this.start,this.pos)}};u.StringStream=b;function K(ap,ao,an,am){this.from=ap;this.to=ao;this.style=an;this.marker=am}K.prototype={attach:function(am){this.marker.set.push(am)},detach:function(an){var am=q(this.marker.set,an);if(am>-1){this.marker.set.splice(am,1)}},split:function(ap,am){if(this.to<=ap&&this.to!=null){return null}var ao=this.from<ap||this.from==null?null:this.from-ap+am;var an=this.to==null?null:this.to-ap+am;return new K(ao,an,this.style,this.marker)},dup:function(){return new K(null,null,this.style,this.marker)},clipTo:function(an,aq,am,ap,ao){if(an&&ap>this.from&&(ap<this.to||this.to==null)){this.from=null}else{if(this.from!=null&&this.from>=aq){this.from=Math.max(ap,this.from)+ao}}if(am&&(aq<this.to||this.to==null)&&(aq>this.from||this.from==null)){this.to=null}else{if(this.to!=null&&this.to>aq){this.to=ap<this.to?this.to+ao:aq}}},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(am){return this.marker==am.marker}};function G(am){this.from=am;this.to=am;this.line=null}G.prototype={attach:function(am){this.line=am},detach:function(am){if(this.line==am){this.line=null}},split:function(an,am){if(an<this.from){this.from=this.to=(this.from-an)+am;return this}},isDead:function(){return this.from>this.to},clipTo:function(an,aq,am,ap,ao){if((an||aq<this.from)&&(am||ap>this.to)){this.from=0;this.to=-1}else{if(this.from>aq){this.from=this.to=Math.max(ap,this.from)+ao}}},sameSet:function(am){return false},find:function(){if(!this.line||!this.line.parent){return null}return{line:Y(this.line),ch:this.from}},clear:function(){if(this.line){var am=q(this.line.marked,this);if(am!=-1){this.line.marked.splice(am,1)}this.line=null}}};function e(an,am){this.styles=am||[an,null];this.text=an;this.height=1;this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null;this.stateAfter=this.parent=this.hidden=null}e.inheritMarks=function(aq,au){var ap=new e(aq),am=au&&au.marked;if(am){for(var ao=0;ao<am.length;++ao){if(am[ao].to==null&&am[ao].style){var an=ap.marked||(ap.marked=[]),at=am[ao];var ar=at.dup();an.push(ar);ar.attach(ap)}}}return ap};e.prototype={replace:function(aq,ap,au){var av=[],ao=this.marked,ar=ap==null?this.text.length:ap;al(0,aq,this.styles,av);if(au){av.push(au,null)}al(ar,this.text.length,this.styles,av);this.styles=av;this.text=this.text.slice(0,aq)+au+this.text.slice(ar);this.stateAfter=null;if(ao){var at=au.length-(ar-aq);for(var an=0;an<ao.length;++an){var am=ao[an];am.clipTo(aq==null,aq||0,ap==null,ar,at);if(am.isDead()){am.detach(this);ao.splice(an--,1)}}}},split:function(au,ar){var ap=[ar,null],an=this.marked;al(au,this.text.length,this.styles,ap);var ao=new e(ar+this.text.slice(au),ap);if(an){for(var aq=0;aq<an.length;++aq){var at=an[aq];var am=at.split(au,ar.length);if(am){if(!ao.marked){ao.marked=[]}ao.marked.push(am);am.attach(ao);if(am==at){an.splice(aq--,1)}}}}return ao},append:function(an){var at=this.text.length,am=an.marked,aq=this.marked;this.text+=an.text;al(0,an.text.length,an.styles,this.styles);if(aq){for(var ar=0;ar<aq.length;++ar){if(aq[ar].to==null){aq[ar].to=at}}}if(am&&am.length){if(!aq){this.marked=aq=[]}outer:for(var ar=0;ar<am.length;++ar){var au=am[ar];if(!au.from){for(var ap=0;ap<aq.length;++ap){var ao=aq[ap];if(ao.to==at&&ao.sameSet(au)){ao.to=au.to==null?null:au.to+at;if(ao.isDead()){ao.detach(this);am.splice(ar--,1)}continue outer}}}aq.push(au);au.attach(this);au.from+=at;if(au.to!=null){au.to+=at}}}},fixMarkEnds:function(an){var am=this.marked,aq=an.marked;if(!am){return}for(var ap=0;ap<am.length;++ap){var at=am[ap],ar=at.to==null;if(ar&&aq){for(var ao=0;ao<aq.length;++ao){if(aq[ao].sameSet(at)){ar=false;break}}}if(ar){at.to=this.text.length}}},fixMarkStarts:function(){var am=this.marked;if(!am){return}for(var an=0;an<am.length;++an){if(am[an].from==null){am[an].from=0}}},addMark:function(am){am.attach(this);if(this.marked==null){this.marked=[]}this.marked.push(am);this.marked.sort(function(ao,an){return(ao.from||0)-(an.from||0)})},highlight:function(ar,an,at){var aw=new b(this.text,at),ax=this.styles,au=0;var aq=false,ao=ax[0],av;if(this.text==""&&ar.blankLine){ar.blankLine(an)}while(!aw.eol()){var am=ar.token(aw,an);var ap=this.text.slice(aw.start,aw.pos);aw.start=aw.pos;if(au&&ax[au-1]==am){ax[au-2]+=ap}else{if(ap){if(!aq&&(ax[au+1]!=am||(au&&ax[au-2]!=av))){aq=true}ax[au++]=ap;ax[au++]=am;av=ao;ao=ax[au]}}if(aw.pos>5000){ax[au++]=this.text.slice(aw.pos);ax[au++]=null;break}}if(ax.length!=au){ax.length=au;aq=true}if(au&&ax[au-2]!=av){aq=true}return aq||(ax.length<5&&this.text.length<10?null:false)},getTokenAt:function(ar,ap,ao){var am=this.text,aq=new b(am);while(aq.pos<ao&&!aq.eol()){aq.start=aq.pos;var an=ar.token(aq,ap)}return{start:aq.start,end:aq.pos,string:aq.current(),className:an||null,state:ap}},indentation:function(am){return n(this.text,null,am)},getHTML:function(aM,am,ao,aq){var ax=[],av=true,at=0;function aI(aY,aW){if(!aY){return}if(av&&I&&aY.charAt(0)==" "){aY="\u00a0"+aY.slice(1)}av=false;if(aY.indexOf("\t")==-1){at+=aY.length;var aX=P(aY)}else{var aX="";for(var aZ=0;;){var aU=aY.indexOf("\t",aZ);if(aU==-1){aX+=P(aY.slice(aZ));at+=aY.length-aZ;break}else{at+=aU-aZ;var aV=aM(at);aX+=P(aY.slice(aZ,aU))+aV.html;at+=aV.width;aZ=aU+1}}}if(aW){ax.push('<span class="',aW,'">',aX,"</span>")}else{ax.push(aX)}}var aL=aI;if(am!=null){var aG=0,aB='<span id="'+ao+'">';aL=function(aW,aV){var aU=aW.length;if(am>=aG&&am<aG+aU){if(am>aG){aI(aW.slice(0,am-aG),aV);if(aq){ax.push("<wbr>")}}ax.push(aB);aI(aW.slice(am-aG),aV);ax.push("</span>");am--;aG+=aU}else{aG+=aU;aI(aW,aV);if(aG==am&&aG==aQ){ax.push(aB+"</span>")}else{if(aG>am+10&&/\s/.test(aW)){aL=function(){}}}}}}var aF=this.styles,aw=this.text,aC=this.marked;var aQ=aw.length;function ar(aU){if(!aU){return null}return"cm-"+aU.replace(/ +/g," cm-")}if(!aw&&am==null){aL(" ")}else{if(!aC||!aC.length){for(var aN=0,ay=0;ay<aQ;aN+=2){var aE=aF[aN],aP=aF[aN+1],aH=aE.length;if(ay+aH>aQ){aE=aE.slice(0,aQ-ay)}ay+=aH;aL(aE,ar(aP))}}else{var au=0,aN=0,aA="",aP,aT=0;var aS=aC[0].from||0,aK=[],aR=0;function aO(){var aU;while(aR<aC.length&&((aU=aC[aR]).from==au||aU.from==null)){if(aU.style!=null){aK.push(aU)}++aR}aS=aR<aC.length?aC[aR].from:Infinity;for(var aV=0;aV<aK.length;++aV){var aW=aK[aV].to||Infinity;if(aW==au){aK.splice(aV--,1)}else{aS=Math.min(aW,aS)}}}var aD=0;while(au<aQ){if(aS==au){aO()}var az=Math.min(aQ,aS);while(true){if(aA){var ap=au+aA.length;var an=aP;for(var aJ=0;aJ<aK.length;++aJ){an=(an?an+" ":"")+aK[aJ].style}aL(ap>az?aA.slice(0,az-au):aA,an);if(ap>=az){aA=aA.slice(az-au);au=az;break}au=ap}aA=aF[aN++];aP=ar(aF[aN++])}}}}return ax.join("")},cleanUp:function(){this.parent=null;if(this.marked){for(var am=0,an=this.marked.length;am<an;++am){this.marked[am].detach(this)}}}};function al(at,au,am,av){for(var aq=0,ar=0,an=0;ar<au;aq+=2){var ao=am[aq],ap=ar+ao.length;if(an==0){if(ap>at){av.push(ao.slice(at-ar,Math.min(ao.length,au-ar)),am[aq+1])}if(ap>=at){an=1}}else{if(an==1){if(ap>au){av.push(ao.slice(0,au-ar),am[aq+1])}else{av.push(ao,am[aq+1])}}}ar=ap}}function ah(an){this.lines=an;this.parent=null;for(var ao=0,ap=an.length,am=0;ao<ap;++ao){an[ao].parent=this;am+=an[ao].height}this.height=am}ah.prototype={chunkSize:function(){return this.lines.length},remove:function(am,au,aq){for(var ap=am,ar=am+au;ap<ar;++ap){var an=this.lines[ap];this.height-=an.height;an.cleanUp();if(an.handlers){for(var ao=0;ao<an.handlers.length;++ao){aq.push(an.handlers[ao])}}}this.lines.splice(am,au)},collapse:function(am){am.splice.apply(am,[am.length,0].concat(this.lines))},insertHeight:function(an,ao,am){this.height+=am;if(I){this.lines=this.lines.slice(0,an).concat(ao).concat(this.lines.slice(an))}else{this.lines.splice.apply(this.lines,[an,0].concat(ao))}for(var ap=0,aq=ao.length;ap<aq;++ap){ao[ap].parent=this}},iterN:function(am,ap,ao){for(var an=am+ap;am<an;++am){if(ao(this.lines[am])){return true}}}};function i(ap){this.children=ap;var ao=0,am=0;for(var an=0,ar=ap.length;an<ar;++an){var aq=ap[an];ao+=aq.chunkSize();am+=aq.height;aq.parent=this}this.size=ao;this.height=am;this.parent=null}i.prototype={chunkSize:function(){return this.size},remove:function(ao,an,ar){this.size-=an;for(var ap=0;ap<this.children.length;++ap){var am=this.children[ap],au=am.chunkSize();if(ao<au){var aq=Math.min(an,au-ao),av=am.height;am.remove(ao,aq,ar);this.height-=av-am.height;if(au==aq){this.children.splice(ap--,1);am.parent=null}if((an-=aq)==0){break}ao=0}else{ao-=au}}if(this.size-an<25){var aw=[];this.collapse(aw);this.children=[new ah(aw)];this.children[0].parent=this}},collapse:function(am){for(var an=0,ao=this.children.length;an<ao;++an){this.children[an].collapse(am)}},insert:function(an,ao){var am=0;for(var ap=0,aq=ao.length;ap<aq;++ap){am+=ao[ap].height}this.insertHeight(an,ao,am)},insertHeight:function(an,aw,av){this.size+=aw.length;this.height+=av;for(var ao=0,aq=this.children.length;ao<aq;++ao){var am=this.children[ao],ar=am.chunkSize();if(an<=ar){am.insertHeight(an,aw,av);if(am.lines&&am.lines.length>50){while(am.lines.length>50){var ap=am.lines.splice(am.lines.length-25,25);var au=new ah(ap);am.height-=au.height;this.children.splice(ao+1,0,au);au.parent=this}this.maybeSpill()}break}an-=ar}},maybeSpill:function(){if(this.children.length<=10){return}var ap=this;do{var an=ap.children.splice(ap.children.length-5,5);var ao=new i(an);if(!ap.parent){var aq=new i(ap.children);aq.parent=ap;ap.children=[aq,ao];ap=aq}else{ap.size-=ao.size;ap.height-=ao.height;var am=q(ap.parent.children,ap);ap.parent.children.splice(am+1,0,ao)}ao.parent=ap.parent}while(ap.children.length>10);ap.parent.maybeSpill()},iter:function(ao,an,am){this.iterN(ao,an-ao,am)},iterN:function(am,av,au){for(var an=0,aq=this.children.length;an<aq;++an){var ar=this.children[an],ap=ar.chunkSize();if(am<ap){var ao=Math.min(av,ap-am);if(ar.iterN(am,ao,au)){return true}if((av-=ao)==0){break}am=0}else{am-=ap}}}};function C(am,aq){while(!am.lines){for(var an=0;;++an){var ap=am.children[an],ao=ap.chunkSize();if(aq<ao){am=ap;break}aq-=ao}}return am.lines[aq]}function Y(am){if(am.parent==null){return null}var ar=am.parent,aq=q(ar.lines,am);for(var an=ar.parent;an;ar=an,an=an.parent){for(var ao=0,ap=an.children.length;;++ao){if(an.children[ao]==ar){break}aq+=an.children[ao].chunkSize()}}return aq}function X(at,aq){var ao=0;outer:do{for(var ap=0,ar=at.children.length;ap<ar;++ap){var an=at.children[ap],am=an.height;if(aq<am){at=an;continue outer}aq-=am;ao+=an.chunkSize()}return ao}while(!at.lines);for(var ap=0,ar=at.lines.length;ap<ar;++ap){var av=at.lines[ap],au=av.height;if(aq<au){break}aq-=au}return ao+ap}function g(am,at){var ao=0;outer:do{for(var an=0,aq=am.children.length;an<aq;++an){var ar=am.children[an],ap=ar.chunkSize();if(at<ap){am=ar;continue outer}at-=ap;ao+=ar.height}return ao}while(!am.lines);for(var an=0;an<at;++an){ao+=am.lines[an].height}return ao}function k(){this.time=0;this.done=[];this.undone=[];this.compound=0;this.closed=false}k.prototype={addChange:function(am,ar,an){this.undone.length=0;var ao=+new Date,au=this.done[this.done.length-1],av=au&&au[au.length-1];var aq=ao-this.time;if(this.compound&&au&&!this.closed){au.push({start:am,added:ar,old:an})}else{if(aq>400||!av||this.closed||av.start>am+an.length||av.start+av.added<am){this.done.push([{start:am,added:ar,old:an}]);this.closed=false}else{var at=Math.max(0,av.start-am),aw=Math.max(0,(am+an.length)-(av.start+av.added));for(var ap=at;ap>0;--ap){av.old.unshift(an[ap-1])}for(var ap=aw;ap>0;--ap){av.old.push(an[an.length-ap])}if(at){av.start=am}av.added+=ar-(an.length-at-aw)}}this.time=ao},startCompound:function(){if(!this.compound++){this.closed=true}},endCompound:function(){if(!--this.compound){this.closed=true}}};function J(){w(this)}function O(am){if(!am.stop){am.stop=J}return am}function T(am){if(am.preventDefault){am.preventDefault()}else{am.returnValue=false}}function D(am){if(am.stopPropagation){am.stopPropagation()}else{am.cancelBubble=true}}function w(am){T(am);D(am)}u.e_stop=w;u.e_preventDefault=T;u.e_stopPropagation=D;function j(am){return am.target||am.srcElement}function x(am){if(am.which){return am.which}else{if(am.button&1){return 1}else{if(am.button&2){return 3}else{if(am.button&4){return 2}}}}}function y(an,ao){var am=an.override&&an.override.hasOwnProperty(ao);return am?an.override[ao]:an[ao]}function r(ap,ao,an,am){if(typeof ap.addEventListener=="function"){ap.addEventListener(ao,an,false);if(am){return function(){ap.removeEventListener(ao,an,false)}}}else{var aq=function(ar){an(ar||window.event)};ap.attachEvent("on"+ao,aq);if(am){return function(){ap.detachEvent("on"+ao,aq)}}}}u.connect=r;function z(){this.id=null}z.prototype={set:function(am,an){clearTimeout(this.id);this.id=setTimeout(an,am)}};var ab=u.Pass={toString:function(){return"CodeMirror.Pass"}};var N=/gecko\/\d{7}/i.test(navigator.userAgent);var I=/MSIE \d/.test(navigator.userAgent);var B=/MSIE [1-8]\b/.test(navigator.userAgent);var E=I&&document.documentMode==5;var f=/WebKit\//.test(navigator.userAgent);var af=/Chrome\//.test(navigator.userAgent);var h=/Apple Computer/.test(navigator.vendor);var m=/KHTML\//.test(navigator.userAgent);var F=function(){if(B){return false}var am=document.createElement("div");return"draggable" in am||"dragDrop" in am}();var d=function(){var am=document.createElement("textarea");am.value="foo\nbar";if(am.value.indexOf("\r")>-1){return"\r\n"}return"\n"}();var o=/^$/;if(N){o=/$'/}else{if(h){o=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/}else{if(af){o=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/}}}function n(an,am,ap){if(am==null){am=an.search(/[^\s\u00a0]/);if(am==-1){am=an.length}}for(var ao=0,aq=0;ao<am;++ao){if(an.charAt(ao)=="\t"){aq+=ap-(aq%ap)}else{++aq}}return aq}function t(am){if(am.currentStyle){return am.currentStyle}return window.getComputedStyle(am,null)}function ak(an,aw){var ap=an.ownerDocument.body;var av=0,au=0,ar=false;for(var am=an;am;am=am.offsetParent){var at=am.offsetLeft,ao=am.offsetTop;if(am==ap){av+=Math.abs(at);au+=Math.abs(ao)}else{av+=at,au+=ao}if(aw&&t(am).position=="fixed"){ar=true}}var aq=aw&&!ar?null:ap;for(var am=an.parentNode;am!=aq;am=am.parentNode){if(am.scrollLeft!=null){av-=am.scrollLeft;au-=am.scrollTop}}return{left:av,top:au}}if(document.documentElement.getBoundingClientRect!=null){ak=function(ap,am){try{var ao=ap.getBoundingClientRect();ao={top:ao.top,left:ao.left}}catch(aq){ao={top:0,left:0}}if(!am){if(window.pageYOffset==null){var an=document.documentElement||document.body.parentNode;if(an.scrollTop==null){an=document.body}ao.top+=an.scrollTop;ao.left+=an.scrollLeft}else{ao.top+=window.pageYOffset;ao.left+=window.pageXOffset}}return ao}}function H(am){return am.textContent||am.innerText||am.nodeValue||""}function a(am){if(s){am.selectionStart=0;am.selectionEnd=am.value.length}else{am.select()}}function ad(an,am){return an.line==am.line&&an.ch==am.ch}function Z(an,am){return an.line<am.line||(an.line==am.line&&an.ch<am.ch)}function aa(am){return{line:am.line,ch:am.ch}}var ai=document.createElement("pre");function P(am){ai.textContent=am;return ai.innerHTML}if(P("a")=="\na"){P=function(am){ai.textContent=am;return ai.innerHTML.slice(1)}}else{if(P("\t")!="\t"){P=function(am){ai.innerHTML="";ai.appendChild(document.createTextNode(am));return ai.innerHTML}}}u.htmlEscape=P;function W(ap,ao){if(!ao){return 0}if(!ap){return ao.length}for(var an=ap.length,am=ao.length;an>=0&&am>=0;--an,--am){if(ap.charAt(an)!=ao.charAt(am)){break}}return am+1}function q(ap,am){if(ap.indexOf){return ap.indexOf(am)}for(var an=0,ao=ap.length;an<ao;++an){if(ap[an]==am){return an}}return -1}function ag(am){return/\w/.test(am)||am.toUpperCase()!=am.toLowerCase()}var A="\n\nb".split(/\n/).length!=3?function(ao){var ap=0,an,am=[];while((an=ao.indexOf("\n",ap))>-1){am.push(ao.slice(ap,ao.charAt(an-1)=="\r"?an-1:an));ap=an+1}am.push(ao.slice(ap));return am}:function(am){return am.split(/\r?\n/)};u.splitLines=A;var ae=window.getSelection?function(an){try{return an.selectionStart!=an.selectionEnd}catch(am){return false}}:function(ao){try{var am=ao.ownerDocument.selection.createRange()}catch(an){}if(!am||am.parentElement()!=ao){return false}return am.compareEndPoints("StartToEnd",am)!=0};u.defineMode("null",function(){return{token:function(am){am.skipToEnd()}}});u.defineMIME("text/plain","null");var R={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};u.keyNames=R;(function(){for(var am=0;am<10;am++){R[am+48]=String(am)}for(var am=65;am<=90;am++){R[am]=String.fromCharCode(am)}for(var am=1;am<=12;am++){R[am+111]=R[am+63235]="F"+am}})();return u})();CodeMirror.defineMode("javascript",function(I,M){var v=I.indentUnit;var Q=M.json;var b=function(){function W(Z){return{type:Z,style:"keyword"}}var T=W("keyword a"),Y=W("keyword b"),X=W("keyword c");var U=W("operator"),V={type:"atom",style:"atom"};return{"if":T,"while":T,"with":T,"else":Y,"do":Y,"try":Y,"finally":Y,"return":X,"break":X,"continue":X,"new":X,"delete":X,"throw":X,"var":W("var"),"const":W("var"),let:W("var"),"function":W("function"),"catch":W("catch"),"for":W("for"),"switch":W("switch"),"case":W("case"),"default":W("default"),"in":U,"typeof":U,"instanceof":U,"true":V,"false":V,"null":V,"undefined":V,"NaN":V,"Infinity":V}}();var N=/[+\-*&%=<>!?|]/;function R(V,U,T){U.tokenize=T;return T(V,U)}function h(W,T){var V=false,U;while((U=W.next())!=null){if(U==T&&!V){return false}V=!V&&U=="\\"}return V}var S,p;function B(V,U,T){S=V;p=T;return U}function l(X,V){var T=X.next();if(T=='"'||T=="'"){return R(X,V,z(T))}else{if(/[\[\]{}\(\),;\:\.]/.test(T)){return B(T)}else{if(T=="0"&&X.eat(/x/i)){X.eatWhile(/[\da-f]/i);return B("number","number")}else{if(/\d/.test(T)){X.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return B("number","number")}else{if(T=="/"){if(X.eat("*")){return R(X,V,f)}else{if(X.eat("/")){X.skipToEnd();return B("comment","comment")}else{if(V.reAllowed){h(X,"/");X.eatWhile(/[gimy]/);return B("regexp","string-2")}else{X.eatWhile(N);return B("operator",null,X.current())}}}}else{if(T=="#"){X.skipToEnd();return B("error","error")}else{if(N.test(T)){X.eatWhile(N);return B("operator",null,X.current())}else{X.eatWhile(/[\w\$_]/);var W=X.current(),U=b.propertyIsEnumerable(W)&&b[W];return(U&&V.kwAllowed)?B(U.type,U.style,W):B("variable","variable",W)}}}}}}}}function z(T){return function(V,U){if(!h(V,T)){U.tokenize=l}return B("string","string")}}function f(W,V){var T=false,U;while(U=W.next()){if(U=="/"&&T){V.tokenize=l;break}T=(U=="*")}return B("comment","comment")}var k={atom:true,number:true,variable:true,string:true,regexp:true};function t(Y,U,T,X,V,W){this.indented=Y;this.column=U;this.type=T;this.prev=V;this.info=W;if(X!=null){this.align=X}}function w(V,U){for(var T=V.localVars;T;T=T.next){if(T.name==U){return true}}}function E(X,U,T,W,Y){var Z=X.cc;u.state=X;u.stream=Y;u.marked=null,u.cc=Z;if(!X.lexical.hasOwnProperty("align")){X.lexical.align=true}while(true){var V=Z.length?Z.pop():Q?x:y;if(V(T,W)){while(Z.length&&Z[Z.length-1].lex){Z.pop()()}if(u.marked){return u.marked}if(T=="variable"&&w(X,W)){return"variable-2"}return U}}}var u={state:null,column:null,marked:null,cc:null};function a(){for(var T=arguments.length-1;T>=0;T--){u.cc.push(arguments[T])}}function G(){a.apply(null,arguments);return true}function m(U){var V=u.state;if(V.context){u.marked="def";for(var T=V.localVars;T;T=T.next){if(T.name==U){return}}V.localVars={name:U,next:V.localVars}}}var D={name:"this",next:{name:"arguments"}};function s(){if(!u.state.context){u.state.localVars=D}u.state.context={prev:u.state.context,vars:u.state.localVars}}function r(){u.state.localVars=u.state.context.vars;u.state.context=u.state.context.prev}function j(U,V){var T=function(){var W=u.state;W.lexical=new t(W.indented,u.stream.column(),U,null,W.lexical,V)};T.lex=true;return T}function F(){var T=u.state;if(T.lexical.prev){if(T.lexical.type==")"){T.indented=T.lexical.indented}T.lexical=T.lexical.prev}}F.lex=true;function c(U){return function T(V){if(V==U){return G()}else{if(U==";"){return a()}else{return G(arguments.callee)}}}}function y(T){if(T=="var"){return G(j("vardef"),J,c(";"),F)}if(T=="keyword a"){return G(j("form"),x,y,F)}if(T=="keyword b"){return G(j("form"),y,F)}if(T=="{"){return G(j("}"),n,F)}if(T==";"){return G()}if(T=="function"){return G(i)}if(T=="for"){return G(j("form"),c("("),j(")"),g,c(")"),F,y,F)}if(T=="variable"){return G(j("stat"),C)}if(T=="switch"){return G(j("form"),x,j("}","switch"),c("{"),n,F,F)}if(T=="case"){return G(x,c(":"))}if(T=="default"){return G(c(":"))}if(T=="catch"){return G(j("form"),s,c("("),q,c(")"),y,F,r)}return a(j("stat"),x,c(";"),F)}function x(T){if(k.hasOwnProperty(T)){return G(L)}if(T=="function"){return G(i)}if(T=="keyword c"){return G(A)}if(T=="("){return G(j(")"),A,c(")"),F,L)}if(T=="operator"){return G(x)}if(T=="["){return G(j("]"),O(x,"]"),F,L)}if(T=="{"){return G(j("}"),O(o,"}"),F,L)}return G()}function A(T){if(T.match(/[;\}\)\],]/)){return a()}return a(x)}function L(T,U){if(T=="operator"&&/\+\+|--/.test(U)){return G(L)}if(T=="operator"||T==":"){return G(x)}if(T==";"){return}if(T=="("){return G(j(")"),O(x,")"),F,L)}if(T=="."){return G(P,L)}if(T=="["){return G(j("]"),x,c("]"),F,L)}}function C(T){if(T==":"){return G(F,y)}return a(L,c(";"),F)}function P(T){if(T=="variable"){u.marked="property";return G()}}function o(T){if(T=="variable"){u.marked="property"}if(k.hasOwnProperty(T)){return G(c(":"),x)}}function O(V,T){function U(X){if(X==","){return G(V,U)}if(X==T){return G()}return G(c(T))}return function W(X){if(X==T){return G()}else{return a(V,U)}}}function n(T){if(T=="}"){return G()}return a(y,n)}function J(T,U){if(T=="variable"){m(U);return G(H)}return G()}function H(T,U){if(U=="="){return G(x,H)}if(T==","){return G(J)}}function g(T){if(T=="var"){return G(J,e)}if(T==";"){return a(e)}if(T=="variable"){return G(K)}return a(e)}function K(T,U){if(U=="in"){return G(x)}return G(L,e)}function e(T,U){if(T==";"){return G(d)}if(U=="in"){return G(x)}return G(x,c(";"),d)}function d(T){if(T!=")"){G(x)}}function i(T,U){if(T=="variable"){m(U);return G(i)}if(T=="("){return G(j(")"),s,O(q,")"),F,y,r)}}function q(T,U){if(T=="variable"){m(U);return G()}}return{startState:function(T){return{tokenize:l,reAllowed:true,kwAllowed:true,cc:[],lexical:new t((T||0)-v,0,"block",false),localVars:M.localVars,context:M.localVars&&{vars:M.localVars},indented:0}},token:function(V,U){if(V.sol()){if(!U.lexical.hasOwnProperty("align")){U.lexical.align=false}U.indented=V.indentation()}if(V.eatSpace()){return null}var T=U.tokenize(V,U);if(S=="comment"){return T}U.reAllowed=!!(S=="operator"||S=="keyword c"||S.match(/^[\[{}\(,;:]$/));U.kwAllowed=S!=".";return E(U,T,S,p,V)},indent:function(Y,T){if(Y.tokenize!=l){return 0}var X=T&&T.charAt(0),V=Y.lexical;if(V.type=="stat"&&X=="}"){V=V.prev}var W=V.type,U=X==W;if(W=="vardef"){return V.indented+4}else{if(W=="form"&&X=="{"){return V.indented}else{if(W=="stat"||W=="form"){return V.indented+v}else{if(V.info=="switch"&&!U){return V.indented+(/^(?:case|default)\b/.test(T)?v:2*v)}else{if(V.align){return V.column+(U?0:1)}else{return V.indented+(U?0:v)}}}}}},electricChars:":{}"}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMode("xml",function(y,k){var r=y.indentUnit;var x=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:false}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=k.alignCDATA;var f,g;function o(E,D){function B(G){D.tokenize=G;return G(E,D)}var C=E.next();if(C=="<"){if(E.eat("!")){if(E.eat("[")){if(E.match("CDATA[")){return B(w("atom","]]>"))}else{return null}}else{if(E.match("--")){return B(w("comment","-->"))}else{if(E.match("DOCTYPE",true,true)){E.eatWhile(/[\w\._\-]/);return B(z(1))}else{return null}}}}else{if(E.eat("?")){E.eatWhile(/[\w\._\-]/);D.tokenize=w("meta","?>");return"meta"}else{g=E.eat("/")?"closeTag":"openTag";E.eatSpace();f="";var F;while((F=E.eat(/[^\s\u00a0=<>\"\'\/?]/))){f+=F}D.tokenize=n;return"tag"}}}else{if(C=="&"){var A;if(E.eat("#")){if(E.eat("x")){A=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";")}else{A=E.eatWhile(/[\d]/)&&E.eat(";")}}else{A=E.eatWhile(/[\w\.\-:]/)&&E.eat(";")}return A?"atom":"error"}else{E.eatWhile(/[^&<]/);return null}}}function n(C,B){var A=C.next();if(A==">"||(A=="/"&&C.eat(">"))){B.tokenize=o;g=A==">"?"endTag":"selfcloseTag";return"tag"}else{if(A=="="){g="equals";return null}else{if(/[\'\"]/.test(A)){B.tokenize=j(A);return B.tokenize(C,B)}else{C.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}}}}function j(A){return function(C,B){while(!C.eol()){if(C.next()==A){B.tokenize=n;break}}return"string"}}function w(B,A){return function(D,C){while(!D.eol()){if(D.match(A)){C.tokenize=o;break}D.next()}return B}}function z(A){return function(D,C){var B;while((B=D.next())!=null){if(B=="<"){C.tokenize=z(A+1);return C.tokenize(D,C)}else{if(B==">"){if(A==1){C.tokenize=o;break}else{C.tokenize=z(A-1);return C.tokenize(D,C)}}}}return"meta"}}var l,h;function b(){for(var A=arguments.length-1;A>=0;A--){l.cc.push(arguments[A])}}function e(){b.apply(null,arguments);return true}function i(A,C){var B=x.doNotIndent.hasOwnProperty(A)||(l.context&&l.context.noIndent);l.context={prev:l.context,tagName:A,indent:l.indented,startOfLine:C,noIndent:B}}function u(){if(l.context){l.context=l.context.prev}}function d(A){if(A=="openTag"){l.tagName=f;return e(m,c(l.startOfLine))}else{if(A=="closeTag"){var B=false;if(l.context){if(l.context.tagName!=f){if(x.implicitlyClosed.hasOwnProperty(l.context.tagName.toLowerCase())){u()}B=!l.context||l.context.tagName!=f}}else{B=true}if(B){h="error"}return e(s(B))}}return e()}function c(A){return function(B){if(B=="selfcloseTag"||(B=="endTag"&&x.autoSelfClosers.hasOwnProperty(l.tagName.toLowerCase()))){q(l.tagName.toLowerCase());return e()}if(B=="endTag"){q(l.tagName.toLowerCase());i(l.tagName,A);return e()}return e()}}function s(A){return function(B){if(A){h="error"}if(B=="endTag"){u();return e()}h="error";return e(arguments.callee)}}function q(B){var A;while(true){if(!l.context){return}A=l.context.tagName.toLowerCase();if(!x.contextGrabbers.hasOwnProperty(A)||!x.contextGrabbers[A].hasOwnProperty(B)){return}u()}}function m(A){if(A=="word"){h="attribute";return e(p,m)}if(A=="endTag"||A=="selfcloseTag"){return b()}h="error";return e(m)}function p(A){if(A=="equals"){return e(v,m)}if(!x.allowMissing){h="error"}return(A=="endTag"||A=="selfcloseTag")?b():e()}function v(A){if(A=="string"){return e(t)}if(A=="word"&&x.allowUnquoted){h="string";return e()}h="error";return(A=="endTag"||A=="selfCloseTag")?b():e()}function t(A){if(A=="string"){return e(t)}else{return b()}}return{startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:true,tagName:null,context:null}},token:function(D,C){if(D.sol()){C.startOfLine=true;C.indented=D.indentation()}if(D.eatSpace()){return null}h=g=f=null;var B=C.tokenize(D,C);C.type=g;if((B||g)&&B!="comment"){l=C;while(true){var A=C.cc.pop()||d;if(A(g||B)){break}}}C.startOfLine=false;return h||B},indent:function(D,A,C){var B=D.context;if((D.tokenize!=n&&D.tokenize!=o)||B&&B.noIndent){return C?C.match(/^(\s*)/)[0].length:0}if(a&&/<!\[CDATA\[/.test(A)){return 0}if(B&&/^<\//.test(A)){B=B.prev}while(B&&!B.startOfLine){B=B.prev}if(B){return B.indent+r}else{return 0}},compareStates:function(D,B){if(D.indented!=B.indented||D.tokenize!=B.tokenize){return false}for(var C=D.context,A=B.context;;C=C.prev,A=A.prev){if(!C||!A){return C==A}if(C.tagName!=A.tagName){return false}}},electricChars:"/"}});CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("markdown",function(B,m){var i=CodeMirror.getMode(B,{name:"xml",htmlMode:true});var y="header",d="comment",A="quote",z="string",E="hr",s="link",D="string",g="em",j="strong",w="emstrong";var F=/^([*\-=_])(?:\s*\1){2,}\s*$/,p=/^[*\-+]\s+/,u=/^[0-9]+\.\s+/,n=/^(?:\={3,}|-{3,})$/,f=/^[^\[*_\\<>`]+/;function e(I,H,G){H.f=H.inline=G;return G(I,H)}function r(I,H,G){H.f=H.block=G;return G(I,H)}function o(G){G.em=false;G.strong=false;return null}function l(I,H){var G;if(H.indentationDiff>=4){H.indentation-=H.indentationDiff;I.skipToEnd();return d}else{if(I.eatSpace()){return null}else{if(I.peek()==="#"||I.match(n)){H.header=true}else{if(I.eat(">")){H.indentation++;H.quote=true}else{if(I.peek()==="["){return e(I,H,k)}else{if(I.match(F,true)){return E}else{if(G=I.match(p,true)||I.match(u,true)){H.indentation+=G[0].length;return z}}}}}}}return e(I,H,H.inline)}function x(I,H){var G=i.token(I,H.htmlState);if(G==="tag"&&H.htmlState.type!=="openTag"&&!H.htmlState.context){H.f=q;H.block=l}return G}function t(H){var G=[];if(H.strong){G.push(H.em?w:j)}else{if(H.em){G.push(g)}}if(H.header){G.push(y)}if(H.quote){G.push(A)}return G.length?G.join(" "):null}function b(H,G){if(H.match(f,true)){return t(G)}return undefined}function q(K,J){var I=J.text(K,J);if(typeof I!=="undefined"){return I}var H=K.next();if(H==="\\"){K.next();return t(J)}if(H==="`"){return e(K,J,v(d,"`"))}if(H==="["){return e(K,J,C)}if(H==="<"&&K.match(/^\w/,false)){K.backUp(1);return r(K,J,x)}var G=t(J);if(H==="*"||H==="_"){if(K.eat(H)){return(J.strong=!J.strong)?t(J):G}return(J.em=!J.em)?t(J):G}return t(J)}function C(I,H){while(!I.eol()){var G=I.next();if(G==="\\"){I.next()}if(G==="]"){H.inline=H.f=h;return s}}return s}function h(I,H){I.eatSpace();var G=I.next();if(G==="("||G==="["){return e(I,H,v(D,G==="("?")":"]"))}return"error"}function k(H,G){if(H.match(/^[^\]]*\]:/,true)){G.f=a;return s}return e(H,G,q)}function a(H,G){H.eatSpace();H.match(/^[^\s]+/,true);G.f=G.inline=q;return D}function c(G){if(!c[G]){c[G]=new RegExp("^(?:[^\\\\\\"+G+"]|\\\\.)*(?:\\"+G+"|$)")}return c[G]}function v(H,I,G){G=G||q;return function(K,J){K.match(c(I));J.inline=J.f=G;return H}}return{startState:function(){return{f:l,block:l,htmlState:i.startState(),indentation:0,inline:q,text:b,em:false,strong:false,header:false,quote:false}},copyState:function(G){return{f:G.f,block:G.block,htmlState:CodeMirror.copyState(i,G.htmlState),indentation:G.indentation,inline:G.inline,text:G.text,em:G.em,strong:G.strong,header:G.header,quote:G.quote}},token:function(I,H){if(I.sol()){if(I.match(/^\s*$/,true)){return o(H)}H.header=false;H.quote=false;H.f=H.block;var G=I.match(/^\s*/,true)[0].replace(/\t/g," ").length;H.indentationDiff=G-H.indentation;H.indentation=G;if(G>0){return null}}return H.f(I,H)},blankLine:o,getType:t}},"xml");CodeMirror.defineMIME("text/x-markdown","markdown");Ext.define("Docs.History",{singleton:true,init:function(){Ext.util.History.useTopWindow=false;Ext.util.History.init(function(){this.historyLoaded=true;this.initialNavigate()},this);Ext.util.History.on("change",function(b){this.navigate(b,true)},this)},notifyTabsLoaded:function(){this.tabsLoaded=true;this.initialNavigate()},initialNavigate:function(){if(this.tabsLoaded&&this.historyLoaded){this.navigate(Ext.util.History.getToken(),true)}},navigate:function(e,g){var f=this.parseToken(e);if(f.url=="#!/api"){Docs.App.getController("Classes").loadIndex(g)}else{if(f.type==="api"){Docs.App.getController("Classes").loadClass(f.url,g)}else{if(f.url==="#!/guide"){Docs.App.getController("Guides").loadIndex(g)}else{if(f.type==="guide"){Docs.App.getController("Guides").loadGuide(f.url,g)}else{if(f.url==="#!/video"){Docs.App.getController("Videos").loadIndex(g)}else{if(f.type==="video"){Docs.App.getController("Videos").loadVideo(f.url,g)}else{if(f.url==="#!/example"){Docs.App.getController("Examples").loadIndex()}else{if(f.type==="example"){Docs.App.getController("Examples").loadExample(f.url,g)}else{if(f.url==="#!/comment"){Docs.App.getController("Comments").loadIndex()}else{if(f.url==="#!/tests"){Docs.App.getController("Tests").loadIndex()}else{if(Docs.App.getController("Welcome").isActive()){Docs.App.getController("Welcome").loadIndex(g)}else{if(!this.noRepeatNav){this.noRepeatNav=true;var h=Ext.getCmp("doctabs").staticTabs[0];if(h){this.navigate(h.href,g)}}}}}}}}}}}}}},parseToken:function(d){var c=d&&d.match(/!?(\/(api|guide|example|video|comment|tests)(\/(.*))?)/);return c?{type:c[2],url:"#!"+c[1]}:{}},push:function(e,f){e=this.cleanUrl(e);if(!/^#!?/.test(e)){e="#!"+e}var d=Ext.util.History.getToken()||"";if("#"+d.replace(/^%21/,"!")!==e){Ext.util.History.add(e)}},cleanUrl:function(b){return b.replace(/^[^#]*#/,"#")}});Ext.define("Docs.Auth",{singleton:true,requires:["Ext.Ajax","Ext.util.Cookies"],init:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/session",params:{sid:this.getSid()},method:"GET",cors:true,callback:function(g,a,h){if(h&&h.responseText){var b=Ext.JSON.decode(h.responseText);if(b&&b.sessionID){this.setSid(b.sessionID)}if(b&&b.userName){this.currentUser=b}c.call(d,true)}else{c.call(d,false)}},scope:this})},login:function(b){Ext.Ajax.request({url:Docs.data.commentsUrl+"/login",method:"POST",cors:true,params:{username:b.username,password:b.password},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(g.success){this.currentUser=g;this.setSid(g.sessionID,b.remember);b.success&&b.success.call(b.scope)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})},logout:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/logout?sid="+this.getSid(),method:"POST",cors:true,callback:function(){this.currentUser=undefined;c&&c.call(d)},scope:this})},setSid:function(d,f){this.sid=d;if(d){var e=null;if(f){e=new Date();e.setTime(e.getTime()+(60*60*24*30*1000))}Ext.util.Cookies.set("sid",d,e)}else{Ext.util.Cookies.clear("sid")}},getSid:function(){if(!this.sid){this.sid=Ext.util.Cookies.get("sid")}return this.sid},getUser:function(){return this.currentUser},isLoggedIn:function(){return !!this.getUser()},isModerator:function(){return this.getUser()&&this.getUser().mod},getRegistrationUrl:function(){return Docs.data.commentsUrl+"/register"}});Ext.define("Docs.CommentCounts",{constructor:function(b){this.counts={};Ext.Array.each(b,function(a){this.counts[a._id]=a.value},this)},get:function(b){return this.counts[b.join("__")]||0},change:function(c,d){delete this.totals;return this.counts[c.join("__")]=this.get(c)+d},getClassTotal:function(b){if(!this.totals){this.totals={};Ext.Object.each(this.counts,function(a,f){var e=a.split("__");if(e[0]==="class"){this.totals[e[1]]=(this.totals[e[1]]||0)+f}},this)}return this.totals[b]}});Ext.define("Docs.CommentSubscriptions",{constructor:function(b){this.subscriptions={};Ext.Array.each(b,function(a){this.subscriptions[a.join("__")]=true},this)},has:function(b){return this.subscriptions[b.join("__")]},set:function(c,d){this.subscriptions[c.join("__")]=d}});Ext.define("Docs.LocalStore",{storeName:"",init:function(){this.localStorage=!!window.localStorage;this.store=Ext.create(this.storeName);if(this.localStorage){this.cleanup();this.store.load();if(window.addEventListener){window.addEventListener("storage",Ext.Function.bind(this.onStorageChange,this),false)}else{window.attachEvent("onstorage",Ext.Function.bind(this.onStorageChange,this))}}},onStorageChange:function(b){b=b||window.event;if(b.key===this.store.getProxy().id){this.store.load()}},syncStore:function(){this.localStorage&&this.store.sync()},cleanup:function(){var f=/-settings/;for(var d=0;d<window.localStorage.length;d++){var e=window.localStorage.key(d);if(!f.test(e)){window.localStorage.removeItem(e)}}}});Ext.define("Docs.view.Header",{extend:"Ext.container.Container",alias:"widget.docheader",contentEl:"header-content",initComponent:function(){if(Docs.otherProducts){this.style="cursor: pointer;",this.cls="dropdown";this.menu=Ext.create("Ext.menu.Menu",{renderTo:Ext.getBody(),plain:true,items:Docs.otherProducts})}this.callParent()},listeners:{afterrender:function(b){if(this.menu){b.el.addListener("click",function(d,a){this.menu.showBy(this.el,"bl",[120,0])},this)}}}});Ext.define("Docs.view.examples.Container",{extend:"Ext.panel.Panel",alias:"widget.examplecontainer",layout:"fit",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['<div class="cls-grouping example-toolbar">',"<div>",'<button class="new-window">Open in new window</button>',"</div>","</div>"].join("")}];this.tpl=new Ext.XTemplate('<iframe style="width: 100%; height: 100%; border: 0;" src="{url}"></iframe>');this.callParent(arguments)},load:function(b){this.update(this.tpl.apply(b))},clear:function(){this.update("")}});Ext.define("Docs.controller.Content",{extend:"Ext.app.Controller",MIDDLE:1,title:"",loadIndex:function(b){b||Docs.History.push(this.baseUrl);this.getViewport().setPageTitle(this.title);Ext.getCmp("doctabs").activateTab(this.baseUrl);Ext.getCmp("card-panel").layout.setActiveItem(this.getIndex());this.getIndex().restoreScrollState()},opensNewWindow:function(b){return b.button===this.MIDDLE||b.shiftKey||b.ctrlKey},getBaseUrl:function(){return document.location.href.replace(/\/?(index.html|template.html)?(\?[^#]*)?#.*/,"")}});Ext.define("Docs.Syntax",{singleton:true,highlight:function(b){Ext.Array.forEach(Ext.query("pre",b.dom||b),function(a){a=Ext.get(a);if(a.child("code")){if(!(a.hasCls("inline-example")&&a.hasCls("preview"))){a.addCls("prettyprint")}}else{if(!a.parent(".CodeMirror")&&!a.hasCls("hierarchy")){a.addCls("notpretty")}}});prettyPrint()}});Ext.define("Docs.ClassRegistry",{singleton:true,canonicalName:function(b){if(!this.altNames){this.altNames={};Ext.each(Docs.data.search,function(a){if(a.type==="class"&&!/:/.test(a.cls)){this.altNames[a.cls]=a.id}},this)}return this.altNames[b]||b},shortName:function(b){return b.split(/\./).pop()},packageName:function(b){return b.slice(0,-this.shortName(b).length-1)||""},search:function(S,H){var J=5;var T=4;var X=3;var K=new Array(J*T*X);for(var E=0;E<K.length;E++){K[E]=[]}var O=J*T*0;var Z=J*T*1;var R=J*T*2;var U=J*0;var L=J*1;var W=J*2;var F=J*3;if(H){var P=4;for(var E=0;E<H.length;E++){var i=H[E];if(i.score>5){K[P+U+O].push(i)}else{if(i.score>1){K[P+U+Z].push(i)}else{K[P+U+R].push(i)}}}}var M=/[.:]/.test(S);var G=Ext.escapeRe(S);var g=new RegExp("^"+G+"$","i");var Y=new RegExp("^"+G,"i");var N=new RegExp(G,"i");var V=Docs.data.search;for(var E=0,r=V.length;E<r;E++){var Q=V[E];var I=M?Q.fullName:Q.name;var D=Q.meta.removed?F:(Q.meta["private"]?W:(Q.meta.deprecated?L:U));if(g.test(I)){K[Q.sort+D+O].push(this.highlightMatch(Q,g))}else{if(Y.test(I)){K[Q.sort+D+Z].push(this.highlightMatch(Q,Y))}else{if(N.test(I)){K[Q.sort+D+R].push(this.highlightMatch(Q,N))}}}}return Ext.Array.flatten(K)},highlightMatch:function(c,d){c=Ext.apply({},c);c.name=c.name.replace(d,"<strong>$&</strong>");c.fullName=c.fullName.replace(d,"<strong>$&</strong>");return c}});Ext.define("Docs.GuideSearch",{singleton:true,isEnabled:function(){return !!Docs.data.guideSearch.url},deferredSearch:function(f,h,j,g){clearTimeout(this.timeout);var i=this.timeout=Ext.Function.defer(function(){this.search(f,function(a){if(i===this.timeout){h.call(j,a)}},this)},g,this)},search:function(f,g,e){var h=this.currentRequest=Ext.data.JsonP.request({url:Docs.data.guideSearch.url,params:{fragsize:32,max_fragments:1,q:f,product:Docs.data.guideSearch.product,version:Docs.data.guideSearch.version,start:0,limit:100},callback:function(a,b){if(a&&b.success&&this.currentRequest===h){g.call(e,Ext.Array.map(b.docs,this.adaptJson,this))}},scope:this})},adaptJson:function(b){return{icon:"icon-guide",name:this.format(b.title),fullName:this.format(b.body),url:b.url,meta:{},score:b.score}},format:function(c){var d=c.replace(/\s+/g," ");return d.replace(/<em class="match">(.*?)<\/em>/g,"<strong>$1</strong>")}});Ext.define("Docs.store.Search",{extend:"Ext.data.Store",fields:["name","fullName","icon","url","meta","sort"],proxy:{type:"memory",reader:{type:"json"}}});Ext.define("Docs.model.Setting",{fields:["id","key","value"],extend:"Ext.data.Model",requires:["Ext.data.proxy.LocalStorage"],proxy:{type:window.localStorage?"localstorage":"memory",id:Docs.data.localStorageDb+"-settings"}});Ext.define("Docs.view.TabMenu",{extend:"Ext.menu.Menu",plain:true,componentCls:"tab-menu",initComponent:function(){this.addEvents("tabItemClick","closeAllTabs");this.items=[{text:"Close other tabs",iconCls:"close",cls:"close-all",handler:function(){this.fireEvent("closeAllTabs")},scope:this}];this.callParent()},addTab:function(c,d){this.insert(this.items.length-1,{text:c.text,iconCls:c.iconCls,origIcon:c.iconCls,href:c.href,cls:d,handler:this.onTabItemClick,scope:this})},onTabItemClick:function(b){this.fireEvent("tabItemClick",b)},addTabCls:function(c,d){this.items.each(function(a){if(a.href===c.href){a.addCls(d)}})}});Ext.define("Docs.view.Scrolling",{onClassMixedIn:function(b){Ext.Function.interceptBefore(b.prototype,"initComponent",this.prototype.initScrolling)},initScrolling:function(){this.scrollContext="index";this.scrollState={};this.on("afterrender",function(){this.getScrollEl().addListener("scroll",this.saveScrollState,this)},this)},setScrollContext:function(b){this.scrollContext=b},eraseScrollContext:function(b){delete this.scrollState[b]},saveScrollState:function(){this.scrollState[this.scrollContext]=this.getScrollTop()},restoreScrollState:function(){this.setScrollTop(this.scrollState[this.scrollContext]||0)},scrollToView:function(d,c){d=Ext.get(d);c=c||{};if(d){this.setScrollTop(this.getScrollTop()+d.getY()+(c.offset||0));this.setScrollLeft(0);c.highlight&&d.highlight()}},getScrollTop:function(){return this.getScrollEl().getScroll()["top"]},setScrollTop:function(b){return this.getScrollEl().scrollTo("top",b)},setScrollLeft:function(b){return this.getScrollEl().scrollTo("left",b)},scrollToTop:function(){this.getScrollEl().scrollTo("top")},getScrollEl:function(){return this.body||this.el}});Ext.define("Docs.ContentGrabber",{singleton:true,get:function(f){var e;var d=Ext.get(f);if(d){e=d.dom.innerHTML;d.remove()}return e}});Ext.define("Docs.view.comments.HeaderMenu",{extend:"Ext.container.Container",alias:"widget.commentsHeaderMenu",componentCls:"comments-header-menu",html:["<h1>",' <a href="#" class="users selected">Users</a>',' <a href="#" class="targets">Topics</a>',' <a href="#" class="tags">Tags</a>',"</h1>"].join(""),afterRender:function(){this.callParent(arguments);Ext.Array.forEach(["users","targets","tags"],function(d){var c=this.getEl().down("a."+d);c.on("click",function(b,a){this.getEl().select("a",true).removeCls("selected");c.addCls("selected");this.fireEvent("select",d)},this,{preventDefault:true})},this)}});Ext.define("Docs.view.examples.Device",{config:{url:"",id:undefined,device:"phone",orientation:"landscape"},constructor:function(b){this.initConfig(b);Ext.apply(this,this.getIframeSize());this.id=this.id||Ext.id();this.tpl=new Ext.XTemplate('<div class="touchExample {device} {orientation}">','<iframe id={id} style="width: {width}; height: {height}; border: 0;" ','src="{[this.deviceUrl(values)]}"></iframe>',"</div>",{deviceUrl:function(a){return a.url+"?deviceType="+(a.device==="tablet"?"Tablet":"Phone")}})},toHtml:function(){return this.tpl.apply(this)},setDevice:function(b){this.device=b;Ext.apply(this,this.getIframeSize())},setOrientation:function(b){this.orientation=b;Ext.apply(this,this.getIframeSize())},getIframeSize:function(){var b={phone:{width:"481px",height:"320px"},miniphone:{width:"320px",height:"219px"},tablet:{width:"717px",height:"538px"}}[this.device];if(this.orientation==="landscape"){return b}else{return{width:b.height,height:b.width}}}});Ext.define("Docs.model.Test",{extend:"Ext.data.Model",fields:["id","name","href","code","options",{name:"status",defaultValue:"ready"},"message"]});Ext.define("Docs.view.examples.InlineToolbar",{extend:"Ext.toolbar.Toolbar",componentCls:"inline-example-tb",height:30,initComponent:function(){this.addEvents("buttonclick");this.items=[{iconCls:"code",padding:"0 2 0 0",margin:"0 3 0 0",text:"Code Editor",handler:this.createEventFirerer("code")},{padding:0,margin:"0 3 0 0",iconCls:"preview",text:"Live Preview",handler:this.createEventFirerer("preview")},"->",{padding:0,margin:0,iconCls:"copy",text:"Select Code",handler:this.createEventFirerer("copy")}];this.callParent(arguments)},createEventFirerer:function(b){return Ext.Function.bind(function(){this.fireEvent("buttonclick",b)},this)},activateButton:function(b){Ext.Array.each(this.query("button"),function(a){a.removeCls("active")});Ext.Array.each(this.query("button[iconCls="+b+"]"),function(a){a.addCls("active")})}});Ext.define("Docs.view.Signature",{singleton:true,render:function(f,d){d=d||"short";var e=Ext.Array.map(Docs.data.signatures,function(a){return f[a.tagname]?'<span class="'+a.tagname+'">'+(a[d])+"</span>":""}).join(" ");return'<span class="signature">'+e+"</span>"}});Ext.define("Docs.view.DocTree",{extend:"Ext.tree.Panel",alias:"widget.doctree",cls:"doc-tree iScroll",useArrows:true,rootVisible:false,border:false,bodyBorder:false,initComponent:function(){this.addEvents("urlclick");this.root.expanded=true;this.on("itemclick",this.onItemClick,this);this.on("beforeitemcollapse",this.handleBeforeExpandCollapse,this);this.on("beforeitemexpand",this.handleBeforeExpandCollapse,this);this.callParent();this.nodeTpl=new Ext.XTemplate('<a href="{url}" rel="{url}">{text}</a>');this.initNodeLinks()},initNodeLinks:function(){this.getRootNode().cascadeBy(this.applyNodeTpl,this)},applyNodeTpl:function(b){if(b.get("leaf")){b.set("text",this.nodeTpl.apply({text:b.get("text"),url:b.raw.url}));b.commit()}},onItemClick:function(h,j,k,l,i){var e=j.raw?j.raw.url:j.data.url;if(e){this.fireEvent("urlclick",e,i)}else{if(!j.isLeaf()){if(j.isExpanded()){j.collapse(false)}else{j.expand(false)}}}},selectUrl:function(d){var c=this.findNodeByUrl(d);if(c){c.bubble(function(a){a.expand()});this.getSelectionModel().select(c)}else{this.getSelectionModel().deselectAll()}},findNodeByUrl:function(b){return this.getRootNode().findChildBy(function(a){return b===a.raw.url},this,true)},findRecordByUrl:function(d){var c=this.findNodeByUrl(d);return c?c.raw:undefined},handleBeforeExpandCollapse:function(b){if(this.getView().isAnimating(b)){return false}}});Ext.define("Docs.Tip",{singleton:true,show:function(g,e,f){f=f||"right";this.tips=this.tips||{};if(this.tips[f]){var h=this.tips[f];h.update(g);h.setTarget(e);h.show()}else{var h=this.tips[f]=Ext.create("Ext.tip.ToolTip",{anchor:f,target:e,html:g});h.show()}}});Ext.define("Docs.view.comments.Pager",{extend:"Ext.Component",alias:"widget.commentsPager",componentCls:"recent-comments-pager",afterRender:function(){this.callParent(arguments);this.getEl().on("click",function(){this.fireEvent("loadMore",this.offset+this.limit)},this,{preventDefault:true,delegate:"a.fetchMoreComments"})},configure:function(b){Ext.apply(this,b);this.update(this.getPagerHtml())},reset:function(){this.update("<span></span>No comments found.")},getPagerHtml:function(){var d=this.total_rows||0;var e=this.offset+this.limit;var f=Math.min(this.limit,d-e);if(d>e){return["<span></span>",'<a href="#" class="fetchMoreComments" rel="'+e+'">',"Showing comments 1-"+e+" of "+d+". ","Click to load "+f+" more...","</a>"].join("")}else{return"<span></span>That's all. Total "+d+" comments."}}});Ext.define("Docs.view.SimpleSelectBehavior",{mixins:{observable:"Ext.util.Observable"},constructor:function(c,d){this.mixins.observable.constructor.call(this,{listeners:d});c.on({select:this.onSelect,deselect:this.onDeselect,scope:this})},onSelect:function(c,d){this.selectedItem=d;this.fireEvent("select",d)},onDeselect:function(c,d){this.selectedItem=undefined;Ext.Function.defer(function(){if(!this.selectedItem){this.fireEvent("deselect",d)}},10,this)}});Ext.define("Docs.view.comments.FilterField",{extend:"Ext.form.field.Trigger",alias:"widget.commentsFilterField",triggerCls:"reset",componentCls:"comments-filter-field",hideTrigger:true,enableKeyEvents:true,initComponent:function(){this.callParent(arguments);this.on({keyup:this.onKeyUp,specialkey:this.onSpecialKey,scope:this})},onKeyUp:function(){this.fireEvent("filter",this.getValue());this.setHideTrigger(this.getValue().length===0)},onSpecialKey:function(c,d){if(d.keyCode===Ext.EventObject.ESC){this.reset();this.fireEvent("filter","")}},onTriggerClick:function(){this.reset();this.focus();this.fireEvent("filter","");this.setHideTrigger(true)}});Ext.define("Docs.view.comments.TopList",{extend:"Ext.panel.Panel",componentCls:"comments-toplist",requires:["Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",displayField:"text",scoreField:"score",filterEmptyText:"Filter by name...",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"By comment count"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:this.filterEmptyText,width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}]}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll top-list",autoScroll:true,store:new Ext.data.Store({model:this.model}),allowDeselect:true,tpl:["<ul>",'<tpl for=".">',"<li>",'<span class="score">{'+this.scoreField+"}</span>",'<span class="text">{'+this.displayField+"}</span>","</li>","</tpl>","</ul>"],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.list.getStore().load()},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:this.displayField,value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.fireEvent("select",b)},onDeselect:function(){this.fireEvent("select",undefined)}});Ext.define("Docs.view.cls.MemberWrap",{constructor:function(b){Ext.apply(this,b);this.el=Ext.get(b.el)},setExpanded:function(b){if(b){if(!this.isExpanded()){this.el.addCls("open")}}else{this.el.removeCls("open")}},isExpanded:function(){return this.el.hasCls("open")},getDefinedIn:function(){return this.el.down(".meta .defined-in").getAttribute("rel")},getMemberId:function(){return this.el.getAttribute("id")}});Ext.define("Docs.view.examples.InlineEditor",{extend:"Ext.Panel",bodyPadding:2,autoScroll:true,componentCls:"inline-example-editor",initComponent:function(){this.addEvents("init","change");this.on("afterlayout",this.initCodeMirror,this);this.callParent(arguments)},initCodeMirror:function(b){if(!this.codemirror){this.codemirror=CodeMirror(this.body,{mode:"javascript",indentUnit:4,value:this.value,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onChange:Ext.Function.bind(function(a){this.fireEvent("change")},this)});this.fireEvent("init")}},refresh:function(){this.codemirror.refresh()},getValue:function(){return this.codemirror?this.codemirror.getValue():this.value},getHeight:function(){var b=this.el.down(".CodeMirror-lines");return b?b.getHeight():undefined},selectAll:function(){var d=this.codemirror.lineCount()-1;var c=this.codemirror.getLine(d).length;this.codemirror.setSelection({line:0,ch:0},{line:d,ch:c})}});Ext.define("Docs.view.examples.InlinePreview",{extend:"Ext.Panel",requires:["Docs.view.examples.Device"],bodyPadding:"0 10",statics:{iframeCounter:0,getNextIframeId:function(){this.iframeCounter++;return this.iframeCounter.toString()}},options:{},constructor:function(b){b=b||{};b.iframeId=this.self.getNextIframeId();b.id="inline-preview-"+b.iframeId;this.callParent([b]);this.addEvents(["previewsuccess","previewfailure"])},initComponent:function(){this.html=this.getHtml();this.callParent(arguments)},getHtml:function(){if(Docs.data.touchExamplesUi){return Ext.create("Docs.view.examples.Device",{url:"eg-iframe.html",id:this.iframeId,device:this.options.device,orientation:this.options.orientation}).toHtml()}else{var b=new Ext.XTemplate('<iframe id="{id}" style="width: 100%; height: 100%; border: 0" frameBorder="0"></iframe>');return b.apply({id:this.iframeId})}},update:function(h){var f=this.options;var e=Ext.get(this.iframeId);var g=Ext.Function.bind(this.iframeCallback,this);if(e){e.on("load",function(){Ext.Function.defer(function(){e.dom.contentWindow.loadInlineExample(h+"\n",f,g)},100)},this,{single:true});e.dom.src="eg-iframe.html"}},iframeCallback:function(c,d){if(c){this.fireEvent("previewsuccess",this)}else{this.fireEvent("previewfailure",this,d)}},getHeight:function(){return document.getElementById(this.iframeId).parentNode.clientHeight}});Ext.define("Docs.view.cls.Logic",{showPrivateClasses:false,constructor:function(b){Ext.apply(this,b)}});Ext.define("Docs.view.comments.Form",{extend:"Ext.Component",alias:"widget.commentsForm",requires:["Docs.Tip"],tpl:['<form class="commentForm <tpl if="!updateComment">newComment</tpl>">','<tpl if="title">',"<p>{title}</p>","</tpl>","<textarea>{content}</textarea>",'<div class="com-meta">',"{[Docs.Comments.avatar(values.user.emailHash)]}",'<div class="form-author">Logged in as {user.userName}</div>','<tpl if="!updateComment">','<label class="subscribe">','Email updates? <input type="checkbox" class="subscriptionCheckbox" <tpl if="userSubscribed">checked="checked"</tpl> />','<span class="sep"> | </span>',"</label>","</tpl>",'<a href="#" class="toggleCommentGuide">Show help &#8595;</a>','<input type="submit" class="sub submitComment" value="{[values.updateComment ? "Update" : "Post"]} comment" />','<tpl if="updateComment">',' or <a href="#" class="cancelUpdateComment">cancel</a>',"</tpl>","</div>",'<div class="commentGuideTxt" style="display: none;">',"<ul>",'<li>Use <strong><a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown</a></strong>'," for formatting:</li>","</ul>",'<div class="markdown preview">',"<h4>Markdown</h4>","<pre>","**Bold**, _italic_\n","and `monospaced font`.\n","\n"," Indent with 4 spaces\n"," for a code block.\n","\n","1. numbered lists\n","2. are cool\n","\n","- bulleted lists\n","- make your point\n","\n","[External link](http//example.com)\n","\n","Leave a blank line\n","between paragraphs.\n","</pre>","</div>",'<div class="markdown result">',"<h4>Result</h4>","<strong>Bold</strong>, <em>italic</em> and<br/>","<code>monospaced font</code>.<br/>",'<pre class="prettyprint">',"Indent with 4 spaces\n","for a code block.","</pre>","<ol>","<li>numbered lists</li>","<li>are cool</li>","</ol>","<ul>","<li>bulleted lists</li>","<li>make your point</li>","</ul>",'<a href="http://example.com">External link</a><br/>',"<br/>","Leave a blank line between paragraphs.<br/><br/>","</div>","<ul>","<li>Use comments to:","<ul>","<li>Inform us about <strong>bugs in documentation.</strong></li>","<li>Give <strong>useful tips</strong> to other developers.</li>","<li><strong>Warn about bugs</strong> and problems that might bite.</li>","</ul>","</li>","<li>Don't post comments for:","<ul>","<li><strong>Questions about code or usage</strong>",' - use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a>.</li>',"<li><strong>SDK bugs</strong>",' - use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a>.</li>',"<li><strong>Docs App bugs</strong>",' - use the <a href="https://github.com/senchalabs/jsduck/issues" target="_blank">GitHub Issue tracker</a>.</li>',"</ul></li>","<li>Comments may be edited or deleted at any time by a moderator.</li>",'<li>Avatars can be managed at <a href="http://www.gravatar.com" target="_blank">Gravatar</a> (use your forum email address).</li>',"<li>To write a reply use <strong><code>@username</code></strong> syntax &ndash; the user will get notified.</li>","</ul>","</div>","</form>"],initComponent:function(){this.data={title:this.title,updateComment:(this.content!==undefined),content:this.content,userSubscribed:this.userSubscribed,user:this.user};this.callParent(arguments)},setValue:function(b){this.codeMirror.setValue(b)},afterRender:function(){this.callParent(arguments);this.makeCodeMirror(this.getEl().down("textarea").dom);this.bindEvents()},makeCodeMirror:function(d){var c=true;this.codeMirror=CodeMirror.fromTextArea(d,{mode:"markdown",lineWrapping:true,indentUnit:4,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onFocus:Ext.Function.bind(function(){if(c&&this.codeMirror.getValue()===""){this.toggleGuide(true)}c=false},this)})},bindEvents:function(){this.getEl().on("click",function(){this.toggleGuide()},this,{preventDefault:true,delegate:"a.toggleCommentGuide"});this.getEl().on("click",function(){this.fireEvent("cancel")},this,{preventDefault:true,delegate:"a.cancelUpdateComment"});this.getEl().on("click",function(){this.fireEvent("submit",this.codeMirror.getValue())},this,{preventDefault:true,delegate:"input.submitComment"});this.getEl().on("click",function(c,d){this.fireEvent("subscriptionChange",Ext.get(d).dom.checked)},this,{delegate:"input.subscriptionCheckbox"})},toggleGuide:function(f){var d=this.getEl().down(".commentGuideTxt");d.setVisibilityMode(Ext.dom.Element.DISPLAY);var e=this.getEl().down(".toggleCommentGuide");if(!d.isVisible()||f===true){d.show(true);e.update("Hide help &#8593;")}else{d.hide(true);e.update("Show help &#8595;")}},showSubscriptionMessage:function(d){var e=this.getEl().down("input.subscriptionCheckbox");var f=d?"Updates to this thread will be e-mailed to you":"You have unsubscribed from this thread";Docs.Tip.show(f,e,"bottom")}});Ext.define("Docs.view.comments.DragZone",{extend:"Ext.dd.DragZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getDragData:function(f){var d=f.getTarget("img.drag-handle",10);if(d){var e=Ext.fly(d).up(this.view.itemSelector).dom;return{sourceEl:e,repairXY:Ext.fly(e).getXY(),ddel:this.cloneCommentEl(e),comment:this.view.getRecord(e)}}return false},cloneCommentEl:function(e){var f=e.cloneNode(true);var d=Ext.fly(f).down(".comments-list-with-form");d&&d.remove();f.id=Ext.id();return f},getRepairXY:function(){return this.dragData.repairXY}});Ext.define("Docs.view.comments.DropZone",{extend:"Ext.dd.DropZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getTargetFromEvent:function(b){return b.getTarget(this.view.itemSelector,10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(g,e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(g,e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(d,e){var f=this.view.getRecord(d);return f&&f.get("id")!==e.comment.get("id")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(g,e)){this.onValidDrop(e.comment,this.view.getRecord(g));return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.view.comments.TopLevelDropZone",{extend:"Ext.dd.DropZone",getTargetFromEvent:function(b){return b.getTarget("a.side.toggleComments",10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(b){return !!b.comment.get("parentId")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(e)){this.onValidDrop(e.comment,undefined);return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.Comments",{extend:"Ext.util.Observable",singleton:true,requires:["Docs.Auth","Docs.CommentCounts","Docs.CommentSubscriptions","Ext.data.JsonP","Ext.Ajax"],init:function(c,d){if(!(Docs.data.commentsUrl&&Docs.data.commentsDomain&&this.isBrowserSupported())){c.call(d);return}Docs.Auth.init(function(a){if(a){this.enabled=true;this.fetchCountsAndSubscriptions(function(f,b){this.counts=new Docs.CommentCounts(f);this.subscriptions=new Docs.CommentSubscriptions(b);c.call(d)},this)}else{c.call(d)}},this)},isBrowserSupported:function(){return("withCredentials" in new XMLHttpRequest())||(Ext.ieVersion>=8)},fetchCountsAndSubscriptions:function(c,d){this.request("jsonp",{url:"/comments_meta",method:"GET",success:function(a){c.call(d,a.comments,a.subscriptions)},scope:this})},loadSubscriptions:function(c,d){this.fetchSubscriptions(function(a){this.subscriptions=new Docs.CommentSubscriptions(a);c.call(d)},this)},clearSubscriptions:function(){this.subscriptions=new Docs.CommentSubscriptions([])},fetchSubscriptions:function(c,d){this.request("jsonp",{url:"/subscriptions",method:"GET",success:function(a){c.call(d,a.subscriptions)},scope:this})},isEnabled:function(){return this.enabled},getCount:function(b){return this.enabled?this.counts.get(b):0},changeCount:function(f,e){var d=this.counts.change(f,e);this.fireEvent("countChange",f,d)},hasSubscription:function(b){return this.subscriptions.has(b)},getClassTotalCount:function(b){return this.counts.getClassTotal(b)},load:function(d,f,e){this.request("jsonp",{url:"/comments",method:"GET",params:{startkey:Ext.JSON.encode(d)},success:f,scope:e})},loadReplies:function(f,d,e){this.request("jsonp",{url:"/replies",method:"GET",params:{parentId:f},success:d,scope:e})},post:function(b){this.request("ajax",{url:"/comments",method:"POST",params:{target:Ext.JSON.encode(b.target),parentId:b.parentId,comment:b.content,url:this.buildPostUrl(b.target)},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){this.changeCount(b.target,+1);b.callback&&b.callback.call(b.scope,g.comment)}},scope:this})},buildPostUrl:function(i){var f=i[0];var g=i[1];var h=i[2];if(f=="video"){var j="#!/video/"+g}else{if(f=="guide"){var j="#!/guide/"+g}else{var j="#!/api/"+g+(h?"-"+h:"")}}return"http://"+window.location.host+window.location.pathname+j},subscribe:function(h,e,g,f){this.request("ajax",{url:"/subscribe",method:"POST",params:{target:Ext.JSON.encode(h),subscribed:e},callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(a&&b.success){this.subscriptions.set(h,e);g&&g.call(f)}},scope:this})},request:function(c,d){d.url=this.buildRequestUrl(d.url);if(c==="jsonp"){Ext.data.JsonP.request(d)}else{d.cors=true;Ext.Ajax.request(d)}},buildRequestUrl:function(b){b=Docs.data.commentsUrl+"/"+Docs.data.commentsDomain+b;return b+(b.match(/\?/)?"&":"?")+"sid="+Docs.Auth.getSid()},avatar:function(c,d){return'<img class="avatar '+(d||"")+'" width="25" height="25" src="http://www.gravatar.com/avatar/'+c+'?s=25&amp;r=PG&amp;d=identicon">'},counterHtml:function(b){return b>0?'<span class="comment-counter-small">'+b+"</span>":""}});Ext.define("Docs.controller.Auth",{extend:"Ext.app.Controller",requires:["Docs.Auth","Docs.Comments"],refs:[{ref:"authHeaderForm",selector:"authHeaderForm"}],init:function(){this.control({"authHeaderForm, authForm":{login:this.login,logout:this.logout}});var b=this.getController("Tabs");b.onLaunch=Ext.Function.createSequence(b.onLaunch,this.afterTabsLaunch,this)},afterTabsLaunch:function(){if(Docs.Comments.isEnabled()){if(Docs.Auth.isLoggedIn()){this.setLoggedIn()}else{this.setLoggedOut()}}},login:function(e,g,f,h){Docs.Auth.login({username:g,password:f,remember:h,success:this.setLoggedIn,failure:function(a){e.showMessage(a)},scope:this})},logout:function(b){Docs.Auth.logout(this.setLoggedOut,this)},setLoggedIn:function(){Docs.Comments.loadSubscriptions(function(){this.getAuthHeaderForm().showLoggedIn(Docs.Auth.getUser());this.eachCmp("commentsListWithForm",function(b){b.showCommentingForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").showCommentsTab()},this)},setLoggedOut:function(){Docs.Comments.clearSubscriptions();this.getAuthHeaderForm().showLoggedOut();this.eachCmp("commentsListWithForm",function(b){b.showAuthForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").hideCommentsTab()},eachCmp:function(e,f,d){Ext.Array.forEach(Ext.ComponentQuery.query(e),f,d)}});Ext.define("Docs.controller.Welcome",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#welcomeindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Failure",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#failure"}],show404:function(c){var d=new Ext.XTemplate("<h1>Oops...</h1>","<p>{msg}</p>","<p>Maybe it was renamed to something else?<br> Or maybe your internet connection has failed?<br> ","This would be sad. Hopefully it's just a bug on our side.</p>","<p>Most likely you just followed a broken link inside this very documentation. ","Go and report it to the authors of the docs.</p>","<p>But if you think it's a bug in JSDuck documentation-generator itself, feel free to open ","an issue at the <a href='https://github.com/senchalabs/jsduck/issues'>JSDuck issue tracker</a>.</p>","<p>Sorry for all this :(</p>");Ext.getCmp("failure").update(d.apply({msg:c}));Ext.getCmp("card-panel").layout.setActiveItem("failure")}});Ext.define("Docs.controller.Classes",{extend:"Docs.controller.Content",baseUrl:"#!/api",title:"API Documentation",requires:["Docs.History","Docs.Syntax","Docs.ClassRegistry"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#classindex"},{ref:"header",selector:"classheader"},{ref:"overview",selector:"classoverview"},{ref:"tabPanel",selector:"classtabpanel"},{ref:"tree",selector:"#classtree"},{ref:"favoritesGrid",selector:"#favorites-grid"}],cache:{},init:function(){this.addEvents("showIndex","showClass","showMember");Ext.getBody().addListener("click",function(c,d){this.handleUrlClick(decodeURI(d.href),c)},this,{preventDefault:true,delegate:".docClass"});this.control({classtree:{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},toolbar:{toggleExpanded:function(b){this.getOverview().setAllMembersExpanded(b)}},classoverview:{afterrender:function(b){b.el.addListener("click",function(i,k){var h=Ext.get(k).up(".member"),l=h.down(".meta .defined-in"),j=l.getAttribute("rel"),a=h.getAttribute("id");if(this.getOverview().isMemberExpanded(a)){this.setExpanded(a,false)}else{this.setExpanded(a,true);this.fireEvent("showMember",j,a)}},this,{preventDefault:true,delegate:".expandable"});b.el.addListener("click",Ext.emptyFn,this,{preventDefault:true,delegate:".not-expandable"})}},treecontainer:{afterrender:function(b){b.el.addListener("dblclick",function(){if(b.getWidth()<30){b.setWidth(b.expandedWidth)}else{b.expandedWidth=b.getWidth();b.setWidth(20)}},this,{delegate:".x-resizable-handle"})}},doctabs:{tabClose:function(b){this.getOverview().eraseScrollContext(b)}}})},setExpanded:function(f,d){var e=this.currentCls;if(!e.expanded){e.expanded={}}this.getOverview().setMemberExpanded(f,d);if(d){e.expanded[f]=d}else{delete e.expanded[f]}},applyExpanded:function(b){Ext.Object.each(b.expanded||{},function(a){Ext.get(a).addCls("open")},this)},handleUrlClick:function(d,f,e){d=Docs.History.cleanUrl(d);if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.currentCls?"#!/api/"+this.currentCls.name:"")}else{this.loadClass(d)}},loadIndex:function(b){Ext.getCmp("treecontainer").showTree("classtree");this.callParent(arguments);this.fireEvent("showIndex")},loadClass:function(f,i){Ext.getCmp("card-panel").layout.setActiveItem("classcontainer");Ext.getCmp("treecontainer").showTree("classtree");i||Docs.History.push(f);var j=f.match(/^#!\/api\/(.*?)(?:-(.*))?$/);var g=Docs.ClassRegistry.canonicalName(j[1]);var h=j[2];if(this.getOverview()){this.getOverview().setLoading(true)}if(this.cache[g]){this.showClass(this.cache[g],h)}else{this.cache[g]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/output/"+g+".js",callbackName:g.replace(/\./g,"_"),success:function(b,a){this.cache[g]=b;this.showClass(b,h)},failure:function(b,a){this.cache[g]=false;this.getOverview().setLoading(false);this.getController("Failure").show404("Class <b>"+Ext.String.htmlEncode(g)+"</b> was not found.")},scope:this})}},showClass:function(e,f){var d=false;if(e==="in-progress"){return}this.getOverview().setLoading(false);this.getViewport().setPageTitle(e.name);if(this.currentCls!==e){this.currentCls=e;this.getHeader().load(e);this.getOverview().load(e);this.applyExpanded(e);d=true}this.currentCls=e;this.getOverview().setScrollContext("#!/api/"+e.name);if(f){this.getOverview().scrollToEl("#"+f);this.fireEvent("showMember",e.name,f)}else{this.getOverview().restoreScrollState()}this.getTree().selectUrl("#!/api/"+e.name);this.fireEvent("showClass",e.name,{reRendered:d})}});Ext.define("Docs.controller.Search",{extend:"Ext.app.Controller",requires:["Docs.ClassRegistry","Docs.GuideSearch","Docs.store.Search","Docs.History"],stores:["Search"],refs:[{ref:"field",selector:"#search-field"}],pageIndex:0,pageSize:10,basicSearchDelay:50,guideSearchDelay:500,dropdownHideDelay:500,init:function(){this.control({"#search-dropdown":{itemclick:function(c,d){this.loadRecord(d)},changePage:function(c,d){this.pageIndex+=d;this.displayResults();this.keepDropdown()},footerClick:function(b){this.keepDropdown()}},"#search-field":{keyup:function(m,l){var j=this.getDropdown();m.setHideTrigger(m.getValue().length===0);if(l.keyCode===Ext.EventObject.ESC||!m.value){j.hide();m.setValue("");return}else{j.show()}var h=j.getSelectionModel();var i=h.getLastSelected();var n=j.store.indexOf(i);var k=j.store.getCount()-1;if(l.keyCode===Ext.EventObject.UP){if(n===undefined){h.select(0)}else{h.select(n===0?k:(n-1))}}else{if(l.keyCode===Ext.EventObject.DOWN){if(n===undefined){h.select(0)}else{h.select(n===k?0:n+1)}}else{if(l.keyCode===Ext.EventObject.ENTER){l.preventDefault();i&&this.loadRecord(i)}else{this.pageIndex=0;clearTimeout(this.searchTimeout);this.searchTimeout=Ext.Function.defer(function(){this.search(m.value)},this.basicSearchDelay,this)}}}},focus:function(b){if(b.value&&this.getDropdown().store.getCount()>0){this.getDropdown().show()}},blur:function(){var b=this.getDropdown();this.hideTimeout=Ext.Function.defer(b.hide,this.dropdownHideDelay,b)}}})},getDropdown:function(){return this.dropdown||(this.dropdown=Ext.getCmp("search-dropdown"))},keepDropdown:function(){clearTimeout(this.hideTimeout);this.getField().focus()},loadRecord:function(b){Docs.History.navigate(b.get("url"));this.getDropdown().hide()},search:function(b){if(b===this.previousTerm){return}this.previousTerm=b;this.basicSearch(b);if(Docs.GuideSearch.isEnabled()){this.guideSearch(b)}},guideSearch:function(b){Docs.GuideSearch.deferredSearch(b,function(a){this.basicSearch(b,a)},this,this.guideSearchDelay)},basicSearch:function(c,d){this.displayResults(Docs.ClassRegistry.search(c,d))},displayResults:function(d){d=d||this.previousResults;if(this.pageIndex<0){this.pageIndex=0}else{if(this.pageIndex>Math.floor(d.length/this.pageSize)){this.pageIndex=Math.floor(d.length/this.pageSize)}}var f=this.pageIndex*this.pageSize;var e=f+this.pageSize;this.getDropdown().setTotal(d.length);this.getDropdown().setStart(f);this.getDropdown().getStore().loadData(d.slice(f,e));this.getDropdown().alignTo("search-field","bl",[-12,-2]);if(d.length>0){this.getDropdown().getSelectionModel().select(0)}this.previousResults=d}});Ext.define("Docs.controller.Examples",{extend:"Docs.controller.Content",baseUrl:"#!/example",title:"Examples",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#exampleindex"},{ref:"tree",selector:"#exampletree"},{ref:"page",selector:"#example"}],init:function(){this.addEvents("showExample");this.control({"#exampletree":{urlclick:function(d,c){this.loadExample(d)}},"exampleindex > thumblist":{urlclick:function(b){this.loadExample(b)}},"touchexamplecontainer, examplecontainer":{afterrender:function(b){b.el.addListener("click",function(d,a){this.openInNewWindow()},this,{delegate:"button.new-window"})}},touchexamplecontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.changeDevice("tablet")},this,{delegate:"button.tablet"});b.el.addListener("click",function(d,a){this.changeDevice("phone")},this,{delegate:"button.phone"});b.el.addListener("click",function(d,a){this.changeOrientation("portrait")},this,{delegate:"button.portrait"});b.el.addListener("click",function(d,a){this.changeOrientation("landscape")},this,{delegate:"button.landscape"})}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("exampletree");this.callParent()},loadExample:function(d,f){var e=this.getExample(d);if(!e){this.getController("Failure").show404("Example <b>"+Ext.String.htmlEncode(d)+"</b> was not found.");return}this.getViewport().setPageTitle(e.text);if(this.activeUrl!==d){this.getPage().clear();this.activateExampleCard();this.getPage().load(e)}else{this.activateExampleCard()}f||Docs.History.push(d);this.fireEvent("showExample",d);this.getTree().selectUrl(d);this.activeUrl=d},activateExampleCard:function(){Ext.getCmp("card-panel").layout.setActiveItem("example");Ext.getCmp("treecontainer").showTree("exampletree")},getExample:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.examples,function(a){Ext.Array.forEach(a.items,function(d){this.map["#!/example/"+d.name]=d},this)},this)}return this.map[b]},changeOrientation:function(b){this.getPage().setOrientation(b)},changeDevice:function(b){this.getPage().setDevice(b)},openInNewWindow:function(){window.open(this.getExample(this.activeUrl).url)}});Ext.define("Docs.controller.Guides",{extend:"Docs.controller.Content",baseUrl:"#!/guide",title:"Guides",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#guideindex"},{ref:"tree",selector:"#guidetree"},{ref:"guide",selector:"#guide"}],cache:{},init:function(){this.addEvents("showGuide");this.control({"#guidetree":{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},"guideindex > thumblist":{urlclick:function(b){this.loadGuide(b)}},indexcontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.handleUrlClick(a.href,d)},this,{preventDefault:true,delegate:".guide"})}},doctabs:{tabClose:function(b){this.getGuide().eraseScrollContext(b)}}})},handleUrlClick:function(d,f,e){d=d.replace(/.*#!?/,"#!");if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.activeUrl?this.activeUrl:"")}else{this.loadGuide(d)}},loadIndex:function(){Ext.getCmp("treecontainer").showTree("guidetree");this.callParent()},loadGuide:function(j,h){Ext.getCmp("card-panel").layout.setActiveItem("guide");Ext.getCmp("treecontainer").showTree("guidetree");var g=j.match(/^#!\/guide\/(.*?)(-section-.*)?$/);var f=g[1];var i=g[2];j="#!/guide/"+f;h||Docs.History.push(j);if(this.cache[f]){this.showGuide(this.cache[f],j,f,i)}else{this.cache[f]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/guides/"+f+"/README.js",callbackName:f,success:function(a){this.cache[f]=a;this.showGuide(a,j,f,i)},failure:function(b,a){this.cache[f]=false;this.getController("Failure").show404("Guide <b>"+Ext.String.htmlEncode(f)+"</b> was not found.")},scope:this})}},showGuide:function(i,j,f,h){var g=false;if(i==="in-progress"){return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("guide").load({name:f,content:i.guide});g=true}this.activeUrl=j;this.getGuide().setScrollContext(this.activeUrl);if(h){this.getGuide().scrollToEl(f+h)}else{this.getGuide().restoreScrollState()}this.fireEvent("showGuide",f,{reRendered:g});this.getTree().selectUrl(j)}});Ext.define("Docs.controller.Videos",{extend:"Docs.controller.Content",baseUrl:"#!/video",title:"Videos",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#videoindex"},{ref:"tree",selector:"#videotree"}],init:function(){this.addEvents("showVideo");this.control({"#videotree":{urlclick:function(b){this.loadVideo(b)}},"videoindex > thumblist":{urlclick:function(b){this.loadVideo(b)}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("videotree");this.callParent()},loadVideo:function(j,h){var f=false;Ext.getCmp("card-panel").layout.setActiveItem("video");Ext.getCmp("treecontainer").showTree("videotree");var g=j.match(/^#!\/video\/(.*)$/)[1];var i=this.getVideo(g);if(!i){this.getController("Failure").show404("Video <b>"+Ext.String.htmlEncode(g)+"</b> was not found.");return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("video").load(i);f=true}h||Docs.History.push(j);this.fireEvent("showVideo",g,{reRendered:f});this.getTree().selectUrl(j);this.activeUrl=j},getVideo:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.videos,function(a){Ext.Array.forEach(a.items,function(d){this.map[d.name]=d},this)},this)}return this.map[b]}});Ext.define("Docs.controller.CommentCounts",{extend:"Ext.app.Controller",requires:["Docs.Comments"],refs:[{ref:"class",selector:"classoverview"},{ref:"classIndex",selector:"#classindex"},{ref:"guide",selector:"#guide"},{ref:"guideIndex",selector:"#guideindex"},{ref:"video",selector:"#video"},{ref:"videoIndex",selector:"#videoindex"}],init:function(){Docs.Comments.on("countChange",this.updateCounts,this)},updateCounts:function(c,d){this.getClass().updateCommentCounts();this.getClassIndex().updateCommentCounts();this.getGuide().updateCommentCounts();this.getGuideIndex().updateCommentCounts();this.getVideo().updateCommentCounts();this.getVideoIndex().updateCommentCounts()}});Ext.define("Docs.controller.Tests",{extend:"Docs.controller.Content",baseUrl:"#!/tests",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#testsindex"}],init:function(){this.addEvents("loadIndex");this.control({"#testsgrid":{afterrender:this.loadExamples}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()},loadExamples:function(){this.getIndex().disable();Ext.data.JsonP.request({url:this.getBaseUrl()+"/inline-examples.js",callbackName:"__inline_examples__",success:function(b){this.getIndex().addExamples(b);this.getIndex().enable()},scope:this})}});Ext.define("Docs.store.Settings",{extend:"Ext.data.Store",requires:["Docs.model.Setting"],model:"Docs.model.Setting"});Ext.define("Docs.Settings",{extend:"Docs.LocalStore",singleton:true,requires:"Docs.store.Settings",storeName:"Docs.store.Settings",defaults:{show:{"public":true,"protected":false,"private":false,deprecated:false,removed:false,inherited:true,accessor:true},comments:{hideRead:false},showPrivateClasses:false,classTreeLogic:"PackageLogic"},set:function(d,f){var e=this.store.findExact("key",d);if(e>-1){this.store.removeAt(e)}this.store.add({key:d,value:f});this.syncStore()},get:function(c){var d=this.store.findExact("key",c);return d>-1?this.store.getAt(d).get("value"):this.defaults[c]}});Ext.define("Docs.controller.Tabs",{extend:"Ext.app.Controller",requires:["Docs.History","Docs.Settings"],refs:[{ref:"welcomeIndex",selector:"#welcomeindex"},{ref:"classIndex",selector:"#classindex"},{ref:"guideIndex",selector:"#guideindex"},{ref:"videoIndex",selector:"#videoindex"},{ref:"exampleIndex",selector:"#exampleindex"},{ref:"testsIndex",selector:"#testsindex"},{ref:"commentIndex",selector:"#commentindex"},{ref:"classTree",selector:"#classtree"},{ref:"guideTree",selector:"#guidetree"},{ref:"exampleTree",selector:"#exampletree"},{ref:"videoTree",selector:"#videotree"},{ref:"doctabs",selector:"#doctabs"}],init:function(){this.getController("Classes").addListener({showClass:function(b){this.addTabFromTree("#!/api/"+b)},scope:this});this.getController("Guides").addListener({showGuide:function(b){this.addTabFromTree("#!/guide/"+b)},scope:this});this.getController("Examples").addListener({showExample:function(b){this.addTabFromTree(b)},scope:this});this.getController("Videos").addListener({showVideo:function(b){this.addTabFromTree("#!/video/"+b)},scope:this});this.control({"[componentCls=doctabs]":{tabActivate:function(d,c){Docs.History.push(d,c)},scope:this}})},onLaunch:function(){this.getDoctabs().setStaticTabs(Ext.Array.filter([this.getWelcomeIndex().getTab(),this.getClassIndex().getTab(),this.getGuideIndex().getTab(),this.getVideoIndex().getTab(),this.getExampleIndex().getTab(),this.getTestsIndex().getTab()],function(a){return a}));this.commentsTab=this.getCommentIndex().getTab();var b=Docs.Settings.get("tabs");if(b){Ext.Array.forEach(b,function(a){this.addTabFromTree(a,{animate:false})},this)}Docs.History.notifyTabsLoaded()},showCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(b.concat(this.commentsTab))},hideCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(Ext.Array.remove(b,this.commentsTab))},addTabFromTree:function(h,g){var e=this.getTree(h);var f=e.findRecordByUrl(h);if(f){this.addTab(f,g)}},addTab:function(d,c){c=c||{animate:true,activate:true};this.getDoctabs().addTab({href:d.url,text:d.text,iconCls:d.iconCls},c)},getTree:function(b){if(/#!?\/api/.test(b)){return this.getClassTree()}else{if(/#!?\/guide/.test(b)){return this.getGuideTree()}else{if(/#!?\/video/.test(b)){return this.getVideoTree()}else{if(/#!?\/example/.test(b)){return this.getExampleTree()}else{return this.getClassTree()}}}}}});Ext.define("Docs.controller.Comments",{extend:"Docs.controller.Content",baseUrl:"#!/comment",title:"Comments",requires:["Docs.Settings","Docs.Comments"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#commentindex"},{ref:"commentsFullList",selector:"commentsFullList"}],recentCommentsSettings:{},init:function(){this.control({commentsFullList:{hideReadChange:function(){this.fetchRecentComments()},sortOrderChange:function(b){this.recentCommentsSettings.sortByScore=(b==="votes");this.fetchRecentComments()}},commentsPager:{loadMore:function(b){this.fetchRecentComments(b)}},commentsUsers:{select:function(b){this.recentCommentsSettings.username=b;this.fetchRecentComments()}},commentsTargets:{select:function(b){this.recentCommentsSettings.targetId=b&&b.get("id");this.fetchRecentComments()}},commentsTags:{select:function(b){this.recentCommentsSettings.tagname=b&&b.get("tagname");this.fetchRecentComments()}}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();if(!this.recentComments){this.fetchRecentComments();this.recentComments=true}this.callParent([true])},fetchRecentComments:function(f){var e=Docs.Settings.get("comments");var d={offset:f||0,limit:100,hideRead:e.hideRead?1:undefined,sortByScore:this.recentCommentsSettings.sortByScore?1:undefined,username:this.recentCommentsSettings.username,targetId:this.recentCommentsSettings.targetId,tagname:this.recentCommentsSettings.tagname};this.getCommentsFullList().setMasked(true);Docs.Comments.request("jsonp",{url:"/comments_recent",method:"GET",params:d,success:function(a){this.getCommentsFullList().setMasked(false);var b=f>0;this.getCommentsFullList().load(a,b)},scope:this})}});Ext.define("Docs.view.Tabs",{extend:"Ext.container.Container",alias:"widget.doctabs",id:"doctabs",componentCls:"doctabs",requires:["Docs.History","Docs.ClassRegistry","Docs.view.TabMenu"],minTabWidth:80,maxTabWidth:160,animDuration:150,tabs:[],tabsInBar:[],tabCache:{},staticTabs:[],initComponent:function(){this.addEvents("tabActivate","tabClose");this.tpl=Ext.create("Ext.XTemplate",'<tpl for=".">','<div class="doctab overview {cls}{active}">','<div class="l"></div>','<div class="m">','<tpl if="text">','<a class="tabUrl ov-tab-text" href="{href}">{text}</a>',"<tpl else>",'<a class="tabUrl ov-tab" href="{href}">&nbsp;</a>',"</tpl>","</div>",'<div class="r"></div>',"</div>","</tpl>",'<div style="float: left; width: 8px">&nbsp;</div>','<div class="tab-overflow"></div>');this.html=this.tpl.applyTemplate(this.staticTabs);this.tabTpl=Ext.create("Ext.XTemplate",'<div class="doctab','{[values.active ? (" active") : ""]}','" style="','{[values.width ? ("width: " + values.width + "px;") : ""]}','{[values.visible ? "" : "visibility: hidden;"]}">','<div class="l"></div>','<div class="m">','<span class="icn {iconCls}">&nbsp;</span>','<a class="tabUrl main-tab" href="{href}">{text}</a>',"</div>",'<div class="r"><a class="close" href="#">&nbsp;</a></div>',"</div>");this.on("afterrender",this.initListeners,this);this.on("resize",this.refresh,this);this.callParent()},initListeners:function(){this.el.on("mouseover",function(c,d){Ext.get(d).addCls("ovr")},this,{delegate:".close"});this.el.on("mouseout",function(c,d){Ext.get(d).removeCls("ovr")},this,{delegate:".close"});this.el.on("click",function(f,d){var e=Ext.get(d).up(".doctab").down(".tabUrl").getAttribute("href");e=Docs.History.cleanUrl(e);this.removeTab(e);this.fireEvent("tabClose",e)},this,{delegate:".close",preventDefault:true});this.el.on("click",function(f,d){if(Ext.fly(f.getTarget()).hasCls("close")){return}var e=Ext.get(d).down(".tabUrl").getAttribute("href");this.fireEvent("tabActivate",e,{navigate:true})},this,{delegate:".doctab"});this.el.on("contextmenu",function(c,d){if(!Ext.get(d).hasCls("overview")){this.createMenu().showBy(d)}},this,{delegate:".doctab",preventDefault:true});this.el.on("click",Ext.emptyFn,this,{delegate:".tabUrl",preventDefault:true});this.el.on("mouseleave",function(){if(this.shouldResize){this.resizeTabs({animate:true})}},this)},setStaticTabs:function(b){this.staticTabs=b;this.refresh()},getStaticTabs:function(b){return this.staticTabs},addTab:function(d,c){d=this.formatTabTexts(d);this.tabCache[d.href]=d;if(!this.hasTab(d.href)){this.tabs.push(d.href);if(this.roomForNewTab()){this.addTabToBar(d,c)}this.addTabToMenu(this.overflowButton.menu,d)}if(c.activate){this.activateTab(d.href)}this.saveTabs()},formatTabTexts:function(c){if(/#!?\/api\//.test(c.href)){var d=c.href.replace(/^.*#!?\/api\//,"");c.text=Docs.ClassRegistry.shortName(d);c.tooltip=d}else{c.tooltip=c.text}return c},removeTab:function(d){if(!this.hasTab(d)){return}this.removeFromArray(this.tabs,d);var e=this.removeFromArray(this.tabsInBar,d);var f=this.tabs[this.tabsInBar.length];if(f){this.tabsInBar.push(f)}if(this.activeTab===d){if(this.tabs.length===0){Docs.App.getController(this.getControllerName(d)).loadIndex()}else{if(e===this.tabs.length){e-=1}this.activateTab(this.tabs[e]);this.fireEvent("tabActivate",this.tabs[e])}}if(this.tabs.length>=this.maxTabsInBar()){this.refresh()}else{this.removeTabFromBar(d)}this.saveTabs()},removeFromArray:function(f,d){var e=Ext.Array.indexOf(f,d);if(e!==-1){Ext.Array.erase(f,e,1)}return e},activateTab:function(d){this.activeTab=d;if(!this.inTabs(d)){this.swapLastTabWith(d)}Ext.Array.each(Ext.query(".doctab a.tabUrl"),function(a){Ext.get(a).up(".doctab").removeCls(["active","highlight"])});var e=Ext.query('.doctab a[href="'+d+'"]')[0];if(e){var f=Ext.get(e).up(".doctab");f.addCls("active")}this.highlightOverviewTab(d)},refresh:function(){var i=this.tpl.applyTemplate(this.staticTabs);var f=this.maxTabsInBar()<this.tabs.length?this.maxTabsInBar():this.tabs.length;this.tabsInBar=this.tabs.slice(0,f);for(var j=0;j<f;j++){var h=this.tabCache[this.tabs[j]];var g=Ext.apply(h,{visible:true,active:this.activeTab===h.href,width:this.tabWidth()});i+=this.tabTpl.applyTemplate(g)}this.el.dom.innerHTML=i;if(this.activeTab&&this.activeTab!==this.tabs[f-1]){this.activateTab(this.activeTab);this.fireEvent("tabActivate",this.activeTab)}this.highlightOverviewTab(this.activeTab);this.createOverflowButton();this.addToolTips()},closeAllTabs:function(){if(this.inTabBar(this.activeTab)){this.tabs=this.tabsInBar=[this.activeTab]}else{this.tabs=this.tabsInBar=[]}this.refresh();this.saveTabs()},tabData:function(){return Ext.Array.map(this.tabs,function(b){return this.tabCache[b]},this)},roomForNewTab:function(){return this.tabsInBar.length<this.maxTabsInBar()},hasTab:function(b){return Ext.Array.contains(this.tabs,b)},addTabToBar:function(e,d){this.tabsInBar.push(e.href);var f=Ext.get(this.tabTpl.append(this.el.dom,e));this.addMainTabTooltip(f,e);if(d.animate&&!Ext.isIE){f.setStyle("width","10px");f.setStyle({visibility:"visible"});f.animate({to:{width:this.tabWidth()}})}else{f.setStyle({visibility:"visible"})}this.resizeTabs(d)},inTabBar:function(b){return Ext.Array.contains(this.tabsInBar,b)},inTabs:function(d){var c=Ext.Array.pluck(this.staticTabs,"href").concat(this.tabsInBar);return Ext.Array.contains(c,d)},removeTabFromBar:function(d){var c=this.getTabEl(d);c.dom.removed=true;if(Ext.isIE){c.remove();this.createOverflowButton()}else{c.animate({to:{top:30},duration:this.animDuration}).animate({to:{width:10},duration:this.animDuration,listeners:{afteranimate:function(){c.remove();this.shouldResize=true;this.createOverflowButton()},scope:this}})}},swapLastTabWith:function(d){var e=this.getTabEl(this.tabsInBar[this.tabsInBar.length-1]);if(e){var f=this.tabTpl.append(document.body,this.tabCache[d]);e.dom.parentNode.replaceChild(f,e.dom);this.tabsInBar[this.tabsInBar.length-1]=d;Ext.get(f).setStyle({visibility:"visible",width:String(this.tabWidth())+"px"});this.addMainTabTooltip(f,this.tabCache[d])}},highlightOverviewTab:function(d){var c=Ext.query(".doctab."+this.getControllerName(d).toLowerCase());if(c&&c[0]){Ext.get(c[0]).addCls("highlight")}},maxTabsInBar:function(){return Math.floor(this.tabBarWidth()/this.minTabWidth)},tabWidth:function(){var b=Math.floor(this.tabBarWidth()/this.tabsInBar.length)+6;if(b>this.maxTabWidth){return this.maxTabWidth}else{if(b<this.minTabWidth){return this.minTabWidth}else{return b}}},tabBarWidth:function(){return this.getWidth()-(this.staticTabs.length*50)-15},resizeTabs:function(b){this.shouldResize=false;Ext.Array.each(Ext.query(".doctab"),function(a){var d=Ext.get(a);if(!d.dom.removed&&!d.hasCls("overview")){if(b&&b.animate&&!Ext.isIE){d.animate({to:{width:this.tabWidth()}})}else{d.setWidth(this.tabWidth())}}},this)},getTabEl:function(c){var d=Ext.query('.doctab a[href="'+c+'"]');if(d&&d[0]){return Ext.get(d[0]).up(".doctab")}},createOverflowButton:function(){if(this.overflowButton){this.overflowButton.destroy()}this.overflowButton=Ext.create("Ext.button.Button",{baseCls:"",renderTo:this.getEl().down(".tab-overflow"),menu:this.createMenu()})},createMenu:function(){var b=new Docs.view.TabMenu({listeners:{closeAllTabs:this.closeAllTabs,tabItemClick:function(a){this.fireEvent("tabActivate",a.href,{navigate:true})},scope:this}});Ext.Array.each(this.tabs,function(a){this.addTabToMenu(b,this.tabCache[a])},this);return b},addTabToMenu:function(g,h){var f=Ext.Array.indexOf(this.tabs,h.href);if(this.tabs.length>this.tabsInBar.length&&f===this.maxTabsInBar()){g.addTabCls(h,"overflow")}var e=this.inTabBar(h.href);g.addTab(h,e?"":"overflow")},addToolTips:function(){Ext.Array.each(this.staticTabs,function(c){var d=Ext.get(Ext.query(".doctab."+c.cls)[0]);if(d){Ext.create("Ext.tip.ToolTip",{target:d,html:c.tooltip})}});Ext.Array.each(this.tabsInBar,function(e){var f=Ext.get(Ext.query('a.main-tab[href="'+e+'"]')[0]);var d=this.tabCache[e];if(f){this.addMainTabTooltip(f.up(".doctab"),d)}},this)},addMainTabTooltip:function(c,d){if(d.tooltip){Ext.create("Ext.tip.ToolTip",{target:c,html:d.tooltip})}},saveTabs:function(){Docs.Settings.set("tabs",this.tabs)},getControllerName:function(b){if(/#!?\/api/.test(b)){return"Classes"}else{if(/#!?\/guide/.test(b)){return"Guides"}else{if(/#!?\/video/.test(b)){return"Videos"}else{if(/#!?\/example/.test(b)){return"Examples"}else{if(/#!?\/tests/.test(b)){return"Tests"}else{if(/#!?\/comment/.test(b)){return"Comments"}else{return"Index"}}}}}}}});Ext.define("Docs.view.welcome.Index",{extend:"Ext.container.Container",alias:"widget.welcomeindex",mixins:["Docs.view.Scrolling"],requires:["Docs.ContentGrabber"],cls:"welcome iScroll",initComponent:function(){this.html=Docs.ContentGrabber.get("welcome-content");this.hasContent=!!this.html;this.callParent(arguments)},getTab:function(){return this.hasContent?{cls:"index",href:"#",tooltip:"Home"}:false}});Ext.define("Docs.view.cls.Index",{extend:"Ext.container.Container",alias:"widget.classindex",requires:["Docs.ContentGrabber","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-categories iScroll",margin:"15 10",autoScroll:true,initComponent:function(){this.tpl=new Ext.XTemplate('<h1 class="top" style="padding-bottom: 10px">API Documentation</h1>','<tpl if="notice">','<div class="notice">{notice}</div>',"</tpl>","{categories}","{news}");this.data={notice:Docs.data.message||Docs.ContentGrabber.get("notice-text"),categories:Docs.ContentGrabber.get("categories-content"),news:Docs.ContentGrabber.get("news-content")};this.callParent(arguments)},afterRender:function(){this.callParent(arguments);if(!Docs.Comments.isEnabled()){return}this.initComments()},initComments:function(){this.getEl().select("a.docClass").each(function(a){var f=a.getHTML();var e=Docs.Comments.getClassTotalCount(f);if(e){Ext.DomHelper.append(a,Docs.Comments.counterHtml(e))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},getTab:function(){var b=(Docs.data.classes||[]).length>0;return b?{cls:"classes",href:"#!/api",tooltip:"API Documentation"}:false}});Ext.define("Docs.view.examples.TouchContainer",{extend:"Ext.panel.Panel",alias:"widget.touchexamplecontainer",requires:["Docs.view.examples.Device"],layout:"fit",cls:"example-container iScroll",autoScroll:true,bodyPadding:"10 0 5 0",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['<h1 class="example-title">Example</h1>','<div class="cls-grouping example-toolbar">','<div class="devices">','<button class="phone selected">Phone</button>','<button class="tablet">Tablet</button>',"</div>",'<span class="separator">&nbsp;</span>','<div class="orientations">','<button class="landscape selected">Landscape</button>','<button class="portrait">Portrait</button>',"</div>","<div>",'<button class="new-window">Open in new window</button>',"</div>","</div>"].join("")}];this.callParent(arguments)},load:function(b){this.title=b.title+" Example";this.device=Ext.create("Docs.view.examples.Device",{url:b.url,device:b.device||"phone",orientation:b.orientation||"landscape"});this.refresh()},refresh:function(){this.update(this.device.toHtml());this.updateScale();this.updateTitle();this.updateButtons()},setDevice:function(b){this.device.setDevice(b);this.refresh()},setOrientation:function(b){this.device.setOrientation(b);this.refresh()},updateScale:function(){var b=Ext.query("iframe",this.el.dom)[0];if(b){b.onload=Ext.Function.bind(function(){var d=document.createElement("style");var a="html { overflow: hidden }";if(this.device.getDevice()==="tablet"){a+="body { font-size: 79.8% !important; }"}d.innerHTML=a;b.contentWindow.document.body.appendChild(d)},this)}},updateTitle:function(){Ext.get(Ext.query(".example-title")).update(this.title)},updateButtons:function(){Ext.Array.each(Ext.query(".example-toolbar .orientations button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .orientations button."+this.device.getOrientation())).addCls("selected");Ext.Array.each(Ext.query(".example-toolbar .devices button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .devices button."+this.device.getDevice())).addCls("selected")},clear:function(){this.update("")}});Ext.define("Docs.view.search.Dropdown",{extend:"Ext.view.View",alias:"widget.searchdropdown",requires:["Docs.view.Signature"],floating:true,autoShow:false,autoRender:true,toFrontOnShow:true,focusOnToFront:false,store:"Search",id:"search-dropdown",overItemCls:"x-view-over",trackOver:true,itemSelector:"div.item",singleSelect:true,pageStart:0,pageSize:10,initComponent:function(){this.addEvents("changePage","footerClick");this.tpl=new Ext.XTemplate('<tpl for=".">','<div class="item">','<div class="icon {icon}"></div>','<div class="meta">{[this.getMetaTags(values.meta)]}</div>','<div class="title {[this.getCls(values.meta)]}">{name}</div>','<div class="class">{fullName}</div>',"</div>","</tpl>",'<div class="footer">','<tpl if="this.getTotal()">','<a href="#" class="prev">&lt;</a>','<span class="total">{[this.getStart()+1]}-{[this.getEnd()]} of {[this.getTotal()]}</span>','<a href="#" class="next">&gt;</a>',"<tpl else>",'<span class="total">Nothing found</span>',"</tpl>","</div>",{getCls:function(b){return b["private"]?"private":(b.removed?"removed":"")},getMetaTags:function(b){return Docs.view.Signature.render(b)},getTotal:Ext.bind(this.getTotal,this),getStart:Ext.bind(this.getStart,this),getEnd:Ext.bind(this.getEnd,this)});this.on("afterrender",function(){this.el.addListener("click",function(){this.fireEvent("changePage",this,-1)},this,{preventDefault:true,delegate:".prev"});this.el.addListener("click",function(){this.fireEvent("changePage",this,+1)},this,{preventDefault:true,delegate:".next"});this.el.addListener("click",function(){this.fireEvent("footerClick",this)},this,{delegate:".footer"})},this);this.callParent(arguments)},setTotal:function(b){this.total=b},getTotal:function(){return this.total},setStart:function(b){this.pageStart=b},getStart:function(b){return this.pageStart},getEnd:function(c){var d=this.pageStart+this.pageSize;return d>this.total?this.total:d}});Ext.define("Docs.view.search.Container",{extend:"Ext.container.Container",alias:"widget.searchcontainer",requires:"Docs.view.search.Dropdown",initComponent:function(){if(Docs.data.search.length){this.cls="search";this.items=[{xtype:"triggerfield",triggerCls:"reset",emptyText:"Search",width:170,id:"search-field",enableKeyEvents:true,hideTrigger:true,onTriggerClick:function(){this.reset();this.focus();this.setHideTrigger(true);Ext.getCmp("search-dropdown").hide()}},{xtype:"searchdropdown"}]}this.callParent()}});Ext.define("Docs.view.GroupTree",{extend:"Docs.view.DocTree",alias:"widget.grouptree",initComponent:function(){this.root={text:"Root",children:this.buildTree(this.data)};this.callParent()},buildTree:function(b){return Ext.Array.map(b,function(a){if(a.items){return{text:a.title,expanded:true,iconCls:"icon-pkg",children:this.buildTree(a.items)}}else{return this.convert(a)}},this)}});Ext.define("Docs.view.auth.BaseForm",{extend:"Ext.Component",requires:["Docs.Tip","Docs.Auth"],createLoginFormHtml:function(){return['<form class="loginForm">','<input class="username" type="text" name="username" placeholder="Username" />','<input class="password" type="password" name="password" placeholder="Password" />','<label><input type="checkbox" name="remember" /> Remember Me</label>','<input class="submit" type="submit" value="Sign in" />'," or ",'<a class="register" href="'+Docs.Auth.getRegistrationUrl()+'" target="_blank">Register</a>',"</form>"].join("")},bindFormSubmitEvent:function(){this.getEl().down("form").on("submit",this.submitLogin,this,{preventDefault:true})},submitLogin:function(m,h){var n=Ext.get(h);var j=n.down("input[name=username]").getValue();var i=n.down("input[name=password]").getValue();var l=n.down("input[name=remember]");var k=l?!!(l.getAttribute("checked")):false;this.fireEvent("login",this,j,i,k)},showMessage:function(c){var d=this.getEl().down("input[type=submit]");Docs.Tip.show(c,d,"bottom")}});Ext.define("Docs.view.auth.HeaderForm",{extend:"Docs.view.auth.BaseForm",alias:"widget.authHeaderForm",requires:["Docs.Comments"],afterRender:function(){this.callParent(arguments);this.getEl().addListener("click",this.showLoginForm,this,{preventDefault:true,delegate:".login"});this.getEl().addListener("click",function(){this.fireEvent("logout",this)},this,{preventDefault:true,delegate:".logout"})},showLoginForm:function(){this.update(this.createLoginFormHtml());this.bindFormSubmitEvent()},showLoggedIn:function(d){var c=Docs.Comments.avatar(d.emailHash);this.update(c+"<div><span>"+d.userName+'</span> | <a href="#" class="logout">Logout</a></div>')},showLoggedOut:function(){this.update('<a href="#" class="login">Sign in / Register</a>')}});Ext.define("Docs.view.comments.Users",{alias:"widget.commentsUsers",extend:"Ext.panel.Panel",componentCls:"comments-users",requires:["Docs.Comments","Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"Votes"},{title:"Comments"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:"Filter users by name...",width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}],listeners:{tabchange:this.onTabChange,scope:this}}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll users-list",autoScroll:true,store:Ext.create("Ext.data.Store",{fields:["userName","score","emailHash","mod"]}),allowDeselect:true,tpl:["<ul>",'<tpl for=".">',"<li>",'<span class="score">{score}</span>',"{[Docs.Comments.avatar(values.emailHash)]}",'<span class="username <tpl if="mod">moderator</tpl>">{userName}</span>',"</li>","</tpl>","</ul>"],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.fetchUsers("votes")},onTabChange:function(d,c){if(c.title==="Votes"){this.fetchUsers("votes")}else{this.fetchUsers("comments")}},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:"userName",value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.selectedUser=b;this.fireEvent("select",b.get("userName"))},onDeselect:function(){this.selectedUser=undefined;this.fireEvent("select",undefined)},fetchUsers:function(b){Docs.Comments.request("jsonp",{url:"/users",method:"GET",params:{sortBy:b},success:this.loadUsers,scope:this})},loadUsers:function(c){this.list.getStore().loadData(c.data);if(this.selectedUser){var d=this.list.getStore().findExact("userName",this.selectedUser.get("userName"));this.list.getSelectionModel().select(d,false,true)}}});Ext.override(Ext.dom.Element,{getAttribute:(Ext.isIE6||Ext.isIE7||Ext.isIE8)?function(f,h){var g=this.dom,d;if(h){d=typeof g[h+":"+f];if(d!="undefined"&&d!="unknown"){return g[h+":"+f]||null}return null}if(f==="for"){f="htmlFor"}return g[f]||null}:function(e,d){var f=this.dom;if(d){return f.getAttributeNS(d,e)||f.getAttribute(d+":"+e)}return f.getAttribute(e)||f[e]||null}});Ext.define("Docs.view.ThumbList",{extend:"Ext.view.View",alias:"widget.thumblist",requires:["Docs.Comments"],cls:"thumb-list",itemSelector:"dl",urlField:"url",commentType:"",itemTpl:[],initComponent:function(){this.addEvents("urlclick");Ext.Array.forEach(this.data,function(c,d){c.id="sample-"+d});this.store=Ext.create("Ext.data.JsonStore",{fields:["id","title","items"]});this.store.loadData(this.flattenSubgroups(this.data));this.tpl=new Ext.XTemplate(Ext.Array.flatten(["<div>",'<tpl for=".">','<div><a name="{id}"></a><h2><div>{title}</div></h2>',"<dl>",'<tpl for="items">',this.itemTpl,"</tpl>",'<div style="clear:left"></div></dl></div>',"</tpl>","</div>"]));this.itemTpl=undefined;this.data=undefined;this.on("viewready",function(){this.initHover();if(Docs.Comments.isEnabled()){this.initComments()}},this);this.callParent(arguments)},initHover:function(){this.getEl().on("mouseover",function(c,d){Ext.get(d).addCls("over")},this,{delegate:"dd"});this.getEl().on("mouseout",function(c,d){Ext.get(d).removeCls("over")},this,{delegate:"dd"})},initComments:function(){this.getEl().select("dd").each(function(e){var d=e.getAttributeNS("ext",this.urlField).replace(/^.*\//,"");var f=Docs.Comments.getCount([this.commentType,d,""]);if(f){Ext.DomHelper.append(e.down("p"),Docs.Comments.counterHtml(f))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},flattenSubgroups:function(c){function d(a){if(a.items){return Ext.Array.map(a.items,d)}else{return a}}return Ext.Array.map(c,function(a){return{id:a.id,title:a.title,items:Ext.Array.map(a.items,function(b){if(b.items){var f=Ext.apply({},d(b)[0]);f.title=b.title;return f}else{return b}})}})},onContainerClick:function(c){var d=c.getTarget("h2",3,true);if(d){d.up("div").toggleCls("collapsed")}},onItemClick:function(h,j,l,i){var k=i.getTarget("dd",5,true);if(k&&!i.getTarget("a",2)){var e=k.getAttributeNS("ext",this.urlField);this.fireEvent("urlclick",e)}return this.callParent(arguments)}});Ext.define("Docs.view.guides.Index",{extend:"Ext.container.Container",alias:"widget.guideindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Guides</h1>'},Ext.create("Docs.view.ThumbList",{commentType:"guide",itemTpl:['<dd ext:url="#!/guide/{name}"><div class="thumb"><img src="guides/{name}/icon.png"/></div>',"<div><h4>{title}</h4><p>{description}</p></div>","</dd>"],data:Docs.data.guides})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.guides||[]).length>0;return b?{cls:"guides",href:"#!/guide",tooltip:"Guides"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.videos.Index",{extend:"Ext.container.Container",alias:"widget.videoindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Videos</h1>'},Ext.create("Docs.view.ThumbList",{commentType:"video",itemTpl:['<dd ext:url="#!/video/{name}"><div class="thumb"><img src="{thumb}"/></div>',"<div><h4>{title}","</h4><p>{[values.description.substr(0,80)]}...</p></div>","</dd>"],data:Docs.data.videos})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.videos||[]).length>0;return b?{cls:"videos",href:"#!/video",tooltip:"Videos"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.examples.Index",{extend:"Ext.container.Container",alias:"widget.exampleindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.cls+=Docs.data.touchExamplesUi?" touch-examples-ui":"";this.items=[{xtype:"container",html:'<h1 class="eg">Examples</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/example/{name}">','<div class="thumb"><img src="{icon}"/></div>',"<div><h4>{title}","<tpl if=\"status === 'new'\">",'<span class="new-sample"> (New)</span>',"</tpl>","<tpl if=\"status === 'updated'\">",'<span class="updated-sample"> (Updated)</span>',"</tpl>","<tpl if=\"status === 'experimental'\">",'<span class="new-sample"> (Experimental)</span>',"</tpl>","</h4><p>{description}</p></div>","</dd>"],data:Docs.data.examples})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.examples||[]).length>0;return b?{cls:"examples",href:"#!/example",tooltip:"Examples"}:false}});Ext.define("Docs.view.cls.Header",{extend:"Ext.container.Container",requires:["Docs.view.Signature"],alias:"widget.classheader",cls:"classheader",padding:"10 0 17 0",height:55,initComponent:function(){this.tpl=Ext.create("Ext.XTemplate",'<h1 class="{[this.getClass(values)]}">','<tpl if="Docs.data.source">','<a href="#" class="class-source-link">{name}','<span class="class-source-tip">View source...</span>',"</a>","<tpl else>",'<strong class="class-source-link">{name}</strong>',"</tpl>",'<tpl if="singleton">','<span class="singleton">singleton</span>',"</tpl>","<tpl if=\"values['enum']\">",'<span class="enum">enum of <b>{[values["enum"].type]}</b></span>',"</tpl>","{[this.renderAliases(values.aliases)]}","{[this.renderMetaTags(values.meta)]}","</h1>",'<tpl if="Docs.data.showPrintButton">','<a class="print" href="?print=/api/{name}" target="_blank">Print</a>',"</tpl>",{getClass:function(b){if(b.singleton){return"singleton"}else{if(b.component){return"component"}else{return"class"}}},renderAliases:function(e){var f={widget:"xtype",plugin:"ptype",feature:"ftype"};var d=[];e&&Ext.Object.each(e,function(a,b){d.push((f[a]||a)+": "+b.join(", "))});if(d.length>0){return"<span class='xtype'>"+d.join(", ")+"</span>"}else{return""}},renderMetaTags:function(b){return" "+Docs.view.Signature.render(b,"long")}});if(Docs.data.source){this.on("render",this.initSourceLink,this)}this.callParent()},initSourceLink:function(){this.classLinkEvent("click",function(){var d=this.loadedCls.files;if(d.length===1){window.open("source/"+d[0].href)}else{var c=this.createFileMenu(d);c.showBy(this,undefined,[58,-20])}},this);this.classLinkEvent("mouseover",function(){this.el.down(".class-source-tip").addCls("hover")},this);this.classLinkEvent("mouseout",function(){this.el.down(".class-source-tip").removeCls("hover")},this)},classLinkEvent:function(d,e,f){this.el.on(d,e,f,{preventDefault:true,delegate:"a.class-source-link"})},createFileMenu:function(b){return new Ext.menu.Menu({items:Ext.Array.map(b,function(a){return{text:a.filename,handler:function(){window.open("source/"+a.href)}}},this)})},load:function(b){this.loadedCls=b;this.update(this.tpl.apply(b))}});Ext.define("Docs.view.examples.Inline",{extend:"Ext.Panel",alias:"widget.inlineexample",requires:["Docs.view.examples.InlineEditor","Docs.view.examples.InlinePreview"],componentCls:"inline-example-cmp",layout:"card",border:0,resizable:{transparent:true,handles:"s",constrainTo:false},maxCodeHeight:400,options:{},constructor:function(){this.callParent(arguments);this.addEvents("previewsuccess","previewfailure")},initComponent:function(){this.options=Ext.apply({device:"phone",orientation:"landscape"},this.options);this.items=[this.editor=Ext.create("Docs.view.examples.InlineEditor",{cmpName:"code",value:this.value,listeners:{init:this.updateHeight,change:this.updateHeight,scope:this}}),this.preview=Ext.create("Docs.view.examples.InlinePreview",{cmpName:"preview",options:this.options})];this.relayEvents(this.preview,["previewsuccess","previewfailure"]);if(this.options.preview){this.activeItem=1;if(this.toolbar){this.toolbar.activateButton("preview")}}else{this.activeItem=0;if(this.toolbar){this.toolbar.activateButton("code")}}this.on("afterrender",this.init,this);this.callParent(arguments)},init:function(){var b=this.layout.getActiveItem();if(b.cmpName==="preview"){this.showPreview()}this.updateHeight();if(this.toolbar){this.initToolbarEvents()}},initToolbarEvents:function(){this.toolbar.on("buttonclick",function(b){if(b==="code"){this.showCode()}else{if(b==="preview"){this.showPreview()}else{if(b==="copy"){this.showCode();this.editor.selectAll()}}}},this)},showCode:function(){this.layout.setActiveItem(0);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("code")}},showPreview:function(){this.preview.update(this.editor.getValue());this.layout.setActiveItem(1);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("preview")}},updateHeight:function(){var d=this.preview.getHeight();var e=this.editor.getHeight();var f=30;if(Docs.data.touchExamplesUi&&d>0){this.setHeight(d+f)}else{if(e>0){this.setHeight(Ext.Number.constrain(e+f,0,this.maxCodeHeight))}}}});Ext.define("Docs.view.examples.InlineWrap",{requires:["Docs.view.examples.Inline","Docs.view.examples.InlineToolbar"],constructor:function(c){this.pre=c;var d=this.parseOptions(c.className);this.initToolbar();if(d.preview){this.replacePre(d)}else{this.tb.on("buttonclick",function(a){d.preview=(a==="preview");this.replacePre(d)},this,{single:true})}},parseOptions:function(c){var d={};Ext.Array.forEach(c.split(/ +/),function(a){if(a==="phone"||a==="miniphone"||a==="tablet"){d.device=a}else{if(a==="ladscape"||a==="portrait"){d.orientation=a}else{d[a]=true}}});return d},initToolbar:function(){var b=document.createElement("div");this.pre.parentNode.insertBefore(b,this.pre);this.tb=Ext.create("Docs.view.examples.InlineToolbar",{renderTo:b})},replacePre:function(d){var c=document.createElement("div");this.pre.parentNode.replaceChild(c,this.pre);Ext.create("Docs.view.examples.Inline",{height:200,renderTo:c,value:Ext.String.htmlDecode(Ext.util.Format.stripTags(this.pre.innerHTML)),options:d,toolbar:this.tb})}});Ext.define("Docs.controller.InlineExamples",{extend:"Ext.app.Controller",requires:["Docs.view.examples.InlineWrap"],init:function(){this.control({classoverview:{resize:this.createResizer(".class-overview"),afterload:this.replaceExampleDivs},guidecontainer:{resize:this.createResizer(".guide-container"),afterload:this.replaceExampleDivs}})},createResizer:function(b){return function(){Ext.Array.each(Ext.ComponentQuery.query(b+" .inlineexample"),function(a){if(a.editor&&a.isVisible()){a.doLayout()}})}},replaceExampleDivs:function(){Ext.Array.each(Ext.query(".inline-example"),function(b){Ext.create("Docs.view.examples.InlineWrap",b)},this)}});Ext.define("Docs.view.tests.BatchRunner",{extend:"Ext.container.Container",requires:["Docs.view.examples.Inline"],initComponent:function(){this.addEvents("start","finish","statuschange");this.callParent(arguments)},run:function(b){this.fireEvent("start");this.runNext({pass:0,fail:0,total:b.length,remaining:b})},runNext:function(h){this.fireEvent("statuschange",h);if(!h.remaining||h.remaining.length<1){this.fireEvent("finish");return}var j=h.remaining.shift();var i=j.get("options");i.preview=false;var f="var alert = function(){};\n";var g=Ext.create("Docs.view.examples.Inline",{cls:"doc-test-preview",height:0,value:f+j.get("code"),options:i,listeners:{previewsuccess:function(a){this.onSuccess(j,h)},previewfailure:function(a,b){this.onFailure(j,h,b)},scope:this}});this.removeAll();this.add(g);g.showPreview()},onSuccess:function(d,c){d.set("status","success");d.commit();c.pass++;this.runNext(c)},onFailure:function(e,f,d){e.set("status","failure");e.set("message",d.toString());e.commit();f.fail++;this.runNext(f)}});Ext.define("Docs.view.tests.Index",{extend:"Ext.container.Container",requires:["Docs.model.Test","Docs.view.tests.BatchRunner"],mixins:["Docs.view.Scrolling"],alias:"widget.testsindex",layout:{type:"vbox",align:"stretch",shrinkToFit:true},padding:10,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Test",data:[]});this.grid=Ext.create("Ext.grid.Panel",{itemId:"testsgrid",padding:"5 0 5 0",autoScroll:true,flex:1,store:this.store,selModel:{mode:"MULTI"},columns:[{xtype:"templatecolumn",text:"Name",width:300,tpl:'<a href="{href}">{name}</a>'},{xtype:"templatecolumn",text:"Status",width:80,tpl:'<span class="doc-test-{status}">{status}</span>'},{text:"Message",flex:1,dataIndex:"message"}],listeners:{itemdblclick:function(c,d){this.batchRunner.run([d])},scope:this}});this.batchRunner=Ext.create("Docs.view.tests.BatchRunner",{height:0,listeners:{start:this.disable,finish:this.enable,statuschange:this.updateTestStatus,scope:this}});this.items=[{html:"<h1>Inline examples test page</h1>",height:30},{itemId:"testcontainer",layout:{type:"vbox",align:"stretch",shrinkToFit:true},flex:1,items:[{itemId:"testcontrols",layout:"hbox",items:[{html:"<b>Double-click</b> to run an example, or",margin:"5 5 5 0"},{xtype:"button",itemId:"run-selected-button",text:"Run Selected",margin:5,handler:function(){this.batchRunner.run(this.grid.getSelectionModel().getSelection())},scope:this},{html:"or",margin:5},{xtype:"button",itemId:"run-all-button",text:"Run All Examples",margin:5,handler:function(){this.batchRunner.run(this.store.getRange())},scope:this},{itemId:"testStatus",margin:"5 5 5 15"}]},this.grid]},this.batchRunner];this.callParent(arguments)},getTab:function(){return Docs.data.tests?{cls:"tests",href:"#!/tests",tooltip:"Tests",text:"Tests"}:false},addExamples:function(b){this.store.add(b);this.setStatus(true,this.store.getCount()+" examples loaded.")},updateTestStatus:function(d){var c=d.pass+d.fail;this.setStatus(d.fail===0,c+"/"+d.total+" examples tested, "+d.fail+" failures")},setStatus:function(d,f){var e=d?"doc-test-success":"doc-test-failure";this.down("#testStatus").update('<span class="'+e+'">'+f+"</span>")}});Ext.define("Docs.view.cls.PackageLogic",{extend:"Docs.view.cls.Logic",requires:"Docs.ClassRegistry",create:function(){this.root={children:[],text:"Root"};this.packages={"":this.root};this.privates=[];Ext.Array.forEach(this.classes,this.addClass,this);this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(this.compare);Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){if(g.leaf===h.leaf){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)}else{return g.leaf?1:-1}},addClass:function(g){if(g["private"]&&!this.showPrivateClasses){this.privates.push(this.classNode(g));return}if(this.packages[g.name]){var f=this.packages[g.name];var i=this.classNode(g);f.iconCls=i.iconCls;f.url=i.url}else{var h=Docs.ClassRegistry.packageName(g.name);var j=this.packages[h]||this.addPackage(h);var i=this.classNode(g);this.addChild(j,i);this.packages[g.name]=i}},addPackage:function(e){var g=Docs.ClassRegistry.packageName(e);var h=this.packages[g]||this.addPackage(g);var f=this.packageNode(e);this.addChild(h,f);this.packages[e]=f;return f},addChild:function(d,c){d.children.push(c);if(d.leaf){d.leaf=false}},classNode:function(b){return{text:Docs.ClassRegistry.shortName(b.name),url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":"",leaf:true,children:[]}},packageNode:function(b){return{text:Docs.ClassRegistry.shortName(b),iconCls:"icon-pkg",leaf:false,children:[]}}});Ext.define("Docs.view.cls.InheritanceLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.privates=[];this.subclasses=this.buildLookupTable(this.classes);Ext.Array.forEach(this.classes,this.addClass,this);if(!this.showPrivateClasses){this.stripPrivateClasses(this.root)}this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(Ext.bind(this.compare,this));Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)},buildLookupTable:function(d){var c={};Ext.Array.forEach(d,function(b){var a=b["extends"];if(a&&a!=="Object"){if(!c[a]){c[a]=[]}c[a].push(b)}},this);return c},classNode:function(b){return{text:b.name,url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":""}},addClass:function(e){var d=e["extends"];if(!d||d==="Object"){var f=this.classNode(e);this.root.children.push(f);f.children=this.getSubclasses(e.name);f.leaf=f.children.length===0}},getSubclasses:function(b){if(!this.subclasses[b]){return[]}return Ext.Array.map(this.subclasses[b],function(a){var d=this.classNode(a);d.children=this.getSubclasses(a.name);d.leaf=d.children.length===0;return d},this)},stripPrivateClasses:function(b){b.children=Ext.Array.filter(b.children,function(a){this.stripPrivateClasses(a);if(a.cls==="private"&&a.children.length===0){this.privates.push(a);return false}else{return true}},this)}});Ext.define("Docs.view.cls.Tree",{extend:"Docs.view.DocTree",alias:"widget.classtree",requires:["Docs.view.cls.PackageLogic","Docs.view.cls.InheritanceLogic","Docs.Settings"],initComponent:function(){this.setLogic(Docs.Settings.get("classTreeLogic"),Docs.Settings.get("showPrivateClasses"));this.dockedItems=[{xtype:"container",dock:"bottom",layout:"hbox",items:[{width:34},{xtype:"checkbox",boxLabel:"Show private classes",cls:"cls-private-cb",checked:Docs.Settings.get("showPrivateClasses"),listeners:{change:function(d,c){this.setLogic(Docs.Settings.get("classTreeLogic"),c)},scope:this}}]},{xtype:"container",dock:"bottom",cls:"cls-grouping",html:[this.makeButtonHtml("PackageLogic","By Package"),this.makeButtonHtml("InheritanceLogic","By Inheritance")].join("")}];this.on("afterrender",this.setupButtonClickHandler,this);this.callParent()},makeButtonHtml:function(d,c){return Ext.String.format('<button class="{0} {1}">{2}</button>',d,Docs.Settings.get("classTreeLogic")===d?"selected":"",c)},setupButtonClickHandler:function(){this.el.addListener("click",function(g,h){var f=Ext.get(h),e=Ext.get(Ext.query(".cls-grouping button.selected")[0]);if(e.dom===f.dom){return}e.removeCls("selected");f.addCls("selected");if(f.hasCls("PackageLogic")){this.setLogic("PackageLogic",Docs.Settings.get("showPrivateClasses"))}else{this.setLogic("InheritanceLogic",Docs.Settings.get("showPrivateClasses"))}},this,{delegate:"button"})},setLogic:function(i,f){Docs.Settings.set("classTreeLogic",i);Docs.Settings.set("showPrivateClasses",f);var g=new Docs.view.cls[i]({classes:this.data,showPrivateClasses:f});if(this.root){var h=this.getSelectionModel().getLastSelected();var j=g.create();this.expandLonelyNode(j.root);this.setRootNode(j.root);this.initNodeLinks();h&&this.selectUrl(h.raw.url)}else{var j=g.create();this.root=j.root;this.expandLonelyNode(this.root)}this.privates=j.privates},expandLonelyNode:function(d){var c=Ext.Array.filter(d.children,function(a){return a.children.length>0});if(c.length==1){c[0].expanded=true}},findRecordByUrl:function(b){return this.callParent([b])||this.findPrivateRecordByUrl(b)},findPrivateRecordByUrl:function(e){var f=this.privates;for(var d=0;d<f.length;d++){if(f[d].url===e){return f[d]}}return undefined}});Ext.define("Docs.view.TreeContainer",{extend:"Ext.panel.Panel",alias:"widget.treecontainer",requires:["Docs.view.cls.Tree","Docs.view.GroupTree"],cls:"iScroll",layout:"card",resizable:true,resizeHandles:"e",collapsible:true,hideCollapseTool:true,animCollapse:true,header:false,initComponent:function(){this.items=[{},{xtype:"classtree",id:"classtree",data:Docs.data.classes},{xtype:"grouptree",id:"exampletree",data:Docs.data.examples,convert:function(b){return{leaf:true,text:b.title,url:"#!/example/"+b.name,iconCls:"icon-example"}}},{xtype:"grouptree",id:"guidetree",data:Docs.data.guides,convert:function(b){return{leaf:true,text:b.title,url:"#!/guide/"+b.name,iconCls:"icon-guide"}}},{xtype:"grouptree",id:"videotree",data:Docs.data.videos,convert:function(b){return{leaf:true,text:b.title,url:"#!/video/"+b.name,iconCls:"icon-video"}}}];this.callParent()},showTree:function(b){this.show();this.layout.setActiveItem(b)}});Ext.define("Docs.view.comments.Expander",{alias:"widget.commentsExpander",extend:"Ext.Component",requires:["Docs.Comments","Docs.view.comments.TopLevelDropZone"],uses:["Docs.view.comments.ListWithForm"],componentCls:"comments-expander",initComponent:function(){this.tpl=new Ext.XTemplate('<a href="#" class="side toggleComments"><span></span></a>','<a href="#" class="name toggleComments">',"{[this.renderCount(values.count)]}","</a>",{renderCount:this.renderCount});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"View 1 comment."}else{if(b>1){return"View "+b+" comments."}else{return"No comments. Click to add."}}},afterRender:function(){this.callParent(arguments);this.getEl().select(".toggleComments").each(function(b){b.on("click",this.toggle,this,{preventDefault:true})},this);new Docs.view.comments.TopLevelDropZone(this.getEl().down(".side.toggleComments"),{onValidDrop:Ext.Function.bind(this.setParent,this)})},setParent:function(c,d){c.setParent(d,this.reload,this)},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().addCls("open");this.getEl().down(".name").setStyle("display","none");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.getEl().removeCls("open");this.getEl().down(".name").setStyle("display","block");if(this.list){this.list.hide()}},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,newCommentTitle:this.newCommentTitle,renderTo:this.getEl(),listeners:{reorder:this.reload,scope:this}});this.reload()},reload:function(){Docs.Comments.load(this.target,function(b){this.list.load(b)},this)},setCount:function(b){this.getEl().down(".name").update(this.renderCount(b))}});Ext.define("Docs.view.comments.LargeExpander",{requires:["Docs.Comments","Docs.view.comments.Expander"],html:['<div class="comments-large-expander">','<h3 class="icon-comment">Comments</h3>',"<div></div>","</div>"].join(""),type:"class",constructor:function(e){Ext.apply(this,e);this.el=Ext.get(e.el);var d=Ext.DomHelper.append(this.el,this.html,true).down("div");var f=[this.type,this.name,""];this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(f),target:f,renderTo:d,onCountUpdated:this.onCountUpdated})},getExpander:function(){return this.expander}});Ext.define("Docs.view.guides.Container",{extend:"Ext.panel.Panel",alias:"widget.guidecontainer",componentCls:"guide-container",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(c){var d=Ext.get(c);if(!d){d=Ext.get(Ext.query("a[name='"+c+"']")[0])}this.scrollToView(d,{highlight:true,offset:-100})},load:function(b){this.guide=b;this.tpl=this.tpl||new Ext.XTemplate(Docs.data.showPrintButton?'<a class="print guide" href="?print=/guide/{name}" target="_blank">Print</a>':"","{content}");this.update(this.tpl.apply(b));Docs.Syntax.highlight(this.getEl());if(Docs.Comments.isEnabled()){this.initComments()}this.fireEvent("afterload")},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"guide",name:this.guide.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["guide",this.guide.name,""]))}});Ext.define("Docs.view.videos.Container",{extend:"Ext.panel.Panel",alias:"widget.videocontainer",componentCls:"video-container",requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.callParent(arguments);this.on("hide",this.pauseVideo,this)},pauseVideo:function(){var b=document.getElementById("video_player");if(b&&b.api_pause){b.api_pause()}},load:function(b){this.video=b;this.tpl=this.tpl||new Ext.XTemplate('<iframe src="http://player.vimeo.com/video/{id}" width="640" height="360" frameborder="0" ',"webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>","<h1>{title}</h1>","<p>{[this.linkify(values.description)]}</p>",{linkify:function(a){return a.replace(/(\bhttps?:\/\/\S+)/ig,"<a href='$1'>$1</a>")}});this.update(this.tpl.apply(b));if(Docs.Comments.isEnabled()){this.initComments()}},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"video",name:this.video.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["video",this.video.name,""]))}});Ext.define("Docs.view.comments.MemberWrap",{extend:"Docs.view.cls.MemberWrap",requires:["Docs.Comments","Docs.view.comments.Expander"],constructor:function(d){this.callParent([d]);var c=Docs.Comments.getCount(this.getTarget());if(c>0){this.updateSignatureCommentCount(c)}},getTarget:function(){if(!this.target){this.target=["class",this.getDefinedIn(),this.getMemberId()]}return this.target},getExpander:function(){if(!this.expander){var b=Ext.DomHelper.append(this.el.down(".long"),"<div></div>");this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(this.getTarget()),target:this.getTarget(),newCommentTitle:this.getNewCommentTitle(),renderTo:b})}return this.expander},setCount:function(b){this.getExpander().setCount(b);this.updateSignatureCommentCount(b)},updateSignatureCommentCount:function(g){var e=this.el.down(".title");var f=e.down(".comment-counter-small");if(g>0){if(f){f.update(""+g)}else{var h=Ext.DomHelper.append(e,Docs.Comments.counterHtml(g),true);h.on("click",function(){this.el.addCls("open");this.getExpander().expand();this.parent.scrollToEl(this.getExpander().getEl())},this)}}else{if(f){f.remove()}}},getNewCommentTitle:function(){if(this.getDefinedIn()!==this.className){return["<b>Be aware.</b> This member is inherited from <b>"+this.getDefinedIn()+"</b>; ","comments posted here will also be posted to that page."].join("")}else{return undefined}},setExpanded:function(b){this.callParent([b]);if(b){this.getExpander().show()}}});Ext.define("Docs.view.comments.Template",{extend:"Ext.XTemplate",requires:["Docs.Auth","Docs.Comments"],statics:{create:function(d){var c="tpl-"+Ext.JSON.encode(d);if(!this[c]){this[c]=new this();Ext.apply(this[c],d)}return this[c]}},constructor:function(){this.callParent(["<div>",'<tpl for=".">','<div class="comment" id="{id}">','<tpl if="deleted">','<div class="deleted-comment">Comment was deleted. <a href="#" class="undoDeleteComment">Undo</a>.</div>',"<tpl else>",'<div class="com-meta">',"{[this.avatar(values.emailHash)]}",'<div class="author<tpl if="moderator"> moderator" title="Sencha Engineer</tpl>">',"{author}",'<tpl if="this.isTargetVisible()">','<span class="target"> on {[this.target(values.target)]}</span>',"</tpl>","</div>",'<div class="top-right">','<tpl for="tags">','<span href="#" class="command tag">',"<b>{.}</b>",'<tpl if="this.isMod()"><a href="#" class="remove-tag" title="Delete tag">&ndash;</a></tpl>',"</span>","</tpl>",'<tpl if="this.isMod()">','<a href="#" class="command add-tag" title="Add new tag">+</a>',"</tpl>",'<tpl if="this.isMod()">','<a href="#" class="command readComment <tpl if="read">read</tpl>">Read</a>',"</tpl>",'<tpl if="this.isMod() || this.isAuthor(values.author)">','<a href="#" class="command editComment">Edit</a>','<a href="#" class="command deleteComment">Delete</a>',"</tpl>",'<span class="time" title="{[this.date(values.createdAt)]}">{[this.dateStr(values.createdAt)]}</span>',"</div>",'<div class="vote">','<a href="#" class="voteCommentUp{[values.upVote ? " selected" : ""]}" ','title="Vote Up">&nbsp;</a>','<span class="score">{score}</span>','<a href="#" class="voteCommentDown{[values.downVote ? " selected" : ""]}" ','title="Vote Down">&nbsp;</a>',"</div>","</div>",'<div class="content">{contentHtml}</div>',"</tpl>","</div>","</tpl>","</div>",this])},avatar:function(b){return Docs.Comments.avatar(b,this.isMod()&&this.enableDragDrop?"drag-handle":"")},isTargetVisible:function(){return this.showTarget},dateStr:function(e){try{var h=Math.ceil(Number(new Date())/1000);var i=Math.ceil(Number(new Date(e))/1000);var k=h-i;if(k<60){return"just now"}else{if(k<60*60){var j=String(Math.round(k/(60)));return j+(j=="1"?" minute":" minutes")+" ago"}else{if(k<60*60*24){var j=String(Math.round(k/(60*60)));return j+(j=="1"?" hour":" hours")+" ago"}else{if(k<60*60*24*31){var j=String(Math.round(k/(60*60*24)));return j+(j=="1"?" day":" days")+" ago"}else{return Ext.Date.format(new Date(e),"jS M 'y")}}}}}catch(l){return""}},date:function(d){try{return Ext.Date.format(new Date(d),"jS F Y g:ia")}catch(c){return""}},isMod:function(){return Docs.Auth.isModerator()},isAuthor:function(b){return Docs.Auth.getUser().userName==b},target:function(h){var e=h[1],g=h[1],f="#!/api/";if(h[0]=="video"){g="Video "+g;f="#!/video/"}else{if(h[0]=="guide"){g="Guide "+g;f="#!/guide/"}else{if(h[2]!=""){e+="-"+h[2];if(h[0]=="class"){g+="#"+h[2].replace(/^.*-/,"")}else{g+=" "+h[2]}}}}return'<a href="'+f+e+'">'+g+"</a>"}});Ext.define("Docs.view.comments.RepliesExpander",{alias:"widget.commentsRepliesExpander",extend:"Ext.Component",requires:["Docs.Comments"],uses:["Docs.view.comments.ListWithForm"],componentCls:"comments-replies-expander",initComponent:function(){this.tpl=new Ext.XTemplate('<a href="#" class="replies-button {[this.getCountCls(values.count)]}">',"{[this.renderCount(values.count)]}","</a>",{renderCount:this.renderCount,getCountCls:this.getCountCls});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"1 reply..."}else{if(b>1){return b+" replies..."}else{return"Write reply..."}}},getCountCls:function(b){return(b>0)?"with-replies":""},afterRender:function(){this.callParent(arguments);this.getEl().down(".replies-button").on("click",this.toggle,this,{preventDefault:true})},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().down(".replies-button").update("Hide replies.");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.refreshRepliesButton();if(this.list){this.list.hide()}},refreshRepliesButton:function(){var b=this.getEl().down(".replies-button");b.update(this.renderCount(this.count));b.removeCls("with-replies");b.addCls(this.getCountCls(this.count))},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,parentId:this.parentId,newCommentTitle:"<b>Reply to comment</b>",renderTo:this.getEl(),listeners:{countChange:this.setCount,scope:this}});Docs.Comments.loadReplies(this.parentId,function(b){this.list.load(b)},this)},setCount:function(b){this.count=b;if(!this.expanded){this.refreshRepliesButton()}}});Ext.define("Docs.model.Comment",{extend:"Ext.data.Model",requires:["Docs.Comments"],fields:[{name:"id",mapping:"_id"},"author","emailHash","moderator","createdAt","target","score","upVote","downVote","contentHtml","read","tags","deleted","parentId","replyCount"],proxy:{type:"ajax",reader:"json"},vote:function(c,d){this.request({method:"POST",url:"/comments/"+this.get("id"),params:{vote:c},success:function(a){this.set("upVote",a.direction==="up");this.set("downVote",a.direction==="down");this.set("score",a.total);this.commit()},failure:Ext.Function.bind(d.failure,d.scope),scope:this})},loadContent:function(c,d){this.request({url:"/comments/"+this.get("id"),method:"GET",success:function(a){c.call(d,a.content)},scope:this})},saveContent:function(b){this.request({url:"/comments/"+this.get("id"),method:"POST",params:{content:b},success:function(a){this.set("contentHtml",a.content);this.commit()},scope:this})},setDeleted:function(b){this.request({url:"/comments/"+this.get("id")+(b?"/delete":"/undo_delete"),method:"POST",success:function(){this.set("deleted",b);this.commit();Docs.Comments.changeCount(this.get("target"),b?-1:+1)},scope:this})},markRead:function(){this.request({url:"/comments/"+this.get("id")+"/read",method:"POST",success:function(){this.set("read",true);this.commit()},scope:this})},setParent:function(d,f,e){this.request({url:"/comments/"+this.get("id")+"/set_parent",method:"POST",params:d?{parentId:d.get("id")}:undefined,success:f,scope:e})},addTag:function(b){this.changeTag("add_tag",b,function(){this.get("tags").push(b)},this)},removeTag:function(b){this.changeTag("remove_tag",b,function(){Ext.Array.remove(this.get("tags"),b)},this)},changeTag:function(h,e,g,f){this.request({url:"/comments/"+this.get("id")+"/"+h,method:"POST",params:{tagname:e},success:function(){g.call(f);this.commit()},scope:this})},request:function(b){Docs.Comments.request("ajax",{url:b.url,method:b.method,params:b.params,callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){b.success&&b.success.call(b.scope,g)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})}});Ext.define("Docs.CommentsProxy",{extend:"Ext.data.proxy.JsonP",alias:"proxy.comments",requires:["Docs.Comments"],constructor:function(b){b.url=Docs.Comments.buildRequestUrl(b.url);this.callParent([b])}});Ext.define("Docs.model.Target",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["id","type","cls","member","score",{name:"text",convert:function(e,f){var d=f.data;if(d.type==="class"){return d.cls+(d.member?"#"+d.member.replace(/^.*-/,""):"")}else{return d.type+" "+d.cls}}}],proxy:{type:"comments",url:"/targets",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Targets",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTargets",requires:["Docs.model.Target"],model:"Docs.model.Target",displayField:"text",filterEmptyText:"Filter topics by name..."});Ext.define("Docs.model.Tag",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["tagname","score"],proxy:{type:"comments",url:"/tags",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Tags",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTags",requires:["Docs.model.Tag"],model:"Docs.model.Tag",displayField:"tagname",filterEmptyText:"Filter tags by name..."});Ext.define("Docs.view.comments.TagEditor",{extend:"Ext.container.Container",requires:["Docs.model.Tag"],floating:true,hidden:true,componentCls:"comments-tageditor",statics:{cachedStore:undefined,getStore:function(){if(!this.cachedStore){this.cachedStore=Ext.create("Ext.data.Store",{model:"Docs.model.Tag",listeners:{load:function(){this.cachedStore.sort("tagname","ASC")},scope:this}});this.cachedStore.load()}return this.cachedStore}},initComponent:function(){this.items=[{xtype:"combobox",listConfig:{cls:"comments-tageditor-boundlist"},store:this.statics().getStore(),queryMode:"local",displayField:"tagname",valueField:"tagname",enableKeyEvents:true,emptyText:"New tag name...",listeners:{select:this.handleSelect,blur:this.destroy,keyup:this.onKeyUp,scope:this}}];this.callParent(arguments)},popup:function(b){this.show();this.alignTo(b,"bl",[-12,-2]);this.down("combobox").focus(true,100)},onKeyUp:function(c,d){if(d.keyCode===Ext.EventObject.ENTER){this.handleSelect()}else{if(d.keyCode===Ext.EventObject.ESC){this.destroy()}}},handleSelect:function(){var c=Ext.String.trim(this.down("combobox").getValue()||"");if(c){var d=this.rememberNewTag(c);this.fireEvent("select",d)}this.destroy()},rememberNewTag:function(g){var f=this.statics().getStore();var e=new RegExp("^"+Ext.String.escapeRegex(g)+"$","i");var h=f.query("tagname",e);if(h.getCount()===0){f.add({tagname:g});f.sort("tagname","ASC");return g}else{return h.get(0).get("tagname")}}});Ext.define("Docs.view.comments.List",{extend:"Ext.view.View",alias:"widget.commentsList",requires:["Docs.Auth","Docs.Syntax","Docs.Comments","Docs.view.comments.Template","Docs.view.comments.Form","Docs.view.comments.TagEditor","Docs.view.comments.RepliesExpander","Docs.view.comments.DragZone","Docs.view.comments.DropZone","Docs.model.Comment","Docs.Tip"],componentCls:"comments-list",itemSelector:"div.comment",emptyText:'<div class="loading">Loading...</div>',deferEmptyText:false,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Comment",listeners:{update:this.fireChangeEvent,scope:this}});this.tpl=Docs.view.comments.Template.create({showTarget:this.showTarget,enableDragDrop:this.enableDragDrop});this.callParent(arguments);this.on("refresh",function(){Docs.Syntax.highlight(this.getEl());this.renderExpanders(this.store.getRange())},this);this.on("itemupdate",function(f,e,d){Docs.Syntax.highlight(d);this.renderExpanders([f])},this)},renderExpanders:function(b){if(b[0]&&b[0].get("parentId")){return}Ext.Array.forEach(b,function(a){if(a.get("deleted")){return}new Docs.view.comments.RepliesExpander({count:a.get("replyCount"),target:a.get("target"),parentId:a.get("id"),renderTo:this.getNode(a)})},this)},afterRender:function(){this.callParent(arguments);this.mun(this.getTargetEl(),"keydown");this.delegateClick("a.voteCommentUp",function(d,c){this.vote(d,c,"up")},this);this.delegateClick("a.voteCommentDown",function(d,c){this.vote(d,c,"down")},this);this.delegateClick("a.editComment",function(d,c){this.edit(d,c)},this);this.delegateClick("a.deleteComment",function(d,c){this.setDeleted(d,c,true)},this);this.delegateClick("a.undoDeleteComment",function(d,c){this.setDeleted(d,c,false)},this);this.delegateClick("a.readComment",this.markRead,this);this.delegateClick("a.add-tag",this.addTag,this);this.delegateClick("a.remove-tag",this.removeTag,this);if(this.enableDragDrop){new Docs.view.comments.DragZone(this);new Docs.view.comments.DropZone(this,{onValidDrop:Ext.Function.bind(this.setParent,this)})}},delegateClick:function(e,f,d){this.getEl().on("click",function(b,c){var a=this.getRecord(this.findItemByChild(c));if(a){f.call(d,c,a)}},this,{preventDefault:true,delegate:e})},vote:function(e,f,d){if(!Docs.Auth.isLoggedIn()){Docs.Tip.show("Please login to vote on this comment",e);return}if(f.get("upVote")&&d==="up"||f.get("downVote")&&d==="down"){Docs.Tip.show("You have already voted on this comment",e);return}f.vote(d,{failure:function(a){Docs.Tip.show(a,e)}})},edit:function(d,c){c.loadContent(function(a){var b=Ext.get(d).up(".comment").down(".content");b.update("");new Docs.view.comments.Form({renderTo:b,title:"<b>Edit comment</b>",user:Docs.Auth.getUser(),content:a,listeners:{submit:function(f){c.saveContent(f)},cancel:function(){this.refreshComment(c)},scope:this}})},this)},refreshComment:function(b){this.refreshNode(this.getStore().findExact("id",b.get("id")))},setDeleted:function(d,f,e){f.setDeleted(e)},markRead:function(d,c){c.markRead()},addTag:function(d,f){var e=new Docs.view.comments.TagEditor();e.on("select",f.addTag,f);e.popup(d)},removeTag:function(e,f){var d=Ext.get(e).up(".tag").down("b").getHTML();f.removeTag(d)},setParent:function(c,d){c.setParent(d,function(){this.fireEvent("reorder")},this)},load:function(f,e){if(f.length===0){this.emptyText=""}var d=this.store.getProxy().getReader().readRecords(f).records;this.store.loadData(d,e);this.fireChangeEvent()},fireChangeEvent:function(){var b=function(a){return !a.get("deleted")};this.fireEvent("countChange",this.getStore().queryBy(b).getCount())}});Ext.define("Docs.view.comments.FullList",{extend:"Ext.panel.Panel",alias:"widget.commentsFullList",requires:["Docs.Settings","Docs.Auth","Docs.Comments","Docs.view.comments.List","Docs.view.comments.Pager"],componentCls:"comments-full-list",dockedItems:[{xtype:"container",dock:"top",height:35,html:['<h1 style="float:left;">Comments</h1>','<p style="float:left; margin: 5px 0 0 25px">','<label style="padding-right: 10px;"><input type="checkbox" name="hideRead" id="hideRead" /> Hide read</label>',"</p>"].join(" ")}],layout:"border",items:[{xtype:"tabpanel",cls:"comments-tabpanel",plain:true,region:"north",height:25,items:[{title:"Recent"},{title:"Votes"}]},{region:"center",xtype:"container",autoScroll:true,cls:"iScroll",items:[{xtype:"commentsList",id:"recentcomments",showTarget:true},{xtype:"commentsPager"}]}],afterRender:function(){this.callParent(arguments);this.initCheckboxes();this.initTabs();this.setMasked(true)},load:function(f,e){this.down("commentsList").load(f,e);var d=f[f.length-1];if(d){this.down("commentsPager").configure(d)}else{this.down("commentsPager").reset()}},setMasked:function(c){var d=this.getEl();if(d){d[c?"mask":"unmask"]()}},initCheckboxes:function(){var f=Docs.Settings.get("comments");var e=Ext.get("hideRead");if(e){e.dom.checked=f.hideRead;e.on("change",function(){this.saveSetting("hideRead",e.dom.checked);this.fireEvent("hideReadChange")},this)}this.setHideReadVisibility();var d=Docs.App.getController("Auth");d.on("available",this.setHideReadVisibility,this);d.on("loggedIn",this.setHideReadVisibility,this);d.on("loggedOut",this.setHideReadVisibility,this)},setHideReadVisibility:function(){var b=Docs.Auth.isModerator();Ext.get("hideRead").up("label").setStyle("display",b?"inline":"none")},initTabs:function(){this.down("tabpanel[cls=comments-tabpanel]").on("tabchange",function(d,c){if(c.title==="Recent"){this.fireEvent("sortOrderChange","recent")}else{this.fireEvent("sortOrderChange","votes")}},this)},saveSetting:function(d,e){var f=Docs.Settings.get("comments");f[d]=e;Docs.Settings.set("comments",f)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.comments.Index",{extend:"Ext.panel.Panel",alias:"widget.commentindex",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.FullList","Docs.view.comments.HeaderMenu","Docs.view.comments.Users","Docs.view.comments.Targets","Docs.view.comments.Tags"],componentCls:"comments-index",margin:"10 0 0 0",layout:"border",items:[{region:"center",xtype:"commentsFullList"},{region:"east",itemId:"cardPanel",layout:"border",width:300,margin:"0 0 0 20",layout:"card",dockedItems:[{xtype:"commentsHeaderMenu",dock:"top",height:35}],items:[{xtype:"commentsUsers"},{xtype:"commentsTargets"},{xtype:"commentsTags"}]}],initComponent:function(){this.callParent(arguments);var d=this.down("#cardPanel");var c={users:this.down("commentsUsers"),targets:this.down("commentsTargets"),tags:this.down("commentsTags")};this.down("commentsHeaderMenu").on("select",function(a){Ext.Object.each(c,function(b,f){if(b!==a){f.deselectAll()}});d.getLayout().setActiveItem(c[a])},this)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.HoverMenu",{extend:"Ext.view.View",requires:["Docs.Comments","Docs.view.Signature"],alias:"widget.hovermenu",componentCls:"hover-menu",itemSelector:"div.item",deferEmptyText:false,columnHeight:25,initComponent:function(){this.renderTo=Ext.getBody();this.tpl=new Ext.XTemplate("<table>","<tr>","<td>",'<tpl for=".">','<div class="item">',"{[this.renderLink(values)]}","</div>",'<tpl if="xindex % this.columnHeight === 0 && xcount &gt; xindex">',"</td><td>","</tpl>","</tpl>","</td>","</tr>","</table>",{columnHeight:this.columnHeight,renderLink:function(e){var d=Docs.view.Signature.render(e.meta);var f=Docs.Comments.counterHtml(e.commentCount);return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2} {3}</a>',e.url,e.label,d,f)}});this.callParent()}});Ext.define("Docs.view.HoverMenuButton",{extend:"Ext.toolbar.TextItem",alias:"widget.hovermenubutton",componentCls:"hover-menu-button",requires:["Docs.view.HoverMenu"],showCount:false,statics:{menus:[]},initComponent:function(){this.addEvents("click");if(this.showCount){this.initialText=this.text;this.text+=" <sup>"+this.store.getCount()+"</sup>";this.store.on("datachanged",function(){this.setText(this.initialText+" <sup>"+this.store.getCount()+"</sup>")},this)}this.callParent(arguments)},getColumnHeight:function(){var c=200;var d=18;return Math.floor((Ext.Element.getViewportHeight()-c)/d)},onRender:function(){this.callParent(arguments);this.getEl().on({click:function(){this.fireEvent("click")},mouseover:this.deferShowMenu,mouseout:this.deferHideMenu,scope:this})},onDestroy:function(){if(this.menu){this.menu.destroy();Ext.Array.remove(Docs.view.HoverMenuButton.menus,this.menu)}this.callParent(arguments)},renderMenu:function(){this.menu=Ext.create("Docs.view.HoverMenu",{store:this.store,columnHeight:this.getColumnHeight()});this.menu.getEl().on({click:function(b){this.menu.hide();b.preventDefault()},mouseover:function(){clearTimeout(this.hideTimeout)},mouseout:this.deferHideMenu,scope:this});Docs.view.HoverMenuButton.menus.push(this.menu)},deferHideMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);if(!this.menu){return}this.hideTimeout=Ext.Function.defer(function(){this.menu.hide()},200,this)},deferShowMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);Docs.view.HoverMenuButton.showTimeout=Ext.Function.defer(function(){if(!this.menu){this.renderMenu()}Ext.Array.forEach(Docs.view.HoverMenuButton.menus,function(a){if(a!==this.menu){a.hide()}},this);clearTimeout(this.hideTimeout);this.menu.show();var j=this.getEl().getXY(),n=Ext.ComponentQuery.query("classoverview toolbar")[0],k=j[0]-10,l=n.getEl().getXY(),i=n.getWidth(),m=this.menu.getEl().getWidth(),h=Ext.getCmp("doctabs").getWidth();if(m>h){k=0}else{if((k+m)>h){k=h-m-30}}if(k<l[0]){k=l[0]}this.menu.getEl().setStyle({left:k+"px",top:(j[1]+25)+"px"})},200,this)},getStore:function(){return this.store}});Ext.define("Docs.view.cls.Toolbar",{extend:"Ext.toolbar.Toolbar",requires:["Docs.view.HoverMenuButton","Docs.Settings","Docs.Comments","Ext.form.field.Checkbox"],dock:"top",cls:"member-links",docClass:{},accessors:{},initComponent:function(){this.addEvents("menubuttonclick","commentcountclick","filter","toggleExpanded");this.items=[];this.memberButtons={};Ext.Array.forEach(Docs.data.memberTypes,function(e){var a=Ext.Array.filter(this.docClass.members,function(c){return c.tagname===e.name});a.sort(function(c,d){if(c.name==="constructor"&&c.tagname==="method"){return -1}return c.name<d.name?-1:(c.name>d.name?1:0)});if(a.length>0){var f=this.createMemberButton({text:e.toolbar_title||e.title,type:e.name,members:a});this.memberButtons[e.name]=f;this.items.push(f)}},this);this.checkItems={"public":this.createCb("Public","public"),"protected":this.createCb("Protected","protected"),"private":this.createCb("Private","private"),inherited:this.createCb("Inherited","inherited"),accessor:this.createCb("Accessor","accessor"),deprecated:this.createCb("Deprecated","deprecated"),removed:this.createCb("Removed","removed")};var b=this;this.items=this.items.concat([{xtype:"tbfill"},this.filterField=Ext.widget("triggerfield",{triggerCls:"reset",cls:"member-filter",hideTrigger:true,emptyText:"Filter class members",enableKeyEvents:true,width:150,listeners:{keyup:function(a){this.fireEvent("filter",a.getValue(),this.getShowFlags());a.setHideTrigger(a.getValue().length===0)},specialkey:function(d,a){if(a.keyCode===Ext.EventObject.ESC){d.reset();this.fireEvent("filter","",this.getShowFlags())}},scope:this},onTriggerClick:function(){this.reset();this.focus();b.fireEvent("filter","",b.getShowFlags());this.setHideTrigger(true)}}),{xtype:"tbspacer",width:10},this.commentCount=this.createCommentCount(),{xtype:"button",text:"Show",menu:[this.checkItems["public"],this.checkItems["protected"],this.checkItems["private"],"-",this.checkItems.inherited,this.checkItems.accessor,this.checkItems.deprecated,this.checkItems.removed]},{xtype:"button",iconCls:"expand-all-members",tooltip:"Expand all",enableToggle:true,toggleHandler:function(a,d){a.setIconCls(d?"collapse-all-members":"expand-all-members");this.fireEvent("toggleExpanded",d)},scope:this}]);this.callParent(arguments)},getShowFlags:function(){var d={};for(var c in this.checkItems){d[c]=this.checkItems[c].checked}return d},createCb:function(c,d){return Ext.widget("menucheckitem",{text:c,checked:Docs.Settings.get("show")[d],listeners:{checkchange:function(){this.fireEvent("filter",this.filterField.getValue(),this.getShowFlags())},scope:this}})},createMemberButton:function(d){var c=Ext.Array.map(d.members,function(a){return this.createLinkRecord(this.docClass.name,a)},this);return Ext.create("Docs.view.HoverMenuButton",{text:d.text,cls:"icon-"+d.type,store:this.createStore(c),showCount:true,listeners:{click:function(){this.fireEvent("menubuttonclick",d.type)},scope:this}})},createStore:function(c){var d=Ext.create("Ext.data.Store",{fields:["id","url","label","inherited","accessor","meta","commentCount"]});d.add(c);return d},createLinkRecord:function(d,c){return{id:c.id,url:d+"-"+c.id,label:(c.tagname==="method"&&c.name==="constructor")?"new "+d:c.name,inherited:c.owner!==d,accessor:c.tagname==="method"&&this.accessors.hasOwnProperty(c.name),meta:c.meta,commentCount:Docs.Comments.getCount(["class",d,c.id])}},showMenuItems:function(d,e,f){Ext.Array.forEach(Docs.data.memberTypes,function(b){var c=this.memberButtons[b.name];if(c){c.getStore().filterBy(function(h){return !(!d["public"]&&!(h.get("meta")["private"]||h.get("meta")["protected"])||!d["protected"]&&h.get("meta")["protected"]||!d["private"]&&h.get("meta")["private"]||!d.inherited&&h.get("inherited")||!d.accessor&&h.get("accessor")||!d.deprecated&&h.get("meta")["deprecated"]||!d.removed&&h.get("meta")["removed"]||e&&!f.test(h.get("label")))});var a=c.menu;if(a&&Ext.getVersion().version>="4.1.0"){a.show();a.hide()}}},this)},getFilterValue:function(){return this.filterField.getValue()},createCommentCount:function(){return Ext.create("Ext.container.Container",{width:24,margin:"0 4 0 0",cls:"comment-btn",html:"0",hidden:true,listeners:{afterrender:function(b){b.el.addListener("click",function(){this.fireEvent("commentcountclick")},this)},scope:this}})},showCommentCount:function(){this.commentCount.show()},setCommentCount:function(b){this.commentCount.update(""+(b||0));this.refreshMenuCommentCounts()},refreshMenuCommentCounts:function(){Ext.Object.each(this.memberButtons,function(c,d){d.getStore().each(function(a){a.set("commentCount",Docs.Comments.getCount(["class",this.docClass.name,a.get("id")]))},this)},this)}});Ext.define("Docs.view.cls.Overview",{extend:"Ext.panel.Panel",alias:"widget.classoverview",requires:["Docs.view.cls.Toolbar","Docs.view.examples.Inline","Docs.view.comments.LargeExpander","Docs.view.cls.MemberWrap","Docs.view.comments.MemberWrap","Docs.Syntax","Docs.Settings","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-overview iScroll",autoScroll:true,border:false,bodyPadding:"20 8 20 5",initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(j,h){var g=(typeof j=="string")?Ext.get(Ext.query(j)[0]):j;if(g){var f=g.hasCls("member");g.show();if(!g.isVisible(true)){g.up(".subsection").show();g.up(".members-section").show()}if(f&&g.down(".expandable")){this.setMemberExpanded(j.replace(/#/,""),true)}var i=this.body.getBox().y;this.scrollToView(g,{highlight:true,offset:(h||0)-(f?i:i-10)})}},load:function(b){this.docClass=b;this.accessors=this.buildAccessorsMap();if(this.toolbar){this.removeDocked(this.toolbar,false);this.toolbar.destroy()}this.toolbar=Ext.create("Docs.view.cls.Toolbar",{docClass:this.docClass,accessors:this.accessors,listeners:{filter:function(d,a){this.filterMembers(d,a)},menubuttonclick:function(a){this.scrollToEl("h3.members-title.icon-"+a,-20)},commentcountclick:this.expandClassComments,scope:this}});this.addDocked(this.toolbar);this.update(b.html);Docs.Syntax.highlight(this.getEl());this.filterMembers("",Docs.Settings.get("show"));if(Docs.Comments.isEnabled()){this.initComments()}else{this.initBasicMemberWrappers()}this.fireEvent("afterload")},initComments:function(){this.toolbar.showCommentCount();this.toolbar.setCommentCount(Docs.Comments.getCount(["class",this.docClass.name,""]));this.clsExpander=new Docs.view.comments.LargeExpander({name:this.docClass.name,el:Ext.query(".doc-contents")[0]});this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.comments.MemberWrap({parent:this,className:this.docClass.name,el:c});this.memberWrappers[d.getMemberId()]=d},this)},initBasicMemberWrappers:function(){this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.cls.MemberWrap({el:c});this.memberWrappers[d.getMemberId()]=d},this)},updateCommentCounts:function(){if(!this.docClass){return}var b=Docs.Comments.getCount(["class",this.docClass.name,""]);this.toolbar.setCommentCount(b);this.clsExpander.getExpander().setCount(b);Ext.Object.each(this.memberWrappers,function(a,d){d.setCount(Docs.Comments.getCount(d.getTarget()))},this)},expandClassComments:function(){var b=this.clsExpander.getExpander();b.expand();this.scrollToEl(b.getEl(),-40)},setMemberExpanded:function(c,d){this.memberWrappers[c].setExpanded(d)},isMemberExpanded:function(b){return this.memberWrappers[b].isExpanded()},setAllMembersExpanded:function(b){if(Docs.Comments.isEnabled()){Ext.Object.each(this.memberWrappers,function(a,d){d.getExpander().show()},this)}Ext.Object.each(this.memberWrappers,function(a,d){d.setExpanded(b)},this)},filterMembers:function(h,e){Docs.Settings.set("show",e);var f=h.length>0;Ext.Array.forEach(Ext.query(".doc-contents, .hierarchy"),function(a){Ext.get(a).setStyle({display:f?"none":"block"})});var g=new RegExp(Ext.String.escapeRegex(h),"i");this.eachMember(function(c){var b=Ext.get(c.id);var a=!(!e["public"]&&!(c.meta["private"]||c.meta["protected"])||!e["protected"]&&c.meta["protected"]||!e["private"]&&c.meta["private"]||!e.inherited&&(c.owner!==this.docClass.name)||!e.accessor&&c.tagname==="method"&&this.accessors.hasOwnProperty(c.name)||!e.deprecated&&c.meta.deprecated||!e.removed&&c.meta.removed||f&&!g.test(c.name));if(a){b.setStyle({display:"block"})}else{b.setStyle({display:"none"})}},this);Ext.Array.forEach(Ext.query(".member.first-child"),function(a){Ext.get(a).removeCls("first-child")});Ext.Array.forEach(Ext.query(".members-section"),function(b){var a=this.getVisibleElements(".member",b);Ext.get(b).setStyle({display:a.length>0?"block":"none"});Ext.Array.forEach(Ext.query(".subsection",b),function(d){var c=this.getVisibleElements(".member",d);if(c.length>0){c[0].addCls("first-child");Ext.get(d).setStyle({display:"block"})}else{Ext.get(d).setStyle({display:"none"})}},this)},this);this.toolbar.showMenuItems(e,f,g)},buildAccessorsMap:function(c){var d={};Ext.Array.forEach(this.docClass.members,function(b){if(b.tagname==="cfg"){var a=Ext.String.capitalize(b.name);d["get"+a]=true;d["set"+a]=true}});return d},getVisibleElements:function(e,d){var f=Ext.Array.map(Ext.query(e,d),function(a){return Ext.get(a)});return Ext.Array.filter(f,function(a){return a.isVisible()})},eachMember:function(c,d){Ext.Array.forEach(this.docClass.members,c,d)}});Ext.define("Docs.view.cls.Container",{extend:"Ext.container.Container",alias:"widget.classcontainer",requires:["Docs.view.cls.Header","Docs.view.cls.Overview"],layout:"border",padding:"5 10 0 10",initComponent:function(){this.items=[Ext.create("Docs.view.cls.Header",{region:"north"}),Ext.create("Docs.view.cls.Overview",{region:"center"})];this.callParent(arguments)}});Ext.define("Docs.view.Viewport",{extend:"Ext.container.Viewport",requires:["Docs.view.search.Container","Docs.view.Header","Docs.view.Tabs","Docs.view.TreeContainer","Docs.view.welcome.Index","Docs.view.auth.HeaderForm","Docs.view.comments.Index","Docs.view.cls.Index","Docs.view.cls.Container","Docs.view.guides.Index","Docs.view.guides.Container","Docs.view.videos.Index","Docs.view.videos.Container","Docs.view.examples.Index","Docs.view.examples.Container","Docs.view.examples.TouchContainer","Docs.view.tests.Index"],id:"viewport",layout:"border",defaults:{xtype:"container"},initComponent:function(){this.items=[{region:"north",id:"north-region",height:65,layout:{type:"vbox",align:"stretch"},items:[{height:37,xtype:"container",layout:"hbox",items:[{xtype:"docheader"},{xtype:"container",flex:1},{id:"loginContainer",xtype:"authHeaderForm",padding:"10 20 0 0"},{xtype:"searchcontainer",id:"search-container",width:230,margin:"4 0 0 0"}]},{xtype:"doctabs"}]},{region:"center",layout:"border",items:[{region:"west",xtype:"treecontainer",id:"treecontainer",border:1,bodyPadding:"10 9 4 9",width:240},{region:"center",id:"center-container",layout:"fit",border:false,padding:"5 10",items:{id:"card-panel",cls:"card-panel",xtype:"container",layout:{type:"card",deferredRender:true},items:[{autoScroll:true,xtype:"welcomeindex",id:"welcomeindex"},{xtype:"container",id:"failure"},{autoScroll:true,xtype:"classindex",id:"classindex"},{xtype:"classcontainer",id:"classcontainer"},{autoScroll:true,xtype:"guideindex",id:"guideindex"},{autoScroll:true,xtype:"guidecontainer",id:"guide",cls:"iScroll"},{xtype:"videoindex",id:"videoindex"},{autoScroll:true,xtype:"videocontainer",id:"video",cls:"iScroll"},{xtype:"exampleindex",id:"exampleindex"},{xtype:Docs.data.touchExamplesUi?"touchexamplecontainer":"examplecontainer",id:"example"},{xtype:"testsindex",id:"testsindex"},{xtype:"commentindex",id:"commentindex"}]}}]},{region:"south",id:"footer",height:20,contentEl:"footer-content"}];this.callParent(arguments)},setPageTitle:function(b){b=Ext.util.Format.stripTags(b);if(!this.origTitle){this.origTitle=document.title}document.title=b?(b+" - "+this.origTitle):this.origTitle}});Ext.define("Docs.Application",{requires:["Ext.app.Application","Docs.History","Docs.Comments","Docs.Settings","Docs.view.Viewport","Docs.controller.Auth","Docs.controller.Welcome","Docs.controller.Failure","Docs.controller.Classes","Docs.controller.Search","Docs.controller.InlineExamples","Docs.controller.Examples","Docs.controller.Guides","Docs.controller.Videos","Docs.controller.Tabs","Docs.controller.Comments","Docs.controller.CommentCounts","Docs.controller.Tests"],constructor:function(){Docs.Comments.init(this.createApp,this)},createApp:function(){new Ext.app.Application({name:"Docs",controllers:["Auth","Welcome","Failure","Classes","Search","InlineExamples","Examples","Guides","Videos","Tabs","Comments","CommentCounts","Tests"],launch:this.launch})},launch:function(){Docs.App=this;Docs.Settings.init();Ext.create("Docs.view.Viewport");Docs.History.init();if(Docs.initEventTracking){Docs.initEventTracking()}Ext.get("loading").remove()}});Ext.define("Docs.view.auth.Form",{extend:"Docs.view.auth.BaseForm",alias:"widget.authForm",componentCls:"auth-form",initComponent:function(){this.html=['<span class="before-text">Sign in to post a comment:</span>',this.createLoginFormHtml()];this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.bindFormSubmitEvent()}});Ext.define("Docs.view.comments.ListWithForm",{extend:"Ext.container.Container",alias:"widget.commentsListWithForm",requires:["Docs.view.comments.List","Docs.view.comments.Form","Docs.view.auth.Form","Docs.Comments","Docs.Auth"],componentCls:"comments-list-with-form",initComponent:function(){this.items=[this.list=new Docs.view.comments.List({enableDragDrop:true})];this.relayEvents(this.list,["countChange","reorder"]);this.callParent(arguments)},load:function(c,d){this.list.load(c,d);if(Docs.Auth.isLoggedIn()){this.showCommentingForm()}else{this.showAuthForm()}},showAuthForm:function(){if(this.commentingForm){this.remove(this.commentingForm);delete this.commentingForm}if(!this.authForm){this.authForm=new Docs.view.auth.Form();this.add(this.authForm)}},showCommentingForm:function(){if(this.authForm){this.remove(this.authForm);delete this.authForm}if(!this.commentingForm){this.commentingForm=new Docs.view.comments.Form({title:this.newCommentTitle,user:Docs.Auth.getUser(),userSubscribed:Docs.Comments.hasSubscription(this.target),listeners:{submit:this.postComment,subscriptionChange:this.subscribe,scope:this}});this.add(this.commentingForm)}},postComment:function(b){Docs.Comments.post({target:this.target,parentId:this.parentId,content:b,callback:function(a){this.commentingForm.setValue("");this.list.load([a],true)},scope:this})},subscribe:function(b){Docs.Comments.subscribe(this.target,b,function(){this.commentingForm.showSubscriptionMessage(b)},this)}});Ext.ns("Docs");Ext.Loader.setConfig({enabled:true,paths:{Docs:"app"}});Ext.require("Ext.form.field.Trigger");Ext.require("Ext.tab.Panel");Ext.require("Ext.grid.column.Action");Ext.require("Ext.grid.plugin.DragDrop");Ext.require("Ext.layout.container.Border");Ext.require("Ext.data.TreeStore");Ext.require("Ext.toolbar.Spacer");Ext.require("Docs.Application");Ext.onReady(function(){Ext.create("Docs.Application")});!function(){var a=null;window.PR_SHOULD_USE_CONTINUATION=!0;(function(){function h(J){function G(O){var M=O.charCodeAt(0);if(M!==92){return M}var N=O.charAt(1);return(M=p[N])?M:"0"<=N&&N<="7"?parseInt(O.substring(1),8):N==="u"||N==="x"?parseInt(O.substring(2),16):O.charCodeAt(1)}function F(M){if(M<32){return(M<16?"\\x0":"\\x")+M.toString(16)}M=String.fromCharCode(M);return M==="\\"||M==="-"||M==="]"||M==="^"?"\\"+M:M}function I(R){var M=R.substring(1,R.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),R=[],O=M[0]==="^",S=["["];O&&S.push("^");for(var O=O?1:0,Q=M.length;O<Q;++O){var P=M[O];if(/\\[bdsw]/i.test(P)){S.push(P)}else{var P=G(P),N;O+2<Q&&"-"===M[O+1]?(N=G(M[O+2]),O+=2):N=P;R.push([P,N]);N<65||P>122||(N<65||P>90||R.push([Math.max(65,P)|32,Math.min(N,90)|32]),N<97||P>122||R.push([Math.max(97,P)&-33,Math.min(N,122)&-33]))}}R.sort(function(U,T){return U[0]-T[0]||T[1]-U[1]});M=[];Q=[];for(O=0;O<R.length;++O){P=R[O],P[0]<=Q[1]+1?Q[1]=Math.max(Q[1],P[1]):M.push(Q=P)}for(O=0;O<M.length;++O){P=M[O],S.push(F(P[0])),P[1]>P[0]&&(P[1]+1>P[0]&&S.push("-"),S.push(F(P[1])))}S.push("]");return S.join("")}function L(Q){for(var N=Q.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),S=N.length,R=[],P=0,O=0;P<S;++P){var M=N[P];M==="("?++O:"\\"===M.charAt(0)&&(M=+M.substring(1))&&(M<=O?R[M]=-1:N[P]=F(M))}for(P=1;P<R.length;++P){-1===R[P]&&(R[P]=++K)}for(O=P=0;P<S;++P){M=N[P],M==="("?(++O,R[O]||(N[P]="(?:")):"\\"===M.charAt(0)&&(M=+M.substring(1))&&M<=O&&(N[P]="\\"+R[M])}for(P=0;P<S;++P){"^"===N[P]&&"^"!==N[P+1]&&(N[P]="")}if(Q.ignoreCase&&y){for(P=0;P<S;++P){M=N[P],Q=M.charAt(0),M.length>=2&&Q==="["?N[P]=I(M):Q!=="\\"&&(N[P]=M.replace(/[A-Za-z]/g,function(T){T=T.charCodeAt(0);return"["+String.fromCharCode(T&-33,T|32)+"]"}))}}return N.join("")}for(var K=0,y=!1,D=!1,C=0,H=J.length;C<H;++C){var E=J[C];if(E.ignoreCase){D=!0}else{if(/[a-z]/i.test(E.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){y=!0;D=!1;break}}}for(var p={b:8,t:9,n:10,v:11,f:12,r:13},v=[],C=0,H=J.length;C<H;++C){E=J[C];if(E.global||E.multiline){throw Error(""+E)}v.push("(?:"+L(E)+")")}return RegExp(v.join("|"),D?"gi":"g")}function g(C,G){function F(H){var I=H.nodeType;if(I==1){if(!y.test(H.className)){for(I=H.firstChild;I;I=I.nextSibling){F(I)}I=H.nodeName.toLowerCase();if("br"===I||"li"===I){E[D]="\n",p[D<<1]=v++,p[D++<<1|1]=H}}}else{if(I==3||I==4){I=H.nodeValue,I.length&&(I=G?I.replace(/\r\n?/g,"\n"):I.replace(/[\t\n\r ]+/g," "),E[D]=I,p[D<<1]=v,v+=I.length,p[D++<<1|1]=H)}}}var y=/(?:^|\s)nocode(?:\s|$)/,E=[],v=0,p=[],D=0;F(C);return{a:E.join("").replace(/\n$/,""),d:p}}function t(v,C,y,p){C&&(v={a:C,e:v},y(v),p.push.apply(p,v.g))}function f(v){for(var C=void 0,y=v.firstChild;y;y=y.nextSibling){var p=y.nodeType,C=p===1?C?v:y:p===3?e.test(y.nodeValue)?v:C:C}return C===v?void 0:C}function A(y,E){function D(R){for(var K=R.e,J=[K,"pln"],Q=0,L=R.a.match(C)||[],F={},H=0,O=L.length;H<O;++H){var P=L[H],S=F[P],T=void 0,N;if(typeof S==="string"){N=!1}else{var M=v[P.charAt(0)];if(M){T=P.match(M[1]),S=M[0]}else{for(N=0;N<p;++N){if(M=E[N],T=P.match(M[1])){S=M[0];break}}T||(S="pln")}if((N=S.length>=5&&"lang-"===S.substring(0,5))&&!(T&&typeof T[1]==="string")){N=!1,S="src"}N||(F[P]=S)}M=Q;Q+=P.length;if(N){N=T[1];var I=P.indexOf(N),G=I+N.length;T[2]&&(G=P.length-T[2].length,I=G-N.length);S=S.substring(5);t(K+M,P.substring(0,I),D,J);t(K+M+I,N,s(S,N),J);t(K+M+G,P.substring(G),D,J)}else{J.push(K+M,S)}}R.g=J}var v={},C;(function(){for(var J=y.concat(E),G=[],F={},M=0,H=J.length;M<H;++M){var I=J[M],L=I[3];if(L){for(var K=L.length;--K>=0;){v[L.charAt(K)]=I}}I=I[1];L=""+I;F.hasOwnProperty(L)||(G.push(I),F[L]=a)}G.push(/[\S\s]/);C=h(G)})();var p=E.length;return D}function u(v){var D=[],C=[];v.tripleQuotedStrings?D.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,a,"'\""]):v.multiLineStrings?D.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,a,"'\"`"]):D.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,"\"'"]);v.verbatimStrings&&C.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,a]);var p=v.hashComments;p&&(v.cStyleComments?(p>1?D.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,a,"#"]):D.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"]),C.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,a])):D.push(["com",/^#[^\n\r]*/,a,"#"]));v.cStyleComments&&(C.push(["com",/^\/\/[^\n\r]*/,a]),C.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,a]));if(p=v.regexLiterals){var y=(p=p>1?"":"\n\r")?".":"[\\S\\s]";C.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+p+"])(?:[^/\\x5B\\x5C"+p+"]|\\x5C"+y+"|\\x5B(?:[^\\x5C\\x5D"+p+"]|\\x5C"+y+")*(?:\\x5D|$))+/")+")")])}(p=v.types)&&C.push(["typ",p]);p=(""+v.keywords).replace(/^ | $/g,"");p.length&&C.push(["kwd",RegExp("^(?:"+p.replace(/[\s,]+/g,"|")+")\\b"),a]);D.push(["pln",/^\s+/,a," \r\n\t\u00a0"]);p="^.[^\\s\\w.$@'\"`/\\\\]*";v.regexLiterals&&(p+="(?!s*/)");C.push(["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,a],["pln",/^[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pln",/^\\[\S\s]?/,a],["pun",RegExp(p),a]);return A(D,C)}function q(J,G,F){function I(M){var P=M.nodeType;if(P==1&&!K.test(M.className)){if("br"===M.nodeName){L(M),M.parentNode&&M.parentNode.removeChild(M)}else{for(M=M.firstChild;M;M=M.nextSibling){I(M)}}}else{if((P==3||P==4)&&F){var O=M.nodeValue,N=O.match(y);if(N){P=O.substring(0,N.index),M.nodeValue=P,(O=O.substring(N.index+N[0].length))&&M.parentNode.insertBefore(D.createTextNode(O),M.nextSibling),L(M),P||M.parentNode.removeChild(M)}}}}function L(N){function M(P,U){var T=U?P.cloneNode(!1):P,S=P.parentNode;if(S){var S=M(S,1),R=P.nextSibling;S.appendChild(T);for(var Q=R;Q;Q=R){R=Q.nextSibling,S.appendChild(Q)}}return T}for(;!N.nextSibling;){if(N=N.parentNode,!N){return}}for(var N=M(N.nextSibling,0),O;(O=N.parentNode)&&O.nodeType===1;){N=O}H.push(N)}for(var K=/(?:^|\s)nocode(?:\s|$)/,y=/\r\n?|\n/,D=J.ownerDocument,C=D.createElement("li");J.firstChild;){C.appendChild(J.firstChild)}for(var H=[C],E=0;E<H.length;++E){I(H[E])}G===(G|0)&&H[0].setAttribute("value",G);var p=D.createElement("ol");p.className="linenums";for(var G=Math.max(0,G-1|0)||0,E=0,v=H.length;E<v;++E){C=H[E],C.className="L"+(E+G)%10,C.firstChild||C.appendChild(D.createTextNode("\u00a0")),p.appendChild(C)}J.appendChild(p)}function B(v,C){for(var y=C.length;--y>=0;){var p=C[y];w.hasOwnProperty(p)?z.console&&console.warn("cannot override language handler %s",p):w[p]=v}}function s(p,v){if(!p||!w.hasOwnProperty(p)){p=/^\s*</.test(v)?"default-markup":"default-code"}return w[p]}function o(ad){var aa=ad.h;try{var X=g(ad.c,ad.i),ac=X.a;ad.a=ac;ad.d=X.d;ad.e=0;s(aa,ac)(ad);var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent),J=J&&+J[1]<=8,aa=/\n/g,C=ad.a,R=C.length,X=0,U=ad.d,T=U.length,ac=0,ab=ad.g,V=ab.length,K=0;ab[V]=R;var Q,Z;for(Z=Q=0;Z<V;){ab[Z]!==ab[Z+2]?(ab[Q++]=ab[Z++],ab[Q++]=ab[Z++]):Z+=2}V=Q;for(Z=Q=0;Z<V;){for(var O=ab[Z],D=ab[Z+1],I=Z+2;I+2<=V&&ab[I+1]===D;){I+=2}ab[Q++]=O;ab[Q++]=D;Z=I}ab.length=Q;var Y=ad.c,W;if(Y){W=Y.style.display,Y.style.display="none"}try{for(;ac<T;){var S=U[ac+2]||R,M=ab[K+2]||R,I=Math.min(S,M),N=U[ac+1],F;if(N.nodeType!==1&&(F=C.substring(X,I))){J&&(F=F.replace(aa,"\r"));N.nodeValue=F;var y=N.ownerDocument,P=y.createElement("span");P.className=ab[K+1];var E=N.parentNode;E.replaceChild(P,N);P.appendChild(N);X<S&&(U[ac+1]=N=y.createTextNode(C.substring(I,S)),E.insertBefore(N,P.nextSibling))}X=I;X>=S&&(ac+=2);X>=M&&(K+=2)}}finally{if(Y){Y.style.display=W}}}catch(H){z.console&&console.log(H&&H.stack||H)}}var z=window,r=["break,continue,do,else,for,if,return,while"],x=[[r,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],n=[x,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[x,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],l=[m,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],x=[x,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],k=[r,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],j=[r,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],d=[r,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],r=[r,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],i=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,e=/\S/,c=u({keywords:[n,l,x,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",k,j,r],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),w={};B(c,["default-code"]);B(A([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);B(A([["pln",/^\s+/,a," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,a,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);B(A([],[["atv",/^[\S\s]+/]]),["uq.val"]);B(u({keywords:n,hashComments:!0,cStyleComments:!0,types:i}),["c","cc","cpp","cxx","cyc","m"]);B(u({keywords:"null,true,false"}),["json"]);B(u({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:i}),["cs"]);B(u({keywords:m,cStyleComments:!0}),["java"]);B(u({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);B(u({keywords:k,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);B(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);B(u({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);B(u({keywords:x,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);B(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);B(u({keywords:d,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);B(A([],[["str",/^[\S\s]+/]]),["regex"]);var b=z.PR={createSimpleLexer:A,registerLangHandler:B,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:z.prettyPrintOne=function(v,C,y){var p=document.createElement("div");p.innerHTML="<pre>"+v+"</pre>";p=p.firstChild;y&&q(p,y,!0);o({h:C,j:y,c:p,i:1});return p.innerHTML},prettyPrint:z.prettyPrint=function(T,Q){function N(){for(var v=z.PR_SHOULD_USE_CONTINUATION?R.now()+250:Infinity;L<G.length&&R.now()<v;L++){for(var Y=G[L],W=M,U=Y;U=U.previousSibling;){var p=U.nodeType,X=(p===7||p===8)&&U.nodeValue;if(X?!/^\??prettify\b/.test(X):p!==3||/\S/.test(U.nodeValue)){break}if(X){W={};X.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(ab,aa,ac){W[aa]=ac});break}}U=Y.className;if((W!==M||P.test(U))&&!C.test(U)){p=!1;for(X=Y.parentNode;X;X=X.parentNode){if(O.test(X.tagName)&&X.className&&P.test(X.className)){p=!0;break}}if(!p){Y.className+=" prettyprinted";p=W.lang;if(!p){var p=U.match(H),Z;if(!p&&(Z=f(Y))&&D.test(Z.tagName)){p=Z.className.match(H)}p&&(p=p[1])}if(y.test(Y.tagName)){X=1}else{var X=Y.currentStyle,V=E.defaultView,X=(X=X?X.whiteSpace:V&&V.getComputedStyle?V.getComputedStyle(Y,a).getPropertyValue("white-space"):0)&&"pre"===X.substring(0,3)}V=W.linenums;if(!(V=V==="true"||+V)){V=(V=U.match(/\blinenums\b(?::(\d+))?/))?V[1]&&V[1].length?+V[1]:!0:!1}V&&q(Y,V,X);F={h:p,c:Y,j:V,i:X};o(F)}}}L<G.length?setTimeout(N,250):"function"===typeof T&&T()}for(var S=Q||document.body,E=S.ownerDocument||document,S=[S.getElementsByTagName("pre"),S.getElementsByTagName("code"),S.getElementsByTagName("xmp")],G=[],I=0;I<S.length;++I){for(var K=0,J=S[I].length;K<J;++K){G.push(S[I][K])}}var S=a,R=Date;R.now||(R={now:function(){return +new Date}});var L=0,F,H=/\blang(?:uage)?-([\w.]+)(?!\S)/,P=/\bprettyprint\b/,C=/\bprettyprinted\b/,y=/pre|xmp/i,D=/^code$/i,O=/^(?:pre|code|xmp)$/i,M={};N()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return b})})()}();
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
6
+ <title>Sencha Examples</title>
7
+
8
+ <script type="text/javascript" src="extjs-build/ext-all.js"></script>
9
+ <link rel="stylesheet" type="text/css" href="extjs-build/resources/css/ext-all.css">
10
+
11
+ <script type="text/javascript">
12
+ function loadInlineExample(code, options, callback) {
13
+ try {
14
+ document.body.innerHTML = '';
15
+ eval(code);
16
+ callback && callback(true);
17
+ } catch (e) {
18
+ document.body.innerHTML = e;
19
+ callback && callback(false, e);
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body>
25
+ </body>
26
+ </html>
@@ -0,0 +1,38 @@
1
+ /*
2
+ Ext JS 4.1 - JavaScript Library
3
+ Copyright (c) 2006-2012, Sencha Inc.
4
+ All rights reserved.
5
+ licensing@sencha.com
6
+
7
+ http://www.sencha.com/license
8
+
9
+ Open Source License
10
+ ------------------------------------------------------------------------------------------
11
+ This version of Ext JS is licensed under the terms of the Open Source GPL 3.0 license.
12
+
13
+ http://www.gnu.org/licenses/gpl.html
14
+
15
+ There are several FLOSS exceptions available for use with this release for
16
+ open source applications that are distributed under a license other than GPL.
17
+
18
+ * Open Source License Exception for Applications
19
+
20
+ http://www.sencha.com/products/floss-exception.php
21
+
22
+ * Open Source License Exception for Development
23
+
24
+ http://www.sencha.com/products/ux-exception.php
25
+
26
+
27
+ Alternate Licensing
28
+ ------------------------------------------------------------------------------------------
29
+ Commercial and OEM Licenses are available for an alternate download of Ext JS.
30
+ This is the appropriate option if you are creating proprietary applications and you are
31
+ not prepared to distribute and share the source code of your application under the
32
+ GPL v3 license. Please visit http://www.sencha.com/license for more details.
33
+
34
+ --
35
+
36
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. See the GNU General Public License for more details.
37
+ */
38
+ var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=h;for(c in g){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(o,n,q){if(q){Ext.apply(o,q)}if(o&&n&&typeof n==="object"){var p,m,l;for(p in n){o[p]=n[p]}if(b){for(m=b.length;m--;){l=b[m];if(n.hasOwnProperty(l)){o[l]=n[l]}}}}return o};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:e,emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(k,i){var l;if(k){for(l in i){if(k[l]===undefined){k[l]=i[l]}}}return k},iterate:function(i,l,k){if(Ext.isEmpty(i)){return}if(k===undefined){k=i}if(Ext.isIterable(i)){Ext.Array.each.call(Ext.Array,i,l,k)}else{Ext.Object.each.call(Ext.Object,i,l,k)}}});Ext.apply(Ext,{extend:(function(){var i=a.constructor,k=function(n){for(var l in n){if(!n.hasOwnProperty(l)){continue}this[l]=n[l]}};return function(l,q,o){if(Ext.isObject(q)){o=q;q=l;l=o.constructor!==i?o.constructor:function(){q.apply(this,arguments)}}var n=function(){},m,p=q.prototype;n.prototype=p;m=l.prototype=new n();m.constructor=l;l.superclass=p;if(p.constructor===i){p.constructor=q}l.override=function(r){Ext.override(l,r)};m.override=k;m.proto=m;l.override(o);l.extend=function(r){return Ext.extend(l,r)};return l}}()),override:function(m,n){if(m.$isClass){m.override(n)}else{if(typeof m=="function"){Ext.apply(m.prototype,n)}else{var i=m.self,k,l;if(i&&i.$isClass){for(k in n){if(n.hasOwnProperty(k)){l=n[k];if(typeof l=="function"){l.$name=k;l.$owner=i;l.$previous=m.hasOwnProperty(k)?m[k]:d}m[k]=l}}}else{Ext.apply(m,n)}}}return m}});Ext.apply(Ext,{valueFrom:function(l,i,k){return Ext.isEmpty(l,k)?i:l},typeOf:function(k){var i,l;if(k===null){return"null"}i=typeof k;if(i==="undefined"||i==="string"||i==="number"||i==="boolean"){return i}l=j.call(k);switch(l){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(i==="function"){return"function"}if(i==="object"){if(k.nodeType!==undefined){if(k.nodeType===3){return(/\S/).test(k.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(i,k){return(i===null)||(i===undefined)||(!k?i==="":false)||(Ext.isArray(i)&&i.length===0)},isArray:("isArray" in Array)?Array.isArray:function(i){return j.call(i)==="[object Array]"},isDate:function(i){return j.call(i)==="[object Date]"},isObject:(j.call(null)==="[object Object]")?function(i){return i!==null&&i!==undefined&&j.call(i)==="[object Object]"&&i.ownerDocument===undefined}:function(i){return j.call(i)==="[object Object]"},isSimpleObject:function(i){return i instanceof Object&&i.constructor===Object},isPrimitive:function(k){var i=typeof k;return i==="string"||i==="number"||i==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(i){return j.call(i)==="[object Function]"}:function(i){return typeof i==="function"},isNumber:function(i){return typeof i==="number"&&isFinite(i)},isNumeric:function(i){return !isNaN(parseFloat(i))&&isFinite(i)},isString:function(i){return typeof i==="string"},isBoolean:function(i){return typeof i==="boolean"},isElement:function(i){return i?i.nodeType===1:false},isTextNode:function(i){return i?i.nodeName==="#text":false},isDefined:function(i){return typeof i!=="undefined"},isIterable:function(k){var i=typeof k,l=false;if(k&&i!="string"){if(i=="function"){if(Ext.isSafari){l=k instanceof NodeList||k instanceof HTMLCollection}}else{l=true}}return l?k.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){var p,o,m,l,r,n;if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}p=j.call(q);if(p==="[object Date]"){return new Date(q.getTime())}if(p==="[object Array]"){o=q.length;r=[];while(o--){r[o]=Ext.clone(q[o])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(n in q){r[n]=Ext.clone(q[n])}if(b){for(m=b.length;m--;){l=b[m];r[l]=q[l]}}}}return r||q},getUniqueGlobalNamespace:function(){var l=this.uniqueGlobalNamespace,k;if(l===undefined){k=0;do{l="ExtBox"+(++k)}while(Ext.global[l]!==undefined);Ext.global[l]=Ext;this.uniqueGlobalNamespace=l}return l},functionFactoryCache:{},cacheableFunctionFactory:function(){var o=this,l=Array.prototype.slice.call(arguments),k=o.functionFactoryCache,i,m,n;if(Ext.isSandboxed){n=l.length;if(n>0){n--;l[n]="var Ext=window."+Ext.name+";"+l[n]}}i=l.join("");m=k[i];if(!m){m=Function.prototype.constructor.apply(Function.prototype,l);k[i]=m}return m},functionFactory:function(){var l=this,i=Array.prototype.slice.call(arguments),k;if(Ext.isSandboxed){k=i.length;if(k>0){k--;i[k]="var Ext=window."+Ext.name+";"+i[k]}}return Function.prototype.constructor.apply(Function.prototype,i)},Logger:{verbose:e,log:e,info:e,warn:e,error:function(i){throw new Error(i)},deprecate:e}});Ext.type=Ext.typeOf}());Ext.globalEval=Ext.global.execScript?function(a){execScript(a)}:function($$code){(function(){eval($$code)}())};(function(){var a="4.1.1.1",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)}());Ext.String=(function(){var i=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,m=/('|\\)/g,h=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,n=/^\s+|\s+$/g,j=/\s+/,l=/(^[^a-z]*|[^\w])/gi,d,a,g,c,e=function(p,o){return d[o]},k=function(p,o){return(o in a)?a[o]:String.fromCharCode(parseInt(o.substr(2),10))};return{createVarName:function(o){return o.replace(l,"")},htmlEncode:function(o){return(!o)?o:String(o).replace(g,e)},htmlDecode:function(o){return(!o)?o:String(o).replace(c,k)},addCharacterEntities:function(p){var o=[],s=[],q,r;for(q in p){r=p[q];a[q]=r;d[r]=q;o.push(r);s.push(q)}g=new RegExp("("+o.join("|")+")","g");c=new RegExp("("+s.join("|")+"|&#[0-9]{1,5};)","g")},resetCharacterEntities:function(){d={};a={};this.addCharacterEntities({"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"',"&#39;":"'"})},urlAppend:function(p,o){if(!Ext.isEmpty(o)){return p+(p.indexOf("?")===-1?"?":"&")+o}return p},trim:function(o){return o.replace(i,"")},capitalize:function(o){return o.charAt(0).toUpperCase()+o.substr(1)},uncapitalize:function(o){return o.charAt(0).toLowerCase()+o.substr(1)},ellipsis:function(q,o,r){if(q&&q.length>o){if(r){var s=q.substr(0,o-2),p=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));if(p!==-1&&p>=(o-15)){return s.substr(0,p)+"..."}}return q.substr(0,o-3)+"..."}return q},escapeRegex:function(o){return o.replace(b,"\\$1")},escape:function(o){return o.replace(m,"\\$1")},toggle:function(p,q,o){return p===q?o:q},leftPad:function(p,q,r){var o=String(p);r=r||" ";while(o.length<q){o=r+o}return o},format:function(p){var o=Ext.Array.toArray(arguments,1);return p.replace(h,function(q,r){return o[r]})},repeat:function(s,r,p){for(var o=[],q=r;q--;){o.push(s)}return o.join(p||"")},splitWords:function(o){if(o&&typeof o=="string"){return o.replace(n,"").split(j)}return o||[]}}}());Ext.String.resetCharacterEntities();Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;Ext.Number=new function(){var b=this,c=(0.9).toFixed()!=="1",a=Math;Ext.apply(this,{constrain:function(h,g,e){var d=parseFloat(h);return(d<g)?g:((d>e)?e:d)},snap:function(h,e,g,i){var d;if(h===undefined||h<g){return g||0}if(e){d=h%e;if(d!==0){h-=d;if(d*2>=e){h+=e}else{if(d*2<-e){h-=e}}}}return b.constrain(h,g,i)},snapInRange:function(h,d,g,i){var e;g=(g||0);if(h===undefined||h<g){return g}if(d&&(e=((h-g)%d))){h-=e;e*=2;if(e>=d){h+=d}}if(i!==undefined){if(h>(i=b.snapInRange(i,d,g))){h=i}}return h},toFixed:c?function(g,d){d=d||0;var e=a.pow(10,d);return(a.round(g*e)/e).toFixed(d)}:function(e,d){return e.toFixed(d)},from:function(e,d){if(isFinite(e)){e=parseFloat(e)}return !isNaN(e)?e:d},randomInt:function(e,d){return a.floor(a.random()*(d-e+1)+e)}});Ext.num=function(){return b.from.apply(this,arguments)}};(function(){var g=Array.prototype,o=g.slice,q=(function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}()),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=(function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}()),k=true,a,w,t,v;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F),E,I,A,e,C,D;if(H===B){if(K){G.push.apply(G,J)}}else{E=Math.min(z,B-H);I=H+E;A=I+K-E;e=B-I;C=B-E;if(A<I){for(D=0;D<e;++D){G[A+D]=G[I+D]}}else{if(A>I){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D<K;++D){G[H+D]=J[D]}}}return G}function i(B,e,A,z){if(z&&z.length){if(e<B.length){B.splice.apply(B,[e,A].concat(z))}else{B.push.apply(B,z)}}else{B.splice(e,A)}return B}function b(A,e,z){return x(A,e,z)}function r(A,e,z){A.splice(e,z);return A}function l(C,e,A){var B=m(C,e),z=C.slice(e,m(C,B+A));if(arguments.length<4){x(C,B,A)}else{x(C,B,A,o.call(arguments,3))}return z}function h(e){return e.splice.apply(e,o.call(arguments,1))}w=q?r:b;t=q?i:x;v=q?h:l;a=Ext.Array={each:function(D,B,A,e){D=a.from(D);var z,C=D.length;if(e!==true){for(z=0;z<C;z++){if(B.call(A||D[z],D[z],z,D)===false){return z}}}else{for(z=C-1;z>-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:j?function(A,z,e){return A.forEach(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;e++){A.call(z,C[e],e,C)}},indexOf:p?function(A,e,z){return A.indexOf(e,z)}:function(C,A,B){var e,z=C.length;for(e=(B<0)?Math.max(0,z+B):B||0;e<z;e++){if(C[e]===A){return e}}return -1},contains:p?function(z,e){return z.indexOf(e)!==-1}:function(B,A){var e,z;for(e=0,z=B.length;e<z;e++){if(B[e]===A){return true}}return false},toArray:function(A,C,e){if(!A||!A.length){return[]}if(typeof A==="string"){A=A.split("")}if(k){return o.call(A,C||0,e||A.length)}var B=[],z;C=C||0;e=e?((e<0)?A.length+e:e):A.length;for(z=C;z<e;z++){B.push(A[z])}return B},pluck:function(D,e){var z=[],A,C,B;for(A=0,C=D.length;A<C;A++){B=D[A];z.push(B[e])}return z},map:u?function(A,z,e){return A.map(z,e)}:function(D,C,B){var A=[],z=0,e=D.length;for(;z<e;z++){A[z]=C.call(B,D[z],z,D)}return A},every:y?function(A,z,e){return A.every(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(!A.call(z,C[e],e,C)){return false}}return true},some:c?function(A,z,e){return A.some(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(A.call(z,C[e],e,C)){return true}}return false},clean:function(C){var z=[],e=0,B=C.length,A;for(;e<B;e++){A=C[e];if(!Ext.isEmpty(A)){z.push(A)}}return z},unique:function(C){var B=[],e=0,A=C.length,z;for(;e<A;e++){z=C[e];if(a.indexOf(B,z)===-1){B.push(z)}}return B},filter:d?function(A,z,e){return A.filter(z,e)}:function(D,B,A){var z=[],e=0,C=D.length;for(;e<C;e++){if(B.call(A,D[e],e,D)){z.push(D[e])}}return z},from:function(A,z){if(A===undefined||A===null){return[]}if(Ext.isArray(A)){return(z)?o.call(A):A}var e=typeof A;if(A&&A.length!==undefined&&e!=="string"&&(e!=="function"||!A.apply)){return a.toArray(A)}return[A]},remove:function(A,z){var e=a.indexOf(A,z);if(e!==-1){w(A,e,1)}return A},include:function(z,e){if(!a.contains(z,e)){z.push(e)}},clone:function(e){return o.call(e)},merge:function(){var e=o.call(arguments),B=[],z,A;for(z=0,A=e.length;z<A;z++){B=B.concat(e[z])}return a.unique(B)},intersect:function(){var e=[],A=o.call(arguments),L,J,F,I,M,B,z,H,K,C,G,E,D;if(!A.length){return e}L=A.length;for(G=M=0;G<L;G++){B=A[G];if(!I||B.length<I.length){I=B;M=G}}I=a.unique(I);w(A,M,1);z=I.length;L=A.length;for(G=0;G<z;G++){H=I[G];C=0;for(E=0;E<L;E++){J=A[E];F=J.length;for(D=0;D<F;D++){K=J[D];if(H===K){C++;break}}}if(C===L){e.push(H)}}return e},difference:function(z,e){var E=o.call(z),C=E.length,B,A,D;for(B=0,D=e.length;B<D;B++){for(A=0;A<C;A++){if(E[A]===e[B]){w(E,A,1);A--;C--}}}return E},slice:([1,2].slice(1,undefined).length?function(A,z,e){return o.call(A,z,e)}:function(A,z,e){if(typeof z==="undefined"){return o.call(A)}if(typeof e==="undefined"){return o.call(A,z)}return o.call(A,z,e)}),sort:n?function(z,e){if(e){return z.sort(e)}else{return z.sort()}}:function(F,E){var C=F.length,B=0,D,e,A,z;for(;B<C;B++){A=B;for(e=B+1;e<C;e++){if(E){D=E(F[e],F[A]);if(D<0){A=e}}else{if(F[e]<F[A]){A=e}}}if(A!==B){z=F[B];F[B]=F[A];F[A]=z}}return F},flatten:function(A){var z=[];function e(B){var D,E,C;for(D=0,E=B.length;D<E;D++){C=B[D];if(Ext.isArray(C)){e(C)}else{z.push(C)}}return z}return e(A)},min:function(D,C){var z=D[0],e,B,A;for(e=0,B=D.length;e<B;e++){A=D[e];if(C){if(C(z,A)===1){z=A}}else{if(A<z){z=A}}}return z},max:function(D,C){var e=D[0],z,B,A;for(z=0,B=D.length;z<B;z++){A=D[z];if(C){if(C(e,A)===-1){e=A}}else{if(A>e){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e<B;e++){A=C[e];z+=A}return z},toMap:function(C,e,A){var B={},z=C.length;if(!e){while(z--){B[C[z]]=z+1}}else{if(typeof e=="string"){while(z--){B[C[z][e]]=z+1}}else{while(z--){B[e.call(A,C[z])]=z+1}}}return B},erase:w,insert:function(A,z,e){return t(A,z,0,e)},replace:t,splice:v,push:function(B){var e=arguments.length,A=1,z;if(B===undefined){B=[]}else{if(!Ext.isArray(B)){B=[B]}}for(;A<e;A++){z=arguments[A];Array.prototype.push[Ext.isArray(z)?"apply":"call"](B,z)}return B}};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}}());Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||Ext.global,h)}},pass:function(c,a,b){if(!Ext.isArray(a)){if(Ext.isIterable(a)){a=Ext.Array.clone(a)}else{a=a!==undefined?[a]:[]}}return function(){var d=[].concat(a);d.push.apply(d,arguments);return c.apply(b||this,d)}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},clone:function(a){return function(){return a.apply(this,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||Ext.global,g)!==false)?d.apply(h||Ext.global,g):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var h=this,g=Array.prototype.slice.call(arguments);setTimeout(function(){e.apply(h,g)},c)}},defer:function(e,c,d,b,a){e=Ext.Function.bind(e,d,b,a);if(c>0){return setTimeout(Ext.supports.TimeoutActualLateness?function(){e()}:e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||this,arguments)})}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=function(){},b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g<h;g++){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}else{if(Ext.isObject(k)){for(g in k){if(k.hasOwnProperty(g)){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}}else{j.push({name:e,value:k})}}return j},toQueryString:function(g,d){var h=[],e=[],l,k,m,c,n;for(l in g){if(g.hasOwnProperty(l)){h=h.concat(b.toQueryObjects(l,g[l],d))}}for(k=0,m=h.length;k<m;k++){c=h[k];n=c.value;if(Ext.isEmpty(n)){n=""}else{if(Ext.isDate(n)){n=Ext.Date.toString(n)}}e.push(encodeURIComponent(c.name)+"="+encodeURIComponent(String(n)))}return e.join("&")},fromQueryString:function(d,r){var m=d.replace(/^\?/,"").split("&"),u={},s,k,w,n,q,g,o,p,c,h,t,l,v,e;for(q=0,g=m.length;q<g;q++){o=m[q];if(o.length>0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p<c;p++){v=h[p];v=(v.length===2)?"":v.substring(1,v.length-1);l.push(v)}l.unshift(w);s=u;for(p=0,c=l.length;p<c;p++){v=l[p];if(p===c-1){if(Ext.isArray(s)&&v===""){s.push(n)}else{s[v]=n}}else{if(s[v]===undefined||typeof s[v]==="string"){e=l[p+1];s[v]=(Ext.isNumeric(e)||e==="")?[]:{}}s=s[v]}}}}}return u},each:function(c,e,d){for(var g in c){if(c.hasOwnProperty(g)){if(e.call(d||c,g,c[g],c)===false){return}}}},merge:function(k){var h=1,j=arguments.length,c=b.merge,e=Ext.clone,g,m,l,d;for(;h<j;h++){g=arguments[h];for(m in g){l=g[m];if(l&&l.constructor===Object){d=k[m];if(d&&d.constructor===Object){c(d,l)}else{k[m]=e(l)}}else{k[m]=l}}}return k},mergeIf:function(c){var h=1,j=arguments.length,e=Ext.clone,d,g,k;for(;h<j;h++){d=arguments[h];for(g in d){if(!(g in c)){k=d[g];if(k&&k.constructor===Object){c[g]=e(k)}else{c[g]=k}}}}return c},getKey:function(c,e){for(var d in c){if(c.hasOwnProperty(d)&&c[d]===e){return d}}return null},getValues:function(d){var c=[],e;for(e in d){if(d.hasOwnProperty(e)){c.push(d[e])}}return c},getKeys:(typeof Object.keys=="function")?function(c){if(!c){return[]}return Object.keys(c)}:function(c){var d=[],e;for(e in c){if(c.hasOwnProperty(e)){d.push(e)}}return d},getSize:function(c){var d=0,e;for(e in c){if(c.hasOwnProperty(e)){d++}}return d},classify:function(g){var e=g,i=[],d={},c=function(){var k=0,l=i.length,m;for(;k<l;k++){m=i[k];this[m]=new d[m]()}},h,j;for(h in g){if(g.hasOwnProperty(h)){j=g[h];if(j&&j.constructor===Object){i.push(h);d[h]=b.classify(j)}}}c.prototype=e;return c}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf;Ext.urlEncode=function(){var c=Ext.Array.from(arguments),d="";if((typeof c[1]==="string")){d=c[1]+"&";c[1]=false}return d+b.toQueryString.apply(b,c)};Ext.urlDecode=function(){return b.fromQueryString.apply(b,arguments)}}());(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Ext.Date={now:Date.now||function(){return +new Date()},toString:function(c){var d=Ext.String.leftPad;return c.getFullYear()+"-"+d(c.getMonth()+1,2,"0")+"-"+d(c.getDate(),2,"0")+"T"+d(c.getHours(),2,"0")+":"+d(c.getMinutes(),2,"0")+":"+d(c.getSeconds(),2,"0")},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/"),g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{January:0,Jan:0,February:1,Feb:1,March:2,Mar:2,April:3,Apr:3,May:4,June:5,Jun:5,July:6,Jul:6,August:7,Aug:7,September:8,Sep:8,October:9,Oct:9,November:10,Nov:10,December:11,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return Ext.Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Ext.Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Ext.Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|MS)/;return function(e){return c.test(e.replace(d,""))}}()),formatContainsDateInfo:(function(){var d=/(\\.)/g,c=/([djzmnYycU]|MS)/;return function(e){return c.test(e.replace(d,""))}}()),unescapeFormat:(function(){var c=/\\/gi;return function(d){return d.replace(c,"")}}()),formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){var k,h,g,d,j;for(k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){j=k.charAt(g);h.push(j=="T"?"'T'":a.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=a.add(new Date(o<100?100:o,c-1,n,k,g,j,e),a.YEAR,o<100?o-100:0);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parse:function(d,g,c){var e=a.parseFunctions;if(e[g]==null){a.createParser(g)}return e[g](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="",d;for(d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+Ext.String.escape(e)+"'")}else{g.push(a.getFormatCode(e))}}}a.formatFunctions[h]=Ext.functionFactory("return "+g.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(o){var e=a.parseRegexes.length,p=1,g=[],n=[],l=false,d="",j=0,k=o.length,m=[],h;for(;j<k;++j){d=o.charAt(j);if(!l&&d=="\\"){l=true}else{if(l){l=false;n.push(Ext.String.escape(d))}else{h=a.formatCodeToRegex(d,p);p+=h.g;n.push(h.s);if(h.g&&h.c){if(h.calcAtEnd){m.push(h.c)}else{g.push(h.c)}}}}}g=g.concat(m);a.parseRegexes[e]=new RegExp("^"+n.join("")+"$","i");a.parseFunctions[o]=Ext.functionFactory("input","strict",b(c,e,g.join("")))}}()),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|0[1-9])"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|[1-9])"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|0[1-9])"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|[1-9])"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:true},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("H",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}],g,d;for(g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},isEqual:function(d,c){if(d&&c){return(d.getTime()===c.getTime())}return !(d||c)},format:function(d,e){var c=a.formatFunctions;if(!Ext.isDate(d)){return""}if(c[e]==null){a.createFormat(e)}return c[e].call(d)+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h<c;j.setMonth(++h)){e+=a.getDaysInMonth(j)}return e+g.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(g){var h=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate()+3)/c,e=Math.floor(h/7),i=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/d)+1}}()),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}}()),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,j){if(j){return Ext.Date.clearTime(Ext.Date.clone(e))}var h=e.getDate(),g,i;e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=h){for(g=1,i=a.add(e,Ext.Date.HOUR,g);i.getDate()!=h;g++,i=a.add(e,Ext.Date.HOUR,g)){}e.setDate(h);e.setHours(i.getHours())}return e},add:function(h,g,i){var j=Ext.Date.clone(h),c=Ext.Date,e;if(!g||i===0){return j}switch(g.toLowerCase()){case Ext.Date.MILLI:j.setMilliseconds(j.getMilliseconds()+i);break;case Ext.Date.SECOND:j.setSeconds(j.getSeconds()+i);break;case Ext.Date.MINUTE:j.setMinutes(j.getMinutes()+i);break;case Ext.Date.HOUR:j.setHours(j.getHours()+i);break;case Ext.Date.DAY:j.setDate(j.getDate()+i);break;case Ext.Date.MONTH:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.MONTH,i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.YEAR,i)).getDate())}j.setDate(e);j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var d=window.Date,c,l,j=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],h=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"],i=j.length,e=h.length,g,k,m;for(m=0;m<i;m++){g=j[m];d[g]=a[g]}for(c=0;c<e;c++){k=h[c];d.prototype[k]=function(){var n=Array.prototype.slice.call(arguments);n.unshift(this);return a[k].apply(a,n)}}}};var a=Ext.Date}());(function(a){var c=[],b=function(){};Ext.apply(b,{$className:"Ext.Base",$isClass:true,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},extend:function(j){var d=j.prototype,m,g,h,k,e,l;g=this.prototype=Ext.Object.chain(d);g.self=this;this.superclass=g.superclass=d;if(!j.$isClass){m=Ext.Base.prototype;for(h in m){if(h in g){g[h]=m[h]}}}l=d.$inheritableStatics;if(l){for(h=0,k=l.length;h<k;h++){e=l[h];if(!this.hasOwnProperty(e)){this[e]=j[e]}}}if(j.$onExtended){this.$onExtended=j.$onExtended.slice()}g.config=new g.configClass();g.initConfigList=g.initConfigList.slice();g.initConfigMap=Ext.clone(g.initConfigMap);g.configMap=Ext.Object.chain(g.configMap)},$onExtended:[],triggerExtended:function(){var g=this.$onExtended,e=g.length,d,h;if(e>0){for(d=0;d<e;d++){h=g[d];h.fn.apply(h.scope||this,arguments)}}},onExtended:function(e,d){this.$onExtended.push({fn:e,scope:d});return this},addConfig:function(h,l){var n=this.prototype,m=Ext.Class.configNameCache,i=n.configMap,j=n.initConfigList,g=n.initConfigMap,k=n.config,d,e,o;for(e in h){if(h.hasOwnProperty(e)){if(!i[e]){i[e]=true}o=h[e];d=m[e].initialized;if(!g[e]&&o!==null&&!n[d]){g[e]=true;j.push(e)}}}if(l){Ext.merge(k,h)}else{Ext.mergeIf(k,h)}n.configClass=Ext.Object.classify(k)},addStatics:function(d){var g,e;for(e in d){if(d.hasOwnProperty(e)){g=d[e];if(typeof g=="function"&&!g.$isClass&&g!==Ext.emptyFn&&g!==Ext.identityFn){g.$owner=this;g.$name=e}this[e]=g}}return this},addInheritableStatics:function(e){var i,d,h=this.prototype,g,j;i=h.$inheritableStatics;d=h.$hasInheritableStatics;if(!i){i=h.$inheritableStatics=[];d=h.$hasInheritableStatics={}}for(g in e){if(e.hasOwnProperty(g)){j=e[g];this[g]=j;if(!d[g]){d[g]=true;i.push(g)}}}return this},addMembers:function(e){var h=this.prototype,d=Ext.enumerables,l=[],j,k,g,m;for(g in e){l.push(g)}if(d){l.push.apply(l,d)}for(j=0,k=l.length;j<k;j++){g=l[j];if(e.hasOwnProperty(g)){m=e[g];if(typeof m=="function"&&!m.$isClass&&m!==Ext.emptyFn){m.$owner=this;m.$name=g}h[g]=m}}return this},addMember:function(d,e){if(typeof e=="function"&&!e.$isClass&&e!==Ext.emptyFn){e.$owner=this;e.$name=d}this.prototype[d]=e;return this},implement:function(){this.addMembers.apply(this,arguments)},borrow:function(j,g){var n=this.prototype,m=j.prototype,h,k,e,l,d;g=Ext.Array.from(g);for(h=0,k=g.length;h<k;h++){e=g[h];d=m[e];if(typeof d=="function"){l=Ext.Function.clone(d);l.$owner=this;l.$name=e;n[e]=l}else{n[e]=d}}return this},override:function(e){var m=this,o=Ext.enumerables,k=m.prototype,h=Ext.Function.clone,d,j,g,n,l,i;if(arguments.length===2){d=e;e={};e[d]=arguments[1];o=null}do{l=[];n=null;for(d in e){if(d=="statics"){n=e[d]}else{if(d=="config"){m.addConfig(e[d],true)}else{l.push(d)}}}if(o){l.push.apply(l,o)}for(j=l.length;j--;){d=l[j];if(e.hasOwnProperty(d)){g=e[d];if(typeof g=="function"&&!g.$className&&g!==Ext.emptyFn){if(typeof g.$owner!="undefined"){g=h(g)}g.$owner=m;g.$name=d;i=k[d];if(i){g.$previous=i}}k[d]=g}}k=m;e=n}while(e);return this},callParent:function(d){var e;return(e=this.callParent.caller)&&(e.$previous||((e=e.$owner?e:e.caller)&&e.$owner.superclass.self[e.$name])).apply(this,d||c)},callSuper:function(d){var e;return(e=this.callSuper.caller)&&((e=e.$owner?e:e.caller)&&e.$owner.superclass.self[e.$name]).apply(this,d||c)},mixin:function(g,i){var d=i.prototype,e=this.prototype,h;if(typeof d.onClassMixedIn!="undefined"){d.onClassMixedIn.call(i,this)}if(!e.hasOwnProperty("mixins")){if("mixins" in e){e.mixins=Ext.Object.chain(e.mixins)}else{e.mixins={}}}for(h in d){if(h==="mixins"){Ext.merge(e.mixins,d[h])}else{if(typeof e[h]=="undefined"&&h!="mixinId"&&h!="config"){e[h]=d[h]}}}if("config" in d){this.addConfig(d.config,false)}e.mixins[g]=d},getName:function(){return Ext.getClassName(this)},createAlias:a(function(e,d){this.override(e,function(){return this[d].apply(this,arguments)})}),addXtype:function(i){var e=this.prototype,h=e.xtypesMap,g=e.xtypes,d=e.xtypesChain;if(!e.hasOwnProperty("xtypesMap")){h=e.xtypesMap=Ext.merge({},e.xtypesMap||{});g=e.xtypes=e.xtypes?[].concat(e.xtypes):[];d=e.xtypesChain=e.xtypesChain?[].concat(e.xtypesChain):[];e.xtype=i}if(!h[i]){h[i]=true;g.push(i);d.push(i);Ext.ClassManager.setAlias(this,"widget."+i)}return this}});b.implement({isInstance:true,$className:"Ext.Base",configClass:Ext.emptyFn,initConfigList:[],configMap:{},initConfigMap:{},statics:function(){var e=this.statics.caller,d=this.self;if(!e){return d}return e.$owner},callParent:function(e){var g,d=(g=this.callParent.caller)&&(g.$previous||((g=g.$owner?g:g.caller)&&g.$owner.superclass[g.$name]));return d.apply(this,e||c)},callSuper:function(e){var g,d=(g=this.callSuper.caller)&&((g=g.$owner?g:g.caller)&&g.$owner.superclass[g.$name]);return d.apply(this,e||c)},self:b,constructor:function(){return this},initConfig:function(g){var m=g,l=Ext.Class.configNameCache,j=new this.configClass(),p=this.initConfigList,h=this.configMap,o,k,n,e,d;this.initConfig=Ext.emptyFn;this.initialConfig=m||{};this.config=g=(m)?Ext.merge(j,g):j;if(m){p=p.slice();for(e in m){if(h[e]){if(m[e]!==null){p.push(e);this[l[e].initialized]=false}}}}for(k=0,n=p.length;k<n;k++){e=p[k];o=l[e];d=o.initialized;if(!this[d]){this[d]=true;this[o.set].call(this,g[e])}}return this},hasConfig:function(d){return Boolean(this.configMap[d])},setConfig:function(h,l){if(!h){return this}var g=Ext.Class.configNameCache,d=this.config,k=this.configMap,j=this.initialConfig,e,i;l=Boolean(l);for(e in h){if(l&&j.hasOwnProperty(e)){continue}i=h[e];d[e]=i;if(k[e]){this[g[e].set](i)}}return this},getConfig:function(e){var d=Ext.Class.configNameCache;return this[d[e].get]()},getInitialConfig:function(e){var d=this.config;if(!e){return d}else{return d[e]}},onConfigUpdate:function(k,m,n){var o=this.self,g,j,d,h,l,e;k=Ext.Array.from(k);n=n||this;for(g=0,j=k.length;g<j;g++){d=k[g];h="update"+Ext.String.capitalize(d);l=this[h]||Ext.emptyFn;e=function(){l.apply(this,arguments);n[m].apply(n,arguments)};e.$name=h;e.$owner=o;this[h]=e}},destroy:function(){this.destroy=Ext.emptyFn}});b.prototype.callOverridden=b.prototype.callParent;Ext.Base=b}(Ext.Function.flexSetter));(function(){var c,b=Ext.Base,g=[],e,d;for(e in b){if(b.hasOwnProperty(e)){g.push(e)}}d=g.length;function a(i){function h(){return this.constructor.apply(this,arguments)||null}return h}Ext.Class=c=function(i,j,h){if(typeof i!="function"){h=j;j=i;i=null}if(!j){j={}}i=c.create(i,j);c.process(i,j,h);return i};Ext.apply(c,{onBeforeCreated:function(i,j,h){i.addMembers(j);h.onCreated.call(i,i)},create:function(h,l){var j,k;if(!h){h=a()}for(k=0;k<d;k++){j=g[k];h[j]=b[j]}return h},process:function(h,q,m){var l=q.preprocessors||c.defaultPreprocessors,t=this.preprocessors,w={onBeforeCreated:this.onBeforeCreated},v=[],x,p,o,u,n,s,r,k;delete q.preprocessors;for(o=0,u=l.length;o<u;o++){x=l[o];if(typeof x=="string"){x=t[x];p=x.properties;if(p===true){v.push(x.fn)}else{if(p){for(n=0,s=p.length;n<s;n++){r=p[n];if(q.hasOwnProperty(r)){v.push(x.fn);break}}}}}else{v.push(x)}}w.onCreated=m?m:Ext.emptyFn;w.preprocessors=v;this.doProcess(h,q,w)},doProcess:function(i,l,h){var k=this,j=h.preprocessors.shift();if(!j){h.onBeforeCreated.apply(k,arguments);return}if(j.call(k,i,l,h,k.doProcess)!==false){k.doProcess(i,l,h)}},preprocessors:{},registerPreprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.preprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPreprocessorPosition(i,h,k);return this},getPreprocessor:function(h){return this.preprocessors[h]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(h){this.defaultPreprocessors=Ext.Array.from(h);return this},setDefaultPreprocessorPosition:function(j,l,k){var h=this.defaultPreprocessors,i;if(typeof l=="string"){if(l==="first"){h.unshift(j);return this}else{if(l==="last"){h.push(j);return this}}l=(l==="after")?1:-1}i=Ext.Array.indexOf(h,k);if(i!==-1){Ext.Array.splice(h,Math.max(0,i+l),0,j)}return this},configNameCache:{},getConfigNameMap:function(j){var i=this.configNameCache,k=i[j],h;if(!k){h=j.charAt(0).toUpperCase()+j.substr(1);k=i[j]={internal:j,initialized:"_is"+h+"Initialized",apply:"apply"+h,update:"update"+h,set:"set"+h,get:"get"+h,doSet:"doSet"+h,changeEvent:j.toLowerCase()+"change"}}return k}});c.registerPreprocessor("extend",function(j,n){var m=Ext.Base,o=m.prototype,p=n.extend,l,h,k;delete n.extend;if(p&&p!==Object){l=p}else{l=m}h=l.prototype;if(!l.$isClass){for(k in o){if(!h[k]){h[k]=o[k]}}}j.extend(l);j.triggerExtended.apply(j,arguments);if(n.onClassExtended){j.onExtended(n.onClassExtended,j);delete n.onClassExtended}},true);c.registerPreprocessor("statics",function(h,i){h.addStatics(i.statics);delete i.statics});c.registerPreprocessor("inheritableStatics",function(h,i){h.addInheritableStatics(i.inheritableStatics);delete i.inheritableStatics});c.registerPreprocessor("config",function(h,k){var j=k.config,i=h.prototype;delete k.config;Ext.Object.each(j,function(n,w){var u=c.getConfigNameMap(n),q=u.internal,l=u.initialized,v=u.apply,o=u.update,t=u.set,m=u.get,y=(t in i)||k.hasOwnProperty(t),p=(v in i)||k.hasOwnProperty(v),r=(o in i)||k.hasOwnProperty(o),x,s;if(w===null||(!y&&!p&&!r)){i[q]=w;i[l]=true}else{i[l]=false}if(!y){k[t]=function(B){var A=this[q],z=this[v],C=this[o];if(!this[l]){this[l]=true}if(z){B=z.call(this,B,A)}if(typeof B!="undefined"){this[q]=B;if(C&&B!==A){C.call(this,B,A)}}return this}}if(!(m in i)||k.hasOwnProperty(m)){s=k[m]||false;if(s){x=function(){return s.apply(this,arguments)}}else{x=function(){return this[q]}}k[m]=function(){var z;if(!this[l]){this[l]=true;this[t](this.config[n])}z=this[m];if("$previous" in z){z.$previous=x}else{this[m]=x}return x.apply(this,arguments)}}});h.addConfig(j,true)});c.registerPreprocessor("mixins",function(l,p,h){var j=p.mixins,m,k,n,o;delete p.mixins;Ext.Function.interceptBefore(h,"onCreated",function(){if(j instanceof Array){for(n=0,o=j.length;n<o;n++){k=j[n];m=k.prototype.mixinId||k.$className;l.mixin(m,k)}}else{for(var i in j){if(j.hasOwnProperty(i)){l.mixin(i,j[i])}}}})});Ext.extend=function(j,k,i){if(arguments.length===2&&Ext.isObject(k)){i=k;k=j;j=null}var h;if(!k){throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.")}i.extend=k;i.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(j){h=new c(j,i);h.prototype.constructor=j}else{h=new c(i)}h.prototype.override=function(n){for(var l in n){if(n.hasOwnProperty(l)){this[l]=n[l]}}};return h}}());(function(c,e,h,d,g){function a(){function i(){return this.constructor.apply(this,arguments)||null}return i}var b=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{},nameToAlternates:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(n){var m=this.existCache,l,o,k,j,p;if(this.classes[n]||m[n]){return true}j=g;p=this.parseNamespace(n);for(l=0,o=p.length;l<o;l++){k=p[l];if(typeof k!="string"){j=k}else{if(!j||!j[k]){return false}j=j[k]}}m[n]=true;this.triggerCreated(n);return true},createdListeners:[],nameCreatedListeners:{},triggerCreated:function(s){var u=this.createdListeners,m=this.nameCreatedListeners,n=this.maps.nameToAlternates[s],t=[s],p,r,o,q,l,k;for(p=0,r=u.length;p<r;p++){l=u[p];l.fn.call(l.scope,s)}if(n){t.push.apply(t,n)}for(p=0,r=t.length;p<r;p++){k=t[p];u=m[k];if(u){for(o=0,q=u.length;o<q;o++){l=u[o];l.fn.call(l.scope,k)}delete m[k]}}},onCreated:function(m,l,k){var j=this.createdListeners,i=this.nameCreatedListeners,n={fn:m,scope:l};if(k){if(this.isCreated(k)){m.call(l,k);return}if(!i[k]){i[k]=[]}i[k].push(n)}else{j.push(n)}},parseNamespace:function(l){var j=this.namespaceParseCache,m,o,q,k,t,s,r,n,p;if(this.enableNamespaceParseCache){if(j.hasOwnProperty(l)){return j[l]}}m=[];o=this.namespaceRewrites;q=g;k=l;for(n=0,p=o.length;n<p;n++){t=o[n];s=t.from;r=t.to;if(k===s||k.substring(0,s.length)===s){k=k.substring(s.length);if(typeof r!="string"){q=r}else{m=m.concat(r.split("."))}break}}m.push(q);m=m.concat(k.split("."));if(this.enableNamespaceParseCache){j[l]=m}return m},setNamespace:function(m,p){var k=g,q=this.parseNamespace(m),o=q.length-1,j=q[o],n,l;for(n=0;n<o;n++){l=q[n];if(typeof l!="string"){k=l}else{if(!k[l]){k[l]={}}k=k[l]}}k[j]=p;return k[j]},createNamespaces:function(){var k=g,p,m,n,l,o,q;for(n=0,o=arguments.length;n<o;n++){p=this.parseNamespace(arguments[n]);for(l=0,q=p.length;l<q;l++){m=p[l];if(typeof m!="string"){k=m}else{if(!k[m]){k[m]={}}k=k[m]}}}return k},set:function(i,m){var l=this,o=l.maps,n=o.nameToAlternates,k=l.getName(m),j;l.classes[i]=l.setNamespace(i,m);if(k&&k!==i){o.alternateToName[i]=k;j=n[k]||(n[k]=[]);j.push(i)}return this},get:function(l){var n=this.classes,j,p,k,m,o;if(n[l]){return n[l]}j=g;p=this.parseNamespace(l);for(m=0,o=p.length;m<o;m++){k=p[m];if(typeof k!="string"){j=k}else{if(!j||!j[k]){return null}j=j[k]}}return j},setAlias:function(i,j){var l=this.maps.aliasToName,m=this.maps.nameToAliases,k;if(typeof i=="string"){k=i}else{k=this.getName(i)}if(j&&l[j]!==k){l[j]=k}if(!m[k]){m[k]=[]}if(j){Ext.Array.include(m[k],j)}return this},addNameAliasMappings:function(j){var o=this.maps.aliasToName,p=this.maps.nameToAliases,m,n,l,k;for(m in j){n=p[m]||(p[m]=[]);for(k=0;k<j[m].length;k++){l=j[m][k];if(!o[l]){o[l]=m;n.push(l)}}}return this},addNameAlternateMappings:function(m){var j=this.maps.alternateToName,p=this.maps.nameToAlternates,l,n,o,k;for(l in m){n=p[l]||(p[l]=[]);for(k=0;k<m[l].length;k++){o=m[l];if(!j[o]){j[o]=l;n.push(o)}}}return this},getByAlias:function(i){return this.get(this.getNameByAlias(i))},getNameByAlias:function(i){return this.maps.aliasToName[i]||""},getNameByAlternate:function(i){return this.maps.alternateToName[i]||""},getAliasesByName:function(i){return this.maps.nameToAliases[i]||[]},getName:function(i){return i&&i.$className||""},getClass:function(i){return i&&i.self||null},create:function(j,l,i){var k=a();if(typeof l=="function"){l=l(k)}l.$className=j;return new c(k,l,function(){var m=l.postprocessors||b.defaultPostprocessors,t=b.postprocessors,u=[],s,o,r,n,q,p,v;delete l.postprocessors;for(o=0,r=m.length;o<r;o++){s=m[o];if(typeof s=="string"){s=t[s];p=s.properties;if(p===true){u.push(s.fn)}else{if(p){for(n=0,q=p.length;n<q;n++){v=p[n];if(l.hasOwnProperty(v)){u.push(s.fn);break}}}}}else{u.push(s)}}l.postprocessors=u;l.createdFn=i;b.processCreate(j,this,l)})},processCreate:function(l,j,n){var m=this,i=n.postprocessors.shift(),k=n.createdFn;if(!i){if(l){m.set(l,j)}if(k){k.call(j,j)}if(l){m.triggerCreated(l)}return}if(i.call(m,l,j,n,m.processCreate)!==false){m.processCreate(l,j,n)}},createOverride:function(l,p,j){var o=this,n=p.override,k=p.requires,i=p.uses,m=function(){var q,r;if(k){r=k;k=null;Ext.Loader.require(r,m)}else{q=o.get(n);delete p.override;delete p.requires;delete p.uses;Ext.override(q,p);o.triggerCreated(l);if(i){Ext.Loader.addUsedClasses(i)}if(j){j.call(q)}}};o.existCache[l]=true;o.onCreated(m,o,n);return o},instantiateByAlias:function(){var j=arguments[0],i=h.call(arguments),k=this.getNameByAlias(j);if(!k){k=this.maps.aliasToName[j];Ext.syncRequire(k)}i[0]=k;return this.instantiate.apply(this,i)},instantiate:function(){var k=arguments[0],m=typeof k,j=h.call(arguments,1),l=k,n,i;if(m!="function"){if(m!="string"&&j.length===0){j=[k];k=k.xclass}i=this.get(k)}else{i=k}if(!i){n=this.getNameByAlias(k);if(n){k=n;i=this.get(k)}}if(!i){n=this.getNameByAlternate(k);if(n){k=n;i=this.get(k)}}if(!i){Ext.syncRequire(k);i=this.get(k)}return this.getInstantiator(j.length)(i,j)},dynInstantiate:function(j,i){i=d(i,true);i.unshift(j);return this.instantiate.apply(this,i)},getInstantiator:function(m){var l=this.instantiators,n,k,j;n=l[m];if(!n){k=m;j=[];for(k=0;k<m;k++){j.push("a["+k+"]")}n=l[m]=new Function("c","a","return new c("+j.join(",")+")")}return n},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(j,m,k,i,l){if(!i){i="last"}if(!k){k=[j]}this.postprocessors[j]={name:j,properties:k||false,fn:m};this.setDefaultPostprocessorPosition(j,i,l);return this},setDefaultPostprocessors:function(i){this.defaultPostprocessors=d(i);return this},setDefaultPostprocessorPosition:function(j,m,l){var k=this.defaultPostprocessors,i;if(typeof m=="string"){if(m==="first"){k.unshift(j);return this}else{if(m==="last"){k.push(j);return this}}m=(m==="after")?1:-1}i=Ext.Array.indexOf(k,l);if(i!==-1){Ext.Array.splice(k,Math.max(0,i+m),0,j)}return this},getNamesByExpression:function(q){var o=this.maps.nameToAliases,r=[],j,n,l,k,s,m,p;if(q.indexOf("*")!==-1){q=q.replace(/\*/g,"(.*?)");s=new RegExp("^"+q+"$");for(j in o){if(o.hasOwnProperty(j)){l=o[j];if(j.search(s)!==-1){r.push(j)}else{for(m=0,p=l.length;m<p;m++){n=l[m];if(n.search(s)!==-1){r.push(j);break}}}}}}else{k=this.getNameByAlias(q);if(k){r.push(k)}else{k=this.getNameByAlternate(q);if(k){r.push(k)}else{r.push(q)}}}return r}};b.registerPostprocessor("alias",function(l,k,o){var j=o.alias,m,n;for(m=0,n=j.length;m<n;m++){e=j[m];this.setAlias(k,e)}},["xtype","alias"]);b.registerPostprocessor("singleton",function(j,i,l,k){k.call(this,j,new i(),l);return false});b.registerPostprocessor("alternateClassName",function(k,j,o){var m=o.alternateClassName,l,n,p;if(!(m instanceof Array)){m=[m]}for(l=0,n=m.length;l<n;l++){p=m[l];this.set(p,j)}});Ext.apply(Ext,{create:e(b,"instantiate"),widget:function(k,j){var o=k,l,m,i,n;if(typeof o!="string"){j=k;o=j.xtype}else{j=j||{}}if(j.isComponent){return j}l="widget."+o;m=b.getNameByAlias(l);if(!m){n=true}i=b.get(m);if(n||!i){return b.instantiateByAlias(l,j)}return new i(j)},createByAlias:e(b,"instantiateByAlias"),define:function(j,k,i){if(k.override){return b.createOverride.apply(b,arguments)}return b.create.apply(b,arguments)},getClassName:e(b,"getName"),getDisplayName:function(i){if(i){if(i.displayName){return i.displayName}if(i.$name&&i.$class){return Ext.getClassName(i.$class)+"#"+i.$name}if(i.$className){return i.$className}}return"Anonymous"},getClass:e(b,"getClass"),namespace:e(b,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;c.registerPreprocessor("className",function(i,j){if(j.$className){i.$className=j.$className}},true,"first");c.registerPreprocessor("alias",function(u,o){var s=u.prototype,l=d(o.xtype),j=d(o.alias),v="widget.",t=v.length,p=Array.prototype.slice.call(s.xtypesChain||[]),m=Ext.merge({},s.xtypesMap||{}),n,r,q,k;for(n=0,r=j.length;n<r;n++){q=j[n];if(q.substring(0,t)===v){k=q.substring(t);Ext.Array.include(l,k)}}u.xtype=o.xtype=l[0];o.xtypes=l;for(n=0,r=l.length;n<r;n++){k=l[n];if(!m[k]){m[k]=true;p.push(k)}}o.xtypesChain=p;o.xtypesMap=m;Ext.Function.interceptAfter(o,"onClassCreated",function(){var i=s.mixins,x,w;for(x in i){if(i.hasOwnProperty(x)){w=i[x];l=w.xtypes;if(l){for(n=0,r=l.length;n<r;n++){k=l[n];if(!m[k]){m[k]=true;p.push(k)}}}}}});for(n=0,r=l.length;n<r;n++){k=l[n];Ext.Array.include(j,v+k)}o.alias=j},["xtype","alias"])}(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global));Ext.Loader=new function(){var j=this,b=Ext.ClassManager,r=Ext.Class,e=Ext.Function.flexSetter,m=Ext.Function.alias,a=Ext.Function.pass,d=Ext.Function.defer,h=Ext.Array.erase,l=["extend","mixins","requires"],t={},k=[],c=/\/\.\//g,g=/\./g;Ext.apply(j,{isInHistory:t,history:k,config:{enabled:false,scriptChainDelay:false,disableCaching:true,disableCachingParam:"_dc",garbageCollect:false,paths:{Ext:"."},preserveScripts:true,scriptCharset:undefined},setConfig:function(w,x){if(Ext.isObject(w)&&arguments.length===1){Ext.merge(j.config,w)}else{j.config[w]=(Ext.isObject(x))?Ext.merge(j.config[w],x):x}return j},getConfig:function(w){if(w){return j.config[w]}return j.config},setPath:e(function(w,x){j.config.paths[w]=x;return j}),addClassPathMappings:function(x){var w;for(w in x){j.config.paths[w]=x[w]}return j},getPath:function(w){var y="",z=j.config.paths,x=j.getPrefix(w);if(x.length>0){if(x===w){return z[x]}y=z[x];w=w.substring(x.length+1)}if(y.length>0){y+="/"}return y.replace(c,"/")+w.replace(g,"/")+".js"},getPrefix:function(x){var z=j.config.paths,y,w="";if(z.hasOwnProperty(x)){return x}for(y in z){if(z.hasOwnProperty(y)&&y+"."===x.substring(0,y.length+1)){if(y.length>w.length){w=y}}}return w},isAClassNameWithAKnownPrefix:function(w){var x=j.getPrefix(w);return x!==""&&x!==w},require:function(y,x,w,z){if(x){x.call(w)}},syncRequire:function(){},exclude:function(w){return{require:function(z,y,x){return j.require(z,y,x,w)},syncRequire:function(z,y,x){return j.syncRequire(z,y,x,w)}}},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}z.call(y)}});var o=[],p={},s={},q={},n={},u=[],v=[],i={};Ext.apply(j,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:o,isClassFileLoaded:p,isFileLoaded:s,readyListeners:u,optionalRequires:v,requiresMap:i,numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:q,scriptsLoading:0,syncModeEnabled:false,scriptElements:n,refreshQueue:function(){var A=o.length,x,z,w,y;if(!A&&!j.scriptsLoading){return j.triggerReady()}for(x=0;x<A;x++){z=o[x];if(z){y=z.requires;if(y.length>j.numLoadedFiles){continue}for(w=0;w<y.length;){if(b.isCreated(y[w])){h(y,w,1)}else{w++}}if(z.requires.length===0){h(o,x,1);z.callback.call(z.scope);j.refreshQueue();break}}}return j},injectScriptElement:function(w,D,A,F,y){var E=document.createElement("script"),B=false,x=j.config,C=function(){if(!B){B=true;E.onload=E.onreadystatechange=E.onerror=null;if(typeof x.scriptChainDelay=="number"){d(D,x.scriptChainDelay,F)}else{D.call(F)}j.cleanupScriptElement(E,x.preserveScripts===false,x.garbageCollect)}},z=function(G){d(A,1,F);j.cleanupScriptElement(E,x.preserveScripts===false,x.garbageCollect)};E.type="text/javascript";E.onerror=z;y=y||x.scriptCharset;if(y){E.charset=y}if("addEventListener" in E){E.onload=C}else{if("readyState" in E){E.onreadystatechange=function(){if(this.readyState=="loaded"||this.readyState=="complete"){C()}}}else{E.onload=C}}E.src=w;(j.documentHead||document.getElementsByTagName("head")[0]).appendChild(E);return E},removeScriptElement:function(w){if(n[w]){j.cleanupScriptElement(n[w],true,!!j.getConfig("garbageCollect"));delete n[w]}return j},cleanupScriptElement:function(y,x,z){var A;y.onload=y.onreadystatechange=y.onerror=null;if(x){Ext.removeNode(y);if(z){for(A in y){try{y[A]=null;delete y[A]}catch(w){}}}}return j},loadScript:function(F){var z=j.getConfig(),y=typeof F=="string",x=y?F:F.url,B=!y&&F.onError,C=!y&&F.onLoad,E=!y&&F.scope,D=function(){j.numPendingFiles--;j.scriptsLoading--;if(B){B.call(E,"Failed loading '"+x+"', please verify that the file exists")}if(j.numPendingFiles+j.scriptsLoading===0){j.refreshQueue()}},A=function(){j.numPendingFiles--;j.scriptsLoading--;if(C){C.call(E)}if(j.numPendingFiles+j.scriptsLoading===0){j.refreshQueue()}},w;j.isLoading=true;j.numPendingFiles++;j.scriptsLoading++;w=z.disableCaching?(x+"?"+z.disableCachingParam+"="+Ext.Date.now()):x;n[x]=j.injectScriptElement(w,A,D)},loadScriptFile:function(x,E,C,H,w){if(s[x]){return j}var z=j.getConfig(),I=x+(z.disableCaching?("?"+z.disableCachingParam+"="+Ext.Date.now()):""),y=false,G,A,F,B="";H=H||j;j.isLoading=true;if(!w){F=function(){};n[x]=j.injectScriptElement(I,E,F,H)}else{if(typeof XMLHttpRequest!="undefined"){G=new XMLHttpRequest()}else{G=new ActiveXObject("Microsoft.XMLHTTP")}try{G.open("GET",I,false);G.send(null)}catch(D){y=true}A=(G.status===1223)?204:(G.status===0&&(self.location||{}).protocol=="file:")?200:G.status;y=y||(A===0);if(y){}else{if((A>=200&&A<300)||(A===304)){if(!Ext.isIE){B="\n//@ sourceURL="+x}Ext.globalEval(G.responseText+B);E.call(H)}else{}}G=null}},syncRequire:function(){var w=j.syncModeEnabled;if(!w){j.syncModeEnabled=true}j.require.apply(j,arguments);if(!w){j.syncModeEnabled=false}j.refreshQueue()},require:function(O,F,z,B){var H={},y={},E=[],Q=[],N=[],x=[],D,P,J,I,w,C,M,L,K,G,A;if(B){B=(typeof B==="string")?[B]:B;for(L=0,G=B.length;L<G;L++){w=B[L];if(typeof w=="string"&&w.length>0){E=b.getNamesByExpression(w);for(K=0,A=E.length;K<A;K++){H[E[K]]=true}}}}O=(typeof O==="string")?[O]:(O?O:[]);if(F){if(F.length>0){D=function(){var S=[],R,T;for(R=0,T=x.length;R<T;R++){S.push(b.get(x[R]))}return F.apply(this,S)}}else{D=F}}else{D=Ext.emptyFn}z=z||Ext.global;for(L=0,G=O.length;L<G;L++){I=O[L];if(typeof I=="string"&&I.length>0){Q=b.getNamesByExpression(I);A=Q.length;for(K=0;K<A;K++){M=Q[K];if(H[M]!==true){x.push(M);if(!b.isCreated(M)&&!y[M]){y[M]=true;N.push(M)}}}}}if(N.length>0){if(!j.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((N.length>1)?"es":"")+": "+N.join(", "))}}else{D.call(z);return j}P=j.syncModeEnabled;if(!P){o.push({requires:N.slice(),callback:D,scope:z})}G=N.length;for(L=0;L<G;L++){C=N[L];J=j.getPath(C);if(P&&p.hasOwnProperty(C)){j.numPendingFiles--;j.removeScriptElement(J);delete p[C]}if(!p.hasOwnProperty(C)){p[C]=false;q[C]=J;j.numPendingFiles++;j.loadScriptFile(J,a(j.onFileLoaded,[C,J],j),a(j.onFileLoadError,[C,J],j),j,P)}}if(P){D.call(z);if(G===1){return b.get(C)}}return j},onFileLoaded:function(x,w){j.numLoadedFiles++;p[x]=true;s[w]=true;j.numPendingFiles--;if(j.numPendingFiles===0){j.refreshQueue()}},onFileLoadError:function(y,x,w,z){j.numPendingFiles--;j.hasFileLoadError=true},addUsedClasses:function(y){var w,x,z;if(y){y=(typeof y=="string")?[y]:y;for(x=0,z=y.length;x<z;x++){w=y[x];if(typeof w=="string"&&!Ext.Array.contains(v,w)){v.push(w)}}}return j},triggerReady:function(){var x,w,y=v;if(j.isLoading){j.isLoading=false;if(y.length!==0){y=y.slice();v.length=0;j.require(y,j.triggerReady,j);return j}}while(u.length&&!j.isLoading){x=u.shift();x.fn.call(x.scope)}return j},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}if(!j.isLoading){z.call(y)}else{u.push({fn:z,scope:y})}},historyPush:function(w){if(w&&p.hasOwnProperty(w)&&!t[w]){t[w]=true;k.push(w)}return j}});Ext.disableCacheBuster=function(x,y){var w=new Date();w.setTime(w.getTime()+(x?10*365:-1)*24*60*60*1000);w=w.toGMTString();document.cookie="ext-cache=1; expires="+w+"; path="+(y||"/")};Ext.require=m(j,"require");Ext.syncRequire=m(j,"syncRequire");Ext.exclude=m(j,"exclude");Ext.onReady=function(y,x,w){j.onReady(y,x,true,w)};r.registerPreprocessor("loader",function(M,A,L,K){var H=this,F=[],w,G=b.getName(M),z,y,E,D,J,C,x,I,B;for(z=0,E=l.length;z<E;z++){C=l[z];if(A.hasOwnProperty(C)){x=A[C];if(typeof x=="string"){F.push(x)}else{if(x instanceof Array){for(y=0,D=x.length;y<D;y++){J=x[y];if(typeof J=="string"){F.push(J)}}}else{if(typeof x!="function"){for(y in x){if(x.hasOwnProperty(y)){J=x[y];if(typeof J=="string"){F.push(J)}}}}}}}}if(F.length===0){return}j.require(F,function(){for(z=0,E=l.length;z<E;z++){C=l[z];if(A.hasOwnProperty(C)){x=A[C];if(typeof x=="string"){A[C]=b.get(x)}else{if(x instanceof Array){for(y=0,D=x.length;y<D;y++){J=x[y];if(typeof J=="string"){A[C][y]=b.get(J)}}}else{if(typeof x!="function"){for(var N in x){if(x.hasOwnProperty(N)){J=x[N];if(typeof J=="string"){A[C][N]=b.get(J)}}}}}}}}K.call(H,M,A,L)});return false},true,"after","className");b.registerPostprocessor("uses",function(y,x,z){var w=z.uses;if(w){j.addUsedClasses(w)}});b.onCreated(j.historyPush)};if(Ext._classPathMetadata){Ext.Loader.addClassPathMappings(Ext._classPathMetadata);Ext._classPathMetadata=null}(function(){var a=document.getElementsByTagName("script"),b=a[a.length-1],d=b.src,c=d.substring(0,d.lastIndexOf("/")+1),e=Ext.Loader;e.setConfig({enabled:true,disableCaching:true,paths:{Ext:c+"src"}})})();Ext._endTime=new Date().getTime();if(Ext._beforereadyhandler){Ext._beforereadyhandler()}Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller,b;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.sourceClass?c.sourceClass:"",a=c.sourceMethod?"."+c.sourceMethod+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.deprecated=function(a){return Ext.emptyFn};Ext.JSON=(new (function(){var me=this,encodingFunction,decodingFunction,useNative=null,useHasOwn=!!{}.hasOwnProperty,isNative=function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative},pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o,newline){if(o===null||o===undefined){return"null"}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return Ext.JSON.encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(o.toJSON){return o.toJSON()}else{if(Ext.isArray(o)){return encodeArray(o,newline)}else{if(Ext.isObject(o)){return encodeObject(o,newline)}else{if(typeof o==="function"){return"null"}}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o,newline){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(Ext.JSON.encodeValue(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o,newline){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(Ext.JSON.encodeValue(i),":",Ext.JSON.encodeValue(o[i]),",")}}a[a.length-1]="}";return a.join("")};me.encodeString=encodeString;me.encodeValue=doEncode;me.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};me.encode=function(o){if(!encodingFunction){encodingFunction=isNative()?JSON.stringify:me.encodeValue}return encodingFunction(o)};me.decode=function(json,safe){if(!decodingFunction){decodingFunction=isNative()?JSON.parse:doDecode}try{return decodingFunction(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}})());Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,addCacheEntry:function(e,b,d){d=d||b.dom;var a=e||(b&&b.id)||d.id,c=Ext.cache[a]||(Ext.cache[a]={data:{},events:{},dom:d,skipGarbageCollection:!!(d.getElementById||d.navigator)});if(b){b.$cache=c;c.el=b}return c},updateCacheEntry:function(a,b){a.dom=b;if(a.el){a.el.dom=b}return a},id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){d=Ext.sandboxName.toLowerCase()+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},escapeId:(function(){var c=/^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,d=/([\W]{1})/g,b=/^(\d)/g,a=function(h,g){return"\\"+g},e=function(h,g){return"\\00"+g.charCodeAt(0).toString(16)+" "};return function(g){return c.test(g)?g:g.replace(d,a).replace(b,e)}}()),getBody:(function(){var a;return function(){return a||(a=Ext.get(document.body))}}()),getHead:(function(){var a;return function(){return a||(a=Ext.get(document.getElementsByTagName("head")[0]))}}()),getDoc:(function(){var a;return function(){return a||(a=Ext.get(document))}}()),getCmp:function(a){return Ext.ComponentManager.get(a)},getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){return Ext.String.urlAppend(a,b)}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var o=function(e){return e.test(Ext.userAgent)},t=document.compatMode=="CSS1Compat",F=function(R,Q){var e;return(R&&(e=Q.exec(Ext.userAgent)))?parseFloat(e[1]):0},p=document.documentMode,a=o(/opera/),v=a&&o(/version\/10\.5/),K=o(/\bchrome\b/),z=o(/webkit/),c=!K&&o(/safari/),I=c&&o(/applewebkit\/4/),G=c&&o(/version\/3/),D=c&&o(/version\/4/),j=c&&o(/version\/5\.0/),C=c&&o(/version\/5/),i=!a&&o(/msie/),J=i&&((o(/msie 7/)&&p!=8&&p!=9)||p==7),H=i&&((o(/msie 8/)&&p!=7&&p!=9)||p==8),E=i&&((o(/msie 9/)&&p!=7&&p!=8)||p==9),M=i&&o(/msie 6/),b=!z&&o(/gecko/),P=b&&o(/rv:1\.9/),O=b&&o(/rv:2\.0/),N=b&&o(/rv:5\./),r=b&&o(/rv:10\./),y=P&&o(/rv:1\.9\.0/),w=P&&o(/rv:1\.9\.1/),u=P&&o(/rv:1\.9\.2/),g=o(/windows|win32/),B=o(/macintosh|mac os x/),x=o(/linux/),l=null,m=F(true,/\bchrome\/(\d+\.\d+)/),h=F(true,/\bfirefox\/(\d+\.\d+)/),n=F(i,/msie (\d+\.\d+)/),s=F(a,/version\/(\d+\.\d+)/),d=F(c,/version\/(\d+\.\d+)/),A=F(z,/webkit\/(\d+\.\d+)/),q=/^https/i.test(window.location.protocol),k;try{document.execCommand("BackgroundImageCache",false,true)}catch(L){}k=function(){};k.info=k.warn=k.error=Ext.emptyFn;Ext.setVersion("extjs","4.1.1.1");Ext.apply(Ext,{SSL_SECURE_URL:q&&i?"javascript:''":"about:blank",scopeResetCSS:Ext.buildSettings.scopeResetCSS,resetCls:Ext.buildSettings.baseCSSPrefix+"reset",enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(R,Q){if(!R||!document){return null}if(R.dom){return R.dom}else{if(typeof R=="string"){var S=Ext.getElementById(R);if(S&&i&&Q){if(R==S.getAttribute("id")){return S}else{return null}}return S}else{return R}}},removeNode:M||J||H?(function(){var e;return function(S){if(S&&S.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(S):Ext.EventManager.removeAll(S);var Q=Ext.cache,R=S.id;if(Q[R]){delete Q[R].dom;delete Q[R]}if(H&&S.parentNode){S.parentNode.removeChild(S)}e=e||document.createElement("div");e.appendChild(S);e.innerHTML=""}}}()):function(R){if(R&&R.parentNode&&R.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(R):Ext.EventManager.removeAll(R);var e=Ext.cache,Q=R.id;if(e[Q]){delete e[Q].dom;delete e[Q]}R.parentNode.removeChild(R)}},isStrict:t,isIEQuirks:i&&!t,isOpera:a,isOpera10_5:v,isWebKit:z,isChrome:K,isSafari:c,isSafari3:G,isSafari4:D,isSafari5:C,isSafari5_0:j,isSafari2:I,isIE:i,isIE6:M,isIE7:J,isIE8:H,isIE9:E,isGecko:b,isGecko3:P,isGecko4:O,isGecko5:N,isGecko10:r,isFF3_0:y,isFF3_5:w,isFF3_6:u,isFF4:4<=h&&h<5,isFF5:5<=h&&h<6,isFF10:10<=h&&h<11,isLinux:x,isWindows:g,isMac:B,chromeVersion:m,firefoxVersion:h,ieVersion:n,operaVersion:s,safariVersion:d,webKitVersion:A,isSecure:q,BLANK_IMAGE_URL:(M||J)?"//www.sencha.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",value:function(R,e,Q){return Ext.isEmpty(R,Q)?e:R},escapeRe:function(e){return e.replace(/([-.*+?\^${}()|\[\]\/\\])/g,"\\$1")},addBehaviors:function(T){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(T)})}else{var Q={},S,e,R;for(e in T){if((S=e.split("@"))[1]){R=S[0];if(!Q[R]){Q[R]=Ext.select(R)}Q[R].on(S[1],T[e])}}Q=null}},getScrollbarSize:function(Q){if(!Ext.isReady){return{}}if(Q||!l){var e=document.body,R=document.createElement("div");R.style.width=R.style.height="100px";R.style.overflow="scroll";R.style.position="absolute";e.appendChild(R);l={width:R.offsetWidth-R.clientWidth,height:R.offsetHeight-R.clientHeight};e.removeChild(R)}return l},getScrollBarWidth:function(Q){var e=Ext.getScrollbarSize(Q);return e.width+2},copyTo:function(Q,S,U,T){if(typeof U=="string"){U=U.split(/[,;\s]/)}var V,R=U.length,e;for(V=0;V<R;V++){e=U[V];if(T||S.hasOwnProperty(e)){Q[e]=S[e]}}return Q},destroyMembers:function(S){for(var R=1,Q=arguments,e=Q.length;R<e;R++){Ext.destroy(S[Q[R]]);delete S[Q[R]]}},log:k,partition:function(e,T){var U=[[],[]],Q,S,R=e.length;for(Q=0;Q<R;Q++){S=e[Q];U[(T&&T(S,Q,e))||(!T&&S)?0:1].push(S)}return U},invoke:function(e,T){var V=[],U=Array.prototype.slice.call(arguments,2),Q,S,R=e.length;for(Q=0;Q<R;Q++){S=e[Q];if(S&&typeof S[T]=="function"){V.push(S[T].apply(S,U))}else{V.push(undefined)}}return V},zip:function(){var W=Ext.partition(arguments,function(X){return typeof X!="function"}),T=W[0],V=W[1][0],e=Ext.max(Ext.pluck(T,"length")),S=[],U,R,Q;for(U=0;U<e;U++){S[U]=[];if(V){S[U]=V.apply(V,Ext.pluck(T,U))}else{for(R=0,Q=T.length;R<Q;R++){S[U].push(T[R][U])}}}return S},toSentence:function(Q,e){var T=Q.length,S,R;if(T<=1){return Q[0]}else{S=Q.slice(0,T-1);R=Q[T-1];return Ext.util.Format.format("{0} {1} {2}",S.join(", "),e||"and",R)}},useShims:M})}());Ext.application=function(a){Ext.require("Ext.app.Application");Ext.onReady(function(){new Ext.app.Application(a)})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:"ab".substr(-1)!="b"?function(i,k,h){var j=String(i);return(k<0)?j.substr(Math.max(j.length+k,0),h):j.substr(k,h)}:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",o,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",o,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:(function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}()),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(y,s){if(!s){return y}y=Ext.Number.from(y,NaN);if(isNaN(y)){return""}var A=g.thousandSeparator,q=g.decimalSeparator,z=false,r=y<0,k,h,x,w,p,t,o,l,u;y=Math.abs(y);if(s.substr(s.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}s=s.substr(0,s.length-2);z=true;k=s.indexOf(A)!=-1;h=s.replace(a,"").split(q)}else{k=s.indexOf(",")!=-1;h=s.replace(d,"").split(".")}if(h.length>2){}else{if(h.length>1){y=Ext.Number.toFixed(y,h[1].length)}else{y=Ext.Number.toFixed(y,0)}}x=y.toString();h=x.split(".");if(k){w=h[0];p=[];t=w.length;o=Math.floor(t/3);l=w.length%3||3;for(u=0;u<t;u+=l){if(u!==0){l=3}p[p.length]=w.substr(u,l);o-=1}x=p.join(A);if(h[1]){x+=q+h[1]}}else{if(h[1]){x=h[0]+q+h[1]}}if(r){r=x.replace(/[^1-9]/g,"")!==""}return(r?"-":"")+s.replace(/[\d,?\.?]+/,x)},numberRenderer:function(h){return function(i){return g.number(i,h)}},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){i=Ext.isEmpty(i)?"":i;if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})}());Ext.define("Ext.util.TaskRunner",{interval:10,timerId:null,constructor:function(a){var b=this;if(typeof a=="number"){b.interval=a}else{if(a){Ext.apply(b,a)}}b.tasks=[];b.timerFn=Ext.Function.bind(b.onTick,b)},newTask:function(b){var a=new Ext.util.TaskRunner.Task(b);a.manager=this;return a},start:function(a){var c=this,b=new Date().getTime();if(!a.pending){c.tasks.push(a);a.pending=true}a.stopped=false;a.taskStartTime=b;a.taskRunTime=a.fireOnStart!==false?0:a.taskStartTime;a.taskRunCount=0;if(!c.firing){if(a.fireOnStart!==false){c.startTimer(0,b)}else{c.startTimer(a.interval,b)}}return a},stop:function(a){if(!a.stopped){a.stopped=true;if(a.onStop){a.onStop.call(a.scope||a,a)}}return a},stopAll:function(){Ext.each(this.tasks,this.stop,this)},firing:false,nextExpires:1e+99,onTick:function(){var m=this,e=m.tasks,a=new Date().getTime(),n=1e+99,k=e.length,c,o,h,b,d,g;m.timerId=null;m.firing=true;for(h=0;h<k||h<(k=e.length);++h){b=e[h];if(!(g=b.stopped)){c=b.taskRunTime+b.interval;if(c<=a){d=1;try{d=b.run.apply(b.scope||b,b.args||[++b.taskRunCount])}catch(j){try{if(b.onError){d=b.onError.call(b.scope||b,b,j)}}catch(l){}}b.taskRunTime=a;if(d===false||b.taskRunCount===b.repeat){m.stop(b);g=true}else{g=b.stopped;c=a+b.interval}}if(!g&&b.duration&&b.duration<=(a-b.taskStartTime)){m.stop(b);g=true}}if(g){b.pending=false;if(!o){o=e.slice(0,h)}}else{if(o){o.push(b)}if(n>c){n=c}}}if(o){m.tasks=o}m.firing=false;if(m.tasks.length){m.startTimer(n-a,new Date().getTime())}},startTimer:function(e,c){var d=this,b=c+e,a=d.timerId;if(a&&d.nextExpires-b>d.interval){clearTimeout(a);a=null}if(!a){if(e<d.interval){e=d.interval}d.timerId=setTimeout(d.timerFn,e);d.nextExpires=b}}},function(){var b=this,a=b.prototype;a.destroy=a.stopAll;Ext.util.TaskManager=Ext.TaskManager=new b();b.Task=new Ext.Class({isTask:true,stopped:true,fireOnStart:false,constructor:function(c){Ext.apply(this,c)},restart:function(c){if(c!==undefined){this.interval=c}this.manager.start(this)},start:function(c){if(this.stopped){this.restart(c)}},stop:function(){this.manager.stop(this)}});a=b.Task.prototype;a.destroy=a.stop});Ext.define("Ext.perf.Accumulator",(function(){var c=null,h=Ext.global.chrome,d,b=function(){b=function(){return new Date().getTime()};var l,m;if(Ext.isChrome&&h&&h.Interval){l=new h.Interval();l.start();b=function(){return l.microseconds()/1000}}else{if(window.ActiveXObject){try{m=new ActiveXObject("SenchaToolbox.Toolbox");Ext.senchaToolbox=m;b=function(){return m.milliseconds}}catch(n){}}else{if(Date.now){b=Date.now}}}Ext.perf.getTimestamp=Ext.perf.Accumulator.getTimestamp=b;return b()};function i(m,l){m.sum+=l;m.min=Math.min(m.min,l);m.max=Math.max(m.max,l)}function e(o){var m=o?o:(b()-this.time),n=this,l=n.accum;++l.count;if(!--l.depth){i(l.total,m)}i(l.pure,m-n.childTime);c=n.parent;if(c){++c.accum.childCount;c.childTime+=m}}function a(){return{min:Number.MAX_VALUE,max:0,sum:0}}function j(m,l){return function(){var o=m.enter(),n=l.apply(this,arguments);o.leave();return n}}function k(l){return Math.round(l*100)/100}function g(n,m,l,p){var o={avg:0,min:p.min,max:p.max,sum:0};if(n){l=l||0;o.sum=p.sum-m*l;o.avg=o.sum/n}return o}return{constructor:function(l){var m=this;m.count=m.childCount=m.depth=m.maxDepth=0;m.pure=a();m.total=a();m.name=l},statics:{getTimestamp:b},format:function(l){if(!d){d=new Ext.XTemplate(["{name} - {count} call(s)",'<tpl if="count">','<tpl if="childCount">'," ({childCount} children)","</tpl>",'<tpl if="depth - 1">'," ({depth} deep)","</tpl>",'<tpl for="times">',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")","</tpl>","</tpl>"].join(""),{time:function(n){return Math.round(n*100)/100}})}var m=this.getData(l);m.name=this.name;m.pure.type="Pure";m.total.type="Total";m.times=[m.pure,m.total];return d.apply(m)},getData:function(l){var m=this;return{count:m.count,childCount:m.childCount,depth:m.maxDepth,pure:g(m.count,m.childCount,l,m.pure),total:g(m.count,m.childCount,l,m.total)}},enter:function(){var l=this,m={accum:l,leave:e,childTime:0,parent:c};++l.depth;if(l.maxDepth<l.depth){l.maxDepth=l.depth}c=m;m.time=b();return m},monitor:function(n,m,l){var o=this.enter();if(l){n.apply(m,l)}else{n.call(m)}o.leave()},report:function(){Ext.log(this.format())},tap:function(t,v){var u=this,o=typeof v=="string"?[v]:v,s,w,q,p,n,m,l,r;r=function(){if(typeof t=="string"){s=Ext.global;p=t.split(".");for(q=0,n=p.length;q<n;++q){s=s[p[q]]}}else{s=t}for(q=0,n=o.length;q<n;++q){m=o[q];w=m.charAt(0)=="!";if(w){m=m.substring(1)}else{w=!(m in s.prototype)}l=w?s:s.prototype;l[m]=j(u,l[m])}};Ext.ClassManager.onCreated(r,u,t);return u}}}()),function(){Ext.perf.getTimestamp=this.getTimestamp});Ext.define("Ext.perf.Monitor",{singleton:true,alternateClassName:"Ext.Perf",requires:["Ext.perf.Accumulator"],constructor:function(){this.accumulators=[];this.accumulatorsByName={}},calibrate:function(){var b=new Ext.perf.Accumulator("$"),g=b.total,c=Ext.perf.Accumulator.getTimestamp,e=0,h,a,d;d=c();do{h=b.enter();h.leave();++e}while(g.sum<100);a=c();return(a-d)/e},get:function(b){var c=this,a=c.accumulatorsByName[b];if(!a){c.accumulatorsByName[b]=a=new Ext.perf.Accumulator(b);c.accumulators.push(a)}return a},enter:function(a){return this.get(a).enter()},monitor:function(a,c,b){this.get(a).monitor(c,b)},report:function(){var c=this,b=c.accumulators,a=c.calibrate();b.sort(function(e,d){return(e.name<d.name)?-1:((d.name<e.name)?1:0)});c.updateGC();Ext.log("Calibration: "+Math.round(a*100)/100+" msec/sample");Ext.each(b,function(d){Ext.log(d.format(a))})},getData:function(c){var b={},a=this.accumulators;Ext.each(a,function(d){if(c||d.count){b[d.name]=d.getData()}});return b},reset:function(){Ext.each(this.accumulators,function(a){var b=a;b.count=b.childCount=b.depth=b.maxDepth=0;b.pure={min:Number.MAX_VALUE,max:0,sum:0};b.total={min:Number.MAX_VALUE,max:0,sum:0}})},updateGC:function(){var a=this.accumulatorsByName.GC,b=Ext.senchaToolbox,c;if(a){a.count=b.garbageCollectionCounter||0;if(a.count){c=a.pure;a.total.sum=c.sum=b.garbageCollectionMilliseconds;c.min=c.max=c.sum/a.count;c=a.total;c.min=c.max=c.sum/a.count}}},watchGC:function(){Ext.perf.getTimestamp();var a=Ext.senchaToolbox;if(a){this.get("GC");a.watchGarbageCollector(false)}},setup:function(c){if(!c){c={render:{"Ext.AbstractComponent":"render"},layout:{"Ext.layout.Context":"run"}}}this.currentConfig=c;var d,g,b,e,a;for(d in c){if(c.hasOwnProperty(d)){g=c[d];b=Ext.Perf.get(d);for(e in g){if(g.hasOwnProperty(e)){a=g[e];b.tap(e,a)}}}}this.watchGC()}});Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();(function(){var a=function(d,c){var b=d.ownerDocument.defaultView,e=(b?b.getComputedStyle(d,null):d.currentStyle)||d.style;return e[c]};Ext.supports={init:function(){var d=this,e=document,c=d.tests,i=c.length,h=i&&Ext.isReady&&e.createElement("div"),g,b=[];if(h){h.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="position: absolute; left: 10%; top: 10%;"></div>','<div style="float:left; background-color:transparent;"></div>'].join("");e.body.appendChild(h)}while(i--){g=c[i];if(h||g.early){d[g.identity]=g.fn.call(d,e,h)}else{b.push(g)}}if(h){e.body.removeChild(h)}d.tests=b},PointerEvents:"pointerEvents" in document.documentElement.style,CSS3BoxShadow:"boxShadow" in document.documentElement.style||"WebkitBoxShadow" in document.documentElement.style||"MozBoxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),TimeoutActualLateness:(function(){setTimeout(function(){Ext.supports.TimeoutActualLateness=arguments.length!==0},0)}()),tests:[{identity:"Transitions",fn:function(h,k){var g=["webkit","Moz","o","ms","khtml"],j="TransitionEnd",b=[g[0]+j,"transitionend",g[2]+j,g[3]+j,g[4]+j],e=g.length,d=0,c=false;for(;d<e;d++){if(a(k,g[d]+"TransitionProperty")){Ext.supports.CSS3Prefix=g[d];Ext.supports.CSS3TransitionEnd=b[d];c=true;break}}return c}},{identity:"RightMargin",fn:function(c,d){var b=c.defaultView;return !(b&&b.getComputedStyle(d.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",early:true,fn:function(){var b=Ext.webKitVersion;return 0<b&&b<533}},{identity:"DisplayChangeTextAreaSelectionBug",early:true,fn:function(){var b=Ext.webKitVersion;return 0<b&&b<534.24}},{identity:"TransparentColor",fn:function(c,d,b){b=c.defaultView;return !(b&&b.getComputedStyle(d.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(c,d,b){b=c.defaultView;return b&&b.getComputedStyle}},{identity:"Svg",fn:function(b){return !!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(b){return !!b.createElement("canvas").getContext}},{identity:"Vml",fn:function(b){var c=b.createElement("div");c.innerHTML="<!--[if vml]><br/><br/><![endif]-->";return(c.childNodes.length==2)}},{identity:"Float",fn:function(b,c){return !!c.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(b){return !!b.createElement("audio").canPlayType}},{identity:"History",fn:function(){var b=window.history;return !!(b&&b.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(h,j){var g="background-image:",d="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",i="linear-gradient(left top, black, white)",e="-moz-"+i,b="-o-"+i,c=[g+d,g+i,g+e,g+b];j.style.cssText=c.join(";");return(""+j.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(e,g){var c=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],d=false,b;for(b=0;b<c.length;b++){if(document.body.style[c[b]]!==undefined){return true}}return d}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&typeof navigator.geolocation!="undefined")||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(b,c){return("onmouseenter" in c&&"onmouseleave" in c)}},{identity:"MouseWheel",fn:function(b,c){return("onmousewheel" in c)}},{identity:"Opacity",fn:function(b,c){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}c.firstChild.style.cssText="opacity:0.73";return c.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(b){return"placeholder" in b.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)}},{identity:"BoundingClientRect",fn:function(b,c){return Ext.isFunction(c.getBoundingClientRect)}},{identity:"IncludePaddingInWidthCalculation",fn:function(b,c){return c.childNodes[1].firstChild.offsetWidth==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(b,c){return c.childNodes[1].firstChild.offsetHeight==210}},{identity:"ArraySort",fn:function(){var b=[1,2,3,4,5].sort(function(){return 0});return b[0]===1&&b[1]===2&&b[2]===3&&b[3]===4&&b[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var b=Ext.supports.Range?document.createRange():false;return b&&!!b.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}},{identity:"TextAreaMaxLength",fn:function(){var b=document.createElement("textarea");return("maxlength" in b)}},{identity:"GetPositionPercentage",fn:function(b,c){return a(c.childNodes[2],"left")=="10%"}}]}}());Ext.supports.init();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){var b={};function d(h,i,j,g){return function(){if(j.target===arguments[0]){h.apply(g,arguments)}}}function c(h,i,j,g){i.task=new Ext.util.DelayedTask();return function(){i.task.delay(j.buffer,h,g,Ext.Array.toArray(arguments))}}function a(h,i,j,g){return function(){var k=new Ext.util.DelayedTask();if(!i.tasks){i.tasks=[]}i.tasks.push(k);k.delay(j.delay||10,h,g,Ext.Array.toArray(arguments))}}function e(h,i,j,g){return function(){var k=i.ev;if(k.removeListener(i.fn,g)&&k.observable){k.observable.hasListeners[k.name]--}return h.apply(g,arguments)}}return{isEvent:true,constructor:function(h,g){this.name=g;this.observable=h;this.listeners=[]},addListener:function(i,h,g){var j=this,k;h=h||j.observable;if(!j.isListening(i,h)){k=j.createListener(i,h,g);if(j.firing){j.listeners=j.listeners.slice(0)}j.listeners.push(k)}},createListener:function(j,i,g){g=g||b;i=i||this.observable;var k={fn:j,scope:i,o:g,ev:this},h=j;if(g.single){h=e(h,k,g,i)}if(g.target){h=d(h,k,g,i)}if(g.delay){h=a(h,k,g,i)}if(g.buffer){h=c(h,k,g,i)}k.fireFn=h;return k},findListener:function(l,k){var j=this.listeners,g=j.length,m,h;while(g--){m=j[g];if(m){h=m.scope;if(m.fn==l&&(h==(k||this.observable))){return g}}}return -1},isListening:function(h,g){return this.findListener(h,g)!==-1},removeListener:function(j,i){var l=this,h,m,g;h=l.findListener(j,i);if(h!=-1){m=l.listeners[h];if(l.firing){l.listeners=l.listeners.slice(0)}if(m.task){m.task.cancel();delete m.task}g=m.tasks&&m.tasks.length;if(g){while(g--){m.tasks[g].cancel()}delete m.tasks}Ext.Array.erase(l.listeners,h,1);return true}return false},clearListeners:function(){var h=this.listeners,g=h.length;while(g--){this.removeListener(h[g].fn,h[g].scope)}},fire:function(){var l=this,j=l.listeners,k=j.length,h,g,m;if(k>0){l.firing=true;for(h=0;h<k;h++){m=j[h];g=arguments.length?Array.prototype.slice.call(arguments,0):[];if(m.o){g.push(m.o)}if(m&&m.fireFn.apply(m.scope||l.observable,g)===false){return(l.firing=false)}}}l.firing=false;return true}}}()))});Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}}return a},prepareClass:function(d,c){if(!d.HasListeners){var b=Ext.util.Observable,e=function(){},a=d.superclass.HasListeners||(c&&c.HasListeners)||b.HasListeners;d.prototype.HasListeners=d.HasListeners=e;e.prototype=d.hasListeners=new a()}}},isObservable:true,eventsSuspended:0,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.hasListeners){b.hasListeners=new b.HasListeners()}b.events=b.events||{};if(b.listeners){b.on(b.listeners);b.listeners=null}if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},onClassExtended:function(a){if(!a.HasListeners){Ext.util.Observable.prepareClass(a)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(i,d,g,e,c){var h=this,a=h.managedListeners=h.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!h.eventOptionsRe.test(d)){h.addManagedListener(i,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:i,ename:d,fn:g,scope:e,options:c});i.on(d,g,e,c)}},removeManagedListener:function(j,c,g,k){var e=this,l,b,h,a,d;if(typeof c!=="string"){l=c;for(c in l){if(l.hasOwnProperty(c)){b=l[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(j,c,b.fn||b,b.scope||l.scope)}}}}h=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=h.length;d<a;d++){e.removeManagedListenerItem(false,h[d],j,c,g,k)}},fireEvent:function(a){a=a.toLowerCase();var e=this,c=e.events,d=c&&c[a],b=true;if(d&&e.hasListeners[a]){b=e.continueFireEvent(a,Ext.Array.slice(arguments,1),d.bubble)}return b},continueFireEvent:function(c,e,b){var h=this,a,g,d=true;do{if(h.eventsSuspended){if((a=h.eventQueue)){a.push([c,e,b])}return d}else{g=h.events[c];if(g&&g!=true){if((d=g.fire.apply(g,e))===false){break}}}}while(b&&(h=h.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&&b.getBubbleTarget();if(a&&a.isObservable){return a}return null},addListener:function(c,g,i,j){var e=this,b,a,d,h=0;if(typeof c!=="string"){j=c;for(c in j){if(j.hasOwnProperty(c)){b=j[c];if(!e.eventOptionsRe.test(c)){e.addListener(c,b.fn||b,b.scope||j.scope,b.fn?b:j)}}}}else{c=c.toLowerCase();a=e.events[c];if(a&&a.isEvent){h=a.listeners.length}else{e.events[c]=a=new Ext.util.Event(e,c)}if(typeof g==="string"){g=i[g]||e[g]}a.addListener(g,i,j);if(a.listeners.length!==h){d=e.hasListeners;if(d.hasOwnProperty(c)){++d[c]}else{d[c]=1}}}},removeListener:function(c,e,d){var h=this,b,g,a;if(typeof c!=="string"){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!h.eventOptionsRe.test(c)){h.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();g=h.events[c];if(g&&g.isEvent){if(g.removeListener(e,d)&&!--h.hasListeners[c]){delete h.hasListeners[c]}}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c<a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,g,c,e,d){if(b||(a.item===g&&a.ename===c&&(!e||a.fn===e)&&(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(g){var e=this,d=e.events||(e.events={}),a,b,c;if(typeof g=="string"){for(b=arguments,c=b.length;c--;){a=b[c];if(!d[a]){d[a]=true}}}else{Ext.applyIf(e.events,g)}},hasListener:function(a){return !!this.hasListeners[a.toLowerCase()]},suspendEvents:function(a){this.eventsSuspended+=1;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,d=a.eventQueue,c,b;if(a.eventsSuspended&&!--a.eventsSuspended){delete a.eventQueue;if(d){c=d.length;for(b=0;b<c;b++){a.continueFireEvent.apply(a,d[b])}}}},relayEvents:function(c,e,j){var h=this,a=e.length,d=0,g,b;for(;d<a;d++){g=e[d];b=j?j+g:g;h.mon(c,g,h.createRelayer(b))}},createRelayer:function(a,b){var c=this;return function(){return c.fireEvent.apply(c,[a].concat(Array.prototype.slice.apply(arguments,b||[0,-1])))}},enableBubble:function(j){if(j){var g=this,h=(typeof j=="string")?arguments:j,e=h.length,c=g.events,b,d,a;for(a=0;a<e;++a){b=h[a].toLowerCase();d=c[b];if(!d||typeof d=="boolean"){c[b]=d=new Ext.util.Event(g,b)}g.hasListeners[b]=(g.hasListeners[b]||0)+1;d.bubble=true}}}},function(){var a=this,d=a.prototype,b=function(){},e=function(g){if(!g.HasListeners){var h=g.prototype;a.prepareClass(g,this);g.onExtended(function(i){a.prepareClass(i)});if(h.onClassMixedIn){Ext.override(g,{onClassMixedIn:function(i){e.call(this,i);this.callParent(arguments)}})}else{h.onClassMixedIn=function(i){e.call(this,i)}}}};b.prototype={};d.HasListeners=a.HasListeners=b;a.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});a.observeClass=a.observe;function c(m){var l=(this.methodEvents=this.methodEvents||{})[m],i,h,j,k=this,g;if(!l){this.methodEvents[m]=l={};l.originalFn=this[m];l.methodName=m;l.before=[];l.after=[];g=function(p,o,n){if((h=p.apply(o||k,n))!==undefined){if(typeof h=="object"){if(h.returnValue!==undefined){i=h.returnValue}else{i=h}j=!!h.cancel}else{if(h===false){j=true}else{i=h}}}};this[m]=function(){var p=Array.prototype.slice.call(arguments,0),o,q,n;i=h=undefined;j=false;for(q=0,n=l.before.length;q<n;q++){o=l.before[q];g(o.fn,o.scope,p);if(j){return i}}if((h=l.originalFn.apply(k,p))!==undefined){i=h}for(q=0,n=l.after.length;q<n;q++){o=l.after[q];g(o.fn,o.scope,p);if(j){return i}}return i}}return l}Ext.apply(d,{onClassMixedIn:e,beforeMethod:function(i,h,g){c.call(this,i).before.push({fn:h,scope:g})},afterMethod:function(i,h,g){c.call(this,i).after.push({fn:h,scope:g})},removeMethodListener:function(m,k,j){var l=this.getMethodEvent(m),h,g;for(h=0,g=l.before.length;h<g;h++){if(l.before[h].fn==k&&l.before[h].scope==j){Ext.Array.erase(l.before,h,1);return}}for(h=0,g=l.after.length;h<g;h++){if(l.after[h].fn==k&&l.after[h].scope==j){Ext.Array.erase(l.after,h,1);return}}},toggleEventLogging:function(g){Ext.util.Observable[g?"capture":"releaseCapture"](this,function(h){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(h,arguments)}})}})});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,c){var b=this;if(c===undefined){c=a;a=b.getKey(c)}if(b.containsKey(a)){return b.replace(a,c)}b.map[a]=c;++b.length;if(b.hasListeners.add){b.fireEvent("add",b,a,c)}return c},replace:function(b,d){var c=this,e=c.map,a;if(d===undefined){d=b;b=c.getKey(d)}if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;if(c.hasListeners.replace){c.fireEvent("replace",c,b,d,a)}return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;if(b.hasListeners.remove){b.fireEvent("remove",b,a,c)}return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true&&b.hasListeners.clear){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=new Ext.util.HashMap();this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(g,c,b){var a=this.all,d,e;if(a.containsKey(g)){d=a.get(g);c.call(b||d,d)}else{e=function(j,h,i){if(h==g){c.call(b||i,i);a.un("add",e)}};a.on("add",e)}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(a,b){if(typeof a=="string"){return Ext.widget(a)}if(a.isComponent){return a}return Ext.widget(a.xtype||b,a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.ComponentQuery",{singleton:true,requires:["Ext.ComponentManager"]},function(){var h=this,k=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(p,o){return o.method.apply(this,[p].concat(o.args))},a=function(q,u){var o=[],r=0,t=q.length,s,p=u!==">";for(;r<t;r++){s=q[r];if(s.getRefItems){o=o.concat(s.getRefItems(p))}}return o},g=function(p){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];while(!!(r=(r.ownerCt||r.floatParent))){o.push(r)}}return o},m=function(p,u,t){if(u==="*"){return p.slice()}else{var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.isXType(u,t)){o.push(r)}}return o}},j=function(p,s){var u=Ext.Array,o=[],q=0,t=p.length,r;for(;q<t;q++){r=p[q];if(r.hasCls(s)){o.push(r)}}return o},n=function(q,v,p,u){var o=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(!u?!!s[v]:(String(s[v])===u)){o.push(s)}}return o},d=function(p,t){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.getItemId()===t){o.push(r)}}return o},l=function(o,p,q){return h.pseudos[p](o,q)},i=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(o){o=o||{};Ext.apply(this,o)},execute:function(p){var r=this.operations,s=0,t=r.length,q,o;if(!p){o=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(p)){o=p}else{if(p.isMixedCollection){o=p.items}}}for(;s<t;s++){q=r[s];if(q.mode==="^"){o=g(o||[p])}else{if(q.mode){o=a(o||[p],q.mode)}else{o=e(o||a([p]),q)}}if(s===t-1){return o}}return[]},is:function(q){var p=this.operations,t=Ext.isArray(q)?q:[q],o=t.length,u=p[p.length-1],s,r;t=e(t,u);if(t.length===o){if(p.length>1){for(r=0,s=t.length;r<s;r++){if(Ext.Array.indexOf(this.execute(),t[r])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(u,o){var v=Ext.ComponentQuery,s=0,t=u.length,r=[],q=-1,p;for(;s<t;++s){p=u[s];if(!v.is(p,o)){r[++q]=p}}return r},first:function(p){var o=[];if(p.length>0){o.push(p[0])}return o},last:function(q){var o=q.length,p=[];if(o>0){p.push(q[o-1])}return p}},query:function(p,w){var x=p.split(","),o=x.length,q=0,r=[],y=[],v={},t,s,u;for(;q<o;q++){p=Ext.String.trim(x[q]);t=this.cache[p]||(this.cache[p]=this.parse(p));r=r.concat(t.execute(w))}if(o>1){s=r.length;for(q=0;q<s;q++){u=r[q];if(!v[u.id]){y.push(u);v[u.id]=true}}r=y}return r},is:function(p,o){if(!o){return true}var r=o.split(","),s=r.length,q=0,t;for(;q<s;q++){o=Ext.String.trim(r[q]);t=this.cache[o]||(this.cache[o]=this.parse(o));if(t.is(p)){return true}}return false},parse:function(r){var p=[],q=b.length,v,s,w,x,y,t,u,o;while(r&&v!==r){v=r;s=r.match(c);if(s){w=s[1];if(w==="#"){p.push({method:d,args:[Ext.String.trim(s[2])]})}else{if(w==="."){p.push({method:j,args:[Ext.String.trim(s[2])]})}else{p.push({method:m,args:[Ext.String.trim(s[2]),Boolean(s[3])]})}}r=r.replace(s[0],"")}while(!(x=r.match(i))){for(t=0;r&&t<q;t++){u=b[t];y=r.match(u.re);o=u.method;if(y){p.push({method:Ext.isString(u.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[o].concat(y.slice(1)))):u.method,args:y.slice(1)});r=r.replace(y[0],"");break}if(t===(q-1)){Ext.Error.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}if(x[1]){p.push({mode:x[2]||x[1]});r=r.replace(x[0],"")}}return new h.Query({operations:p})}})});Ext.define("Ext.util.ProtoElement",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{isProtoEl:true,clsProp:"cls",styleProp:"style",removedProp:"removed",styleIsText:false,constructor:function(c){var d=this;Ext.apply(d,c);d.classList=b(d.cls);d.classMap=a(d.classList);delete d.cls;if(Ext.isFunction(d.style)){d.styleFn=d.style;delete d.style}else{if(typeof d.style=="string"){d.style=Ext.Element.parseStyles(d.style)}else{if(d.style){d.style=Ext.apply({},d.style)}}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style},addCls:function(n){var l=this,m=b(n),e=m.length,j=l.classList,d=l.classMap,g=l.flushClassList,h=0,k;for(;h<e;++h){k=m[h];if(!d[k]){d[k]=true;j.push(k);if(g){g.push(k);delete l.removedClasses[k]}}}return l},hasCls:function(c){return c in this.classMap},removeCls:function(o){var n=this,l=n.classList,g=(n.classList=[]),j=a(b(o)),e=l.length,d=n.classMap,k=n.removedClasses,h,m;for(h=0;h<e;++h){m=l[h];if(j[m]){if(k){if(d[m]){k[m]=true;Ext.Array.remove(n.flushClassList,m)}}delete d[m]}else{g.push(m)}}return n},setStyle:function(g,e){var d=this,c=d.style||(d.style={});if(typeof g=="string"){if(arguments.length===1){d.setStyle(Ext.Element.parseStyles(g))}else{c[g]=e}}else{Ext.apply(c,g)}return d},writeTo:function(h){var e=this,g=e.flushClassList||e.classList,d=e.removedClasses,c;if(e.styleFn){c=Ext.apply({},e.styleFn());Ext.apply(c,e.style)}else{c=e.style}h[e.clsProp]=g.join(" ");if(c){h[e.styleProp]=e.styleIsText?Ext.DomHelper.generateStyles(c):c}if(d){d=Ext.Object.getKeys(d);if(d.length){h[e.removedProp]=d.join(" ")}}return h}}}()));Ext.EventManager=new function(){var a=this,d=document,c=window,b=function(){var k=d.body||d.getElementsByTagName("body")[0],i=Ext.baseCSSPrefix,o=[i+"body"],g=[],m=Ext.supports.CSS3LinearGradient,l=Ext.supports.CSS3BorderRadius,h=[],j,e;if(!k){return false}j=k.parentNode;function n(p){o.push(i+p)}if(Ext.isIE){n("ie");if(Ext.isIE6){n("ie6")}else{n("ie7p");if(Ext.isIE7){n("ie7")}else{n("ie8p");if(Ext.isIE8){n("ie8")}else{n("ie9p");if(Ext.isIE9){n("ie9")}}}}if(Ext.isIE6||Ext.isIE7){n("ie7m")}if(Ext.isIE6||Ext.isIE7||Ext.isIE8){n("ie8m")}if(Ext.isIE7||Ext.isIE8){n("ie78")}}if(Ext.isGecko){n("gecko");if(Ext.isGecko3){n("gecko3")}if(Ext.isGecko4){n("gecko4")}if(Ext.isGecko5){n("gecko5")}}if(Ext.isOpera){n("opera")}if(Ext.isWebKit){n("webkit")}if(Ext.isSafari){n("safari");if(Ext.isSafari2){n("safari2")}if(Ext.isSafari3){n("safari3")}if(Ext.isSafari4){n("safari4")}if(Ext.isSafari5){n("safari5")}if(Ext.isSafari5_0){n("safari5_0")}}if(Ext.isChrome){n("chrome")}if(Ext.isMac){n("mac")}if(Ext.isLinux){n("linux")}if(!l){n("nbr")}if(!m){n("nlg")}if(Ext.scopeResetCSS){e=Ext.resetElementSpec={cls:i+"reset"};if(!m){h.push(i+"nlg")}if(!l){h.push(i+"nbr")}if(h.length){e.cn={cls:h.join(" ")}}Ext.resetElement=Ext.getBody().createChild(e);if(h.length){Ext.resetElement=Ext.get(Ext.resetElement.dom.firstChild)}}else{Ext.resetElement=Ext.getBody();n("reset")}if(j){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}if(Ext.isBorderBox){g.push(i+"border-box")}if(Ext.isStrict){g.push(i+"strict")}else{g.push(i+"quirks")}Ext.fly(j,"_internal").addCls(g)}Ext.fly(k,"_internal").addCls(o);return true};Ext.apply(a,{hasBoundOnReady:false,hasFiredReady:false,deferReadyEvent:1,onReadyChain:[],readyEvent:(function(){var e=new Ext.util.Event();e.fire=function(){Ext._beforeReadyTime=Ext._beforeReadyTime||new Date().getTime();e.self.prototype.fire.apply(e,arguments);Ext._afterReadytime=new Date().getTime()};return e}()),idleEvent:new Ext.util.Event(),isReadyPaused:function(){return(/[?&]ext-pauseReadyFire\b/i.test(location.search)&&!Ext._continueFireReady)},bindReadyEvent:function(){if(a.hasBoundOnReady){return}if(d.readyState=="complete"){a.onReadyEvent({type:d.readyState||"body"})}else{document.addEventListener("DOMContentLoaded",a.onReadyEvent,false);window.addEventListener("load",a.onReadyEvent,false);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.removeEventListener("DOMContentLoaded",a.onReadyEvent,false);window.removeEventListener("load",a.onReadyEvent,false)}if(!Ext.isReady){a.fireDocReady()}},fireDocReady:function(){if(!Ext.isReady){Ext._readyTime=new Date().getTime();Ext.isReady=true;Ext.supports.init();a.onWindowUnload();a.readyEvent.onReadyChain=a.onReadyChain;if(Ext.isNumber(a.deferReadyEvent)){Ext.Function.defer(a.fireReadyEvent,a.deferReadyEvent);a.hasDocReadyTimer=true}else{a.fireReadyEvent()}}},fireReadyEvent:function(){var e=a.readyEvent;a.hasDocReadyTimer=false;a.isFiring=true;while(e.listeners.length&&!a.isReadyPaused()){e.fire()}a.isFiring=false;a.hasFiredReady=true},onDocumentReady:function(h,g,e){e=e||{};e.single=true;a.readyEvent.addListener(h,g,e);if(!(a.isFiring||a.hasDocReadyTimer)){if(Ext.isReady){a.fireReadyEvent()}else{a.bindReadyEvent()}}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(e){var g;e=Ext.getDom(e);if(e===d||e===c){g=e===d?Ext.documentId:Ext.windowId}else{g=Ext.id(e)}if(!Ext.cache[g]){Ext.addCacheEntry(g,null,e)}return g},prepareListenerConfig:function(i,g,k){var l=a.propRe,h,j,e;for(h in g){if(g.hasOwnProperty(h)){if(!l.test(h)){j=g[h];if(typeof j=="function"){e=[i,h,j,g.scope,g]}else{e=[i,h,j.fn,j.scope,j]}if(k){a.removeListener.apply(a,e)}else{a.addListener.apply(a,e)}}}}},mouseEnterLeaveRe:/mouseenter|mouseleave/,normalizeEvent:function(e,g){if(a.mouseEnterLeaveRe.test(e)&&!Ext.supports.MouseEnterLeave){if(g){g=Ext.Function.createInterceptor(g,a.contains)}e=e=="mouseenter"?"mouseover":"mouseout"}else{if(e=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){e="DOMMouseScroll"}}return{eventName:e,fn:g}},contains:function(g){var e=g.browserEvent.currentTarget,h=a.getRelatedTarget(g);if(e&&e.firstChild){while(h){if(h===e){return false}h=h.parentNode;if(h&&(h.nodeType!=1)){h=null}}}return true},addListener:function(h,e,k,j,g){if(typeof e!=="string"){a.prepareListenerConfig(h,e);return}var l=h.dom||Ext.getDom(h),m,i;g=g||{};m=a.normalizeEvent(e,k);i=a.createListenerWrap(l,e,m.fn,j,g);if(l.attachEvent){l.attachEvent("on"+m.eventName,i)}else{l.addEventListener(m.eventName,i,g.capture||false)}if(l==d&&e=="mousedown"){a.stoppedMouseDownEvent.addListener(i)}a.getEventListenerCache(h.dom?h:l,e).push({fn:k,wrap:i,scope:j})},removeListener:function(p,q,r,t){if(typeof q!=="string"){a.prepareListenerConfig(p,q,true);return}var n=Ext.getDom(p),h=p.dom?p:Ext.get(n),e=a.getEventListenerCache(h,q),s=a.normalizeEvent(q).eventName,o=e.length,m,k,g,l;while(o--){k=e[o];if(k&&(!r||k.fn==r)&&(!t||k.scope===t)){g=k.wrap;if(g.task){clearTimeout(g.task);delete g.task}m=g.tasks&&g.tasks.length;if(m){while(m--){clearTimeout(g.tasks[m])}delete g.tasks}if(n.detachEvent){n.detachEvent("on"+s,g)}else{n.removeEventListener(s,g,false)}if(g&&n==d&&q=="mousedown"){a.stoppedMouseDownEvent.removeListener(g)}Ext.Array.erase(e,o,1)}}},removeAll:function(i){var j=i.dom?i:Ext.get(i),g,h,e;if(!j){return}g=(j.$cache||j.getCache());h=g.events;for(e in h){if(h.hasOwnProperty(e)){a.removeListener(j,e)}}g.events={}},purgeElement:function(j,g){var k=Ext.getDom(j),h=0,e;if(g){a.removeListener(j,g)}else{a.removeAll(j)}if(k&&k.childNodes){for(e=j.childNodes.length;h<e;h++){a.purgeElement(j.childNodes[h],g)}}},createListenerWrap:function(i,h,l,m,n){n=n||{};var k,j,e=/\\/g,g=function(p,o){if(!j){k=["if(!"+Ext.name+") {return;}"];if(n.buffer||n.delay||n.freezeEvent){k.push("e = new X.EventObjectImpl(e, "+(n.freezeEvent?"true":"false")+");")}else{k.push("e = X.EventObject.setEvent(e);")}if(n.delegate){k.push('var result, t = e.getTarget("'+(n.delegate+"").replace(e,"\\\\")+'", this);');k.push("if(!t) {return;}")}else{k.push("var t = e.target, result;")}if(n.target){k.push("if(e.target !== options.target) {return;}")}if(n.stopEvent){k.push("e.stopEvent();")}else{if(n.preventDefault){k.push("e.preventDefault();")}if(n.stopPropagation){k.push("e.stopPropagation();")}}if(n.normalized===false){k.push("e = e.browserEvent;")}if(n.buffer){k.push("(wrap.task && clearTimeout(wrap.task));");k.push("wrap.task = setTimeout(function() {")}if(n.delay){k.push("wrap.tasks = wrap.tasks || [];");k.push("wrap.tasks.push(setTimeout(function() {")}k.push("result = fn.call(scope || dom, e, t, options);");if(n.single){k.push("evtMgr.removeListener(dom, ename, fn, scope);")}if(h!=="mousemove"){k.push("if (evtMgr.idleEvent.listeners.length) {");k.push("evtMgr.idleEvent.fire();");k.push("}")}if(n.delay){k.push("}, "+n.delay+"));")}if(n.buffer){k.push("}, "+n.buffer+");")}k.push("return result;");j=Ext.cacheableFunctionFactory("e","options","fn","scope","ename","dom","wrap","args","X","evtMgr",k.join("\n"))}return j.call(i,p,n,l,m,h,i,g,o,Ext,a)};return g},getEventListenerCache:function(i,e){var h,g;if(!i){return[]}if(i.$cache){h=i.$cache}else{h=Ext.cache[a.getId(i)]}g=h.events||(h.events={});return g[e]||(g[e]=[])},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(e){a.stopPropagation(e);a.preventDefault(e)},stopPropagation:function(e){e=e.browserEvent||e;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}},preventDefault:function(g){g=g.browserEvent||g;if(g.preventDefault){g.preventDefault()}else{g.returnValue=false;try{if(g.ctrlKey||g.keyCode>111&&g.keyCode<124){g.keyCode=-1}}catch(h){}}},getRelatedTarget:function(e){e=e.browserEvent||e;var g=e.relatedTarget;if(!g){if(a.mouseLeaveRe.test(e.type)){g=e.toElement}else{if(a.mouseEnterRe.test(e.type)){g=e.fromElement}}}return a.resolveTextNode(g)},getPageX:function(e){return a.getPageXY(e)[0]},getPageY:function(e){return a.getPageXY(e)[1]},getPageXY:function(h){h=h.browserEvent||h;var g=h.pageX,j=h.pageY,i=d.documentElement,e=d.body;if(!g&&g!==0){g=h.clientX+(i&&i.scrollLeft||e&&e.scrollLeft||0)-(i&&i.clientLeft||e&&e.clientLeft||0);j=h.clientY+(i&&i.scrollTop||e&&e.scrollTop||0)-(i&&i.clientTop||e&&e.clientTop||0)}return[g,j]},getTarget:function(e){e=e.browserEvent||e;return a.resolveTextNode(e.target||e.srcElement)},resolveTextNode:Ext.isGecko?function(g){if(!g){return}var e=HTMLElement.prototype.toString.call(g);if(e=="[xpconnect wrapped native prototype]"||e=="[object XULElement]"){return}return g.nodeType==3?g.parentNode:g}:function(e){return e&&e.nodeType==3?e.parentNode:e},curWidth:0,curHeight:0,onWindowResize:function(i,h,g){var e=a.resizeEvent;if(!e){a.resizeEvent=e=new Ext.util.Event();a.on(c,"resize",a.fireResize,null,{buffer:100})}e.addListener(i,h,g)},fireResize:function(){var e=Ext.Element.getViewWidth(),g=Ext.Element.getViewHeight();if(a.curHeight!=g||a.curWidth!=e){a.curHeight=g;a.curWidth=e;a.resizeEvent.fire(e,g)}},removeResizeListener:function(h,g){var e=a.resizeEvent;if(e){e.removeListener(h,g)}},onWindowUnload:function(i,h,g){var e=a.unloadEvent;if(!e){a.unloadEvent=e=new Ext.util.Event();a.addListener(c,"unload",a.fireUnload)}if(i){e.addListener(i,h,g)}},fireUnload:function(){try{d=c=undefined;var m,h,k,j,g;a.unloadEvent.fire();if(Ext.isGecko3){m=Ext.ComponentQuery.query("gridview");h=0;k=m.length;for(;h<k;h++){m[h].scrollToTop()}}g=Ext.cache;for(j in g){if(g.hasOwnProperty(j)){a.removeAll(j)}}}catch(l){}},removeUnloadListener:function(h,g){var e=a.unloadEvent;if(e){e.removeListener(h,g)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return a.useKeyDown?"keydown":"keypress"}});if(!("addEventListener" in document)&&document.attachEvent){Ext.apply(a,{pollScroll:function(){var g=true;try{document.documentElement.doScroll("left")}catch(h){g=false}if(g&&document.body){a.onReadyEvent({type:"doScroll"})}else{a.scrollTimeout=setTimeout(a.pollScroll,20)}return g},scrollTimeout:null,readyStatesRe:/complete/i,checkReadyState:function(){var e=document.readyState;if(a.readyStatesRe.test(e)){a.onReadyEvent({type:e})}},bindReadyEvent:function(){var g=true;if(a.hasBoundOnReady){return}try{g=window.frameElement===undefined}catch(h){g=false}if(!g||!d.documentElement.doScroll){a.pollScroll=Ext.emptyFn}if(a.pollScroll()===true){return}if(d.readyState=="complete"){a.onReadyEvent({type:"already "+(d.readyState||"body")})}else{d.attachEvent("onreadystatechange",a.checkReadyState);window.attachEvent("onload",a.onReadyEvent);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.detachEvent("onreadystatechange",a.checkReadyState);window.detachEvent("onload",a.onReadyEvent)}if(Ext.isNumber(a.scrollTimeout)){clearTimeout(a.scrollTimeout);delete a.scrollTimeout}if(!Ext.isReady){a.fireDocReady()}},onReadyChain:[]})}Ext.onReady=function(h,g,e){Ext.Loader.onReady(h,g,true,e)};Ext.onDocumentReady=a.onDocumentReady;a.on=a.addListener;a.un=a.removeListener;Ext.onReady(b)};Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a}()),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:(function(){var d,e={},c;if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}())},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g<c;g++){if(typeof k[g]=="string"){if(typeof k[g][0]=="@"){d=b.getAttributeNode(k[g].substring(1));h.push(d)}else{d=b.querySelectorAll(k[g]);for(e=0,a=d.length;e<a;e++){h.push(d[e])}}}}return h},selectNode:function(b,a){return this.select(b,a)[0]},is:function(a,b){if(typeof a=="string"){a=document.getElementById(a)}return this.select(b).indexOf(a)!==-1}});Ext.define("Ext.dom.AbstractHelper",{emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/(?:tag|children|cn|html|tpl|tplData)$/i,endRe:/end/i,attributeTransform:{cls:"class",htmlFor:"for"},closeTags:{},decamelizeName:(function(){var c=/([a-z])([A-Z])/g,b={};function a(d,g,e){return g+"-"+e.toLowerCase()}return function(d){return b[d]||(b[d]=d.replace(c,a))}}()),generateMarkup:function(d,c){var h=this,b,j,a,e,g;if(typeof d=="string"){c.push(d)}else{if(Ext.isArray(d)){for(e=0;e<d.length;e++){if(d[e]){h.generateMarkup(d[e],c)}}}else{a=d.tag||"div";c.push("<",a);for(b in d){if(d.hasOwnProperty(b)){j=d[b];if(!h.confRe.test(b)){if(typeof j=="object"){c.push(" ",b,'="');h.generateStyles(j,c).push('"')}else{c.push(" ",h.attributeTransform[b]||b,'="',j,'"')}}}}if(h.emptyTags.test(a)){c.push("/>")}else{c.push(">");if((j=d.tpl)){j.applyOut(d.tplData,c)}if((j=d.html)){c.push(j)}if((j=d.cn||d.children)){h.generateMarkup(j,c)}g=h.closeTags;c.push(g[a]||(g[a]="</"+a+">"))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(d,e){if(e){var b=0,a,c;d=Ext.fly(d);if(typeof e=="function"){e=e.call()}if(typeof e=="string"){e=Ext.util.Format.trim(e).split(/\s*(?::|;)\s*/);for(a=e.length;b<a;){d.setStyle(e[b++],e[b++])}}else{if(Ext.isObject(e)){d.setStyle(e)}}}},insertHtml:function(g,a,h){var e={},c,j,i,k,d,b;g=g.toLowerCase();e.beforebegin=["BeforeBegin","previousSibling"];e.afterend=["AfterEnd","nextSibling"];i=a.ownerDocument.createRange();j="setStart"+(this.endRe.test(g)?"After":"Before");if(e[g]){i[j](a);k=i.createContextualFragment(h);a.parentNode.insertBefore(k,g=="beforebegin"?a:a.nextSibling);return a[(g=="beforebegin"?"previous":"next")+"Sibling"]}else{d=(g=="afterbegin"?"first":"last")+"Child";if(a.firstChild){i[j](a[d]);k=i.createContextualFragment(h);if(g=="afterbegin"){a.insertBefore(k,a.firstChild)}else{a.appendChild(k)}}else{a.innerHTML=h}return a[d]}throw'Illegal insertion point -> "'+g+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});(function(){var a=window.document,b=/^\s+|\s+$/g,c=/\s/;if(!Ext.cache){Ext.cache={}}Ext.define("Ext.dom.AbstractElement",{inheritableStatics:{get:function(e){var g=this,h=Ext.dom.Element,d,j,i,k;if(!e){return null}if(typeof e=="string"){if(e==Ext.windowId){return h.get(window)}else{if(e==Ext.documentId){return h.get(a)}}d=Ext.cache[e];if(d&&d.skipGarbageCollection){j=d.el;return j}if(!(i=a.getElementById(e))){return null}if(d&&d.el){j=Ext.updateCacheEntry(d,i).el}else{j=new h(i,!!d)}return j}else{if(e.tagName){if(!(k=e.id)){k=Ext.id(e)}d=Ext.cache[k];if(d&&d.el){j=Ext.updateCacheEntry(d,e).el}else{j=new h(e,!!d)}return j}else{if(e instanceof g){if(e!=g.docEl&&e!=g.winEl){k=e.id;d=Ext.cache[k];if(d){Ext.updateCacheEntry(d,a.getElementById(k)||e.dom)}}return e}else{if(e.isComposite){return e}else{if(Ext.isArray(e)){return g.select(e)}else{if(e===a){if(!g.docEl){g.docEl=Ext.Object.chain(h.prototype);g.docEl.dom=a;g.docEl.id=Ext.id(a);g.addToCache(g.docEl)}return g.docEl}else{if(e===window){if(!g.winEl){g.winEl=Ext.Object.chain(h.prototype);g.winEl.dom=window;g.winEl.id=Ext.id(window);g.addToCache(g.winEl)}return g.winEl}}}}}}}return null},addToCache:function(d,e){if(d){Ext.addCacheEntry(e,d)}return d},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var n,m={},k,d,g,l,e,o=[],h=false;for(k=0,d=arguments.length;k<d;k++){n=arguments[k];if(Ext.isString(n)){n=n.replace(b,"").split(c)}if(n){for(g=0,l=n.length;g<l;g++){e=n[g];if(!m[e]){if(k){h=true}m[e]=true}}}}for(e in m){o.push(e)}o.changed=h;return o},removeCls:function(g,l){var e={},h,k,j,d=[],m=false;if(g){if(Ext.isString(g)){g=g.replace(b,"").split(c)}for(h=0,k=g.length;h<k;h++){e[g[h]]=true}}if(l){if(Ext.isString(l)){l=l.split(c)}for(h=0,k=l.length;h<k;h++){j=l[h];if(e[j]){m=true;delete e[j]}}}for(j in e){d.push(j)}d.changed=m;return d},VISIBILITY:1,DISPLAY:2,OFFSETS:3,ASCLASS:4},constructor:function(d,e){var g=this,h=typeof d=="string"?a.getElementById(d):d,i;if(!h){return null}i=h.id;if(!e&&i&&Ext.cache[i]){return Ext.cache[i].el}g.dom=h;g.id=i||Ext.id(h);g.self.addToCache(g)},set:function(i,e){var g=this.dom,d,h;for(d in i){if(i.hasOwnProperty(d)){h=i[d];if(d=="style"){this.applyStyles(h)}else{if(d=="cls"){g.className=h}else{if(e!==false){if(h===undefined){g.removeAttribute(d)}else{g.setAttribute(d,h)}}else{g[d]=h}}}}}return this},defaultUnit:"px",is:function(d){return Ext.DomQuery.is(this.dom,d)},getValue:function(d){var e=this.dom.value;return d?parseInt(e,10):e},remove:function(){var d=this,e=d.dom;if(e){Ext.removeNode(e);delete d.dom}},contains:function(d){if(!d){return false}var e=this,g=d.dom||d;return(g===e.dom)||Ext.dom.AbstractElement.isAncestor(e.dom,g)},getAttribute:function(d,e){var g=this.dom;return g.getAttributeNS(e,d)||g.getAttribute(e+":"+d)||g.getAttribute(d)||g[d]},update:function(d){if(this.dom){this.dom.innerHTML=d}return this},setHTML:function(d){if(this.dom){this.dom.innerHTML=d}return this},getHTML:function(){return this.dom?this.dom.innerHTML:""},hide:function(){this.setVisible(false);return this},show:function(){this.setVisible(true);return this},setVisible:function(j,d){var e=this,i=e.self,h=e.getVisibilityMode(),g=Ext.baseCSSPrefix;switch(h){case i.VISIBILITY:e.removeCls([g+"hidden-display",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-visibility");break;case i.DISPLAY:e.removeCls([g+"hidden-visibility",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-display");break;case i.OFFSETS:e.removeCls([g+"hidden-visibility",g+"hidden-display"]);e[j?"removeCls":"addCls"](g+"hidden-offsets");break}return e},getVisibilityMode:function(){var e=(this.$cache||this.getCache()).data,d=e.visibilityMode;if(d===undefined){e.visibilityMode=d=this.self.DISPLAY}return d},setVisibilityMode:function(d){(this.$cache||this.getCache()).data.visibilityMode=d;return this},getCache:function(){var d=this,e=d.dom.id||Ext.id(d.dom);d.$cache=Ext.cache[e]||Ext.addCacheEntry(e,null,d.dom);return d.$cache}},function(){var d=this;Ext.getDetachedBody=function(){var e=d.detachedBodyEl;if(!e){e=a.createElement("div");d.detachedBodyEl=e=new d.Fly(e);e.isDetachedBody=true}return e};Ext.getElementById=function(h){var g=a.getElementById(h),e;if(!g&&(e=d.detachedBodyEl)){g=e.dom.querySelector("#"+Ext.escapeId(h))}return g};Ext.get=function(e){return Ext.dom.Element.get(e)};this.addStatics({Fly:new Ext.Class({extend:d,isFly:true,constructor:function(e){this.dom=e},attach:function(e){this.dom=e;this.$cache=e.id?Ext.cache[e.id]:null;return this}}),_flyweights:{},fly:function(i,g){var h=null,e=d._flyweights;g=g||"_global";i=Ext.getDom(i);if(i){h=e[g]||(e[g]=new d.Fly());h.dom=i;h.$cache=i.id?Ext.cache[i.id]:null}return h}});Ext.fly=function(){return d.fly.apply(d,arguments)};(function(e){e.destroy=e.remove;if(a.querySelector){e.getById=function(i,g){var h=a.getElementById(i)||this.dom.querySelector("#"+Ext.escapeId(i));return g?h:(h?Ext.get(h):null)}}else{e.getById=function(i,g){var h=a.getElementById(i);return g?h:(h?Ext.get(h):null)}}}(this.prototype))})}());Ext.dom.AbstractElement.addInheritableStatics({unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9\-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(typeof b=="number"){return b+(a||this.defaultUnit||"px")}if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(!this.unitRe.test(b)){return b||""}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}},unitizeBox:function(g,e){var d=this.addUnits,c=this.parseBox(g);return d(c.top,e)+" "+d(c.right,e)+" "+d(c.bottom,e)+" "+d(c.left,e)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});(function(){var g=document,a=Ext.dom.AbstractElement,e=null,d=g.compatMode=="CSS1Compat",c,b=function(i){if(!c){c=new a.Fly()}c.attach(i);return c};if(!("activeElement" in g)&&g.addEventListener){g.addEventListener("focus",function(i){if(i&&i.target){e=(i.target==g)?null:i.target}},true)}function h(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}a.addInheritableStatics({getActiveElement:function(){return g.activeElement||e},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug,o,i,p,j;if(l||m){o=g.activeElement||e;i=o&&o.tagName;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&o.type=="text")){if(Ext.dom.Element.isAncestor(n,o)){p=o.selectionStart;j=o.selectionEnd;if(Ext.isNumber(p)&&Ext.isNumber(j)){return h(o,p,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(i){return i?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!d?g.body.scrollHeight:g.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!d?g.body.scrollWidth:g.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(i){return Ext.dom.Element.getXY(i)[1]},getX:function(i){return Ext.dom.Element.getXY(i)[0]},getXY:function(k){var n=g.body,j=g.documentElement,i=0,l=0,o=[0,0],r=Math.round,m,q;k=Ext.getDom(k);if(k!=g&&k!=n){if(Ext.isIE){try{m=k.getBoundingClientRect();l=j.clientTop||n.clientTop;i=j.clientLeft||n.clientLeft}catch(p){m={left:0,top:0}}}else{m=k.getBoundingClientRect()}q=b(document).getScroll();o=[r(m.left+q.left-i),r(m.top+q.top-l)]}return o},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){Ext.dom.Element.setXY(j,[i,false])},setY:function(i,j){Ext.dom.Element.setXY(i,[false,j])},serializeForm:function(k){var l=k.elements||(document.forms[k]||Ext.getDom(k)).elements,v=false,u=encodeURIComponent,p="",n=l.length,q,i,t,x,w,r,m,s,j;for(r=0;r<n;r++){q=l[r];i=q.name;t=q.type;x=q.options;if(!q.disabled&&i){if(/select-(one|multiple)/i.test(t)){s=x.length;for(m=0;m<s;m++){j=x[m];if(j.selected){w=j.hasAttribute?j.hasAttribute("value"):j.getAttributeNode("value").specified;p+=Ext.String.format("{0}={1}&",u(i),u(w?j.value:j.text))}}}else{if(!(/file|undefined|reset|button/i.test(t))){if(!(/radio|checkbox/i.test(t)&&!q.checked)&&!(t=="submit"&&v)){p+=u(i)+"="+u(q.value)+"&";v=/submit/i.test(t)}}}}}return p.substr(0,p.length-1)}})}());Ext.dom.AbstractElement.override({getAnchorXY:function(g,k,n){g=(g||"tl").toLowerCase();n=n||{};var j=this,a=j.dom==document.body||j.dom==document,b=n.width||a?window.innerWidth:j.getWidth(),l=n.height||a?window.innerHeight:j.getHeight(),m,c=Math.round,d=j.getXY(),i=a?0:!k?d[0]:0,h=a?0:!k?d[1]:0,e={c:[c(b*0.5),c(l*0.5)],t:[c(b*0.5),0],l:[0,c(l*0.5)],r:[b,c(l*0.5)],b:[c(b*0.5),l],tl:[0,0],bl:[0,l],br:[b,l],tr:[b,0]};m=e[g];return[m[0]+i,m[1]+h]},alignToRe:/^([a-z]+)-([a-z]+)(\?)?$/,getAlignToXY:function(e,z,i,s){s=!!s;e=Ext.get(e);i=i||[0,0];if(!z||z=="?"){z="tl-bl?"}else{if(!(/-/).test(z)&&z!==""){z="tl-"+z}}z=z.toLowerCase();var v=this,d=z.match(this.alignToRe),n=window.innerWidth,u=window.innerHeight,c="",b="",A,w,m,l,q,o,g,a,k,j,r,p,h,t;if(!d){throw"Element.alignTo with an invalid alignment "+z}c=d[1];b=d[2];t=!!d[3];A=v.getAnchorXY(c,true);w=e.getAnchorXY(b,s);m=w[0]-A[0]+i[0];l=w[1]-A[1]+i[1];if(t){r=v.getWidth();p=v.getHeight();h=e.getPageBox();a=c.charAt(0);g=c.charAt(c.length-1);j=b.charAt(0);k=b.charAt(b.length-1);o=((a=="t"&&j=="b")||(a=="b"&&j=="t"));q=((g=="r"&&k=="l")||(g=="l"&&k=="r"));if(m+r>n){m=q?h.left-r:n-r}if(m<0){m=q?h.right:0}if(l+p>u){l=o?h.top-p:u-p}if(l<0){l=o?h.bottom:0}}return[m,l]},getAnchor:function(){var b=(this.$cache||this.getCache()).data,a;if(!this.dom){return}a=b._anchor;if(!a){a=b._anchor={}}return a},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c}});Ext.dom.AbstractElement.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(b,g,j){var i=this,k=(g||"before").toLowerCase()=="after",d,a,c,h;if(Ext.isArray(b)){a=i;c=b.length;for(h=0;h<c;h++){d=Ext.fly(a,"_internal").insertSibling(b[h],g,j);if(k){a=d}}return d}b=b||{};if(b.nodeType||b.dom){d=i.dom.parentNode.insertBefore(Ext.getDom(b),k?i.dom.nextSibling:i.dom);if(!j){d=Ext.get(d)}}else{if(k&&!i.dom.nextSibling){d=Ext.core.DomHelper.append(i.dom.parentNode,b,!j)}else{d=Ext.core.DomHelper[k?"insertAfter":"insertBefore"](i.dom,b,!j)}}return d},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.AbstractElement.addToCache(b.isFlyweight?new Ext.dom.AbstractElement(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c,a){var e=Ext.core.DomHelper.insertBefore(this.dom,b||{tag:"div"},true),d=e;if(a){d=Ext.DomQuery.selectNode(a,e.dom)}d.appendChild(this.dom);return c?e.dom:e},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});(function(){var a=Ext.dom.AbstractElement;a.override({getX:function(b){return this.getXY(b)[0]},getY:function(b){return this.getXY(b)[1]},getXY:function(){var b=window.webkitConvertPointFromNodeToPage(this.dom,new WebKitPoint(0,0));return[b.x,b.y]},getOffsetsTo:function(b){var d=this.getXY(),c=Ext.fly(b,"_internal").getXY();return[d[0]-c[0],d[1]-c[1]]},setX:function(b){return this.setXY([b,this.getY()])},setY:function(b){return this.setXY([this.getX(),b])},setLeft:function(b){this.setStyle("left",a.addUnits(b));return this},setTop:function(b){this.setStyle("top",a.addUnits(b));return this},setRight:function(b){this.setStyle("right",a.addUnits(b));return this},setBottom:function(b){this.setStyle("bottom",a.addUnits(b));return this},setXY:function(g){var c=this,e,b,d;if(arguments.length>1){g=[g,arguments[1]]}e=c.translatePoints(g);b=c.dom.style;for(d in e){if(!e.hasOwnProperty(d)){continue}if(!isNaN(e[d])){b[d]=e[d]+"px"}}return c},getLeft:function(b){return parseInt(this.getStyle("left"),10)||0},getRight:function(b){return parseInt(this.getStyle("right"),10)||0},getTop:function(b){return parseInt(this.getStyle("top"),10)||0},getBottom:function(b){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(b,i){i=isNaN(b[1])?i:b[1];b=isNaN(b[0])?b:b[0];var e=this,g=e.isStyle("position","relative"),h=e.getXY(),c=parseInt(e.getStyle("left"),10),d=parseInt(e.getStyle("top"),10);c=!isNaN(c)?c:(g?0:e.dom.offsetLeft);d=!isNaN(d)?d:(g?0:e.dom.offsetTop);return{left:(b-h[0]+c),top:(i-h[1]+d)}},setBox:function(e){var d=this,c=e.width,b=e.height,h=e.top,g=e.left;if(g!==undefined){d.setLeft(g)}if(h!==undefined){d.setTop(h)}if(c!==undefined){d.setWidth(c)}if(b!==undefined){d.setHeight(b)}return this},getBox:function(i,m){var j=this,g=j.dom,d=g.offsetWidth,n=g.offsetHeight,p,h,e,c,o,k;if(!m){p=j.getXY()}else{if(i){p=[0,0]}else{p=[parseInt(j.getStyle("left"),10)||0,parseInt(j.getStyle("top"),10)||0]}}if(!i){h={x:p[0],y:p[1],0:p[0],1:p[1],width:d,height:n}}else{e=j.getBorderWidth.call(j,"l")+j.getPadding.call(j,"l");c=j.getBorderWidth.call(j,"r")+j.getPadding.call(j,"r");o=j.getBorderWidth.call(j,"t")+j.getPadding.call(j,"t");k=j.getBorderWidth.call(j,"b")+j.getPadding.call(j,"b");h={x:p[0]+e,y:p[1]+o,0:p[0]+e,1:p[1]+o,width:d-(e+c),height:n-(o+k)}}h.left=h.x;h.top=h.y;h.right=h.x+h.width;h.bottom=h.y+h.height;return h},getPageBox:function(g){var j=this,d=j.dom,m=d.offsetWidth,i=d.offsetHeight,o=j.getXY(),n=o[1],c=o[0]+m,k=o[1]+i,e=o[0];if(!d){return new Ext.util.Region()}if(g){return new Ext.util.Region(n,c,k,e)}else{return{left:e,top:n,width:m,height:i,right:c,bottom:k}}}})}());(function(){var q=Ext.dom.AbstractElement,o=document.defaultView,n=Ext.Array,m=/^\s+|\s+$/g,b=/\w/g,p=/\s+/,t=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,h=Ext.supports.ClassList,e="padding",d="margin",s="border",k="-left",r="-right",l="-top",c="-bottom",i="-width",j={l:s+k+i,r:s+r+i,t:s+l+i,b:s+c+i},g={l:e+k,r:e+r,t:e+l,b:e+c},a={l:d+k,r:d+r,t:d+l,b:d+c};q.override({styleHooks:{},addStyles:function(B,A){var w=0,z=(B||"").match(b),y,u=z.length,x,v=[];if(u==1){w=Math.abs(parseFloat(this.getStyle(A[z[0]]))||0)}else{if(u){for(y=0;y<u;y++){x=z[y];v.push(A[x])}v=this.getStyle(v);for(y=0;y<u;y++){x=z[y];w+=Math.abs(parseFloat(v[A[x]])||0)}}}return w},addCls:h?function(x){var z=this,B=z.dom,A,y,w,u,v;if(typeof(x)=="string"){x=x.replace(m,"").split(p)}if(B&&x&&!!(u=x.length)){if(!B.className){B.className=x.join(" ")}else{A=B.classList;for(w=0;w<u;++w){v=x[w];if(v){if(!A.contains(v)){if(y){y.push(v)}else{y=B.className.replace(m,"");y=y?[y,v]:[v]}}}}if(y){B.className=y.join(" ")}}}return z}:function(v){var w=this,y=w.dom,x,u;if(y&&v&&v.length){u=Ext.Element.mergeClsList(y.className,v);if(u.changed){y.className=u.join(" ")}}return w},removeCls:function(w){var x=this,y=x.dom,u,v;if(typeof(w)=="string"){w=w.replace(m,"").split(p)}if(y&&y.className&&w&&!!(u=w.length)){if(u==1&&h){if(w[0]){y.classList.remove(w[0])}}else{v=Ext.Element.removeCls(y.className,w);if(v.changed){y.className=v.join(" ")}}}return x},radioCls:function(y){var z=this.dom.parentNode.childNodes,w,x,u;y=Ext.isArray(y)?y:[y];for(x=0,u=z.length;x<u;x++){w=z[x];if(w&&w.nodeType==1){Ext.fly(w,"_internal").removeCls(y)}}return this.addCls(y)},toggleCls:h?function(u){var v=this,w=v.dom;if(w){u=u.replace(m,"");if(u){w.classList.toggle(u)}}return v}:function(u){var v=this;return v.hasCls(u)?v.removeCls(u):v.addCls(u)},hasCls:h?function(u){var v=this.dom;return(v&&u)?v.classList.contains(u):false}:function(u){var v=this.dom;return v?u&&(" "+v.className+" ").indexOf(" "+u+" ")!=-1:false},replaceCls:function(v,u){return this.removeCls(v).addCls(u)},isStyle:function(u,v){return this.getStyle(u)==v},getStyle:function(G,B){var C=this,x=C.dom,J=typeof G!="string",H=C.styleHooks,v=G,D=v,A=1,z,I,F,E,w,u,y;if(J){F={};v=D[0];y=0;if(!(A=D.length)){return F}}if(!x||x.documentElement){return F||""}z=x.style;if(B){u=z}else{u=x.ownerDocument.defaultView.getComputedStyle(x,null);if(!u){B=true;u=z}}do{E=H[v];if(!E){H[v]=E={name:q.normalize(v)}}if(E.get){w=E.get(x,C,B,u)}else{I=E.name;w=u[I]}if(!J){return w}F[v]=w;v=D[++y]}while(y<A);return F},getStyles:function(){var v=Ext.Array.slice(arguments),u=v.length,w;if(u&&typeof v[u-1]=="boolean"){w=v.pop()}return this.getStyle(v,w)},isTransparent:function(v){var u=this.getStyle(v);return u?t.test(u):false},setStyle:function(B,z){var x=this,A=x.dom,u=x.styleHooks,w=A.style,v=B,y;if(typeof v=="string"){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}if(y.afterSet){y.afterSet(A,z,x)}}else{for(v in B){if(B.hasOwnProperty(v)){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=B[v];z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}if(y.afterSet){y.afterSet(A,z,x)}}}}return x},getHeight:function(v){var w=this.dom,u=v?(w.clientHeight-this.getPadding("tb")):w.offsetHeight;return u>0?u:0},getWidth:function(u){var w=this.dom,v=u?(w.clientWidth-this.getPadding("lr")):w.offsetWidth;return v>0?v:0},setWidth:function(u){var v=this;v.dom.style.width=q.addUnits(u);return v},setHeight:function(u){var v=this;v.dom.style.height=q.addUnits(u);return v},getBorderWidth:function(u){return this.addStyles(u,j)},getPadding:function(u){return this.addStyles(u,g)},margins:a,applyStyles:function(w){if(w){var v,u,x=this.dom;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){w=Ext.util.Format.trim(w).split(/\s*(?::|;)\s*/);for(v=0,u=w.length;v<u;){x.style[q.normalize(w[v++])]=w[v++]}}else{if(typeof w=="object"){this.setStyle(w)}}}},setSize:function(w,u){var x=this,v=x.dom.style;if(Ext.isObject(w)){u=w.height;w=w.width}v.width=q.addUnits(w);v.height=q.addUnits(u);return x},getViewSize:function(){var u=document,v=this.dom;if(v==u||v==u.body){return{width:q.getViewportWidth(),height:q.getViewportHeight()}}else{return{width:v.clientWidth,height:v.clientHeight}}},getSize:function(v){var u=this.dom;return{width:Math.max(0,v?(u.clientWidth-this.getPadding("lr")):u.offsetWidth),height:Math.max(0,v?(u.clientHeight-this.getPadding("tb")):u.offsetHeight)}},repaint:function(){var u=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(u).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},getMargin:function(v){var w=this,y={t:"top",l:"left",r:"right",b:"bottom"},u,z,x;if(!v){x=[];for(u in w.margins){if(w.margins.hasOwnProperty(u)){x.push(w.margins[u])}}z=w.getStyle(x);if(z&&typeof z=="object"){for(u in w.margins){if(w.margins.hasOwnProperty(u)){z[y[u]]=parseFloat(z[w.margins[u]])||0}}}return z}else{return w.addStyles.call(w,v,w.margins)}},mask:function(v,z,D){var A=this,w=A.dom,x=(A.$cache||A.getCache()).data,u=x.mask,E,C,B="",y=Ext.baseCSSPrefix;A.addCls(y+"masked");if(A.getStyle("position")=="static"){A.addCls(y+"masked-relative")}if(u){u.remove()}if(z&&typeof z=="string"){B=" "+z}else{B=" "+y+"mask-gray"}E=A.createChild({cls:y+"mask"+((D!==false)?"":(" "+y+"mask-gray")),html:v?('<div class="'+(z||(y+"mask-message"))+'">'+v+"</div>"):""});C=A.getSize();x.mask=E;if(w===document.body){C.height=window.innerHeight;if(A.orientationHandler){Ext.EventManager.unOrientationChange(A.orientationHandler,A)}A.orientationHandler=function(){C=A.getSize();C.height=window.innerHeight;E.setSize(C)};Ext.EventManager.onOrientationChange(A.orientationHandler,A)}E.setSize(C);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var v=this,x=(v.$cache||v.getCache()).data,u=x.mask,w=Ext.baseCSSPrefix;if(u){u.remove();delete x.mask}v.removeCls([w+"masked",w+"masked-relative"]);if(v.dom===document.body){Ext.EventManager.unOrientationChange(v.orientationHandler,v);delete v.orientationHandler}}});q.populateStyleMap=function(B,u){var A=["margin-","padding-","border-width-"],z=["before","after"],w,y,v,x;for(w=A.length;w--;){for(x=2;x--;){y=A[w]+z[x];B[q.normalize(y)]=B[y]={name:q.normalize(A[w]+u[x])}}}};Ext.onReady(function(){var C=Ext.supports,u,A,y,v,B;function z(H,E,G,D){var F=D[this.name]||"";return t.test(F)?"transparent":F}function x(J,G,I,F){var D=F.marginRight,E,H;if(D!="0px"){E=J.style;H=E.display;E.display="inline-block";D=(I?F:J.ownerDocument.defaultView.getComputedStyle(J,null)).marginRight;E.display=H}return D}function w(K,H,J,G){var D=G.marginRight,F,E,I;if(D!="0px"){F=K.style;E=q.getRightMarginFixCleaner(K);I=F.display;F.display="inline-block";D=(J?G:K.ownerDocument.defaultView.getComputedStyle(K,"")).marginRight;F.display=I;E()}return D}u=q.prototype.styleHooks;q.populateStyleMap(u,["left","right"]);if(C.init){C.init()}if(!C.RightMargin){u.marginRight=u["margin-right"]={name:"marginRight",get:(C.DisplayChangeInputSelectionBug||C.DisplayChangeTextAreaSelectionBug)?w:x}}if(!C.TransparentColor){A=["background-color","border-color","color","outline-color"];for(y=A.length;y--;){v=A[y];B=q.normalize(v);u[v]=u[B]={name:B,get:z}}}})}());Ext.dom.AbstractElement.override({findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<b&&e!=c&&e!=d){if(Ext.DomQuery.is(e,h)){return a?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,b,a){var c=Ext.fly(this.dom.parentNode,"_internal");return c?c.findParent(d,b,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a,b){return Ext.dom.Element.select(a,this.dom,b)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.id(c.dom);e=Ext.escapeId(e);d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});(function(){var b="afterbegin",i="afterend",a="beforebegin",o="beforeend",l="<table>",h="</table>",c=l+"<tbody>",n="</tbody>"+h,k=c+"<tr>",e="</tr>"+n,p=document.createElement("div"),m=["BeforeBegin","previousSibling"],j=["AfterEnd","nextSibling"],d={beforebegin:m,afterend:j},g={beforebegin:m,afterend:j,afterbegin:["AfterBegin","firstChild"],beforeend:["BeforeEnd","lastChild"]};Ext.define("Ext.dom.Helper",{extend:"Ext.dom.AbstractHelper",requires:["Ext.dom.AbstractElement"],tableRe:/^table|tbody|tr|td$/i,tableElRe:/td|tr|tbody/i,useDom:false,createDom:function(q,w){var r,z=document,u,x,s,y,v,t;if(Ext.isArray(q)){r=z.createDocumentFragment();for(v=0,t=q.length;v<t;v++){this.createDom(q[v],r)}}else{if(typeof q=="string"){r=z.createTextNode(q)}else{r=z.createElement(q.tag||"div");u=!!r.setAttribute;for(x in q){if(!this.confRe.test(x)){s=q[x];if(x=="cls"){r.className=s}else{if(u){r.setAttribute(x,s)}else{r[x]=s}}}}Ext.DomHelper.applyStyles(r,q.style);if((y=q.children||q.cn)){this.createDom(y,r)}else{if(q.html){r.innerHTML=q.html}}}}if(w){w.appendChild(r)}return r},ieTable:function(v,q,w,u){p.innerHTML=[q,w,u].join("");var r=-1,t=p,s;while(++r<v){t=t.firstChild}s=t.nextSibling;if(s){t=document.createDocumentFragment();while(s){t.appendChild(s);s=s.nextSibling}}return t},insertIntoTable:function(z,s,r,t){var q,w,v=s==a,y=s==b,u=s==o,x=s==i;if(z=="td"&&(y||u)||!this.tableElRe.test(z)&&(v||x)){return null}w=v?r:x?r.nextSibling:y?r.firstChild:null;if(v||x){r=r.parentNode}if(z=="td"||(z=="tr"&&(u||y))){q=this.ieTable(4,k,t,e)}else{if((z=="tbody"&&(u||y))||(z=="tr"&&(v||x))){q=this.ieTable(3,c,t,n)}else{q=this.ieTable(2,l,t,h)}}r.insertBefore(q,w);return q},createContextualFragment:function(r){var q=document.createDocumentFragment(),s,t;p.innerHTML=r;t=p.childNodes;s=t.length;while(s--){q.appendChild(t[0])}return q},applyStyles:function(q,r){if(r){q=Ext.fly(q);if(typeof r=="function"){r=r.call()}if(typeof r=="string"){r=Ext.dom.Element.parseStyles(r)}if(typeof r=="object"){q.setStyle(r)}}},createHtml:function(q){return this.markup(q)},doInsert:function(t,v,u,w,s,q){t=t.dom||Ext.getDom(t);var r;if(this.useDom){r=this.createDom(v,null);if(q){t.appendChild(r)}else{(s=="firstChild"?t:t.parentNode).insertBefore(r,t[s]||t)}}else{r=this.insertHtml(w,t,this.markup(v))}return u?Ext.get(r,true):r},overwrite:function(s,r,t){var q;s=Ext.getDom(s);r=this.markup(r);if(Ext.isIE&&this.tableRe.test(s.tagName)){while(s.firstChild){s.removeChild(s.firstChild)}if(r){q=this.insertHtml("afterbegin",s,r);return t?Ext.get(q):q}return null}s.innerHTML=r;return t?Ext.get(s.firstChild):s.firstChild},insertHtml:function(s,v,t){var x,r,u,q,w;s=s.toLowerCase();if(v.insertAdjacentHTML){if(Ext.isIE&&this.tableRe.test(v.tagName)&&(w=this.insertIntoTable(v.tagName.toLowerCase(),s,v,t))){return w}if((x=g[s])){v.insertAdjacentHTML(x[0],t);return v[x[1]]}}else{if(v.nodeType===3){s=s==="afterbegin"?"beforebegin":s;s=s==="beforeend"?"afterend":s}r=Ext.supports.CreateContextualFragment?v.ownerDocument.createRange():undefined;q="setStart"+(this.endRe.test(s)?"After":"Before");if(d[s]){if(r){r[q](v);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}v.parentNode.insertBefore(w,s==a?v:v.nextSibling);return v[(s==a?"previous":"next")+"Sibling"]}else{u=(s==b?"first":"last")+"Child";if(v.firstChild){if(r){r[q](v[u]);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}if(s==b){v.insertBefore(w,v.firstChild)}else{v.appendChild(w)}}else{v.innerHTML=t}return v[u]}}},createTemplate:function(r){var q=this.markup(r);return new Ext.Template(q)}},function(){Ext.ns("Ext.core");Ext.DomHelper=Ext.core.DomHelper=new this})}());Ext.ns("Ext.core");Ext.dom.Query=Ext.core.DomQuery=Ext.DomQuery=(function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1="0"+$1}return"\\"+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num="0"+num}return"\\0000"+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector},setupEscapes=function(path){hasEscapes=(path.indexOf("\\")>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,"\\\\")}return path};eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci;for(i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1,i,ci;tagName=tagName.toLowerCase();for(i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){id=unescapeCssSelector(id);if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1,i,ci;for(i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,xml,hasXml,i,ci;value=unescapeCssSelector(value);for(i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}if(!hasXml){xml=Ext.DomQuery.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){value=unescapeCssSelector(value);return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r,i,len,c;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(i=1,len=cs.length;i<len;i++){c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1,d,j;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[],i,len;for(i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[],i,len;if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(i=0;i<len1;i++){c1[i]._qdiff=d}for(i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){id=unescapeCssSelector(id);var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe),tokenMatch,matched,j,t,m;path=setupEscapes(path);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){matched=false;for(j=0;j<matchersLn;j++){t=matchers[j];m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"compile",msg:'Error parsing selector. Parsing failed at "'+path+'"'})}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[],i,len,subPath,result;for(i=0,len=paths.length;i<len;i++){subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath,type);if(!cache[subPath]){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"jsSelect",msg:subPath+" is not a valid selector"})}}else{setupEscapes(subPath)}result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.escapeId(Ext.id(root))+" "+path;root=root.parentNode}return Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}else{setupEscapes(path)}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}else{setupEscapes(ss)}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0,ci;ci=c[i];i++){cns=ci.childNodes;j=0;empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}());Ext.query=Ext.DomQuery.select;(function(){var HIDDEN="hidden",DOC=document,VISIBILITY="visibility",DISPLAY="display",NONE="none",XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,visFly,noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},isScrolled=function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.scrollTop>0||ci.scrollLeft>0){r[++ri]=ci}}return r},Element=Ext.define("Ext.dom.Element",{extend:"Ext.dom.AbstractElement",alternateClassName:["Ext.Element","Ext.core.Element"],addUnits:function(){return this.self.addUnits.apply(this.self,arguments)},focus:function(defer,dom){var me=this,scrollTop,body;dom=dom||me.dom;body=(dom.ownerDocument||DOC).body||DOC.body;try{if(Number(defer)){Ext.defer(me.focus,defer,me,[null,dom])}else{if(dom.offsetHeight>Element.getViewHeight()){scrollTop=body.scrollTop}dom.focus();if(scrollTop!==undefined){body.scrollTop=scrollTop}}}catch(e){}return me},blur:function(){try{this.dom.blur()}catch(e){}return this},isBorderBox:function(){var box=Ext.isBorderBox;if(box){box=!((this.dom.tagName||"").toLowerCase() in noBoxAdjust)}return box},hover:function(overFn,outFn,scope,options){var me=this;me.on("mouseenter",overFn,scope||me.dom,options);me.on("mouseleave",outFn,scope||me.dom,options);return me},getAttributeNS:function(ns,name){return this.getAttribute(name,ns)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&DOC.documentMode===9))?function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]||null}return null}if(name==="for"){name="htmlFor"}return d[name]||null}:function(name,ns){var d=this.dom;if(ns){return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)}return d.getAttribute(name)||d[name]||null},cacheScrollValues:function(){var me=this,scrolledDescendants,el,i,scrollValues=[],result=function(){for(i=0;i<scrolledDescendants.length;i++){el=scrolledDescendants[i];el.scrollLeft=scrollValues[i][0];el.scrollTop=scrollValues[i][1]}};if(!Ext.DomQuery.pseudos.isScrolled){Ext.DomQuery.pseudos.isScrolled=isScrolled}scrolledDescendants=me.query(":isScrolled");for(i=0;i<scrolledDescendants.length;i++){el=scrolledDescendants[i];scrollValues[i]=[el.scrollLeft,el.scrollTop]}return result},autoBoxAdjust:true,isVisible:function(deep){var me=this,dom=me.dom,stopNode=dom.ownerDocument.documentElement;if(!visFly){visFly=new Element.Fly()}while(dom!==stopNode){if(!dom||dom.nodeType===11||(visFly.attach(dom)).isStyle(VISIBILITY,HIDDEN)||visFly.isStyle(DISPLAY,NONE)){return false}if(!deep){break}dom=dom.parentNode}return true},isDisplayed:function(){return !this.isStyle(DISPLAY,NONE)},enableDisplayMode:function(display){var me=this;me.setVisibilityMode(Element.DISPLAY);if(!Ext.isEmpty(display)){(me.$cache||me.getCache()).data.originalDisplay=display}return me},mask:function(msg,msgCls,elHeight){var me=this,dom=me.dom,setExpression=dom.style.setExpression,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg;if(!(bodyRe.test(dom.tagName)&&me.getStyle("position")=="static")){me.addCls(XMASKEDRELATIVE)}if(maskEl){maskEl.remove()}if(maskMsg){maskMsg.remove()}Ext.DomHelper.append(dom,[{cls:Ext.baseCSSPrefix+"mask"},{cls:msgCls?EXTELMASKMSG+" "+msgCls:EXTELMASKMSG,cn:{tag:"div",html:msg||""}}]);maskMsg=Ext.get(dom.lastChild);maskEl=Ext.get(maskMsg.dom.previousSibling);data.maskMsg=maskMsg;data.maskEl=maskEl;me.addCls(XMASKED);maskEl.setDisplayed(true);if(typeof msg=="string"){maskMsg.setDisplayed(true);maskMsg.center(me)}else{maskMsg.setDisplayed(false)}if(!Ext.supports.IncludePaddingInWidthCalculation&&setExpression){try{maskEl.dom.style.setExpression("width",'this.parentNode.clientWidth + "px"')}catch(e){}}if(!Ext.supports.IncludePaddingInHeightCalculation&&setExpression){try{maskEl.dom.style.setExpression("height","this.parentNode."+(dom==DOC.body?"scrollHeight":"offsetHeight")+' + "px"')}catch(e){}}else{if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&me.getStyle("height")=="auto"){maskEl.setSize(undefined,elHeight||me.getHeight())}}return maskEl},unmask:function(){var me=this,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg,style;if(maskEl){style=maskEl.dom.style;if(style.clearExpression){style.clearExpression("width");style.clearExpression("height")}if(maskEl){maskEl.remove();delete data.maskEl}if(maskMsg){maskMsg.remove();delete data.maskMsg}me.removeCls([XMASKED,XMASKEDRELATIVE])}},isMasked:function(){var me=this,data=(me.$cache||me.getCache()).data,maskEl=data.maskEl,maskMsg=data.maskMsg,hasMask=false;if(maskEl&&maskEl.isVisible()){if(maskMsg){maskMsg.center(me)}hasMask=true}return hasMask},createShim:function(){var el=DOC.createElement("iframe"),shim;el.frameBorder="0";el.className=Ext.baseCSSPrefix+"shim";el.src=Ext.SSL_SECURE_URL;shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key)){config={target:this,key:key,fn:fn,scope:scope}}else{config={target:this,key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.util.KeyMap(config)},addKeyMap:function(config){return new Ext.util.KeyMap(Ext.apply({target:this},config))},on:function(eventName,fn,scope,options){Ext.EventManager.on(this,eventName,fn,scope||this,options);return this},un:function(eventName,fn,scope){Ext.EventManager.un(this,eventName,fn,scope||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this}},function(){var EC=Ext.cache,El=this,AbstractElement=Ext.dom.AbstractElement,focusRe=/a|button|embed|iframe|img|input|object|select|textarea/i,nonSpaceRe=/\S/,scriptTagRe=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!(Ext.isIE6||Ext.isIE7||Ext.isIE8);El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThreadId)}else{var eid,d,o,t;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}d=o.dom;if(!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}El.collectorThreadId=setInterval(garbageCollect,30000);El.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e<eLen;e++){me.on(eventName[e],fn)}return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,data=(me.$cache||me.getCache()).data,n=dom.firstChild,ni=-1,nx;if(data.isCleaned&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(nonSpaceRe.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{Ext.fly(n).clean();n.nodeIndex=++ni}n=nx}data.isCleaned=true;return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var me=this,data=(me.$cache||me.getCache()).data,loader=data.loader;if(!loader){data.loader=loader=new Ext.ElementLoader({target:me})}return loader},syncContent:function(source){source=Ext.getDom(source);var me=this,sourceNodes=source.childNodes,sourceLen=sourceNodes.length,dest=me.dom,destNodes=dest.childNodes,destLen=destNodes.length,i,destNode,sourceNode,nodeType;dest.style.cssText=source.style.cssText;dest.className=source.className;if(sourceLen!==destLen){source.innerHTML=dest.innerHTML;return}for(i=0;i<sourceLen;i++){sourceNode=sourceNodes[i];destNode=destNodes[i];nodeType=sourceNode.nodeType;if(nodeType!==destNode.nodeType||(nodeType===1&&sourceNode.tagName!==destNode.tagName)){dest.innerHTML=source.innerHTML;return}if(nodeType===3){destNode.data=sourceNode.data}else{if(sourceNode.id&&destNode.id!==sourceNode.id){destNode.id=sourceNode.id}destNode.style.cssText=sourceNode.style.cssText;destNode.className=sourceNode.className;Ext.fly(destNode).syncContent(sourceNode)}}},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},getScopeParent:function(){var parent=this.dom.parentNode;if(Ext.scopeResetCSS){parent=parent.parentNode;if(!Ext.supports.CSS3LinearGradient||!Ext.supports.CSS3BorderRadius){parent=parent.parentNode}}return parent},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},focusable:function(){var dom=this.dom,nodeName=dom.nodeName,canFocus=false;if(!dom.disabled){if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=!isNaN(dom.tabIndex)}}return canFocus&&this.isVisible(true)}});if(Ext.isIE){El.prototype.getById=function(id,asDom){var dom=this.dom,cacheItem,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cacheItem=EC[id];if(cacheItem&&cacheItem.el){ret=Ext.updateCacheEntry(cacheItem,el).el}else{ret=new Element(el)}}return ret}}return asDom?Ext.getDom(id):El.get(id)}}El.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners"});El.Fly=AbstractElement.Fly=new Ext.Class({extend:El,constructor:function(dom){this.dom=dom},attach:AbstractElement.Fly.prototype.attach});if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}})}());Ext.dom.Element.override((function(){var d=document,c=window,a=/^([a-z]+)-([a-z]+)(\?)?$/,b=Math.round;return{getAnchorXY:function(j,o,h){j=(j||"tl").toLowerCase();h=h||{};var m=this,i=m.dom==d.body||m.dom==d,e=h.width||i?Ext.dom.Element.getViewWidth():m.getWidth(),g=h.height||i?Ext.dom.Element.getViewHeight():m.getHeight(),q,n=m.getXY(),p=m.getScroll(),l=i?p.left:!o?n[0]:0,k=i?p.top:!o?n[1]:0;switch(j){case"tl":q=[0,0];break;case"bl":q=[0,g];break;case"tr":q=[e,0];break;case"c":q=[b(e*0.5),b(g*0.5)];break;case"t":q=[b(e*0.5),0];break;case"l":q=[0,b(g*0.5)];break;case"r":q=[e,b(g*0.5)];break;case"b":q=[b(e*0.5),g];break;case"br":q=[e,g]}return[q[0]+l,q[1]+k]},getAlignToXY:function(m,G,j){m=Ext.get(m);if(!m||!m.dom){}j=j||[0,0];G=(!G||G=="?"?"tl-bl?":(!(/-/).test(G)&&G!==""?"tl-"+G:G||"tl-bl")).toLowerCase();var H=this,l,w,q,o,k,z,A,E=Ext.dom.Element.getViewWidth()-10,i=Ext.dom.Element.getViewHeight()-10,g,h,n,p,u,v,F=d.documentElement,s=d.body,D=(F.scrollLeft||s.scrollLeft||0),B=(F.scrollTop||s.scrollTop||0),C,t,r,e=G.match(a);t=e[1];r=e[2];C=!!e[3];l=H.getAnchorXY(t,true);w=m.getAnchorXY(r,false);q=w[0]-l[0]+j[0];o=w[1]-l[1]+j[1];if(C){k=H.getWidth();z=H.getHeight();A=m.getRegion();g=t.charAt(0);h=t.charAt(t.length-1);n=r.charAt(0);p=r.charAt(r.length-1);u=((g=="t"&&n=="b")||(g=="b"&&n=="t"));v=((h=="r"&&p=="l")||(h=="l"&&p=="r"));if(q+k>E+D){q=v?A.left-k:E+D-k}if(q<D){q=v?A.right:D}if(o+z>i+B){o=u?A.top-z:i+B-z}if(o<B){o=u?A.bottom:B}}return[q,o]},anchorTo:function(g,l,h,e,o,p){var m=this,j=m.dom,n=!Ext.isEmpty(o),i=function(){Ext.fly(j).alignTo(g,l,h,e);Ext.callback(p,Ext.fly(j))},k=this.getAnchor();this.removeAnchor();Ext.apply(k,{fn:i,scroll:n});Ext.EventManager.onWindowResize(i,null);if(n){Ext.EventManager.on(c,"scroll",i,null,{buffer:!isNaN(o)?o:50})}i.call(m);return m},removeAnchor:function(){var g=this,e=this.getAnchor();if(e&&e.fn){Ext.EventManager.removeResizeListener(e.fn);if(e.scroll){Ext.EventManager.un(c,"scroll",e.fn)}delete e.fn}return g},getAlignVector:function(h,g,j){var i=this,e=i.getXY(),k=i.getAlignToXY(h,g,j);h=Ext.get(h);k[0]-=e[0];k[1]-=e[1];return k},alignTo:function(h,e,j,g){var i=this;return i.setXY(i.getAlignToXY(h,e,j),i.anim&&!!g?i.anim(g):false)},getConstrainVector:function(i,g){if(!(i instanceof Ext.util.Region)){i=Ext.get(i).getViewRegion()}var k=this.getRegion(),e=[0,0],j=(this.shadow&&!this.shadowDisabled)?this.shadow.getShadowSize():undefined,h=false;if(g){k.translateBy(g[0]-k.x,g[1]-k.y)}if(j){i.adjust(j[0],-j[1],-j[2],j[3])}if(k.right>i.right){h=true;e[0]=(i.right-k.right)}if(k.left+e[0]<i.left){h=true;e[0]=(i.left-k.left)}if(k.bottom>i.bottom){h=true;e[1]=(i.bottom-k.bottom)}if(k.top+e[1]<i.top){h=true;e[1]=(i.top-k.top)}return h?e:false},getCenterXY:function(){return this.getAlignToXY(d,"c-c")},center:function(e){return this.alignTo(e||d,"c-c")}}}()));Ext.dom.Element.override({animate:function(b){var d=this,c,e,a=d.dom.id||Ext.id(d.dom);if(!Ext.fx.Manager.hasFxBlock(a)){if(b.listeners){c=b.listeners;delete b.listeners}if(b.internalListeners){b.listeners=b.internalListeners;delete b.internalListeners}e=new Ext.fx.Anim(d.anim(b));if(c){e.on(c)}Ext.fx.Manager.queueFx(e)}return d},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b.dom,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(c,b,d){var g=this,j=g.dom.style,i,a,e,h;c=c||"t";b=b||{};i=function(){var n=this,m=b.listeners,o,k,p,l;if(!d){g.fixDisplay()}o=g.getBox();if((c=="t"||c=="b")&&o.height===0){o.height=g.dom.scrollHeight}else{if((c=="l"||c=="r")&&o.width===0){o.width=g.dom.scrollWidth}}k=g.getStyles("width","height","left","right","top","bottom","position","z-index",true);g.setSize(o.width,o.height);if(b.preserveScroll){e=g.cacheScrollValues()}l=g.wrap({id:Ext.id()+"-anim-wrap-for-"+g.id,style:{visibility:d?"visible":"hidden"}});h=l.dom.parentNode;l.setPositioning(g.getPositioning());if(l.isStyle("position","static")){l.position("relative")}g.clearPositioning("auto");l.clip();if(e){e()}g.setStyle({visibility:"",position:"absolute"});if(d){l.setSize(o.width,o.height)}switch(c){case"t":p={from:{width:o.width+"px",height:"0px"},to:{width:o.width+"px",height:o.height+"px"}};j.bottom="0px";break;case"l":p={from:{width:"0px",height:o.height+"px"},to:{width:o.width+"px",height:o.height+"px"}};j.right="0px";break;case"r":p={from:{x:o.x+o.width,width:"0px",height:o.height+"px"},to:{x:o.x,width:o.width+"px",height:o.height+"px"}};break;case"b":p={from:{y:o.y+o.height,width:o.width+"px",height:"0px"},to:{y:o.y,width:o.width+"px",height:o.height+"px"}};break;case"tl":p={from:{x:o.x,y:o.y,width:"0px",height:"0px"},to:{width:o.width+"px",height:o.height+"px"}};j.bottom="0px";j.right="0px";break;case"bl":p={from:{y:o.y+o.height,width:"0px",height:"0px"},to:{y:o.y,width:o.width+"px",height:o.height+"px"}};j.bottom="0px";break;case"br":p={from:{x:o.x+o.width,y:o.y+o.height,width:"0px",height:"0px"},to:{x:o.x,y:o.y,width:o.width+"px",height:o.height+"px"}};break;case"tr":p={from:{x:o.x+o.width,width:"0px",height:"0px"},to:{x:o.x,width:o.width+"px",height:o.height+"px"}};j.right="0px";break}l.show();a=Ext.apply({},b);delete a.listeners;a=new Ext.fx.Anim(Ext.applyIf(a,{target:l,duration:500,easing:"ease-out",from:d?p.to:p.from,to:d?p.from:p.to}));a.on("afteranimate",function(){g.setStyle(k);if(d){if(b.useDisplay){g.setDisplayed(false)}else{g.hide()}}if(l.dom){if(l.dom.parentNode){l.dom.parentNode.insertBefore(g.dom,l.dom)}else{h.appendChild(g.dom)}l.remove()}if(e){e()}n.end()});if(m){a.on(m)}};g.animate({duration:b.duration?Math.max(b.duration,500)*2:1000,listeners:{beforeanimate:i}});return g},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(e){var d=this,b,c=d.getBox(),a=d.getStyles("width","height","left","right","top","bottom","position","z-index","font-size","opacity",true);e=Ext.applyIf(e||{},{easing:"ease-out",duration:500,useDisplay:false});b=function(){d.clearOpacity();d.show();this.to={width:c.width*2,height:c.height*2,x:c.x-(c.width/2),y:c.y-(c.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){if(d.dom){if(e.useDisplay){d.setDisplayed(false)}else{d.hide()}d.setStyle(a);e.callback.call(e.scope)}})};d.animate({duration:e.duration,easing:e.easing,listeners:{beforeanimate:{fn:b}}});return d},switchOff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var h=this,g=b.getSize(),i=b.getXY(),e,d;b.clearOpacity();b.clip();d=b.getPositioning();e=new Ext.fx.Animator({target:b,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:i[1]+g.height/2},100:{width:1,x:i[0]+g.width/2}}});e.on("afteranimate",function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setSize(g);h.end()})};b.animate({duration:(Math.max(c.duration,500)*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){c.show();var i=this,j=c.getBox(),h=Ext.getBody().createChild({id:c.id+"-anim-proxy",style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}}),g;g=new Ext.fx.Anim({target:h,duration:e.duration||1000,iterations:d,from:{top:j.y,left:j.x,borderWidth:0,opacity:1,height:j.height,width:j.width},to:{top:j.y-20,left:j.x-20,borderWidth:10,opacity:0,height:j.height+40,width:j.width+40}});g.on("afteranimate",function(){h.remove();i.end()})};c.animate({duration:(Math.max(e.duration,500)*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,b;a=a||"b";b=function(){var h=c.getWidth(),g=c.getHeight(),i=c.getXY(),e=c.getPositioning(),j={opacity:0};switch(a){case"t":j.y=i[1]-g;break;case"l":j.x=i[0]-h;break;case"r":j.x=i[0]+h;break;case"b":j.y=i[1]+g;break;case"tl":j.x=i[0]-h;j.y=i[1]-g;break;case"bl":j.x=i[0]-h;j.y=i[1]+g;break;case"br":j.x=i[0]+h;j.y=i[1]+g;break;case"tr":j.x=i[0]+h;j.y=i[1]-g;break}this.to=j;this.on("afteranimate",function(){if(c.dom){c.hide();c.clearOpacity();c.setPositioning(e)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:{fn:b}}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];i.clearOpacity();i.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(b){var a=this;a.animate(Ext.apply({},b,{opacity:1,internalListeners:{beforeanimate:function(c){if(a.isStyle("display","none")){a.setDisplayed("")}else{a.show()}}}}));return this},fadeOut:function(b){var a=this;b=Ext.apply({opacity:0,internalListeners:{afteranimate:function(c){var d=a.dom;if(d&&c.to.opacity===0){if(b.useDisplay){a.setDisplayed(false)}else{a.hide()}}}}},b);a.animate(b);return a},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this}});Ext.dom.Element.override({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});(function(){var b=Ext.dom.Element,i="visibility",g="display",n="none",e="hidden",m="visible",o="offsets",j="asclass",a="nosize",c="originalDisplay",d="visibilityMode",h="isVisible",l=Ext.baseCSSPrefix+"hide-offsets",k=function(q){var r=(q.$cache||q.getCache()).data,s=r[c];if(s===undefined){r[c]=s=""}return s},p=function(r){var s=(r.$cache||r.getCache()).data,q=s[d];if(q===undefined){s[d]=q=b.VISIBILITY}return q};b.override({originalDisplay:"",visibilityMode:1,setVisible:function(u,q){var s=this,t=s.dom,r=p(s);if(typeof q=="string"){switch(q){case g:r=b.DISPLAY;break;case i:r=b.VISIBILITY;break;case o:r=b.OFFSETS;break;case a:case j:r=b.ASCLASS;break}s.setVisibilityMode(r);q=false}if(!q||!s.anim){if(r==b.DISPLAY){return s.setDisplayed(u)}else{if(r==b.OFFSETS){s[u?"removeCls":"addCls"](l)}else{if(r==b.VISIBILITY){s.fixDisplay();t.style.visibility=u?"":e}else{if(r==b.ASCLASS){s[u?"removeCls":"addCls"](s.visibilityCls||b.visibilityCls)}}}}}else{if(u){s.setOpacity(0.01);s.setVisible(true)}if(!Ext.isObject(q)){q={duration:350,easing:"ease-in"}}s.animate(Ext.applyIf({callback:function(){if(!u){s.setVisible(false).setOpacity(1)}},to:{opacity:(u)?1:0}},q))}(s.$cache||s.getCache()).data[h]=u;return s},hasMetrics:function(){var q=p(this);return this.isVisible()||(q==b.OFFSETS)||(q==b.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.anim(q));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?k(this):n}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,n)){q.setStyle(i,e);q.setStyle(g,k(q));if(q.isStyle(g,n)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.anim(q));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.anim(q));return this}})}());(function(){var r=Ext.dom.Element,n="left",k="right",q="top",h="bottom",o="position",j="static",x="relative",p="auto",v="z-index",u="BODY",c="padding",t="border",s="-left",m="-right",a="-top",l="-bottom",g="-width",e={l:t+s+g,r:t+m+g,t:t+a+g,b:t+l+g},d={l:c+s,r:c+m,t:c+a,b:c+l},w=[d.l,d.r,d.t,d.b],b=[e.l,e.r,e.t,e.b],i=["position","top","left"];r.override({getX:function(){return r.getX(this.dom)},getY:function(){return r.getY(this.dom)},getXY:function(){return r.getXY(this.dom)},getOffsetsTo:function(y){var A=this.getXY(),z=Ext.fly(y,"_internal").getXY();return[A[0]-z[0],A[1]-z[1]]},setX:function(y,z){return this.setXY([y,this.getY()],z)},setY:function(A,z){return this.setXY([this.getX(),A],z)},setLeft:function(y){this.setStyle(n,this.addUnits(y));return this},setTop:function(y){this.setStyle(q,this.addUnits(y));return this},setRight:function(y){this.setStyle(k,this.addUnits(y));return this},setBottom:function(y){this.setStyle(h,this.addUnits(y));return this},setXY:function(A,y){var z=this;if(!y||!z.anim){r.setXY(z.dom,A)}else{if(!Ext.isObject(y)){y={}}z.animate(Ext.applyIf({to:{x:A[0],y:A[1]}},y))}return z},pxRe:/^\d+(?:\.\d*)?px$/i,getLocalX:function(){var A=this,z,y=A.getStyle(n);if(!y||y===p){return 0}if(y&&A.pxRe.test(y)){return parseFloat(y)}y=A.getX();z=A.dom.offsetParent;if(z){y-=Ext.fly(z).getX()}return y},getLocalY:function(){var A=this,z,B=A.getStyle(q);if(!B||B===p){return 0}if(B&&A.pxRe.test(B)){return parseFloat(B)}B=A.getY();z=A.dom.offsetParent;if(z){B-=Ext.fly(z).getY()}return B},getLeft:function(y){return y?this.getLocalX():this.getX()},getRight:function(y){return(y?this.getLocalX():this.getX())+this.getWidth()},getTop:function(y){return y?this.getLocalY():this.getY()},getBottom:function(y){return(y?this.getLocalY():this.getY())+this.getHeight()},translatePoints:function(z,G){var B=this,A=B.getStyle(i),C=A.position=="relative",F=parseFloat(A.left),E=parseFloat(A.top),D=B.getXY();if(Ext.isArray(z)){G=z[1];z=z[0]}if(isNaN(F)){F=C?0:B.dom.offsetLeft}if(isNaN(E)){E=C?0:B.dom.offsetTop}F=(typeof z=="number")?z-D[0]+F:undefined;E=(typeof G=="number")?G-D[1]+E:undefined;return{left:F,top:E}},setBox:function(C,D,z){var B=this,y=C.width,A=C.height;if((D&&!B.autoBoxAdjust)&&!B.isBorderBox()){y-=(B.getBorderWidth("lr")+B.getPadding("lr"));A-=(B.getBorderWidth("tb")+B.getPadding("tb"))}B.setBounds(C.x,C.y,y,A,z);return B},getBox:function(D,I){var F=this,M,z,H,C,K,A,y,L,G,J,B,E;if(!I){M=F.getXY()}else{M=F.getStyle([n,q]);M=[parseFloat(M.left)||0,parseFloat(M.top)||0]}J=F.getWidth();B=F.getHeight();if(!D){E={x:M[0],y:M[1],0:M[0],1:M[1],width:J,height:B}}else{C=F.getStyle(w);K=F.getStyle(b);A=(parseFloat(K[e.l])||0)+(parseFloat(C[d.l])||0);y=(parseFloat(K[e.r])||0)+(parseFloat(C[d.r])||0);L=(parseFloat(K[e.t])||0)+(parseFloat(C[d.t])||0);G=(parseFloat(K[e.b])||0)+(parseFloat(C[d.b])||0);E={x:M[0]+A,y:M[1]+L,0:M[0]+A,1:M[1]+L,width:J-(A+y),height:B-(L+G)}}E.right=E.x+E.width;E.bottom=E.y+E.height;return E},getPageBox:function(B){var D=this,z=D.dom,F=z.nodeName==u,G=F?Ext.dom.AbstractElement.getViewWidth():z.offsetWidth,C=F?Ext.dom.AbstractElement.getViewHeight():z.offsetHeight,I=D.getXY(),H=I[1],y=I[0]+G,E=I[1]+C,A=I[0];if(B){return new Ext.util.Region(H,y,E,A)}else{return{left:A,top:H,width:G,height:C,right:y,bottom:E}}},setLocation:function(z,B,A){return this.setXY([z,B],A)},moveTo:function(z,B,A){return this.setXY([z,B],A)},position:function(D,C,z,B){var A=this;if(!D&&A.isStyle(o,j)){A.setStyle(o,x)}else{if(D){A.setStyle(o,D)}}if(C){A.setStyle(v,C)}if(z||B){A.setXY([z||false,B||false])}},clearPositioning:function(y){y=y||"";this.setStyle({left:y,right:y,top:y,bottom:y,"z-index":"",position:j});return this},getPositioning:function(){var y=this.getStyle([n,q,o,k,h,v]);y[k]=y[n]?"":y[k];y[h]=y[q]?"":y[h];return y},setPositioning:function(y){var A=this,z=A.dom.style;A.setStyle(y);if(y.right==p){z.right=""}if(y.bottom==p){z.bottom=""}return A},move:function(H,A,B){var E=this,K=E.getXY(),I=K[0],G=K[1],C=[I-A,G],J=[I+A,G],F=[I,G-A],z=[I,G+A],D={l:C,left:C,r:J,right:J,t:F,top:F,up:F,b:z,bottom:z,down:z};H=H.toLowerCase();E.moveTo(D[H][0],D[H][1],B)},setLeftTop:function(A,z){var y=this.dom.style;y.left=r.addUnits(A);y.top=r.addUnits(z);return this},getRegion:function(){return this.getPageBox(true)},getViewRegion:function(){var C=this,A=C.dom.nodeName==u,z,F,E,D,B,y;if(A){z=C.getScroll();D=z.left;E=z.top;B=Ext.dom.AbstractElement.getViewportWidth();y=Ext.dom.AbstractElement.getViewportHeight()}else{F=C.getXY();D=F[0]+C.getBorderWidth("l")+C.getPadding("l");E=F[1]+C.getBorderWidth("t")+C.getPadding("t");B=C.getWidth(true);y=C.getHeight(true)}return new Ext.util.Region(E,D+B-1,E+y-1,D)},setBounds:function(A,E,C,z,B){var D=this;if(!B||!D.anim){D.setSize(C,z);D.setLocation(A,E)}else{if(!Ext.isObject(B)){B={}}D.animate(Ext.applyIf({to:{x:A,y:E,width:D.adjustWidth(C),height:D.adjustHeight(z)}},B))}return D},setRegion:function(z,y){return this.setBounds(z.left,z.top,z.right-z.left,z.bottom-z.top,y)}})}());Ext.dom.Element.override({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(e.scrollLeft+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(c,e,a){var g=/top/i.test(c),d=this,h=d.dom,b,i;if(!a||!d.anim){i="scroll"+(g?"Top":"Left");h[i]=e;h[i]=e}else{b={to:{}};b.to["scroll"+(g?"Top":"Left")]=e;if(Ext.isObject(a)){Ext.applyIf(b,a)}d.animate(b)}return d},scrollIntoView:function(b,g,c){b=Ext.getDom(b)||Ext.getBody().dom;var d=this.dom,i=this.getOffsetsTo(b),h=i[0]+b.scrollLeft,l=i[1]+b.scrollTop,a=l+d.offsetHeight,m=h+d.offsetWidth,p=b.clientHeight,o=parseInt(b.scrollTop,10),e=parseInt(b.scrollLeft,10),j=o+p,n=e+b.clientWidth,k;if(d.offsetHeight>p||l<o){k=l}else{if(a>j){k=a-p}}if(k!=null){Ext.get(b).scrollTo("top",k,c)}if(g!==false){k=null;if(d.offsetWidth>b.clientWidth||h<e){k=h}else{if(m>n){k=m-b.clientWidth}}if(k!=null){Ext.get(b).scrollTo("left",k,c)}}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}});(function(){var p=Ext.dom.Element,m=document.defaultView,n=/table-row|table-.*-group/,a="_internal",r="hidden",o="height",g="width",e="isClipped",i="overflow",l="overflow-x",j="overflow-y",s="originalClip",b=/#document|body/i,t,d,q,h,u;if(!m||!m.getComputedStyle){p.prototype.getStyle=function(z,y){var L=this,G=L.dom,J=typeof z!="string",k=L.styleHooks,w=z,x=w,F=1,B=y,K,C,v,A,E,H,D;if(J){v={};w=x[0];D=0;if(!(F=x.length)){return v}}if(!G||G.documentElement){return v||""}C=G.style;if(y){H=C}else{H=G.currentStyle;if(!H){B=true;H=C}}do{A=k[w];if(!A){k[w]=A={name:p.normalize(w)}}if(A.get){E=A.get(G,L,B,H)}else{K=A.name;if(A.canThrow){try{E=H[K]}catch(I){E=""}}else{E=H?H[K]:""}}if(!J){return E}v[w]=E;w=x[++D]}while(D<F);return v}}p.override({getHeight:function(x,v){var w=this,z=w.dom,y=w.isStyle("display","none"),k,A;if(y){return 0}k=Math.max(z.offsetHeight,z.clientHeight)||0;if(Ext.supports.Direct2DBug){A=w.adjustDirect2DDimension(o);if(v){k+=A}else{if(A>0&&A<0.5){k++}}}if(x){k-=w.getBorderWidth("tb")+w.getPadding("tb")}return(k<0)?0:k},getWidth:function(k,z){var x=this,A=x.dom,y=x.isStyle("display","none"),w,v,B;if(y){return 0}if(Ext.supports.BoundingClientRect){w=A.getBoundingClientRect();v=w.right-w.left;v=z?v:Math.ceil(v)}else{v=A.offsetWidth}v=Math.max(v,A.clientWidth)||0;if(Ext.supports.Direct2DBug){B=x.adjustDirect2DDimension(g);if(z){v+=B}else{if(B>0&&B<0.5){v++}}}if(k){v-=x.getBorderWidth("lr")+x.getPadding("lr")}return(v<0)?0:v},setWidth:function(v,k){var w=this;v=w.adjustWidth(v);if(!k||!w.anim){w.dom.style.width=w.addUnits(v)}else{if(!Ext.isObject(k)){k={}}w.animate(Ext.applyIf({to:{width:v}},k))}return w},setHeight:function(k,v){var w=this;k=w.adjustHeight(k);if(!v||!w.anim){w.dom.style.height=w.addUnits(k)}else{if(!Ext.isObject(v)){v={}}w.animate(Ext.applyIf({to:{height:k}},v))}return w},applyStyles:function(k){Ext.DomHelper.applyStyles(this.dom,k);return this},setSize:function(w,k,v){var x=this;if(Ext.isObject(w)){v=k;k=w.height;w=w.width}w=x.adjustWidth(w);k=x.adjustHeight(k);if(!v||!x.anim){x.dom.style.width=x.addUnits(w);x.dom.style.height=x.addUnits(k)}else{if(v===true){v={}}x.animate(Ext.applyIf({to:{width:w,height:k}},v))}return x},getViewSize:function(){var w=this,x=w.dom,v=b.test(x.nodeName),k;if(v){k={width:p.getViewWidth(),height:p.getViewHeight()}}else{k={width:x.clientWidth,height:x.clientHeight}}return k},getSize:function(k){return{width:this.getWidth(k),height:this.getHeight(k)}},adjustWidth:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("lr")+v.getPadding("lr"))}return(w&&k<0)?0:k},adjustHeight:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("tb")+v.getPadding("tb"))}return(w&&k<0)?0:k},getColor:function(w,x,C){var z=this.getStyle(w),y=C||C===""?C:"#",B,k,A=0;if(!z||(/transparent|inherit/.test(z))){return x}if(/^r/.test(z)){z=z.slice(4,z.length-1).split(",");k=z.length;for(;A<k;A++){B=parseInt(z[A],10);y+=(B<16?"0":"")+B.toString(16)}}else{z=z.replace("#","");y+=z.length==3?z.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):z}return(y.length>5?y.toLowerCase():x)},setOpacity:function(v,k){var w=this;if(!w.dom){return w}if(!k||!w.anim){w.setStyle("opacity",v)}else{if(typeof k!="object"){k={duration:350,easing:"ease-in"}}w.animate(Ext.applyIf({to:{opacity:v}},k))}return w},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(w){var B=this,v=B.dom,z=B.getStyle("display"),y=v.style.display,C=v.style.position,A=w===g?0:1,k=v.currentStyle,x;if(z==="inline"){v.style.display="inline-block"}v.style.position=z.match(n)?"absolute":"static";x=(parseFloat(k[w])||parseFloat(k.msTransformOrigin.split(" ")[A])*2)%1;v.style.position=C;if(z==="inline"){v.style.display=y}return x},clip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(!w[e]){w[e]=true;k=v.getStyle([i,l,j]);w[s]={o:k[i],x:k[l],y:k[j]};v.setStyle(i,r);v.setStyle(l,r);v.setStyle(j,r)}return v},unclip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(w[e]){w[e]=false;k=w[s];if(k.o){v.setStyle(i,k.o)}if(k.x){v.setStyle(l,k.x)}if(k.y){v.setStyle(j,k.y)}}return v},boxWrap:function(k){k=k||Ext.baseCSSPrefix+"box";var v=Ext.get(this.insertHtml("beforeBegin","<div class='"+k+"'>"+Ext.String.format(p.boxMarkup,k)+"</div>"));Ext.DomQuery.selectNode("."+k+"-mc",v.dom).appendChild(this.dom);return v},getComputedHeight:function(){var v=this,k=Math.max(v.dom.offsetHeight,v.dom.clientHeight);if(!k){k=parseFloat(v.getStyle(o))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("tb")}}return k},getComputedWidth:function(){var v=this,k=Math.max(v.dom.offsetWidth,v.dom.clientWidth);if(!k){k=parseFloat(v.getStyle(g))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("lr")}}return k},getFrameWidth:function(v,k){return(k&&this.isBorderBox())?0:(this.getPadding(v)+this.getBorderWidth(v))},addClsOnOver:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.hover(function(){if(k&&z.call(v||x,x)===false){return}Ext.fly(y,a).addCls(w)},function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnFocus:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("focus",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w)});x.on("blur",function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnClick:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("mousedown",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w);var B=Ext.getDoc(),A=function(){Ext.fly(y,a).removeCls(w);B.removeListener("mouseup",A)};B.on("mouseup",A)});return x},getStyleSize:function(){var z=this,A=this.dom,v=b.test(A.nodeName),y,k,x;if(v){return{width:p.getViewWidth(),height:p.getViewHeight()}}y=z.getStyle([o,g],true);if(y.width&&y.width!="auto"){k=parseFloat(y.width);if(z.isBorderBox()){k-=z.getFrameWidth("lr")}}if(y.height&&y.height!="auto"){x=parseFloat(y.height);if(z.isBorderBox()){x-=z.getFrameWidth("tb")}}return{width:k||z.getWidth(true),height:x||z.getHeight(true)}},selectable:function(){var k=this;k.dom.unselectable="off";k.on("selectstart",function(v){v.stopPropagation();return true});k.applyStyles("-moz-user-select: text; -khtml-user-select: text;");k.removeCls(Ext.baseCSSPrefix+"unselectable");return k},unselectable:function(){var k=this;k.dom.unselectable="on";k.swallowEvent("selectstart",true);k.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");k.addCls(Ext.baseCSSPrefix+"unselectable");return k}});p.prototype.styleHooks=t=Ext.dom.AbstractElement.prototype.styleHooks;if(Ext.isIE6||Ext.isIE7){t.fontSize=t["font-size"]={name:"fontSize",canThrow:true};t.fontStyle=t["font-style"]={name:"fontStyle",canThrow:true};t.fontFamily=t["font-family"]={name:"fontFamily",canThrow:true}}if(Ext.isIEQuirks||Ext.isIE&&Ext.ieVersion<=8){function c(x,v,w,k){if(k[this.styleName]=="none"){return"0px"}return k[this.name]}d=["Top","Right","Bottom","Left"];q=d.length;while(q--){h=d[q];u="border"+h+"Width";t["border-"+h.toLowerCase()+"-width"]=t[u]={name:u,styleName:"border"+h+"Style",get:c}}}}());Ext.onReady(function(){var c=/alpha\(opacity=(.*)\)/i,b=/^\s+|\s+$/g,a=Ext.dom.Element.prototype.styleHooks;a.opacity={name:"opacity",afterSet:function(g,e,d){if(d.isLayer){d.onOpacitySet(e)}}};if(!Ext.supports.Opacity&&Ext.isIE){Ext.apply(a.opacity,{get:function(h){var g=h.style.filter,e,d;if(g.match){e=g.match(c);if(e){d=parseFloat(e[1]);if(!isNaN(d)){return d?d/100:0}}}return 1},set:function(h,e){var d=h.style,g=d.filter.replace(c,"").replace(b,"");d.zoom=1;if(typeof(e)=="number"&&e>=0&&e<1){e*=100;d.filter=g+(g.length?" ":"")+"alpha(opacity="+e+")"}else{d.filter=g}}})}});Ext.dom.Element.override({select:function(a){return Ext.dom.Element.select(a,false,this.dom)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",requires:["Ext.dom.Element","Ext.dom.Query"],statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b<d;++b){e.push(this.transformElement(c[b]))}return this},invoke:function(d,a){var g=this.elements,e=g.length,c,b;d=Ext.dom.Element.prototype[d];for(b=0;b<e;b++){c=g[b];if(c){d.apply(this.getElement(c),a)}}return this},item:function(b){var c=this.elements[b],a=null;if(c){a=this.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(b){var h=this,c=h.elements,g=c.length,d=[],e=0,j=typeof b=="function",k,a;for(;e<g;e++){a=c[e];k=false;if(a){a=h.getElement(a);if(j){k=b.call(a,a,h,e)!==false}else{k=a.is(b)}if(k){d.push(h.transformElement(a))}}}h.elements=d;return h},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(d,b){if(!d){return this}if(typeof d=="string"){d=Ext.dom.Element.selectorFunction(d,b)}var c=this.elements,a=d.length,g;for(g=0;g<a;g++){c.push(Ext.get(d[g]))}return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(e,i){e=[].concat(e);var d=this,g=d.elements,c=e.length,h,b,a;for(a=0;a<c;a++){h=e[a];if((b=(g[h]||g[h=d.indexOf(h)]))){if(i){if(b.dom){b.remove()}else{Ext.removeNode(b)}}Ext.Array.erase(g,h,1)}}return d}},function(){this.importElementMethods();this.prototype.on=this.prototype.addListener;if(Ext.DomQuery){Ext.dom.Element.selectorFunction=Ext.DomQuery.select}Ext.dom.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=function(){return Ext.dom.Element.select.apply(Ext.dom.Element,arguments)}});Ext.define("Ext.util.Animate",{requires:["Ext.Element","Ext.CompositeElementLite"],uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(new Ext.fx.Anim(b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var b=this,a;if(b.hasOwnProperty("childEls")){a=b.childEls;delete b.childEls;b.addChildEls.apply(b,a)}},destroy:function(){var e=this,d=e.getChildEls(),g,a,c,b;for(c=d.length;c--;){a=d[c];if(typeof a!="string"){a=a.name}g=e[a];if(g){e[a]=null;g.remove()}}},addChildEls:function(){var b=this,a=arguments;if(b.hasOwnProperty("childEls")){b.childEls.push.apply(b.childEls,a)}else{b.childEls=b.getChildEls().concat(Array.prototype.slice.call(a))}b.prune(b.childEls,false)},applyChildEls:function(b,a){var e=this,g=e.getChildEls(),j,k,d,c,h;j=(a||e.id)+"-";for(d=g.length;d--;){k=g[d];if(typeof k=="string"){h=b.getById(j+k)}else{if((c=k.select)){h=Ext.select(c,true,b.dom)}else{if((c=k.selectNode)){h=Ext.get(Ext.DomQuery.selectNode(c,b.dom))}else{h=b.getById(k.id||(j+k.itemId))}}k=k.name}e[k]=h}},getChildEls:function(){var b=this,a;if(b.hasOwnProperty("childEls")){return b.childEls}a=b.self;return a.$childEls||b.getClassChildEls(a)},getClassChildEls:function(o){var k=this,p=o.$childEls,m,d,b,j,n,h,a,c,e,g,l;if(!p){g=o.superclass;if(g){g=g.self;c=[g.$childEls||k.getClassChildEls(g)];l=g.prototype.mixins||{}}else{c=[];l={}}e=o.prototype;h=e.mixins;for(a in h){if(h.hasOwnProperty(a)&&!l.hasOwnProperty(a)){n=h[a].self;c.push(n.$childEls||k.getClassChildEls(n))}}c.push(e.hasOwnProperty("childEls")&&e.childEls);for(d=0,b=c.length;d<b;++d){m=c[d];if(m&&m.length){if(!p){p=m}else{if(!j){j=true;p=p.slice(0)}p.push.apply(p,m)}}}o.$childEls=p=(p?k.prune(p,!j):[])}return p},prune:function(c,e){var b=c.length,d={},a;while(b--){a=c[b];if(typeof a!="string"){a=a.name}if(!d[a]){d[a]=1}else{if(e){e=false;c=c.slice(0)}Ext.Array.erase(c,b,1)}}return c},removeChildEls:function(g){var e=this,a=e.getChildEls(),d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}}});Ext.define("Ext.util.Renderable",{requires:["Ext.dom.Element"],frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameElNames:["TL","TC","TR","ML","MC","MR","BL","BC","BR"],frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var b=this,c={},e=b.protoEl,d=b.getTargetEl(),a;b.finishRenderChildren();if(b.styleHtmlContent){d.addCls(b.styleHtmlCls)}e.writeTo(c);a=c.removed;if(a){d.removeCls(a)}a=c.cls;if(a.length){d.addCls(a)}a=c.style;if(c.style){d.setStyle(a)}b.protoEl=null;if(!b.ownerCt){b.updateLayout()}},afterFirstLayout:function(d,a){var e=this,c=Ext.isDefined(e.x),b=Ext.isDefined(e.y),h,g;if(e.floating&&(!c||!b)){if(e.floatParent){h=e.floatParent.getTargetEl().getViewRegion();g=e.el.getAlignToXY(e.floatParent.getTargetEl(),"c-c");h.left=g[0]-h.left;h.top=g[1]-h.top}else{g=e.el.getAlignToXY(e.container,"c-c");h=e.container.translatePoints(g[0],g[1])}e.x=c?e.x:h.left;e.y=b?e.y:h.top;c=b=true}if(c||b){e.setPosition(e.x,e.y)}e.onBoxReady(d,a);if(e.hasListeners.boxready){e.fireEvent("boxready",e,d,a)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var b=this,c=b.getTargetEl(),a=b.getComponentLayout();b.frame=b.frame||b.alwaysFramed;if(!a.initialized){a.initLayout()}if(c){c.setStyle(b.getOverflowStyle());b.overflowStyleSet=true}b.setUI(b.ui);if(b.disabled){b.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(a){var g=this,b,h,e,d,i,c;if(!g.el||g.$pid){if(g.container){d=g.container.getById(g.id,true)}else{d=Ext.getDom(g.id)}if(!g.el){g.wrapPrimaryEl(d)}else{delete g.$pid;if(!g.el.dom){g.wrapPrimaryEl(g.el)}d.parentNode.insertBefore(g.el.dom,d);Ext.removeNode(d)}}else{if(!g.rendering){b=g.initRenderTpl();if(b){h=g.initRenderData();b.insertFirst(g.getTargetEl(),h)}}}if(!g.container){g.container=Ext.get(g.el.dom.parentNode)}if(g.ctCls){g.container.addCls(g.ctCls)}g.onRender(g.container,a);if(!g.overflowStyleSet){g.getTargetEl().setStyle(g.getOverflowStyle())}g.el.setVisibilityMode(Ext.Element[g.hideMode.toUpperCase()]);if(g.overCls){g.el.hover(g.addOverCls,g.removeOverCls,g)}if(g.hasListeners.render){g.fireEvent("render",g)}if(g.contentEl){i=Ext.baseCSSPrefix;c=i+"hide-";e=Ext.get(g.contentEl);e.removeCls([i+"hidden",c+"display",c+"offsets",c+"nosize"]);g.getTargetEl().appendChild(e.dom)}g.afterRender();if(g.hasListeners.afterrender){g.fireEvent("afterrender",g)}g.initEvents();if(g.hidden){g.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var h=this,j=h.autoEl,e=h.getFrameInfo(),a={tag:"div",tpl:e?h.initFramingTpl(e.table):h.initRenderTpl()},b,d,g,k,c;h.initStyles(h.protoEl);h.protoEl.writeTo(a);h.protoEl.flush();if(Ext.isString(j)){a.tag=j}else{Ext.apply(a,j)}a.id=h.id;if(a.tpl){if(e){d=h.frameElNames;g=d.length;c=h.id+"-frame1";h.frameGenId=1;a.tplData=Ext.apply({},{$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:e.maxWidth,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom,renderData:h.initRenderData()},h.getFramePositions(e));for(b=0;b<g;b++){k=d[b];h.addChildEls({name:"frame"+k,id:c+k})}h.addChildEls({name:"frameBody",id:c+"MC"})}else{a.tplData=h.initRenderData()}}return a},initFramingTpl:function(b){var a=b?this.getTpl("frameTableTpl"):this.getTpl("frameTpl");if(a&&!a.applyRenderTpl){this.setupFramingTpl(a)}return a},setupFramingTpl:function(a){a.applyRenderTpl=this.doApplyRenderTpl;a.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},getRenderTree:function(){var a=this;if(!a.hasListeners.beforerender||a.fireEvent("beforerender",a)!==false){a.beforeRender();a.rendering=true;if(a.el){return{tag:"div",id:(a.$pid=Ext.id())}}return a.getElConfig()}return null},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=a.dom?a:Ext.get(a);return b.container},initRenderData:function(){var a=this;return Ext.apply({$comp:a,id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame},a.renderData)},initRenderTpl:function(){var a=this.getTpl("renderTpl");if(a&&!a.renderContent){this.setupRenderTpl(a)}return a},onRender:function(d,e){var h=this,j=h.x,i=h.y,c,a,k,b=h.el,g=Ext.getBody().dom;if(Ext.scopeResetCSS&&!h.ownerCt){if(b.dom===g){b.parent().addCls(Ext.resetCls)}else{if(h.floating&&h.el.dom.parentNode===g){Ext.resetElement.appendChild(h.el)}else{h.resetEl=b.wrap(Ext.resetElementSpec,false,Ext.supports.CSS3LinearGradient?undefined:"*")}}}h.applyRenderSelectors();delete h.rendering;h.rendered=true;c=null;if(j!==undefined){c=c||{};c.x=j}if(i!==undefined){c=c||{};c.y=i}if(!h.getFrameInfo()&&Ext.isBorderBox){a=h.width;k=h.height;if(typeof a=="number"){c=c||{};c.width=a}if(typeof k=="number"){c=c||{};c.height=k}}h.lastBox=h.el.lastBox=c},render:function(c,b){var e=this,d=e.el&&(e.el=Ext.get(e.el)),h,a,g;Ext.suspendLayouts();c=e.initContainer(c);g=e.getInsertPosition(b);if(!d){a=e.getRenderTree();if(e.ownerLayout&&e.ownerLayout.transformItemRenderTree){a=e.ownerLayout.transformItemRenderTree(a)}if(a){if(g){d=Ext.DomHelper.insertBefore(g,a)}else{d=Ext.DomHelper.append(c,a)}e.wrapPrimaryEl(d)}}else{if(!e.hasListeners.beforerender||e.fireEvent("beforerender",e)!==false){e.initStyles(d);if(e.allowDomMove!==false){if(g){c.dom.insertBefore(d.dom,g)}else{c.dom.appendChild(d.dom)}}}else{h=true}}if(d&&!h){e.finishRender(b)}Ext.resumeLayouts(!c.isDetachedBody)},ensureAttachedToBody:function(c){var b=this,a;while(b.ownerCt){b=b.ownerCt}if(b.container.isDetachedBody){b.container=a=Ext.resetElement;a.appendChild(b.el.dom);if(c){b.updateLayout()}if(typeof b.x=="number"||typeof b.y=="number"){b.setPosition(b.x,b.y)}}},setupRenderTpl:function(a){a.renderBody=a.renderContent=this.doRenderContent},wrapPrimaryEl:function(a){this.el=Ext.get(a,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var h=this,e=h.getFrameInfo(),j,a,c,b,d=h.frameElNames,g=d.length,k;if(e){j=e.maxWidth;a=h.getFrameTpl(e.table);h.frameGenId=c=(h.frameGenId||0)+1;c=h.id+"-frame"+c;a.insertFirst(h.el,Ext.apply({$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:j,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom},h.getFramePositions(e)));h.frameBody=h.el.down("."+h.frameCls+"-mc");h.removeChildEls(function(i){return i.id&&h.frameIdRegex.test(i.id)});for(b=0;b<g;b++){k=d[b];h["frame"+k]=h.el.getById(c+k)}}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var e=this,h=this.frameSize&&this.frameSize.table,g=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}if(c){c.remove()}}}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var g=this,i=g.frameInfoCache,a=g.el||g.protoEl,j=a.dom?a.dom.className:a.classList.join(" "),d=i[j],e,c,h,b;if(d==null){e=Ext.fly(g.getStyleProxy(j),"frame-style-el");c=e.getStyle("background-position-x");h=e.getStyle("background-position-y");if(!c&&!h){b=e.getStyle("background-position").split(" ");c=b[0];h=b[1]}d=g.calculateFrame(c,h);if(d){a.setStyle("background-image","none")}i[j]=d}g.frame=!!d;g.frameSize=d;return d},calculateFrame:function(h,g){if(!(parseInt(h,10)>=1000000&&parseInt(g,10)>=1000000)){return false}var a=Math.max,b=parseInt(h.substr(3,2),10),e=parseInt(h.substr(5,2),10),c=parseInt(g.substr(3,2),10),i=parseInt(g.substr(5,2),10),d={table:h.substr(0,3)=="110",vertical:g.substr(0,3)=="110",top:a(b,e),right:a(e,c),bottom:a(i,c),left:a(b,i)};d.maxWidth=a(d.top,d.right,d.bottom,d.left);d.width=d.left+d.right;d.height=d.top+d.bottom;return d},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.resetElement.createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFramePositions:function(e){var h=this,i=e.maxWidth,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var c=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,b=k.exec(unescape(g)),h,d,a,j,e,i;if(!b||!b[1]){return}d=b[1];g=b[2];switch(d){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":h=[];if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];h.push(c.decodeValue(g))}}return h;case"o":h={};if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];a=g.split("=");h[a[0]]=c.decodeValue(a[1])}}return h;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:false,saveDelay:100,constructor:function(a){var b=this;a=a||{};if(a.stateful!==undefined){b.stateful=a.stateful}if(a.saveDelay!==undefined){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.addStateEvents(b.stateEvents);b.initState()}},addStateEvents:function(c){var e=this,b,d,a;if(e.stateful&&e.getStateId()){if(typeof c=="string"){c=Array.prototype.slice.call(arguments,0)}a=e.stateEventsByName||(e.stateEventsByName={});for(b=c.length;b--;){d=c[b];if(!a[d]){a[d]=1;e.on(d,e.onStateChange,e)}}}},onStateChange:function(){var c=this,a=c.saveDelay,d,b;if(!c.stateful){return}if(a){if(!c.stateTask){d=Ext.state.Stateful;b=d.runner||(d.runner=new Ext.util.TaskRunner());c.stateTask=b.newTask({run:c.saveState,scope:c,interval:a,repeat:1})}c.stateTask.start()}else{c.saveState()}},saveState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=b.getState()||{};if(!a.beforestatesave||b.fireEvent("beforestatesave",b,c)!==false){Ext.state.Manager.set(d,c);if(a.statesave){b.fireEvent("statesave",b,c)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this;return a.stateId||(a.autoGenId?null:a.id)},initState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=Ext.state.Manager.get(d);if(c){c=Ext.apply({},c);if(!a.beforestaterestore||b.fireEvent("beforestaterestore",b,c)!==false){b.applyState(c);if(a.staterestore){b.fireEvent("staterestore",b,c)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(e,c){var b=this,a,d;if(typeof e=="string"){b.savePropToState(e,c)}else{for(a=0,d=e.length;a<d;++a){b.savePropToState(e[a],c)}}return c},destroy:function(){var b=this,a=b.stateTask;if(a){a.destroy();b.stateTask=null}b.clearListeners()}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager","Ext.util.ProtoElement"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",elementCt:"Ext.util.ElementContainer",renderable:"Ext.util.Renderable",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Context","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(a,c){var b=this.runningLayoutContext||this.pendingLayouts;if(b){b.cancelComponent(a,false,c)}},flushLayouts:function(){var b=this,a=b.pendingLayouts;if(a&&a.invalidQueue.length){b.pendingLayouts=null;b.runningLayoutContext=a;Ext.override(a,{runComplete:function(){b.runningLayoutContext=null;return this.callParent()}});a.run()}},resumeLayouts:function(a){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(a){this.flushLayouts()}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(b,e){var c=this,a=c.runningLayoutContext,d;if(a){a.queueInvalidate(b)}else{d=c.pendingLayouts||(c.pendingLayouts=new Ext.layout.Context());d.queueInvalidate(b);if(!e&&!c.layoutSuspendCount&&!b.isLayoutSuspended()){c.flushLayouts()}}}},isComponent:true,getAutoId:function(){this.autoGenId=true;return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,autoGenId:false,renderTpl:"{%this.renderContent(out,values)%}",frameSize:{left:0,top:0,right:0,bottom:0,width:0,height:0},tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,constructor:function(c){var e=this,d,a,b;if(c){Ext.apply(e,c);b=e.xhooks;if(b){delete e.xhooks;Ext.override(e,b)}}else{c={}}e.initialConfig=c;e.mixins.elementCt.constructor.call(e);e.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","boxready","beforedestroy","destroy","resize","move","focus","blur");e.getId();e.setupProtoEl();if(e.cls){e.initialCls=e.cls;e.protoEl.addCls(e.cls)}if(e.style){e.initialStyle=e.style;e.protoEl.setStyle(e.style)}e.mons=[];e.renderData=e.renderData||{};e.renderSelectors=e.renderSelectors||{};if(e.plugins){e.plugins=e.constructPlugins()}if(!e.hasListeners){e.hasListeners=new e.HasListeners()}e.initComponent();Ext.ComponentManager.register(e);e.mixins.observable.constructor.call(e);e.mixins.state.constructor.call(e,c);this.addStateEvents("resize");if(e.plugins){for(d=0,a=e.plugins.length;d<a;d++){e.plugins[d]=e.initPlugin(e.plugins[d])}}e.loader=e.getLoader();if(e.renderTo){e.render(e.renderTo)}if(e.autoShow&&!e.isContained){e.show()}},initComponent:function(){this.plugins=this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var b=this,c=null,a=b.getSizeModel();if(a.width.configured){c=b.addPropertyToState(c,"width")}if(a.height.configured){c=b.addPropertyToState(c,"height")}return c},addPropertyToState:function(e,d,c){var b=this,a=arguments.length;if(a==3||b.hasOwnProperty(d)){if(a<3){c=b[d]}if(c!==b.initialConfig[d]){(e||(e={}))[d]=c}}return e},show:Ext.emptyFn,animate:function(b){var k=this,e,g,d,p,o,m,l,j,n,i,c,a;b=b||{};o=b.to||{};if(Ext.fx.Manager.hasFxBlock(k.id)){return k}e=Ext.isDefined(o.width);if(e){p=Ext.Number.constrain(o.width,k.minWidth,k.maxWidth)}g=Ext.isDefined(o.height);if(g){d=Ext.Number.constrain(o.height,k.minHeight,k.maxHeight)}if(!b.dynamic&&(e||g)){j=(b.from?b.from.width:undefined)||k.getWidth();n=j;i=(b.from?b.from.height:undefined)||k.getHeight();c=i;a=false;if(g&&d>i){c=d;a=true}if(e&&p>j){n=p;a=true}if(a){m=!Ext.isNumber(k.width);l=!Ext.isNumber(k.height);k.setSize(n,c);k.el.setSize(j,i);if(m){delete k.width}if(l){delete k.height}}if(e){o.width=p}if(g){o.height=d}}return k.mixins.animate.animate.apply(k,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var e=this,c,b=[],d,a;if(e.plugins){c=Ext.isArray(e.plugins)?e.plugins:[e.plugins];for(d=0,a=c.length;d<a;d++){b[d]=e.constructPlugin(c[d])}return b}},initPlugin:function(a){a.init(this);return a},updateAria:Ext.emptyFn,registerFloatingItem:function(b){var a=this;if(!a.floatingDescendants){a.floatingDescendants=new Ext.ZIndexManager(a)}a.floatingDescendants.register(b)},unregisterFloatingItem:function(b){var a=this;if(a.floatingDescendants){a.floatingDescendants.unregister(b)}},layoutSuspendCount:0,suspendLayouts:function(){var a=this;if(!a.rendered){return}if(++a.layoutSuspendCount==1){a.suspendLayout=true}},resumeLayouts:function(b){var a=this;if(!a.rendered){return}if(!--a.layoutSuspendCount){a.suspendLayout=false;if(b&&!a.isLayoutSuspended()){a.updateLayout(b)}}},setupProtoEl:function(){var b=this,a=[b.baseCls,b.getComponentLayout().targetCls];if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}b.protoEl=new Ext.util.ProtoElement({cls:a.join(" ")})},setUI:function(g){var e=this,b=Ext.Array.clone(e.uiCls),h=[],d=[],a,c;for(c=0;c<b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));h.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=g;e.addUIToElement();d=[];for(c=0;c<h.length;c++){a=h[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}if(e.rendered){e.updateLayout()}},addClsWithUI:function(c,h){var g=this,e=[],d,b=0,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;g.uiCls=Ext.Array.clone(g.uiCls);for(;b<d;b++){a=c[b];if(a&&!g.hasUICls(a)){g.uiCls.push(a);e=e.concat(g.addUIClsToElement(a))}}if(h!==true){g.addCls(e)}return e},removeClsWithUI:function(c,h){var g=this,e=[],b=0,d,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;for(b=0;b<d;b++){a=c[b];if(a&&g.hasUICls(a)){g.uiCls=Ext.Array.remove(g.uiCls,a);e=e.concat(g.removeUIClsFromElement(a))}}if(h!==true){g.removeCls(e)}return e},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(m){var k=this,b=k.baseCls+"-"+k.ui+"-"+m,n=[Ext.baseCSSPrefix+m,k.baseCls+"-"+m,b],l=k.frameElementCls,h,g,e,a,d,j;if(k.frame&&!Ext.supports.CSS3BorderRadius){h=k.frameElementsArray;g=h.length;e=0;for(;e<g;e++){d=h[e];a=k["frame"+d.toUpperCase()];j=b+"-"+d;if(a&&a.dom){a.addCls(j)}else{if(Ext.Array.indexOf(l[d],j)==-1){l[d].push(j)}}}}k.frameElementCls=l;return n},removeUIClsFromElement:function(m){var k=this,b=k.baseCls+"-"+k.ui+"-"+m,n=[Ext.baseCSSPrefix+m,k.baseCls+"-"+m,b],l=k.frameElementCls,h,g,e,a,d,j;if(k.frame&&!Ext.supports.CSS3BorderRadius){h=k.frameElementsArray;g=h.length;e=0;for(;e<g;e++){d=h[e];a=k["frame"+d.toUpperCase()];j=b+"-"+d;if(a&&a.dom){a.addCls(j)}else{Ext.Array.remove(l[d],j)}}}k.frameElementCls=l;return n},addUIToElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls,g,e,d,a,b,h;j.addCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){g=j.frameElementsArray;e=g.length;d=0;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.addCls(h)}else{if(!Ext.Array.contains(l[b],h)){l[b].push(h)}}}}},removeUIFromElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls,g,e,d,a,b,h;j.removeCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){g=j.frameElementsArray;e=g.length;d=0;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.removeCls(h)}else{Ext.Array.remove(l[b],h)}}}},getTpl:function(a){return Ext.XTemplate.getTpl(this,a)},initStyles:function(j){var d=this,b=Ext.Element,g=d.padding,c=d.margin,h=d.x,e=d.y,a,i;if(g!==undefined){j.setStyle("padding",b.unitizeBox((g===true)?5:g))}if(c!==undefined){j.setStyle("margin",b.unitizeBox((c===true)?5:c))}if(d.border!==undefined){d.setBorder(d.border,j)}if(d.cls&&d.cls!=d.initialCls){j.addCls(d.cls);delete d.cls;delete d.initialCls}if(d.style&&d.style!=d.initialStyle){j.setStyle(d.style);delete d.style;delete d.initialStyle}if(h!==undefined){j.setStyle("left",(typeof h=="number")?(h+"px"):h)}if(e!==undefined){j.setStyle("top",(typeof e=="number")?(e+"px"):e)}if(!d.getFrameInfo()){a=d.width;i=d.height;if(a!==undefined){if(typeof a==="number"){if(Ext.isBorderBox){j.setStyle("width",a+"px")}}else{j.setStyle("width",a)}}if(i!==undefined){if(typeof i==="number"){if(Ext.isBorderBox){j.setStyle("height",i+"px")}}else{j.setStyle("height",i)}}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(g){c.mon(b,g)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&&b.on){Ext.each(e[d],a)}}}}c.addFocusListener()},addFocusListener:function(){var c=this,b=c.getFocusEl(),a;if(b){if(b.isComponent){return b.addFocusListener()}a=b.needsTabIndex();if(!c.focusListenerAdded&&(!a||Ext.FocusManager.enabled)){if(a){b.dom.tabIndex=-1}b.on({focus:c.onFocus,blur:c.onBlur,scope:c});c.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(d){var b=this,a;if((b.focusable!==false)&&(a=b.getFocusEl())&&b.rendered&&!b.destroying&&!b.isDestroyed&&!b.disabled&&b.isVisible(true)){if(a.isComponent){return a.isFocusable()}return a&&a.dom&&a.isVisible()}},preFocus:Ext.emptyFn,onFocus:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(!c.disabled){c.preFocus(d);if(b&&a){a.addCls(c.addClsWithUI(b,true))}if(!c.hasFocus){c.hasFocus=true;c.fireEvent("focus",c,d)}}},beforeBlur:Ext.emptyFn,onBlur:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(c.destroying){return}c.beforeBlur(d);if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.validateOnBlur){c.validate()}c.hasFocus=false;c.fireEvent("blur",c,d);c.postBlur(d)},postBlur:Ext.emptyFn,is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.getBubbleTarget();if(b){for(;a;a=a.getBubbleTarget()){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(b,d){var j=this,h=j.ownerCt,a,g,e,c;if(d&&j.is(b)){return j}if(h){for(g=h.items.items,e=Ext.Array.indexOf(g,j)-1;e>-1;e--){c=g[e];if(c.query){a=c.query(b);a=a[a.length-1];if(a){return a}}if(c.is(b)){return c}}return h.previousNode(b,true)}return null},nextNode:function(d,j){var b=this,c=b.ownerCt,k,e,h,g,a;if(j&&b.is(d)){return b}if(c){for(e=c.items.items,g=Ext.Array.indexOf(e,b)+1,h=e.length;g<h;g++){a=e[g];if(a.is(d)){return a}if(a.down){k=a.down(d);if(k){return k}}}return c.nextNode(d)}return null},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowStyle:function(){var b=this,a=null;if(typeof b.autoScroll=="boolean"){a={overflow:b.autoScroll?"auto":""}}else{if(b.overflowX!==undefined||b.overflowY!==undefined){a={"overflow-x":(b.overflowX||""),"overflow-y":(b.overflowY||"")}}}if(a&&(Ext.isIE6||Ext.isIE7)){a.position="relative"}return a},isXType:function(b,a){if(a){return this.xtype===b}else{return this.xtypesMap[b]}},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.updateLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=c.rendered&&!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},onBoxReady:function(){var a=this;if(a.disableOnBoxReady){a.onDisable()}else{if(a.enableOnBoxReady){a.onEnable()}}if(a.resizable){a.initResizable(a.resizable)}if(a.draggable){a.initDraggable()}},enable:function(a){var b=this;delete b.disableOnBoxReady;b.removeCls(b.disabledCls);if(b.rendered){b.onEnable()}else{b.enableOnBoxReady=true}b.disabled=false;delete b.resetDisable;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;delete b.enableOnBoxReady;b.addCls(b.disabledCls);if(b.rendered){b.onDisable()}else{b.disableOnBoxReady=true}b.disabled=true;if(a!==true){delete b.resetDisable;b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){var c=this,b=c.focusCls,a=c.getFocusEl();if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.maskOnDisable){c.el.dom.disabled=true;c.mask()}},mask:function(){var b=this.lastBox,c=this.getMaskTarget(),a=[];if(b){a[2]=b.height}c.mask.apply(c,a)},unmask:function(){this.getMaskTarget().unmask()},getMaskTarget:function(){return this.el},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.addCls.apply(b,arguments);return c},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;return b.hasCls.apply(b,arguments)},removeCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.removeCls.apply(b,arguments);return c},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,c){var b=this;b.ownerCt=a;if(b.hasListeners.added){b.fireEvent("added",b,a,c)}},onRemoved:function(b){var a=this;if(a.hasListeners.removed){a.fireEvent("removed",a,a.ownerCt)}delete a.ownerCt;delete a.ownerLayout},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this;if(b&&typeof b=="object"){a=b.height;b=b.width}if(typeof b=="number"){c.width=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}else{if(b===null){delete c.width}}if(typeof a=="number"){c.height=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}else{if(a===null){delete c.height}}if(c.rendered&&c.isVisible()){c.updateLayout({isRoot:false})}return c},isLayoutRoot:function(){var a=this,b=a.ownerLayout;if(!b||a._isLayoutRoot||a.floating){return true}return b.isItemLayoutRoot(a)},isLayoutSuspended:function(){var a=this,b;while(a){if(a.layoutSuspendCount||a.suspendLayout){return true}b=a.ownerLayout;if(!b){break}a=b.owner}return false},updateLayout:function(b){var c=this,d,a=b&&b.isRoot;if(!c.rendered||c.layoutSuspendCount||c.suspendLayout){return}if(c.hidden){Ext.AbstractComponent.cancelLayout(c)}else{if(typeof a!="boolean"){a=c.isLayoutRoot()}}if(a||!c.ownerLayout||!c.ownerLayout.onContentChange(c)){if(!c.isLayoutSuspended()){d=(b&&b.hasOwnProperty("defer"))?b.defer:c.deferLayouts;Ext.AbstractComponent.updateLayout(c,d)}}},getSizeModel:function(j){var n=this,a=Ext.layout.SizeModel,d=n.componentLayout.ownerContext,b=n.width,p=n.height,q,c,g,e,h,o,l,m,k,i;if(d){i=d.widthModel;h=d.heightModel}if(!i||!h){g=((q=typeof b)=="number");e=((c=typeof p)=="number");k=n.floating||!(o=n.ownerLayout);if(k){l=Ext.layout.Layout.prototype.autoSizePolicy;m=n.floating?3:n.shrinkWrap;if(g){i=a.configured}if(e){h=a.configured}}else{l=o.getItemSizePolicy(n,j);m=o.isItemShrinkWrap(n)}m=(m===true)?3:(m||0);if(k&&m){if(b&&q=="string"){m&=2}if(p&&c=="string"){m&=1}}if(m!==3){if(!j){j=n.ownerCt&&n.ownerCt.getSizeModel()}if(j){m|=(j.width.shrinkWrap?1:0)|(j.height.shrinkWrap?2:0)}}if(!i){if(!l.setsWidth){if(g){i=a.configured}else{i=(m&1)?a.shrinkWrap:a.natural}}else{if(l.readsWidth){if(g){i=a.calculatedFromConfigured}else{i=(m&1)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{i=a.calculated}}}if(!h){if(!l.setsHeight){if(e){h=a.configured}else{h=(m&2)?a.shrinkWrap:a.natural}}else{if(l.readsHeight){if(e){h=a.calculatedFromConfigured}else{h=(m&2)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{h=a.calculated}}}}return i.pairsByHeightOrdinal[h.ordinal]},isDescendant:function(a){if(a.isContainer){for(var b=this.ownerCt;b;b=b.ownerCt){if(b===a){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.updateLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(a,k,b,j){var g=this,h,d,c,e;if(++g.componentLayoutCounter===1){g.afterFirstLayout(a,k)}if(g.floatingItems){h=g.floatingItems.items;d=h.length;for(c=0;c<d;c++){e=h[c];if(!e.rendered&&e.autoShow){e.show()}}}if(g.hasListeners.resize&&(a!==b||k!==j)){g.fireEvent("resize",g,a,k,b,j)}},beforeComponentLayout:function(b,a){return true},setPosition:function(a,e,b){var c=this,d=c.beforeSetPosition.apply(c,arguments);if(d&&c.rendered){d=c.convertPosition(d);if(d.left!==c.el.getLeft()||d.top!==c.el.getTop()){if(b){c.stopAnimation();c.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(c.afterSetPosition,c,[d.left,d.top])},to:d},b))}else{if(d.left!==undefined&&d.top!==undefined){c.el.setLeftTop(d.left,d.top)}else{if(d.left!==undefined){c.el.setLeft(d.left)}else{if(d.top!==undefined){c.el.setTop(d.top)}}}c.afterSetPosition(d.left,d.top)}}}return c},beforeSetPosition:function(a,e,b){var d,c;if(!a||Ext.isNumber(a)){d={x:a,y:e,anim:b}}else{if(Ext.isNumber(c=a[0])){d={x:c,y:a[1],anim:e}}else{d={x:a.x,y:a.y,anim:e}}}d.hasX=Ext.isNumber(d.x);d.hasY=Ext.isNumber(d.y);this.x=d.x;this.y=d.y;return(d.hasX||d.hasY)?d:null},afterSetPosition:function(a,c){var b=this;b.onPosition(a,c);if(b.hasListeners.move){b.fireEvent("move",b,a,c)}},convertPosition:function(d,b){var a={},c=Ext.Element;if(d.hasX){a.left=b?c.addUnits(d.x):d.x}if(d.hasY){a.top=b?c.addUnits(d.y):d.y}return a},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=new Ext.ComponentLoader(Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.updateLayout()}return a},setBorder:function(b,d){var c=this,a=!!d;if(c.rendered||a){if(!a){d=c.el}if(!b){b=0}else{b=Ext.Element.unitizeBox((b===true)?1:b)}d.setStyle("border-width",b);if(!a){c.updateLayout()}}c.border=b},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingDescendants)},destroy:function(){var d=this,b=d.renderSelectors,a,c;if(!d.isDestroyed){if(!d.hasListeners.beforedestroy||d.fireEvent("beforedestroy",d)!==false){d.destroying=true;d.beforeDestroy();if(d.floating){delete d.floatParent;if(d.zIndexManager){d.zIndexManager.unregister(d)}}else{if(d.ownerCt&&d.ownerCt.remove){d.ownerCt.remove(d,false)}}d.onDestroy();Ext.destroy(d.plugins);if(d.hasListeners.destroy){d.fireEvent("destroy",d)}Ext.ComponentManager.unregister(d);d.mixins.state.destroy.call(d);d.clearListeners();if(d.rendered){if(!d.preserveElOnDestroy){d.el.remove()}d.mixins.elementCt.destroy.call(d);if(b){for(a in b){if(b.hasOwnProperty(a)){c=d[a];if(c){delete d[a];c.remove()}}}}delete d.el;delete d.frameBody;delete d.rendered}d.destroying=false;d.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){var a=this;a.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(b){a.resumeLayouts(b)};Ext.suspendLayouts=function(){a.suspendLayouts()};Ext.batchLayouts=function(c,b){a.suspendLayouts();c.call(b);a.resumeLayouts(true)}});Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(a){this.initialConfig=a;Ext.apply(this,a)},clone:function(){return new this.self(this.initialConfig)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(g,c){var b=this.items,d=0,a=b.length,e;Ext.suspendLayouts();for(;d<a;d++){e=b[d];e[g].apply(e,c)}Ext.resumeLayouts(true)},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(g.isFormUpload(k)){g.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort||g.autoAbort){g.abort()}b=k.async!==false?(k.async||g.async):false;i=g.openRequest(k,c,b,e,h);a=g.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}i.send(c.data);if(!b){return g.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(b,g,s,e){b=Ext.getDom(b);e=e||{};var n=Ext.id(),l=document.createElement("iframe"),c=[],d="multipart/form-data",r={target:b.target,method:b.method,encoding:b.encoding,enctype:b.enctype,action:b.action},a=function(h,u){i=document.createElement("input");Ext.fly(i).set({type:"hidden",value:u,name:h});b.appendChild(i);c.push(i)},i,k,p,t,o,j,m,q;Ext.fly(l).set({id:n,name:n,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(l);if(document.frames){document.frames[n].name=n}Ext.fly(b).set({target:n,method:"POST",enctype:d,encoding:d,action:g||r.action});if(s){k=Ext.Object.fromQueryString(s)||{};for(t in k){if(k.hasOwnProperty(t)){p=k[t];if(Ext.isArray(p)){o=p.length;for(j=0;j<o;j++){a(t,p[j])}}else{a(t,p)}}}}Ext.fly(l).on("load",Ext.Function.bind(this.onUploadComplete,this,[l,e]),null,{single:true});b.submit();Ext.fly(b).set(r);m=c.length;for(q=0;q<m;q++){Ext.removeNode(c[q])}},onUploadComplete:function(i,c){var d=this,b={responseText:"",responseXML:null},h,a;try{h=i.contentWindow.document||i.contentDocument||window.frames[i.id].document;if(h){if(h.body){if((a=h.body.firstChild)&&/pre/i.test(a.tagName)){b.responseText=a.innerText}else{if(a=h.getElementsByTagName("textarea")[0]){b.responseText=a.value}else{b.responseText=h.body.textContent||h.body.innerText}}}b.responseXML=h.XMLDocument||h}}catch(g){}d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c]);Ext.callback(c.callback,c.scope,[c,true,b]);setTimeout(function(){Ext.removeNode(i)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},newRequest:function(a){var b;if((a.cors||this.cors)&&Ext.isIE&&Ext.ieVersion>=8){b=new XDomainRequest()}else{b=this.getXhrInstance()}return b},openRequest:function(c,a,d,g,b){var e=this.newRequest(c);if(g){e.open(a.method,a.url,d,g,b)}else{e.open(a.method,a.url,d)}if(c.withCredentials||this.withCredentials){e.withCredentials=true}return e},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g}()),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this,d;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){d=b.xhr;try{d.onreadystatechange=null}catch(c){d=Ext.emptyFn}d.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(g){var d=this,c=g.options,a,i,b;try{a=d.parseStatus(g.xhr.status)}catch(h){a={success:false,isException:false}}i=a.success;if(i){b=d.createResponse(g);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||g.aborted||g.timedout){b=d.createException(g)}else{b=d.createResponse(g)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,i,b]);delete d.requests[g.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(b){var a=this;a.el=new Ext.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,shim:(a.shim===false)?false:undefined},a.floating),b);a.floating=true;a.registerWithOwnerCt()},registerWithOwnerCt:function(){var a=this;if(a.zIndexParent){a.zIndexParent.unregisterFloatingItem(a)}a.zIndexParent=a.up("[floating]");a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false&&a.isVisible()){a.hide();a.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingDescendants){a=Math.floor(b.floatingDescendants.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b),d;if(a){d=c.getPosition(!!c.floatParent);d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(a){var b=this;if(b.constrain||b.constrainHeader){a=a||(b.floatParent&&b.floatParent.getTargetEl())||b.container||b.el.getScopeParent();return(b.constrainHeader?b.header.el:b.el).getConstrainVector(a)}},alignTo:function(b,a,c){this.setPagePosition(this.el.getAlignToXY(b.el||b,a,c));return this},toFront:function(b){var a=this;if(a.zIndexParent&&a.bringParentToFront!==false){a.zIndexParent.toFront(true)}if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(b){a.preventFocusOnActivate=true}if(a.zIndexManager.bringToFront(a)){if(!b){a.focus(false,true)}}delete a.preventFocusOnActivate;return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(a.modal&&!a.preventFocusOnActivate){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this,b=c.floatParent,a=b?b.getTargetEl():c.container;c.setSize(a.getViewSize(false));c.setPosition.apply(c,b?[0,0]:a.getXY())}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",bubbleEvents:[],monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,defaultComponentLayoutType:"autocomponent",constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}},setAutoScroll:function(a){var b=this;b.autoScroll=!!a;if(b.rendered){b.getTargetEl().setStyle(b.getOverflowStyle())}b.updateLayout();return b},setOverflowXY:function(b,a){var c=this,d=arguments.length;if(d){c.overflowX=b||"";if(d>1){c.overflowY=a||""}}if(c.rendered){c.getTargetEl().setStyle(c.getOverflowStyle())}c.updateLayout();return c},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,a=(c.resizer&&c.resizer.el!==c.el)?c.resizerComponent=new Ext.Component({el:c.resizer.el,rendered:true,container:c.container}):c,b=Ext.applyIf({el:a.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){b.constrain=c.constrain;b.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(a,b)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a;if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=Ext.apply({},c)}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(b,a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender();c.hidden=true}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}else{d=c.el.translatePoints(a,g);a=d.left;g=d.top}c.setPosition(a,g,b)}else{d=c.el.translatePoints(a,g);c.setPosition(d.left,d.top,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(b){var c=b?this.getPosition(b):this.el.getXY(),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var c=this,b=c.el,e,d=c.isContainedFloater(),g;if((a===true)&&!d){return[b.getLocalX(),b.getLocalY()]}e=c.el.getXY();if((a===true)&&d){g=c.floatParent.getTargetEl().getViewRegion();e[0]-=g.left;e[1]-=g.top}return e},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this,e=c.rendered;if(e&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!e&&(c.autoRender||c.floating)){c.doAutoRender();e=c.rendered}if(e){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}else{c.onShowVeto()}}return c},onShowVeto:Ext.emptyFn,beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating){if(a.maximized){a.fitContainer()}else{if(a.constrain){a.doConstrain()}}}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments)}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(a,b||c);c.fireEvent("hide",c)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer,a.resizerComponent)}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(e,c){var d=this,a,g,b;if(c){if(!d.focusTask){d.focusTask=new Ext.util.DelayedTask(d.focus)}d.focusTask.delay(Ext.isNumber(c)?c:10,null,d,[e,false]);return d}if(d.rendered&&!d.isDestroyed&&d.isVisible(true)&&(a=d.getFocusEl())){if(a.isComponent){return a.focus(e,c)}if((g=a.dom)){if(a.needsTabIndex()){g.tabIndex=-1}if(d.floating){b=d.container.dom.scrollTop}a.focus();if(e===true){g.select()}}if(d.floating){d.toFront(true);if(b!==undefined){d.container.dom.scrollTop=b}}}return d},cancelFocus:function(){var a=this.focusTask;if(a){a.cancel()}},blur:function(){var a;if(this.rendered&&(a=this.getFocusEl())){a.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt||this.floatParent},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.getBubbleTarget();b&&!a(b,this);b=b.getBubbleTarget()){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.getBubbleTarget()}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.resetCls})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy}});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(i){i=Ext.apply({},i);var e=this,d=e.target,j=Ext.isDefined(i.loadMask)?i.loadMask:e.loadMask,b=Ext.apply({},i.params),a=Ext.apply({},i.ajaxOptions),g=i.callback||e.callback,h=i.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(i,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(i,{url:e.url});Ext.apply(i,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,i)===false){return}if(j){e.addMask(j)}c=Ext.Ajax.request(i);e.active={request:c,options:i,mask:j,scope:h,callback:g,success:i.success||e.success,failure:i.failure||e.failure,renderer:i.renderer||e.renderer,scripts:Ext.isDefined(i.scripts)?i.scripts:e.scripts};e.setOptions(e.active,i)},setOptions:Ext.emptyFn,onComplete:function(b,h,a){var d=this,g=d.active,c=g.scope,e=d.getRenderer(g.renderer);if(h){h=e.call(d,d,a,g)!==false}if(h){Ext.callback(g.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(g.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(g.callback,c,[d,h,a,b]);if(g.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){g.suspendLayouts();if(h.removeAll){g.removeAll()}g.add(b);g.resumeLayouts(true)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e===1&&Ext.isArray(d)){b=d;e=b.length}if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}}else{a.push(d)}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(a){var h=this,d=h.disableFormats!==true,g=Ext.util.Format,c=h,b;if(h.compiled){return h.compiled(a).join("")}function e(i,k,l,j){if(l&&d){if(j){j=[a[k]].concat(Ext.functionFactory("return ["+j+"];")())}else{j=[a[k]]}if(l.substr(0,5)=="this."){return c[l.substr(5)].apply(c,j)}else{return g[l].apply(g,j)}}else{return a[k]!==undefined?a[k]:""}}b=h.html.replace(h.re,e);return b},applyOut:function(a,b){var c=this;if(c.compiled){b.push.apply(b,c.compiled(a))}else{b.push(c.apply(a))}return b},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(b,d,a,e){var c=Ext.DomHelper.insertHtml(b,Ext.getDom(d),this.apply(a));return e?Ext.get(c):c},overwrite:function(c,a,d){var b=Ext.DomHelper.overwrite(Ext.getDom(c),this.apply(a));return d?Ext.get(b):b}});Ext.define("Ext.XTemplateParser",{constructor:function(a){Ext.apply(this,a)},doTpl:Ext.emptyFn,parse:function(l){var v=this,p=l.length,o={elseif:"elif"},q=v.topRe,c=v.actionsRe,e,d,j,n,h,k,i,u,r,b,g,a;v.level=0;v.stack=d=[];for(e=0;e<p;e=b){q.lastIndex=e;n=q.exec(l);if(!n){v.doText(l.substring(e,p));break}r=n.index;b=q.lastIndex;if(e<r){v.doText(l.substring(e,r))}if(n[1]){b=l.indexOf("%}",r+2);v.doEval(l.substring(r+2,b));b+=2}else{if(n[2]){b=l.indexOf("]}",r+2);v.doExpr(l.substring(r+2,b));b+=2}else{if(n[3]){v.doTag(n[3])}else{if(n[4]){g=null;while((u=c.exec(n[4]))!==null){j=u[2]||u[3];if(j){j=Ext.String.htmlDecode(j);h=u[1];h=o[h]||h;g=g||{};k=g[h];if(typeof k=="string"){g[h]=[k,j]}else{if(k){g[h].push(j)}else{g[h]=j}}}}if(!g){if(v.elseRe.test(n[4])){v.doElse()}else{if(v.defaultRe.test(n[4])){v.doDefault()}else{v.doTpl();d.push({type:"tpl"})}}}else{if(g["if"]){v.doIf(g["if"],g);d.push({type:"if"})}else{if(g["switch"]){v.doSwitch(g["switch"],g);d.push({type:"switch"})}else{if(g["case"]){v.doCase(g["case"],g)}else{if(g.elif){v.doElseIf(g.elif,g)}else{if(g["for"]){++v.level;if(a=v.propRe.exec(n[4])){g.propName=a[1]||a[2]}v.doFor(g["for"],g);d.push({type:"for",actions:g})}else{if(g.exec){v.doExec(g.exec,g);d.push({type:"exec",actions:g})}}}}}}}}else{if(n[0].length===5){d.push({type:"tpl"})}else{i=d.pop();v.doEnd(i.type,i.actions);if(i.type=="for"){--v.level}}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+")!==undefined) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b<g;++b){a=d.intRe.exec(c[b]);c[b]=a?a[1]:("'"+c[b].replace(d.aposRe,"\\'")+"'")}d.body.push("case ",c.join(": case "),":\n")},doDefault:function(){var a=this,b=a.switches.length-1;if(a.switches[b]){a.body.push("break;\n")}else{a.switches[b]++}a.body.push("default:\n")},doEnd:function(b,d){var c=this,a=c.level-1;if(b=="for"){if(d.exec){c.doExec(d.exec)}c.body.push("}\n");c.body.push("parent=p",a,";values=r",a+1,";xcount=n",a,";xindex=i",a,"\n")}else{if(b=="if"||b=="switch"){c.body.push("}\n")}}},doFor:function(g,i){var e=this,d,b=e.level,a=b-1,c="p"+b,h;if(g==="."){d="values"}else{if(e.propNameRe.test(g)){d=e.parseTag(g)}else{d=e.addFn(g)+e.callFn}}if(e.maxLevel<b){e.maxLevel=b;e.body.push("var ")}if(g=="."){h="c"+b}else{h="a"+a+"?c"+a+"[i"+a+"]:p"+b}e.body.push("i",b,"=0,n",b,"=0,c",b,"=",d,",a",b,"=",e.createArrayTest(b),",p",b,"=c",a,",r",b,"=values;\n","parent=",h,"\n","if (c",b,"){if(a",b,"){n",b,"=c",b,".length;}else if (c",b,".isMixedCollection){c",b,"=c",b,".items;n",b,"=c",b,".length;}else if(c",b,".isStore){c",b,"=c",b,".data.items;n",b,"=c",b,".length;}else{c",b,"=[c",b,"];n",b,"=1;}}\n","for (xcount=n",b,";i",b,"<n"+b+";++i",b,"){\n","values=c",b,"[i",b,"]");if(i.propName){e.body.push(".",i.propName)}e.body.push("\n","xindex=i",b,"+1\n")},createArrayTest:("isArray" in Array)?function(a){return"Array.isArray(c"+a+")"}:function(a){return"ts.call(c"+a+')==="[object Array]"'},doExec:function(c,d){var b=this,a="f"+b.definitions.length;b.definitions.push("function "+a+"("+b.fnArgs+") {"," try { with(values) {"," "+c," }} catch(e) {","}","}");b.body.push(a+b.callFn+"\n")},addFn:function(a){var c=this,b="f"+c.definitions.length;if(a==="."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return values","}")}else{if(a===".."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return parent","}")}else{c.definitions.push("function "+b+"("+c.fnArgs+") {"," try { with(values) {"," return("+a+")"," }} catch(e) {","}","}")}}return b},parseTag:function(b){var h=this,a=h.tagRe.exec(b),e=a[1],i=a[2],d=a[3],g=a[4],c;if(e=="."){if(!h.validTypes){h.definitions.push("var validTypes={string:1,number:1,boolean:1};");h.validTypes=true}c='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if(isNaN(e)&&e.indexOf("-")==-1&&e.indexOf(".")!=-1){c="values."+e}else{c="values['"+e+"']"}}}}if(g){c="("+c+g+")"}if(i&&h.useFormat){d=d?","+d:"";if(i.substr(0,5)!="this."){i="fm."+i+"("}else{i+="("}}else{return c}return i+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",emptyObj:{},apply:function(a,b){return this.applyOut(a,[],b).join("")},applyOut:function(a,b,d){var g=this,c;if(!g.fn){c=new Ext.XTemplateCompiler({useFormat:g.disableFormats!==true,definitions:g.definitions});g.fn=c.compile(g.html)}try{g.fn.call(g,b,a,d||g.emptyObj,1,1)}catch(h){}return b},compile:function(){return this},statics:{getTpl:function(a,c){var b=a[c],d;if(b&&!b.isTemplate){b=Ext.ClassManager.dynInstantiate("Ext.XTemplate",b);if(a.hasOwnProperty(c)){a[c]=b}else{for(d=a.self.prototype;d;d=d.superclass){if(d.hasOwnProperty(c)){d[c]=b;break}}}}return b||null}}});Ext.define("Ext.layout.Layout",{requires:["Ext.XTemplate"],uses:["Ext.layout.Context"],isLayout:true,initialized:false,running:false,autoSizePolicy:{setsWidth:0,setsHeight:0},statics:{layoutsByType:{},create:function(g,e){var k=Ext.ClassManager,c=this.layoutsByType,d,h,b,a,i,j;if(!g||typeof g==="string"){i=g||e;b={}}else{if(g.isLayout){return g}else{b=g;i=g.type||e}}if(!(a=c[i])){d="layout."+i;h=k.getNameByAlias(d);if(!h){j=true}a=k.get(h);if(j||!a){return k.instantiateByAlias(d,b||{})}c[i]=a}return new a(b)}},constructor:function(a){var b=this;b.id=Ext.id(null,b.type+"-");Ext.apply(b,a);b.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(c){var b=this,a=b.context,d;if(b.lastWidthModel!=c.widthModel){if(b.lastWidthModel){d=true}b.lastWidthModel=c.widthModel}if(b.lastHeightModel!=c.heightModel){if(b.lastWidthModel){d=true}b.lastHeightModel=c.heightModel}if(d){(a=c.context).clearTriggers(b,false);a.clearTriggers(b,true);b.triggerCount=0}},finishedLayout:function(){this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(a){return this.autoSizePolicy},isItemBoxParent:function(a){return false},isItemLayoutRoot:function(d){var c=d.getSizeModel(),b=c.width,a=c.height;if(!d.componentLayout.lastComponentSize&&(b.calculated||a.calculated)){return false}return !b.shrinkWrap&&!a.shrinkWrap},isItemShrinkWrap:function(a){return a.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(d,b){var h=d.length,e,g,c,a;if(h){a=[];for(e=0;e<h;++e){g=d[e];if(!g.rendered){if(b&&(b[g.id]!==undefined)){c=b[g.id]}else{this.configureItem(g);c=g.getRenderTree();if(b){b[g.id]=c}}if(c){a.push(c)}}}}return a},finishRender:Ext.emptyFn,finishRenderItems:function(e,a){var d=a.length,b,c;for(b=0;b<d;b++){c=a[b];if(c.rendering){c.finishRender(b);this.afterRenderItem(c)}}},renderChildren:function(){var b=this,a=b.getLayoutItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(a,g){var e=this,d=a.length,b=0,c;if(d){Ext.suspendLayouts();for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}Ext.resumeLayouts(true)}},isValidParent:function(d,e,a){var b=d.el?d.el.dom:Ext.getDom(d),c=(e&&e.dom)||e;if(b.parentNode&&b.parentNode.className.indexOf(Ext.baseCSSPrefix+"resizable-wrap")!==-1){b=b.parentNode}if(b&&c){if(typeof a=="number"){return b===c.childNodes[a]}return b.parentNode===c}return false},configureItem:function(a){a.ownerLayout=this},renderItem:function(c,d,a){var b=this;if(!c.rendered){b.configureItem(c);c.render(d,a);b.afterRenderItem(c)}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(e){var d=this,c=e.el,b=d.owner,a;if(e.rendered){a=[].concat(d.itemCls||[]);if(b.itemCls){a=Ext.Array.push(a,b.itemCls)}if(a.length){c.removeCls(a)}}delete e.ownerLayout},destroy:function(){var a=this,b;if(a.targetCls){b=a.getTarget();if(b){b.removeCls(a.targetCls)}}a.onDestroy()},sortWeightedItems:function(a,d){for(var b=0,c=a.length;b<c;++b){a[b].$i=b}Ext.Array.sort(a,function(g,e){var h=e.weight-g.weight;if(!h){h=g.$i-e.$i;if(g[d]){h=-h}}return h});for(b=0;b<c;++b){delete a[b].$i}}},function(){var l=this,k={},m=[],g,e,b,a,d;l.prototype.sizeModels=l.sizeModels=k;var h=function(j){var n=this,i=j.name;Ext.apply(Ext.apply(n,c),j);n[i]=true;h[i]=k[i]=n;n.fixed=!(n.auto=n.natural||n.shrinkWrap);n.ordinal=m.length;m.push(n)};Ext.layout.SizeModel=h;var c={calculated:false,configured:false,constrainedMax:false,constrainedMin:false,natural:false,shrinkWrap:false,calculatedFromConfigured:false,calculatedFromNatural:false,calculatedFromShrinkWrap:false,names:null};new h({name:"calculated"});new h({name:"configured",names:{width:"width",height:"height"}});new h({name:"natural"});new h({name:"shrinkWrap"});new h({name:"calculatedFromConfigured",configured:true,names:{width:"width",height:"height"}});new h({name:"calculatedFromNatural",natural:true});new h({name:"calculatedFromShrinkWrap",shrinkWrap:true});new h({name:"constrainedMax",configured:true,constrained:true,names:{width:"maxWidth",height:"maxHeight"}});new h({name:"constrainedMin",configured:true,constrained:true,names:{width:"minWidth",height:"minHeight"}});for(g=0,b=m.length;g<b;++g){d=m[g];d.pairsByHeightOrdinal=a=[];for(e=0;e<b;++e){a.push({width:d,height:m[e]})}}});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.Layout",alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:"Ext.util.ElementContainer"},requires:["Ext.XTemplate"],type:"container",manageOverflow:0,beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,reserveScrollbar:false,lastOverflowAdjust:{width:0,height:0},constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},initLayout:function(){var b=this,a=Ext.getScrollbarSize().width;b.callParent();if(a&&b.manageOverflow&&!b.hasOwnProperty("lastOverflowAdjust")){if(b.owner.autoScroll||b.reserveScrollbar){b.lastOverflowAdjust={width:a,height:0}}}},beginLayout:function(a){this.callParent(arguments);a.targetContext=a.getEl("getTarget",this);this.cacheChildItems(a)},beginLayoutCycle:function(c,a){var b=this,d=b.overflowPadderEl;b.callParent(arguments);if(!c.state.overflowAdjust){c.state.overflowAdjust=b.lastOverflowAdjust}if(a){if(b.usesContainerHeight){++c.consumersContainerHeight}if(b.usesContainerWidth){++c.consumersContainerWidth}}if(d){d.setStyle("display","none")}},completeLayout:function(a){this.lastOverflowAdjust=a.state.overflowAdjust},cacheChildItems:function(e){var c=e.context,g=[],a=this.getVisibleItems(),d=a.length,b;e.childItems=g;e.visibleItems=a;for(b=0;b<d;++b){g.push(c.getCmp(a[b]))}},cacheElements:function(){var a=this.owner;this.applyChildEls(a.el,a.id)},calculateContentSize:function(q,m){var B=this,d=(m||0)|B.manageOverflow|((q.widthModel.shrinkWrap?1:0)|(q.heightModel.shrinkWrap?2:0)),c=(d&1)||undefined,j=(d&2)||undefined,b=q.childItems,g=b.length,w=0,u=0,n=0,e=q.props,r,p,o,A,h,l,t,z,y,s,x,a,v,k;if(c){if(isNaN(e.contentWidth)){++n}else{c=undefined}}if(j){if(isNaN(e.contentHeight)){++n}else{j=undefined}}if(n){for(x=0;x<g;++x){t=b[x];l=t.target;s=j&&t.getProp("height");v=c&&t.getProp("width");a=t.getMarginInfo();if((c&&isNaN(l.x))||(j&&isNaN(l.y))){k=l.el.getXY();if(!r){r=q.targetContext.el.getXY();h=q.targetContext.getBorderInfo();p=r[0]+h.left;o=r[1]+h.top}z=k[0]-p;y=k[1]-o}else{z=l.x;y=l.y}s+=a.bottom;v+=a.right;w=Math.max(w,y+s);u=Math.max(u,z+v);if(isNaN(w)&&isNaN(u)){B.done=false;return}}if(c||j){A=q.targetContext.getPaddingInfo()}if(c&&!q.setContentWidth(u+A.right)){B.done=false}if(j&&!q.setContentHeight(w+A.bottom)){B.done=false}}},calculateOverflow:function(n,s,h){var w=this,a=w.owner,l=w.manageOverflow,d=n.state,m=d.overflowAdjust,g,k,c,o,b,q,t,j,r,e,p,u,i,v;if(l&&!d.secondPass&&!w.reserveScrollbar){if(a.autoScroll){i=v=true}else{if(a.overflowX){i=a.overflowX=="auto"}else{q=n.targetContext.getStyle("overflow-x");i=q&&q!="hidden"&&q!="scroll"}if(a.overflowY){v=a.overflowY=="auto"}else{q=n.targetContext.getStyle("overflow-y");v=q&&q!="hidden"&&q!="scroll"}}if(!s.gotWidth){i=false}if(!s.gotHeight){v=false}if(i||v){t=Ext.getScrollbarSize();j=n.peek("contentWidth");r=n.peek("contentHeight");e=s.width;p=s.height;u=w.getScrollbarsNeeded(e,p,j,r);d.overflowState=u;if(typeof h=="number"){u&=~h}m={width:(i&&(u&2))?t.width:0,height:(v&&(u&1))?t.height:0};if(m.width!==w.lastOverflowAdjust.width||m.height!==w.lastOverflowAdjust.height){w.done=false;n.invalidate({state:{overflowAdjust:m,overflowState:d.overflowState,secondPass:true}})}}}if(!w.done){return}c=n.padElContext||(n.padElContext=n.getEl("overflowPadderEl",w));if(c){u=d.overflowState;g=s.width;k=0;if(u){o=n.targetContext.getPaddingInfo();b=w.scrollRangeFlags;if((u&2)&&(b&1)){k+=o.bottom}if((u&1)&&(b&4)){g+=o.right}c.setProp("display","");c.setSize(g,k)}else{c.setProp("display","none")}}},configureItem:function(c){var b=this,a=b.owner.itemCls,d=[].concat(b.itemCls||[]);b.callParent(arguments);if(a){d=Ext.Array.push(d,a)}c.addCls(d)},doRenderBody:function(a,b){this.renderItems(a,b);this.renderContent(a,b)},doRenderContainer:function(b,e){var c=e.$comp.layout,a=c.getRenderTpl(),d=c.getRenderData();a.applyOut(d,b)},doRenderItems:function(b,d){var c=d.$layout,a=c.getRenderTree();if(a){Ext.DomHelper.generateMarkup(a,b)}},doRenderPadder:function(b,d){var c=d.$layout,a=c.owner,e=c.getScrollRangeFlags();if(c.manageOverflow==2){if(e&5){b.push('<div id="',a.id,'-overflowPadderEl" ','style="font-size: 1px; width:1px; height: 1px;');b.push('"></div>');c.scrollRangeFlags=e}}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();if(b.targetCls){b.getTarget().addCls(b.targetCls)}b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(c,h){var d=c.targetContext,g=d.getFrameInfo(),k=d.getPaddingInfo(),j=0,l=0,a=c.state.overflowAdjust,e,i,b,m;if(!c.widthModel.shrinkWrap){++l;b=h?d.getDomProp("width"):d.getProp("width");e=(typeof b=="number");if(e){++j;b-=g.width+k.width;if(a){b-=a.width}}}if(!c.heightModel.shrinkWrap){++l;m=h?d.getDomProp("height"):d.getProp("height");i=(typeof m=="number");if(i){++j;m-=g.height+k.height;if(a){m-=a.height}}}return{width:b,height:m,needed:l,got:j,gotAll:j==l,gotWidth:e,gotHeight:i}},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var a=this,b=Ext.XTemplate.getTpl(this,"renderTpl");if(!b.renderContent){a.owner.setupRenderTpl(b)}return b},getRenderTree:function(){var a,c=this.owner.items,d,b={};do{d=c.generation;a=this.getItemsRenderTree(this.getLayoutItems(),b)}while(c.generation!==d);return a},getScrollbarsNeeded:function(c,i,b,h){var a=Ext.getScrollbarSize(),e=typeof c=="number",j=typeof i=="number",g=0,d=0;if(!a.width){return 0}if(j&&i<h){d=2;c-=a.width}if(e&&c<b){g=1;if(!d&&j){i-=a.height;if(i<h){d=2}}}return d+g},getScrollRangeFlags:(function(){var a=-1;return function(){if(a<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),d=g.dom.scrollHeight,c=g.dom.scrollWidth,e={175:0,165:1,170:2,160:3},b={175:0,165:4,170:8,160:12};a=(e[d]||0)|(b[c]||0);g.remove()}return a}}()),getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var g=this.getRenderTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a},setupRenderTpl:function(b){var a=this;b.renderBody=a.doRenderBody;b.renderContainer=a.doRenderContainer;b.renderItems=a.doRenderItems;b.renderPadder=a.doRenderPadder}});Ext.define("Ext.layout.container.Editor",{alias:"layout.editor",extend:"Ext.layout.container.Container",autoSizeDefault:{width:"field",height:"field"},getItemSizePolicy:function(c){var b=this,a=b.owner.autoSize;return b.sizePolicy||(b.sizePolicy={setsWidth:a&&a.width==="boundEl"?1:0,setsHeight:a&&a.height==="boundEl"?1:0})},calculate:function(g){var e=this,b=e.owner,a=b.autoSize,d,c;if(a===true){a=e.autoSizeDefault}if(a){d=e.getDimension(b,a.width,"getWidth",b.width);c=e.getDimension(b,a.height,"getHeight",b.height)}g.childItems[0].setSize(d,c);g.setWidth(d);g.setHeight(c);g.setContentSize(d||b.field.getWidth(),c||b.field.getHeight())},getDimension:function(a,b,d,c){switch(b){case"boundEl":return a.boundEl[d]();case"field":return undefined;default:return c}}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",isComponentLayout:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(c,p){var k=this,b=k.owner,e=c.ownerCtContext,g=c.heightModel,h=c.widthModel,i=b.el.dom===document.body,d=b.lastBox||k.nullBox,n=b.el.lastBox||k.nullBox,a=!i,m,o,l,j;k.callParent(arguments);if(p){if(k.usesContentWidth){++c.consumersContentWidth}if(k.usesContentHeight){++c.consumersContentHeight}if(k.usesWidth){++c.consumersWidth}if(k.usesHeight){++c.consumersHeight}if(e&&!e.hasRawContent){m=b.ownerLayout;if(m.usesWidth){++c.consumersWidth}if(m.usesHeight){++c.consumersHeight}}}if(h.configured){l=h.names.width;if(!i){a=p?b[l]!==n.width:h.constrained}c.setWidth(b[l],a)}else{if(c.isTopLevel){if(h.calculated){o=d.width;c.setWidth(o,o!=n.width)}o=d.x;c.setProp("x",o,o!=n.x)}}if(g.configured){j=g.names.height;if(!i){a=p?b[j]!==n.height:g.constrained}c.setHeight(b[j],a)}else{if(c.isTopLevel){if(g.calculated){o=d.height;c.setHeight(o,o!=n.height)}o=d.y;c.setProp("y",o,o!=n.y)}}},finishedLayout:function(b){var h=this,l=b.children,a=h.owner,e,c,k,d,g,j;if(l){e=l.length;for(c=0;c<e;c++){k=l[c];k.el.lastBox=k.props}}b.previousSize=h.lastComponentSize;h.lastComponentSize=a.el.lastBox=g=b.props;a.lastBox=d={};j=g.x;if(j!==undefined){d.x=j}j=g.y;if(j!==undefined){d.y=j}j=g.width;if(j!==undefined){d.width=j}j=g.height;if(j!==undefined){d.height=j}h.callParent(arguments)},notifyOwner:function(d){var c=this,a=c.lastComponentSize,e=d.previousSize,b=[a.width,a.height];if(e){b.push(e.width,e.height)}c.owner.afterComponentLayout.apply(c.owner,b)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(b){var a=this,d=a.targetInfo,c;if(!d){c=b.getEl("getTarget",a);a.targetInfo=d={padding:c.getPaddingInfo(),border:c.getBorderInfo()}}return d},measureAutoDimensions:function(m,i){var t=this,a=t.owner,q=a.layout,d=m.heightModel,h=m.widthModel,c=m.boxParent,n=m.isBoxParent,b=m.props,j,u={gotWidth:false,gotHeight:false,isContainer:(j=!m.hasRawContent)},s=i||3,p,e,k=0,g=0,l,o,r;if(h.shrinkWrap&&m.consumersContentWidth){++k;p=!(s&1);if(j){if(p){u.contentWidth=0;u.gotWidth=true;++g}else{if((u.contentWidth=m.getProp("contentWidth"))!==undefined){u.gotWidth=true;++g}}}else{o=b.contentWidth;if(typeof o=="number"){u.contentWidth=o;u.gotWidth=true;++g}else{if(p){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}if(l){if(p){r=0}else{if(q&&q.measureContentWidth){r=q.measureContentWidth(m)}else{r=t.measureContentWidth(m)}}if(!isNaN(u.contentWidth=r)){m.setContentWidth(r,true);u.gotWidth=true;++g}}}}}else{if(h.natural&&m.consumersWidth){++k;o=b.width;if(typeof o=="number"){u.width=o;u.gotWidth=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(u.width=t.measureOwnerWidth(m))){m.setWidth(u.width,false);u.gotWidth=true;++g}}}}}if(d.shrinkWrap&&m.consumersContentHeight){++k;e=!(s&2);if(j){if(e){u.contentHeight=0;u.gotHeight=true;++g}else{if((u.contentHeight=m.getProp("contentHeight"))!==undefined){u.gotHeight=true;++g}}}else{o=b.contentHeight;if(typeof o=="number"){u.contentHeight=o;u.gotHeight=true;++g}else{if(e){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(a.noWrap){l=true}else{if(!h.shrinkWrap){l=(m.bodyContext||m).hasDomProp("width")}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}}}if(l){if(e){r=0}else{if(q&&q.measureContentHeight){r=q.measureContentHeight(m)}else{r=t.measureContentHeight(m)}}if(!isNaN(u.contentHeight=r)){m.setContentHeight(r,true);u.gotHeight=true;++g}}}}}else{if(d.natural&&m.consumersHeight){++k;o=b.height;if(typeof o=="number"){u.height=o;u.gotHeight=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(u.height=t.measureOwnerHeight(m))){m.setHeight(u.height,false);u.gotHeight=true;++g}}}}}if(c){m.onBoxMeasured()}u.gotAll=g==k;return u},measureContentWidth:function(a){return a.el.getWidth()-a.getFrameInfo().width},measureContentHeight:function(a){return a.el.getHeight()-a.getFrameInfo().height},measureOwnerHeight:function(a){return a.el.getHeight()},measureOwnerWidth:function(a){return a.el.getWidth()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,beginLayoutCycle:function(d,b){var c=this,g=c.lastWidthModel,e=c.lastHeightModel,a=c.owner;c.callParent(arguments);if(g&&g.fixed&&d.widthModel.shrinkWrap){a.el.setWidth(null)}if(e&&e.fixed&&d.heightModel.shrinkWrap){a.el.setHeight(null)}},calculate:function(h){var g=this,e=g.measureAutoDimensions(h),b=h.heightModel,c=h.widthModel,d,a;if(e.gotWidth){if(c.shrinkWrap){g.publishOwnerWidth(h,e.contentWidth)}else{if(g.publishInnerWidth){g.publishInnerWidth(h,e.width)}}}else{if(!c.auto&&g.publishInnerWidth){d=g.waitForOuterWidthInDom?h.getDomProp("width"):h.getProp("width");if(d===undefined){g.done=false}else{g.publishInnerWidth(h,d)}}}if(e.gotHeight){if(b.shrinkWrap){g.publishOwnerHeight(h,e.contentHeight)}else{if(g.publishInnerHeight){g.publishInnerHeight(h,e.height)}}}else{if(!b.auto&&g.publishInnerHeight){a=g.waitForOuterHeightInDom?h.getDomProp("height"):h.getProp("height");if(a===undefined){g.done=false}else{g.publishInnerHeight(h,a)}}}if(!e.gotAll){g.done=false}},calculateOwnerHeightFromContentHeight:function(b,a){return a+b.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getFrameInfo().width},publishOwnerHeight:function(i,g){var e=this,b=e.owner,a=e.calculateOwnerHeightFromContentHeight(i,g),h,d,c;if(isNaN(a)){e.done=false}else{h=Ext.Number.constrain(a,b.minHeight,b.maxHeight);if(h==a){d=e.setHeightInDom}else{c=e.sizeModels[(h<a)?"constrainedMax":"constrainedMin"];a=h;if(i.heightModel.calculatedFromShrinkWrap){i.heightModel=c}else{i.invalidate({heightModel:c})}}i.setHeight(a,d)}},publishOwnerWidth:function(h,b){var g=this,a=g.owner,e=g.calculateOwnerWidthFromContentWidth(h,b),i,d,c;if(isNaN(e)){g.done=false}else{i=Ext.Number.constrain(e,a.minWidth,a.maxWidth);if(i==e){d=g.setWidthInDom}else{c=g.sizeModels[(i<e)?"constrainedMax":"constrainedMin"];e=i;if(h.widthModel.calculatedFromShrinkWrap){h.widthModel=c}else{h.invalidate({widthModel:c})}}h.setWidth(e,d)}}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",childEls:["clearEl"],renderTpl:["{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear" role="presentation"></div>'],calculate:function(b){var a=this,c;if(!b.hasDomProp("containerChildrenDone")){a.done=false}else{c=a.getContainerSize(b);if(!c.gotAll){a.done=false}a.calculateContentSize(b)}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.generation++;d.length++;d.items.push(g);d.keys.push(c);if(d.hasListeners.add){d.fireEvent("add",d.length-1,g,c)}return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;if(d.hasListeners.replace){d.fireEvent("replace",c,a,e)}return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in g){if(g.hasOwnProperty(c)){if(e.allowFunctions||typeof g[c]!="function"){e.add(c,g[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,g=e;if(arguments.length==2){g=c;c=d.getKey(g)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,g)}d.generation++;d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);if(d.hasListeners.add){d.fireEvent("add",a,g,c)}return g},remove:function(a){this.generation++;return this.removeAt(this.indexOf(a))},removeAll:function(b){b=[].concat(b);var c,a=b.length;for(c=0;c<a;c++){this.remove(b[c])}return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);if(c.hasListeners.remove){c.fireEvent("remove",d,b)}c.generation++;return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return typeof this.map[this.getKey(a)]!="undefined"},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.generation++;if(a.hasListeners.clear){a.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(g<=a){for(d=g;d<=a;d++){b[b.length]=c[d]}}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,o=b.length,j,m,l,k;for(j=0;j<o;j++){m=b[j];l=m.filterFn;k=m.scope;n=n&&l.call(k,h)}return n};return this.filterBy(e)},filterBy:function(e,d){var j=this,a=new this.self(),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,g=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){g.add(d[c],b[c])}g.getKey=e.getKey;return g}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(h,g){return a*b.call(c,h,g)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b?b.toUpperCase():b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=new Ext.util.AbstractMixedCollection(false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(h,g,c,e){var d=this,i,b,a;if(Ext.isArray(h)){e=c;c=g;a=h}else{if(Ext.isObject(h)){e=c;c=g;a=[h]}else{if(Ext.isString(h)){i=d.sorters.get(h);if(!i){i={property:h,direction:g};a=[i]}else{if(g===undefined){i.toggle()}else{i.setDirection(g)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){h=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(h)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);h=d.sorters.items;if(h.length){d.doSort(d.generateComparator())}}return h},generateComparator:function(){var a=this.sorters.getRange();return a.length?this.createComparator(a):this.emptyComparator},createComparator:function(a){return function(d,c){var b=a[0].sort(d,c),g=a.length,e=1;for(;e<g;e++){b=b||a[e].sort.call(this,d,c)}return b}},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}g[c]=new Ext.util.Sorter(b)}}return g},getSorters:function(){return this.sorters.items},getFirstSorter:function(){var c=this.sorters.items,a=c.length,b=0,d;for(;b<a;++b){d=c[b];if(!d.isGrouper){return d}}return null}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(l,a,k){var j=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=j.keys,g=j.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:m[d],value:g[d],index:d}}Ext.Array.sort(h,function(i,c){var n=k(i[l],c[l])*b;if(n===0){n=(i.index<c.index?-1:1)}return n});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;m[d]=h[d].key}j.fireEvent("sort",j)},sortBy:function(c){var h=this,b=h.items,g=h.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:g[d],value:b[d],index:d}}Ext.Array.sort(a,function(j,i){var k=c(j.value,i.value);if(k===0){k=(j.index<i.index?-1:1)}return k});for(d=0;d<e;d++){b[d]=a[d].value;g[d]=a[d].key}h.fireEvent("sort",h,b,g)},findInsertionIndex:function(e,d){var g=this,b=g.items,i=0,a=b.length-1,c,h;if(!d){d=g.generateComparator()}while(i<=a){c=(i+a)>>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(b.rendered?a.getEl().getStyle("zIndex"):undefined,b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(b){this.zseed=b;var a=this.assignZIndices();this._activateLast();return a},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,g=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){g=d.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(b,a){var c=this.front;if(b!==c){if(c&&!c.destroying){c.setActive(false,b)}this.front=b;if(b&&b!=a){b.setActive(true);if(b.modal){this._showModalMask(b)}}}},onComponentHide:function(a){a.setActive(false);this._activateLast()},_activateLast:function(){var e=this,a=e.zIndexStack,d=a.length-1,c=e.front,b;e.front=undefined;for(;d>=0&&a[d].hidden;--d){}if((b=a[d])){e._setActiveChild(b,c);if(b.modal){return}}for(;d>=0;--d){b=a[d];if(b.isVisible()&&b.modal){e._showModalMask(b);return}}e._hideModalMask()},_showModalMask:function(a){var c=this,e=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():a.container,d=b.getBox();if(b.dom===document.body){d.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());d.width=Math.max(document.body.scrollWidth,d.width)}if(!c.mask){c.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});c.mask.setVisibilityMode(Ext.Element.DISPLAY);c.mask.on("click",c._onMaskClick,c)}c.mask.maskTarget=b;b.addCls(Ext.baseCSSPrefix+"body-masked");c.mask.setStyle("zIndex",e);c.mask.show();c.mask.setBox(d)},_hideModalMask:function(){var a=this.mask;if(a&&a.isVisible()){a.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");a.maskTarget=undefined;a.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var a=this.mask,b,c;if(a&&a.isVisible()){a.hide();b=a.maskTarget;if(b.dom===document.body){c={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{c=b.getViewSize(true)}a.setSize(c);a.show()}},register:function(a){var b=this;if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=b;b.list[a.id]=a;b.zIndexStack.push(a);a.on("hide",b.onComponentHide,b)},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];a.un("hide",b.onComponentHide);Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return a.isComponent?a:this.list[a]},bringToFront:function(b){var c=this,a=false,d=c.zIndexStack;b=c.get(b);if(b!==c.front){Ext.Array.remove(d,b);if(b.preventBringToFront){d.unshift(b)}else{d.push(b)}c.assignZIndices();a=true;this.front=b}if(a&&b.modal){c._showModalMask(b)}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var g=this,c=g.mask,e=0,b=g.zIndexStack,a=b.length,d;g.tempHidden=g.tempHidden||[];for(;e<a;e++){d=b[e];if(d.isVisible()){g.tempHidden.push(d);d.el.hide()}}if(c){c.hide()}},show:function(){var e=this,b=e.mask,d=0,g=e.tempHidden,a=g?g.length:0,c;for(;d<a;d++){c=g[d];c.el.show();c.setPosition(c.x,c.y)}e.tempHidden.length=0;if(b){b.show();b.alignTo(b.maskTarget,"tl-tl")}},getActive:function(){return this.front},getBy:function(g,e){var h=[],d=0,b=this.zIndexStack,a=b.length,c;for(;d<a;d++){c=b[d];if(g.call(e||c,c)!==false){h.push(c)}}return h},each:function(c,b){var d=this.list,e,a;for(e in d){if(d.hasOwnProperty(e)){a=d[e];if(a.isComponent&&c.call(b||a,a)===false){return}}}},eachBottomUp:function(g,e){var b=this.zIndexStack,d=0,a=b.length,c;for(;d<a;d++){c=b[d];if(c.isComponent&&g.call(e||c,c)===false){return}}},eachTopDown:function(e,d){var a=this.zIndexStack,c=a.length,b;for(;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var b=this,c=b.list,a,d;for(d in c){if(c.hasOwnProperty(d)){a=c[d];if(a.isComponent){a.destroy()}}}delete b.zIndexStack;delete b.list;delete b.container;delete b.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],defaultLayoutType:"auto",initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout();b.callParent();if(!a.initialized){a.initLayout()}},setupRenderTpl:function(b){var a=this.getLayout();this.callParent(arguments);a.setupRenderTpl(b)},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||"autocontainer"))}return a.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(b){var a=this;++a.layoutCounter;if(a.hasListeners.afterlayout){a.fireEvent("afterlayout",a,b)}},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var g=this,c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(e==null){Ext.Array.erase(b,c,1);--c;--a}else{if(d){e=this.applyDefaults(e)}e.isContained=g;b[c]=g.lookupComponent(e);delete e.isContained}}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return(typeof a=="string")?Ext.ComponentManager.get(a):Ext.ComponentManager.create(a,this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var j=this,g=Ext.Array.slice(arguments),d=(typeof g[0]=="number")?g.shift():-1,c=j.getLayout(),l,h,b,a,m,k,e;if(g.length==1&&Ext.isArray(g[0])){h=g[0];l=true}else{h=g}e=h=j.prepareItems(h,true);a=h.length;if(j.rendered){Ext.suspendLayouts()}if(!l&&a==1){e=h[0]}for(b=0;b<a;b++){m=h[b];k=(d<0)?j.items.length:(d+b);if(m.floating){j.floatingItems=j.floatingItems||new Ext.util.MixedCollection();j.floatingItems.add(m);m.onAdded(j,k)}else{if((!j.hasListeners.beforeadd||j.fireEvent("beforeadd",j,m,k)!==false)&&j.onBeforeAdd(m)!==false){j.items.insert(k,m);m.onAdded(j,k);j.onAdd(m,k);c.onAdd(m,k);if(j.hasListeners.add){j.fireEvent("add",j,m,k)}}}}j.updateLayout();if(j.rendered){Ext.resumeLayouts(true)}return e},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(c){var b=this,a=c.border;if(c.ownerCt&&c.ownerCt!==b){c.ownerCt.remove(c,false)}if(b.border===false||b.border===0){c.border=Ext.isDefined(a)&&a!==false&&a!==0}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&(!d.hasListeners.beforeremove||d.fireEvent("beforeremove",d,e)!==false)){d.doRemove(e,b);if(d.hasListeners.remove){d.fireEvent("remove",d,e)}if(!d.destroying){d.doLayout()}}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered,g=b===true||(b!==false&&e.autoDestroy);b=b===true||(b!==false&&e.autoDestroy);e.items.remove(c);if(a){if(d.running){Ext.AbstractComponent.cancelLayout(c,g)}d.onRemove(c,g)}c.onRemoved(g);e.onRemove(c,g);if(g){c.destroy()}else{if(a){d.afterRemove(c)}if(e.detachOnRemove&&c.rendered){Ext.getDetachedBody().appendChild(c.getEl())}}},removeAll:function(c){var h=this,e=h.items.items.slice(),b=[],d=0,a=e.length,g;h.suspendLayouts();for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.resumeLayouts(!!a);return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}if(h.floatingItems){a.push.apply(a,h.floatingItems.items)}return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},isAncestor:function(a){while(a){if(a.ownerCt===this){return true}a=a.ownerCt}},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},queryBy:function(g,e){var c=[],b=this.getRefItems(true),d=0,a=b.length,h;for(;d<a;++d){h=b[d];if(g.call(e||h,h)!==false){c.push(h)}}return c},queryById:function(a){return this.down("#"+a)},child:function(a){a=a||"";return this.query("> "+a)[0]||null},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){return this.query(a)[0]||null},enable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable){b.enable()}}return this},disable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable!==false&&!b.disabled){b.disable();b.resetDisable=true}}return this},getChildItemsToDisable:function(){return this.query("[isFormField],button")},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",fireHierarchyEvent:function(a){this.hierarchyEventSource.fireEvent(a,this)},afterHide:function(){this.callParent(arguments);this.fireHierarchyEvent("hide")},afterShow:function(){this.callParent(arguments);this.fireHierarchyEvent("show")},onAdded:function(){this.callParent(arguments);if(this.hierarchyEventSource.hasListeners.added){this.fireHierarchyEvent("added")}},getChildByElement:function(e,a){var h,c,b=0,d=this.getRefItems(),g=d.length;e=Ext.getDom(e);for(;b<g;b++){h=d[b];c=h.getEl();if(c&&((c.dom===e)||c.contains(e))){return(a&&h.getChildByElement)?h.getChildByElement(e,a):h}}return null}},function(){this.hierarchyEventSource=this.prototype.hierarchyEventSource=new Ext.util.Observable({events:{hide:true,show:true,collapse:true,expand:true,added:true}})});Ext.define("Ext.Editor",{extend:"Ext.container.Container",alias:"widget.editor",requires:["Ext.layout.container.Editor"],layout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onFieldBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onFieldAutosize,a,{delay:1})}a.floating={constrain:a.constrain};a.items=b;a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onFieldAutosize:function(){this.updateLayout()},afterRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur(e)}},10)}d.fireEvent("specialkey",d,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:Ext.String.trim(b.boundEl.dom.innerText||b.boundEl.dom.innerHTML);if(!b.rendered){b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.suspendEvents();d.reset();d.setValue(c);d.resumeEvents();b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.updateLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a,a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,e=c.field,d;if(c.editing){d=c.getValue();e.suspendEvents();c.setValue(b);e.resumeEvents();c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onFieldBlur:function(d,c){var a=this,b;if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}if(c&&Ext.fly(b=c.getTarget()).focusable()){b.focus()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}if(b.hasFocus){b.blur()}if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(a){var b=this;if((arguments.length!==1)||(typeof a==="string")||a.dom||a.tagName||a===document||a.isComponent){b.legacyConstructor.apply(b,arguments);return}Ext.apply(b,a);b.bindings=[];if(!b.target.isComponent){b.target=Ext.get(b.target)}if(b.binding){b.addBinding(b.binding)}else{if(a.key){b.addBinding(a)}}b.enable()},legacyConstructor:function(b,d,a){var c=this;Ext.apply(c,{target:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},addBinding:function(h){var g=h.key,j=false,d,e,b,c,a;if(Ext.isArray(h)){for(c=0,a=h.length;c<a;c++){this.addBinding(h[c])}return}if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;j=true}if(!Ext.isArray(g)){g=[g]}if(!j){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:g},h))},handleTargetEvent:(function(){var a=/input|textarea/i;return function(g){var e=this,j,c,b,h,d;if(this.enabled){j=this.bindings;c=0;b=j.length;g=e.processEvent.apply(e||e.processEventScope,arguments);if(e.ignoreInputFields){h=g.target;d=h.contentEditable;if(a.test(h.tagName)||(d===""||d==="true")){return}}if(!g.getKey){return g}for(;c<b;++c){this.processBinding(j[c],g)}}}}()),processEvent:function(a){return a},processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.target.on(a.eventName,a.handleTargetEvent,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.target.removeListener(a.eventName,a.handleTargetEvent,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(c){var a=this,b=a.target;a.bindings=[];a.disable();if(c===true){if(b.isComponent){b.destroy()}else{b.remove()}}delete a.target}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(a){var b=this;if(arguments.length===2){b.legacyConstructor.apply(b,arguments);return}b.setConfig(a)},legacyConstructor:function(b,a){this.setConfig(Ext.apply({target:b},a))},setConfig:function(b){var e=this,c={target:b.target,ignoreInputFields:b.ignoreInputFields,eventName:e.getKeyEvent("forceKeyDown" in b?b.forceKeyDown:e.forceKeyDown,b.eventName)},g,a,i,d,h;if(e.map){e.map.destroy()}if(b.processEvent){c.processEvent=b.processEvent;c.processEventScope=b.processEventScope||e}g=e.map=new Ext.util.KeyMap(c);a=Ext.util.KeyNav.keyOptions;i=b.scope||e;for(d in a){if(a.hasOwnProperty(d)){if(h=b[d]){if(typeof h==="function"){h={handler:h,defaultAction:(b.defaultEventAction!==undefined)?b.defaultEventAction:e.defaultEventAction}}g.addBinding({key:a[d],handler:Ext.Function.bind(e.handleEvent,h.scope||i,h.handler||h.fn,true),defaultEventAction:(h.defaultEventAction!==undefined)?h.defaultAction:e.defaultEventAction})}}}g.disable();if(!b.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(b,a){if(b||(Ext.EventManager.useKeyDown&&!a)){return"keydown"}else{return a||this.eventName}}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:"Ext.util.Observable"},requires:["Ext.AbstractComponent","Ext.Component","Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(a){var b=this,c=Ext.ComponentQuery;b.mixins.observable.constructor.call(b,a);b.addEvents("beforecomponentfocus","componentfocus","disable","enable");b.focusTask=new Ext.util.DelayedTask(b.handleComponentFocus,b);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(b.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentFocus.apply(b,arguments)}},onBlur:function(){this.callParent(arguments);if(b.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentBlur.apply(b,arguments)}},onDestroy:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentDestroy.apply(b,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentHide.apply(b,arguments)}}});b.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:b,backspace:b.focusLast,enter:b.navigateIn,esc:b.navigateOut,tab:b.navigateSiblings,space:b.navigateIn,del:b.focusLast,left:b.navigateSiblings,right:b.navigateSiblings,down:b.navigateSiblings,up:b.navigateSiblings});b.focusData={};b.subscribers=new Ext.util.HashMap();b.focusChain={};Ext.apply(c.pseudos,{focusable:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(j.isFocusable()){h.push(j)}}return h},nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e,k;for(;;){if((h+=j)>=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(e,d){return this.nextFocus(e,d,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;a.removeDOM();a.keyNav.disable();a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}b.enabled=true;b.initDOM(a);b.keyNav.enable();b.focusEl.focus();delete b.focusedCmp;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(g,e){return g.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d<a;d++){e[d].addFocusListener()}if(!g.focusEl){g.focusEl=Ext.getBody();g.focusEl.dom.tabIndex=-1}if(!g.focusFrame&&c.focusFrame){g.focusFrame=Ext.getBody().createChild({cls:b,children:[{cls:b+"-top"},{cls:b+"-bottom"},{cls:b+"-left"},{cls:b+"-right"}],style:"top: -100px; left: -100px;"});g.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);g.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(g){var c=this,a=c.focusedCmp,b,d;if(c.isWhitelisted(a)){return true}if(!a){b=c.getRootComponents()[0];if(b){if(b.getFocusEl()===c.focusEl){c.focusEl.blur()}b.focus()}}else{d=a.hasFocus?Ext.ComponentQuery.query(">:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{o=o||m.up();if(o){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain,b;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(m,i){var k=this,p,a,d,h,o,b,l,e,g,c,n,j;if(k.fireEvent("beforecomponentfocus",k,m,k.previousFocusedCmp)===false){k.clearComponent(m);return}k.focusedCmp=m;if(k.shouldShowFocusFrame(m)){p="."+k.focusFrameCls+"-";a=k.focusFrame;h=i.getPageBox();o=h.top;b=h.left;l=h.width;e=h.height;g=a.child(p+"top");c=a.child(p+"bottom");n=a.child(p+"left");j=a.child(p+"right");g.setWidth(l).setLeftTop(b,o);c.setWidth(l).setLeftTop(b,o+e-2);n.setHeight(e-2).setLeftTop(b,o+2);j.setHeight(e-2).setLeftTop(b+l-2,o+2);a.show()}k.fireEvent("componentfocus",k,m,k.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{},e=c.getFocusEl(),d=Ext.getDom(e).tagName;if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var c=this,b=c.callParent(),a;if(c.autoEl=="img"){a=b}else{b.cn=[a={tag:"img",id:c.id+"-img"}]}if(c.imgCls){a.cls=(a.cls?a.cls+" ":"")+c.imgCls}a.src=c.src||Ext.BLANK_IMAGE_URL;if(c.alt){a.alt=c.alt}return b},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;b.imgEl=(b.autoEl=="img")?a:a.getById(b.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(c){var a=this,b=a.imgEl;a.src=c;if(b){b.dom.src=c||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}Ext.Element.addToCache(c);if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=new Ext.Shadow({offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a,d,c,o,m,g,k;if(!j.updating&&j.isVisible()&&(n||j.useShim)){d=j.getShim();c=j.getLocalX();o=j.getLocalY();m=j.dom.offsetWidth;g=j.dom.offsetHeight;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,o,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,o)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,o)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},onOpacitySet:function(a){var b=this.shadow;if(b){b.setOpacity(a)}}});Ext.define("Ext.util.Bindable",{bindStore:function(a,b){var c=this,d=c.store;if(!b&&c.store){c.onUnbindStore(d,b);if(a!==d&&d.autoDestroy){d.destroyStore()}else{c.unbindStoreListeners(d)}}if(a){a=Ext.data.StoreManager.lookup(a);c.bindStoreListeners(a);c.onBindStore(a,b)}c.store=a||null;return c},getStore:function(){return this.store},unbindStoreListeners:function(a){var b=this.storeListeners;if(b){a.un(b)}},bindStoreListeners:function(a){var c=this,b=Ext.apply({},c.getStoreListeners());if(!b.scope){b.scope=c}c.storeListeners=b;a.on(b)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating",bindable:"Ext.util.Bindable"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl"],renderTpl:'<div id="{id}-msgEl" style="position:relative" class="{[values.$comp.msgCls]}"></div>',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(a,b){var c=this;if(!a.isComponent){a=Ext.get(a);this.isElement=true}c.ownerCt=a;if(!this.isElement){c.bindComponent(a)}c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved},d=Ext.container.Container.hierarchyEventSource;if(a.floating){b.move=c.sizeMask;c.activeOwner=a}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}else{c.preventBringToFront=true}}c.mon(a,b);c.mon(d,{show:c.onContainerShow,hide:c.onContainerHide,expand:c.onContainerExpand,collapse:c.onContainerCollapse,scope:c})},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.sizeMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.sizeMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},onContainerExpand:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerCollapse:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(a){return this.isDescendantOf(a)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(!a.isVisible(true)){b.showNext=true}else{if(b.loading&&a.rendered){b.show()}}},getMaskEl:function(){var a=this;return a.maskEl||(a.maskEl=a.el.insertSibling({cls:a.maskCls,style:{zIndex:a.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(b){var c=this,a=c.activeOwner;if(a){b=parseInt(a.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",b-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;if(a.isElement){a.ownerCt.unmask()}Ext.destroy(a.maskEl);a.callParent()}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",isAssociation:true,initialConfig:null,statics:{AUTO_ID:1000,create:function(a){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}return a}},constructor:function(a){Ext.apply(this,a);var d=this,b=Ext.ModelManager.types,c=a.ownerModel,g=a.associatedModel,e=b[c],h=b[g];d.initialConfig=a;d.ownerModel=e;d.associatedModel=h;Ext.applyIf(d,{ownerName:c,associatedName:g});d.associationId="association"+(++d.statics().AUTO_ID)},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.association.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(b,a,d){var c=typeof a=="function"?a:this.types[a||b.name];return new c(b,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,g){var e=[],b=this.types,a,d;for(a in b){if(!b.hasOwnProperty(a)){continue}d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Auto",type:"progressbar",beginLayout:function(d){var b=this,a,c;b.callParent(arguments);if(!d.textEls){c=b.owner.textEl;if(c.isComposite){d.textEls=[];c=c.elements;for(a=c.length;a--;){d.textEls[a]=d.getEl(Ext.get(c[a]))}}else{d.textEls=[d.getEl("textEl")]}}},calculate:function(e){var c=this,a,d,b;c.callParent(arguments);if(Ext.isNumber(b=e.getProp("width"))){b-=e.getBorderInfo().width;d=e.textEls;for(a=d.length;a--;){d[a].setWidth(b)}}else{c.done=false}}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:"Ext.dom.CompositeElementLite",getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.select=Ext.Element.select;Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",animate:false,text:"",waitTimer:null,childEls:["bar"],renderTpl:['<tpl if="internalText">','<div class="{baseCls}-text {baseCls}-text-back">{text}</div>',"</tpl>",'<div id="{id}-bar" class="{baseCls}-bar" style="width:{percentage}%">','<tpl if="internalText">','<div class="{baseCls}-text">',"<div>{text}</div>","</div>","</tpl>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||"&#160;",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},getText:function(){return this.text},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('<div class="{0}{1}-shadow" role="presentation"></div>',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){var c=[].concat(this.shadows),b,a=c.length;for(b=0;b<a;b++){c[b].remove()}this.shadows=[]}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d,e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d={t:e,l:e,h:-e,w:-e}}else{d={t:-a,l:-a,h:-a,w:-a}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d={t:e,l:0,h:-e,w:0}}else{d={t:-(1+a),l:1+a-2*e,h:-1,w:a-1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d={t:0,l:0,h:0,w:0}}else{d={t:1+a-2*e,l:1+a-2*e,h:e-a-1,w:e-a-1}}break}c.adjusts=d},getShadowSize:function(){var b=this,d=b.el?b.offset:0,a=[d,d,d,d],c=b.mode.toLowerCase();if(b.el&&c!=="frame"){a[0]=0;if(c=="drop"){a[3]=0}}return a},offset:4,defaultMode:"drop",boxShadowProperty:(function(){var b="boxShadow",a=document.documentElement.style;if(!("boxShadow" in a)){if("WebkitBoxShadow" in a){b="WebkitBoxShadow"}else{if("MozBoxShadow" in a){b="MozBoxShadow"}}}return b}()),show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLocalX(),c.getLocalY(),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,n,k,g){if(!this.el){return}var a=this.adjusts,i=this.el.dom,j=i.style,c,e,h,m;j.left=(b+a.l)+"px";j.top=(n+a.t)+"px";c=Math.max(k+a.w,0);e=Math.max(g+a.h,0);h=c+"px";m=e+"px";if(j.width!=h||j.height!=m){j.width=h;j.height=m;if(Ext.supports.CSS3BoxShadow){j[this.boxShadowProperty]="0 0 "+this.offset+"px #888"}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(j,c,i){var h=Ext.getClassName(j),d=h.match(/^(.*)\.controller\./),b,g,k,a,e;if(d!==null){b=Ext.Loader.getPrefix(h)||d[1];g=i.onBeforeCreated;k=[];a=["model","view","store"];i.onBeforeCreated=function(t,n){var o,q,l,r,m,p,s;for(o=0,q=a.length;o<q;o++){l=a[o];e=b+"."+l+".";r=Ext.Array.from(n[l+"s"]);for(m=0,p=r.length;m<p;m++){s=r[m];if(s.indexOf(".")!==-1&&(Ext.ClassManager.isCreated(s)||Ext.Loader.isAClassNameWithAKnownPrefix(s))){k.push(s)}else{k.push(e+s)}}}Ext.require(k,Ext.Function.pass(g,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:Ext.emptyFn,onLaunch:Ext.emptyFn,createGetters:function(g,j){g=Ext.String.capitalize(g);var e=0,a=(j)?j.length:0,h,b,c,k,d;for(;e<a;e++){h="get";b=j[e];c=b.split(".");d=c.length;for(k=0;k<d;k++){h+=Ext.String.capitalize(c[k])}h+=g;if(!this[h]){this[h]=Ext.Function.pass(this["get"+g],[b],this)}this[h](b)}},ref:function(a){a=Ext.Array.from(a);var g=this,b=0,e=a.length,h,d,c;g.references=g.references||[];for(;b<e;b++){h=a[b];d=h.ref;c="get"+Ext.String.capitalize(d);if(!g[c]){g[c]=Ext.Function.pass(g.getRef,[d,h],g)}g.references.push(d.toLowerCase())}},addRef:function(a){return this.ref([a])},getRef:function(d,e,a){this.refCache=this.refCache||{};e=e||{};a=a||{};Ext.apply(e,a);if(e.forceCreate){return Ext.ComponentManager.create(e,"component")}var c=this,b=c.refCache[d];if(!b){c.refCache[d]=b=Ext.ComponentQuery.query(e.selector)[0];if(!b&&e.autoCreate){c.refCache[d]=b=Ext.ComponentManager.create(e,"component")}if(b){b.on("beforedestroy",function(){c.refCache[d]=null})}}return b},hasRef:function(a){return this.references&&this.references.indexOf(a.toLowerCase())!==-1},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,constructor:function(b){var d=this,c=Ext.data.Types,a;if(Ext.isString(b)){b={name:b}}Ext.apply(d,b);a=d.sortType;if(d.type){if(Ext.isString(d.type)){d.type=c[d.type.toUpperCase()]||c.AUTO}}else{d.type=c.AUTO}if(Ext.isString(a)){d.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){d.sortType=d.type.sortType}}if(!b.hasOwnProperty("convert")){d.convert=d.type.convert}else{if(!d.convert&&d.type.convert&&!b.hasOwnProperty("defaultValue")){d.defaultValue=d.type.convert(d.defaultValue)}}if(b.convert){d.hasCustomConvert=true}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(k){var h=this,j,g,a,c,b,d,e;if(!h.actionSkipSyncRe.test(h.action)){a=h.records;if(a&&a.length){if(a.length>1){if(h.action=="update"||a[0].clientIdProperty){j=new Ext.util.MixedCollection();j.addAll(k);for(g=a.length;g--;){b=a[g];c=j.findBy(h.matchClientRec,b);b.copyFrom(c)}}else{for(d=0,e=a.length;d<e;++d){b=a[d];c=k[d];if(b&&c){h.updateRecord(b,c)}}}}else{this.updateRecord(a[0],k[0])}if(h.actionCommitRecordsRe.test(h.action)){for(g=a.length;g--;){a[g].commit()}}}}},updateRecord:function(a,b){if(b&&(a.phantom||a.getId()===b.getId())){a.copyFrom(b)}},matchClientRec:function(c){var a=this,b=a.getId();if(b&&c.getId()===b){return true}return c.internalId===a.internalId},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return this.records||(a?a.records:null)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(arguments.length===1){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],compareConvertFields:function(a,d){var c=a.convert&&a.type&&a.convert!==a.type.convert,b=d.convert&&d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,D){var C=this,E=Ext.getClassName(g),r=g.prototype,x=g.prototype.superclass,j=D.validations||[],t=D.fields||[],h,m=D.associations||[],e=function(G,I){var H=0,F,J;if(G){G=Ext.Array.from(G);for(F=G.length;H<F;++H){J=G[H];if(!Ext.isObject(J)){J={model:J}}J.type=I;m.push(J)}}},u=D.idgen,A=new Ext.util.MixedCollection(false,r.itemNameFn),y=new Ext.util.MixedCollection(false,r.itemNameFn),q=x.validations,B=x.fields,l=x.associations,z,w,o,p=[],n=D.idProperty||g.prototype.idProperty,v=function(G,F,i){var H,I;if(A.events.add.firing){I=G;H=F}else{H=i;I=F.originalIndex}H.originalIndex=I;if(H.mapping===n||(H.mapping==null&&H.name===n)){H.defaultValue=undefined}},s=D.proxy||g.prototype.proxy||g.prototype.defaultProxyType,k=function(){A.sortBy(r.compareConvertFields)};g.modelName=E;r.modelName=E;if(q){j=q.concat(j)}D.validations=j;if(B){t=B.items.concat(t)}A.on({add:v,replace:v});for(w=0,o=t.length;w<o;++w){h=t[w];A.add(h.isField?h:new Ext.data.Field(h))}if(!A.get(n)){A.add(new Ext.data.Field(n))}k();A.on({add:k,replace:k});D.fields=A;if(u){D.idgen=Ext.data.IdGenerator.get(u)}e(D.belongsTo,"belongsTo");delete D.belongsTo;e(D.hasMany,"hasMany");delete D.hasMany;e(D.hasOne,"hasOne");delete D.hasOne;if(l){m=l.items.concat(m)}for(w=0,o=m.length;w<o;++w){p.push("association."+m[w].type.toLowerCase())}if(s&&!s.isProxy){p.push("proxy."+(typeof s==="string"?s:s.type))}Ext.require(p,function(){Ext.ModelManager.registerType(E,g);for(w=0,o=m.length;w<o;++w){z=m[w];if(z.isAssociation){z=Ext.applyIf({ownerModel:E,associatedModel:z.model},z.initialConfig)}else{Ext.apply(z,{ownerModel:E,associatedModel:z.model})}if(Ext.ModelManager.getModel(z.model)===undefined){Ext.ModelManager.registerDeferredAssociation(z)}else{y.add(Ext.data.association.Association.create(z))}}D.associations=y;d.call(C,g,D,a);g.setProxy(s);Ext.ModelManager.onModelDefined(g)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},setFields:function(c,d,b){var j=this,h=j.prototype,g=h.fields,a=c?c.length:0,e=0;if(d){h.idProperty=d}if(b){h.clientIdProperty=b}if(g){g.clear()}else{g=j.prototype.fields=new Ext.util.MixedCollection(false,function(i){return i.name})}for(;e<a;e++){g.add(new Ext.data.Field(c[e]))}if(!g.get(h.idProperty)){g.add(new Ext.data.Field(h.idProperty))}j.fields=g;return g},getFields:function(){return this.prototype.fields.items},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=new Ext.data.Operation(c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:null,defaultProxyType:"ajax",constructor:function(j,d,o,b){j=j||{};var l=this,k,e,m,a,n,g,c,h;l.internalId=(d||d===0)?d:Ext.data.Model.id(l);l.raw=o||j;if(!l.data){l.data={}}l.modified={};if(l.persistanceProperty){l.persistenceProperty=l.persistanceProperty}l[l.persistenceProperty]=b||{};l.mixins.observable.constructor.call(l);if(!b){k=l.fields.items;e=k.length;h=0;c=l[l.persistenceProperty];if(Ext.isArray(j)){for(;h<e;h++){m=k[h];a=m.name;n=j[m.originalIndex];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}if(n!==undefined){c[a]=n}}}else{for(;h<e;h++){m=k[h];a=m.name;n=j[a];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}if(n!==undefined){c[a]=n}}}}l.stores=[];if(l.getId()){l.phantom=false}else{if(l.phantom){g=l.idgen.generate();if(g!==null){l.setId(g)}}}l.dirty=false;l.modified={};if(typeof l.init=="function"){l.init()}l.id=l.idgen.getRecId(l)},get:function(a){return this[this.persistenceProperty][a]},_singleProp:{},set:function(r,b){var j=this,h=j[j.persistenceProperty],i=j.fields,q=j.modified,o=(typeof r=="string"),p,k,g,n,e,a,c,d,l,m;if(o){m=j._singleProp;m[r]=b}else{m=r}for(a in m){if(m.hasOwnProperty(a)){l=m[a];if(i&&(k=i.get(a))&&k.convert){l=k.convert(l,j)}p=h[a];if(j.isEqual(p,l)){continue}h[a]=l;(e||(e=[])).push(a);if(k&&k.persist){if(q.hasOwnProperty(a)){if(j.isEqual(q[a],l)){delete q[a];j.dirty=false;for(n in q){if(q.hasOwnProperty(n)){j.dirty=true;break}}}}else{j.dirty=true;q[a]=p}}if(a==j.idProperty){g=true;c=p;d=l}}}if(o){delete m[r]}if(g){j.fireEvent("idchanged",j,c,d)}if(!j.editing&&e){j.afterEdit(e)}return e||null},copyFrom:function(g){if(g){var e=this,c=e.fields.items,k=c.length,h,a=0,d=e[e.persistenceProperty],b=g[g.persistenceProperty],j;for(;a<k;a++){h=c[a];j=b[h.name];if(j!==undefined){d[h.name]=j}}if(e.phantom&&!g.phantom){e.setId(g.getId())}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return Ext.Date.isEqual(d,c)}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a,c){var b=this,d;if(b.editing){b.editing=false;if(!c){c=b.getModifiedFieldNames()}d=b.dirty||c.length>0;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(d&&a!==true){b.afterEdit(c)}}},getModifiedFieldNames:function(){var d=this,c=d.dataSave,e=d[d.persistenceProperty],a=[],b;for(b in e){if(e.hasOwnProperty(b)){if(!d.isEqual(e[b],c[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var c=this,a=c.fields.items,g=a.length,e,b,d;c.dirty=true;for(d=0;d<g;d++){e=a[d];if(e.persist){b=e.name;c.modified[b]=c.get(b)}}},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(b.raw,a,null,Ext.apply({},b[b.persistenceProperty]))},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var k=new Ext.data.Errors(),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(m){m=Ext.apply({},m);var g=this,b=g.phantom?"create":"update",l=m.scope||g,j=g.stores,c=0,e,h,d,a,k;Ext.apply(m,{records:[g],action:b});a=new Ext.data.Operation(m);k=function(i){d=[g,i];if(i.wasSuccessful()){for(e=j.length;c<e;c++){h=j[c];h.fireEvent("write",h,i);h.fireEvent("datachanged",h)}Ext.callback(m.success,l,d)}else{Ext.callback(m.failure,l,d)}Ext.callback(m.callback,l,d)};g.getProxy()[b](a,k,g);return g},destroy:function(l){l=Ext.apply({},l);var e=this,k=l.scope||e,h=e.stores,b=0,d,g,c,a,j;Ext.apply(l,{records:[e],action:"destroy"});a=new Ext.data.Operation(l);j=function(i){c=[e,i];if(i.wasSuccessful()){for(d=h.length;b<d;b++){g=h[b];g.fireEvent("write",g,i);g.fireEvent("datachanged",g)}e.clearListeners();Ext.callback(l.success,k,c)}else{Ext.callback(l.failure,k,c)}Ext.callback(l.callback,k,c)};e.getProxy().destroy(a,j,e);return e},getId:function(){return this.get(this.idProperty)},getObservableId:function(){return this.id},setId:function(a){this.set(this.idProperty,a);this.phantom=!(a||a===0)},join:function(a){Ext.Array.include(this.stores,a);this.store=this.stores[0]},unjoin:function(a){Ext.Array.remove(this.stores,a);this.store=this.stores[0]||null},afterEdit:function(a){this.callStore("afterEdit",a)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(g){var d=Ext.Array.clone(arguments),b=this.stores,e=0,a=b.length,c,h;d[0]=this;for(;e<a;++e){c=b[e];if(c&&typeof c[g]=="function"){c[g].apply(c,d)}h=c.treeStore;if(h&&typeof h[g]=="function"){h[g].apply(h,d)}}},getData:function(c){var d=this,a=d.fields.items,h=a.length,g={},b,e;for(e=0;e<h;e++){b=a[e].name;g[b]=d.get(b)}if(c===true){Ext.apply(g,d.getAssociatedData())}return g},getAssociatedData:function(){return this.prepareAssociatedData({},1)},prepareAssociatedData:function(w,z){var y=this,t=y.associations.items,e=t.length,x={},q=[],v=[],m=[],p,b,a,n,g,l,k,u,h,c,s,r,d,A;for(s=0;s<e;s++){c=t[s];u=c.associationId;k=w[u];if(k&&k!==z){continue}w[u]=z;d=c.type;A=c.name;if(d=="hasMany"){p=y[c.storeName];x[A]=[];if(p&&p.getCount()>0){b=p.data.items;h=b.length;for(r=0;r<h;r++){a=b[r];x[A][r]=a.getData();q.push(a);v.push(A);m.push(r)}}}else{if(d=="belongsTo"||d=="hasOne"){a=y[c.instanceName];if(a!==undefined){x[A]=a.getData();q.push(a);v.push(A);m.push(-1)}}}}for(s=0,h=q.length;s<h;++s){a=q[s];n=x[v[s]];g=m[s];l=a.prepareAssociatedData(w,z+1);if(g===-1){Ext.apply(n,l)}else{Ext.apply(n[g],l)}}return x}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return new Ext.data.ArrayStore({data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=new Ext.data.Store(b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.layout.component.Dock",{extend:"Ext.layout.component.Component",alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",initializedBorders:-1,horizontalCollapsePolicy:{width:true,x:true},verticalCollapsePolicy:{height:true,y:true},finishRender:function(){var b=this,c,a;b.callParent();c=b.getRenderTarget();a=b.getDockedItems();b.finishRenderItems(c,a)},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},dockOpposites:{top:"bottom",right:"left",bottom:"top",left:"right"},handleItemBorders:function(){var m=this,a=m.owner,l,p,e=m.borders,h=m.dockOpposites,b=a.dockedItems.generation,g,k,o,n,j,c,d=m.collapsed;if(m.initializedBorders==b||(a.border&&!a.manageBodyBorders)){return}m.initializedBorders=b;m.collapsed=false;p=m.getLayoutItems();m.collapsed=d;l={top:[],right:[],bottom:[],left:[]};for(g=0,k=p.length;g<k;g++){o=p[g];n=o.dock;if(o.ignoreBorderManagement){continue}if(!l[n].satisfied){l[n].push(o);l[n].satisfied=true}if(!l.top.satisfied&&h[n]!=="top"){l.top.push(o)}if(!l.right.satisfied&&h[n]!=="right"){l.right.push(o)}if(!l.bottom.satisfied&&h[n]!=="bottom"){l.bottom.push(o)}if(!l.left.satisfied&&h[n]!=="left"){l.left.push(o)}}if(e){for(j in e){if(e.hasOwnProperty(j)){k=e[j].length;if(!a.manageBodyBorders){for(g=0;g<k;g++){c=e[j][g];if(!c.isDestroyed){c.removeCls(Ext.baseCSSPrefix+"docked-noborder-"+j)}}if(!e[j].satisfied&&!a.bodyBorder){a.removeBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+j)}}else{if(e[j].satisfied){a.setBodyStyle("border-"+j+"-width","")}}}}}for(j in l){if(l.hasOwnProperty(j)){k=l[j].length;if(!a.manageBodyBorders){for(g=0;g<k;g++){l[j][g].addCls(Ext.baseCSSPrefix+"docked-noborder-"+j)}if((!l[j].satisfied&&!a.bodyBorder)||a.bodyBorder===false){a.addBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+j)}}else{if(l[j].satisfied){a.setBodyStyle("border-"+j+"-width","1px")}}}}m.borders=l},beforeLayoutCycle:function(e){var c=this,b=c.owner,g=c.sizeModels.shrinkWrap,d,a;if(b.collapsed){if(b.collapsedVertical()){a=true;e.measureDimensions=1}else{d=true;e.measureDimensions=2}}e.collapsedVert=a;e.collapsedHorz=d;if(a){e.heightModel=g}else{if(d){e.widthModel=g}}},beginLayout:function(d){var k=this,c=k.owner,n=k.getLayoutItems(),b=d.context,g=n.length,l,j,m,a,e,h;k.callParent(arguments);k.handleItemBorders();h=c.getCollapsed();if(h!==k.lastCollapsedState&&Ext.isDefined(k.lastCollapsedState)){if(k.owner.collapsed){d.isCollapsingOrExpanding=1;c.addClsWithUI(c.collapsedCls)}else{d.isCollapsingOrExpanding=2;c.removeClsWithUI(c.collapsedCls);d.lastCollapsedState=k.lastCollapsedState}}k.lastCollapsedState=h;d.dockedItems=l=[];for(j=0;j<g;j++){m=n[j];if(m.rendered){a=b.getCmp(m);a.dockedAt={x:0,y:0};a.offsets=e=Ext.Element.parseBox(m.offsets||{});e.width=e.left+e.right;e.height=e.top+e.bottom;l.push(a)}}d.bodyContext=d.getEl("body")},beginLayoutCycle:function(b){var e=this,l=b.dockedItems,d=l.length,a=e.owner,g=a.frameBody,k=e.lastHeightModel,c,j,h;e.callParent(arguments);if(k&&k.shrinkWrap&&!b.heightModel.shrinkWrap&&!e.owner.manageHeight){a.body.dom.style.marginBottom=""}if(b.widthModel.auto){if(b.widthModel.shrinkWrap){a.el.setWidth(null)}a.body.setWidth(null);if(g){g.setWidth(null)}}if(b.heightModel.auto){a.body.setHeight(null);if(g){g.setHeight(null)}}if(b.collapsedVert){b.setContentHeight(0)}else{if(b.collapsedHorz){b.setContentWidth(0)}}for(c=0;c<d;c++){j=l[c].target;h=j.dock;if(h=="right"){j.el.setLeft(0)}else{if(h!="left"){continue}}}},calculate:function(d){var k=this,c=k.measureAutoDimensions(d,d.measureDimensions),b=d.state,j=b.horzDone,e=b.vertDone,g=d.bodyContext,a,i,h,l;d.borderInfo||d.getBorderInfo();d.paddingInfo||d.getPaddingInfo();d.framingInfo||d.getFraming();g.borderInfo||g.getBorderInfo();g.paddingInfo||g.getPaddingInfo();a=!j&&k.createAxis(d,c.contentWidth,d.widthModel,"left","right","x","width","Width",d.collapsedHorz);i=!e&&k.createAxis(d,c.contentHeight,d.heightModel,"top","bottom","y","height","Height",d.collapsedVert);for(h=0,l=d.dockedItems.length;l--;++h){if(a){k.dockChild(d,a,l,h)}if(i){k.dockChild(d,i,l,h)}}if(a&&k.finishAxis(d,a)){b.horzDone=j=a}if(i&&k.finishAxis(d,i)){b.vertDone=e=i}if(j&&e&&k.finishConstraints(d,j,e)){k.finishPositions(d,j,e)}else{k.done=false}},createAxis:function(o,j,e,n,i,s,m,k,d){var u=0,b=this.owner,g=b["max"+k],c=b["min"+k]||0,l=g!=null,t="set"+k,q,a,r,p,h;if(e.shrinkWrap){if(d){h=0}else{a=o.bodyContext;h=j+a.borderInfo[m]}}else{q=o.borderInfo;r=o.framingInfo;p=o.paddingInfo;h=o.getProp(m);h-=q[i]+p[i]+r[i];u=q[n]+p[n]+r[n]}return{shrinkWrap:e.shrinkWrap,sizeModel:e,begin:u,end:h,collapsed:d,horizontal:s=="x",ignoreFrameBegin:false,ignoreFrameEnd:false,initialSize:h-u,hasMinMaxConstraints:(c||l)&&e.shrinkWrap,minSize:c,maxSize:l?g:1000000000,bodyPosProp:this.owner.manageHeight?s:("margin-"+n),dockBegin:n,dockEnd:i,posProp:s,sizeProp:m,sizePropCap:k,setSize:t,dockedPixelsEnd:0}},dockChild:function(b,c,j,d){var e=this,a=b.dockedItems[c.shrinkWrap?j:d],h=a.target,i=h.dock,g;if(h.ignoreParentFrame&&b.isCollapsingOrExpanding){a.clearMarginCache()}if(i==c.dockBegin){if(c.shrinkWrap){g=e.dockOutwardBegin(b,a,h,c)}else{g=e.dockInwardBegin(b,a,h,c)}}else{if(i==c.dockEnd){if(c.shrinkWrap){g=e.dockOutwardEnd(b,a,h,c)}else{g=e.dockInwardEnd(b,a,h,c)}}else{g=e.dockStretch(b,a,h,c)}}a.dockedAt[c.posProp]=g},dockInwardBegin:function(g,e,d,b){var i=b.begin,h=b.sizeProp,a,c;if(d.ignoreParentFrame){c=d.dock;i-=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c]}if(!d.overlay){a=e.getProp(h)+e.getMarginInfo()[h];b.begin+=a}return i},dockInwardEnd:function(e,d,c,b){var h=b.sizeProp,a=d.getProp(h)+d.getMarginInfo()[h],g=b.end-a;if(!c.overlay){b.end=g}if(c.ignoreParentFrame){g+=e.borderInfo[c.dock]+e.paddingInfo[c.dock]+e.framingInfo[c.dock]}return g},dockOutwardBegin:function(g,e,d,b){var i=b.begin,h=b.sizeProp,c,a;if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i-=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameBegin=true}}if(!d.overlay){a=e.getProp(h)+e.getMarginInfo()[h];i-=a;b.begin=i}return i},dockOutwardEnd:function(g,e,d,b){var i=b.end,h=b.sizeProp,c,a;a=e.getProp(h)+e.getMarginInfo()[h];if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i+=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameEnd=true}}if(!d.overlay){b.end=i+a;b.dockedPixelsEnd+=a}return i},dockStretch:function(c,b,n,d){var o=n.dock,j=d.sizeProp,a=o=="top"||o=="bottom",e=b.offsets,i=c.borderInfo,m=c.paddingInfo,h=a?"right":"bottom",q=a?"left":"top",l=d.begin+e[q],g,p,k;if(n.stretch!==false){p=d.end-l-e[h];if(n.ignoreParentFrame){k=c.framingInfo;l-=i[q]+m[q]+k[q];p+=i[j]+m[j]+k[j]}g=b.getMarginInfo();p-=g[j];b[d.setSize](p)}return l},finishAxis:function(c,e){var o=e.end-e.begin,l=e.setSize,d=e.dockBegin,i=e.dockEnd,j=c.borderInfo,m=c.paddingInfo,k=c.framingInfo,h=m[d]+j[d]+k[d],g=c.bodyContext,n,a,b;if(e.shrinkWrap){e.delta=-e.begin;a=e.initialSize;if(e.ignoreFrameBegin){e.delta-=j[d];n=-e.begin-h}else{o+=h;e.delta+=m[d]+k[d];n=-e.begin}if(!e.ignoreFrameEnd){o+=m[i]+j[i]+k[i]}e.size=o;if(!e.horizontal&&!this.owner.manageHeight){b=false}}else{e.delta=-j[e.dockBegin];a=o;n=e.begin-h}g[l](a,b);g.setProp(e.bodyPosProp,n);return !isNaN(o)},finishConstraints:function(e,a,h){var j=this.sizeModels,l=a.shrinkWrap,b=h.shrinkWrap,c,k,d,g,i,m;if(l){m=a.size;if(m<a.minSize){i=j.constrainedMin;d=a.minSize}else{if(m>a.maxSize){i=j.constrainedMax;d=a.maxSize}else{d=m}}}if(b){m=h.size;if(m<h.minSize){g=j.constrainedMin;k=h.minSize}else{if(m>h.maxSize){g=j.constrainedMax;k=h.maxSize}else{if(!e.collapsedVert&&!this.owner.manageHeight){c=false;e.bodyContext.setProp("margin-bottom",h.dockedPixelsEnd)}k=m}}}if(i||g){if(i&&g&&i.constrainedMax&&g.constrainedMin){e.invalidate({widthModel:i});return false}if(!e.widthModel.calculatedFromShrinkWrap&&!e.heightModel.calculatedFromShrinkWrap){e.invalidate({widthModel:i,heightModel:g});return false}}if(l){e.setWidth(d);if(i){e.widthModel=i}}if(b){e.setHeight(k,c);if(g){e.heightModel=g}}return true},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i<c;++i){b=j[i];b.setProp("x",g+b.dockedAt.x);b.setProp("y",e+b.dockedAt.y)}},finishedLayout:function(b){var a=this,c=b.target;a.callParent(arguments);if(!b.animatePolicy){if(b.isCollapsingOrExpanding===1){c.afterCollapse(false)}else{if(b.isCollapsingOrExpanding===2){c.afterExpand(false)}}}},getAnimatePolicy:function(c){var b=this,a,d;if(c.isCollapsingOrExpanding==1){a=b.lastCollapsedState}else{if(c.isCollapsingOrExpanding==2){a=c.lastCollapsedState}}if(a=="left"||a=="right"){d=b.horizontalCollapsePolicy}else{if(a=="top"||a=="bottom"){d=b.verticalCollapsePolicy}}return d},getDockedItems:function(c,n){var j=this,e=(c==="visual"),k=e?Ext.ComponentQuery.query("[rendered]",j.owner.dockedItems.items):j.owner.dockedItems.items,h=k&&k.length&&c!==false,b,m,l,g,d,a;if(n==null){l=h&&!e?k.slice():k}else{l=[];for(g=0,a=k.length;g<a;++g){m=k[g].dock;d=(m=="top"||m=="left");if(n?d:!d){l.push(k[g])}}h=h&&l.length}if(h){b=(c=c||"render")=="render";Ext.Array.sort(l,function(o,i){var p,q;if(b&&((p=j.owner.dockOrder[o.dock])!==(q=j.owner.dockOrder[i.dock]))){if(!(p+q)){return p-q}}p=j.getItemWeight(o,c);q=j.getItemWeight(i,c);if((p!==undefined)&&(q!==undefined)){return p-q}return 0})}return l||[]},getItemWeight:function(b,a){var c=b.weight||this.owner.defaultDockWeights[b.dock];return c[a]||c},getLayoutItems:function(){var e=this,b,g,d,c,a;if(e.owner.collapsed){a=e.owner.getCollapsedDockedItems()}else{b=e.getDockedItems("visual");g=b.length;a=[];for(c=0;c<g;c++){d=b[c];if(!d.hidden){a.push(d)}}}return a},measureContentWidth:function(a){var b=a.bodyContext;return b.el.getWidth()-b.getBorderInfo().width},measureContentHeight:function(a){var b=a.bodyContext;return b.el.getHeight()-b.getBorderInfo().height},redoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.show()}a.addClsWithUI(a.collapsedCls);c.redo(true)}else{if(c.isCollapsingOrExpanding==2){a.removeClsWithUI(a.collapsedCls);c.bodyContext.redo()}}},renderChildren:function(){var b=this,a=b.getDockedItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(k,h){var l=this,c=k.length,a=0,b=0,p=0,m=l.getRenderTarget().dom.childNodes,n=m.length,g,d,e,o;for(g=0,d=0;g<n;g++){e=m[g];if(Ext.fly(e).hasCls("x-resizable-handle")){break}for(d=0;d<c;d++){o=k[d];if(o.rendered&&o.el.dom===e){break}}if(d===c){p++}}for(;a<c;a++,b++){o=k[a];if(a===b&&(o.dock==="right"||o.dock==="bottom")){b+=p}if(o&&!o.rendered){l.renderItem(o,h,b)}else{if(!l.isValidParent(o,h,b)){l.moveItem(o,h,b)}}}},undoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.hide()}a.removeClsWithUI(a.collapsedCls);c.undo(true)}else{if(c.isCollapsingOrExpanding==2){a.addClsWithUI(a.collapsedCls);c.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},stretchH:{setsWidth:1,setsHeight:0},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(c){var d=this.sizePolicy,b,a;if(c.stretch===false){return d.nostretch}b=c.dock;a=(b=="left"||b=="right");if(a){return d.stretchV}return d.stretchH},configureItem:function(a,b){this.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,finishedLayout:Ext.emptyFn,completeLayout:function(b){var a=this,c=b.state.boxPlan,d;if(c&&c.tooNarrow){d=a.handleOverflow(b);if(d){if(d.reservedSpace){a.layout.publishInnerCtSize(b,d.reservedSpace)}}}else{a.clearOverflow()}},onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},getOwnerType:function(a){var b;if(a.isToolbar){b="toolbar"}else{if(a.isTabBar){b="tabbar"}else{if(a.isMenu){b="menu"}else{b=a.getXType()}}}return b},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false,border:true});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Auto",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7||Ext.isIE8);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(a){this.callParent(arguments);this.cacheTargetInfo(a)},beginLayoutCycle:function(e){var c=this,d="",a=c.owner,b=a.btnEl,i=a.btnInnerEl,g=a.text,h;c.callParent(arguments);i.setStyle("overflow",d);if(!e.widthModel.natural){a.el.setStyle("width",d)}h=e.heightModel.shrinkWrap&&g&&c.htmlRE.test(g);b.setStyle("width",d);b.setStyle("height",h?"auto":d);i.setStyle("width",d);i.setStyle("height",h?"auto":d);i.setStyle("line-height",h?"normal":d);i.setStyle("padding-top",d);a.btnIconEl.setStyle("width",d)},calculateOwnerHeightFromContentHeight:function(b,a){return a},calculateOwnerWidthFromContentWidth:function(b,a){return a},measureContentWidth:function(c){var i=this,b=i.owner,g=b.btnEl,d=b.btnInnerEl,l=b.text,m,j,h,a,k,e;if(b.text&&i.hackWidth&&g){m=i.btnFrameWidth;if(l.indexOf(">")===-1){l=l.replace(/</g,"&lt;")}j=Ext.util.TextMetrics.measure(d,l);a=j.width+m+i.adjWidth;k=c.getEl("btnEl");e=c.getEl("btnInnerEl");h=(b.icon||b.iconCls)&&(b.iconAlign=="top"||b.iconAlign=="bottom");c.setWidth(a);k.setWidth(j.width+m);e.setWidth(j.width+m);if(h){b.btnIconEl.setWidth(j.width+m)}}else{a=c.el.getWidth()}return a},measureContentHeight:function(d){var j=this,b=j.owner,e=b.btnInnerEl,i=d.getEl("btnEl"),g=d.getEl("btnInnerEl"),c=j.minTextHeight,h=j.adjHeight,m=b.getText(),l,k,a;if(b.vertical){l=Ext.util.TextMetrics.measure(e,b.text).width;l+=j.btnFrameHeight+h;d.setHeight(l,true,true)}else{if(m&&j.htmlRE.test(m)){k=e.getHeight();if(k<c){a=Math.floor((c-k)/2);g.setHeight(c-(j.heightIncludesPadding?a:0));g.setProp("padding-top",a);k=c}l=k+h}else{l=d.el.getHeight()}}i.setHeight(l-h);return l},publishInnerHeight:function(c,m){var j=this,a=j.owner,g=Ext.isNumber,i=c.getEl("btnEl"),d=a.btnInnerEl,h=c.getEl("btnInnerEl"),e=g(m)?m-j.adjHeight:m,b=j.btnFrameHeight,l=a.getText(),k,n;i.setHeight(e);h.setHeight(e);if(!a.vertical&&e>=0){h.setProp("line-height",e-b+"px")}if(l&&j.htmlRE.test(l)){h.setProp("line-height","normal");d.setStyle("line-height","normal");k=Ext.util.TextMetrics.measure(d,l).height;n=Math.floor(Math.max(e-b-k,0)/2);h.setProp("padding-top",j.btnFrameTop+n);h.setHeight(e-(j.heightIncludesPadding?n:0))}},publishInnerWidth:function(g,c){var e=this,h=Ext.isNumber,a=g.getEl("btnEl"),b=g.getEl("btnInnerEl"),d=h(c)?c-e.adjWidth:c;a.setWidth(d);b.setWidth(d)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(b){var g=this,a=g.owner,d=a.scale,i,e,j,c,h;if(!("adjWidth" in g)||g.lastScale!==d){if(g.lastScale){a.btnInnerEl.setStyle("line-height","")}g.lastScale=d;i=b.getPaddingInfo();e=b.getFrameInfo();j=b.getEl("btnWrap").getPaddingInfo();c=b.getEl("btnInnerEl");h=c.getPaddingInfo();Ext.apply(g,{adjWidth:j.width+e.width+i.width,adjHeight:j.height+e.height+i.height,btnFrameWidth:h.width,btnFrameHeight:h.height,btnFrameTop:h.top,minTextHeight:parseInt(c.getStyle("line-height"),10)})}g.callParent(arguments)},finishedLayout:function(){var a=this.owner;this.callParent(arguments);if(Ext.isWebKit){a.el.dom.offsetWidth}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var c=this.active,e,b,a,d;if(c&&c.length>0){e=c.clone();b=e.items;d=b.length;for(a=0;a<d;a++){b[a].hide()}return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,g=e.active,d=g.last(),c=e.attached,b=a.getEl(),h;e.lastShow=new Date();g.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e,{buffer:Ext.isIE?10:undefined});e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(d){var b=this,c=b.active,a=b.lastShow;if(Ext.Date.getElapsed(a)>50&&c.length>0&&!d.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll()}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){var c=this;c.el=Ext.get(b);c.el.unselectable();Ext.apply(c,a);c.callParent();c.addEvents("mousedown","click","mouseup");if(!c.disabled){c.disabled=true;c.enable()}if(c.handler){c.on("click",c.handler,c.scope||c)}},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE&&!(Ext.isStrict&&Ext.isIE9)){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",border:true,childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<em id="{id}-btnWrap"<tpl if="splitCls"> class="{splitCls}"</tpl>>','<tpl if="href">','<a id="{id}-btnEl" href="{href}" class="{btnCls}" target="{hrefTarget}"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="link">','<span id="{id}-btnInnerEl" class="{baseCls}-inner">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</a>","<tpl else>",'<button id="{id}-btnEl" type="{type}" class="{btnCls}" hidefocus="true"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="button" autocomplete="off">','<span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</button>","</tpl>","</em>",'<tpl if="closable">','<a id="{id}-closeEl" href="#" class="{baseCls}-close-btn" title="{closeText}"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)&&a.toggleGroup!==""){a.enableToggle=true}if(a.html&&!a.text){a.text=a.html;delete a.html}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.useElForFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.useElForFocus=true;a.callParent(arguments);a.useElForFocus=false},onBlur:function(a){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},onDisable:function(){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs());if(a.scale){a.setScale(a.scale)}},onRender:function(){var c=this,d,a,b;c.doc=Ext.getDoc();c.callParent(arguments);if(c.split&&c.arrowTooltip){c.arrowEl.dom.setAttribute(c.getTipAttr(),c.arrowTooltip)}a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={scope:c}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap({target:c.el,key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{if(b[c.clickEvent]){d=true}else{b[c.clickEvent]=c.onClick}}c.mon(a,b);if(d){c.mon(a,c.clickEvent,c.onClick,c)}Ext.ButtonToggleManager.register(c)},getTemplateArgs:function(){var c=this,b=c.getPersistentPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),disabled:c.disabled,hrefTarget:c.hrefTarget,type:c.type,btnCls:c.getBtnCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,text:c.text||"&#160;",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.rendered){a.btnInnerEl.update(b||"&#160;");a.setComponentCls();if(Ext.isStrict&&Ext.isIE8){a.el.repaint()}a.updateLayout()}return a},setIcon:function(b){var c=this,a=c.btnIconEl,d=c.icon;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}return c},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+e.frameSize[b]}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=false}b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=true}b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);if(b.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){b.btnInnerEl.repaint()}return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentPadding:function(){var g=this,e=Ext.scopeResetCSS,h=g.persistentPadding,b,a,d,i,c;if(!h){h=g.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){b=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});b.el=Ext.DomHelper.append(Ext.resetElement,b.getRenderTree(),true);b.applyChildEls(b.el);d=b.btnEl;i=b.btnInnerEl;d.setSize(null,null);a=i.getOffsetsTo(d);h[0]=a[1];h[1]=d.getWidth()-i.getWidth()-a[0];h[2]=d.getHeight()-i.getHeight()-a[1];h[3]=a[0];b.destroy();b.el.remove()}}return h}},function(){var a={},b=function(d,j){if(j){var h=a[d.toggleGroup],e=h.length,c;for(c=0;c<e;c++){if(h[c]!==d){h[c].toggle(false)}}}};Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un("toggle",b)}},getPressed:function(h){var e=a[h],d=0,c;if(e){for(c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+b.getNames().right;a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var c=this,b=c.layout,a=b.owner.id;c.menu=new Ext.menu.Menu({listeners:{scope:c,beforeshow:c.beforeMenuShow}});c.menuTrigger=new Ext.button.Button({id:a+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+c.triggerButtonCls,hidden:true,ownerCt:b.owner,ownerLayout:b,iconCls:Ext.baseCSSPrefix+c.getOwnerType(b.owner)+"-more-icon",ui:b.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:c.menu,getSplitCls:function(){return""}});return c.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(d){var c=this,b=c.layout,g=b.getNames(),e=d.state.boxPlan,a=[null,null];c.showTrigger(d);a[g.heightIndex]=(e.maxSize-c.menuTrigger[g.getHeight]())/2;c.menuTrigger.setPosition.apply(c.menuTrigger,a);return{reservedSpace:c.menuTrigger[g.getWidth]()}},captureChildElements:function(){var a=this.menuTrigger;if(a.rendering){a.finishRender()}},_asLayoutRoot:{isRoot:true},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner,j=g._asLayoutRoot;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;c<d;c++){e=b[c];e.suspendLayouts();e.show();e.resumeLayouts(j)}b.length=0},showTrigger:function(c){var o=this,k=o.layout,a=k.owner,n=k.getNames(),r=n.x,e=n.width,p=c.state.boxPlan,b=p.targetSize[e],h=c.childItems,l=h.length,g=o.menuTrigger,q,j,d,m;g.suspendLayouts();g.show();g.resumeLayouts(o._asLayoutRoot);b-=o.menuTrigger.getWidth();a.suspendLayouts();o.menuItems.length=0;for(d=0;d<l;d++){q=h[d];m=q.props;if(m[r]+m[e]>b){j=q.target;o.menuItems.push(j);j.hide()}}a.resumeLayouts()},hideTrigger:function(){var a=this.menuTrigger;if(a){a.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e,c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};j.suspendLayouts();h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}j.resumeLayouts()},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(c.isFormField){b.value=c.getValue();if(!b.listeners){b.listeners={}}b.listeners.change=function(h,g,e){c.setValue(g)}}else{if(d||c.enableToggle){Ext.apply(b,{iconAlign:"right",hideOnClick:false,group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(g,c){var e=this,d,b,a;if(c instanceof Ext.toolbar.Separator){g.add("-")}else{if(c.isComponent){if(c.isXType("splitbutton")){g.add(e.createMenuConfig(c,true))}else{if(c.isXType("button")){g.add(e.createMenuConfig(c,!c.menu))}else{if(c.isXType("buttongroup")){b=c.items.items;a=b.length;for(d=0;d<a;d++){e.addComponentToMenu(g,b[d])}}else{g.add(Ext.create(Ext.getClassName(c),e.createMenuConfig(c)))}}}}}},clearMenu:function(){var e=this.menu,b,c,a,d;if(e&&e.items){b=e.items.items;a=b.length;for(c=0;c<a;c++){d=b[c];if(d.setMenu){d.setMenu(null)}}}},destroy:function(){var a=this.menuTrigger;if(a&&!this.layout.owner.items.contains(a)){delete a.ownerCt}Ext.destroy(this.menu,a)}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(c,a){var b=this;b.layout=c;Ext.apply(b,a||{});b.mixins.observable.constructor.call(b);b.addEvents("scroll");b.scrollPosition=0;b.scrollSize=0},getPrefixConfig:function(){var a=this;a.initCSSClasses();return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls,cn:{id:a.layout.owner.id+"-before-scroller",cls:a.scrollerCls+" "+a.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var a=this;return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls,cn:{id:a.layout.owner.id+"-after-scroller",cls:a.scrollerCls+" "+a.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var d=this,e=Ext.baseCSSPrefix,c=d.layout,g=c.getNames(),a=g.left,h=g.right,b=d.getOwnerType(c.owner);d.beforeCtCls=d.beforeCtCls||e+"box-scroller-"+a;d.afterCtCls=d.afterCtCls||e+"box-scroller-"+h;d.beforeScrollerCls=d.beforeScrollerCls||e+b+"-scroll-"+a;d.afterScrollerCls=d.afterScrollerCls||e+b+"-scroll-"+h},beginLayout:function(b){var a=this.layout,c=a.getNames();b.innerCtScrollPos=a.innerCt.dom["scroll"+c.leftCap];this.callParent(arguments)},completeLayout:function(a){this.scrollSize=a.props["content"+this.layout.getNames().widthCap];this.callParent(arguments)},finishedLayout:function(c){var b=this,a=b.layout,d=a.getNames(),e=Math.min(b.getMaxScrollPosition(),c.innerCtScrollPos);a.innerCt.dom["scroll"+d.leftCap]=e},handleOverflow:function(d){var c=this,b=c.layout,e=b.getNames(),a="get"+e.widthCap;c.captureChildElements();c.showScrollers();return{reservedSpace:c.beforeCt[a]()+c.afterCt[a]()}},captureChildElements:function(){var b=this,a=b.layout.owner.el,c,d;if(!b.beforeCt){c=b.beforeScroller=a.getById(b.layout.owner.id+"-before-scroller");d=b.afterScroller=a.getById(b.layout.owner.id+"-after-scroller");b.beforeCt=c.up("");b.afterCt=d.up("");b.createWheelListener();c.addClsOnOver(b.beforeScrollerCls+"-hover");d.addClsOnOver(b.afterScrollerCls+"-hover");c.setVisibilityMode(Ext.Element.DISPLAY);d.setVisibilityMode(Ext.Element.DISPLAY);b.beforeRepeater=new Ext.util.ClickRepeater(c,{interval:b.scrollRepeatInterval,handler:b.scrollLeft,scope:b});b.afterRepeater=new Ext.util.ClickRepeater(d,{interval:b.scrollRepeatInterval,handler:b.scrollRight,scope:b})}},createWheelListener:function(){this.layout.innerCt.on({mousewheel:function(a){this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)},stopEvent:true,scope:this})},clearOverflow:function(){var a=this.layout;this.hideScrollers()},showScrollers:function(){var a=this;a.captureChildElements();a.beforeScroller.show();a.afterScroller.show();a.updateScrollButtons();a.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){var a=this;if(a.beforeScroller!==undefined){a.beforeScroller.hide();a.afterScroller.hide();a.layout.owner.removeClsWithUI("scroller")}},destroy:function(){var a=this;Ext.destroy(a.beforeRepeater,a.afterRepeater,a.beforeScroller,a.afterScroller,a.beforeCt,a.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var d=this,e,c,a,b;if(d.beforeScroller===undefined||d.afterScroller===undefined){return}e=d.atExtremeBefore()?"addCls":"removeCls";c=d.atExtremeAfter()?"addCls":"removeCls";a=d.beforeScrollerCls+"-disabled";b=d.afterScrollerCls+"-disabled";d.beforeScroller[e](a);d.afterScroller[c](b);d.scrolling=false},atExtremeBefore:function(){return !this.getScrollPosition()},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var c=this,b=c.layout,a;if(c.hasOwnProperty("scrollPosition")){a=c.scrollPosition}else{a=parseInt(b.innerCt.dom["scroll"+b.getNames().leftCap],10)||0}return a},getMaxScrollPosition:function(){var b=this,a=b.layout,c=a.getNames(),d=b.scrollSize-a.innerCt["get"+c.widthCap]();return(d<0)?0:d},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,h=e.getNames(),d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){delete g.scrollPosition;if(b===undefined){b=g.animateScroll}e.innerCt.scrollTo(h.left,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,i=e.getNames(),a,d,c;h=g.getItem(h);if(h!==undefined){a=g.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[i.x];if(a.hiddenEnd){c-=(g.layout.innerCt["get"+i.widthCap]()-d[i.width])}g.scrollTo(c,b)}}},getItemVisibility:function(j){var h=this,b=h.getItem(j).getBox(true,true),c=h.layout,g=c.getNames(),e=b[g.x],d=e+b[g.width],a=h.getScrollPosition(),i=a+c.innerCt["get"+g.widthCap]();return{hiddenStart:e<a,hiddenEnd:d>i,fullyVisible:e>a&&d<i}}});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(c,b){var d,a,e;for(d in this.ids){for(a in this.ids[d]){e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[],d,c,a;for(d in g.groups){for(c in this.ids[d]){a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true),c,a;for(c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(d){var c=this,b,a;for(b in this.ids){a=this.ids[b][d];if(a instanceof Ext.dd.DDTarget){return a}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();if(Ext.isIE&&a.setCapture){a.setCapture()}this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(b){var a=this.dragCurrent;if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!a){return}if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(d){var c=this,b,a;if(!c.dragCurrent){return true}if(!c.dragThreshMet){b=Math.abs(c.startX-d.getPageX());a=Math.abs(c.startY-d.getPageY());if(b>c.clickPixelThresh||a>c.clickPixelThresh){c.startDrag(c.startX,c.startY)}}if(c.dragThreshMet){c.dragCurrent.b4Drag(d);c.dragCurrent.onDrag(d);if(!c.dragCurrent.moveOnly){c.fireEvents(d,false)}}c.stopEvent(d);return true},fireEvents:function(n,q){var p=this,k=p.dragCurrent,r=n.getPoint(),b,t,d=[],a=[],g=[],l=[],j=[],c=[],o,h,m,s;if(!k||k.isLocked()){return}for(h in p.dragOvers){b=p.dragOvers[h];if(!p.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,p.mode)){g.push(b)}a[h]=true;delete p.dragOvers[h]}for(s in k.groups){if("string"!=typeof s){continue}for(h in p.ids[s]){b=p.ids[s][h];if(p.isTypeOfDD(b)&&(t=b.getEl())&&(b.isTarget)&&(!b.isLocked())&&(Ext.fly(t).isVisible(true))&&((b!=k)||(k.ignoreSelf===false))){if((b.zIndex=p.getZIndex(t))!==-1){o=true}d.push(b)}}}if(o){Ext.Array.sort(d,p.byZIndex)}for(h=0,m=d.length;h<m;h++){b=d[h];if(p.isOverTarget(r,b,p.mode)){if(q){j.push(b)}else{if(!a[b.id]){c.push(b)}else{l.push(b)}p.dragOvers[b.id]=b}if(!p.notifyOccluded){break}}}if(p.mode){if(g.length){k.b4DragOut(n,g);k.onDragOut(n,g)}if(c.length){k.onDragEnter(n,c)}if(l.length){k.b4DragOver(n,l);k.onDragOver(n,l)}if(j.length){k.b4DragDrop(n,j);k.onDragDrop(n,j)}}else{for(h=0,m=g.length;h<m;++h){k.b4DragOut(n,g[h].id);k.onDragOut(n,g[h].id)}for(h=0,m=c.length;h<m;++h){k.onDragEnter(n,c[h].id)}for(h=0,m=l.length;h<m;++h){k.b4DragOver(n,l[h].id);k.onDragOver(n,l[h].id)}for(h=0,m=j.length;h<m;++h){k.b4DragDrop(n,j[h].id);k.onDragDrop(n,j[h].id)}}if(q&&!j.length){k.onInvalidDrop(n)}},getZIndex:function(b){var a=document.body,c,d=-1;b=Ext.getDom(b);while(b!==a){if(!isNaN(c=Number(Ext.fly(b).getStyle("zIndex")))){d=c}b=b.parentNode}return d},byZIndex:function(b,a){return b.zIndex<a.zIndex},getBestMatch:function(c){var e=null,b=c.length,d,a;if(b==1){e=c[0]}else{for(d=0;d<b;++d){a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){var a,c,d,e;for(a in b){if("string"!=typeof a){continue}for(c in this.ids[a]){d=this.ids[a][c];if(this.isTypeOfDD(d)){e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,o,n,p,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return new Ext.util.Region(p,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id],i,g,b,d,h;if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;g=i.getTargetCoord(j.x,j.y);b=i.getDragEl();d=new Ext.util.Region(g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode,b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount<=2000){setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" style="position:absolute;',"width:20000px;","left:0px;top:0px;",'height:1px">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},getNames:function(){return this.names},_percentageRe:/^\s*(\d+(?:\.\d*)?)\s*[%]\s*$/,getItemSizePolicy:function(m,n){var j=this,h=j.sizePolicy,g=j.align,e=m.flex,k=g,i=j.names,a=m[i.width],l=m[i.height],c=j._percentageRe,b=c.test(a),d=(g=="stretch");if((d||e||b)&&!n){n=j.owner.getSizeModel()}if(d){if(!c.test(l)&&n[i.height].shrinkWrap){k="stretchmax"}}else{if(g!="stretchmax"){if(c.test(l)){k="stretch"}else{k=""}}}if(e||b){if(!n[i.width].shrinkWrap){h=h.flex}}return h[k]},flexSort:function(d,c){var e=this.getNames().maxWidth,g=Infinity;d=d.target[e]||g;c=c.target[e]||g;if(!isFinite(d)&&!isFinite(c)){return 0}return d-c},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},minSizeSortFn:function(d,c){return c.available-d.available},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(c){var b=this,e=b.owner.stretchMaxPartner,a=b.innerCt.dom.style,d=b.getNames();c.boxNames=d;b.overflowHandler.beginLayout(c);if(typeof e==="string"){e=Ext.getCmp(e)||b.owner.query(e)[0]}c.stretchMaxPartner=e&&c.context.getCmp(e);b.callParent(arguments);c.innerCtContext=c.getEl("innerCt",b);b.scrollParallel=!!(b.owner.autoScroll||b.owner[d.overflowX]);b.scrollPerpendicular=!!(b.owner.autoScroll||b.owner[d.overflowY]);if(b.scrollParallel){b.scrollPos=b.owner.getTargetEl().dom[d.scrollLeft]}a.width="";a.height=""},beginLayoutCycle:function(e,a){var d=this,h=d.align,g=e.boxNames,b=d.pack,c=g.heightModel;d.overflowHandler.beginLayoutCycle(e,a);d.callParent(arguments);e.parallelSizeModel=e[g.widthModel];e.perpendicularSizeModel=e[c];e.boxOptions={align:h={stretch:h=="stretch",stretchmax:h=="stretchmax",center:h==g.center},pack:b={center:b=="center",end:b=="end"}};if(h.stretch&&e.perpendicularSizeModel.shrinkWrap){h.stretchmax=true;h.stretch=false}h.nostretch=!(h.stretch||h.stretchmax);if(e.parallelSizeModel.shrinkWrap){b.center=b.end=false}d.cacheFlexes(e);if(Ext.isWebKit){d.targetEl.setWidth(20000)}},cacheFlexes:function(k){var u=this,l=k.boxNames,a=l.widthModel,d=l.heightModel,c=k.boxOptions.align.nostretch,o=0,b=k.childItems,q=b.length,s=[],m=0,j=l.minWidth,g=u._percentageRe,r=0,t=0,e,n,p,h;while(q--){n=b[q];e=n.target;if(n[a].calculated){n.flex=p=e.flex;if(p){o+=p;s.push(n);m+=e[j]||0}else{h=g.exec(e[l.width]);n.percentageParallel=parseFloat(h[1])/100;++r}}if(c&&n[d].calculated){h=g.exec(e[l.height]);n.percentagePerpendicular=parseFloat(h[1])/100;++t}}k.flexedItems=s;k.flexedMinSize=m;k.totalFlex=o;k.percentageWidths=r;k.percentageHeights=t;Ext.Array.sort(s,u.flexSortFn)},calculate:function(d){var b=this,a=b.getContainerSize(d),g=d.boxNames,c=d.state,e=c.boxPlan||(c.boxPlan={});e.targetSize=a;if(!d.parallelSizeModel.shrinkWrap&&!a[g.gotWidth]){b.done=false;return}if(!c.parallelDone){c.parallelDone=b.calculateParallel(d,g,e)}if(!c.perpendicularDone){c.perpendicularDone=b.calculatePerpendicular(d,g,e)}if(c.parallelDone&&c.perpendicularDone){if(b.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!b.owner.width&&!b.horizontal){e.isIEVerticalDock=true;e.calculatedWidth=e.maxSize+d.getPaddingInfo().width+d.getFrameInfo().width}b.publishInnerCtSize(d,b.reserveOffset?b.availableSpaceOffset:0);if(b.done&&d.childItems.length>1&&d.boxOptions.align.stretchmax&&!c.stretchMaxDone){b.calculateStretchMax(d,g,e);c.stretchMaxDone=true}}else{b.done=false}},calculateParallel:function(k,n,b){var F=this,z=n.width,a=k.childItems,d=n.left,r=n.right,q=n.setWidth,A=a.length,x=k.flexedItems,s=x.length,v=k.boxOptions.pack,m=F.padding,h=b.targetSize[z],B=0,e=m[d],E=e+m[r]+F.scrollOffset+(F.reserveOffset?F.availableSpaceOffset:0),w=Ext.getScrollbarSize()[n.width],u,l,g,y,o,t,D,p,C,c,j;if(w&&F.scrollPerpendicular&&k.parallelSizeModel.shrinkWrap&&!k.boxOptions.align.stretch&&!k.perpendicularSizeModel.shrinkWrap){if(!k.state.perpendicularDone){return false}C=true}for(u=0;u<A;++u){o=a[u];l=o.marginInfo||o.getMarginInfo();B+=l[z];if(!o[n.widthModel].calculated){c=o.getProp(z);E+=c;if(isNaN(E)){return false}}}E+=B;if(k.percentageWidths){j=h-B;if(isNaN(j)){return false}for(u=0;u<A;++u){o=a[u];if(o.percentageParallel){c=Math.ceil(j*o.percentageParallel);c=o.setWidth(c);E+=c}}}if(k.parallelSizeModel.shrinkWrap){b.availableSpace=0;b.tooNarrow=false}else{b.availableSpace=h-E;b.tooNarrow=b.availableSpace<k.flexedMinSize;if(b.tooNarrow&&Ext.getScrollbarSize()[n.height]&&F.scrollParallel&&k.state.perpendicularDone){k.state.perpendicularDone=false;for(u=0;u<A;++u){a[u].invalidate()}}}p=E;g=b.availableSpace;y=k.totalFlex;for(u=0;u<s;u++){o=x[u];t=o.flex;D=F.roundFlex((t/y)*g);D=o[q](D);p+=D;g=Math.max(0,g-D);y-=t}if(v.center){e+=g/2;if(e<0){e=0}}else{if(v.end){e+=g}}for(u=0;u<A;++u){o=a[u];l=o.marginInfo;e+=l[d];o.setProp(n.x,e);e+=l[r]+o.props[z]}p+=k.targetContext.getPaddingInfo()[z];k.state.contentWidth=p;if(C&&(k.peek(n.contentHeight)>b.targetSize[n.height])){p+=w;k[n.hasOverflowY]=true;k.target.componentLayout[n.setWidthInDom]=true;k[n.invalidateScrollY]=(Ext.isStrict&&Ext.isIE8)}k[n.setContentWidth](p);return true},calculatePerpendicular:function(r,v,c){var G=this,a=r.perpendicularSizeModel.shrinkWrap,d=c.targetSize,b=r.childItems,E=b.length,J=Math.max,H=v.height,m=v.setHeight,p=v.top,F=v.y,u=G.padding,w=u[p],h=d[H]-w-u[v.bottom],B=r.boxOptions.align,o=B.stretch,z=B.stretchmax,n=B.center,A=0,g=0,l=Ext.getScrollbarSize().height,I,C,e,t,s,y,x,k,j,q,D;if(o||(n&&!a)){if(isNaN(h)){return false}}if(G.scrollParallel&&c.tooNarrow){if(a){q=true}else{h-=l;c.targetSize[H]-=l}}if(o){y=h}else{for(C=0;C<E;C++){x=b[C];t=(x.marginInfo||x.getMarginInfo())[H];if(!(D=x.percentagePerpendicular)){e=x.getProp(H)}else{++g;if(a){continue}else{e=D*h-t;e=x[v.setHeight](e)}}if(isNaN(A=J(A,e+t,x.target[v.minHeight]||0))){return false}}if(q){A+=l;r[v.hasOverflowX]=true;r.target.componentLayout[v.setHeightInDom]=true;r[v.invalidateScrollX]=(Ext.isStrict&&Ext.isIE8)}k=r.stretchMaxPartner;if(k){r.setProp("maxChildHeight",A);j=k.childItems;if(j&&j.length){A=J(A,k.getProp("maxChildHeight"));if(isNaN(A)){return false}}}r[v.setContentHeight](A+G.padding[H]+r.targetContext.getPaddingInfo()[H]);if(q){A-=l}c.maxSize=A;if(z){y=A}else{if(n||g){y=a?A:J(h,A);y-=r.innerCtContext.getBorderInfo()[H]}}}for(C=0;C<E;C++){x=b[C];t=x.marginInfo||x.getMarginInfo();I=w+t[p];if(o){x[m](y-t[H])}else{D=x.percentagePerpendicular;if(a&&D){t=x.marginInfo||x.getMarginInfo();e=D*y-t[H];e=x.setHeight(e)}if(n){s=y-x.props[H];if(s>0){I=w+Math.round(s/2)}}}x.setProp(F,I)}return true},calculateStretchMax:function(d,k,m){var l=this,h=k.height,n=k.width,g=d.childItems,b=g.length,o=m.maxSize,a=l.onBeforeInvalidateChild,q=l.onAfterInvalidateChild,p,j,e,c;for(e=0;e<b;++e){p=g[e];j=p.props;c=o-p.getMarginInfo()[h];if(c!=j[h]||p[k.heightModel].constrained){p.invalidate({before:a,after:q,layout:l,childWidth:j[n],childHeight:c,childX:j.x,childY:j.y,names:k})}}},completeLayout:function(b){var j=this,i=b.boxNames,h=b.invalidateScrollX,g=b.invalidateScrollY,d,a,e,c,k;j.overflowHandler.completeLayout(b);if(h||g){a=j.getTarget();d=a.dom;k=d.style;if(h){e=a.getStyle("overflowX");if(e=="auto"){e=k.overflowX;k.overflowX="scroll"}else{h=false}}if(g){c=a.getStyle("overflowY");if(c=="auto"){c=k.overflowY;k.overflowY="scroll"}else{g=false}}if(h||g){d.scrollWidth;if(h){k.overflowX=e}if(g){k.overflowY=c}}}if(j.scrollParallel){j.owner.getTargetEl().dom[i.scrollLeft]=j.scrollPos}},finishedLayout:function(a){this.overflowHandler.finishedLayout(a);this.callParent(arguments);if(Ext.isWebKit){this.targetEl.setWidth(a.innerCtContext.props.width)}},onBeforeInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMax){b[c]=Ext.layout.SizeModel.calculated}},onAfterInvalidateChild:function(d,c){var g=c.names,e=Ext.getScrollbarSize(),a=c.childHeight,b=c.childWidth;d.setProp("x",c.childX);d.setProp("y",c.childY);if(d[g.heightModel].calculated){d[g.setHeight](a)}if(d[g.widthModel].calculated){d[g.setWidth](b)}},publishInnerCtSize:function(a,d){var i=this,h=a.boxNames,g=h.height,k=h.width,e=a.boxOptions.align,o=i.owner.dock,l=i.padding,j=a.state.boxPlan,c=j.targetSize,n=c[g],p=a.innerCtContext,b=(a.parallelSizeModel.shrinkWrap||(j.tooNarrow&&i.scrollParallel)?a.state.contentWidth:c[k])-(d||0),m;if(e.stretch){m=n}else{m=j.maxSize+l[h.top]+l[h.bottom]+p.getBorderInfo()[g];if(!a.perpendicularSizeModel.shrinkWrap&&e.center){m=Math.max(n,m)}}p[h.setWidth](b);p[h.setHeight](m);if(isNaN(b+m)){i.done=false}if(j.calculatedWidth&&(o=="left"||o=="right")){a.setWidth(j.calculatedWidth,true,true)}},onRemove:function(a){var b=this;b.callParent(arguments);if(b.overflowHandler){b.overflowHandler.onRemove(a)}if(a.layoutMarginCap==b.id){delete a.layoutMarginCap}},initOverflowHandler:function(){var d=this,c=d.overflowHandler,b,a;if(typeof c=="string"){c={type:c}}b="None";if(c&&c.type!==undefined){b=c.type}a=Ext.layout.container.boxOverflow[b];if(a[d.type]){a=a[d.type]}d.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,d,c)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",type:"hbox",direction:"horizontal",horizontal:true,names:{lr:"lr",left:"left",leftCap:"Left",right:"right",position:"left",width:"width",contentWidth:"contentWidth",minWidth:"minWidth",maxWidth:"maxWidth",widthCap:"Width",widthModel:"widthModel",widthIndex:0,x:"x",scrollLeft:"scrollLeft",overflowX:"overflowX",hasOverflowX:"hasOverflowX",invalidateScrollX:"invalidateScrollX",center:"middle",top:"top",topPosition:"top",bottom:"bottom",height:"height",contentHeight:"contentHeight",minHeight:"minHeight",maxHeight:"maxHeight",heightCap:"Height",heightModel:"heightModel",heightIndex:1,y:"y",scrollTop:"scrollTop",overflowY:"overflowY",hasOverflowY:"hasOverflowY",invalidateScrollY:"invalidateScrollY",getWidth:"getWidth",getHeight:"getHeight",setWidth:"setWidth",setHeight:"setHeight",gotWidth:"gotWidth",gotHeight:"gotHeight",setContentWidth:"setContentWidth",setContentHeight:"setContentHeight",setWidthInDom:"setWidthInDom",setHeightInDom:"setHeightInDom"},sizePolicy:{flex:{"":{setsWidth:1,setsHeight:0},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:0,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",type:"vbox",direction:"vertical",horizontal:false,names:{lr:"tb",left:"top",leftCap:"Top",right:"bottom",position:"top",width:"height",contentWidth:"contentHeight",minWidth:"minHeight",maxWidth:"maxHeight",widthCap:"Height",widthModel:"heightModel",widthIndex:1,x:"y",scrollLeft:"scrollTop",overflowX:"overflowY",hasOverflowX:"hasOverflowY",invalidateScrollX:"invalidateScrollY",center:"center",top:"left",topPosition:"left",bottom:"right",height:"width",contentHeight:"contentWidth",minHeight:"minWidth",maxHeight:"maxWidth",heightCap:"Width",heightModel:"widthModel",heightIndex:0,y:"x",scrollTop:"scrollLeft",overflowY:"overflowX",hasOverflowY:"hasOverflowX",invalidateScrollY:"invalidateScrollX",getWidth:"getHeight",getHeight:"getWidth",setWidth:"setHeight",setHeight:"setWidth",gotWidth:"gotHeight",gotHeight:"gotWidth",setContentWidth:"setContentHeight",setContentHeight:"setContentWidth",setWidthInDom:"setHeightInDom",setHeightInDom:"setWidthInDom"},sizePolicy:{flex:{"":{setsWidth:0,setsHeight:1},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle"});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange")},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(d){if(typeof d=="string"){var b=Ext.toolbar.Toolbar,a=b.shortcutsHV[this.vertical?1:0][d]||b.shortcuts[d];if(typeof a=="string"){d={xtype:a}}else{if(a){d=Ext.apply({},a)}else{d={xtype:"tbtext",text:d}}}this.applyDefaults(d)}return this.callParent(arguments)},applyDefaults:function(a){if(!Ext.isString(a)){a=this.callParent(arguments)}return a},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:Ext.widget(a.split?"splitbutton":this.defaultType,a)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a)},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(g!==undefined){e.dockedItems.insert(g+b,d)}else{e.dockedItems.add(d)}if(d.onAdded!==Ext.emptyFn){d.onAdded(e,b)}if(e.onDockedAdd!==Ext.emptyFn){e.onDockedAdd(d)}}if(e.rendered&&!e.suspendLayout){e.updateLayout()}return a},destroyDockedItems:function(){var a=this.dockedItems,b;if(a){while((b=a.first())){this.removeDocked(b,true)}}},doRenderDockedItems:function(c,g,h){var e=g.$comp,d=e.componentLayout,b,a;if(d.getDockedItems&&!g.$skipDockedItems){b=d.getDockedItems("render",!h);a=b&&d.getItemsRenderTree(b);if(a){Ext.DomHelper.generateMarkup(a,c)}}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getDockedItems:function(a,c){var b=this.getComponentLayout().getDockedItems("render",c);if(a&&b.length){b=Ext.ComponentQuery.query(a,b)}return b},getDockingRefItems:function(b,e){var a=b&&"*,* *",d=this.getDockedItems(a,true),c;d.push.apply(d,e);c=this.getDockedItems(a,false);d.push.apply(d,c);return d},initDockingItems:function(){var b=this,a=b.dockedItems;b.dockedItems=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){b.addDocked(a)}},insertDocked:function(b,a){this.addDocked(a,b)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}if(!d.destroying&&!d.suspendLayout){d.updateLayout()}return e},setupDockingRenderTpl:function(a){a.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",mixins:{docking:"Ext.container.DockingContainer"},requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)?"<div></div>":"",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,emptyArray:[],initComponent:function(){var a=this;if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var a=this,b=a.callParent();a.initBodyStyles();a.protoBody.writeTo(b);delete a.protoBody;return b},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({cls:b.bodyCls,style:b.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return a},initBodyStyles:function(){var c=this,a=c.getProtoBody(),b=Ext.Element;if(c.bodyPadding!==undefined){a.setStyle("padding",b.unitizeBox((c.bodyPadding===true)?5:c.bodyPadding))}if(c.frame&&c.bodyBorder){if(!Ext.isNumber(c.bodyBorder)){c.bodyBorder=1}a.setStyle("border-width",b.unitizeBox(c.bodyBorder))}},getCollapsedDockedItems:function(){var a=this;return a.collapseMode=="placeholder"?a.emptyArray:[a.getReExpander()]},setBodyStyle:function(b,d){var c=this,a=c.rendered?c.body:c.getProtoBody();if(Ext.isFunction(b)){b=b()}if(arguments.length==1){if(Ext.isString(b)){b=Ext.Element.parseStyles(b)}a.setStyle(b)}else{a.setStyle(b,d)}return c},addBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.addCls(b);return c},removeBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.removeCls(b);return c},addUIClsToElement:function(b){var c=this,a=c.callParent(arguments);c.addBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},removeUIClsFromElement:function(b){var c=this,a=c.callParent(arguments);c.removeBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},addUIToElement:function(){var a=this;a.callParent(arguments);a.addBodyCls(a.baseCls+"-body-"+a.ui)},removeUIFromElement:function(){var a=this;a.callParent(arguments);a.removeBodyCls(a.baseCls+"-body-"+a.ui)},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments);return this.getDockingRefItems(a,b)},setupRenderTpl:function(a){this.callParent(arguments);this.setupDockingRenderTpl(a)}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(a){this.callParent(arguments);a.bodyContext=a.getEl("body")},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(c.targetContext!=c){a+=c.getPaddingInfo().height}return a},calculateOwnerWidthFromContentWidth:function(c,a){var b=this.callParent(arguments);if(c.targetContext!=c){b+=c.getPaddingInfo().width}return b},measureContentWidth:function(a){return a.bodyContext.setWidth(a.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(a){return a.bodyContext.setHeight(a.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(c,a){var d=a-c.getFrameInfo().height,b=c.targetContext;if(b!=c){d-=c.getPaddingInfo().height}return c.bodyContext.setHeight(d,!c.heightModel.natural)},publishInnerWidth:function(d,c){var a=c-d.getFrameInfo().width,b=d.targetContext;if(b!=d){a-=d.getPaddingInfo().width}d.bodyContext.setWidth(a,!d.widthModel.natural)}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",titleAlign:"left",childEls:["body"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:'<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>',shrinkWrap:3,initComponent:function(){var b=this,e,d,a,c,g;b.addEvents("click","dblclick");b.indicateDragCls=b.baseCls+"-draggable";b.title=b.title||"&#160;";b.tools=b.tools||[];b.items=b.items||[];b.orientation=b.orientation||"horizontal";b.dock=(b.dock)?b.dock:(b.orientation=="horizontal")?"top":"left";b.addClsWithUI([b.orientation,b.dock]);if(b.indicateDrag){b.addCls(b.indicateDragCls)}if(!Ext.isEmpty(b.iconCls)||!Ext.isEmpty(b.icon)){b.initIconCmp();b.items.push(b.iconCmp)}if(b.orientation=="vertical"){b.layout={type:"vbox",align:"center"};b.textConfig={width:16,cls:b.baseCls+"-text",type:"text",text:b.title,rotate:{degrees:90}};c=b.ui;if(Ext.isArray(c)){c=c[0]}e="."+b.baseCls+"-text-"+c;if(Ext.scopeResetCSS){e="."+Ext.baseCSSPrefix+"reset "+e}d=Ext.util.CSS.getRule(e);if(d){a=d.style}else{a=(g=Ext.resetElement.createChild({style:"position:absolute",cls:b.baseCls+"-text-"+c})).getStyles("fontFamily","fontWeight","fontSize","color");g.remove()}if(a){Ext.apply(b.textConfig,{"font-family":a.fontFamily,"font-weight":a.fontWeight,"font-size":a.fontSize,fill:a.color})}b.titleCmp=new Ext.draw.Component({width:16,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:b.id+"_hd",autoSize:true,items:b.textConfig,xhooks:{setSize:function(h){this.callParent([h])}},childEls:[{name:"textEl",select:"."+b.baseCls+"-text"}]})}else{b.layout={type:"hbox",align:"middle"};b.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:b.id+"_hd",style:"text-align:"+b.titleAlign,cls:b.baseCls+"-text-container",renderTpl:b.getTpl("headingTpl"),renderData:{title:b.title,cls:b.baseCls,ui:b.ui},childEls:["textEl"]})}b.items.push(b.titleCmp);b.items=b.items.concat(b.tools);b.callParent();b.on({dblclick:b.onDblClick,click:b.onClick,element:"el",scope:b})},initIconCmp:function(){var b=this,a={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[b.baseCls+"-icon",b.iconCls],id:b.id+"-iconEl",iconCls:b.iconCls};if(!Ext.isEmpty(b.icon)){delete a.iconCls;a.src=b.icon}b.iconCmp=new Ext.Img(a)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(g,d[c])){g.push(d[c])}}e.bodyCls=g.join(" ")}else{e.bodyCls=d.join(" ")}return a},removeUIClsFromElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(g,d[c])}e.bodyCls=g.join(" ")}return a},addUIToElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");if(!Ext.Array.contains(c,a)){c.push(a)}b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+"-text-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+"-text-"+b.ui)}},onClick:function(a){this.fireClickEvent("click",a)},onDblClick:function(a){this.fireClickEvent("dblclick",a)},fireClickEvent:function(a,c){var b="."+Ext.panel.Tool.prototype.baseCls;if(!c.getTarget(b)){this.fireEvent(a,this,c)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this,b,a;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";b=c.titleCmp.surface.items.items[0];a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d;c.titleCmp.textEl.update(c.title||"&#160;")}c.titleCmp.updateLayout()}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.title=d}},getMinWidth:function(){var e=this,d=e.titleCmp.textEl.dom,a,g=e.tools,b,c;d.style.display="inline";a=d.offsetWidth;d.style.display="";if(g&&(b=g.length)){for(c=0;c<b;c++){if(g[c].el){a+=g[c].el.dom.offsetWidth}}}if(e.iconCmp){a+=e.iconCmp.el.dom.offsetWidth}return a+10},setIconCls:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.iconCls=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.removeCls(c.iconCls);c.addCls(a);c.iconCls=a}}}},setIcon:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.icon=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.setSrc(b.icon)}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent(arguments);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyCls:this.bodyCls})}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(l){var g=this.target,k=l.length,n,h,b,e,c,a,d,m;for(e=0;e<k;e++){n=l[e].attrs;for(h in n){if(n.hasOwnProperty(h)){a=n[h].length;for(c=0;c<a;c++){b=n[h][c];d=b[0];m=b[1];if(h==="x"){d.setX(m)}else{if(h==="y"){d.setY(m)}else{if(h==="scrollTop"){d.scrollTo("top",m)}else{if(h==="scrollLeft"){d.scrollTo("left",m)}else{if(h==="width"){d.setWidth(m)}else{if(h==="height"){d.setHeight(m)}else{d.setStyle(h,m)}}}}}}}}}}}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,h){var b=[],g=this.target.elements,e=g.length,c,d;for(c=0;c<e;c++){d=g[c];if(d){d=this.target.getElement(d);b.push([d,this.getElVal(d,a,h)])}}return b}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;switch(a){case"rotate":case"rotation":c=b.attr.rotation;return{x:c.x||0,y:c.y||0,degrees:c.degrees||0};case"scale":case"scaling":c=b.attr.scaling;return{x:c.x||1,y:c.y||1,cx:c.cx||0,cy:c.cy||0};case"translate":case"translation":c=b.attr.translation;return{x:c.x||0,y:c.y||0};default:return b.attr[a]}},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(m){var g=m.length,k=[],b,e,p,r,q,o,n,d,c,l,h,a;for(d=0;d<g;d++){b=m[d].attrs;for(e in b){p=b[e];a=p.length;for(c=0;c<a;c++){q=p[c][0];r=p[c][1];if(e==="translate"||e==="translation"){n={x:r.x,y:r.y}}else{if(e==="rotate"||e==="rotation"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={degrees:r.degrees,x:l,y:h}}else{if(e==="scale"||e==="scaling"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={x:l,y:h,cx:r.cx,cy:r.cy}}else{if(e==="width"||e==="height"||e==="x"||e==="y"){n=parseFloat(r)}else{n=r}}}}o=Ext.Array.indexOf(k,q);if(o==-1){k.push([q,{}]);o=k.length-1}k[o][1][e]=n}}}g=k.length;for(d=0;d<g;d++){k[d][0].setAttributes(k[d][1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,h){var b=[],g=[].concat(this.target.items),e=g.length,d,c;for(d=0;d<e;d++){c=g[d];b.push([c,h!=undefined?h:this.getFromPrim(c,a)])}return b}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(t,e,b){var r=this,m=r.target,q=t.length,v,n,a,g,d,p,l,c,s,u,k;for(g=0;g<q;g++){v=t[g].attrs;for(n in v){l=v[n].length;p={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<l;d++){a=v[n][d];p[r.compMethod[n]].target=a[0];p[r.compMethod[n]][n]=a[1]}if(p.setPosition.target){a=p.setPosition;c=(a.left===undefined)?undefined:parseFloat(a.left);s=(a.top===undefined)?undefined:parseFloat(a.top);a.target.setPosition(c,s)}if(p.setPagePosition.target){a=p.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(p.setSize.target){a=p.setSize;u=(a.width===undefined)?a.target.getWidth():parseFloat(a.width);k=(a.height===undefined)?a.target.getHeight():parseFloat(a.height);if(b||r.dynamic){a.target.setSize(u,k)}else{a.target.el.setSize(u,k)}}if(p.setOpacity.target){a=p.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.ElementCSS","Ext.fx.target.CompositeElement","Ext.fx.target.CompositeElementCSS","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=new Ext.util.MixedCollection();this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(d){if(d.tagName||Ext.isString(d)||d.isFly){d=Ext.get(d);a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.dom){a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.isComposite){a=new Ext.fx.target["CompositeElement"+(c?"CSS":"")](d)}else{if(d.isSprite){a=new Ext.fx.target.Sprite(d)}else{if(d.isCompositeSprite){a=new Ext.fx.target.CompositeSprite(d)}else{if(d.isComponent){a=new Ext.fx.target.Component(d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c.id,c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(d){var c=this,b=c.items,a=c.task;b.removeAtKey(d.id);if(a&&!b.length){Ext.TaskManager.stop(a);delete c.task}},runner:function(){var d=this,b=d.items.getRange(),c=0,a=b.length,e;d.targetArr={};d.timestamp=new Date();for(;c<a;c++){e=b[c];if(e.isReady()){d.startAnim(e)}}for(c=0;c<a;c++){e=b[c];if(e.isRunning()){d.runAnim(e)}}d.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(e){if(!e){return}var d=this,b=e.target.getId(),h=d.useCSS3&&e.target.type=="element",a=d.timestamp-e.startTime,c=(a>=e.duration),g,i;g=this.collectTargetData(e,a,h,c);if(h){e.target.setAttr(g.anims[e.id].attributes,true);d.collectTargetData(e,e.duration,h,c);e.paused=true;g=e.target.target;if(e.target.isComposite){g=e.target.target.last()}i={};i[Ext.supports.CSS3TransitionEnd]=e.lastFrame;i.scope=e;i.single=true;g.on(i)}},collectTargetData:function(c,a,e,g){var b=c.target.getId(),d=this.targetArr[b];if(!d){d=this.targetArr[b]={id:b,el:c.target,anims:{}}}d.anims[c.id]={id:c.id,anim:c,elapsed:a,isLastFrame:g,attributes:[{duration:c.duration,easing:(e&&c.reverse)?c.easingFn.reverse().toCSS3():c.easing,attrs:c.runAnim(a)}]};return d},applyPendingAttrs:function(){var e=this.targetArr,g,c,b,d,a;for(c in e){if(e.hasOwnProperty(c)){g=e[c];for(a in g.anims){if(g.anims.hasOwnProperty(a)){b=g.anims[a];d=b.anim;if(b.attributes&&d.isRunning()){g.el.setAttr(b.attributes,false,b.isLastFrame);if(b.isLastFrame){d.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,o,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e<j;e++){o=(n[e-1])?c*(n[e-1].pct/100):0;a=c*(n[e].pct/100);k.timeline.push({duration:a-o,attrs:n[e].attrs})}},applyAnimator:function(e){var k=this,l=[],o=k.timeline,g=k.reverse,j=o.length,b,h,a,d,n,m,c;if(k.fireEvent("beforeanimate",k)!==false){for(c=0;c<j;c++){b=o[c];n=b.attrs;h=n.easing||k.easing;a=n.damper||k.damper;delete n.easing;delete n.damper;b=new Ext.fx.Anim({target:e,easing:h,damper:a,duration:b.duration,paused:true,to:n});l.push(b)}k.animations=l;k.target=b.target;for(c=0;c<j-1;c++){b=l[c];b.nextAnim=l[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},k)}l[j-1].on("afteranimate",function(){this.lastFrame()},k)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return false}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(o,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,p=1-h-k;function g(q){return((a*q+l)*q+j)*q}function c(q,s){var r=e(q,s);return((p*r+k)*r+h)*r}function e(q,y){var w,v,t,r,u,s;for(t=q,s=0;s<8;s++){r=g(t)-q;if(Math.abs(r)<y){return t}u=(3*a*t+2*l)*t+j;if(Math.abs(u)<0.000001){break}t=t-r/u}w=0;v=1;t=q;if(t<w){return w}if(t>v){return v}while(w<v){r=g(t);if(Math.abs(r-q)<y){return t}if(q>r){w=t}else{v=t}t=(v-w)/2+w}return t}return c(o,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,o=g(0.0066+i*i),r=o-i,k=d(a(r),1/3)*(r<0?-1:1),p=-o-i,j=d(a(p),1/3)*(p<0?-1:1),s=k+j+0.25;return d(1-s,2)*3*s*0.1+(1-s)*3*s*s+s*s*s},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(r){var l=0.48-r/1.04,k=g(0.1734+l*l),i=k-l,p=d(a(i),1/3)*(i<0?-1:1),o=-k-l,m=d(a(o),1/3)*(o<0?-1:1),j=p+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,o=0,c=0.5*(m+d);if(d!=m){o=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,o,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b),g,d,a,c;if(Ext.isArray(e)){g=parseInt(e[2],10);d=parseInt(e[3],10);a=parseInt(e[4],10);c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return b}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:new Ext.draw.Color(e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,o,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(o==0||g==null){k=[d,d,d]}else{g/=60;a=o*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return new Ext.draw.Color(k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",a.x,a.y,a.width+a.x,a.height+a.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,o=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];o=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":o=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=o;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;o=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],p=0,o=0,t=0,s=0,c=0,a,q,h,g,e,m,u,l,b;if(d[0][0]=="M"){p=d[0][1];o=d[0][2];t=p;s=o;c++;n.push(["M",p,o])}for(h=c,u=d.length;h<u;h++){a=n[h]=[];q=d[h];if(q[0]!=q[0].toLowerCase()){a[0]=q[0].toLowerCase();switch(a[0]){case"a":a[1]=q[1];a[2]=q[2];a[3]=q[3];a[4]=q[4];a[5]=q[5];a[6]=+(q[6]-p).toFixed(3);a[7]=+(q[7]-o).toFixed(3);break;case"v":a[1]=+(q[1]-o).toFixed(3);break;case"m":t=q[1];s=q[2];default:for(g=1,l=q.length;g<l;g++){a[g]=+(q[g]-((g%2)?p:o)).toFixed(3)}}}else{a=n[h]=[];if(q[0]=="m"){t=q[1]+p;s=q[2]+o}for(e=0,b=q.length;e<b;e++){n[h][e]=q[e]}}m=n[h].length;switch(n[h][0]){case"z":p=t;o=s;break;case"h":p+=+n[h][m-1];break;case"v":o+=+n[h][m-1];break;default:p+=+n[h][m-2];o+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length;b--}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(r,l){var j=this,d=j.pathToAbsolute(r),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,s){if(p[s].length>7){p[s].shift();var t=p[s];while(t.length){Ext.Array.splice(p,s++,0,["C"].concat(Ext.Array.splice(t,0,6)))}Ext.Array.erase(p,s,1);o=Math.max(d.length,m.length||0)}},c=function(v,u,s,p,t){if(v&&u&&v[t][0]=="M"&&u[t][0]!="M"){Ext.Array.splice(u,t,0,["M",p.x,p.y]);s.bx=0;s.by=0;s.x=v[t][1];s.y=v[t][2];o=Math.max(d.length,m.length||0)}},h,o,g,q,e,k;for(h=0,o=Math.max(d.length,m.length||0);h<o;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);g=d[h];q=m[h];e=g.length;k=q.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(q[k-4])||a.x);a.by=(parseFloat(q[k-3])||a.y);a.x=q[k-2];a.y=q[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(v,ah,J,H,B,o,j,u,ag,C){var z=this,e=Math.PI,A=z.radian,G=e*120/180,b=A*(+B||0),O=[],L=Math,V=L.cos,a=L.sin,X=L.sqrt,w=L.abs,p=L.asin,K,c,r,Q,P,ac,d,T,W,E,D,n,m,s,l,af,g,ae,R,U,S,ad,ab,aa,Y,N,Z,M,F,I,q;if(!C){K=z.rotate(v,ah,-b);v=K.x;ah=K.y;K=z.rotate(u,ag,-b);u=K.x;ag=K.y;c=V(A*B);r=a(A*B);Q=(v-u)/2;P=(ah-ag)/2;ac=(Q*Q)/(J*J)+(P*P)/(H*H);if(ac>1){ac=X(ac);J=ac*J;H=ac*H}d=J*J;T=H*H;W=(o==j?-1:1)*X(w((d*T-d*P*P-T*Q*Q)/(d*P*P+T*Q*Q)));E=W*J*P/H+(v+u)/2;D=W*-H*Q/J+(ah+ag)/2;n=p(((ah-D)/H).toFixed(7));m=p(((ag-D)/H).toFixed(7));n=v<E?e-n:n;m=u<E?e-m:m;if(n<0){n=e*2+n}if(m<0){m=e*2+m}if(j&&n>m){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=C[0];m=C[1];E=C[2];D=C[3]}s=m-n;if(w(s)>G){F=m;I=u;q=ag;m=n+G*(j&&m>n?1:-1);u=E+J*V(m);ag=D+H*a(m);O=z.arc2curve(u,ag,J,H,B,0,j,I,q,[m,F,E,D])}s=m-n;l=V(n);af=a(n);g=V(m);ae=a(m);R=L.tan(s/4);U=4/3*J*R;S=4/3*H*R;ad=[v,ah];ab=[v+U*af,ah-S*l];aa=[u+U*ae,ag-S*g];Y=[u,ag];ab[0]=2*ad[0]-ab[0];ab[1]=2*ad[1]-ab[1];if(C){return[ab,aa,Y].concat(O)}else{O=[ab,aa,Y].concat(O).join().split(",");N=[];M=O.length;for(Z=0;Z<M;Z++){N[Z]=Z%2?z.rotate(O[Z-1],O[Z],b).y:z.rotate(O[Z],O[Z+1],b).x}return N}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,o=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!o&&!l){return this.pathToAbsolute(k.attr.path)}o=o||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+o;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+o;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(m){if(!m||!(m+"")){return{x:0,y:0,width:0,height:0}}m=this.path2curve(m);var k=0,j=0,d=[],b=[],e=0,h=m.length,c,a,l,g;for(;e<h;e++){c=m[e];if(c[0]=="M"){k=c[1];j=c[2];d.push(k);b.push(j)}else{g=this.curveDim(k,j,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(g.min.x,g.max.x);b=b.concat(g.min.y,g.max.y);k=c[5];j=c[6]}}a=Math.min.apply(0,d);l=Math.min.apply(0,b);return{x:a,y:l,path:m,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-l}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(o,c){var n=this,k=0,m=c.length,h=c[m-1],q=o,g,r,l,p,a,b,d;for(;k<m;++k){g=c[k];b=q;q=[];r=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}q.push(l)}else{if(n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}}r=l}h=g}return q},bezier:function(h,g,m,l,e){if(e===0){return h}else{if(e===1){return l}}var j=1-e,i=j*j*j,k=e/j;return i*(h+k*(3*g+k*(3*m+l*k)))},bezierDim:function(t,q,n,m){var v=[],g,j,p,h,u,e,w,k,o,l;if(t+3*n==m+3*q){g=t-q;g/=2*(t-q-q+n);if(g<1&&g>0){v.push(g)}}else{j=t-3*q+3*n-m;p=2*(t-q-q+n);h=t-q;u=p*p-4*j*h;e=j+j;if(u===0){g=p/e;if(g<1&&g>0){v.push(g)}}else{if(u>0){w=Math.sqrt(u);g=(w+p)/e;if(g<1&&g>0){v.push(g)}g=(p-w)/e;if(g<1&&g>0){v.push(g)}}}}k=Math.min(t,m);o=Math.max(t,m);for(l=0;l<v.length;l++){k=Math.min(k,this.bezier(t,q,n,m,v[l]));o=Math.max(o,this.bezier(t,q,n,m,v[l]))}return[k,o]},curveDim:function(b,a,d,c,k,j,h,e){var i=this.bezierDim(b,d,k,h),g=this.bezierDim(a,c,j,e);return{min:{x:i[0],y:g[0]},max:{x:i[1],y:g[1]}}},getAnchors:function(e,d,k,j,v,u,q){q=q||4;var i=Math,p=i.PI,r=p/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,t,s,h,l,o,n,x,w,c;t=(k-e)/q;s=(v-k)/q;if((j>=d&&j>=u)||(j<=d&&j<=u)){h=l=r}else{h=g((k-e)/m(j-d));if(d<j){h=p-h}l=g((v-k)/m(j-u));if(u<j){l=p-l}}c=r-((h+l)%(p*2))/2;if(c>r){c-=p}h+=c;l+=c;o=k-t*a(h);n=j+t*b(h);x=k+s*a(l);w=j+s*b(l);if((j>d&&n<d)||(j<d&&n>d)){o+=m(d-n)*(o-k)/(n-j);n=d}if((j>u&&w<u)||(j<u&&w>u)){x-=m(u-w)*(x-k)/(w-j);w=u}return{x1:o,y1:n,x2:x,y2:w}},smooth:function(a,r){var q=this.path2curve(a),e=[q[0]],k=q[0][1],h=q[0][2],s,u,v=1,l=q.length,g=1,n=k,m=h,c=0,b=0,A,z,w,o,t,p,d;for(;v<l;v++){A=q[v];z=A.length;w=q[v-1];o=w.length;t=q[v+1];p=t&&t.length;if(A[0]=="M"){n=A[1];m=A[2];s=v+1;while(q[s][0]!="C"){s++}c=q[s][5];b=q[s][6];e.push(["M",n,m]);g=e.length;k=n;h=m;continue}if(A[z-2]==n&&A[z-1]==m&&(!t||t[0]=="M")){d=e[g].length;u=this.getAnchors(w[o-2],w[o-1],n,m,e[g][d-2],e[g][d-1],r);e[g][1]=u.x2;e[g][2]=u.y2}else{if(!t||t[0]=="M"){u={x1:A[z-2],y1:A[z-1]}}else{u=this.getAnchors(w[o-2],w[o-1],A[z-2],A[z-1],t[p-2],t[p-1],r)}}e.push(["C",k,h,u.x1,u.y1,A[z-2],A[z-1]]);k=u.x2;h=u.y2}return e},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(r,s,d,n){if(Ext.isDate(r)){return this.snapEndsByDate(r,s,d)}var c=(s-r)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),t,p=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],h=0,q,k,j,g,l=1000000000,o=b.length;t=r=Math.floor(r/e)*e;if(n){for(j=0;j<o;j++){q=b[j][0];k=(q-p)<0?1000000:(q-p)/b[j][1];if(k<l){g=q;l=k}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+g*Math.pow(10,a-2);while(t<s){t+=c;h++}s=+t.toFixed(10)}else{h=d}return{from:r,to:s,power:a,step:c,steps:h}},snapEndsByDate:function(k,l,b,m){var e=false,h=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],g=h.length,i=false,c,d,a,n;for(n=0;n<g;n++){c=h[n];if(!i){for(d=0;d<c[1].length;d++){if(l<Ext.Date.add(k,c[0],c[1][d]*b)){e=[c[0],c[1][d]];i=true;break}}}}if(!e){a=this.snapEnds(k.getFullYear(),l.getFullYear()+1,b,m);e=[Date.YEAR,Math.round(a.step)]}return this.snapEndsByDateAndStep(k,l,e,m)},snapEndsByDateAndStep:function(i,h,e,a){var d=[i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()],b=0,g,c;if(a){g=i}else{switch(e[0]){case Ext.Date.MILLI:g=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:g=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:g=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:g=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:g=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:g=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:g=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=g;while(c<h){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=h}return{from:+g,to:+c,step:(c-g)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(o[e][1])&&Ext.isArray(b)){l=[];c=0;g=o[e][1].length;for(;c<g;c++){l.push(this.computeDelta(o[e][1][c],b[c],a,h,k))}d.push([o[e][0],l])}else{d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+a[b].delta*g+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+a.delta*g+(a.units||0)])}}return c}},stringHandler:{computeDelta:function(e,b,d,c,a){return{from:e,delta:b}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];c.push([l[d][0],a.delta])}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(e,a){a=(typeof a=="number")?a:1;var g=false,c=[this.hexRE,this.rgbRE,this.hex3RE],d=c.length,j,b,k,h;for(h=0;h<d;h++){k=c[h];b=(h%2===0)?16:10;j=k.exec(e);if(j&&j.length===4){if(h===2){j[1]+=j[1];j[2]+=j[2];j[3]+=j[3]}g={red:parseInt(j[1],b),green:parseInt(j[2],b),blue:parseInt(j[3],b)};break}}return g||e},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseFloat(d[c])*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=j[a]+k[a]*g}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,q){var c=this.forcePath(l),n=[],s=b.length,d,h,o,g,p,m,e,t,r;for(o=0;o<s;o++){r=this.forcePath(b[o][1]);g=Ext.draw.Draw.interpolatePaths(r,c);r=g[0];c=g[1];d=r.length;t=[];for(m=0;m<d;m++){g=[r[m][0]];h=r[m].length;for(e=1;e<h;e++){p=q&&q[0][1][m][e].from;g.push(this.computeDelta(r[m][e],c[m][e],a,p))}t.push(g)}n.push([b[o][0],t])}return n},set:function(p,n){var o=p.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<o;h++){c=p[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([p[h][0],l.join(",")])}return e}}}},function(){var b=["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],c=b.length,a=0,d;for(;a<c;a++){d=b[a];this[d]=this.color}b=["cursor"];c=b.length;a=0;for(;a<c;a++){d=b[a];this[d]=this.stringHandler}});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return new Ext.fx.Animator(a)}Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b);Ext.fx.Manager.addAnim(b)},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true;e.frameCount=0}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}i.frameCount++;return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},endWasCalled:0,end:function(){if(this.endWasCalled++){return}var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime);Ext.callback(a.callback,a.scope,[a,a.startTime])},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom,l,h,e;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}h=k.y-j.y;e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl(),b,a,g;if(!this.DDMInstance.verifyEl(e)){return}b=d||0;a=c||0;g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(b,a){if(this.primaryButtonOnly&&b.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);if(this.hasOuterHandles||this.DDMInstance.isOverTarget(b.getPoint(),this)){if(this.clickValidator(b)){this.setStartPosition();this.b4MouseDown(b);this.onMouseDown(b);this.DDMInstance.handleMouseDown(b,this);this.DDMInstance.stopEvent(b)}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true,h,b,a;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={},b;for(b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={},b;for(b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0,a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{var b,a,c,g,e;for(b=0,a=d.length;b<a;++b){c=b+1;if(d[c]&&d[c]>=h){g=h-d[b];e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX,d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j,a,k,h;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);k=d.getLocalX();h=d.getLocalY();this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight(),b=Ext.Element.getViewWidth(),p=this.DDMInstance.getScrollTop(),d=this.DDMInstance.getScrollLeft(),j=e+k,o=m+l,i=(n+p-k-this.deltaY),g=(b+d-l-this.deltaX),c=40,a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX,d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body,d,c;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl(),a=this.getDragEl(),b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl(),a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],constructor:function(a){var b=this;a=a||{};Ext.apply(b,{hideMode:"visibility",hidden:true,floating:true,id:b.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:a.shadow||false,renderTo:Ext.getDetachedBody()});b.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(b){var c=this,a=Ext.baseCSSPrefix+"dd-drag-proxy ";c.el.replaceCls(a+c.dropAllowed,a+c.dropNotAllowed);c.dropStatus=c.dropNotAllowed;if(b){c.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(a){this.callParent();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(c,d,a){var b=this;b.callback=d;b.scope=a;if(c&&b.animRepair!==false){b.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");b.el.hideUnders(true);b.anim=b.el.animate({duration:b.repairDuration||500,easing:"ease-out",to:{x:c[0],y:c[1]},stopAnimation:true,callback:b.afterRepair,scope:b})}else{b.afterRepair()}},afterRepair:function(){var a=this;a.hide(true);a.el.removeCls(Ext.baseCSSPrefix+"dd-drag-repair");if(typeof a.callback=="function"){a.callback.call(a.scope||a)}delete a.callback;delete a.scope}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d),a;this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d),a;if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){if(!a){a=b;b=null;c=a.getTarget().id}this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(a,b){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(a,b){var c=this;c.panel=a;c.id=c.panel.id+"-ddproxy";Ext.apply(c,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var a=this;if(a.ghost){if(a.proxy){a.proxy.remove();delete a.proxy}a.panel.unghost(null,a.moveOnDrag);delete a.ghost}},show:function(){var b=this,a;if(!b.ghost){a=b.panel.getSize();b.panel.el.setVisibilityMode(Ext.Element.DISPLAY);b.ghost=b.panel.ghost();if(b.insertProxy){b.proxy=b.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});b.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();Ext.callback(c,a||this)},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){var c=this;c.panel=b;c.dragData={panel:b};c.panelProxy=new Ext.panel.Proxy(b,a);c.proxy=c.panelProxy.proxy;c.callParent([b.el,a]);c.setupEl(b)},setupEl:function(a){var c=this,d=a.header,b=a.body;if(d){c.setHandleElId(d.id);b=d.el}if(b){b.setStyle("cursor","move");c.scroll=false}else{a.on("boxready",c.setupEl,c,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.panelProxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.panelProxy.ghost.el.dom},endDrag:function(a){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)},onInvalidDrop:function(c,b,d){var a=this;a.beforeInvalidDrop(c,b,d);if(a.cachedTarget){if(a.cachedTarget.isNotifyTarget){a.cachedTarget.notifyOut(a,b,a.dragData)}a.cacheTarget=null}if(a.afterInvalidDrop){a.afterInvalidDrop(b,d)}}});Ext.define("Ext.util.Memento",(function(){function d(i,h,j,g){i[g?g+j:j]=h[j]}function c(h,g,i){delete h[i]}function e(k,j,l,i){var g=i?i+l:l,h=k[g];if(h||k.hasOwnProperty(g)){a(j,l,h)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(h,m,l,i,j){if(m){if(Ext.isArray(i)){var k,g=i.length;for(k=0;k<g;k++){h(m,l,i[k],j)}}else{h(m,l,i,j)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,j,i){var h=this;b(d,h.data||(h.data={}),j||h.target,g,i)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,j,i){b(e,this.data,j||this.target,h,i);if(g!==false){this.remove(h)}},restoreAll:function(g,k){var i=this,h=k||this.target,j=i.data,l;for(l in j){if(j.hasOwnProperty(l)){a(h,l,j[l])}}if(g!==false){delete i.data}}}}()));Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",placeholderCollapseHideMode:Ext.Element.VISIBILITY,preventHeader:false,header:undefined,headerPosition:"top",frame:false,frameHeader:true,titleAlign:"left",manageHeight:true,initComponent:function(){var a=this;a.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange");if(a.collapsible){this.addStateEvents(["expand","collapse"])}if(a.unstyled){a.setUI("plain")}if(a.frame){a.setUI(a.ui+"-framed")}a.bridgeToolbars();a.callParent();a.collapseDirection=a.collapseDirection||a.headerPosition||Ext.Component.DIRECTION_TOP;a.hiddenOnCollapse=new Ext.dom.CompositeElement()},beforeDestroy:function(){var a=this;Ext.destroy(a.placeholder,a.ghostPanel,a.dd);a.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(g){var c=this,b=c.title,e=c.header,a=c.reExpander,d=c.placeholder;c.title=g;if(e){if(e.isHeader){e.setTitle(g)}else{e.title=g}}else{c.updateHeader()}if(a){a.setTitle(g)}if(d&&d.setTitle){d.setTitle(g)}c.fireEvent("titlechange",c,g,b)},setIconCls:function(a){var c=this,b=c.iconCls,e=c.header,d=c.placeholder;c.iconCls=a;if(e){if(e.isHeader){e.setIconCls(a)}else{e.iconCls=a}}else{c.updateHeader()}if(d&&d.setIconCls){d.setIconCls(a)}c.fireEvent("iconclschange",c,a,b)},setIcon:function(a){var b=this,c=b.icon,e=b.header,d=b.placeholder;b.icon=a;if(e){if(e.isHeader){e.setIcon(a)}else{e.icon=a}}else{b.updateHeader()}if(d&&d.setIcon){d.setIcon(a)}b.fireEvent("iconchange",b,a,c)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},isPlaceHolderCollapse:function(){return this.collapseMode=="placeholder"},onBoxReady:function(){this.callParent();if(this.collapsed){this.setHiddenDocked()}},beforeRender:function(){var b=this,a;b.callParent();b.initTools();if(!(b.preventHeader||(b.header===false))){b.updateHeader()}if(b.collapsed){if(b.isPlaceHolderCollapse()){b.hidden=true;b.placeholderCollapse();a=b.collapsed;b.collapsed=false}else{b.beginCollapse();b.addClsWithUI(b.collapsedCls)}}if(a){b.collapsed=a}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false||a.preventHeader)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=Ext.widget({xtype:"tool",type:(a.collapsed&&!a.isPlaceHolderCollapse())?("expand-"+a.getOppositeDirection(a.collapseDirection)):("collapse-"+a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,a,[])})}if(a.collapseTool&&!a.collapseFirst){a.addTool(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(d){var c=this,h=c.header,g=c.title,e=c.tools,b=c.icon||c.iconCls,a=c.headerPosition=="left"||c.headerPosition=="right";if((h!==false)&&(d||(g||b)||(e&&e.length)||(c.collapsible&&!c.titleCollapse))){if(h&&h.isHeader){h.show()}else{h=c.header=Ext.widget(Ext.apply({xtype:"header",title:g,titleAlign:c.titleAlign,orientation:a?"vertical":"horizontal",dock:c.headerPosition||"top",textCls:c.headerTextCls,iconCls:c.iconCls,icon:c.icon,baseCls:c.baseCls+"-header",tools:e,ui:c.ui,id:c.id+"_header",indicateDrag:c.draggable,frame:(c.frame||c.alwaysFramed)&&c.frameHeader,ignoreParentFrame:c.frame||c.overlapHeader,ignoreBorderManagement:c.frame||c.ignoreHeaderBorderManagement,listeners:c.collapsible&&c.titleCollapse?{click:c.toggleCollapse,scope:c}:null},c.header));c.addDocked(h,0);c.tools=h.tools}c.initHeaderAria()}else{if(h){h.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header&&a.header.rendered){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){var a=this;return a.body||a.protoBody||a.frameBody||a.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},onRemoved:function(b){var a=this;a.callParent(arguments);if(a.placeholder&&!b){a.ownerCt.remove(a.placeholder,false)}},addTool:function(e){e=[].concat(e);var d=this,g=d.header,c,a=e.length,b;for(c=0;c<a;c++){b=e[c];d.tools.push(b);if(g&&g.isHeader){g.addTool(b)}}d.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var a=this.getCollapsed();return a=="left"||a=="right"},collapsedVertical:function(){var a=this.getCollapsed();return a=="top"||a=="bottom"},restoreDimension:function(){var a=this.collapseDirection;return(a==="top"||a==="bottom")?"height":"width"},getCollapsed:function(){var a=this;if(a.collapsed===true){return a.collapseDirection}return a.collapsed},getState:function(){var a=this,b=a.callParent(),c;b=a.addPropertyToState(b,"collapsed");if(a.collapsed){c=a.collapseMemento;c=c&&c.data;if(a.collapsedVertical()){if(b){delete b.height}if(c){b=a.addPropertyToState(b,"height",c.height)}}else{if(b){delete b.width}if(c){b=a.addPropertyToState(b,"width",c.width)}}}return b},findReExpander:function(h){var g=this,j=Ext.Component,e=g.dockedItems.items,a=e.length,b,d;if(g.collapseMode=="mini"){return}switch(h){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(!b.dock||b.dock=="top"||b.dock=="bottom")){return b}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(b.dock=="left"||b.dock=="right")){return b}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(c){var b=this,d=c||b.collapseDirection,a=b.reExpander||b.findReExpander(d);b.expandDirection=b.getOppositeDirection(d);if(!a){b.reExpander=a=b.createReExpander(d,{dock:d,cls:Ext.baseCSSPrefix+"docked "+b.baseCls+"-"+b.ui+"-collapsed",ownerCt:b,ownerLayout:b.componentLayout});b.dockedItems.insert(0,a)}return a},createReExpander:function(g,e){var d=this,i=g=="left",c=g=="right",h=i||c,b,a=Ext.apply({hideMode:"offsets",title:d.title,orientation:h?"vertical":"horizontal",textCls:d.headerTextCls,icon:d.icon,iconCls:d.iconCls,baseCls:d.baseCls+"-header",ui:d.ui,frame:d.frame&&d.frameHeader,ignoreParentFrame:d.frame||d.overlapHeader,indicateDrag:d.draggable},e);if(d.collapseMode=="mini"){if(h){a.width=1}else{a.height=1}}if(!d.hideCollapseTool){b=i||(c&&d.isPlaceHolderCollapse());a[b?"items":"tools"]=[{xtype:"tool",type:"expand-"+d.getOppositeDirection(g),uiCls:["top"],handler:d.toggleCollapse,scope:d}]}a=new Ext.panel.Header(a);a.addClsWithUI(d.getHeaderCollapsedClasses(a));return a},getHeaderCollapsedClasses:function(d){var b=this,c=b.collapsedCls,a;a=[c,c+"-"+d.dock];if(b.border&&(!b.frame||(b.frame&&Ext.supports.CSS3BorderRadius))){a.push(c+"-border-"+d.dock)}return a},beginCollapse:function(){var e=this,c=e.lastBox,g=e.rendered,b=e.collapseMemento||(e.collapseMemento=new Ext.util.Memento(e)),d=e.getSizeModel(),a;b.capture(["height","minHeight","width","minWidth"]);if(c){b.capture(e.restoreDimension(),c,"last.")}if(e.collapsedVertical()){if(d.width.shrinkWrap){e.width=g?e.getWidth():e.width||e.minWidth||100}delete e.height;e.minHeight=0}else{if(e.collapsedHorizontal()){if(d.height.shrinkWrap){e.height=g?e.getHeight():e.height||e.minHeight||100}delete e.width;e.minWidth=0}}if(e.ownerCt){e.ownerCt.getLayout().beginCollapse(e)}if(!e.isPlaceHolderCollapse()){if(e.header===(a=e.getReExpander())){e.header.addClsWithUI(e.getHeaderCollapsedClasses(e.header));if(e.header.rendered){e.header.updateFrame()}}else{if(a.el){a.el.show();a.hidden=false}}}if(e.resizer){e.resizer.disable()}},beginExpand:function(){var e=this,d=e.lastBox,c=e.collapseMemento,a=this.restoreDimension(),b;c.restore(["minHeight","minWidth",a]);if(d){c.restore(a,true,d,"last.")}if(e.ownerCt){e.ownerCt.getLayout().beginExpand(e)}if(!e.isPlaceHolderCollapse()){if(e.header===(b=e.getReExpander())){e.header.removeClsWithUI(e.getHeaderCollapsedClasses(e.header));if(e.header.rendered){e.header.updateFrame()}}else{b.hidden=true;b.el.hide()}}if(e.resizer){e.resizer.enable()}},collapse:function(d,a){var c=this,e=d||c.collapseDirection,b=c.ownerCt;if(c.isCollapsingOrExpanding){return c}if(arguments.length<2){a=c.animCollapse}if(c.collapsed||c.fireEvent("beforecollapse",c,d,a)===false){return c}if(b&&c.isPlaceHolderCollapse()){return c.placeholderCollapse(d,a)}c.collapsed=e;c.beginCollapse();c.fireHierarchyEvent("collapse");return c.doCollapseExpand(1,a)},doCollapseExpand:function(a,b){var d=this,c=d.animCollapse,e=d.ownerLayout;d.animCollapse=b;d.isCollapsingOrExpanding=a;if(e&&!b){e.onContentChange(d)}else{d.updateLayout({isRoot:true})}d.animCollapse=c;return d},afterCollapse:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("expand-"+a.getOppositeDirection(a.collapseDirection))}if(c&&b){c.onContentChange(a)}a.setHiddenDocked();a.fireEvent("collapse",a)},setHiddenDocked:function(){var h=this,d=h.hiddenOnCollapse,b=h.getReExpander(),c=h.getDockedItems(),a=c.length,e=0,g;d.add(h.body);for(;e<a;e++){g=c[e];if(g&&g!==b&&g.el){d.add(g.el)}}d.setStyle("visibility","hidden")},restoreHiddenDocked:function(){var a=this.hiddenOnCollapse;a.setStyle("visibility","");a.clear()},getPlaceholder:function(c){var b=this,e=c||b.collapseDirection,a=null,d=b.placeholder;if(!d){if(b.floatable||(b.collapsible&&b.titleCollapse)){a={click:{fn:b.floatable?b.floatCollapsedPanel:b.toggleCollapse,element:"el",scope:b}}}b.placeholder=d=Ext.widget(b.createReExpander(e,{id:b.id+"-placeholder",listeners:a}))}if(!d.placeholderFor){if(!d.isComponent){b.placeholder=d=b.lookupComponent(d)}Ext.applyIf(d,{margins:b.margins,placeholderFor:b});d.addCls([Ext.baseCSSPrefix+"region-collapsed-placeholder",Ext.baseCSSPrefix+"region-collapsed-"+e+"-placeholder",b.collapsedCls])}return d},placeholderCollapse:function(e,a){var d=this,c=d.ownerCt,h=e||d.collapseDirection,b=Ext.baseCSSPrefix+"border-region-slide-in",g=d.getPlaceholder(e);d.isCollapsingOrExpanding=1;d.hidden=true;d.collapsed=h;if(g.rendered){if(g.el.dom.parentNode!==d.el.dom.parentNode){d.el.dom.parentNode.insertBefore(g.el.dom,d.el.dom)}g.hidden=false;g.el.show();c.updateLayout()}else{c.insert(c.items.indexOf(d),g)}if(d.rendered){d.el.setVisibilityMode(d.placeholderCollapseHideMode);if(a){d.el.addCls(b);g.el.hide();d.el.slideOut(h.substr(0,1),{preserveScroll:true,duration:Ext.Number.from(a,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(b);g.el.show().setStyle("display","none").slideIn(h.substr(0,1),{easing:"linear",duration:100,listeners:{afteranimate:function(){g.focus();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}})}}})}else{d.el.hide();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}else{d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}return d},floatCollapsedPanel:function(){var g=this,i=g.placeholder,h=i.getBox(true),d,e=Ext.baseCSSPrefix+"border-region-slide-in",b=g.collapsed,j=g.ownerCt||g,a;if(g.el.hasCls(e)){g.slideOutFloatedPanel();return}if(g.isSliding){return}g.isSliding=true;function c(l){if(!g.isDestroyed){var k=g.el.getRegion().union(i.el.getRegion()).adjust(1,-1,-1,1);if(!k.contains(l.getPoint())){g.slideOutFloatedPanel()}}}g.placeholder.el.hide();g.placeholder.hidden=true;g.el.show();g.hidden=false;g.collapsed=false;j.updateLayout();d=g.getBox(true);g.placeholder.el.show();g.placeholder.hidden=false;g.el.hide();g.hidden=true;g.collapsed=b;j.updateLayout();g.placeholderMouseMon=i.el.monitorMouseLeave(500,c);g.panelMouseMon=g.el.monitorMouseLeave(500,c);g.el.addCls(e);if(g.collapseTool){g.collapseTool.el.hide()}switch(g.collapsed){case"top":g.el.setLeftTop(h.x,h.y+h.height-1);a="t";break;case"right":g.el.setLeftTop(h.x-d.width+1,h.y);a="r";break;case"bottom":g.el.setLeftTop(h.x,h.y-d.height+1);a="b";break;case"left":g.el.setLeftTop(h.x+h.width-1,h.y);a="l";break}g.floatedFromCollapse=g.collapsed;g.collapsed=g.hidden=false;g.el.slideIn(a,{preserveScroll:true,listeners:{afteranimate:function(){g.isSliding=false}}})},isLayoutRoot:function(){if(this.floatedFromCollapse){return true}return this.callParent()},slideOutFloatedPanel:function(){var a=this,c=this.el,b;if(a.isSliding){return}a.isSliding=true;a.slideOutFloatedPanelBegin();if(typeof a.collapsed=="string"){b=a.collapsed.charAt(0)}c.slideOut(b,{preserveScroll:true,listeners:{afteranimate:function(){a.slideOutFloatedPanelEnd();a.el.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");a.isSliding=false}}})},slideOutFloatedPanelBegin:function(){var a=this,b=this.el;a.collapsed=a.floatedFromCollapse;a.hidden=true;a.floatedFromCollapse=null;b.un(a.panelMouseMon);a.placeholder.el.un(a.placeholderMouseMon)},slideOutFloatedPanelEnd:function(){if(this.collapseTool){this.collapseTool.el.show()}},expand:function(a){var b=this;if(b.isCollapsingOrExpanding){return b}if(!arguments.length){a=b.animCollapse}if(!b.collapsed&&!b.floatedFromCollapse){return b}if(b.fireEvent("beforeexpand",b,a)===false){return b}if(b.isPlaceHolderCollapse()){return b.placeholderExpand(a)}b.restoreHiddenDocked();b.beginExpand();b.collapsed=false;b.fireHierarchyEvent("expand");return b.doCollapseExpand(2,a)},placeholderExpand:function(b){var d=this,h=d.collapsed,c=Ext.baseCSSPrefix+"border-region-slide-in",e,a,g;if(d.floatedFromCollapse){a=d.getPosition(true);d.slideOutFloatedPanelBegin();d.slideOutFloatedPanelEnd()}d.isCollapsingOrExpanding=2;d.placeholder.hidden=true;d.placeholder.el.hide();d.collapsed=false;d.show();if(b){if(a){e=d.el.getXY();d.el.setLeftTop(a[0],a[1]);d.el.moveTo(e[0],e[1],{duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(c);d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}}})}else{d.hidden=true;d.el.addCls(c);d.el.hide();d.collapsed=h;d.placeholder.show();g=h.substr(0,1);d.hidden=false;d.el.slideIn(g,{preserveScroll:true,duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.collapsed=false;d.el.removeCls(c);d.placeholder.hide();d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}}})}}else{d.isCollapsingOrExpanding=0;d.fireEvent("expand",d)}return d},afterExpand:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("collapse-"+a.collapseDirection)}if(c&&b){c.onContentChange(a)}a.fireEvent("expand",a)},setBorder:function(a,c){if(c){return}var b=this,d=b.header;if(!a){a=0}else{a=Ext.Element.unitizeBox((a===true)?1:a)}if(d){if(d.isHeader){d.setBorder(a)}else{d.border=a}}if(b.rendered&&b.bodyBorder!==false){b.body.setStyle("border-width",a)}b.updateLayout();b.border=a},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(Ext.apply({target:this.el},this.keys)))},initDraggable:function(){this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var e=[],g=this.header,d=g?g.query("tool[hidden=false]"):[],c,a,b;if(d.length){c=0;a=d.length;for(;c<a;c++){b=d[c];e.push({type:b.type})}}else{e=[{type:"placeholder"}]}return e},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=new Ext.panel.Panel({renderTo:document.body,floating:{shadow:false},frame:d.frame&&!d.alwaysFramed,alwaysFramed:d.alwaysFramed,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}else{b.el.show()}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}if(!(d.preventHeader||(d.header===false))){e=b.header;if(e){e.suspendLayouts();Ext.Array.forEach(e.query("tool"),e.remove,e);e.resumeLayouts()}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls)}b.setPagePosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPagePosition(c.ghostPanel.el.getXY());if(c.hideMode=="offsets"){delete c.el.hideModeStyles}}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},beginDrag:function(){if(this.floatingDescendants){this.floatingDescendants.hide()}},endDrag:function(){if(this.floatingDescendants){this.floatingDescendants.show()}},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",alwaysFramed:true,frameHeader:false,initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",autoHide:true,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d,c,n,a,i,l,e,m,k,b,h,g;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;c=j.getOffsets();n=(j.anchorToTarget&&!j.trackMouse)?j.el.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY;a=Ext.Element.getViewWidth()-5;i=Ext.Element.getViewHeight()-5;l=document.documentElement;e=document.body;m=(l.scrollLeft||e.scrollLeft||0)+5;k=(l.scrollTop||e.scrollTop||0)+5;b=[n[0]+c[0],n[1]+c[1]];h=j.getSize();g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onShowVeto:function(){this.callParent();this.clearTimer("show")},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}if(!a.calledFromShowAt){a.showAt(a.getTargetXY())}if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();a.calledFromShowAt=true;if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true);a.el.sync(true);if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}}delete a.calledFromShowAt},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d);c.anchorEl.setStyle("z-index",parseInt(c.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alias:"widget.quicktip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(i){var k=this,j=i.getTarget(k.delegate),a,d,b,h,l,c,n,g,p,m,o;if(k.disabled){return}k.targetXY=i.getXY();if(!j||j.nodeType!==1||j==document.documentElement||j==document.body){return}if(k.activeTarget&&((j==k.activeTarget.el)||Ext.fly(k.activeTarget.el).contains(j))){k.clearTimer("hide");k.show();return}if(j){g=k.targets;for(o in g){if(g.hasOwnProperty(o)){m=g[o];p=Ext.fly(m.target);if(p&&(p.dom===j||p.contains(j))){b=p.dom;break}}}if(b){k.activeTarget=k.targets[b.id];k.activeTarget.el=j;k.anchor=k.activeTarget.anchor;if(k.anchor){k.anchorTarget=j}a=Ext.isDefined(k.activeTarget.showDelay);if(a){d=k.showDelay;k.showDelay=k.activeTarget.showDelay}k.delayShow();if(a){k.showDelay=d}return}}b=Ext.fly(j,"_quicktip-target");h=k.tagConfig;l=h.namespace;c=k.getTipCfg(i);if(c){if(c.target){j=c.target;b=Ext.fly(j,"_quicktip-target")}n=b.getAttribute(l+h.hide);k.activeTarget={el:j,text:c.text,width:+b.getAttribute(l+h.width)||null,autoHide:n!="user"&&n!=="false",title:b.getAttribute(l+h.title),cls:b.getAttribute(l+h.cls),align:b.getAttribute(l+h.align)};k.anchor=b.getAttribute(l+h.anchor);if(k.anchor){k.anchorTarget=j}a=Ext.isDefined(k.activeTarget.showDelay);if(a){d=k.showDelay;k.showDelay=k.activeTarget.showDelay}k.delayShow();if(a){k.showDelay=d}}},onTargetOut:function(g){var c=this,d=c.activeTarget,a,b;if(d&&g.within(c.activeTarget.el)&&!c.getTipCfg(g)){return}c.clearTimer("show");delete c.activeTarget;if(c.autoHide!==false){a=d&&Ext.isDefined(d.hideDelay);if(a){b=c.hideDelay;c.hideDelay=d.hideDelay}c.delayHide();if(a){c.hideDelay=b}}},showAt:function(d){var b=this,c=b.activeTarget,a;if(c){if(!b.rendered){b.render(Ext.getBody());b.activeTarget=c}b.suspendLayouts();if(c.title){b.setTitle(c.title);b.header.show()}else{b.header.hide()}b.update(c.text);b.autoHide=c.autoHide;b.dismissDelay=c.dismissDelay||b.dismissDelay;if(c.mouseOffset){d[0]+=c.mouseOffset[0];d[1]+=c.mouseOffset[1]}a=b.lastCls;if(a){b.removeCls(a);delete b.lastCls}a=c.cls;if(a){b.addCls(a);b.lastCls=a}b.setWidth(c.width);if(b.anchor){b.constrainPosition=false}else{if(c.align){d=b.el.getAlignToXY(c.el,c.align);b.constrainPosition=false}else{b.constrainPosition=true}}b.resumeLayouts(true)}b.callParent([d])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",(function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g,d)});return}var c=Ext.apply({disabled:a,id:"ext-quicktips-tip"},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}()));Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event","Ext.Component"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(l,g,k){var h=this.bus,m=h[l],d,c,b,n,a,e,j;if(m){for(d in m){if(m.hasOwnProperty(d)&&g.is(d)){c=m[d];for(b in c){if(c.hasOwnProperty(b)){n=c[b];for(e=0,j=n.length;e<j;e++){a=n[e];if(a.fire.apply(a,Array.prototype.slice.call(k,1))===false){return false}}}}}}}return true},control:function(l,j,e){var h=this.bus,i,o,g,d,n,c,m,a,b,k;if(Ext.isString(l)){d=l;l={};l[d]=j;this.control(l,null,e);return}i=Ext.util.Observable.HasListeners.prototype;for(d in l){if(l.hasOwnProperty(d)){b=l[d]||{};for(k in b){if(b.hasOwnProperty(k)){n={};c=b[k];m=e;a=new Ext.util.Event(e,k);if(Ext.isObject(c)){n=c;c=n.fn;m=n.scope||e;delete n.fn;delete n.scope}a.addListener(c,m,n);i[k]=1;o=h[k]||(h[k]={});o=o[d]||(o[d]={});g=o[e.id]||(o[e.id]=[]);g.push(a)}}}}}});Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var g=this,l=b.requires||[],a,e,c,d,k,j,h;Ext.Loader.setPath(g.name,g.appFolder);if(g.paths){k=g.paths;for(h in k){if(k.hasOwnProperty(h)){j=k[h];Ext.Loader.setPath(h,j)}}}g.callParent(arguments);g.eventbus=new Ext.app.EventBus;a=Ext.Array.from(g.controllers);e=a&&a.length;g.controllers=new Ext.util.MixedCollection();if(g.autoCreateViewport){l.push(g.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){l.push(g.getModuleClassName(a[c],"controller"))}Ext.require(l);Ext.onReady(function(){g.init(g);for(c=0;c<e;c++){d=g.getController(a[c]);d.init(g)}g.onBeforeLaunch.call(g)},g)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){var b=this,e,g,d,a;if(b.enableQuickTips){Ext.tip.QuickTipManager.init()}if(b.autoCreateViewport){b.getView("Viewport").create()}b.launch.call(this.scope||this);b.launched=true;b.fireEvent("launch",this);e=b.controllers.items;d=e.length;for(g=0;g<d;g++){a=e[g];a.onLaunch(this)}},getModuleClassName:function(a,b){if(a.indexOf(".")!==-1&&(Ext.ClassManager.isCreated(a)||Ext.Loader.isAClassNameWithAKnownPrefix(a))){return a}else{return this.name+"."+b+"."+a}},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:"Ext.button.Button",alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler(c)}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:"Ext.button.Split",alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var g=this,e=0,b,c,a,d;g.addEvents("change");if(g.changeHandler){g.on("change",g.changeHandler,g.scope||g);delete g.changeHandler}b=(g.menu.items||[]).concat(g.items||[]);g.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},g.menu);a=b.length;for(c=0;c<a;c++){d=b[c];d=Ext.applyIf({group:g.id,itemIndex:c,checkHandler:g.checkHandler,scope:g,checked:d.checked||false},d);g.menu.items.push(d);if(d.checked){e=c}}g.itemCount=g.menu.items.length;g.callParent(arguments);g.on("click",g.toggleSelected,g);g.setActiveItem(e,g);if(g.width&&g.showText){g.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var v=this,m=v.items,a=v.chart.animate,u=v.callouts,h=u.styles,e=v.calloutsArray,b=v.chart.store,s=b.getCount(),d=m.length/s,l=[],r,c,q,n,t,g,k,o;for(r=0,c=0;r<s;r++){for(q=0;q<d;q++){t=m[c];g=e[c];k=b.getAt(r);o=u.filter(k);if(!o&&!g){c++;continue}if(!g){e[c]=g=v.onCreateCallout(k,t,r,o,q,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!o){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}u.renderer(g,k);v.onPlaceCallout(g,k,t,r,o,a,q,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,o=d.styles,c=o.width,m=o.height,h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},o));if(d.items){a.panel=new Ext.Panel({style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!c.viewBox){if(c.autoSize){return d.width+a.width}else{return d.x+d.width+a.width}}else{if(b.heightModel.shrinkWrap){return a.width}else{return d.width/d.height*(b.getProp("contentHeight")-a.height)+a.width}}},measureContentHeight:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!b.target.viewBox){if(c.autoSize){return d.height+a.height}else{return d.y+d.height+a.height}}else{if(b.widthModel.shrinkWrap){return a.height}else{return d.height/d.width*(b.getProp("contentWidth")-a.width)+a.height}}},getBBox:function(a){var b=a.surfaceBBox;if(!b){b=a.target.surface.items.getBBox();if(b.width===-Infinity&&b.height===-Infinity){b.width=b.height=b.x=b.y=0}a.surfaceBBox=b}return b},publishInnerWidth:function(b,a){b.setContentWidth(a-b.getFrameInfo().width,true)},publishInnerHeight:function(b,a){b.setContentHeight(a-b.getFrameInfo().height,true)},finishedLayout:function(c){var b=c.props,a=c.getPaddingInfo();this.owner.setSurfaceSize(b.contentWidth-a.width,b.contentHeight-a.height);this.callParent(arguments)}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},autoDestroy:false,isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el&&!n.bboxExcluded){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var d=this,a=d.getSurface(),c=d.autoDestroy,b;if(a){while(d.getCount()>0){b=d.first();d.remove(b);a.remove(b,c)}}d.clearListeners()}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]!==false){return Ext.create("Ext.draw.engine."+d[c],b)}}return false},save:function(a,b){b=b||{};var e={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},d=e[b.type]||"Svg",c=Ext.draw.engine[d+"Exporter"];return c.generate(a,b)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"none","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click","dblclick");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){if(this.hasOwnProperty("gradients")){var a=this.gradients,d=a.length,b=this.addGradient,c;if(a){for(c=0;c<d;c++){if(b.call(this,a[c],c,d)===false){break}}}}},initItems:function(){var a=this.items;this.items=new Ext.draw.CompositeSprite();this.items.autoDestroy=true;this.groups=new Ext.draw.CompositeSprite();if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,g,h,c;if(Ext.isString(b)){b={fill:b}}if(b){if(b.gradient){h=b.gradient;g=h.id;e.addGradient(h);e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:"url(#"+g+")",zIndex:-1})}else{if(b.fill){e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:b.fill,zIndex:-1})}else{if(b.image){e.background=e.add({type:"image",x:0,y:0,width:d,height:a,src:b.image,zIndex:-1})}}}e.background.bboxExcluded=true}},setSize:function(a,b){this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onDblClick:function(a){this.processEvent("dblclick",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var g=Array.prototype.slice.call(arguments),j,d,a=g.length>1,h,b,c,e,k;if(a||Ext.isArray(g[0])){h=a?g:g[0];b=[];for(c=0,e=h.length;c<e;c++){k=h[c];k=this.add(k);b.push(k)}return b}j=this.prepareItems(g[0],true)[0];this.insertByZIndex(j);this.onAdd(j);return j},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(b,e){if(b){this.items.remove(b);var a=[].concat(this.groups.items),d=a.length,c;for(c=0;c<d;c++){a[c].remove(b)}b.onRemove();if(e===true){b.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width||1,h=d.height||1,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;k=Math.min(c,i);if(j*k<a){g-=(a-j*k)/2/k}if(b*k<h){e-=(h-b*k)/2/k}d.viewBoxShift={dx:-g,dy:-e,scale:k};if(d.background){d.background.setAttributes(Ext.apply({},{x:g,y:e,width:a/k,height:h/k},{hidden:false}),true)}}else{if(d.background&&a&&h){d.background.setAttributes(Ext.apply({x:0,y:0,width:a,height:h},{hidden:false}),true)}}},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}if(a.dirtyTransform){this.applyTransformations(a,true)}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a/b.scale-b.dx,d/b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b,d){if(b.type=="text"){b.bbox.transform=0;this.transform(b,false)}b.dirtyTransform=false;var c=this,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){c.translate(b)}if(a.scaling.x!=null||a.scaling.y!=null){c.scale(b)}if(a.rotation.degrees!=null){c.rotate(b)}b.bbox.transform=0;this.transform(b,d);b.transformations=[]},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width||0,b.height||0,b.r||0)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=new Ext.draw.CompositeSprite({surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){var a;if(typeof b=="string"){a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){var a=this;delete a.domRef;if(a.background){a.background.destroy()}a.removeAll(true);Ext.destroy(a.groups.items)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var a=this.surface.items.getBBox();this.setSurfaceSize(a.width,a.height)},setSurfaceSize:function(b,a){this.surface.setSize(b,a);if(this.autoSize){var c=this.surface.items.getBBox();this.surface.setViewBox(c.x,c.y-(+Ext.isOpera),b,a)}},createSurface:function(){var d=this,b=Ext.applyIf({renderTo:d.el,height:d.height,width:d.width,items:d.items},d.initialConfig),a;delete b.listeners;a=Ext.draw.Surface.create(b);if(!a){return false}d.surface=a;function c(e){return function(g){d.fireEvent(e,g)}}a.on({scope:d,mouseup:c("mouseup"),mousedown:c("mousedown"),mousemove:c("mousemove"),mouseenter:c("mouseenter"),mouseleave:c("mouseleave"),click:c("click"),dblclick:c("dblclick")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.chart.LegendItem",{extend:"Ext.draw.CompositeSprite",requires:["Ext.chart.Shape"],x:0,y:0,zIndex:500,boldRe:/bold\s\d{1,}.*/i,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(s){var t=this,i=s.yFieldIndex,l=t.series,a=l.type,m=t.yFieldIndex,d=t.legend,p=t.surface,q=d.x+t.x,n=d.y+t.y,c,k=t.zIndex,b,j,r,e,o=false,h=Ext.apply(l.seriesStyle,l.style);function g(u){var v=l[u];return(Ext.isArray(v)?v[m]:v)}j=t.add("label",p.add({type:"text",x:20,y:0,zIndex:(k||0)+2,fill:d.labelColor,font:d.labelFont,text:g("title")||g("yField"),style:{cursor:"pointer"}}));if(a==="line"||a==="scatter"){if(a==="line"){t.add("line",p.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:(k||0)+2,"stroke-width":l.lineWidth,"stroke-linejoin":"round","stroke-dasharray":l.dash,stroke:h.stroke||l.getLegendColor(i)||"#000",style:{cursor:"pointer"}}))}if(l.showMarkers||a==="scatter"){b=Ext.apply(l.markerStyle,l.markerConfig||{},{fill:l.getLegendColor(i)});t.add("marker",Ext.chart.Shape[b.type](p,{fill:b.fill,x:8.5,y:0.5,zIndex:(k||0)+2,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{t.add("box",p.add({type:"rect",zIndex:(k||0)+2,x:0,y:0,width:12,height:12,fill:l.getLegendColor(i),style:{cursor:"pointer"}}))}t.setAttributes({hidden:false},true);c=t.getBBox();r=t.add("mask",p.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(k||0)+1,fill:t.legend.boxFill,style:{cursor:"pointer"}}));t.on("mouseover",function(){j.setStyle({"font-weight":"bold"});r.setStyle({cursor:"pointer"});l._index=i;l.highlightItem()},t);t.on("mouseout",function(){j.setStyle({"font-weight":d.labelFont&&t.boldRe.test(d.labelFont)?"bold":"normal"});l._index=i;l.unHighlightItem()},t);if(!l.visibleInLegend(i)){o=true;j.setAttributes({opacity:0.5},true)}t.on("mousedown",function(){if(!o){l.hideAll(i);j.setAttributes({opacity:0.5},true)}else{l.showAll(i);j.setAttributes({opacity:1},true)}o=!o;t.legend.chart.redraw()},t);t.updatePosition({x:0,y:0})},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{requires:["Ext.chart.LegendItem"],visible:true,update:true,position:"bottom",x:0,y:0,labelColor:"#000",labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var e=this,a=e.chart.series.items,c,d,b;e.createBox();if(e.rebuild!==false){e.createItems()}if(!e.created&&e.isDisplayed()){e.created=true;for(c=0,d=a.length;c<d;c++){b=a[c];b.on("titlechange",function(){e.create();e.updatePosition()})}}},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var H=this,s=H.chart,b=s.series.items,o,q,A=s.surface,u=H.items,r=H.padding,K=H.itemSpacing,m=2,E=0,z=0,h=0,G=0,d=H.isVertical,g=Math,e=g.floor,J=g.max,l=0,C=0,D=u?u.length:0,p,n,k,F,a,t,w,v,c,I,B;if(D){for(;C<D;C++){u[C].destroy()}}u.length=[];for(C=0,o=b.length;C<o;C++){q=b[C];if(q.showInLegend){v=[].concat(q.yField);for(B=0,I=v.length;B<I;B++){c=v[B];F=new Ext.chart.LegendItem({legend:this,series:q,surface:s.surface,yFieldIndex:B});a=F.getBBox();w=a.width;t=a.height;if(C+B===0){k=d?r+t/2:r}else{k=K/(d?2:1)}F.x=e(d?r:h+k);F.y=e(d?G+k:r+t/2);h+=w+k;G+=t+k;E=J(E,w);z=J(z,t);u.push(F)}}}H.width=e((d?E:h)+r*2);if(d&&u.length===1){m=1}H.height=e((d?G-m*k:z)+(r*2));H.itemHeight=z},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a,c;if(b.boxSprite){b.boxSprite.destroy()}c=b.getBBox();if(isNaN(c.width)||isNaN(c.height)){b.boxSprite=false;return}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},c));a.redraw()},updatePosition:function(){var u=this,p=u.items,r,j,l,h,n=u.width||0,c=u.height||0,m=u.padding,o=u.chart,k=o.chartBBox,s=o.insetPadding,t=k.width-(s*2),d=k.height-(s*2),g=k.x+s,e=k.y+s,q=o.surface,b=Math.floor,a;if(u.isDisplayed()){switch(u.position){case"left":l=s;h=b(e+d/2-c/2);break;case"right":l=b(q.width-n)-s;h=b(e+d/2-c/2);break;case"top":l=b(g+t/2-n/2);h=s;break;case"bottom":l=b(g+t/2-n/2);h=b(q.height-c)-s;break;default:l=b(u.origX)+s;h=b(u.origY)+s}u.x=l;u.y=h;for(r=0,j=p.length;r<j;r++){p[r].updatePosition()}a=u.getBBox();if(isNaN(a.width)||isNaN(a.height)){if(u.boxSprite){u.boxSprite.hide(true)}}else{if(!u.boxSprite){u.createBox()}u.boxSprite.setAttributes(a,true);u.boxSprite.show(true)}}},toggle:function(b){var e=this,d=0,c=e.items,a=c.length;if(e.boxSprite){if(b){e.boxSprite.show(true)}else{e.boxSprite.hide(true)}}for(;d<a;++d){if(b){c[d].show(true)}else{c[d].hide(true)}}e.visible=b}});Ext.define("Ext.chart.theme.Theme",{requires:["Ext.draw.Color"],theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}},function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var m=0,p=+new Date(),j,a,k,r,s,g,o,q,n=[],e,h;if(c.baseColor){e=Ext.draw.Color.fromString(c.baseColor);h=e.getHSL()[2];if(h<0.15){e=e.getLighter(0.3)}else{if(h<0.3){e=e.getLighter(0.15)}else{if(h>0.85){e=e.getDarker(0.3)}else{if(h>0.7){e=e.getDarker(0.15)}}}}c.colors=[e.getDarker(0.3).toString(),e.getDarker(0.15).toString(),e.toString(),e.getLighter(0.15).toString(),e.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();s=b.markerThemes;r=b.seriesThemes;j=a.length;b.colors=a;for(;m<j;m++){k=a[m];o=s[m]||{};g=r[m]||{};o.fill=g.fill=o.stroke=g.stroke=k;s[m]=o;r[m]=g}b.markerThemes=s.slice(0,j);b.seriesThemes=r.slice(0,j)}for(q in b){if(q in c){if(Ext.isObject(c[q])&&Ext.isObject(b[q])){Ext.apply(b[q],c[q])}else{b[q]=c[q]}}}if(c.useGradients){a=b.colors||(function(){var d=[];for(m=0,r=b.seriesThemes,j=r.length;m<j;m++){d.push(r[m].fill||r[m].stroke)}return d}());for(m=0,j=a.length;m<j;m++){e=Ext.draw.Color.fromString(a[m]);if(e){k=e.getDarker(0.1).toString();e=e.toString();q="theme-"+e.substr(1)+"-"+k.substr(1)+"-"+p;n.push({id:q,angle:45,stops:{0:{color:e.toString()},100:{color:k.toString()}}});a[m]="url(#"+q+")"}}b.gradients=n;b.colors=a}Ext.apply(this,b)}}())});Ext.define("Ext.chart.theme.Base",{requires:["Ext.chart.theme.Theme"],constructor:function(a){Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#115fa6",type:"plus"},{fill:"#94ae0a",type:"circle"},{fill:"#a61120",type:"cross"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})}(c[h]))}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})}(d[h]))}});Ext.define("Ext.chart.MaskLayer",{extend:"Ext.Component",constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.Mask",{requires:["Ext.chart.MaskLayer"],constructor:function(a){var c=this,b;c.addEvents("select");if(a){Ext.apply(c,a)}if(c.enableMask){c.on("afterrender",function(){var d=new Ext.chart.MaskLayer({renderTo:c.el,hidden:true});d.el.on({mousemove:function(g){c.onMouseMove(g)},mouseup:function(g){c.resized(g)}});b=new Ext.resizer.Resizer({el:d.el,handles:"all",pinned:true});b.on({resize:function(g){c.resized(g)}});d.initDraggable();c.maskType=c.mask;c.mask=d;c.maskSprite=c.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.7,hidden:true,stroke:"#444"})},c,{single:true})}},resized:function(d){var g=this,l=g.bbox||g.chartBBox,j=l.x,i=l.y,a=l.width,m=l.height,c=g.mask.getBox(true),h=Math.max,b=Math.min,n=c.x-j,k=c.y-i;n=h(n,j);k=h(k,i);n=b(n,a);k=b(k,m);c.x=n;c.y=k;g.fireEvent("select",g,c)},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b=a.maskSelection;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.onMouseMove(c);a.mouseMoved=false;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(b){var a=this;a.mouseDown=true;a.mouseMoved=false;a.maskMouseDown={x:b.getPageX()-a.el.getX(),y:b.getPageY()-a.el.getY()}},onMouseMove:function(t){var u=this,o=u.maskType,a=u.bbox||u.chartBBox,i=a.x,h=a.y,b=Math,q=b.floor,j=b.abs,n=b.min,p=b.max,k=q(h+a.height),m=q(i+a.width),d=t.getPageX(),c=t.getPageY(),s=d-u.el.getX(),r=c-u.el.getY(),g=u.maskMouseDown,l;u.mouseMoved=u.mouseDown;s=p(s,i);r=p(r,h);s=n(s,m);r=n(r,k);if(g&&u.mouseDown){if(o=="horizontal"){r=h;g.y=k;c=u.el.getY()+a.height+u.insetPadding}else{if(o=="vertical"){s=i;g.x=m}}m=g.x-s;k=g.y-r;l=["M",s,r,"l",m,0,0,k,-m,0,"z"];u.maskSelection={x:m>0?s:s+m,y:k>0?r:r+k,width:j(m),height:j(k)};u.mask.updateBox(u.maskSelection);u.mask.show();u.maskSprite.setAttributes({hidden:true},true)}else{if(o=="horizontal"){l=["M",s,h,"L",s,k]}else{if(o=="vertical"){l=["M",i,r,"L",m,r]}else{l=["M",s,h,"L",s,k,"M",i,r,"L",m,r]}}u.maskSprite.setAttributes({path:l,fill:u.maskMouseDown?u.maskSprite.stroke:false,"stroke-width":o===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(k){var j=this,g=j.axes,a=g.items,e,h,c,p=j.chartBBox,o=1/p.width,b=1/p.height,d={x:k.x*o,y:k.y*b,width:k.width*o,height:k.height*b},l,n,m;for(e=0,h=a.length;e<h;e++){c=a[e];l=c.calcEnds();if(c.position=="bottom"||c.position=="top"){n=(l.to-l.from)*d.x+l.from;m=(l.to-l.from)*d.width+n;c.minimum=n;c.maximum=m}else{m=(l.to-l.from)*(1-d.y)+l.from;n=m-(l.to-l.from)*d.height;c.minimum=n;c.maximum=m}}j.redraw(false)},restoreZoom:function(){if(this.originalStore){this.store=this.substore=this.originalStore;this.redraw(true)}}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:"Ext.draw.Component",mixins:{themeManager:"Ext.chart.theme.Theme",mask:"Ext.chart.Mask",navigation:"Ext.chart.Navigation",bindable:"Ext.util.Bindable",observable:"Ext.util.Observable"},uses:["Ext.chart.series.Series"],requires:["Ext.util.MixedCollection","Ext.data.StoreManager","Ext.chart.Legend","Ext.chart.theme.Base","Ext.chart.theme.Theme","Ext.util.DelayedTask"],viewBox:false,animate:false,legend:false,insetPadding:10,enginePriority:["Svg","Vml"],background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}c.mixins.observable.constructor.call(c,b);if(b.enableMask){c.mixins.mask.constructor.call(c)}c.mixins.navigation.constructor.call(c);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdblclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutter=[0,0];b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=new Ext.util.MixedCollection(false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=new Ext.util.MixedCollection(false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=new Ext.chart.Legend(Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,click:b.onClick,dblclick:b.onDblClick,scope:b})},afterComponentLayout:function(b,a){var c=this;if(Ext.isNumber(b)&&Ext.isNumber(a)){if(b!==c.curWidth||a!==c.curHeight){c.curWidth=b;c.curHeight=a;c.redraw(true)}else{if(c.needsRedraw){delete c.needsRedraw;c.redraw()}}}this.callParent(arguments)},redraw:function(b){var h=this,g=h.series.items,d=g.length,a=h.axes.items,c=a.length,e,k=h.chartBBox={x:0,y:0,height:h.curHeight,width:h.curWidth},j=h.legend;h.surface.setSize(k.width,k.height);for(e=0;e<d;e++){h.initializeSeries(g[e],e)}for(e=0;e<c;e++){h.initializeAxis(a[e])}for(e=0;e<c;e++){a[e].processView()}for(e=0;e<c;e++){a[e].drawAxis(true)}if(j!==false&&j.visible){if(j.update||!j.created){j.create()}}h.alignAxes();if(j!==false&&j.visible){j.updatePosition()}h.getMaxGutter();h.resizing=!!b;for(e=0;e<c;e++){a[e].drawAxis()}for(e=0;e<d;e++){h.drawCharts(g[e])}h.resizing=false},afterRender:function(){var b,a=this;this.callParent();if(a.categoryNames){a.setCategoryNames(a.categoryNames)}if(a.tipRenderer){b=a.getFunctionRef(a.tipRenderer);a.setTipRenderer(b.fn,b.scope)}a.bindStore(a.store,true);a.refresh();if(a.surface.engine==="Vml"){a.on("added",a.onAddedVml,a);a.mon(Ext.container.Container.hierarchyEventSource,"added",a.onContainerAddedVml,a)}},onAddedVml:function(){this.needsRedraw=true},onContainerAddedVml:function(a){if(this.isDescendantOf(a)){this.needsRedraw=true}},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(a){this.handleClick("itemclick",a)},onDblClick:function(a){this.handleClick("itemdblclick",a)},handleClick:function(a,h){var k=this,g=k.getEventXY(h),d=k.series.items,b,j,c,l;for(b=0,j=d.length;b<j;b++){c=d[b];if(Ext.draw.Draw.withinBox(g[0],g[1],c.bbox)){if(c.getItemForPoint){l=c.getItemForPoint(g[0],g[1]);if(l){c.fireEvent(a,l)}}}}},onMouseDown:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseDown.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmousedown",g)}}}}},onMouseUp:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseUp.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmouseup",g)}}}}},onMouseMove:function(h){var k=this,d=k.getEventXY(h),c=k.series.items,a,j,b,n,l,g,m;if(k.enableMask){k.mixins.mask.onMouseMove.call(k,h)}for(a=0,j=c.length;a<j;a++){b=c[a];if(Ext.draw.Draw.withinBox(d[0],d[1],b.bbox)){if(b.getItemForPoint){n=b.getItemForPoint(d[0],d[1]);l=b._lastItemForPoint;g=b._lastStoreItem;m=b._lastStoreField;if(n!==l||n&&(n.storeItem!=g||n.storeField!=m)){if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}if(n){b.fireEvent("itemmouseover",n);b._lastItemForPoint=n;b._lastStoreItem=n.storeItem;b._lastStoreField=n.storeField}}}}else{l=b._lastItemForPoint;if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}}}},onMouseLeave:function(h){var g=this,a=g.series.items,c,d,b;if(g.enableMask){g.mixins.mask.onMouseLeave.call(g,h)}for(c=0,d=a.length;c<d;c++){b=a[c];delete b._lastItemForPoint}},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=new Ext.util.DelayedTask(a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(!a.isVisible(true)&&!a.refreshPending){a.setShowListeners("mon");a.refreshPending=true;return}if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},onShow:function(){var a=this;a.callParent(arguments);if(a.refreshPending){a.delayRefresh();a.setShowListeners("mun")}delete a.refreshPending},setShowListeners:function(b){var a=this;a[b](Ext.container.Container.hierarchyEventSource,{scope:a,single:true,show:a.forceRefresh,expand:a.forceRefresh})},forceRefresh:function(a){var b=this;if(b.isDescendantOf(a)&&b.refreshPending){b.setShowListeners("mun");b.delayRefresh()}delete b.refreshPending},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var b=this.refresh,a=this.delayRefresh;return{refresh:b,add:a,remove:a,update:a,clear:b}},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}},alignAxes:function(){var l=this,k=l.axes,a=k.items,e,p=l.legend,g=["top","right","bottom","left"],b,h,j,r,o=l.insetPadding,d={top:o,right:o,bottom:o,left:o},n,q,m;function c(t){var s=k.findIndex("position",t);return(s<0)?null:k.getAt(s)}for(h=0,j=g.length;h<j;h++){b=g[h];n=(b==="left"||b==="right");e=c(b);if(p!==false){if(p.position===b){q=p.getBBox();d[b]+=(n?q.width:q.height)+d[b]}}if(e&&e.bbox){q=e.bbox;d[b]+=(n?q.width:q.height)}}r={x:d.left,y:d.top,width:l.curWidth-d.left-d.right,height:l.curHeight-d.top-d.bottom};l.chartBBox=r;for(h=0,j=a.length;h<j;h++){e=a[h];m=e.position;n=(m==="left"||m==="right");e.x=(m==="right"?r.x+r.width:r.x);e.y=(m==="top"?r.y:r.y+r.height);e.width=(n?r.width:r.height);e.length=(n?r.height:r.width)}},initializeSeries:function(h,k){var j=this,d=j.themeAttrs,c,e,n,p,o,m=[],g=0,b,a={chart:j,seriesId:h.seriesId};if(d){n=d.seriesThemes;o=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,n[k%n.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,o[k%o.length]);if(d.colors){a.colorArrayStyle=d.colors}else{m=[];for(b=n.length;g<b;g++){p=n[g];if(p.fill||p.stroke){m.push(p.fill||p.stroke)}}if(m.length){a.colorArrayStyle=m}}a.seriesIdx=k}if(h instanceof Ext.chart.series.Series){Ext.apply(h,a)}else{Ext.applyIf(a,h);h=j.series.replace(Ext.createByAlias("series."+h.type.toLowerCase(),a))}if(h.initialize){h.initialize()}},getMaxGutter:function(){var g=this,a=g.series.items,d,e,c,b=[0,0],h;for(d=0,e=a.length;d<e;d++){c=a[d];h=c.getGutters&&c.getGutters()||[0,0];b[0]=Math.max(b[0],h[0]);b[1]=Math.max(b[1],h[1])}g.maxGutter=b},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},save:function(a){return Ext.draw.Surface.save(this.surface,a)},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.Highlight",{requires:["Ext.fx.Anim"],highlight:false,highlightCfg:{fill:"#fdd","stroke-width":5,stroke:"#f55"},constructor:function(a){if(a.highlight){if(a.highlight!==true){this.highlightCfg=Ext.merge(this.highlightCfg,a.highlight)}}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=Ext.merge({},g.highlightCfg,g.highlight),d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=new Ext.fx.Anim({target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=Ext.merge({},j.highlightCfg,j.highlight),c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]={};Ext.apply(d[b],k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=new Ext.fx.Anim({target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.chart.Label",{requires:["Ext.draw.Color"],colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:function(c){return c}});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var o=this,L=o.chart,x=L.gradients,r=o.items,H=L.animate,A=o.label,u=A.display,v=A.color,d=[].concat(A.field),q=o.labelsGroup,l=(q||0)&&q.length,b=o.chart.getChartStore(),p=b.getCount(),h=(r||0)&&r.length,D=h/p,z=(x||0)&&x.length,m=Ext.draw.Color,K=[],n,J,E,c,y,I,G,e,g,t,w,F,M,s,N,C,B,a;if(u=="none"){return}if(h==0){while(l--){K.push(l)}}else{for(J=0,E=0,c=0;J<p;J++){y=0;for(I=0;I<D;I++){w=r[E];F=q.getAt(c);M=b.getAt(J);while(this.__excludes&&this.__excludes[y]){y++}if(!w&&F){F.hide(true);c++}if(w&&d[I]){if(!F){F=o.onCreateLabel(M,w,J,u,I,y)}o.onPlaceLabel(F,M,w,J,u,H,I,y);c++;if(A.contrast&&w.sprite){s=w.sprite;if(s._endStyle){a=s._endStyle.fill}else{if(s._to){a=s._to.fill}else{a=s.attr.fill}}a=a||s.attr.fill;N=m.fromString(a);if(a&&!N){a=a.match(o.colorStringRe)[1];for(G=0;G<z;G++){n=x[G];if(n.id==a){t=0;e=0;for(g in n.stops){t++;e+=m.fromString(n.stops[g].color).getGrayscale()}C=(e/t)/255;break}}}else{C=N.getGrayscale()/255}if(F.isOutside){C=1}B=m.fromString(F.attr.color||F.attr.fill).getHSL();B[2]=C>0.5?0.2:0.8;F.setAttributes({fill:String(m.fromHSL.apply({},B))},true)}}E++;y++}}l=q.length;while(l>c){K.push(c);c++}}o.hideLabels(K)},hideLabels:function(b){var a=this.labelsGroup,c=!!b&&b.length;if(!a){return}if(c===false){c=a.getCount();while(c--){a.getAt(c).hide(true)}}else{while(c--){a.getAt(b[c]).hide(true)}}}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.Tip",{requires:["Ext.tip.ToolTip","Ext.chart.TipSurface"],constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:true,autoHide:true});c.tooltip=new Ext.tip.ToolTip(c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=new Ext.chart.TipSurface({id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this,m,a,c,d,k,b,j,h,i,g;if(!e.tooltip){return}clearTimeout(e.tipTimeout);m=e.tooltip;a=e.spriteTip;c=e.tipConfig;d=m.trackMouse;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.axis.Abstract",{requires:["Ext.chart.Chart"],constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=Ext.Array.from(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:"Ext.chart.axis.Abstract",alternateClassName:"Ext.chart.Axis",requires:["Ext.draw.Draw"],forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,adjustEnd:true,majorTickSteps:false,applyData:Ext.emptyFn,getRange:function(){var C=this,p=C.chart,l=p.getChartStore(),E=l.data.items,o=p.series.items,D=C.position,q,a=Ext.chart.series,v=[],u=Infinity,y=-Infinity,c=C.position==="left"||C.position==="right",z,n,d,x,w,m=E.length,g,B={},t={},A=true,r,h,e,b,s;r=C.fields;for(x=0,n=r.length;x<n;x++){t[r[x]]=true}for(z=0,n=o.length;z<n;z++){if(o[z].seriesIsHidden){continue}if(!o[z].getAxesForXAndYFields){continue}q=o[z].getAxesForXAndYFields();if(q.xAxis&&q.xAxis!==D&&q.yAxis&&q.yAxis!==D){continue}if(a.Bar&&o[z] instanceof a.Bar&&!o[z].column){r=c?Ext.Array.from(o[z].xField):Ext.Array.from(o[z].yField)}else{r=c?Ext.Array.from(o[z].yField):Ext.Array.from(o[z].xField)}if(C.fields.length){for(x=0,d=r.length;x<d;x++){if(t[r[x]]){break}}if(x==d){continue}}if(g=o[z].stacked){if(a.Bar&&o[z] instanceof a.Bar){if(o[z].column!=c){g=false;A=false}}else{if(!c){g=false;A=false}}}if(g){h={};for(x=0;x<r.length;x++){if(A&&o[z].__excludes&&o[z].__excludes[x]){continue}if(!t[r[x]]){Ext.Logger.warn("Field `"+r[x]+"` is not included in the "+D+" axis config.")}t[r[x]]=h[r[x]]=true}v.push({fields:h,value:0})}else{if(!r||r.length==0){r=C.fields}for(x=0;x<r.length;x++){if(A&&o[z].__excludes&&o[z].__excludes[x]){continue}t[r[x]]=B[r[x]]=true}}}for(z=0;z<m;z++){e=E[z];for(w=0;w<v.length;w++){v[w].value=0}for(b in t){s=e.get(b);if(isNaN(s)){continue}if(s===undefined){s=0}if(B[b]){if(u>s){u=s}if(y<s){y=s}}for(w=0;w<v.length;w++){if(v[w].fields[b]){v[w].value+=s;if(u>0){u=0}if(y<v[w].value){y=v[w].value}}}}}if(!isFinite(y)){y=C.prevMax||0}if(!isFinite(u)){u=C.prevMin||0}if(u!=y&&(y!=Math.floor(y))){y=Math.floor(y)+1}if(!isNaN(C.minimum)){u=C.minimum}if(!isNaN(C.maximum)){y=C.maximum}if(u>=y){y=u+1}return{min:u,max:y}},calcEnds:function(){var h=this,d=h.getRange(),g=d.min,a=d.max,c,i,e,b;c=(Ext.isNumber(h.majorTickSteps)?h.majorTickSteps+1:h.steps);i=!(Ext.isNumber(h.maximum)&&Ext.isNumber(h.minimum)&&Ext.isNumber(h.majorTickSteps)&&h.majorTickSteps>0);e=Ext.draw.Draw.snapEnds(g,a,c,i);if(Ext.isNumber(h.maximum)){e.to=h.maximum;b=true}if(Ext.isNumber(h.minimum)){e.from=h.minimum;b=true}if(h.adjustMaximumByMajorUnit){e.to=Math.ceil(e.to/e.step)*e.step;b=true}if(h.adjustMinimumByMajorUnit){e.from=Math.floor(e.from/e.step)*e.step;b=true}if(b){e.steps=Math.ceil((e.to-e.from)/e.step)}h.prevMin=(g==a?0:g);h.prevMax=a;return e},drawAxis:function(r){var C=this,s,j=C.x,h=C.y,A=C.chart.maxGutter[0],z=C.chart.maxGutter[1],e=C.dashSize,w=C.minorTickSteps||0,v=C.minorTickSteps||0,b=C.length,D=C.position,g=[],m=false,c=C.applyData(),d=c.step,t=c.steps,q=c.from,a=c.to,u,p,o,n,l,k,B;if(C.hidden||isNaN(d)||(q>a)){return}C.from=c.from;C.to=c.to;if(D=="left"||D=="right"){p=Math.floor(j)+0.5;n=["M",p,h,"l",0,-b];u=b-(z*2)}else{o=Math.floor(h)+0.5;n=["M",j,o,"l",b,0];u=b-(A*2)}B=t&&u/t;l=Math.max(w+1,0);k=Math.max(v+1,0);if(C.type=="Numeric"||C.type=="Time"){m=true;C.labels=[c.from]}if(D=="right"||D=="left"){o=h-z;p=j-((D=="left")*e*2);while(o>=h-z-u){n.push("M",p,Math.floor(o)+0.5,"l",e*2+1,0);if(o!=h-z){for(s=1;s<k;s++){n.push("M",p+e,Math.floor(o+B*s/k)+0.5,"l",e+1,0)}}g.push([Math.floor(j),Math.floor(o)]);o-=B;if(m){C.labels.push(C.labels[C.labels.length-1]+d)}if(B===0){break}}if(Math.round(o+B-(h-z-u))){n.push("M",p,Math.floor(h-b+z)+0.5,"l",e*2+1,0);for(s=1;s<k;s++){n.push("M",p+e,Math.floor(h-b+z+B*s/k)+0.5,"l",e+1,0)}g.push([Math.floor(j),Math.floor(o)]);if(m){C.labels.push(C.labels[C.labels.length-1]+d)}}}else{p=j+A;o=h-((D=="top")*e*2);while(p<=j+A+u){n.push("M",Math.floor(p)+0.5,o,"l",0,e*2+1);if(p!=j+A){for(s=1;s<l;s++){n.push("M",Math.floor(p-B*s/l)+0.5,o,"l",0,e+1)}}g.push([Math.floor(p),Math.floor(h)]);p+=B;if(m){C.labels.push(C.labels[C.labels.length-1]+d)}if(B===0){break}}if(Math.round(p-B-(j+A+u))){n.push("M",Math.floor(j+b-A)+0.5,o,"l",0,e*2+1);for(s=1;s<l;s++){n.push("M",Math.floor(j+b-A-B*s/l)+0.5,o,"l",0,e+1)}g.push([Math.floor(p),Math.floor(h)]);if(m){C.labels.push(C.labels[C.labels.length-1]+d)}}}if(m){C.labels[g.length-1]=+(C.labels[g.length-1]).toFixed(10)}if(!C.axis){C.axis=C.chart.surface.add(Ext.apply({type:"path",path:n},C.axisStyle))}C.axis.setAttributes({path:n},true);C.inflections=g;if(!r&&C.grid){C.drawGrid()}C.axisBBox=C.axis.getBBox();C.drawLabel()},drawGrid:function(){var t=this,o=t.chart.surface,b=t.grid,d=b.odd,e=b.even,h=t.inflections,j=h.length-((d||e)?0:1),u=t.position,c=t.chart.maxGutter,n=t.width-2,p,q,r=1,m=[],g,a,k,l=[],s=[];if((c[1]!==0&&(u=="left"||u=="right"))||(c[0]!==0&&(u=="top"||u=="bottom"))){r=0;j++}for(;r<j;r++){p=h[r];q=h[r-1];if(d||e){m=(r%2)?l:s;g=((r%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;k=2*a;if(u=="left"){m.push("M",q[0]+1+a,q[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5-a,"L",p[0]+1+n-a,p[1]+0.5+a,"L",p[0]+1+a,p[1]+0.5+a,"Z")}else{if(u=="right"){m.push("M",q[0]-a,q[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5-a,"L",p[0]-n+a,p[1]+0.5+a,"L",p[0]-a,p[1]+0.5+a,"Z")}else{if(u=="top"){m.push("M",q[0]+0.5+a,q[1]+1+a,"L",q[0]+0.5+a,q[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+a,"Z")}else{m.push("M",q[0]+0.5+a,q[1]-a,"L",q[0]+0.5+a,q[1]-n+a,"L",p[0]+0.5-a,p[1]-n+a,"L",p[0]+0.5-a,p[1]-a,"Z")}}}}else{if(u=="left"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",n,0])}else{if(u=="right"){m=m.concat(["M",p[0]-0.5,p[1]+0.5,"l",-n,0])}else{if(u=="top"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",0,n])}else{m=m.concat(["M",p[0]+0.5,p[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!t.gridOdd&&l.length){t.gridOdd=o.add({type:"path",path:l})}t.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(s.length){if(!t.gridEven){t.gridEven=o.add({type:"path",path:s})}t.gridEven.setAttributes(Ext.apply({path:s,hidden:false},e||{}),true)}}else{if(m.length){if(!t.gridLines){t.gridLines=t.chart.surface.add({type:"path",path:m,"stroke-width":t.lineWidth||1,stroke:t.gridColor||"#ccc"})}t.gridLines.setAttributes({hidden:false,path:m},true)}else{if(t.gridLines){t.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var C=this,e=C.label,w=Math.floor,u=Math.max,v=C.chart.axes,g=C.chart.insetPadding,D=C.position,j=C.inflections,n=j.length,A=C.labels,r=0,h,c,s,o,b,B=C.adjustEnd,a=v.findIndex("position","left")!=-1,m=v.findIndex("position","right")!=-1,z,q,l,p,k,t,d;l=n-1;s=j[0];d=C.getOrCreateLabel(0,C.label.renderer(A[0]));h=Math.floor(Math.abs(Math.sin(e.rotate&&(e.rotate.degrees*Math.PI/180)||0)));for(t=0;t<n;t++){s=j[t];q=C.label.renderer(A[t]);z=C.getOrCreateLabel(t,q);c=z._bbox;r=u(r,c.height+C.dashSize+C.label.padding);p=w(s[0]-(h?c.height:c.width)/2);if(B&&C.chart.maxGutter[0]==0){if(t==0&&!a){p=s[0]}else{if(t==l&&!m){p=Math.min(p,s[0]-c.width+g)}}}if(D=="top"){k=s[1]-(C.dashSize*2)-C.label.padding-(c.height/2)}else{k=s[1]+(C.dashSize*2)+C.label.padding+(c.height/2)}z.setAttributes({hidden:false,x:p,y:k},true);if(t!=0&&(C.intersect(z,o)||C.intersect(z,d))){if(t===l&&b!==0){o.hide(true)}else{z.hide(true);continue}}o=z;b=t}return r},drawVerticalLabels:function(){var C=this,e=C.inflections,D=C.position,j=e.length,o=C.chart,d=o.insetPadding,B=C.labels,u=0,r=Math.max,t=Math.floor,c=Math.ceil,s=C.chart.axes,w=C.chart.maxGutter[1],b,p,k,a,n=s.findIndex("position","top")!=-1,v=s.findIndex("position","bottom")!=-1,A=C.adjustEnd,z,m,h=j-1,l,g,q;for(q=0;q<j;q++){p=e[q];m=C.label.renderer(B[q]);z=C.getOrCreateLabel(q,m);b=z._bbox;u=r(u,b.width+C.dashSize+C.label.padding);g=p[1];if(A&&w<b.height/2){if(q==h&&!n){g=Math.max(g,C.y-C.length+c(b.height/2)-d)}else{if(q==0&&!v){g=C.y+w-t(b.height/2)}}}if(D=="left"){l=p[0]-b.width-C.dashSize-C.label.padding-2}else{l=p[0]+C.dashSize+C.label.padding+2}z.setAttributes(Ext.apply({hidden:false,x:l,y:g},C.label),true);if(q!=0&&C.intersect(z,k)){if(q===h&&a!==0){k.hide(true)}else{z.hide(true);continue}}k=z;a=q}return u},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,setLabels:function(){var c=this.chart.getChartStore(),j=c.data.items,k,g,b,a=this.fields,h=a.length,e;this.labels=[];for(k=0,g=j.length;k<g;k++){b=j[k];for(e=0;e<h;e++){this.labels.push(b.get(a[e]))}}},applyData:function(){this.callParent();this.setLabels();var a=this.chart.getChartStore().getCount();return{from:0,to:a-1,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:"Ext.chart.axis.Abstract",position:"gauge",alias:"axis.gauge",drawAxis:function(q){var j=this.chart,a=j.surface,p=j.chartBBox,d=p.x+(p.width/2),b=p.y+p.height,c=this.margin||10,m=Math.min(p.width,2*p.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,o=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var l=this.chart,p=l.surface,b=l.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,m=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*m,u=Math.round,n=[],g,s=this.maximum||0,k=this.minimum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,o=e.renderer||function(i){return i};if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);n.push(g)}}else{n=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;n[q].setAttributes({text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=n}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",uses:["Ext.data.Store"],constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(c.constrain==null){d.constrain=(c.minimum!=null&&c.maximum!=null)}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.round(a*b)/b},minimum:NaN,maximum:NaN,constrain:true,decimals:2,scale:"linear",doConstrain:function(){var t=this,b=t.chart.store,h=b.data.items,s,u,a,e=t.chart.series.items,j=t.fields,c=j.length,g=t.calcEnds(),m=g.from,p=g.to,q,n,r=false,k,v=[],o;for(q=0,n=e.length;q<n;q++){if(e[q].type==="bar"&&e[q].stacked){return}}for(s=0,u=h.length;s<u;s++){o=true;a=h[s];for(q=0;q<c;q++){k=a.get(j[q]);if(+k<+m){o=false;break}if(+k>+p){o=false;break}}if(o){v.push(a)}}t.chart.substore=Ext.create("Ext.data.Store",{model:b.model});t.chart.substore.loadData(v)},position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,processView:function(){var a=this,b=a.constrain;if(b){a.doConstrain()}},applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(u){var m=this.chart,a=m.surface,t=m.chartBBox,q=m.store,b=q.getCount(),e=t.x+(t.width/2),c=t.y+(t.height/2),p=Math.min(t.width,t.height)/2,k=[],r,o=this.steps,g,d,h=Math.PI*2,s=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=o;g++){r=a.add({type:"circle",x:e,y:c,radius:Math.max(p*g/o,0),stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}for(g=0;g<b;g++){r=a.add({type:"path",path:["M",e,c,"L",e+p*s(g/b*h),c+p*n(g/b*h),"Z"],stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}}else{k=this.sprites;for(g=0;g<o;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(p*(g+1)/o,0),stroke:"#ccc"},true)}for(d=0;d<b;d++){k[g+d].setAttributes({path:["M",e,c,"L",e+p*s(d/b*h),c+p*n(d/b*h),"Z"],stroke:"#ccc"},true)}}this.sprites=k;this.drawLabel()},drawLabel:function(){var w=this.chart,c=w.series.items,r,B=w.surface,b=w.chartBBox,l=w.store,J=l.data.items,p,k,o=b.x+(b.width/2),n=b.y+(b.height/2),h=Math.min(b.width,b.height)/2,F=Math.max,I=Math.round,x=[],m,z=[],d,A=[],g,v=!this.maximum,H=this.maximum||0,G=this.steps,E=0,D,t,s,y=Math.PI*2,e=Math.cos,a=Math.sin,C=this.label.display,q=C!=="none",u=10;if(!q){return}for(E=0,p=c.length;E<p;E++){r=c[E];z.push(r.yField);g=r.xField}for(D=0,p=J.length;D<p;D++){k=J[D];if(v){for(E=0,d=z.length;E<d;E++){H=F(+k.get(z[E]),H)}}A.push(k.get(g))}if(!this.labelArray){if(C!="categories"){for(E=1;E<=G;E++){m=B.add({type:"text",text:I(E/G*H),x:o,y:n-h*E/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});m.setAttributes({hidden:false},true);x.push(m)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);m=B.add({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")});m.setAttributes({hidden:false},true);x.push(m)}}}else{x=this.labelArray;if(C!="categories"){for(E=0;E<G;E++){x[E].setAttributes({text:I((E+1)/G*H),x:o,y:n-h*(E+1)/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);if(x[E+D]){x[E+D].setAttributes({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")},true)}}}}this.labelArray=x}});Ext.define("Ext.chart.axis.Time",{extend:"Ext.chart.axis.Numeric",alternateClassName:"Ext.chart.TimeAxis",alias:"axis.time",uses:["Ext.data.Store"],dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,animating:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave});if(b.style){Ext.apply(b.seriesStyle,b.style)}},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.animating){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.animating=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.animating=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},hide:function(){if(this.items){var h=this,b=h.items,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d].sprite){b[d].sprite.hide(true);e=b[d].shadows||b[d].sprite.shadows;if(e){for(c=0,a=e.length;c<a;++c){e[c].hide(true)}}}}h.hideLabels()}}},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}if(c){return c}}return(b.colorArrayStyle)?b.colorArrayStyle[b.seriesIdx%b.colorArrayStyle.length]:"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:"Ext.chart.series.Series",alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var j=this,e=[],g,d,h,k=j.combinations,l,a,c,b;g=[].concat(j.yField);for(d=0,h=g.length;d<h;d++){l=j.title;e.push((Ext.isArray(l)?l[d]:l)||g[d])}if(k){k=Ext.Array.from(k);for(d=0,h=k.length;d<h;d++){a=k[d];c=e[a[0]];b=e[a[1]];e[a[1]]=c+" & "+b;e.splice(a[0],1)}}return e},eachYValue:function(b,e,d){var j=this,h=j.getYValueAccessors(),c,g,a;for(c=0,g=h.length;c<g;c++){a=h[c];e.call(d,a(b),c)}},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var e=this,a=e.yValueAccessors,g,c,b,d;if(!a){a=e.yValueAccessors=[];g=[].concat(e.yField);for(b=0,d=g.length;b<d;b++){c=g[b];a.push(function(h){return h.get(c)})}}return a},getMinMaxXValues:function(){var k=this,j=k.chart,m=j.getChartStore(),d=m.data.items,e,h,g,c,l,a=k.xField,b;if(k.getRecordCount()>0){c=Infinity;l=-c;for(e=0,h=d.length;e<h;e++){g=d[e];b=g.get(a);if(b>l){l=b}if(b<c){c=b}}}else{c=l=0}return[c,l]},getMinMaxYValues:function(){var k=this,j=k.chart,o=j.getChartStore(),c=o.data.items,d,h,e,g=k.stacked,b,l,n,m;function a(r,q){if(!k.isExcluded(q)){if(r<0){m+=r}else{n+=r}}}function p(r,q){if(!k.isExcluded(q)){if(r>l){l=r}if(r<b){b=r}}}if(k.getRecordCount()>0){b=Infinity;l=-b;for(d=0,h=c.length;d<h;d++){e=c[d];if(g){n=0;m=0;k.eachYValue(e,a);if(n>l){l=n}if(m<b){b=m}}else{k.eachYValue(e,p)}}}else{b=l=0}return[b,l]},getAxesForXAndYFields:function(){var m=this,l=m.chart.axes,d=[].concat(m.axis),c={},e=[].concat(m.yField),n={},o=[].concat(m.xField),j,b,a,h,k,g;g=m.type==="bar"&&m.column===false;if(g){j=e;e=o;o=j}if(Ext.Array.indexOf(d,"top")>-1){b="top"}else{if(Ext.Array.indexOf(d,"bottom")>-1){b="bottom"}else{if(l.get("top")&&l.get("bottom")){for(h=0,k=o.length;h<k;h++){n[o[h]]=true}j=[].concat(l.get("bottom").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="bottom";break}}j=[].concat(l.get("top").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="top";break}}}else{if(l.get("top")){b="top"}else{if(l.get("bottom")){b="bottom"}}}}}if(Ext.Array.indexOf(d,"left")>-1){a="left"}else{if(Ext.Array.indexOf(d,"right")>-1){a="right"}else{if(l.get("left")&&l.get("right")){for(h=0,k=e.length;h<k;h++){c[e[h]]=true}j=[].concat(l.get("right").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){break}}j=[].concat(l.get("left").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){a="left";break}}}else{if(l.get("left")){a="left"}else{if(l.get("right")){a="right"}}}}}return g?{xAxis:a,yAxis:b}:{xAxis:b,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;c.highlightCfg=Ext.Object.merge({},{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{__excludes:[]});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,o){var k=b.length,m=Math.floor(k/o),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=+b[h];for(g=0;g<l;++g){a[g]+=+n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var j=this,M=j.chart,a=M.getChartStore(),L=a.data.items,I,F,x,v=[].concat(j.yField),A=v.length,z=[],D=[],g=Infinity,C=g,B=g,n=-g,m=-g,s=Math,w=s.min,e=s.max,p=j.getAxesForXAndYFields(),J=p.xAxis,u=p.yAxis,G,r,k,h,E,q,N,K,b,t,H,c,d,o,y;j.setBBox();k=j.bbox;if(o=M.axes.get(J)){if(o.type==="Time"){r=true}G=o.applyData();C=G.from;n=G.to}if(o=M.axes.get(u)){G=o.applyData();B=G.from;m=G.to}if(j.xField&&!Ext.isNumber(C)){o=j.getMinMaxXValues();r=true;C=o[0];n=o[1]}if(j.yField&&!Ext.isNumber(B)){o=j.getMinMaxYValues();B=o[0];m=o[1]}if(!Ext.isNumber(B)){B=0}if(!Ext.isNumber(m)){m=0}for(I=0,F=L.length;I<F;I++){x=L[I];q=x.get(j.xField);N=[];if(typeof q!="number"){if(r){q=+q}else{q=I}}z.push(q);b=0;for(K=0;K<A;K++){if(j.__excludes[K]){continue}d=x.get(v[K]);if(typeof d=="number"){N.push(d)}}D.push(N)}h=k.width/((n-C)||1);E=k.height/((m-B)||1);t=z.length;if((t>k.width)&&j.areas){H=j.shrink(z,D,k.width);z=H.x;D=H.y}return{bbox:k,minX:C,minY:B,xValues:z,yValues:D,xScale:h,yScale:E,areasLen:A}},getPaths:function(){var w=this,m=w.chart,c=m.getChartStore(),e=true,g=w.getBounds(),a=g.bbox,n=w.items=[],v=[],b,d=0,p=[],s,j,k,h,q,t,l,z,r,u,o;j=g.xValues.length;for(s=0;s<j;s++){q=g.xValues[s];t=g.yValues[s];k=a.x+(q-g.minX)*g.xScale;l=0;d=0;for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[d];l+=u;h=a.y+a.height-(l-g.minY)*g.yScale;if(!p[z]){p[z]=["M",k,h];v[z].push(["L",k,h])}else{p[z].push("L",k,h);v[z].push(["L",k,h])}if(!n[z]){n[z]={pointsUp:[],pointsDown:[],series:w}}n[z].pointsUp.push([k,h]);d++}}for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}o=p[z];if(z==0||e){e=false;o.push("L",k,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();o.push("L",k,b[0][2]);for(s=0;s<j;s++){o.push(b[s][0],b[s][1],b[s][2]);n[z].pointsDown[j-s-1]=[b[s][1],b[s][2]]}o.push("L",a.x,o[2],"Z")}r=z}return{paths:p,areasLen:g.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,o=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()||h.seriesIsHidden){h.hide();h.items=[];return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%o],fill:l[d%o]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,c,e){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],d,n,m;g.setAttributes({text:q(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,r,J,G,F,d,k){var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=(G==0)?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=J.point,A,g,N,K,o,q,b=m.label.getBBox(),I=30,C=10,B=3,h,e,j,w,u,E=M.clipRect,n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:w},true);m.label.setAttributes({x:n+(N[0]>0?B:-(b.width+B)),y:l},true);for(u in m){m[u].show(true)}},isItemInPoint:function(j,h,m,c){var g=this,b=m.pointsUp,d=m.pointsDown,q=Math.abs,o=false,l=false,e=Infinity,a,n,k;for(a=0,n=b.length;a<n;a++){k=[b[a][0],b[a][1]];o=false;l=a==n-1;if(e>q(j-k[0])){e=q(j-k[0]);o=true;if(l){++a}}if(!o||(o&&l)){k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){m.storeIndex=a-1;m.storeField=g.yField[c];m.storeItem=g.chart.store.getAt(a-1);m._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=new Ext.fx.Anim(Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=new Ext.fx.Anim({target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=true;b.areas[a].hide(true);b.redraw()},showAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=false;b.areas[a].show(true);b.redraw()},redraw:function(){var a=this,b;b=a.chart.legend.rebuild;a.chart.legend.rebuild=false;a.chart.redraw();a.chart.legend.rebuild=b},hide:function(){if(this.areas){var h=this,b=h.areas,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d]){b[d].hide(true)}}h.hideLabels()}}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],requires:["Ext.chart.axis.Axis","Ext.fx.Anim"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),e=d.gutter/100;return(d.chart.chartBBox[b?"width":"height"]-d[b?"xPadding":"yPadding"]*2)/(c*(e+1)-e)},getGutters:function(){var b=this,a=b.column,c=Math.ceil(b[a?"xPadding":"yPadding"]+b.getBarGirth()/2);return b.column?[c,0]:[0,c]},getBounds:function(){var o=this,O=o.chart,b=O.getChartStore(),N=b.data.items,M,x,D,v=[].concat(o.yField),p=v.length,l=p,c=o.groupGutter/100,H=o.column,h=o.xPadding,m=o.yPadding,J=o.stacked,t=o.getBarGirth(),y=H?"width":"height",u=Math,B=u.min,k=u.max,n=u.abs,G=o.getAxesForXAndYFields(),A=G.yAxis,L,C,e,q,F,r,s,E,z,a,w,I,K,d,g;o.setBBox(true);q=o.bbox;if(o.__excludes){for(K=0,w=o.__excludes.length;K<w;K++){if(o.__excludes[K]){l--}}}s=O.axes.get(A);if(s){L=s.applyData();F=L.from;r=L.to}if(o.yField&&!Ext.isNumber(F)){E=o.getMinMaxYValues();F=E[0];r=E[1]}if(!Ext.isNumber(F)){F=0}if(!Ext.isNumber(r)){r=0}z=(H?q.height-m*2:q.width-h*2)/(r-F);C=t;e=(t/((J?1:l)*(c+1)-c));if(y in o.style){e=B(e,o.style[y]);C=e*((J?1:l)*(c+1)-c)}a=(H)?q.y+q.height-m:q.x+h;if(J){w=[[],[]];for(M=0,x=N.length;M<x;M++){D=N[M];w[0][M]=w[0][M]||0;w[1][M]=w[1][M]||0;for(K=0;K<p;K++){if(o.__excludes&&o.__excludes[K]){continue}I=D.get(v[K]);w[+(I>0)][M]+=n(I)}}w[+(r>0)].push(n(r));w[+(F>0)].push(n(F));g=k.apply(u,w[0]);d=k.apply(u,w[1]);z=(H?q.height-m*2:q.width-h*2)/(d+g);a=a+g*z*(H?-1:1)}else{if(F/r<0){a=a-F*z*(H?-1:1)}}return{bars:v,bbox:q,shrunkBarWidth:C,barsLen:p,groupBarsLen:l,barWidth:t,groupBarWidth:e,scale:z,zero:a,xPadding:h,yPadding:m,signed:F/r<0,minY:F,maxY:r}},getPaths:function(){var v=this,X=v.chart,b=X.getChartStore(),W=b.data.items,V,E,L,G=v.bounds=v.getBounds(),z=v.items=[],P=v.yField,l=v.gutter/100,c=v.groupGutter/100,T=X.animate,N=v.column,x=v.group,m=X.shadow,R=v.shadowGroups,Q=v.shadowAttributes,q=R.length,y=G.bbox,B=G.barWidth,K=G.shrunkBarWidth,n=v.xPadding,r=v.yPadding,S=v.stacked,w=G.barsLen,O=v.colorArrayStyle,h=O&&O.length||0,C=Math,o=C.max,I=C.min,u=C.abs,U,Y,e,J,D,a,k,t,s,p,g,d,F,A,M,H;for(V=0,E=W.length;V<E;V++){L=W[V];a=G.zero;k=G.zero;J=0;D=0;t=false;for(U=0,g=0;U<w;U++){if(v.__excludes&&v.__excludes[U]){continue}Y=L.get(G.bars[U]);e=Math.round((Y-o(G.minY,0))*G.scale);s={fill:O[(w>1?U:0)%h]};if(N){Ext.apply(s,{height:e,width:o(G.groupBarWidth,0),x:(y.x+n+(B-K)*0.5+V*B*(1+l)+g*G.groupBarWidth*(1+c)*!S),y:a-e})}else{M=(E-1)-V;Ext.apply(s,{height:o(G.groupBarWidth,0),width:e+(a==G.zero),x:a+(a!=G.zero),y:(y.y+r+(B-K)*0.5+M*B*(1+l)+g*G.groupBarWidth*(1+c)*!S+1)})}if(e<0){if(N){s.y=k;s.height=u(e)}else{s.x=k+e;s.width=u(e)}}if(S){if(e<0){k+=e*(N?-1:1)}else{a+=e*(N?-1:1)}J+=u(e);if(e<0){D+=u(e)}}s.x=Math.floor(s.x)+1;H=Math.floor(s.y);if(!Ext.isIE9&&s.y>H){H--}s.y=H;s.width=Math.floor(s.width);s.height=Math.floor(s.height);z.push({series:v,yField:P[U],storeItem:L,value:[L.get(v.xField),Y],attr:s,point:N?[s.x+s.width/2,Y>=0?s.y:s.y+s.height]:[Y>=0?s.x+s.width:s.x,s.y+s.height/2]});if(T&&X.resizing){p=N?{x:s.x,y:G.zero,width:s.width,height:0}:{x:G.zero,y:s.y,width:0,height:s.height};if(m&&(S&&!t||!S)){t=true;for(d=0;d<q;d++){F=R[d].getAt(S?V:(V*w+U));if(F){F.setAttributes(p,true)}}}A=x.getAt(V*w+U);if(A){A.setAttributes(p,true)}}g++}if(S&&z.length){z[V*g].totalDim=J;z[V*g].totalNegDim=D}}if(S&&g==0){for(V=0,E=W.length;V<E;V++){for(d=0;d<q;d++){F=R[d].getAt(V);if(F){F.hide(true)}}}}},renderShadows:function(u,v,y,l){var z=this,p=z.chart,s=p.surface,g=p.animate,x=z.stacked,a=z.shadowGroups,w=z.shadowAttributes,o=a.length,h=p.getChartStore(),d=z.column,r=z.items,b=[],m=l.zero,e,q,k,A,n,t,c;if((x&&(u%l.groupBarsLen===0))||!x){t=u/l.groupBarsLen;for(e=0;e<o;e++){q=Ext.apply({},w[e]);k=a[e].getAt(x?t:u);Ext.copyTo(q,v,"x,y,width,height");if(!k){k=s.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},y,q)))}if(x){A=r[u].totalDim;n=r[u].totalNegDim;if(d){q.y=m+n-A-1;q.height=A}else{q.x=m-n;q.width=A}}c=z.renderer(k,h.getAt(t),q,u,h);c.hidden=!!v.hidden;if(g){z.onAnimate(k,{to:c})}else{k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var C=this,r=C.chart,m=r.getChartStore(),v=r.surface,k=r.animate,A=C.stacked,d=C.column,b=r.shadow,a=C.shadowGroups,q=a.length,o=C.group,g=C.seriesStyle,s,p,y,x,B,t,c,e,h,n,l,z,u,w;if(!m||!m.getCount()||C.seriesIsHidden){C.hide();C.items=[];return}l=Ext.apply({},this.style,g);delete l.fill;delete l.x;delete l.y;delete l.width;delete l.height;C.unHighlightItem();C.cleanHighlights();C.getPaths();n=C.bounds;s=C.items;B=d?{y:n.zero,height:0}:{x:n.zero,width:0};p=s.length;for(y=0;y<p;y++){t=o.getAt(y);z=s[y].attr;if(b){s[y].shadows=C.renderShadows(y,z,B,n)}if(!t){u=Ext.apply({},B,z);u=Ext.apply(u,l||{});t=v.add(Ext.apply({},{type:"rect",group:o},u))}if(k){c=C.renderer(t,m.getAt(y),z,y,m);t._to=c;w=C.onAnimate(t,{to:Ext.apply(c,l)});if(b&&A&&(y%n.barsLen===0)){x=y/n.barsLen;for(e=0;e<q;e++){w.on("afteranimate",function(){this.show(true)},a[e].getAt(x))}}}else{c=C.renderer(t,m.getAt(y),Ext.apply(z,{hidden:false}),y,m);t.setAttributes(Ext.apply(c,l),true)}s[y].sprite=t}p=o.getCount();for(x=y;x<p;x++){o.getAt(x).hide(true)}if(C.stacked){y=m.getCount()}if(b){for(e=0;e<q;e++){h=a[e];p=h.getCount();for(x=y;x<p;x++){h.getAt(x).hide(true)}}}C.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(G,N,s,J,p,H,I,v){var m=this,n=m.bounds,d=n.groupBarWidth,F=m.column,L=m.chart,u=L.chartBBox,A=L.resizing,o=s.value[0],O=s.value[1],l=s.attr,z=m.label,K=z.orientation=="vertical",h=[].concat(z.field),t=z.renderer,r=t(N.get(h[v])),g=m.getLabelSize(r),a=g.width,c=g.height,b=n.zero,k="outside",q="insideStart",M="insideEnd",E=10,C=6,e=n.signed,D,B,w;G.setAttributes({text:r});G.isOutside=false;if(F){if(p==k){if(c+C+l.height>(O>=0?b-u.y:u.y+u.height-b)){p=M}}else{if(c+C>l.height){p=k;G.isOutside=true}}D=l.x+d/2;B=p==q?(b+((c/2+3)*(O>=0?-1:1))):(O>=0?(l.y+((c/2+3)*(p==k?-1:1))):(l.y+l.height+((c/2+3)*(p===k?1:-1))))}else{if(p==k){if(a+E+l.width>(O>=0?u.x+u.width-b:b-u.x)){p=M}}else{if(a+E>l.width){p=k;G.isOutside=true}}D=p==q?(b+((a/2+5)*(O>=0?1:-1))):(O>=0?(l.x+l.width+((a/2+5)*(p===k?1:-1))):(l.x+((a/2+5)*(p===k?-1:1))));B=l.y+d/2}w={x:D,y:B};if(K){w.rotate={x:D,y:B,degrees:270}}if(H&&A){if(F){D=l.x+l.width/2;B=b}else{D=b;B=l.y+l.height/2}G.setAttributes({x:D,y:B},true);if(K){G.setAttributes({rotate:{x:D,y:B,degrees:270}},true)}}if(H){m.onAnimate(G,{to:w})}else{G.setAttributes(Ext.apply(w,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=true;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},showAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=false;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:"Ext.chart.series.Bar",type:"column",alias:"series.column",column:true,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:"Ext.chart.series.Series",type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b,c,g;d.yField=[];if(d.label.field){for(b=0,c=e.length;b<c;b++){g=e[b];d.yField.push(g.get(d.label.field))}}},getSegment:function(b){var C=this,B=C.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=C.centerX,i=C.centerY,w=0,v=0,u=0,s=0,h=0,g=0,e=0,c=0,z=0.01,m=b.endRho-b.startRho,q=b.startAngle,p=b.endAngle,j=(q+p)/2*B,l=b.margin||0,t=n(p-q)>180,D=Math.min(q,p)*B,A=Math.max(q,p)*B,o=false;k+=l*d(j);i+=l*a(j);w=k+b.startRho*d(D);h=i+b.startRho*a(D);v=k+b.endRho*d(D);g=i+b.endRho*a(D);u=k+b.startRho*d(A);e=i+b.startRho*a(A);s=k+b.endRho*d(A);c=i+b.endRho*a(A);if(n(w-u)<=z&&n(h-e)<=z){o=true}if(o){return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["Z"]]}}else{return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["L",u,e],["A",b.startRho,b.startRho,0,+t,0,w,h],["Z"]]}}},calcMiddle:function(p){var k=this,l=k.rad,o=p.slice,n=k.centerX,m=k.centerY,j=o.startAngle,e=o.endAngle,i=Math.max(("rho" in o)?o.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(p.endRho+p.startRho)/2*Math.cos(d),c=m-(p.endRho+p.startRho)/2*Math.sin(d);p.middle={x:g,y:c}},drawSeries:function(){var w=this,W=w.chart,b=W.getChartStore(),A=w.group,S=w.chart.animate,D=w.chart.axes.get(0),E=D&&D.minimum||w.minimum||0,I=D&&D.maximum||w.maximum||0,n=w.angleField||w.field||w.xField,M=W.surface,H=W.chartBBox,h=w.rad,c=+w.donut,X={},B=[],m=w.seriesStyle,a=w.seriesLabelStyle,g=w.colorArrayStyle,z=g&&g.length||0,K=W.maxGutter[0],J=W.maxGutter[1],k=Math.cos,s=Math.sin,t,e,d,v,r,C,O,F,G,L,U,T,l,V,x,o,Q,R,q,y,u,P,N;Ext.apply(m,w.style||{});w.setBBox();y=w.bbox;if(w.colorSet){g=w.colorSet;z=g.length}if(!b||!b.getCount()||w.seriesIsHidden){w.hide();w.items=[];return}e=w.centerX=H.x+(H.width/2);d=w.centerY=H.y+H.height;w.radius=Math.min(e-H.x,d-H.y);w.slices=r=[];w.items=B=[];if(!w.value){L=b.getAt(0);w.value=L.get(n)}O=w.value;if(w.needle){P={series:w,value:O,startAngle:-180,endAngle:0,rho:w.radius};u=-180*(1-(O-E)/(I-E));r.push(P)}else{u=-180*(1-(O-E)/(I-E));P={series:w,value:O,startAngle:-180,endAngle:u,rho:w.radius};N={series:w,value:w.maximum-O,startAngle:u,endAngle:0,rho:w.radius};r.push(P,N)}for(U=0,G=r.length;U<G;U++){v=r[U];C=A.getAt(U);t=Ext.apply({segment:{startAngle:v.startAngle,endAngle:v.endAngle,margin:0,rho:v.rho,startRho:v.rho*+c/100,endRho:v.rho}},Ext.apply(m,g&&{fill:g[U%z]}||{}));F=Ext.apply({},t.segment,{slice:v,series:w,storeItem:L,index:U});B[U]=F;if(!C){q=Ext.apply({type:"path",group:A},Ext.apply(m,g&&{fill:g[U%z]}||{}));C=M.add(Ext.apply(q,t))}v.sprite=v.sprite||[];F.sprite=C;v.sprite.push(C);if(S){t=w.renderer(C,L,t,U,b);C._to=t;w.onAnimate(C,{to:t})}else{t=w.renderer(C,L,Ext.apply(t,{hidden:false}),U,b);C.setAttributes(t,true)}}if(w.needle){u=u*Math.PI/180;if(!w.needleSprite){w.needleSprite=w.chart.surface.add({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))],"stroke-width":4,stroke:"#222"})}else{if(S){w.onAnimate(w.needleSprite,{to:{path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]}})}else{w.needleSprite.setAttributes({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]})}}w.needleSprite.setAttributes({hidden:false},true)}delete w.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;return(e===0)&&(b>=g&&b<a&&k>=n.startRho&&k<=n.endRho)},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({"stroke-width":3},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[+b[0]],c=[+k[0]];for(;g<h;++g){d+=+b[g]||0;a+=+k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var an=this,aA=an.chart,V=aA.axes,av=aA.getChartStore(),A=av.data.items,ar,Y=av.getCount(),w=an.chart.surface,au={},U=an.group,N=an.showMarkers,aG=an.markerGroup,G=aA.shadow,F=an.shadowGroups,ab=an.shadowAttributes,R=an.smooth,r=F.length,ay=["M"],W=["M"],d=["M"],b=["M"],M=aA.markerIndex,am=[].concat(an.axis),al,aB=[],ak={},ae=[],z={},L=false,T=[],aF=an.markerStyle,ad=an.seriesStyle,v=an.colorArrayStyle,S=v&&v.length||0,O=Ext.isNumber,aC=an.seriesIdx,h=an.getAxesForXAndYFields(),m=h.xAxis,aE=h.yAxis,ag,k,af,ah,D,c,ai,K,J,g,e,u,s,aa,Q,P,az,n,I,H,aH,o,q,E,a,ac,aj,C,ax,B,aw,p,aD,at,aq,X,l,t,ao,ap,Z;if(an.fireEvent("beforedraw",an)===false){return}if(!Y||an.seriesIsHidden){an.hide();an.items=[];if(an.line){an.line.hide(true);if(an.line.shadows){ag=an.line.shadows;for(P=0,r=ag.length;P<r;P++){k=ag[P];k.hide(true)}}if(an.fillPath){an.fillPath.hide(true)}}an.line=null;an.fillPath=null;return}at=Ext.apply(aF||{},an.markerConfig,{fill:an.seriesStyle.fill||v[aC%v.length]});X=at.type;delete at.type;aq=ad;if(!aq["stroke-width"]){aq["stroke-width"]=0.5}t="opacity" in aq?aq.opacity:1;Z="opacity" in aq?aq.opacity:0.3;ao="lineOpacity" in aq?aq.lineOpacity:t;ap="fillOpacity" in aq?aq.fillOpacity:Z;if(M&&aG&&aG.getCount()){for(Q=0;Q<M;Q++){H=aG.getAt(Q);aG.remove(H);aG.add(H);aH=aG.getAt(aG.getCount()-2);H.setAttributes({x:0,y:0,translate:{x:aH.attr.translation.x,y:aH.attr.translation.y}},true)}}an.unHighlightItem();an.cleanHighlights();an.setBBox();au=an.bbox;an.clipRect=[au.x,au.y,au.width,au.height];if(n=V.get(m)){I=n.applyData();C=I.from;ax=I.to}if(n=V.get(aE)){I=n.applyData();B=I.from;aw=I.to}if(an.xField&&!Ext.isNumber(C)){n=an.getMinMaxXValues();C=n[0];ax=n[1]}if(an.yField&&!Ext.isNumber(B)){n=an.getMinMaxYValues();B=n[0];aw=n[1]}if(isNaN(C)){C=0;ac=au.width/((Y-1)||1)}else{ac=au.width/((ax-C)||(Y-1)||1)}if(isNaN(B)){B=0;aj=au.height/((Y-1)||1)}else{aj=au.height/((aw-B)||(Y-1)||1)}for(Q=0,az=A.length;Q<az;Q++){ar=A[Q];q=ar.get(an.xField);if(typeof q=="string"||typeof q=="object"&&!Ext.isDate(q)||m&&V.get(m)&&V.get(m).type=="Category"){if(q in ak){q=ak[q]}else{q=ak[q]=Q}}E=ar.get(an.yField);if(typeof E=="undefined"||(typeof E=="string"&&!E)){continue}if(typeof E=="string"||typeof E=="object"&&!Ext.isDate(E)||aE&&V.get(aE)&&V.get(aE).type=="Category"){E=Q}T.push(Q);aB.push(q);ae.push(E)}az=aB.length;if(az>au.width){a=an.shrink(aB,ae,au.width);aB=a.x;ae=a.y}an.items=[];l=0;az=aB.length;for(Q=0;Q<az;Q++){q=aB[Q];E=ae[Q];if(E===false){if(W.length==1){W=[]}L=true;an.items.push(false);continue}else{K=(au.x+(q-C)*ac).toFixed(2);J=((au.y+au.height)-(E-B)*aj).toFixed(2);if(L){L=false;W.push("M")}W=W.concat([K,J])}if((typeof s=="undefined")&&(typeof J!="undefined")){s=J;u=K}if(!an.line||aA.resizing){ay=ay.concat([K,au.y+au.height/2])}if(aA.animate&&aA.resizing&&an.line){an.line.setAttributes({path:ay,opacity:ao},true);if(an.fillPath){an.fillPath.setAttributes({path:ay,opacity:ap},true)}if(an.line.shadows){ag=an.line.shadows;for(P=0,r=ag.length;P<r;P++){k=ag[P];k.setAttributes({path:ay},true)}}}if(N){H=aG.getAt(l++);if(!H){H=Ext.chart.Shape[X](w,Ext.apply({group:[U,aG],x:0,y:0,translate:{x:+(g||K),y:e||(au.y+au.height/2)},value:'"'+q+", "+E+'"',zIndex:4000},at));H._to={translate:{x:+K,y:+J}}}else{H.setAttributes({value:'"'+q+", "+E+'"',x:0,y:0,hidden:false},true);H._to={translate:{x:+K,y:+J}}}}an.items.push({series:an,value:[q,E],point:[K,J],sprite:H,storeItem:av.getAt(T[Q])});g=K;e=J}if(W.length<=1){return}if(an.smooth){b=Ext.draw.Draw.smooth(W,O(R)?R:an.defaultSmoothness)}d=R?b:W;if(aA.markerIndex&&an.previousPath){ah=an.previousPath;if(!R){Ext.Array.erase(ah,1,2)}}else{ah=W}if(!an.line){an.line=w.add(Ext.apply({type:"path",group:U,path:ay,stroke:aq.stroke||aq.fill},aq||{}));an.line.setAttributes({opacity:ao},true);if(G){an.line.setAttributes(Ext.apply({},an.shadowOptions),true)}an.line.setAttributes({fill:"none",zIndex:3000});if(!aq.stroke&&S){an.line.setAttributes({stroke:v[aC%S]},true)}if(G){ag=an.line.shadows=[];for(af=0;af<r;af++){al=ab[af];al=Ext.apply({},al,{path:ay});k=w.add(Ext.apply({},{type:"path",group:F[af]},al));ag.push(k)}}}if(an.fill){c=d.concat([["L",K,au.y+au.height],["L",u,au.y+au.height],["L",u,s]]);if(!an.fillPath){an.fillPath=w.add({group:U,type:"path",fill:aq.fill||v[aC%S],path:ay})}}aa=N&&aG.getCount();if(aA.animate){D=an.fill;p=an.line;ai=an.renderer(p,false,{path:d},Q,av);Ext.apply(ai,aq||{},{stroke:aq.stroke||aq.fill});delete ai.fill;p.show(true);if(aA.markerIndex&&an.previousPath){an.animation=aD=an.onAnimate(p,{to:ai,from:{path:ah}})}else{an.animation=aD=an.onAnimate(p,{to:ai})}if(G){ag=p.shadows;for(P=0;P<r;P++){ag[P].show(true);if(aA.markerIndex&&an.previousPath){an.onAnimate(ag[P],{to:{path:d},from:{path:ah}})}else{an.onAnimate(ag[P],{to:{path:d}})}}}if(D){an.fillPath.show(true);an.onAnimate(an.fillPath,{to:Ext.apply({},{path:c,fill:aq.fill||v[aC%S],"stroke-width":0,opacity:ap},aq||{})})}if(N){l=0;for(Q=0;Q<az;Q++){if(an.items[Q]){o=aG.getAt(l++);if(o){ai=an.renderer(o,av.getAt(Q),o._to,Q,av);an.onAnimate(o,{to:Ext.apply(ai,at||{})});o.show(true)}}}for(;l<aa;l++){o=aG.getAt(l);o.hide(true)}}}else{ai=an.renderer(an.line,false,{path:d,hidden:false},Q,av);Ext.apply(ai,aq||{},{stroke:aq.stroke||aq.fill});delete ai.fill;an.line.setAttributes(ai,true);an.line.setAttributes({opacity:ao},true);if(G){ag=an.line.shadows;for(P=0;P<r;P++){ag[P].setAttributes({path:d,hidden:false},true)}}if(an.fill){an.fillPath.setAttributes({path:c,hidden:false,opacity:ap},true)}if(N){l=0;for(Q=0;Q<az;Q++){if(an.items[Q]){o=aG.getAt(l++);if(o){ai=an.renderer(o,av.getAt(Q),o._to,Q,av);o.setAttributes(Ext.apply(at||{},ai||{}),true);if(!o.attr.hidden){o.show(true)}}}}for(;l<aa;l++){o=aG.getAt(l);o.hide(true)}}}if(aA.markerIndex){if(an.smooth){Ext.Array.erase(W,1,2)}else{Ext.Array.splice(W,1,0,W[1],W[2])}an.previousPath=W}an.renderLabels();an.renderCallouts();an.fireEvent("draw",an)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,d){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],c=s.sprite.attr.radius,e,n,m;g.setAttributes({text:q(k.get(b)),hidden:true},true);if(o=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(o=="under"||o=="over"){e=s.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(o=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r&&u.animation){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=parseFloat(a.line.attr["stroke-width"])||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,r,J,G,F,d,k){if(!F){return}var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=G==0?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=[+J.point[0],+J.point[1]],A,g,N,K,o,q,I=L.offsetFromViz||30,C=L.offsetToSide||10,B=L.offsetBox||3,h,e,j,w,u,E=M.clipRect,b={width:L.styles.width||10,height:L.styles.height||10},n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(s.animate){M.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(u in m){m[u].show(true)}},isItemInPoint:function(j,g,A,q){var C=this,n=C.items,s=C.selectionTolerance,k=null,z,c,p,v,h,w,b,t,a,l,B,e,d,o,u,r,D=Math.sqrt,m=Math.abs;c=n[q];z=q&&n[q-1];if(q>=h){z=n[h-1]}p=z&&z.point;v=c&&c.point;w=z?p[0]:v[0]-s;b=z?p[1]:v[1];t=c?v[0]:p[0]+s;a=c?v[1]:p[1];e=D((j-w)*(j-w)+(g-b)*(g-b));d=D((j-t)*(j-t)+(g-a)*(g-a));o=Math.min(e,d);if(o<=s){return o==e?z:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:"Ext.chart.series.Series",type:"pie",alias:"series.pie",accuracy:100000,rad:Math.PI*2/100000,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;b.highlightCfg=Ext.merge({segment:{margin:20}},b.highlightCfg);Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(l){var i=h.getSegment(l);if(!i.path||i.path.length===0){i.path=["M",0,0]}return i};h.__excludes=h.__excludes||[]},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b,c,g;d.yField=[];if(d.label.field){for(b=0,c=e.length;b<c;b++){g=e[b];d.yField.push(g.get(d.label.field))}}},getSegment:function(d){var J=this,I=J.rad,i=Math.cos,a=Math.sin,p=J.centerX,n=J.centerY,E=0,D=0,C=0,A=0,l=0,k=0,j=0,g=0,w=0,c=0,v=0,b=0,G=0.01,z=d.startAngle,u=d.endAngle,o=(z+u)/2*I,r=d.margin||0,K=Math.min(z,u)*I,H=Math.max(z,u)*I,t=i(K),h=a(K),s=i(H),e=a(H),m=i(o),F=a(o),B=0,q=0.7071067811865476;if(H-K<G){return{path:""}}if(r!==0){p+=r*m;n+=r*F}D=p+d.endRho*t;k=n+d.endRho*h;A=p+d.endRho*s;g=n+d.endRho*e;v=p+d.endRho*m;b=n+d.endRho*F;if(d.startRho!==0){E=p+d.startRho*t;l=n+d.startRho*h;C=p+d.startRho*s;j=n+d.startRho*e;w=p+d.startRho*m;c=n+d.startRho*F;return{path:[["M",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",C,j],["A",d.startRho,d.startRho,0,B,0,w,c],["L",w,c],["A",d.startRho,d.startRho,0,0,0,E,l],["L",E,l],["Z"]]}}else{return{path:[["M",p,n],["L",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",p,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var s=this,a=s.chart.getChartStore(),W=a.data.items,I,x=s.group,S=s.chart.animate,k=s.angleField||s.field||s.xField,A=[].concat(s.lengthField),R=0,X=s.chart,J=X.surface,G=X.chartBBox,g=X.shadow,Q=s.shadowGroups,P=s.shadowAttributes,aa=Q.length,K=A.length,B=0,b=+s.donut,Z=[],y=[],u=0,M=0,t=0,h=s.seriesStyle,e=s.colorArrayStyle,w=e&&e.length||0,o,Y,C,H,E,d,c,q,l=0,r,n,z,L,D,ab,F,U,T,V,N,O,m,v;Ext.apply(h,s.style||{});s.setBBox();v=s.bbox;if(s.colorSet){e=s.colorSet;w=e.length}if(!a||!a.getCount()||s.seriesIsHidden){s.hide();s.items=[];return}s.unHighlightItem();s.cleanHighlights();d=s.centerX=G.x+(G.width/2);c=s.centerY=G.y+(G.height/2);s.radius=Math.min(d-G.x,c-G.y);s.slices=n=[];s.items=y=[];for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){continue}u+=+I.get(k);if(A[0]){for(T=0,R=0;T<K;T++){R+=+I.get(A[T])}Z[U]=R;M=Math.max(M,R)}}u=u||1;for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){L=0}else{L=I.get(k);if(l==0){l=1}}if(l==1){l=2;s.firstAngle=t=s.accuracy*L/u/2;for(T=0;T<U;T++){n[T].startAngle=n[T].endAngle=s.firstAngle}}V=t-s.accuracy*L/u;r={series:s,value:L,startAngle:t,endAngle:V,storeItem:I};if(A[0]){ab=+Z[U];r.rho=Math.floor(s.radius/M*ab)}else{r.rho=s.radius}n[U]=r;(function(){t=V})()}if(g){for(U=0,F=n.length;U<F;U++){r=n[U];r.shadowAttrs=[];for(T=0,B=0,C=[];T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o={segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy)};for(E=0,C=[];E<aa;E++){Y=P[E];H=Q[E].getAt(U);if(!H){H=X.surface.add(Ext.apply({},{type:"path",group:Q[E],strokeLinejoin:"round"},o,Y))}Y=s.renderer(H,a.getAt(U),Ext.apply({},o,Y),U,a);if(S){s.onAnimate(H,{to:Y})}else{H.setAttributes(Y,true)}C.push(H)}r.shadowAttrs[T]=C}}}for(U=0,F=n.length;U<F;U++){r=n[U];for(T=0,B=0;T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o=Ext.apply({segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:(!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy))},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));D=Ext.apply({},o.segment,{slice:r,series:s,storeItem:r.storeItem,index:U});s.calcMiddle(D);if(g){D.shadows=r.shadowAttrs[T]}y[U]=D;if(!z){m=Ext.apply({type:"path",group:x,middle:D.middle},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));z=J.add(Ext.apply(m,o))}r.sprite=r.sprite||[];D.sprite=z;r.sprite.push(z);r.point=[D.middle.x,D.middle.y];if(S){o=s.renderer(z,a.getAt(U),o,U,a);z._to=o;z._animating=true;s.onAnimate(z,{to:o,listeners:{afteranimate:{fn:function(){this._animating=false},scope:z}}})}else{o=s.renderer(z,a.getAt(U),Ext.apply(o,{hidden:false}),U,a);z.setAttributes(o,true)}B+=q}}F=x.getCount();for(U=0;U<F;U++){if(!n[(U/K)>>0]&&x.getAt(U)){x.getAt(U).hide(true)}}if(g){aa=Q.length;for(E=0;E<F;E++){if(!n[(E/K)>>0]){for(T=0;T<aa;T++){if(Q[T].getAt(E)){Q[T].getAt(E).hide(true)}}}}}s.renderLabels();s.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,p,z,t,s,e,g){var B=this,q=B.chart,w=q.resizing,A=B.label,u=A.renderer,c=[].concat(A.field),m=B.centerX,l=B.centerY,C=z.middle,b={x:C.x,y:C.y},o=C.x-m,n=C.y-l,r={},d=1,j=Math.atan2(n,o||1),v=j*180/Math.PI,h;b.hidden=false;if(this.__excludes&&this.__excludes[t]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:u(p.get(c[g]))},true);switch(s){case"outside":d=Math.sqrt(o*o+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":v=a(v);v=(v>90&&v<270)?v+180:v;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-v)>180*0.5){if(v>h){v-=360}else{v+=360}v=v%360}else{v=a(v)}b.rotate={degrees:v,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!w&&(s!="rotate"||h!=null)){B.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=r},onPlaceCallout:function(l,o,z,v,u,d,e){var A=this,q=A.chart,j=A.centerX,h=A.centerY,B=z.middle,b={x:B.x,y:B.y},m=B.x-j,k=B.y-h,c=1,n,g=Math.atan2(k,m||1),a=l.label.getBBox(),w=20,t=10,s=10,r;c=z.endRho+w;n=(z.endRho+z.startRho)/2+(z.endRho-z.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;m=n*Math.cos(g);k=n*Math.sin(g);if(q.animate){A.onAnimate(l.lines,{to:{path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]}});A.onAnimate(l.box,{to:{x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s}});A.onAnimate(l.label,{to:{x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]},true);l.box.setAttributes({x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s},true);l.label.setAttributes({x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(r in l){l[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=h.accuracy}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(c){var g,b,j,h,e,a,d;c=(isNaN(this._index)?c:this._index)||0;this.__excludes=this.__excludes||[];this.__excludes[c]=true;d=this.slices[c].sprite;for(e=0,a=d.length;e<a;e++){d[e].setAttributes({hidden:true},true)}if(this.slices[c].shadowAttrs){for(g=0,h=this.slices[c].shadowAttrs,b=h.length;g<b;g++){j=h[g];for(e=0,a=j.length;e<a;e++){j[e].setAttributes({hidden:true},true)}}}this.drawSeries()},showAll:function(a){a=(isNaN(this._index)?a:this._index)||0;this.__excludes[a]=false;this.drawSeries()},highlightItem:function(s){var u=this,t=u.rad,w,d,o,q,a,e,k,b,m,c,g,p,h,v,n,l,j;s=s||this.items[this._index];this.unHighlightItem();if(!s||u.animating||(s.sprite&&s.sprite._animating)){return}u.callParent([s]);if(!u.highlight){return}if("segment" in u.highlightCfg){w=u.highlightCfg.segment;d=u.chart.animate;if(u.labelsGroup){g=u.labelsGroup;p=u.label.display;h=g.getAt(s.index);v=(s.startAngle+s.endAngle)/2*t;n=w.margin||0;l=n*Math.cos(v);j=n*Math.sin(v);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:u.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(u.chart.shadow&&s.shadows){q=0;a=s.shadows;k=a.length;for(;q<k;q++){e=a[q];b={};m=s.sprite._from.segment;for(c in m){if(!(c in w)){b[c]=m[c]}}o={segment:Ext.applyIf(b,u.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:o,duration:u.highlightDuration})}else{e.setAttributes(o,true)}}}}},unHighlightItem:function(){var w=this,l,e,d,k,t,s,r,q,x,m,c,a,v,n,b,g,u,h,o;if(!w.highlight){return}if(("segment" in w.highlightCfg)&&w.items){l=w.items;e=w.chart.animate;d=!!w.chart.shadow;k=w.labelsGroup;t=l.length;s=0;r=0;q=w.label.display;for(;s<t;s++){u=l[s];if(!u){continue}n=u.sprite;if(n&&n._highlighted){if(k){h=k.getAt(u.index);o=Ext.apply({translate:{x:0,y:0}},q=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:o,duration:w.highlightDuration})}else{h.setAttributes(o,true)}}if(d){b=u.shadows;x=b.length;for(;r<x;r++){c={};a=u.sprite._to.segment;v=u.sprite._from.segment;Ext.apply(c,v);for(m in a){if(!(m in v)){c[m]=a[m]}}g=b[r];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:w.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}w.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:"Ext.chart.series.Series",requires:["Ext.chart.Shape","Ext.fx.Anim"],type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var w=this,c=w.chart.getChartStore(),S=c.data.items,T,I,z=w.group,B,U=w.chart,L=U.series.items,M,v,m,Q=U.animate,o=w.field||w.yField,K=U.surface,F=U.chartBBox,E=w.seriesIdx,j=w.colorArrayStyle,g,e,A,N,r=0,a=[],D=Math.max,k=Math.cos,t=Math.sin,q=Math.PI*2,P=c.getCount(),h,O,J,H,G,R,u,n=w.seriesStyle,b=w.seriesLabelStyle,p=U.resizing||!w.radar,C=U.axes&&U.axes.get(0),V=!(C&&C.maximum);w.setBBox();r=V?0:(C.maximum||0);Ext.apply(n,w.style||{});if(!c||!c.getCount()||w.seriesIsHidden){w.hide();w.items=[];if(w.radar){w.radar.hide(true)}w.radar=null;return}if(!n.stroke){n.stroke=j[E%j.length]}w.unHighlightItem();w.cleanHighlights();g=w.centerX=F.x+(F.width/2);e=w.centerY=F.y+(F.height/2);w.radius=N=Math.min(F.width,F.height)/2;w.items=A=[];if(V){for(M=0,v=L.length;M<v;M++){m=L[M];a.push(m.yField)}for(T=0;T<P;T++){I=S[T];for(R=0,u=a.length;R<u;R++){r=D(+I.get(a[R]),r)}}}r=r||1;h=[];O=[];for(R=0;R<P;R++){I=S[R];G=N*I.get(o)/r;J=G*k(R/P*q);H=G*t(R/P*q);if(R==0){O.push("M",J+g,H+e);h.push("M",0.01*J+g,0.01*H+e)}else{O.push("L",J+g,H+e);h.push("L",0.01*J+g,0.01*H+e)}A.push({sprite:false,point:[g+J,e+H],storeItem:I,series:w})}O.push("Z");if(!w.radar){w.radar=K.add(Ext.apply({type:"path",group:z,path:h},n||{}))}if(U.resizing){w.radar.setAttributes({path:h},true)}if(U.animate){w.onAnimate(w.radar,{to:Ext.apply({path:O},n||{})})}else{w.radar.setAttributes(Ext.apply({path:O},n||{}),true)}if(w.showMarkers){w.drawMarkers()}w.renderLabels();w.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig,{fill:n.colorArrayStyle[n.seriesIdx%n.colorArrayStyle.length]}),m=n.items,o=j.type,q=n.markerGroup,e=n.centerX,d=n.centerY,p,h,c,g;delete j.type;for(h=0,c=m.length;h<c;h++){p=m[h];g=q.getAt(h);if(!g){g=Ext.chart.Shape[o](a,Ext.apply({group:q,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}p.sprite=g;if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:p.point[0],y:p.point[1]}};if(k.animate){n.onAnimate(g,{to:g._to})}else{g.setAttributes(Ext.apply(g._to,j||{}),true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(q,h,s,g,k,b){var m=this,l=m.chart,j=l.resizing,c=m.label,r=c.renderer,p=c.field,e=m.centerX,d=m.centerY,a={x:s.point[0],y:s.point[1]},o=a.x-e,n=a.y-d;q.setAttributes({text:r(h.get(p)),hidden:true},true);if(j){q.setAttributes({x:e,y:d},true)}if(b){q.show(true);m.onAnimate(q,{to:a})}else{q.setAttributes(a,true);q.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}}});Ext.define("Ext.chart.series.Scatter",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.fx.Anim"],type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var s=this,j=s.chart,d=j.getChartStore(),o=j.axes,l=s.getAxesForXAndYFields(),k=l.xAxis,e=l.yAxis,a,t,c,g,r,p,q,n,m,b,h;s.setBBox();a=s.bbox;if(b=o.get(k)){h=b.applyData();r=h.from;q=h.to}if(b=o.get(e)){h=b.applyData();p=h.from;n=h.to}if(s.xField&&!Ext.isNumber(r)){b=s.getMinMaxXValues();r=b[0];q=b[1]}if(s.yField&&!Ext.isNumber(p)){b=s.getMinMaxYValues();p=b[0];n=b[1]}if(isNaN(r)){r=0;q=d.getCount()-1;t=a.width/(d.getCount()-1)}else{t=a.width/(q-r)}if(isNaN(p)){p=0;n=d.getCount()-1;c=a.height/(d.getCount()-1)}else{c=a.height/(n-p)}return{bbox:a,minX:r,minY:p,xScale:t,yScale:c}},getPaths:function(){var z=this,n=z.chart,b=n.shadow,e=n.getChartStore(),B=e.data.items,s,l,d,j=z.group,g=z.bounds=z.getBounds(),a=z.bbox,C=g.xScale,c=g.yScale,v=g.minX,u=g.minY,A=a.x,w=a.y,h=a.height,o=z.items=[],q=[],m,k,r,t,p;for(s=0,l=B.length;s<l;s++){d=B[s];r=d.get(z.xField);t=d.get(z.yField);if(typeof t=="undefined"||(typeof t=="string"&&!t)||r==null||t==null){continue}if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)){r=s}if(typeof t=="string"||typeof t=="object"&&!Ext.isDate(t)){t=s}m=A+(r-v)*C;k=w+h-(t-u)*c;q.push({x:m,y:k});z.items.push({series:z,value:[r,t],point:[m,k],storeItem:d});if(n.animate&&n.resizing){p=j.getAt(s);if(p){z.resetPoint(p);if(b){z.resetShadow(p)}}}}return q},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,o=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(o.x+o.width)/2;e.translate.y+=(o.y+o.height)/2}else{Ext.apply(e,{translate:{x:(o.x+o.width)/2,y:(o.y+o.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var u=this,l=u.chart,h=l.getChartStore(),j=u.group,c=l.shadow,a=u.shadowGroups,q=u.shadowAttributes,r=a.length,m,n,o,k,p,t,e,g,b,d,s;t=Ext.apply(u.markerStyle,u.markerConfig);g=t.type;delete t.type;if(!h||!h.getCount()){u.hide();u.items=[];return}u.unHighlightItem();u.cleanHighlights();n=u.getPaths();k=n.length;for(p=0;p<k;p++){o=n[p];m=j.getAt(p);Ext.apply(o,t);if(!m){m=u.createPoint(o,g);if(c){u.createShadow(m,t,g)}}b=m.shadows;if(l.animate){d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;u.onAnimate(m,{to:d});for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);u.onAnimate(b[e],{to:d})}}else{d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;m.setAttributes(d,true);for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);b[e].setAttributes(d,true)}}u.items[p].sprite=m}k=j.getCount();for(p=n.length;p<k;p++){j.getAt(p).hide(true)}u.renderLabels();u.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(g,k,t,q,p,d){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],c=t.sprite.attr.radius,e,n,m,o;g.setAttributes({text:r(k.get(b)),hidden:true},true);if(p=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(p=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(s){o=t.sprite.getActiveAnimation();if(o){o.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{v.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,B,z,w,c,h){var E=this,n=E.chart,u=n.surface,A=n.resizing,D=E.callouts,o=E.items,b=B.point,F,a=k.label.getBBox(),C=30,t=10,s=3,e,d,g,r,q,v=E.bbox,l,j;F=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(e<v[0]||(e+g)>(v[0]+v[2])){F[0]*=-1}if(d<v[1]||(d+r)>(v[1]+v[3])){F[1]*=-1}l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(n.animate){E.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);E.onAnimate(k.box,{to:{x:e,y:d,width:g,height:r}},true);E.onAnimate(k.label,{to:{x:l+(F[0]>0?s:-(a.width+s)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:r},true);k.label.setAttributes({x:l+(F[0]>0?s:-(a.width+s)),y:j},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,itemSizePolicy:{setsWidth:0,setsHeight:0},getItemSizePolicy:function(a){return this.itemSizePolicy},getLayoutItems:function(){var g=this,b=[],c=g.callParent(),e,a=c.length,d;for(d=0;d<a;d++){e=c[d];if(!e.hidden){b.push(e)}}return b},renderChildren:function(){var j=this,h=j.getLayoutItems(),e=j.owner.getTargetEl().child("table",true).tBodies[0],p=e.rows,d=0,g=h.length,o,m,c,a,n,l,k,b;o=j.calculateCells(h);for(;d<g;d++){m=o[d];c=m.rowIdx;a=m.cellIdx;n=h[d];l=p[c];if(!l){l=e.insertRow(c);if(j.trAttrs){l.set(j.trAttrs)}}b=k=Ext.get(l.cells[a]||l.insertCell(a));if(j.needsDivWrap()){b=k.first()||k.createChild({tag:"div"});b.setWidth(null)}if(!n.rendered){j.renderItem(n,b,0)}else{if(!j.isValidParent(n,b,c,a,e)){j.moveItem(n,b,0)}}if(j.tdAttrs){k.set(j.tdAttrs)}if(n.tdAttrs){k.set(n.tdAttrs)}k.set({colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:j.cellCls+" "+(n.cellCls||"")});if(!o[d+1]||o[d+1].rowIdx!==c){a++;while(l.cells[a]){l.deleteCell(a)}}}c++;while(e.rows[c]){e.deleteRow(c)}},calculate:function(g){if(!g.hasDomProp("containerChildrenDone")){this.done=false}else{var c=g.targetContext,b=g.widthModel.shrinkWrap,a=g.heightModel.shrinkWrap,h=a||b,d=h&&c.el.child("table",true),e=h&&c.getPaddingInfo();if(b){g.setContentWidth(d.offsetWidth+e.width,true)}if(a){g.setContentHeight(d.offsetHeight+e.height,true)}}},finalizeLayout:function(){if(this.needsDivWrap()){var b=this.getLayoutItems(),c,a=b.length,d;for(c=0;c<a;c++){d=b[c];Ext.fly(d.el.dom.parentNode).setWidth(d.getWidth())}}if(Ext.isIE6||(Ext.isIEQuirks)){this.owner.getTargetEl().child("table").repaint()}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getRenderTree:function(){var k=this,h=k.getLayoutItems(),o,p=[],q=Ext.apply({tag:"table",role:"presentation",cls:k.tableCls,cellspacing:0,cn:{tag:"tbody",cn:p}},k.tableAttrs),c=k.tdAttrs,d=k.needsDivWrap(),e,g=h.length,n,m,j,b,a,l;o=k.calculateCells(h);for(e=0;e<g;e++){n=h[e];m=o[e];b=m.rowIdx;a=m.cellIdx;j=p[b];if(!j){j=p[b]={tag:"tr",cn:[]};if(k.trAttrs){Ext.apply(j,k.trAttrs)}}l=j.cn[a]={tag:"td"};if(c){Ext.apply(l,c)}Ext.apply(l,{colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:k.cellCls+" "+(n.cellCls||"")});if(d){l=l.cn={tag:"div"}}k.configureItem(n);l.cn=n.getRenderTree()}return q},isValidParent:function(g,h,e,d){var b,a,c;if(arguments.length===3){c=g.el.up("table");return c&&c.dom.parentNode===h.dom}b=this.owner.getTargetEl().child("table",true).tBodies[0];a=b.rows[e].cells[d];return g.el.dom.parentNode===a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.container.ButtonGroup",{extend:"Ext.panel.Panel",alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",requires:["Ext.layout.container.Table"],baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,titleAlign:"center",initComponent:function(){var a=this,b=a.columns;a.noTitleCls=a.baseCls+"-notitle";if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addCls(a.noTitleCls)}a.callParent(arguments)},onBeforeAdd:function(a){if(a.isButton){a.ui=a.ui+"-toolbar"}this.callParent(arguments)},applyDefaults:function(a){if(!Ext.isString(a)){a=this.callParent(arguments)}return a}});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",preserveElOnDestroy:true,initComponent:function(){var c=this,a=document.body.parentNode,b;Ext.getScrollbarSize();c.width=c.height=undefined;c.callParent(arguments);Ext.fly(a).addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){delete c.autoScroll;Ext.fly(a).setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;c.renderTo=c.el},onRender:function(){var a=this;a.callParent(arguments);a.width=Ext.Element.getViewportWidth();a.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var a=this;a.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(a.fireResize,a)},1)},fireResize:function(b,a){if(b!=this.width||a!=this.height){this.setSize(b,a)}}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}this.mixins.observable.constructor.call(this,a);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var c=this,b=true;if(a===undefined||typeof a=="string"){a={type:a};b=false}if(a.isReader){a.setModel(c.model)}else{if(b){a=Ext.apply({},a)}Ext.applyIf(a,{proxy:c,model:c.model,type:c.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}c.reader=a;return c.reader},getReader:function(){return this.reader},onMetaChange:function(a){this.fireEvent("metachange",this,a)},setWriter:function(c){var b=this,a=true;if(c===undefined||typeof c=="string"){c={type:c};a=false}if(!c.isWriter){if(a){c=Ext.apply({},c)}Ext.applyIf(c,{model:b.model,type:b.defaultWriterType});c=Ext.createByAlias("writer."+c.type,c)}b.writer=c;return b.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(o,l){var k=this,j=k.batchActions,h,c,g,d,e,m,b,n,i;if(o.operations===undefined){o={operations:o,listeners:l}}if(o.batch){if(Ext.isDefined(o.batch.runOperation)){h=Ext.applyIf(o.batch,{proxy:k,listeners:{}})}}else{o.batch={proxy:k,listeners:o.listeners||{}}}if(!h){h=new Ext.data.Batch(o.batch)}h.on("complete",Ext.bind(k.onBatchComplete,k,[o],0));g=k.batchOrder.split(",");d=g.length;for(m=0;m<d;m++){e=g[m];c=o.operations[e];if(c){if(j){h.add(new Ext.data.Operation({action:e,records:c}))}else{n=c.length;for(b=0;b<n;b++){i=c[b];h.add(new Ext.data.Operation({action:e,records:[i]}))}}}}h.start();return h},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.proxy.Proxy","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());c.proxy.on("metachange",c.onMetaChange,c);if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=new Ext.util.MixedCollection();c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},onMetaChange:function(a,b){this.fireEvent("metachange",this,b)},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=new Ext.data.Operation(c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=new Ext.data.Operation(b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=new Ext.data.Operation(b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g);g.fireEvent("refresh",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(c){var e=this,b={},g=e.getNewRecords(),d=e.getUpdatedRecords(),a=e.getRemovedRecords(),h=false;if(g.length>0){b.create=g;h=true}if(d.length>0){b.update=d;h=true}if(a.length>0){b.destroy=a;h=true}if(h&&e.fireEvent("beforesync",b)!==false){c=c||{};e.proxy.batch(Ext.apply(c,{operations:b,listeners:e.getBatchListeners()}))}return e},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=Ext.apply({action:"read",filters:c.filters.items,sorters:c.getSorters()},b);c.lastOptions=b;a=new Ext.data.Operation(b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},reload:function(a){return this.load(Ext.apply(this.lastOptions,a))},afterEdit:function(a,e){var d=this,b,c;if(d.autoSync&&!d.autoSyncSuspended){for(b=e.length;b--;){if(a.fields.get(e[b]).persist){c=true;break}}if(c){d.sync()}}d.fireEvent("update",d,a,Ext.data.Model.EDIT,e)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT,null)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT,null)},destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=a.tree=a.sorters=a.filters=a.groupers=null;if(a.reader){a.reader.destroyReader()}a.proxy=a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}else{a.model=null}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet","Ext.XTemplate"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:"Ext.util.Observable"},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,applyDefaults:true,lastFieldGeneration:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.fieldCount=0;b.model=Ext.ModelManager.getModel(b.model);b.accessExpressionFn=Ext.Function.bind(b.createFieldAccessExpression,b);if(b.model&&b.model.prototype.fields){b.buildExtractors()}this.addEvents("exception")},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b;if(a){b=a.responseText?this.getResponseData(a):this.readRecords(a)}return b||this.nullResultSet},readRecords:function(c){var d=this,i,b,a,g,e,h,j;if(d.lastFieldGeneration!==d.model.prototype.fields.generation){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);i=true;b=0;a=[];if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(d.readRecordsOnFailure||i){g=Ext.isArray(c)?c:d.getRoot(c);if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(g){a=d.extractData(g);b=a.length}}return new Ext.data.ResultSet({total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,d=[],b=j.model,a=k.length,e,c,h,g;if(!k.length&&Ext.isObject(k)){k=[k];a=1}for(g=0;g<a;g++){c=k[g];if(!c.isModel){h=new b(undefined,j.getId(c),c,e={});h.phantom=false;j.convertRecordData(e,c,h);d.push(h);if(j.implicitIncludes){j.readAssociated(h,c)}}else{d.push(c)}}return d},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.proxy;if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(e){var d=this,b=e.fields||d.getFields(),c,a;d.metaData=e;d.root=e.root||d.root;d.idProperty=e.idProperty||d.idProperty;d.totalProperty=e.totalProperty||d.totalProperty;d.successProperty=e.successProperty||d.successProperty;d.messageProperty=e.messageProperty||d.messageProperty;a=e.clientIdProperty;if(d.model){d.model.setFields(b,d.idProperty,a);d.setModel(d.model,true)}else{c=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:b,clientIdProperty:a});if(d.idProperty){c.idProperty=d.idProperty}d.setModel(c,true)}},getIdProperty:function(){return this.idProperty||this.model.prototype.idProperty},buildExtractors:function(b){var g=this,j=g.getIdProperty(),i=g.totalProperty,e=g.successProperty,h=g.messageProperty,d,c,a;if(b===true){delete g.convertRecordData}if(g.convertRecordData){return}if(i){g.getTotal=g.createAccessor(i)}if(e){g.getSuccess=g.createAccessor(e)}if(h){g.getMessage=g.createAccessor(h)}if(j){c=g.model.prototype.fields.get(j);if(c){a=c.mapping;j=(a!==undefined&&a!==null)?a:j}d=g.createAccessor(j);g.getId=function(k){var l=d.call(g,k);return(l===undefined||l==="")?null:l}}else{g.getId=function(){return null}}g.convertRecordData=g.buildRecordDataExtractor();g.lastFieldGeneration=g.model.prototype.fields.generation},recordDataExtractorTemplate:["var me = this\n"," ,fields = me.model.prototype.fields\n"," ,value\n"," ,internalId\n",'<tpl for="fields">',' ,__field{#} = fields.get("{name}")\n',"</tpl>",";\n","return function(dest, source, record) {\n",'<tpl for="fields">',' value = {[ this.createFieldAccessExpression(values, "__field" + xindex, "source") ]};\n','<tpl if="hasCustomConvert">',' dest["{name}"] = value === undefined ? __field{#}.convert(__field{#}.defaultValue, record) : __field{#}.convert(value, record);\n','<tpl elseif="defaultValue !== undefined">'," if (value === undefined) {\n"," if (me.applyDefaults) {\n",'<tpl if="convert">',' dest["{name}"] = __field{#}.convert(__field{#}.defaultValue, record);\n',"<tpl else>",' dest["{name}"] = __field{#}.defaultValue\n',"</tpl>"," };\n"," } else {\n",'<tpl if="convert">',' dest["{name}"] = __field{#}.convert(value, record);\n',"<tpl else>",' dest["{name}"] = value;\n',"</tpl>"," };","<tpl else>"," if (value !== undefined) {\n",'<tpl if="convert">',' dest["{name}"] = __field{#}.convert(value, record);\n',"<tpl else>",' dest["{name}"] = value;\n',"</tpl>"," }\n","</tpl>","</tpl>",'<tpl if="clientIdProp">',' if (record && (internalId = {[ this.createFieldAccessExpression({mapping: values.clientIdProp}, null, "source") ]})) {\n',' record.{["internalId"]} = internalId;\n'," }\n","</tpl>","};"],buildRecordDataExtractor:function(){var c=this,a=c.model.prototype,b={clientIdProp:a.clientIdProperty,fields:a.fields.items};c.recordDataExtractorTemplate.createFieldAccessExpression=c.accessExpressionFn;return Ext.functionFactory(c.recordDataExtractorTemplate.apply(b)).call(c)},destroyReader:function(){var a=this;delete a.proxy;delete a.model;delete a.convertRecordData;delete a.getId;delete a.getTotal;delete a.getSuccess;delete a.getMessage}},function(){var a=this.prototype;Ext.apply(a,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true}),recordDataExtractorTemplate:new Ext.XTemplate(a.recordDataExtractorTemplate)})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var d,b;try{d=Ext.decode(a.responseText);return this.readRecords(d)}catch(c){b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:c.message});this.fireEvent("exception",this,a,b);Ext.Logger.warn("Unable to parse the JSON returned by the server");return b}},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:(function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()),createFieldAccessExpression:(function(){var a=/[\[\.]/;return function(i,d,c){var e=this,g=(i.mapping!==null),h=g?i.mapping:i.name,b,j;if(typeof h==="function"){b=d+".mapping("+c+", this)"}else{if(this.useSimpleAccessors===true||((j=String(h).search(a))<0)){if(!g||isNaN(h)){h='"'+h+'"'}b=c+"["+h+"]"}else{b=c+(j>0?".":"")+h}}return b}}())});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",isWriter:true,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d],c))}return this.writeRecords(e,g)},getRecordData:function(g,d){var n=g.phantom===true,b=this.writeAllFields||n,c=this.nameProperty,h=g.fields,p=h.items,e={},l=g.clientIdProperty,k,a,j,o,m,i,q;if(b){q=p.length;for(i=0;i<q;i++){j=p[i];if(j.persist){a=j[c]||j.name;m=g.get(j.name);if(j.serialize){e[a]=j.serialize(m,g)}else{if(j.type===Ext.data.Types.DATE&&j.dateFormat){e[a]=Ext.Date.format(m,j.dateFormat)}else{e[a]=m}}}}}else{k=g.getChanges();for(o in k){if(k.hasOwnProperty(o)){j=h.get(o);if(j.persist){a=j[c]||j.name;m=g.get(j.name);if(j.serialize){e[a]=j.serialize(m,g)}else{if(j.type===Ext.data.Types.DATE&&j.dateFormat){e[a]=Ext.Date.format(m,j.dateFormat)}else{e[a]=m}}}}}}if(n){if(l&&d&&d.records.length>1){e[l]=g.internalId}}else{e[g.idProperty]=g.getId()}return e}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",groupDirectionParam:"groupDir",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,simpleGroupMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};b.callParent([a]);b.extraParams=a.extraParams||{};b.api=Ext.apply({},a.api||b.api);b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.extraParams[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.params||{},c.extraParams||{}),b;d=Ext.applyIf(d,c.getParams(a));if(a.id!==undefined&&d.id===undefined){d.id=a.id}b=new Ext.data.Request({params:d,action:a.action,records:a.records,operation:a,url:a.url,proxy:c});b.url=c.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();d.applyDefaults=a.action==="read";j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(n){var u=this,t={},q=Ext.isDefined,r=n.groupers,a=n.sorters,l=n.filters,i=n.page,h=n.start,s=n.limit,j=u.simpleSortMode,d=u.simpleGroupMode,p=u.pageParam,g=u.startParam,b=u.limitParam,c=u.groupParam,k=u.groupDirectionParam,e=u.sortParam,o=u.filterParam,m=u.directionParam;if(p&&q(i)){t[p]=i}if(g&&q(h)){t[g]=h}if(b&&q(s)){t[b]=s}if(c&&r&&r.length>0){if(d){t[c]=r[0].property;t[k]=r[0].direction||"ASC"}else{t[c]=u.encodeSorters(r)}}if(e&&a&&a.length>0){if(j){t[e]=a[0].property;t[m]=a[0].direction}else{t[e]=u.encodeSorters(a)}}if(o&&l&&l.length>0){t[o]=u.encodeFilters(l)}return t},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",isSynchronous:true,clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},updateOperation:function(b,g,d){var c=0,e=b.getRecords(),a=e.length;for(c;c<a;c++){e[c].commit()}b.setCompleted();b.setSuccessful();Ext.callback(g,d||this,[b])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(a,d,b){var c=this;a.resultSet=c.getReader().read(c.data);a.setCompleted();a.setSuccessful();Ext.callback(d,b||c,[a])},clear:Ext.emptyFn});Ext.define("Ext.util.LruCache",{extend:"Ext.util.HashMap",constructor:function(a){Ext.apply(this,a);this.callParent([a])},add:function(b,e){var d=this,a=d.findKey(e),c;if(a){d.unlinkEntry(c=d.map[a]);c.prev=d.last;c.next=null}else{c={prev:d.last,next:null,key:b,value:e}}if(d.last){d.last.next=c}else{d.first=c}d.last=c;d.callParent([b,c]);d.prune();return e},insertBefore:function(b,g,c){var e=this,a,d;if(c=this.map[this.findKey(c)]){a=e.findKey(g);if(a){e.unlinkEntry(d=e.map[a])}else{d={prev:c.prev,next:c,key:b,value:g}}if(c.prev){d.prev.next=d}else{e.first=d}d.next=c;c.prev=d;e.prune();return g}else{return e.add(b,g)}},get:function(a){var b=this.map[a];if(b){if(b.next){this.moveToEnd(b)}return b.value}},removeAtKey:function(a){this.unlinkEntry(this.map[a]);return this.callParent(arguments)},clear:function(a){this.first=this.last=null;return this.callParent(arguments)},unlinkEntry:function(a){if(a){if(a.next){a.next.prev=a.prev}else{this.last=a.prev}if(a.prev){a.prev.next=a.next}else{this.first=a.next}a.prev=a.next=null}},moveToEnd:function(a){this.unlinkEntry(a);if(a.prev=this.last){this.last.next=a}else{this.first=a}this.last=a},getArray:function(c){var a=[],b=this.first;while(b){a.push(c?b.key:b.value);b=b.next}return a},each:function(c,b,a){var g=this,e=a?g.last:g.first,d=g.length;b=b||g;while(e){if(c.call(b,e.key,e.value,d)===false){break}e=a?e.prev:e.next}return g},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a].value===b){return a}}return undefined},prune:function(){var a=this,b=a.maxSize?(a.length-a.maxSize):0;if(b>0){for(;a.first&&b;b--){a.removeAtKey(a.first.key)}}}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.data.Model","Ext.data.proxy.Ajax","Ext.data.proxy.Memory","Ext.data.reader.Json","Ext.data.writer.Json","Ext.util.LruCache"],uses:["Ext.ModelManager","Ext.util.Grouper"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,addRecordsOptions:{addRecords:true},statics:{recordIdFn:function(a){return a.internalId},recordIndexFn:function(a){return a.index}},onClassExtended:function(b,d,a){var c=d.model,e;if(typeof c=="string"){e=a.onBeforeCreated;a.onBeforeCreated=function(){var h=this,g=arguments;Ext.require(c,function(){e.apply(h,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;e=b.data||d.data;d.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=new Ext.util.MixedCollection();d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.buffered){d.pageMap=new d.PageMap({pageSize:d.pageSize,maxSize:d.purgePageCount,listeners:{clear:d.cancelAllPrefetches,scope:d}});d.pageRequests={};d.sortOnLoad=false;d.filterOnLoad=false}if(d.remoteGroup){d.remoteSort=true}if(d.groupers.items.length&&!d.remoteGroup){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(!d.buffered&&!d.pageSize){d.pageSize=d.defaultPageSize}if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,[e])}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},destroyStore:function(){this.callParent(arguments);if(this.pageMap){this.pageMap.clear()}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,g=Ext.util.Grouper,b,c,a=[];for(c=0;c<d;c++){b=e[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}b=Ext.apply({root:"data",direction:"ASC"},b);if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}a.push(new g(b))}else{a.push(b)}}return a},group:function(e,g){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:g};a=[b]}else{if(g===undefined){b.toggle()}else{b.setDirection(g)}}}}}if(a&&a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){if(d.buffered){d.pageMap.clear();d.loadPage(1,{groupChange:true})}else{d.load({scope:d,callback:d.fireGroupChange})}}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var d=this,e=d.groupers.items,c=e.length,a,b;for(b=0;b<c;b++){a=e[b];d.sorters.remove(a)}d.groupers.clear();if(d.remoteGroup){if(d.buffered){d.pageMap.clear();d.loadPage(1,{groupChange:true})}else{d.load({scope:d,callback:d.fireGroupChange})}}else{d.sort();d.fireGroupChange()}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var h=this,g=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=h.createModel(c[e]);b.set(h.modelDefaults);c[e]=b;h.data.insert(d+e,b);b.join(h);g=g||b.phantom===true}if(h.snapshot){h.snapshot.addAll(c)}if(h.requireSort){h.suspendEvents();h.sort();h.resumeEvents()}h.fireEvent("add",h,c,d);h.fireEvent("datachanged",h);if(h.autoSync&&g&&!h.autoSyncSuspended){h.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}else{b=b.slice(0)}var e=this,c=0,d=b.length,a,g=!e.remoteSort&&e.sorters&&e.sorters.items.length;if(g&&d===1){return[e.addSorted(e.createModel(b[0]))]}for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}if(g){e.requireSort=true}e.insert(e.data.length,b);delete e.requireSort;return b},addSorted:function(a){var c=this,b=c.data.findInsertionIndex(a,c.generateComparator());c.insert(b,a);return a},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(e,c){var g=this.data.items,b=g.length,a,h;for(h=0;h<b;h++){a=g[h];if(e.call(c||a,a,h,b)===false){break}}},remove:function(c,k){if(!Ext.isArray(c)){c=[c]}k=k===true;var h=this,j=false,d=0,a=c.length,b,g,e;for(;d<a;d++){e=c[d];g=h.data.indexOf(e);if(h.snapshot){h.snapshot.remove(e)}if(g>-1){b=e.phantom!==true;if(!k&&b){e.removedFrom=g;h.removed.push(e)}e.unjoin(h);h.data.remove(e);j=j||b;h.fireEvent("remove",h,e,g)}}h.fireEvent("datachanged",h);if(!k&&h.autoSync&&j&&!h.autoSyncSuspended){h.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(typeof a=="function"){a={callback:a}}a.groupers=a.groupers||b.groupers.items;a.page=a.page||b.currentPage;a.start=(a.start!==undefined)?a.start:(a.page-1)*b.pageSize;a.limit=a.limit||b.pageSize;a.addRecords=a.addRecords||false;if(b.buffered){return b.loadToPrefetch(a)}return b.callParent([a])},reload:function(l){var g=this,h,b,e,k,d,a,j,c;if(!l){l={}}if(g.buffered){delete g.totalCount;a=function(){if(g.rangeCached(h,b)){g.loading=false;g.pageMap.un("pageAdded",a);c=g.pageMap.getRange(h,b);g.loadRecords(c,{start:h});g.fireEvent("load",g,c,true)}};j=Math.ceil((g.leadingBufferZone+g.trailingBufferZone)/2);h=l.start||g.getAt(0).index;b=h+(l.count||g.getCount())-1;e=g.getPageFromRecordIndex(Math.max(h-j,0));k=g.getPageFromRecordIndex(b+j);g.pageMap.clear(true);if(g.fireEvent("beforeload",g,l)!==false){g.loading=true;for(d=e;d<=k;d++){g.prefetchPage(d,l)}g.pageMap.on("pageAdded",a)}}else{return g.callParent(arguments)}},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;if(d.hasListeners.load){d.fireEvent("load",d,a,e)}if(d.hasListeners.read){d.fireEvent("read",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b=0,h=d.sorters.length&&d.sortOnFilter&&!d.remoteSort,c=a.length;for(;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){delete d.totalCount;if(d.buffered){d.pageMap.clear();d.loadPage(1)}else{d.currentPage=1;d.load()}}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(h){d.sort()}else{d.fireEvent("datachanged",d);d.fireEvent("refresh",d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){if(a){return}delete b.totalCount;if(b.buffered){b.pageMap.clear();b.loadPage(1)}else{b.currentPage=1;b.load()}}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},query:function(h,g,i,a,e){var d=this,b=d.createFilterFn(h,g,i,a,e),c=d.queryBy(b);if(!c){c=new Ext.util.MixedCollection()}return c},loadData:function(j,a){var h=this,c=h.model,g=j.length,e=[],d,b;for(d=0;d<g;d++){b=j[d];if(!(b.isModel)){b=Ext.ModelManager.create(b,c)}e.push(b)}h.loadRecords(e,a?h.addRecordsOptions:undefined)},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.totalCount=a.total;d.loadRecords(c,b?d.addRecordsOptions:undefined);d.fireEvent("load",d,c,true)}},loadRecords:function(b,c){var h=this,d=0,g=b.length,j,e,a=h.snapshot;if(c){j=c.start;e=c.addRecords}if(!e){delete h.snapshot;h.clearData(true)}else{if(a){a.addAll(b)}}h.data.addAll(b);if(j!==undefined){for(;d<g;d++){b[d].index=j+d;b[d].join(h)}}else{for(;d<g;d++){b[d].join(h)}}h.suspendEvents();if(h.filterOnLoad&&!h.remoteFilter){h.filter()}if(h.sortOnLoad&&!h.remoteSort){h.sort(undefined,undefined,undefined,true)}h.resumeEvents();h.fireEvent("datachanged",h);h.fireEvent("refresh",h)},loadPage:function(c,a){var b=this;b.currentPage=c;a=Ext.apply({page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad},a);if(b.buffered){return b.loadToPrefetch(a)}b.read(a)},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(d){var c=this,a=c.data.items,b=a.length;while(b--){a[b].unjoin(c)}c.data.clear();if(d!==true||c.clearRemovedOnLoad){c.removed.length=0}},loadToPrefetch:function(l){var h=this,d,b,j=l.start,a=l.start+l.limit-1,e=l.start+(h.viewSize||l.limit)-1,g=h.getPageFromRecordIndex(Math.max(j-h.trailingBufferZone,0)),k=h.getPageFromRecordIndex(a+h.leadingBufferZone),c=function(){if(h.rangeCached(j,e)){h.loading=false;b=h.pageMap.getRange(j,e);h.pageMap.un("pageAdded",c);if(h.hasListeners.guaranteedrange){h.guaranteeRange(j,e,l.callback,l.scope)}else{h.loadRecords(b,{start:j})}h.fireEvent("load",h,b,true);if(l.groupChange){h.fireGroupChange()}}};if(h.fireEvent("beforeload",h,l)!==false){delete h.totalCount;h.loading=true;h.pageMap.on("pageAdded",c);h.on("prefetch",function(){for(d=g+1;d<=k;++d){h.prefetchPage(d,l)}},null,{single:true});h.prefetchPage(g,l)}},prefetch:function(c){var e=this,a=e.pageSize,d,b;if(a){if(e.lastPageSize&&a!=e.lastPageSize){Ext.error.raise("pageSize cannot be dynamically altered")}if(!e.pageMap.pageSize){e.pageMap.pageSize=a}}else{e.pageSize=e.pageMap.pageSize=a=c.limit}e.lastPageSize=a;if(!c.page){c.page=e.getPageFromRecordIndex(c.start);c.start=(c.page-1)*a;c.limit=Math.ceil(c.limit/a)*a}if(!e.pageRequests[c.page]){c=Ext.apply({action:"read",filters:e.filters.items,sorters:e.sorters.items,groupers:e.groupers.items,generation:e.pageMap.generation},c);b=new Ext.data.Operation(c);if(e.fireEvent("beforeprefetch",e,b)!==false){e.loading=true;d=e.proxy;e.pageRequests[c.page]=d.read(b,e.onProxyPrefetch,e);if(d.isSynchronous){delete e.pageRequests[c.page]}}}return e},cancelAllPrefetches:function(){var c=this,a=c.pageRequests,b,d;if(c.pageMap.events.pageadded){c.pageMap.events.pageadded.clearListeners()}for(d in a){if(a.hasOwnProperty(d)){b=a[d];delete a[d];delete b.callback}}},prefetchPage:function(e,b){var d=this,a=d.pageSize||d.defaultPageSize,g=(e-1)*d.pageSize,c=d.totalCount;if(c!==undefined&&d.getCount()===c){return}d.prefetch(Ext.applyIf({page:e,start:g,limit:a},b))},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),g=b.wasSuccessful(),e=b.page;if(b.generation===d.pageMap.generation){if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e!==undefined){delete d.pageRequests[e]}if(g){d.cachePage(a,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,g,b);Ext.callback(b.callback,b.scope||d,[a,b,g])}},cachePage:function(a,c){var b=this;if(!Ext.isDefined(b.totalCount)){b.totalCount=a.length;b.fireEvent("totalcountchange",b.totalCount)}b.pageMap.addPage(c,a)},rangeCached:function(b,a){return this.pageMap&&this.pageMap.hasRange(b,a)},pageCached:function(a){return this.pageMap&&this.pageMap.hasPage(a)},rangeSatisfied:function(b,a){return this.rangeCached(b,a)},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(d){var e=this,b=e.getTotalCount(),g=d.prefetchStart,a=((b-1)<d.prefetchEnd)?b-1:d.prefetchEnd,c;a=Math.max(0,a);c=e.pageMap.getRange(g,a);e.fireEvent("guaranteedrange",c,g,a);if(d.cb){d.cb.call(d.scope||e,c,g,a)}},prefetchRange:function(g,b){var d=this,c,a,e;if(!d.rangeCached(g,b)){c=d.getPageFromRecordIndex(g);a=d.getPageFromRecordIndex(b);d.pageMap.maxSize=d.purgePageCount?(a-c+1)+d.purgePageCount:0;for(e=c;e<=a;e++){if(!d.pageCached(e)){d.prefetchPage(e)}}}},guaranteeRange:function(i,c,a,g){c=(c>this.totalCount)?this.totalCount-1:c;var h=this,e=h.lastRequestStart,d={prefetchStart:i,prefetchEnd:c,cb:a,scope:g},b;h.lastRequestStart=i;if(h.rangeCached(i,c)){if(i<e){i=Math.max(i-h.leadingBufferZone,0);c=Math.min(c+h.trailingBufferZone,h.totalCount-1)}else{i=Math.max(Math.min(i-h.trailingBufferZone,h.totalCount-h.pageSize),0);c=Math.min(c+h.leadingBufferZone,h.totalCount-1)}if(!h.rangeCached(i,c)){h.prefetchRange(i,c)}h.onGuaranteedRange(d)}else{h.fireEvent("cachemiss",h,i,c);i=Math.min(Math.max(Math.floor(i-((h.leadingBufferZone+h.trailingBufferZone)/2)),0),h.totalCount-h.pageSize);c=Math.min(Math.max(Math.ceil(c+((h.leadingBufferZone+h.trailingBufferZone)/2)),0),h.totalCount-1);b=function(k,j){if(h.rangeCached(d.prefetchStart,d.prefetchEnd)){h.fireEvent("cachefilled",h,i,c);h.pageMap.un("pageAdded",b);h.onGuaranteedRange(d)}};h.pageMap.on("pageAdded",b);h.prefetchRange(d.prefetchStart,d.prefetchEnd);h.prefetchRange(i,c)}},sort:function(){var b=this,a=b.pageMap;if(b.buffered){if(b.remoteSort){a.clear();b.callParent(arguments)}else{b.callParent(arguments)}}else{b.callParent(arguments)}},doSort:function(b){var e=this,a,d,c;if(e.remoteSort){if(e.buffered){e.pageMap.clear();e.loadPage(1)}else{e.load()}}else{e.data.sortBy(b);if(!e.buffered){a=e.getRange();d=a.length;for(c=0;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e);e.fireEvent("refresh",e)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.isEqual(d.get(b),a)},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount||0},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(b.pageMap){b.pageMap.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},j;for(;c<d;++c){j=a[c];b[j.name]=h.apply(k||this,[j.children].concat(g))}return b}else{return h.apply(k||this,[this.data.items].concat(g))}},commitChanges:function(){var c=this,d=c.getModifiedRecords(),a=d.length,b=0;for(;b<a;b++){d[b].commit()}c.removed.length=0},filterNewOnly:function(a){return a.phantom===true},getRejectRecords:function(){return Ext.Array.push(this.data.filterBy(this.filterNewOnly).items,this.getUpdatedRecords())},rejectChanges:function(){var c=this,d=c.getRejectRecords(),a=d.length,b=0,e;for(;b<a;b++){e=d[b];e.reject();if(e.phantom){c.remove(e)}}d=c.removed;a=d.length;for(b=0;b<a;b++){e=d[b];c.insert(e.removedFrom||0,e);e.reject()}c.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"memory"});this.prototype.PageMap=new Ext.Class({extend:"Ext.util.LruCache",clear:function(a){this.generation=(this.generation||0)+1;this.callParent(arguments)},getPageFromRecordIndex:this.prototype.getPageFromRecordIndex,addPage:function(b,a){this.add(b,a);this.fireEvent("pageAdded",b,a)},getPage:function(a){return this.get(a)},hasRange:function(d,b){var c=this.getPageFromRecordIndex(d),a=this.getPageFromRecordIndex(b);for(;c<=a;c++){if(!this.hasPage(c)){return false}}return true},hasPage:function(a){return !!this.get(a)},getRange:function(a,b){if(!this.hasRange(a,b)){Ext.Error.raise("PageMap asked for range which it does not have")}var k=this,g=k.getPageFromRecordIndex(a),n=k.getPageFromRecordIndex(b),c=(g-1)*k.pageSize,o=(n*k.pageSize)-1,j=g,p=[],m,h,l,d=0,e;for(;j<=n;j++){if(j==g){m=a-c;l=true}else{m=0;l=false}if(j==n){h=k.pageSize-(o-b);l=true}if(l){Ext.Array.push(p,Ext.Array.slice(k.getPage(j),m,h))}else{Ext.Array.push(p,k.getPage(j))}}for(e=p.length;d<e;d++){p[d].index=a++}return p}})});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,createFieldAccessExpression:function(e,c,b){var d=(e.mapping==null)?e.originalIndex:e.mapping,a;if(typeof d==="function"){a=c+".mapping("+b+", this)"}else{if(isNaN(d)){d='"'+d+'"'}a=b+"["+d+"]"}return a}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",requires:["Ext.data.proxy.Memory","Ext.data.reader.Array"],constructor:function(a){a=Ext.apply({proxy:{type:"memory",reader:"array"}},a);this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.operations=[];b.exceptions=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a);return this},start:function(a){var b=this;if(b.isRunning){return b}b.exceptions.length=0;b.hasException=false;b.isRunning=true;return b.runOperation(Ext.isDefined(a)?a:b.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.exceptions.push(g);e.fireEvent("exception",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.fireEvent("operationcomplete",e,g);e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}return e}});Ext.define("Ext.data.BufferStore",{extend:"Ext.data.Store",alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.MixedCollection"],exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=new Ext.util.MixedCollection();a.providers=new Ext.util.MixedCollection();a.mixins.observable.constructor.call(a)},addProvider:function(e){var d=this,b=arguments,c=0,a;if(b.length>1){for(a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return Ext.isObject(a)?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b=0,a;if(Ext.isArray(d)){for(a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)},parseMethod:function(c){if(Ext.isString(c)){var e=c.split("."),b=0,a=e.length,d=window;while(d&&b<a){d=d[e[b]];++b}c=Ext.isFunction(d)?d:null}return c||null}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(b){var e=this,a,d,c;e.callParent(arguments);a=e.paramOrder;if(Ext.isString(a)){e.paramOrder=a.split(e.paramOrderRe)}d=e.directFn;if(d){e.directFn=Ext.direct.Manager.parseMethod(d)}c=e.api;for(d in c){if(c.hasOwnProperty(d)){c[d]=Ext.direct.Manager.parseMethod(c[d])}}},doRequest:function(d,j,k){var h=this,b=h.getWriter(),e=h.buildRequest(d,j,k),i=h.api[e.action]||h.directFn,c=e.params,g=[],a;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=i.directCfg.method;g=a.getArgs(c,h.paramOrder,h.paramsAsHash)}else{g.push(e.jsonData)}Ext.apply(e,{args:g,directFn:i});g.push(h.createRequestCallback(e,d,j,k),h);i.apply(window,g)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.data.JsonP",{singleton:true,requestCount:0,requests:{},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=Ext.apply({},n.params),b=n.url,a=Ext.name,g,k;e[i]=a+".data.JsonP."+l;if(d){e[h]=new Date().getTime()}k=j.createScript(b,e,n);j.requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:i,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);j.loadScript(g);return g},abort:function(c){var b=this,d=b.requests,a;if(c){if(!c.id){c=d[c]}b.handleAbort(c)}else{for(a in d){if(d.hasOwnProperty(a)){b.abort(d[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c<e.length;c++){d=e[c];if(d.value){b=Ext.urlAppend(b,d.property+"="+d.value)}}}a=h.records;if(Ext.isArray(a)&&a.length>0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent(arguments)},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].getData())}return d}});Ext.define("Ext.data.JsonPStore",{extend:"Ext.data.Store",alias:"store.jsonp",requires:["Ext.data.proxy.JsonP","Ext.data.reader.Json"],constructor:function(a){a=Ext.apply({proxy:{type:"jsonp",reader:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",requires:["Ext.data.proxy.Ajax","Ext.data.reader.Json","Ext.data.writer.Json"],constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"json",writer:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(b){var a,c;if(typeof b=="string"){b=Ext.ModelManager.getModel(b)}else{if(b.isModel){b=Ext.ModelManager.getModel(b.modelName)}}if(b.prototype.isNode){return}a=b.prototype.idProperty;idField=b.prototype.fields.get(a);c=b.prototype.fields.get(a).type.type;b.override(this.getPrototypeBody());this.applyFields(b,[{name:"parentId",type:c,defaultValue:null,useNull:idField.useNull},{name:"index",type:"int",defaultValue:null,persist:false},{name:"depth",type:"int",defaultValue:0,persist:false},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null,persist:false},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false},{name:"children",type:"auto",defaultValue:null,persist:false}])},applyFields:function(c,b){var h=c.prototype,a=h.fields,g=a.keys,e=b.length,j,d;for(d=0;d<e;d++){j=b[d];if(!Ext.Array.contains(g,j.name)){a.add(new Ext.data.Field(j))}}},getPrototypeBody:function(){return{isNode:true,constructor:function(){var a=this;this.callParent(arguments);Ext.applyIf(a,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});a.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return a},createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.ModelManager.create(a,this.modelName)}if(!a.childNodes){Ext.applyIf(a,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]})}return a},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(g){var m=this,b=m.isRoot(),k=m.parentNode,d=(!k||b?true:k.firstChild===m),j=(!k||b?true:k.lastChild===m),h=0,n=m,a=m.childNodes,l=a.length,e=0,c=m.phantom;while(n.parentNode){++h;n=n.parentNode}m.beginEdit();m.set({isFirst:d,isLast:j,depth:h,index:k?k.indexOf(m):0,parentId:k?k.getId():null});m.endEdit(true);if(g){m.commit();m.phantom=c}for(e=0;e<l;e++){a[e].updateInfo(g)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},triggerUIUpdate:function(){this.afterEdit([])},appendChild:function(b,k,c){var h=this,d,g,e,j,a;if(Ext.isArray(b)){h.callStore("suspendAutoSync");for(d=0,g=b.length-1;d<g;d++){h.appendChild(b[d])}h.callStore("resumeAutoSync");h.appendChild(b[g])}else{b=h.createNode(b);if(k!==true&&(!h.hasListeners.beforeappend||h.fireEvent("beforeappend",h,b)===false)){return false}e=h.childNodes.length;j=b.parentNode;if(j){if(k!==true&&(!h.hasListeners.beforeremove||b.fireEvent("beforemove",b,j,h,e)===false)){return false}j.removeChild(b,false,false,true)}e=h.childNodes.length;if(e===0){h.setFirstChild(b)}h.childNodes.push(b);b.parentNode=h;b.nextSibling=null;h.setLastChild(b);a=h.childNodes[e-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(c)}else{b.previousSibling=null}b.updateInfo(c);if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.triggerUIUpdate()}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(k!==true){h.fireEvent("append",h,b,e);if(j){b.fireEvent("move",b,j,h,e)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(j,e,g,b){var h=this,c=h.indexOf(j),d,a;if(c==-1||(g!==true&&(!h.hasListeners.beforeremove||h.fireEvent("beforeremove",h,j,!!b)===false))){return false}Ext.Array.erase(h.childNodes,c,1);if(h.firstChild==j){h.setFirstChild(j.nextSibling)}if(h.lastChild==j){h.setLastChild(j.previousSibling)}if(j.previousSibling){j.previousSibling.nextSibling=j.nextSibling}if(j.nextSibling){j.nextSibling.previousSibling=j.previousSibling}for(d=c>0?c-1:0,a=h.childNodes.length;d<a;d++){h.childNodes[d].updateInfo()}if(!h.childNodes.length){h.triggerUIUpdate()}if(g!==true){if(h.hasListeners.remove){h.fireEvent("remove",h,j,!!b)}}if(e){j.destroy(true)}else{j.clear()}return j},copy:function(d,c){var g=this,b=g.callOverridden(arguments),a=g.childNodes?g.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(g.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(b){var d=this,c=d.destroyOptions,a=d.childNodes,e=a.length,g;if(b===true){d.clear(true);for(g=0;g<e;g++){a[g].destroy(true)}d.childNodes=null;delete d.destroyOptions;d.callOverridden([c])}else{d.destroyOptions=b;d.remove(true)}},insertBefore:function(b,g,l){var h=this,e=h.indexOf(g),j=b.parentNode,k=e,c,a,d;if(!g){return h.appendChild(b)}if(b==g){return false}b=h.createNode(b);if(l!==true&&(!h.hasListeners.beforeinsert||h.fireEvent("beforeinsert",h,b,g)===false)){return false}if(j==h&&h.indexOf(b)<e){k--}if(j){if(l!==true&&(!h.hasListeners.beforeremove||b.fireEvent("beforemove",b,j,h,e,g)===false)){return false}j.removeChild(b,false,false,true)}if(k===0){h.setFirstChild(b)}Ext.Array.splice(h.childNodes,k,0,b);b.parentNode=h;b.nextSibling=g;g.previousSibling=b;a=h.childNodes[k-1];if(a){b.previousSibling=a;a.nextSibling=b}else{b.previousSibling=null}for(d=k>0?k-1:0,c=h.childNodes.length;d<c;d++){h.childNodes[d].updateInfo()}if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.triggerUIUpdate()}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(l!==true){if(h.hasListeners.insert){h.fireEvent("insert",h,b,g)}if(j&&h.hasListeners.move){b.fireEvent("move",b,j,h,k,g)}}return b},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,false,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},indexOfId:function(d){var c=this.childNodes,a=c.length,b=0;for(;b<a;++b){if(c[b].getId()===d){return b}}return -1},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){g[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[g[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(g,b,a){var d=this.childNodes,e=d.length,c,h;if(e>0){Ext.Array.sort(d,g);for(c=0;c<e;c++){h=d[c];h.previousSibling=d[c-1];h.nextSibling=d[c+1];if(c===0){this.setFirstChild(h)}if(c==e-1){this.setLastChild(h)}h.updateInfo();if(b&&!h.isLeaf()){h.sort(g,true,true)}}if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireEvent("beforeexpand",c,function(){c.set("expanded",true);if(c.hasListeners.expand){c.fireEvent("expand",c,c.childNodes,false)}if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}}else{Ext.callback(d,b||c)}},expandChildren:function(d,j,k){var h=this,e=0,a=h.childNodes,g=a.length,c,b=0;for(;e<g;++e){c=a[e];if(!c.isLeaf()){b++;a[e].expand(d,function(){b--;if(j&&!b){Ext.callback(j,k||h,[h.childNodes])}})}}if(!b&&j){Ext.callback(j,k||h,[h.childNodes])}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()){if(!c.collapsing&&c.isExpanded()){c.fireEvent("beforecollapse",c,function(){c.set("expanded",false);if(c.hasListeners.collapse){c.fireEvent("collapse",c,c.childNodes,false)}if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}else{Ext.callback(d,b||c,[c.childNodes])}},collapseChildren:function(d,j,k){var h=this,e=0,b=h.childNodes,g=b.length,c,a=0;for(;e<g;++e){c=b[e];if(!c.isLeaf()){a++;b[e].collapse(d,function(){a--;if(j&&!a){Ext.callback(j,k||h,[h.childNodes])}})}}if(!a&&j){Ext.callback(j,k||h,[h.childNodes])}}}}}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);b=c.node;if(b){c.node=null;c.setNode(b)}},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b.self);a.removeAll();if(a.rootVisible){a.add(b)}else{if(!b.isExpanded()&&a.treeStore.autoLoad!==false){b.expand()}}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true)}},onNodeExpand:function(g,d,c){var j=this,a=j.indexOf(g)+1,h=d?d.length:0,e,b;if(!j.recursive&&g!==j.node){return}if(g!==this.node&&!j.isVisible(g)){return}if(!c&&j.fireEvent("beforeexpand",g,d,a)===false){return}if(h){j.insert(a,d);for(e=0;e<h;e++){b=d[e];if(b.isExpanded()){if(b.isLoaded()){j.onNodeExpand(b,b.childNodes,true)}else{b.set("expanded",false);b.expand()}}}}if(!c){j.fireEvent("expand",g,d)}},onNodeCollapse:function(g,c,b){var j=this,h=c.length,e=j.indexOf(g)+1,d,a;if(!j.recursive&&g!==j.node){return}if(!b&&j.fireEvent("beforecollapse",g,c,e)===false){return}for(d=0;d<h;d++){a=c[d];j.remove(a);if(a.isExpanded()){j.onNodeCollapse(a,a.childNodes,true)}}if(!b){j.fireEvent("collapse",g,c,e)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{g.set("expanded",false);g.expand()}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){c.onNodeCollapse(d,d.childNodes,true)}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&!this.rootVisible&&a.isExpanded()){return true}if(this.indexOf(a)===-1||!a.isExpanded()){return false}a=a.parentNode}return true}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;if(a.fireEvent("beforeappend",null,b)!==false){b.set("root",true);b.updateInfo();b.commit();b.on({scope:a,insert:a.onNodeInsert,append:a.onNodeAppend,remove:a.onNodeRemove});a.relayEvents(b,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);a.nodeHash={};a.registerNode(b);a.fireEvent("append",null,b);a.fireEvent("rootchange",b)}return b},flatten:function(){return Ext.Object.getValues(this.nodeHash)},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},onNodeIdChanged:function(c,d,a){var b=this.nodeHash;b[a]=c;delete b[d||c.internalId]},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(c,a){var b=this;b.nodeHash[c.getId()||c.internalId]=c;c.on("idchanged",b.onNodeIdChanged,b);if(a===true){c.eachChild(function(d){b.registerNode(d,true)})}},unregisterNode:function(b,a){delete this.nodeHash[b.getId()||b.internalId];if(a===true){b.eachChild(function(c){this.unregisterNode(c,true)},this)}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.util.Sorter","Ext.data.Tree","Ext.data.NodeInterface"],clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",rootProperty:"children",folderSort:false,constructor:function(c){var e=this,b,a,d;c=Ext.apply({},c);a=c.fields||e.fields;if(!a){c.fields=[{name:"text",type:"string"}];d=c.defaultRootProperty||e.defaultRootProperty;if(d!==e.defaultRootProperty){c.fields.push({name:d,type:"auto",defaultValue:null,persist:false})}}e.callParent([c]);e.tree=new Ext.data.Tree();e.relayEvents(e.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);e.tree.on({scope:e,remove:e.onNodeRemove,beforeexpand:e.onBeforeNodeExpand,beforecollapse:e.onBeforeNodeCollapse,append:e.onNodeAdded,insert:e.onNodeAdded,sort:e.onNodeSort});e.onBeforeSort();b=e.root;if(b){delete e.root;e.setRootNode(b)}if(Ext.isDefined(e.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}e.nodeParam=e.nodeParameter;delete e.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(b,c,a){if(b.isLoaded()){Ext.callback(c,a||b,[b.childNodes])}else{if(b.isLoading()){this.on("load",function(){Ext.callback(c,a||b,[b.childNodes])},this,{single:true})}else{this.read({node:b,callback:function(){Ext.callback(c,a||b,[b.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(b,c,a){c.call(a||b,b.childNodes)},onNodeRemove:function(b,d,a){var c=this,e=c.removed;if(!d.isReplace&&Ext.Array.indexOf(e,d)==-1){e.push(d)}if(c.autoSync&&!c.autoSyncSuspended&&!a){c.sync()}},onNodeAdded:function(c,e){var d=this,b=d.getProxy(),a=b.getReader(),g=e.raw||e[e.persistenceProperty],h;Ext.Array.remove(d.removed,e);if(!e.isLeaf()){h=a.getRoot(g);if(h){d.fillNode(e,a.extractData(h));delete g[a.root]}}if(d.autoSync&&!d.autoSyncSuspended&&(e.phantom||e.dirty)){d.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(a,e){var d=this,c=d.model,b=c.prototype.idProperty;a=a||{};if(!a.isModel){Ext.applyIf(a,{id:d.defaultRootId,text:"Root",allowDrag:false});if(a[b]===undefined){a[b]=d.defaultRootId}Ext.data.NodeInterface.decorate(c);a=Ext.ModelManager.create(a,c)}else{if(a.isModel&&!a.isNode){Ext.data.NodeInterface.decorate(c)}}d.getProxy().getReader().buildExtractors(true);d.tree.setRootNode(a);if(e!==true&&!a.isLoaded()&&(d.autoLoad===true||a.isExpanded())){d.load({node:a})}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},getById:function(a){return this.getNodeById(a)},load:function(a){a=a||{};a.params=a.params||{};var c=this,b=a.node||c.tree.getRootNode();if(!b){b=c.setRootNode({expanded:true},true)}a.id=b.getId();if(c.clearOnLoad){if(c.clearRemovedOnLoad){c.clearRemoved(b)}c.tree.un("remove",c.onNodeRemove,c);b.removeAll(false);c.tree.on("remove",c.onNodeRemove,c)}Ext.applyIf(a,{node:b});a.params[c.nodeParam]=b?b.getId():"root";if(b){b.set("loading",true)}return c.callParent([a])},clearRemoved:function(b){var k=this,e=k.removed,a=b.getId(),d=e.length,c=d,n={},h=[],m={},j,g,l;if(b===k.getRootNode()){k.removed=[];return}for(;c--;){j=e[c];m[j.getId()]=j}for(c=d;c--;){j=e[c];g=j;while(g&&g.getId()!==a){l=g.get("parentId");g=g.parentNode||k.getNodeById(l)||m[l]}if(g){n[j.getId()]=j}}for(c=0;c<d;c++){j=e[c];if(!n[j.getId()]){h.push(j)}}k.removed=h},fillNode:function(b,c){var h=this,e=c?c.length:0,g=h.sorters,d,k,j=false,a=e&&h.sortOnLoad&&!h.remoteSort&&g&&g.items&&g.items.length,m,l;for(d=1;d<e;d++){m=c[d];l=c[d-1];j=m[m.persistenceProperty].index!=l[l.persistenceProperty].index;if(j){break}}if(a){if(j){h.sorters.insert(0,h.indexSorter)}k=new Ext.util.MixedCollection();k.addAll(c);k.sort(h.sorters.items);c=k.items;h.sorters.remove(h.indexSorter)}else{if(j){Ext.Array.sort(c,h.sortByIndex)}}b.set("loaded",true);for(d=0;d<e;d++){b.appendChild(c[d],undefined,true)}return c},sortByIndex:function(b,a){return b[b.persistenceProperty].index-a[a.persistenceProperty].index},onProxyLoad:function(b){var d=this,e=b.wasSuccessful(),a=b.getRecords(),c=b.node;d.loading=false;c.set("loading",false);if(e){if(!d.clearOnLoad){a=d.cleanRecords(c,a)}a=d.fillNode(c,a)}d.fireEvent("read",d,b.node,a,e);d.fireEvent("load",d,b.node,a,e);Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(c){this.callParent(arguments);var d=0,b=c.length,a=this.tree,e;for(;d<b;++d){e=c[d];a.onNodeIdChanged(e,null,e.getId())}},cleanRecords:function(g,b){var e={},j=g.childNodes,d=0,a=j.length,c=[],h;for(;d<a;++d){e[j[d].getId()]=true}for(d=0,a=b.length;d<a;++d){h=b[d];if(!e[h.getId()]){c.push(h)}}return c},removeAll:function(){var a=this.getRootNode();if(a){a.destroy(true)}this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}b.fireEvent("sort",b)}},function(){var a=this.prototype;a.indexSorter=new Ext.util.Sorter({sorterFn:a.sortByIndex})});Ext.define("Ext.data.UuidGenerator",(function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:"Ext.data.IdGenerator",alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}()));Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var c=a.responseXML,b,d;if(!c){d="XML data not found in the response";b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:d});this.fireEvent("exception",this,a,b);Ext.Logger.warn(d);return b}return this.readRecords(c)},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])},createFieldAccessExpression:function(e,d,c){var b=e.mapping||e.name,a;if(typeof b==="function"){a=d+".mapping("+c+", this)"}else{a='me.getNodeValue(Ext.DomQuery.selectNode("'+b+'", '+c+"))"}return a}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alias:"store.xml",requires:["Ext.data.proxy.Ajax","Ext.data.reader.Xml","Ext.data.writer.Xml"],constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"xml",writer:"xml"}},a);this.callParent([a])}});Ext.define("Ext.data.association.BelongsTo",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,a=b.foreignKey;return function(e,c,d){if(e&&e.isModel){e=e.getId()}this.set(a,e);if(Ext.isFunction(c)){c={callback:c,scope:d||this}}if(Ext.isObject(c)){return this.save(c)}}},createGetter:function(){var d=this,e=d.associatedName,g=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(k,l){k=k||{};var j=this,m=j.get(c),n,h,i;if(k.reload===true||j[a]===undefined){h=Ext.ModelManager.create({},e);h.set(b,m);if(typeof k=="function"){k={callback:k,scope:l||j}}n=k.success;k.success=function(o){j[a]=o;if(n){n.apply(this,arguments)}};g.load(m,k);j[a]=h;return h}else{h=j[a];i=[h];l=l||k.scope||j;Ext.callback(k,l,i);Ext.callback(k.success,l,i);Ext.callback(k.failure,l,i);Ext.callback(k.callback,l,i);return h}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.data.association.HasMany",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasManyAssociation",requires:["Ext.util.Inflector"],alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=Ext.data.AbstractStore.create(k);if(b){m[c].load()}}return m[c]}},read:function(d,b,j){var g=d[this.name](),c,e,a,h;g.add(b.read(j).records);c=this.associatedModel.prototype.associations.findBy(function(i){return i.type==="belongsTo"&&i.associatedName===d.$className});if(c){e=g.data.items;a=e.length;for(h=0;h<a;h++){e[h][c.instanceName]=d}}}});Ext.define("Ext.data.association.HasOne",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasOneAssociation",alias:"association.hasone",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"HasOneInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,c=b.ownerModel,a=b.foreignKey;return function(g,d,e){if(g&&g.isModel){g=g.getId()}this.set(a,g);if(Ext.isFunction(d)){d={callback:d,scope:e||this}}if(Ext.isObject(d)){return this.save(d)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),o,i,j;if(l.reload===true||k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}o=l.success;l.success=function(p){k[a]=p;if(o){o.apply(this,arguments)}};h.load(n,l);k[a]=i;return i}else{i=k[a];j=[i];m=m||l.scope||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(c,a,e){var b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className}),d=a.read([e]).records[0];c[this.instanceName]=d;if(b){d[b.instanceName]=c}}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:["Ext.data.SequentialIdGenerator"],id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,k,l){var j=this,d=e.records,c=d.length,a=j.getIds(),b,h,g;e.setStarted();if(j.isHierarchical===undefined){j.isHierarchical=!!d[0].isNode;if(j.isHierarchical){j.getStorageObject().setItem(j.getTreeKey(),true)}}for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=j.getNextId()}else{b=h.getId()}j.setRecord(h,b);h.commit();a.push(b)}j.setIds(a);e.setCompleted();e.setSuccessful();if(typeof k=="function"){k.call(l||j,e)}},read:function(g,m,o){var l=this,e=[],j=0,n=true,d=l.model,a,c,k,h,b;g.setStarted();if(l.isHierarchical){e=l.getTreeData()}else{a=l.getIds();c=a.length;b=g.id;if(b){h=l.getRecord(b);if(h!==null){k=new d(h,b,h)}if(k){e.push(k)}else{n=false}}else{for(;j<c;j++){b=a[j];h=l.getRecord(b);e.push(new d(h,b,h))}}}if(n){g.setSuccessful()}g.setCompleted();g.resultSet=Ext.create("Ext.data.ResultSet",{records:e,total:e.length,loaded:true});if(typeof m=="function"){m.call(o||l,g)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);h.commit();b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(d,k,l){var g=this,c=d.records,a=g.getIds(),h=a.length,m=[],j={},e=c.length,b;d.setStarted();for(;e--;){Ext.apply(j,g.removeRecord(c[e]))}for(e=0;e<h;e++){b=a[e];if(!j[b]){m.push(b)}}g.setIds(m);d.setCompleted();d.setSuccessful();if(typeof k=="function"){k.call(l||g,d)}},getRecord:function(d){var b=this,a=b.cache,c=!a[d]?Ext.decode(b.getStorageObject().getItem(b.getRecordKey(d))):a[d];if(!c){return null}a[d]=c;c[b.model.prototype.idProperty]=d;return c},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,o;for(;g<d;g++){n=l[g];b=n.name;if(n.persist){h[b]=a[b]}}delete h[m.model.prototype.idProperty];if(k.isNode&&k.get("depth")===1){delete h.parentId}e=m.getStorageObject();o=m.getRecordKey(c);m.cache[c]=h;e.removeItem(o);e.setItem(o,Ext.encode(h))},removeRecord:function(a){var d=this,g=a.getId(),b={},c,e;b[g]=a;d.getStorageObject().removeItem(d.getRecordKey(g));delete d.cache[g];if(a.childNodes){e=a.childNodes;for(c=e.length;c--;){Ext.apply(b,d.removeRecord(e[c]))}}return b},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var g=this,d=(g.getStorageObject().getItem(g.id)||"").split(","),b=g.model,e=d.length,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",c;if(e==1&&d[0]===""){d=[]}else{for(c=0;c<e;c++){d[c]=a?d[c]:+d[c]}}return d},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this,e=d.getStorageObject(),c=d.getRecordCounterKey(),b=d.model,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",g;g=d.idGenerator.generate();e.setItem(c,g);if(!a){g=+g}return g},getTreeData:function(){var n=this,a=n.getIds(),e=a.length,j=[],b={},o=[],k=0,h=n.model,q=h.prototype.idProperty,g,m,p,l,d,c;for(;k<e;k++){c=a[k];m=n.getRecord(c);j.push(m);b[c]=m;if(!m.parentId){o.push(m)}}g=o.length;Ext.Array.sort(j,n.sortByParentId);for(k=g;k<e;k++){m=j[k];l=m.parentId;if(!p||p[q]!==l){p=b[l];p.children=d=[]}d.push(m)}for(k=e;k--;){m=j[k];if(!m.children&&!m.leaf){m.loaded=true}}for(k=g;k--;){m=o[k];o[k]=new h(m,m[q],m)}return o},sortByParentId:function(b,a){return(b.parentId||0)-(a.parentId||0)},initialize:function(){var b=this,a=b.getStorageObject(),c=+a.getItem(b.getRecordCounterKey());a.setItem(b.id,a.getItem(b.id)||"");if(a.getItem(b.getTreeKey())){b.isHierarchical=true}b.idGenerator=new Ext.data.SequentialIdGenerator({seed:c?c+1:1})},clear:function(){var d=this,e=d.getStorageObject(),c=d.getIds(),a=c.length,b;for(b=0;b<a;b++){e.removeItem(d.getRecordKey(c[b]))}e.removeItem(d.getRecordCounterKey());e.removeItem(d.getTreeKey());e.removeItem(d.id);d.cache={}},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&i){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}},function(){Ext.apply(this.prototype,{actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}})});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");b.dragRegion=new Ext.util.Region(0,0,0,0);if(b.el){b.initEl(b.el)}b.mixins.observable.constructor.call(b);if(b.disabled){b.disable()}},initEl:function(a){var b=this;b.el=Ext.get(a);b.handle=Ext.get(b.delegate);b.delegate=b.handle?undefined:b.delegate;if(!b.handle){b.handle=b.el}b.mon(b.handle,{mousedown:b.onMouseDown,delegate:b.delegate,scope:b});if(b.trackOver||b.overCls){b.mon(b.handle,{mouseover:b.onMouseOver,mouseout:b.onMouseOut,delegate:b.delegate,scope:b})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(b){var a=this;if(a.mouseIsDown){a.mouseIsOut=true}else{if(a.overCls){a.el.removeCls(a.overCls)}a.fireEvent("mouseout",a,b)}},onMouseDown:function(d,c){var b=this,a;if(b.disabled||d.dragTracked){return}b.dragTarget=b.delegate?c:b.handle.dom;b.startXY=b.lastXY=d.getXY();b.startRegion=Ext.fly(b.dragTarget).getRegion();if(b.fireEvent("mousedown",b,d)===false||b.fireEvent("beforedragstart",b,d)===false||b.onBeforeStart(d)===false){return}b.mouseIsDown=true;d.dragTracked=true;a=b.el.dom;if(Ext.isIE&&a.setCapture){a.setCapture()}if(b.preventDefault!==false){d.preventDefault()}Ext.getDoc().on({scope:b,mouseup:b.onMouseUp,mousemove:b.onMouseMove,selectstart:b.stopSelect});if(b.autoStart){b.timer=Ext.defer(b.triggerStart,b.autoStart===true?1000:b.autoStart,b,[d])}},onMouseMove:function(g,d){var b=this,c=g.getXY(),a=b.startXY;g.preventDefault();b.lastXY=c;if(!b.active){if(Math.max(Math.abs(a[0]-c[0]),Math.abs(a[1]-c[1]))>b.tolerance){b.triggerStart(g)}else{return}}if(b.fireEvent("mousemove",b,g)===false){b.onMouseUp(g)}else{b.onDrag(g);b.fireEvent("drag",b,g)}},onMouseUp:function(b){var a=this;a.mouseIsDown=false;if(a.mouseIsOut){a.mouseIsOut=false;a.onMouseOut(b)}b.preventDefault();if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}a.fireEvent("mouseup",a,b);a.endDrag(b)},endDrag:function(d){var b=this,c=Ext.getDoc(),a=b.active;c.un("mousemove",b.onMouseMove,b);c.un("mouseup",b.onMouseUp,b);c.un("selectstart",b.stopSelect,b);b.clearStart();b.active=false;if(a){b.onEnd(d);b.fireEvent("dragend",b,d)}delete b._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(b){var a=this;a.clearStart();a.active=true;a.onStart(b);a.fireEvent("dragstart",a,b)},clearStart:function(){var a=this.timer;if(a){clearTimeout(a);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){var a=this;if(a.constrainTo){if(a.constrainTo instanceof Ext.util.Region){return a.constrainTo}if(!a._constrainRegion){a._constrainRegion=Ext.fly(a.constrainTo).getViewRegion()}}else{if(!a._constrainRegion){a._constrainRegion=a.getDragCt().getViewRegion()}}return a._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els,b,d,a,j;for(b in g){d=g[b];a=d._region;j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles,b,a;for(b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false),e=this.elements[g],c,b,a;if(e){delete this.elements[g];if(e.handles){c=e.handles;for(b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],status:true,constructor:function(a){Ext.apply(this,a)},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",getTransaction:function(){return this.transaction||Ext.direct.Manager.getTransaction(this.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",status:false});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=null,d=[],g,c=0,a;try{h=this.parseResponse(b)}catch(j){g=new Ext.direct.ExceptionEvent({data:j,xhr:b,code:Ext.direct.Manager.exceptions.PARSE,message:"Error parsing json response: \n\n "+h});return[g]}if(Ext.isArray(h)){for(a=h.length;c<a;++c){d.push(this.createEvent(h[c]))}}else{d.push(this.createEvent(h))}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],interval:3000,constructor:function(a){this.callParent(arguments);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}}},interval:b.interval,scope:b});b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,h,b){var g=this,d=0,a,c;if(h){c=g.createEvents(b);for(a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{g.fireEvent("data",g,new Ext.direct.ExceptionEvent({data:null,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(c){var d=this,h=Ext.isDefined(c.params)?c.params:c.len,b,a,e,g;d.name=c.name;d.formHandler=c.formHandler;if(Ext.isNumber(h)){d.len=h;d.ordered=true}else{d.params=[];a=h.length;for(e=0;e<a;e++){g=h[e];b=Ext.isObject(g)?g.name:g;d.params.push(b)}}},getArgs:function(e,b,g){var c=[],d,a;if(this.ordered){if(this.len>0){if(b){for(d=0,a=b.length;d<a;d++){c.push(e[b[d]])}}else{if(g){c.push(e)}}}}else{c.push(e)}return c},getCallData:function(c){var e=this,g=null,a=e.len,h=e.params,i,d,b;if(e.ordered){i=c[a];d=c[a+1];if(a!==0){g=c.slice(0,a)}}else{g=Ext.apply({},c[0]);i=c[1];d=c[2];for(b in g){if(g.hasOwnProperty(b)){if(!Ext.Array.contains(h,b)){delete g[b]}}}}return{data:g,callback:i,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=b.tid=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||window;b.transactions=new Ext.util.MixedCollection();b.callBuffer=[]},initAPI:function(){var h=this.actions,e=this.namespace,g,b,c,d,a,j;for(g in h){if(h.hasOwnProperty(g)){b=e[g];if(!b){b=e[g]={}}c=h[g];for(d=0,a=c.length;d<a;++d){j=new Ext.direct.RemotingMethod(c[d]);b[j.name]=this.createHandler(g,j)}}}},createHandler:function(c,d){var b=this,a;if(!d.formHandler){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(g,h,e){b.configureFormRequest(c,d,g,h,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{if(!a.url){}}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(e,b){var d=!!b.status,c=d?"success":"failure",g,a;if(e&&e.callback){g=e.callback;a=Ext.isDefined(b.result)?b.result:b.data;if(Ext.isFunction(g)){g(a,b,d)}else{Ext.callback(g[c],g.scope,[a,b,d]);Ext.callback(g.callback,g.scope,[a,b,d])}}},onData:function(l,j,c){var g=this,d=0,e,k,a,b,h;if(j){k=g.createEvents(c);for(e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=new Ext.direct.ExceptionEvent({data:null,transaction:b,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(d,a,g){var h=this,c=a.getCallData(g),e=c.data,i=c.callback,j=c.scope,b;b=new Ext.direct.Transaction({provider:h,args:g,action:d,method:a.name,data:e,callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i});if(h.fireEvent("beforecall",h,b,a)!==false){Ext.direct.Manager.addTransaction(b);h.queueTransaction(b);h.fireEvent("call",h,b,a)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout},b,d=g.enableUrlEncode,c=0,a,j;if(Ext.isArray(h)){b=[];for(a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=new Ext.util.DelayedTask(b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var b=this.callBuffer,a=b.length;if(a>0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=new Ext.direct.Transaction({provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(b,0,0,e,a*(1-b),d*(1-e))},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b-g*b+d*h,-(d*b)+h-g*h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(b,a){var c=this;b=b||0;a=a||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+c.get(0,0)+", M12="+c.get(0,1)+", M21="+c.get(1,0)+", M22="+c.get(1,1)+", Dx="+(c.get(0,2)+b)+", Dy="+(c.get(1,2)+a)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,o,n,s,a,k,h,q,p;p=j.sprite;q=p.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+q.width;o=m[1];n=o+q.height;return new Ext.util.Region(o,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=Ext.merge({},a||{});b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=new Ext.draw.SpriteDD(a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(l,o){var t=this,j=t.fontProperties,q=j.length,h=t.pathProperties,g=h.length,r=!!t.surface,a=r&&t.surface.customAttributes||{},c=t.attr,b=false,m,p,k,d,s,n,u,e;l=Ext.apply({},l);for(m in a){if(l.hasOwnProperty(m)&&typeof a[m]=="function"){Ext.apply(l,a[m].apply(t,[].concat(l[m])))}}if(!!l.hidden!==!!c.hidden){t.dirtyHidden=true}for(p=0;p<g;p++){m=h[p];if(m in l&&l[m]!==c[m]){t.dirtyPath=true;b=true;break}}if("zIndex" in l){t.zIndexDirty=true}if("text" in l){t.dirtyFont=true;b=true}for(p=0;p<q;p++){m=j[p];if(m in l&&l[m]!==c[m]){t.dirtyFont=true;b=true;break}}k=l.translation||l.translate;delete l.translate;delete l.translation;d=c.translation;if(k){if(("x" in k&&k.x!==d.x)||("y" in k&&k.y!==d.y)){t.dirtyTransform=true;d.x=k.x;d.y=k.y}}s=l.rotation||l.rotate;n=c.rotation;delete l.rotate;delete l.rotation;if(s){if(("x" in s&&s.x!==n.x)||("y" in s&&s.y!==n.y)||("degrees" in s&&s.degrees!==n.degrees)){t.dirtyTransform=true;n.x=s.x;n.y=s.y;n.degrees=s.degrees}}u=l.scaling||l.scale;e=c.scaling;delete l.scale;delete l.scaling;if(u){if(("x" in u&&u.x!==e.x)||("y" in u&&u.y!==e.y)||("cx" in u&&u.cx!==e.cx)||("cy" in u&&u.cy!==e.cy)){t.dirtyTransform=true;e.x=u.x;e.y=u.y;e.cx=u.cx;e.cy=u.cy}}if(!t.dirtyTransform&&b){if(c.scaling.x===null||c.scaling.y===null||c.rotation.y===null||c.rotation.y===null){t.dirtyTransform=true}}Ext.apply(c,l);t.dirty=true;if(o===true&&r){t.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.Text",{extend:"Ext.draw.Component",uses:["Ext.util.CSS"],alias:"widget.text",text:"",focusable:false,viewBox:false,autoSize:true,baseCls:Ext.baseCSSPrefix+"surface "+Ext.baseCSSPrefix+"draw-text",initComponent:function(){var a=this;a.textConfig=Ext.apply({type:"text",text:a.text,rotate:{degrees:a.degrees||0}},a.textStyle);Ext.apply(a.textConfig,a.getStyles(a.styleSelectors||a.styleSelector));a.initialConfig.items=[a.textConfig];a.callParent(arguments)},getStyles:function(d){d=Ext.Array.from(d);var c=0,b=d.length,g,e,h,a={};for(;c<b;c++){g=Ext.util.CSS.getRule(d[c]);if(g){e=g.style;if(e){Ext.apply(a,{"font-family":e.fontFamily,"font-weight":e.fontWeight,"line-height":e.lineHeight,"font-size":e.fontSize,fill:e.color})}}}return a},setAngle:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.degrees=d;b.setAttributes({rotate:{degrees:d}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.degrees=d}},setText:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.text=d||"";a.remove(b);c.textConfig.type="text";c.textConfig.text=c.text;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:c.degrees}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.on({render:function(){c.setText(d)},single:true})}}});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,defaultUrl:"http://svg.sencha.io",supportedTypes:["image/png","image/jpeg"],widthParam:"width",heightParam:"height",typeParam:"type",svgParam:"svg",formCls:Ext.baseCSSPrefix+"hide-display",generate:function(a,b){b=b||{};var e=this,c=b.type,d;if(Ext.Array.indexOf(e.supportedTypes,c)===-1){return false}d=Ext.getBody().createChild({tag:"form",method:"POST",action:b.url||e.defaultUrl,cls:e.formCls,children:[{tag:"input",type:"hidden",name:b.widthParam||e.widthParam,value:b.width||a.width},{tag:"input",type:"hidden",name:b.heightParam||e.heightParam,value:b.height||a.height},{tag:"input",type:"hidden",name:b.typeParam||e.typeParam,value:c},{tag:"input",type:"hidden",name:b.svgParam||e.svgParam}]});d.last(null,true).value=Ext.draw.engine.SvgExporter.generate(a);d.dom.submit();d.remove();return true}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=new Ext.draw.Matrix();a.bbox={plain:0,transform:0};this.applyAttrs(a);this.applyTransformations(a);a.fireEvent("render",a);return b},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(k,a){var h=this,j=new Ext.draw.Matrix(),e=k.transformations,d=e.length,c=0,b,g;for(;c<d;c++){b=e[c];g=b.type;if(g=="translate"){j.translate(b.x,b.y)}else{if(g=="rotate"){j.rotate(b.degrees,b.x,b.y)}else{if(g=="scale"){j.scale(b.x,b.y,b.centerX,b.centerY)}}}}k.matrix=j;if(!a){k.el.set({transform:j.toSvg()})}},setSize:function(c,a){var d=this,b=d.el;c=+c||d.width;a=+a||d.height;d.width=c;d.height=a;b.setSize(c,a);b.set({width:c,height:a});d.callParent([c,a])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.destroy();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this,e,b,d,a,h,i;if(!g.el){e=g.width||0;b=g.height||0;d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b});a=g.getDefs();h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0});if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick,dblclick:g.onDblClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(k,l){var a=k.el.dom,b=[],n,h,m,d,e,c,g,j;if(l.hasOwnProperty("text")){m=k.tspans&&Ext.Array.map(k.tspans,function(i){return i.textContent}).join("");if(!k.tspans||l.text!=m){b=this.setText(k,l.text);k.tspans=b}else{b=k.tspans||[]}}if(b.length){n=this.getBBoxText(k).height;j=k.el.dom.getAttribute("x");for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("x",j);b[d].setAttribute("dy",d?n*1.2:n/g)}k.dirty=true}},setText:function(k,d){var h=this,a=k.el.dom,b=[],m,j,l,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){l=c[e];if(l){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(l)));a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(r){var m=this,c=r.el,q=r.group,j=r.attr,s=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,p,d,o,b,a,n;if(q){e=[].concat(q);l=e.length;for(h=0;h<l;h++){q=e[h];m.getGroup(q).add(r)}delete r.group}p=m.scrubAttrs(r)||{};r.bbox.plain=0;r.bbox.transform=0;if(r.type=="circle"||r.type=="ellipse"){p.cx=p.cx||p.x;p.cy=p.cy||p.y}else{if(r.type=="rect"){p.rx=p.ry=p.r}else{if(r.type=="path"&&p.d){p.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(p.d))}}}r.dirtyPath=false;if(p["clip-rect"]){m.setClip(r,p);delete p["clip-rect"]}if(r.type=="text"&&p.font&&r.dirtyFont){c.set({style:"font: "+p.font})}if(r.type=="image"){c.dom.setAttributeNS(m.xlink,"href",p.src)}Ext.applyIf(p,m.minDefaults[r.type]);if(r.dirtyHidden){(j.hidden)?m.hidePrim(r):m.showPrim(r);r.dirtyHidden=false}for(o in p){if(p.hasOwnProperty(o)&&p[o]!=null){if(k&&("color|stroke|fill".indexOf(o)>-1)&&(p[o] in g)){p[o]=g[p[o]]}if(o=="hidden"&&r.type=="text"){continue}if(o in s){c.dom.setAttribute(o,s[o](p[o],r,m))}else{c.dom.setAttribute(o,p[o])}}}if(r.type=="text"){m.tuneText(r,p)}r.dirtyFont=false;b=j.style;if(b){c.setStyle(b)}r.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=new Ext.draw.Sprite(a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}if(a._defs){Ext.get(a._defs).destroy()}if(a.bgRect){Ext.get(a.bgRect).destroy()}if(a.webkitRect){Ext.get(a.webkitRect).destroy()}delete a.el}});Ext.define("Ext.draw.engine.SvgExporter",function(){var b=/,/g,c=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,j=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,([\d\.]+)\)/g,g,i,e,m,n=function(o){g=o;i=g.length;e=g.width;m=g.height},k={path:function(s){var o=s.attr,v=o.path,r="",t,u,q;if(Ext.isArray(v[0])){q=v.length;for(u=0;u<q;u++){r+=v[u].join(" ")}}else{if(Ext.isArray(v)){r=v.join(" ")}else{r=v.replace(b," ")}}t=d({d:r,fill:o.fill||"none",stroke:o.stroke,"fill-opacity":o.opacity,"stroke-width":o["stroke-width"],"stroke-opacity":o["stroke-opacity"],"z-index":o.zIndex,transform:s.matrix.toSvg()});return"<path "+t+"/>"},text:function(u){var r=u.attr,q=c.exec(r.font),w=(q&&q[1])||"12",p=(q&&q[3])||"Arial",v=r.text,t=(Ext.isFF3_0||Ext.isFF3_5)?2:4,o="",s;u.getBBox();o+='<tspan x="'+(r.x||"")+'" dy="';o+=(w/t)+'">';o+=Ext.htmlEncode(v)+"</tspan>";s=d({x:r.x,y:r.y,"font-size":w,"font-family":p,"font-weight":r["font-weight"],"text-anchor":r["text-anchor"],fill:r.fill||"#000","fill-opacity":r.opacity,transform:u.matrix.toSvg()});return"<text "+s+">"+o+"</text>"},rect:function(p){var o=p.attr,q=d({x:o.x,y:o.y,rx:o.rx,ry:o.ry,width:o.width,height:o.height,fill:o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix&&p.matrix.toSvg()});return"<rect "+q+"/>"},circle:function(p){var o=p.attr,q=d({cx:o.x,cy:o.y,r:o.radius,fill:o.translation.fill||o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix.toSvg()});return"<circle "+q+" />"},image:function(p){var o=p.attr,q=d({x:o.x-(o.width/2>>0),y:o.y-(o.height/2>>0),width:o.width,height:o.height,"xlink:href":o.src,transform:p.matrix.toSvg()});return"<image "+q+" />"}},a=function(){var o='<?xml version="1.0" standalone="yes"?>';o+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return o},l=function(){var w='<svg width="'+e+'px" height="'+m+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',p="",H,F,v,q,G,J,z,x,t,y,B,o,K,u,E,C,I,D,s,r;v=g.items.items;F=v.length;G=function(O){var V=O.childNodes,S=V.length,R=0,P,Q,L="",M,U,N,T;for(;R<S;R++){M=V[R];U=M.attributes;N=M.tagName;L+="<"+N;for(Q=0,P=U.length;Q<P;Q++){T=U.item(Q);L+=" "+T.name+'="'+T.value+'"'}L+=">";if(M.childNodes.length>0){L+=G(M)}L+="</"+N+">"}return L};if(g.getDefs){p=G(g.getDefs())}else{x=g.gradientsColl;if(x){t=x.keys;y=x.items;B=0;o=t.length}for(;B<o;B++){K=t[B];u=y[B];q=g.gradientsColl.getByKey(K);p+='<linearGradient id="'+K+'" x1="0" y1="0" x2="1" y2="1">';var A=q.colors.replace(j,"rgb($1|$2|$3)");A=A.replace(h,"rgba($1|$2|$3|$4)");J=A.split(",");for(E=0,I=J.length;E<I;E++){z=J[E].split(" ");A=Ext.draw.Color.fromString(z[1].replace(/\|/g,","));p+='<stop offset="'+z[0]+'" stop-color="'+A.toString()+'" stop-opacity="1"></stop>'}p+="</linearGradient>"}}w+="<defs>"+p+"</defs>";w+=k.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});D=new Array(F);for(E=0;E<F;E++){D[E]=E}D.sort(function(M,L){s=v[M].attr.zIndex||0;r=v[L].attr.zIndex||0;if(s==r){return M-L}return s-r});for(E=0;E<F;E++){H=v[D[E]];if(!H.attr.hidden){w+=k[H.type](H)}}w+="</svg>";return w},d=function(q){var p="",o;for(o in q){if(q.hasOwnProperty(o)&&q[o]!=null){p+=o+'="'+q[o]+'" '}}return p};return{singleton:true,generate:function(o,p){p=p||{};n(o);return a()+l()}}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(t){var n=this,u=n.NonVmlPathRe,b=n.map,e=n.valRe,s=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,o,c,a,k,q,h,l;if(String(t).match(u)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(t).match(n.partialPathRe)){m=String(t).replace(d,function(r,w,j){var v=[],i=w.toLowerCase()=="m",p=b[w];j.replace(e,function(x){if(i&&v.length===2){p+=v+b[w=="m"?"l":"L"];v=[]}v.push(Math.round(x*s))});return p+v});return m}}o=g(t);m=[];for(k=0,q=o.length;k<q;k++){c=o[k];a=o[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=(g==="image")?e.createNode("image"):e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);h.el.setStyle("zIndex",-e.zIndexShift);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=new Ext.draw.Matrix();h.bbox={plain:null,transform:null};this.applyAttrs(h);this.applyTransformations(h);h.fireEvent("render",h);return h.el},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(m){var s=this,c=m.vml,j=m.group,a=m.attr,b=m.el,o=b.dom,p,u,r,n,k,q,l,t,e,d,h,g;if(j){r=[].concat(j);k=r.length;for(n=0;n<k;n++){j=r[n];s.getGroup(j).add(m)}delete m.group}q=s.scrubAttrs(m)||{};if(m.zIndexDirty){s.setZIndex(m)}Ext.applyIf(q,s.minDefaults[m.type]);if(m.type=="image"){Ext.apply(m.attr,{x:q.x,y:q.y,width:q.width,height:q.height});b.setStyle({width:q.width+"px",height:q.height+"px"});o.src=q.src}if(o.href){o.href=q.href}if(o.title){o.title=q.title}if(o.target){o.target=q.target}if(o.cursor){o.cursor=q.cursor}if(m.dirtyHidden){(q.hidden)?s.hidePrim(m):s.showPrim(m);m.dirtyHidden=false}if(m.dirtyPath){if(m.type=="circle"||m.type=="ellipse"){e=q.x;d=q.y;h=q.rx||q.r||0;g=q.ry||q.r||0;o.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((e-h)*s.zoom),Math.round((d-g)*s.zoom),Math.round((e+h)*s.zoom),Math.round((d+g)*s.zoom),Math.round(e*s.zoom));m.dirtyPath=false}else{if(m.type!=="text"&&m.type!=="image"){m.attr.path=q.path=s.setPaths(m,q)||q.path;o.path=s.path2vml(q.path);m.dirtyPath=false}}}if("clip-rect" in q){s.setClip(m,q)}if(m.type=="text"){s.setTextAttributes(m,q)}if(q.opacity||q["stroke-opacity"]||q.fill){s.setFill(m,q)}if(q.stroke||q["stroke-opacity"]||q.fill){s.setStroke(m,q)}p=a.style;if(p){b.setStyle(p)}m.dirty=false},setZIndex:function(e){var h=this,j=e.attr.zIndex,b=h.zIndexShift,c,a,g,d;if(j<b){c=h.items.items;a=c.length;for(d=0;d<a;d++){if((j=c[d].attr.zIndex)&&j<b){b=j}}h.zIndexShift=b;for(d=0;d<a;d++){g=c[d];if(g.el){g.el.setStyle("zIndex",g.attr.zIndex-b)}g.zIndexDirty=false}}else{if(e.el){e.el.setStyle("zIndex",j-b);e.zIndexDirty=false}}},setPaths:function(c,d){var a=c.attr,b=c.attr["stroke-width"]||1;c.bbox.plain=null;c.bbox.transform=null;if(c.type=="circle"){a.rx=a.ry=d.r;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="ellipse"){a.rx=d.rx;a.ry=d.ry;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="rect"){a.rx=a.ry=d.r;return Ext.draw.Draw.rectPath(c)}else{if(c.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,e){var h=this,c=k.el.dom,j=c.fill,b=false,g,i,a,l,d;if(!j){j=c.fill=h.createNode("fill");b=true}if(Ext.isArray(e.fill)){e.fill=e.fill[0]}if(e.fill=="none"){j.on=false}else{if(typeof e.opacity=="number"){j.opacity=e.opacity}if(typeof e["fill-opacity"]=="number"){j.opacity=e["fill-opacity"]}j.on=true;if(typeof e.fill=="string"){a=e.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=e.rotation;d=-(i.angle+270+(l?l.degrees:0))%360;if(d===0){d=180}j.angle=d;j.type="gradient";j.method="sigma";if(j.colors){j.colors.value=i.colors}else{j.colors=i.colors}}else{j.src=a;j.type="tile"}}else{j.color=Ext.draw.Color.toHex(e.fill);j.src="";j.type="solid"}}}if(b){c.appendChild(j)}},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.dashstyle=h["stroke-dasharray"]?"dash":"solid";i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br/>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}}c.callParent(arguments)},applyViewBox:function(){var g=this,h=g.viewBox,e=g.width,b=g.height,c,a,d;g.callParent();if(h&&(e||b)){c=g.items.items;a=c.length;for(d=0;d<a;d++){g.applyTransformations(c[d])}}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},render:function(a){var c=this,g=Ext.getDoc().dom,b;if(!c.createNode){try{if(!g.namespaces.rvml){g.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}c.createNode=function(e){return g.createElement("<rvml:"+e+' class="rvml">')}}catch(d){c.createNode=function(e){return g.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){b=g.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=g.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||0,c.height||0);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick,dblclick:c.onDblClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=new Ext.draw.Matrix();b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(x,I){var H=this,b=H.getBBox(x,true),j=b.x+b.width*0.5,h=b.y+b.height*0.5,B=new Ext.draw.Matrix(),q=x.transformations,v=q.length,C=0,o=0,d=1,c=1,n="",g=x.el,E=g.dom,z=E.style,a=H.zoom,k=x.skew,D=H.viewBoxShift,G,F,s,l,r,p,A,w,u,t,e,m;for(;C<v;C++){s=q[C];l=s.type;if(l=="translate"){B.translate(s.x,s.y)}else{if(l=="rotate"){B.rotate(s.degrees,s.x,s.y);o+=s.degrees}else{if(l=="scale"){B.scale(s.x,s.y,s.centerX,s.centerY);d*=s.x;c*=s.y}}}}x.matrix=B.clone();if(I){return}if(D){B.prepend(D.scale,0,0,D.scale,D.dx*D.scale,D.dy*D.scale)}if(x.type!="image"&&k){k.origin="0,0";k.matrix=B.toString();m=B.offset();if(m[0]>32767){m[0]=32767}else{if(m[0]<-32768){m[0]=-32768}}if(m[1]>32767){m[1]=32767}else{if(m[1]<-32768){m[1]=-32768}}k.offset=m}else{z.filter=B.toFilter();z.left=Math.min(B.x(b.x,b.y),B.x(b.x+b.width,b.y),B.x(b.x,b.y+b.height),B.x(b.x+b.width,b.y+b.height))+"px";z.top=Math.min(B.y(b.x,b.y),B.y(b.x+b.width,b.y),B.y(b.x,b.y+b.height),B.y(b.x+b.width,b.y+b.height))+"px"}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(g){var d=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),a=[],j=Ext.create("Ext.util.MixedCollection"),l,e,b,h,k,c;j.addAll(g.stops);j.sortByKey("ASC",function(m,i){m=parseInt(m,10);i=parseInt(i,10);return m>i?1:(m<i?-1:0)});l=j.keys;e=j.items;b=l.length;for(c=0;c<b;c++){h=l[c];k=e[c];a.push(h+"% "+k.color)}d.add(g.id,{colors:a.join(","),angle:g.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.flash.Component",{extend:"Ext.Component",alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},beforeRender:function(){this.callParent();Ext.applyIf(this.renderData,{swfId:this.getSwfId()})},afterRender:function(){var b=this,a=Ext.apply({},b.flashParams),c=Ext.apply({},b.flashVars);b.callParent();a=Ext.apply({allowScriptAccess:"always",bgcolor:b.backgroundColor,wmode:b.wmode},a);c=Ext.apply({allowedDomain:document.location.hostname},c);new swfobject.embedSWF(b.url,b.getSwfId(),b.swfWidth,b.swfHeight,b.flashVersion,b.expressInstall?b.statics.EXPRESS_INSTALL_URL:undefined,c,a,b.flashAttributes,Ext.bind(b.swfCallback,b))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var k=[],i,q,e=this.form,d=this.getParams(),c=[],g=e.getFields().items,h,r=g.length,j,o,m,n,l,p,b;for(h=0;h<r;h++){j=g[h];if(j.isFileUpload()){c.push(j)}}function a(s,t){k.push({tag:"input",type:"hidden",name:s,value:Ext.String.htmlEncode(t)})}for(o in d){if(d.hasOwnProperty(o)){m=d[o];if(Ext.isArray(m)){l=m.length;for(n=0;n<l;n++){a(o,m[n])}}else{a(o,m)}}}i={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:k};if(c.length){i.encoding=i.enctype="multipart/form-data"}q=Ext.DomHelper.append(Ext.getBody(),i);b=c.length;for(p=0;p<b;p++){j=c[p];if(j.rendered){q.appendChild(j.extractFileInput())}}return q},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.el.getXY();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}if(a.beginDrag){a.beginDrag()}},calculateConstrainRegion:function(){var e=this,b=e.comp,i=e.initialConstrainTo,g,h,a=e.proxy?e.proxy.el:b.el,d=(!e.constrainDelegate&&a.shadow&&!a.shadowDisabled)?a.shadow.getShadowSize():0;if(!(i instanceof Ext.util.Region)){i=Ext.fly(i).getViewRegion()}if(d){i.adjust(d[0],-d[1],-d[2],d[3])}if(!e.constrainDelegate){g=Ext.fly(e.dragTarget).getRegion();h=a.getRegion();i.adjust(g.top-h.top,g.right-h.right,g.bottom-h.bottom,g.left-h.left)}return i},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPagePosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(b){var a=this.comp;if(this.proxy&&!a.liveDrag){a.unghost()}if(a.endDrag){a.endDrag()}}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"offsets",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",initialAlphaNum:/^[a-z0-9]/,overlapHeader:true,ignoreHeaderBorderManagement:true,alwaysFramed:true,isWindow:true,initComponent:function(){var a=this;a.frame=false;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}if(a.floating){a.on({element:"el",mousedown:a.onMouseDown,scope:a})}a.addStateEvents(["maximize","restore","resize","dragend"])},getElConfig:function(){var b=this,a;a=b.callParent();a.tabIndex=-1;return a},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({scope:c,dblclick:c.toggleMaximize})}},afterRender:function(){var a=this,b;a.callParent();if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){b=a.getKeyMap();b.on(27,a.onEsc,a)}else{b=a.keyMap}if(b&&a.hidden){b.disable()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+Ext.escapeId(b.header.id)},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=new Ext.util.ComponentDragger(this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){b.stopEvent();this.close()}},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){return this.getDefaultFocus()},getDefaultFocus:function(){var c=this,b,d=c.defaultButton||c.defaultFocus,a;if(d!==undefined){if(Ext.isNumber(d)){b=c.query("button")[d]}else{if(Ext.isString(d)){a=d;if(a.match(c.initialAlphaNum)){b=c.down("#"+a)}if(!b){b=c.down(a)}}else{if(d.focus){b=d}}}}return b||c.el},onFocus:function(){var b=this,a;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((a=b.getDefaultFocus())===b)){b.callParent(arguments)}else{a.focus()}},beforeLayout:function(){var a=this.el.shadow;this.callParent();if(a){a.hide()}},onShow:function(){var a=this;a.callParent(arguments);if(a.expandOnShow){a.expand(false)}a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){var b=this,a;if(b.maximized){b.fitContainer()}else{a=b.getSizeModel();if(a.width.natural||a.height.natural){b.updateLayout()}}b.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.resizer){a.resizer.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.maximized=false;a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.el.enableShadow(true);if(a.dd){a.dd.enable()}if(a.resizer){a.resizer.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.layout.component.field.Field",{extend:"Ext.layout.component.Auto",alias:"layout.field",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics","Ext.util.CSS"],type:"field",naturalSizingProp:"size",beginLayout:function(g){var e=this,a=e.owner,c=g.widthModel,b=a[e.naturalSizingProp],d;e.callParent(arguments);g.labelStrategy=e.getLabelStrategy();g.errorStrategy=e.getErrorStrategy();g.labelContext=g.getEl("labelEl");g.bodyCellContext=g.getEl("bodyEl");g.inputContext=g.getEl("inputEl");g.errorContext=g.getEl("errorEl");if((Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&g.inputContext){e.ieInputWidthAdjustment=g.inputContext.getPaddingInfo().width+g.inputContext.getBorderInfo().width}g.labelStrategy.prepare(g,a);g.errorStrategy.prepare(g,a);if(c.shrinkWrap){e.beginLayoutShrinkWrap(g)}else{if(c.natural){if(typeof b=="number"&&!a.inputWidth){e.beginLayoutFixed(g,(d=b*6.5+20),"px")}else{e.beginLayoutShrinkWrap(g)}g.setWidth(d,false)}else{e.beginLayoutFixed(g,"100","%")}}},beginLayoutFixed:function(c,b,e){var a=c.target,d=a.inputEl,g=a.inputWidth;a.el.setStyle("table-layout","fixed");a.bodyEl.setStyle("width",b+e);if(d&&g){d.setStyle("width",g+"px")}c.isFixed=true},beginLayoutShrinkWrap:function(b){var a=b.target,c=a.inputEl,d=a.inputWidth;if(c&&c.dom){c.dom.removeAttribute("size");if(d){c.setStyle("width",d+"px")}}a.el.setStyle("table-layout","auto");a.bodyEl.setStyle("width","")},finishedLayout:function(b){var a=this.owner;this.callParent(arguments);b.labelStrategy.finishedLayout(b,a);b.errorStrategy.finishedLayout(b,a)},calculateOwnerHeightFromContentHeight:function(b,a){return a},measureContentHeight:function(a){return a.el.getHeight()},measureContentWidth:function(a){return a.el.getWidth()},measureLabelErrorHeight:function(a){return a.labelStrategy.getHeight(a)+a.errorStrategy.getHeight(a)},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var a={prepare:function(e,b){var c=b.labelCls+"-"+b.labelAlign,d=b.labelEl;if(d){d.addCls(c)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:a,top:Ext.applyIf({getHeight:function(e){var c=e.labelContext,d=c.props,b=d.height;if(b===undefined){d.height=b=c.el.getHeight()}return b}},a),left:a,right:a}}()),errorStrategies:(function(){function d(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var c=Ext.applyIf,b=Ext.emptyFn,a=Ext.baseCSSPrefix+"form-invalid-icon",g,e={prepare:function(j,h){var i=h.errorEl;if(i){i.setDisplayed(false)}},getHeight:function(){return 0},onFocus:b,finishedLayout:b};return{none:e,side:c({prepare:function(k,i){var m=i.errorEl,j=i.sideErrorCell,h=i.hasActiveError(),l;if(!g){g=(l=Ext.getBody().createChild({style:"position:absolute",cls:a})).getWidth();l.remove()}m.addCls(a);m.set({"data-errorqtip":i.getActiveError()||""});if(i.autoFitErrors){m.setDisplayed(h)}else{m.setVisible(h)}if(j&&i.autoFitErrors){j.setDisplayed(h)}i.bodyEl.dom.colSpan=i.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:d},e),under:c({prepare:function(j,h){var k=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";k.addCls(i);k.setDisplayed(h.hasActiveError())},getHeight:function(k){var h=0,i,j;if(k.target.hasActiveError()){i=k.errorContext;j=i.props;h=j.height;if(h===undefined){j.height=h=i.el.getHeight()}}return h}},e),qtip:c({prepare:function(i,h){Ext.layout.component.field.Field.initTip();h.getActionEl().set({"data-errorqtip":h.getActiveError()||""})},onFocus:d},e),title:c({prepare:function(i,h){h.el.set({title:h.getActiveError()||""})}},e),elementId:c({prepare:function(i,h){var j=Ext.fly(h.msgTarget);if(j){j.dom.innerHTML=h.getActiveError()||"";j.setDisplayed(h.hasActiveError())}}},e)}}()),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip"});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",canGrowWidth:true,beginLayoutCycle:function(b){var a=this;a.callParent(arguments);if(b.shrinkWrap){b.inputContext.el.setStyle("height","")}},measureContentWidth:function(c){var h=this,b=h.owner,a=h.callParent(arguments),g=c.inputContext,k,j,d,i,e;if(b.grow&&h.canGrowWidth&&!c.state.growHandled){k=b.inputEl;j=Ext.util.Format.htmlEncode(k.dom.value||(b.hasFocus?"":b.emptyText)||"");j+=b.growAppend;d=k.getTextWidth(j)+g.getFrameInfo().width;i=b.growMax;e=Math.min(i,a);i=Math.max(b.growMin,i,e);d=Ext.Number.constrain(d,b.growMin,i);g.setWidth(d);c.state.growHandled=true;g.domBlock(h,"width");a=NaN}return a},publishInnerHeight:function(b,a){b.inputContext.setHeight(a-this.measureLabelErrorHeight(b))},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.owner.bodyEl.setStyle("padding-right",c+"px");if(e==="px"){a-=c}}b.callParent(arguments)}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],autoEl:{tag:"table",cellpadding:0},childEls:["labelCell","labelEl","bodyEl","sideErrorCell","errorEl","inputRow","bottomPlaceHolder"],labelableRenderTpl:['<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" colspan="{bodyColspan}" role="presentation">',"{beforeBodyEl}","<tpl if=\"labelAlign=='top'\">","{beforeLabelTpl}",'<div id="{id}-labelCell" style="{labelCellStyle}">','<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","</div>","{afterLabelTpl}","</tpl>","{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","<tpl if=\"msgTarget==='side'\">","{afterBodyEl}","</td>","<td id=\"{id}-sideErrorCell\" vAlign=\"{[values.labelAlign==='top' && !values.hideLabel ? 'bottom' : 'middle']}\" style=\"{[values.autoFitErrors ? 'display:none' : '']}\" width=\"{errorIconWidth}\">",'<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none;width:{errorIconWidth}px"></div>',"</td>","<tpl elseif=\"msgTarget=='under'\">",'<div id="{id}-errorEl" class="{errorMsgClass}" colspan="2" style="display:none"></div>',"{afterBodyEl}","</td>","</tpl>","</tr>",{disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeBodyEl","afterBodyEl","beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:["allowBlank","id","labelAlign","fieldBodyCls","baseBodyCls","clearCls","labelSeparator","msgTarget"],initLabelable:function(){var a=this,b=a.padding;if(b){a.padding=undefined;a.extraMargins=Ext.Element.parseBox(b)}a.addCls(a.formItemCls);a.lastActiveError="";a.addEvents("errorchange")},trimLabelSeparator:function(){var c=this,d=c.labelSeparator,a=c.fieldLabel||"",b=a.substr(a.length-1);return b===d?a.slice(0,-1):a},getFieldLabel:function(){return this.trimLabelSeparator()},setFieldLabel:function(b){b=b||"";var c=this,d=c.labelSeparator,a=c.labelEl;c.fieldLabel=b;if(c.rendered){if(Ext.isEmpty(b)&&c.hideEmptyLabel){a.parent().setDisplayed("none")}else{if(d){b=c.trimLabelSeparator()+d}a.update(b);a.parent().setDisplayed("")}c.updateLayout()}},getInsertionRenderData:function(d,e){var b=e.length,a,c;while(b--){a=e[b];c=this[a];if(c){if(typeof c!="string"){if(!c.isTemplate){c=Ext.XTemplate.getTpl(this,a)}c=c.apply(d)}}d[a]=c||""}return d},getLabelableRenderData:function(){var b=this,c,d,a=b.labelAlign==="top";if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=(d=Ext.resetElement.createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"})).getWidth();d.remove()}c=Ext.copyTo({inFormLayout:b.ownerLayout&&b.ownerLayout.type==="form",inputId:b.getInputId(),labelOnLeft:!a,hideLabel:!b.hasVisibleLabel(),fieldLabel:b.getFieldLabel(),labelCellStyle:b.getLabelCellStyle(),labelCellAttrs:b.getLabelCellAttrs(),labelCls:b.getLabelCls(),labelStyle:b.getLabelStyle(),bodyColspan:b.getBodyColspan(),externalError:!b.autoFitErrors,errorMsgCls:b.getErrorMsgCls(),errorIconWidth:Ext.form.Labelable.errorIconWidth},b,b.labelableRenderProps,true);b.getInsertionRenderData(c,b.labelableInsertions);return c},beforeLabelableRender:function(){var a=this;if(a.ownerLayout){a.addCls(Ext.baseCSSPrefix+a.ownerLayout.type+"-form-item")}},onLabelableRender:function(){var c=this,d,a,b={};if(c.extraMargins){d=c.el.getMargin();for(a in d){if(d.hasOwnProperty(a)){b["margin-"+a]=(d[a]+c.extraMargins[a])+"px"}}c.el.setStyle(b)}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getBodyColspan:function(){var b=this,a;if(b.msgTarget==="side"&&(!b.autoFitErrors||b.hasActiveError())){a=1}else{a=2}if(b.labelAlign!=="top"&&!b.hasVisibleLabel()){a++}return a},getLabelCls:function(){var b=this.labelCls,a=this.labelClsExtra;if(this.labelAlign==="top"){b+="-top"}return a?b+" "+a:b},getLabelCellStyle:function(){var b=this,a=b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel);return a?"display:none;":""},getErrorMsgCls:function(){var b=this,a=(b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel));return b.errorMsgCls+(!a&&b.labelAlign==="top"?" "+Ext.baseCSSPrefix+"lbl-top-err-icon":"")},getLabelCellAttrs:function(){var c=this,b=c.labelAlign,a="";if(b!=="top"){a='valign="top" halign="'+b+'" width="'+(c.labelWidth+c.labelPad)+'"'}return a+' class="'+Ext.baseCSSPrefix+'field-label-cell"'},getLabelStyle:function(){var c=this,b=c.labelPad,a="";if(c.labelAlign!=="top"){if(c.labelWidth){a="width:"+c.labelWidth+"px;"}a+="margin-right:"+b+"px;"}return a+(c.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.setActiveErrors(a)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){a=Ext.Array.from(a);this.activeError=a[0];this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);if(c.errorEl){c.errorEl.dom.innerHTML=b}}},setFieldDefaults:function(c){var b=this,d,a;for(a in c){if(c.hasOwnProperty(a)){d=c[a];if(!b.hasOwnProperty(a)){b[a]=d}}}}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.value=a.transformOriginalValue(a.value);a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},transformOriginalValue:function(a){return a},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.beforeReset();a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},beforeReset:Ext.emptyFn,resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','{%if (values.maxLength !== undefined){%} maxlength="{maxLength}"{%}%}','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("specialkey","writeablechange");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},beforeRender:function(){var a=this;a.callParent(arguments);a.beforeLabelableRender(arguments);if(a.readOnly){a.addCls(a.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId(),d;d=Ext.apply({id:a,cmpId:c.id,name:c.name||a,disabled:c.disabled,readOnly:c.readOnly,value:c.getRawValue(),type:b,fieldCls:c.fieldCls,fieldStyle:c.getFieldStyle(),tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)},c.subTplData);c.getInsertionRenderData(d,c.subTplInsertions);return d},afterFirstLayout:function(){this.callParent();var a=this.inputEl;if(a){a.selectable()}},applyRenderSelectors:function(){var a=this;a.callParent();a.inputEl=a.el.getById(a.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var a=this;a.callParent(arguments);a.onLabelableRender();a.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(a.transformRawValue(b),"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},transformRawValue:function(a){return a},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onBoxReady:function(){var a=this;a.callParent();if(a.setReadOnlyOnBoxReady){a.setReadOnly(a.readOnly)}},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true;if(a.hasActiveError()){a.clearInvalid();a.needsValidateOnEnable=true}}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false;if(a.needsValidateOnEnable){delete a.needsValidateOnEnable;a.forceValidation=true;a.isValid();delete a.forceValidation}}},setReadOnly:function(c){var a=this,b=a.inputEl;c=!!c;a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c;if(b){b.dom.readOnly=c}else{if(a.rendering){a.setReadOnlyOnBoxReady=true}}a.fireEvent("writeablechange",a,c)},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(a))}},initEvents:function(){var g=this,i=g.inputEl,b,j,c=g.checkChangeEvents,h,a=c.length,d;if(g.inEditor){g.onBlur=Ext.Function.createBuffered(g.onBlur,10)}if(i){g.mon(i,Ext.EventManager.getKeyEvent(),g.fireKey,g);b=new Ext.util.DelayedTask(g.checkChange,g);g.onChangeEvent=j=function(){b.delay(g.checkChangeBuffer)};for(h=0;h<a;h++){d=c[h];if(d==="propertychange"){g.usesPropertychange=true}g.mon(i,d,j)}}g.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var b=this,a=b.disabled,c=b.forceValidation||!a;return c?b.validateValue(b.processRawValue(b.getRawValue())):a},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.updateLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.updateLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}()));Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",requiredCls:Ext.baseCSSPrefix+"form-required-field",componentLayout:"textfield",valueContainsPlaceholder:false,initComponent:function(){var a=this;a.callParent();a.addEvents("autosize","keydown","keyup","keypress");a.addStateEvents("change");a.setGrowSizePolicy()},setGrowSizePolicy:function(){if(this.grow){this.shrinkWrap|=1}},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var b=this,c=b.getRawValue(),e=b.emptyText&&c.length<1,a=b.maxLength,d;if(b.enforceMaxLength){if(a===Number.MAX_VALUE){a=undefined}}else{a=undefined}if(e){if(Ext.supports.Placeholder){d=b.emptyText}else{c=b.emptyText;b.valueContainsPlaceholder=true}}return Ext.apply(b.callParent(),{maxLength:a,readOnly:b.readOnly,placeholder:d,value:c,fieldCls:b.fieldCls+((e&&(d||c))?" "+b.emptyCls:"")+(b.allowBlank?"":" "+b.requiredCls)})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a);b.valueContainsPlaceholder=true}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var a=this.inputEl;if(a){a.dom.unselectable="on"}}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;b.callParent(arguments);if((a&&!Ext.supports.Placeholder)&&(c.dom.value===b.emptyText&&b.valueContainsPlaceholder)){b.setRawValue("");d=true;c.removeCls(b.emptyCls);b.valueContainsPlaceholder=false}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if((Ext.isGecko||Ext.isOpera)&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if((!Ext.isGecko&&!Ext.isOpera)&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),"value")},applyState:function(a){this.callParent(arguments);if(a.hasOwnProperty("value")){this.setValue(a.value)}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText&&b.valueContainsPlaceholder){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls);a.valueContainsPlaceholder=false}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,k=g.callParent(arguments),a=g.validator,d=g.emptyText,c=g.allowBlank,e=g.vtype,h=Ext.form.field.VTypes,i=g.regex,j=Ext.String.format,b;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){k.push(b)}}if(l.length<1||(l===g.emptyText&&g.valueContainsPlaceholder)){if(!c){k.push(g.blankText)}return k}if(l.length<g.minLength){k.push(j(g.minLengthText,g.minLength))}if(l.length>g.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var a=this;if(a.grow&&a.rendered){a.autoSizing=true;a.updateLayout()}},afterComponentLayout:function(){var b=this,a;b.callParent(arguments);if(b.autoSizing){a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",b,a);b.lastInputWidth=a;delete b.autoSizing}}}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",canGrowWidth:false,naturalSizingProp:"cols",beginLayout:function(a){this.callParent(arguments);a.target.inputEl.setStyle("height","")},measureContentHeight:function(b){var e=this,a=e.owner,k=e.callParent(arguments),c,i,h,g,d,j;if(a.grow&&!b.state.growHandled){c=b.inputContext;i=a.inputEl;d=i.getWidth(true);h=Ext.util.Format.htmlEncode(i.dom.value)||"&#160;";h+=a.growAppend;h=h.replace(/\n/g,"<br/>");j=Ext.util.TextMetrics.measure(i,h,d).height+c.getBorderInfo().height+c.getPaddingInfo().height;j=Ext.Number.constrain(j,a.growMin,a.growMax);c.setHeight(j);b.state.growHandled=true;c.domBlock(e,"height");k=NaN}return k}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea","Ext.util.DelayedTask"],fieldSubTpl:['<textarea id="{id}" {inputAttrTpl}','<tpl if="name"> name="{name}"</tpl>','<tpl if="rows"> rows="{rows}" </tpl>','<tpl if="cols"> cols="{cols}" </tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>',' class="{fieldCls} {typeCls}" ','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' autocomplete="off">\n','<tpl if="value">{[Ext.util.Format.htmlEncode(values.value)]}</tpl>',"</textarea>",{disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",setGrowSizePolicy:Ext.emptyFn,returnRe:/\r/g,getSubTplData:function(){var c=this,b=c.getFieldStyle(),a=c.callParent();if(c.grow){if(c.preventScrollbars){a.fieldStyle=(b||"")+";overflow:hidden;height:"+c.growMin+"px"}}Ext.applyIf(a,{cols:c.cols,rows:c.rows});return a},afterRender:function(){var a=this;a.callParent(arguments);a.needsMaxCheck=a.enforceMaxLength&&a.maxLength!==Number.MAX_VALUE&&!Ext.supports.TextAreaMaxLength;if(a.needsMaxCheck){a.inputEl.on("paste",a.onPaste,a)}},transformRawValue:function(a){return this.stripReturns(a)},transformOriginalValue:function(a){return this.stripReturns(a)},valueToRaw:function(a){a=this.stripReturns(a);return this.callParent([a])},stripReturns:function(a){if(a){a=a.replace(this.returnRe,"")}return a},onPaste:function(b){var a=this;if(!a.pasteTask){a.pasteTask=new Ext.util.DelayedTask(a.pasteCheck,a)}a.pasteTask.delay(1)},pasteCheck:function(){var b=this,c=b.getValue(),a=b.maxLength;if(c.length>a){c=c.substr(0,a);b.setValue(c)}},fireKey:function(d){var b=this,a=d.getKey(),c;if(d.isSpecialKey()&&(b.enterIsSpecial||(a!==d.ENTER||d.hasModifier()))){b.fireEvent("specialkey",b,d)}if(b.needsMaxCheck&&a!==d.BACKSPACE&&a!==d.DELETE&&!d.isNavKeyPress()&&!b.isCutCopyPasteSelectAll(d,a)){c=b.getValue();if(c.length>=b.maxLength){d.stopEvent()}}},isCutCopyPasteSelectAll:function(b,a){if(b.CTRL){return a===b.A||a===b.C||a===b.V||a===b.X}return false},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.updateLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",b,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},beforeDestroy:function(){var a=this.pasteTask;if(a){a.delay()}this.callParent()}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}"','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls}">{value}</div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isDirty:function(){return false},isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this,c;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.getDisplayValue();a.updateLayout()}return b},getDisplayValue:function(){var a=this,b=this.getRawValue(),c;if(a.renderer){c=a.renderer.call(a.scope||a,b,a)}else{c=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return c},getSubTplData:function(){var a=this.callParent(arguments);a.value=this.getDisplayValue();return a}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",manageOverflow:2,renderTpl:["{%this.renderBody(out,values);this.renderPadder(out,values)%}"],defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,beginLayout:function(c){var j=this,a=0,g,k,e,d,b,h;j.callParent(arguments);e=c.childItems;b=e.length;for(d=0;d<b;++d){k=e[d];g=k.target.anchorSpec;if(g){if(k.widthModel.calculated&&g.right){a|=1}if(k.heightModel.calculated&&g.bottom){a|=2}if(a==3){break}}}c.anchorDimensions=a;if(!Ext.supports.RightMargin&&!j.rightMarginCleanerFn){h=c.targetContext.el;j.rightMarginCleanerFn=Ext.Element.getRightMarginFixCleaner(h);h.addCls(Ext.baseCSSPrefix+"inline-children")}},calculate:function(b){var a=this,c=a.getContainerSize(b);if(b.anchorDimensions!==b.state.calculatedAnchors){a.calculateAnchors(b,c)}if(b.hasDomProp("containerChildrenDone")){if(!c.gotAll){a.done=false}a.calculateContentSize(b,b.anchorDimensions);if(a.done){a.calculateOverflow(b,c,b.anchorDimensions);return}}a.done=false},calculateAnchors:function(h,a){var p=this,l=h.childItems,g=l.length,o=a.gotHeight,j=a.gotWidth,e=a.height,c=a.width,b=h.state,q=(j?1:0)|(o?2:0),m,s,n,r,k,d;b.calculatedAnchors=(b.calculatedAnchors||0)|q;for(k=0;k<g;k++){s=l[k];n=s.getMarginInfo();m=s.target.anchorSpec;if(j&&s.widthModel.calculated){d=m.right(c)-n.width;d=p.adjustWidthAnchor(d,s);s.setWidth(d)}if(o&&s.heightModel.calculated){r=m.bottom(e)-n.height;r=p.adjustHeightAnchor(r,s);s.setHeight(r)}}},finishedLayout:function(b){var a=this.rightMarginCleanerFn;if(a){delete this.rightMarginCleanerFn;b.targetContext.el.removeCls(Ext.baseCSSPrefix+"inline-children");a()}},anchorFactory:{offset:function(a){return function(b){return b+a}},ratio:function(a){return function(b){return Math.floor(b*a)}},standard:function(a){return function(b){return b-a}}},parseAnchor:function(c,g,b){if(c&&c!="none"){var d=this.anchorFactory,e;if(this.parseAnchorRE.test(c)){return d.standard(b-g)}if(c.indexOf("%")!=-1){return d.ratio(parseFloat(c.replace("%",""))*0.01)}e=parseInt(c,10);if(!isNaN(e)){return d.offset(e)}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,c,h;e.callParent(arguments);if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)}}},sizePolicy:{"":{setsWidth:0,setsHeight:0},b:{setsWidth:0,setsHeight:1},r:{"":{setsWidth:1,setsHeight:0},b:{setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(c){var e=c.anchorSpec,a="",d=this.sizePolicy,b;if(e){b=this.owner.getSizeModel();if(e.right&&!b.width.shrinkWrap){d=d.r}if(e.bottom&&!b.height.shrinkWrap){a="b"}}return d[a]}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.form.field.Display","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:Ext.baseCSSPrefix+"message-box-info",WARNING:Ext.baseCSSPrefix+"message-box-warning",QUESTION:Ext.baseCSSPrefix+"message-box-question",ERROR:Ext.baseCSSPrefix+"message-box-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"vbox",align:"stretch"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return new Ext.button.Button({handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent(arguments)},initComponent:function(){var e=this,a=e.id,c,b,d;e.title="&#160;";e.topContainer=new Ext.container.Container({layout:"hbox",style:{padding:"10px",overflow:"hidden"},items:[e.iconComponent=new Ext.Component({cls:e.baseCls+"-icon",width:50,height:e.iconHeight}),e.promptContainer=new Ext.container.Container({flex:1,layout:{type:"anchor"},items:[e.msg=new Ext.form.field.Display({id:a+"-displayfield",cls:e.baseCls+"-text"}),e.textField=new Ext.form.field.Text({id:a+"-testfield",anchor:"100%",enableKeyEvents:true,listeners:{keydown:e.onPromptKey,scope:e}}),e.textArea=new Ext.form.field.TextArea({id:a+"-textarea",anchor:"100%",height:75})]})]});e.progressBar=new Ext.ProgressBar({id:a+"-progressbar",margins:"0 10 0 10"});e.items=[e.topContainer,e.progressBar];e.msgButtons=[];for(c=0;c<4;c++){b=e.makeButton(c);e.msgButtons[b.itemId]=b;e.msgButtons.push(b)}e.bottomTb=new Ext.toolbar.Toolbar({id:a+"-toolbar",ui:"footer",dock:"bottom",layout:{pack:"center"},items:[e.msgButtons[0],e.msgButtons[1],e.msgButtons[2],e.msgButtons[3]]});e.dockedItems=[e.bottomTb];d=e.bottomTb.getLayout();d.finishedLayout=Ext.Function.createInterceptor(d.finishedLayout,function(g){e.tbWidth=g.getProp("contentWidth")});e.on("close",e.onClose,e);e.callParent()},onClose:function(){var a=this.header.child("[type=close]");a.itemId="cancel";this.btnCallback(a);delete a.itemId},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=0,h=true,g=d.maxWidth,e=d.buttonText,b;d.updateButtonText();a=a||{};d.cfg=a;if(a.width){g=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||"&#160;")}if(Ext.isObject(a.buttons)){d.buttonText=a.buttons;c=0}else{d.buttonText=a.buttonText||d.buttonText;c=Ext.isNumber(a.buttons)?a.buttons:0}c=c|d.updateButtonText();d.buttonText=e;Ext.suspendLayouts();d.hidden=false;if(!d.rendered){d.width=g;d.render(Ext.getBody())}else{d.setSize(g,d.maxHeight)}d.closable=a.closable&&!a.wait;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.setValue(a.msg);d.msg.show()}else{d.msg.hide()}Ext.resumeLayouts(true);Ext.suspendLayouts();if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();h=false}else{d.msgButtons[b].hide()}}if(h){d.bottomTb.hide()}else{d.bottomTb.show()}Ext.resumeLayouts(true)},updateButtonText:function(){var d=this,c=d.buttonText,b=0,e,a;for(e in c){if(c.hasOwnProperty(e)){a=d.msgButtons[e];if(a){if(d.cfg&&d.cfg.buttonText){b=b|Math.pow(2,Ext.Array.indexOf(d.buttonIds,e))}if(a.text!=c[e]){a.setText(c[e])}}}}return b},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);b.doAutoSize();b.hidden=true;b.callParent();return b},onShow:function(){this.callParent(arguments);this.center()},doAutoSize:function(){var d=this,e=d.header.rendered&&d.header.isVisible(),c=d.bottomTb.rendered&&d.bottomTb.isVisible(),b,a;if(!Ext.isDefined(d.frameWidth)){d.frameWidth=d.el.getWidth()-d.body.getWidth()}d.minWidth=d.cfg.minWidth||Ext.getClass(this).prototype.minWidth;b=Math.max(e?d.header.getMinWidth():0,d.cfg.width||d.msg.getWidth()+d.iconComponent.getWidth()+25,(c?d.tbWidth:0));a=(e?d.header.getHeight():0)+d.topContainer.getHeight()+d.progressBar.getHeight()+(c?d.bottomTb.getHeight()+d.bottomTb.el.getMargin("tb"):0);d.setSize(b+d.frameWidth,a+d.frameWidth);return d},updateText:function(a){this.msg.setValue(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.messageIconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.messageIconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:this.QUESTION,msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var e=this,g=e.onItemAddOrRemove,d,c;e.owner=a;e.mon(a,{add:g,remove:g,scope:e});Ext.apply(e,b);if(Ext.isString(e.paramOrder)){e.paramOrder=e.paramOrder.split(/[\s,|]/)}if(e.api){d=e.api=Ext.apply({},e.api);for(c in d){if(d.hasOwnProperty(c)){d[c]=Ext.direct.Manager.parseMethod(d[c])}}}e.checkValidityTask=new Ext.util.DelayedTask(e.checkValidity,e);e.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");e.callParent()},initialize:function(){var a=this;a.initialized=true;a.onValidityChange(!a.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,g){var d=this,e=!!g.ownerCt,b=g.isContainer;function a(h){d[e?"mon":"mun"](h,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(g.isFormField){a(g)}else{if(b){if(g.isDestroyed||g.destroying){delete d._fields}else{Ext.Array.forEach(g.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=new Ext.util.MixedCollection();a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=new Ext.util.MixedCollection();a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;Ext.suspendLayouts();b=a.getFields().filterBy(function(c){return !c.validate()});Ext.resumeLayouts(true);return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(g){var d=this.getBoundItems(),b,c,a,e;if(d){b=d.items;a=b.length;for(c=0;c<a;c++){e=b[c];if(e.disabled===g){e.setDisabled(!g)}}}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){a=a||{};var b=this,c;if(a.standardSubmit||b.standardSubmit){c="standardsubmit"}else{c=b.api?"directsubmit":"submit"}return b.doAction(c,a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(c){c=c||this._record;var b=c.fields.items,d=this.getFieldValues(),h={},g=0,a=b.length,e;for(;g<a;++g){e=b[g].name;if(d.hasOwnProperty(e)){h[e]=d[e]}}c.beginEdit();c.set(h);c.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(e){var b=e.waitMsg,d=Ext.baseCSSPrefix+"mask-loading",a=this.getFields().items,c,i=a.length,g,h;for(c=0;c<i;c++){g=a[c];if(g.isFormField&&g.syncValue){g.syncValue()}}if(b){h=this.waitMsgTarget;if(h===true){this.owner.el.mask(b,d)}else{if(h){h=this.waitMsgTarget=Ext.get(h);h.mask(b,d)}else{Ext.MessageBox.wait(b,e.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.suspendEvents();a.hide();a.resumeEvents()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(j){var d=this,h,a,b,g,c;function i(e,l){var k=d.findField(e);if(k){k.markInvalid(l)}}if(Ext.isArray(j)){a=j.length;for(h=0;h<a;h++){b=j[h];i(b.id,b.msg)}}else{if(j instanceof Ext.data.Errors){a=j.items.length;for(h=0;h<a;h++){b=j.items[h];i(b.field,b.message)}}else{for(c in j){if(j.hasOwnProperty(c)){g=j[c];i(c,g,j)}}}}return this},setValues:function(b){var d=this,a,c,h,g;function e(i,k){var j=d.findField(i);if(j){j.setValue(k);if(d.trackResetOnLoad){j.resetOriginalValue()}}}if(Ext.isArray(b)){c=b.length;for(a=0;a<c;a++){h=b[a];e(h.id,h.value)}}else{Ext.iterate(b,e)}return this},getValues:function(i,j,n,l){var m={},g=this.getFields().items,h,o=g.length,e=Ext.isArray,k,d,c,b,a;for(h=0;h<o;h++){k=g[h];if(!j||k.isDirty()){d=k[l?"getModelData":"getSubmitData"](n);if(Ext.isObject(d)){for(a in d){if(d.hasOwnProperty(a)){c=d[a];if(n&&c===""){c=k.emptyText||""}if(m.hasOwnProperty(a)){b=m[a];if(!e(b)){b=m[a]=[b]}if(e(c)){m[a]=m[a]=b.concat(c)}else{b.push(c)}}else{m[a]=c}}}}}}if(i){m=Ext.Object.toQueryString(m)}return m},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){Ext.suspendLayouts();var b=this,a=b.getFields().items,c,d=a.length;for(c=0;c<d;c++){a[c].clearInvalid()}Ext.resumeLayouts(true);return b},reset:function(){Ext.suspendLayouts();var b=this,a=b.getFields().items,c,d=a.length;for(c=0;c<d;c++){a[c].reset()}Ext.resumeLayouts(true);return b},applyToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.apply(a[b],c)}return this},applyIfToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.applyIf(a[b],c)}return this}});Ext.define("Ext.layout.container.CheckboxGroup",{extend:"Ext.layout.container.Container",alias:["layout.checkboxgroup"],autoFlex:true,type:"checkboxgroup",childEls:["innerCt"],renderTpl:['<table id="{ownerId}-innerCt" role="presentation" style="{tableStyle}"><tbody><tr>','<tpl for="columns">','<td class="{parent.colCls}" valign="top" style="{style}">',"{% this.renderColumn(out,parent,xindex-1) %}","</td>","</tpl>","</tr></tbody></table>"],lastOwnerItemsGeneration:null,beginLayout:function(b){var k=this,e,d,h,a,j,g=0,m=0,l=k.autoFlex,c=k.innerCt.dom.style;k.callParent(arguments);e=k.columnNodes;b.innerCtContext=b.getEl("innerCt",k);if(!b.widthModel.shrinkWrap){d=e.length;if(k.columnsArray){for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){g+=a;m++}}for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){j=((a/g)*100)+"%"}else{j=a+"px"}e[h].style.width=j}}else{for(h=0;h<d;h++){j=l?(1/d*100)+"%":"";e[h].style.width=j;m++}}if(!m){c.tableLayout="fixed";c.width=""}else{if(m<d){c.tableLayout="fixed";c.width="100%"}else{c.tableLayout="auto";if(l){c.width="100%"}else{c.width=""}}}}else{c.tableLayout="auto";c.width=""}},cacheElements:function(){var a=this;a.callParent();a.rowEl=a.innerCt.down("tr");a.columnNodes=a.rowEl.dom.childNodes},calculate:function(h){var e=this,c,b,a,i,d,g;if(!h.getDomProp("containerChildrenDone")){e.done=false}else{c=h.innerCtContext;b=h.widthModel.shrinkWrap;a=h.heightModel.shrinkWrap;i=a||b;d=c.el.dom;g=i&&c.getPaddingInfo();if(b){h.setContentWidth(d.offsetWidth+g.width,true)}if(a){h.setContentHeight(d.offsetHeight+g.height,true)}}},doRenderColumn:function(d,l,g){var i=l.$layout,c=i.owner,e=l.columnCount,h=c.items.items,b=h.length,m,a,j,k,n;if(c.vertical){j=Math.ceil(b/e);a=g*j;b=Math.min(b,a+j);k=1}else{a=g;k=e}for(;a<b;a+=k){m=h[a];i.configureItem(m);n=m.getRenderTree();Ext.DomHelper.generateMarkup(n,d)}},getColumnCount:function(){var b=this,a=b.owner,c=a.columns;if(b.columnsArray){return c.length}if(Ext.isNumber(c)){return c}return a.items.length},getItemSizePolicy:function(a){return this.autoSizePolicy},getRenderData:function(){var k=this,g=k.callParent(),b=k.owner,h,d=k.getColumnCount(),a,c,j,l=k.autoFlex,e=0,m=0;if(k.columnsArray){for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){e+=a;m++}}}g.colCls=b.groupCls;g.columnCount=d;g.columns=[];for(h=0;h<d;h++){c=(g.columns[h]={});if(k.columnsArray){a=k.owner.columns[h];if(a<1){j=((a/e)*100)+"%"}else{j=a+"px"}c.style="width:"+j}else{c.style="width:"+(1/d*100)+"%";m++}}g.tableStyle=!m?"table-layout:fixed;":(m<d)?"table-layout:fixed;width:100%":(l)?"table-layout:auto;width:100%":"table-layout:auto;";return g},initLayout:function(){var b=this,a=b.owner;b.columnsArray=Ext.isArray(a.columns);b.autoColumns=!a.columns||a.columns==="auto";b.vertical=a.vertical;b.callParent()},isValidParent:function(){return true},setupRenderTpl:function(a){this.callParent(arguments);a.renderColumn=this.doRenderColumn},renderChildren:function(){var a=this,b=a.owner.items.generation;if(a.lastOwnerItemsGeneration!==b){a.lastOwnerItemsGeneration=b;a.renderItems(a.getLayoutItems())}},renderItems:function(e){var g=this,a=e.length,b,k,j,d,h,c;if(a){Ext.suspendLayouts();if(g.autoColumns){g.addMissingColumns(a)}d=g.columnNodes.length;j=Math.ceil(a/d);for(b=0;b<a;b++){k=e[b];h=g.getRenderRowIndex(b,j,d);c=g.getRenderColumnIndex(b,j,d);if(!k.rendered){g.renderItem(k,h,c)}else{if(!g.isItemAtPosition(k,h,c)){g.moveItem(k,h,c)}}}if(g.autoColumns){g.removeExceedingColumns(a)}Ext.resumeLayouts(true)}},isItemAtPosition:function(b,c,a){return b.el.dom===this.getNodeAt(c,a)},getRenderColumnIndex:function(b,a,c){if(this.vertical){return Math.floor(b/a)}else{return b%c}},getRenderRowIndex:function(b,a,d){var c=this;if(c.vertical){return b%a}else{return Math.floor(b/d)}},getNodeAt:function(b,a){return this.columnNodes[a].childNodes[b]},addMissingColumns:function(a){var g=this,c=g.columnNodes.length,e,h,b,d;if(c<a){e=a-c;h=g.rowEl;b=g.owner.groupCls;for(d=0;d<e;d++){h.createChild({cls:b,tag:"td",vAlign:"top"})}}},removeExceedingColumns:function(a){var e=this,b=e.columnNodes.length,d,g,c;if(b>a){d=b-a;g=e.rowEl;for(c=0;c<d;c++){g.last().remove()}}},renderItem:function(c,d,a){var b=this;b.configureItem(c);c.render(Ext.get(b.columnNodes[a]),d);b.afterRenderItem(c)},moveItem:function(d,g,b){var c=this,a=c.columnNodes[b],e=a.childNodes[g];a.insertBefore(d.el.dom,e||null)}});Ext.define("Ext.layout.component.field.FieldContainer",{extend:"Ext.layout.component.field.Field",alias:"layout.fieldcontainer",type:"fieldcontainer",waitForOuterHeightInDom:true,waitForOuterWidthInDom:true,beginLayout:function(a){this.callParent(arguments);a.hasRawContent=true;a.target.bodyEl.setStyle("height","")},measureContentHeight:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},measureContentWidth:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},publishInnerWidth:function(b,a){var c=b.bodyCellContext;c.setWidth(c.el.getWidth(),false)},publishInnerHeight:function(b,a){var c=b.bodyCellContext;c.setHeight(a-this.measureLabelErrorHeight(b))}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(g){var h=g.isFieldLabelable,i=g.isFormField;if(h||i){if(h){c["onLabelable"+(d?"Added":"Removed")](g)}if(i){c["onField"+(d?"Added":"Removed")](g)}}else{if(g.isContainer){Ext.Array.forEach(g.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange(c,b)},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange(b,a)},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.form.FieldContainer",{extend:"Ext.container.Container",mixins:{labelable:"Ext.form.Labelable",fieldAncestor:"Ext.form.FieldAncestor"},requires:"Ext.layout.component.field.FieldContainer",alias:"widget.fieldcontainer",componentLayout:"fieldcontainer",componentCls:Ext.baseCSSPrefix+"form-fieldcontainer",combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,fieldSubTpl:"{%this.renderContainer(out,values)%}",initComponent:function(){var a=this;a.initLabelable();a.initFieldAncestor();a.callParent()},beforeRender:function(){this.callParent(arguments);this.beforeLabelableRender(arguments)},onLabelableAdded:function(a){var b=this;b.mixins.fieldAncestor.onLabelableAdded.call(this,a);b.updateLabel()},onLabelableRemoved:function(a){var b=this;b.mixins.fieldAncestor.onLabelableRemoved.call(this,a);b.updateLabel()},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},getSubTplData:function(){var a=this.initRenderData();Ext.apply(a,this.subTplData);return a},getSubTplMarkup:function(){var c=this,a=c.getTpl("fieldSubTpl"),b;if(!a.renderContent){c.setupRenderTpl(a)}b=a.apply(c.getSubTplData());return b},updateLabel:function(){var b=this,a=b.labelEl;if(a){b.setFieldLabel(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(e){var k=[],c,l=e.length,i,d,j,b,g,h;for(c=0;c<l;c++){i=e[c];d=i.getActiveErrors();b=d.length;for(j=0;j<b;j++){g=d[j];h=i.getFieldLabel();k.push((h?h+": ":"")+g)}}return k},getTargetEl:function(){return this.bodyEl||this.callParent()}});Ext.define("Ext.form.CheckboxGroup",{extend:"Ext.form.FieldContainer",mixins:{field:"Ext.form.field.Field"},alias:"widget.checkboxgroup",requires:["Ext.layout.container.CheckboxGroup","Ext.form.field.Base"],columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onFieldAdded:function(b){var a=this;if(b.isCheckbox){a.mon(b,"change",a.checkChange,a)}a.callParent(arguments)},onFieldRemoved:function(b){var a=this;if(b.isCheckbox){a.mun(b,"change",a.checkChange,a)}a.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(a){return this.query("[isCheckbox]"+(a||""))},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return this.getBoxes("[checked]")},isDirty:function(){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){if(c[a].isDirty()){return true}}},setReadOnly:function(e){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){c[a].setReadOnly(e)}this.readOnly=e},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){var e=c.getBoxes(),d,g=e.length;for(d=0;d<g;d++){e[d].reset()}});c.preventMark=a;c.unsetActiveError();if(b){c.updateLayout()}},resetOriginalValue:function(){var d=this,c=d.getBoxes(),a,e=c.length;for(a=0;a<e;a++){c[a].resetOriginalValue()}d.originalValue=d.getValue();d.checkDirty()},setValue:function(h){var g=this,d=g.getBoxes(),a,j=d.length,e,c,i;g.batchChanges(function(){for(a=0;a<j;a++){e=d[a];c=e.getName();i=false;if(h&&h.hasOwnProperty(c)){if(Ext.isArray(h[c])){i=Ext.Array.contains(h[c],e.inputValue)}else{i=h[c]}}e.setValue(i)}});return g},getValue:function(){var d={},g=this.getBoxes(),c,j=g.length,h,e,a,i;for(c=0;c<j;c++){h=g[c];e=h.getName();a=h.inputValue;if(h.getValue()){if(d.hasOwnProperty(e)){i=d[e];if(!Ext.isArray(i)){i=d[e]=[i]}i.push(a)}else{d[e]=a}}}return d},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d,c,b;if(a.disabled){c=true}else{d=a.getErrors();c=Ext.isEmpty(d);b=!a.hasActiveError();if(c){a.unsetActiveError()}else{a.setActiveError(d)}}if(c!==b){a.fireEvent("validitychange",a,c);a.updateLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.filterBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.layout.component.FieldSet",{extend:"Ext.layout.component.Body",alias:["layout.fieldset"],type:"fieldset",beforeLayoutCycle:function(a){if(a.target.collapsed){a.heightModel=this.sizeModels.shrinkWrap}},beginLayoutCycle:function(b){var c=b.target,a;this.callParent(arguments);if(c.collapsed){b.setContentHeight(0);if(b.widthModel.shrinkWrap){a=c.lastComponentSize;b.setContentWidth((a&&a.contentWidth)||100)}}},calculateOwnerHeightFromContentHeight:function(d,c){var a=d.getBorderInfo(),b=d.target.legend;return d.getProp("contentHeight")+d.getPaddingInfo().height+(b?b.getHeight():a.top)+a.bottom},publishInnerHeight:function(c,a){var b=c.target.legend;if(b){a-=b.getHeight()}this.callParent([c,a])},getLayoutItems:function(){var a=this.owner.legend;if(a){return[a]}return[]}});Ext.define("Ext.form.FieldSet",{extend:"Ext.container.Container",alias:"widget.fieldset",uses:["Ext.form.field.Checkbox","Ext.panel.Tool","Ext.layout.container.Anchor","Ext.layout.component.FieldSet"],collapsed:false,toggleOnTitleClick:true,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",border:1,componentLayout:"fieldset",autoEl:"fieldset",childEls:["body"],renderTpl:["{%this.renderLegend(out,values);%}",'<div id="{id}-body" class="{baseCls}-body">',"{%this.renderContainer(out,values);%}","</div>"],stateEvents:["collapse","expand"],maskOnDisable:false,beforeDestroy:function(){var b=this,a=b.legend;if(a){delete a.ownerCt;a.destroy();b.legend=null}b.callParent()},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.addEvents("beforeexpand","beforecollapse","expand","collapse");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}if(b.title){b.addCls(a+"-with-title")}if(b.title||b.checkboxToggle||b.collapsible){b.addCls(a+"-with-legend");b.legend=Ext.widget(b.createLegendCt())}},initRenderData:function(){var a=this.callParent();a.baseCls=this.baseCls;return a},getState:function(){var a=this.callParent();a=this.addPropertyToState(a,"collapsed");return a},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return true},collapsedVertical:function(){return true},createLegendCt:function(){var c=this,a=[],b={xtype:"container",baseCls:c.baseCls+"-header",id:c.id+"-legend",autoEl:"legend",items:a,ownerCt:c,ownerLayout:c.componentLayout};if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());return b},createTitleCmp:function(){var b=this,a={xtype:"component",html:b.title,cls:b.baseCls+"-header-text",id:b.id+"-legendTitle"};if(b.collapsible&&b.toggleOnTitleClick){a.listeners={el:{scope:b,click:b.toggle}};a.cls+=" "+b.baseCls+"-header-text-collapsible"}return(b.titleCmp=Ext.widget(a))},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.widget({xtype:"checkbox",hideEmptyLabel:true,name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,id:a.id+"-legendChk",checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.widget({xtype:"tool",type:"toggle",handler:a.toggle,id:a.id+"-legendToggle",scope:a});return a.toggleCmp},doRenderLegend:function(b,e){var d=e.$comp,c=d.legend,a;if(c){c.ownerLayout.configureItem(c);a=c.getRenderTree();Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var a=this.legend;this.callParent();if(a){a.finishRender()}},getCollapsed:function(){return this.collapsed?"top":false},getCollapsedDockedItems:function(){var a=this.legend;return a?[a]:[]},setTitle:function(c){var b=this,a=b.legend;b.title=c;if(b.rendered){if(!b.legend){b.legend=a=Ext.widget(b.createLegendCt());a.ownerLayout.configureItem(a);a.render(b.el,0)}b.titleCmp.update(c)}return b},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(b){var c=this,d=c.checkboxCmp,a=b?"expand":"collapse";if(!c.rendered||c.fireEvent("before"+a,c)!==false){b=!!b;if(d){d.setValue(b)}if(b){c.removeCls(c.baseCls+"-collapsed")}else{c.addCls(c.baseCls+"-collapsed")}c.collapsed=!b;if(c.rendered){c.updateLayout({isRoot:false});c.fireEvent(a,c)}}return c},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},setupRenderTpl:function(a){this.callParent(arguments);a.renderLegend=this.doRenderLegend}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],autoEl:"label",maskOnDisable:false,getElConfig:function(){var a=this;a.html=a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"");return Ext.apply(a.callParent(),{htmlFor:a.forId||""})},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c;a.updateLayout()}return a}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",basicFormConfigs:["api","baseParams","errorReader","method","paramOrder","paramsAsHash","reader","standardSubmit","timeout","trackResetOnLoad","url","waitMsgTarget","waitTitle"],initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent()},afterFirstLayout:function(){this.callParent();this.form.initialize()},createForm:function(){var b={},d=this.basicFormConfigs,a=d.length,c=0,e;for(;c<a;++c){e=d[c];b[e]=this[e]}return new Ext.form.Basic(this,b)},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(d,b,c,a){return this.getForm().getValues(d,b,c,a)},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},startPolling:function(b){this.stopPolling();var a=new Ext.util.TaskRunner(b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){var a=this.form.getFields().items,b,d=a.length,c;for(b=0;b<d;b++){a[b].checkChange()}}});Ext.define("Ext.form.RadioGroup",{extend:"Ext.form.CheckboxGroup",alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(a){return this.query("[isRadio]"+(a||""))},checkChange:function(){var b=this.getValue(),a=Ext.Object.getKeys(b)[0];if(Ext.isArray(b[a])){return}this.callParent(arguments)},setValue:function(d){var j,g,e,h,c,a,b;if(Ext.isObject(d)){for(b in d){if(d.hasOwnProperty(b)){j=d[b];g=this.items.first();e=g?g.getFormId():null;h=Ext.form.RadioManager.getWithValue(b,j,e).items;a=h.length;for(c=0;c<a;++c){h[c].setValue(true)}}}}return this}});Ext.define("Ext.form.RadioManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a,b){return this.filterBy(function(c){return c.name==a&&c.getFormId()==b})},getWithValue:function(a,b,c){return this.filterBy(function(d){return d.name==a&&d.inputValue==b&&d.getFormId()==c})},getChecked:function(a,b){return this.findBy(function(c){return c.name==a&&c.checked&&c.getFormId()==b})}});Ext.define("Ext.form.action.DirectLoad",{extend:"Ext.form.action.Load",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){var d=this,c=d.form,b=c.api.load,e=b.directCfg.method,a=e.getArgs(d.getParams(),c.paramOrder,c.paramsAsHash);a.push(d.onComplete,d);b.apply(window,a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.DirectSubmit",{extend:"Ext.form.action.Submit",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var b=this,c=Ext.Function.bind(b.onComplete,b),a=b.buildForm();b.form.api.submit(a,c,b);Ext.removeNode(a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.StandardSubmit",{extend:"Ext.form.action.Submit",alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.submit();Ext.removeNode(a)}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],componentLayout:"field",childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},getElConfig:function(){var a=this;if(a.isChecked(a.rawValue,a.inputValue)){a.addCls(a.checkedCls)}return a.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{disabled:a.readOnly||a.disabled,boxLabel:a.boxLabel,boxLabelCls:a.boxLabelCls,boxLabelAlign:a.boxLabelAlign})},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},isChecked:function(b,a){return(b===true||b==="true"||b==="1"||b===1||(((Ext.isString(b)||Ext.isNumber(b))&&a)?b==a:this.onRe.test(b)))},setRawValue:function(c){var b=this,d=b.inputEl,a=b.isChecked(c,b.inputValue);if(d){b[a?"addCls":"removeCls"](b.checkedCls)}b.checked=b.rawValue=a;return a},setValue:function(g){var e=this,c,b,a,d;if(Ext.isArray(g)){c=e.getManager().getByName(e.name,e.getFormId()).items;a=c.length;for(b=0;b<a;++b){d=c[b];d.setValue(Ext.Array.contains(g,d.inputValue))}}else{e.callParent(arguments)}return e},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},resetOriginalValue:function(b){var g=this,d,e,a,c;if(!b){d=g.getManager().getByName(g.name,g.getFormId()).items;a=d.length;for(c=0;c<a;++c){e=d[c];if(e!==g){d[c].resetOriginalValue(true)}}}g.callParent()},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=!!c||a.disabled}a.callParent(arguments)},getFormId:function(){var b=this,a;if(!b.formId){a=b.up("form");if(a){b.formId=a.id}}return b.formId}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:"Ext.layout.component.field.Field",type:"triggerfield",beginLayout:function(d){var c=this,a=c.owner,b;d.triggerWrap=d.getEl("triggerWrap");c.callParent(arguments);b=a.getTriggerStateFlags();if(b!=a.lastTriggerStateFlags){a.lastTriggerStateFlags=b;c.updateEditState()}},beginLayoutFixed:function(g,c,h){var d=this,a=g.target,e=d.ieInputWidthAdjustment||0,i="100%",b=a.triggerWrap;d.callParent(arguments);a.inputCell.setStyle("width","100%");if(e){a.inputCell.setStyle("padding-right",e+"px");if(h==="px"){if(a.inputWidth){i=a.inputWidth-a.getTriggerWidth()}else{i=c-e-a.getTriggerWidth()}i+="px"}}a.inputEl.setStyle("width",i);i=a.inputWidth;if(i){b.setStyle("width",i+(e)+"px")}else{b.setStyle("width",c+h)}b.setStyle("table-layout","fixed")},beginLayoutShrinkWrap:function(d){var a=d.target,g="",e=a.inputWidth,b=a.triggerWrap,c=this.ieInputWidthAdjustment||0;this.callParent(arguments);if(e){b.setStyle("width",e+"px");e=(e-a.getTriggerWidth())+"px";a.inputEl.setStyle("width",e);a.inputCell.setStyle("width",e)}else{a.inputCell.setStyle("width",g);a.inputEl.setStyle("width",g);b.setStyle("width",g);b.setStyle("table-layout","auto")}},getTextWidth:function(){var b=this,a=b.owner,d=a.inputEl,c;c=(d.dom.value||(a.hasFocus?"":a.emptyText)||"")+a.growAppend;return d.getTextWidth(c)},measureContentWidth:function(h){var g=this,b=g.owner,e=g.callParent(arguments),i=h.inputContext,d,a,c;if(b.grow&&!h.state.growHandled){d=g.getTextWidth()+h.inputContext.getFrameInfo().width;a=b.growMax;c=Math.min(a,e);a=Math.max(b.growMin,a,c);d=Ext.Number.constrain(d,b.growMin,a);i.setWidth(d);h.state.growHandled=true;i.domBlock(g,"width");e=NaN}return e},updateEditState:function(){var c=this,a=c.owner,e=a.inputEl,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.owner.readOnly){e.addCls(d);g=true;b=false}else{if(c.owner.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.owner.hideTrigger}a.triggerCell.setDisplayed(b);e.dom.readOnly=g}});Ext.define("Ext.layout.component.field.ComboBox",{extend:"Ext.layout.component.field.Trigger",alias:"layout.combobox",requires:["Ext.util.TextMetrics"],type:"combobox",startingWidth:null,getTextWidth:function(){var h=this,b=h.owner,l=b.store,j=b.displayField,d=l.data.length,k="",e=0,c=0,g,m,a;for(;e<d;e++){m=l.getAt(e).data[j];g=m.length;if(g>c){c=g;k=m}}a=Math.max(h.callParent(arguments),b.inputEl.getTextWidth(k+b.growAppend));if(!h.startingWidth||b.removingRecords){h.startingWidth=a;if(a<b.growMin){b.defaultListConfig.minWidth=b.growMin}b.removingRecords=false}return(a<h.startingWidth)?h.startingWidth:a}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",triggerNoEditCls:Ext.baseCSSPrefix+"trigger-noedit",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){this.wrapFocusCls=this.triggerWrapCls+"-focus";this.callParent(arguments)},getSubTplMarkup:function(){var a=this,b=a.callParent(arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+b+"</td>"+a.getTriggerMarkup()+"</tr></tbody></table>"},getSubTplData:function(){var b=this,c=b.callParent(),d=b.readOnly===true,a=b.editable!==false;return Ext.apply(c,{editableCls:(d||!a)?" "+b.triggerNoEditCls:"",readOnly:!a||d})},getLabelableRenderData:function(){var b=this,c=b.triggerWrapCls,a=b.callParent(arguments);return Ext.applyIf(a,{triggerWrapCls:c,triggerMarkup:b.getTriggerMarkup()})},getTriggerMarkup:function(){var c=this,b=0,d=(c.readOnly||c.hideTrigger),g,e=c.triggerBaseCls,a=[];if(!c.trigger1Cls){c.trigger1Cls=c.triggerCls}for(b=0;(g=c["trigger"+(b+1)+"Cls"])||b<1;b++){a.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+c.triggerWidth+(d?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+b,e,g].join(" "),role:"button"}})}a[b-1].cn.cls+=" "+e+"-last";return Ext.DomHelper.markup(a)},disableCheck:function(){return !this.disabled},beforeRender:function(){var a=this,b=a.triggerBaseCls,c;if(!a.triggerWidth){c=Ext.resetElement.createChild({style:"position: absolute;",cls:Ext.baseCSSPrefix+"form-trigger"});Ext.form.field.Trigger.prototype.triggerWidth=c.getWidth();c.remove()}a.callParent();if(b!=Ext.baseCSSPrefix+"form-trigger"){a.addChildEls({name:"triggerEl",select:"."+b})}a.lastTriggerStateFlags=a.getTriggerStateFlags()},onRender:function(){var a=this;a.callParent(arguments);a.doc=Ext.getDoc();a.initTrigger();a.triggerEl.unselectable()},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerEl.getCount()*b.triggerWidth}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateLayout()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateLayout()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateLayout()}},initTrigger:function(){var h=this,i=h.triggerWrap,k=h.triggerEl,a=h.disableCheck,d,c,b,g,j;if(h.repeatTriggerClick){h.triggerRepeater=new Ext.util.ClickRepeater(i,{preventDefault:true,handler:h.onTriggerWrapClick,listeners:{mouseup:h.onTriggerWrapMouseup,scope:h},scope:h})}else{h.mon(i,{click:h.onTriggerWrapClick,mouseup:h.onTriggerWrapMouseup,scope:h})}k.setVisibilityMode(Ext.Element.DISPLAY);k.addClsOnOver(h.triggerBaseCls+"-over",a,h);d=k.elements;c=d.length;for(g=0;g<c;g++){b=d[g];j=g+1;b.addClsOnOver(h["trigger"+(j)+"Cls"]+"-over",a,h);b.addClsOnClick(h["trigger"+(j)+"Cls"]+"-click",a,h)}k.addClsOnClick(h.triggerBaseCls+"-click",a,h)},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent(arguments);if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var a=this,b=0;if(a.readOnly){b+=1}if(a.editable){b+=2}if(a.hideTrigger){b+=4}return b},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur(a)}},triggerBlur:function(b){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a,b);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},validateBlur:function(a){return true},onTriggerWrapClick:function(){var d=this,e,b,a,c;c=arguments[d.triggerRepeater?1:0];if(c&&!d.readOnly&&!d.disabled){e=c.getTarget("."+d.triggerBaseCls,null);b=e&&e.className.match(d.triggerIndexRe);if(b){a=d["onTrigger"+(parseInt(b[1],10)+1)+"Click"]||d.onTriggerClick;if(a){a.call(d,c)}}}},onTriggerWrapMouseup:Ext.emptyFn,onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.Picker",{extend:"Ext.form.field.Trigger",alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",requires:["Ext.util.KeyNav"],matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=new Ext.util.KeyNav(a.inputEl,{down:a.onDownArrow,esc:{handler:a.onEsc,scope:a,defaultEventAction:false},scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},onEsc:function(b){var a=this;if(a.isExpanded){a.collapse();b.stopEvent()}else{if(a.up("window")){a.blur()}else{if((!Ext.FocusManager||!Ext.FocusManager.enabled)){b.stopEvent()}}}},onDownArrow:function(a){if(!this.isExpanded){this.onTriggerClick()}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a=b.getPicker();if(b.isExpanded){if(b.matchFieldWidth){a.setWidth(b.bodyEl.getWidth())}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.inputEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)&&!a.isEventWithinPickerLoadMask(b)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)&&!b.isEventWithinPickerLoadMask(c)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()},isEventWithinPickerLoadMask:function(b){var a=this.picker.loadMask;return a?b.within(a.maskEl,false,true)||b.within(a.el,false,true):false}});Ext.define("Ext.layout.component.BoundList",{extend:"Ext.layout.component.Auto",alias:"layout.boundlist",type:"component",beginLayout:function(d){var c=this,a=c.owner,b=a.pagingToolbar;c.callParent(arguments);if(a.floating){d.savedXY=a.el.getXY();a.el.setXY([-9999,-9999])}if(b){d.toolbarContext=d.context.getCmp(b)}d.listContext=d.getEl("listEl")},beginLayoutCycle:function(b){var a=this.owner;this.callParent(arguments);if(b.heightModel.auto){a.el.setHeight("auto");a.listEl.setHeight("auto")}},getLayoutItems:function(){var a=this.owner.pagingToolbar;return a?[a]:[]},isValidParent:function(){return true},finishedLayout:function(a){var b=a.savedXY;this.callParent(arguments);if(b){this.owner.el.setXY(b)}},measureContentWidth:function(a){return this.owner.listEl.getWidth()},measureContentHeight:function(a){return this.owner.listEl.getHeight()},publishInnerHeight:function(c,a){var b=c.toolbarContext,d=0;if(b){d=b.getProp("height")}if(d===undefined){this.done=false}else{c.listContext.setHeight(a-c.getFrameInfo().height-d)}},calculateOwnerHeightFromContentHeight:function(c){var a=this.callParent(arguments),b=c.toolbarContext;if(b){a+=b.getProp("height")}return a}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],mixins:{bindable:"Ext.util.Bindable"},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange","focuschange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=new Ext.util.MixedCollection();b.callParent(arguments)},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var a=this;return{add:a.onStoreAdd,clear:a.onStoreClear,remove:a.onStoreRemove,update:a.onStoreUpdate}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case"MULTI":if(d.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!d.shiftKey&&!d.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked||!d.store){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}if(!h.preventFocus){h.setLastFocused(e,k)}h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked||!j.store){return false}if(typeof a==="number"){a=[j.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected==e){j.lastSelected=b.last()}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;if(c!==a){d.onLastFocusChanged(a,c,b)}},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var e=this,j=e.store,c=[],a=e.getSelection(),d=a.length,h,g,b=0,k=e.getLastFocused();if(!j){return}for(;b<d;b++){h=a[b];if(!e.pruneRemoved||j.indexOf(h)!==-1){c.push(h)}}if(e.selected.getCount()!=c.length){g=true}e.clearSelections();if(j.indexOf(k)!==-1){e.setLastFocused(k,true)}if(c.length){e.doSelect(c,false,true)}e.maybeFireSelectionChange(g)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:Ext.emptyFn,onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a,c){var e=this,d=e.selected;if(e.locked||!e.pruneRemoved){return}if(d.remove(a)){if(e.lastSelected==a){e.lastSelected=null}if(e.getLastFocused()==a){e.setLastFocused(null)}e.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:Ext.emptyFn,onStoreUpdate:Ext.emptyFn,onStoreLoad:Ext.emptyFn,onSelectChange:Ext.emptyFn,onLastFocusChanged:function(b,a){this.fireEvent("focuschange",this,b,a)},onEditorKey:Ext.emptyFn,bindComponent:Ext.emptyFn,beforeViewRender:Ext.emptyFn});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bindStore(a.getStore());c[a.triggerEvent]=b.onItemClick;c[a.triggerCtEvent]=b.onContainerClick;a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on({render:Ext.Function.bind(b.initKeyNav,b,[a]),single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a.el,ignoreInputFields:true,down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(a){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=new Ext.XTemplate(d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=new Ext.XTemplate(c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.bindStore(c.store,true);c.all=new Ext.CompositeElementLite();c.scrollState={top:0,left:0};c.on({scroll:c.onViewScroll,element:"el",scope:c})},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg,store:c.getMaskStore()};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},finishRender:function(){var a=this;a.callParent(arguments);if(!a.up("[collapsed],[hidden]")){a.doFirstRefresh(a.store)}},onBoxReady:function(){var a=this;a.callParent(arguments);if(!a.firstRefreshDone){a.doFirstRefresh(a.store)}},getMaskStore:function(){return this.store},onMaskBeforeShow:function(){var b=this,a=b.loadingHeight;b.getSelectionModel().deselectAll();b.all.clear();if(a&&a>b.getHeight()){b.hasLoadingHeight=true;b.oldMinHeight=b.minHeight;b.minHeight=a;b.updateLayout()}},onMaskHide:function(){var a=this;if(!a.destroying&&a.hasLoadingHeight){a.minHeight=a.oldMinHeight;a.updateLayout();delete a.hasLoadingHeight}},beforeRender:function(){this.callParent(arguments);this.getSelectionModel().beforeViewRender(this)},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=new Ext.selection.DataViewModel(a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,h,b,e,d,g,a;if(!c.rendered||c.isDestroyed){return}if(!c.hasListeners.beforerefresh||c.fireEvent("beforerefresh",c)!==false){h=c.getTargetEl();a=c.store.getRange();g=h.dom;if(!c.preserveScrollOnRefresh){b=g.parentNode;e=g.style.display;g.style.display="none";d=g.nextSibling;b.removeChild(g)}if(c.refreshCounter){c.clearViewEl()}else{c.fixedNodes=h.dom.childNodes.length;c.refreshCounter=1}c.tpl.append(h,c.collectData(a,0));if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",h.dom,c.emptyText)}c.all.clear()}else{c.all.fill(Ext.query(c.getItemSelector(),h.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;if(!c.preserveScrollOnRefresh){b.insertBefore(g,d);g.style.display=e}this.refreshSize();c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}}},refreshSize:function(){var a=this.getSizeModel();if(a.height.shrinkWrap||a.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var b=this,a=b.getTargetEl();if(b.fixedNodes){while(a.dom.childNodes[b.fixedNodes]){a.dom.removeChild(a.dom.childNodes[b.fixedNodes])}}else{a.update("")}b.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;b.scrollLeft=a.left;b.scrollTop=a.top}},prepareData:function(e,d,c){var b,a;if(c){b=c.getAssociatedData();for(a in b){if(b.hasOwnProperty(a)){e[a]=b[a]}}}return e},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[d]=this.prepareData(b.data,g+d,b)}return e},bufferRender:function(a,b){var c=this,d=c.renderBuffer||(c.renderBuffer=document.createElement("div"));c.tpl.overwrite(d,c.collectData(a,b));return Ext.query(c.getItemSelector(),d)},onUpdate:function(e,a){var d=this,b,c;if(d.viewReady){b=d.store.indexOf(a);if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();if(d.hasListeners.itemupdate){d.fireEvent("itemupdate",a,b,c)}return c}}}},onAdd:function(e,b,c){var d=this,a;if(d.rendered){if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.refreshSize();if(d.hasListeners.itemadd){d.fireEvent("itemadd",b,c,a)}}},doAdd:function(b,a,c){var d=this.all,e=d.getCount();if(e===0){this.clearViewEl();this.getTargetEl().appendChild(b)}else{if(c<e){if(c===0){d.item(c).insertSibling(b,"before",true)}else{d.item(c-1).insertSibling(b,"after",true)}}else{d.last().insertSibling(b,"after",true)}}Ext.Array.insert(d.elements,c,b)},onRemove:function(d,a,b){var c=this;if(c.all.getCount()){if(c.store.getCount()===0){c.refresh()}else{c.doRemove(a,b);if(c.selModel.refreshOnRemove){c.selModel.refresh()}c.updateIndexes(b)}this.refreshSize();if(c.hasListeners.itemremove){c.fireEvent("itemremove",a,b)}}},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(!b){c.getSelectionModel().bindStore(c.store)}if(c.componentLayoutCounter){c.doFirstRefresh(a)}},doFirstRefresh:function(a){var b=this;b.firstRefreshDone=true;if(a&&!a.loading){if(b.deferInitialRefresh){b.applyFirstRefresh()}else{b.refresh()}}},applyFirstRefresh:function(){var a=this;if(a.isDestroyed){return}if(a.up("[isCollapsingOrExpanding]")){Ext.Function.defer(a.applyFirstRefresh,100,a)}else{Ext.Function.defer(function(){if(!a.isDestroyed){a.refresh()}},1)}},onUnbindStore:function(a){this.setMaskBind(null)},onBindStore:function(a){this.setMaskBind(a)},setMaskBind:function(b){var a=this.loadMask;if(a&&a.bindStore){a.bindStore(b)}},getStoreListeners:function(){var a=this;return{refresh:a.onDataRefresh,add:a.onAdd,remove:a.onRemove,update:a.onUpdate,clear:a.refresh}},onDataRefresh:function(){var a=this,b=!a.firstRefreshDone&&(!a.rendered||a.up("[collapsed],[isCollapsingOrExpanding],[hidden]"));if(b){a.deferInitialRefresh=false}else{if(a.blockRefresh!==true){a.firstRefreshDone=true;a.refresh.apply(a,arguments)}}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if((!a&&a!==0)||!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a.isModel){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(c,a){var b=this.all.elements;if(a===undefined){a=b.length}else{a++}return this.all.elements.slice(c||0,a)},indexOf:function(a){a=this.getNode(a);if(!a&&a!==0){return -1}if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",deferHighlight:(Ext.isIE6||Ext.isIE7)?100:0,inputTagRe:/^textarea$|^input$/i,inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},initComponent:function(){var a=this;a.callParent();if(a.deferHighlight){a.setHighlightedItem=Ext.Function.createBuffered(a.setHighlightedItem,a.deferHighlight,a)}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","beforedeselect","select","deselect","focuschange","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var a=this;a.callParent();a.mon(a.getTargetEl(),{scope:a,freezeEvent:true,click:a.handleEvent,mousedown:a.handleEvent,mouseup:a.handleEvent,dblclick:a.handleEvent,contextmenu:a.handleEvent,mouseover:a.handleEvent,mouseout:a.handleEvent,keydown:a.handleEvent})},handleEvent:function(c){var b=this,a=c.type=="keydown"&&c.getKey();if(b.processUIEvent(c)!==false){b.processSpecialEvent(c)}if(a===c.SPACE){if(!b.inputTagRe.test(c.getTarget().tagName)){c.stopEvent()}}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(h){var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,c,j=h.type,d=i.mouseOverItem,b;if(!k){if(j=="mouseover"&&i.stillOverItem(h,d)){k=d}if(j=="keydown"){c=i.getSelectionModel().getLastSelected();if(c){k=i.getNode(c)}}}if(k){g=i.indexOf(k);if(!c){c=i.getRecord(k)}if(!c||i.processItemEvent(c,k,g,h)===false){return false}b=i.isNewItemEvent(k,h);if(b===false){return false}if((i["onBeforeItem"+a[b]](c,k,g,h)===false)||(i.fireEvent("beforeitem"+b,i,c,k,g,h)===false)||(i["onItem"+a[b]](c,k,g,h)===false)){return false}i.fireEvent("item"+b,i,c,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},isNewItemEvent:function(d,g){var c=this,a=c.mouseOverItem,b=g.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(g,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,setHighlightedItem:function(c){var b=this,a=b.highlightedItem;if(a!=c){if(a){Ext.fly(a).removeCls(b.overItemCls);b.fireEvent("unhighlightitem",b,a)}b.highlightedItem=c;if(c){Ext.fly(c).addCls(b.overItemCls);b.fireEvent("highlightitem",b,c)}}},highlightItem:function(a){this.setHighlightedItem(a)},clearHighlight:function(){this.setHighlightedItem(undefined)},onUpdate:function(b,a){var g=this,e,c,d;if(g.viewReady){e=g.getNode(a);c=g.callParent(arguments);d=g.highlightedItem;if(d&&d===e){delete g.highlightedItem;if(c){g.highlightItem(c)}}}},refresh:function(){this.clearHighlight();this.callParent(arguments)}});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var a=this;a.callParent();Ext.apply(a.renderData,{text:a.text})},setText:function(b){var a=this;if(a.rendered){a.el.update(b);a.updateLayout()}else{this.text=b}}});Ext.define("Ext.form.field.Spinner",{extend:"Ext.form.field.Trigger",alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.KeyNav"],trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,triggerTpl:'<td style="{triggerStyle}"><div class="'+Ext.baseCSSPrefix+"trigger-index-0 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-up" role="button"></div><div class="'+Ext.baseCSSPrefix+"trigger-index-1 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-down" role="button"></div></td></tr>',initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.triggerCell=b.spinUpEl.parent();b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=new Ext.util.KeyNav(b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getSubTplMarkup:function(){var a=this,b=Ext.form.field.Base.prototype.getSubTplMarkup.apply(a,arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+b+"</td>"+a.getTriggerMarkup()+"</tbody></table>"},getTriggerMarkup:function(){var a=this,b=(a.readOnly||a.hideTrigger);return a.getTpl("triggerTpl").apply({triggerStyle:"width:"+a.triggerWidth+(b?"px;display:none":"px")})},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerWidth}return a},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},onTriggerWrapMouseup:function(){this.inputEl.focus()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",submitLocaleSeparator:true,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},getSubmitValue:function(){var a=this,b=a.callParent();if(!a.submitLocaleSeparator){b=b.replace(a.decimalSeparator,".")}return b},onChange:function(){this.toggleSpinners();this.callParent(arguments)},toggleSpinners:function(){var b=this,c=b.getValue(),a=c===null;b.setSpinUpEnabled(a||c<b.maxValue);b.setSpinDownEnabled(a||c>b.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY);this.toggleSpinners()},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE);this.toggleSpinners()},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],mixins:{bindable:"Ext.util.Bindable"},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g)}},onLoad:function(){var g=this,d,b,c,a,e,h;e=g.store.getCount();h=e===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}Ext.suspendLayouts();g.child("#afterTextItem").setText(a);g.child("#inputItem").setDisabled(h).setValue(b);g.child("#first").setDisabled(b===1||h);g.child("#prev").setDisabled(b===1||h);g.child("#next").setDisabled(b===c||h);g.child("#last").setDisabled(b===c||h);g.child("#refresh").enable();g.updateInfo();Ext.resumeLayouts(true);if(g.rendered){g.fireEvent("change",g,d)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGE_UP||b==h.DOWN||b==h.PAGE_DOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGE_DOWN){a*=-1}g+=a;if(g>=1&&g<=c.pageCount){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,deferInitialRefresh:false,componentLayout:"boundlist",childEls:["listEl"],renderTpl:['<div id="{id}-listEl" class="{baseCls}-list-ct" style="overflow:auto"></div>',"{%","var me=values.$comp, pagingToolbar=me.pagingToolbar;","if (pagingToolbar) {","pagingToolbar.ownerLayout = me.componentLayout;","Ext.DomHelper.generateMarkup(pagingToolbar.getRenderTree(), out);","}","%}",{disableFormats:true}],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=new Ext.XTemplate('<ul><tpl for=".">','<li role="option" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=new Ext.XTemplate(b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent()},beforeRender:function(){var a=this;a.callParent(arguments);if(a.up("menu")){a.addCls(Ext.baseCSSPrefix+"menu")}},getBubbleTarget:function(){return this.pickerField},getRefItems:function(){return this.pagingToolbar?[this.pagingToolbar]:[]},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{id:this.id+"-paging-toolbar",pageSize:this.pageSize,store:this.store,border:false,ownerCt:this,ownerLayout:this.getComponentLayout()})},finishRenderChildren:function(){var a=this.pagingToolbar;this.callParent(arguments);if(a){a.finishRender()}},refresh:function(){var b=this,a=b.pagingToolbar;b.callParent();if(b.rendered&&a&&a.rendered&&!b.preserveScrollOnRefresh){b.el.appendChild(a.el)}},bindStore:function(a,b){var c=this.pagingToolbar;this.callParent(arguments);if(c){c.bindStore(this.store,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.form.field.ComboBox",{extend:"Ext.form.field.Picker",requires:["Ext.util.DelayedTask","Ext.EventObject","Ext.view.BoundList","Ext.view.BoundListKeyNav","Ext.data.StoreManager","Ext.layout.component.field.ComboBox"],alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],mixins:{bindable:"Ext.util.Bindable"},componentLayout:"combobox",triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenName:"",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" {inputAttrTpl} class="{fieldCls} {typeCls}" autocomplete="off"','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="name"> name="{name}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',"/>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,growToLongestValue:true,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,removingRecords:null,resizeComboToGrow:function(){var a=this;return a.grow&&a.growToLongestValue},initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){if(!e.store){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]})}if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=new Ext.XTemplate(e.displayTpl)}}e.callParent();e.doQueryTask=new Ext.util.DelayedTask(e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:Ext.emptyFn,beforeReset:function(){this.callParent();this.clearFilter()},onUnbindStore:function(a){var b=this.picker;if(!a&&b){b.bindStore(null)}this.clearFilter()},onBindStore:function(a,c){var b=this.picker;if(!c){this.resetToDefault()}if(b){b.bindStore(a)}},getStoreListeners:function(){var a=this;return{beforeload:a.onBeforeLoad,clear:a.onClear,datachanged:a.onDataChanged,load:a.onLoad,exception:a.onException,remove:a.onRemove}},onBeforeLoad:function(){++this.ignoreSelection},onDataChanged:function(){var a=this;if(a.resizeComboToGrow()){a.updateLayout()}},onClear:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true;a.onDataChanged()}},onRemove:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true}},onException:function(){if(this.ignoreSelection>0){--this.ignoreSelection}this.collapse()},onLoad:function(){var a=this,b=a.value;if(a.ignoreSelection>0){--a.ignoreSelection}if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value||a.value===0){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue(a.value)}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(i,d,g){i=i||"";var e=this,b={query:i,forceAll:d,combo:e,cancel:false},a=e.store,h=e.queryMode==="local",c;if(e.fireEvent("beforequery",b)===false||b.cancel){return false}i=b.query;d=b.forceAll;if(d||(i.length>=e.minChars)){e.expand();if(!e.queryCaching||e.lastQuery!==i){e.lastQuery=i;if(h){a.suspendEvents();c=e.clearFilter();if(i||!d){e.activeFilter=new Ext.util.Filter({root:"data",property:e.displayField,value:i});a.filter(e.activeFilter);c=true}else{delete e.activeFilter}a.resumeEvents();if(e.rendered&&c){e.getPicker().refresh()}}else{e.rawQuery=g;if(e.pageSize){e.loadPage(1)}else{a.load({params:e.getParams(i)})}}}if(e.getRawValue()!==e.getDisplayValue()){e.ignoreSelection++;e.picker.getSelectionModel().deselectAll();e.ignoreSelection--}if(h){e.doAutoSelect()}if(e.typeAhead){e.doTypeAhead()}}return true},clearFilter:function(){var a=this.store,c=this.activeFilter,d=a.filters,b;if(c){if(d.getCount()>1){d.remove(c);b=d.getRange()}a.clearFilter(true);if(b){a.filter(b)}}return !!c},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},onAdded:function(){var a=this;a.callParent(arguments);if(a.picker){a.picker.ownerCt=a.up("[floating]");a.picker.registerWithOwnerCt()}},createPicker:function(){var c=this,b,a=Ext.apply({xtype:"boundlist",pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);b=c.picker=Ext.widget(a);if(c.pageSize){b.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(b,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(b.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return b},alignPicker:function(){var b=this,a=b.getPicker(),e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);if(a.height){delete a.height;a.updateLayout()}if(a.getHeight()>c-5){a.setHeight(c-5)}b.callParent()},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(c,a){var e=this,d=e.picker.getSelectionModel().getSelection(),b=e.valueField;if(!e.multiSelect&&d.length){if(a.get(b)===d[0].get(b)){e.displayTplData=[a.data];e.setRawValue(e.getDisplayValue());e.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(m,e){var k=this,c=k.valueNotFoundText,n=k.inputEl,g,j,h,a,l=[],b=[],d=[];if(k.store.loading){k.value=m;k.setHiddenValue(k.value);return k}m=Ext.Array.from(m);for(g=0,j=m.length;g<j;g++){h=m[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){l.push(h);b.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){d.push(m[g]);a={};a[k.displayField]=m[g];b.push(a)}else{if(Ext.isDefined(c)){b.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=b;k.lastSelection=k.valueModels=l;if(n&&k.emptyText&&!Ext.isEmpty(m)){n.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(j){var e=this,a=e.hiddenName,d,b,k,h,g,c;if(!e.hiddenDataEl||!a){return}j=Ext.Array.from(j);b=e.hiddenDataEl.dom;k=b.childNodes;h=k[0];g=j.length;c=k.length;if(!h&&g>0){e.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:a}));c=1;h=b.firstChild}while(c>g){b.removeChild(k[0]);--c}while(c<g){b.appendChild(h.cloneNode(true));++c}for(d=0;d<g;d++){k[d].value=j[d]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){return this.getValue()},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var h=this,d=h.picker,g,c,b=h.valueModels||[],e=b.length,a,i;if(d){g=[];for(a=0;a<e;a++){i=b[a];if(i&&i.isModel&&h.store.indexOf(i)>=0){g.push(i)}}h.ignoreSelection++;c=d.getSelectionModel();c.deselectAll();if(g.length){c.select(g)}h.ignoreSelection--}},onEditorTab:function(b){var a=this.listKeyNav;if(this.selectOnTab&&a){a.selectHighlighted(b)}}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",childEls:["bodyEl","prevEl","nextEl","buttonsEl","monthEl","yearEl"],renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div id="{id}-monthEl" class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month"><a style="{parent.monthStyle}" href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div id="{id}-yearEl" class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<button id="{id}-prevEl" class="{baseCls}-yearnav-prev"></button>','<button id="{id}-nextEl" class="{baseCls}-yearnav-next"></button>',"</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons">{%',"var me=values.$comp, okBtn=me.okBtn, cancelBtn=me.cancelBtn;","okBtn.ownerLayout = cancelBtn.ownerLayout = me.componentLayout;","okBtn.ownerCt = cancelBtn.ownerCt = me;","Ext.DomHelper.generateMarkup(okBtn.getRenderTree(), out);","Ext.DomHelper.generateMarkup(cancelBtn.getRenderTree(), out);","%}</div>","</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,measureWidth:35,measureMaxHeight:20,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);if(a.showButtons){a.okBtn=new Ext.button.Button({text:a.okText,handler:a.onOkClick,scope:a});a.cancelBtn=new Ext.button.Button({text:a.cancelText,handler:a.onCancelClick,scope:a})}this.callParent()},beforeRender:function(){var g=this,c=0,b=[],a=Ext.Date.getShortMonthName,e=g.monthOffset,h=g.monthMargin,d="";g.callParent();for(;c<e;++c){b.push(a(c),a(c+e))}if(Ext.isDefined(h)){d="margin: 0 "+h+"px;"}Ext.apply(g.renderData,{months:b,years:g.getYears(),showButtons:g.showButtons,monthStyle:d})},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");b.backRepeater=new Ext.util.ClickRepeater(b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=new Ext.util.ClickRepeater(b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody();if(!Ext.isDefined(b.monthMargin)){Ext.picker.Month.prototype.monthMargin=b.calculateMonthMargin()}},calculateMonthMargin:function(){var d=this,b=d.monthEl,a=d.months,e=a.first(),c=e.getMargin("l");while(c&&d.getLargest()>d.measureMaxHeight){--c;a.setStyle("margin","0 "+c+"px")}return c},getLargest:function(a){var b=0;this.months.each(function(d){var c=d.getHeight();if(c>b){b=c}});return b},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var i=this,e=i.years,b=i.months,m=i.getYears(),n=i.selectedCls,k=i.getYear(null),g=i.value[0],l=i.monthOffset,h,d,j,a,c;if(i.rendered){e.removeCls(n);b.removeCls(n);d=e.elements;a=d.length;for(j=0;j<a;j++){c=Ext.fly(d[j]);h=m[j];c.dom.innerHTML=h;if(h==k){c.dom.className=n}}if(g!==null){if(g<l){g=g*2}else{g=(g-l)*2+1}b.item(g).addCls(n)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()},finishRenderChildren:function(){var a=this;this.callParent(arguments);if(this.showButtons){a.okBtn.finishRender();a.cancelBtn.finishRender()}},onDestroy:function(){Ext.destroyMembers(this,"okBtn","cancelBtn");this.callParent()}});Ext.define("Ext.picker.Date",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.button.Button","Ext.button.Split","Ext.util.ClickRepeater","Ext.util.KeyNav","Ext.EventObject","Ext.fx.Manager","Ext.picker.Month"],alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",childEls:["innerEl","eventEl","prevEl","nextEl","middleBtnEl","footerEl"],border:true,renderTpl:['<div id="{id}-innerEl" role="grid">','<div role="presentation" class="{baseCls}-header">','<div class="{baseCls}-prev"><a id="{id}-prevEl" href="#" role="button" title="{prevText}"></a></div>','<div class="{baseCls}-month" id="{id}-middleBtnEl">{%this.renderMonthBtn(values, out)%}</div>','<div class="{baseCls}-next"><a id="{id}-nextEl" href="#" role="button" title="{nextText}"></a></div>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" title="{.}"><span>{.:this.firstInitial}</span></th>',"</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" href="#" hidefocus="on" class="{parent.baseCls}-date" tabIndex="1">','<em role="presentation"><span role="presentation"></span></em>',"</a>","</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer">{%this.renderTodayBtn(values, out)%}</div>',"</tpl>","</div>",{firstInitial:function(a){return Ext.picker.Date.prototype.getDayInitial(a)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},renderTodayBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.todayBtn.getRenderTree(),b)},renderMonthBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.monthBtn.getRenderTree(),b)}}],todayText:"Today",ariaTitle:"Date Picker: {0}",ariaTitleDateFormat:"F d, Y",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",monthYearFormat:"F Y",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));b.listeners=Ext.apply(b.listeners||{},{mousewheel:{element:"eventEl",fn:b.handleMouseWheel,scope:b},click:{element:"eventEl",fn:b.handleDateClick,scope:b,delegate:"a."+b.baseCls+"-date"}});this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},beforeRender:function(){var b=this,c=new Array(b.numDays),a=Ext.Date.format(new Date(),b.format);if(b.up("menu")){b.addCls(Ext.baseCSSPrefix+"menu")}b.monthBtn=new Ext.button.Split({ownerCt:b,ownerLayout:b.getComponentLayout(),text:"",tooltip:b.monthYearText,listeners:{click:b.showMonthPicker,arrowclick:b.showMonthPicker,scope:b}});if(this.showToday){b.todayBtn=new Ext.button.Button({ownerCt:b,ownerLayout:b.getComponentLayout(),text:Ext.String.format(b.todayText,a),tooltip:Ext.String.format(b.todayTip,a),tooltipType:"title",handler:b.selectToday,scope:b})}b.callParent();Ext.applyIf(b,{renderData:{}});Ext.apply(b.renderData,{dayNames:b.dayNames,showToday:b.showToday,prevText:b.prevText,nextText:b.nextText,days:c})},finishRenderChildren:function(){var a=this;a.callParent();a.monthBtn.finishRender();if(a.showToday){a.todayBtn.finishRender()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.el.unselectable();c.cells=c.eventEl.select("tbody td");c.textNodes=c.eventEl.query("tbody td span")},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;c.callParent();c.prevRepeater=new Ext.util.ClickRepeater(c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=new Ext.util.ClickRepeater(c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=new Ext.util.KeyNav(c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.update(c.value)},initDisabledDays:function(){var h=this,b=h.disabledDates,g="(?:",a,i,c,e;if(!h.disabledDatesRE&&b){a=b.length-1;c=b.length;for(i=0;i<c;i++){e=b[i];g+=Ext.isDate(e)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(e,h.format))+"$":e;if(i!=a){g+="|"}}h.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},getDayInitial:function(a){return a.substr(0,1)},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=new Ext.picker.Month({renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=Ext.Date.getLastDateOfMonth(new Date(c,g,1))}d.update(a);d.hideMonthPicker()},onCancelClick:function(){this.selectedUpdate(this.activeDate);this.hideMonthPicker()},showPrevMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.doCancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.doCancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(a){var d=this,i=a.getTime(),j=d.cells,k=d.selectedCls,g=j.elements,b,e=g.length,h;j.removeCls(k);for(b=0;b<e;b++){h=Ext.fly(g[b]);if(h.dom.firstChild.dateValue==i){d.fireEvent("highlightitem",d,h);h.addCls(k);if(d.isVisible()&&!d.doCancelFocus){Ext.fly(h.dom.firstChild).focus(50)}break}}},fullUpdate:function(A){var E=this,g=E.cells.elements,d=E.textNodes,G=E.disabledCellCls,n=Ext.Date,w=0,D=0,e=E.isVisible(),u=+n.clearTime(A,true),z=+n.clearTime(new Date()),t=E.minDate?n.clearTime(E.minDate,true):Number.NEGATIVE_INFINITY,v=E.maxDate?n.clearTime(E.maxDate,true):Number.POSITIVE_INFINITY,C=E.disabledDatesRE,s=E.disabledDatesText,H=E.disabledDays?E.disabledDays.join(""):false,B=E.disabledDaysText,x=E.format,l=n.getDaysInMonth(A),p=n.getFirstDateOfMonth(A),h=p.getDay()-E.startDay,y=n.add(A,n.MONTH,-1),b=E.longDayFormat,k,q,a,F,m,o,c,j,r;if(h<0){h+=7}l+=h;k=n.getDaysInMonth(y)-h;q=new Date(y.getFullYear(),y.getMonth(),k,E.initHour);if(E.showToday){F=n.clearTime(new Date());a=(F<t||F>v||(C&&x&&C.test(n.dateFormat(F,x)))||(H&&H.indexOf(F.getDay())!=-1));if(!E.disabled){E.todayBtn.setDisabled(a);E.todayKeyListener.setDisabled(a)}}m=function(i){r=+n.clearTime(q,true);i.title=n.format(q,b);i.firstChild.dateValue=r;if(r==z){i.className+=" "+E.todayCls;i.title=E.todayText}if(r==u){i.className+=" "+E.selectedCls;E.fireEvent("highlightitem",E,i);if(e&&E.floating){Ext.fly(i.firstChild).focus(50)}}if(r<t){i.className=G;i.title=E.minText;return}if(r>v){i.className=G;i.title=E.maxText;return}if(H){if(H.indexOf(q.getDay())!=-1){i.title=B;i.className=G}}if(C&&x){j=n.dateFormat(q,x);if(C.test(j)){i.title=s.replace("%0",j);i.className=G}}};for(;w<E.numDays;++w){if(w<h){o=(++k);c=E.prevCls}else{if(w>=l){o=(++D);c=E.nextCls}else{o=w-h+1;c=E.activeCls}}d[w].innerHTML=o;g[w].className=c;q.setDate(q.getDate()+1);m(g[w])}E.monthBtn.setText(Ext.Date.format(A,E.monthYearFormat))},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}b.innerEl.dom.title=Ext.String.format(b.ariaTitle,Ext.Date.format(b.activeDate,b.ariaTitleDateFormat))}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var b=this.prototype,a=Ext.Date;b.monthNames=a.monthNames;b.dayNames=a.dayNames;b.format=a.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,useStrict:undefined,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,g="(?:",h,e=b.length,c;for(h=0;h<e;h++){c=b[h];g+=Ext.isDate(c)?"^"+Ext.String.escapeRegex(c.dateFormat(this.format))+"$":c;if(h!==a){g+="|"}}this.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(q){var j=this,p=Ext.String.format,k=Ext.Date.clearTime,o=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;q=j.formatDate(q||j.processRawValue(j.getRawValue()));if(q===null||q.length<1){return o}a=q;q=j.parseDate(q);if(!q){o.push(p(j.invalidText,a,Ext.Date.unescapeFormat(j.format)));return o}c=q.getTime();if(m&&c<k(m).getTime()){o.push(p(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){o.push(p(j.maxText,j.formatDate(h)))}if(n){l=q.getDay();for(;e<g;e++){if(l===n[e]){o.push(j.disabledDaysText);break}}}b=j.formatDate(q);if(d&&d.test(b)){o.push(p(j.disabledDatesText,b))}return o},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(g,h){var e=this,c=Ext.Date,a=null,b=e.useStrict,d;if(c.formatContainsHourInfo(h)){a=c.parse(g,h,b)}else{d=c.parse(g+" "+e.initTime,h+" "+e.initTimeFormat,b);if(d){a=c.clearTime(d)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return new Ext.picker.Date({pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.form.field.File",{extend:"Ext.form.field.Trigger",alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],uses:["Ext.button.Button","Ext.layout.component.field.Field"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,triggerNoEditCls:"",componentLayout:"triggerfield",childEls:["fileInputEl","buttonEl","buttonEl-btnEl","browseButtonWrap"],onRender:function(){var a=this,b;a.callParent(arguments);b=a.inputEl;b.dom.name="";a.fileInputEl.dom.name=a.getName();a.fileInputEl.on({scope:a,change:a.onFileChange});if(a.buttonOnly){a.inputCell.setDisplayed(false)}a.browseButtonWrap.dom.style.width=(a.browseButtonWrap.dom.lastChild.offsetWidth+a.buttonEl.getMargin("lr"))+"px";if(Ext.isIE){a.buttonEl.repaint()}},getTriggerMarkup:function(){var d=this,a,c=Ext.widget("button",Ext.apply({id:d.id+"-buttonEl",ui:d.ui,disabled:d.disabled,text:d.buttonText,cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,style:d.buttonOnly?"":"margin-left:"+d.buttonMargin+"px"},d.buttonConfig)),b=c.getRenderTree(),e={id:d.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1};if(d.disabled){e.disabled=true}b.cn=e;a='<td id="'+d.id+'-browseButtonWrap">'+Ext.DomHelper.markup(b)+"</td>";c.destroy();return a},createFileInput:function(){var a=this;a.fileInputEl=a.buttonEl.createChild({name:a.getName(),id:a.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1});a.fileInputEl.on({scope:a,change:a.onFileChange})},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var a=this.fileInputEl;if(a){a.dom.disabled=true}this["buttonEl-btnEl"].dom.disabled=true},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;this["buttonEl-btnEl"].dom.disabled=false},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","buttonEl");this.callParent()}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",toolbarSizePolicy:{setsWidth:0,setsHeight:0},beginLayout:function(a){this.callParent(arguments);a.textAreaContext=a.getEl("textareaEl");a.iframeContext=a.getEl("iframeEl");a.toolbarContext=a.context.getCmp(this.owner.getToolbar())},renderItems:Ext.emptyFn,getItemSizePolicy:function(a){return this.toolbarSizePolicy},getLayoutItems:function(){var a=this.owner.getToolbar();return a?[a]:[]},getRenderTarget:function(){return this.owner.bodyEl},publishInnerHeight:function(c,a){var b=this,d=a-b.measureLabelErrorHeight(c)-c.toolbarContext.getProp("height")-c.bodyCellContext.getPaddingInfo().height;if(Ext.isNumber(d)){c.textAreaContext.setHeight(d);c.iframeContext.setHeight(d)}else{b.done=false}}});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.}" hidefocus="on">','<em><span style="background:#{.}" unselectable="on">&#160;</span></em>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{itemCls:a.itemCls,colors:a.colors})},onRender:function(){var b=this,a=b.clickEvent;b.callParent(arguments);b.mon(b.el,a,b.handleClick,b,{delegate:"a"});if(a!="click"){b.mon(b.el,"click",Ext.emptyFn,b,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],childEls:["iframeEl","textareaEl"],fieldSubTpl:["{beforeTextAreaTpl}",'<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" {inputAttrTpl}',' class="{textareaCls}" style="{size}" autocomplete="off">',"{[Ext.util.Format.htmlEncode(values.value)]}","</textarea>","{afterTextAreaTpl}","{beforeIFrameTpl}",'<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',' style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',"{afterIFrameTpl}",{disableFormats:true}],subTplInsertions:["beforeTextAreaTpl","afterTextAreaTpl","beforeIFrameTpl","afterIFrameTpl","iframeAttrTpl","inputAttrTpl"],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",editorWrapCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",afterBodyEl:"</div>",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.createToolbar(a);a.initLabelable();a.initField()},getRefItems:function(){return[this.toolbar]},createToolbar:function(g){var j=this,h=[],c,l=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),e=Ext.baseCSSPrefix,d,k,b;function a(n,i,m){return{itemId:n,cls:e+"btn-icon",iconCls:e+"edit-"+n,enableToggle:i!==false,scope:g,handler:m||g.relayBtnCmd,clickEvent:"mousedown",tooltip:l?g.buttonTips[n]||b:b,overflowText:g.buttonTips[n].title||b,tabIndex:-1}}if(j.enableFont&&!Ext.isSafari2){d=Ext.widget("component",{renderTpl:['<select id="{id}-selectEl" class="{cls}">','<tpl for="fonts">','<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',"</tpl>","</select>"],renderData:{cls:e+"font-select",fonts:j.fontFamilies,defaultFont:j.defaultFont},childEls:["selectEl"],afterRender:function(){j.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var i=this.selectEl;if(i){i.dom.disabled=true}Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var i=this.selectEl;if(i){i.dom.disabled=false}Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){j.relayCmd("fontname",j.fontSelect.dom.value);j.deferFocus()},element:"selectEl"}});h.push(d,"-")}if(j.enableFormat){h.push(a("bold"),a("italic"),a("underline"))}if(j.enableFontSize){h.push("-",a("increasefontsize",false,j.adjustFont),a("decreasefontsize",false,j.adjustFont))}if(j.enableColors){h.push("-",{itemId:"forecolor",cls:e+"btn-icon",iconCls:e+"edit-forecolor",overflowText:g.buttonTips.forecolor.title,tooltip:l?g.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(m,i){j.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:e+"btn-icon",iconCls:e+"edit-backcolor",overflowText:g.buttonTips.backcolor.title,tooltip:l?g.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(m,i){if(Ext.isGecko){j.execCmd("useCSS",false);j.execCmd("hilitecolor",i);j.execCmd("useCSS",true);j.deferFocus()}else{j.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus()}this.up("menu").hide()}}]})})}if(j.enableAlignments){h.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(j.enableLinks){h.push("-",a("createlink",false,j.createLink))}if(j.enableLists){h.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(j.enableSourceEdit){h.push("-",a("sourceedit",true,function(i){j.toggleSourceEdit(!j.sourceEditMode)}))}}for(c=0;c<h.length;c++){if(h[c].itemId!=="sourceedit"){h[c].disabled=true}}k=Ext.widget("toolbar",{id:j.id+"-toolbar",ownerCt:j,cls:Ext.baseCSSPrefix+"html-editor-tb",enableOverflow:true,items:h,ownerLayout:j.getComponentLayout(),listeners:{click:function(i){i.preventDefault()},element:"el"}});j.toolbar=k},getMaskTarget:function(){return this.bodyEl},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2;return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},finishRenderChildren:function(){this.callParent();this.toolbar.finishRender()},onRender:function(){var a=this;a.callParent(arguments);a.inputEl=a.iframeEl;a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100})},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){this.beforeSubTpl='<div class="'+this.editorWrapCls+'">'+Ext.DomHelper.markup(this.toolbar.getRenderTree());return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){return{$comp:this,cmpId:this.id,id:this.getInputId(),textareaCls:Ext.baseCSSPrefix+"hidden",value:this.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;width:100%"}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(d){var b=this.getToolbar().items.items,c,a=b.length,e;for(c=0;c<a;c++){e=b[c];if(e.getItemId()!=="sourceedit"){e.setDisabled(d)}}},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus();g.inputEl=a}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus();g.inputEl=d}g.fireEvent("editmodechange",g,b);g.updateLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===parseInt(this.defaultValue.replace(/\D/g,""),10)){a=a.substring(1)}return a},syncValue:function(){var e=this,b,g,d,a,c;if(e.initialized){b=e.getEditorBody();d=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");c=a.match(/text-align:(.*?);/i);if(c&&c[1]){d='<div style="'+c[0]+'">'+d+"</div>"}}d=e.cleanHtml(d);if(e.fireEvent("beforesync",e,d)!==false){if(e.textareaEl.dom.value!=d){e.textareaEl.dom.value=d;g=true}e.fireEvent("sync",e,d);if(g){e.checkChange()}}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(Ext.fly(c));for(g in c){if(c.hasOwnProperty&&c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"toolbar","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){for(var k=0,h=arguments.length,j;k<h;k++){j=arguments[k];d[j].toggle(g.queryCommandState(j))}}if(e.enableFormat){b("bold","italic","underline")}if(e.enableAlignments){b("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&e.enableLists){b("insertorderedlist","insertunorderedlist")}Ext.menu.Manager.hideAll();e.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;c.focus();c.execCmd(b,a);c.updateToolbar()},10,this)},execCmd:function(d,c){var b=this,e=b.getDoc(),a;e.execCommand(d,false,c===a?null:c);b.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:(function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),i=c.readOnly,a,d;if(b===h.TAB){h.stopEvent();if(!i){a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&#160;&#160;&#160;&#160;");c.deferFocus()}}}else{if(b===h.ENTER){if(!i){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();if(!a.readOnly){a.win.focus();a.execCmd("InsertHTML","&#160;&#160;&#160;&#160;");a.deferFocus()}}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey(),d=b.readOnly;if(a===c.TAB){c.stopEvent();if(!d){b.execCmd("InsertText","\t");b.deferFocus()}}else{if(a===c.ENTER){c.stopEvent();if(!d){b.execCmd("InsertHtml","<br /><br />");b.deferFocus()}}}}}return null}()),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",formId:null,getGroupValue:function(){var a=this.getManager().getChecked(this.name,this.getFormId());return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a,b.getFormId()).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(c,a){var g=this,e,d,b,h;g.callParent(arguments);if(c){h=g.getManager().getByName(g.name,g.getFormId()).items;d=h.length;for(e=0;e<d;e++){b=h[e];if(b!==g){b.setValue(false)}}}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.picker.Time",{extend:"Ext.view.BoundList",alias:"widget.timepicker",requires:["Ext.data.Store","Ext.Date"],increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.store.filterBy(function(d){var e=d.get("date");return e>=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return new Ext.data.Store({fields:["disp","date"],data:e})}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.ComboBox",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,snapToIncrement:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",ignoreSelection:0,queryMode:"local",displayField:"disp",valueField:"date",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}c.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : this.formatDate(values["'+c.displayField+'"])]}<tpl if="xindex < xcount">'+c.delimiter+"</tpl></tpl>",{formatDate:Ext.Function.bind(c.formatDate,c)});this.callParent()},transformOriginalValue:function(a){if(Ext.isString(a)){return this.rawToValue(a)}return a},isEqual:function(b,a){return Ext.Date.isEqual(b,a)},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{c=null}a[g?"minValue":"maxValue"]=c},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,Ext.Date.unescapeFormat(b.format)));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){var d=this,h=e,b=d.altFormats,g=d.altFormatsArray,c=0,a;if(e&&!Ext.isDate(e)){h=d.safeParse(e,d.format);if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}}if(h&&d.snapToIncrement){h=new Date(Ext.Number.snap(h.getTime(),d.increment*60*1000))}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a;b.listConfig=Ext.apply({xtype:"timepicker",selModel:{mode:"SINGLE"},cls:undefined,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,maxHeight:b.pickerMaxHeight},b.listConfig);a=b.callParent();b.store=a.store;return a},onItemClick:function(b,a){var d=this,c=b.getSelectionModel().getSelection();if(c.length>0){c=c[0];if(c&&Ext.Date.isEqual(a.get("date"),c.get("date"))){d.collapse()}}},onListSelectionChange:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;if(!b.ignoreSelection){b.skipSync=true;b.setValue(d);b.skipSync=false;b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}},syncSelection:function(){var j=this,h=j.picker,c,g,k,b,i,e,a;if(h&&!j.skipSync){h.clearHighlight();k=j.getValue();g=h.getSelectionModel();j.ignoreSelection++;if(k===null){g.deselectAll()}else{if(Ext.isDate(k)){b=h.store.data.items;e=b.length;for(i=0;i<e;i++){a=b[i];if(Ext.Date.isEqual(a.get("date"),k)){c=a;break}}g.select(c)}}j.ignoreSelection--}},postBlur:function(){var a=this;a.callParent(arguments);a.setRawValue(a.formatDate(a.getValue()))},setValue:function(){this.getPicker();this.callParent(arguments)},getValue:function(){return this.parseDate(this.callParent(arguments))}});Ext.define("Ext.grid.CellEditor",{extend:"Ext.Editor",constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}this.callParent([a])},onShow:function(){var b=this,d=b.boundEl.first(),a,c;if(d){a=d.dom.lastChild;if(a&&a.nodeType===3){c=b.cellTextNode=d.dom.lastChild;b.cellTextValue=c.nodeValue;c.nodeValue="\u00a0"}}b.callParent(arguments)},onHide:function(){var a=this,b=a.boundEl.first();if(b&&a.cellTextNode){a.cellTextNode.nodeValue=a.cellTextValue;delete a.cellTextNode;delete a.cellTextValue}a.callParent(arguments)},afterRender:function(){var a=this,b=a.field;a.callParent(arguments);if(b.isXType("checkboxfield")){b.mon(b.inputEl,{mousedown:a.onCheckBoxMouseDown,click:a.onCheckBoxClick,scope:a})}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},realign:function(e){var k=this,h=k.boundEl,j=h.first(),c=j.dom.childNodes,g=c.length,d=Ext.Array.clone(k.offsets),l=k.field.inputEl,b,i,m,a;if(k.isForTree&&(g>1||(g===1&&c[0].nodeType!==3))){b=j.last();i=b.getOffsetsTo(j)[0]+b.getWidth();m=j.getWidth();a=m-i;if(!k.editingPlugin.grid.columnLines){a--}d[0]+=i;k.addCls(Ext.baseCSSPrefix+"grid-editor-on-text-node")}else{a=h.getWidth()-1}if(e===true){k.field.setWidth(a)}k.alignTo(h,k.alignment,d)},onEditorTab:function(b){var a=this.field;if(a.onEditorTab){a.onEditorTab(b)}},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(a){return this.owner.isGroupHeader?a.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(this.owner.isGroupHeader){a+=this.owner.titleEl.dom.offsetHeight}return a},getContentWidth:function(a){return this.owner.isGroupHeader?a.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getPaddingInfo().width}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",initLayout:function(){this.grid=this.owner.up("[scrollerOwner]");this.callParent()},beginLayout:function(j){var h=this,e=h.grid,b=e.view,d=0,c=h.getVisibleItems(),a=c.length,g;j.gridContext=j.context.getCmp(h.grid);if(e.lockable){if(h.owner.up("tablepanel")===b.normalGrid){b=b.normalGrid.getView()}else{b=null}}h.callParent(arguments);for(;d<a;d++){g=c[d];g.removeCls([h.firstHeaderCls,h.lastHeaderCls]);g.el.setStyle({height:"auto"});g.titleEl.setStyle({height:"auto",paddingTop:""})}if(a>0){c[0].addCls(h.firstHeaderCls);c[a-1].addCls(h.lastHeaderCls)}if(!h.owner.isHeader&&Ext.getScrollbarSize().width&&!e.collapsed&&b&&b.table.dom&&(b.autoScroll||b.overflowY)){j.viewContext=j.context.getCmp(b)}},roundFlex:function(a){return Math.floor(a)},calculate:function(e){var d=this,c=e.viewContext,b,a;d.callParent(arguments);if(e.state.parallelDone){e.setProp("columnWidthsDone",true)}if(c&&!e.state.overflowAdjust.width&&!e.gridContext.heightModel.shrinkWrap){b=c.tableContext.getProp("height");a=c.getProp("height");if(isNaN(b+a)){d.done=false}else{if(b>=a){e.gridContext.invalidate({after:function(){e.state.overflowAdjust={width:Ext.getScrollbarSize().width,height:0}}})}}}},completeLayout:function(c){var j=this,b=j.owner,a=c.state,g=false,k=j.sizeModels.calculated,e,h,d,m,l;j.callParent(arguments);if(!a.flexesCalculated&&b.forceFit&&!b.isHeader){e=c.childItems;h=e.length;for(d=0;d<h;d++){m=e[d];l=m.target;if(l.width){l.flex=c.childItems[d].flex=l.width;delete l.width;m.widthModel=k;g=true}}if(g){j.cacheFlexes(c);c.invalidate({state:{flexesCalculated:true}})}}},finalizeLayout:function(){var g=this,e=0,d,b,h,a=g.owner,c=a.titleEl;d=g.getVisibleItems();b=d.length;h=a.el.getViewSize().height;if(c){h-=c.getHeight()}for(;e<b;e++){d[e].setPadding(h)}},publishInnerCtSize:function(e){var d=this,c=e.state.boxPlan.targetSize,b=e.peek("contentWidth"),a;if((b!=null)&&!d.owner.isHeader){c.width=b;a=d.owner.ownerCt.view;if(a.autoScroll||a.overflowY){c.width+=Ext.getScrollbarSize().width}}return d.callParent(arguments)}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.view.TableLayout",{extend:"Ext.layout.component.Auto",alias:["layout.tableview"],type:"tableview",beginLayout:function(b){var a=this;a.callParent(arguments);if(a.owner.table.dom){b.tableContext=b.getEl(a.owner.table);b.headerContext=b.context.getCmp(a.headerCt)}},calculate:function(b){var a=this;a.callParent(arguments);if(b.tableContext){if(b.state.columnWidthsSynced){if(b.hasProp("columnWidthsFlushed")){b.tableContext.setHeight(b.tableContext.el.dom.offsetHeight,false)}else{a.done=false}}else{if(b.headerContext.hasProp("columnWidthsDone")){b.context.queueFlush(a);b.state.columnWidthsSynced=true}a.done=false}}},measureContentHeight:function(a){if(!a.headerContext||a.hasProp("columnWidthsFlushed")){return this.callParent(arguments)}},flush:function(){var j=this,e=j.ownerContext.context,d=j.headerCt.getGridColumns(),c=0,b=d.length,h=j.owner.el,a=0,g;e.currentLayout=j;for(c=0;c<b;c++){g=d[c].hidden?0:e.getCmp(d[c]).props.width;a+=g;h.select(j.getColumnSelector(d[c])).setWidth(g)}h.select("table."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(a);j.ownerContext.setProp("columnWidthsFlushed",true)},finishedLayout:function(){var a=this,b;a.callParent(arguments);if(Ext.isGecko){b=a.headerCt.getGridColumns()[0];if(b){b=a.owner.el.down(a.getColumnSelector(b));if(b){b.setStyle("display","none");b.dom.scrollWidth;b.setStyle("display","")}}}},getColumnSelector:function(a){return"th."+Ext.baseCSSPrefix+"grid-col-resizer-"+a.id}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableLayout","Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],componentLayout:"tableview",baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",rowSelector:"tr."+Ext.baseCSSPrefix+"grid-row",firstCls:Ext.baseCSSPrefix+"grid-cell-first",lastCls:Ext.baseCSSPrefix+"grid-cell-last",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:new RegExp("(?:^|\\s*)"+Ext.baseCSSPrefix+"grid-row-(first|last|alt)(?:\\s+|$)","g"),cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,initialTpl:"<div></div>",initComponent:function(){var b=this,a=b.scroll;b.table=new Ext.dom.Element.Fly();b.table.id=b.id+"gridTable";b.autoScroll=undefined;if(a===true||a==="both"){b.autoScroll=true}else{if(a==="horizontal"){b.overflowX="auto"}else{if(a==="vertical"){b.overflowY="auto"}}}b.selModel.view=b;b.headerCt.view=b;b.headerCt.markDirty=b.markDirty;b.initFeatures(b.grid);delete b.grid;b.tpl=b.getTpl("initialTpl");b.callParent()},moveColumn:function(a,p,d){var n=this,l=(d>1)?document.createDocumentFragment():undefined,c=p,q=n.getGridColumns().length,o=q-1,b=(n.firstCls||n.lastCls)&&(p===0||p==q||a===0||a==o),g,e,r,k,m,h;if(n.rendered){h=n.el.query(n.headerRowSelector);r=n.el.query(n.rowSelector);if(p>a&&l){c-=d}for(g=0,k=h.length;g<k;++g){m=h[g];if(l){for(e=0;e<d;e++){l.appendChild(m.cells[a])}m.insertBefore(l,m.cells[c]||null)}else{m.insertBefore(m.cells[a],m.cells[c]||null)}}for(g=0,k=r.length;g<k;g++){m=r[g];if(b){if(a===0){Ext.fly(m.cells[0]).removeCls(n.firstCls);Ext.fly(m.cells[1]).addCls(n.firstCls)}else{if(a===o){Ext.fly(m.cells[o]).removeCls(n.lastCls);Ext.fly(m.cells[o-1]).addCls(n.lastCls)}}if(p===0){Ext.fly(m.cells[0]).removeCls(n.firstCls);Ext.fly(m.cells[a]).addCls(n.firstCls)}else{if(p===q){Ext.fly(m.cells[o]).removeCls(n.lastCls);Ext.fly(m.cells[a]).addCls(n.lastCls)}}}if(l){for(e=0;e<d;e++){l.appendChild(m.cells[a])}m.insertBefore(l,m.cells[c]||null)}else{m.insertBefore(m.cells[a],m.cells[c]||null)}}n.setNewTemplate()}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(d){var g=this,c,e,b,a;g.featuresMC=new Ext.util.MixedCollection();e=g.features=g.constructFeatures();a=e?e.length:0;for(c=0;c<a;c++){b=e[c];b.view=g;b.grid=d;g.featuresMC.add(b);b.init()}},constructFeatures:function(){var g=this,e=g.features,d,b,c=0,a;if(e){b=[];a=e.length;for(;c<a;c++){d=e[c];if(!d.isFeature){d=Ext.create("feature."+d.ftype,d)}b[c]=d}}return b},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();if(!a.enableTextSelection){a.el.unselectable()}a.attachEventsForFeatures()},onViewScroll:function(b,a){this.callParent(arguments);this.fireEvent("bodyscroll",b,a)},prepareData:function(b,h,d){var g=this,k=g.headerCt.prepareData(b,h,d,g,g.ownerCt),a=g.features,e=a.length,c=0,j;for(;c<e;c++){j=a[c];if(j.isFeature){Ext.apply(k,j.getAdditionalData(b,h,d,k,g))}}return k},collectData:function(d,q){var n=this,s=n.callParent(arguments),c=n.headerCt,p=c.getFullWidth(),b=n.features,l=b.length,a={rows:s,fullWidth:p},h=0,t,g=0,m,k,e,r;m=s.length;if(n.getRowClass){for(;g<m;g++){k={};e=s[g];r=e.rowCls||"";e.rowCls=this.getRowClass(d[g],g,k,n.store)+" "+r}}for(;h<l;h++){t=b[h];if(t.isFeature&&t.collectData&&!t.disabled){a=t.collectData(d,s,q,p,a);break}}return a},refreshSize:function(){var b=this,a;b.table.attach(b.el.child("table",true));if(!b.hasLoadingHeight){a=b.up("tablepanel");Ext.suspendLayouts();b.callParent();if(a&&Ext.getScrollbarSize().width&&(b.autoScroll||b.overflowY)){a.updateLayout()}Ext.resumeLayouts(true)}},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({rowCount:b.store.getCount(),columns:a,features:b.features,enableTextSelection:b.enableTextSelection})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b,true);if(a){Ext.fly(a).addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b,true);if(a){Ext.fly(a).removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(a,b){if(a){var c=this.getNode(a.row),d=this.headerCt.getHeaderAtIndex(a.column);if(d&&c){return Ext.fly(c).down(d.getCellSelector(),b)}}return false},onRowFocus:function(d,b,a){var c=this;if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var g=this,k=g.getNode(b),c=g.el,i=0,a=g.ownerCt,j,h,e,d;if(k&&c){h=c.getY();e=h+c.dom.clientHeight;j=Ext.fly(k).getRegion();if(j.top<h){i=j.top-h}else{if(j.bottom>e){i=j.bottom-e}}d=g.getRecord(k);b=g.store.indexOf(d);if(i){a.scrollByDeltaY(i)}g.fireEvent("rowfocus",d,k,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;c.bottom=c.top+b.dom.clientHeight;c.right=c.left+b.dom.clientWidth;if(k){i=k.getRegion();if(i.top<c.top){d=i.top-c.top}else{if(i.bottom>c.bottom){d=i.bottom-c.bottom}}if(i.left<c.left){e=i.left-c.left}else{if(i.right>c.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(g,e,k,p){var v=this,j,d,l,s,r,u,q,b,c,w,t,r,a,n,m,h,o=v.editingPlugin&&v.editingPlugin.editing;if(v.viewReady){j=v.store.indexOf(e);a=v.headerCt.getGridColumns();n=v.overItemCls;if(a.length&&j>-1){d=v.bufferRender([e],j)[0];q=v.all.item(j);if(q){b=q.dom;m=q.hasCls(n);if(b.mergeAttributes){b.mergeAttributes(d,true)}else{l=d.attributes;s=l.length;for(r=0;r<s;r++){u=l[r].name;if(u!=="id"){b.setAttribute(u,l[r].value)}}}if(m){q.addCls(n)}c=q.query(v.cellSelector);w=Ext.fly(d).query(v.cellSelector);t=w.length;h=c[0].parentNode;for(r=0;r<t;r++){if(v.shouldUpdateCell(a[r],p)){if(o){Ext.fly(c[r]).syncContent(w[r])}else{h.insertBefore(w[r],c[r]);h.removeChild(c[r])}}}}v.fireEvent("itemupdate",e,j,d)}}},shouldUpdateCell:function(b,a){if(b.hasCustomRenderer){return true}return !a||Ext.Array.contains(a,b.dataIndex)},refresh:function(){var a=this;a.setNewTemplate();a.callParent(arguments);a.doStripeRows(0);a.headerCt.setSortState()},clearViewEl:function(){this.callParent();delete this.table.dom},processItemEvent:function(b,m,j,d){var h=this,k=d.getTarget(h.cellSelector,m),i=k?k.cellIndex:-1,a=h.statics().EventMap,c=h.getSelectionModel(),g=d.type,l;if(g=="keydown"&&!k&&c.getCurrentPosition){k=h.getCellByPosition(c.getCurrentPosition());if(k){k=k.dom;i=k.cellIndex}}l=h.fireEvent("uievent",g,h,k,j,i,d,b,m);if(l===false||h.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}if(!k){return true}return !((h["onBeforeCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("beforecell"+g,h,k,i,b,m,j,d)===false)||(h["onCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("cell"+g,h,k,i,b,m,j,d)===false))},processSpecialEvent:function(k){var n=this,b=n.statics().EventMap,d=n.features,m=d.length,o=k.type,g,p,h,j,c,l,a=n.ownerCt;n.callParent(arguments);if(o=="mouseover"||o=="mouseout"){return}for(g=0;g<m;g++){p=d[g];if(p.hasFeatureEvent){j=k.getTarget(p.eventSelector,n.getTargetEl());if(j){h=p.eventPrefix;c=p.getFireEventArgs("before"+h+o,n,j,k);l=p.getFireEventArgs(h+o,n,j,k);if((n.fireEvent.apply(n,c)===false)||(a.fireEvent.apply(a,c)===false)||(n.fireEvent.apply(n,l)===false)||(a.fireEvent.apply(a,l)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(h){var a=h.getCellInnerSelector(),c=this.el.query(a),d=0,g=c.length,e=h.el.dom.scrollWidth,b;for(;d<g;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,o){if(!l){return}var j=this,p=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:p,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||p===k-1){return false}if(!h.ctrlKey){i.row=p+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||p===0){return false}if(!h.ctrlKey){i.row=p-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(p===0){return false}else{if(!h.ctrlKey){i.row=p-1}else{i.row=0}}break;case"down":if(p===k-1){return false}else{if(!h.ctrlKey){i.row=p+1}else{i.row=k-1}}break}if(a&&a.call(o||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var a=this.getHeaderCt().getVisibleGridColumns()[0];return a?a.getIndex():-1},getLastVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns(),a=b[b.length-1];return a.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},doStripeRows:function(b,a){var d=this,e,h,c,g;if(d.rendered&&d.stripeRows){e=d.getNodes(b,a);for(c=0,h=e.length;c<h;c++){g=e[c];g.className=g.className.replace(d.rowClsRe," ");b++;if(b%2===0){g.className+=(" "+d.altRowCls)}}}}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView","Ext.view.Table"],syncRowHeight:true,headerCounter:0,scrollDelta:40,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,g,d,b,e,a;if(c.subGridXType){g=c.subGridXType}else{d=this.getXTypes().split("/");b=d.length;e=d[b-1];a=d[b-2];if(a!=="tablepanel"){g=a}else{g=e}}return g},injectLockable:function(){this.lockable=true;this.hasView=true;var t=this,b=Ext.getScrollbarSize().width===0,d=t.store=Ext.StoreManager.lookup(t.store),c=t.determineXTypeToCreate(),j=t.getSelectionModel(),l,p,q,o,s,h,m,n,a,e,r,g,u,k;l=t.constructFeatures();t.cloneFeatures();p=t.constructFeatures();q=t.constructPlugins();t.clonePlugins();o=t.constructPlugins();delete t.features;delete t.plugins;for(m=0,n=(l?l.length:0);m<n;m++){l[m].lockingPartner=p[m];p[m].lockingPartner=l[m]}s=Ext.apply({xtype:c,store:d,scrollerOwner:false,enableAnimations:false,scroll:b?"vertical":false,selModel:j,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked",isLayoutRoot:function(){return false},features:l,plugins:q},t.lockedGridConfig);h=Ext.apply({xtype:c,store:d,scrollerOwner:false,enableAnimations:false,selModel:j,border:false,isLayoutRoot:function(){return false},features:p,plugins:o},t.normalGridConfig);t.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(h,t,t.bothCfgCopy);Ext.copyTo(s,t,t.bothCfgCopy);Ext.copyTo(h,t,t.normalCfgCopy);Ext.copyTo(s,t,t.lockedCfgCopy);for(m=0;m<t.normalCfgCopy.length;m++){delete t[t.normalCfgCopy[m]]}for(m=0;m<t.lockedCfgCopy.length;m++){delete t[t.lockedCfgCopy[m]]}t.addEvents("lockcolumn","unlockcolumn");t.addStateEvents(["lockcolumn","unlockcolumn"]);t.lockedHeights=[];t.normalHeights=[];a=t.processColumns(t.columns);s.width=a.lockedWidth+Ext.num(j.headerWidth,0);s.columns=a.locked;h.columns=a.normal;h.flex=1;s.viewConfig=t.lockedViewConfig||{};s.viewConfig.loadingUseMsg=false;h.viewConfig=t.normalViewConfig||{};Ext.applyIf(s.viewConfig,t.viewConfig);Ext.applyIf(h.viewConfig,t.viewConfig);t.lockedGrid=Ext.ComponentManager.create(s);g=t.lockedGrid.getView();h.viewConfig.lockingPartner=g;t.normalGrid=Ext.ComponentManager.create(h);u=t.normalGrid.getView();t.view=new Ext.grid.LockingView({locked:t.lockedGrid,normal:t.normalGrid,panel:t});k={scroll:{fn:t.onLockedViewScroll,element:"el",scope:t}};if(!b){k.mousewheel={fn:t.onLockedViewMouseWheel,element:"el",scope:t}}if(t.syncRowHeight){k.refresh=t.onLockedViewRefresh;k.itemupdate=t.onLockedViewItemUpdate;k.scope=t}g.on(k);k={scroll:{fn:t.onNormalViewScroll,element:"el",scope:t},refresh:t.syncRowHeight?t.onNormalViewRefresh:t.updateSpacer,scope:t};u.on(k);e=t.lockedGrid.headerCt;r=t.normalGrid.headerCt;e.lockedCt=true;e.lockableInjected=true;r.lockableInjected=true;e.on({columnshow:t.onLockedHeaderShow,columnhide:t.onLockedHeaderHide,columnmove:t.onLockedHeaderMove,sortchange:t.onLockedHeaderSortChange,columnresize:t.onLockedHeaderResize,scope:t});r.on({columnmove:t.onNormalHeaderMove,sortchange:t.onNormalHeaderSortChange,scope:t});t.modifyHeaderCt();t.items=[t.lockedGrid,t.normalGrid];t.relayHeaderCtEvents(e);t.relayHeaderCtEvents(r);t.layout={type:"hbox",align:"stretch"}},processColumns:function(g){var e=0,a=g.length,b=0,d=[],c=[],h;for(;e<a;++e){h=g[e];if(!h.isComponent){h=Ext.apply({},g[e])}h.processed=true;if(h.locked){if(!h.hidden){b+=h.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(h)}else{c.push(h)}if(!h.headerId){h.headerId=(h.initialConfig||h).id||("L"+(++this.headerCounter))}}return{lockedWidth:b,locked:{items:d,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:c,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(i){var d=this,h=-d.scrollDelta,a=h*i.getWheelDeltas().y,b=d.lockedGrid.getView().el.dom,c,g;if(b){c=b.scrollTop!==b.scrollHeight-b.clientHeight;g=b.scrollTop!==0}if((a<0&&g)||(a>0&&c)){i.stopEvent();d.scrolling=true;b.scrollTop+=a;d.normalGrid.getView().el.dom.scrollTop=b.scrollTop;d.scrolling=false;d.onNormalViewScroll()}},onLockedViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;c.el.dom.scrollTop=d.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute"}e.scrolling=false}},onNormalViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;d.el.dom.scrollTop=c.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute";b.style.top=a.style.top}e.scrolling=false}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},updateSpacer:function(){var d=this,b=d.lockedGrid.getView().el,c=d.normalGrid.getView().el.dom,a=b.dom.id+"-spacer",e=(c.offsetHeight-c.clientHeight)+"px";d.spacerEl=Ext.getDom(a);if(d.spacerEl){d.spacerEl.style.height=e}else{Ext.core.DomHelper.append(b,{id:a,style:"height: "+e})}},onLockedViewRefresh:function(){if(this.normalGrid.headerCt.getGridColumns().length){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=g[b].offsetHeight}e.syncRowHeights();e.updateSpacer()}},onNormalViewRefresh:function(){if(this.lockedGrid.headerCt.getGridColumns().length){var e=this,a=e.normalGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=g[b].offsetHeight}e.syncRowHeights();e.updateSpacer()}},onLockedViewItemUpdate:function(a,b,c){if(this.normalGrid.headerCt.getGridColumns().length){this.lockedHeights[b]=c.offsetHeight;this.syncRowHeights()}},onNormalViewItemUpdate:function(a,b,c){if(this.lockedGrid.headerCt.getGridColumns().length){this.normalHeights[b]=c.offsetHeight;this.syncRowHeights()}},syncRowHeights:function(){var j=this,a=j.lockedHeights,k=j.normalHeights,h=a.length,e=0,l,c,d,g,b;if(a.length&&k.length){l=j.lockedGrid.getView();c=j.normalGrid.getView();d=l.el.query(l.getItemSelector());g=c.el.query(c.getItemSelector());for(;e<h;e++){if(!isNaN(a[e])&&!isNaN(k[e])){if(a[e]>k[e]){Ext.fly(g[e]).setHeight(a[e])}else{if(a[e]<k[e]){Ext.fly(d[e]).setHeight(k[e])}}}}b=c.el.dom.scrollTop;c.el.dom.scrollTop=b;l.el.dom.scrollTop=b;j.lockedHeights=[];j.normalHeights=[]}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(a.lockedGrid.headerCt.getMenuItems,true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(a.normalGrid.headerCt.getMenuItems,false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(g,c){var h=this,i=h.unlockText,a=h.lockText,j=Ext.baseCSSPrefix+"hmenu-unlock",b=Ext.baseCSSPrefix+"hmenu-lock",e=Ext.Function.bind(h.onUnlockMenuClick,h),d=Ext.Function.bind(h.onLockMenuClick,h);return function(){var k=g.call(this);k.push("-",{cls:j,text:i,handler:e,disabled:!c});k.push({cls:b,text:a,handler:d,disabled:c});return k}},lock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;a=a||g.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}Ext.suspendLayouts();a.ownerCt.remove(a,false);a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}c.syncLockedSection();Ext.resumeLayouts(true);c.updateSpacer();c.fireEvent("lockcolumn",c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var c=this,a=c.lockedGrid,b=a.headerCt.getFullWidth(true);Ext.suspendLayouts();if(b>0){a.setWidth(b);a.show()}else{a.hide()}Ext.resumeLayouts(true);return b>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,e){var d=this,g=d.normalGrid,i=d.lockedGrid,h=g.headerCt,c=i.headerCt,b=false;if(!Ext.isDefined(e)){e=0}a=a||c.getMenu().activeHeader;Ext.suspendLayouts();a.ownerCt.remove(a,false);if(d.syncLockedWidth()){b=true}a.locked=false;h.insert(e,a);d.normalGrid.getView().refresh();if(b){d.lockedGrid.getView().refresh()}Ext.resumeLayouts(true);d.fireEvent("unlockcolumn",d,a)},applyColumnsState:function(h){var p=this,e=p.lockedGrid,g=e.headerCt,n=p.normalGrid.headerCt,q=Ext.Array.toMap(g.items,"headerId"),j=Ext.Array.toMap(n.items,"headerId"),m=[],o=[],l=1,b=h.length,k,a,d,c;for(k=0;k<b;k++){c=h[k];d=q[c.id];a=d||j[c.id];if(a){if(a.applyColumnState){a.applyColumnState(c)}if(a.locked===undefined){a.locked=!!d}if(a.locked){m.push(a);if(!a.hidden&&typeof a.width=="number"){l+=a.width}}else{o.push(a)}}}if(m.length+o.length==g.items.getCount()+n.items.getCount()){g.removeAll(false);n.removeAll(false);g.add(m);n.add(o);e.setWidth(l)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){Ext.suspendLayouts();e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked.items);d.headerCt.add(b.normal.items);Ext.resumeLayouts(true)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}},cloneFeatures:function(){var e=this,d=e.features,c,b=0,a;if(d){a=d.length;for(;b<a;b++){c=d[b];if(c.isFeature){d[b]=c.clone()}}}},clonePlugins:function(){var e=this,b=e.plugins,d,c=0,a;if(b){a=b.length;for(;c<a;c++){d=b[c];if(typeof d.init==="function"){b[c]=d.clone()}}}}},function(){this.borrow(Ext.view.Table,["constructFeatures"]);this.borrow(Ext.AbstractComponent,["constructPlugins","constructPlugin"])});Ext.define("Ext.grid.PagingScroller",{percentageFromEdge:0.35,numFromEdge:2,trailingBufferZone:5,leadingBufferZone:15,scrollToLoadBuffer:200,viewSize:0,rowHeight:21,tableStart:0,tableEnd:0,constructor:function(a){var b=this;b.variableRowHeight=a.variableRowHeight;b.bindView(a.view);Ext.apply(b,a);b.callParent(arguments)},bindView:function(b){var g=this,d={scroll:{fn:g.onViewScroll,element:"el",scope:g},render:g.onViewRender,resize:g.onViewResize,boxready:{fn:g.onViewResize,scope:g,single:true},beforerefresh:g.beforeViewRefresh,refresh:g.onViewRefresh,scope:g},a={guaranteedrange:g.onGuaranteedRange,scope:g},c={reconfigure:g.onGridReconfigure,scope:g},e;if(g.view){if(g.view.el){g.view.el.un("scroll",g.onViewScroll,g)}e=b.lockingPartner;if(e){e.un("refresh",g.onLockRefresh,g)}g.view.un(d);g.store.un(a);if(g.grid){g.grid.un(c)}delete g.view.refreshSize}g.view=b;g.grid=g.view.up("tablepanel");g.store=b.store;if(b.rendered){g.viewSize=g.store.viewSize=Math.ceil(b.getHeight()/g.rowHeight)+g.trailingBufferZone+(g.numFromEdge*2)+g.leadingBufferZone}e=b.lockingPartner;if(e){e.on("refresh",g.onLockRefresh,g)}g.view.mon(g.store.pageMap,{scope:g,clear:g.onCacheClear});g.view.refreshSize=Ext.Function.createInterceptor(g.view.refreshSize,g.beforeViewrefreshSize,g);g.position=0;if(g.grid){g.grid.on(c)}else{g.view.on({added:function(){g.grid=g.view.up("tablepanel");g.grid.on(c)},single:true})}g.view.on(g.viewListeners=d);g.store.on(a)},onCacheClear:function(){var a=this;if(a.view.rendered&&!a.store.isDestroyed){a.ignoreNextScrollEvent=a.view.el.dom.scrollTop!==0;a.view.el.dom.scrollTop=0;delete a.lastScrollDirection;delete a.scrollOffset;delete a.scrollProportion}},onGridReconfigure:function(a){this.bindView(a.view)},onViewRender:function(){var d=this,a=d.view,c=d.view.el,b;d.stretcher=d.createStretcher(a);a=a.lockingPartner;if(a){b=d.stretcher;d.stretcher=new Ext.CompositeElement(b);d.stretcher.add(d.createStretcher(a))}},createStretcher:function(a){var b=a.el;b.setStyle("position","relative");return b.createChild({style:{position:"absolute",width:"1px",height:0,top:0,left:0}},b.dom.firstChild)},onViewResize:function(b,d,a){var e=this,c;c=Math.ceil(a/e.rowHeight)+e.trailingBufferZone+(e.numFromEdge*2)+e.leadingBufferZone;if(c>e.viewSize){e.viewSize=e.store.viewSize=c;e.handleViewScroll(e.lastScrollDirection||1)}},beforeViewRefresh:function(){var b=this,a=b.view,c,d;b.focusOnRefresh=Ext.Element.getActiveElement===a.el.dom;if(b.variableRowHeight){d=b.lastScrollDirection;b.commonRecordIndex=undefined;if(d&&(b.previousStart!==undefined)&&(b.scrollProportion===undefined)&&(c=a.getNodes()).length){if(d===1){if(b.tableStart<=b.previousEnd){b.commonRecordIndex=c.length-1}}else{if(d===-1){if(b.tableEnd>=b.previousStart){b.commonRecordIndex=0}}}b.scrollOffset=-a.el.getOffsetsTo(c[b.commonRecordIndex])[1];b.commonRecordIndex-=(b.tableStart-b.previousStart)}else{b.scrollOffset=undefined}}},onLockRefresh:function(a){a.table.dom.style.position="absolute"},onViewRefresh:function(){var d=this,g=d.store,c,e=d.view,j=e.el,k=j.dom,m,i,b,l=e.table.dom,h,a;if(d.focusOnRefresh){j.focus();d.focusOnRefresh=false}d.disabled=true;if(g.getCount()===g.getTotalCount()||(g.isFiltered()&&!g.remoteFilter)){d.stretcher.setHeight(0);d.position=k.scrollTop=0;d.setTablePosition("absolute");return}d.stretcher.setHeight(c=d.getScrollHeight());a=k.scrollTop;d.isScrollRefresh=(a>0);if(d.scrollProportion!==undefined){d.setTablePosition("absolute");d.setTableTop((d.scrollProportion?(c*d.scrollProportion)-(l.offsetHeight*d.scrollProportion):0)+"px")}else{d.setTablePosition("absolute");d.setTableTop((h=(d.tableStart||0)*d.rowHeight)+"px");if(d.scrollOffset){m=e.getNodes();i=-j.getOffsetsTo(m[d.commonRecordIndex])[1];b=i-d.scrollOffset;d.position=(k.scrollTop+=b)}else{if((h>a)||((h+l.offsetHeight)<a+k.clientHeight)){d.lastScrollDirection=-1;d.position=k.scrollTop=h}}}d.disabled=false},setTablePosition:function(a){this.setViewTableStyle(this.view,"position",a)},setTableTop:function(a){this.setViewTableStyle(this.view,"top",a)},setViewTableStyle:function(a,c,b){a.el.child("table",true).style[c]=b;a=a.lockingPartner;if(a){a.el.child("table",true).style[c]=b}},beforeViewrefreshSize:function(){if(this.isScrollRefresh){this.view.table.attach(this.view.el.child("table",true));return(this.isScrollRefresh=false)}},onGuaranteedRange:function(b,e,a){var c=this,d=c.store;if(b.length&&c.visibleStart<b[0].index){return}c.previousStart=c.tableStart;c.previousEnd=c.tableEnd;c.tableStart=e;c.tableEnd=a;d.loadRecords(b,{start:e})},onViewScroll:function(g,c){var d=this,a=d.view,b=d.position;d.position=a.el.dom.scrollTop;if(d.ignoreNextScrollEvent){d.ignoreNextScrollEvent=false;return}if(!d.disabled){d.lastScrollDirection=d.position>b?1:-1;if(b!==d.position){d.handleViewScroll(d.lastScrollDirection)}}},handleViewScroll:function(i){var e=this,k=e.store,h=e.view,g=e.viewSize,l=k.getTotalCount(),d=l-g,c=e.getFirstVisibleRowIndex(),j=e.getLastVisibleRowIndex(),a=h.el.dom,b,m;if(l>=g){e.scrollProportion=undefined;if(i==-1){if(e.tableStart){if(c!==undefined){if(c<(e.tableStart+e.numFromEdge)){b=Math.max(0,j+e.trailingBufferZone-g)}}else{e.scrollProportion=a.scrollTop/(a.scrollHeight-a.clientHeight);b=Math.max(0,l*e.scrollProportion-(g/2)-e.numFromEdge-((e.leadingBufferZone+e.trailingBufferZone)/2))}}}else{if(c!==undefined){if(j>(e.tableEnd-e.numFromEdge)){b=Math.max(0,c-e.trailingBufferZone)}}else{e.scrollProportion=a.scrollTop/(a.scrollHeight-a.clientHeight);b=l*e.scrollProportion-(g/2)-e.numFromEdge-((e.leadingBufferZone+e.trailingBufferZone)/2)}}if(b!==undefined){if(b>d){b=d&~1;m=l-1}else{b=b&~1;m=b+g-1}if(k.rangeCached(b,m)){e.cancelLoad();k.guaranteeRange(b,m)}else{e.attemptLoad(b,m)}}}},getFirstVisibleRowIndex:function(){var d=this,a=d.view,h=a.el.dom.scrollTop,e,c,b,g;if(d.variableRowHeight){e=a.getNodes();c=e.length;if(!c){return}g=Ext.fly(e[0]).getOffsetsTo(a.el)[1];for(b=0;b<c;b++){g+=e[b].offsetHeight;if(g>a.el.dom.clientHeight){return}if(g>0){return a.getRecord(e[b]).index}}}else{return Math.floor(h/d.rowHeight)}},getLastVisibleRowIndex:function(){var h=this,c=h.store,a=h.view,b=a.el.dom.clientHeight,j,g,e,d;if(h.variableRowHeight){j=a.getNodes();if(!j.length){return}g=c.getCount()-1;d=Ext.fly(j[g]).getOffsetsTo(a.el)[1]+j[g].offsetHeight;for(e=g;e>=0;e--){d-=j[e].offsetHeight;if(d<0){return}if(d<b){return a.getRecord(j[e]).index}}}else{return h.getFirstVisibleRowIndex()+Math.ceil(b/h.rowHeight)+1}},getScrollHeight:function(){var e=this,a=e.view,d,h,b=e.store,g=0,c=!e.hasOwnProperty("rowHeight");if(e.variableRowHeight){d=e.view.table.dom;if(c){e.initialTableHeight=d.offsetHeight;e.rowHeight=e.initialTableHeight/e.store.getCount()}else{g=d.offsetHeight-e.initialTableHeight;if(b.getCount()>e.viewSize){g-=e.rowHeight}}}else{if(c){h=a.el.down(a.getItemSelector());if(h){e.rowHeight=h.getHeight(false,true)}}}return Math.floor(b.getTotalCount()*e.rowHeight)+g},attemptLoad:function(c,a){var b=this;if(b.scrollToLoadBuffer){if(!b.loadTask){b.loadTask=new Ext.util.DelayedTask(b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])}else{b.store.guaranteeRange(c,a)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(b,a){this.store.guaranteeRange(b,a)},destroy:function(){var b=this,a=b.viewListeners.scroll;b.store.un({guaranteedrange:b.onGuaranteedRange,scope:b});b.view.un(b.viewListeners);if(b.view.rendered){b.stretcher.remove();b.view.el.un("scroll",a.fn,a.scope)}}});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(b,c){var a=c||this.owner.getSizeModel(),d=(a.width.shrinkWrap?0:1)|(a.height.shrinkWrap?0:2);return this.sizePolicies[d]},beginLayoutCycle:function(k,g){var t=this,u=t.lastHeightModel&&t.lastHeightModel.calculated,h=t.lastWidthModel&&t.lastWidthModel.calculated,o=h||u,l=0,m=0,s,b,p,r,e,a,j,n,q,d;t.callParent(arguments);if(o&&k.targetContext.el.dom.tagName.toUpperCase()!="TD"){o=h=u=false}b=k.childItems;e=b.length;for(p=0;p<e;++p){r=b[p];if(g){s=r.target;j=s.minHeight;n=s.minWidth;if(n||j){a=r.marginInfo||r.getMarginInfo();j+=a.height;n+=a.height;if(l<j){l=j}if(m<n){m=n}}}if(o){q=r.el.dom.style;if(u){q.height=""}if(h){q.width=""}}}if(g){k.maxChildMinHeight=l;k.maxChildMinWidth=m}s=k.target;k.overflowX=(!k.widthModel.shrinkWrap&&k.maxChildMinWidth&&(s.autoScroll||s.overflowX))||d;k.overflowY=(!k.heightModel.shrinkWrap&&k.maxChildMinHeight&&(s.autoScroll||s.overflowY))||d},calculate:function(g){var o=this,l=g.childItems,d=l.length,c=o.getContainerSize(g),e={length:d,ownerContext:g,targetSize:c},r=g.widthModel.shrinkWrap,m=g.heightModel.shrinkWrap,k=g.overflowX,h=g.overflowY,n,b,p,j,a,q;if(k||h){n=o.getScrollbarsNeeded(k&&c.width,h&&c.height,g.maxChildMinWidth,g.maxChildMinHeight);if(n){b=Ext.getScrollbarSize();if(n&1){c.height-=b.height}if(n&2){c.width-=b.width}}}for(j=0;j<d;++j){e.index=j;o.fitItem(l[j],e)}if(m||r){p=g.targetContext.getPaddingInfo();if(r){if(h&&!c.gotHeight){o.done=false}else{a=e.contentWidth+p.width;if(n&2){a+=b.width}if(!g.setContentWidth(a)){o.done=false}}}if(m){if(k&&!c.gotWidth){o.done=false}else{q=e.contentHeight+p.height;if(n&1){q+=b.height}if(!g.setContentHeight(q)){o.done=false}}}}},fitItem:function(b,c){var a=this;if(b.invalid){a.done=false;return}c.margins=b.getMarginInfo();c.needed=c.got=0;a.fitItemWidth(b,c);a.fitItemHeight(b,c);if(c.got!=c.needed){a.done=false}},fitItemWidth:function(c,d){var a,b;if(d.ownerContext.widthModel.shrinkWrap){b=c.getProp("width")+d.margins.width;a=d.contentWidth;if(a===undefined){d.contentWidth=b}else{d.contentWidth=Math.max(a,b)}}else{if(c.widthModel.calculated){++d.needed;if(d.targetSize.gotWidth){++d.got;this.setItemWidth(c,d)}}}this.positionItemX(c,d)},fitItemHeight:function(c,d){var b,a;if(d.ownerContext.heightModel.shrinkWrap){a=c.getProp("height")+d.margins.height;b=d.contentHeight;if(b===undefined){d.contentHeight=a}else{d.contentHeight=Math.max(b,a)}}else{if(c.heightModel.calculated){++d.needed;if(d.targetSize.gotHeight){++d.got;this.setItemHeight(c,d)}}}this.positionItemY(c,d)},positionItemX:function(a,c){var b=c.margins;if(c.index||b.left){a.setProp("x",b.left)}if(b.width){a.setProp("margin-right",b.width)}},positionItemY:function(a,c){var b=c.margins;if(c.index||b.top){a.setProp("y",b.top)}if(b.height){a.setProp("margin-bottom",b.height)}},setItemHeight:function(a,b){a.setHeight(b.targetSize.height-b.margins.height)},setItemWidth:function(a,b){a.setWidth(b.targetSize.width-b.margins.width)}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.selection.CellModel","Ext.selection.CheckboxModel","Ext.grid.PagingScroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,sealedColumns:false,enableColumnResize:true,enableColumnHide:true,rowLines:true,initComponent:function(){var h=this,k=h.scroll,b=false,a=false,g=h.columns||h.colModel,j,c=h.border,d,e;if(h.columnLines){h.addCls(Ext.baseCSSPrefix+"grid-with-col-lines")}if(h.rowLines){h.addCls(Ext.baseCSSPrefix+"grid-with-row-lines")}h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");if(g instanceof Ext.grid.header.Container){h.headerCt=g;h.headerCt.border=c;h.columns=h.headerCt.items.items}else{if(Ext.isArray(g)){g={items:g,border:c}}Ext.apply(g,{forceFit:h.forceFit,sortable:h.sortableColumns,enableColumnMove:h.enableColumnMove,enableColumnResize:h.enableColumnResize,enableColumnHide:h.enableColumnHide,border:c,sealed:h.sealedColumns});h.columns=g.items;if(h.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",h.columns).length){h.self.mixin("lockable",Ext.grid.Lockable);h.injectLockable()}}h.scrollTask=new Ext.util.DelayedTask(h.syncHorizontalScroll,h);h.addEvents("reconfigure","viewready");h.bodyCls=h.bodyCls||"";h.bodyCls+=(" "+h.extraBodyCls);h.cls=h.cls||"";h.cls+=(" "+h.extraBaseCls);delete h.autoScroll;if(!h.hasView){if(!h.headerCt){h.headerCt=new Ext.grid.header.Container(g)}h.columns=h.headerCt.items.items;if(h.store.buffered&&!h.store.remoteSort){for(d=0,e=h.columns.length;d<e;d++){h.columns[d].sortable=false}}if(h.hideHeaders){h.headerCt.height=0;h.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");h.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){h.headerCt.style={display:"none"}}}if(k===true||k==="both"){b=a=true}else{if(k==="horizontal"){a=true}else{if(k==="vertical"){b=true}}}h.relayHeaderCtEvents(h.headerCt);h.features=h.features||[];if(!Ext.isArray(h.features)){h.features=[h.features]}h.dockedItems=[].concat(h.dockedItems||[]);h.dockedItems.unshift(h.headerCt);h.viewConfig=h.viewConfig||{};if(h.store&&h.store.buffered){h.viewConfig.preserveScrollOnRefresh=true}else{if(h.invalidateScrollerOnRefresh!==undefined){h.viewConfig.preserveScrollOnRefresh=!h.invalidateScrollerOnRefresh}}j=h.getView();h.items=[j];h.hasView=true;if(b){if(h.store.buffered){h.verticalScroller=new Ext.grid.PagingScroller(Ext.apply({panel:h,store:h.store,view:h.view},h.verticalScroller))}}if(a){if(!h.hideHeaders){j.on({scroll:{fn:h.onHorizontalScroll,element:"el",scope:h}})}}h.mon(j.store,{load:h.onStoreLoad,scope:h});h.mon(j,{viewready:h.onViewReady,refresh:h.onRestoreHorzScroll,scope:h})}this.relayEvents(h.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);h.callParent(arguments);h.addStateEvents(["columnresize","columnmove","columnhide","columnshow","sortchange"]);if(h.headerCt){h.headerCt.on("afterlayout",h.onRestoreHorzScroll,h)}},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b=a.addPropertyToState(b,"columns",(a.headerCt||a).getColumnsState());if(c){b=a.addPropertyToState(b,"sort",{property:c.property,direction:c.direction,root:c.root})}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sort({property:e.property,direction:e.direction,root:e.root},null,false)}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=Ext.widget(Ext.apply({},a.viewConfig,{grid:a,deferInitialRefresh:a.deferRowRender!==false,scroll:a.scroll,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a,emptyText:a.emptyText?'<div class="'+Ext.baseCSSPrefix+'grid-empty">'+a.emptyText+"</div>":""}));a.view.getComponentLayout().headerCt=a.headerCt;a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){},invalidateScroller:function(){},scrollByDeltaY:function(b,a){this.getView().scrollBy(0,b,a)},scrollByDeltaX:function(b,a){this.getView().scrollBy(b,0,a)},afterCollapse:function(){var a=this;a.saveScrollPos();a.saveScrollPos();a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);a.restoreScrollPos();a.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(e,g,a,b,d){var c=this;if(c.optimizedColumnMove===false){c.view.refresh()}else{c.view.moveColumn(b,d,a)}c.delayScroll()},onHeaderHide:function(a,b){this.delayScroll()},onHeaderShow:function(a,b){this.delayScroll()},delayScroll:function(){var a=this.getScrollTarget().el;if(a){this.scrollTask.delay(10,null,null,[a.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var a=this.scrollLeftPos;if(a){this.syncHorizontalScroll(a,true)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},getLhsMarker:function(){var a=this;return a.lhsMarker||(a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var a=this;return a.rhsMarker||(a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},getScrollTarget:function(){var a=this.getScrollerOwner(),b=a.query("tableview");return b[1]||b[0]},onHorizontalScroll:function(a,b){this.syncHorizontalScroll(b.scrollLeft)},syncHorizontalScroll:function(d,b){var c=this,a;b=b===true;if(c.rendered&&(b||d!==c.scrollLeftPos)){if(b){a=c.getScrollTarget();a.el.dom.scrollLeft=d}c.headerCt.el.dom.scrollLeft=d;c.scrollLeftPos=d}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{Ext.suspendLayouts();if(b){delete c.scrollLeftPos;d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}d.setSortState();Ext.resumeLayouts(true)}c.fireEvent("reconfigure",c,a,b)}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=new Ext.util.HashMap();b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}b.mon(Ext.container.Container.hierarchyEventSource,{scope:b,show:b.repositionIfVisible});a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}c.updateButton(a);c.isValid=a},updateButton:function(b){var a=this.floatingButtons;if(a){a.child("#update").setDisabled(!b)}},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=new Ext.util.KeyNav(b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,itemremove:b.onViewItemRemove,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onViewItemRemove:function(a,b){var c=this.context;if(c&&a===c.record){this.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){if(!a.isGroupHeader){this.setField(a)}},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){if(!b.isGroupHeader){b.getEditor().setWidth(a-2);this.repositionIfVisible()}},onColumnHide:function(a){if(!a.isGroupHeader){a.getEditor().hide();this.repositionIfVisible()}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();this.repositionIfVisible()},onColumnMove:function(b,a,c){if(!b.isGroupHeader){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}}},onFieldAdd:function(e,a,b){var c=this,g,d;if(!b.isGroupHeader){g=c.editingPlugin.grid.headerCt.getHeaderIndex(b);d=b.getEditor({xtype:"displayfield"});c.insert(g,d)}},onFieldRemove:function(g,a,b){var c=this,e,d;if(!b.isGroupHeader){e=b.getEditor();d=e.el;c.remove(e,false);if(d){d.remove()}}},onFieldReplace:function(d,a,c,b){this.onFieldRemove(d,a,b)},clearFields:function(){var b=this.columns,a;for(a in b){if(b.hasOwnProperty(a)){b.removeAtKey(a)}}},getFloatingButtons:function(){var e=this,g=Ext.baseCSSPrefix,d=g+"grid-row-editor-buttons",c=e.editingPlugin,a=Ext.panel.Panel.prototype.minButtonWidth,b;if(!e.floatingButtons){b=e.floatingButtons=new Ext.Container({renderTpl:['<div class="{baseCls}-ml"></div>','<div class="{baseCls}-mr"></div>','<div class="{baseCls}-bl"></div>','<div class="{baseCls}-br"></div>','<div class="{baseCls}-bc"></div>',"{%this.renderContainer(out,values)%}"],width:200,renderTo:e.el,baseCls:d,layout:{type:"hbox",align:"middle"},defaults:{flex:1,margins:"0 1 0 1"},items:[{itemId:"update",xtype:"button",handler:c.completeEdit,scope:c,text:e.saveBtnText,minWidth:a},{xtype:"button",handler:c.cancelEdit,scope:c,text:e.cancelBtnText,minWidth:a}]});e.mon(b.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return e.floatingButtons},repositionIfVisible:function(d){var b=this,a=b.view;if(d&&(d==b||!a.isDescendantOf(d))){return}if(b.isVisible()&&a.isVisible(true)){b.reposition()}},reposition:function(r){var s=this,c=s.context,e=c&&Ext.get(c.row),p=s.getFloatingButtons(),q=p.el,a=s.editingPlugin.grid,g=a.view.el,o=a.headerCt.getFullWidth(),t=a.getWidth(),l=Math.min(o,t),n=a.view.el.dom.scrollLeft,i=p.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){q.scrollIntoView(g,false);if(r&&r.callback){r.callback.call(r.scope||s)}},b;if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+(s.editingPlugin.grid.rowLines?9:10);if(s.getHeight()!=m){s.setHeight(m);s.el.setLeft(0)}if(r){b={to:{y:j},duration:r.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5}}};s.el.animate(b)}else{s.el.setY(j);k()}}if(s.getWidth()!=o){s.setWidth(o)}q.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a.isHeader&&!a.isGroupHeader){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeAtKey(b.id);Ext.destroy(b)},setField:function(b){var d=this,a,c,e;if(Ext.isArray(b)){c=b.length;for(a=0;a<c;a++){d.setField(b[a])}return}e=b.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});e.margins="0 0 0 2";d.mon(e,"change",d.onFieldChange,d);if(d.isVisible()&&d.context){if(e.is("displayfield")){d.renderColumnData(e,d.context.record,b)}else{e.suspendEvents();e.setValue(d.context.record.get(b.dataIndex));e.resumeEvents()}}d.columns.add(e.id,b);if(b.hidden){d.onColumnHide(b)}else{if(b.rendered){d.onColumnShow(b)}}},loadRecord:function(d){var j=this,a=j.getForm(),e=a.getFields(),h=e.items,b=h.length,c,g,k;for(c=0;c<b;c++){h[c].suspendEvents()}a.loadRecord(d);for(c=0;c<b;c++){h[c].resumeEvents()}k=a.isValid();if(j.errorSummary){if(k){j.hideToolTip()}else{j.showToolTip()}}j.updateButton(k);g=j.query(">displayfield");b=g.length;for(c=0;c<b;c++){j.renderColumnData(g[c],d)}},renderColumnData:function(m,i,c){var k=this,a=k.editingPlugin.grid,e=a.headerCt,l=a.view,o=l.store,g=c||k.columns.get(m.id),n=i.get(g.dataIndex),j=g.editRenderer||g.renderer,b,d,h;if(j){b={tdCls:"",style:""};d=o.indexOf(i);h=e.getHeaderIndex(g);n=j.call(g.scope||e.ownerCt,n,b,i,d,h,o,l)}m.setRawValue(n);m.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&a.errorSummary&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(a,g){var e=this,d=e.editingPlugin.grid,b=d.store,c=e.context=Ext.apply(e.editingPlugin.context,{view:d.getView(),store:b});c.grid.getSelectionModel().select(a);e.loadRecord(a);if(!e.isVisible()){e.show();e.focusContextCell()}else{e.reposition({callback:this.focusContextCell})}},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var g=this,e=g.getForm(),a=e.getFields(),b=a.items,d=b.length,c;g.hide();e.clearInvalid();for(c=0;c<d;c++){b[c].suspendEvents()}e.reset();for(c=0;c<d;c++){b[c].resumeEvents()}},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){this.callParent(arguments);this.reposition()},onHide:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.hideToolTip()}if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){return this.tooltip||(this.tooltip=new Ext.tip.ToolTip({cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:this.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left"}))},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var c=this,d=c.getToolTip(),a=c.context,e=Ext.get(a.row),b=a.grid.view.el;d.setTarget(e);d.showAt([-10000,-10000]);d.update(c.getErrors());d.mouseOffset=[b.getWidth()-e.getWidth()+c.lastScrollLeft+15,0];c.repositionTip();d.doLayout();d.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.show();i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var d=this,e=!d.autoCancel&&d.isDirty()?d.dirtyText+"<br />":"",h=[],a=d.query(">[isFormField]"),c=a.length,b;function g(i){return"<li>"+i+"</li>"}for(b=0;b<c;b++){h=h.concat(Ext.Array.map(a[b].getErrors(),g))}return e+"<ul>"+h.join("")+"</ul>"},beforeDestroy:function(){Ext.destroy(this.floatingButtons,this.tooltip);this.callParent()}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.AbstractPlugin",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(b,k){var d=this,a,i,j,g,c,h;if(d.headerCt.dragging){if(d.activeHd){d.activeHd.el.dom.style.cursor="";delete d.activeHd}}else{i=b.getTarget("."+d.colHeaderCls,3,true);if(i){j=Ext.getCmp(i.id);if(j.isOnLeftEdge(b)){g=j.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(g){h=d.headerCt.up("tablepanel");c=g.up("tablepanel");if(!((c===h)||((h.ownerCt.isXType("tablepanel"))&&h.ownerCt.view.lockedGrid===c))){g=null}}}else{if(j.isOnRightEdge(b)){g=j}else{g=null}}if(g){if(g.isGroupHeader){a=g.getGridColumns();g=a[a.length-1]}if(g&&!(g.fixed||(g.resizable===false)||d.disabled)){d.activeHd=g;j.el.dom.style.cursor=d.eResizeCursor}}else{j.el.dom.style.cursor="";delete d.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var c=this,a=c.dragHd.el,d=Ext.util.Region.getRegion(a),b;if(c.headerCt.forceFit){b=c.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return d.adjust(0,c.headerCt.forceFit?(b?b.getWidth()-c.minColWidth:0):c.maxColWidth-a.getWidth(),0,c.minColWidth)},onStart:function(u){var v=this,h=v.dragHd,b=h.el,o=b.getWidth(),j=v.headerCt,l=u.getTarget(),d,r,g,k,c,n,a,i,s,q,p,m;if(v.dragHd&&!Ext.fly(l).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){j.dragging=true}v.origWidth=o;if(!v.dynamic){d=b.getXY();r=j.up("[scrollerOwner]");g=v.dragHd.up(":not([isGroupHeader])");k=g.up();c=r.getLhsMarker();n=r.getRhsMarker();a=n.parent();i=a.getLocalX();s=a.getLocalY();q=a.translatePoints(d);p=k.body.getHeight()+j.getHeight();m=q.top-s;c.setTop(m);n.setTop(m);c.setHeight(p);n.setHeight(p);c.setLeft(q.left-i);n.setLeft(q.left+o-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLocalX();i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(g){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var d=this.dragHd,b=this.headerCt.up("[scrollerOwner]"),c=b.getLhsMarker(),h=b.getRhsMarker(),a=-9999;c.setLeft(a);h.setLeft(a)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}Ext.suspendLayouts();b.setWidth(this.origWidth+c[0]);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a,c;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(v,o,u){var a=this.getLocation(u,o),q=a.header,g=a.pos,d=v.nextSibling("gridcolumn:not([hidden])"),t=v.previousSibling("gridcolumn:not([hidden])"),l,r,s,b,c,k,m,x,w,n,j,p,h;if(!q.draggable&&q.getIndex()===0){return false}this.lastLocation=a;if((v!==q)&&((g==="before"&&d!==q)||(g==="after"&&t!==q))&&!q.isDescendantOf(v)){n=Ext.dd.DragDropManager.getRelated(this);j=n.length;p=0;for(;p<j;p++){h=n[p];if(h!==this&&h.invalidateDrop){h.invalidateDrop()}}this.valid=true;l=this.getTopIndicator();r=this.getBottomIndicator();if(g==="before"){s="tl";b="bl"}else{s="tr";b="br"}c=q.el.getAnchorXY(s);k=q.el.getAnchorXY(b);m=this.headerCt.el;x=m.getLeft();w=m.getRight();c[0]=Ext.Number.constrain(c[0],x,w);k[0]=Ext.Number.constrain(k[0],x,w);c[0]-=4;c[1]-=9;k[0]-=4;l.setXY(c);r.setXY(k);l.show();r.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,h,g,c){var i=this,d=i.headerCt,a=true,k=c.header,j;if(c.header.el.dom===b){a=false}else{j=i.getLocation(g,b).header;a=(k.ownerCt===j.ownerCt)||(!k.ownerCt.sealed&&!j.ownerCt.sealed)}if(a){i.positionIndicator(c.header,b,g)}else{i.valid=false}return i.valid?i.dropAllowed:i.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(o,d,r,u){if(this.valid){var q=u.header,g=this.lastLocation,k=g.header,t=q.ownerCt,n=q.up("headercontainer:not(gridcolumn)"),l=t.items.indexOf(q),a=k.ownerCt,j=k.up("headercontainer:not(gridcolumn)"),p=a.items.indexOf(k),i=this.headerCt,b=i.getHeaderIndex(q),m=q.isGroupHeader?q.query(":not([isGroupHeader])").length:1,s=i.getHeaderIndex(k),c,h;if(g.pos==="after"){p++;s+=k.isGroupHeader?k.query(":not([isGroupHeader])").length:1}if(n!==j&&n.lockableInjected&&j.lockableInjected&&j.lockedCt){h=t.up("[scrollerOwner]");h.lock(q,p);this.onNodeDrop(o,d,r,u)}else{if(n!==j&&n.lockableInjected&&j.lockableInjected&&n.lockedCt){h=t.up("[scrollerOwner]");h.unlock(q,p);this.onNodeDrop(o,d,r,u)}else{this.invalidateDrop();if((t===a)&&(p>l)){p-=1}Ext.suspendLayouts();if(t!==a){t.remove(q,false);if(t.isGroupHeader){if(!t.items.getCount()){c=t.ownerCt;c.remove(t,false);t.el.dom.parentNode.removeChild(t.el.dom)}}}if(t===a){a.move(l,p)}else{a.insert(p,q)}if(a.isGroupHeader){if(a!==t){q.savedFlex=q.flex;delete q.flex;q.width=q.getWidth()}}else{if(q.savedFlex){q.flex=q.savedFlex;delete q.width}}i.purgeCache();Ext.resumeLayouts(true);i.onHeaderMoved(q,m,b,s);if(!t.items.getCount()){t.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.AbstractPlugin",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var a=this;a.dragZone=new Ext.grid.header.DragZone(a.headerCt);a.dropZone=new Ext.grid.header.DropZone(a.headerCt);if(a.disabled){a.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",requires:["Ext.grid.ColumnLayout","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],uses:["Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){if(a.enableColumnResize){a.resizer=new Ext.grid.plugin.HeaderResizer();a.plugins.push(a.resizer)}if(a.enableColumnMove){a.reorderer=new Ext.grid.plugin.HeaderReorderer();a.plugins.push(a.reorderer)}}if(a.isHeader&&!a.items){a.layout=a.layout||"auto"}else{a.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},a.initialConfig.layout)}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{triStateSort:a.triStateSort,sortable:a.sortable});a.menuTask=new Ext.util.DelayedTask(a.updateMenuDisabledState,a);a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var a=this;a.menuTask.cancel();Ext.destroy(a.resizer,a.reorderer);a.callParent()},applyColumnsState:function(e){if(!e||!e.length){return}var m=this,k=m.items.items,j=k.length,g=0,b=e.length,l,d,a,h;for(l=0;l<b;l++){a=e[l];for(h=j;h--;){d=k[h];if(d.getStateId&&d.getStateId()==a.id){if(g!==h){m.moveHeader(h,g)}if(d.applyColumnState){d.applyColumnState(a)}++g;break}}}},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(d){var a=this,b=a.isHeader?a.getOwnerHeaderCt():a;if(!d.headerId){d.headerId=d.initialConfig.id||Ext.id(null,"header-")}if(!d.stateId){d.stateId=d.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);if(b){b.purgeCache()}},onRemove:function(d){var a=this,b=a.isHeader?a.getOwnerHeaderCt():a;a.callParent(arguments);if(b){a.purgeCache()}},applyDefaults:function(b){var a;if(b&&!b.isComponent&&b.xtype=="rownumberer"){a=b}else{a=this.callParent(arguments);if(!b.isGroupHeader&&!("width" in a)&&!a.flex){a.width=this.defaultWidth}}return a},afterRender:function(){this.callParent();this.setSortState()},setSortState:function(){var a=this.up("[store]").store,c=a.getFirstSorter(),b;if(c){b=this.down("gridcolumn[dataIndex="+c.property+"]");if(b){b.setSortState(c.direction,false,true)}}else{this.clearOtherSortStates(null)}},getHeaderMenu:function(){var b=this.getMenu(),a;if(b){a=b.child("#columnItem");if(a){return a.menu}}return null},onHeaderVisibilityChange:function(e,d){var b=this,c=b.getHeaderMenu(),a;if(c){a=b.getMenuItemForHeader(c,e);if(a){a.setChecked(d,true)}b.menuTask.delay(50)}},getLeafMenuItems:function(){var h=this,d=h.getGridColumns(),b=[],c=0,g=0,a=d.length,j=h.getMenu(),e;for(;c<a;++c){e=d[c];if(e.hideable){e=h.getMenuItemForHeader(j,e);if(e){b.push(e);if(e.checked){++g}}}else{if(!e.hidden&&!e.menuDisabled){++g}}}return{items:b,checkedCount:g}},updateMenuDisabledState:function(){var h=this,b=h.getLeafMenuItems(),g=b.checkedCount,d=b.items,a=d.length,e=0,c=h.getMenu().child("#columnItem");if(g<=1){h.disableMenuItems(c,Ext.ComponentQuery.query("[checked=true]",d)[0])}else{for(;e<a;++e){h.setMenuItemState(g,c,d[e])}}},disableMenuItems:function(a,b){while(b&&b!=a){b.disableCheckChange();b=b.parentMenu.ownerItem}},setMenuItemState:function(e,a,d){var c,b;while(d&&d!=a){c=d.parentMenu;b=d.parentMenu.query("[checked=true]:not([menu])").length;d.enableCheckChange();d=c.ownerItem;if(b===e){break}}this.disableMenuItems(a,d)},getMenuItemForHeader:function(a,b){return b?a.down("menucheckitem[headerId="+b.id+"]"):null},onHeaderShow:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,true);if(!c.isGroupHeader){if(a){a.onHeaderShow(b,c)}}b.fireEvent("columnshow",b,c)},onHeaderHide:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,false);if(!c.isGroupHeader){if(a){a.onHeaderHide(b,c)}}b.fireEvent("columnhide",b,c)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(g,b,e){var d=this,a=d.view,c=d.ownerCt;if(a&&a.table.dom){d.tempLock();if(c){c.onHeaderResize(d,g,b)}}d.fireEvent("columnresize",this,g,b)},onHeaderClick:function(c,b,a){c.fireEvent("headerclick",this,c,b,a);this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(d,c,a){var b=this;if(d.fireEvent("headertriggerclick",b,d,c,a)!==false&&b.fireEvent("headertriggerclick",b,d,c,a)!==false){b.showMenuBy(a,d)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=g;d.setFloatParent(g);g.titleEl.addCls(this.headerOpenCls);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleEl.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),1,a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.hide();a.menu.destroy();delete a.menu}},onHeaderMoved:function(g,a,c,e){var d=this,b=d.ownerCt;if(b&&b.onHeaderMove){b.onHeaderMove(d,g,a,c,e)}d.fireEvent("columnmove",d,g,c,e)},getMenu:function(){var a=this;if(!a.menu){a.menu=new Ext.menu.Menu({hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.updateMenuDisabledState();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:c.onSortDescClick,scope:c}]}if(a&&a.length){b.push("-",{itemId:"columnItem",text:c.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=new Ext.menu.CheckItem({text:e.menuText||e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),h=d.length,a=0,g,b;for(;a<h;a++){g=d[a];if(g.hidden||g.up("headercontainer[hidden=true]")){b=0}else{b=g.getDesiredWidth()}c.push({dataIndex:g.dataIndex,align:g.align,width:b,id:g.id,cls:g.tdCls,columnId:g.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),g=b.length,a=0,e;for(;a<g;a++){e=b[a];if(e.getDesiredWidth){c+=e.getDesiredWidth()||0}else{c+=e.getWidth()}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),d=c.length,b=0;for(;b<d;b++){if(c[b]!==a){c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query("[hideable]")}return a},getHeaderIndex:function(a){if(a.isGroupHeader){a=a.down(":not([isgroupHeader])")}return Ext.Array.indexOf(this.getGridColumns(),a)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b.length?b[a]:null},getVisibleHeaderClosestToIndex:function(b){var a=this.getHeaderAtIndex(b);if(a&&a.hidden){a=a.next(":not([hidden])")||a.prev(":not([hidden])")}return a},prepareData:function(i,c,k,n,a){var m=this,h={},d=m.gridDataColumns||m.getGridColumns(),e=d.length,g=0,j,q,l,p,b,o=a.store;for(;g<e;g++){b={tdCls:"",style:""};j=d[g];q=j.id;l=j.renderer;p=i[j.dataIndex];if(typeof l=="function"){p=l.call(j.scope||m.ownerCt,p,b,k,c,g,o,n)}if(m.markDirty){h[q+"-modified"]=k.isModified(j.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":""}h[q+"-tdCls"]=b.tdCls;h[q+"-tdAttr"]=b.tdAttr;h[q+"-style"]=b.style;if(typeof p==="undefined"||p===null||p===""){p=j.emptyCellText}h[q]=p}return h},expandToFit:function(b){var a=this.view;if(a){a.expandToFit(b)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav","Ext.grid.ColumnComponentLayout","Ext.grid.ColumnLayout"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" {tipMarkup}class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:"&#160;",menuText:null,emptyCellText:"&#160;",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,tooltipType:"qtip",initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var a=this,b;if(Ext.isDefined(a.header)){a.text=a.header;delete a.header}if(!a.triStateSort){a.possibleSortStates.length=2}if(Ext.isDefined(a.columns)){a.isGroupHeader=true;a.items=a.columns;delete a.columns;delete a.flex;delete a.width;a.cls=(a.cls||"")+" "+Ext.baseCSSPrefix+"group-header";a.sortable=false;a.resizable=false;a.align="center"}else{a.isContainer=false;if(a.flex){a.minWidth=a.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}a.addCls(Ext.baseCSSPrefix+"column-header-align-"+a.align);b=a.renderer;if(b){if(typeof b=="string"){a.renderer=Ext.util.Format[b]}a.hasCustomRenderer=true}else{if(a.defaultRenderer){a.scope=a;a.renderer=a.defaultRenderer}}a.callParent(arguments);a.on({element:"el",click:a.onElClick,dblclick:a.onElDblClick,scope:a});a.on({element:"titleEl",mouseenter:a.onTitleMouseOver,mouseleave:a.onTitleMouseOut,scope:a})},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var b=this,d="",c=b.tooltip,a=b.tooltipType=="qtip"?"data-qtip":"title";if(!Ext.isEmpty(c)){d=a+'="'+c+'" '}return Ext.applyIf(b.callParent(arguments),{text:b.text,menuDisabled:b.menuDisabled,tipMarkup:d})},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var e=this,b=e.items.items,a=b?b.length:0,d,c=[],g={id:e.getStateId()};e.savePropsToState(["hidden","sortable","locked","flex","width"],g);if(e.isGroupHeader){for(d=0;d<a;d++){c.push(b[d].getColumnState())}if(c.length){g.columns=c}}else{if(e.isSubHeader&&e.ownerCt.hidden){delete e.hidden}}if("width" in g){delete g.flex}return g},getStateId:function(){return this.stateId||this.headerId},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.isGroupColumn?false:Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(),this)},beforeRender:function(){var b=this,a=b.up("tablepanel");b.callParent();if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);if(b.overCls){a.addClsOnOver(b.overCls)}if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.keyNav=new Ext.util.KeyNav(a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},afterComponentLayout:function(d,a,c,g){var e=this,b=e.getOwnerHeaderCt();e.callParent(arguments);if(b&&(c!=null||e.flex)&&d!==c){b.onHeaderResize(e,d,true)}},setPadding:function(a){var e=this,d=parseInt(e.textEl.getStyle("line-height"),10),h=e.textEl.dom.offsetHeight,b=e.titleEl,g=a-e.el.getBorderWidth("tb"),c;if(!e.isGroupHeader){if(b.getHeight()<g){b.setHeight(g);e.ownerCt.layout.innerCt.setHeight(a)}}c=b.getViewSize().height;if(h){if(d){h=Math.ceil(h/d)*d}b.setStyle({paddingTop:Math.floor(Math.max(((c-h)/2),0))+"px"})}if(Ext.isIE&&e.triggerEl){e.triggerEl.setHeight(c)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav,a.field);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,k,g){var h=this,i=Ext.baseCSSPrefix+"column-header-sort-",j=i+"ASC",c=i+"DESC",b=i+"null",e=h.getOwnerHeaderCt(),d=h.sortState;if(d!==a&&h.getSortParam()){h.addCls(i+a);if(a&&!g){h.doSort(a)}switch(a){case"DESC":h.removeCls([j,b]);break;case"ASC":h.removeCls([c,b]);break;case null:h.removeCls([j,c]);break}if(e&&!h.triStateSort&&!k){e.clearOtherSortStates(h)}h.sortState=a;if(h.triStateSort||a!=null){e.fireEvent("sortchange",e,h,a)}}},hide:function(c){var j=this,e=j.getOwnerHeaderCt(),b=j.ownerCt,a=b.isGroupHeader,k,h,g,d;if(a&&!c){h=b.query(">:not([hidden])");if(h.length===1&&h[0]==j){j.ownerCt.hide();return}}Ext.suspendLayouts();if(j.isGroupHeader){h=j.items.items;for(d=0,g=h.length;d<g;d++){k=h[d];if(!k.hidden){k.hide(true)}}}j.callParent();e.onHeaderHide(j);Ext.resumeLayouts(true)},show:function(d,b){var j=this,g=j.ownerCt,c,a,e,h;Ext.suspendLayouts();if(j.isSubHeader&&g.hidden){g.show(false,true)}j.callParent(arguments);if(j.isGroupHeader&&b!==true&&!j.query(":not([hidden])").length){c=j.query(">*");for(e=0,a=c.length;e<a;e++){h=c[e];if(h.hidden){h.show(true)}}}Ext.resumeLayouts(true);g=j.getOwnerHeaderCt();if(g){g.onHeaderShow(j)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.RowNumberer",{extend:"Ext.grid.column.Column",alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,draggable:false,align:"right",constructor:function(a){this.width=this.width;this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,g,c){if(this.rowspan){b.cellAttr='rowspan="'+this.rowspan+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return c.indexOfTotal(a)+1}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=new Ext.Component({html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),k=i.getRecord(b),a=c.records,j;if(!Ext.Array.contains(a,k)&&(h=="before"&&!g.containsRecordAtOffset(a,k,-1)||h=="after"&&!g.containsRecordAtOffset(a,k,1))){g.valid=true;if(g.overRecord!=k||g.currentPosition!=h){j=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){j+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,j);g.overRecord=k;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(g,a,i,h){var d=this,c=false,b={wait:false,processDrop:function(){d.invalidateDrop();d.handleNodeDrop(h,d.overRecord,d.currentPosition);c=true;d.fireViewEvent("drop",g,h,d.overRecord,d.currentPosition)},cancelDrop:function(){d.invalidateDrop();c=true}},j=false;if(d.valid){j=d.fireViewEvent("beforedrop",g,h,d.overRecord,d.currentPosition,b);if(b.wait){return}if(j!==false){if(!c){b.processDrop()}}}return j},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy(a[c].getId()))}}else{b.view.store.remove(b.records,b.view===j)}h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records);j.getSelectionModel().select(b.records)}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",menuText:"<i>Actions</i>",sortable:false,constructor:function(d){var g=this,b=Ext.apply({},d),c=b.items||[g],h,e,a;g.origRenderer=b.renderer||g.renderer;g.origScope=b.scope||g.scope;delete g.renderer;delete g.scope;delete b.renderer;delete b.scope;delete b.items;g.callParent([b]);g.items=c;for(e=0,a=c.length;e<a;++e){if(c[e].getClass){h=true;break}}if(g.origRenderer||h){g.hasCustomRenderer=true}},defaultRenderer:function(g,j){var e=this,b=Ext.baseCSSPrefix,k=e.origScope||e,d=e.items,c=d.length,a=0,h;g=Ext.isFunction(e.origRenderer)?e.origRenderer.apply(k,arguments)||"":"";j.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(;a<c;a++){h=d[a];if(!h.hasActionConfiguration){h.stopSelection=e.stopSelection;h.disable=Ext.Function.bind(e.disableAction,e,[a],0);h.enable=Ext.Function.bind(e.enableAction,e,[a],0);h.hasActionConfiguration=true}g+='<img alt="'+(h.altText||e.altText)+'" src="'+(h.icon||Ext.BLANK_IMAGE_URL)+'" class="'+b+"action-col-icon "+b+"action-col-"+String(a)+" "+(h.disabled?b+"item-disabled":" ")+" "+(Ext.isFunction(h.getClass)?h.getClass.apply(h.scope||k,arguments):(h.iconCls||e.iconCls||""))+'"'+((h.tooltip)?' data-qtip="'+h.tooltip+'"':"")+" />"}return g},enableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=false;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).removeCls(c.disabledCls);if(!a){c.fireEvent("enable",c)}},disableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=true;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).addCls(c.disabledCls);if(!a){c.fireEvent("disable",c)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(i,l,n,a,j,g,c,p){var h=this,d=g.getTarget(),b,o,k,m=i=="keydown"&&g.getKey();if(m&&!Ext.fly(d).findParent(l.cellSelector)){d=Ext.fly(n).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(d&&(b=d.className.match(h.actionIdRe))){o=h.items[parseInt(b[1],10)];if(o){if(i=="click"||(m==g.ENTER||m==g.SPACE)){k=o.handler||h.handler;if(k&&!o.disabled){k.call(o.scope||h.origScope||h,l,a,j,o,g,c,p)}}else{if(i=="mousedown"&&o.stopSelection!==false){return false}}}}return h.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",defaultRenderer:function(a){if(a===undefined){return this.undefinedText}if(!a||a==="false"){return this.falseText}return this.trueText}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){if(!this.format){this.format=Ext.Date.defaultFormat}this.callParent(arguments)},defaultRenderer:function(a){return Ext.util.Format.date(a,this.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",defaultRenderer:function(a){return Ext.util.Format.number(a,this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",initComponent:function(){var a=this;a.tpl=(!Ext.isPrimitive(a.tpl)&&a.tpl.compile)?a.tpl:new Ext.XTemplate(a.tpl);a.hasCustomRenderer=true;a.callParent(arguments)},defaultRenderer:function(c,d,a){var b=Ext.apply({},a.data,a.getAssociatedData());return this.tpl.apply(b)}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,constructor:function(a){this.initialConfig=a;this.callParent(arguments)},clone:function(){return new this.self(this.initialConfig)},init:Ext.emptyFn,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:Ext.emptyFn,mutateMetaRowTpl:Ext.emptyFn,getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,init:function(){var a=this;a.grid.optimizedColumnMove=false;a.view.mon(a.view.store,{update:a.onStoreUpdate,scope:a})},onStoreUpdate:function(){var a=this.view;if(this.showSummaryRow){a.saveScrollState();a.refresh();a.restoreScrollState()}},toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=new Ext.XTemplate(a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(!e&&e!==0){e="\u00a0"}if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){this.view.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,c){var j=this,e=c.rows.length,b=0,g=0,a=j.visibleChunk,p,n,h=c.rows;delete c.rows;c.chunks=[];for(;b<e;b+=j.chunkSize,g++){if(b+j.chunkSize>e){n=e-b}else{n=j.chunkSize}if(g>=a-1&&g<=a+1){p=h.slice(b,b+j.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*j.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'<tpl for="chunks"><div class="'+Ext.baseCSSPrefix+'grid-chunk" style="height: {chunkHeight}px;">'},closeTableWrap:function(){return"</div></tpl>"}}}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",bodySelector:"."+Ext.baseCSSPrefix+"grid-group-body",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"{columnName}: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",hdCollapsibleCls:Ext.baseCSSPrefix+"grid-group-hd-collapsible",groupByText:"Group by this field",showGroupsText:"Show in groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,collapsible:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){c.block();b.group(c.lastGroupIndex);c.unblock()}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);d.refreshIf()},refreshIf:function(){var b=this.grid.ownerCt,a=this.view;if(!a.store.remoteGroup&&!this.blockRefresh){if(b&&b.lockable){b.view.refresh()}else{a.refresh()}}},getFeatureTpl:function(b,c,a,d){return["<tpl if=\"typeof rows !== 'undefined'\">",'<tr id="{groupHeaderId}" class="'+Ext.baseCSSPrefix+'grid-group-hd {hdCollapsedCls} {collapsibleClass}"><td class="'+Ext.baseCSSPrefix+'grid-cell" colspan="'+c.columns.length+'" {[this.indentByDepth(values)]}><div class="'+Ext.baseCSSPrefix+'grid-cell-inner"><div class="'+Ext.baseCSSPrefix+'grid-group-title">{collapsed}{[this.renderGroupHeaderTpl(values, parent)]}</div></div></td></tr>','<tr id="{groupBodyId}" class="'+Ext.baseCSSPrefix+'grid-group-body {collapsedCls}"><td colspan="'+c.columns.length+'">{[this.recurse(values)]}</td></tr>',"</tpl>"].join("")},getFragmentTpl:function(){var a=this;return{indentByDepth:a.indentByDepth,depthToIndent:a.depthToIndent,renderGroupHeaderTpl:function(b,c){return Ext.XTemplate.getTpl(a,"groupHeaderTpl").apply(b,c)}}},indentByDepth:function(a){return'style="padding-left:'+((a.depth||0)*this.depthToIndent)+'px;"'},destroy:function(){delete this.view;delete this.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.mon(a.store,{scope:b,groupchange:b.onGroupChange,remove:b.onRemove,add:b.onAdd,update:b.onUpdate});if(b.enableGroupingMenu){b.injectGroupingMenu()}b.pruneGroupedHeader();b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},onAdd:function(l,c){var j=this,k=j.view,a=j.getGroupField(),g=0,h=c.length,n,d,b,e,m;if(k.rendered){d={};n={};for(;g<h;++g){m=c[g].get(a);if(d[m]===undefined){d[m]=0}d[m]+=1}b=l.getGroups();for(g=0,h=b.length;g<h;++g){m=b[g];n[m.name]=m.children.length}for(m in d){if(d[m]===n[m]){e=true;break}}if(e){k.refresh()}}},onUpdate:function(c,b,d,e){var a=this.view;if(a.rendered&&!e||Ext.Array.contains(e,this.getGroupField())){a.refresh()}},onRemove:function(d,c){var e=this,b=e.getGroupField(),g=c.get(b),a=e.view;if(a.rendered){if(d.findExact(b,g)===-1){e.view.refresh()}}},injectGroupingMenu:function(){var a=this,b=a.view.headerCt;b.showMenuBy=a.showMenuBy;b.getMenuItems=a.getMenuItems()},showMenuBy:function(b,e){var d=this.getMenu(),c=d.down("#groupMenuItem"),a=e.groupable===false?"disable":"enable";c[a]();Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var g=this,c=g.groupByText,e=g.disabled||!g.getGroupField(),a=g.showGroupsText,d=g.enableNoGroups,b=g.view.headerCt.getMenuItems;return function(){var h=b.call(this);h.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:c,handler:g.onGroupMenuItemClick,scope:g});if(d){h.push({itemId:"groupToggleMenuItem",text:a,checked:!e,checkHandler:g.onGroupToggleMenuItemClick,scope:g})}return h}},onGroupMenuItemClick:function(c,g){var d=this,h=c.parentMenu,i=h.activeHeader,a=d.view,b=a.store;delete d.lastGroupIndex;d.block();d.enable();b.group(i.dataIndex);d.pruneGroupedHeader();d.unblock();d.refreshIf()},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var a=this,b=a.getGroupedHeader();if(a.hideGroupedHeader&&b){if(a.prunedHeader){a.prunedHeader.show()}a.prunedHeader=b;b.hide()}},getGroupedHeader:function(){var a=this.getGroupField(),b=this.view.headerCt;return a?b.down("[dataIndex="+a+"]"):null},getGroupField:function(){var a=this.view.store.groupers.first();if(a){return a.property}return""},onRowFocus:function(c){var b=this.view.getNode(c),a=Ext.fly(b).up("."+this.collapsedCls);if(a){this.expand(a)}},isExpanded:function(a){return(this.collapsedState[a]===false)},expand:function(i,b,h){var e=this,a=e.view,c,g,d=e.lockingPartner;if(Ext.isString(i)){g=Ext.fly(e.getGroupBodyId(i),"_grouping")}else{g=Ext.fly(i,"_grouping");i=e.getGroupName(g)}c=Ext.get(e.getGroupHeaderId(i));if(e.collapsedState[i]){g.removeCls(e.collapsedCls);g.prev().removeCls(e.hdCollapsedCls);if(h!==true){a.refreshSize()}a.fireEvent("groupexpand",a,c,i);e.collapsedState[i]=false;if(d){d.expand(i,b,h)}if(b){g.scrollIntoView(a.el,null,true)}}},expandAll:function(){var d=this,b=d.view,c=b.el.select(d.eventSelector).elements,g,a=c.length;for(g=0;g<a;g++){d.expand(Ext.fly(c[g]).next(),false,true)}b.refreshSize()},collapse:function(i,b,h){var e=this,a=e.view,c,g,d=e.lockingPartner;if(Ext.isString(i)){g=Ext.fly(e.getGroupBodyId(i),"_grouping")}else{g=Ext.fly(i,"_grouping");i=e.getGroupName(g)}c=Ext.get(e.getGroupHeaderId(i));if(!e.collapsedState[i]){g.addCls(e.collapsedCls);g.prev().addCls(e.hdCollapsedCls);if(h!==true){a.refreshSize()}a.fireEvent("groupcollapse",a,c,i);e.collapsedState[i]=true;if(d){d.collapse(i,b,h)}if(b){c.scrollIntoView(a.el,null,true)}}},collapseAll:function(){var d=this,b=d.view,c=b.el.select(d.eventSelector).elements,g,a=c.length;for(g=0;g<a;g++){d.collapse(Ext.fly(c[g]).next(),false,true)}b.refreshSize()},onGroupChange:function(){var d=this,e=d.getGroupField(),c,a,b;if(d.hideGroupedHeader){if(d.lastGroupField){c=d.getMenuItem(d.lastGroupField);if(c){c.setChecked(true)}}if(e){a=d.view.headerCt.getVisibleGridColumns();b=((a.length===1)&&(a[0].dataIndex==e));c=d.getMenuItem(e);if(c&&!b){c.setChecked(false)}}}d.refreshIf();d.lastGroupField=e},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return d?c.down("menuitem[headerId="+d.id+"]"):null},onGroupClick:function(a,c,g,d){var b=this;if(b.collapsible){if(b.collapsedState[g]){b.expand(g)}else{b.collapse(g)}}},getMetaRowTplFragments:function(){return{isRow:this.isRow,closeRow:this.closeRow}},isRow:function(){return"<tpl if=\"typeof rows === 'undefined'\">"},closeRow:function(){return"</tpl>"},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a;if(c){a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";b.data=g.getData()}return b},getGroupRows:function(m,d,n,k){var i=this,c=m.children,o=m.rows=[],j=i.view,g=i.getGroupedHeader(),b=i.getGroupField(),h=-1,a,l=d.length,e;if(j.store.buffered){i.collapsible=false}m.viewId=j.id;for(a=0;a<l;a++){e=d[a];if(e.get(b)==m.name){h=a}if(Ext.Array.indexOf(c,e)!=-1){o.push(Ext.apply(n[a],{depth:1}))}}m.groupField=b,m.groupHeaderId=i.getGroupHeaderId(m.name);m.groupBodyId=i.getGroupBodyId(m.name);m.fullWidth=k;m.columnName=g?g.text:b;m.groupValue=m.name;if(g&&h>-1){m.name=m.renderedValue=n[h][g.id]}if(i.collapsedState[m.name]){m.collapsedCls=i.collapsedCls;m.hdCollapsedCls=i.hdCollapsedCls}else{m.collapsedCls=m.hdCollapsedCls=""}if(i.collapsible){m.collapsibleClass=i.hdCollapsibleCls}else{m.collapsibleClass=""}return m},getGroupHeaderId:function(a){return this.view.id+"-hd-"+a},getGroupBodyId:function(a){return this.view.id+"-bd-"+a},getGroupName:function(a){var b=this,c;c=Ext.fly(a).findParent(b.eventSelector);if(c){return c.id.split(this.view.id+"-hd-")[1]}c=Ext.fly(a).findParent(b.bodySelector);if(c){return c.id.split(this.view.id+"-bd-")[1]}},collectData:function(c,p,n,k,a){var h=this,l=h.view.store,j=h.collapsedState,e,d,b,i,m;if(h.startCollapsed){h.startCollapsed=false;e=true}if(!h.disabled&&l.isGrouped()){a.rows=b=l.getGroups();i=b.length;for(d=0;d<i;d++){m=b[d];if(e){j[m.name]=true}h.getGroupRows(m,c,p,k)}}return a},getFireEventArgs:function(b,a,d,c){return[b,a,d,this.getGroupName(d),c]}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:"Ext.grid.feature.Grouping",alias:"feature.groupingsummary",mixins:{summary:"Ext.grid.feature.AbstractSummary"},init:function(){this.mixins.summary.init.call(this)},getFeatureTpl:function(){var a=this.callParent(arguments);if(this.showSummaryRow){a=a.replace("</tpl>","");a+="{[this.printSummaryRow(xindex)]}</tpl>"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h<b;++h){c=e[h];c.gridSummaryValue=this.getColumnValue(c,d);g.push(c)}return g},generateSummaryData:function(){var t=this,u={},n={},h=t.view.store,r=this.getGroupField(),a=h.proxy.reader,q=t.summaryGroups,b=t.view.headerCt.getColumnsForTpl(),j,o,e,c,m,v,p,k,l,g,d;for(o=0,e=q.length;o<e;++o){u[q[o].name]={}}if(t.remoteRoot&&a.rawData){m=a.root;a.root=t.remoteRoot;a.buildExtractors(true);k=a.getRoot(a.rawData);g=k.length;if(!a.convertRecordData){a.buildExtractors()}for(l=0;l<g;l++){d={};a.convertRecordData(d,k[l]);n[d[r]]=d}a.root=m;a.buildExtractors(true)}for(o=0,e=b.length;o<e;++o){p=Ext.getCmp(b[o].id);c=t.getSummary(h,p.summaryType,p.dataIndex,true);for(v in c){if(c.hasOwnProperty(v)){u[v][p.id]=c[v]}}for(v in n){if(n.hasOwnProperty(v)){j=n[v][p.dataIndex];if(j!==undefined&&u[v]!==undefined){u[v][p.id]=j}}}}return u}});Ext.define("Ext.grid.feature.RowBody",{extend:"Ext.grid.feature.Feature",alias:"feature.rowbody",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTrCls:Ext.baseCSSPrefix+"grid-rowbody-tr",rowBodyTdCls:Ext.baseCSSPrefix+"grid-cell-rowbody",rowBodyDivCls:Ext.baseCSSPrefix+"grid-rowbody",eventPrefix:"rowbody",eventSelector:"."+Ext.baseCSSPrefix+"grid-rowbody-tr",getRowBody:function(a){return['<tr class="'+this.rowBodyTrCls+' {rowBodyCls}">','<td class="'+this.rowBodyTdCls+'" colspan="{rowBodyColspan}">','<div class="'+this.rowBodyDivCls+'">{rowBody}</div>',"</td>","</tr>"].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,init:function(){if(!this.disabled){this.enable()}},getRowSelector:function(){return"tr:has(> "+this.view.cellSelector+")"},enable:function(){var b=this,a=b.view;b.callParent();b.savedRowSelector=a.rowSelector;a.rowSelector=b.getRowSelector();a.getComponentLayout().getColumnSelector=b.getColumnSelector},disable:function(){var c=this,a=c.view,b=c.savedRowSelector;c.callParent();if(b){a.rowSelector=b}delete c.savedRowSelector},mutateMetaRowTpl:function(a){var b=Ext.baseCSSPrefix;a[0]=a[0].replace(b+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('<table class="'+b+"grid-table "+b+'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');a.unshift('<tr class="'+b+'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="'+b+'grid-rowwrap-div">');a.push("</table>");a.push("</div></td></tr>")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g<q;g++){a=l[g].id;j=a+"-tdCls";e=Ext.baseCSSPrefix+"grid-col-resizer-"+a;b[j]=e+" "+(m[j]?m[j]:"");b[a+"-tdAttr"]=' style="width: '+(l[g].hidden?0:l[g].getDesiredWidth())+'px;" ';if(m[a+"-tdAttr"]){b[a+"-tdAttr"]+=m[a+"-tdAttr"]}}return b},getMetaRowTplFragments:function(){return{embedFullWidth:this.embedFullWidth,embedColSpan:this.embedColSpan}},getColumnSelector:function(b){var a=Ext.baseCSSPrefix+"grid-col-resizer-"+b.id;return"th."+a+",td."+a}});Ext.define("Ext.grid.feature.Summary",{extend:"Ext.grid.feature.AbstractSummary",alias:"feature.summary",getFragmentTpl:function(){this.summaryData=this.generateSummaryData();return this.getSummaryFragments()},getTableFragments:function(){if(this.showSummaryRow){return{closeRows:this.closeRows}}},closeRows:function(){return"</tpl>{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;b<e;++b){d=c[b];d.gridSummaryValue=this.getColumnValue(d,j);h.push(d)}return h},generateSummaryData:function(){var h=this,d={},j=h.view.store,c=h.view.headerCt.getColumnsForTpl(),e=0,a=c.length,b,k,g;for(e=0,a=c.length;e<a;++e){g=Ext.getCmp(c[e].id);d[g.id]=h.getSummary(j,g.summaryType,g.dataIndex,false)}return d}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",extend:"Ext.AbstractPlugin",requires:["Ext.grid.column.Column","Ext.util.KeyNav"],mixins:{observable:"Ext.util.Observable"},clicksToEdit:2,triggerEvent:undefined,defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;b.addEvents("beforeedit","edit","validateedit","canceledit");b.callParent(arguments);b.mixins.observable.constructor.call(b);b.on("edit",function(c,d){b.fireEvent("afteredit",c,d)})},init:function(a){var b=this;b.grid=a;b.view=a.view;b.initEvents();b.mon(a,"reconfigure",b.onReconfigure,b);b.onReconfigure();a.relayEvents(b,["beforeedit","edit","validateedit","canceledit"]);a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){this.initFieldAccessors(this.view.getGridColumns())},destroy:function(){var b=this,a=b.grid;Ext.destroy(b.keyNav);b.removeFieldAccessors(a.getView().getGridColumns());b.clearListeners();delete b.grid.editingPlugin;delete b.grid.view.editingPlugin;delete b.grid;delete b.view;delete b.editor;delete b.keyNav},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){a=[].concat(a);var d=this,g,e=a.length,b;for(g=0;g<e;g++){b=a[g];Ext.applyIf(b,{getEditor:function(c,h){return d.getColumnField(this,h)},setEditor:function(c){d.setColumnField(this,c)}})}},removeFieldAccessors:function(a){a=[].concat(a);var e,d=a.length,b;for(e=0;e<d;e++){b=a[e];delete b.getEditor;delete b.setEditor}},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType)}b.field=c;Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var b=this,a=b.view;if(b.triggerEvent=="cellfocus"){b.mon(a,"cellfocus",b.onCellFocus,b)}else{if(b.triggerEvent=="rowfocus"){b.mon(a,"rowfocus",b.onRowFocus,b)}else{if(a.selModel.isCellModel){a.onCellFocus=Ext.Function.bind(b.beforeViewCellFocus,b)}b.mon(a,b.triggerEvent||("cell"+(b.clicksToEdit===1?"click":"dblclick")),b.onCellClick,b)}}b.initAddRemoveHeaderEvents();a.on("render",b.initKeyNavHeaderEvents,b,{single:true})},beforeViewCellFocus:function(a){if(this.view.selModel.keyNavigation||!this.editing||!this.isCellEditable||!this.isCellEditable(a.row,a.columnHeader)){this.view.focusCell.apply(this.view,arguments)}},onRowFocus:function(a,c,b){this.startEdit(c,0)},onCellFocus:function(c,b,a){this.startEdit(a.row,a.column)},onCellClick:function(c,a,i,b,h,d,g){if(!c.expanderSelector||!g.getTarget(c.expanderSelector)){this.startEdit(b,c.getHeaderAtIndex(i))}},initAddRemoveHeaderEvents:function(){var a=this;a.mon(a.grid.headerCt,{scope:a,add:a.onColumnAdd,remove:a.onColumnRemove})},initKeyNavHeaderEvents:function(){var a=this;a.keyNav=Ext.create("Ext.util.KeyNav",a.view.el,{enter:a.onEnterKey,esc:a.onEscKey,scope:a})},onColumnAdd:function(a,b){if(b.isHeader){this.initFieldAccessors(b)}},onColumnRemove:function(a,b){if(b.isHeader){this.removeFieldAccessors(b)}},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,i,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){i=b.getCurrentPosition();if(i){a=c.store.getAt(i.row);g=c.headerCt.getHeaderAtIndex(i.column)}}else{a=b.getLastSelected()}if(a&&g){d.startEdit(a,g)}},onEscKey:function(a){this.cancelEdit()},beforeEdit:Ext.emptyFn,startEdit:function(a,d){var c=this,b=c.getEditingContext(a,d);if(b==null||c.beforeEdit(b)===false||c.fireEvent("beforeedit",c,b)===false||b.cancel||!c.grid.view.isVisible(true)){return false}c.context=b;c.editing=true},getEditingContext:function(b,h){var g=this,c=g.grid,a=c.getView(),e=a.getNode(b),d,i;if(!e){return}h=c.headerCt.getVisibleHeaderClosestToIndex(Ext.isNumber(h)?h:h.getIndex());if(!h){return}i=h.getIndex();if(Ext.isNumber(b)){d=b;b=a.getRecord(e)}else{d=a.indexOf(e)}return{grid:c,record:b,field:h.dataIndex,value:b.get(h.dataIndex),row:a.getNode(d),column:h,rowIdx:d,colIdx:i}},cancelEdit:function(){var a=this;a.editing=false;a.fireEvent("canceledit",a,a.context)},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a,a.context)}delete a.context;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:"Ext.grid.plugin.Editing",requires:["Ext.grid.CellEditor","Ext.util.DelayedTask"],constructor:function(){this.callParent(arguments);this.editors=new Ext.util.MixedCollection(false,function(a){return a.editorId});this.editTask=new Ext.util.DelayedTask()},onReconfigure:function(){this.editors.clear();this.callParent()},destroy:function(){var a=this;a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear();a.callParent(arguments)},onBodyScroll:function(){var c=this,b=c.getActiveEditor(),a=c.view.el.getScroll();if(b&&b.editing){if(a.top!==c.scroll.top){if(b.field){if(b.field.triggerBlur){b.field.triggerBlur()}else{b.field.blur()}}}else{b.realign()}}c.scroll=a},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;a.addElListener("mousewheel",c.cancelEdit,c);c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},isCellEditable:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.grid.view.isVisible(true)&&b){d=b.column;a=b.record;if(d&&c.getEditor(a,d)){return true}}},startEdit:function(a,g){var d=this,c=d.getEditingContext(a,g),e,b;d.completeEdit();if(!c||!d.grid.view.isVisible(true)){return false}a=c.record;g=c.column;if(g&&!g.getEditor(a)){return false}e=a.get(g.dataIndex);c.originalValue=c.value=e;if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",d,c)===false||c.cancel){return false}b=d.getEditor(a,g);d.grid.view.cancelFocus();d.view.focusCell({row:c.rowIdx,column:c.colIdx});if(b){d.editTask.delay(15,d.showEditor,d,[b,c,e]);return true}return false},showEditor:function(b,c,h){var e=this,a=c.record,g=c.column,i=e.grid.getSelectionModel(),d=i.getCurrentPosition();e.context=c;e.setActiveEditor(b);e.setActiveRecord(a);e.setActiveColumn(g);if(i.selectByPosition&&(!d||d.column!==c.colIdx||d.row!==c.rowIdx)){i.selectByPosition({row:c.rowIdx,column:c.colIdx})}b.startEdit(e.getCell(a,g),h);e.editing=true;e.scroll=e.view.el.getScroll()},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit();this.editing=false}},setActiveEditor:function(a){this.activeEditor=a},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,d){var g=this,e=g.editors,c=d.getItemId(),b=e.getByKey(c);if(b){return b}else{b=d.getEditor(a);if(!b){return false}if(!(b instanceof Ext.grid.CellEditor)){b=new Ext.grid.CellEditor({editorId:c,field:b,ownerCt:g.grid})}else{b.ownerCt=g.grid}b.editingPlugin=g;b.isForTree=g.grid.isTree;b.on({scope:g,specialkey:g.onSpecialKey,complete:g.onEditComplete,canceledit:g.cancelEdit});e.add(b);return b}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,g,d){var c=this,b=c.grid,h;if(d.getKey()===d.TAB){d.stopEvent();if(a){a.onEditorTab(d)}h=b.getSelectionModel();if(h.onEditorTab){h.onEditorTab(c,d)}}},onEditComplete:function(c,h,b){var g=this,d=g.grid,e=g.getActiveColumn(),i=d.getSelectionModel(),a;if(e){a=g.context.record;g.setActiveEditor(null);g.setActiveColumn(null);g.setActiveRecord(null);if(!g.validateEdit()){return}if(!a.isEqual(h,b)){a.set(e.dataIndex,h)}if(i.setCurrentPosition){i.setCurrentPosition(i.getCurrentPosition())}d.getView().getEl(e).focus();g.context.value=h;g.fireEvent("edit",g,g.context)}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus();c.callParent(arguments)}},startEditByPosition:function(a){a.column=this.view.getHeaderCt().getVisibleHeaderClosestToIndex(a.column).getIndex();return this.startEdit(a.row,a.column)}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.view.DragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText})}if(b.enableDrop){b.dropZone=new Ext.grid.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.RowEditing",{extend:"Ext.grid.plugin.Editing",alias:"plugin.rowediting",requires:["Ext.grid.RowEditor"],editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},init:function(a){this.callParent([a])},destroy:function(){var a=this;Ext.destroy(a.editor);a.callParent(arguments)},startEdit:function(a,d){var c=this,b=c.getEditor();if((b.beforeEdit()!==false)&&(c.callParent(arguments)!==false)){b.startEdit(c.context.record,c.context.column);return true}return false},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments)}},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a,a.context)}},validateEdit:function(){var k=this,h=k.editor,b=k.context,g=b.record,m={},d={},j=h.items.items,i,c=j.length,a,l;for(i=0;i<c;i++){l=j[i];a=l.name;m[a]=l.getValue();d[a]=g.get(a)}Ext.apply(b,{newValues:m,originalValues:d});return k.callParent(arguments)&&k.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){var h=this,c=h.grid,i=h.view,d=c.headerCt,e=["saveBtnText","cancelBtnText","errorsText","dirtyText"],j,a=e.length,g={autoCancel:h.autoCancel,errorSummary:h.errorSummary,fields:d.getGridColumns(),hidden:true,view:i,editingPlugin:h,renderTo:i.el},k;for(j=0;j<a;j++){k=e[j];if(Ext.isDefined(h[k])){g[k]=h[k]}}return Ext.create("Ext.grid.RowEditor",g)},initEditTriggers:function(){var b=this,a=b.view,c=b.clicksToMoveEditor===1?"click":"dblclick";b.callParent(arguments);if(b.clicksToMoveEditor!==b.clicksToEdit){b.mon(a,"cell"+c,b.moveEditorByClick,b)}a.on({render:function(){b.mon(b.grid.headerCt,{scope:b,columnresize:b.onColumnResize,columnhide:b.onColumnHide,columnshow:b.onColumnShow,columnmove:b.onColumnMove})},single:true})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.onCellClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.editor;if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g-(g>c?1:0))}},setColumnField:function(b,d){var c=this,a=c.getEditor();a.removeField(b);c.callParent(arguments);c.getEditor().setField(b)}});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number","Ext.form.field.ComboBox"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=new Ext.grid.property.Store(a,a.source)}if(a.sortableColumns){a.store.sort("name","ASC")}a.columns=new Ext.grid.property.HeaderContainer(a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:true})}),string:new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:true})}),number:new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:true})}),"boolean":new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(g.rendered&&c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=new Ext.grid.CellEditor({field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:b.sortableColumns,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),sortable:b.sortableColumns,flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",sortOnLoad:false,uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=new Ext.data.reader.Reader({model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return new Ext.data.ResultSet(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b);b.fireEvent("refresh",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.ClassList",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{dirty:false,constructor:function(c){this.owner=c;this.map=a(this.classes=b(c.el.className))},add:function(c){var d=this;if(!d.map[c]){d.map[c]=true;d.classes.push(c);if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},addMany:function(c){Ext.each(b(c),this.add,this)},contains:function(c){return this.map[c]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(c){var d=this;if(d.map[c]){delete d.map[c];d.classes=Ext.Array.filter(d.classes,function(e){return e!=c});if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},removeMany:function(d){var e=this,c=a(b(d));e.classes=Ext.Array.filter(e.classes,function(g){if(!c[g]){return true}delete e.map[g];if(!e.dirty){e.dirty=true;e.owner.markDirty()}return false})}}}()));Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(c){var b=this,a=b.getKey(c);if(!b.map[a]){++b.length;b.items.push(c);b.map[a]=c}return c},clear:function(){var b=this,a=b.items;b.items=[];b.map={};b.length=0;return a},contains:function(b){var a=this.getKey(b);return this.map.hasOwnProperty(a)},getCount:function(){return this.length},getKey:function(a){return a.id},remove:function(e){var d=this,c=d.getKey(e),a=d.items,b;if(d.map[c]){b=Ext.Array.indexOf(a,e);Ext.Array.erase(a,b,1);delete d.map[c];--d.length}return e}});Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,props:null,state:null,wrapsComponent:false,constructor:function(b){var g=this,e,d,a,c,h;Ext.apply(g,b);e=g.el;g.id=e.id;g.lastBox=e.lastBox;g.flushedProps={};g.props={};g.styles={};h=g.target;if(h.isComponent){g.wrapsComponent=true;d=h.ownerCt;if(d&&(a=g.context.items[d.el.id])){g.ownerCtContext=a}g.sizeModel=c=h.getSizeModel(a&&a.widthModel.pairsByHeightOrdinal[a.heightModel.ordinal]);g.widthModel=c.width;g.heightModel=c.height}},init:function(j,c){var s=this,a=s.props,d=s.dirty,l=s.ownerCtContext,p=s.target.ownerLayout,h=!s.state,t=j||h,e,o,m,q,b,u,v=s.heightModel,g=s.widthModel,k,r;s.dirty=s.invalid=false;s.props={};if(s.boxChildren){s.boxChildren.length=0}if(!h){s.clearAllBlocks("blocks");s.clearAllBlocks("domBlocks")}if(!s.wrapsComponent){return t}u=s.target;s.state={};if(h){if(u.beforeLayout){u.beforeLayout()}if(!l&&(q=u.ownerCt)){l=s.context.items[q.el.id]}if(l){s.ownerCtContext=l;s.isBoxParent=u.ownerLayout.isItemBoxParent(s)}else{s.isTopLevel=true}s.frameBodyContext=s.getEl("frameBody")}else{l=s.ownerCtContext;s.isTopLevel=!l;e=s.children;for(o=0,m=e.length;o<m;++o){e[o].init(true)}}s.hasRawContent=!(u.isContainer&&u.items.items.length>0);if(j){s.widthModel=s.heightModel=null;b=u.getSizeModel(l&&l.widthModel.pairsByHeightOrdinal[l.heightModel.ordinal]);if(h){s.sizeModel=b}s.widthModel=b.width;s.heightModel=b.height}else{if(a){s.recoverProp("x",a,d);s.recoverProp("y",a,d);if(s.widthModel.calculated){s.recoverProp("width",a,d)}if(s.heightModel.calculated){s.recoverProp("height",a,d)}}}if(a&&p&&p.manageMargins){s.recoverProp("margin-top",a,d);s.recoverProp("margin-right",a,d);s.recoverProp("margin-bottom",a,d);s.recoverProp("margin-left",a,d)}if(c){k=c.heightModel;r=c.widthModel;if(r&&k&&g&&v){if(g.shrinkWrap&&v.shrinkWrap){if(r.constrainedMax&&k.constrainedMin){k=null}}}if(r){s.widthModel=r}if(k){s.heightModel=k}if(c.state){Ext.apply(s.state,c.state)}}return t},initContinue:function(d){var e=this,c=e.ownerCtContext,b=e.widthModel,a;if(d){if(c&&b.shrinkWrap){a=c.isBoxParent?c:c.boxParent;if(a){a.addBoxChild(e)}}else{if(b.natural){e.boxParent=c}}}return d},initDone:function(b,g,a,h){var d=this,c=d.props,e=d.state;if(g){c.componentChildrenDone=true}if(a){c.containerChildrenDone=true}if(h){c.containerLayoutDone=true}if(d.boxChildren&&d.boxChildren.length&&d.widthModel.shrinkWrap){d.el.setWidth(10000);e.blocks=(e.blocks||0)+1}},initAnimation:function(){var b=this,c=b.target,a=b.ownerCtContext;if(a&&a.isTopLevel){b.animatePolicy=c.ownerLayout.getAnimatePolicy(b)}else{if(!a&&c.isCollapsingOrExpanding&&c.animCollapse){b.animatePolicy=c.componentLayout.getAnimatePolicy(b)}}if(b.animatePolicy){b.context.queueAnimation(b)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(a){this.getClassList().addMany(a)},removeCls:function(a){this.getClassList().removeMany(a)},addBlock:function(b,d,e){var c=this,g=c[b]||(c[b]={}),a=g[e]||(g[e]={});if(!a[d.id]){a[d.id]=d;++d.blockCount;++c.context.blockCount}},addBoxChild:function(d){var c=this,b,a=d.widthModel;d.boxParent=this;d.measuresBox=a.shrinkWrap?d.hasRawContent:a.natural;if(d.measuresBox){b=c.boxChildren;if(b){b.push(d)}else{c.boxChildren=[d]}}},addTrigger:function(g,h){var e=this,a=h?"domTriggers":"triggers",i=e[a]||(e[a]={}),b=e.context,d=b.currentLayout,c=i[g]||(i[g]={});if(!c[d.id]){c[d.id]=d;++d.triggerCount;c=b.triggers[h?"dom":"data"];(c[d.id]||(c[d.id]=[])).push({item:this,prop:g});if(e.props[g]!==undefined){if(!h||!(e.dirty&&(g in e.dirty))){++d.firedTriggers}}}},boxChildMeasured:function(){var b=this,c=b.state,a=(c.boxesMeasured=(c.boxesMeasured||0)+1);if(a==b.boxChildren.length){c.clearBoxWidth=1;++b.context.progressCount;b.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(a){var b=a.getStyles(a.borderNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},marginInfo:function(a){var b=a.getStyles(a.marginNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},paddingInfo:function(b){var a=b.frameBodyContext||b,c=a.getStyles(b.paddingNames,b.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c}},checkCache:function(a){return this.cacheMissHandlers[a](this)},clearAllBlocks:function(a){var c=this[a],b;if(c){for(b in c){this.clearBlocks(a,b)}}},clearBlocks:function(c,g){var h=this[c],b=h&&h[g],d,e,a;if(b){delete h[g];d=this.context;for(a in b){e=b[a];--d.blockCount;if(!--e.blockCount&&!e.pending&&!e.done){d.queueLayout(e)}}}},block:function(a,b){this.addBlock("blocks",a,b)},domBlock:function(a,b){this.addBlock("domBlocks",a,b)},fireTriggers:function(b,g){var h=this[b],d=h&&h[g],c=this.context,e,a;if(d){for(a in d){e=d[a];++e.firedTriggers;if(!e.done&&!e.blockCount&&!e.pending){c.queueLayout(e)}}}},flush:function(){var b=this,a=b.dirty,c=b.state,d=b.el;b.dirtyCount=0;if(b.classList&&b.classList.dirty){b.classList.flush()}if("attributes" in b){d.set(b.attributes);delete b.attributes}if("innerHTML" in b){d.innerHTML=b.innerHTML;delete b.innerHTML}if(c&&c.clearBoxWidth){c.clearBoxWidth=0;b.el.setStyle("width",null);if(!--c.blocks){b.context.queueItemLayouts(b)}}if(a){delete b.dirty;b.writeProps(a,true)}},flushAnimations:function(){var o=this,c=o.lastBox,l,n,e,h,g,d,i,m,k,a,b;if(c){l=o.target;n=l.layout&&l.layout.animate;if(n){e=Ext.isNumber(n)?n:n.duration}h=Ext.Object.getKeys(o.animatePolicy);g=Ext.apply({},{from:{},to:{},duration:e||Ext.fx.Anim.prototype.duration},n);for(d=0,i=0,m=h.length;i<m;i++){k=h[i];a=c[k];b=o.peek(k);if(a!=b){k=o.translateProps[k]||k;g.from[k]=a;g.to[k]=b;++d}}if(d){if(o.isCollapsingOrExpanding===1){l.componentLayout.undoLayout(o)}else{o.writeProps(g.from)}o.el.animate(g);Ext.fx.Manager.getFxQueue(o.el.id)[0].on({afteranimate:function(){if(o.isCollapsingOrExpanding===1){l.componentLayout.redoLayout(o);l.afterCollapse(true)}else{if(o.isCollapsingOrExpanding===2){l.afterExpand(true)}}}})}}},getBorderInfo:function(){var a=this,b=a.borderInfo;if(!b){a.borderInfo=b=a.checkCache("borderInfo")}return b},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(c,a){var e=this,g,d,b;if(c){if(c.dom){d=c}else{g=e.target;if(a){g=a}d=g[c];if(typeof d=="function"){d=d.call(g);if(d===e.el){return this}}}if(d){b=e.context.getEl(e,d)}}return b||null},getFraming:function(){var a=this;if(!a.framingInfo){a.framingInfo=a.target.frameSize||a.noFraming}return a.framingInfo},getFrameInfo:function(){var b=this,c=b.frameInfo,d,a;if(!c){d=b.getFraming();a=b.getBorderInfo();b.frameInfo=c={top:d.top+a.top,right:d.right+a.right,bottom:d.bottom+a.bottom,left:d.left+a.left,width:d.width+a.width,height:d.height+a.height}}return c},getMarginInfo:function(){var d=this,h=d.marginInfo,b,a,g,e,c;if(!h){if(!d.wrapsComponent){h=d.checkCache("marginInfo")}else{b=d.target;e=b.ownerLayout;c=e?e.id:null;a=e&&e.manageMargins;h=b.margin$;if(h&&h.ownerId!==c){h=null}if(!h){h=d.parseMargins(b.margin)||d.checkCache("marginInfo");if(a){g=d.parseMargins(b.margins,e.defaultMargins);if(g){h={top:h.top+g.top,right:h.right+g.right,bottom:h.bottom+g.bottom,left:h.left+g.left}}d.setProp("margin-top",0);d.setProp("margin-right",0);d.setProp("margin-bottom",0);d.setProp("margin-left",0)}h.ownerId=c;b.margin$=h}h.width=h.left+h.right;h.height=h.top+h.bottom}d.marginInfo=h}return h},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var a=this,b=a.paddingInfo;if(!b){a.paddingInfo=b=a.checkCache("paddingInfo")}return b},getProp:function(c){var b=this,a=b.props[c];b.addTrigger(c);return a},getDomProp:function(c){var b=this,a=(b.dirty&&(c in b.dirty))?undefined:b.props[c];b.addTrigger(c,true);return a},getStyle:function(a){var c=this,b=c.styles,e,d;if(a in b){d=b[a]}else{e=c.styleInfo[a];d=c.el.getStyle(a);if(e&&e.parseInt){d=parseInt(d,10)||0}b[a]=d}return d},getStyles:function(p,b){var m=this,e=m.styles,q={},g=0,d=p.length,k,j,l,a,c,h,r,o;b=b||p;for(k=0;k<d;++k){a=p[k];if(a in e){q[b[k]]=e[a];++g;if(k&&g==1){j=p.slice(0,k);l=b.slice(0,k)}}else{if(g){(j||(j=[])).push(a);(l||(l=[])).push(b[k])}}}if(g<d){j=j||p;l=l||b;h=m.styleInfo;r=m.el.getStyle(j);for(k=j.length;k--;){a=j[k];c=h[a];o=r[a];if(c&&c.parseInt){o=parseInt(o,10)||0}q[l[k]]=o;e[a]=o}}return q},hasProp:function(b){var a=this.getProp(b);return typeof a!="undefined"},hasDomProp:function(b){var a=this.getDomProp(b);return typeof a!="undefined"},invalidate:function(a){this.context.queueInvalidate(this,a)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var a=this.boxParent,b=this.state;if(a&&a.widthModel.shrinkWrap&&!b.boxMeasured&&this.measuresBox){b.boxMeasured=1;a.boxChildMeasured()}},parseMargins:function(d,c){if(d===true){d=5}var b=typeof d,a;if(b=="string"||b=="number"){a=Ext.util.Format.parseBox(d)}else{if(d||c){a={top:0,right:0,bottom:0,left:0};if(c){Ext.apply(a,this.parseMargins(c))}Ext.apply(a,d)}}return a},peek:function(a){return this.props[a]},recoverProp:function(g,b,a){var e=this,d=e.props,c;if(g in b){d[g]=b[g];if(a&&g in a){c=e.dirty||(e.dirty={});c[g]=a[g]}}},redo:function(b){var e=this,c,a,d;e.revertProps(e.props);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].redo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].redo()}}},revertProps:function(d){var a,b=this.flushedProps,c={};for(a in d){if(b.hasOwnProperty(a)){c[a]=d[a]}}this.writeProps(c)},setAttribute:function(a,c){var b=this;if(!b.attributes){b.attributes={}}b.attributes[a]=c;b.markDirty()},setBox:function(b){var a=this;if("left" in b){a.setProp("x",b.left)}if("top" in b){a.setProp("y",b.top)}a.setSize(b.width,b.height)},setContentHeight:function(a,b){if(!b&&this.hasRawContent){return 1}return this.setProp("contentHeight",a)},setContentWidth:function(b,a){if(!a&&this.hasRawContent){return 1}return this.setProp("contentWidth",b)},setContentSize:function(c,a,b){return this.setContentWidth(c,b)+this.setContentHeight(a,b)==2},setProp:function(d,c,a){var b=this,h=typeof c,g,e;if(h=="undefined"||(h==="number"&&isNaN(c))){return 0}if(b.props[d]===c){return 1}b.props[d]=c;++b.context.progressCount;if(a===false){b.fireTriggers("domTriggers",d);b.clearBlocks("domBlocks",d)}else{e=b.styleInfo[d];if(e){if(!b.dirty){b.dirty={}}if(d=="width"||d=="height"){g=b.isBorderBoxValue;if(g==null){b.isBorderBoxValue=g=!!b.el.isBorderBox()}if(!g){b.borderInfo||b.getBorderInfo();b.paddingInfo||b.getPaddingInfo()}}b.dirty[d]=c;b.markDirty()}}b.fireTriggers("triggers",d);b.clearBlocks("blocks",d);return 1},setHeight:function(a,c){var e=this,b=e.target,h,d,g;if(a<0){a=0}if(!e.wrapsComponent){if(!e.setProp("height",a,c)){return NaN}}else{a=Ext.Number.constrain(a,b.minHeight||0,b.maxHeight);if(!e.setProp("height",a,c)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();h.setHeight(a-d.height,c)}}return a},setWidth:function(c,b){var e=this,a=e.target,h,d,g;if(c<0){c=0}if(!e.wrapsComponent){if(!e.setProp("width",c,b)){return NaN}}else{c=Ext.Number.constrain(c,a.minWidth||0,a.maxWidth);if(!e.setProp("width",c,b)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();h.setWidth(c-d.width,b)}}return c},setSize:function(c,a,b){this.setWidth(c,b);this.setHeight(a,b)},translateProps:{x:"left",y:"top"},undo:function(b){var e=this,c,a,d;e.revertProps(e.lastBox);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].undo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].undo()}}},unsetProp:function(b){var a=this.dirty;delete this.props[b];if(a){delete a[b]}},writeProps:function(e,d){if(!(e&&typeof e=="object")){return}var C=this,c=C.el,i={},h=0,b=C.styleInfo,B,n,r,m="x" in e,l="y" in e,k=e.x,j=e.y,t=e.width,p=e.height,A=C.isBorderBoxValue,D=C.target,v=Math.max,z=0,o=0,g,a,s,u,w,q;if("displayed" in e){c.setDisplayed(e.displayed)}for(n in e){if(d){C.fireTriggers("domTriggers",n);C.clearBlocks("domBlocks",n);C.flushedProps[n]=1}B=b[n];if(B&&B.dom){if(B.suffix&&(r=parseInt(e[n],10))){i[n]=r+B.suffix}else{i[n]=e[n]}++h}}if(m||l){if(D.isComponent){D.setPosition(k||C.props.x,j||C.props.y)}else{if(m){i.left=k+"px";++h}if(l){i.top=j+"px";++h}}}if(!A&&(t>0||p>0)){if(!C.frameBodyContext){z=C.paddingInfo.width;o=C.paddingInfo.height}if(t){t=v(parseInt(t,10)-(C.borderInfo.width+z),0);i.width=t+"px";++h}if(p){p=v(parseInt(p,10)-(C.borderInfo.height+o),0);i.height=p+"px";++h}}if(C.wrapsComponent&&Ext.isIE9&&Ext.isStrict){if((g=t!==undefined&&C.hasOverflowY)||(a=p!==undefined&&C.hasOverflowX)){s=C.isAbsolute;if(s===undefined){s=false;q=C.target.getTargetEl();w=q.getStyle("position");if(w=="absolute"){w=q.getStyle("box-sizing");s=(w=="border-box")}C.isAbsolute=s}if(s){u=Ext.getScrollbarSize();if(g){t=parseInt(t,10)+u.width;i.width=t+"px";++h}if(a){p=parseInt(p,10)+u.height;i.height=p+"px";++h}}}}if(h){c.setStyle(i)}}},function(){var c={dom:true,parseInt:true,suffix:"px"},b={dom:true},a={dom:false};this.prototype.styleInfo={childrenDone:a,componentChildrenDone:a,containerChildrenDone:a,containerLayoutDone:a,displayed:a,done:a,x:a,y:a,columnWidthsDone:a,left:c,top:c,right:c,bottom:c,width:c,height:c,"border-top-width":c,"border-right-width":c,"border-bottom-width":c,"border-left-width":c,"margin-top":c,"margin-right":c,"margin-bottom":c,"margin-left":c,"padding-top":c,"padding-right":c,"padding-bottom":c,"padding-left":c,"line-height":b,display:b}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],remainingLayouts:0,state:0,constructor:function(a){var b=this;Ext.apply(b,a);b.items={};b.layouts={};b.blockCount=0;b.cycleCount=0;b.flushCount=0;b.calcCount=0;b.animateQueue=b.newQueue();b.completionQueue=b.newQueue();b.finalizeQueue=b.newQueue();b.finishQueue=b.newQueue();b.flushQueue=b.newQueue();b.invalidateData={};b.layoutQueue=b.newQueue();b.invalidQueue=[];b.triggers={data:{},dom:{}}},callLayout:function(b,a){this.currentLayout=b;b[a](this.getCmp(b.owner))},cancelComponent:function(j,a,m){var p=this,h=j,l=!j.isComponent,b=l?h.length:1,d,c,o,n,g,s,q,r,t,e;for(d=0;d<b;++d){if(l){j=h[d]}if(m&&j.ownerCt){e=this.items[j.ownerCt.el.id];if(e){Ext.Array.remove(e.childItems,p.getCmp(j))}}if(!a){q=p.invalidQueue;o=q.length;if(o){p.invalidQueue=s=[];for(c=0;c<o;++c){r=q[c];t=r.item.target;if(t!=j&&!t.isDescendant(j)){s.push(r)}}}}g=j.componentLayout;p.cancelLayout(g);if(g.getLayoutItems){n=g.getLayoutItems();if(n.length){p.cancelComponent(n,true)}}if(j.isContainer&&!j.collapsed){g=j.layout;p.cancelLayout(g);n=g.getVisibleItems();if(n.length){p.cancelComponent(n,true)}}}},cancelLayout:function(b){var a=this;a.completionQueue.remove(b);a.finalizeQueue.remove(b);a.finishQueue.remove(b);a.layoutQueue.remove(b);if(b.running){a.layoutDone(b)}b.ownerContext=null},clearTriggers:function(g,h){var a=g.id,e=this.triggers[h?"dom":"data"],j=e&&e[a],b=(j&&j.length)||0,e,d,k,c;for(d=0;d<b;++d){c=j[d];k=c.item;e=h?k.domTriggers:k.triggers;delete e[c.prop][a]}},flush:function(){var d=this,a=d.flushQueue.clear(),c=a.length,b;if(c){++d.flushCount;for(b=0;b<c;++b){a[b].flush()}}},flushAnimations:function(){var d=this,b=d.animateQueue.clear(),a=b.length,c;if(a){for(c=0;c<a;c++){if(b[c].target.animate!==false){b[c].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var h=this,a=h.invalidQueue,g=a&&a.length,b,e,d,c;h.invalidQueue=[];if(g){e=[];for(c=0;c<g;++c){b=(d=a[c]).item.target;if(!b.container.isDetachedBody){e.push(b);if(d.options){h.invalidateData[b.id]=d.options}}}h.invalidate(e,null)}},flushLayouts:function(h,a,c){var g=this,j=c?g[h].items:g[h].clear(),e=j.length,b,d;if(e){for(b=0;b<e;++b){d=j[b];if(!d.running){g.callLayout(d,a)}}g.currentLayout=null}},getCmp:function(a){return this.getItem(a,a.el)},getEl:function(b,a){var c=this.getItem(a,a);if(!c.parent){c.parent=b;if(b.children.length){b.children.push(c)}else{b.children=[c]}}return c},getItem:function(d,b){var e=b.id,a=this.items,c=a[e]||(a[e]=new Ext.layout.ContextItem({context:this,target:d,el:b}));return c},handleFailure:function(){var c=this.layouts,b,a;Ext.failedLayouts=(Ext.failedLayouts||0)+1;for(a in c){b=c[a];if(c.hasOwnProperty(a)){b.running=false;b.ownerContext=null}}},invalidate:function(n,p){var r=this,o=!n.isComponent,e,g,c,a,j,m,s,q,b,k,l,h,d;for(j=0,b=o?n.length:1;j<b;++j){m=o?n[j]:n;if(m.rendered&&!m.hidden){s=r.getCmp(m);k=m.componentLayout;a=!k.ownerContext;l=(m.isContainer&&!m.collapsed)?m.layout:null;h=r.invalidateData[s.id];delete r.invalidateData[s.id];d=s.init(p,h);if(h){r.processInvalidate(h,s,"before")}if(k.beforeLayoutCycle){k.beforeLayoutCycle(s)}d=s.initContinue(d);e=g=c=true;if(k.getLayoutItems){k.renderChildren();q=k.getLayoutItems();if(q.length){r.invalidate(q,true);e=false}}if(l){c=false;l.renderChildren();q=l.getVisibleItems();if(q.length){r.invalidate(q,true);g=false}}s.initDone(d,e,g,c);r.resetLayout(k,s,a);if(l){r.resetLayout(l,s,a)}s.initAnimation();if(h){r.processInvalidate(h,s,"after")}}}r.currentLayout=null},layoutDone:function(b){var c=b.ownerContext,a;b.running=false;if(b.isComponentLayout){if(c.measuresBox){c.onBoxMeasured()}c.setProp("done",true);a=c.ownerCtContext;if(a){if(c.target.ownerLayout.isComponentLayout){if(!--a.remainingComponentChildLayouts){a.setProp("componentChildrenDone",true)}}else{if(!--a.remainingContainerChildLayouts){a.setProp("containerChildrenDone",true)}}if(!--a.remainingChildLayouts){a.setProp("childrenDone",true)}}}else{c.setProp("containerLayoutDone",true)}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},processInvalidate:function(b,e,a){if(b[a]){var d=this,c=d.currentLayout;d.currentLayout=b.layout||null;b[a](e,b);d.currentLayout=c}},queueAnimation:function(a){this.animateQueue.add(a)},queueCompletion:function(a){this.completionQueue.add(a)},queueFinalize:function(a){this.finalizeQueue.add(a)},queueFlush:function(a){this.flushQueue.add(a)},chainFns:function(a,i,g){var d=this,c=a.layout,e=i.layout,b=a[g],h=i[g];return function(j){var k=d.currentLayout;if(b){d.currentLayout=c;b.call(a.scope||a,j,a)}d.currentLayout=e;h.call(i.scope||i,j,i);d.currentLayout=k}},queueInvalidate:function(k,l){var h=this,j=[],i=h.invalidQueue,g=i.length,d,b,e,a,c;if(k.isComponent){k=h.getCmp(d=k)}else{d=k.target}k.invalid=true;while(g--){b=i[g];e=b.item.target;if(d.isDescendant(e)){return}if(e==d){if(!(a=b.options)){b.options=l}else{if(l){if(l.widthModel){a.widthModel=l.widthModel}if(l.heightModel){a.heightModel=l.heightModel}if(!(c=a.state)){a.state=l.state}else{if(l.state){Ext.apply(c,l.state)}}if(l.before){a.before=h.chainFns(a,l,"before")}if(l.after){a.after=h.chainFns(a,l,"after")}}}return}if(!e.isDescendant(d)){j.push(b)}}j.push({item:k,options:l});h.invalidQueue=j},queueItemLayouts:function(c){var a=c.isComponent?c:c.target,b=a.componentLayout;if(!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}b=a.layout;if(b&&!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}},queueLayout:function(a){this.layoutQueue.add(a);a.pending=true},resetLayout:function(c,d,e){var b=this,a;b.currentLayout=c;c.done=false;c.pending=true;c.firedTriggers=0;b.layoutQueue.add(c);if(e){b.layouts[c.id]=c;c.running=true;if(c.finishedLayout){b.finishQueue.add(c)}++b.remainingLayouts;++c.layoutCount;c.ownerContext=d;c.beginCount=0;c.blockCount=0;c.calcCount=0;c.triggerCount=0;if(c.isComponentLayout&&(a=d.ownerCtContext)){if(d.target.ownerLayout.isComponentLayout){++a.remainingComponentChildLayouts}else{++a.remainingContainerChildLayouts}++a.remainingChildLayouts}if(!c.initialized){c.initLayout()}c.beginLayout(d)}else{++c.beginCount;if(!c.running){++b.remainingLayouts;c.running=true;if(c.isComponentLayout){d.unsetProp("done");a=d.ownerCtContext;if(a){if(d.target.ownerLayout.isComponentLayout){if(++a.remainingComponentChildLayouts==1){a.unsetProp("componentChildrenDone")}}else{if(++a.remainingContainerChildLayouts==1){a.unsetProp("containerChildrenDone")}}if(++a.remainingChildLayouts==1){a.unsetProp("childrenDone")}}}b.completionQueue.remove(c);b.finalizeQueue.remove(c)}}c.beginLayoutCycle(d,e)},run:function(){var c=this,b=false,a=100;c.flushInvalidates();c.state=1;c.totalCount=c.layoutQueue.getCount();c.flush();while((c.remainingLayouts||c.invalidQueue.length)&&a--){if(c.invalidQueue.length){c.flushInvalidates()}if(c.runCycle()){b=false}else{if(!b){c.flush();b=true;c.flushLayouts("completionQueue","completeLayout")}else{c.state=2;break}}if(!(c.remainingLayouts||c.invalidQueue.length)){c.flush();c.flushLayouts("completionQueue","completeLayout");c.flushLayouts("finalizeQueue","finalizeLayout")}}return c.runComplete()},runComplete:function(){var a=this;a.state=2;if(a.remainingLayouts){a.handleFailure();return false}a.flush();a.flushLayouts("finishQueue","finishedLayout",true);a.flushLayouts("finishQueue","notifyOwner");a.flush();a.flushAnimations();return true},runCycle:function(){var c=this,d=c.layoutQueue.clear(),b=d.length,a;++c.cycleCount;c.progressCount=0;for(a=0;a<b;++a){c.runLayout(c.currentLayout=d[a])}c.currentLayout=null;return c.progressCount>0},runLayout:function(b){var a=this,c=a.getCmp(b.owner);b.pending=false;if(c.state.blocks){return}b.done=true;++b.calcCount;++a.calcCount;b.calculate(c);if(b.done){a.layoutDone(b);if(b.completeLayout){a.queueCompletion(b)}if(b.finalizeLayout){a.queueFinalize(b)}}else{if(!b.pending&&!b.invalid&&!(b.blockCount+b.triggerCount-b.firedTriggers)){a.queueLayout(b)}}},setItemSize:function(h,g,b){var d=h,a=1,c,e;if(h.isComposite){d=h.elements;a=d.length;h=d[0]}else{if(!h.dom&&!h.el){a=d.length;h=d[0]}}for(e=0;e<a;){c=this.get(h);c.setSize(g,b);h=d[++e]}}});Ext.define("Ext.layout.component.Tab",{extend:"Ext.layout.component.Button",alias:"layout.tab",beginLayout:function(c){var b=this,a=b.owner.closable;if(b.lastClosable!==a){b.lastClosable=a;b.clearTargetCache()}b.callParent(arguments)}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:"Ext.layout.component.field.Field",type:"sliderfield",beginLayout:function(a){this.callParent(arguments);a.endElContext=a.getEl("endEl");a.innerElContext=a.getEl("innerEl");a.bodyElContext=a.getEl("bodyEl")},publishInnerHeight:function(d,a){var e=a-this.measureLabelErrorHeight(d),c,b;if(this.owner.vertical){c=d.endElContext.getPaddingInfo();b=d.inputContext.getPaddingInfo();d.innerElContext.setHeight(e-b.height-c.height)}else{d.bodyElContext.setHeight(e)}},publishInnerWidth:function(d,c){if(!this.owner.vertical){var b=d.endElContext.getPaddingInfo(),a=d.inputContext.getPaddingInfo();d.innerElContext.setWidth(c-a.left-b.right-d.labelContext.getProp("width"))}},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.owner.bodyEl.setStyle("padding-right",c+"px")}b.callParent(arguments)}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:"Ext.layout.container.Anchor",alternateClassName:"Ext.layout.AbsoluteLayout",targetCls:Ext.baseCSSPrefix+"abs-layout-ct",itemCls:Ext.baseCSSPrefix+"abs-layout-item",ignoreOnContentChange:true,type:"absolute",adjustWidthAnchor:function(c,b){var d=this.targetPadding,a=b.getStyle("left");return c-a+d.left},adjustHeightAnchor:function(b,a){var c=this.targetPadding,d=a.getStyle("top");return b-d+c.top},isItemLayoutRoot:function(a){return this.ignoreOnContentChange||this.callParent(arguments)},isItemShrinkWrap:function(a){return true},beginLayout:function(b){var a=this,c=a.getTarget();a.callParent(arguments);if(c.dom!==document.body){c.position()}a.targetPadding=b.targetContext.getPaddingInfo()},isItemBoxParent:function(a){return true},onContentChange:function(){if(this.ignoreOnContentChange){return false}return this.callParent(arguments)}});Ext.define("Ext.layout.container.Accordion",{extend:"Ext.layout.container.VBox",alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",itemCls:[Ext.baseCSSPrefix+"box-item",Ext.baseCSSPrefix+"accordion-item"],align:"stretch",fill:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:true,activeOnTop:false,multi:false,defaultAnimatePolicy:{y:true,height:true},constructor:function(){var a=this;a.callParent(arguments);if(a.animate){a.animatePolicy=Ext.apply({},a.defaultAnimatePolicy)}else{a.animatePolicy=null}},beforeRenderItems:function(b){var e=this,d=b.length,c=0,a;for(;c<d;c++){a=b[c];if(!a.rendered){if(e.collapseFirst){a.collapseFirst=e.collapseFirst}if(e.hideCollapseTool){a.hideCollapseTool=e.hideCollapseTool;a.titleCollapse=true}else{if(e.titleCollapse){a.titleCollapse=e.titleCollapse}}delete a.hideHeader;delete a.width;a.collapsible=true;a.title=a.title||"&#160;";a.addBodyCls(Ext.baseCSSPrefix+"accordion-body");if(!e.multi){if(e.expandedItem!==undefined){a.collapsed=true}else{if(a.hasOwnProperty("collapsed")&&a.collapsed===false){e.expandedItem=c}else{a.collapsed=true}}e.owner.mon(a,{show:e.onComponentShow,beforeexpand:e.onComponentExpand,scope:e})}if(e.fill){e.owner.mon(a,{beforecollapse:e.onComponentCollapse,scope:e})}}}if(d&&e.expandedItem===undefined){e.expandedItem=0;b[0].collapsed=false}},getItemsRenderTree:function(a){this.beforeRenderItems(a);return this.callParent(arguments)},renderItems:function(a,b){this.beforeRenderItems(a);this.callParent(arguments)},configureItem:function(a){this.callParent(arguments);a.animCollapse=a.border=false;if(this.fill){a.flex=1}},onChildPanelRender:function(a){a.header.addCls(Ext.baseCSSPrefix+"accordion-hd")},beginLayout:function(a){this.callParent(arguments);this.updatePanelClasses(a)},updatePanelClasses:function(e){var c=e.visibleItems,d=c.length,a=true,b,h,g;for(b=0;b<d;b++){h=c[b];g=h.header;g.addCls(Ext.baseCSSPrefix+"accordion-hd");if(a){g.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{g.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(b+1==d&&h.collapsed){g.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{g.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}a=h.collapsed}},onComponentExpand:function(h){var e=this,a=e.owner,c,g,d,b;if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;c=e.multi?[]:a.query(">panel:not([collapsed])");g=c.length;for(d=0;d<g;d++){c[d].collapse()}a.deferLayouts=b;e.processing=false}},onComponentCollapse:function(d){var e=this,a=e.owner,g,c,b;if(e.owner.items.getCount()===1){return false}if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;g=d.next()||d.prev();if(e.multi){c=e.owner.query(">panel:not([collapsed])");if(c.length===1){g.expand()}}else{if(g){g.expand()}}a.deferLayouts=b;e.processing=false}},onComponentShow:function(a){this.onComponentExpand(a)}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}">&#160;</div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",canResize:true,collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var d=this,e=d.getCollapseTarget(),g=d.getCollapseDirection(),c=d.vertical,b=c?"width":"height",h=c?"height":"width",a;d.callParent();if(!d.hasOwnProperty(h)){d[h]="100%"}if(!d.hasOwnProperty(b)){d[b]=5}if(e.collapsed){d.addCls(d.collapsedClsInternal)}a=d.baseCls+"-"+d.orientation;d.addCls(a);if(!d.canResize){d.addCls(a+"-noresize")}Ext.applyIf(d.renderData,{collapseDir:g,collapsible:d.collapsible||e.collapsible})},onRender:function(){var a=this;a.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(a.getCollapseTarget(),{collapse:a.onTargetCollapse,expand:a.onTargetExpand,scope:a});a.el.unselectable();if(a.canResize){a.tracker=Ext.create(a.getTrackerConfig());a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])}},getCollapseDirection:function(){var g=this,c=g.collapseDirection,e,a,b,d;if(!c){e=g.collapseTarget;if(e.isComponent){c=e.collapseDirection}if(!c){d=g.ownerCt.layout.type;if(e.isComponent){b=g.ownerCt.items;a=Number(b.indexOf(e)==b.indexOf(g)-1)<<1|Number(d=="hbox")}else{a=Number(g.collapseTarget=="prev")<<1|Number(d=="hbox")}c=["bottom","right","top","left"][a]}g.collapseDirection=c}g.orientation=(c=="top"||c=="bottom")?"horizontal":"vertical";g[g.orientation]=true;return c},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(d,b){var c=this.getCollapseTarget(),g=c.placeholder,a;if(g&&!g.hidden){a=true}else{a=!c.hidden}if(a){if(c.collapsed){c.expand()}else{if(c.collapseDirection){c.collapse()}else{c.collapse(this.renderData.collapseDir)}}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE&&a.el){a.el.repaint()}},beforeDestroy:function(){Ext.destroy(this.tracker);this.callParent()}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var a=this.callParent();a.xclass="Ext.resizer.BorderSplitterTracker";return a}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(m,b,w){var u=this,c=u.axisProps[w],r=!c.horizontal,l=c.sizeProp,p=0,a=m.childItems,g=a.length,t,q,o,h,s,e,k,n,d,v,j;for(q=0;q<g;++q){o=a[q];s=o.target;o.layoutPos={};if(s.region){o.region=e=s.region;o.isCenter=s.isCenter;o.isHorz=s.isHorz;o.isVert=s.isVert;o.weight=s.weight||u.regionWeights[e]||0;b[s.id]=o;if(s.isCenter){t=o;h=s.flex;m.centerRegion=t;continue}if(r!==o.isVert){continue}o.reverseWeighting=(e==c.borderEnd);n=s[l];d=typeof n;if(!s.collapsed){if(d=="string"&&(k=u.percentageRe.exec(n))){o.percentage=parseInt(k[1],10)}else{if(s.flex){p+=o.flex=s.flex}}}}}if(t){v=t.target;if(j=v.placeholderFor){if(!h&&r===j.collapsedVertical()){h=0;t.collapseAxis=w}}else{if(v.collapsed&&(r===v.collapsedVertical())){h=0;t.collapseAxis=w}}}if(h==null){h=1}p+=h;return Ext.apply({before:r?"top":"left",totalFlex:p},c)},beginLayout:function(d){var l=this,k=l.getLayoutItems(),e=l.padding,m=typeof e,p=false,q,o,b,h,g,a,c,j,n;if(e){if(m=="string"||m=="number"){e=Ext.util.Format.parseBox(e)}}else{e=d.getEl("getTargetEl").getPaddingInfo();p=true}d.outerPad=e;d.padOnContainer=p;for(h=0,b=k.length;h<b;++h){o=k[h];a=l.getSplitterTarget(o);if(a){j=!!o.hidden;if(!a.split){if(a.isCollapsingOrExpanding){c=!!a.collapsed}}else{if(j!==a.hidden){c=!a.hidden}}if(c===true){o.show()}else{if(c===false){o.hide()}}}}l.callParent(arguments);k=d.childItems;b=k.length;g={};d.borderAxisHorz=l.beginAxis(d,g,"horz");d.borderAxisVert=l.beginAxis(d,g,"vert");for(h=0;h<b;++h){q=k[h];a=l.getSplitterTarget(q.target);if(a){n=g[a.id];if(!n){n=d.getEl(a.el,l);n.region=a.region}q.collapseTarget=a=n;q.weight=a.weight;q.reverseWeighting=a.reverseWeighting;a.splitter=q;q.isHorz=a.isHorz;q.isVert=a.isVert}}l.sortWeightedItems(k,"reverseWeighting");l.setupSplitterNeighbors(k)},calculate:function(d){var m=this,a=m.getContainerSize(d),j=d.childItems,c=j.length,b=d.borderAxisHorz,k=d.borderAxisVert,e=d.outerPad,o=d.padOnContainer,h,q,l,p,n,g;b.begin=e.left;k.begin=e.top;n=b.end=b.flexSpace=a.width+(o?e.left:-e.right);g=k.end=k.flexSpace=a.height+(o?e.top:-e.bottom);for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.isHorz||q.isCenter){b.addUnflexed(l.width);n-=l.width}if(q.isVert||q.isCenter){k.addUnflexed(l.height);g-=l.height}if(!q.flex&&!q.percentage){if(q.isHorz||(q.isCenter&&q.collapseAxis==="horz")){p=q.getProp("width");b.addUnflexed(p);if(q.collapseTarget){n-=p}}else{if(q.isVert||(q.isCenter&&q.collapseAxis==="vert")){p=q.getProp("height");k.addUnflexed(p);if(q.collapseTarget){g-=p}}}}}for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.percentage){if(q.isHorz){p=Math.ceil(n*q.percentage/100);p=q.setWidth(p);b.addUnflexed(p)}else{if(q.isVert){p=Math.ceil(g*q.percentage/100);p=q.setHeight(p);k.addUnflexed(p)}}}}for(h=0;h<c;++h){q=j[h];if(!q.isCenter){m.calculateChildAxis(q,b);m.calculateChildAxis(q,k)}}if(m.finishAxis(d,k)+m.finishAxis(d,b)<2){m.done=false}else{m.finishPositions(j)}},calculateChildAxis:function(l,c){var a=l.collapseTarget,h="set"+c.sizePropCap,e=c.sizeProp,d=l.getMarginInfo()[e],j,b,g,i,k;if(a){j=a.region}else{j=l.region;g=l.flex}b=j==c.borderBegin;if(!b&&j!=c.borderEnd){l[h](c.end-c.begin-d);i=c.begin}else{if(g){k=Math.ceil(c.flexSpace*(g/c.totalFlex));k=l[h](k)}else{if(l.percentage){k=l.peek(e)}else{k=l.getProp(e)}}k+=d;if(b){i=c.begin;c.begin+=k}else{c.end=i=c.end-k}}l.layoutPos[c.posProp]=i},finishAxis:function(d,c){var b=c.end-c.begin,a=d.centerRegion;if(a){a["set"+c.sizePropCap](b-a.getMarginInfo()[c.sizeProp]);a.layoutPos[c.posProp]=c.begin}return Ext.isNumber(b)?1:0},finishPositions:function(d){var c=d.length,b,a;for(b=0;b<c;++b){a=d[b];a.setProp("x",a.layoutPos.x+a.marginInfo.left);a.setProp("y",a.layoutPos.y+a.marginInfo.top)}},getPlaceholder:function(a){return a.getPlaceholder&&a.getPlaceholder()},getSplitterTarget:function(b){var a=b.collapseTarget;if(a&&a.collapsed){return a.placeholder||a}return a},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},insertSplitter:function(c,b,e){var g=c.region,d={xtype:"bordersplitter",collapseTarget:c,id:c.id+"-splitter",hidden:e,canResize:c.splitterResize!==false},a=b+((g=="south"||g=="east")?0:1);if(c.isHorz){d.height=null}else{d.width=null}if(c.collapseMode=="mini"){d.collapsedCls=c.collapsedCls}c.splitter=this.owner.add(a,d)},onAdd:function(d,a){var c=this,h=d.placeholderFor,g=d.region,b,e;c.callParent(arguments);if(g){Ext.apply(d,c.regionFlags[g]);if(g=="center"){c.centerRegion=d}else{d.collapseDirection=this.collapseDirections[g];b=d.split;e=!!d.hidden;if((d.isHorz||d.isVert)&&(b||d.collapseMode=="mini")){c.insertSplitter(d,a,e||!b)}}if(!d.hasOwnProperty("collapseMode")){d.collapseMode=c.panelCollapseMode}if(!d.hasOwnProperty("animCollapse")){if(d.collapseMode!="placeholder"){d.animCollapse=false}else{d.animCollapse=c.panelCollapseAnimate}}}else{if(h){Ext.apply(d,c.regionFlags[h.region]);d.region=h.region;d.weight=h.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(b){var a=this,d=b.region,c=b.splitter;if(d){if(b.isCenter){a.centerRegion=null}delete b.isCenter;delete b.isHorz;delete b.isVert;if(c){a.owner.doRemove(c,true);delete b.splitter}}a.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(m){var p={},e=m.length,o=this.touchedRegions,h,g,a,l,d,k,n,b,c;for(h=0;h<e;++h){k=m[h].target;n=k.region;if(k.isCenter){a=k}else{if(n){c=o[n];for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(k)}}if(k.placeholderFor){b=k.placeholderFor.splitter}else{b=k.splitter}if(b){b.neighbors=[]}p[n]=b}}}if(a){c=o.center;for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(a)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{setsWidth:1,setsHeight:0},horz:{setsWidth:0,setsHeight:1},flexAll:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(e){var d=this,a=this.sizePolicies,c,b,g,h;if(e.isCenter){h=e.placeholderFor;if(h){if(h.collapsedVertical()){return a.vert}return a.horz}if(e.collapsed){if(e.collapsedVertical()){return a.vert}return a.horz}return a.flexAll}c=e.collapseTarget;if(c){return c.isVert?a.vert:a.horz}if(e.region){if(e.isVert){b=e.height;g=a.vert}else{b=e.width;g=a.horz}if(e.flex||(typeof b=="string"&&d.percentageRe.test(b))){return a.flexAll}return g}return d.autoSizePolicy}},function(){var a={addUnflexed:function(c){this.flexSpace=Math.max(this.flexSpace-c,0)}},b=this.prototype.axisProps;Ext.apply(b.horz,a);Ext.apply(b.vert,a)});Ext.define("Ext.layout.container.Card",{extend:"Ext.layout.container.Fit",alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var a=this,b=a.getActiveItem();if(b){if(b.hasListeners.beforeactivate&&b.fireEvent("beforeactivate",b)===false){b=a.activeItem=a.owner.activeItem=null}else{if(b.hasListeners.activate){b.on({boxready:function(){b.fireEvent("activate",b)},single:true})}}if(a.deferredRender){if(b){return a.getItemsRenderTree([b])}}else{return a.callParent(arguments)}}},renderChildren:function(){var a=this,b=a.getActiveItem();if(!a.deferredRender){a.callParent()}else{if(b){a.renderItems([b],a.getRenderTarget())}}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var b=this,a=b.parseActiveItem(b.activeItem||(b.owner&&b.owner.activeItem));if(a&&b.owner.items.indexOf(a)!=-1){b.activeItem=a}else{b.activeItem=null}return b.activeItem},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},configureItem:function(a){if(a===this.getActiveItem()){a.hidden=false}else{a.hidden=true}this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.activeItem){b.activeItem=null}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)},setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,g=a.rendered,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;Ext.suspendLayouts();b=a.add(b);Ext.resumeLayouts()}if(b&&d!=b){if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}if(g){Ext.suspendLayouts();if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length)}if(d){if(e.hideInactive){d.hide();d.hiddenByLayout=true}d.fireEvent("deactivate",d,b)}if(b.hidden){b.show()}if(!b.hidden){e.activeItem=b}Ext.resumeLayouts(true)}else{e.activeItem=b}b.fireEvent("activate",b,d);return e.activeItem}return false}});Ext.define("Ext.layout.container.Column",{extend:"Ext.layout.container.Container",alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",columnWidthSizePolicy:{setsWidth:1,setsHeight:0},childEls:["innerCt"],manageOverflow:2,renderTpl:['<div id="{ownerId}-innerCt" class="',Ext.baseCSSPrefix,'column-inner">',"{%this.renderBody(out,values)%}",'<div class="',Ext.baseCSSPrefix,'clear"></div>',"</div>","{%this.renderPadder(out,values)%}"],getItemSizePolicy:function(a){if(a.columnWidth){return this.columnWidthSizePolicy}return this.autoSizePolicy},beginLayout:function(){this.callParent(arguments);this.innerCt.dom.style.width=""},calculate:function(c){var a=this,d=a.getContainerSize(c),b=c.state;if(b.calculatedColumns||(b.calculatedColumns=a.calculateColumns(c))){if(a.calculateHeights(c)){a.calculateOverflow(c,d);return}}a.done=false},calculateColumns:function(d){var m=this,a=m.getContainerSize(d),o=d.getEl("innerCt",m),l=d.childItems,j=l.length,b=0,g,n,e,c,h,k;if(!d.heightModel.shrinkWrap&&!d.targetContext.hasProp("height")){return false}if(!a.gotWidth){d.targetContext.block(m,"width");g=true}else{n=a.width;o.setWidth(n)}for(e=0;e<j;++e){c=l[e];h=c.getMarginInfo().width;if(!c.widthModel.calculated){k=c.getProp("width");if(typeof k!="number"){c.block(m,"width");g=true}b+=k+h}}if(!g){n=(n<b)?0:n-b;for(e=0;e<j;++e){c=l[e];if(c.widthModel.calculated){h=c.marginInfo.width;k=c.target.columnWidth;k=Math.floor(k*n)-h;k=c.setWidth(k);b+=k+h}}d.setContentWidth(b)}return !g},calculateHeights:function(h){var g=this,b=h.childItems,a=b.length,c,d,e;c=false;for(d=0;d<a;++d){e=b[d];if(!e.hasDomProp("height")){e.domBlock(g,"height");c=true}}if(!c){h.setContentHeight(g.innerCt.getHeight()+h.targetContext.getPaddingInfo().height)}return !c},finishedLayout:function(a){var b=a.bodyContext;if(b&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)){b.el.repaint()}this.callParent(arguments)},getRenderTarget:function(){return this.innerCt}});Ext.define("Ext.layout.container.Form",{alias:"layout.form",extend:"Ext.layout.container.Auto",alternateClassName:"Ext.layout.FormLayout",tableCls:Ext.baseCSSPrefix+"form-layout-table",type:"form",manageOverflow:2,childEls:["formTable"],padRow:'<tr><td class="'+Ext.baseCSSPrefix+'form-item-pad" colspan="3"></td></tr>',renderTpl:['<table id="{ownerId}-formTable" class="{tableCls}" style="width:100%" cellpadding="0">',"{%this.renderBody(out,values)%}","</table>","{%this.renderPadder(out,values)%}"],getRenderData:function(){var a=this.callParent();a.tableCls=this.tableCls;return a},calculate:function(e){var d=this,h=d.getContainerSize(e,true),a,g,b=0,c;if(h.gotWidth){this.callParent(arguments);a=d.formTable.dom.offsetWidth;g=e.childItems;for(c=g.length;b<c;++b){g[b].setWidth(a,false)}}else{d.done=false}},getRenderTarget:function(){return this.formTable},getRenderTree:function(){var d=this,b=d.callParent(arguments),c,a;for(c=0,a=b.length;c<a;c++){b[c]=d.transformItemRenderTree(b[c])}return b},transformItemRenderTree:function(a){if(a.tag&&a.tag=="table"){a.tag="tbody";delete a.cellspacing;delete a.cellpadding;if(Ext.isIE6){a.cn=this.padRow}return a}return{tag:"tbody",cn:{tag:"tr",cn:{tag:"td",colspan:3,style:"width:100%",cn:a}}}},isValidParent:function(b,c,a){return true},isItemShrinkWrap:function(a){return((a.shrinkWrap===true)?3:a.shrinkWrap||0)&2},getItemSizePolicy:function(a){return{setsWidth:1,setsHeight:0}}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,tooltipType:"qtip",arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}" />',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(a.activated&&(!a.menu.rendered||!a.menu.isVisible())){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var a;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){a=this.up(":not([hidden])");if(a){a.focus()}}},expandMenu:function(a){var b=this;if(b.menu){b.cancelDeferHide();if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"],d;b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){d=b.menu;delete b.menu;b.setMenu(d)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onRemoved:function(){var a=this;if(a.activated&&a.parentMenu.activeItem===a){a.parentMenu.deactivateActiveItem()}a.callParent(arguments);delete a.parentMenu;delete a.ownerButton},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}a.callParent()},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);a.cancelDeferHide();clearTimeout(a.deferHideParentMenusTimer);a.setMenu(null);a.callParent(arguments)},beforeRender:function(){var b=this,d=Ext.BLANK_IMAGE_URL,a,c;b.callParent();if(b.iconAlign==="right"){a=b.checkChangeDisabled?b.disabledCls:"";c=Ext.baseCSSPrefix+"menu-item-icon-right "+b.iconCls}else{a=b.iconCls+(b.checkChangeDisabled?" "+b.disabledCls:"");c=b.menu?b.arrowCls:""}Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||d,iconCls:a,plain:b.plain,text:b.text,arrowCls:c,blank:d})},onRender:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.setTooltip(a.tooltip,true)}},setMenu:function(e,d){var c=this,b=c.menu,a=c.arrowEl;if(b){delete b.parentItem;delete b.parentMenu;delete b.ownerCt;delete b.ownerItem;if(d===true||(d!==false&&c.destroyMenu)){Ext.destroy(b)}}if(e){c.menu=Ext.menu.Manager.get(e);c.menu.ownerItem=c}else{c.menu=null}if(c.rendered&&!c.destroying&&a){a[c.menu?"addCls":"removeCls"](c.arrowCls)}},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIcon:function(b){var a=this.iconEl;if(a){a.src=b||Ext.BLANK_IMAGE_URL}this.icon=b},setIconCls:function(b){var c=this,a=c.iconEl;if(a){if(c.iconCls){a.removeCls(c.iconCls)}if(b){a.addCls(b)}}c.iconCls=b},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.updateLayout()}},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.itemEl.id},c));b.tooltip=c}else{b.itemEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var a=this;a.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true);if(a.checkChangeDisabled){a.disableCheckChange()}},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.addCls(b.disabledCls)}if(!(Ext.isIE9&&Ext.isStrict)&&b.rendered){b.el.repaint()}b.checkChangeDisabled=true},enableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.removeCls(b.disabledCls)}b.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g,e;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",beforeRender:function(a,c){var b=this;b.callParent();b.addCls(b.separatorCls)}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],enableKeyNav:true,allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[],e=b.floating!==false;b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");if(!b.layout){b.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(e&&b.minWidth===undefined){b.minWidth=b.defaultMinWidth}if(!e&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var g=!!b.items.length;if(g&&b.rendered){b.el.setStyle("visibility",null)}return g})},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var a=this,b;a.callParent(arguments);if(a.showSeparator){b={cls:Ext.baseCSSPrefix+"menu-icon-separator",html:"&#160;"};if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){b.style="height:"+a.el.getHeight()+"px"}a.iconSepEl=a.layout.getElementTarget().insertFirst(b)}a.mon(a.el,{click:a.onClick,mouseover:a.onMouseOver,scope:a});a.mouseMonitor=a.el.monitorMouseLeave(100,a.onMouseLeave,a);if(a.enableKeyNav){a.keyNav=new Ext.menu.KeyNav(a)}},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(b){var c=this,d=c.activeItem,a=c.focusedItem;if(d){d.deactivate();if(!d.activated){delete c.activeItem}}if(a&&b){a.blur();delete c.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(typeof b=="string"){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}a=(c.type==="click")?b.getItemFromEvent(c):b.activeItem;if(a&&a.isMenuItem){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}if(!a||a.disabled){a=undefined}b.fireEvent("click",b,a,c)},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);delete a.parentMenu;delete a.ownerButton;if(a.rendered){a.el.un(a.mouseMonitor);Ext.destroy(a.keyNav);delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(h){var g=this,i=h.getRelatedTarget(),b=!g.el.contains(i),d=g.getItemFromEvent(h),c=g.parentMenu,a=g.parentItem;if(b&&c){c.setActiveItem(a);a.cancelDeferHide();c.mouseMonitor.mouseenter()}if(g.disabled){return}if(d&&!d.activated){g.setActiveItem(d);if(d.activated&&d.expandMenu){d.expandMenu()}}if(b){g.fireEvent("mouseenter",g,h)}g.fireEvent("mouseover",g,d,h)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,d,c){var a=this;if(a.floating&&b){a.show();a.setPagePosition(a.el.getAlignToXY(b.el||b,d||a.defaultAlign,c));a.setVerticalPosition()}return a},show:function(){var d=this,c,b,a,e=d.maxHeight;if(!d.rendered){d.doAutoRender()}if(d.floating){c=Ext.fly(d.el.getScopeParent());b=c.getViewSize().height;d.maxHeight=Math.min(e||b,b)}a=d.callParent(arguments);d.maxHeight=e;return a},afterComponentLayout:function(c,a,b,e){var d=this;d.callParent(arguments);if(d.showSeparator){d.iconSepEl.setHeight(d.componentLayout.lastComponentSize.contentHeight)}},setVerticalPosition:function(){var d=this,g,e=d.el.getY(),h=e,j=d.getHeight(),b=Ext.Element.getViewportHeight().height,c=Ext.fly(d.el.getScopeParent()),a=c.getViewSize().height,i=e-c.getScroll().top;c=null;if(d.floating){g=d.maxHeight?d.maxHeight:a-i;if(j>a){h=e-i}else{if(g<j){h=e-(j-g)}else{if((e+j)>b){h=b-j}}}}d.el.setY(h)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:b.pickerId,xtype:"datepicker"},a)});b.callParent(arguments);b.picker=b.down("datepicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.tooltip=a.tooltip||a.qtip;a.callParent();a.on({element:"toolEl",click:a.onClick,mousedown:a.onMouseDown,mouseover:a.onMouseOver,mouseout:a.onMouseOut,scope:a})},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}},getFocusEl:function(){return this.el},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var a;a=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:"&#160;"});a.unselectable();a.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));a.show()},getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(i){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,h=i.getTarget(),b;if(c&&h===d.getSplitter().collapseEl.dom){return false}if(a.collapsed||g.collapsed){return false}d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=b=d.calculateConstrainRegion();if(!b){return false}d.createDragOverlay();return b},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=new Ext.util.Region(d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=new Ext.util.Region(c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=new Ext.util.Region(d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=new Ext.util.Region((e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(m,g){var o=this,a=o.getSplitter(),h=a.orientation,p=o.getPrevCmp(),n=o.getNextCmp(),b=a.ownerCt,k=b.query(">[flex]"),l=k.length,j=0,d,q,c=0;for(;j<l;j++){q=k[j].getWidth();c+=q;k[j].flex=q}g=g||o.getOffset("dragTarget");if(h==="vertical"){g=g[0];d="width"}else{d="height";g=g[1]}if(p){q=o.prevBox[d]+g;if(p.flex){p.flex=q}else{p[d]=q}}if(n){q=o.nextBox[d]-g;if(n.flex){n.flex=q}else{n[d]=q}}b.updateLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize(c,a.getOffset("dragTarget"))},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return this.splitter}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:"Ext.resizer.SplitterTracker",requires:["Ext.util.Region"],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var y=this,a=y.splitter,o=a.collapseTarget,d=a.defaultSplitMin,h=a.vertical?"Width":"Height",c="min"+h,u="max"+h,j="get"+h,t=a.neighbors,e=t.length,n=o.el.getBox(),g=n.x,p=n.y,x=n.right,k=n.bottom,r=a.vertical?(x-g):(k-p),w,l,m,v,s,q,b;m=(o[c]||Math.min(r,d))-r;v=o[u];if(!v){v=1000000000}else{v-=r}b=r;for(w=0;w<e;++w){l=t[w];r=l[j]();s=r-l[u];q=r-(l[c]||Math.min(r,d));if(!isNaN(s)){if(m<s){m=s}}if(v>q){v=q}}if(v-m<2){return null}n=new Ext.util.Region(p,x,k,g);y.constraintAdjusters[a.collapseDirection](n,m,v,a);y.dragInfo={minRange:m,maxRange:v,targetSize:b};return n},constraintAdjusters:{left:function(c,a,b,d){c[0]=c.x=c.left=c.right+a;c.right+=b+d.getWidth()},top:function(c,a,b,d){c[1]=c.y=c.top=c.bottom+a;c.bottom+=b+d.getHeight()},bottom:function(c,a,b,d){c.bottom=c.top-a;c.top-=b+d.getHeight()},right:function(c,a,b,d){c.right=c.left-a;c.left-=b+d.getWidth()}},onBeforeStart:function(h){var k=this,b=k.splitter,a=b.collapseTarget,m=b.neighbors,d=k.getSplitter().collapseEl,j=h.getTarget(),c=m.length,g,l;if(d&&j===b.collapseEl.dom){return false}if(a.collapsed){return false}for(g=0;g<c;++g){l=m[g];if(l.collapsed&&l.isHorz===a.isHorz){return false}}if(!(k.constrainTo=k.calculateConstrainRegion())){return false}k.createDragOverlay();return true},performResize:function(j,i){var k=this,b=k.splitter,h=b.collapseDirection,a=b.collapseTarget,g=k.splitAdjusters[b.vertical?"horz":"vert"],l=i[g.index],d=k.dragInfo,c;if(h=="right"||h=="bottom"){l=-l}l=Math.min(Math.max(d.minRange,l),d.maxRange);if(l){(c=b.ownerCt).suspendLayouts();g.adjustTarget(a,d.targetSize,l);c.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(b,a,c){b.flex=null;b.setSize(a+c)}},vert:{index:1,adjustTarget:function(b,a,c){b.flex=null;b.setSize(undefined,a+c)}}}});Ext.define("Ext.resizer.Handle",{extend:"Ext.Component",handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",beforeRender:function(){var a=this;a.callParent();a.addCls(a.baseHandleCls,a.baseHandleCls+"-"+a.region,a.handleCls)},onRender:function(){this.callParent(arguments);this.el.unselectable()}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this,c,a,e;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){c=d.minWidth/d.el.getWidth();a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.resetCls})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(s,m){var t=this,c=t.activeResizeHandle.region,g=t.getOffset(t.constrainTo?"dragTarget":null),k=t.startBox,h,p=0,u=0,j,q,a=0,w=0,v,n=g[0]<0?"right":"left",r=g[1]<0?"down":"up",i,b,d,o,l;switch(c){case"south":u=g[1];b=2;break;case"north":u=-g[1];w=-u;b=2;break;case"east":p=g[0];b=1;break;case"west":p=-g[0];a=-p;b=1;break;case"northeast":u=-g[1];w=-u;p=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":u=g[1];p=g[0];i=[k.x,k.y];b=3;break;case"southwest":p=-g[0];a=-p;u=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":u=-g[1];w=-u;p=-g[0];a=-p;i=[k.x+k.width,k.y+k.height];b=3;break}d={width:k.width+p,height:k.height+u,x:k.x+a,y:k.y+w};j=Ext.Number.snap(d.width,t.widthIncrement);q=Ext.Number.snap(d.height,t.heightIncrement);if(j!=d.width||q!=d.height){switch(c){case"northeast":d.y-=q-d.height;break;case"north":d.y-=q-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=q-d.height}d.width=j;d.height=q}if(d.width<t.minWidth||d.width>t.maxWidth){d.width=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{t.lastX=d.x}if(d.height<t.minHeight||d.height>t.maxHeight){d.height=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight);if(w){d.y=k.y+(k.height-d.height)}}else{t.lastY=d.y}if(t.preserveRatio||s.shiftKey){h=t.startBox.width/t.startBox.height;o=Math.min(Math.max(t.minHeight,d.width/h),t.maxHeight);l=Math.min(Math.max(t.minWidth,d.height*h),t.maxWidth);if(b==1){d.height=o}else{if(b==2){d.width=l}else{v=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(v>h){d.height=o}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(u===0){r="none"}if(p===0){n="none"}t.resize(d,{horizontal:n,vertical:r},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}c=this.originalTarget;if(c&&(this.dynamic||a)){if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(b){var k=this,j,o,q,p=k.handles,c,n,g,d=0,m,l=[],h,a,e;k.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(b)||Ext.isElement(b)||b.dom){j=b;b=arguments[1]||{};b.target=j}k.mixins.observable.constructor.call(k,b);j=k.target;if(j){if(j.isComponent){k.el=j.getEl();if(j.minWidth){k.minWidth=j.minWidth}if(j.minHeight){k.minHeight=j.minHeight}if(j.maxWidth){k.maxWidth=j.maxWidth}if(j.maxHeight){k.maxHeight=j.maxHeight}if(j.floating){if(!k.hasOwnProperty("handles")){k.handles="n ne e se s sw w nw"}}}else{k.el=k.target=Ext.get(j)}}else{k.target=k.el=Ext.get(k.el)}q=k.el.dom.tagName.toUpperCase();if(q=="TEXTAREA"||q=="IMG"||q=="TABLE"){k.originalTarget=k.target;o=k.el;e=o.getBox();k.target=k.el=k.el.wrap({cls:k.wrapCls,id:k.el.id+"-rzwrap",style:o.getStyles("margin-top","margin-bottom")});k.el.setPositioning(o.getPositioning());o.clearPositioning();k.el.setBox(e);o.setStyle("position","absolute")}k.el.position();if(k.pinned){k.el.addCls(k.pinnedCls)}k.resizeTracker=new Ext.resizer.ResizeTracker({disabled:k.disabled,target:k.target,constrainTo:k.constrainTo,overCls:k.overCls,throttle:k.throttle,originalTarget:k.originalTarget,delegate:"."+k.handleCls,dynamic:k.dynamic,preserveRatio:k.preserveRatio,heightIncrement:k.heightIncrement,widthIncrement:k.widthIncrement,minHeight:k.minHeight,maxHeight:k.maxHeight,minWidth:k.minWidth,maxWidth:k.maxWidth});k.resizeTracker.on({mousedown:k.onBeforeResize,drag:k.onResize,dragend:k.onResizeEnd,scope:k});if(k.handles=="all"){k.handles="n s e w ne nw se sw"}p=k.handles=k.handles.split(/ |\s*?[,;]\s*?/);n=k.possiblePositions;g=p.length;c=k.handleCls+" "+(k.target.isComponent?(k.target.baseCls+"-handle "):"")+k.handleCls+"-";h=Ext.isIE6?' style="height:'+k.el.getHeight()+'px"':"";for(;d<g;d++){if(p[d]&&n[p[d]]){m=n[p[d]];if(m==="east"||m==="west"){a=h}else{a=""}l.push('<div id="'+k.el.id+"-"+m+'-handle" class="'+c+m+" "+Ext.baseCSSPrefix+'unselectable"'+a+"></div>")}}Ext.DomHelper.append(k.el,l.join(""));for(d=0;d<g;d++){if(p[d]&&n[p[d]]){m=n[p[d]];k[m]=k.el.getById(k.el.id+"-"+m+"-handle");k[m].region=m;k[m].unselectable();if(k.transparent){k[m].setOpacity(0)}}}if(Ext.isNumber(k.width)){k.width=Ext.Number.constrain(k.width,k.minWidth,k.maxWidth)}if(Ext.isNumber(k.height)){k.height=Ext.Number.constrain(k.height,k.minHeight,k.maxHeight)}if(k.width!==null||k.height!==null){if(k.originalTarget){k.originalTarget.setWidth(k.width);k.originalTarget.setHeight(k.height)}k.resizeTo(k.width,k.height)}k.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(b,c){var a=this.el.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,c)},onResize:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resizedrag",b,a.width,a.height,d)},onResizeEnd:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resize",b,a.width,a.height,d)},resizeTo:function(b,a){var c=this;c.target.setSize(b,a);c.fireEvent("resize",c,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var d=0,c=this.handles,a=c.length,b=this.possiblePositions;for(;d<a;d++){this[b[c[d]]].remove()}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.selection.CellModel",{extend:"Ext.selection.Model",alias:"selection.cellmodel",requires:["Ext.util.KeyNav"],isCellModel:true,enableKeyNav:true,preventWrap:false,noSelection:{row:-1,column:-1},constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var c=this,b=a.ownerCt;c.primaryView=a;c.views=c.views||[];c.views.push(a);c.bindStore(a.getStore(),true);a.on({cellmousedown:c.onMouseDown,refresh:c.onViewRefresh,scope:c});if(b.optimizedColumnMove!==false){b.on("columnmove",c.onColumnMove,c)}if(c.enableKeyNav){c.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a.el,ignoreInputFields:true,up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){var b=this.getCurrentPosition(),a=b?b.view:this.primaryView;return a.headerCt},onKeyUp:function(b,a){this.keyNavigation=true;this.move("up",b);this.keyNavigation=false},onKeyDown:function(b,a){this.keyNavigation=true;this.move("down",b);this.keyNavigation=false},onKeyLeft:function(b,a){this.keyNavigation=true;this.move("left",b);this.keyNavigation=false},onKeyRight:function(b,a){this.keyNavigation=true;this.move("right",b);this.keyNavigation=false},move:function(a,d){var c=this,g=c.getCurrentPosition(),b=g.view.walkCells(g,a,d,c.preventWrap);if(b){b.view=g.view;return c.setCurrentPosition(b)}},getCurrentPosition:function(){return this.selection},setCurrentPosition:function(b){var a=this;a.lastSelection=a.selection;if(a.selection){a.onCellDeselect(a.selection)}if(b){a.nextSelection=new a.Selection(a);a.nextSelection.setPosition(b);a.onCellSelect(a.nextSelection);return a.selection=a.nextSelection}},onStoreRemove:function(b,a,c){var d=this,e=d.getCurrentPosition();d.callParent(arguments);if(e){if(e.row==c){if(c<b.getCount()-1){e.setPosition(c,e.column);d.setCurrentPosition(e)}else{delete d.selection}}else{if(c<e.row){e.setPosition(e.row-1,e.column);d.setCurrentPosition(e)}}}},onMouseDown:function(c,a,d,b,h,i,g){this.setCurrentPosition({view:c,row:i,column:d})},onCellSelect:function(a,b){if(a&&a.row!==undefined&&a.row>-1){this.doSelect(a.view.getStore().getAt(a.row),false,b)}},onCellDeselect:function(a,b){if(a&&a.row!==undefined){this.doDeselect(a.view.getStore().getAt(a.row),b)}},onSelectChange:function(b,e,d,h){var g=this,i,c,a;if(e){i=g.nextSelection;c="select"}else{i=g.lastSelection||g.noSelection;c="deselect"}a=i.view||g.primaryView;if((d||g.fireEvent("before"+c,g,b,i.row,i.column))!==false&&h()!==false){if(e){a.onCellSelect(i);a.onCellFocus(i)}else{a.onCellDeselect(i);delete g.selection}if(!d){g.fireEvent(c,g,b,i.row,i.column)}}},onKeyTab:function(d,b){var c=this,a=c.getCurrentPosition().view.editingPlugin;if(a&&c.wasEditing){c.onEditorTab(a,d)}else{c.move(d.shiftKey?"left":"right",d)}},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){if(b.startEditByPosition(a)){c.wasEditing=false}else{c.wasEditing=true;if(!a.columnHeader.dataIndex){c.onEditorTab(b,g)}}}},refresh:function(){var b=this.getCurrentPosition(),a;if(b&&(a=this.store.indexOf(this.selected.last()))!==-1){b.row=a}},onColumnMove:function(d,e,b,c){var a=d.up("tablepanel");if(a){this.onViewRefresh(a.view)}},onViewRefresh:function(b){var c=this,g=c.getCurrentPosition(),e=b.headerCt,a,d;if(g&&g.view===b){a=g.record;d=g.columnHeader;if(!d.isDescendantOf(e)){d=e.queryById(d.id)||e.down('[text="'+d.text+'"]')||e.down('[dataIndex="'+d.dataIndex+'"]')}if(d&&(b.store.indexOfId(a.getId())!==-1)){c.setCurrentPosition({row:a,column:d,view:b})}}},selectByPosition:function(a){this.setCurrentPosition(a)}},function(){var a=this.prototype.Selection=function(b){this.model=b};a.prototype.setPosition=function(e,c){var d=this,b;if(arguments.length===1){if(e.view){d.view=b=e.view}c=e.column;e=e.row}if(!b){d.view=b=d.model.primaryView}if(typeof e==="number"){d.row=e;d.record=b.store.getAt(e)}else{if(e.isModel){d.record=e;d.row=b.indexOf(e)}else{if(e.tagName){d.record=b.getRecord(e);d.row=b.indexOf(d.record)}}}if(typeof c==="number"){d.column=c;d.columnHeader=b.getHeaderAtIndex(c)}else{d.columnHeader=c;d.column=c.getIndex()}return d}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a,ignoreInputFields:true,eventName:"itemkeydown",processEvent:function(d,c,h,e,g){g.record=c;g.recordIndex=e;return g},up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,space:b.onKeySpace,enter:b.onKeyEnter,scope:b})},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(c){var b=this,a=b.store.getAt(b.store.getCount()-1);if(a){if(c.shiftKey){b.selectRange(a,b.lastFocused||0);b.setLastFocused(a)}else{if(c.ctrlKey){b.setLastFocused(a)}else{b.doSelect(a)}}}},onKeyHome:function(b){var a=this,c=a.store.getAt(0);if(c){if(b.shiftKey){a.selectRange(c,a.lastFocused||0);a.setLastFocused(c)}else{if(b.ctrlKey){a.setLastFocused(c)}else{a.doSelect(c,false)}}}},onKeyPageUp:function(g){var d=this,h=d.getRowsVisible(),b,c,a;if(h){b=g.recordIndex;c=b-h;if(c<0){c=0}a=d.store.getAt(c);if(g.shiftKey){d.selectRange(a,g.record,g.ctrlKey,"up");d.setLastFocused(a)}else{if(g.ctrlKey){g.preventDefault();d.setLastFocused(a)}else{d.doSelect(a)}}}},onKeyPageDown:function(g){var c=this,h=c.getRowsVisible(),a,d,b;if(h){a=g.recordIndex;d=a+h;if(d>=c.store.getCount()){d=c.store.getCount()-1}b=c.store.getAt(d);if(g.shiftKey){c.selectRange(b,g.record,g.ctrlKey,"down");c.setLastFocused(b)}else{if(g.ctrlKey){g.preventDefault();c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeySpace:function(c){var b=this,a=b.lastFocused;if(a){if(b.isSelected(a)){b.doDeselect(a,false)}else{b.doSelect(a,true)}}},onKeyEnter:Ext.emptyFn,onKeyUp:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a>0){b=c.store.getAt(a-1);if(d.shiftKey&&c.lastFocused){if(c.isSelected(c.lastFocused)&&c.isSelected(b)){c.doDeselect(c.lastFocused,true);c.setLastFocused(b)}else{if(!c.isSelected(c.lastFocused)){c.doSelect(c.lastFocused,true);c.doSelect(b,true)}else{c.doSelect(b,true)}}}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyDown:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a+1<c.store.getCount()){b=c.store.getAt(a+1);if(c.selected.getCount()===0){if(!d.ctrlKey){c.doSelect(b)}else{c.setLastFocused(b)}}else{if(d.shiftKey&&c.lastFocused){if(c.isSelected(c.lastFocused)&&c.isSelected(b)){c.doDeselect(c.lastFocused,true);c.setLastFocused(b)}else{if(!c.isSelected(c.lastFocused)){c.doSelect(c.lastFocused,true);c.doSelect(b,true)}else{c.doSelect(b,true)}}}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,g){if(!this.allowRightMouseSelection(g)){return}if(g.button===0||!this.isSelected(a)){this.selectWithEvent(a,g)}},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,l,a){var j=this,m=j.views,d=m.length,k=j.store,b=k.indexOf(g),h=c?"select":"deselect",e=0;if((l||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){m[e].onRowSelect(b,l)}else{m[e].onRowDeselect(b,l)}}if(!l){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(j,d,b){var a=this.views,h=a.length,c=this.store,g,e=0;if(j){g=c.indexOf(j);if(g!=-1){for(;e<h;e++){a[e].onRowFocus(g,false)}}}if(d){g=c.indexOf(d);if(g!=-1){for(e=0;e<h;e++){a[e].onRowFocus(g,true,b)}}}this.callParent()},onEditorTab:function(d,i){var g=this,c=g.views[0],b=d.getActiveRecord(),j=d.getActiveColumn(),a=c.getPosition(b,j),h=i.shiftKey?"left":"right";do{a=c.walkCells(a,h,i,g.preventWrap)}while(a&&!c.headerCt.getHeaderAtIndex(a.column).getEditor());if(a){d.startEditByPosition(a)}},getCurrentPosition:function(){var a=this.selected.items[0];if(a){return{row:this.store.indexOf(a),column:0}}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)},selectNext:function(h,c){var g=this,b=g.store,e=g.getSelection(),a=e[e.length-1],d=b.indexOf(a)+1,i;if(d===b.getCount()||d===0){i=false}else{g.doSelect(d,h,c);i=true}return i},selectPrevious:function(g,b){var e=this,d=e.getSelection(),a=d[0],c=e.store.indexOf(a)-1,h;if(c<0){h=false}else{e.doSelect(c,g,b);h=true}return h}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:"Ext.selection.RowModel",mode:"MULTI",injectCheckbox:0,checkOnly:false,showHeaderCheckbox:true,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",refreshOnRemove:true,beforeViewRender:function(a){var b=this;b.callParent(arguments);if(!b.hasLockedHeader()||a.headerCt.lockedCt){if(b.showHeaderCheckbox!==false){a.headerCt.on("headerclick",b.onHeaderClick,b)}b.addCheckbox(a,true);b.mon(a.ownerCt,"reconfigure",b.onReconfigure,b)}},bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments)},hasLockedHeader:function(){var a=this.views,c=a.length,b;for(b=0;b<c;b++){if(a[b].headerCt.lockedCt){return true}}return false},addCheckbox:function(a,b){var c=this,d=c.injectCheckbox,e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}Ext.suspendLayouts();e.add(d,c.getHeaderConfig());Ext.resumeLayouts()}if(b!==true){a.refresh()}},onReconfigure:function(c,a,b){if(b){this.addCheckbox(this.views[0])}},toggleUiHeader:function(d){var a=this.views[0],c=a.headerCt,b=c.child("gridcolumn[isCheckerHd]");if(b){if(d){b.el.addCls(this.checkerOnCls)}else{b.el.removeCls(this.checkerOnCls)}}},onHeaderClick:function(c,g,b){if(g.isCheckerHd){b.stopEvent();var a=this,d=g.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");a.preventFocus=true;if(d){a.deselectAll()}else{a.selectAll()}delete a.preventFocus}},getHeaderConfig:function(){var a=this,b=a.showHeaderCheckbox!==false;return{isCheckerHd:b,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:b?Ext.baseCSSPrefix+"column-header-checkbox ":"",renderer:Ext.Function.bind(a.renderer,a),editRenderer:a.editRenderer||a.renderEmpty,locked:a.hasLockedHeader()}},renderEmpty:function(){return"&#160;"},renderer:function(h,c,b,i,e,d,a){var g=Ext.baseCSSPrefix;c.tdCls=g+"grid-cell-special "+g+"grid-cell-row-checker";return'<div class="'+g+'grid-row-checker">&#160;</div>'},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker"),j;if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){var a=this;a.callParent(arguments);a.updateHeaderState()},onStoreLoad:function(){var a=this;a.callParent(arguments);a.updateHeaderState()},updateHeaderState:function(){var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(c.isExpandable()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeySpace:function(b,a){this.toggleCheck(b)},onKeyEnter:function(b,a){this.toggleCheck(b)},toggleCheck:function(b){b.stopEvent();var a=this.getLastSelected();if(a){this.view.onCheckChange(a)}}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a])},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst(a.getElConfig());a.onRender()},onRender:function(){if(this.disabled){this.disable()}this.initEvents()},getElConfig:function(){var c=this,b=c.slider,a={};a[b.vertical?"bottom":"left"]=b.calculateThumbPosition(b.normalizeValue(c.value))+"%";return{style:a,id:this.id,cls:this.cls}},move:function(c,b){var d=this.el,a=this.slider.vertical?"bottom":"left",g,e;c+="%";if(!b){d.dom.style[a]=c}else{g={};g[a]=c;if(!Ext.supports.GetPositionPercentage){e={};e[a]=d.dom.style[a]}new Ext.fx.Anim({target:d,duration:350,from:e,to:g})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=new Ext.dd.DragTracker({onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=a.slider.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getValueFromTracker(),a,i;if(g!==undefined){if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)}},getValueFromTracker:function(){var a=this.slider,b=a.getTrackpoint(this.tracker.getXY());if(b!==undefined){return a.reversePixelValue(b)}},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=a.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)}});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:null,align:null,position:"",defaultVerticalPosition:"left",defaultHorizontalPosition:"top",isSliderTip:true,init:function(c){var b=this,d,a;if(!b.position){b.position=c.vertical?b.defaultVerticalPosition:b.defaultHorizontalPosition}switch(b.position){case"top":a=[0,-10];d="b-t?";break;case"bottom":a=[0,10];d="t-b?";break;case"left":a=[-10,0];d="r-l?";break;case"right":a=[10,0];d="l-r?"}if(!b.align){b.align=d}if(!b.offsets){b.offsets=a}c.on({scope:b,dragstart:b.onSlide,drag:b.onSlide,dragend:b.hide,destroy:b.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.el.alignTo(a.el,b.align,b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],childEls:["endEl","innerEl"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+'slider {fieldCls} {vertical}" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">',"{%this.renderThumbs(out, values)%}","</div>","</div>","</div>",{renderThumbs:function(g,e){var j=e.$comp,h=0,c=j.thumbs,b=c.length,d,a;for(;h<b;h++){d=c[h];a=d.getElConfig();a.id=j.id+"-thumb-"+h;Ext.DomHelper.generateMarkup(a,g)}},disableFormats:true}],vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var e=this,c,d,g,b,a;e.thumbs=[];e.keyIncrement=Math.max(e.increment,e.keyIncrement);e.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(e.increment){e.maxValue=Ext.Number.snapInRange(e.maxValue,e.increment,e.minValue);e.value=e.normalizeValue(e.value)}e.callParent();if(e.useTips){if(Ext.isObject(e.useTips)){c=Ext.apply({},e.useTips)}else{c=e.tipText?{getText:e.tipText}:{}}a=e.plugins=e.plugins||[];b=a.length;for(g=0;g<b;g++){if(a[g].isSliderTip){d=true;break}}if(!d){e.plugins.push(new Ext.slider.Tip(c))}}},addThumb:function(c){var b=this,a=new Ext.slider.Thumb({ownerCt:b,ownerLayout:b.getComponentLayout(),value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs,disabled:!!b.readOnly});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{$comp:a,vertical:a.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:a.minValue,maxValue:a.maxValue,value:a.value})},onRender:function(){var e=this,b=e.thumbs,a=b.length,d=0,c;e.callParent(arguments);for(d=0;d<a;d++){c=b[d];c.el=e.el.getById(e.id+"-thumb-"+d);c.onRender()}},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown})},getTrackpoint:function(g){var e=this,b,d,c=e.innerEl,a;if(e.vertical){d="top";a=c.getHeight()}else{d="left";a=c.getWidth()}b=Ext.Number.constrain(c.translatePoints(g)[d],0,a);return e.vertical?a-b:b},onMouseDown:function(j){var d=this,h=false,c=0,b=d.thumbs,a=b.length,g;if(d.disabled){return}for(;c<a;c++){h=h||j.target==b[c].el.dom}if(d.clickToChange&&!h){g=d.getTrackpoint(j.getXY());if(g!==undefined){d.onClickChange(g)}}d.focus()},onClickChange:function(d){var c=this,a,b;a=c.getNearest(d);if(!a.disabled){b=a.index;c.setValue(b,Ext.util.Format.round(c.reversePixelValue(d),c.decimalPrecision),undefined,true)}},getNearest:function(j){var k=this,g=k.reversePixelValue(j),l=(k.maxValue-k.minValue)+5,b=null,e=k.thumbs,c=0,d=e.length,a,m,h;for(;c<d;c++){a=k.thumbs[c];m=a.value;h=Math.abs(m-g);if(Math.abs(h<=l)){b=a;l=h}}return b},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},normalizeValue:function(b){var c=this,d=Ext.Number,a=d[c.zeroBasedSnapping?"snap":"snapInRange"];b=a.call(d,b,c.increment,c.minValue,c.maxValue);b=Ext.util.Format.round(b,c.decimalPrecision);b=Ext.Number.constrain(b,c.minValue,c.maxValue);return b},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.calculateThumbPosition(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);d.checkDirty();if(e){d.fireEvent("changecomplete",d,g,a)}}}},calculateThumbPosition:function(a){return(a-this.minValue)/(this.maxValue-this.minValue)*100},getRatio:function(){var b=this,a=this.vertical?this.innerEl.getHeight():this.innerEl.getWidth(),c=this.maxValue-this.minValue;return c===0?a:(a/c)},reversePixelValue:function(a){return this.minValue+(a/this.getRatio())},reversePercentageValue:function(a){return this.minValue+(this.maxValue-this.minValue)*(a/100)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.calculateThumbPosition(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var e=this,b=[].concat(e.originalValue),c=0,d=b.length,g;for(;c<d;c++){g=b[c];e.setValue(c,g)}e.clearInvalid();delete e.wasValid},setReadOnly:function(e){var d=this,b=d.thumbs,a=b.length,c=0;d.callParent(arguments);e=d.readOnly;for(;c<a;++c){if(e){b[c].disable()}else{b[c].enable()}}},beforeDestroy:function(){var e=this,b=e.thumbs,d=0,a=b.length,c;Ext.destroy(e.innerEl,e.endEl,e.focusEl);for(;d<a;d++){c=b[d];Ext.destroy(c)}e.callParent()}});Ext.define("Ext.slider.Single",{extend:"Ext.slider.Multi",alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=arguments,a=c.length;if(a==1||(a<=3&&typeof c[1]!="number")){c=Ext.toArray(c);c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.state.CookieProvider",{extend:"Ext.state.Provider",constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:"Ext.state.Provider",alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();a.state=a.readLocalStorage()},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){try{var a="localStorage" in window&&window.localStorage!==null;if(a){return window.localStorage}}catch(b){return false}}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}},getTemplateArgs:function(){var b=this,a=b.callParent();a.closable=b.closable;a.closeText=b.closeText;return a},beforeRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.callParent();b.addClsWithUI(b.position);b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}},onRender:function(){var a=this;a.callParent(arguments);a.keyNav=new Ext.util.KeyNav(a.el,{enter:a.onEnterKey,del:a.onDeleteKey,scope:a})},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.updateLayout()}}},syncClosableElements:function(){var a=this,b=a.closeEl;if(a.closable){if(!b){a.closeEl=a.btnWrap.insertSibling({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText},"after")}}else{if(b){b.remove();delete a.closeEl}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls);b.setIcon(b.icon||a.icon)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireClose()}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(a){if(this.closable){this.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab"],isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var a=this;if(a.plain){a.setUI(a.ui+"-plain")}a.addClsWithUI(a.dock);a.addEvents("change");a.callParent(arguments);a.layout.align=(a.orientation=="vertical")?"left":"top";a.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(a.layout);a.remove(a.titleCmp);delete a.titleCmp;Ext.apply(a.renderData,{bodyCls:a.bodyCls})},getLayout:function(){var a=this;a.layout.type=(a.dock==="top"||a.dock==="bottom")?"hbox":"vbox";return a.callParent(arguments)},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}b.callParent(arguments)},afterComponentLayout:function(a){this.callParent(arguments);this.strip.setWidth(a)},onClick:function(g,d){var c=this,i=g.getTarget("."+Ext.tab.Tab.prototype.baseCls),b=i&&Ext.getCmp(i.id),h=c.tabPanel,a=b&&b.closeEl&&(d===b.closeEl.dom);if(a){g.preventDefault()}if(b&&b.isDisabled&&!b.isDisabled()){if(b.closable&&a){b.onCloseClick()}else{if(h){h.setActiveTab(b.card)}else{c.setActiveTab(b)}b.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}a=d.findNextActivatable(c);Ext.suspendLayouts();if(e&&b){delete c.ownerCt;b.fireEvent("close",b);e.remove(b);if(!e.getComponent(b)){c.fireClose();d.remove(c)}else{c.ownerCt=d;Ext.resumeLayouts(true);return false}}if(a){if(e){e.setActiveTab(a.card)}else{d.setActiveTab(a)}a.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(a){var b=this;if(a.active&&b.items.getCount()>1){return(b.previousTab&&b.previousTab!==a&&!b.previousTab.disabled)?b.previousTab:(a.next("tab[disabled=false]")||a.prev("tab[disabled=false]"))}},setActiveTab:function(a){var b=this;if(!a.disabled&&a!==b.activeTab){if(b.activeTab){if(b.activeTab.isDestroyed){b.previousTab=null}else{b.previousTab=b.activeTab;b.activeTab.deactivate()}}a.activate();b.activeTab=a;b.fireEvent("change",b,a,a.card);b.on({afterlayout:b.afterTabActivate,scope:b,single:true});b.updateLayout()}},afterTabActivate:function(){this.layout.overflowHandler.scrollToItem(this.activeTab)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=[].concat(c.dockedItems||[]),a=c.activeTab||(c.activeTab=0);c.layout=new Ext.layout.container.Card(Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls,activeItem:c.activeTab},c.layout));c.tabBar=new Ext.tab.Bar(Ext.apply({dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c},c.tabBar));b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.activeTab=c.getComponent(a);if(c.activeTab){c.activeTab.tab.activate(true);c.tabBar.activeTab=c.activeTab.tab}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}if(!a.isComponent){Ext.suspendLayouts();a=c.add(a);Ext.resumeLayouts()}c.activeTab=a;Ext.suspendLayouts();c.layout.setActiveItem(a);a=c.activeTab=c.layout.getActiveItem();if(a&&a!==b){c.tabBar.setActiveTab(a.tab);Ext.resumeLayouts(true);if(b!==a){c.fireEvent("tabchange",c,a,b)}}else{Ext.resumeLayouts(true)}return a}},getActiveTab:function(){var b=this,a=b.getComponent(b.activeTab);if(a&&b.items.indexOf(a)!=-1){b.activeTab=a}else{b.activeTab=null}return b.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden&&!e.hiddenByLayout,tooltip:e.tooltip,tabBar:d.tabBar,closeText:e.closeText};b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,iconclschange:d.onItemIconClsChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){if(e.rendered){if(e.header){e.header.hide()}}else{e.header=false}}if(e.isPanel&&d.border){e.setBorder(false)}}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIcon(a)},onItemIconClsChange:function(b,a){b.tab.setIconCls(a)},onItemTitleChange:function(a,b){a.tab.setText(b)},doRemove:function(d,b){var c=this,a;if(c.destroying||c.items.getCount()==1){c.activeTab=null}else{if((a=c.tabBar.items.indexOf(c.tabBar.findNextActivatable(d.tab)))!==-1){c.setActiveTab(a)}}this.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(b,c){var a=this;b.un({scope:a,enable:a.onItemEnable,disable:a.onItemDisable,beforeshow:a.onItemBeforeShow});if(!a.destroying&&b.tab.ownerCt===a.tabBar){a.tabBar.remove(b.tab)}}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",treePrefix:Ext.baseCSSPrefix+"tree-",elbowPrefix:Ext.baseCSSPrefix+"tree-elbow-",expanderCls:Ext.baseCSSPrefix+"tree-expander",imgText:'<img src="{1}" class="{0}" />',checkboxText:'<input type="button" role="checkbox" class="{0}" {1} />',initComponent:function(){var a=this;a.origRenderer=a.renderer||a.defaultRenderer;a.origScope=a.scope||window;a.renderer=a.treeRenderer;a.scope=a;a.callParent()},treeRenderer:function(l,n,c,b,k,e,j){var s=this,r=[],p=Ext.String.format,u=c.getDepth(),q=s.treePrefix,d=s.elbowPrefix,m=s.expanderCls,i=s.imgText,v=s.checkboxText,h=s.origRenderer.apply(s.origScope,arguments),g=Ext.BLANK_IMAGE_URL,o=c.get("href"),t=c.get("hrefTarget"),a=c.get("cls");while(c){if(!c.isRoot()||(c.isRoot()&&j.rootVisible)){if(c.getDepth()===u){r.unshift(p(i,q+"icon "+q+"icon"+(c.get("icon")?"-inline ":(c.isLeaf()?"-leaf ":"-parent "))+(c.get("iconCls")||""),c.get("icon")||g));if(c.get("checked")!==null){r.unshift(p(v,(q+"checkbox")+(c.get("checked")?" "+q+"checkbox-checked":""),c.get("checked")?'aria-checked="true"':""));if(c.get("checked")){n.tdCls+=(" "+q+"checked")}}if(c.isLast()){if(c.isExpandable()){r.unshift(p(i,(d+"end-plus "+m),g))}else{r.unshift(p(i,(d+"end"),g))}}else{if(c.isExpandable()){r.unshift(p(i,(d+"plus "+m),g))}else{r.unshift(p(i,(q+"elbow"),g))}}}else{if(c.isLast()||c.getDepth()===0){r.unshift(p(i,(d+"empty"),g))}else{if(c.getDepth()!==0){r.unshift(p(i,(d+"line"),g))}}}}c=c.parentNode}if(o){r.push('<a href="',o,'" target="',t,'">',h,"</a>")}else{r.push(h)}if(a){n.tdCls+=" "+a}return r.join("")},defaultRenderer:function(a){return a}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,loadMask:false,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading","qtip","qtitle"],initComponent:function(){var a=this,b=a.panel.getStore();if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=new Ext.data.NodeStore({treeStore:b,recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,write:a.onStoreWrite,datachanged:a.onStoreDataChanged,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.animWraps={};a.addEvents("afteritemexpand","afteritemcollapse");a.callParent(arguments);a.on({element:"el",scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut});a.on({element:"el",scope:a,delegate:a.checkboxSelector,click:a.onCheckboxChange})},getMaskStore:function(){return this.panel.getStore()},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h<l;h++){m=b[h];g+='<th style="width: '+(m.hidden?0:m.getDesiredWidth())+'px; height: 0px;"></th>'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['<td colspan="'+e.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+e.getFullWidth()+'px;"><tbody>',g,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true},endBulkUpdate:function(){this.bulkUpdate=false},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;if(d.viewReady){d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}}},doRemove:function(a,c){var h=this,d=h.all,b=h.getAnimWrap(a),g=d.item(c),e=g?g.dom:null;if(!e||!b||!b.collapsing){return h.callParent(arguments)}b.targetEl.appendChild(e);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d,b,j;if(h.singleExpand){h.ensureSingleExpand(i)}if(g===-1){return}d=h.getAnimWrap(i,false);if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c);return}b=d.animateEl;j=d.targetEl;b.stopAnimation();e[a]=true;b.slideIn("t",{duration:h.expandDuration,listeners:{scope:h,lastframe:function(){d.el.insertSibling(j.query(h.itemSelector),"before");d.el.remove();h.refreshSize();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c)}});d.isAnimating=true},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d=h.getAnimWrap(i),b,j;if(g===-1){return}if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c);return}b=d.animateEl;j=d.targetEl;e[a]=true;b.stopAnimation();b.slideOut("t",{duration:h.collapseDuration,listeners:{scope:h,lastframe:function(){d.el.remove();h.refreshSize();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c)}});d.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d<a;d++){h=e[d];b=c[d];if(b.get("qtip")){h.rowAttr='data-qtip="'+b.get("qtip")+'"';if(b.get("qtitle")){h.rowAttr+=' data-qtitle="'+b.get("qtitle")+'"'}}if(b.isExpanded()){h.rowCls=(h.rowCls||"")+" "+this.expandedCls}if(b.isLeaf()){h.rowCls=(h.rowCls||"")+" "+this.leafCls}if(b.isLoading()){h.rowCls=(h.rowCls||"")+" "+this.loadingCls}}return g},expand:function(b,a,d,c){return b.expand(a,d,c)},collapse:function(b,a,d,c){return b.collapse(a,d,c)},toggle:function(c,b,g,d){var e=this,a=!!this.animate;if(!a||!this.isExpandingOrCollapsing){if(!c.isLeaf()){this.isExpandingOrCollapsing=a}if(c.isExpanded()){e.collapse(c,b,g,d)}else{e.expand(c,b,g,d)}}},onItemDblClick:function(a,e,c){var d=this,b=d.editingPlugin;d.callParent(arguments);if(d.toggleOnDblClick&&a.isExpandable()&&!(b&&b.clicksToEdit===2)){d.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)&&a.isExpandable()){this.toggle(a,d.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}},shouldUpdateCell:function(d,c){if(c){var b=0,a=c.length;for(;b<a;++b){if(Ext.Array.contains(this.uiFields,c[b])){return true}}}return this.callParent(arguments)},onStoreWrite:function(b,a){var c=this.panel.store;c.fireEvent("write",c,a)},onStoreDataChanged:function(b,a){var c=this.panel.store;c.fireEvent("datachanged",c)}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column","Ext.data.TreeStore"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],isTree:true,constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.isDefined(this.animate)?this.animate:Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var c=this,b=[c.treeCls],a;if(c.useArrows){b.push(Ext.baseCSSPrefix+"tree-arrows");c.lines=false}if(c.lines){b.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!c.useArrows){b.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(c.store)){c.store=Ext.StoreMgr.lookup(c.store)}else{if(!c.store||Ext.isObject(c.store)&&!c.store.isStore){c.store=new Ext.data.TreeStore(Ext.apply({},c.store||{},{root:c.root,fields:c.fields,model:c.model,folderSort:c.folderSort}))}else{if(c.root){c.store=Ext.data.StoreManager.lookup(c.store);c.store.setRootNode(c.root);if(c.folderSort!==undefined){c.store.folderSort=c.folderSort;c.store.sort()}}}}c.viewConfig=Ext.apply({},c.viewConfig);c.viewConfig=Ext.applyIf(c.viewConfig,{rootVisible:c.rootVisible,animate:c.enableAnimations,singleExpand:c.singleExpand,node:c.store.getRootNode(),hideHeaders:c.hideHeaders});c.mon(c.store,{scope:c,rootchange:c.onRootChange,clear:c.onClear});c.relayEvents(c.store,["beforeload","load"]);c.mon(c.store,{append:c.createRelayer("itemappend"),remove:c.createRelayer("itemremove"),move:c.createRelayer("itemmove",[0,4]),insert:c.createRelayer("iteminsert"),beforeappend:c.createRelayer("beforeitemappend"),beforeremove:c.createRelayer("beforeitemremove"),beforemove:c.createRelayer("beforeitemmove"),beforeinsert:c.createRelayer("beforeiteminsert"),expand:c.createRelayer("itemexpand",[0,1]),collapse:c.createRelayer("itemcollapse",[0,1]),beforeexpand:c.createRelayer("beforeitemexpand",[0,1]),beforecollapse:c.createRelayer("beforeitemcollapse",[0,1])});if(!c.columns){if(c.initialConfig.hideHeaders===undefined){c.hideHeaders=true}c.addCls(Ext.baseCSSPrefix+"autowidth-table");c.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?null:10000,dataIndex:c.displayField}]}if(c.cls){b.push(c.cls)}c.cls=b.join(" ");c.callParent();a=c.getView();c.relayEvents(a,["checkchange","afteritemexpand","afteritemcollapse"]);if(!a.rootVisible&&!c.getRootNode()){c.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandNode:function(b,a,d,c){return this.getView().expand(b,a,d,c||this)},collapseNode:function(b,a,d,c){return this.getView().collapse(b,a,d,c||this)},expandAll:function(g,d){var e=this,b=e.getRootNode(),c=e.enableAnimations,a=e.getView();if(b){if(!c){a.beginBulkUpdate()}b.expand(true,g,d||e);if(!c){a.endBulkUpdate()}}},collapseAll:function(g,d){var e=this,b=e.getRootNode(),c=e.enableAnimations,a=e.getView();if(b){if(!c){a.beginBulkUpdate()}d=d||e;if(a.rootVisible){b.collapse(true,g,d)}else{b.collapseChildren(true,g,d)}if(!c){a.endBulkUpdate()}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(j,d,a,g,i){var b=this,c,h,e;d=d||b.getRootNode().idProperty;a=a||"/";h=j.split(a);e=h.pop();if(h.length>1){b.expandPath(h.join(a),d,a,function(m,l){var k=l;if(m&&l){l=l.findChild(d,e);if(l){b.getSelectionModel().select(l);Ext.callback(g,i||b,[true,l]);return}}Ext.callback(g,i||b,[false,k])},b)}else{c=b.getRootNode();if(c.getId()===e){b.getSelectionModel().select(c);Ext.callback(g,i||b,[true,c])}else{Ext.callback(g,i||b,[false,null])}}}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(b){var e=this,a,d,c;Ext.apply(e,b);if(!e.ddGroup){e.ddGroup="view-dd-zone-"+e.view.id}a=e.view;d=a.ownerCt;if(d){c=d.getTargetEl().dom}else{c=a.el.dom.parentNode}e.callParent([c]);e.ddel=Ext.get(document.createElement("div"));e.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onValidDrop:function(b,a,c){this.callParent();b.el.focus()},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.view.focus();this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(c){var a=this.view,b=c.getTarget(a.getItemSelector());if(b){return{copy:a.copy||(a.allowCopy&&c.ctrlKey),event:new Ext.EventObjectImpl(c),view:a,ddel:this.ddel,item:b,records:a.getSelectionModel().getSelection(),fromPosition:Ext.fly(b).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)){a.select(c,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var h=this,a=h.view,i=a.selectedItemCls,b=h.dragData.records,g,e=b.length,c=Ext.fly,d;if(Ext.enableFx&&h.repairHighlight){for(g=0;g<e;g++){d=a.getNode(b[g]);c(d.firstChild).highlight(h.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(d)){c(d).removeCls(i)}},afteranimate:function(){if(a.isSelected(d)){c(d).addCls(i)}}}})}}h.dragging=false}});Ext.define("Ext.tree.ViewDropZone",{extend:"Ext.view.DropZone",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:Ext.baseCSSPrefix+"tree-ddindicator",expandNode:function(b){var a=this.view;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInsert){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var o=this.view,l=o.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return true},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),m=0,l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(d,l,e){var n=this,o=n.view,g=l.parentNode,p=o.getStore(),r=[],a,c,k,b,j,m,q,h;if(d.copy){a=d.records;d.records=[];for(c=0,k=a.length;c<k;c++){d.records.push(Ext.apply({},a[c].data))}}n.cancelExpand();if(e=="before"){b=g.insertBefore;j=[null,l];l=g}else{if(e=="after"){if(l.nextSibling){b=g.insertBefore;j=[null,l.nextSibling]}else{b=g.appendChild;j=[null]}l=g}else{if(!l.isExpanded()){m=true}b=l.appendChild;j=[null]}}q=function(){var u,t,s,i,v;for(c=0,k=d.records.length;c<k;c++){j[0]=d.records[c];u=b.apply(l,j);if(Ext.enableFx&&n.dropHighlight){r.push(o.getNode(u))}}if(Ext.enableFx&&n.dropHighlight){s=r.length;i=n.dropHighlightColor;for(t=0;t<s;t++){v=r[t];if(v){Ext.fly(v.firstChild?v.firstChild:v).highlight(i)}}}};if(m){l.expand(false,q)}else{q()}}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.treeviewdragdrop",uses:["Ext.tree.ViewDragZone","Ext.tree.ViewDropZone"],dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.tree.ViewDragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair})}if(b.enableDrop){b.dropZone=new Ext.tree.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop})}}});Ext.define("Ext.util.CSS",(function(){var d=null,c=document,b=/(-[a-z])/gi,a=function(e,g){return g.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(i,l){var h,g=c.getElementsByTagName("head")[0],k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=document.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(i,e){var h=document,g;this.removeStyleSheet(i);g=h.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",i);g.setAttribute("href",e);h.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(l){if(!d){d={}}try{var o=l.cssRules||l.rules,m,k=o.length-1,g,h;for(;k>=0;--k){m=o[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g<h;g++){d[Ext.String.trim(m[g]).toLowerCase()]=o[k]}}}}catch(n){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets,j=0,g=k.length;for(;j<g;j++){try{if(!k[j].disabled){this.cacheStyleSheet(k[j])}}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h),j;if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){var k,g;if(!Ext.isArray(e)){k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}()));Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",isGrouper:true,getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},useTopWindow:true,fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",constructor:function(){var a=this;a.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null;a.mixins.observable.constructor.call(a)},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},setHash:function(d){var a=this,c=a.useTopWindow?window.top:window;try{c.location.hash=d}catch(b){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>",d;try{d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow,e,c,a,g;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}e=b.document;c=e.getElementById("state");a=c?c.innerText:null;g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);d.setHash(h);g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this,b;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},init:function(d,b){var c=this,a=Ext.DomHelper;if(c.ready){Ext.callback(d,b,[c]);return}if(!Ext.isReady){Ext.onReady(function(){c.init(d,b)});return}c.hiddenField=Ext.getDom(c.fieldId);if(!c.hiddenField){c.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:c.fieldId}]},false,true).firstChild}if(c.oldIEMode){c.iframe=Ext.getDom(c.iframeId);if(!c.iframe){c.iframe=a.append(c.hiddenField.parentNode,{tag:"iframe",id:c.iframeId,src:Ext.SSL_SECURE_URL})}}c.addEvents("ready","change");if(d){c.on("ready",d,b,{single:true})}c.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{b.setHash(a);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{%if (this.openTableWrap)out.push(this.openTableWrap())%}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth(values)]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{%if (this.closeTableWrap)out.push(this.closeTableWrap())%}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(b){var a='style="width:{fullWidth}px;';if(!b.rowCount){a+="height:1px;"}return a+'"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}>','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner {unselectableCls}" style="text-align: {align}; {{id}-style};">{{id}}</div>',"</td>","</tpl>","</tr>"],firstOrLastCls:function(a,b){if(a===1){return Ext.view.Table.prototype.firstCls}else{if(a===b){return Ext.view.Table.prototype.lastCls}}},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:undefined,closeTableWrap:undefined,getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls,unselectableAttr:k.enableTextSelection?"":'unselectable="on"',unselectableCls:k.enableTextSelection?"":Ext.baseCSSPrefix+"unselectable"},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<m;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(l,c[e].getMetaRowTplFragments());Ext.apply(g,c[e].getFragmentTpl());Ext.apply(h,c[e].getTableFragments())}}d=new Ext.XTemplate(d.join(""),l);k.row=d.applyTemplate(k);a=new Ext.XTemplate(this.metaTableTpl.join(""),h);j=a.applyTemplate(k);if(!b){j=new Ext.XTemplate(j,g)}return j}});Ext._endTime=new Date().getTime();if(Ext._beforereadyhandler){Ext._beforereadyhandler()};