spiderfw 0.6.38 → 0.6.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. checksums.yaml +13 -5
  2. data/CHANGELOG +23 -0
  3. data/VERSION +1 -1
  4. data/apps/core/admin/views/admin.layout.shtml +6 -0
  5. data/apps/core/auth/controllers/login_controller.rb +1 -1
  6. data/apps/core/components/assets.rb +55 -6
  7. data/apps/core/components/public/bootstrap/scss/_variables.scss +5 -2
  8. data/apps/core/components/public/bootstrap/scss/bootstrap.css +942 -236
  9. data/apps/core/components/public/bootstrap/scss/responsive.css +187 -30
  10. data/apps/core/components/public/css/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  11. data/apps/core/components/public/css/tinymce/skins/lightgray/Animations.less +10 -0
  12. data/apps/core/components/public/css/tinymce/skins/lightgray/Button.less +172 -0
  13. data/apps/core/components/public/css/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  14. data/apps/core/components/public/css/tinymce/skins/lightgray/Checkbox.less +49 -0
  15. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorBox.less +6 -0
  16. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorButton.less +72 -0
  17. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorPicker.less +80 -0
  18. data/apps/core/components/public/css/tinymce/skins/lightgray/ComboBox.less +39 -0
  19. data/apps/core/components/public/css/tinymce/skins/lightgray/Container.less +9 -0
  20. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Inline.less +4 -0
  21. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Objects.less +166 -0
  22. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.less +27 -0
  23. data/apps/core/components/public/css/tinymce/skins/lightgray/CropRect.less +54 -0
  24. data/apps/core/components/public/css/tinymce/skins/lightgray/FieldSet.less +15 -0
  25. data/apps/core/components/public/css/tinymce/skins/lightgray/FitLayout.less +9 -0
  26. data/apps/core/components/public/css/tinymce/skins/lightgray/FloatPanel.less +69 -0
  27. data/apps/core/components/public/css/tinymce/skins/lightgray/FlowLayout.less +36 -0
  28. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  29. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.less +180 -0
  30. data/apps/core/components/public/css/tinymce/skins/lightgray/Iframe.less +6 -0
  31. data/apps/core/components/public/css/tinymce/skins/lightgray/ImagePanel.less +20 -0
  32. data/apps/core/components/public/css/tinymce/skins/lightgray/InfoBox.less +71 -0
  33. data/apps/core/components/public/css/tinymce/skins/lightgray/Label.less +38 -0
  34. data/apps/core/components/public/css/tinymce/skins/lightgray/ListBox.less +26 -0
  35. data/apps/core/components/public/css/tinymce/skins/lightgray/Menu.less +34 -0
  36. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuBar.less +32 -0
  37. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuButton.less +34 -0
  38. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuItem.less +142 -0
  39. data/apps/core/components/public/css/tinymce/skins/lightgray/Mixins.less +54 -0
  40. data/apps/core/components/public/css/tinymce/skins/lightgray/Notification.less +144 -0
  41. data/apps/core/components/public/css/tinymce/skins/lightgray/Panel.less +7 -0
  42. data/apps/core/components/public/css/tinymce/skins/lightgray/Path.less +45 -0
  43. data/apps/core/components/public/css/tinymce/skins/lightgray/Progress.less +34 -0
  44. data/apps/core/components/public/css/tinymce/skins/lightgray/Radio.less +1 -0
  45. data/apps/core/components/public/css/tinymce/skins/lightgray/Reset.less +32 -0
  46. data/apps/core/components/public/css/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  47. data/apps/core/components/public/css/tinymce/skins/lightgray/Scrollable.less +44 -0
  48. data/apps/core/components/public/css/tinymce/skins/lightgray/SelectBox.less +6 -0
  49. data/apps/core/components/public/css/tinymce/skins/lightgray/Slider.less +29 -0
  50. data/apps/core/components/public/css/tinymce/skins/lightgray/Spacer.less +5 -0
  51. data/apps/core/components/public/css/tinymce/skins/lightgray/SplitButton.less +49 -0
  52. data/apps/core/components/public/css/tinymce/skins/lightgray/StackLayout.less +5 -0
  53. data/apps/core/components/public/css/tinymce/skins/lightgray/TabPanel.less +44 -0
  54. data/apps/core/components/public/css/tinymce/skins/lightgray/TextBox.less +41 -0
  55. data/apps/core/components/public/css/tinymce/skins/lightgray/Throbber.less +19 -0
  56. data/apps/core/components/public/css/tinymce/skins/lightgray/TinyMCE.less +159 -0
  57. data/apps/core/components/public/css/tinymce/skins/lightgray/ToolTip.less +129 -0
  58. data/apps/core/components/public/css/tinymce/skins/lightgray/Variables.less +214 -0
  59. data/apps/core/components/public/css/tinymce/skins/lightgray/Window.less +127 -0
  60. data/apps/core/components/public/css/tinymce/skins/lightgray/content.inline.min.css +1 -0
  61. data/apps/core/components/public/css/tinymce/skins/lightgray/content.min.css +1 -0
  62. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/readme.md +1 -0
  63. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  64. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  65. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  66. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  67. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  68. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  69. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  70. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  71. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  72. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  73. data/apps/core/components/public/css/tinymce/skins/lightgray/img/anchor.gif +0 -0
  74. data/apps/core/components/public/css/tinymce/skins/lightgray/img/loader.gif +0 -0
  75. data/apps/core/components/public/css/tinymce/skins/lightgray/img/object.gif +0 -0
  76. data/apps/core/components/public/css/tinymce/skins/lightgray/img/trans.gif +0 -0
  77. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.dev.less +46 -0
  78. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  79. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  80. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  81. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.less +2586 -0
  82. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.min.css +1 -0
  83. data/apps/core/components/public/js/bootbox_2/bootbox.js +551 -0
  84. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-it-min.js +4 -0
  85. data/apps/core/components/public/js/spider.js +7 -3
  86. data/apps/core/components/public/js/tinymce/classes/AddOnManager.js +265 -0
  87. data/apps/core/components/public/js/tinymce/classes/Compat.js +90 -0
  88. data/apps/core/components/public/js/tinymce/classes/DragDropOverrides.js +224 -0
  89. data/apps/core/components/public/js/tinymce/classes/Editor.js +2221 -0
  90. data/apps/core/components/public/js/tinymce/classes/EditorCommands.js +1028 -0
  91. data/apps/core/components/public/js/tinymce/classes/EditorManager.js +715 -0
  92. data/apps/core/components/public/js/tinymce/classes/EditorObservable.js +204 -0
  93. data/apps/core/components/public/js/tinymce/classes/EditorUpload.js +191 -0
  94. data/apps/core/components/public/js/tinymce/classes/EnterKey.js +676 -0
  95. data/apps/core/components/public/js/tinymce/classes/Env.js +177 -0
  96. data/apps/core/components/public/js/tinymce/classes/FocusManager.js +266 -0
  97. data/apps/core/components/public/js/tinymce/classes/ForceBlocks.js +138 -0
  98. data/apps/core/components/public/js/tinymce/classes/Formatter.js +2378 -0
  99. data/apps/core/components/public/js/tinymce/classes/LegacyInput.js +82 -0
  100. data/apps/core/components/public/js/tinymce/classes/Mode.js +54 -0
  101. data/apps/core/components/public/js/tinymce/classes/NodeChange.js +154 -0
  102. data/apps/core/components/public/js/tinymce/classes/NotificationManager.js +156 -0
  103. data/apps/core/components/public/js/tinymce/classes/Register.js +34 -0
  104. data/apps/core/components/public/js/tinymce/classes/SelectionOverrides.js +810 -0
  105. data/apps/core/components/public/js/tinymce/classes/Shortcuts.js +172 -0
  106. data/apps/core/components/public/js/tinymce/classes/UndoManager.js +346 -0
  107. data/apps/core/components/public/js/tinymce/classes/WindowManager.js +278 -0
  108. data/apps/core/components/public/js/tinymce/classes/caret/CaretBookmark.js +263 -0
  109. data/apps/core/components/public/js/tinymce/classes/caret/CaretCandidate.js +86 -0
  110. data/apps/core/components/public/js/tinymce/classes/caret/CaretContainer.js +151 -0
  111. data/apps/core/components/public/js/tinymce/classes/caret/CaretPosition.js +371 -0
  112. data/apps/core/components/public/js/tinymce/classes/caret/CaretUtils.js +302 -0
  113. data/apps/core/components/public/js/tinymce/classes/caret/CaretWalker.js +215 -0
  114. data/apps/core/components/public/js/tinymce/classes/caret/FakeCaret.js +192 -0
  115. data/apps/core/components/public/js/tinymce/classes/caret/LineUtils.js +135 -0
  116. data/apps/core/components/public/js/tinymce/classes/caret/LineWalker.js +166 -0
  117. data/apps/core/components/public/js/tinymce/classes/data/Binding.js +79 -0
  118. data/apps/core/components/public/js/tinymce/classes/data/ObservableArray.js +196 -0
  119. data/apps/core/components/public/js/tinymce/classes/data/ObservableObject.js +194 -0
  120. data/apps/core/components/public/js/tinymce/classes/dom/BookmarkManager.js +456 -0
  121. data/apps/core/components/public/js/tinymce/classes/dom/ControlSelection.js +634 -0
  122. data/apps/core/components/public/js/tinymce/classes/dom/DOMUtils.js +1853 -0
  123. data/apps/core/components/public/js/tinymce/classes/dom/Dimensions.js +64 -0
  124. data/apps/core/components/public/js/tinymce/classes/dom/DomQuery.js +1578 -0
  125. data/apps/core/components/public/js/tinymce/classes/dom/ElementUtils.js +118 -0
  126. data/apps/core/components/public/js/tinymce/classes/dom/EventUtils.js +583 -0
  127. data/apps/core/components/public/js/tinymce/classes/dom/NodePath.js +50 -0
  128. data/apps/core/components/public/js/tinymce/classes/dom/NodeType.js +110 -0
  129. data/apps/core/components/public/js/tinymce/classes/dom/Range.js +785 -0
  130. data/apps/core/components/public/js/tinymce/classes/dom/RangeUtils.js +628 -0
  131. data/apps/core/components/public/js/tinymce/classes/dom/ScriptLoader.js +254 -0
  132. data/apps/core/components/public/js/tinymce/classes/dom/Selection.js +1008 -0
  133. data/apps/core/components/public/js/tinymce/classes/dom/Serializer.js +506 -0
  134. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.jQuery.js +23 -0
  135. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.js +2039 -0
  136. data/apps/core/components/public/js/tinymce/classes/dom/StyleSheetLoader.js +190 -0
  137. data/apps/core/components/public/js/tinymce/classes/dom/TreeWalker.js +127 -0
  138. data/apps/core/components/public/js/tinymce/classes/dom/TridentSelection.js +508 -0
  139. data/apps/core/components/public/js/tinymce/classes/file/BlobCache.js +72 -0
  140. data/apps/core/components/public/js/tinymce/classes/file/Conversions.js +106 -0
  141. data/apps/core/components/public/js/tinymce/classes/file/ImageScanner.js +145 -0
  142. data/apps/core/components/public/js/tinymce/classes/file/Uploader.js +193 -0
  143. data/apps/core/components/public/js/tinymce/classes/fmt/Hooks.js +66 -0
  144. data/apps/core/components/public/js/tinymce/classes/fmt/Preview.js +151 -0
  145. data/apps/core/components/public/js/tinymce/classes/geom/ClientRect.js +136 -0
  146. data/apps/core/components/public/js/tinymce/classes/geom/Rect.js +214 -0
  147. data/apps/core/components/public/js/tinymce/classes/html/DomParser.js +822 -0
  148. data/apps/core/components/public/js/tinymce/classes/html/Entities.js +268 -0
  149. data/apps/core/components/public/js/tinymce/classes/html/Node.js +496 -0
  150. data/apps/core/components/public/js/tinymce/classes/html/SaxParser.js +474 -0
  151. data/apps/core/components/public/js/tinymce/classes/html/Schema.js +1004 -0
  152. data/apps/core/components/public/js/tinymce/classes/html/Serializer.js +158 -0
  153. data/apps/core/components/public/js/tinymce/classes/html/Styles.js +363 -0
  154. data/apps/core/components/public/js/tinymce/classes/html/Writer.js +199 -0
  155. data/apps/core/components/public/js/tinymce/classes/jquery.tinymce.js +377 -0
  156. data/apps/core/components/public/js/tinymce/classes/text/ExtendingChar.js +53 -0
  157. data/apps/core/components/public/js/tinymce/classes/text/Zwsp.js +36 -0
  158. data/apps/core/components/public/js/tinymce/classes/ui/AbsoluteLayout.js +63 -0
  159. data/apps/core/components/public/js/tinymce/classes/ui/BoxUtils.js +98 -0
  160. data/apps/core/components/public/js/tinymce/classes/ui/Button.js +199 -0
  161. data/apps/core/components/public/js/tinymce/classes/ui/ButtonGroup.js +62 -0
  162. data/apps/core/components/public/js/tinymce/classes/ui/Checkbox.js +162 -0
  163. data/apps/core/components/public/js/tinymce/classes/ui/ClassList.js +149 -0
  164. data/apps/core/components/public/js/tinymce/classes/ui/Collection.js +438 -0
  165. data/apps/core/components/public/js/tinymce/classes/ui/ColorBox.js +72 -0
  166. data/apps/core/components/public/js/tinymce/classes/ui/ColorButton.js +124 -0
  167. data/apps/core/components/public/js/tinymce/classes/ui/ColorPicker.js +206 -0
  168. data/apps/core/components/public/js/tinymce/classes/ui/ComboBox.js +306 -0
  169. data/apps/core/components/public/js/tinymce/classes/ui/Container.js +506 -0
  170. data/apps/core/components/public/js/tinymce/classes/ui/Control.js +1301 -0
  171. data/apps/core/components/public/js/tinymce/classes/ui/DomUtils.js +107 -0
  172. data/apps/core/components/public/js/tinymce/classes/ui/DragHelper.js +144 -0
  173. data/apps/core/components/public/js/tinymce/classes/ui/ElementPath.js +79 -0
  174. data/apps/core/components/public/js/tinymce/classes/ui/Factory.js +105 -0
  175. data/apps/core/components/public/js/tinymce/classes/ui/FieldSet.js +59 -0
  176. data/apps/core/components/public/js/tinymce/classes/ui/FilePicker.js +85 -0
  177. data/apps/core/components/public/js/tinymce/classes/ui/FitLayout.js +48 -0
  178. data/apps/core/components/public/js/tinymce/classes/ui/FlexLayout.js +246 -0
  179. data/apps/core/components/public/js/tinymce/classes/ui/FloatPanel.js +409 -0
  180. data/apps/core/components/public/js/tinymce/classes/ui/FlowLayout.js +46 -0
  181. data/apps/core/components/public/js/tinymce/classes/ui/Form.js +157 -0
  182. data/apps/core/components/public/js/tinymce/classes/ui/FormItem.js +56 -0
  183. data/apps/core/components/public/js/tinymce/classes/ui/FormatControls.js +535 -0
  184. data/apps/core/components/public/js/tinymce/classes/ui/GridLayout.js +233 -0
  185. data/apps/core/components/public/js/tinymce/classes/ui/Iframe.js +85 -0
  186. data/apps/core/components/public/js/tinymce/classes/ui/InfoBox.js +93 -0
  187. data/apps/core/components/public/js/tinymce/classes/ui/KeyboardNavigation.js +406 -0
  188. data/apps/core/components/public/js/tinymce/classes/ui/Label.js +144 -0
  189. data/apps/core/components/public/js/tinymce/classes/ui/Layout.js +120 -0
  190. data/apps/core/components/public/js/tinymce/classes/ui/ListBox.js +152 -0
  191. data/apps/core/components/public/js/tinymce/classes/ui/Menu.js +195 -0
  192. data/apps/core/components/public/js/tinymce/classes/ui/MenuBar.js +33 -0
  193. data/apps/core/components/public/js/tinymce/classes/ui/MenuButton.js +268 -0
  194. data/apps/core/components/public/js/tinymce/classes/ui/MenuItem.js +336 -0
  195. data/apps/core/components/public/js/tinymce/classes/ui/MessageBox.js +202 -0
  196. data/apps/core/components/public/js/tinymce/classes/ui/Movable.js +200 -0
  197. data/apps/core/components/public/js/tinymce/classes/ui/Notification.js +154 -0
  198. data/apps/core/components/public/js/tinymce/classes/ui/Panel.js +67 -0
  199. data/apps/core/components/public/js/tinymce/classes/ui/PanelButton.js +114 -0
  200. data/apps/core/components/public/js/tinymce/classes/ui/Path.js +127 -0
  201. data/apps/core/components/public/js/tinymce/classes/ui/Progress.js +81 -0
  202. data/apps/core/components/public/js/tinymce/classes/ui/Radio.js +29 -0
  203. data/apps/core/components/public/js/tinymce/classes/ui/ReflowQueue.js +79 -0
  204. data/apps/core/components/public/js/tinymce/classes/ui/Resizable.js +68 -0
  205. data/apps/core/components/public/js/tinymce/classes/ui/ResizeHandle.js +86 -0
  206. data/apps/core/components/public/js/tinymce/classes/ui/Scrollable.js +141 -0
  207. data/apps/core/components/public/js/tinymce/classes/ui/SelectBox.js +106 -0
  208. data/apps/core/components/public/js/tinymce/classes/ui/Selector.js +369 -0
  209. data/apps/core/components/public/js/tinymce/classes/ui/Slider.js +161 -0
  210. data/apps/core/components/public/js/tinymce/classes/ui/Spacer.js +39 -0
  211. data/apps/core/components/public/js/tinymce/classes/ui/SplitButton.js +146 -0
  212. data/apps/core/components/public/js/tinymce/classes/ui/StackLayout.js +34 -0
  213. data/apps/core/components/public/js/tinymce/classes/ui/TabPanel.js +178 -0
  214. data/apps/core/components/public/js/tinymce/classes/ui/TextBox.js +208 -0
  215. data/apps/core/components/public/js/tinymce/classes/ui/Throbber.js +88 -0
  216. data/apps/core/components/public/js/tinymce/classes/ui/Toolbar.js +56 -0
  217. data/apps/core/components/public/js/tinymce/classes/ui/Tooltip.js +73 -0
  218. data/apps/core/components/public/js/tinymce/classes/ui/Widget.js +151 -0
  219. data/apps/core/components/public/js/tinymce/classes/ui/Window.js +474 -0
  220. data/apps/core/components/public/js/tinymce/classes/util/Arr.js +153 -0
  221. data/apps/core/components/public/js/tinymce/classes/util/Class.js +167 -0
  222. data/apps/core/components/public/js/tinymce/classes/util/Color.js +235 -0
  223. data/apps/core/components/public/js/tinymce/classes/util/Delay.js +191 -0
  224. data/apps/core/components/public/js/tinymce/classes/util/EventDispatcher.js +294 -0
  225. data/apps/core/components/public/js/tinymce/classes/util/Fun.js +87 -0
  226. data/apps/core/components/public/js/tinymce/classes/util/I18n.js +116 -0
  227. data/apps/core/components/public/js/tinymce/classes/util/JSON.js +109 -0
  228. data/apps/core/components/public/js/tinymce/classes/util/JSONP.js +38 -0
  229. data/apps/core/components/public/js/tinymce/classes/util/JSONRequest.js +110 -0
  230. data/apps/core/components/public/js/tinymce/classes/util/LocalStorage.js +213 -0
  231. data/apps/core/components/public/js/tinymce/classes/util/Observable.js +129 -0
  232. data/apps/core/components/public/js/tinymce/classes/util/Promise.js +200 -0
  233. data/apps/core/components/public/js/tinymce/classes/util/Quirks.js +1701 -0
  234. data/apps/core/components/public/js/tinymce/classes/util/Tools.js +442 -0
  235. data/apps/core/components/public/js/tinymce/classes/util/URI.js +411 -0
  236. data/apps/core/components/public/js/tinymce/classes/util/VK.js +37 -0
  237. data/apps/core/components/public/js/tinymce/classes/util/XHR.js +110 -0
  238. data/apps/core/components/public/js/tinymce/jquery.tinymce.min.js +1 -0
  239. data/apps/core/components/public/js/tinymce/langs/it.js +219 -0
  240. data/apps/core/components/public/js/tinymce/langs/readme.md +3 -0
  241. data/apps/core/components/public/js/tinymce/license.txt +504 -0
  242. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.js +97 -0
  243. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.min.js +1 -0
  244. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.js +55 -0
  245. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.min.js +1 -0
  246. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.js +204 -0
  247. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.min.js +1 -0
  248. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.js +162 -0
  249. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.min.js +1 -0
  250. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.js +165 -0
  251. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.min.js +1 -0
  252. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.js +123 -0
  253. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.min.js +1 -0
  254. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.js +450 -0
  255. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  256. data/apps/core/components/public/js/tinymce/plugins/code/plugin.js +60 -0
  257. data/apps/core/components/public/js/tinymce/plugins/code/plugin.min.js +1 -0
  258. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Dialog.js +121 -0
  259. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Plugin.js +95 -0
  260. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Prism.js +937 -0
  261. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Utils.js +33 -0
  262. data/apps/core/components/public/js/tinymce/plugins/codesample/css/prism.css +138 -0
  263. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.dev.js +141 -0
  264. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.js +1299 -0
  265. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.min.js +1 -0
  266. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  267. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  268. data/apps/core/components/public/js/tinymce/plugins/compat3x/css/dialog.css +118 -0
  269. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/buttons.png +0 -0
  270. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/icons.gif +0 -0
  271. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/items.gif +0 -0
  272. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_arrow.gif +0 -0
  273. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_check.gif +0 -0
  274. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/progress.gif +0 -0
  275. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/tabs.gif +0 -0
  276. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.js +297 -0
  277. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  278. data/apps/core/components/public/js/tinymce/plugins/compat3x/tiny_mce_popup.js +542 -0
  279. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/editable_selects.js +70 -0
  280. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/form_utils.js +210 -0
  281. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/mctabs.js +164 -0
  282. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/validate.js +252 -0
  283. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.js +88 -0
  284. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.min.js +1 -0
  285. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.js +64 -0
  286. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  287. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
  288. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
  289. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  290. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  291. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
  292. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
  293. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
  294. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
  295. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  296. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
  297. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
  298. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
  299. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  300. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
  301. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
  302. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
  303. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.js +65 -0
  304. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.min.js +1 -0
  305. data/apps/core/components/public/js/tinymce/plugins/example/dialog.html +8 -0
  306. data/apps/core/components/public/js/tinymce/plugins/example/plugin.js +68 -0
  307. data/apps/core/components/public/js/tinymce/plugins/example/plugin.min.js +1 -0
  308. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.js +22 -0
  309. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.min.js +1 -0
  310. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.js +490 -0
  311. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.min.js +1 -0
  312. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.js +154 -0
  313. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  314. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.js +30 -0
  315. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.min.js +1 -0
  316. data/apps/core/components/public/js/tinymce/plugins/image/plugin.js +630 -0
  317. data/apps/core/components/public/js/tinymce/plugins/image/plugin.min.js +1 -0
  318. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/atomic.js +6 -0
  319. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/browser.js +6 -0
  320. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/demo.js +8 -0
  321. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/prod.js +6 -0
  322. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.js +2668 -0
  323. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.min.js +1 -0
  324. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/html/demo.html +16 -0
  325. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/js/Demo.js +92 -0
  326. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/CropRect.js +214 -0
  327. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Dialog.js +485 -0
  328. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/ImagePanel.js +218 -0
  329. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Plugin.js +411 -0
  330. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/UndoStack.js +57 -0
  331. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.js +227 -0
  332. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.min.js +1 -0
  333. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.js +121 -0
  334. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
  335. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.js +225 -0
  336. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.min.js +1 -0
  337. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.js +211 -0
  338. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
  339. data/apps/core/components/public/js/tinymce/plugins/link/plugin.js +403 -0
  340. data/apps/core/components/public/js/tinymce/plugins/link/plugin.min.js +1 -0
  341. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.js +885 -0
  342. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.min.js +1 -0
  343. data/apps/core/components/public/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  344. data/apps/core/components/public/js/tinymce/plugins/media/plugin.js +878 -0
  345. data/apps/core/components/public/js/tinymce/plugins/media/plugin.min.js +1 -0
  346. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.js +53 -0
  347. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
  348. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.js +101 -0
  349. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.min.js +1 -0
  350. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.js +88 -0
  351. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.min.js +1 -0
  352. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Clipboard.js +672 -0
  353. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Plugin.js +121 -0
  354. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Quirks.js +159 -0
  355. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Utils.js +140 -0
  356. data/apps/core/components/public/js/tinymce/plugins/paste/classes/WordFilter.js +500 -0
  357. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.dev.js +142 -0
  358. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.js +1708 -0
  359. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.min.js +1 -0
  360. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.js +88 -0
  361. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.min.js +1 -0
  362. data/apps/core/components/public/js/tinymce/plugins/print/plugin.js +32 -0
  363. data/apps/core/components/public/js/tinymce/plugins/print/plugin.min.js +1 -0
  364. data/apps/core/components/public/js/tinymce/plugins/save/plugin.js +98 -0
  365. data/apps/core/components/public/js/tinymce/plugins/save/plugin.min.js +1 -0
  366. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.js +609 -0
  367. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.min.js +1 -0
  368. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js +480 -0
  369. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/Plugin.js +439 -0
  370. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.dev.js +139 -0
  371. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.js +1026 -0
  372. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.min.js +1 -0
  373. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.js +120 -0
  374. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  375. data/apps/core/components/public/js/tinymce/plugins/table/classes/CellSelection.js +202 -0
  376. data/apps/core/components/public/js/tinymce/plugins/table/classes/Dialogs.js +824 -0
  377. data/apps/core/components/public/js/tinymce/plugins/table/classes/Plugin.js +599 -0
  378. data/apps/core/components/public/js/tinymce/plugins/table/classes/Quirks.js +400 -0
  379. data/apps/core/components/public/js/tinymce/plugins/table/classes/ResizeBars.js +984 -0
  380. data/apps/core/components/public/js/tinymce/plugins/table/classes/TableGrid.js +941 -0
  381. data/apps/core/components/public/js/tinymce/plugins/table/classes/Utils.js +36 -0
  382. data/apps/core/components/public/js/tinymce/plugins/table/plugin.dev.js +142 -0
  383. data/apps/core/components/public/js/tinymce/plugins/table/plugin.js +4106 -0
  384. data/apps/core/components/public/js/tinymce/plugins/table/plugin.min.js +2 -0
  385. data/apps/core/components/public/js/tinymce/plugins/template/plugin.js +270 -0
  386. data/apps/core/components/public/js/tinymce/plugins/template/plugin.min.js +1 -0
  387. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.js +282 -0
  388. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  389. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.js +268 -0
  390. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.min.js +1 -0
  391. data/apps/core/components/public/js/tinymce/plugins/visualblocks/css/visualblocks.css +135 -0
  392. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/address.gif +0 -0
  393. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/article.gif +0 -0
  394. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/aside.gif +0 -0
  395. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/blockquote.gif +0 -0
  396. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/div.gif +0 -0
  397. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/dl.gif +0 -0
  398. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/figure.gif +0 -0
  399. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h1.gif +0 -0
  400. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h2.gif +0 -0
  401. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h3.gif +0 -0
  402. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h4.gif +0 -0
  403. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h5.gif +0 -0
  404. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h6.gif +0 -0
  405. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/hgroup.gif +0 -0
  406. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ol.gif +0 -0
  407. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/p.gif +0 -0
  408. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/pre.gif +0 -0
  409. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/section.gif +0 -0
  410. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ul.gif +0 -0
  411. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.js +86 -0
  412. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.min.js +1 -0
  413. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.js +123 -0
  414. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.min.js +1 -0
  415. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.js +69 -0
  416. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js +1 -0
  417. data/apps/core/components/public/js/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  418. data/apps/core/components/public/js/tinymce/skins/lightgray/Animations.less +10 -0
  419. data/apps/core/components/public/js/tinymce/skins/lightgray/Button.less +172 -0
  420. data/apps/core/components/public/js/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  421. data/apps/core/components/public/js/tinymce/skins/lightgray/Checkbox.less +49 -0
  422. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorBox.less +6 -0
  423. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorButton.less +72 -0
  424. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorPicker.less +80 -0
  425. data/apps/core/components/public/js/tinymce/skins/lightgray/ComboBox.less +39 -0
  426. data/apps/core/components/public/js/tinymce/skins/lightgray/Container.less +9 -0
  427. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Inline.less +4 -0
  428. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Objects.less +166 -0
  429. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.less +27 -0
  430. data/apps/core/components/public/js/tinymce/skins/lightgray/CropRect.less +54 -0
  431. data/apps/core/components/public/js/tinymce/skins/lightgray/FieldSet.less +15 -0
  432. data/apps/core/components/public/js/tinymce/skins/lightgray/FitLayout.less +9 -0
  433. data/apps/core/components/public/js/tinymce/skins/lightgray/FloatPanel.less +69 -0
  434. data/apps/core/components/public/js/tinymce/skins/lightgray/FlowLayout.less +36 -0
  435. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  436. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.less +180 -0
  437. data/apps/core/components/public/js/tinymce/skins/lightgray/Iframe.less +6 -0
  438. data/apps/core/components/public/js/tinymce/skins/lightgray/ImagePanel.less +20 -0
  439. data/apps/core/components/public/js/tinymce/skins/lightgray/InfoBox.less +71 -0
  440. data/apps/core/components/public/js/tinymce/skins/lightgray/Label.less +38 -0
  441. data/apps/core/components/public/js/tinymce/skins/lightgray/ListBox.less +26 -0
  442. data/apps/core/components/public/js/tinymce/skins/lightgray/Menu.less +34 -0
  443. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuBar.less +32 -0
  444. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuButton.less +34 -0
  445. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuItem.less +142 -0
  446. data/apps/core/components/public/js/tinymce/skins/lightgray/Mixins.less +54 -0
  447. data/apps/core/components/public/js/tinymce/skins/lightgray/Notification.less +144 -0
  448. data/apps/core/components/public/js/tinymce/skins/lightgray/Panel.less +7 -0
  449. data/apps/core/components/public/js/tinymce/skins/lightgray/Path.less +45 -0
  450. data/apps/core/components/public/js/tinymce/skins/lightgray/Progress.less +34 -0
  451. data/apps/core/components/public/js/tinymce/skins/lightgray/Radio.less +1 -0
  452. data/apps/core/components/public/js/tinymce/skins/lightgray/Reset.less +32 -0
  453. data/apps/core/components/public/js/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  454. data/apps/core/components/public/js/tinymce/skins/lightgray/Scrollable.less +44 -0
  455. data/apps/core/components/public/js/tinymce/skins/lightgray/SelectBox.less +6 -0
  456. data/apps/core/components/public/js/tinymce/skins/lightgray/Slider.less +29 -0
  457. data/apps/core/components/public/js/tinymce/skins/lightgray/Spacer.less +5 -0
  458. data/apps/core/components/public/js/tinymce/skins/lightgray/SplitButton.less +49 -0
  459. data/apps/core/components/public/js/tinymce/skins/lightgray/StackLayout.less +5 -0
  460. data/apps/core/components/public/js/tinymce/skins/lightgray/TabPanel.less +44 -0
  461. data/apps/core/components/public/js/tinymce/skins/lightgray/TextBox.less +41 -0
  462. data/apps/core/components/public/js/tinymce/skins/lightgray/Throbber.less +19 -0
  463. data/apps/core/components/public/js/tinymce/skins/lightgray/TinyMCE.less +159 -0
  464. data/apps/core/components/public/js/tinymce/skins/lightgray/ToolTip.less +129 -0
  465. data/apps/core/components/public/js/tinymce/skins/lightgray/Variables.less +214 -0
  466. data/apps/core/components/public/js/tinymce/skins/lightgray/Window.less +127 -0
  467. data/apps/core/components/public/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  468. data/apps/core/components/public/js/tinymce/skins/lightgray/content.min.css +1 -0
  469. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  470. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  471. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  472. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  473. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  474. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  475. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  476. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  477. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  478. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  479. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  480. data/apps/core/components/public/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  481. data/apps/core/components/public/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  482. data/apps/core/components/public/js/tinymce/skins/lightgray/img/object.gif +0 -0
  483. data/apps/core/components/public/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  484. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.dev.less +46 -0
  485. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  486. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  487. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  488. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.less +2586 -0
  489. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.min.css +1 -0
  490. data/apps/core/components/public/js/tinymce/themes/modern/theme.js +878 -0
  491. data/apps/core/components/public/js/tinymce/themes/modern/theme.min.js +1 -0
  492. data/apps/core/components/public/js/tinymce/tinymce.dev.js +286 -0
  493. data/apps/core/components/public/js/tinymce/tinymce.js +45811 -0
  494. data/apps/core/components/public/js/tinymce/tinymce.min.js +13 -0
  495. data/apps/core/forms/widgets/form/form.rb +3 -1
  496. data/apps/core/forms/widgets/form/form.shtml +1 -0
  497. data/apps/core/forms/widgets/inputs/search_select/search_select.rb +1 -1
  498. data/apps/core/forms/widgets/inputs/select/select.rb +1 -1
  499. data/apps/core/forms/widgets/inputs/select/select.shtml +0 -1
  500. data/apps/messenger/backends/sms/skebby.rb +1 -1
  501. data/apps/messenger/controllers/mixins/messenger_helper.rb +23 -5
  502. data/lib/spiderfw/config/options/spider.rb +1 -1
  503. data/lib/spiderfw/controller/mixins/visual.rb +2 -0
  504. data/lib/spiderfw/http/adapters/rack.rb +10 -5
  505. data/lib/spiderfw/http/http.rb +4 -2
  506. data/lib/spiderfw/model/base_model.rb +4 -4
  507. data/lib/spiderfw/model/mappers/db_mapper.rb +4 -2
  508. data/lib/spiderfw/model/storage/db/adapters/mysql.rb +2 -1
  509. data/lib/spiderfw/model/storage/db/db_storage.rb +4 -0
  510. data/lib/spiderfw/spider.rb +6 -0
  511. data/lib/spiderfw/templates/layout.rb +1 -1
  512. data/lib/spiderfw/utils/monkey/object.rb +3 -0
  513. data/spider.gemspec +6 -2
  514. metadata +539 -42
  515. data/blueprints/.DS_Store +0 -0
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Sizzle.jQuery.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global jQuery:true */
12
+
13
+ /*
14
+ * Fake Sizzle using jQuery.
15
+ */
16
+ define("tinymce/dom/Sizzle", [], function() {
17
+ // Detect if jQuery is loaded
18
+ if (!window.jQuery) {
19
+ throw new Error("Load jQuery first");
20
+ }
21
+
22
+ return jQuery.find;
23
+ });
@@ -0,0 +1,2039 @@
1
+ /**
2
+ * Sizzle.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ *
10
+ * @ignore-file
11
+ */
12
+
13
+ /*jshint bitwise:false, expr:true, noempty:false, sub:true, eqnull:true, latedef:false, maxlen:255 */
14
+ /*eslint-disable */
15
+
16
+ /**
17
+ * Sizzle CSS Selector Engine v@VERSION
18
+ * http://sizzlejs.com/
19
+ *
20
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
21
+ * Released under the MIT license
22
+ * http://jquery.org/license
23
+ *
24
+ * Date: @DATE
25
+ */
26
+ define("tinymce/dom/Sizzle", [], function() {
27
+ var i,
28
+ support,
29
+ Expr,
30
+ getText,
31
+ isXML,
32
+ tokenize,
33
+ compile,
34
+ select,
35
+ outermostContext,
36
+ sortInput,
37
+ hasDuplicate,
38
+
39
+ // Local document vars
40
+ setDocument,
41
+ document,
42
+ docElem,
43
+ documentIsHTML,
44
+ rbuggyQSA,
45
+ rbuggyMatches,
46
+ matches,
47
+ contains,
48
+
49
+ // Instance-specific data
50
+ expando = "sizzle" + -(new Date()),
51
+ preferredDoc = window.document,
52
+ dirruns = 0,
53
+ done = 0,
54
+ classCache = createCache(),
55
+ tokenCache = createCache(),
56
+ compilerCache = createCache(),
57
+ sortOrder = function( a, b ) {
58
+ if ( a === b ) {
59
+ hasDuplicate = true;
60
+ }
61
+ return 0;
62
+ },
63
+
64
+ // General-purpose constants
65
+ strundefined = typeof undefined,
66
+ MAX_NEGATIVE = 1 << 31,
67
+
68
+ // Instance methods
69
+ hasOwn = ({}).hasOwnProperty,
70
+ arr = [],
71
+ pop = arr.pop,
72
+ push_native = arr.push,
73
+ push = arr.push,
74
+ slice = arr.slice,
75
+ // Use a stripped-down indexOf if we can't use a native one
76
+ indexOf = arr.indexOf || function( elem ) {
77
+ var i = 0,
78
+ len = this.length;
79
+ for ( ; i < len; i++ ) {
80
+ if ( this[i] === elem ) {
81
+ return i;
82
+ }
83
+ }
84
+ return -1;
85
+ },
86
+
87
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
88
+
89
+ // Regular expressions
90
+
91
+ // http://www.w3.org/TR/css3-selectors/#whitespace
92
+ whitespace = "[\\x20\\t\\r\\n\\f]",
93
+
94
+ // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
95
+ identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
96
+
97
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
98
+ attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
99
+ // Operator (capture 2)
100
+ "*([*^$|!~]?=)" + whitespace +
101
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
102
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
103
+ "*\\]",
104
+
105
+ pseudos = ":(" + identifier + ")(?:\\((" +
106
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
107
+ // 1. quoted (capture 3; capture 4 or capture 5)
108
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
109
+ // 2. simple (capture 6)
110
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
111
+ // 3. anything else (capture 2)
112
+ ".*" +
113
+ ")\\)|)",
114
+
115
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
116
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
117
+
118
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
119
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
120
+
121
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
122
+
123
+ rpseudo = new RegExp( pseudos ),
124
+ ridentifier = new RegExp( "^" + identifier + "$" ),
125
+
126
+ matchExpr = {
127
+ "ID": new RegExp( "^#(" + identifier + ")" ),
128
+ "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
129
+ "TAG": new RegExp( "^(" + identifier + "|[*])" ),
130
+ "ATTR": new RegExp( "^" + attributes ),
131
+ "PSEUDO": new RegExp( "^" + pseudos ),
132
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
133
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
134
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
135
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
136
+ // For use in libraries implementing .is()
137
+ // We use this for POS matching in `select`
138
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
139
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
140
+ },
141
+
142
+ rinputs = /^(?:input|select|textarea|button)$/i,
143
+ rheader = /^h\d$/i,
144
+
145
+ rnative = /^[^{]+\{\s*\[native \w/,
146
+
147
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
148
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
149
+
150
+ rsibling = /[+~]/,
151
+ rescape = /'|\\/g,
152
+
153
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
154
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
155
+ funescape = function( _, escaped, escapedWhitespace ) {
156
+ var high = "0x" + escaped - 0x10000;
157
+ // NaN means non-codepoint
158
+ // Support: Firefox<24
159
+ // Workaround erroneous numeric interpretation of +"0x"
160
+ return high !== high || escapedWhitespace ?
161
+ escaped :
162
+ high < 0 ?
163
+ // BMP codepoint
164
+ String.fromCharCode( high + 0x10000 ) :
165
+ // Supplemental Plane codepoint (surrogate pair)
166
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
167
+ };
168
+
169
+ // Optimize for push.apply( _, NodeList )
170
+ try {
171
+ push.apply(
172
+ (arr = slice.call( preferredDoc.childNodes )),
173
+ preferredDoc.childNodes
174
+ );
175
+ // Support: Android<4.0
176
+ // Detect silently failing push.apply
177
+ arr[ preferredDoc.childNodes.length ].nodeType;
178
+ } catch ( e ) {
179
+ push = { apply: arr.length ?
180
+
181
+ // Leverage slice if possible
182
+ function( target, els ) {
183
+ push_native.apply( target, slice.call(els) );
184
+ } :
185
+
186
+ // Support: IE<9
187
+ // Otherwise append directly
188
+ function( target, els ) {
189
+ var j = target.length,
190
+ i = 0;
191
+ // Can't trust NodeList.length
192
+ while ( (target[j++] = els[i++]) ) {}
193
+ target.length = j - 1;
194
+ }
195
+ };
196
+ }
197
+
198
+ function Sizzle( selector, context, results, seed ) {
199
+ var match, elem, m, nodeType,
200
+ // QSA vars
201
+ i, groups, old, nid, newContext, newSelector;
202
+
203
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
204
+ setDocument( context );
205
+ }
206
+
207
+ context = context || document;
208
+ results = results || [];
209
+
210
+ if ( !selector || typeof selector !== "string" ) {
211
+ return results;
212
+ }
213
+
214
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
215
+ return [];
216
+ }
217
+
218
+ if ( documentIsHTML && !seed ) {
219
+
220
+ // Shortcuts
221
+ if ( (match = rquickExpr.exec( selector )) ) {
222
+ // Speed-up: Sizzle("#ID")
223
+ if ( (m = match[1]) ) {
224
+ if ( nodeType === 9 ) {
225
+ elem = context.getElementById( m );
226
+ // Check parentNode to catch when Blackberry 4.6 returns
227
+ // nodes that are no longer in the document (jQuery #6963)
228
+ if ( elem && elem.parentNode ) {
229
+ // Handle the case where IE, Opera, and Webkit return items
230
+ // by name instead of ID
231
+ if ( elem.id === m ) {
232
+ results.push( elem );
233
+ return results;
234
+ }
235
+ } else {
236
+ return results;
237
+ }
238
+ } else {
239
+ // Context is not a document
240
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
241
+ contains( context, elem ) && elem.id === m ) {
242
+ results.push( elem );
243
+ return results;
244
+ }
245
+ }
246
+
247
+ // Speed-up: Sizzle("TAG")
248
+ } else if ( match[2] ) {
249
+ push.apply( results, context.getElementsByTagName( selector ) );
250
+ return results;
251
+
252
+ // Speed-up: Sizzle(".CLASS")
253
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
254
+ push.apply( results, context.getElementsByClassName( m ) );
255
+ return results;
256
+ }
257
+ }
258
+
259
+ // QSA path
260
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
261
+ nid = old = expando;
262
+ newContext = context;
263
+ newSelector = nodeType === 9 && selector;
264
+
265
+ // qSA works strangely on Element-rooted queries
266
+ // We can work around this by specifying an extra ID on the root
267
+ // and working up from there (Thanks to Andrew Dupont for the technique)
268
+ // IE 8 doesn't work on object elements
269
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
270
+ groups = tokenize( selector );
271
+
272
+ if ( (old = context.getAttribute("id")) ) {
273
+ nid = old.replace( rescape, "\\$&" );
274
+ } else {
275
+ context.setAttribute( "id", nid );
276
+ }
277
+ nid = "[id='" + nid + "'] ";
278
+
279
+ i = groups.length;
280
+ while ( i-- ) {
281
+ groups[i] = nid + toSelector( groups[i] );
282
+ }
283
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
284
+ newSelector = groups.join(",");
285
+ }
286
+
287
+ if ( newSelector ) {
288
+ try {
289
+ push.apply( results,
290
+ newContext.querySelectorAll( newSelector )
291
+ );
292
+ return results;
293
+ } catch(qsaError) {
294
+ } finally {
295
+ if ( !old ) {
296
+ context.removeAttribute("id");
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+
303
+ // All others
304
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
305
+ }
306
+
307
+ /**
308
+ * Create key-value caches of limited size
309
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
310
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
311
+ * deleting the oldest entry
312
+ */
313
+ function createCache() {
314
+ var keys = [];
315
+
316
+ function cache( key, value ) {
317
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
318
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
319
+ // Only keep the most recent entries
320
+ delete cache[ keys.shift() ];
321
+ }
322
+ return (cache[ key + " " ] = value);
323
+ }
324
+ return cache;
325
+ }
326
+
327
+ /**
328
+ * Mark a function for special use by Sizzle
329
+ * @param {Function} fn The function to mark
330
+ */
331
+ function markFunction( fn ) {
332
+ fn[ expando ] = true;
333
+ return fn;
334
+ }
335
+
336
+ /**
337
+ * Support testing using an element
338
+ * @param {Function} fn Passed the created div and expects a boolean result
339
+ */
340
+ function assert( fn ) {
341
+ var div = document.createElement("div");
342
+
343
+ try {
344
+ return !!fn( div );
345
+ } catch (e) {
346
+ return false;
347
+ } finally {
348
+ // Remove from its parent by default
349
+ if ( div.parentNode ) {
350
+ div.parentNode.removeChild( div );
351
+ }
352
+ // release memory in IE
353
+ div = null;
354
+ }
355
+ }
356
+
357
+ /**
358
+ * Adds the same handler for all of the specified attrs
359
+ * @param {String} attrs Pipe-separated list of attributes
360
+ * @param {Function} handler The method that will be applied
361
+ */
362
+ function addHandle( attrs, handler ) {
363
+ var arr = attrs.split("|"),
364
+ i = attrs.length;
365
+
366
+ while ( i-- ) {
367
+ Expr.attrHandle[ arr[i] ] = handler;
368
+ }
369
+ }
370
+
371
+ /**
372
+ * Checks document order of two siblings
373
+ * @param {Element} a
374
+ * @param {Element} b
375
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
376
+ */
377
+ function siblingCheck( a, b ) {
378
+ var cur = b && a,
379
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
380
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
381
+ ( ~a.sourceIndex || MAX_NEGATIVE );
382
+
383
+ // Use IE sourceIndex if available on both nodes
384
+ if ( diff ) {
385
+ return diff;
386
+ }
387
+
388
+ // Check if b follows a
389
+ if ( cur ) {
390
+ while ( (cur = cur.nextSibling) ) {
391
+ if ( cur === b ) {
392
+ return -1;
393
+ }
394
+ }
395
+ }
396
+
397
+ return a ? 1 : -1;
398
+ }
399
+
400
+ /**
401
+ * Returns a function to use in pseudos for input types
402
+ * @param {String} type
403
+ */
404
+ function createInputPseudo( type ) {
405
+ return function( elem ) {
406
+ var name = elem.nodeName.toLowerCase();
407
+ return name === "input" && elem.type === type;
408
+ };
409
+ }
410
+
411
+ /**
412
+ * Returns a function to use in pseudos for buttons
413
+ * @param {String} type
414
+ */
415
+ function createButtonPseudo( type ) {
416
+ return function( elem ) {
417
+ var name = elem.nodeName.toLowerCase();
418
+ return (name === "input" || name === "button") && elem.type === type;
419
+ };
420
+ }
421
+
422
+ /**
423
+ * Returns a function to use in pseudos for positionals
424
+ * @param {Function} fn
425
+ */
426
+ function createPositionalPseudo( fn ) {
427
+ return markFunction(function( argument ) {
428
+ argument = +argument;
429
+ return markFunction(function( seed, matches ) {
430
+ var j,
431
+ matchIndexes = fn( [], seed.length, argument ),
432
+ i = matchIndexes.length;
433
+
434
+ // Match elements found at the specified indexes
435
+ while ( i-- ) {
436
+ if ( seed[ (j = matchIndexes[i]) ] ) {
437
+ seed[j] = !(matches[j] = seed[j]);
438
+ }
439
+ }
440
+ });
441
+ });
442
+ }
443
+
444
+ /**
445
+ * Checks a node for validity as a Sizzle context
446
+ * @param {Element|Object=} context
447
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
448
+ */
449
+ function testContext( context ) {
450
+ return context && typeof context.getElementsByTagName !== strundefined && context;
451
+ }
452
+
453
+ // Expose support vars for convenience
454
+ support = Sizzle.support = {};
455
+
456
+ /**
457
+ * Detects XML nodes
458
+ * @param {Element|Object} elem An element or a document
459
+ * @returns {Boolean} True iff elem is a non-HTML XML node
460
+ */
461
+ isXML = Sizzle.isXML = function( elem ) {
462
+ // documentElement is verified for cases where it doesn't yet exist
463
+ // (such as loading iframes in IE - #4833)
464
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
465
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
466
+ };
467
+
468
+ /**
469
+ * Sets document-related variables once based on the current document
470
+ * @param {Element|Object} [doc] An element or document object to use to set the document
471
+ * @returns {Object} Returns the current document
472
+ */
473
+ setDocument = Sizzle.setDocument = function( node ) {
474
+ var hasCompare,
475
+ doc = node ? node.ownerDocument || node : preferredDoc,
476
+ parent = doc.defaultView;
477
+
478
+ // If no document and documentElement is available, return
479
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
480
+ return document;
481
+ }
482
+
483
+ // Set our document
484
+ document = doc;
485
+ docElem = doc.documentElement;
486
+
487
+ // Support tests
488
+ documentIsHTML = !isXML( doc );
489
+
490
+ // Support: IE>8
491
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
492
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
493
+ // IE6-8 do not support the defaultView property so parent will be undefined
494
+ if ( parent && parent !== parent.top ) {
495
+ // IE11 does not have attachEvent, so all must suffer
496
+ if ( parent.addEventListener ) {
497
+ parent.addEventListener( "unload", function() {
498
+ setDocument();
499
+ }, false );
500
+ } else if ( parent.attachEvent ) {
501
+ parent.attachEvent( "onunload", function() {
502
+ setDocument();
503
+ });
504
+ }
505
+ }
506
+
507
+ /* Attributes
508
+ ---------------------------------------------------------------------- */
509
+
510
+ // Support: IE<8
511
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
512
+ support.attributes = assert(function( div ) {
513
+ div.className = "i";
514
+ return !div.getAttribute("className");
515
+ });
516
+
517
+ /* getElement(s)By*
518
+ ---------------------------------------------------------------------- */
519
+
520
+ // Check if getElementsByTagName("*") returns only elements
521
+ support.getElementsByTagName = assert(function( div ) {
522
+ div.appendChild( doc.createComment("") );
523
+ return !div.getElementsByTagName("*").length;
524
+ });
525
+
526
+ // Support: IE<9
527
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
528
+
529
+ // Support: IE<10
530
+ // Check if getElementById returns elements by name
531
+ // The broken getElementById methods don't pick up programatically-set names,
532
+ // so use a roundabout getElementsByName test
533
+ support.getById = assert(function( div ) {
534
+ docElem.appendChild( div ).id = expando;
535
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
536
+ });
537
+
538
+ // ID find and filter
539
+ if ( support.getById ) {
540
+ Expr.find["ID"] = function( id, context ) {
541
+ if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
542
+ var m = context.getElementById( id );
543
+ // Check parentNode to catch when Blackberry 4.6 returns
544
+ // nodes that are no longer in the document #6963
545
+ return m && m.parentNode ? [ m ] : [];
546
+ }
547
+ };
548
+ Expr.filter["ID"] = function( id ) {
549
+ var attrId = id.replace( runescape, funescape );
550
+ return function( elem ) {
551
+ return elem.getAttribute("id") === attrId;
552
+ };
553
+ };
554
+ } else {
555
+ // Support: IE6/7
556
+ // getElementById is not reliable as a find shortcut
557
+ delete Expr.find["ID"];
558
+
559
+ Expr.filter["ID"] = function( id ) {
560
+ var attrId = id.replace( runescape, funescape );
561
+ return function( elem ) {
562
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
563
+ return node && node.value === attrId;
564
+ };
565
+ };
566
+ }
567
+
568
+ // Tag
569
+ Expr.find["TAG"] = support.getElementsByTagName ?
570
+ function( tag, context ) {
571
+ if ( typeof context.getElementsByTagName !== strundefined ) {
572
+ return context.getElementsByTagName( tag );
573
+ }
574
+ } :
575
+ function( tag, context ) {
576
+ var elem,
577
+ tmp = [],
578
+ i = 0,
579
+ results = context.getElementsByTagName( tag );
580
+
581
+ // Filter out possible comments
582
+ if ( tag === "*" ) {
583
+ while ( (elem = results[i++]) ) {
584
+ if ( elem.nodeType === 1 ) {
585
+ tmp.push( elem );
586
+ }
587
+ }
588
+
589
+ return tmp;
590
+ }
591
+ return results;
592
+ };
593
+
594
+ // Class
595
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
596
+ if ( documentIsHTML ) {
597
+ return context.getElementsByClassName( className );
598
+ }
599
+ };
600
+
601
+ /* QSA/matchesSelector
602
+ ---------------------------------------------------------------------- */
603
+
604
+ // QSA and matchesSelector support
605
+
606
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
607
+ rbuggyMatches = [];
608
+
609
+ // qSa(:focus) reports false when true (Chrome 21)
610
+ // We allow this because of a bug in IE8/9 that throws an error
611
+ // whenever `document.activeElement` is accessed on an iframe
612
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
613
+ // See http://bugs.jquery.com/ticket/13378
614
+ rbuggyQSA = [];
615
+
616
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
617
+ // Build QSA regex
618
+ // Regex strategy adopted from Diego Perini
619
+ assert(function( div ) {
620
+ // Select is set to empty string on purpose
621
+ // This is to test IE's treatment of not explicitly
622
+ // setting a boolean content attribute,
623
+ // since its presence should be enough
624
+ // http://bugs.jquery.com/ticket/12359
625
+ div.innerHTML = "<select msallowcapture=''><option selected=''></option></select>";
626
+
627
+ // Support: IE8, Opera 11-12.16
628
+ // Nothing should be selected when empty strings follow ^= or $= or *=
629
+ // The test attribute must be unknown in Opera but "safe" for WinRT
630
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
631
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
632
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
633
+ }
634
+
635
+ // Support: IE8
636
+ // Boolean attributes and "value" are not treated correctly
637
+ if ( !div.querySelectorAll("[selected]").length ) {
638
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
639
+ }
640
+
641
+ // Webkit/Opera - :checked should return selected option elements
642
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
643
+ // IE8 throws error here and will not see later tests
644
+ if ( !div.querySelectorAll(":checked").length ) {
645
+ rbuggyQSA.push(":checked");
646
+ }
647
+ });
648
+
649
+ assert(function( div ) {
650
+ // Support: Windows 8 Native Apps
651
+ // The type and name attributes are restricted during .innerHTML assignment
652
+ var input = doc.createElement("input");
653
+ input.setAttribute( "type", "hidden" );
654
+ div.appendChild( input ).setAttribute( "name", "D" );
655
+
656
+ // Support: IE8
657
+ // Enforce case-sensitivity of name attribute
658
+ if ( div.querySelectorAll("[name=d]").length ) {
659
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
660
+ }
661
+
662
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
663
+ // IE8 throws error here and will not see later tests
664
+ if ( !div.querySelectorAll(":enabled").length ) {
665
+ rbuggyQSA.push( ":enabled", ":disabled" );
666
+ }
667
+
668
+ // Opera 10-11 does not throw on post-comma invalid pseudos
669
+ div.querySelectorAll("*,:x");
670
+ rbuggyQSA.push(",.*:");
671
+ });
672
+ }
673
+
674
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
675
+ docElem.webkitMatchesSelector ||
676
+ docElem.mozMatchesSelector ||
677
+ docElem.oMatchesSelector ||
678
+ docElem.msMatchesSelector) )) ) {
679
+
680
+ assert(function( div ) {
681
+ // Check to see if it's possible to do matchesSelector
682
+ // on a disconnected node (IE 9)
683
+ support.disconnectedMatch = matches.call( div, "div" );
684
+
685
+ // This should fail with an exception
686
+ // Gecko does not error, returns false instead
687
+ matches.call( div, "[s!='']:x" );
688
+ rbuggyMatches.push( "!=", pseudos );
689
+ });
690
+ }
691
+
692
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
693
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
694
+
695
+ /* Contains
696
+ ---------------------------------------------------------------------- */
697
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
698
+
699
+ // Element contains another
700
+ // Purposefully does not implement inclusive descendent
701
+ // As in, an element does not contain itself
702
+ contains = hasCompare || rnative.test( docElem.contains ) ?
703
+ function( a, b ) {
704
+ var adown = a.nodeType === 9 ? a.documentElement : a,
705
+ bup = b && b.parentNode;
706
+ return a === bup || !!( bup && bup.nodeType === 1 && (
707
+ adown.contains ?
708
+ adown.contains( bup ) :
709
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
710
+ ));
711
+ } :
712
+ function( a, b ) {
713
+ if ( b ) {
714
+ while ( (b = b.parentNode) ) {
715
+ if ( b === a ) {
716
+ return true;
717
+ }
718
+ }
719
+ }
720
+ return false;
721
+ };
722
+
723
+ /* Sorting
724
+ ---------------------------------------------------------------------- */
725
+
726
+ // Document order sorting
727
+ sortOrder = hasCompare ?
728
+ function( a, b ) {
729
+
730
+ // Flag for duplicate removal
731
+ if ( a === b ) {
732
+ hasDuplicate = true;
733
+ return 0;
734
+ }
735
+
736
+ // Sort on method existence if only one input has compareDocumentPosition
737
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
738
+ if ( compare ) {
739
+ return compare;
740
+ }
741
+
742
+ // Calculate position if both inputs belong to the same document
743
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
744
+ a.compareDocumentPosition( b ) :
745
+
746
+ // Otherwise we know they are disconnected
747
+ 1;
748
+
749
+ // Disconnected nodes
750
+ if ( compare & 1 ||
751
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
752
+
753
+ // Choose the first element that is related to our preferred document
754
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
755
+ return -1;
756
+ }
757
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
758
+ return 1;
759
+ }
760
+
761
+ // Maintain original order
762
+ return sortInput ?
763
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
764
+ 0;
765
+ }
766
+
767
+ return compare & 4 ? -1 : 1;
768
+ } :
769
+ function( a, b ) {
770
+ // Exit early if the nodes are identical
771
+ if ( a === b ) {
772
+ hasDuplicate = true;
773
+ return 0;
774
+ }
775
+
776
+ var cur,
777
+ i = 0,
778
+ aup = a.parentNode,
779
+ bup = b.parentNode,
780
+ ap = [ a ],
781
+ bp = [ b ];
782
+
783
+ // Parentless nodes are either documents or disconnected
784
+ if ( !aup || !bup ) {
785
+ return a === doc ? -1 :
786
+ b === doc ? 1 :
787
+ aup ? -1 :
788
+ bup ? 1 :
789
+ sortInput ?
790
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
791
+ 0;
792
+
793
+ // If the nodes are siblings, we can do a quick check
794
+ } else if ( aup === bup ) {
795
+ return siblingCheck( a, b );
796
+ }
797
+
798
+ // Otherwise we need full lists of their ancestors for comparison
799
+ cur = a;
800
+ while ( (cur = cur.parentNode) ) {
801
+ ap.unshift( cur );
802
+ }
803
+ cur = b;
804
+ while ( (cur = cur.parentNode) ) {
805
+ bp.unshift( cur );
806
+ }
807
+
808
+ // Walk down the tree looking for a discrepancy
809
+ while ( ap[i] === bp[i] ) {
810
+ i++;
811
+ }
812
+
813
+ return i ?
814
+ // Do a sibling check if the nodes have a common ancestor
815
+ siblingCheck( ap[i], bp[i] ) :
816
+
817
+ // Otherwise nodes in our document sort first
818
+ ap[i] === preferredDoc ? -1 :
819
+ bp[i] === preferredDoc ? 1 :
820
+ 0;
821
+ };
822
+
823
+ return doc;
824
+ };
825
+
826
+ Sizzle.matches = function( expr, elements ) {
827
+ return Sizzle( expr, null, null, elements );
828
+ };
829
+
830
+ Sizzle.matchesSelector = function( elem, expr ) {
831
+ // Set document vars if needed
832
+ if ( ( elem.ownerDocument || elem ) !== document ) {
833
+ setDocument( elem );
834
+ }
835
+
836
+ // Make sure that attribute selectors are quoted
837
+ expr = expr.replace( rattributeQuotes, "='$1']" );
838
+
839
+ if ( support.matchesSelector && documentIsHTML &&
840
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
841
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
842
+
843
+ try {
844
+ var ret = matches.call( elem, expr );
845
+
846
+ // IE 9's matchesSelector returns false on disconnected nodes
847
+ if ( ret || support.disconnectedMatch ||
848
+ // As well, disconnected nodes are said to be in a document
849
+ // fragment in IE 9
850
+ elem.document && elem.document.nodeType !== 11 ) {
851
+ return ret;
852
+ }
853
+ } catch(e) {}
854
+ }
855
+
856
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
857
+ };
858
+
859
+ Sizzle.contains = function( context, elem ) {
860
+ // Set document vars if needed
861
+ if ( ( context.ownerDocument || context ) !== document ) {
862
+ setDocument( context );
863
+ }
864
+ return contains( context, elem );
865
+ };
866
+
867
+ Sizzle.attr = function( elem, name ) {
868
+ // Set document vars if needed
869
+ if ( ( elem.ownerDocument || elem ) !== document ) {
870
+ setDocument( elem );
871
+ }
872
+
873
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
874
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
875
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
876
+ fn( elem, name, !documentIsHTML ) :
877
+ undefined;
878
+
879
+ return val !== undefined ?
880
+ val :
881
+ support.attributes || !documentIsHTML ?
882
+ elem.getAttribute( name ) :
883
+ (val = elem.getAttributeNode(name)) && val.specified ?
884
+ val.value :
885
+ null;
886
+ };
887
+
888
+ Sizzle.error = function( msg ) {
889
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
890
+ };
891
+
892
+ /**
893
+ * Document sorting and removing duplicates
894
+ * @param {ArrayLike} results
895
+ */
896
+ Sizzle.uniqueSort = function( results ) {
897
+ var elem,
898
+ duplicates = [],
899
+ j = 0,
900
+ i = 0;
901
+
902
+ // Unless we *know* we can detect duplicates, assume their presence
903
+ hasDuplicate = !support.detectDuplicates;
904
+ sortInput = !support.sortStable && results.slice( 0 );
905
+ results.sort( sortOrder );
906
+
907
+ if ( hasDuplicate ) {
908
+ while ( (elem = results[i++]) ) {
909
+ if ( elem === results[ i ] ) {
910
+ j = duplicates.push( i );
911
+ }
912
+ }
913
+ while ( j-- ) {
914
+ results.splice( duplicates[ j ], 1 );
915
+ }
916
+ }
917
+
918
+ // Clear input after sorting to release objects
919
+ // See https://github.com/jquery/sizzle/pull/225
920
+ sortInput = null;
921
+
922
+ return results;
923
+ };
924
+
925
+ /**
926
+ * Utility function for retrieving the text value of an array of DOM nodes
927
+ * @param {Array|Element} elem
928
+ */
929
+ getText = Sizzle.getText = function( elem ) {
930
+ var node,
931
+ ret = "",
932
+ i = 0,
933
+ nodeType = elem.nodeType;
934
+
935
+ if ( !nodeType ) {
936
+ // If no nodeType, this is expected to be an array
937
+ while ( (node = elem[i++]) ) {
938
+ // Do not traverse comment nodes
939
+ ret += getText( node );
940
+ }
941
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
942
+ // Use textContent for elements
943
+ // innerText usage removed for consistency of new lines (jQuery #11153)
944
+ if ( typeof elem.textContent === "string" ) {
945
+ return elem.textContent;
946
+ } else {
947
+ // Traverse its children
948
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
949
+ ret += getText( elem );
950
+ }
951
+ }
952
+ } else if ( nodeType === 3 || nodeType === 4 ) {
953
+ return elem.nodeValue;
954
+ }
955
+ // Do not include comment or processing instruction nodes
956
+
957
+ return ret;
958
+ };
959
+
960
+ Expr = Sizzle.selectors = {
961
+
962
+ // Can be adjusted by the user
963
+ cacheLength: 50,
964
+
965
+ createPseudo: markFunction,
966
+
967
+ match: matchExpr,
968
+
969
+ attrHandle: {},
970
+
971
+ find: {},
972
+
973
+ relative: {
974
+ ">": { dir: "parentNode", first: true },
975
+ " ": { dir: "parentNode" },
976
+ "+": { dir: "previousSibling", first: true },
977
+ "~": { dir: "previousSibling" }
978
+ },
979
+
980
+ preFilter: {
981
+ "ATTR": function( match ) {
982
+ match[1] = match[1].replace( runescape, funescape );
983
+
984
+ // Move the given value to match[3] whether quoted or unquoted
985
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
986
+
987
+ if ( match[2] === "~=" ) {
988
+ match[3] = " " + match[3] + " ";
989
+ }
990
+
991
+ return match.slice( 0, 4 );
992
+ },
993
+
994
+ "CHILD": function( match ) {
995
+ /* matches from matchExpr["CHILD"]
996
+ 1 type (only|nth|...)
997
+ 2 what (child|of-type)
998
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
999
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
1000
+ 5 sign of xn-component
1001
+ 6 x of xn-component
1002
+ 7 sign of y-component
1003
+ 8 y of y-component
1004
+ */
1005
+ match[1] = match[1].toLowerCase();
1006
+
1007
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
1008
+ // nth-* requires argument
1009
+ if ( !match[3] ) {
1010
+ Sizzle.error( match[0] );
1011
+ }
1012
+
1013
+ // numeric x and y parameters for Expr.filter.CHILD
1014
+ // remember that false/true cast respectively to 0/1
1015
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1016
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1017
+
1018
+ // other types prohibit arguments
1019
+ } else if ( match[3] ) {
1020
+ Sizzle.error( match[0] );
1021
+ }
1022
+
1023
+ return match;
1024
+ },
1025
+
1026
+ "PSEUDO": function( match ) {
1027
+ var excess,
1028
+ unquoted = !match[6] && match[2];
1029
+
1030
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
1031
+ return null;
1032
+ }
1033
+
1034
+ // Accept quoted arguments as-is
1035
+ if ( match[3] ) {
1036
+ match[2] = match[4] || match[5] || "";
1037
+
1038
+ // Strip excess characters from unquoted arguments
1039
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
1040
+ // Get excess from tokenize (recursively)
1041
+ (excess = tokenize( unquoted, true )) &&
1042
+ // advance to the next closing parenthesis
1043
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
1044
+
1045
+ // excess is a negative index
1046
+ match[0] = match[0].slice( 0, excess );
1047
+ match[2] = unquoted.slice( 0, excess );
1048
+ }
1049
+
1050
+ // Return only captures needed by the pseudo filter method (type and argument)
1051
+ return match.slice( 0, 3 );
1052
+ }
1053
+ },
1054
+
1055
+ filter: {
1056
+
1057
+ "TAG": function( nodeNameSelector ) {
1058
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1059
+ return nodeNameSelector === "*" ?
1060
+ function() { return true; } :
1061
+ function( elem ) {
1062
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1063
+ };
1064
+ },
1065
+
1066
+ "CLASS": function( className ) {
1067
+ var pattern = classCache[ className + " " ];
1068
+
1069
+ return pattern ||
1070
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
1071
+ classCache( className, function( elem ) {
1072
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
1073
+ });
1074
+ },
1075
+
1076
+ "ATTR": function( name, operator, check ) {
1077
+ return function( elem ) {
1078
+ var result = Sizzle.attr( elem, name );
1079
+
1080
+ if ( result == null ) {
1081
+ return operator === "!=";
1082
+ }
1083
+ if ( !operator ) {
1084
+ return true;
1085
+ }
1086
+
1087
+ result += "";
1088
+
1089
+ return operator === "=" ? result === check :
1090
+ operator === "!=" ? result !== check :
1091
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
1092
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
1093
+ operator === "$=" ? check && result.slice( -check.length ) === check :
1094
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
1095
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1096
+ false;
1097
+ };
1098
+ },
1099
+
1100
+ "CHILD": function( type, what, argument, first, last ) {
1101
+ var simple = type.slice( 0, 3 ) !== "nth",
1102
+ forward = type.slice( -4 ) !== "last",
1103
+ ofType = what === "of-type";
1104
+
1105
+ return first === 1 && last === 0 ?
1106
+
1107
+ // Shortcut for :nth-*(n)
1108
+ function( elem ) {
1109
+ return !!elem.parentNode;
1110
+ } :
1111
+
1112
+ function( elem, context, xml ) {
1113
+ var cache, outerCache, node, diff, nodeIndex, start,
1114
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
1115
+ parent = elem.parentNode,
1116
+ name = ofType && elem.nodeName.toLowerCase(),
1117
+ useCache = !xml && !ofType;
1118
+
1119
+ if ( parent ) {
1120
+
1121
+ // :(first|last|only)-(child|of-type)
1122
+ if ( simple ) {
1123
+ while ( dir ) {
1124
+ node = elem;
1125
+ while ( (node = node[ dir ]) ) {
1126
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
1127
+ return false;
1128
+ }
1129
+ }
1130
+ // Reverse direction for :only-* (if we haven't yet done so)
1131
+ start = dir = type === "only" && !start && "nextSibling";
1132
+ }
1133
+ return true;
1134
+ }
1135
+
1136
+ start = [ forward ? parent.firstChild : parent.lastChild ];
1137
+
1138
+ // non-xml :nth-child(...) stores cache data on `parent`
1139
+ if ( forward && useCache ) {
1140
+ // Seek `elem` from a previously-cached index
1141
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
1142
+ cache = outerCache[ type ] || [];
1143
+ nodeIndex = cache[0] === dirruns && cache[1];
1144
+ diff = cache[0] === dirruns && cache[2];
1145
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
1146
+
1147
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
1148
+
1149
+ // Fallback to seeking `elem` from the start
1150
+ (diff = nodeIndex = 0) || start.pop()) ) {
1151
+
1152
+ // When found, cache indexes on `parent` and break
1153
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
1154
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
1155
+ break;
1156
+ }
1157
+ }
1158
+
1159
+ // Use previously-cached element index if available
1160
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
1161
+ diff = cache[1];
1162
+
1163
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
1164
+ } else {
1165
+ // Use the same loop as above to seek `elem` from the start
1166
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
1167
+ (diff = nodeIndex = 0) || start.pop()) ) {
1168
+
1169
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
1170
+ // Cache the index of each encountered element
1171
+ if ( useCache ) {
1172
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
1173
+ }
1174
+
1175
+ if ( node === elem ) {
1176
+ break;
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+
1182
+ // Incorporate the offset, then check against cycle size
1183
+ diff -= last;
1184
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
1185
+ }
1186
+ };
1187
+ },
1188
+
1189
+ "PSEUDO": function( pseudo, argument ) {
1190
+ // pseudo-class names are case-insensitive
1191
+ // http://www.w3.org/TR/selectors/#pseudo-classes
1192
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
1193
+ // Remember that setFilters inherits from pseudos
1194
+ var args,
1195
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
1196
+ Sizzle.error( "unsupported pseudo: " + pseudo );
1197
+
1198
+ // The user may use createPseudo to indicate that
1199
+ // arguments are needed to create the filter function
1200
+ // just as Sizzle does
1201
+ if ( fn[ expando ] ) {
1202
+ return fn( argument );
1203
+ }
1204
+
1205
+ // But maintain support for old signatures
1206
+ if ( fn.length > 1 ) {
1207
+ args = [ pseudo, pseudo, "", argument ];
1208
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
1209
+ markFunction(function( seed, matches ) {
1210
+ var idx,
1211
+ matched = fn( seed, argument ),
1212
+ i = matched.length;
1213
+ while ( i-- ) {
1214
+ idx = indexOf.call( seed, matched[i] );
1215
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
1216
+ }
1217
+ }) :
1218
+ function( elem ) {
1219
+ return fn( elem, 0, args );
1220
+ };
1221
+ }
1222
+
1223
+ return fn;
1224
+ }
1225
+ },
1226
+
1227
+ pseudos: {
1228
+ // Potentially complex pseudos
1229
+ "not": markFunction(function( selector ) {
1230
+ // Trim the selector passed to compile
1231
+ // to avoid treating leading and trailing
1232
+ // spaces as combinators
1233
+ var input = [],
1234
+ results = [],
1235
+ matcher = compile( selector.replace( rtrim, "$1" ) );
1236
+
1237
+ return matcher[ expando ] ?
1238
+ markFunction(function( seed, matches, context, xml ) {
1239
+ var elem,
1240
+ unmatched = matcher( seed, null, xml, [] ),
1241
+ i = seed.length;
1242
+
1243
+ // Match elements unmatched by `matcher`
1244
+ while ( i-- ) {
1245
+ if ( (elem = unmatched[i]) ) {
1246
+ seed[i] = !(matches[i] = elem);
1247
+ }
1248
+ }
1249
+ }) :
1250
+ function( elem, context, xml ) {
1251
+ input[0] = elem;
1252
+ matcher( input, null, xml, results );
1253
+ return !results.pop();
1254
+ };
1255
+ }),
1256
+
1257
+ "has": markFunction(function( selector ) {
1258
+ return function( elem ) {
1259
+ return Sizzle( selector, elem ).length > 0;
1260
+ };
1261
+ }),
1262
+
1263
+ "contains": markFunction(function( text ) {
1264
+ text = text.replace( runescape, funescape );
1265
+ return function( elem ) {
1266
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
1267
+ };
1268
+ }),
1269
+
1270
+ // "Whether an element is represented by a :lang() selector
1271
+ // is based solely on the element's language value
1272
+ // being equal to the identifier C,
1273
+ // or beginning with the identifier C immediately followed by "-".
1274
+ // The matching of C against the element's language value is performed case-insensitively.
1275
+ // The identifier C does not have to be a valid language name."
1276
+ // http://www.w3.org/TR/selectors/#lang-pseudo
1277
+ "lang": markFunction( function( lang ) {
1278
+ // lang value must be a valid identifier
1279
+ if ( !ridentifier.test(lang || "") ) {
1280
+ Sizzle.error( "unsupported lang: " + lang );
1281
+ }
1282
+ lang = lang.replace( runescape, funescape ).toLowerCase();
1283
+ return function( elem ) {
1284
+ var elemLang;
1285
+ do {
1286
+ if ( (elemLang = documentIsHTML ?
1287
+ elem.lang :
1288
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
1289
+
1290
+ elemLang = elemLang.toLowerCase();
1291
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
1292
+ }
1293
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
1294
+ return false;
1295
+ };
1296
+ }),
1297
+
1298
+ // Miscellaneous
1299
+ "target": function( elem ) {
1300
+ var hash = window.location && window.location.hash;
1301
+ return hash && hash.slice( 1 ) === elem.id;
1302
+ },
1303
+
1304
+ "root": function( elem ) {
1305
+ return elem === docElem;
1306
+ },
1307
+
1308
+ "focus": function( elem ) {
1309
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
1310
+ },
1311
+
1312
+ // Boolean properties
1313
+ "enabled": function( elem ) {
1314
+ return elem.disabled === false;
1315
+ },
1316
+
1317
+ "disabled": function( elem ) {
1318
+ return elem.disabled === true;
1319
+ },
1320
+
1321
+ "checked": function( elem ) {
1322
+ // In CSS3, :checked should return both checked and selected elements
1323
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1324
+ var nodeName = elem.nodeName.toLowerCase();
1325
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
1326
+ },
1327
+
1328
+ "selected": function( elem ) {
1329
+ // Accessing this property makes selected-by-default
1330
+ // options in Safari work properly
1331
+ if ( elem.parentNode ) {
1332
+ elem.parentNode.selectedIndex;
1333
+ }
1334
+
1335
+ return elem.selected === true;
1336
+ },
1337
+
1338
+ // Contents
1339
+ "empty": function( elem ) {
1340
+ // http://www.w3.org/TR/selectors/#empty-pseudo
1341
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
1342
+ // but not by others (comment: 8; processing instruction: 7; etc.)
1343
+ // nodeType < 6 works because attributes (2) do not appear as children
1344
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1345
+ if ( elem.nodeType < 6 ) {
1346
+ return false;
1347
+ }
1348
+ }
1349
+ return true;
1350
+ },
1351
+
1352
+ "parent": function( elem ) {
1353
+ return !Expr.pseudos["empty"]( elem );
1354
+ },
1355
+
1356
+ // Element/input types
1357
+ "header": function( elem ) {
1358
+ return rheader.test( elem.nodeName );
1359
+ },
1360
+
1361
+ "input": function( elem ) {
1362
+ return rinputs.test( elem.nodeName );
1363
+ },
1364
+
1365
+ "button": function( elem ) {
1366
+ var name = elem.nodeName.toLowerCase();
1367
+ return name === "input" && elem.type === "button" || name === "button";
1368
+ },
1369
+
1370
+ "text": function( elem ) {
1371
+ var attr;
1372
+ return elem.nodeName.toLowerCase() === "input" &&
1373
+ elem.type === "text" &&
1374
+
1375
+ // Support: IE<8
1376
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
1377
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
1378
+ },
1379
+
1380
+ // Position-in-collection
1381
+ "first": createPositionalPseudo(function() {
1382
+ return [ 0 ];
1383
+ }),
1384
+
1385
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
1386
+ return [ length - 1 ];
1387
+ }),
1388
+
1389
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
1390
+ return [ argument < 0 ? argument + length : argument ];
1391
+ }),
1392
+
1393
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
1394
+ var i = 0;
1395
+ for ( ; i < length; i += 2 ) {
1396
+ matchIndexes.push( i );
1397
+ }
1398
+ return matchIndexes;
1399
+ }),
1400
+
1401
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
1402
+ var i = 1;
1403
+ for ( ; i < length; i += 2 ) {
1404
+ matchIndexes.push( i );
1405
+ }
1406
+ return matchIndexes;
1407
+ }),
1408
+
1409
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
1410
+ var i = argument < 0 ? argument + length : argument;
1411
+ for ( ; --i >= 0; ) {
1412
+ matchIndexes.push( i );
1413
+ }
1414
+ return matchIndexes;
1415
+ }),
1416
+
1417
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
1418
+ var i = argument < 0 ? argument + length : argument;
1419
+ for ( ; ++i < length; ) {
1420
+ matchIndexes.push( i );
1421
+ }
1422
+ return matchIndexes;
1423
+ })
1424
+ }
1425
+ };
1426
+
1427
+ Expr.pseudos["nth"] = Expr.pseudos["eq"];
1428
+
1429
+ // Add button/input type pseudos
1430
+ for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
1431
+ Expr.pseudos[ i ] = createInputPseudo( i );
1432
+ }
1433
+ for ( i in { submit: true, reset: true } ) {
1434
+ Expr.pseudos[ i ] = createButtonPseudo( i );
1435
+ }
1436
+
1437
+ // Easy API for creating new setFilters
1438
+ function setFilters() {}
1439
+ setFilters.prototype = Expr.filters = Expr.pseudos;
1440
+ Expr.setFilters = new setFilters();
1441
+
1442
+ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
1443
+ var matched, match, tokens, type,
1444
+ soFar, groups, preFilters,
1445
+ cached = tokenCache[ selector + " " ];
1446
+
1447
+ if ( cached ) {
1448
+ return parseOnly ? 0 : cached.slice( 0 );
1449
+ }
1450
+
1451
+ soFar = selector;
1452
+ groups = [];
1453
+ preFilters = Expr.preFilter;
1454
+
1455
+ while ( soFar ) {
1456
+
1457
+ // Comma and first run
1458
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
1459
+ if ( match ) {
1460
+ // Don't consume trailing commas as valid
1461
+ soFar = soFar.slice( match[0].length ) || soFar;
1462
+ }
1463
+ groups.push( (tokens = []) );
1464
+ }
1465
+
1466
+ matched = false;
1467
+
1468
+ // Combinators
1469
+ if ( (match = rcombinators.exec( soFar )) ) {
1470
+ matched = match.shift();
1471
+ tokens.push({
1472
+ value: matched,
1473
+ // Cast descendant combinators to space
1474
+ type: match[0].replace( rtrim, " " )
1475
+ });
1476
+ soFar = soFar.slice( matched.length );
1477
+ }
1478
+
1479
+ // Filters
1480
+ for ( type in Expr.filter ) {
1481
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
1482
+ (match = preFilters[ type ]( match ))) ) {
1483
+ matched = match.shift();
1484
+ tokens.push({
1485
+ value: matched,
1486
+ type: type,
1487
+ matches: match
1488
+ });
1489
+ soFar = soFar.slice( matched.length );
1490
+ }
1491
+ }
1492
+
1493
+ if ( !matched ) {
1494
+ break;
1495
+ }
1496
+ }
1497
+
1498
+ // Return the length of the invalid excess
1499
+ // if we're just parsing
1500
+ // Otherwise, throw an error or return tokens
1501
+ return parseOnly ?
1502
+ soFar.length :
1503
+ soFar ?
1504
+ Sizzle.error( selector ) :
1505
+ // Cache the tokens
1506
+ tokenCache( selector, groups ).slice( 0 );
1507
+ };
1508
+
1509
+ function toSelector( tokens ) {
1510
+ var i = 0,
1511
+ len = tokens.length,
1512
+ selector = "";
1513
+ for ( ; i < len; i++ ) {
1514
+ selector += tokens[i].value;
1515
+ }
1516
+ return selector;
1517
+ }
1518
+
1519
+ function addCombinator( matcher, combinator, base ) {
1520
+ var dir = combinator.dir,
1521
+ checkNonElements = base && dir === "parentNode",
1522
+ doneName = done++;
1523
+
1524
+ return combinator.first ?
1525
+ // Check against closest ancestor/preceding element
1526
+ function( elem, context, xml ) {
1527
+ while ( (elem = elem[ dir ]) ) {
1528
+ if ( elem.nodeType === 1 || checkNonElements ) {
1529
+ return matcher( elem, context, xml );
1530
+ }
1531
+ }
1532
+ } :
1533
+
1534
+ // Check against all ancestor/preceding elements
1535
+ function( elem, context, xml ) {
1536
+ var oldCache, outerCache,
1537
+ newCache = [ dirruns, doneName ];
1538
+
1539
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
1540
+ if ( xml ) {
1541
+ while ( (elem = elem[ dir ]) ) {
1542
+ if ( elem.nodeType === 1 || checkNonElements ) {
1543
+ if ( matcher( elem, context, xml ) ) {
1544
+ return true;
1545
+ }
1546
+ }
1547
+ }
1548
+ } else {
1549
+ while ( (elem = elem[ dir ]) ) {
1550
+ if ( elem.nodeType === 1 || checkNonElements ) {
1551
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
1552
+ if ( (oldCache = outerCache[ dir ]) &&
1553
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
1554
+
1555
+ // Assign to newCache so results back-propagate to previous elements
1556
+ return (newCache[ 2 ] = oldCache[ 2 ]);
1557
+ } else {
1558
+ // Reuse newcache so results back-propagate to previous elements
1559
+ outerCache[ dir ] = newCache;
1560
+
1561
+ // A match means we're done; a fail means we have to keep checking
1562
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
1563
+ return true;
1564
+ }
1565
+ }
1566
+ }
1567
+ }
1568
+ }
1569
+ };
1570
+ }
1571
+
1572
+ function elementMatcher( matchers ) {
1573
+ return matchers.length > 1 ?
1574
+ function( elem, context, xml ) {
1575
+ var i = matchers.length;
1576
+ while ( i-- ) {
1577
+ if ( !matchers[i]( elem, context, xml ) ) {
1578
+ return false;
1579
+ }
1580
+ }
1581
+ return true;
1582
+ } :
1583
+ matchers[0];
1584
+ }
1585
+
1586
+ function multipleContexts( selector, contexts, results ) {
1587
+ var i = 0,
1588
+ len = contexts.length;
1589
+ for ( ; i < len; i++ ) {
1590
+ Sizzle( selector, contexts[i], results );
1591
+ }
1592
+ return results;
1593
+ }
1594
+
1595
+ function condense( unmatched, map, filter, context, xml ) {
1596
+ var elem,
1597
+ newUnmatched = [],
1598
+ i = 0,
1599
+ len = unmatched.length,
1600
+ mapped = map != null;
1601
+
1602
+ for ( ; i < len; i++ ) {
1603
+ if ( (elem = unmatched[i]) ) {
1604
+ if ( !filter || filter( elem, context, xml ) ) {
1605
+ newUnmatched.push( elem );
1606
+ if ( mapped ) {
1607
+ map.push( i );
1608
+ }
1609
+ }
1610
+ }
1611
+ }
1612
+
1613
+ return newUnmatched;
1614
+ }
1615
+
1616
+ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
1617
+ if ( postFilter && !postFilter[ expando ] ) {
1618
+ postFilter = setMatcher( postFilter );
1619
+ }
1620
+ if ( postFinder && !postFinder[ expando ] ) {
1621
+ postFinder = setMatcher( postFinder, postSelector );
1622
+ }
1623
+ return markFunction(function( seed, results, context, xml ) {
1624
+ var temp, i, elem,
1625
+ preMap = [],
1626
+ postMap = [],
1627
+ preexisting = results.length,
1628
+
1629
+ // Get initial elements from seed or context
1630
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
1631
+
1632
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
1633
+ matcherIn = preFilter && ( seed || !selector ) ?
1634
+ condense( elems, preMap, preFilter, context, xml ) :
1635
+ elems,
1636
+
1637
+ matcherOut = matcher ?
1638
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
1639
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
1640
+
1641
+ // ...intermediate processing is necessary
1642
+ [] :
1643
+
1644
+ // ...otherwise use results directly
1645
+ results :
1646
+ matcherIn;
1647
+
1648
+ // Find primary matches
1649
+ if ( matcher ) {
1650
+ matcher( matcherIn, matcherOut, context, xml );
1651
+ }
1652
+
1653
+ // Apply postFilter
1654
+ if ( postFilter ) {
1655
+ temp = condense( matcherOut, postMap );
1656
+ postFilter( temp, [], context, xml );
1657
+
1658
+ // Un-match failing elements by moving them back to matcherIn
1659
+ i = temp.length;
1660
+ while ( i-- ) {
1661
+ if ( (elem = temp[i]) ) {
1662
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
1663
+ }
1664
+ }
1665
+ }
1666
+
1667
+ if ( seed ) {
1668
+ if ( postFinder || preFilter ) {
1669
+ if ( postFinder ) {
1670
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
1671
+ temp = [];
1672
+ i = matcherOut.length;
1673
+ while ( i-- ) {
1674
+ if ( (elem = matcherOut[i]) ) {
1675
+ // Restore matcherIn since elem is not yet a final match
1676
+ temp.push( (matcherIn[i] = elem) );
1677
+ }
1678
+ }
1679
+ postFinder( null, (matcherOut = []), temp, xml );
1680
+ }
1681
+
1682
+ // Move matched elements from seed to results to keep them synchronized
1683
+ i = matcherOut.length;
1684
+ while ( i-- ) {
1685
+ if ( (elem = matcherOut[i]) &&
1686
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
1687
+
1688
+ seed[temp] = !(results[temp] = elem);
1689
+ }
1690
+ }
1691
+ }
1692
+
1693
+ // Add elements to results, through postFinder if defined
1694
+ } else {
1695
+ matcherOut = condense(
1696
+ matcherOut === results ?
1697
+ matcherOut.splice( preexisting, matcherOut.length ) :
1698
+ matcherOut
1699
+ );
1700
+ if ( postFinder ) {
1701
+ postFinder( null, results, matcherOut, xml );
1702
+ } else {
1703
+ push.apply( results, matcherOut );
1704
+ }
1705
+ }
1706
+ });
1707
+ }
1708
+
1709
+ function matcherFromTokens( tokens ) {
1710
+ var checkContext, matcher, j,
1711
+ len = tokens.length,
1712
+ leadingRelative = Expr.relative[ tokens[0].type ],
1713
+ implicitRelative = leadingRelative || Expr.relative[" "],
1714
+ i = leadingRelative ? 1 : 0,
1715
+
1716
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
1717
+ matchContext = addCombinator( function( elem ) {
1718
+ return elem === checkContext;
1719
+ }, implicitRelative, true ),
1720
+ matchAnyContext = addCombinator( function( elem ) {
1721
+ return indexOf.call( checkContext, elem ) > -1;
1722
+ }, implicitRelative, true ),
1723
+ matchers = [ function( elem, context, xml ) {
1724
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
1725
+ (checkContext = context).nodeType ?
1726
+ matchContext( elem, context, xml ) :
1727
+ matchAnyContext( elem, context, xml ) );
1728
+ } ];
1729
+
1730
+ for ( ; i < len; i++ ) {
1731
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
1732
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
1733
+ } else {
1734
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
1735
+
1736
+ // Return special upon seeing a positional matcher
1737
+ if ( matcher[ expando ] ) {
1738
+ // Find the next relative operator (if any) for proper handling
1739
+ j = ++i;
1740
+ for ( ; j < len; j++ ) {
1741
+ if ( Expr.relative[ tokens[j].type ] ) {
1742
+ break;
1743
+ }
1744
+ }
1745
+ return setMatcher(
1746
+ i > 1 && elementMatcher( matchers ),
1747
+ i > 1 && toSelector(
1748
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
1749
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
1750
+ ).replace( rtrim, "$1" ),
1751
+ matcher,
1752
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
1753
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
1754
+ j < len && toSelector( tokens )
1755
+ );
1756
+ }
1757
+ matchers.push( matcher );
1758
+ }
1759
+ }
1760
+
1761
+ return elementMatcher( matchers );
1762
+ }
1763
+
1764
+ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
1765
+ var bySet = setMatchers.length > 0,
1766
+ byElement = elementMatchers.length > 0,
1767
+ superMatcher = function( seed, context, xml, results, outermost ) {
1768
+ var elem, j, matcher,
1769
+ matchedCount = 0,
1770
+ i = "0",
1771
+ unmatched = seed && [],
1772
+ setMatched = [],
1773
+ contextBackup = outermostContext,
1774
+ // We must always have either seed elements or outermost context
1775
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
1776
+ // Use integer dirruns iff this is the outermost matcher
1777
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
1778
+ len = elems.length;
1779
+
1780
+ if ( outermost ) {
1781
+ outermostContext = context !== document && context;
1782
+ }
1783
+
1784
+ // Add elements passing elementMatchers directly to results
1785
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
1786
+ // Support: IE<9, Safari
1787
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
1788
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
1789
+ if ( byElement && elem ) {
1790
+ j = 0;
1791
+ while ( (matcher = elementMatchers[j++]) ) {
1792
+ if ( matcher( elem, context, xml ) ) {
1793
+ results.push( elem );
1794
+ break;
1795
+ }
1796
+ }
1797
+ if ( outermost ) {
1798
+ dirruns = dirrunsUnique;
1799
+ }
1800
+ }
1801
+
1802
+ // Track unmatched elements for set filters
1803
+ if ( bySet ) {
1804
+ // They will have gone through all possible matchers
1805
+ if ( (elem = !matcher && elem) ) {
1806
+ matchedCount--;
1807
+ }
1808
+
1809
+ // Lengthen the array for every element, matched or not
1810
+ if ( seed ) {
1811
+ unmatched.push( elem );
1812
+ }
1813
+ }
1814
+ }
1815
+
1816
+ // Apply set filters to unmatched elements
1817
+ matchedCount += i;
1818
+ if ( bySet && i !== matchedCount ) {
1819
+ j = 0;
1820
+ while ( (matcher = setMatchers[j++]) ) {
1821
+ matcher( unmatched, setMatched, context, xml );
1822
+ }
1823
+
1824
+ if ( seed ) {
1825
+ // Reintegrate element matches to eliminate the need for sorting
1826
+ if ( matchedCount > 0 ) {
1827
+ while ( i-- ) {
1828
+ if ( !(unmatched[i] || setMatched[i]) ) {
1829
+ setMatched[i] = pop.call( results );
1830
+ }
1831
+ }
1832
+ }
1833
+
1834
+ // Discard index placeholder values to get only actual matches
1835
+ setMatched = condense( setMatched );
1836
+ }
1837
+
1838
+ // Add matches to results
1839
+ push.apply( results, setMatched );
1840
+
1841
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
1842
+ if ( outermost && !seed && setMatched.length > 0 &&
1843
+ ( matchedCount + setMatchers.length ) > 1 ) {
1844
+
1845
+ Sizzle.uniqueSort( results );
1846
+ }
1847
+ }
1848
+
1849
+ // Override manipulation of globals by nested matchers
1850
+ if ( outermost ) {
1851
+ dirruns = dirrunsUnique;
1852
+ outermostContext = contextBackup;
1853
+ }
1854
+
1855
+ return unmatched;
1856
+ };
1857
+
1858
+ return bySet ?
1859
+ markFunction( superMatcher ) :
1860
+ superMatcher;
1861
+ }
1862
+
1863
+ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
1864
+ var i,
1865
+ setMatchers = [],
1866
+ elementMatchers = [],
1867
+ cached = compilerCache[ selector + " " ];
1868
+
1869
+ if ( !cached ) {
1870
+ // Generate a function of recursive functions that can be used to check each element
1871
+ if ( !match ) {
1872
+ match = tokenize( selector );
1873
+ }
1874
+ i = match.length;
1875
+ while ( i-- ) {
1876
+ cached = matcherFromTokens( match[i] );
1877
+ if ( cached[ expando ] ) {
1878
+ setMatchers.push( cached );
1879
+ } else {
1880
+ elementMatchers.push( cached );
1881
+ }
1882
+ }
1883
+
1884
+ // Cache the compiled function
1885
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
1886
+
1887
+ // Save selector and tokenization
1888
+ cached.selector = selector;
1889
+ }
1890
+ return cached;
1891
+ };
1892
+
1893
+ /**
1894
+ * A low-level selection function that works with Sizzle's compiled
1895
+ * selector functions
1896
+ * @param {String|Function} selector A selector or a pre-compiled
1897
+ * selector function built with Sizzle.compile
1898
+ * @param {Element} context
1899
+ * @param {Array} [results]
1900
+ * @param {Array} [seed] A set of elements to match against
1901
+ */
1902
+ select = Sizzle.select = function( selector, context, results, seed ) {
1903
+ var i, tokens, token, type, find,
1904
+ compiled = typeof selector === "function" && selector,
1905
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
1906
+
1907
+ results = results || [];
1908
+
1909
+ // Try to minimize operations if there is no seed and only one group
1910
+ if ( match.length === 1 ) {
1911
+
1912
+ // Take a shortcut and set the context if the root selector is an ID
1913
+ tokens = match[0] = match[0].slice( 0 );
1914
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
1915
+ support.getById && context.nodeType === 9 && documentIsHTML &&
1916
+ Expr.relative[ tokens[1].type ] ) {
1917
+
1918
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
1919
+ if ( !context ) {
1920
+ return results;
1921
+
1922
+ // Precompiled matchers will still verify ancestry, so step up a level
1923
+ } else if ( compiled ) {
1924
+ context = context.parentNode;
1925
+ }
1926
+
1927
+ selector = selector.slice( tokens.shift().value.length );
1928
+ }
1929
+
1930
+ // Fetch a seed set for right-to-left matching
1931
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
1932
+ while ( i-- ) {
1933
+ token = tokens[i];
1934
+
1935
+ // Abort if we hit a combinator
1936
+ if ( Expr.relative[ (type = token.type) ] ) {
1937
+ break;
1938
+ }
1939
+ if ( (find = Expr.find[ type ]) ) {
1940
+ // Search, expanding context for leading sibling combinators
1941
+ if ( (seed = find(
1942
+ token.matches[0].replace( runescape, funescape ),
1943
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
1944
+ )) ) {
1945
+
1946
+ // If seed is empty or no tokens remain, we can return early
1947
+ tokens.splice( i, 1 );
1948
+ selector = seed.length && toSelector( tokens );
1949
+ if ( !selector ) {
1950
+ push.apply( results, seed );
1951
+ return results;
1952
+ }
1953
+
1954
+ break;
1955
+ }
1956
+ }
1957
+ }
1958
+ }
1959
+
1960
+ // Compile and execute a filtering function if one is not provided
1961
+ // Provide `match` to avoid retokenization if we modified the selector above
1962
+ ( compiled || compile( selector, match ) )(
1963
+ seed,
1964
+ context,
1965
+ !documentIsHTML,
1966
+ results,
1967
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
1968
+ );
1969
+ return results;
1970
+ };
1971
+
1972
+ // One-time assignments
1973
+
1974
+ // Sort stability
1975
+ support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
1976
+
1977
+ // Support: Chrome 14-35+
1978
+ // Always assume duplicates if they aren't passed to the comparison function
1979
+ support.detectDuplicates = !!hasDuplicate;
1980
+
1981
+ // Initialize against the default document
1982
+ setDocument();
1983
+
1984
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
1985
+ // Detached nodes confoundingly follow *each other*
1986
+ support.sortDetached = assert(function( div1 ) {
1987
+ // Should return 1, but returns 4 (following)
1988
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
1989
+ });
1990
+
1991
+ // Support: IE<8
1992
+ // Prevent attribute/property "interpolation"
1993
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
1994
+ if ( !assert(function( div ) {
1995
+ div.innerHTML = "<a href='#'></a>";
1996
+ return div.firstChild.getAttribute("href") === "#" ;
1997
+ }) ) {
1998
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
1999
+ if ( !isXML ) {
2000
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2001
+ }
2002
+ });
2003
+ }
2004
+
2005
+ // Support: IE<9
2006
+ // Use defaultValue in place of getAttribute("value")
2007
+ if ( !support.attributes || !assert(function( div ) {
2008
+ div.innerHTML = "<input/>";
2009
+ div.firstChild.setAttribute( "value", "" );
2010
+ return div.firstChild.getAttribute( "value" ) === "";
2011
+ }) ) {
2012
+ addHandle( "value", function( elem, name, isXML ) {
2013
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2014
+ return elem.defaultValue;
2015
+ }
2016
+ });
2017
+ }
2018
+
2019
+ // Support: IE<9
2020
+ // Use getAttributeNode to fetch booleans when getAttribute lies
2021
+ if ( !assert(function( div ) {
2022
+ return div.getAttribute("disabled") == null;
2023
+ }) ) {
2024
+ addHandle( booleans, function( elem, name, isXML ) {
2025
+ var val;
2026
+ if ( !isXML ) {
2027
+ return elem[ name ] === true ? name.toLowerCase() :
2028
+ (val = elem.getAttributeNode( name )) && val.specified ?
2029
+ val.value :
2030
+ null;
2031
+ }
2032
+ });
2033
+ }
2034
+
2035
+ // EXPOSE
2036
+ return Sizzle;
2037
+ });
2038
+
2039
+ /*eslint-enable */