summaryrefslogtreecommitdiffstatshomepage
path: root/wp-includes/js
diff options
context:
space:
mode:
authorAndrew Nacin <nacin@git.wordpress.org>2013-08-07 05:25:25 +0000
committerAndrew Nacin <nacin@git.wordpress.org>2013-08-07 05:25:25 +0000
commitb43712e0f79a9f5bea52217e06155e2f471c490c (patch)
tree23d331e7b2f29689571f03cfa5f9b7b3b6cafab8 /wp-includes/js
parent5bbd08e1d17079a2e852517351f7405884a156b3 (diff)
downloadwordpress-b43712e0f79a9f5bea52217e06155e2f471c490c.tar.gz
wordpress-b43712e0f79a9f5bea52217e06155e2f471c490c.zip
New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory. * New task runner (Grunt), configured to copy a built WordPress to build/. * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js. * Remove Akismet external from develop.svn. Still exists in core.svn. * Drop minified files from src/. The build process will now generate these. props koop. see #24976. and see http://wp.me/p2AvED-1AI. git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'wp-includes/js')
-rw-r--r--wp-includes/js/admin-bar.js343
-rw-r--r--wp-includes/js/admin-bar.min.js1
-rw-r--r--wp-includes/js/autosave.js702
-rw-r--r--wp-includes/js/autosave.min.js1
-rw-r--r--wp-includes/js/backbone.min.js7
-rw-r--r--wp-includes/js/colorpicker.js707
-rw-r--r--wp-includes/js/colorpicker.min.js1
-rw-r--r--wp-includes/js/comment-reply.js48
-rw-r--r--wp-includes/js/comment-reply.min.js1
-rw-r--r--wp-includes/js/crop/cropper.css165
-rw-r--r--wp-includes/js/crop/cropper.js516
-rw-r--r--wp-includes/js/crop/marqueeHoriz.gifbin277 -> 0 bytes
-rw-r--r--wp-includes/js/crop/marqueeVert.gifbin293 -> 0 bytes
-rw-r--r--wp-includes/js/customize-base.js585
-rw-r--r--wp-includes/js/customize-base.min.js1
-rw-r--r--wp-includes/js/customize-loader.js164
-rw-r--r--wp-includes/js/customize-loader.min.js1
-rw-r--r--wp-includes/js/customize-preview.js146
-rw-r--r--wp-includes/js/customize-preview.min.js1
-rw-r--r--wp-includes/js/heartbeat.js461
-rw-r--r--wp-includes/js/heartbeat.min.js1
-rw-r--r--wp-includes/js/hoverIntent.js115
-rw-r--r--wp-includes/js/hoverIntent.min.js9
-rw-r--r--wp-includes/js/imgareaselect/border-anim-h.gifbin178 -> 0 bytes
-rw-r--r--wp-includes/js/imgareaselect/border-anim-v.gifbin178 -> 0 bytes
-rw-r--r--wp-includes/js/imgareaselect/imgareaselect.css41
-rw-r--r--wp-includes/js/imgareaselect/jquery.imgareaselect.js1198
-rw-r--r--wp-includes/js/imgareaselect/jquery.imgareaselect.min.js1
-rw-r--r--wp-includes/js/jcrop/Jcrop.gifbin323 -> 0 bytes
-rw-r--r--wp-includes/js/jcrop/jquery.Jcrop.min.css28
-rw-r--r--wp-includes/js/jcrop/jquery.Jcrop.min.js22
-rw-r--r--wp-includes/js/jquery/jquery-migrate.js521
-rw-r--r--wp-includes/js/jquery/jquery-migrate.min.js2
-rw-r--r--wp-includes/js/jquery/jquery.color.min.js2
-rw-r--r--wp-includes/js/jquery/jquery.form.js825
-rw-r--r--wp-includes/js/jquery/jquery.form.min.js11
-rw-r--r--wp-includes/js/jquery/jquery.hotkeys.js131
-rw-r--r--wp-includes/js/jquery/jquery.hotkeys.min.js1
-rw-r--r--wp-includes/js/jquery/jquery.js7
-rw-r--r--wp-includes/js/jquery/jquery.masonry.min.js10
-rw-r--r--wp-includes/js/jquery/jquery.query.js11
-rw-r--r--wp-includes/js/jquery/jquery.schedule.js36
-rw-r--r--wp-includes/js/jquery/jquery.serialize-object.js31
-rw-r--r--wp-includes/js/jquery/jquery.table-hotkeys.js99
-rw-r--r--wp-includes/js/jquery/jquery.table-hotkeys.min.js1
-rw-r--r--wp-includes/js/jquery/jquery.ui.touch-punch.js11
-rw-r--r--wp-includes/js/jquery/suggest.js315
-rw-r--r--wp-includes/js/jquery/suggest.min.js1
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.accordion.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.button.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.core.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js5
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.dialog.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.draggable.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.droppable.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.effect.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.menu.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.mouse.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.position.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.resizable.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.selectable.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.slider.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.sortable.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.spinner.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.tabs.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js4
-rw-r--r--wp-includes/js/jquery/ui/jquery.ui.widget.min.js4
-rw-r--r--wp-includes/js/json2.js480
-rw-r--r--wp-includes/js/json2.min.js1
-rw-r--r--wp-includes/js/mce-view.js349
-rw-r--r--wp-includes/js/mce-view.min.js1
-rw-r--r--wp-includes/js/media-editor.js708
-rw-r--r--wp-includes/js/media-editor.min.js1
-rw-r--r--wp-includes/js/media-models.js862
-rw-r--r--wp-includes/js/media-models.min.js1
-rw-r--r--wp-includes/js/media-views.js3966
-rw-r--r--wp-includes/js/media-views.min.js1
-rw-r--r--wp-includes/js/mediaelement/background.pngbin166 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/bigplay.pngbin3001 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/bigplay.svg1
-rw-r--r--wp-includes/js/mediaelement/controls.pngbin1892 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/controls.svg1
-rw-r--r--wp-includes/js/mediaelement/flashmediaelement.swfbin29142 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/loading.gifbin6224 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/mediaelement-and-player.min.js173
-rw-r--r--wp-includes/js/mediaelement/mediaelementplayer.min.css1
-rw-r--r--wp-includes/js/mediaelement/silverlightmediaelement.xapbin12461 -> 0 bytes
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.css15
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.js15
-rw-r--r--wp-includes/js/plupload/changelog.txt241
-rw-r--r--wp-includes/js/plupload/handlers.js491
-rw-r--r--wp-includes/js/plupload/handlers.min.js1
-rw-r--r--wp-includes/js/plupload/license.txt339
-rw-r--r--wp-includes/js/plupload/plupload.flash.js1
-rw-r--r--wp-includes/js/plupload/plupload.flash.swfbin18958 -> 0 bytes
-rw-r--r--wp-includes/js/plupload/plupload.html4.js1
-rw-r--r--wp-includes/js/plupload/plupload.html5.js1
-rw-r--r--wp-includes/js/plupload/plupload.js2
-rw-r--r--wp-includes/js/plupload/plupload.silverlight.js1
-rw-r--r--wp-includes/js/plupload/plupload.silverlight.xapbin44139 -> 0 bytes
-rw-r--r--wp-includes/js/plupload/wp-plupload.js343
-rw-r--r--wp-includes/js/plupload/wp-plupload.min.js1
-rw-r--r--wp-includes/js/quicktags.js620
-rw-r--r--wp-includes/js/quicktags.min.js1
-rw-r--r--wp-includes/js/shortcode.js342
-rw-r--r--wp-includes/js/shortcode.min.js1
-rw-r--r--wp-includes/js/swfobject.js4
-rw-r--r--wp-includes/js/swfupload/handlers.js375
-rw-r--r--wp-includes/js/swfupload/handlers.min.js1
-rw-r--r--wp-includes/js/swfupload/license.txt32
-rw-r--r--wp-includes/js/swfupload/plugins/swfupload.cookies.js53
-rw-r--r--wp-includes/js/swfupload/plugins/swfupload.queue.js98
-rw-r--r--wp-includes/js/swfupload/plugins/swfupload.speed.js342
-rw-r--r--wp-includes/js/swfupload/plugins/swfupload.swfobject.js105
-rw-r--r--wp-includes/js/swfupload/swfupload.js980
-rw-r--r--wp-includes/js/swfupload/swfupload.swfbin13133 -> 0 bytes
-rw-r--r--wp-includes/js/thickbox/loadingAnimation.gifbin15238 -> 0 bytes
-rw-r--r--wp-includes/js/thickbox/macFFBgHack.pngbin94 -> 0 bytes
-rw-r--r--wp-includes/js/thickbox/tb-close-2x.pngbin412 -> 0 bytes
-rw-r--r--wp-includes/js/thickbox/tb-close.pngbin387 -> 0 bytes
-rw-r--r--wp-includes/js/thickbox/thickbox.css178
-rw-r--r--wp-includes/js/thickbox/thickbox.js319
-rw-r--r--wp-includes/js/tinymce/langs/wp-langs-en.js504
-rw-r--r--wp-includes/js/tinymce/langs/wp-langs.php565
-rw-r--r--wp-includes/js/tinymce/license.txt504
-rw-r--r--wp-includes/js/tinymce/mark_loaded_src.js20
-rw-r--r--wp-includes/js/tinymce/plugins/directionality/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js85
-rw-r--r--wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js159
-rw-r--r--wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm110
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js699
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gifbin810 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gifbin272 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gifbin989 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gifbin907 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gifbin909 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gifbin51 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gifbin769 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gifbin84 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css126
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/template.htm387
-rw-r--r--wp-includes/js/tinymce/plugins/media/css/media.css17
-rw-r--r--wp-includes/js/tinymce/plugins/media/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/media/editor_plugin_src.js897
-rw-r--r--wp-includes/js/tinymce/plugins/media/js/embed.js73
-rw-r--r--wp-includes/js/tinymce/plugins/media/js/media.js513
-rw-r--r--wp-includes/js/tinymce/plugins/media/media.htm922
-rw-r--r--wp-includes/js/tinymce/plugins/media/moxieplayer.swf1
-rw-r--r--wp-includes/js/tinymce/plugins/paste/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js885
-rw-r--r--wp-includes/js/tinymce/plugins/paste/js/pastetext.js36
-rw-r--r--wp-includes/js/tinymce/plugins/paste/js/pasteword.js51
-rw-r--r--wp-includes/js/tinymce/plugins/paste/pastetext.htm27
-rw-r--r--wp-includes/js/tinymce/plugins/paste/pasteword.htm21
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/changelog.txt33
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php71
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php161
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php82
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php117
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php62
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php595
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php268
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/config.php27
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/css/content.css1
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js436
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/img/wline.gifbin46 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/includes/general.php98
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/rpc.php112
-rw-r--r--wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js122
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js437
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/audio.gifbin146 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/image.gifbin95 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/media.gifbin149 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/page.gifbin108 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/trans.gifbin43 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/video.gifbin93 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js80
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js432
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/js/popup.min.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js28
-rw-r--r--wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.min.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css443
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/editimage.html274
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js325
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.pngbin5064 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/img/delete.pngbin1386 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.pngbin2687 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/img/image.pngbin946 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js613
-rw-r--r--wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css13
-rw-r--r--wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js189
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js156
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.pngbin5064 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/img/delete.pngbin1386 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.pngbin4924 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/img/edit.pngbin1590 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wpgallery/img/t.gifbin43 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wplink/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js59
-rw-r--r--wp-includes/js/tinymce/plugins/wpview/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js188
-rw-r--r--wp-includes/js/tinymce/themes/advanced/about.htm52
-rw-r--r--wp-includes/js/tinymce/themes/advanced/anchor.htm26
-rw-r--r--wp-includes/js/tinymce/themes/advanced/charmap.htm55
-rw-r--r--wp-includes/js/tinymce/themes/advanced/color_picker.htm70
-rw-r--r--wp-includes/js/tinymce/themes/advanced/editor_template.js1
-rw-r--r--wp-includes/js/tinymce/themes/advanced/editor_template_src.js1490
-rw-r--r--wp-includes/js/tinymce/themes/advanced/image.htm80
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpgbin2584 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/flash.gifbin239 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/gotmoxie.pngbin892 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/icons.gifbin11982 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/iframe.gifbin600 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/pagebreak.gifbin325 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/quicktime.gifbin301 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/realmedia.gifbin439 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/shockwave.gifbin384 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/trans.gifbin43 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/video.gifbin597 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gifbin415 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/about.js73
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/anchor.js56
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/charmap.js363
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/color_picker.js345
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/image.js253
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/link.js159
-rw-r--r--wp-includes/js/tinymce/themes/advanced/js/source_editor.js78
-rw-r--r--wp-includes/js/tinymce/themes/advanced/link.htm57
-rw-r--r--wp-includes/js/tinymce/themes/advanced/shortcuts.htm47
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/content.css50
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css118
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.pngbin3133 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gifbin64 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gifbin68 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gifbin70 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gifbin1787 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gifbin1322 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/default/ui.css219
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css24
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css106
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css106
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css48
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css118
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.pngbin2766 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.pngbin651 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.pngbin2084 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css222
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css8
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css5
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css132
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css140
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.pngbin27345 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.pngbin26240 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gifbin146 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gifbin176 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gifbin1322 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/themes/advanced/source_editor.htm25
-rw-r--r--wp-includes/js/tinymce/tiny_mce.js1
-rw-r--r--wp-includes/js/tinymce/tiny_mce_popup.js5
-rw-r--r--wp-includes/js/tinymce/utils/editable_selects.js70
-rw-r--r--wp-includes/js/tinymce/utils/form_utils.js210
-rw-r--r--wp-includes/js/tinymce/utils/mctabs.js162
-rw-r--r--wp-includes/js/tinymce/utils/validate.js252
-rw-r--r--wp-includes/js/tinymce/wp-mce-help.php281
-rw-r--r--wp-includes/js/tinymce/wp-tinymce-schema.js940
-rw-r--r--wp-includes/js/tinymce/wp-tinymce.js.gzbin115941 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/wp-tinymce.php38
-rw-r--r--wp-includes/js/tw-sack.js193
-rw-r--r--wp-includes/js/tw-sack.min.js1
-rw-r--r--wp-includes/js/underscore.min.js5
-rw-r--r--wp-includes/js/utils.js171
-rw-r--r--wp-includes/js/utils.min.js1
-rw-r--r--wp-includes/js/wp-ajax-response.js64
-rw-r--r--wp-includes/js/wp-ajax-response.min.js1
-rw-r--r--wp-includes/js/wp-auth-check.js106
-rw-r--r--wp-includes/js/wp-auth-check.min.js1
-rw-r--r--wp-includes/js/wp-backbone.js384
-rw-r--r--wp-includes/js/wp-backbone.min.js1
-rw-r--r--wp-includes/js/wp-list-revisions.js24
-rw-r--r--wp-includes/js/wp-list-revisions.min.js1
-rw-r--r--wp-includes/js/wp-lists.js464
-rw-r--r--wp-includes/js/wp-lists.min.js1
-rw-r--r--wp-includes/js/wp-pointer.js281
-rw-r--r--wp-includes/js/wp-pointer.min.js1
-rw-r--r--wp-includes/js/wp-util.js105
-rw-r--r--wp-includes/js/wp-util.min.js1
-rw-r--r--wp-includes/js/wplink.js608
-rw-r--r--wp-includes/js/wplink.min.js1
313 files changed, 0 insertions, 39808 deletions
diff --git a/wp-includes/js/admin-bar.js b/wp-includes/js/admin-bar.js
deleted file mode 100644
index b75823ce8b..0000000000
--- a/wp-includes/js/admin-bar.js
+++ /dev/null
@@ -1,343 +0,0 @@
-// use jQuery and hoverIntent if loaded
-if ( typeof(jQuery) != 'undefined' ) {
- if ( typeof(jQuery.fn.hoverIntent) == 'undefined' ) {
- // hoverIntent r6 - Copy of wp-includes/js/hoverIntent.min.js
- (function(a){a.fn.hoverIntent=function(m,d,h){var j={interval:100,sensitivity:7,timeout:0};if(typeof m==="object"){j=a.extend(j,m)}else{if(a.isFunction(d)){j=a.extend(j,{over:m,out:d,selector:h})}else{j=a.extend(j,{over:m,out:m,selector:d})}}var l,k,g,f;var e=function(n){l=n.pageX;k=n.pageY};var c=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if((Math.abs(g-l)+Math.abs(f-k))<j.sensitivity){a(n).off("mousemove.hoverIntent",e);n.hoverIntent_s=1;return j.over.apply(n,[o])}else{g=l;f=k;n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}};var i=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);n.hoverIntent_s=0;return j.out.apply(n,[o])};var b=function(p){var o=jQuery.extend({},p);var n=this;if(n.hoverIntent_t){n.hoverIntent_t=clearTimeout(n.hoverIntent_t)}if(p.type=="mouseenter"){g=o.pageX;f=o.pageY;a(n).on("mousemove.hoverIntent",e);if(n.hoverIntent_s!=1){n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}}else{a(n).off("mousemove.hoverIntent",e);if(n.hoverIntent_s==1){n.hoverIntent_t=setTimeout(function(){i(o,n)},j.timeout)}}};return this.on({"mouseenter.hoverIntent":b,"mouseleave.hoverIntent":b},j.selector)}})(jQuery);
- }
- jQuery(document).ready(function($){
- var adminbar = $('#wpadminbar'), refresh, touchOpen, touchClose, disableHoverIntent = false;
-
- refresh = function(i, el){ // force the browser to refresh the tabbing index
- var node = $(el), tab = node.attr('tabindex');
- if ( tab )
- node.attr('tabindex', '0').attr('tabindex', tab);
- };
-
- touchOpen = function(unbind) {
- adminbar.find('li.menupop').on('click.wp-mobile-hover', function(e) {
- var el = $(this);
-
- if ( !el.hasClass('hover') ) {
- e.preventDefault();
- adminbar.find('li.menupop.hover').removeClass('hover');
- el.addClass('hover');
- }
-
- if ( unbind ) {
- $('li.menupop').off('click.wp-mobile-hover');
- disableHoverIntent = false;
- }
- });
- };
-
- touchClose = function() {
- var mobileEvent = /Mobile\/.+Safari/.test(navigator.userAgent) ? 'touchstart' : 'click';
- // close any open drop-downs when the click/touch is not on the toolbar
- $(document.body).on( mobileEvent+'.wp-mobile-hover', function(e) {
- if ( !$(e.target).closest('#wpadminbar').length )
- adminbar.find('li.menupop.hover').removeClass('hover');
- });
- };
-
- adminbar.removeClass('nojq').removeClass('nojs');
-
- if ( 'ontouchstart' in window ) {
- adminbar.on('touchstart', function(){
- touchOpen(true);
- disableHoverIntent = true;
- });
- touchClose();
- } else if ( /IEMobile\/[1-9]/.test(navigator.userAgent) ) {
- touchOpen();
- touchClose();
- }
-
- adminbar.find('li.menupop').hoverIntent({
- over: function(e){
- if ( disableHoverIntent )
- return;
-
- $(this).addClass('hover');
- },
- out: function(e){
- if ( disableHoverIntent )
- return;
-
- $(this).removeClass('hover');
- },
- timeout: 180,
- sensitivity: 7,
- interval: 100
- });
-
- if ( window.location.hash )
- window.scrollBy( 0, -32 );
-
- $('#wp-admin-bar-get-shortlink').click(function(e){
- e.preventDefault();
- $(this).addClass('selected').children('.shortlink-input').blur(function(){
- $(this).parents('#wp-admin-bar-get-shortlink').removeClass('selected');
- }).focus().select();
- });
-
- $('#wpadminbar li.menupop > .ab-item').bind('keydown.adminbar', function(e){
- if ( e.which != 13 )
- return;
-
- var target = $(e.target), wrap = target.closest('ab-sub-wrapper');
-
- e.stopPropagation();
- e.preventDefault();
-
- if ( !wrap.length )
- wrap = $('#wpadminbar .quicklinks');
-
- wrap.find('.menupop').removeClass('hover');
- target.parent().toggleClass('hover');
- target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
- }).each(refresh);
-
- $('#wpadminbar .ab-item').bind('keydown.adminbar', function(e){
- if ( e.which != 27 )
- return;
-
- var target = $(e.target);
-
- e.stopPropagation();
- e.preventDefault();
-
- target.closest('.hover').removeClass('hover').children('.ab-item').focus();
- target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
- });
-
- $('#wpadminbar').click( function(e) {
- if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' )
- return;
-
- e.preventDefault();
- $('html, body').animate({ scrollTop: 0 }, 'fast');
- });
-
- // fix focus bug in WebKit
- $('.screen-reader-shortcut').keydown( function(e) {
- if ( 13 != e.which )
- return;
-
- var id = $(this).attr('href');
-
- var ua = navigator.userAgent.toLowerCase();
- if ( ua.indexOf('applewebkit') != -1 && id && id.charAt(0) == '#' ) {
- setTimeout(function () {
- $(id).focus();
- }, 100);
- }
- });
-
- // Empty sessionStorage on logging out
- if ( 'sessionStorage' in window ) {
- $('#wp-admin-bar-logout a').click( function() {
- try {
- for ( var key in sessionStorage ) {
- if ( key.indexOf('wp-autosave-') != -1 )
- sessionStorage.removeItem(key);
- }
- } catch(e) {}
- });
- }
- });
-} else {
- (function(d, w) {
- var addEvent = function( obj, type, fn ) {
- if ( obj.addEventListener )
- obj.addEventListener(type, fn, false);
- else if ( obj.attachEvent )
- obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);});
- },
-
- aB, hc = new RegExp('\\bhover\\b', 'g'), q = [],
- rselected = new RegExp('\\bselected\\b', 'g'),
-
- /**
- * Get the timeout ID of the given element
- */
- getTOID = function(el) {
- var i = q.length;
- while ( i-- ) {
- if ( q[i] && el == q[i][1] )
- return q[i][0];
- }
- return false;
- },
-
- addHoverClass = function(t) {
- var i, id, inA, hovering, ul, li,
- ancestors = [],
- ancestorLength = 0;
-
- while ( t && t != aB && t != d ) {
- if ( 'LI' == t.nodeName.toUpperCase() ) {
- ancestors[ ancestors.length ] = t;
- id = getTOID(t);
- if ( id )
- clearTimeout( id );
- t.className = t.className ? ( t.className.replace(hc, '') + ' hover' ) : 'hover';
- hovering = t;
- }
- t = t.parentNode;
- }
-
- // Remove any selected classes.
- if ( hovering && hovering.parentNode ) {
- ul = hovering.parentNode;
- if ( ul && 'UL' == ul.nodeName.toUpperCase() ) {
- i = ul.childNodes.length;
- while ( i-- ) {
- li = ul.childNodes[i];
- if ( li != hovering )
- li.className = li.className ? li.className.replace( rselected, '' ) : '';
- }
- }
- }
-
- /* remove the hover class for any objects not in the immediate element's ancestry */
- i = q.length;
- while ( i-- ) {
- inA = false;
- ancestorLength = ancestors.length;
- while( ancestorLength-- ) {
- if ( ancestors[ ancestorLength ] == q[i][1] )
- inA = true;
- }
-
- if ( ! inA )
- q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : '';
- }
- },
-
- removeHoverClass = function(t) {
- while ( t && t != aB && t != d ) {
- if ( 'LI' == t.nodeName.toUpperCase() ) {
- (function(t) {
- var to = setTimeout(function() {
- t.className = t.className ? t.className.replace(hc, '') : '';
- }, 500);
- q[q.length] = [to, t];
- })(t);
- }
- t = t.parentNode;
- }
- },
-
- clickShortlink = function(e) {
- var i, l, node,
- t = e.target || e.srcElement;
-
- // Make t the shortlink menu item, or return.
- while ( true ) {
- // Check if we've gone past the shortlink node,
- // or if the user is clicking on the input.
- if ( ! t || t == d || t == aB )
- return;
- // Check if we've found the shortlink node.
- if ( t.id && t.id == 'wp-admin-bar-get-shortlink' )
- break;
- t = t.parentNode;
- }
-
- // IE doesn't support preventDefault, and does support returnValue
- if ( e.preventDefault )
- e.preventDefault();
- e.returnValue = false;
-
- if ( -1 == t.className.indexOf('selected') )
- t.className += ' selected';
-
- for ( i = 0, l = t.childNodes.length; i < l; i++ ) {
- node = t.childNodes[i];
- if ( node.className && -1 != node.className.indexOf('shortlink-input') ) {
- node.focus();
- node.select();
- node.onblur = function() {
- t.className = t.className ? t.className.replace( rselected, '' ) : '';
- };
- break;
- }
- }
- return false;
- },
-
- scrollToTop = function(t) {
- var distance, speed, step, steps, timer, speed_step;
-
- // Ensure that the #wpadminbar was the target of the click.
- if ( t.id != 'wpadminbar' && t.id != 'wp-admin-bar-top-secondary' )
- return;
-
- distance = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
-
- if ( distance < 1 )
- return;
-
- speed_step = distance > 800 ? 130 : 100;
- speed = Math.min( 12, Math.round( distance / speed_step ) );
- step = distance > 800 ? Math.round( distance / 30 ) : Math.round( distance / 20 );
- steps = [];
- timer = 0;
-
- // Animate scrolling to the top of the page by generating steps to
- // the top of the page and shifting to each step at a set interval.
- while ( distance ) {
- distance -= step;
- if ( distance < 0 )
- distance = 0;
- steps.push( distance );
-
- setTimeout( function() {
- window.scrollTo( 0, steps.shift() );
- }, timer * speed );
-
- timer++;
- }
- };
-
- addEvent(w, 'load', function() {
- aB = d.getElementById('wpadminbar');
-
- if ( d.body && aB ) {
- d.body.appendChild( aB );
-
- if ( aB.className )
- aB.className = aB.className.replace(/nojs/, '');
-
- addEvent(aB, 'mouseover', function(e) {
- addHoverClass( e.target || e.srcElement );
- });
-
- addEvent(aB, 'mouseout', function(e) {
- removeHoverClass( e.target || e.srcElement );
- });
-
- addEvent(aB, 'click', clickShortlink );
-
- addEvent(aB, 'click', function(e) {
- scrollToTop( e.target || e.srcElement );
- });
-
- addEvent( document.getElementById('wp-admin-bar-logout'), 'click', function() {
- if ( 'sessionStorage' in window ) {
- try {
- for ( var key in sessionStorage ) {
- if ( key.indexOf('wp-autosave-') != -1 )
- sessionStorage.removeItem(key);
- }
- } catch(e) {}
- }
- });
- }
-
- if ( w.location.hash )
- w.scrollBy(0,-32);
- });
- })(document, window);
-
-}
diff --git a/wp-includes/js/admin-bar.min.js b/wp-includes/js/admin-bar.min.js
deleted file mode 100644
index 0da00594a1..0000000000
--- a/wp-includes/js/admin-bar.min.js
+++ /dev/null
@@ -1 +0,0 @@
-if(typeof(jQuery)!="undefined"){if(typeof(jQuery.fn.hoverIntent)=="undefined"){(function(b){b.fn.hoverIntent=function(a,v,r){var p={interval:100,sensitivity:7,timeout:0};if(typeof a==="object"){p=b.extend(p,a)}else{if(b.isFunction(v)){p=b.extend(p,{over:a,out:v,selector:r})}else{p=b.extend(p,{over:a,out:a,selector:v})}}var n,o,s,t;var u=function(c){n=c.pageX;o=c.pageY};var w=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if((Math.abs(s-n)+Math.abs(t-o))<p.sensitivity){b(d).off("mousemove.hoverIntent",u);d.hoverIntent_s=1;return p.over.apply(d,[c])}else{s=n;t=o;d.hoverIntent_t=setTimeout(function(){w(c,d)},p.interval)}};var q=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;return p.out.apply(d,[c])};var x=function(c){var d=jQuery.extend({},c);var e=this;if(e.hoverIntent_t){e.hoverIntent_t=clearTimeout(e.hoverIntent_t)}if(c.type=="mouseenter"){s=d.pageX;t=d.pageY;b(e).on("mousemove.hoverIntent",u);if(e.hoverIntent_s!=1){e.hoverIntent_t=setTimeout(function(){w(d,e)},p.interval)}}else{b(e).off("mousemove.hoverIntent",u);if(e.hoverIntent_s==1){e.hoverIntent_t=setTimeout(function(){q(d,e)},p.timeout)}}};return this.on({"mouseenter.hoverIntent":x,"mouseleave.hoverIntent":x},p.selector)}})(jQuery)}jQuery(document).ready(function(e){var d=e("#wpadminbar"),c,a,b,f=false;c=function(g,j){var k=e(j),h=k.attr("tabindex");if(h){k.attr("tabindex","0").attr("tabindex",h)}};a=function(g){d.find("li.menupop").on("click.wp-mobile-hover",function(i){var h=e(this);if(!h.hasClass("hover")){i.preventDefault();d.find("li.menupop.hover").removeClass("hover");h.addClass("hover")}if(g){e("li.menupop").off("click.wp-mobile-hover");f=false}})};b=function(){var g=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click";e(document.body).on(g+".wp-mobile-hover",function(h){if(!e(h.target).closest("#wpadminbar").length){d.find("li.menupop.hover").removeClass("hover")}})};d.removeClass("nojq").removeClass("nojs");if("ontouchstart" in window){d.on("touchstart",function(){a(true);f=true});b()}else{if(/IEMobile\/[1-9]/.test(navigator.userAgent)){a();b()}}d.find("li.menupop").hoverIntent({over:function(g){if(f){return}e(this).addClass("hover")},out:function(g){if(f){return}e(this).removeClass("hover")},timeout:180,sensitivity:7,interval:100});if(window.location.hash){window.scrollBy(0,-32)}e("#wp-admin-bar-get-shortlink").click(function(g){g.preventDefault();e(this).addClass("selected").children(".shortlink-input").blur(function(){e(this).parents("#wp-admin-bar-get-shortlink").removeClass("selected")}).focus().select()});e("#wpadminbar li.menupop > .ab-item").bind("keydown.adminbar",function(i){if(i.which!=13){return}var h=e(i.target),g=h.closest("ab-sub-wrapper");i.stopPropagation();i.preventDefault();if(!g.length){g=e("#wpadminbar .quicklinks")}g.find(".menupop").removeClass("hover");h.parent().toggleClass("hover");h.siblings(".ab-sub-wrapper").find(".ab-item").each(c)}).each(c);e("#wpadminbar .ab-item").bind("keydown.adminbar",function(h){if(h.which!=27){return}var g=e(h.target);h.stopPropagation();h.preventDefault();g.closest(".hover").removeClass("hover").children(".ab-item").focus();g.siblings(".ab-sub-wrapper").find(".ab-item").each(c)});e("#wpadminbar").click(function(g){if(g.target.id!="wpadminbar"&&g.target.id!="wp-admin-bar-top-secondary"){return}g.preventDefault();e("html, body").animate({scrollTop:0},"fast")});e(".screen-reader-shortcut").keydown(function(h){if(13!=h.which){return}var i=e(this).attr("href");var g=navigator.userAgent.toLowerCase();if(g.indexOf("applewebkit")!=-1&&i&&i.charAt(0)=="#"){setTimeout(function(){e(i).focus()},100)}});if("sessionStorage" in window){e("#wp-admin-bar-logout a").click(function(){try{for(var g in sessionStorage){if(g.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(g)}}}catch(h){}})}})}else{(function(j,l){var e=function(o,n,d){if(o.addEventListener){o.addEventListener(n,d,false)}else{if(o.attachEvent){o.attachEvent("on"+n,function(){return d.call(o,window.event)})}}},f,g=new RegExp("\\bhover\\b","g"),b=[],k=new RegExp("\\bselected\\b","g"),h=function(n){var d=b.length;while(d--){if(b[d]&&n==b[d][1]){return b[d][0]}}return false},i=function(u){var o,d,r,n,q,s,v=[],p=0;while(u&&u!=f&&u!=j){if("LI"==u.nodeName.toUpperCase()){v[v.length]=u;d=h(u);if(d){clearTimeout(d)}u.className=u.className?(u.className.replace(g,"")+" hover"):"hover";n=u}u=u.parentNode}if(n&&n.parentNode){q=n.parentNode;if(q&&"UL"==q.nodeName.toUpperCase()){o=q.childNodes.length;while(o--){s=q.childNodes[o];if(s!=n){s.className=s.className?s.className.replace(k,""):""}}}}o=b.length;while(o--){r=false;p=v.length;while(p--){if(v[p]==b[o][1]){r=true}}if(!r){b[o][1].className=b[o][1].className?b[o][1].className.replace(g,""):""}}},m=function(d){while(d&&d!=f&&d!=j){if("LI"==d.nodeName.toUpperCase()){(function(n){var o=setTimeout(function(){n.className=n.className?n.className.replace(g,""):""},500);b[b.length]=[o,n]})(d)}d=d.parentNode}},c=function(q){var o,d,p,n=q.target||q.srcElement;while(true){if(!n||n==j||n==f){return}if(n.id&&n.id=="wp-admin-bar-get-shortlink"){break}n=n.parentNode}if(q.preventDefault){q.preventDefault()}q.returnValue=false;if(-1==n.className.indexOf("selected")){n.className+=" selected"}for(o=0,d=n.childNodes.length;o<d;o++){p=n.childNodes[o];if(p.className&&-1!=p.className.indexOf("shortlink-input")){p.focus();p.select();p.onblur=function(){n.className=n.className?n.className.replace(k,""):""};break}}return false},a=function(n){var s,q,p,d,r,o;if(n.id!="wpadminbar"&&n.id!="wp-admin-bar-top-secondary"){return}s=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;if(s<1){return}o=s>800?130:100;q=Math.min(12,Math.round(s/o));p=s>800?Math.round(s/30):Math.round(s/20);d=[];r=0;while(s){s-=p;if(s<0){s=0}d.push(s);setTimeout(function(){window.scrollTo(0,d.shift())},r*q);r++}};e(l,"load",function(){f=j.getElementById("wpadminbar");if(j.body&&f){j.body.appendChild(f);if(f.className){f.className=f.className.replace(/nojs/,"")}e(f,"mouseover",function(d){i(d.target||d.srcElement)});e(f,"mouseout",function(d){m(d.target||d.srcElement)});e(f,"click",c);e(f,"click",function(d){a(d.target||d.srcElement)});e(document.getElementById("wp-admin-bar-logout"),"click",function(){if("sessionStorage" in window){try{for(var d in sessionStorage){if(d.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(d)}}}catch(n){}}})}if(l.location.hash){l.scrollBy(0,-32)}})})(document,window)}; \ No newline at end of file
diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js
deleted file mode 100644
index 6cd6a47fd7..0000000000
--- a/wp-includes/js/autosave.js
+++ /dev/null
@@ -1,702 +0,0 @@
-var autosave, autosaveLast = '', autosavePeriodical, autosaveDelayPreview = false, notSaved = true, blockSave = false, fullscreen, autosaveLockRelease = true;
-
-jQuery(document).ready( function($) {
-
- if ( $('#wp-content-wrap').hasClass('tmce-active') && typeof switchEditors != 'undefined' ) {
- autosaveLast = wp.autosave.getCompareString({
- post_title : $('#title').val() || '',
- content : switchEditors.pre_wpautop( $('#content').val() ) || '',
- excerpt : $('#excerpt').val() || ''
- });
- } else {
- autosaveLast = wp.autosave.getCompareString();
- }
-
- autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true});
-
- //Disable autosave after the form has been submitted
- $("#post").submit(function() {
- $.cancel(autosavePeriodical);
- autosaveLockRelease = false;
- });
-
- $('input[type="submit"], a.submitdelete', '#submitpost').click(function(){
- blockSave = true;
- window.onbeforeunload = null;
- $(':button, :submit', '#submitpost').each(function(){
- var t = $(this);
- if ( t.hasClass('button-primary') )
- t.addClass('button-primary-disabled');
- else
- t.addClass('button-disabled');
- });
- if ( $(this).attr('id') == 'publish' )
- $('#major-publishing-actions .spinner').show();
- else
- $('#minor-publishing .spinner').show();
- });
-
- window.onbeforeunload = function(){
- var editor = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false, compareString;
-
- if ( editor && ! editor.isHidden() ) {
- if ( editor.isDirty() )
- return autosaveL10n.saveAlert;
- } else {
- if ( fullscreen && fullscreen.settings.visible ) {
- compareString = wp.autosave.getCompareString({
- post_title: $('#wp-fullscreen-title').val() || '',
- content: $('#wp_mce_fullscreen').val() || '',
- excerpt: $('#excerpt').val() || ''
- });
- } else {
- compareString = wp.autosave.getCompareString();
- }
-
- if ( compareString != autosaveLast )
- return autosaveL10n.saveAlert;
- }
- };
-
- $(window).unload( function(e) {
- if ( ! autosaveLockRelease )
- return;
-
- // unload fires (twice) on removing the Thickbox iframe. Make sure we process only the main document unload.
- if ( e.target && e.target.nodeName != '#document' )
- return;
-
- $.ajax({
- type: 'POST',
- url: ajaxurl,
- async: false,
- data: {
- action: 'wp-remove-post-lock',
- _wpnonce: $('#_wpnonce').val(),
- post_ID: $('#post_ID').val(),
- active_post_lock: $('#active_post_lock').val()
- }
- });
- } );
-
- // preview
- $('#post-preview').click(function(){
- if ( $('#auto_draft').val() == '1' && notSaved ) {
- autosaveDelayPreview = true;
- autosave();
- return false;
- }
- doPreview();
- return false;
- });
-
- doPreview = function() {
- $('input#wp-preview').val('dopreview');
- $('form#post').attr('target', 'wp-preview').submit().attr('target', '');
-
- /*
- * Workaround for WebKit bug preventing a form submitting twice to the same action.
- * https://bugs.webkit.org/show_bug.cgi?id=28633
- */
- var ua = navigator.userAgent.toLowerCase();
- if ( ua.indexOf('safari') != -1 && ua.indexOf('chrome') == -1 ) {
- $('form#post').attr('action', function(index, value) {
- return value + '?t=' + new Date().getTime();
- });
- }
-
- $('input#wp-preview').val('');
- }
-
- // This code is meant to allow tabbing from Title to Post content.
- $('#title').on('keydown.editor-focus', function(e) {
- var ed;
-
- if ( e.which != 9 )
- return;
-
- if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
- if ( typeof(tinymce) != 'undefined' )
- ed = tinymce.get('content');
-
- if ( ed && !ed.isHidden() ) {
- $(this).one('keyup', function(e){
- $('#content_tbl td.mceToolbar > a').focus();
- });
- } else {
- $('#content').focus();
- }
-
- e.preventDefault();
- }
- });
-
- // autosave new posts after a title is typed but not if Publish or Save Draft is clicked
- if ( '1' == $('#auto_draft').val() ) {
- $('#title').blur( function() {
- if ( !this.value || $('#auto_draft').val() != '1' )
- return;
- delayed_autosave();
- });
- }
-
- // When connection is lost, keep user from submitting changes.
- $(document).on('heartbeat-connection-lost.autosave', function( e, error ) {
- if ( 'timeout' === error ) {
- var notice = $('#lost-connection-notice');
- if ( ! wp.autosave.local.hasStorage ) {
- notice.find('.hide-if-no-sessionstorage').hide();
- }
- notice.show();
- autosave_disable_buttons();
- }
- }).on('heartbeat-connection-restored.autosave', function() {
- $('#lost-connection-notice').hide();
- autosave_enable_buttons();
- });
-});
-
-function autosave_parse_response( response ) {
- var res = wpAjax.parseAjaxResponse(response, 'autosave'), post_id, sup;
-
- if ( res && res.responses && res.responses.length ) {
- if ( res.responses[0].supplemental ) {
- sup = res.responses[0].supplemental;
-
- jQuery.each( sup, function( selector, value ) {
- if ( selector.match(/^replace-/) )
- jQuery( '#' + selector.replace('replace-', '') ).val( value );
- });
- }
-
- // if no errors: add slug UI and update autosave-message
- if ( !res.errors ) {
- if ( post_id = parseInt( res.responses[0].id, 10 ) )
- autosave_update_slug( post_id );
-
- if ( res.responses[0].data ) // update autosave message
- jQuery('.autosave-message').text( res.responses[0].data );
- }
- }
-
- return res;
-}
-
-// called when autosaving pre-existing post
-function autosave_saved(response) {
- blockSave = false;
- autosave_parse_response(response); // parse the ajax response
- autosave_enable_buttons(); // re-enable disabled form buttons
-}
-
-// called when autosaving new post
-function autosave_saved_new(response) {
- blockSave = false;
- var res = autosave_parse_response(response), post_id;
-
- if ( res && res.responses.length && !res.errors ) {
- // An ID is sent only for real auto-saves, not for autosave=0 "keepalive" saves
- post_id = parseInt( res.responses[0].id, 10 );
-
- if ( post_id ) {
- notSaved = false;
- jQuery('#auto_draft').val('0'); // No longer an auto-draft
- }
-
- autosave_enable_buttons();
-
- if ( autosaveDelayPreview ) {
- autosaveDelayPreview = false;
- doPreview();
- }
- } else {
- autosave_enable_buttons(); // re-enable disabled form buttons
- }
-}
-
-function autosave_update_slug(post_id) {
- // create slug area only if not already there
- if ( 'undefined' != makeSlugeditClickable && jQuery.isFunction(makeSlugeditClickable) && !jQuery('#edit-slug-box > *').size() ) {
- jQuery.post( ajaxurl, {
- action: 'sample-permalink',
- post_id: post_id,
- new_title: fullscreen && fullscreen.settings.visible ? jQuery('#wp-fullscreen-title').val() : jQuery('#title').val(),
- samplepermalinknonce: jQuery('#samplepermalinknonce').val()
- },
- function(data) {
- if ( data !== '-1' ) {
- var box = jQuery('#edit-slug-box');
- box.html(data);
- if (box.hasClass('hidden')) {
- box.fadeIn('fast', function () {
- box.removeClass('hidden');
- });
- }
- makeSlugeditClickable();
- }
- }
- );
- }
-}
-
-function autosave_loading() {
- jQuery('.autosave-message').html(autosaveL10n.savingText);
-}
-
-function autosave_enable_buttons() {
- jQuery(document).trigger('autosave-enable-buttons');
- if ( ! wp.heartbeat || ! wp.heartbeat.hasConnectionError() ) {
- // delay that a bit to avoid some rare collisions while the DOM is being updated.
- setTimeout(function(){
- var parent = jQuery('#submitpost');
- parent.find(':button, :submit').removeAttr('disabled');
- parent.find('.spinner').hide();
- }, 500);
- }
-}
-
-function autosave_disable_buttons() {
- jQuery(document).trigger('autosave-disable-buttons');
- jQuery('#submitpost').find(':button, :submit').prop('disabled', true);
- // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions.
- setTimeout( autosave_enable_buttons, 5000 );
-}
-
-function delayed_autosave() {
- setTimeout(function(){
- if ( blockSave )
- return;
- autosave();
- }, 200);
-}
-
-autosave = function() {
- var post_data = wp.autosave.getPostData(),
- compareString,
- successCallback;
-
- blockSave = true;
-
- // post_data.content cannot be retrieved at the moment
- if ( ! post_data.autosave )
- return false;
-
- // No autosave while thickbox is open (media buttons)
- if ( jQuery("#TB_window").css('display') == 'block' )
- return false;
-
- compareString = wp.autosave.getCompareString( post_data );
-
- // Nothing to save or no change.
- if ( compareString == autosaveLast )
- return false;
-
- autosaveLast = compareString;
- jQuery(document).triggerHandler('wpcountwords', [ post_data["content"] ]);
-
- // Disable buttons until we know the save completed.
- autosave_disable_buttons();
-
- if ( post_data["auto_draft"] == '1' ) {
- successCallback = autosave_saved_new; // new post
- } else {
- successCallback = autosave_saved; // pre-existing post
- }
-
- jQuery.ajax({
- data: post_data,
- beforeSend: autosave_loading,
- type: "POST",
- url: ajaxurl,
- success: successCallback
- });
-
- return true;
-}
-
-// Autosave in localStorage
-// set as simple object/mixin for now
-window.wp = window.wp || {};
-wp.autosave = wp.autosave || {};
-
-(function($){
-// Returns the data for saving in both localStorage and autosaves to the server
-wp.autosave.getPostData = function() {
- var ed = typeof tinymce != 'undefined' ? tinymce.activeEditor : null, post_name, parent_id, cats = [],
- data = {
- action: 'autosave',
- autosave: true,
- post_id: $('#post_ID').val() || 0,
- autosavenonce: $('#autosavenonce').val() || '',
- post_type: $('#post_type').val() || '',
- post_author: $('#post_author').val() || '',
- excerpt: $('#excerpt').val() || ''
- };
-
- if ( ed && !ed.isHidden() ) {
- // Don't run while the tinymce spellcheck is on. It resets all found words.
- if ( ed.plugins.spellchecker && ed.plugins.spellchecker.active ) {
- data.autosave = false;
- return data;
- } else {
- if ( 'mce_fullscreen' == ed.id )
- tinymce.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});
-
- tinymce.triggerSave();
- }
- }
-
- if ( typeof fullscreen != 'undefined' && fullscreen.settings.visible ) {
- data['post_title'] = $('#wp-fullscreen-title').val() || '';
- data['content'] = $('#wp_mce_fullscreen').val() || '';
- } else {
- data['post_title'] = $('#title').val() || '';
- data['content'] = $('#content').val() || '';
- }
-
- /*
- // We haven't been saving tags with autosave since 2.8... Start again?
- $('.the-tags').each( function() {
- data[this.name] = this.value;
- });
- */
-
- $('input[id^="in-category-"]:checked').each( function() {
- cats.push(this.value);
- });
- data['catslist'] = cats.join(',');
-
- if ( post_name = $('#post_name').val() )
- data['post_name'] = post_name;
-
- if ( parent_id = $('#parent_id').val() )
- data['parent_id'] = parent_id;
-
- if ( $('#comment_status').prop('checked') )
- data['comment_status'] = 'open';
-
- if ( $('#ping_status').prop('checked') )
- data['ping_status'] = 'open';
-
- if ( $('#auto_draft').val() == '1' )
- data['auto_draft'] = '1';
-
- return data;
-};
-
-// Concatenate title, content and excerpt. Used to track changes when auto-saving.
-wp.autosave.getCompareString = function( post_data ) {
- if ( typeof post_data === 'object' ) {
- return ( post_data.post_title || '' ) + '::' + ( post_data.content || '' ) + '::' + ( post_data.excerpt || '' );
- }
-
- return ( $('#title').val() || '' ) + '::' + ( $('#content').val() || '' ) + '::' + ( $('#excerpt').val() || '' );
-};
-
-wp.autosave.local = {
-
- lastSavedData: '',
- blog_id: 0,
- hasStorage: false,
-
- // Check if the browser supports sessionStorage and it's not disabled
- checkStorage: function() {
- var test = Math.random(), result = false;
-
- try {
- sessionStorage.setItem('wp-test', test);
- result = sessionStorage.getItem('wp-test') == test;
- sessionStorage.removeItem('wp-test');
- } catch(e) {}
-
- this.hasStorage = result;
- return result;
- },
-
- /**
- * Initialize the local storage
- *
- * @return mixed False if no sessionStorage in the browser or an Object containing all post_data for this blog
- */
- getStorage: function() {
- var stored_obj = false;
- // Separate local storage containers for each blog_id
- if ( this.hasStorage && this.blog_id ) {
- stored_obj = sessionStorage.getItem( 'wp-autosave-' + this.blog_id );
-
- if ( stored_obj )
- stored_obj = JSON.parse( stored_obj );
- else
- stored_obj = {};
- }
-
- return stored_obj;
- },
-
- /**
- * Set the storage for this blog
- *
- * Confirms that the data was saved successfully.
- *
- * @return bool
- */
- setStorage: function( stored_obj ) {
- var key;
-
- if ( this.hasStorage && this.blog_id ) {
- key = 'wp-autosave-' + this.blog_id;
- sessionStorage.setItem( key, JSON.stringify( stored_obj ) );
- return sessionStorage.getItem( key ) !== null;
- }
-
- return false;
- },
-
- /**
- * Get the saved post data for the current post
- *
- * @return mixed False if no storage or no data or the post_data as an Object
- */
- getData: function() {
- var stored = this.getStorage(), post_id = $('#post_ID').val();
-
- if ( !stored || !post_id )
- return false;
-
- return stored[ 'post_' + post_id ] || false;
- },
-
- /**
- * Set (save or delete) post data in the storage.
- *
- * If stored_data evaluates to 'false' the storage key for the current post will be removed
- *
- * $param stored_data The post data to store or null/false/empty to delete the key
- * @return bool
- */
- setData: function( stored_data ) {
- var stored = this.getStorage(), post_id = $('#post_ID').val();
-
- if ( !stored || !post_id )
- return false;
-
- if ( stored_data )
- stored[ 'post_' + post_id ] = stored_data;
- else if ( stored.hasOwnProperty( 'post_' + post_id ) )
- delete stored[ 'post_' + post_id ];
- else
- return false;
-
- return this.setStorage(stored);
- },
-
- /**
- * Save post data for the current post
- *
- * Runs on a 15 sec. schedule, saves when there are differences in the post title or content.
- * When the optional data is provided, updates the last saved post data.
- *
- * $param data optional Object The post data for saving, minimum 'post_title' and 'content'
- * @return bool
- */
- save: function( data ) {
- var result = false, post_data, compareString;
-
- if ( ! data ) {
- post_data = wp.autosave.getPostData();
- } else {
- post_data = this.getData() || {};
- $.extend( post_data, data );
- post_data.autosave = true;
- }
-
- // Cannot get the post data at the moment
- if ( ! post_data.autosave )
- return false;
-
- compareString = wp.autosave.getCompareString( post_data );
-
- // If the content, title and excerpt did not change since the last save, don't save again
- if ( compareString == this.lastSavedData )
- return false;
-
- post_data['save_time'] = (new Date()).getTime();
- post_data['status'] = $('#post_status').val() || '';
- result = this.setData( post_data );
-
- if ( result )
- this.lastSavedData = compareString;
-
- return result;
- },
-
- // Initialize and run checkPost() on loading the script (before TinyMCE init)
- init: function( settings ) {
- var self = this;
-
- // Check if the browser supports sessionStorage and it's not disabled
- if ( ! this.checkStorage() )
- return;
-
- // Don't run if the post type supports neither 'editor' (textarea#content) nor 'excerpt'.
- if ( ! $('#content').length && ! $('#excerpt').length )
- return;
-
- if ( settings )
- $.extend( this, settings );
-
- if ( !this.blog_id )
- this.blog_id = typeof window.autosaveL10n != 'undefined' ? window.autosaveL10n.blog_id : 0;
-
- $(document).ready( function(){ self.run(); } );
- },
-
- // Run on DOM ready
- run: function() {
- var self = this;
-
- // Check if the local post data is different than the loaded post data.
- this.checkPost();
-
- // Set the schedule
- this.schedule = $.schedule({
- time: 15 * 1000,
- func: function() { wp.autosave.local.save(); },
- repeat: true,
- protect: true
- });
-
- $('form#post').on('submit.autosave-local', function() {
- var editor = typeof tinymce != 'undefined' && tinymce.get('content'), post_id = $('#post_ID').val() || 0;
-
- if ( editor && ! editor.isHidden() ) {
- // Last onSubmit event in the editor, needs to run after the content has been moved to the textarea.
- editor.onSubmit.add( function() {
- wp.autosave.local.save({
- post_title: $('#title').val() || '',
- content: $('#content').val() || '',
- excerpt: $('#excerpt').val() || ''
- });
- });
- } else {
- self.save({
- post_title: $('#title').val() || '',
- content: $('#content').val() || '',
- excerpt: $('#excerpt').val() || ''
- });
- }
-
- wpCookies.set( 'wp-saving-post-' + post_id, 'check' );
- });
- },
-
- // Strip whitespace and compare two strings
- compare: function( str1, str2 ) {
- function remove( string ) {
- return string.toString().replace(/[\x20\t\r\n\f]+/g, '');
- }
-
- return ( remove( str1 || '' ) == remove( str2 || '' ) );
- },
-
- /**
- * Check if the saved data for the current post (if any) is different than the loaded post data on the screen
- *
- * Shows a standard message letting the user restore the post data if different.
- *
- * @return void
- */
- checkPost: function() {
- var self = this, post_data = this.getData(), content, post_title, excerpt, notice,
- post_id = $('#post_ID').val() || 0, cookie = wpCookies.get( 'wp-saving-post-' + post_id );
-
- if ( ! post_data )
- return;
-
- if ( cookie ) {
- wpCookies.remove( 'wp-saving-post-' + post_id );
-
- if ( cookie == 'saved' ) {
- // The post was saved properly, remove old data and bail
- this.setData( false );
- return;
- }
- }
-
- // There is a newer autosave. Don't show two "restore" notices at the same time.
- if ( $('#has-newer-autosave').length )
- return;
-
- content = $('#content').val() || '';
- post_title = $('#title').val() || '';
- excerpt = $('#excerpt').val() || '';
-
- if ( $('#wp-content-wrap').hasClass('tmce-active') && typeof switchEditors != 'undefined' )
- content = switchEditors.pre_wpautop( content );
-
- // cookie == 'check' means the post was not saved properly, always show #local-storage-notice
- if ( cookie != 'check' && this.compare( content, post_data.content ) && this.compare( post_title, post_data.post_title ) && this.compare( excerpt, post_data.excerpt ) ) {
- return;
- }
-
- this.restore_post_data = post_data;
- this.undo_post_data = {
- content: content,
- post_title: post_title,
- excerpt: excerpt
- };
-
- notice = $('#local-storage-notice');
- $('.wrap h2').first().after( notice.addClass('updated').show() );
-
- notice.on( 'click', function(e) {
- var target = $( e.target );
-
- if ( target.hasClass('restore-backup') ) {
- self.restorePost( self.restore_post_data );
- target.parent().hide();
- $(this).find('p.undo-restore').show();
- } else if ( target.hasClass('undo-restore-backup') ) {
- self.restorePost( self.undo_post_data );
- target.parent().hide();
- $(this).find('p.local-restore').show();
- }
-
- e.preventDefault();
- });
- },
-
- // Restore the current title, content and excerpt from post_data.
- restorePost: function( post_data ) {
- var editor;
-
- if ( post_data ) {
- // Set the last saved data
- this.lastSavedData = wp.autosave.getCompareString( post_data );
-
- if ( $('#title').val() != post_data.post_title )
- $('#title').focus().val( post_data.post_title || '' );
-
- $('#excerpt').val( post_data.excerpt || '' );
- editor = typeof tinymce != 'undefined' && tinymce.get('content');
-
- if ( editor && ! editor.isHidden() && typeof switchEditors != 'undefined' ) {
- // Make sure there's an undo level in the editor
- editor.undoManager.add();
- editor.setContent( post_data.content ? switchEditors.wpautop( post_data.content ) : '' );
- } else {
- // Make sure the Text editor is selected
- $('#content-html').click();
- $('#content').val( post_data.content );
- }
-
- return true;
- }
-
- return false;
- }
-};
-
-wp.autosave.local.init();
-
-}(jQuery));
diff --git a/wp-includes/js/autosave.min.js b/wp-includes/js/autosave.min.js
deleted file mode 100644
index 96a5bc6e36..0000000000
--- a/wp-includes/js/autosave.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var autosave,autosaveLast="",autosavePeriodical,autosaveDelayPreview=false,notSaved=true,blockSave=false,fullscreen,autosaveLockRelease=true;jQuery(document).ready(function(a){if(a("#wp-content-wrap").hasClass("tmce-active")&&typeof switchEditors!="undefined"){autosaveLast=wp.autosave.getCompareString({post_title:a("#title").val()||"",content:switchEditors.pre_wpautop(a("#content").val())||"",excerpt:a("#excerpt").val()||""})}else{autosaveLast=wp.autosave.getCompareString()}autosavePeriodical=a.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});a("#post").submit(function(){a.cancel(autosavePeriodical);autosaveLockRelease=false});a('input[type="submit"], a.submitdelete',"#submitpost").click(function(){blockSave=true;window.onbeforeunload=null;a(":button, :submit","#submitpost").each(function(){var b=a(this);if(b.hasClass("button-primary")){b.addClass("button-primary-disabled")}else{b.addClass("button-disabled")}});if(a(this).attr("id")=="publish"){a("#major-publishing-actions .spinner").show()}else{a("#minor-publishing .spinner").show()}});window.onbeforeunload=function(){var b=typeof(tinymce)!="undefined"?tinymce.activeEditor:false,c;if(b&&!b.isHidden()){if(b.isDirty()){return autosaveL10n.saveAlert}}else{if(fullscreen&&fullscreen.settings.visible){c=wp.autosave.getCompareString({post_title:a("#wp-fullscreen-title").val()||"",content:a("#wp_mce_fullscreen").val()||"",excerpt:a("#excerpt").val()||""})}else{c=wp.autosave.getCompareString()}if(c!=autosaveLast){return autosaveL10n.saveAlert}}};a(window).unload(function(b){if(!autosaveLockRelease){return}if(b.target&&b.target.nodeName!="#document"){return}a.ajax({type:"POST",url:ajaxurl,async:false,data:{action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:a("#post_ID").val(),active_post_lock:a("#active_post_lock").val()}})});a("#post-preview").click(function(){if(a("#auto_draft").val()=="1"&&notSaved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){a("input#wp-preview").val("dopreview");a("form#post").attr("target","wp-preview").submit().attr("target","");var b=navigator.userAgent.toLowerCase();if(b.indexOf("safari")!=-1&&b.indexOf("chrome")==-1){a("form#post").attr("action",function(c,d){return d+"?t="+new Date().getTime()})}a("input#wp-preview").val("")};a("#title").on("keydown.editor-focus",function(c){var b;if(c.which!=9){return}if(!c.ctrlKey&&!c.altKey&&!c.shiftKey){if(typeof(tinymce)!="undefined"){b=tinymce.get("content")}if(b&&!b.isHidden()){a(this).one("keyup",function(d){a("#content_tbl td.mceToolbar > a").focus()})}else{a("#content").focus()}c.preventDefault()}});if("1"==a("#auto_draft").val()){a("#title").blur(function(){if(!this.value||a("#auto_draft").val()!="1"){return}delayed_autosave()})}a(document).on("heartbeat-connection-lost.autosave",function(d,b){if("timeout"===b){var c=a("#lost-connection-notice");if(!wp.autosave.local.hasStorage){c.find(".hide-if-no-sessionstorage").hide()}c.show();autosave_disable_buttons()}}).on("heartbeat-connection-restored.autosave",function(){a("#lost-connection-notice").hide();autosave_enable_buttons()})});function autosave_parse_response(b){var d=wpAjax.parseAjaxResponse(b,"autosave"),c,a;if(d&&d.responses&&d.responses.length){if(d.responses[0].supplemental){a=d.responses[0].supplemental;jQuery.each(a,function(e,f){if(e.match(/^replace-/)){jQuery("#"+e.replace("replace-","")).val(f)}})}if(!d.errors){if(c=parseInt(d.responses[0].id,10)){autosave_update_slug(c)}if(d.responses[0].data){jQuery(".autosave-message").text(d.responses[0].data)}}}return d}function autosave_saved(a){blockSave=false;autosave_parse_response(a);autosave_enable_buttons()}function autosave_saved_new(a){blockSave=false;var c=autosave_parse_response(a),b;if(c&&c.responses.length&&!c.errors){b=parseInt(c.responses[0].id,10);if(b){notSaved=false;jQuery("#auto_draft").val("0")}autosave_enable_buttons();if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_slug(a){if("undefined"!=makeSlugeditClickable&&jQuery.isFunction(makeSlugeditClickable)&&!jQuery("#edit-slug-box > *").size()){jQuery.post(ajaxurl,{action:"sample-permalink",post_id:a,new_title:fullscreen&&fullscreen.settings.visible?jQuery("#wp-fullscreen-title").val():jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(c){if(c!=="-1"){var b=jQuery("#edit-slug-box");b.html(c);if(b.hasClass("hidden")){b.fadeIn("fast",function(){b.removeClass("hidden")})}makeSlugeditClickable()}})}}function autosave_loading(){jQuery(".autosave-message").html(autosaveL10n.savingText)}function autosave_enable_buttons(){jQuery(document).trigger("autosave-enable-buttons");if(!wp.heartbeat||!wp.heartbeat.hasConnectionError()){setTimeout(function(){var a=jQuery("#submitpost");a.find(":button, :submit").removeAttr("disabled");a.find(".spinner").hide()},500)}}function autosave_disable_buttons(){jQuery(document).trigger("autosave-disable-buttons");jQuery("#submitpost").find(":button, :submit").prop("disabled",true);setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){var c=wp.autosave.getPostData(),b,a;blockSave=true;if(!c.autosave){return false}if(jQuery("#TB_window").css("display")=="block"){return false}b=wp.autosave.getCompareString(c);if(b==autosaveLast){return false}autosaveLast=b;jQuery(document).triggerHandler("wpcountwords",[c.content]);autosave_disable_buttons();if(c.auto_draft=="1"){a=autosave_saved_new}else{a=autosave_saved}jQuery.ajax({data:c,beforeSend:autosave_loading,type:"POST",url:ajaxurl,success:a});return true};window.wp=window.wp||{};wp.autosave=wp.autosave||{};(function(a){wp.autosave.getPostData=function(){var b=typeof tinymce!="undefined"?tinymce.activeEditor:null,d,f,c=[],e={action:"autosave",autosave:true,post_id:a("#post_ID").val()||0,autosavenonce:a("#autosavenonce").val()||"",post_type:a("#post_type").val()||"",post_author:a("#post_author").val()||"",excerpt:a("#excerpt").val()||""};if(b&&!b.isHidden()){if(b.plugins.spellchecker&&b.plugins.spellchecker.active){e.autosave=false;return e}else{if("mce_fullscreen"==b.id){tinymce.get("content").setContent(b.getContent({format:"raw"}),{format:"raw"})}tinymce.triggerSave()}}if(typeof fullscreen!="undefined"&&fullscreen.settings.visible){e.post_title=a("#wp-fullscreen-title").val()||"";e.content=a("#wp_mce_fullscreen").val()||""}else{e.post_title=a("#title").val()||"";e.content=a("#content").val()||""}a('input[id^="in-category-"]:checked').each(function(){c.push(this.value)});e.catslist=c.join(",");if(d=a("#post_name").val()){e.post_name=d}if(f=a("#parent_id").val()){e.parent_id=f}if(a("#comment_status").prop("checked")){e.comment_status="open"}if(a("#ping_status").prop("checked")){e.ping_status="open"}if(a("#auto_draft").val()=="1"){e.auto_draft="1"}return e};wp.autosave.getCompareString=function(b){if(typeof b==="object"){return(b.post_title||"")+"::"+(b.content||"")+"::"+(b.excerpt||"")}return(a("#title").val()||"")+"::"+(a("#content").val()||"")+"::"+(a("#excerpt").val()||"")};wp.autosave.local={lastSavedData:"",blog_id:0,hasStorage:false,checkStorage:function(){var d=Math.random(),b=false;try{sessionStorage.setItem("wp-test",d);b=sessionStorage.getItem("wp-test")==d;sessionStorage.removeItem("wp-test")}catch(c){}this.hasStorage=b;return b},getStorage:function(){var b=false;if(this.hasStorage&&this.blog_id){b=sessionStorage.getItem("wp-autosave-"+this.blog_id);if(b){b=JSON.parse(b)}else{b={}}}return b},setStorage:function(b){var c;if(this.hasStorage&&this.blog_id){c="wp-autosave-"+this.blog_id;sessionStorage.setItem(c,JSON.stringify(b));return sessionStorage.getItem(c)!==null}return false},getData:function(){var c=this.getStorage(),b=a("#post_ID").val();if(!c||!b){return false}return c["post_"+b]||false},setData:function(b){var d=this.getStorage(),c=a("#post_ID").val();if(!d||!c){return false}if(b){d["post_"+c]=b}else{if(d.hasOwnProperty("post_"+c)){delete d["post_"+c]}else{return false}}return this.setStorage(d)},save:function(d){var b=false,e,c;if(!d){e=wp.autosave.getPostData()}else{e=this.getData()||{};a.extend(e,d);e.autosave=true}if(!e.autosave){return false}c=wp.autosave.getCompareString(e);if(c==this.lastSavedData){return false}e.save_time=(new Date()).getTime();e.status=a("#post_status").val()||"";b=this.setData(e);if(b){this.lastSavedData=c}return b},init:function(c){var b=this;if(!this.checkStorage()){return}if(!a("#content").length&&!a("#excerpt").length){return}if(c){a.extend(this,c)}if(!this.blog_id){this.blog_id=typeof window.autosaveL10n!="undefined"?window.autosaveL10n.blog_id:0}a(document).ready(function(){b.run()})},run:function(){var b=this;this.checkPost();this.schedule=a.schedule({time:15*1000,func:function(){wp.autosave.local.save()},repeat:true,protect:true});a("form#post").on("submit.autosave-local",function(){var d=typeof tinymce!="undefined"&&tinymce.get("content"),c=a("#post_ID").val()||0;if(d&&!d.isHidden()){d.onSubmit.add(function(){wp.autosave.local.save({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""})})}else{b.save({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""})}wpCookies.set("wp-saving-post-"+c,"check")})},compare:function(d,c){function b(e){return e.toString().replace(/[\x20\t\r\n\f]+/g,"")}return(b(d||"")==b(c||""))},checkPost:function(){var c=this,i=this.getData(),g,f,b,h,d=a("#post_ID").val()||0,e=wpCookies.get("wp-saving-post-"+d);if(!i){return}if(e){wpCookies.remove("wp-saving-post-"+d);if(e=="saved"){this.setData(false);return}}if(a("#has-newer-autosave").length){return}g=a("#content").val()||"";f=a("#title").val()||"";b=a("#excerpt").val()||"";if(a("#wp-content-wrap").hasClass("tmce-active")&&typeof switchEditors!="undefined"){g=switchEditors.pre_wpautop(g)}if(e!="check"&&this.compare(g,i.content)&&this.compare(f,i.post_title)&&this.compare(b,i.excerpt)){return}this.restore_post_data=i;this.undo_post_data={content:g,post_title:f,excerpt:b};h=a("#local-storage-notice");a(".wrap h2").first().after(h.addClass("updated").show());h.on("click",function(k){var j=a(k.target);if(j.hasClass("restore-backup")){c.restorePost(c.restore_post_data);j.parent().hide();a(this).find("p.undo-restore").show()}else{if(j.hasClass("undo-restore-backup")){c.restorePost(c.undo_post_data);j.parent().hide();a(this).find("p.local-restore").show()}}k.preventDefault()})},restorePost:function(c){var b;if(c){this.lastSavedData=wp.autosave.getCompareString(c);if(a("#title").val()!=c.post_title){a("#title").focus().val(c.post_title||"")}a("#excerpt").val(c.excerpt||"");b=typeof tinymce!="undefined"&&tinymce.get("content");if(b&&!b.isHidden()&&typeof switchEditors!="undefined"){b.undoManager.add();b.setContent(c.content?switchEditors.wpautop(c.content):"")}else{a("#content-html").click();a("#content").val(c.content)}return true}return false}};wp.autosave.local.init()}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/backbone.min.js b/wp-includes/js/backbone.min.js
deleted file mode 100644
index 8555ecaf29..0000000000
--- a/wp-includes/js/backbone.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// Backbone.js 1.0.0
-
-// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-(function(){var t=this;var e=t.Backbone;var i=[];var r=i.push;var s=i.slice;var n=i.splice;var a;if(typeof exports!=="undefined"){a=exports}else{a=t.Backbone={}}a.VERSION="1.0.0";var h=t._;if(!h&&typeof require!=="undefined")h=require("underscore");a.$=t.jQuery||t.Zepto||t.ender||t.$;a.noConflict=function(){t.Backbone=e;return this};a.emulateHTTP=false;a.emulateJSON=false;var o=a.Events={on:function(t,e,i){if(!l(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,i){if(!l(this,"once",t,[e,i])||!e)return this;var r=this;var s=h.once(function(){r.off(t,s);e.apply(this,arguments)});s._callback=e;return this.on(t,s,i)},off:function(t,e,i){var r,s,n,a,o,u,c,f;if(!this._events||!l(this,"off",t,[e,i]))return this;if(!t&&!e&&!i){this._events={};return this}a=t?[t]:h.keys(this._events);for(o=0,u=a.length;o<u;o++){t=a[o];if(n=this._events[t]){this._events[t]=r=[];if(e||i){for(c=0,f=n.length;c<f;c++){s=n[c];if(e&&e!==s.callback&&e!==s.callback._callback||i&&i!==s.context){r.push(s)}}}if(!r.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!l(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)c(i,e);if(r)c(r,arguments);return this},stopListening:function(t,e,i){var r=this._listeners;if(!r)return this;var s=!e&&!i;if(typeof e==="object")i=this;if(t)(r={})[t._listenerId]=t;for(var n in r){r[n].off(e,i,this);if(s)delete this._listeners[n]}return this}};var u=/\s+/;var l=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(u.test(i)){var n=i.split(u);for(var a=0,h=n.length;a<h;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var c=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],h=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,h);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e)}};var f={listenTo:"on",listenToOnce:"once"};h.each(f,function(t,e){o[e]=function(e,i,r){var s=this._listeners||(this._listeners={});var n=e._listenerId||(e._listenerId=h.uniqueId("l"));s[n]=e;if(typeof i==="object")r=this;e[t](i,r,this);return this}});o.bind=o.on;o.unbind=o.off;h.extend(a,o);var d=a.Model=function(t,e){var i;var r=t||{};e||(e={});this.cid=h.uniqueId("c");this.attributes={};h.extend(this,h.pick(e,p));if(e.parse)r=this.parse(r,e)||{};if(i=h.result(this,"defaults")){r=h.defaults({},r,i)}this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};var p=["url","urlRoot","collection"];h.extend(d.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return h.clone(this.attributes)},sync:function(){return a.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return h.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,i){var r,s,n,a,o,u,l,c;if(t==null)return this;if(typeof t==="object"){s=t;i=e}else{(s={})[t]=e}i||(i={});if(!this._validate(s,i))return false;n=i.unset;o=i.silent;a=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=h.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in s)this.id=s[this.idAttribute];for(r in s){e=s[r];if(!h.isEqual(c[r],e))a.push(r);if(!h.isEqual(l[r],e)){this.changed[r]=e}else{delete this.changed[r]}n?delete c[r]:c[r]=e}if(!o){if(a.length)this._pending=true;for(var f=0,d=a.length;f<d;f++){this.trigger("change:"+a[f],this,c[a[f]],i)}}if(u)return this;if(!o){while(this._pending){this._pending=false;this.trigger("change",this,i)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,h.extend({},e,{unset:true}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,h.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!h.isEmpty(this.changed);return h.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?h.clone(this.changed):false;var e,i=false;var r=this._changing?this._previousAttributes:this.attributes;for(var s in t){if(h.isEqual(r[s],e=t[s]))continue;(i||(i={}))[s]=e}return i},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var i=t.success;t.success=function(r){if(!e.set(e.parse(r,t),t))return false;if(i)i(e,r,t);e.trigger("sync",e,r,t)};R(this,t);return this.sync("read",this,t)},save:function(t,e,i){var r,s,n,a=this.attributes;if(t==null||typeof t==="object"){r=t;i=e}else{(r={})[t]=e}if(r&&(!i||!i.wait)&&!this.set(r,i))return false;i=h.extend({validate:true},i);if(!this._validate(r,i))return false;if(r&&i.wait){this.attributes=h.extend({},a,r)}if(i.parse===void 0)i.parse=true;var o=this;var u=i.success;i.success=function(t){o.attributes=a;var e=o.parse(t,i);if(i.wait)e=h.extend(r||{},e);if(h.isObject(e)&&!o.set(e,i)){return false}if(u)u(o,t,i);o.trigger("sync",o,t,i)};R(this,i);s=this.isNew()?"create":i.patch?"patch":"update";if(s==="patch")i.attrs=r;n=this.sync(s,this,i);if(r&&i.wait)this.attributes=a;return n},destroy:function(t){t=t?h.clone(t):{};var e=this;var i=t.success;var r=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(s){if(t.wait||e.isNew())r();if(i)i(e,s,t);if(!e.isNew())e.trigger("sync",e,s,t)};if(this.isNew()){t.success();return false}R(this,t);var s=this.sync("delete",this,t);if(!t.wait)r();return s},url:function(){var t=h.result(this,"urlRoot")||h.result(this.collection,"url")||U();if(this.isNew())return t;return t+(t.charAt(t.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(t){return this._validate({},h.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=h.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;if(!i)return true;this.trigger("invalid",this,i,h.extend(e||{},{validationError:i}));return false}});var v=["keys","values","pairs","invert","pick","omit"];h.each(v,function(t){d.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.attributes);return h[t].apply(h,e)}});var g=a.Collection=function(t,e){e||(e={});if(e.url)this.url=e.url;if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,h.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,merge:false,remove:false};h.extend(g.prototype,o,{model:d,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return a.sync.apply(this,arguments)},add:function(t,e){return this.set(t,h.defaults(e||{},y))},remove:function(t,e){t=h.isArray(t)?t.slice():[t];e||(e={});var i,r,s,n;for(i=0,r=t.length;i<r;i++){n=this.get(t[i]);if(!n)continue;delete this._byId[n.id];delete this._byId[n.cid];s=this.indexOf(n);this.models.splice(s,1);this.length--;if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}this._removeReference(n)}return this},set:function(t,e){e=h.defaults(e||{},m);if(e.parse)t=this.parse(t,e);if(!h.isArray(t))t=t?[t]:[];var i,s,a,o,u,l;var c=e.at;var f=this.comparator&&c==null&&e.sort!==false;var d=h.isString(this.comparator)?this.comparator:null;var p=[],v=[],g={};for(i=0,s=t.length;i<s;i++){if(!(a=this._prepareModel(t[i],e)))continue;if(u=this.get(a)){if(e.remove)g[u.cid]=true;if(e.merge){u.set(a.attributes,e);if(f&&!l&&u.hasChanged(d))l=true}}else if(e.add){p.push(a);a.on("all",this._onModelEvent,this);this._byId[a.cid]=a;if(a.id!=null)this._byId[a.id]=a}}if(e.remove){for(i=0,s=this.length;i<s;++i){if(!g[(a=this.models[i]).cid])v.push(a)}if(v.length)this.remove(v,e)}if(p.length){if(f)l=true;this.length+=p.length;if(c!=null){n.apply(this.models,[c,0].concat(p))}else{r.apply(this.models,p)}}if(l)this.sort({silent:true});if(e.silent)return this;for(i=0,s=p.length;i<s;i++){(a=p[i]).trigger("add",a,this,e)}if(l)this.trigger("sort",this,e);return this},reset:function(t,e){e||(e={});for(var i=0,r=this.models.length;i<r;i++){this._removeReference(this.models[i])}e.previousModels=this.models;this._reset();this.add(t,h.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return this},push:function(t,e){t=this._prepareModel(t,e);this.add(t,h.extend({at:this.length},e));return t},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){t=this._prepareModel(t,e);this.add(t,h.extend({at:0},e));return t},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){if(t==null)return void 0;return this._byId[t.id!=null?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){if(h.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(h.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(h.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},sortedIndex:function(t,e,i){e||(e=this.comparator);var r=h.isFunction(e)?e:function(t){return t.get(e)};return h.sortedIndex(this.models,t,r,i)},pluck:function(t){return h.invoke(this.models,"get",t)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var i=this;t.success=function(r){var s=t.reset?"reset":"set";i[s](r,t);if(e)e(i,r,t);i.trigger("sync",i,r,t)};R(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?h.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var i=this;var r=e.success;e.success=function(s){if(e.wait)i.add(t,e);if(r)r(t,s,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof d){if(!t.collection)t.collection=this;return t}e||(e={});e.collection=this;var i=new this.model(t,e);if(!i._validate(t,e)){this.trigger("invalid",this,t,e);return false}return i},_removeReference:function(t){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(_,function(t){g.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.models);return h[t].apply(h,e)}});var w=["groupBy","countBy","sortBy"];h.each(w,function(t){g.prototype[t]=function(e,i){var r=h.isFunction(e)?e:function(t){return t.get(e)};return h[t](this.models,r,i)}});var b=a.View=function(t){this.cid=h.uniqueId("view");this._configure(t||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];h.extend(b.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,e){if(this.$el)this.undelegateEvents();this.$el=t instanceof a.$?t:a.$(t);this.el=this.$el[0];if(e!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=h.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(!h.isFunction(i))i=this[t[e]];if(!i)continue;var r=e.match(x);var s=r[1],n=r[2];i=h.bind(i,this);s+=".delegateEvents"+this.cid;if(n===""){this.$el.on(s,i)}else{this.$el.on(s,n,i)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_configure:function(t){if(this.options)t=h.extend({},h.result(this,"options"),t);h.extend(this,h.pick(t,E));this.options=t},_ensureElement:function(){if(!this.el){var t=h.extend({},h.result(this,"attributes"));if(this.id)t.id=h.result(this,"id");if(this.className)t["class"]=h.result(this,"className");var e=a.$("<"+h.result(this,"tagName")+">").attr(t);this.setElement(e,false)}else{this.setElement(h.result(this,"el"),false)}}});a.sync=function(t,e,i){var r=k[t];h.defaults(i||(i={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var s={type:r,dataType:"json"};if(!i.url){s.url=h.result(e,"url")||U()}if(i.data==null&&e&&(t==="create"||t==="update"||t==="patch")){s.contentType="application/json";s.data=JSON.stringify(i.attrs||e.toJSON(i))}if(i.emulateJSON){s.contentType="application/x-www-form-urlencoded";s.data=s.data?{model:s.data}:{}}if(i.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){s.type="POST";if(i.emulateJSON)s.data._method=r;var n=i.beforeSend;i.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",r);if(n)return n.apply(this,arguments)}}if(s.type!=="GET"&&!i.emulateJSON){s.processData=false}if(s.type==="PATCH"&&window.ActiveXObject&&!(window.external&&window.external.msActiveXFilteringEnabled)){s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var o=i.xhr=a.ajax(h.extend(s,i));e.trigger("request",e,o,i);return o};var k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var S=a.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var $=/\((.*?)\)/g;var T=/(\(\?)?:\w+/g;var H=/\*\w+/g;var A=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(S.prototype,o,{initialize:function(){},route:function(t,e,i){if(!h.isRegExp(t))t=this._routeToRegExp(t);if(h.isFunction(e)){i=e;e=""}if(!i)i=this[e];var r=this;a.history.route(t,function(s){var n=r._extractParameters(t,s);i&&i.apply(r,n);r.trigger.apply(r,["route:"+e].concat(n));r.trigger("route",e,n);a.history.trigger("route",r,e,n)});return this},navigate:function(t,e){a.history.navigate(t,e);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=h.result(this,"routes");var t,e=h.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(A,"\\$&").replace($,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/]+)"}).replace(H,"(.*?)");return new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return h.map(i,function(t){return t?decodeURIComponent(t):null})}});var I=a.History=function(){this.handlers=[];h.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var P=/^\/+|\/+$/g;var O=/msie [\w.]+/;var C=/\/$/;I.started=false;h.extend(I.prototype,o,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.substr(i.length)}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=true;this.options=h.extend({},{root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment();var i=document.documentMode;var r=O.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(P,"/");if(r&&this._wantsHashChange){this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;this.navigate(e)}if(this._hasPushState){a.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!r){a.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=e;var s=this.location;var n=s.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!n){this.fragment=this.getFragment(null,true);this.location.replace(this.root+this.location.search+"#"+this.fragment);return true}else if(this._wantsPushState&&this._hasPushState&&n&&s.hash){this.fragment=this.getHash().replace(N,"");this.history.replaceState({},document.title,this.root+this.fragment+s.search)}if(!this.options.silent)return this.loadUrl()},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);I.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(t){var e=this.fragment=this.getFragment(t);var i=h.any(this.handlers,function(t){if(t.route.test(e)){t.callback(e);return true}});return i},navigate:function(t,e){if(!I.started)return false;if(!e||e===true)e={trigger:e};t=this.getFragment(t||"");if(this.fragment===t)return;this.fragment=t;var i=this.root+t;if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});a.history=new I;var j=function(t,e){var i=this;var r;if(t&&h.has(t,"constructor")){r=t.constructor}else{r=function(){return i.apply(this,arguments)}}h.extend(r,i,e);var s=function(){this.constructor=r};s.prototype=i.prototype;r.prototype=new s;if(t)h.extend(r.prototype,t);r.__super__=i.prototype;return r};d.extend=g.extend=S.extend=b.extend=I.extend=j;var U=function(){throw new Error('A "url" property or function must be specified')};var R=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}}}).call(this);
diff --git a/wp-includes/js/colorpicker.js b/wp-includes/js/colorpicker.js
deleted file mode 100644
index 61c94bb9b3..0000000000
--- a/wp-includes/js/colorpicker.js
+++ /dev/null
@@ -1,707 +0,0 @@
-// ===================================================================
-// Author: Matt Kruse <matt@mattkruse.com>
-// WWW: http://www.mattkruse.com/
-//
-// NOTICE: You may use this code for any purpose, commercial or
-// private, without any further permission from the author. You may
-// remove this notice from your final code if you wish, however it is
-// appreciated by the author if at least my web site address is kept.
-//
-// You may *NOT* re-distribute this code in any way except through its
-// use. That means, you can include it in your product, or your web
-// site, or any other form where the code is actually being used. You
-// may not put the plain javascript up on your site for download or
-// include it in your javascript libraries for download.
-// If you wish to share this code with others, please just point them
-// to the URL instead.
-// Please DO NOT link directly to my .js files from your site. Copy
-// the files to your server and use them there. Thank you.
-// ===================================================================
-
-
-/* SOURCE FILE: AnchorPosition.js */
-
-/*
-AnchorPosition.js
-Author: Matt Kruse
-Last modified: 10/11/02
-
-DESCRIPTION: These functions find the position of an <A> tag in a document,
-so other elements can be positioned relative to it.
-
-COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
-positioning errors - usually with Window positioning - occur on the
-Macintosh platform.
-
-FUNCTIONS:
-getAnchorPosition(anchorname)
- Returns an Object() having .x and .y properties of the pixel coordinates
- of the upper-left corner of the anchor. Position is relative to the PAGE.
-
-getAnchorWindowPosition(anchorname)
- Returns an Object() having .x and .y properties of the pixel coordinates
- of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
-
-NOTES:
-
-1) For popping up separate browser windows, use getAnchorWindowPosition.
- Otherwise, use getAnchorPosition
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the
- same. For example:
- <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the
- anchor tag correctly. Do not do <A></A> with no space.
-*/
-
-// getAnchorPosition(anchorname)
-// This function returns an object having .x and .y properties which are the coordinates
-// of the named anchor, relative to the page.
-function getAnchorPosition(anchorname) {
- // This function will return an Object with x and y properties
- var useWindow=false;
- var coordinates=new Object();
- var x=0,y=0;
- // Browser capability sniffing
- var use_gebi=false, use_css=false, use_layers=false;
- if (document.getElementById) { use_gebi=true; }
- else if (document.all) { use_css=true; }
- else if (document.layers) { use_layers=true; }
- // Logic to find position
- if (use_gebi && document.all) {
- x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
- y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
- }
- else if (use_gebi) {
- var o=document.getElementById(anchorname);
- x=AnchorPosition_getPageOffsetLeft(o);
- y=AnchorPosition_getPageOffsetTop(o);
- }
- else if (use_css) {
- x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
- y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
- }
- else if (use_layers) {
- var found=0;
- for (var i=0; i<document.anchors.length; i++) {
- if (document.anchors[i].name==anchorname) { found=1; break; }
- }
- if (found==0) {
- coordinates.x=0; coordinates.y=0; return coordinates;
- }
- x=document.anchors[i].x;
- y=document.anchors[i].y;
- }
- else {
- coordinates.x=0; coordinates.y=0; return coordinates;
- }
- coordinates.x=x;
- coordinates.y=y;
- return coordinates;
- }
-
-// getAnchorWindowPosition(anchorname)
-// This function returns an object having .x and .y properties which are the coordinates
-// of the named anchor, relative to the window
-function getAnchorWindowPosition(anchorname) {
- var coordinates=getAnchorPosition(anchorname);
- var x=0;
- var y=0;
- if (document.getElementById) {
- if (isNaN(window.screenX)) {
- x=coordinates.x-document.body.scrollLeft+window.screenLeft;
- y=coordinates.y-document.body.scrollTop+window.screenTop;
- }
- else {
- x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
- y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
- }
- }
- else if (document.all) {
- x=coordinates.x-document.body.scrollLeft+window.screenLeft;
- y=coordinates.y-document.body.scrollTop+window.screenTop;
- }
- else if (document.layers) {
- x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
- y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
- }
- coordinates.x=x;
- coordinates.y=y;
- return coordinates;
- }
-
-// Functions for IE to get position of an object
-function AnchorPosition_getPageOffsetLeft (el) {
- var ol=el.offsetLeft;
- while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
- return ol;
- }
-function AnchorPosition_getWindowOffsetLeft (el) {
- return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
- }
-function AnchorPosition_getPageOffsetTop (el) {
- var ot=el.offsetTop;
- while((el=el.offsetParent) != null) { ot += el.offsetTop; }
- return ot;
- }
-function AnchorPosition_getWindowOffsetTop (el) {
- return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
- }
-
-/* SOURCE FILE: PopupWindow.js */
-
-/*
-PopupWindow.js
-Author: Matt Kruse
-Last modified: 02/16/04
-
-DESCRIPTION: This object allows you to easily and quickly popup a window
-in a certain place. The window can either be a DIV or a separate browser
-window.
-
-COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
-positioning errors - usually with Window positioning - occur on the
-Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
-window with <STYLE> tags may cause errors.
-
-USAGE:
-// Create an object for a WINDOW popup
-var win = new PopupWindow();
-
-// Create an object for a DIV window using the DIV named 'mydiv'
-var win = new PopupWindow('mydiv');
-
-// Set the window to automatically hide itself when the user clicks
-// anywhere else on the page except the popup
-win.autoHide();
-
-// Show the window relative to the anchor name passed in
-win.showPopup(anchorname);
-
-// Hide the popup
-win.hidePopup();
-
-// Set the size of the popup window (only applies to WINDOW popups
-win.setSize(width,height);
-
-// Populate the contents of the popup window that will be shown. If you
-// change the contents while it is displayed, you will need to refresh()
-win.populate(string);
-
-// set the URL of the window, rather than populating its contents
-// manually
-win.setUrl("http://www.site.com/");
-
-// Refresh the contents of the popup
-win.refresh();
-
-// Specify how many pixels to the right of the anchor the popup will appear
-win.offsetX = 50;
-
-// Specify how many pixels below the anchor the popup will appear
-win.offsetY = 100;
-
-NOTES:
-1) Requires the functions in AnchorPosition.js
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the
- same. For example:
- <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the
- anchor tag correctly. Do not do <A></A> with no space.
-
-4) When a PopupWindow object is created, a handler for 'onmouseup' is
- attached to any event handler you may have already defined. Do NOT define
- an event handler for 'onmouseup' after you define a PopupWindow object or
- the autoHide() will not work correctly.
-*/
-
-// Set the position of the popup window based on the anchor
-function PopupWindow_getXYPosition(anchorname) {
- var coordinates;
- if (this.type == "WINDOW") {
- coordinates = getAnchorWindowPosition(anchorname);
- }
- else {
- coordinates = getAnchorPosition(anchorname);
- }
- this.x = coordinates.x;
- this.y = coordinates.y;
- }
-// Set width/height of DIV/popup window
-function PopupWindow_setSize(width,height) {
- this.width = width;
- this.height = height;
- }
-// Fill the window with contents
-function PopupWindow_populate(contents) {
- this.contents = contents;
- this.populated = false;
- }
-// Set the URL to go to
-function PopupWindow_setUrl(url) {
- this.url = url;
- }
-// Set the window popup properties
-function PopupWindow_setWindowProperties(props) {
- this.windowProperties = props;
- }
-// Refresh the displayed contents of the popup
-function PopupWindow_refresh() {
- if (this.divName != null) {
- // refresh the DIV object
- if (this.use_gebi) {
- document.getElementById(this.divName).innerHTML = this.contents;
- }
- else if (this.use_css) {
- document.all[this.divName].innerHTML = this.contents;
- }
- else if (this.use_layers) {
- var d = document.layers[this.divName];
- d.document.open();
- d.document.writeln(this.contents);
- d.document.close();
- }
- }
- else {
- if (this.popupWindow != null && !this.popupWindow.closed) {
- if (this.url!="") {
- this.popupWindow.location.href=this.url;
- }
- else {
- this.popupWindow.document.open();
- this.popupWindow.document.writeln(this.contents);
- this.popupWindow.document.close();
- }
- this.popupWindow.focus();
- }
- }
- }
-// Position and show the popup, relative to an anchor object
-function PopupWindow_showPopup(anchorname) {
- this.getXYPosition(anchorname);
- this.x += this.offsetX;
- this.y += this.offsetY;
- if (!this.populated && (this.contents != "")) {
- this.populated = true;
- this.refresh();
- }
- if (this.divName != null) {
- // Show the DIV object
- if (this.use_gebi) {
- document.getElementById(this.divName).style.left = this.x + "px";
- document.getElementById(this.divName).style.top = this.y;
- document.getElementById(this.divName).style.visibility = "visible";
- }
- else if (this.use_css) {
- document.all[this.divName].style.left = this.x;
- document.all[this.divName].style.top = this.y;
- document.all[this.divName].style.visibility = "visible";
- }
- else if (this.use_layers) {
- document.layers[this.divName].left = this.x;
- document.layers[this.divName].top = this.y;
- document.layers[this.divName].visibility = "visible";
- }
- }
- else {
- if (this.popupWindow == null || this.popupWindow.closed) {
- // If the popup window will go off-screen, move it so it doesn't
- if (this.x<0) { this.x=0; }
- if (this.y<0) { this.y=0; }
- if (screen && screen.availHeight) {
- if ((this.y + this.height) > screen.availHeight) {
- this.y = screen.availHeight - this.height;
- }
- }
- if (screen && screen.availWidth) {
- if ((this.x + this.width) > screen.availWidth) {
- this.x = screen.availWidth - this.width;
- }
- }
- var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
- this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
- }
- this.refresh();
- }
- }
-// Hide the popup
-function PopupWindow_hidePopup() {
- if (this.divName != null) {
- if (this.use_gebi) {
- document.getElementById(this.divName).style.visibility = "hidden";
- }
- else if (this.use_css) {
- document.all[this.divName].style.visibility = "hidden";
- }
- else if (this.use_layers) {
- document.layers[this.divName].visibility = "hidden";
- }
- }
- else {
- if (this.popupWindow && !this.popupWindow.closed) {
- this.popupWindow.close();
- this.popupWindow = null;
- }
- }
- }
-// Pass an event and return whether or not it was the popup DIV that was clicked
-function PopupWindow_isClicked(e) {
- if (this.divName != null) {
- if (this.use_layers) {
- var clickX = e.pageX;
- var clickY = e.pageY;
- var t = document.layers[this.divName];
- if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
- return true;
- }
- else { return false; }
- }
- else if (document.all) { // Need to hard-code this to trap IE for error-handling
- var t = window.event.srcElement;
- while (t.parentElement != null) {
- if (t.id==this.divName) {
- return true;
- }
- t = t.parentElement;
- }
- return false;
- }
- else if (this.use_gebi && e) {
- var t = e.originalTarget;
- while (t.parentNode != null) {
- if (t.id==this.divName) {
- return true;
- }
- t = t.parentNode;
- }
- return false;
- }
- return false;
- }
- return false;
- }
-
-// Check an onMouseDown event to see if we should hide
-function PopupWindow_hideIfNotClicked(e) {
- if (this.autoHideEnabled && !this.isClicked(e)) {
- this.hidePopup();
- }
- }
-// Call this to make the DIV disable automatically when mouse is clicked outside it
-function PopupWindow_autoHide() {
- this.autoHideEnabled = true;
- }
-// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
-function PopupWindow_hidePopupWindows(e) {
- for (var i=0; i<popupWindowObjects.length; i++) {
- if (popupWindowObjects[i] != null) {
- var p = popupWindowObjects[i];
- p.hideIfNotClicked(e);
- }
- }
- }
-// Run this immediately to attach the event listener
-function PopupWindow_attachListener() {
- if (document.layers) {
- document.captureEvents(Event.MOUSEUP);
- }
- window.popupWindowOldEventListener = document.onmouseup;
- if (window.popupWindowOldEventListener != null) {
- document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
- }
- else {
- document.onmouseup = PopupWindow_hidePopupWindows;
- }
- }
-// CONSTRUCTOR for the PopupWindow object
-// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
-function PopupWindow() {
- if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
- if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
- if (!window.listenerAttached) {
- window.listenerAttached = true;
- PopupWindow_attachListener();
- }
- this.index = popupWindowIndex++;
- popupWindowObjects[this.index] = this;
- this.divName = null;
- this.popupWindow = null;
- this.width=0;
- this.height=0;
- this.populated = false;
- this.visible = false;
- this.autoHideEnabled = false;
-
- this.contents = "";
- this.url="";
- this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
- if (arguments.length>0) {
- this.type="DIV";
- this.divName = arguments[0];
- }
- else {
- this.type="WINDOW";
- }
- this.use_gebi = false;
- this.use_css = false;
- this.use_layers = false;
- if (document.getElementById) { this.use_gebi = true; }
- else if (document.all) { this.use_css = true; }
- else if (document.layers) { this.use_layers = true; }
- else { this.type = "WINDOW"; }
- this.offsetX = 0;
- this.offsetY = 0;
- // Method mappings
- this.getXYPosition = PopupWindow_getXYPosition;
- this.populate = PopupWindow_populate;
- this.setUrl = PopupWindow_setUrl;
- this.setWindowProperties = PopupWindow_setWindowProperties;
- this.refresh = PopupWindow_refresh;
- this.showPopup = PopupWindow_showPopup;
- this.hidePopup = PopupWindow_hidePopup;
- this.setSize = PopupWindow_setSize;
- this.isClicked = PopupWindow_isClicked;
- this.autoHide = PopupWindow_autoHide;
- this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
- }
-
-/* SOURCE FILE: ColorPicker2.js */
-
-/*
-Last modified: 02/24/2003
-
-DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
-form. It uses a color "swatch" to display the standard 216-color web-safe
-palette. The user can then click on a color to select it.
-
-COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js.
-Only the latest DHTML-capable browsers will show the color and hex values
-at the bottom as your mouse goes over them.
-
-USAGE:
-// Create a new ColorPicker object using DHTML popup
-var cp = new ColorPicker();
-
-// Create a new ColorPicker object using Window Popup
-var cp = new ColorPicker('window');
-
-// Add a link in your page to trigger the popup. For example:
-<A HREF="#" onClick="cp.show('pick');return false;" NAME="pick" ID="pick">Pick</A>
-
-// Or use the built-in "select" function to do the dirty work for you:
-<A HREF="#" onClick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A>
-
-// If using DHTML popup, write out the required DIV tag near the bottom
-// of your page.
-<SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>
-
-// Write the 'pickColor' function that will be called when the user clicks
-// a color and do something with the value. This is only required if you
-// want to do something other than simply populate a form field, which is
-// what the 'select' function will give you.
-function pickColor(color) {
- field.value = color;
- }
-
-NOTES:
-1) Requires the functions in AnchorPosition.js and PopupWindow.js
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the
- same. For example:
- <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the
- anchor tag correctly. Do not do <A></A> with no space.
-
-4) When a ColorPicker object is created, a handler for 'onmouseup' is
- attached to any event handler you may have already defined. Do NOT define
- an event handler for 'onmouseup' after you define a ColorPicker object or
- the color picker will not hide itself correctly.
-*/
-ColorPicker_targetInput = null;
-function ColorPicker_writeDiv() {
- document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>");
- }
-
-function ColorPicker_show(anchorname) {
- this.showPopup(anchorname);
- }
-
-function ColorPicker_pickColor(color,obj) {
- obj.hidePopup();
- pickColor(color);
- }
-
-// A Default "pickColor" function to accept the color passed back from popup.
-// User can over-ride this with their own function.
-function pickColor(color) {
- if (ColorPicker_targetInput==null) {
- alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");
- return;
- }
- ColorPicker_targetInput.value = color;
- }
-
-// This function is the easiest way to popup the window, select a color, and
-// have the value populate a form field, which is what most people want to do.
-function ColorPicker_select(inputobj,linkname) {
- if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") {
- alert("colorpicker.select: Input object passed is not a valid form input object");
- window.ColorPicker_targetInput=null;
- return;
- }
- window.ColorPicker_targetInput = inputobj;
- this.show(linkname);
- }
-
-// This function runs when you move your mouse over a color block, if you have a newer browser
-function ColorPicker_highlightColor(c) {
- var thedoc = (arguments.length>1)?arguments[1]:window.document;
- var d = thedoc.getElementById("colorPickerSelectedColor");
- d.style.backgroundColor = c;
- d = thedoc.getElementById("colorPickerSelectedColorValue");
- d.innerHTML = c;
- }
-
-function ColorPicker() {
- var windowMode = false;
- // Create a new PopupWindow object
- if (arguments.length==0) {
- var divname = "colorPickerDiv";
- }
- else if (arguments[0] == "window") {
- var divname = '';
- windowMode = true;
- }
- else {
- var divname = arguments[0];
- }
-
- if (divname != "") {
- var cp = new PopupWindow(divname);
- }
- else {
- var cp = new PopupWindow();
- cp.setSize(225,250);
- }
-
- // Object variables
- cp.currentValue = "#FFFFFF";
-
- // Method Mappings
- cp.writeDiv = ColorPicker_writeDiv;
- cp.highlightColor = ColorPicker_highlightColor;
- cp.show = ColorPicker_show;
- cp.select = ColorPicker_select;
-
- // Code to populate color picker window
- var colors = new Array( "#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099",
- "#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099",
- "#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099",
- "#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF",
- "#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F",
- "#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000",
-
- "#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399",
- "#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399",
- "#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399",
- "#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF",
- "#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F",
- "#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00",
-
- "#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699",
- "#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699",
- "#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699",
- "#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F",
- "#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F",
- "#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F",
-
- "#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999",
- "#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999",
- "#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999",
- "#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF",
- "#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F",
- "#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000",
-
- "#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99",
- "#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99",
- "#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99",
- "#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF",
- "#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F",
- "#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00",
-
- "#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99",
- "#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99",
- "#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99",
- "#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F",
- "#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F",
- "#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F",
-
- "#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666",
- "#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000",
- "#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000",
- "#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999",
- "#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF",
- "#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF",
-
- "#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66",
- "#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00",
- "#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000",
- "#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099",
- "#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF",
- "#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF",
-
- "#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF",
- "#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC",
- "#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000",
- "#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900",
- "#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33",
- "#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF",
-
- "#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF",
- "#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF",
- "#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F",
- "#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F",
- "#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F",
- "#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000");
- var total = colors.length;
- var width = 72;
- var cp_contents = "";
- var windowRef = (windowMode)?"window.opener.":"";
- if (windowMode) {
- cp_contents += "<html><head><title>Select Color</title></head>";
- cp_contents += "<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>";
- }
- cp_contents += "<table style='border: none;' cellspacing=0 cellpadding=0>";
- var use_highlight = (document.getElementById || document.all)?true:false;
- for (var i=0; i<total; i++) {
- if ((i % width) == 0) { cp_contents += "<tr>"; }
- if (use_highlight) { var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"'; }
- else { mo = ""; }
- cp_contents += '<td style="background-color: '+colors[i]+';"><a href="javascript:void()" onclick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+'>&nbsp;</a></td>';
- if ( ((i+1)>=total) || (((i+1) % width) == 0)) {
- cp_contents += "</tr>";
- }
- }
- // If the browser supports dynamically changing TD cells, add the fancy stuff
- if (document.getElementById) {
- var width1 = Math.floor(width/2);
- var width2 = width = width1;
- cp_contents += "<tr><td colspan='"+width1+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+width2+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>";
- }
- cp_contents += "</table>";
- if (windowMode) {
- cp_contents += "</span></body></html>";
- }
- // end populate code
-
- // Write the contents to the popup object
- cp.populate(cp_contents+"\n");
- // Move the table down a bit so you can see it
- cp.offsetY = 25;
- cp.autoHide();
- return cp;
- }
diff --git a/wp-includes/js/colorpicker.min.js b/wp-includes/js/colorpicker.min.js
deleted file mode 100644
index acd88a3397..0000000000
--- a/wp-includes/js/colorpicker.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function getAnchorPosition(b){var e=false;var k=new Object();var j=0,g=0;var d=false,f=false,h=false;if(document.getElementById){d=true}else{if(document.all){f=true}else{if(document.layers){h=true}}}if(d&&document.all){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var a=document.getElementById(b);j=AnchorPosition_getPageOffsetLeft(a);g=AnchorPosition_getPageOffsetTop(a)}else{if(f){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(h){var l=0;for(var c=0;c<document.anchors.length;c++){if(document.anchors[c].name==b){l=1;break}}if(l==0){k.x=0;k.y=0;return k}j=document.anchors[c].x;g=document.anchors[c].y}else{k.x=0;k.y=0;return k}}}}k.x=j;k.y=g;return k}function getAnchorWindowPosition(b){var c=getAnchorPosition(b);var a=0;var d=0;if(document.getElementById){if(isNaN(window.screenX)){a=c.x-document.body.scrollLeft+window.screenLeft;d=c.y-document.body.scrollTop+window.screenTop}else{a=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){a=c.x-document.body.scrollLeft+window.screenLeft;d=c.y-document.body.scrollTop+window.screenTop}else{if(document.layers){a=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}c.x=a;c.y=d;return c}function AnchorPosition_getPageOffsetLeft(b){var a=b.offsetLeft;while((b=b.offsetParent)!=null){a+=b.offsetLeft}return a}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(a){var b=a.offsetTop;while((a=a.offsetParent)!=null){b+=a.offsetTop}return b}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}function PopupWindow_getXYPosition(a){var b;if(this.type=="WINDOW"){b=getAnchorWindowPosition(a)}else{b=getAnchorPosition(a)}this.x=b.x;this.y=b.y}function PopupWindow_setSize(b,a){this.width=b;this.height=a}function PopupWindow_populate(a){this.contents=a;this.populated=false}function PopupWindow_setUrl(a){this.url=a}function PopupWindow_setWindowProperties(a){this.windowProperties=a}function PopupWindow_refresh(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).innerHTML=this.contents}else{if(this.use_css){document.all[this.divName].innerHTML=this.contents}else{if(this.use_layers){var a=document.layers[this.divName];a.document.open();a.document.writeln(this.contents);a.document.close()}}}}else{if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close()}this.popupWindow.focus()}}}function PopupWindow_showPopup(a){this.getXYPosition(a);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&(this.contents!="")){this.populated=true;this.refresh()}if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.left=this.x+"px";document.getElementById(this.divName).style.top=this.y;document.getElementById(this.divName).style.visibility="visible"}else{if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0){this.x=0}if(this.y<0){this.y=0}if(screen&&screen.availHeight){if((this.y+this.height)>screen.availHeight){this.y=screen.availHeight-this.height}}if(screen&&screen.availWidth){if((this.x+this.width)>screen.availWidth){this.x=screen.availWidth-this.width}}var b=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);this.popupWindow=window.open(b?"":"about:blank","window_"+a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}function PopupWindow_hidePopup(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.visibility="hidden"}else{if(this.use_css){document.all[this.divName].style.visibility="hidden"}else{if(this.use_layers){document.layers[this.divName].visibility="hidden"}}}}else{if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}}function PopupWindow_isClicked(c){if(this.divName!=null){if(this.use_layers){var d=c.pageX;var b=c.pageY;var a=document.layers[this.divName];if((d>a.left)&&(d<a.left+a.clip.width)&&(b>a.top)&&(b<a.top+a.clip.height)){return true}else{return false}}else{if(document.all){var a=window.event.srcElement;while(a.parentElement!=null){if(a.id==this.divName){return true}a=a.parentElement}return false}else{if(this.use_gebi&&c){var a=c.originalTarget;while(a.parentNode!=null){if(a.id==this.divName){return true}a=a.parentNode}return false}}}return false}return false}function PopupWindow_hideIfNotClicked(a){if(this.autoHideEnabled&&!this.isClicked(a)){this.hidePopup()}}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(c){for(var a=0;a<popupWindowObjects.length;a++){if(popupWindowObjects[a]!=null){var b=popupWindowObjects[a];b.hideIfNotClicked(c)}}}function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP)}window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null){document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();")}else{document.onmouseup=PopupWindow_hidePopupWindows}}function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex=0}if(!window.popupWindowObjects){window.popupWindowObjects=new Array()}if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else{this.type="WINDOW"}this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById){this.use_gebi=true}else{if(document.all){this.use_css=true}else{if(document.layers){this.use_layers=true}else{this.type="WINDOW"}}}this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}ColorPicker_targetInput=null;function ColorPicker_writeDiv(){document.writeln('<DIV ID="colorPickerDiv" STYLE="position:absolute;visibility:hidden;"> </DIV>')}function ColorPicker_show(a){this.showPopup(a)}function ColorPicker_pickColor(a,b){b.hidePopup();pickColor(a)}function pickColor(a){if(ColorPicker_targetInput==null){alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");return}ColorPicker_targetInput.value=a}function ColorPicker_select(b,a){if(b.type!="text"&&b.type!="hidden"&&b.type!="textarea"){alert("colorpicker.select: Input object passed is not a valid form input object");window.ColorPicker_targetInput=null;return}window.ColorPicker_targetInput=b;this.show(a)}function ColorPicker_highlightColor(e){var a=(arguments.length>1)?arguments[1]:window.document;var b=a.getElementById("colorPickerSelectedColor");b.style.backgroundColor=e;b=a.getElementById("colorPickerSelectedColorValue");b.innerHTML=e}function ColorPicker(){var g=false;if(arguments.length==0){var e="colorPickerDiv"}else{if(arguments[0]=="window"){var e="";g=true}else{var e=arguments[0]}}if(e!=""){var m=new PopupWindow(e)}else{var m=new PopupWindow();m.setSize(225,250)}m.currentValue="#FFFFFF";m.writeDiv=ColorPicker_writeDiv;m.highlightColor=ColorPicker_highlightColor;m.show=ColorPicker_show;m.select=ColorPicker_select;var a=new Array("#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF","#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F","#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000","#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF","#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F","#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00","#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F","#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F","#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F","#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF","#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F","#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000","#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF","#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F","#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00","#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F","#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F","#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F","#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666","#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999","#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF","#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66","#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00","#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000","#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099","#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF","#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF","#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC","#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000","#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900","#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33","#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF","#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF","#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F","#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F","#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F","#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000");var n=a.length;var c=72;var k="";var j=(g)?"window.opener.":"";if(g){k+="<html><head><title>Select Color</title></head>";k+="<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>"}k+="<table style='border: none;' cellspacing=0 cellpadding=0>";var l=(document.getElementById||document.all)?true:false;for(var h=0;h<n;h++){if((h%c)==0){k+="<tr>"}if(l){var f='onMouseOver="'+j+"ColorPicker_highlightColor('"+a[h]+"',window.document)\""}else{f=""}k+='<td style="background-color: '+a[h]+';"><a href="javascript:void()" onclick="'+j+"ColorPicker_pickColor('"+a[h]+"',"+j+"window.popupWindowObjects["+m.index+']);return false;" '+f+">&nbsp;</a></td>";if(((h+1)>=n)||(((h+1)%c)==0)){k+="</tr>"}}if(document.getElementById){var d=Math.floor(c/2);var b=c=d;k+="<tr><td colspan='"+d+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+b+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>"}k+="</table>";if(g){k+="</span></body></html>"}m.populate(k+"\n");m.offsetY=25;m.autoHide();return m}; \ No newline at end of file
diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js
deleted file mode 100644
index 20154253a4..0000000000
--- a/wp-includes/js/comment-reply.js
+++ /dev/null
@@ -1,48 +0,0 @@
-
-addComment = {
- moveForm : function(commId, parentId, respondId, postId) {
- var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID');
-
- if ( ! comm || ! respond || ! cancel || ! parent )
- return;
-
- t.respondId = respondId;
- postId = postId || false;
-
- if ( ! t.I('wp-temp-form-div') ) {
- div = document.createElement('div');
- div.id = 'wp-temp-form-div';
- div.style.display = 'none';
- respond.parentNode.insertBefore(div, respond);
- }
-
- comm.parentNode.insertBefore(respond, comm.nextSibling);
- if ( post && postId )
- post.value = postId;
- parent.value = parentId;
- cancel.style.display = '';
-
- cancel.onclick = function() {
- var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId);
-
- if ( ! temp || ! respond )
- return;
-
- t.I('comment_parent').value = '0';
- temp.parentNode.insertBefore(respond, temp);
- temp.parentNode.removeChild(temp);
- this.style.display = 'none';
- this.onclick = null;
- return false;
- }
-
- try { t.I('comment').focus(); }
- catch(e) {}
-
- return false;
- },
-
- I : function(e) {
- return document.getElementById(e);
- }
-}
diff --git a/wp-includes/js/comment-reply.min.js b/wp-includes/js/comment-reply.min.js
deleted file mode 100644
index 524f2ede92..0000000000
--- a/wp-includes/js/comment-reply.min.js
+++ /dev/null
@@ -1 +0,0 @@
-addComment={moveForm:function(d,f,i,c){var m=this,a,h=m.I(d),b=m.I(i),l=m.I("cancel-comment-reply-link"),j=m.I("comment_parent"),k=m.I("comment_post_ID");if(!h||!b||!l||!j){return}m.respondId=i;c=c||false;if(!m.I("wp-temp-form-div")){a=document.createElement("div");a.id="wp-temp-form-div";a.style.display="none";b.parentNode.insertBefore(a,b)}h.parentNode.insertBefore(b,h.nextSibling);if(k&&c){k.value=c}j.value=f;l.style.display="";l.onclick=function(){var n=addComment,e=n.I("wp-temp-form-div"),o=n.I(n.respondId);if(!e||!o){return}n.I("comment_parent").value="0";e.parentNode.insertBefore(o,e);e.parentNode.removeChild(e);this.style.display="none";this.onclick=null;return false};try{m.I("comment").focus()}catch(g){}return false},I:function(a){return document.getElementById(a)}}; \ No newline at end of file
diff --git a/wp-includes/js/crop/cropper.css b/wp-includes/js/crop/cropper.css
deleted file mode 100644
index b2799c49a5..0000000000
--- a/wp-includes/js/crop/cropper.css
+++ /dev/null
@@ -1,165 +0,0 @@
-.imgCrop_wrap {
- /* width: 500px; @done_in_js */
- /* height: 375px; @done_in_js */
- position: relative;
- cursor: crosshair;
-}
-
-/* an extra classname is applied for Opera < 9.0 to fix its lack of opacity support */
-.imgCrop_wrap.opera8 .imgCrop_overlay,
-.imgCrop_wrap.opera8 .imgCrop_clickArea {
- background-color: transparent;
-}
-
-/* fix for IE displaying all boxes at line-height by default, although they are still 1 pixel high until we combine them with the pointless span */
-.imgCrop_wrap,
-.imgCrop_wrap * {
- font-size: 0;
-}
-
-.imgCrop_overlay {
- background-color: #000;
- opacity: 0.5;
- filter:alpha(opacity=50);
- position: absolute;
- width: 100%;
- height: 100%;
-}
-
-.imgCrop_selArea {
- position: absolute;
- /* @done_in_js
- top: 20px;
- left: 20px;
- width: 200px;
- height: 200px;
- background: transparent url(castle.jpg) no-repeat -210px -110px;
- */
- cursor: move;
- z-index: 2;
-}
-
-/* clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */
-.imgCrop_clickArea {
- width: 100%;
- height: 100%;
- background-color: #FFF;
- opacity: 0.01;
- filter:alpha(opacity=01);
-}
-
-.imgCrop_marqueeHoriz {
- position: absolute;
- width: 100%;
- height: 1px;
- background: transparent url(marqueeHoriz.gif) repeat-x 0 0;
- z-index: 3;
-}
-
-.imgCrop_marqueeVert {
- position: absolute;
- height: 100%;
- width: 1px;
- background: transparent url(marqueeVert.gif) repeat-y 0 0;
- z-index: 3;
-}
-
-.imgCrop_marqueeNorth { top: 0; left: 0; }
-.imgCrop_marqueeEast { top: 0; right: 0; }
-.imgCrop_marqueeSouth { bottom: 0px; left: 0; }
-.imgCrop_marqueeWest { top: 0; left: 0; }
-
-
-.imgCrop_handle {
- position: absolute;
- border: 1px solid #333;
- width: 6px;
- height: 6px;
- background: #FFF;
- opacity: 0.5;
- filter:alpha(opacity=50);
- z-index: 4;
-}
-
-/* fix IE 5 box model */
-* html .imgCrop_handle {
- width: 8px;
- height: 8px;
- wid\th: 6px;
- hei\ght: 6px;
-}
-
-.imgCrop_handleN {
- top: -3px;
- left: 0;
- /* margin-left: 49%; @done_in_js */
- cursor: n-resize;
-}
-
-.imgCrop_handleNE {
- top: -3px;
- right: -3px;
- cursor: ne-resize;
-}
-
-.imgCrop_handleE {
- top: 0;
- right: -3px;
- /* margin-top: 49%; @done_in_js */
- cursor: e-resize;
-}
-
-.imgCrop_handleSE {
- right: -3px;
- bottom: -3px;
- cursor: se-resize;
-}
-
-.imgCrop_handleS {
- right: 0;
- bottom: -3px;
- /* margin-right: 49%; @done_in_js */
- cursor: s-resize;
-}
-
-.imgCrop_handleSW {
- left: -3px;
- bottom: -3px;
- cursor: sw-resize;
-}
-
-.imgCrop_handleW {
- top: 0;
- left: -3px;
- /* margin-top: 49%; @done_in_js */
- cursor: e-resize;
-}
-
-.imgCrop_handleNW {
- top: -3px;
- left: -3px;
- cursor: nw-resize;
-}
-
-/**
- * Create an area to click & drag around on as the default browser behaviour is to let you drag the image
- */
-.imgCrop_dragArea {
- width: 100%;
- height: 100%;
- z-index: 200;
- position: absolute;
- top: 0;
- left: 0;
-}
-
-.imgCrop_previewWrap {
- /* width: 200px; @done_in_js */
- /* height: 200px; @done_in_js */
- overflow: hidden;
- position: relative;
-}
-
-.imgCrop_previewWrap img {
- position: absolute;
-} \ No newline at end of file
diff --git a/wp-includes/js/crop/cropper.js b/wp-includes/js/crop/cropper.js
deleted file mode 100644
index d0cb8e4cca..0000000000
--- a/wp-includes/js/crop/cropper.js
+++ /dev/null
@@ -1,516 +0,0 @@
-/**
- * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * http://www.opensource.org/licenses/bsd-license.php
- *
- * See scriptaculous.js for full scriptaculous licence
- */
-
-var CropDraggable=Class.create();
-Object.extend(Object.extend(CropDraggable.prototype,Draggable.prototype),{initialize:function(_1){
-this.options=Object.extend({drawMethod:function(){
-}},arguments[1]||{});
-this.element=$(_1);
-this.handle=this.element;
-this.delta=this.currentDelta();
-this.dragging=false;
-this.eventMouseDown=this.initDrag.bindAsEventListener(this);
-Event.observe(this.handle,"mousedown",this.eventMouseDown);
-Draggables.register(this);
-},draw:function(_2){
-var _3=Position.cumulativeOffset(this.element);
-var d=this.currentDelta();
-_3[0]-=d[0];
-_3[1]-=d[1];
-var p=[0,1].map(function(i){
-return (_2[i]-_3[i]-this.offset[i]);
-}.bind(this));
-this.options.drawMethod(p);
-}});
-var Cropper={};
-Cropper.Img=Class.create();
-Cropper.Img.prototype={initialize:function(_7,_8){
-this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
-if(this.options.minWidth>0&&this.options.minHeight>0){
-this.options.ratioDim.x=this.options.minWidth;
-this.options.ratioDim.y=this.options.minHeight;
-}
-this.img=$(_7);
-this.clickCoords={x:0,y:0};
-this.dragging=false;
-this.resizing=false;
-this.isWebKit=/Konqueror|Safari|KHTML/.test(navigator.userAgent);
-this.isIE=/MSIE/.test(navigator.userAgent);
-this.isOpera8=/Opera\s[1-8]/.test(navigator.userAgent);
-this.ratioX=0;
-this.ratioY=0;
-this.attached=false;
-$A(document.getElementsByTagName("script")).each(function(s){
-if(s.src.match(/cropper\.js/)){
-var _a=s.src.replace(/cropper\.js(.*)?/,"");
-var _b=document.createElement("link");
-_b.rel="stylesheet";
-_b.type="text/css";
-_b.href=_a+"cropper.css";
-_b.media="screen";
-document.getElementsByTagName("head")[0].appendChild(_b);
-}
-});
-if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0){
-var _c=this.getGCD(this.options.ratioDim.x,this.options.ratioDim.y);
-this.ratioX=this.options.ratioDim.x/_c;
-this.ratioY=this.options.ratioDim.y/_c;
-}
-this.subInitialize();
-if(this.img.complete||this.isWebKit){
-this.onLoad();
-}else{
-Event.observe(this.img,"load",this.onLoad.bindAsEventListener(this));
-}
-},getGCD:function(a,b){return 1;
-if(b==0){
-return a;
-}
-return this.getGCD(b,a%b);
-},onLoad:function(){
-var _f="imgCrop_";
-var _10=this.img.parentNode;
-var _11="";
-if(this.isOpera8){
-_11=" opera8";
-}
-this.imgWrap=Builder.node("div",{"class":_f+"wrap"+_11});
-if(this.isIE){
-this.north=Builder.node("div",{"class":_f+"overlay "+_f+"north"},[Builder.node("span")]);
-this.east=Builder.node("div",{"class":_f+"overlay "+_f+"east"},[Builder.node("span")]);
-this.south=Builder.node("div",{"class":_f+"overlay "+_f+"south"},[Builder.node("span")]);
-this.west=Builder.node("div",{"class":_f+"overlay "+_f+"west"},[Builder.node("span")]);
-var _12=[this.north,this.east,this.south,this.west];
-}else{
-this.overlay=Builder.node("div",{"class":_f+"overlay"});
-var _12=[this.overlay];
-}
-this.dragArea=Builder.node("div",{"class":_f+"dragArea"},_12);
-this.handleN=Builder.node("div",{"class":_f+"handle "+_f+"handleN"});
-this.handleNE=Builder.node("div",{"class":_f+"handle "+_f+"handleNE"});
-this.handleE=Builder.node("div",{"class":_f+"handle "+_f+"handleE"});
-this.handleSE=Builder.node("div",{"class":_f+"handle "+_f+"handleSE"});
-this.handleS=Builder.node("div",{"class":_f+"handle "+_f+"handleS"});
-this.handleSW=Builder.node("div",{"class":_f+"handle "+_f+"handleSW"});
-this.handleW=Builder.node("div",{"class":_f+"handle "+_f+"handleW"});
-this.handleNW=Builder.node("div",{"class":_f+"handle "+_f+"handleNW"});
-this.selArea=Builder.node("div",{"class":_f+"selArea"},[Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeNorth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeEast"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeSouth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeWest"},[Builder.node("span")]),this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW,Builder.node("div",{"class":_f+"clickArea"})]);
-Element.setStyle($(this.selArea),{backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"});
-this.imgWrap.appendChild(this.img);
-this.imgWrap.appendChild(this.dragArea);
-this.dragArea.appendChild(this.selArea);
-this.dragArea.appendChild(Builder.node("div",{"class":_f+"clickArea"}));
-_10.appendChild(this.imgWrap);
-Event.observe(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this));
-Event.observe(document,"mousemove",this.onDrag.bindAsEventListener(this));
-Event.observe(document,"mouseup",this.endCrop.bindAsEventListener(this));
-var _13=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
-for(var i=0;i<_13.length;i++){
-Event.observe(_13[i],"mousedown",this.startResize.bindAsEventListener(this));
-}
-if(this.options.captureKeys){
-Event.observe(document,"keydown",this.handleKeys.bindAsEventListener(this));
-}
-new CropDraggable(this.selArea,{drawMethod:this.moveArea.bindAsEventListener(this)});
-this.setParams();
-},setParams:function(){
-this.imgW=this.img.width;
-this.imgH=this.img.height;
-if(!this.isIE){
-Element.setStyle($(this.overlay),{width:this.imgW+"px",height:this.imgH+"px"});
-Element.hide($(this.overlay));
-Element.setStyle($(this.selArea),{backgroundImage:"url("+this.img.src+")"});
-}else{
-Element.setStyle($(this.north),{height:0});
-Element.setStyle($(this.east),{width:0,height:0});
-Element.setStyle($(this.south),{height:0});
-Element.setStyle($(this.west),{width:0,height:0});
-}
-Element.setStyle($(this.imgWrap),{"width":this.imgW+"px","height":this.imgH+"px"});
-Element.hide($(this.selArea));
-var _15=Position.positionedOffset(this.imgWrap);
-this.wrapOffsets={"top":_15[1],"left":_15[0]};
-var _16={x1:0,y1:0,x2:0,y2:0};
-this.setAreaCoords(_16);
-if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0&&this.options.displayOnInit){
-_16.x1=Math.ceil((this.imgW-this.options.ratioDim.x)/2);
-_16.y1=Math.ceil((this.imgH-this.options.ratioDim.y)/2);
-_16.x2=_16.x1+this.options.ratioDim.x;
-_16.y2=_16.y1+this.options.ratioDim.y;
-Element.show(this.selArea);
-this.drawArea();
-this.endCrop();
-}
-this.attached=true;
-},remove:function(){
-this.attached=false;
-this.imgWrap.parentNode.insertBefore(this.img,this.imgWrap);
-this.imgWrap.parentNode.removeChild(this.imgWrap);
-Event.stopObserving(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this));
-Event.stopObserving(document,"mousemove",this.onDrag.bindAsEventListener(this));
-Event.stopObserving(document,"mouseup",this.endCrop.bindAsEventListener(this));
-var _17=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
-for(var i=0;i<_17.length;i++){
-Event.stopObserving(_17[i],"mousedown",this.startResize.bindAsEventListener(this));
-}
-if(this.options.captureKeys){
-Event.stopObserving(document,"keydown",this.handleKeys.bindAsEventListener(this));
-}
-},reset:function(){
-if(!this.attached){
-this.onLoad();
-}else{
-this.setParams();
-}
-this.endCrop();
-},handleKeys:function(e){
-var dir={x:0,y:0};
-if(!this.dragging){
-switch(e.keyCode){
-case (37):
-dir.x=-1;
-break;
-case (38):
-dir.y=-1;
-break;
-case (39):
-dir.x=1;
-break;
-case (40):
-dir.y=1;
-break;
-}
-if(dir.x!=0||dir.y!=0){
-if(e.shiftKey){
-dir.x*=10;
-dir.y*=10;
-}
-this.moveArea([this.areaCoords.x1+dir.x,this.areaCoords.y1+dir.y]);
-Event.stop(e);
-}
-}
-},calcW:function(){
-return (this.areaCoords.x2-this.areaCoords.x1);
-},calcH:function(){
-return (this.areaCoords.y2-this.areaCoords.y1);
-},moveArea:function(_1b){
-this.setAreaCoords({x1:_1b[0],y1:_1b[1],x2:_1b[0]+this.calcW(),y2:_1b[1]+this.calcH()},true);
-this.drawArea();
-},cloneCoords:function(_1c){
-return {x1:_1c.x1,y1:_1c.y1,x2:_1c.x2,y2:_1c.y2};
-},setAreaCoords:function(_1d,_1e,_1f,_20,_21){
-var _22=typeof _1e!="undefined"?_1e:false;
-var _23=typeof _1f!="undefined"?_1f:false;
-if(_1e){
-var _24=_1d.x2-_1d.x1;
-var _25=_1d.y2-_1d.y1;
-if(_1d.x1<0){
-_1d.x1=0;
-_1d.x2=_24;
-}
-if(_1d.y1<0){
-_1d.y1=0;
-_1d.y2=_25;
-}
-if(_1d.x2>this.imgW){
-_1d.x2=this.imgW;
-_1d.x1=this.imgW-_24;
-}
-if(_1d.y2>this.imgH){
-_1d.y2=this.imgH;
-_1d.y1=this.imgH-_25;
-}
-}else{
-if(_1d.x1<0){
-_1d.x1=0;
-}
-if(_1d.y1<0){
-_1d.y1=0;
-}
-if(_1d.x2>this.imgW){
-_1d.x2=this.imgW;
-}
-if(_1d.y2>this.imgH){
-_1d.y2=this.imgH;
-}
-if(typeof (_20)!="undefined"){
-if(this.ratioX>0){
-this.applyRatio(_1d,{x:this.ratioX,y:this.ratioY},_20,_21);
-}else{
-if(_23){
-this.applyRatio(_1d,{x:1,y:1},_20,_21);
-}
-}
-var _26={a1:_1d.x1,a2:_1d.x2};
-var _27={a1:_1d.y1,a2:_1d.y2};
-var _28=this.options.minWidth;
-var _29=this.options.minHeight;
-if((_28==0||_29==0)&&_23){
-if(_28>0){
-_29=_28;
-}else{
-if(_29>0){
-_28=_29;
-}
-}
-}
-this.applyMinDimension(_26,_28,_20.x,{min:0,max:this.imgW});
-this.applyMinDimension(_27,_29,_20.y,{min:0,max:this.imgH});
-_1d={x1:_26.a1,y1:_27.a1,x2:_26.a2,y2:_27.a2};
-}
-}
-this.areaCoords=_1d;
-},applyMinDimension:function(_2a,_2b,_2c,_2d){
-if((_2a.a2-_2a.a1)<_2b){
-if(_2c==1){
-_2a.a2=_2a.a1+_2b;
-}else{
-_2a.a1=_2a.a2-_2b;
-}
-if(_2a.a1<_2d.min){
-_2a.a1=_2d.min;
-_2a.a2=_2b;
-}else{
-if(_2a.a2>_2d.max){
-_2a.a1=_2d.max-_2b;
-_2a.a2=_2d.max;
-}
-}
-}
-},applyRatio:function(_2e,_2f,_30,_31){
-var _32;
-if(_31=="N"||_31=="S"){
-_32=this.applyRatioToAxis({a1:_2e.y1,b1:_2e.x1,a2:_2e.y2,b2:_2e.x2},{a:_2f.y,b:_2f.x},{a:_30.y,b:_30.x},{min:0,max:this.imgW});
-_2e.x1=_32.b1;
-_2e.y1=_32.a1;
-_2e.x2=_32.b2;
-_2e.y2=_32.a2;
-}else{
-_32=this.applyRatioToAxis({a1:_2e.x1,b1:_2e.y1,a2:_2e.x2,b2:_2e.y2},{a:_2f.x,b:_2f.y},{a:_30.x,b:_30.y},{min:0,max:this.imgH});
-_2e.x1=_32.a1;
-_2e.y1=_32.b1;
-_2e.x2=_32.a2;
-_2e.y2=_32.b2;
-}
-},applyRatioToAxis:function(_33,_34,_35,_36){
-var _37=Object.extend(_33,{});
-var _38=_37.a2-_37.a1;
-var _3a=Math.floor(_38*_34.b/_34.a);
-var _3b;
-var _3c;
-var _3d=null;
-if(_35.b==1){
-_3b=_37.b1+_3a;
-if(_3b>_36.max){
-_3b=_36.max;
-_3d=_3b-_37.b1;
-}
-_37.b2=_3b;
-}else{
-_3b=_37.b2-_3a;
-if(_3b<_36.min){
-_3b=_36.min;
-_3d=_3b+_37.b2;
-}
-_37.b1=_3b;
-}
-if(_3d!=null){
-_3c=Math.floor(_3d*_34.a/_34.b);
-if(_35.a==1){
-_37.a2=_37.a1+_3c;
-}else{
-_37.a1=_37.a1=_37.a2-_3c;
-}
-}
-return _37;
-},drawArea:function(){
-if(!this.isIE){
-Element.show($(this.overlay));
-}
-var _3e=this.calcW();
-var _3f=this.calcH();
-var _40=this.areaCoords.x2;
-var _41=this.areaCoords.y2;
-var _42=this.selArea.style;
-_42.left=this.areaCoords.x1+"px";
-_42.top=this.areaCoords.y1+"px";
-_42.width=_3e+"px";
-_42.height=_3f+"px";
-var _43=Math.ceil((_3e-6)/2)+"px";
-var _44=Math.ceil((_3f-6)/2)+"px";
-this.handleN.style.left=_43;
-this.handleE.style.top=_44;
-this.handleS.style.left=_43;
-this.handleW.style.top=_44;
-if(this.isIE){
-this.north.style.height=this.areaCoords.y1+"px";
-var _45=this.east.style;
-_45.top=this.areaCoords.y1+"px";
-_45.height=_3f+"px";
-_45.left=_40+"px";
-_45.width=(this.img.width-_40)+"px";
-var _46=this.south.style;
-_46.top=_41+"px";
-_46.height=(this.img.height-_41)+"px";
-var _47=this.west.style;
-_47.top=this.areaCoords.y1+"px";
-_47.height=_3f+"px";
-_47.width=this.areaCoords.x1+"px";
-}else{
-_42.backgroundPosition="-"+this.areaCoords.x1+"px "+"-"+this.areaCoords.y1+"px";
-}
-this.subDrawArea();
-this.forceReRender();
-},forceReRender:function(){
-if(this.isIE||this.isWebKit){
-var n=document.createTextNode(" ");
-var d,el,fixEL,i;
-if(this.isIE){
-fixEl=this.selArea;
-}else{
-if(this.isWebKit){
-fixEl=document.getElementsByClassName("imgCrop_marqueeSouth",this.imgWrap)[0];
-d=Builder.node("div","");
-d.style.visibility="hidden";
-var _4a=["SE","S","SW"];
-for(i=0;i<_4a.length;i++){
-el=document.getElementsByClassName("imgCrop_handle"+_4a[i],this.selArea)[0];
-if(el.childNodes.length){
-el.removeChild(el.childNodes[0]);
-}
-el.appendChild(d);
-}
-}
-}
-fixEl.appendChild(n);
-fixEl.removeChild(n);
-}
-},startResize:function(e){
-this.startCoords=this.cloneCoords(this.areaCoords);
-this.resizing=true;
-this.resizeHandle=Element.classNames(Event.element(e)).toString().replace(/([^N|NE|E|SE|S|SW|W|NW])+/,"");
-Event.stop(e);
-},startDrag:function(e){
-Element.show(this.selArea);
-this.clickCoords=this.getCurPos(e);
-this.setAreaCoords({x1:this.clickCoords.x,y1:this.clickCoords.y,x2:this.clickCoords.x,y2:this.clickCoords.y});
-this.dragging=true;
-this.onDrag(e);
-Event.stop(e);
-},getCurPos:function(e){
-return curPos={x:Event.pointerX(e)-this.wrapOffsets.left,y:Event.pointerY(e)-this.wrapOffsets.top};
-},onDrag:function(e){
-var _4f=null;
-if(this.dragging||this.resizing){
-var _50=this.getCurPos(e);
-var _51=this.cloneCoords(this.areaCoords);
-var _52={x:1,y:1};
-}
-if(this.dragging){
-if(_50.x<this.clickCoords.x){
-_52.x=-1;
-}
-if(_50.y<this.clickCoords.y){
-_52.y=-1;
-}
-this.transformCoords(_50.x,this.clickCoords.x,_51,"x");
-this.transformCoords(_50.y,this.clickCoords.y,_51,"y");
-}else{
-if(this.resizing){
-_4f=this.resizeHandle;
-if(_4f.match(/E/)){
-this.transformCoords(_50.x,this.startCoords.x1,_51,"x");
-if(_50.x<this.startCoords.x1){
-_52.x=-1;
-}
-}else{
-if(_4f.match(/W/)){
-this.transformCoords(_50.x,this.startCoords.x2,_51,"x");
-if(_50.x<this.startCoords.x2){
-_52.x=-1;
-}
-}
-}
-if(_4f.match(/N/)){
-this.transformCoords(_50.y,this.startCoords.y2,_51,"y");
-if(_50.y<this.startCoords.y2){
-_52.y=-1;
-}
-}else{
-if(_4f.match(/S/)){
-this.transformCoords(_50.y,this.startCoords.y1,_51,"y");
-if(_50.y<this.startCoords.y1){
-_52.y=-1;
-}
-}
-}
-}
-}
-if(this.dragging||this.resizing){
-this.setAreaCoords(_51,false,e.shiftKey,_52,_4f);
-this.drawArea();
-Event.stop(e);
-}
-},transformCoords:function(_53,_54,_55,_56){
-var _57=new Array();
-if(_53<_54){
-_57[0]=_53;
-_57[1]=_54;
-}else{
-_57[0]=_54;
-_57[1]=_53;
-}
-if(_56=="x"){
-_55.x1=_57[0];
-_55.x2=_57[1];
-}else{
-_55.y1=_57[0];
-_55.y2=_57[1];
-}
-},endCrop:function(){
-this.dragging=false;
-this.resizing=false;
-this.options.onEndCrop(this.areaCoords,{width:this.calcW(),height:this.calcH()});
-},subInitialize:function(){
-},subDrawArea:function(){
-}};
-Cropper.ImgWithPreview=Class.create();
-Object.extend(Object.extend(Cropper.ImgWithPreview.prototype,Cropper.Img.prototype),{subInitialize:function(){
-this.hasPreviewImg=false;
-if(typeof (this.options.previewWrap)!="undefined"&&this.options.minWidth>0&&this.options.minHeight>0){
-this.previewWrap=$(this.options.previewWrap);
-this.previewImg=this.img.cloneNode(false);
-this.options.displayOnInit=true;
-this.hasPreviewImg=true;
-Element.addClassName(this.previewWrap,"imgCrop_previewWrap");
-Element.setStyle(this.previewWrap,{width:this.options.minWidth+"px",height:this.options.minHeight+"px"});
-this.previewWrap.appendChild(this.previewImg);
-}
-},subDrawArea:function(){
-if(this.hasPreviewImg){
-var _58=this.calcW();
-var _59=this.calcH();
-var _5a={x:this.imgW/_58,y:this.imgH/_59};
-var _5b={x:_58/this.options.minWidth,y:_59/this.options.minHeight};
-var _5c={w:Math.ceil(this.options.minWidth*_5a.x)+"px",h:Math.ceil(this.options.minHeight*_5a.y)+"px",x:"-"+Math.ceil(this.areaCoords.x1/_5b.x)+"px",y:"-"+Math.ceil(this.areaCoords.y1/_5b.y)+"px"};
-var _5d=this.previewImg.style;
-_5d.width=_5c.w;
-_5d.height=_5c.h;
-_5d.left=_5c.x;
-_5d.top=_5c.y;
-}
-}});
diff --git a/wp-includes/js/crop/marqueeHoriz.gif b/wp-includes/js/crop/marqueeHoriz.gif
deleted file mode 100644
index 685950394c..0000000000
--- a/wp-includes/js/crop/marqueeHoriz.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/crop/marqueeVert.gif b/wp-includes/js/crop/marqueeVert.gif
deleted file mode 100644
index ee55e203f8..0000000000
--- a/wp-includes/js/crop/marqueeVert.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/customize-base.js b/wp-includes/js/customize-base.js
deleted file mode 100644
index 81d37716e6..0000000000
--- a/wp-includes/js/customize-base.js
+++ /dev/null
@@ -1,585 +0,0 @@
-window.wp = window.wp || {};
-
-(function( exports, $ ){
- var api, extend, ctor, inherits,
- slice = Array.prototype.slice;
-
- /* =====================================================================
- * Micro-inheritance - thank you, backbone.js.
- * ===================================================================== */
-
- extend = function( protoProps, classProps ) {
- var child = inherits( this, protoProps, classProps );
- child.extend = this.extend;
- return child;
- };
-
- // Shared empty constructor function to aid in prototype-chain creation.
- ctor = function() {};
-
- // Helper function to correctly set up the prototype chain, for subclasses.
- // Similar to `goog.inherits`, but uses a hash of prototype properties and
- // class properties to be extended.
- inherits = function( parent, protoProps, staticProps ) {
- var child;
-
- // The constructor function for the new subclass is either defined by you
- // (the "constructor" property in your `extend` definition), or defaulted
- // by us to simply call `super()`.
- if ( protoProps && protoProps.hasOwnProperty( 'constructor' ) ) {
- child = protoProps.constructor;
- } else {
- child = function() {
- // Storing the result `super()` before returning the value
- // prevents a bug in Opera where, if the constructor returns
- // a function, Opera will reject the return value in favor of
- // the original object. This causes all sorts of trouble.
- var result = parent.apply( this, arguments );
- return result;
- };
- }
-
- // Inherit class (static) properties from parent.
- $.extend( child, parent );
-
- // Set the prototype chain to inherit from `parent`, without calling
- // `parent`'s constructor function.
- ctor.prototype = parent.prototype;
- child.prototype = new ctor();
-
- // Add prototype properties (instance properties) to the subclass,
- // if supplied.
- if ( protoProps )
- $.extend( child.prototype, protoProps );
-
- // Add static properties to the constructor function, if supplied.
- if ( staticProps )
- $.extend( child, staticProps );
-
- // Correctly set child's `prototype.constructor`.
- child.prototype.constructor = child;
-
- // Set a convenience property in case the parent's prototype is needed later.
- child.__super__ = parent.prototype;
-
- return child;
- };
-
- api = {};
-
- /* =====================================================================
- * Base class.
- * ===================================================================== */
-
- api.Class = function( applicator, argsArray, options ) {
- var magic, args = arguments;
-
- if ( applicator && argsArray && api.Class.applicator === applicator ) {
- args = argsArray;
- $.extend( this, options || {} );
- }
-
- magic = this;
- if ( this.instance ) {
- magic = function() {
- return magic.instance.apply( magic, arguments );
- };
-
- $.extend( magic, this );
- }
-
- magic.initialize.apply( magic, args );
- return magic;
- };
-
- api.Class.applicator = {};
-
- api.Class.prototype.initialize = function() {};
-
- /*
- * Checks whether a given instance extended a constructor.
- *
- * The magic surrounding the instance parameter causes the instanceof
- * keyword to return inaccurate results; it defaults to the function's
- * prototype instead of the constructor chain. Hence this function.
- */
- api.Class.prototype.extended = function( constructor ) {
- var proto = this;
-
- while ( typeof proto.constructor !== 'undefined' ) {
- if ( proto.constructor === constructor )
- return true;
- if ( typeof proto.constructor.__super__ === 'undefined' )
- return false;
- proto = proto.constructor.__super__;
- }
- return false;
- };
-
- api.Class.extend = extend;
-
- /* =====================================================================
- * Events mixin.
- * ===================================================================== */
-
- api.Events = {
- trigger: function( id ) {
- if ( this.topics && this.topics[ id ] )
- this.topics[ id ].fireWith( this, slice.call( arguments, 1 ) );
- return this;
- },
-
- bind: function( id, callback ) {
- this.topics = this.topics || {};
- this.topics[ id ] = this.topics[ id ] || $.Callbacks();
- this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) );
- return this;
- },
-
- unbind: function( id, callback ) {
- if ( this.topics && this.topics[ id ] )
- this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
- return this;
- }
- };
-
- /* =====================================================================
- * Observable values that support two-way binding.
- * ===================================================================== */
-
- api.Value = api.Class.extend({
- initialize: function( initial, options ) {
- this._value = initial; // @todo: potentially change this to a this.set() call.
- this.callbacks = $.Callbacks();
-
- $.extend( this, options || {} );
-
- this.set = $.proxy( this.set, this );
- },
-
- /*
- * Magic. Returns a function that will become the instance.
- * Set to null to prevent the instance from extending a function.
- */
- instance: function() {
- return arguments.length ? this.set.apply( this, arguments ) : this.get();
- },
-
- get: function() {
- return this._value;
- },
-
- set: function( to ) {
- var from = this._value;
-
- to = this._setter.apply( this, arguments );
- to = this.validate( to );
-
- // Bail if the sanitized value is null or unchanged.
- if ( null === to || this._value === to )
- return this;
-
- this._value = to;
-
- this.callbacks.fireWith( this, [ to, from ] );
-
- return this;
- },
-
- _setter: function( to ) {
- return to;
- },
-
- setter: function( callback ) {
- var from = this.get();
- this._setter = callback;
- // Temporarily clear value so setter can decide if it's valid.
- this._value = null;
- this.set( from );
- return this;
- },
-
- resetSetter: function() {
- this._setter = this.constructor.prototype._setter;
- this.set( this.get() );
- return this;
- },
-
- validate: function( value ) {
- return value;
- },
-
- bind: function( callback ) {
- this.callbacks.add.apply( this.callbacks, arguments );
- return this;
- },
-
- unbind: function( callback ) {
- this.callbacks.remove.apply( this.callbacks, arguments );
- return this;
- },
-
- link: function() { // values*
- var set = this.set;
- $.each( arguments, function() {
- this.bind( set );
- });
- return this;
- },
-
- unlink: function() { // values*
- var set = this.set;
- $.each( arguments, function() {
- this.unbind( set );
- });
- return this;
- },
-
- sync: function() { // values*
- var that = this;
- $.each( arguments, function() {
- that.link( this );
- this.link( that );
- });
- return this;
- },
-
- unsync: function() { // values*
- var that = this;
- $.each( arguments, function() {
- that.unlink( this );
- this.unlink( that );
- });
- return this;
- }
- });
-
- /* =====================================================================
- * A collection of observable values.
- * ===================================================================== */
-
- api.Values = api.Class.extend({
- defaultConstructor: api.Value,
-
- initialize: function( options ) {
- $.extend( this, options || {} );
-
- this._value = {};
- this._deferreds = {};
- },
-
- instance: function( id ) {
- if ( arguments.length === 1 )
- return this.value( id );
-
- return this.when.apply( this, arguments );
- },
-
- value: function( id ) {
- return this._value[ id ];
- },
-
- has: function( id ) {
- return typeof this._value[ id ] !== 'undefined';
- },
-
- add: function( id, value ) {
- if ( this.has( id ) )
- return this.value( id );
-
- this._value[ id ] = value;
- value.parent = this;
- if ( value.extended( api.Value ) )
- value.bind( this._change );
-
- this.trigger( 'add', value );
-
- if ( this._deferreds[ id ] )
- this._deferreds[ id ].resolve();
-
- return this._value[ id ];
- },
-
- create: function( id ) {
- return this.add( id, new this.defaultConstructor( api.Class.applicator, slice.call( arguments, 1 ) ) );
- },
-
- each: function( callback, context ) {
- context = typeof context === 'undefined' ? this : context;
-
- $.each( this._value, function( key, obj ) {
- callback.call( context, obj, key );
- });
- },
-
- remove: function( id ) {
- var value;
-
- if ( this.has( id ) ) {
- value = this.value( id );
- this.trigger( 'remove', value );
- if ( value.extended( api.Value ) )
- value.unbind( this._change );
- delete value.parent;
- }
-
- delete this._value[ id ];
- delete this._deferreds[ id ];
- },
-
- /**
- * Runs a callback once all requested values exist.
- *
- * when( ids*, [callback] );
- *
- * For example:
- * when( id1, id2, id3, function( value1, value2, value3 ) {} );
- *
- * @returns $.Deferred.promise();
- */
- when: function() {
- var self = this,
- ids = slice.call( arguments ),
- dfd = $.Deferred();
-
- // If the last argument is a callback, bind it to .done()
- if ( $.isFunction( ids[ ids.length - 1 ] ) )
- dfd.done( ids.pop() );
-
- $.when.apply( $, $.map( ids, function( id ) {
- if ( self.has( id ) )
- return;
-
- return self._deferreds[ id ] = self._deferreds[ id ] || $.Deferred();
- })).done( function() {
- var values = $.map( ids, function( id ) {
- return self( id );
- });
-
- // If a value is missing, we've used at least one expired deferred.
- // Call Values.when again to generate a new deferred.
- if ( values.length !== ids.length ) {
- // ids.push( callback );
- self.when.apply( self, ids ).done( function() {
- dfd.resolveWith( self, values );
- });
- return;
- }
-
- dfd.resolveWith( self, values );
- });
-
- return dfd.promise();
- },
-
- _change: function() {
- this.parent.trigger( 'change', this );
- }
- });
-
- $.extend( api.Values.prototype, api.Events );
-
- /* =====================================================================
- * An observable value that syncs with an element.
- *
- * Handles inputs, selects, and textareas by default.
- * ===================================================================== */
-
- api.ensure = function( element ) {
- return typeof element == 'string' ? $( element ) : element;
- };
-
- api.Element = api.Value.extend({
- initialize: function( element, options ) {
- var self = this,
- synchronizer = api.Element.synchronizer.html,
- type, update, refresh;
-
- this.element = api.ensure( element );
- this.events = '';
-
- if ( this.element.is('input, select, textarea') ) {
- this.events += 'change';
- synchronizer = api.Element.synchronizer.val;
-
- if ( this.element.is('input') ) {
- type = this.element.prop('type');
- if ( api.Element.synchronizer[ type ] )
- synchronizer = api.Element.synchronizer[ type ];
- if ( 'text' === type || 'password' === type )
- this.events += ' keyup';
- } else if ( this.element.is('textarea') ) {
- this.events += ' keyup';
- }
- }
-
- api.Value.prototype.initialize.call( this, null, $.extend( options || {}, synchronizer ) );
- this._value = this.get();
-
- update = this.update;
- refresh = this.refresh;
-
- this.update = function( to ) {
- if ( to !== refresh.call( self ) )
- update.apply( this, arguments );
- };
- this.refresh = function() {
- self.set( refresh.call( self ) );
- };
-
- this.bind( this.update );
- this.element.bind( this.events, this.refresh );
- },
-
- find: function( selector ) {
- return $( selector, this.element );
- },
-
- refresh: function() {},
-
- update: function() {}
- });
-
- api.Element.synchronizer = {};
-
- $.each( [ 'html', 'val' ], function( i, method ) {
- api.Element.synchronizer[ method ] = {
- update: function( to ) {
- this.element[ method ]( to );
- },
- refresh: function() {
- return this.element[ method ]();
- }
- };
- });
-
- api.Element.synchronizer.checkbox = {
- update: function( to ) {
- this.element.prop( 'checked', to );
- },
- refresh: function() {
- return this.element.prop( 'checked' );
- }
- };
-
- api.Element.synchronizer.radio = {
- update: function( to ) {
- this.element.filter( function() {
- return this.value === to;
- }).prop( 'checked', true );
- },
- refresh: function() {
- return this.element.filter( ':checked' ).val();
- }
- };
-
- /* =====================================================================
- * Messenger for postMessage.
- * ===================================================================== */
-
- $.support.postMessage = !! window.postMessage;
-
- api.Messenger = api.Class.extend({
- add: function( key, initial, options ) {
- return this[ key ] = new api.Value( initial, options );
- },
-
- /**
- * Initialize Messenger.
- *
- * @param {object} params Parameters to configure the messenger.
- * {string} .url The URL to communicate with.
- * {window} .targetWindow The window instance to communicate with. Default window.parent.
- * {string} .channel If provided, will send the channel with each message and only accept messages a matching channel.
- * @param {object} options Extend any instance parameter or method with this object.
- */
- initialize: function( params, options ) {
- // Target the parent frame by default, but only if a parent frame exists.
- var defaultTarget = window.parent == window ? null : window.parent;
-
- $.extend( this, options || {} );
-
- this.add( 'channel', params.channel );
- this.add( 'url', params.url || '' );
- this.add( 'targetWindow', params.targetWindow || defaultTarget );
- this.add( 'origin', this.url() ).link( this.url ).setter( function( to ) {
- return to.replace( /([^:]+:\/\/[^\/]+).*/, '$1' );
- });
-
- // Since we want jQuery to treat the receive function as unique
- // to this instance, we give the function a new guid.
- //
- // This will prevent every Messenger's receive function from being
- // unbound when calling $.off( 'message', this.receive );
- this.receive = $.proxy( this.receive, this );
- this.receive.guid = $.guid++;
-
- $( window ).on( 'message', this.receive );
- },
-
- destroy: function() {
- $( window ).off( 'message', this.receive );
- },
-
- receive: function( event ) {
- var message;
-
- event = event.originalEvent;
-
- if ( ! this.targetWindow() )
- return;
-
- // Check to make sure the origin is valid.
- if ( this.origin() && event.origin !== this.origin() )
- return;
-
- message = JSON.parse( event.data );
-
- // Check required message properties.
- if ( ! message || ! message.id || typeof message.data === 'undefined' )
- return;
-
- // Check if channel names match.
- if ( ( message.channel || this.channel() ) && this.channel() !== message.channel )
- return;
-
- this.trigger( message.id, message.data );
- },
-
- send: function( id, data ) {
- var message;
-
- data = typeof data === 'undefined' ? null : data;
-
- if ( ! this.url() || ! this.targetWindow() )
- return;
-
- message = { id: id, data: data };
- if ( this.channel() )
- message.channel = this.channel();
-
- this.targetWindow().postMessage( JSON.stringify( message ), this.origin() );
- }
- });
-
- // Add the Events mixin to api.Messenger.
- $.extend( api.Messenger.prototype, api.Events );
-
- /* =====================================================================
- * Core customize object.
- * ===================================================================== */
-
- api = $.extend( new api.Values(), api );
- api.get = function() {
- var result = {};
-
- this.each( function( obj, key ) {
- result[ key ] = obj.get();
- });
-
- return result;
- };
-
- // Expose the API to the world.
- exports.customize = api;
-})( wp, jQuery );
diff --git a/wp-includes/js/customize-base.min.js b/wp-includes/js/customize-base.min.js
deleted file mode 100644
index 445d72c815..0000000000
--- a/wp-includes/js/customize-base.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(a,d){var b,g,c,f,e=Array.prototype.slice;g=function(h,i){var j=f(this,h,i);j.extend=this.extend;return j};c=function(){};f=function(i,h,j){var k;if(h&&h.hasOwnProperty("constructor")){k=h.constructor}else{k=function(){var l=i.apply(this,arguments);return l}}d.extend(k,i);c.prototype=i.prototype;k.prototype=new c();if(h){d.extend(k.prototype,h)}if(j){d.extend(k,j)}k.prototype.constructor=k;k.__super__=i.prototype;return k};b={};b.Class=function(l,k,i){var j,h=arguments;if(l&&k&&b.Class.applicator===l){h=k;d.extend(this,i||{})}j=this;if(this.instance){j=function(){return j.instance.apply(j,arguments)};d.extend(j,this)}j.initialize.apply(j,h);return j};b.Class.applicator={};b.Class.prototype.initialize=function(){};b.Class.prototype.extended=function(h){var i=this;while(typeof i.constructor!=="undefined"){if(i.constructor===h){return true}if(typeof i.constructor.__super__==="undefined"){return false}i=i.constructor.__super__}return false};b.Class.extend=g;b.Events={trigger:function(h){if(this.topics&&this.topics[h]){this.topics[h].fireWith(this,e.call(arguments,1))}return this},bind:function(i,h){this.topics=this.topics||{};this.topics[i]=this.topics[i]||d.Callbacks();this.topics[i].add.apply(this.topics[i],e.call(arguments,1));return this},unbind:function(i,h){if(this.topics&&this.topics[i]){this.topics[i].remove.apply(this.topics[i],e.call(arguments,1))}return this}};b.Value=b.Class.extend({initialize:function(i,h){this._value=i;this.callbacks=d.Callbacks();d.extend(this,h||{});this.set=d.proxy(this.set,this)},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(i){var h=this._value;i=this._setter.apply(this,arguments);i=this.validate(i);if(null===i||this._value===i){return this}this._value=i;this.callbacks.fireWith(this,[i,h]);return this},_setter:function(h){return h},setter:function(i){var h=this.get();this._setter=i;this._value=null;this.set(h);return this},resetSetter:function(){this._setter=this.constructor.prototype._setter;this.set(this.get());return this},validate:function(h){return h},bind:function(h){this.callbacks.add.apply(this.callbacks,arguments);return this},unbind:function(h){this.callbacks.remove.apply(this.callbacks,arguments);return this},link:function(){var h=this.set;d.each(arguments,function(){this.bind(h)});return this},unlink:function(){var h=this.set;d.each(arguments,function(){this.unbind(h)});return this},sync:function(){var h=this;d.each(arguments,function(){h.link(this);this.link(h)});return this},unsync:function(){var h=this;d.each(arguments,function(){h.unlink(this);this.unlink(h)});return this}});b.Values=b.Class.extend({defaultConstructor:b.Value,initialize:function(h){d.extend(this,h||{});this._value={};this._deferreds={}},instance:function(h){if(arguments.length===1){return this.value(h)}return this.when.apply(this,arguments)},value:function(h){return this._value[h]},has:function(h){return typeof this._value[h]!=="undefined"},add:function(i,h){if(this.has(i)){return this.value(i)}this._value[i]=h;h.parent=this;if(h.extended(b.Value)){h.bind(this._change)}this.trigger("add",h);if(this._deferreds[i]){this._deferreds[i].resolve()}return this._value[i]},create:function(h){return this.add(h,new this.defaultConstructor(b.Class.applicator,e.call(arguments,1)))},each:function(i,h){h=typeof h==="undefined"?this:h;d.each(this._value,function(j,k){i.call(h,k,j)})},remove:function(i){var h;if(this.has(i)){h=this.value(i);this.trigger("remove",h);if(h.extended(b.Value)){h.unbind(this._change)}delete h.parent}delete this._value[i];delete this._deferreds[i]},when:function(){var i=this,j=e.call(arguments),h=d.Deferred();if(d.isFunction(j[j.length-1])){h.done(j.pop())}d.when.apply(d,d.map(j,function(k){if(i.has(k)){return}return i._deferreds[k]=i._deferreds[k]||d.Deferred()})).done(function(){var k=d.map(j,function(l){return i(l)});if(k.length!==j.length){i.when.apply(i,j).done(function(){h.resolveWith(i,k)});return}h.resolveWith(i,k)});return h.promise()},_change:function(){this.parent.trigger("change",this)}});d.extend(b.Values.prototype,b.Events);b.ensure=function(h){return typeof h=="string"?d(h):h};b.Element=b.Value.extend({initialize:function(j,i){var h=this,m=b.Element.synchronizer.html,l,n,k;this.element=b.ensure(j);this.events="";if(this.element.is("input, select, textarea")){this.events+="change";m=b.Element.synchronizer.val;if(this.element.is("input")){l=this.element.prop("type");if(b.Element.synchronizer[l]){m=b.Element.synchronizer[l]}if("text"===l||"password"===l){this.events+=" keyup"}}else{if(this.element.is("textarea")){this.events+=" keyup"}}}b.Value.prototype.initialize.call(this,null,d.extend(i||{},m));this._value=this.get();n=this.update;k=this.refresh;this.update=function(o){if(o!==k.call(h)){n.apply(this,arguments)}};this.refresh=function(){h.set(k.call(h))};this.bind(this.update);this.element.bind(this.events,this.refresh)},find:function(h){return d(h,this.element)},refresh:function(){},update:function(){}});b.Element.synchronizer={};d.each(["html","val"],function(h,j){b.Element.synchronizer[j]={update:function(i){this.element[j](i)},refresh:function(){return this.element[j]()}}});b.Element.synchronizer.checkbox={update:function(h){this.element.prop("checked",h)},refresh:function(){return this.element.prop("checked")}};b.Element.synchronizer.radio={update:function(h){this.element.filter(function(){return this.value===h}).prop("checked",true)},refresh:function(){return this.element.filter(":checked").val()}};d.support.postMessage=!!window.postMessage;b.Messenger=b.Class.extend({add:function(j,i,h){return this[j]=new b.Value(i,h)},initialize:function(j,h){var i=window.parent==window?null:window.parent;d.extend(this,h||{});this.add("channel",j.channel);this.add("url",j.url||"");this.add("targetWindow",j.targetWindow||i);this.add("origin",this.url()).link(this.url).setter(function(k){return k.replace(/([^:]+:\/\/[^\/]+).*/,"$1")});this.receive=d.proxy(this.receive,this);this.receive.guid=d.guid++;d(window).on("message",this.receive)},destroy:function(){d(window).off("message",this.receive)},receive:function(i){var h;i=i.originalEvent;if(!this.targetWindow()){return}if(this.origin()&&i.origin!==this.origin()){return}h=JSON.parse(i.data);if(!h||!h.id||typeof h.data==="undefined"){return}if((h.channel||this.channel())&&this.channel()!==h.channel){return}this.trigger(h.id,h.data)},send:function(j,i){var h;i=typeof i==="undefined"?null:i;if(!this.url()||!this.targetWindow()){return}h={id:j,data:i};if(this.channel()){h.channel=this.channel()}this.targetWindow().postMessage(JSON.stringify(h),this.origin())}});d.extend(b.Messenger.prototype,b.Events);b=d.extend(new b.Values(),b);b.get=function(){var h={};this.each(function(j,i){h[i]=j.get()});return h};a.customize=b})(wp,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js
deleted file mode 100644
index 2ecbbe0fbf..0000000000
--- a/wp-includes/js/customize-loader.js
+++ /dev/null
@@ -1,164 +0,0 @@
-window.wp = window.wp || {};
-
-(function( exports, $ ){
- var api = wp.customize,
- Loader;
-
- $.extend( $.support, {
- history: !! ( window.history && history.pushState ),
- hashchange: ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7)
- });
-
- Loader = $.extend( {}, api.Events, {
- initialize: function() {
- this.body = $( document.body );
-
- // Ensure the loader is supported.
- // Check for settings, postMessage support, and whether we require CORS support.
- if ( ! Loader.settings || ! $.support.postMessage || ( ! $.support.cors && Loader.settings.isCrossDomain ) ) {
- return;
- }
-
- this.window = $( window );
- this.element = $( '<div id="customize-container" />' ).appendTo( this.body );
-
- this.bind( 'open', this.overlay.show );
- this.bind( 'close', this.overlay.hide );
-
- $('#wpbody').on( 'click', '.load-customize', function( event ) {
- event.preventDefault();
-
- // Store a reference to the link that opened the customizer.
- Loader.link = $(this);
- // Load the theme.
- Loader.open( Loader.link.attr('href') );
- });
-
- // Add navigation listeners.
- if ( $.support.history )
- this.window.on( 'popstate', Loader.popstate );
-
- if ( $.support.hashchange ) {
- this.window.on( 'hashchange', Loader.hashchange );
- this.window.triggerHandler( 'hashchange' );
- }
- },
-
- popstate: function( e ) {
- var state = e.originalEvent.state;
- if ( state && state.customize )
- Loader.open( state.customize );
- else if ( Loader.active )
- Loader.close();
- },
-
- hashchange: function( e ) {
- var hash = window.location.toString().split('#')[1];
-
- if ( hash && 0 === hash.indexOf( 'wp_customize=on' ) )
- Loader.open( Loader.settings.url + '?' + hash );
-
- if ( ! hash && ! $.support.history )
- Loader.close();
- },
-
- open: function( src ) {
- var hash;
-
- if ( this.active )
- return;
-
- // Load the full page on mobile devices.
- if ( Loader.settings.browser.mobile )
- return window.location = src;
-
- this.active = true;
- this.body.addClass('customize-loading');
-
- this.iframe = $( '<iframe />', { src: src }).appendTo( this.element );
- this.iframe.one( 'load', this.loaded );
-
- // Create a postMessage connection with the iframe.
- this.messenger = new api.Messenger({
- url: src,
- channel: 'loader',
- targetWindow: this.iframe[0].contentWindow
- });
-
- // Wait for the connection from the iframe before sending any postMessage events.
- this.messenger.bind( 'ready', function() {
- Loader.messenger.send( 'back' );
- });
-
- this.messenger.bind( 'close', function() {
- if ( $.support.history )
- history.back();
- else if ( $.support.hashchange )
- window.location.hash = '';
- else
- Loader.close();
- });
-
- this.messenger.bind( 'activated', function( location ) {
- if ( location )
- window.location = location;
- });
-
- hash = src.split('?')[1];
-
- // Ensure we don't call pushState if the user hit the forward button.
- if ( $.support.history && window.location.href !== src )
- history.pushState( { customize: src }, '', src );
- else if ( ! $.support.history && $.support.hashchange && hash )
- window.location.hash = 'wp_customize=on&' + hash;
-
- this.trigger( 'open' );
- },
-
- opened: function() {
- Loader.body.addClass( 'customize-active full-overlay-active' );
- },
-
- close: function() {
- if ( ! this.active )
- return;
- this.active = false;
-
- this.trigger( 'close' );
-
- // Return focus to link that was originally clicked.
- if ( this.link )
- this.link.focus();
- },
-
- closed: function() {
- Loader.iframe.remove();
- Loader.messenger.destroy();
- Loader.iframe = null;
- Loader.messenger = null;
- Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' );
- },
-
- loaded: function() {
- Loader.body.removeClass('customize-loading');
- },
-
- overlay: {
- show: function() {
- this.element.fadeIn( 200, Loader.opened );
- },
-
- hide: function() {
- this.element.fadeOut( 200, Loader.closed );
- }
- }
- });
-
- $( function() {
- Loader.settings = _wpCustomizeLoaderSettings;
- Loader.initialize();
- });
-
- // Expose the API to the world.
- api.Loader = Loader;
-})( wp, jQuery );
diff --git a/wp-includes/js/customize-loader.min.js b/wp-includes/js/customize-loader.min.js
deleted file mode 100644
index af55afc66c..0000000000
--- a/wp-includes/js/customize-loader.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(a,c){var b=wp.customize,d;c.extend(c.support,{history:!!(window.history&&history.pushState),hashchange:("onhashchange" in window)&&(document.documentMode===undefined||document.documentMode>7)});d=c.extend({},b.Events,{initialize:function(){this.body=c(document.body);if(!d.settings||!c.support.postMessage||(!c.support.cors&&d.settings.isCrossDomain)){return}this.window=c(window);this.element=c('<div id="customize-container" />').appendTo(this.body);this.bind("open",this.overlay.show);this.bind("close",this.overlay.hide);c("#wpbody").on("click",".load-customize",function(e){e.preventDefault();d.link=c(this);d.open(d.link.attr("href"))});if(c.support.history){this.window.on("popstate",d.popstate)}if(c.support.hashchange){this.window.on("hashchange",d.hashchange);this.window.triggerHandler("hashchange")}},popstate:function(g){var f=g.originalEvent.state;if(f&&f.customize){d.open(f.customize)}else{if(d.active){d.close()}}},hashchange:function(g){var f=window.location.toString().split("#")[1];if(f&&0===f.indexOf("wp_customize=on")){d.open(d.settings.url+"?"+f)}if(!f&&!c.support.history){d.close()}},open:function(f){var e;if(this.active){return}if(d.settings.browser.mobile){return window.location=f}this.active=true;this.body.addClass("customize-loading");this.iframe=c("<iframe />",{src:f}).appendTo(this.element);this.iframe.one("load",this.loaded);this.messenger=new b.Messenger({url:f,channel:"loader",targetWindow:this.iframe[0].contentWindow});this.messenger.bind("ready",function(){d.messenger.send("back")});this.messenger.bind("close",function(){if(c.support.history){history.back()}else{if(c.support.hashchange){window.location.hash=""}else{d.close()}}});this.messenger.bind("activated",function(g){if(g){window.location=g}});e=f.split("?")[1];if(c.support.history&&window.location.href!==f){history.pushState({customize:f},"",f)}else{if(!c.support.history&&c.support.hashchange&&e){window.location.hash="wp_customize=on&"+e}}this.trigger("open")},opened:function(){d.body.addClass("customize-active full-overlay-active")},close:function(){if(!this.active){return}this.active=false;this.trigger("close");if(this.link){this.link.focus()}},closed:function(){d.iframe.remove();d.messenger.destroy();d.iframe=null;d.messenger=null;d.body.removeClass("customize-active full-overlay-active").removeClass("customize-loading")},loaded:function(){d.body.removeClass("customize-loading")},overlay:{show:function(){this.element.fadeIn(200,d.opened)},hide:function(){this.element.fadeOut(200,d.closed)}}});c(function(){d.settings=_wpCustomizeLoaderSettings;d.initialize()});b.Loader=d})(wp,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/customize-preview.js b/wp-includes/js/customize-preview.js
deleted file mode 100644
index caefe653a9..0000000000
--- a/wp-includes/js/customize-preview.js
+++ /dev/null
@@ -1,146 +0,0 @@
-(function( exports, $ ){
- var api = wp.customize,
- debounce;
-
- debounce = function( fn, delay, context ) {
- var timeout;
- return function() {
- var args = arguments;
-
- context = context || this;
-
- clearTimeout( timeout );
- timeout = setTimeout( function() {
- timeout = null;
- fn.apply( context, args );
- }, delay );
- };
- };
-
- api.Preview = api.Messenger.extend({
- /**
- * Requires params:
- * - url - the URL of preview frame
- */
- initialize: function( params, options ) {
- var self = this;
-
- api.Messenger.prototype.initialize.call( this, params, options );
-
- this.body = $( document.body );
- this.body.on( 'click.preview', 'a', function( event ) {
- event.preventDefault();
- self.send( 'scroll', 0 );
- self.send( 'url', $(this).prop('href') );
- });
-
- // You cannot submit forms.
- // @todo: Allow form submissions by mixing $_POST data with the customize setting $_POST data.
- this.body.on( 'submit.preview', 'form', function( event ) {
- event.preventDefault();
- });
-
- this.window = $( window );
- this.window.on( 'scroll.preview', debounce( function() {
- self.send( 'scroll', self.window.scrollTop() );
- }, 200 ));
-
- this.bind( 'scroll', function( distance ) {
- self.window.scrollTop( distance );
- });
- }
- });
-
- $( function() {
- api.settings = window._wpCustomizeSettings;
- if ( ! api.settings )
- return;
-
- var preview, bg;
-
- preview = new api.Preview({
- url: window.location.href,
- channel: api.settings.channel
- });
-
- preview.bind( 'settings', function( values ) {
- $.each( values, function( id, value ) {
- if ( api.has( id ) )
- api( id ).set( value );
- else
- api.create( id, value );
- });
- });
-
- preview.trigger( 'settings', api.settings.values );
-
- preview.bind( 'setting', function( args ) {
- var value;
-
- args = args.slice();
-
- if ( value = api( args.shift() ) )
- value.set.apply( value, args );
- });
-
- preview.bind( 'sync', function( events ) {
- $.each( events, function( event, args ) {
- preview.trigger( event, args );
- });
- preview.send( 'synced' );
- });
-
- preview.bind( 'active', function() {
- if ( api.settings.nonce )
- preview.send( 'nonce', api.settings.nonce );
- });
-
- preview.send( 'ready' );
-
- /* Custom Backgrounds */
- bg = $.map(['color', 'image', 'position_x', 'repeat', 'attachment'], function( prop ) {
- return 'background_' + prop;
- });
-
- api.when.apply( api, bg ).done( function( color, image, position_x, repeat, attachment ) {
- var body = $(document.body),
- head = $('head'),
- style = $('#custom-background-css'),
- update;
-
- // If custom backgrounds are active and we can't find the
- // default output, bail.
- if ( body.hasClass('custom-background') && ! style.length )
- return;
-
- update = function() {
- var css = '';
-
- // The body will support custom backgrounds if either
- // the color or image are set.
- //
- // See get_body_class() in /wp-includes/post-template.php
- body.toggleClass( 'custom-background', !! ( color() || image() ) );
-
- if ( color() )
- css += 'background-color: ' + color() + ';';
-
- if ( image() ) {
- css += 'background-image: url("' + image() + '");';
- css += 'background-position: top ' + position_x() + ';';
- css += 'background-repeat: ' + repeat() + ';';
- css += 'background-attachment: ' + attachment() + ';';
- }
-
- // Refresh the stylesheet by removing and recreating it.
- style.remove();
- style = $('<style type="text/css" id="custom-background-css">body.custom-background { ' + css + ' }</style>').appendTo( head );
- };
-
- $.each( arguments, function() {
- this.bind( update );
- });
- });
- });
-
-})( wp, jQuery );
diff --git a/wp-includes/js/customize-preview.min.js b/wp-includes/js/customize-preview.min.js
deleted file mode 100644
index a466cbffbf..0000000000
--- a/wp-includes/js/customize-preview.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(b,d){var c=wp.customize,a;a=function(g,e,f){var h;return function(){var i=arguments;f=f||this;clearTimeout(h);h=setTimeout(function(){h=null;g.apply(f,i)},e)}};c.Preview=c.Messenger.extend({initialize:function(g,f){var e=this;c.Messenger.prototype.initialize.call(this,g,f);this.body=d(document.body);this.body.on("click.preview","a",function(h){h.preventDefault();e.send("scroll",0);e.send("url",d(this).prop("href"))});this.body.on("submit.preview","form",function(h){h.preventDefault()});this.window=d(window);this.window.on("scroll.preview",a(function(){e.send("scroll",e.window.scrollTop())},200));this.bind("scroll",function(h){e.window.scrollTop(h)})}});d(function(){c.settings=window._wpCustomizeSettings;if(!c.settings){return}var f,e;f=new c.Preview({url:window.location.href,channel:c.settings.channel});f.bind("settings",function(g){d.each(g,function(i,h){if(c.has(i)){c(i).set(h)}else{c.create(i,h)}})});f.trigger("settings",c.settings.values);f.bind("setting",function(g){var h;g=g.slice();if(h=c(g.shift())){h.set.apply(h,g)}});f.bind("sync",function(g){d.each(g,function(i,h){f.trigger(i,h)});f.send("synced")});f.bind("active",function(){if(c.settings.nonce){f.send("nonce",c.settings.nonce)}});f.send("ready");e=d.map(["color","image","position_x","repeat","attachment"],function(g){return"background_"+g});c.when.apply(c,e).done(function(j,i,m,h,l){var n=d(document.body),o=d("head"),g=d("#custom-background-css"),k;if(n.hasClass("custom-background")&&!g.length){return}k=function(){var p="";n.toggleClass("custom-background",!!(j()||i()));if(j()){p+="background-color: "+j()+";"}if(i()){p+='background-image: url("'+i()+'");';p+="background-position: top "+m()+";";p+="background-repeat: "+h()+";";p+="background-attachment: "+l()+";"}g.remove();g=d('<style type="text/css" id="custom-background-css">body.custom-background { '+p+" }</style>").appendTo(o)};d.each(arguments,function(){this.bind(k)})})})})(wp,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/heartbeat.js b/wp-includes/js/heartbeat.js
deleted file mode 100644
index 8023600659..0000000000
--- a/wp-includes/js/heartbeat.js
+++ /dev/null
@@ -1,461 +0,0 @@
-/**
- * Heartbeat API
- *
- * Note: this API is "experimental" meaning it will likely change a lot
- * in the next few releases based on feedback from 3.6.0. If you intend
- * to use it, please follow the development closely.
- *
- * Heartbeat is a simple server polling API that sends XHR requests to
- * the server every 15 seconds and triggers events (or callbacks) upon
- * receiving data. Currently these 'ticks' handle transports for post locking,
- * login-expiration warnings, and related tasks while a user is logged in.
- *
- * Available filters in ajax-actions.php:
- * - heartbeat_received
- * - heartbeat_send
- * - heartbeat_tick
- * - heartbeat_nopriv_received
- * - heartbeat_nopriv_send
- * - heartbeat_nopriv_tick
- * @see wp_ajax_nopriv_heartbeat(), wp_ajax_heartbeat()
- *
- * @since 3.6.0
- */
-
- // Ensure the global `wp` object exists.
-window.wp = window.wp || {};
-
-(function($){
- var Heartbeat = function() {
- var self = this,
- running,
- beat,
- screenId = typeof pagenow != 'undefined' ? pagenow : '',
- url = typeof ajaxurl != 'undefined' ? ajaxurl : '',
- settings,
- tick = 0,
- queue = {},
- interval,
- connecting,
- countdown = 0,
- errorcount = 0,
- tempInterval,
- hasFocus = true,
- isUserActive,
- userActiveEvents,
- winBlurTimeout,
- frameBlurTimeout = -1,
- hasConnectionError = false;
-
- /**
- * Returns a boolean that's indicative of whether or not there is a connection error
- *
- * @returns boolean
- */
- this.hasConnectionError = function() {
- return hasConnectionError;
- };
-
- if ( typeof( window.heartbeatSettings ) == 'object' ) {
- settings = $.extend( {}, window.heartbeatSettings );
-
- // Add private vars
- url = settings.ajaxurl || url;
- delete settings.ajaxurl;
- delete settings.nonce;
-
- interval = settings.interval || 15; // default interval
- delete settings.interval;
- // The interval can be from 15 to 60 sec. and can be set temporarily to 5 sec.
- if ( interval < 15 )
- interval = 15;
- else if ( interval > 60 )
- interval = 60;
-
- interval = interval * 1000;
-
- // 'screenId' can be added from settings on the front-end where the JS global 'pagenow' is not set
- screenId = screenId || settings.screenId || 'front';
- delete settings.screenId;
-
- // Add or overwrite public vars
- $.extend( this, settings );
- }
-
- function time(s) {
- if ( s )
- return parseInt( (new Date()).getTime() / 1000 );
-
- return (new Date()).getTime();
- }
-
- function isLocalFrame( frame ) {
- var origin, src = frame.src;
-
- if ( src && /^https?:\/\//.test( src ) ) {
- origin = window.location.origin ? window.location.origin : window.location.protocol + '//' + window.location.host;
-
- if ( src.indexOf( origin ) !== 0 )
- return false;
- }
-
- try {
- if ( frame.contentWindow.document )
- return true;
- } catch(e) {}
-
- return false;
- }
-
- // Set error state and fire an event on XHR errors or timeout
- function errorstate( error ) {
- var trigger;
-
- if ( error ) {
- switch ( error ) {
- case 'abort':
- // do nothing
- break;
- case 'timeout':
- // no response for 30 sec.
- trigger = true;
- break;
- case 'parsererror':
- case 'error':
- case 'empty':
- case 'unknown':
- errorcount++;
-
- if ( errorcount > 2 )
- trigger = true;
-
- break;
- }
-
- if ( trigger && ! self.hasConnectionError() ) {
- hasConnectionError = true;
- $(document).trigger( 'heartbeat-connection-lost', [error] );
- }
- } else if ( self.hasConnectionError() ) {
- errorcount = 0;
- hasConnectionError = false;
- $(document).trigger( 'heartbeat-connection-restored' );
- }
- }
-
- function connect() {
- var send = {}, data, i, empty = true,
- nonce = typeof window.heartbeatSettings == 'object' ? window.heartbeatSettings.nonce : '';
- tick = time();
-
- data = $.extend( {}, queue );
- // Clear the data queue, anything added after this point will be send on the next tick
- queue = {};
-
- $(document).trigger( 'heartbeat-send', [data] );
-
- for ( i in data ) {
- if ( data.hasOwnProperty( i ) ) {
- empty = false;
- break;
- }
- }
-
- // If nothing to send (nothing is expecting a response),
- // schedule the next tick and bail
- if ( empty && ! self.hasConnectionError() ) {
- connecting = false;
- next();
- return;
- }
-
- send.data = data;
- send.interval = interval / 1000;
- send._nonce = nonce;
- send.action = 'heartbeat';
- send.screen_id = screenId;
- send.has_focus = hasFocus;
-
- connecting = true;
- self.xhr = $.ajax({
- url: url,
- type: 'post',
- timeout: 30000, // throw an error if not completed after 30 sec.
- data: send,
- dataType: 'json'
- }).done( function( response, textStatus, jqXHR ) {
- var new_interval;
-
- if ( ! response )
- return errorstate( 'empty' );
-
- // Clear error state
- if ( self.hasConnectionError() )
- errorstate();
-
- if ( response.nonces_expired ) {
- $(document).trigger( 'heartbeat-nonces-expired' );
- return;
- }
-
- // Change the interval from PHP
- if ( response.heartbeat_interval ) {
- new_interval = response.heartbeat_interval;
- delete response.heartbeat_interval;
- }
-
- self.tick( response, textStatus, jqXHR );
-
- // do this last, can trigger the next XHR if connection time > 5 sec. and new_interval == 'fast'
- if ( new_interval )
- self.interval.call( self, new_interval );
- }).always( function() {
- connecting = false;
- next();
- }).fail( function( jqXHR, textStatus, error ) {
- errorstate( textStatus || 'unknown' );
- self.error( jqXHR, textStatus, error );
- });
- }
-
- function next() {
- var delta = time() - tick, t = interval;
-
- if ( ! running )
- return;
-
- if ( ! hasFocus ) {
- t = 100000; // 100 sec. Post locks expire after 120 sec.
- } else if ( countdown > 0 && tempInterval ) {
- t = tempInterval;
- countdown--;
- }
-
- window.clearTimeout(beat);
-
- if ( delta < t ) {
- beat = window.setTimeout(
- function(){
- if ( running )
- connect();
- },
- t - delta
- );
- } else {
- connect();
- }
- }
-
- function blurred() {
- window.clearTimeout(winBlurTimeout);
- window.clearTimeout(frameBlurTimeout);
- winBlurTimeout = frameBlurTimeout = 0;
-
- hasFocus = false;
- }
-
- function focused() {
- window.clearTimeout(winBlurTimeout);
- window.clearTimeout(frameBlurTimeout);
- winBlurTimeout = frameBlurTimeout = 0;
-
- isUserActive = time();
-
- if ( hasFocus )
- return;
-
- hasFocus = true;
- window.clearTimeout(beat);
-
- if ( ! connecting )
- next();
- }
-
- function setFrameEvents() {
- $('iframe').each( function( i, frame ){
- if ( ! isLocalFrame( frame ) )
- return;
-
- if ( $.data( frame, 'wp-heartbeat-focus' ) )
- return;
-
- $.data( frame, 'wp-heartbeat-focus', 1 );
-
- $( frame.contentWindow ).on( 'focus.wp-heartbeat-focus', function(e) {
- focused();
- }).on('blur.wp-heartbeat-focus', function(e) {
- setFrameEvents();
- frameBlurTimeout = window.setTimeout( function(){ blurred(); }, 500 );
- });
- });
- }
-
- $(window).on( 'blur.wp-heartbeat-focus', function(e) {
- setFrameEvents();
- winBlurTimeout = window.setTimeout( function(){ blurred(); }, 500 );
- }).on( 'focus.wp-heartbeat-focus', function() {
- $('iframe').each( function( i, frame ) {
- if ( !isLocalFrame( frame ) )
- return;
-
- $.removeData( frame, 'wp-heartbeat-focus' );
- $( frame.contentWindow ).off( '.wp-heartbeat-focus' );
- });
-
- focused();
- });
-
- function userIsActive() {
- userActiveEvents = false;
- $(document).off( '.wp-heartbeat-active' );
- $('iframe').each( function( i, frame ) {
- if ( ! isLocalFrame( frame ) )
- return;
-
- $( frame.contentWindow ).off( '.wp-heartbeat-active' );
- });
-
- focused();
- }
-
- // Set 'hasFocus = true' if user is active and the window is in the background.
- // Set 'hasFocus = false' if the user has been inactive (no mouse or keyboard activity) for 5 min. even when the window has focus.
- function checkUserActive() {
- var lastActive = isUserActive ? time() - isUserActive : 0;
-
- // Throttle down when no mouse or keyboard activity for 5 min
- if ( lastActive > 300000 && hasFocus )
- blurred();
-
- if ( ! userActiveEvents ) {
- $(document).on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active', function(){ userIsActive(); } );
-
- $('iframe').each( function( i, frame ) {
- if ( ! isLocalFrame( frame ) )
- return;
-
- $( frame.contentWindow ).on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active', function(){ userIsActive(); } );
- });
-
- userActiveEvents = true;
- }
- }
-
- // Check for user activity every 30 seconds.
- window.setInterval( function(){ checkUserActive(); }, 30000 );
- $(document).ready( function() {
- // Start one tick (15 sec) after DOM ready
- running = true;
- tick = time();
- next();
- });
-
- this.hasFocus = function() {
- return hasFocus;
- };
-
- /**
- * Get/Set the interval
- *
- * When setting to 'fast', the interval is 5 sec. for the next 30 ticks (for 2 min and 30 sec).
- * If the window doesn't have focus, the interval slows down to 2 min.
- *
- * @param string speed Interval speed: 'fast' (5sec), 'standard' (15sec) default, 'slow' (60sec)
- * @param string ticks Used with speed = 'fast', how many ticks before the speed reverts back
- * @return int Current interval in seconds
- */
- this.interval = function( speed, ticks ) {
- var reset, seconds;
- ticks = parseInt( ticks, 10 ) || 30;
- ticks = ticks < 1 || ticks > 30 ? 30 : ticks;
-
- if ( speed ) {
- switch ( speed ) {
- case 'fast':
- seconds = 5;
- countdown = ticks;
- break;
- case 'slow':
- seconds = 60;
- countdown = 0;
- break;
- case 'long-polling':
- // Allow long polling, (experimental)
- interval = 0;
- return 0;
- break;
- default:
- seconds = 15;
- countdown = 0;
- }
-
- // Reset when the new interval value is lower than the current one
- reset = seconds * 1000 < interval;
-
- if ( countdown > 0 ) {
- tempInterval = seconds * 1000;
- } else {
- interval = seconds * 1000;
- tempInterval = 0;
- }
-
- if ( reset )
- next();
- }
-
- if ( ! hasFocus )
- return 120;
-
- return tempInterval ? tempInterval / 1000 : interval / 1000;
- };
-
- /**
- * Enqueue data to send with the next XHR
- *
- * As the data is sent later, this function doesn't return the XHR response.
- * To see the response, use the custom jQuery event 'heartbeat-tick' on the document, example:
- * $(document).on( 'heartbeat-tick.myname', function( event, data, textStatus, jqXHR ) {
- * // code
- * });
- * If the same 'handle' is used more than once, the data is not overwritten when the third argument is 'true'.
- * Use wp.heartbeat.isQueued('handle') to see if any data is already queued for that handle.
- *
- * $param string handle Unique handle for the data. The handle is used in PHP to receive the data.
- * $param mixed data The data to send.
- * $param bool dont_overwrite Whether to overwrite existing data in the queue.
- * $return bool Whether the data was queued or not.
- */
- this.enqueue = function( handle, data, dont_overwrite ) {
- if ( handle ) {
- if ( queue.hasOwnProperty( handle ) && dont_overwrite )
- return false;
-
- queue[handle] = data;
- return true;
- }
- return false;
- };
-
- /**
- * Check if data with a particular handle is queued
- *
- * $param string handle The handle for the data
- * $return mixed The data queued with that handle or null
- */
- this.isQueued = function( handle ) {
- return queue[handle];
- };
- };
-
- $.extend( Heartbeat.prototype, {
- tick: function( data, textStatus, jqXHR ) {
- $(document).trigger( 'heartbeat-tick', [data, textStatus, jqXHR] );
- },
- error: function( jqXHR, textStatus, error ) {
- $(document).trigger( 'heartbeat-error', [jqXHR, textStatus, error] );
- }
- });
-
- wp.heartbeat = new Heartbeat();
-
-}(jQuery));
diff --git a/wp-includes/js/heartbeat.min.js b/wp-includes/js/heartbeat.min.js
deleted file mode 100644
index 215802869f..0000000000
--- a/wp-includes/js/heartbeat.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(a){var b=function(){var t=this,e,c,q=typeof pagenow!="undefined"?pagenow:"",h=typeof ajaxurl!="undefined"?ajaxurl:"",C,B=0,x={},D,i,r=0,A=0,y,f=true,p,j,g,w=-1,l=false;this.hasConnectionError=function(){return l};if(typeof(window.heartbeatSettings)=="object"){C=a.extend({},window.heartbeatSettings);h=C.ajaxurl||h;delete C.ajaxurl;delete C.nonce;D=C.interval||15;delete C.interval;if(D<15){D=15}else{if(D>60){D=60}}D=D*1000;q=q||C.screenId||"front";delete C.screenId;a.extend(this,C)}function k(F){if(F){return parseInt((new Date()).getTime()/1000)}return(new Date()).getTime()}function z(I){var F,H=I.src;if(H&&/^https?:\/\//.test(H)){F=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.host;if(H.indexOf(F)!==0){return false}}try{if(I.contentWindow.document){return true}}catch(G){}return false}function v(G){var F;if(G){switch(G){case"abort":break;case"timeout":F=true;break;case"parsererror":case"error":case"empty":case"unknown":A++;if(A>2){F=true}break}if(F&&!t.hasConnectionError()){l=true;a(document).trigger("heartbeat-connection-lost",[G])}}else{if(t.hasConnectionError()){A=0;l=false;a(document).trigger("heartbeat-connection-restored")}}}function d(){var J={},I,F,H=true,G=typeof window.heartbeatSettings=="object"?window.heartbeatSettings.nonce:"";B=k();I=a.extend({},x);x={};a(document).trigger("heartbeat-send",[I]);for(F in I){if(I.hasOwnProperty(F)){H=false;break}}if(H&&!t.hasConnectionError()){i=false;u();return}J.data=I;J.interval=D/1000;J._nonce=G;J.action="heartbeat";J.screen_id=q;J.has_focus=f;i=true;t.xhr=a.ajax({url:h,type:"post",timeout:30000,data:J,dataType:"json"}).done(function(K,N,L){var M;if(!K){return v("empty")}if(t.hasConnectionError()){v()}if(K.nonces_expired){a(document).trigger("heartbeat-nonces-expired");return}if(K.heartbeat_interval){M=K.heartbeat_interval;delete K.heartbeat_interval}t.tick(K,N,L);if(M){t.interval.call(t,M)}}).always(function(){i=false;u()}).fail(function(L,M,K){v(M||"unknown");t.error(L,M,K)})}function u(){var G=k()-B,F=D;if(!e){return}if(!f){F=100000}else{if(r>0&&y){F=y;r--}}window.clearTimeout(c);if(G<F){c=window.setTimeout(function(){if(e){d()}},F-G)}else{d()}}function o(){window.clearTimeout(g);window.clearTimeout(w);g=w=0;f=false}function n(){window.clearTimeout(g);window.clearTimeout(w);g=w=0;p=k();if(f){return}f=true;window.clearTimeout(c);if(!i){u()}}function s(){a("iframe").each(function(F,G){if(!z(G)){return}if(a.data(G,"wp-heartbeat-focus")){return}a.data(G,"wp-heartbeat-focus",1);a(G.contentWindow).on("focus.wp-heartbeat-focus",function(H){n()}).on("blur.wp-heartbeat-focus",function(H){s();w=window.setTimeout(function(){o()},500)})})}a(window).on("blur.wp-heartbeat-focus",function(F){s();g=window.setTimeout(function(){o()},500)}).on("focus.wp-heartbeat-focus",function(){a("iframe").each(function(F,G){if(!z(G)){return}a.removeData(G,"wp-heartbeat-focus");a(G.contentWindow).off(".wp-heartbeat-focus")});n()});function E(){j=false;a(document).off(".wp-heartbeat-active");a("iframe").each(function(F,G){if(!z(G)){return}a(G.contentWindow).off(".wp-heartbeat-active")});n()}function m(){var F=p?k()-p:0;if(F>300000&&f){o()}if(!j){a(document).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active",function(){E()});a("iframe").each(function(G,H){if(!z(H)){return}a(H.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active",function(){E()})});j=true}}window.setInterval(function(){m()},30000);a(document).ready(function(){e=true;B=k();u()});this.hasFocus=function(){return f};this.interval=function(H,G){var F,I;G=parseInt(G,10)||30;G=G<1||G>30?30:G;if(H){switch(H){case"fast":I=5;r=G;break;case"slow":I=60;r=0;break;case"long-polling":D=0;return 0;break;default:I=15;r=0}F=I*1000<D;if(r>0){y=I*1000}else{D=I*1000;y=0}if(F){u()}}if(!f){return 120}return y?y/1000:D/1000};this.enqueue=function(H,G,F){if(H){if(x.hasOwnProperty(H)&&F){return false}x[H]=G;return true}return false};this.isQueued=function(F){return x[F]}};a.extend(b.prototype,{tick:function(d,e,c){a(document).trigger("heartbeat-tick",[d,e,c])},error:function(d,e,c){a(document).trigger("heartbeat-error",[d,e,c])}});wp.heartbeat=new b()}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/hoverIntent.js b/wp-includes/js/hoverIntent.js
deleted file mode 100644
index 88e0e8a241..0000000000
--- a/wp-includes/js/hoverIntent.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*!
- * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
- * http://cherne.net/brian/resources/jquery.hoverIntent.html
- *
- * You may use hoverIntent under the terms of the MIT license. Basically that
- * means you are free to use hoverIntent as long as this header is left intact.
- * Copyright 2007, 2013 Brian Cherne
- */
-
-/* hoverIntent is similar to jQuery's built-in "hover" method except that
- * instead of firing the handlerIn function immediately, hoverIntent checks
- * to see if the user's mouse has slowed down (beneath the sensitivity
- * threshold) before firing the event. The handlerOut function is only
- * called after a matching handlerIn.
- *
- * // basic usage ... just like .hover()
- * .hoverIntent( handlerIn, handlerOut )
- * .hoverIntent( handlerInOut )
- *
- * // basic usage ... with event delegation!
- * .hoverIntent( handlerIn, handlerOut, selector )
- * .hoverIntent( handlerInOut, selector )
- *
- * // using a basic configuration object
- * .hoverIntent( config )
- *
- * @param handlerIn function OR configuration object
- * @param handlerOut function OR selector for delegation OR undefined
- * @param selector selector OR undefined
- * @author Brian Cherne <brian(at)cherne(dot)net>
- */
-(function($) {
- $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
-
- // default configuration values
- var cfg = {
- interval: 100,
- sensitivity: 7,
- timeout: 0
- };
-
- if ( typeof handlerIn === "object" ) {
- cfg = $.extend(cfg, handlerIn );
- } else if ($.isFunction(handlerOut)) {
- cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
- } else {
- cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
- }
-
- // instantiate variables
- // cX, cY = current X and Y position of mouse, updated by mousemove event
- // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
- var cX, cY, pX, pY;
-
- // A private function for getting mouse position
- var track = function(ev) {
- cX = ev.pageX;
- cY = ev.pageY;
- };
-
- // A private function for comparing current and previous mouse position
- var compare = function(ev,ob) {
- ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
- // compare mouse positions to see if they've crossed the threshold
- if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
- $(ob).off("mousemove.hoverIntent",track);
- // set hoverIntent state to true (so mouseOut can be called)
- ob.hoverIntent_s = 1;
- return cfg.over.apply(ob,[ev]);
- } else {
- // set previous coordinates for next time
- pX = cX; pY = cY;
- // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
- ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
- }
- };
-
- // A private function for delaying the mouseOut function
- var delay = function(ev,ob) {
- ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
- ob.hoverIntent_s = 0;
- return cfg.out.apply(ob,[ev]);
- };
-
- // A private function for handling mouse 'hovering'
- var handleHover = function(e) {
- // copy objects to be passed into t (required for event object to be passed in IE)
- var ev = jQuery.extend({},e);
- var ob = this;
-
- // cancel hoverIntent timer if it exists
- if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
-
- // if e.type == "mouseenter"
- if (e.type == "mouseenter") {
- // set "previous" X and Y position based on initial entry point
- pX = ev.pageX; pY = ev.pageY;
- // update "current" X and Y position based on mousemove
- $(ob).on("mousemove.hoverIntent",track);
- // start polling interval (self-calling timeout) to compare mouse coordinates over time
- if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
-
- // else e.type == "mouseleave"
- } else {
- // unbind expensive mousemove event
- $(ob).off("mousemove.hoverIntent",track);
- // if hoverIntent state is true, then call the mouseOut function after the specified delay
- if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
- }
- };
-
- // listen for mouseenter and mouseleave
- return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
- };
-})(jQuery);
diff --git a/wp-includes/js/hoverIntent.min.js b/wp-includes/js/hoverIntent.min.js
deleted file mode 100644
index 9a7644cbaa..0000000000
--- a/wp-includes/js/hoverIntent.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
- * http://cherne.net/brian/resources/jquery.hoverIntent.html
- *
- * You may use hoverIntent under the terms of the MIT license. Basically that
- * means you are free to use hoverIntent as long as this header is left intact.
- * Copyright 2007, 2013 Brian Cherne
- */
-(function(a){a.fn.hoverIntent=function(m,d,h){var j={interval:100,sensitivity:7,timeout:0};if(typeof m==="object"){j=a.extend(j,m)}else{if(a.isFunction(d)){j=a.extend(j,{over:m,out:d,selector:h})}else{j=a.extend(j,{over:m,out:m,selector:d})}}var l,k,g,f;var e=function(n){l=n.pageX;k=n.pageY};var c=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if((Math.abs(g-l)+Math.abs(f-k))<j.sensitivity){a(n).off("mousemove.hoverIntent",e);n.hoverIntent_s=1;return j.over.apply(n,[o])}else{g=l;f=k;n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}};var i=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);n.hoverIntent_s=0;return j.out.apply(n,[o])};var b=function(p){var o=jQuery.extend({},p);var n=this;if(n.hoverIntent_t){n.hoverIntent_t=clearTimeout(n.hoverIntent_t)}if(p.type=="mouseenter"){g=o.pageX;f=o.pageY;a(n).on("mousemove.hoverIntent",e);if(n.hoverIntent_s!=1){n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}}else{a(n).off("mousemove.hoverIntent",e);if(n.hoverIntent_s==1){n.hoverIntent_t=setTimeout(function(){i(o,n)},j.timeout)}}};return this.on({"mouseenter.hoverIntent":b,"mouseleave.hoverIntent":b},j.selector)}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/imgareaselect/border-anim-h.gif b/wp-includes/js/imgareaselect/border-anim-h.gif
deleted file mode 100644
index a964ebd717..0000000000
--- a/wp-includes/js/imgareaselect/border-anim-h.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/imgareaselect/border-anim-v.gif b/wp-includes/js/imgareaselect/border-anim-v.gif
deleted file mode 100644
index aa319935e4..0000000000
--- a/wp-includes/js/imgareaselect/border-anim-v.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/imgareaselect/imgareaselect.css b/wp-includes/js/imgareaselect/imgareaselect.css
deleted file mode 100644
index fd587a69d3..0000000000
--- a/wp-includes/js/imgareaselect/imgareaselect.css
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * imgAreaSelect animated border style
- */
-
-.imgareaselect-border1 {
- background: url(border-anim-v.gif) repeat-y left top;
-}
-
-.imgareaselect-border2 {
- background: url(border-anim-h.gif) repeat-x left top;
-}
-
-.imgareaselect-border3 {
- background: url(border-anim-v.gif) repeat-y right top;
-}
-
-.imgareaselect-border4 {
- background: url(border-anim-h.gif) repeat-x left bottom;
-}
-
-.imgareaselect-border1, .imgareaselect-border2,
-.imgareaselect-border3, .imgareaselect-border4 {
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.imgareaselect-handle {
- background-color: #fff;
- border: solid 1px #000;
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.imgareaselect-outer {
- background-color: #000;
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.imgareaselect-selection {
-}
diff --git a/wp-includes/js/imgareaselect/jquery.imgareaselect.js b/wp-includes/js/imgareaselect/jquery.imgareaselect.js
deleted file mode 100644
index 28860461b6..0000000000
--- a/wp-includes/js/imgareaselect/jquery.imgareaselect.js
+++ /dev/null
@@ -1,1198 +0,0 @@
-/*
- * imgAreaSelect jQuery plugin
- * version 0.9.9
- *
- * Copyright (c) 2008-2011 Michal Wojciechowski (odyniec.net)
- *
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://odyniec.net/projects/imgareaselect/
- *
- */
-
-(function($) {
-
-/*
- * Math functions will be used extensively, so it's convenient to make a few
- * shortcuts
- */
-var abs = Math.abs,
- max = Math.max,
- min = Math.min,
- round = Math.round;
-
-/**
- * Create a new HTML div element
- *
- * @return A jQuery object representing the new element
- */
-function div() {
- return $('<div/>');
-}
-
-/**
- * imgAreaSelect initialization
- *
- * @param img
- * A HTML image element to attach the plugin to
- * @param options
- * An options object
- */
-$.imgAreaSelect = function (img, options) {
- var
- /* jQuery object representing the image */
- $img = $(img),
-
- /* Has the image finished loading? */
- imgLoaded,
-
- /* Plugin elements */
-
- /* Container box */
- $box = div(),
- /* Selection area */
- $area = div(),
- /* Border (four divs) */
- $border = div().add(div()).add(div()).add(div()),
- /* Outer area (four divs) */
- $outer = div().add(div()).add(div()).add(div()),
- /* Handles (empty by default, initialized in setOptions()) */
- $handles = $([]),
-
- /*
- * Additional element to work around a cursor problem in Opera
- * (explained later)
- */
- $areaOpera,
-
- /* Image position (relative to viewport) */
- left, top,
-
- /* Image offset (as returned by .offset()) */
- imgOfs = { left: 0, top: 0 },
-
- /* Image dimensions (as returned by .width() and .height()) */
- imgWidth, imgHeight,
-
- /*
- * jQuery object representing the parent element that the plugin
- * elements are appended to
- */
- $parent,
-
- /* Parent element offset (as returned by .offset()) */
- parOfs = { left: 0, top: 0 },
-
- /* Base z-index for plugin elements */
- zIndex = 0,
-
- /* Plugin elements position */
- position = 'absolute',
-
- /* X/Y coordinates of the starting point for move/resize operations */
- startX, startY,
-
- /* Horizontal and vertical scaling factors */
- scaleX, scaleY,
-
- /* Current resize mode ("nw", "se", etc.) */
- resize,
-
- /* Selection area constraints */
- minWidth, minHeight, maxWidth, maxHeight,
-
- /* Aspect ratio to maintain (floating point number) */
- aspectRatio,
-
- /* Are the plugin elements currently displayed? */
- shown,
-
- /* Current selection (relative to parent element) */
- x1, y1, x2, y2,
-
- /* Current selection (relative to scaled image) */
- selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 },
-
- /* Document element */
- docElem = document.documentElement,
-
- /* Various helper variables used throughout the code */
- $p, d, i, o, w, h, adjusted;
-
- /*
- * Translate selection coordinates (relative to scaled image) to viewport
- * coordinates (relative to parent element)
- */
-
- /**
- * Translate selection X to viewport X
- *
- * @param x
- * Selection X
- * @return Viewport X
- */
- function viewX(x) {
- return x + imgOfs.left - parOfs.left;
- }
-
- /**
- * Translate selection Y to viewport Y
- *
- * @param y
- * Selection Y
- * @return Viewport Y
- */
- function viewY(y) {
- return y + imgOfs.top - parOfs.top;
- }
-
- /*
- * Translate viewport coordinates to selection coordinates
- */
-
- /**
- * Translate viewport X to selection X
- *
- * @param x
- * Viewport X
- * @return Selection X
- */
- function selX(x) {
- return x - imgOfs.left + parOfs.left;
- }
-
- /**
- * Translate viewport Y to selection Y
- *
- * @param y
- * Viewport Y
- * @return Selection Y
- */
- function selY(y) {
- return y - imgOfs.top + parOfs.top;
- }
-
- /*
- * Translate event coordinates (relative to document) to viewport
- * coordinates
- */
-
- /**
- * Get event X and translate it to viewport X
- *
- * @param event
- * The event object
- * @return Viewport X
- */
- function evX(event) {
- return event.pageX - parOfs.left;
- }
-
- /**
- * Get event Y and translate it to viewport Y
- *
- * @param event
- * The event object
- * @return Viewport Y
- */
- function evY(event) {
- return event.pageY - parOfs.top;
- }
-
- /**
- * Get the current selection
- *
- * @param noScale
- * If set to <code>true</code>, scaling is not applied to the
- * returned selection
- * @return Selection object
- */
- function getSelection(noScale) {
- var sx = noScale || scaleX, sy = noScale || scaleY;
-
- return { x1: round(selection.x1 * sx),
- y1: round(selection.y1 * sy),
- x2: round(selection.x2 * sx),
- y2: round(selection.y2 * sy),
- width: round(selection.x2 * sx) - round(selection.x1 * sx),
- height: round(selection.y2 * sy) - round(selection.y1 * sy) };
- }
-
- /**
- * Set the current selection
- *
- * @param x1
- * X coordinate of the upper left corner of the selection area
- * @param y1
- * Y coordinate of the upper left corner of the selection area
- * @param x2
- * X coordinate of the lower right corner of the selection area
- * @param y2
- * Y coordinate of the lower right corner of the selection area
- * @param noScale
- * If set to <code>true</code>, scaling is not applied to the
- * new selection
- */
- function setSelection(x1, y1, x2, y2, noScale) {
- var sx = noScale || scaleX, sy = noScale || scaleY;
-
- selection = {
- x1: round(x1 / sx || 0),
- y1: round(y1 / sy || 0),
- x2: round(x2 / sx || 0),
- y2: round(y2 / sy || 0)
- };
-
- selection.width = selection.x2 - selection.x1;
- selection.height = selection.y2 - selection.y1;
- }
-
- /**
- * Recalculate image and parent offsets
- */
- function adjust() {
- /*
- * Do not adjust if image width is not a positive number. This might
- * happen when imgAreaSelect is put on a parent element which is then
- * hidden.
- */
- if (!$img.width())
- return;
-
- /*
- * Get image offset. The .offset() method returns float values, so they
- * need to be rounded.
- */
- imgOfs = { left: round($img.offset().left), top: round($img.offset().top) };
-
- /* Get image dimensions */
- imgWidth = $img.innerWidth();
- imgHeight = $img.innerHeight();
-
- imgOfs.top += ($img.outerHeight() - imgHeight) >> 1;
- imgOfs.left += ($img.outerWidth() - imgWidth) >> 1;
-
- /* Set minimum and maximum selection area dimensions */
- minWidth = round(options.minWidth / scaleX) || 0;
- minHeight = round(options.minHeight / scaleY) || 0;
- maxWidth = round(min(options.maxWidth / scaleX || 1<<24, imgWidth));
- maxHeight = round(min(options.maxHeight / scaleY || 1<<24, imgHeight));
-
- /*
- * Workaround for jQuery 1.3.2 incorrect offset calculation, originally
- * observed in Safari 3. Firefox 2 is also affected.
- */
- if ($().jquery == '1.3.2' && position == 'fixed' &&
- !docElem['getBoundingClientRect'])
- {
- imgOfs.top += max(document.body.scrollTop, docElem.scrollTop);
- imgOfs.left += max(document.body.scrollLeft, docElem.scrollLeft);
- }
-
- /* Determine parent element offset */
- parOfs = /absolute|relative/.test($parent.css('position')) ?
- { left: round($parent.offset().left) - $parent.scrollLeft(),
- top: round($parent.offset().top) - $parent.scrollTop() } :
- position == 'fixed' ?
- { left: $(document).scrollLeft(), top: $(document).scrollTop() } :
- { left: 0, top: 0 };
-
- left = viewX(0);
- top = viewY(0);
-
- /*
- * Check if selection area is within image boundaries, adjust if
- * necessary
- */
- if (selection.x2 > imgWidth || selection.y2 > imgHeight)
- doResize();
- }
-
- /**
- * Update plugin elements
- *
- * @param resetKeyPress
- * If set to <code>false</code>, this instance's keypress
- * event handler is not activated
- */
- function update(resetKeyPress) {
- /* If plugin elements are hidden, do nothing */
- if (!shown) return;
-
- /*
- * Set the position and size of the container box and the selection area
- * inside it
- */
- $box.css({ left: viewX(selection.x1), top: viewY(selection.y1) })
- .add($area).width(w = selection.width).height(h = selection.height);
-
- /*
- * Reset the position of selection area, borders, and handles (IE6/IE7
- * position them incorrectly if we don't do this)
- */
- $area.add($border).add($handles).css({ left: 0, top: 0 });
-
- /* Set border dimensions */
- $border
- .width(max(w - $border.outerWidth() + $border.innerWidth(), 0))
- .height(max(h - $border.outerHeight() + $border.innerHeight(), 0));
-
- /* Arrange the outer area elements */
- $($outer[0]).css({ left: left, top: top,
- width: selection.x1, height: imgHeight });
- $($outer[1]).css({ left: left + selection.x1, top: top,
- width: w, height: selection.y1 });
- $($outer[2]).css({ left: left + selection.x2, top: top,
- width: imgWidth - selection.x2, height: imgHeight });
- $($outer[3]).css({ left: left + selection.x1, top: top + selection.y2,
- width: w, height: imgHeight - selection.y2 });
-
- w -= $handles.outerWidth();
- h -= $handles.outerHeight();
-
- /* Arrange handles */
- switch ($handles.length) {
- case 8:
- $($handles[4]).css({ left: w >> 1 });
- $($handles[5]).css({ left: w, top: h >> 1 });
- $($handles[6]).css({ left: w >> 1, top: h });
- $($handles[7]).css({ top: h >> 1 });
- case 4:
- $handles.slice(1,3).css({ left: w });
- $handles.slice(2,4).css({ top: h });
- }
-
- if (resetKeyPress !== false) {
- /*
- * Need to reset the document keypress event handler -- unbind the
- * current handler
- */
- if ($.imgAreaSelect.keyPress != docKeyPress)
- $(document).unbind($.imgAreaSelect.keyPress,
- $.imgAreaSelect.onKeyPress);
-
- if (options.keys)
- /*
- * Set the document keypress event handler to this instance's
- * docKeyPress() function
- */
- $(document)[$.imgAreaSelect.keyPress](
- $.imgAreaSelect.onKeyPress = docKeyPress);
- }
-
- /*
- * Internet Explorer displays 1px-wide dashed borders incorrectly by
- * filling the spaces between dashes with white. Toggling the margin
- * property between 0 and "auto" fixes this in IE6 and IE7 (IE8 is still
- * broken). This workaround is not perfect, as it requires setTimeout()
- * and thus causes the border to flicker a bit, but I haven't found a
- * better solution.
- *
- * Note: This only happens with CSS borders, set with the borderWidth,
- * borderOpacity, borderColor1, and borderColor2 options (which are now
- * deprecated). Borders created with GIF background images are fine.
- */
- if ($.browser.msie && $border.outerWidth() - $border.innerWidth() == 2) {
- $border.css('margin', 0);
- setTimeout(function () { $border.css('margin', 'auto'); }, 0);
- }
- }
-
- /**
- * Do the complete update sequence: recalculate offsets, update the
- * elements, and set the correct values of x1, y1, x2, and y2.
- *
- * @param resetKeyPress
- * If set to <code>false</code>, this instance's keypress
- * event handler is not activated
- */
- function doUpdate(resetKeyPress) {
- adjust();
- update(resetKeyPress);
- x1 = viewX(selection.x1); y1 = viewY(selection.y1);
- x2 = viewX(selection.x2); y2 = viewY(selection.y2);
- }
-
- /**
- * Hide or fade out an element (or multiple elements)
- *
- * @param $elem
- * A jQuery object containing the element(s) to hide/fade out
- * @param fn
- * Callback function to be called when fadeOut() completes
- */
- function hide($elem, fn) {
- options.fadeSpeed ? $elem.fadeOut(options.fadeSpeed, fn) : $elem.hide();
- }
-
- /**
- * Selection area mousemove event handler
- *
- * @param event
- * The event object
- */
- function areaMouseMove(event) {
- var x = selX(evX(event)) - selection.x1,
- y = selY(evY(event)) - selection.y1;
-
- if (!adjusted) {
- adjust();
- adjusted = true;
-
- $box.one('mouseout', function () { adjusted = false; });
- }
-
- /* Clear the resize mode */
- resize = '';
-
- if (options.resizable) {
- /*
- * Check if the mouse pointer is over the resize margin area and set
- * the resize mode accordingly
- */
- if (y <= options.resizeMargin)
- resize = 'n';
- else if (y >= selection.height - options.resizeMargin)
- resize = 's';
- if (x <= options.resizeMargin)
- resize += 'w';
- else if (x >= selection.width - options.resizeMargin)
- resize += 'e';
- }
-
- $box.css('cursor', resize ? resize + '-resize' :
- options.movable ? 'move' : '');
- if ($areaOpera)
- $areaOpera.toggle();
- }
-
- /**
- * Document mouseup event handler
- *
- * @param event
- * The event object
- */
- function docMouseUp(event) {
- /* Set back the default cursor */
- $('body').css('cursor', '');
- /*
- * If autoHide is enabled, or if the selection has zero width/height,
- * hide the selection and the outer area
- */
- if (options.autoHide || selection.width * selection.height == 0)
- hide($box.add($outer), function () { $(this).hide(); });
-
- $(document).unbind('mousemove', selectingMouseMove);
- $box.mousemove(areaMouseMove);
-
- options.onSelectEnd(img, getSelection());
- }
-
- /**
- * Selection area mousedown event handler
- *
- * @param event
- * The event object
- * @return false
- */
- function areaMouseDown(event) {
- if (event.which != 1) return false;
-
- adjust();
-
- if (resize) {
- /* Resize mode is in effect */
- $('body').css('cursor', resize + '-resize');
-
- x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']);
- y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']);
-
- $(document).mousemove(selectingMouseMove)
- .one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
- }
- else if (options.movable) {
- startX = left + selection.x1 - evX(event);
- startY = top + selection.y1 - evY(event);
-
- $box.unbind('mousemove', areaMouseMove);
-
- $(document).mousemove(movingMouseMove)
- .one('mouseup', function () {
- options.onSelectEnd(img, getSelection());
-
- $(document).unbind('mousemove', movingMouseMove);
- $box.mousemove(areaMouseMove);
- });
- }
- else
- $img.mousedown(event);
-
- return false;
- }
-
- /**
- * Adjust the x2/y2 coordinates to maintain aspect ratio (if defined)
- *
- * @param xFirst
- * If set to <code>true</code>, calculate x2 first. Otherwise,
- * calculate y2 first.
- */
- function fixAspectRatio(xFirst) {
- if (aspectRatio)
- if (xFirst) {
- x2 = max(left, min(left + imgWidth,
- x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1)));
- y2 = round(max(top, min(top + imgHeight,
- y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1))));
- x2 = round(x2);
- }
- else {
- y2 = max(top, min(top + imgHeight,
- y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1)));
- x2 = round(max(left, min(left + imgWidth,
- x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1))));
- y2 = round(y2);
- }
- }
-
- /**
- * Resize the selection area respecting the minimum/maximum dimensions and
- * aspect ratio
- */
- function doResize() {
- /*
- * Make sure the top left corner of the selection area stays within
- * image boundaries (it might not if the image source was dynamically
- * changed).
- */
- x1 = min(x1, left + imgWidth);
- y1 = min(y1, top + imgHeight);
-
- if (abs(x2 - x1) < minWidth) {
- /* Selection width is smaller than minWidth */
- x2 = x1 - minWidth * (x2 < x1 || -1);
-
- if (x2 < left)
- x1 = left + minWidth;
- else if (x2 > left + imgWidth)
- x1 = left + imgWidth - minWidth;
- }
-
- if (abs(y2 - y1) < minHeight) {
- /* Selection height is smaller than minHeight */
- y2 = y1 - minHeight * (y2 < y1 || -1);
-
- if (y2 < top)
- y1 = top + minHeight;
- else if (y2 > top + imgHeight)
- y1 = top + imgHeight - minHeight;
- }
-
- x2 = max(left, min(x2, left + imgWidth));
- y2 = max(top, min(y2, top + imgHeight));
-
- fixAspectRatio(abs(x2 - x1) < abs(y2 - y1) * aspectRatio);
-
- if (abs(x2 - x1) > maxWidth) {
- /* Selection width is greater than maxWidth */
- x2 = x1 - maxWidth * (x2 < x1 || -1);
- fixAspectRatio();
- }
-
- if (abs(y2 - y1) > maxHeight) {
- /* Selection height is greater than maxHeight */
- y2 = y1 - maxHeight * (y2 < y1 || -1);
- fixAspectRatio(true);
- }
-
- selection = { x1: selX(min(x1, x2)), x2: selX(max(x1, x2)),
- y1: selY(min(y1, y2)), y2: selY(max(y1, y2)),
- width: abs(x2 - x1), height: abs(y2 - y1) };
-
- update();
-
- options.onSelectChange(img, getSelection());
- }
-
- /**
- * Mousemove event handler triggered when the user is selecting an area
- *
- * @param event
- * The event object
- * @return false
- */
- function selectingMouseMove(event) {
- x2 = /w|e|^$/.test(resize) || aspectRatio ? evX(event) : viewX(selection.x2);
- y2 = /n|s|^$/.test(resize) || aspectRatio ? evY(event) : viewY(selection.y2);
-
- doResize();
-
- return false;
- }
-
- /**
- * Move the selection area
- *
- * @param newX1
- * New viewport X1
- * @param newY1
- * New viewport Y1
- */
- function doMove(newX1, newY1) {
- x2 = (x1 = newX1) + selection.width;
- y2 = (y1 = newY1) + selection.height;
-
- $.extend(selection, { x1: selX(x1), y1: selY(y1), x2: selX(x2),
- y2: selY(y2) });
-
- update();
-
- options.onSelectChange(img, getSelection());
- }
-
- /**
- * Mousemove event handler triggered when the selection area is being moved
- *
- * @param event
- * The event object
- * @return false
- */
- function movingMouseMove(event) {
- x1 = max(left, min(startX + evX(event), left + imgWidth - selection.width));
- y1 = max(top, min(startY + evY(event), top + imgHeight - selection.height));
-
- doMove(x1, y1);
-
- event.preventDefault();
- return false;
- }
-
- /**
- * Start selection
- */
- function startSelection() {
- $(document).unbind('mousemove', startSelection);
- adjust();
-
- x2 = x1;
- y2 = y1;
- doResize();
-
- resize = '';
-
- if (!$outer.is(':visible'))
- /* Show the plugin elements */
- $box.add($outer).hide().fadeIn(options.fadeSpeed||0);
-
- shown = true;
-
- $(document).unbind('mouseup', cancelSelection)
- .mousemove(selectingMouseMove).one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
-
- options.onSelectStart(img, getSelection());
- }
-
- /**
- * Cancel selection
- */
- function cancelSelection() {
- $(document).unbind('mousemove', startSelection)
- .unbind('mouseup', cancelSelection);
- hide($box.add($outer));
-
- setSelection(selX(x1), selY(y1), selX(x1), selY(y1));
-
- /* If this is an API call, callback functions should not be triggered */
- if (!(this instanceof $.imgAreaSelect)) {
- options.onSelectChange(img, getSelection());
- options.onSelectEnd(img, getSelection());
- }
- }
-
- /**
- * Image mousedown event handler
- *
- * @param event
- * The event object
- * @return false
- */
- function imgMouseDown(event) {
- /* Ignore the event if animation is in progress */
- if (event.which != 1 || $outer.is(':animated')) return false;
-
- adjust();
- startX = x1 = evX(event);
- startY = y1 = evY(event);
-
- /* Selection will start when the mouse is moved */
- $(document).mousemove(startSelection).mouseup(cancelSelection);
-
- return false;
- }
-
- /**
- * Window resize event handler
- */
- function windowResize() {
- doUpdate(false);
- }
-
- /**
- * Image load event handler. This is the final part of the initialization
- * process.
- */
- function imgLoad() {
- imgLoaded = true;
-
- /* Set options */
- setOptions(options = $.extend({
- classPrefix: 'imgareaselect',
- movable: true,
- parent: 'body',
- resizable: true,
- resizeMargin: 10,
- onInit: function () {},
- onSelectStart: function () {},
- onSelectChange: function () {},
- onSelectEnd: function () {}
- }, options));
-
- $box.add($outer).css({ visibility: '' });
-
- if (options.show) {
- shown = true;
- adjust();
- update();
- $box.add($outer).hide().fadeIn(options.fadeSpeed||0);
- }
-
- /*
- * Call the onInit callback. The setTimeout() call is used to ensure
- * that the plugin has been fully initialized and the object instance is
- * available (so that it can be obtained in the callback).
- */
- setTimeout(function () { options.onInit(img, getSelection()); }, 0);
- }
-
- /**
- * Document keypress event handler
- *
- * @param event
- * The event object
- * @return false
- */
- var docKeyPress = function(event) {
- var k = options.keys, d, t, key = event.keyCode;
-
- d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
- !isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
- !isNaN(k.shift) && event.shiftKey ? k.shift :
- !isNaN(k.arrows) ? k.arrows : 10;
-
- if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) ||
- (k.ctrl == 'resize' && event.ctrlKey) ||
- (k.alt == 'resize' && (event.altKey || event.originalEvent.altKey)))
- {
- /* Resize selection */
-
- switch (key) {
- case 37:
- /* Left */
- d = -d;
- case 39:
- /* Right */
- t = max(x1, x2);
- x1 = min(x1, x2);
- x2 = max(t + d, x1);
- fixAspectRatio();
- break;
- case 38:
- /* Up */
- d = -d;
- case 40:
- /* Down */
- t = max(y1, y2);
- y1 = min(y1, y2);
- y2 = max(t + d, y1);
- fixAspectRatio(true);
- break;
- default:
- return;
- }
-
- doResize();
- }
- else {
- /* Move selection */
-
- x1 = min(x1, x2);
- y1 = min(y1, y2);
-
- switch (key) {
- case 37:
- /* Left */
- doMove(max(x1 - d, left), y1);
- break;
- case 38:
- /* Up */
- doMove(x1, max(y1 - d, top));
- break;
- case 39:
- /* Right */
- doMove(x1 + min(d, imgWidth - selX(x2)), y1);
- break;
- case 40:
- /* Down */
- doMove(x1, y1 + min(d, imgHeight - selY(y2)));
- break;
- default:
- return;
- }
- }
-
- return false;
- };
-
- /**
- * Apply style options to plugin element (or multiple elements)
- *
- * @param $elem
- * A jQuery object representing the element(s) to style
- * @param props
- * An object that maps option names to corresponding CSS
- * properties
- */
- function styleOptions($elem, props) {
- for (var option in props)
- if (options[option] !== undefined)
- $elem.css(props[option], options[option]);
- }
-
- /**
- * Set plugin options
- *
- * @param newOptions
- * The new options object
- */
- function setOptions(newOptions) {
- if (newOptions.parent)
- ($parent = $(newOptions.parent)).append($box.add($outer));
-
- /* Merge the new options with the existing ones */
- $.extend(options, newOptions);
-
- adjust();
-
- if (newOptions.handles != null) {
- /* Recreate selection area handles */
- $handles.remove();
- $handles = $([]);
-
- i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0;
-
- while (i--)
- $handles = $handles.add(div());
-
- /* Add a class to handles and set the CSS properties */
- $handles.addClass(options.classPrefix + '-handle').css({
- position: 'absolute',
- /*
- * The font-size property needs to be set to zero, otherwise
- * Internet Explorer makes the handles too large
- */
- fontSize: 0,
- zIndex: zIndex + 1 || 1
- });
-
- /*
- * If handle width/height has not been set with CSS rules, set the
- * default 5px
- */
- if (!parseInt($handles.css('width')) >= 0)
- $handles.width(5).height(5);
-
- /*
- * If the borderWidth option is in use, add a solid border to
- * handles
- */
- if (o = options.borderWidth)
- $handles.css({ borderWidth: o, borderStyle: 'solid' });
-
- /* Apply other style options */
- styleOptions($handles, { borderColor1: 'border-color',
- borderColor2: 'background-color',
- borderOpacity: 'opacity' });
- }
-
- /* Calculate scale factors */
- scaleX = options.imageWidth / imgWidth || 1;
- scaleY = options.imageHeight / imgHeight || 1;
-
- /* Set selection */
- if (newOptions.x1 != null) {
- setSelection(newOptions.x1, newOptions.y1, newOptions.x2,
- newOptions.y2);
- newOptions.show = !newOptions.hide;
- }
-
- if (newOptions.keys)
- /* Enable keyboard support */
- options.keys = $.extend({ shift: 1, ctrl: 'resize' },
- newOptions.keys);
-
- /* Add classes to plugin elements */
- $outer.addClass(options.classPrefix + '-outer');
- $area.addClass(options.classPrefix + '-selection');
- for (i = 0; i++ < 4;)
- $($border[i-1]).addClass(options.classPrefix + '-border' + i);
-
- /* Apply style options */
- styleOptions($area, { selectionColor: 'background-color',
- selectionOpacity: 'opacity' });
- styleOptions($border, { borderOpacity: 'opacity',
- borderWidth: 'border-width' });
- styleOptions($outer, { outerColor: 'background-color',
- outerOpacity: 'opacity' });
- if (o = options.borderColor1)
- $($border[0]).css({ borderStyle: 'solid', borderColor: o });
- if (o = options.borderColor2)
- $($border[1]).css({ borderStyle: 'dashed', borderColor: o });
-
- /* Append all the selection area elements to the container box */
- $box.append($area.add($border).add($areaOpera).add($handles));
-
- if ($.browser.msie) {
- if (o = $outer.css('filter').match(/opacity=(\d+)/))
- $outer.css('opacity', o[1]/100);
- if (o = $border.css('filter').match(/opacity=(\d+)/))
- $border.css('opacity', o[1]/100);
- }
-
- if (newOptions.hide)
- hide($box.add($outer));
- else if (newOptions.show && imgLoaded) {
- shown = true;
- $box.add($outer).fadeIn(options.fadeSpeed||0);
- doUpdate();
- }
-
- /* Calculate the aspect ratio factor */
- aspectRatio = (d = (options.aspectRatio || '').split(/:/))[0] / d[1];
-
- $img.add($outer).unbind('mousedown', imgMouseDown);
-
- if (options.disable || options.enable === false) {
- /* Disable the plugin */
- $box.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown);
- $(window).unbind('resize', windowResize);
- }
- else {
- if (options.enable || options.disable === false) {
- /* Enable the plugin */
- if (options.resizable || options.movable)
- $box.mousemove(areaMouseMove).mousedown(areaMouseDown);
-
- $(window).resize(windowResize);
- }
-
- if (!options.persistent)
- $img.add($outer).mousedown(imgMouseDown);
- }
-
- options.enable = options.disable = undefined;
- }
-
- /**
- * Remove plugin completely
- */
- this.remove = function () {
- /*
- * Call setOptions with { disable: true } to unbind the event handlers
- */
- setOptions({ disable: true });
- $box.add($outer).remove();
- };
-
- /*
- * Public API
- */
-
- /**
- * Get current options
- *
- * @return An object containing the set of options currently in use
- */
- this.getOptions = function () { return options; };
-
- /**
- * Set plugin options
- *
- * @param newOptions
- * The new options object
- */
- this.setOptions = setOptions;
-
- /**
- * Get the current selection
- *
- * @param noScale
- * If set to <code>true</code>, scaling is not applied to the
- * returned selection
- * @return Selection object
- */
- this.getSelection = getSelection;
-
- /**
- * Set the current selection
- *
- * @param x1
- * X coordinate of the upper left corner of the selection area
- * @param y1
- * Y coordinate of the upper left corner of the selection area
- * @param x2
- * X coordinate of the lower right corner of the selection area
- * @param y2
- * Y coordinate of the lower right corner of the selection area
- * @param noScale
- * If set to <code>true</code>, scaling is not applied to the
- * new selection
- */
- this.setSelection = setSelection;
-
- /**
- * Cancel selection
- */
- this.cancelSelection = cancelSelection;
-
- /**
- * Update plugin elements
- *
- * @param resetKeyPress
- * If set to <code>false</code>, this instance's keypress
- * event handler is not activated
- */
- this.update = doUpdate;
-
- /*
- * Traverse the image's parent elements (up to <body>) and find the
- * highest z-index
- */
- $p = $img;
-
- while ($p.length) {
- zIndex = max(zIndex,
- !isNaN($p.css('z-index')) ? $p.css('z-index') : zIndex);
- /* Also check if any of the ancestor elements has fixed position */
- if ($p.css('position') == 'fixed')
- position = 'fixed';
-
- $p = $p.parent(':not(body)');
- }
-
- /*
- * If z-index is given as an option, it overrides the one found by the
- * above loop
- */
- zIndex = options.zIndex || zIndex;
-
- if ($.browser.msie)
- $img.attr('unselectable', 'on');
-
- /*
- * In MSIE and WebKit, we need to use the keydown event instead of keypress
- */
- $.imgAreaSelect.keyPress = $.browser.msie ||
- $.browser.safari ? 'keydown' : 'keypress';
-
- /*
- * There is a bug affecting the CSS cursor property in Opera (observed in
- * versions up to 10.00) that prevents the cursor from being updated unless
- * the mouse leaves and enters the element again. To trigger the mouseover
- * event, we're adding an additional div to $box and we're going to toggle
- * it when mouse moves inside the selection area.
- */
- if ($.browser.opera)
- $areaOpera = div().css({ width: '100%', height: '100%',
- position: 'absolute', zIndex: zIndex + 2 || 2 });
-
- /*
- * We initially set visibility to "hidden" as a workaround for a weird
- * behaviour observed in Google Chrome 1.0.154.53 (on Windows XP). Normally
- * we would just set display to "none", but, for some reason, if we do so
- * then Chrome refuses to later display the element with .show() or
- * .fadeIn().
- */
- $box.add($outer).css({ visibility: 'hidden', position: position,
- overflow: 'hidden', zIndex: zIndex || '0' });
- $box.css({ zIndex: zIndex + 2 || 2 });
- $area.add($border).css({ position: 'absolute', fontSize: 0 });
-
- /*
- * If the image has been fully loaded, or if it is not really an image (eg.
- * a div), call imgLoad() immediately; otherwise, bind it to be called once
- * on image load event.
- */
- img.complete || img.readyState == 'complete' || !$img.is('img') ?
- imgLoad() : $img.one('load', imgLoad);
-
- /*
- * MSIE 9.0 doesn't always fire the image load event -- resetting the src
- * attribute seems to trigger it. The check is for version 7 and above to
- * accommodate for MSIE 9 running in compatibility mode.
- */
- if (!imgLoaded && $.browser.msie && $.browser.version >= 7)
- img.src = img.src;
-};
-
-/**
- * Invoke imgAreaSelect on a jQuery object containing the image(s)
- *
- * @param options
- * Options object
- * @return The jQuery object or a reference to imgAreaSelect instance (if the
- * <code>instance</code> option was specified)
- */
-$.fn.imgAreaSelect = function (options) {
- options = options || {};
-
- this.each(function () {
- /* Is there already an imgAreaSelect instance bound to this element? */
- if ($(this).data('imgAreaSelect')) {
- /* Yes there is -- is it supposed to be removed? */
- if (options.remove) {
- /* Remove the plugin */
- $(this).data('imgAreaSelect').remove();
- $(this).removeData('imgAreaSelect');
- }
- else
- /* Reset options */
- $(this).data('imgAreaSelect').setOptions(options);
- }
- else if (!options.remove) {
- /* No exising instance -- create a new one */
-
- /*
- * If neither the "enable" nor the "disable" option is present, add
- * "enable" as the default
- */
- if (options.enable === undefined && options.disable === undefined)
- options.enable = true;
-
- $(this).data('imgAreaSelect', new $.imgAreaSelect(this, options));
- }
- });
-
- if (options.instance)
- /*
- * Return the imgAreaSelect instance bound to the first element in the
- * set
- */
- return $(this).data('imgAreaSelect');
-
- return this;
-};
-
-})(jQuery);
diff --git a/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js b/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js
deleted file mode 100644
index 0f949681fe..0000000000
--- a/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){var b=Math.abs,a=Math.max,d=Math.min,c=Math.round;function f(){return e("<div/>")}e.imgAreaSelect=function(s,X){var az=e(s),Z,av=f(),ai=f(),K=f().add(f()).add(f()).add(f()),ab=f().add(f()).add(f()).add(f()),O=e([]),V,n,q,aC={left:0,top:0},Q,j,C,P={left:0,top:0},D=0,ag="absolute",T,S,ad,ac,L,E,U,W,am,Y,N,A,aD,z,aB,y={x1:0,y1:0,x2:0,y2:0,width:0,height:0},p=document.documentElement,l,au,ap,aj,af,aq,x;function J(h){return h+aC.left-P.left}function I(h){return h+aC.top-P.top}function H(h){return h-aC.left+P.left}function B(h){return h-aC.top+P.top}function ao(h){return h.pageX-P.left}function al(h){return h.pageY-P.top}function G(h){var o=h||ad,i=h||ac;return{x1:c(y.x1*o),y1:c(y.y1*i),x2:c(y.x2*o),y2:c(y.y2*i),width:c(y.x2*o)-c(y.x1*o),height:c(y.y2*i)-c(y.y1*i)}}function ah(i,w,h,o,aE){var aG=aE||ad,aF=aE||ac;y={x1:c(i/aG||0),y1:c(w/aF||0),x2:c(h/aG||0),y2:c(o/aF||0)};y.width=y.x2-y.x1;y.height=y.y2-y.y1}function ar(){if(!az.width()){return}aC={left:c(az.offset().left),top:c(az.offset().top)};Q=az.innerWidth();j=az.innerHeight();aC.top+=(az.outerHeight()-j)>>1;aC.left+=(az.outerWidth()-Q)>>1;E=c(X.minWidth/ad)||0;U=c(X.minHeight/ac)||0;W=c(d(X.maxWidth/ad||1<<24,Q));am=c(d(X.maxHeight/ac||1<<24,j));if(e().jquery=="1.3.2"&&ag=="fixed"&&!p.getBoundingClientRect){aC.top+=a(document.body.scrollTop,p.scrollTop);aC.left+=a(document.body.scrollLeft,p.scrollLeft)}P=/absolute|relative/.test(C.css("position"))?{left:c(C.offset().left)-C.scrollLeft(),top:c(C.offset().top)-C.scrollTop()}:ag=="fixed"?{left:e(document).scrollLeft(),top:e(document).scrollTop()}:{left:0,top:0};n=J(0);q=I(0);if(y.x2>Q||y.y2>j){ay()}}function aa(h){if(!N){return}av.css({left:J(y.x1),top:I(y.y1)}).add(ai).width(af=y.width).height(aq=y.height);ai.add(K).add(O).css({left:0,top:0});K.width(a(af-K.outerWidth()+K.innerWidth(),0)).height(a(aq-K.outerHeight()+K.innerHeight(),0));e(ab[0]).css({left:n,top:q,width:y.x1,height:j});e(ab[1]).css({left:n+y.x1,top:q,width:af,height:y.y1});e(ab[2]).css({left:n+y.x2,top:q,width:Q-y.x2,height:j});e(ab[3]).css({left:n+y.x1,top:q+y.y2,width:af,height:j-y.y2});af-=O.outerWidth();aq-=O.outerHeight();switch(O.length){case 8:e(O[4]).css({left:af>>1});e(O[5]).css({left:af,top:aq>>1});e(O[6]).css({left:af>>1,top:aq});e(O[7]).css({top:aq>>1});case 4:O.slice(1,3).css({left:af});O.slice(2,4).css({top:aq})}if(h!==false){if(e.imgAreaSelect.keyPress!=aw){e(document).unbind(e.imgAreaSelect.keyPress,e.imgAreaSelect.onKeyPress)}if(X.keys){e(document)[e.imgAreaSelect.keyPress](e.imgAreaSelect.onKeyPress=aw)}}if(e.browser.msie&&K.outerWidth()-K.innerWidth()==2){K.css("margin",0);setTimeout(function(){K.css("margin","auto")},0)}}function u(h){ar();aa(h);A=J(y.x1);aD=I(y.y1);z=J(y.x2);aB=I(y.y2)}function ak(h,i){X.fadeSpeed?h.fadeOut(X.fadeSpeed,i):h.hide()}function F(i){var h=H(ao(i))-y.x1,o=B(al(i))-y.y1;if(!x){ar();x=true;av.one("mouseout",function(){x=false})}L="";if(X.resizable){if(o<=X.resizeMargin){L="n"}else{if(o>=y.height-X.resizeMargin){L="s"}}if(h<=X.resizeMargin){L+="w"}else{if(h>=y.width-X.resizeMargin){L+="e"}}}av.css("cursor",L?L+"-resize":X.movable?"move":"");if(V){V.toggle()}}function an(h){e("body").css("cursor","");if(X.autoHide||y.width*y.height==0){ak(av.add(ab),function(){e(this).hide()})}e(document).unbind("mousemove",ae);av.mousemove(F);X.onSelectEnd(s,G())}function t(h){if(h.which!=1){return false}ar();if(L){e("body").css("cursor",L+"-resize");A=J(y[/w/.test(L)?"x2":"x1"]);aD=I(y[/n/.test(L)?"y2":"y1"]);e(document).mousemove(ae).one("mouseup",an);av.unbind("mousemove",F)}else{if(X.movable){T=n+y.x1-ao(h);S=q+y.y1-al(h);av.unbind("mousemove",F);e(document).mousemove(g).one("mouseup",function(){X.onSelectEnd(s,G());e(document).unbind("mousemove",g);av.mousemove(F)})}else{az.mousedown(h)}}return false}function r(h){if(Y){if(h){z=a(n,d(n+Q,A+b(aB-aD)*Y*(z>A||-1)));aB=c(a(q,d(q+j,aD+b(z-A)/Y*(aB>aD||-1))));z=c(z)}else{aB=a(q,d(q+j,aD+b(z-A)/Y*(aB>aD||-1)));z=c(a(n,d(n+Q,A+b(aB-aD)*Y*(z>A||-1))));aB=c(aB)}}}function ay(){A=d(A,n+Q);aD=d(aD,q+j);if(b(z-A)<E){z=A-E*(z<A||-1);if(z<n){A=n+E}else{if(z>n+Q){A=n+Q-E}}}if(b(aB-aD)<U){aB=aD-U*(aB<aD||-1);if(aB<q){aD=q+U}else{if(aB>q+j){aD=q+j-U}}}z=a(n,d(z,n+Q));aB=a(q,d(aB,q+j));r(b(z-A)<b(aB-aD)*Y);if(b(z-A)>W){z=A-W*(z<A||-1);r()}if(b(aB-aD)>am){aB=aD-am*(aB<aD||-1);r(true)}y={x1:H(d(A,z)),x2:H(a(A,z)),y1:B(d(aD,aB)),y2:B(a(aD,aB)),width:b(z-A),height:b(aB-aD)};aa();X.onSelectChange(s,G())}function ae(h){z=/w|e|^$/.test(L)||Y?ao(h):J(y.x2);aB=/n|s|^$/.test(L)||Y?al(h):I(y.y2);ay();return false}function R(h,i){z=(A=h)+y.width;aB=(aD=i)+y.height;e.extend(y,{x1:H(A),y1:B(aD),x2:H(z),y2:B(aB)});aa();X.onSelectChange(s,G())}function g(h){A=a(n,d(T+ao(h),n+Q-y.width));aD=a(q,d(S+al(h),q+j-y.height));R(A,aD);h.preventDefault();return false}function aA(){e(document).unbind("mousemove",aA);ar();z=A;aB=aD;ay();L="";if(!ab.is(":visible")){av.add(ab).hide().fadeIn(X.fadeSpeed||0)}N=true;e(document).unbind("mouseup",at).mousemove(ae).one("mouseup",an);av.unbind("mousemove",F);X.onSelectStart(s,G())}function at(){e(document).unbind("mousemove",aA).unbind("mouseup",at);ak(av.add(ab));ah(H(A),B(aD),H(A),B(aD));if(!(this instanceof e.imgAreaSelect)){X.onSelectChange(s,G());X.onSelectEnd(s,G())}}function m(h){if(h.which!=1||ab.is(":animated")){return false}ar();T=A=ao(h);S=aD=al(h);e(document).mousemove(aA).mouseup(at);return false}function v(){u(false)}function ax(){Z=true;M(X=e.extend({classPrefix:"imgareaselect",movable:true,parent:"body",resizable:true,resizeMargin:10,onInit:function(){},onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},X));av.add(ab).css({visibility:""});if(X.show){N=true;ar();aa();av.add(ab).hide().fadeIn(X.fadeSpeed||0)}setTimeout(function(){X.onInit(s,G())},0)}var aw=function(w){var h=X.keys,aE,o,i=w.keyCode;aE=!isNaN(h.alt)&&(w.altKey||w.originalEvent.altKey)?h.alt:!isNaN(h.ctrl)&&w.ctrlKey?h.ctrl:!isNaN(h.shift)&&w.shiftKey?h.shift:!isNaN(h.arrows)?h.arrows:10;if(h.arrows=="resize"||(h.shift=="resize"&&w.shiftKey)||(h.ctrl=="resize"&&w.ctrlKey)||(h.alt=="resize"&&(w.altKey||w.originalEvent.altKey))){switch(i){case 37:aE=-aE;case 39:o=a(A,z);A=d(A,z);z=a(o+aE,A);r();break;case 38:aE=-aE;case 40:o=a(aD,aB);aD=d(aD,aB);aB=a(o+aE,aD);r(true);break;default:return}ay()}else{A=d(A,z);aD=d(aD,aB);switch(i){case 37:R(a(A-aE,n),aD);break;case 38:R(A,a(aD-aE,q));break;case 39:R(A+d(aE,Q-H(z)),aD);break;case 40:R(A,aD+d(aE,j-B(aB)));break;default:return}}return false};function k(h,o){for(var i in o){if(X[i]!==undefined){h.css(o[i],X[i])}}}function M(h){if(h.parent){(C=e(h.parent)).append(av.add(ab))}e.extend(X,h);ar();if(h.handles!=null){O.remove();O=e([]);ap=h.handles?h.handles=="corners"?4:8:0;while(ap--){O=O.add(f())}O.addClass(X.classPrefix+"-handle").css({position:"absolute",fontSize:0,zIndex:D+1||1});if(!parseInt(O.css("width"))>=0){O.width(5).height(5)}if(aj=X.borderWidth){O.css({borderWidth:aj,borderStyle:"solid"})}k(O,{borderColor1:"border-color",borderColor2:"background-color",borderOpacity:"opacity"})}ad=X.imageWidth/Q||1;ac=X.imageHeight/j||1;if(h.x1!=null){ah(h.x1,h.y1,h.x2,h.y2);h.show=!h.hide}if(h.keys){X.keys=e.extend({shift:1,ctrl:"resize"},h.keys)}ab.addClass(X.classPrefix+"-outer");ai.addClass(X.classPrefix+"-selection");for(ap=0;ap++<4;){e(K[ap-1]).addClass(X.classPrefix+"-border"+ap)}k(ai,{selectionColor:"background-color",selectionOpacity:"opacity"});k(K,{borderOpacity:"opacity",borderWidth:"border-width"});k(ab,{outerColor:"background-color",outerOpacity:"opacity"});if(aj=X.borderColor1){e(K[0]).css({borderStyle:"solid",borderColor:aj})}if(aj=X.borderColor2){e(K[1]).css({borderStyle:"dashed",borderColor:aj})}av.append(ai.add(K).add(V).add(O));if(e.browser.msie){if(aj=ab.css("filter").match(/opacity=(\d+)/)){ab.css("opacity",aj[1]/100)}if(aj=K.css("filter").match(/opacity=(\d+)/)){K.css("opacity",aj[1]/100)}}if(h.hide){ak(av.add(ab))}else{if(h.show&&Z){N=true;av.add(ab).fadeIn(X.fadeSpeed||0);u()}}Y=(au=(X.aspectRatio||"").split(/:/))[0]/au[1];az.add(ab).unbind("mousedown",m);if(X.disable||X.enable===false){av.unbind("mousemove",F).unbind("mousedown",t);e(window).unbind("resize",v)}else{if(X.enable||X.disable===false){if(X.resizable||X.movable){av.mousemove(F).mousedown(t)}e(window).resize(v)}if(!X.persistent){az.add(ab).mousedown(m)}}X.enable=X.disable=undefined}this.remove=function(){M({disable:true});av.add(ab).remove()};this.getOptions=function(){return X};this.setOptions=M;this.getSelection=G;this.setSelection=ah;this.cancelSelection=at;this.update=u;l=az;while(l.length){D=a(D,!isNaN(l.css("z-index"))?l.css("z-index"):D);if(l.css("position")=="fixed"){ag="fixed"}l=l.parent(":not(body)")}D=X.zIndex||D;if(e.browser.msie){az.attr("unselectable","on")}e.imgAreaSelect.keyPress=e.browser.msie||e.browser.safari?"keydown":"keypress";if(e.browser.opera){V=f().css({width:"100%",height:"100%",position:"absolute",zIndex:D+2||2})}av.add(ab).css({visibility:"hidden",position:ag,overflow:"hidden",zIndex:D||"0"});av.css({zIndex:D+2||2});ai.add(K).css({position:"absolute",fontSize:0});s.complete||s.readyState=="complete"||!az.is("img")?ax():az.one("load",ax);if(!Z&&e.browser.msie&&e.browser.version>=7){s.src=s.src}};e.fn.imgAreaSelect=function(g){g=g||{};this.each(function(){if(e(this).data("imgAreaSelect")){if(g.remove){e(this).data("imgAreaSelect").remove();e(this).removeData("imgAreaSelect")}else{e(this).data("imgAreaSelect").setOptions(g)}}else{if(!g.remove){if(g.enable===undefined&&g.disable===undefined){g.enable=true}e(this).data("imgAreaSelect",new e.imgAreaSelect(this,g))}}});if(g.instance){return e(this).data("imgAreaSelect")}return this}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jcrop/Jcrop.gif b/wp-includes/js/jcrop/Jcrop.gif
deleted file mode 100644
index 0e24ab1b12..0000000000
--- a/wp-includes/js/jcrop/Jcrop.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/jcrop/jquery.Jcrop.min.css b/wp-includes/js/jcrop/jquery.Jcrop.min.css
deleted file mode 100644
index f438f33d53..0000000000
--- a/wp-includes/js/jcrop/jquery.Jcrop.min.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* jquery.Jcrop.min.css v0.9.10 (build:20120429) */
-.jcrop-holder{direction:ltr;text-align:left;}
-.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif) top left repeat;font-size:0;position:absolute;}
-.jcrop-vline{height:100%;width:1px!important;}
-.jcrop-hline{height:1px!important;width:100%;}
-.jcrop-vline.right{right:0;}
-.jcrop-hline.bottom{bottom:0;}
-.jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;}
-.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
-.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
-.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
-.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
-.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
-.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
-.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
-.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
-.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
-.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
-.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
-.jcrop-dragbar.ord-n{margin-top:-4px;}
-.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
-.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
-.jcrop-dragbar.ord-w{margin-left:-4px;}
-.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important;}
-.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
-.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important;}
-.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
-.jcrop-holder img,img.jcrop-preview{max-width:none;}
diff --git a/wp-includes/js/jcrop/jquery.Jcrop.min.js b/wp-includes/js/jcrop/jquery.Jcrop.min.js
deleted file mode 100644
index 2df51ad6db..0000000000
--- a/wp-includes/js/jcrop/jquery.Jcrop.min.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * jquery.Jcrop.min.js v0.9.10 (build:20120429)
- * jQuery Image Cropping Plugin - released under MIT License
- * Copyright (c) 2008-2012 Tapmodo Interactive LLC
- * https://github.com/tapmodo/Jcrop
- */
-(function(a){a.Jcrop=function(b,c){function h(a){return a+"px"}function i(a){return d.baseClass+"-"+a}function j(){return a.fx.step.hasOwnProperty("backgroundColor")}function k(b){var c=a(b).offset();return[c.left,c.top]}function l(a){return[a.pageX-e[0],a.pageY-e[1]]}function m(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function n(a,b){e=k(E),bd.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bd.activateHandlers(p(b),u);var c=ba.getFixed(),d=q(a),f=ba.getCorner(q(d));ba.setPressed(ba.getCorner(d)),ba.setCurrent(f),bd.activateHandlers(o(a,c),u)}function o(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}ba.setCurrent(c),bc.update()}}function p(a){var b=a;return be.watchKeys(),function(
-a){ba.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bc.update()}}function q(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function r(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=k(E),X=!0,n(a,l(b)),b.stopPropagation(),b.preventDefault(),!1)}}function s(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),U=a.width()/d,V=a.height()/e,a.width(d).height(e)}function t(a){return{x:a.x*U,y:a.y*V,x2:a.x2*U,y2:a.y2*V,w:a.w*U,h:a.h*V}}function u(a){var b=ba.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bc.enableHandles(),bc.done()):bc.release(),bd.setCursor(d.allowSelect?"crosshair":"default")}function v(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;X=!0,e=k(E),bc.disableHandles(),bd.setCursor("crosshair");var b=l(a);return ba.setPressed(b),bc.update(),bd.activateHandlers(w,u),be.watchKeys(),a.stopPropagation
-(),a.preventDefault(),!1}function w(a){ba.setCurrent(a),bc.update()}function z(){var b=a("<div></div>").addClass(i("tracker"));return a.browser.msie&&b.css({opacity:0,backgroundColor:"white"}),b}function bf(a){H.removeClass().addClass(i("holder")).addClass(a)}function bg(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/U,e=a[1]/V,f=a[2]/U,g=a[3]/V;if(Y)return;var h=ba.flipCoords(c,e,f,g),i=ba.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;x=k[0],y=k[1],f=k[2],g=k[3],bc.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=x+q/100*m,k[1]=y+q/100*n,k[2]=f+q/100*o,k[3]=g+q/100*p,q>=99.8&&(q=100),q<100?(bi(k),t()):(bc.done(),typeof b=="function"&&b.call(bt))}}();t()}function bh(a){bi([a[0]/U,a[1]/V,a[2]/U,a[3]/V]),d.onSelect.call(bt,t(ba.getFixed())),bc.enableHandles()}function bi(a){ba.setPressed([a[0],a[1]]),ba.setCurrent([a[2],a[3]]),bc.update()}function bj(){return t(ba.getFixed())}function bk(){return ba.getFixed()}function bl
-(a){m(a),bs()}function bm(){d.disabled=!0,bc.disableHandles(),bc.setCursor("default"),bd.setCursor("default")}function bn(){d.disabled=!1,bs()}function bo(){bc.done(),bd.activateHandlers(null,null)}function bp(){H.remove(),B.show(),a(b).removeData("Jcrop")}function bq(a,b){bc.release(),bm();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;E.width(e).height(f),E.attr("src",a),I.attr("src",a),s(E,g,h),F=E.width(),G=E.height(),I.width(F).height(G),N.width(F+M*2).height(G+M*2),H.width(F).height(G),bb.resize(F,G),bn(),typeof b=="function"&&b.call(bt)},c.src=a}function br(a,b,c){var e=b||d.bgColor;d.bgFade&&j()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function bs(a){d.allowResize?a?bc.enableOnly():bc.enableHandles():bc.disableHandles(),bd.setCursor(d.allowSelect?"crosshair":"default"),bc.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(U=d.trueSize[0]/F,V=d.trueSize[1]/G),d.hasOwnProperty("setSelect"
-)&&(bh(d.setSelect),bc.done(),delete d.setSelect),bb.refresh(),d.bgColor!=O&&(br(d.shade?bb.getShades():H,d.shade?d.shadeColor||d.bgColor:d.bgColor),O=d.bgColor),P!=d.bgOpacity&&(P=d.bgOpacity,d.shade?bb.refresh():bc.setBgOpacity(P)),Q=d.maxSize[0]||0,R=d.maxSize[1]||0,S=d.minSize[0]||0,T=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(E.attr("src",d.outerImage),delete d.outerImage),bc.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f,g=!1;a.browser.msie&&a.browser.version.split(".")[0]==="6"&&(g=!0),typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),m(c);var A={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},B=a(b),C=!0;if(b.tagName=="IMG"){if(B[0].width!=0&&B[0].height!=0)B.width(B[0].width),B.height(B[0].height);else{var D=new Image;D.src=B[0].src,B.width(D.width),B.height(D.height)}var E=B.clone().removeAttr("id").css(A).show();E.width(B.width()),E.height(B.height()),B.after(E).hide()}else E=B.css(A).show(),C=!1,d.shade===null&&(d.shade=!0);s(E,d.boxWidth,d.
-boxHeight);var F=E.width(),G=E.height(),H=a("<div />").width(F).height(G).addClass(i("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(B).append(E);d.addClass&&H.addClass(d.addClass);var I=a("<div />"),J=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),K=a("<div />").width("100%").height("100%").css("zIndex",320),L=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=ba.getFixed();d.onDblClick.call(bt,a)}).insertBefore(E).append(J,K);C&&(I=a("<img />").attr("src",E.attr("src")).css(A).width(F).height(G),J.append(I)),g&&L.css({overflowY:"hidden"});var M=d.boundary,N=z().width(F+M*2).height(G+M*2).css({position:"absolute",top:h(-M),left:h(-M),zIndex:290}).mousedown(v),O=d.bgColor,P=d.bgOpacity,Q,R,S,T,U,V,W=!0,X,Y,Z;e=k(E);var _=function(){function a(){var a={},b=["touchstart","touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"
-),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,d.disabled?!1:a==="move"&&!d.allowMove?!1:(X=!0,n(a,l(b)),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,v(a)},isSupported:a,support:b()}}(),ba=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),G<e+g&&(g+=G-(e+g)),F<c+f&&(f+=F-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio
-)return p();var f=d.aspectRatio,g=d.minSize[0]/U,h=d.maxSize[0]/U,i=d.maxSize[1]/V,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=F*10),i===0&&(i=G*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>F&&(r=F,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>G&&(s=G,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>F&&(a-=r-F,r=F),s<0?(b-=s,s=0):s>G&&(b-=s-G,s=G),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>F&&(a[0]=F),a[1]>G&&(a[1]=G),[a[0],a[1]]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return Q&&Math.abs(d)>Q&&(c=d>0?a+Q:a-Q),R&&Math.abs(f)>R&&(e=f>0?b+R:b-R),T/V&&Math.abs(f)<T/V&&(e=f>0?b+T/V:b-T/V),S/U&&Math.abs(d)<S/U&&(c=d>0?a+S/U:a-S/U),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&
-(a-=c,c-=c),e<0&&(b-=e,e-=e),c>F&&(g=c-F,a-=g,c-=g),e>G&&(g=e-G,b-=g,e-=g),a>F&&(g=a-G,e-=g,b-=g),b>G&&(g=b-G,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),bb=function(){function f(a,b){e.left.css({height:h(b)}),e.right.css({height:h(b)})}function g(){return i(ba.getFixed())}function i(a){e.top.css({left:h(a.x),width:h(a.w),height:h(a.y)}),e.bottom.css({top:h(a.y2),left:h(a.x),width:h(a.w),height:h(G-a.y2)}),e.right.css({left:h(a.x2),width:h(F-a.x2)}),e.left.css({width:h(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(E),g(),bc.setBgOpacity(1,0,1),I.hide(),l(d.shadeColor||d.bgColor,1),bc.isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){br(p(),a,b)}function m(){b&&(c.remove(),I.show(),b=!1,bc.isAwake()?bc.setBgOpacity(d.bgOpacity
-,1,1):(bc.setBgOpacity(1,1,1),bc.disableHandles()),br(H,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bc.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(G),right:j().height(G),bottom:j()};return{update:g,updateRaw:i,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bc=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(i(b));return J.append(c),c}function l(b,c){var d=a("<div />").mousedown(r(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return _.support&&d.bind("touchstart.jcrop",_.createDragger(b)),K.append(d),d}function m(a){var b=d.handleSize;return l(a,c++).css({opacity:d.handleOpacity}).width(b).height(b).addClass(i("handle"))}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o
-(a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function s(a,b){d.shade||I.css({top:h(-b),left:h(-a)}),L.css({top:h(b),left:h(a)})}function u(a,b){L.width(a).height(b)}function v(){var a=ba.getFixed();ba.setPressed([a.x,a.y]),ba.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=ba.getFixed();u(c.w,c.h),s(c.x,c.y),d.shade&&bb.updateRaw(c),b||A(),a?d.onSelect.call(bt,t(c)):d.onChange.call(bt,t(c))}function y(a,c,e){if(!b&&!c)return;d.bgFade&&!e?E.animate({opacity:a},{queue:!1,duration:d.fadeTime}):E.css("opacity",a)}function A(){L.show(),d.shade?bb.opacity(P):y(P,!0),b=!0}function B(){F(),L.hide(),d.shade?bb.opacity(1):y(1),b=!1,d.onRelease.call(bt)}function C(){j&&K.show()}function D(){j=!0;if(d.allowResize)return K.show(),!0}function F(){j=!1,K.hide(
-)}function G(a){Y===a?F():D()}function H(){G(!1),v()}var b,c=370,e={},f={},g={},j=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=z().mousedown(r("move")).css({cursor:"move",position:"absolute",zIndex:360});return _.support&&M.bind("touchstart.jcrop",_.createDragger("move")),J.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:D,enableOnly:function(){j=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:y,done:H}}(),bd=function(){function f(){N.css({zIndex:450}),_.support&&a(document).bind("touchmove.jcrop",k).bind("touchend.jcrop",m),e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){N.css({zIndex:290}),a(document).unbind(".jcrop")}function h
-(a){return b(l(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),X&&(X=!1,c(l(a)),bc.isAwake()&&d.onSelect.call(bt,t(ba.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d){return X=!0,b=a,c=d,f(),!1}function k(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,h(a)}function m(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,i(a)}function n(a){N.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||N.mousemove(h).mouseup(i).mouseout(i),E.before(N),{activateHandlers:j,setCursor:n}}(),be=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function h(a,b,c){d.allowMove&&(ba.moveOffset([b,c]),bc.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Z=a.shiftKey?!0:!1;var b=Z?10:1;switch(a.keyCode){case 37:h(a,-b,0);break;case 39:h(a,b,0);break;case 38:h(a,0,-b);break;case 40
-:h(a,0,b);break;case 27:d.allowSelect&&bc.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),g||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(E)):b.insertBefore(E)),{watchKeys:e}}();_.support&&N.bind("touchstart.jcrop",_.newSelection),K.hide(),bs(!0);var bt={setImage:bq,animateTo:bg,setSelect:bh,setOptions:bl,tellSelect:bj,tellScaled:bk,setClass:bf,disable:bm,enable:bn,cancel:bo,release:bc.release,destroy:bp,focus:be.watchKeys,getBounds:function(){return[F*U,G*V]},getWidgetSize:function(){return[F,G]},getScaleFactor:function(){return[U,V]},getOptions:function(){return d},ui:{holder:H,selection:L}};return a.browser.msie&&H.bind("selectstart",function(){return!1}),B.data("Jcrop",bt),bt},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(b==="api")return a
-(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:7,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,
-touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery-migrate.js b/wp-includes/js/jquery/jquery-migrate.js
deleted file mode 100644
index dbe8cbd4d8..0000000000
--- a/wp-includes/js/jquery/jquery-migrate.js
+++ /dev/null
@@ -1,521 +0,0 @@
-/*!
- * jQuery Migrate - v1.2.1 - 2013-05-08
- * https://github.com/jquery/jquery-migrate
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
- */
-(function( jQuery, window, undefined ) {
-// See http://bugs.jquery.com/ticket/13335
-// "use strict";
-
-
-var warnedAbout = {};
-
-// List of warnings already given; public read only
-jQuery.migrateWarnings = [];
-
-// Set to true to prevent console output; migrateWarnings still maintained
-// jQuery.migrateMute = false;
-
-// Show a message on the console so devs know we're active
-if ( !jQuery.migrateMute && window.console && window.console.log ) {
- window.console.log("JQMIGRATE: Logging is active");
-}
-
-// Set to false to disable traces that appear with warnings
-if ( jQuery.migrateTrace === undefined ) {
- jQuery.migrateTrace = true;
-}
-
-// Forget any warnings we've already given; public
-jQuery.migrateReset = function() {
- warnedAbout = {};
- jQuery.migrateWarnings.length = 0;
-};
-
-function migrateWarn( msg) {
- var console = window.console;
- if ( !warnedAbout[ msg ] ) {
- warnedAbout[ msg ] = true;
- jQuery.migrateWarnings.push( msg );
- if ( console && console.warn && !jQuery.migrateMute ) {
- console.warn( "JQMIGRATE: " + msg );
- if ( jQuery.migrateTrace && console.trace ) {
- console.trace();
- }
- }
- }
-}
-
-function migrateWarnProp( obj, prop, value, msg ) {
- if ( Object.defineProperty ) {
- // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
- // allow property to be overwritten in case some other plugin wants it
- try {
- Object.defineProperty( obj, prop, {
- configurable: true,
- enumerable: true,
- get: function() {
- migrateWarn( msg );
- return value;
- },
- set: function( newValue ) {
- migrateWarn( msg );
- value = newValue;
- }
- });
- return;
- } catch( err ) {
- // IE8 is a dope about Object.defineProperty, can't warn there
- }
- }
-
- // Non-ES5 (or broken) browser; just set the property
- jQuery._definePropertyBroken = true;
- obj[ prop ] = value;
-}
-
-if ( document.compatMode === "BackCompat" ) {
- // jQuery has never supported or tested Quirks Mode
- migrateWarn( "jQuery is not compatible with Quirks Mode" );
-}
-
-
-var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
- oldAttr = jQuery.attr,
- valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
- function() { return null; },
- valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
- function() { return undefined; },
- rnoType = /^(?:input|button)$/i,
- rnoAttrNodeType = /^[238]$/,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- ruseDefault = /^(?:checked|selected)$/i;
-
-// jQuery.attrFn
-migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
-
-jQuery.attr = function( elem, name, value, pass ) {
- var lowerName = name.toLowerCase(),
- nType = elem && elem.nodeType;
-
- if ( pass ) {
- // Since pass is used internally, we only warn for new jQuery
- // versions where there isn't a pass arg in the formal params
- if ( oldAttr.length < 4 ) {
- migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
- }
- if ( elem && !rnoAttrNodeType.test( nType ) &&
- (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
- return jQuery( elem )[ name ]( value );
- }
- }
-
- // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
- // for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
- if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
- migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
- }
-
- // Restore boolHook for boolean property/attribute synchronization
- if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
- jQuery.attrHooks[ lowerName ] = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" &&
- ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
-
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
- };
-
- // Warn only for attributes that can remain distinct from their properties post-1.9
- if ( ruseDefault.test( lowerName ) ) {
- migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
- }
- }
-
- return oldAttr.call( jQuery, elem, name, value );
-};
-
-// attrHooks: value
-jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var nodeName = ( elem.nodeName || "" ).toLowerCase();
- if ( nodeName === "button" ) {
- return valueAttrGet.apply( this, arguments );
- }
- if ( nodeName !== "input" && nodeName !== "option" ) {
- migrateWarn("jQuery.fn.attr('value') no longer gets properties");
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value ) {
- var nodeName = ( elem.nodeName || "" ).toLowerCase();
- if ( nodeName === "button" ) {
- return valueAttrSet.apply( this, arguments );
- }
- if ( nodeName !== "input" && nodeName !== "option" ) {
- migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
-};
-
-
-var matched, browser,
- oldInit = jQuery.fn.init,
- oldParseJSON = jQuery.parseJSON,
- // Note: XSS check is done below after string is trimmed
- rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
-
-// $(html) "looks like html" rule change
-jQuery.fn.init = function( selector, context, rootjQuery ) {
- var match;
-
- if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
- (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
- // This is an HTML string according to the "old" rules; is it still?
- if ( selector.charAt( 0 ) !== "<" ) {
- migrateWarn("$(html) HTML strings must start with '<' character");
- }
- if ( match[ 3 ] ) {
- migrateWarn("$(html) HTML text after last tag is ignored");
- }
- // Consistently reject any HTML-like string starting with a hash (#9521)
- // Note that this may break jQuery 1.6.x code that otherwise would work.
- if ( match[ 0 ].charAt( 0 ) === "#" ) {
- migrateWarn("HTML string cannot start with a '#' character");
- jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
- }
- // Now process using loose rules; let pre-1.8 play too
- if ( context && context.context ) {
- // jQuery object as context; parseHTML expects a DOM object
- context = context.context;
- }
- if ( jQuery.parseHTML ) {
- return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
- context, rootjQuery );
- }
- }
- return oldInit.apply( this, arguments );
-};
-jQuery.fn.init.prototype = jQuery.fn;
-
-// Let $.parseJSON(falsy_value) return null
-jQuery.parseJSON = function( json ) {
- if ( !json && json !== null ) {
- migrateWarn("jQuery.parseJSON requires a valid JSON string");
- return null;
- }
- return oldParseJSON.apply( this, arguments );
-};
-
-jQuery.uaMatch = function( ua ) {
- ua = ua.toLowerCase();
-
- var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
- /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
- /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
- /(msie) ([\w.]+)/.exec( ua ) ||
- ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
- [];
-
- return {
- browser: match[ 1 ] || "",
- version: match[ 2 ] || "0"
- };
-};
-
-// Don't clobber any existing jQuery.browser in case it's different
-if ( !jQuery.browser ) {
- matched = jQuery.uaMatch( navigator.userAgent );
- browser = {};
-
- if ( matched.browser ) {
- browser[ matched.browser ] = true;
- browser.version = matched.version;
- }
-
- // Chrome is Webkit, but Webkit is also Safari.
- if ( browser.chrome ) {
- browser.webkit = true;
- } else if ( browser.webkit ) {
- browser.safari = true;
- }
-
- jQuery.browser = browser;
-}
-
-// Warn if the code tries to get jQuery.browser
-migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
-
-jQuery.sub = function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- migrateWarn( "jQuery.sub() is deprecated" );
- return jQuerySub;
-};
-
-
-// Ensure that $.ajax gets the new parseJSON defined in core.js
-jQuery.ajaxSetup({
- converters: {
- "text json": jQuery.parseJSON
- }
-});
-
-
-var oldFnData = jQuery.fn.data;
-
-jQuery.fn.data = function( name ) {
- var ret, evt,
- elem = this[0];
-
- // Handles 1.7 which has this behavior and 1.8 which doesn't
- if ( elem && name === "events" && arguments.length === 1 ) {
- ret = jQuery.data( elem, name );
- evt = jQuery._data( elem, name );
- if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
- migrateWarn("Use of jQuery.fn.data('events') is deprecated");
- return evt;
- }
- }
- return oldFnData.apply( this, arguments );
-};
-
-
-var rscriptType = /\/(java|ecma)script/i,
- oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
-
-jQuery.fn.andSelf = function() {
- migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
- return oldSelf.apply( this, arguments );
-};
-
-// Since jQuery.clean is used internally on older versions, we only shim if it's missing
-if ( !jQuery.clean ) {
- jQuery.clean = function( elems, context, fragment, scripts ) {
- // Set context per 1.8 logic
- context = context || document;
- context = !context.nodeType && context[0] || context;
- context = context.ownerDocument || context;
-
- migrateWarn("jQuery.clean() is deprecated");
-
- var i, elem, handleScript, jsTags,
- ret = [];
-
- jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
-
- // Complex logic lifted directly from jQuery 1.8
- if ( fragment ) {
- // Special handling of each script element
- handleScript = function( elem ) {
- // Check if we consider it executable
- if ( !elem.type || rscriptType.test( elem.type ) ) {
- // Detach the script and store it in the scripts array (if provided) or the fragment
- // Return truthy to indicate that it has been handled
- return scripts ?
- scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
- fragment.appendChild( elem );
- }
- };
-
- for ( i = 0; (elem = ret[i]) != null; i++ ) {
- // Check if we're done after handling an executable script
- if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
- // Append to fragment and handle embedded scripts
- fragment.appendChild( elem );
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
- jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
-
- // Splice the scripts into ret after their former ancestor and advance our index beyond them
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
- i += jsTags.length;
- }
- }
- }
- }
-
- return ret;
- };
-}
-
-var eventAdd = jQuery.event.add,
- eventRemove = jQuery.event.remove,
- eventTrigger = jQuery.event.trigger,
- oldToggle = jQuery.fn.toggle,
- oldLive = jQuery.fn.live,
- oldDie = jQuery.fn.die,
- ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
- rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
- rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
- hoverHack = function( events ) {
- if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
- return events;
- }
- if ( rhoverHack.test( events ) ) {
- migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
- }
- return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-// Event props removed in 1.9, put them back if needed; no practical way to warn them
-if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
- jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
-}
-
-// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
-if ( jQuery.event.dispatch ) {
- migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
-}
-
-// Support for 'hover' pseudo-event and ajax event warnings
-jQuery.event.add = function( elem, types, handler, data, selector ){
- if ( elem !== document && rajaxEvent.test( types ) ) {
- migrateWarn( "AJAX events should be attached to document: " + types );
- }
- eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
-};
-jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
- eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
-};
-
-jQuery.fn.error = function() {
- var args = Array.prototype.slice.call( arguments, 0);
- migrateWarn("jQuery.fn.error() is deprecated");
- args.splice( 0, 0, "error" );
- if ( arguments.length ) {
- return this.bind.apply( this, args );
- }
- // error event should not bubble to window, although it does pre-1.7
- this.triggerHandler.apply( this, args );
- return this;
-};
-
-jQuery.fn.toggle = function( fn, fn2 ) {
-
- // Don't mess with animation or css toggles
- if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
- return oldToggle.apply( this, arguments );
- }
- migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
-
- // Save reference to arguments for access in closure
- var args = arguments,
- guid = fn.guid || jQuery.guid++,
- i = 0,
- toggler = function( event ) {
- // Figure out which function to execute
- var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
- jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ lastToggle ].apply( this, arguments ) || false;
- };
-
- // link all the functions, so any of them can unbind this click handler
- toggler.guid = guid;
- while ( i < args.length ) {
- args[ i++ ].guid = guid;
- }
-
- return this.click( toggler );
-};
-
-jQuery.fn.live = function( types, data, fn ) {
- migrateWarn("jQuery.fn.live() is deprecated");
- if ( oldLive ) {
- return oldLive.apply( this, arguments );
- }
- jQuery( this.context ).on( types, this.selector, data, fn );
- return this;
-};
-
-jQuery.fn.die = function( types, fn ) {
- migrateWarn("jQuery.fn.die() is deprecated");
- if ( oldDie ) {
- return oldDie.apply( this, arguments );
- }
- jQuery( this.context ).off( types, this.selector || "**", fn );
- return this;
-};
-
-// Turn global events into document-triggered events
-jQuery.event.trigger = function( event, data, elem, onlyHandlers ){
- if ( !elem && !rajaxEvent.test( event ) ) {
- migrateWarn( "Global events are undocumented and deprecated" );
- }
- return eventTrigger.call( this, event, data, elem || document, onlyHandlers );
-};
-jQuery.each( ajaxEvents.split("|"),
- function( _, name ) {
- jQuery.event.special[ name ] = {
- setup: function() {
- var elem = this;
-
- // The document needs no shimming; must be !== for oldIE
- if ( elem !== document ) {
- jQuery.event.add( document, name + "." + jQuery.guid, function() {
- jQuery.event.trigger( name, null, elem, true );
- });
- jQuery._data( this, name, jQuery.guid++ );
- }
- return false;
- },
- teardown: function() {
- if ( this !== document ) {
- jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
- }
- return false;
- }
- };
- }
-);
-
-
-})( jQuery, window );
diff --git a/wp-includes/js/jquery/jquery-migrate.min.js b/wp-includes/js/jquery/jquery-migrate.min.js
deleted file mode 100644
index 8b7ec47a2d..0000000000
--- a/wp-includes/js/jquery/jquery-migrate.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
-jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.color.min.js b/wp-includes/js/jquery/jquery.color.min.js
deleted file mode 100644
index d0dbfa83ff..0000000000
--- a/wp-includes/js/jquery/jquery.color.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery Color v@2.1.1 with SVG Color Names http://github.com/jquery/jquery-color | jquery.org/license */
-(function(a,b){function m(a,b,c){var d=h[b.type]||{};return a==null?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function n(b){var c=f(),d=c._rgba=[];return b=b.toLowerCase(),l(e,function(a,e){var f,h=e.re.exec(b),i=h&&e.parse(h),j=e.space||"rgba";if(i)return f=c[j](i),c[g[j].cache]=f[g[j].cache],d=c._rgba=f._rgba,!1}),d.length?(d.join()==="0,0,0,0"&&a.extend(d,k.transparent),c):k[b]}function o(a,b,c){return c=(c+1)%1,c*6<1?a+(b-a)*c*6:c*2<1?b:c*3<2?a+(b-a)*(2/3-c)*6:a}var c="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1]*2.55,a[2]*2.55,a[3]*2.55,a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},g={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},i=f.support={},j=a("<p>")[0],k,l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;if(c.jquery||c.nodeType)c=a(c).css(d),d=b;var i=this,j=a.type(c),o=this._rgba=[];d!==b&&(c=[c,d,e,h],j="array");if(j==="string")return this.parse(n(c)||k._default);if(j==="array")return l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this;if(j==="object")return c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if(a==="alpha"||c[a]==null)return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(g[b.idx]!=null)return c=g[b.idx]===f[b.idx],c})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=this.alpha()===0?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};if(g===null)return;f===null?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d))}),this[d](k)},blend:function(b){if(this._rgba[3]===1)return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return a==null?b>2?1:0:a});return c[3]===1&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return a==null&&(a=b>2?1:0),b&&b<3&&(a=Math.round(a*100)+"%"),a});return c[3]===1&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(d*255)),"#"+a.map(c,function(a){return a=(a||0).toString(16),a.length===1?"0"+a:a}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=i*.5,k,l;return g===f?k=0:b===f?k=60*(c-d)/h+360:c===f?k=60*(d-b)/h+120:k=60*(b-c)/h+240,h===0?l=0:j<=.5?l=h/i:l=h/(2-i),[Math.round(k)%360,l,j,e==null?1:e]},g.hsla.from=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(o(g,f,b+1/3)*255),Math.round(o(g,f,b)*255),Math.round(o(g,f,b-1/3)*255),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){i&&!this[h]&&(this[h]=i(this._rgba));if(c===b)return this[h].slice();var d,e=a.type(c),k=e==="array"||e==="object"?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k[e==="object"?a:b.idx];c==null&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){if(f.fn[b])return;f.fn[b]=function(f){var g=a.type(f),h=b==="alpha"?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx],k;return g==="undefined"?j:(g==="function"&&(f=f.call(this,j),g=a.type(f)),f==null&&e.empty?this:(g==="string"&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*(k[1]==="+"?1:-1))),i[e.idx]=f,this[h](i)))}})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if(a.type(d)!=="string"||(e=n(d))){d=f(e||d);if(!i.rgba&&d._rgba[3]!==1){g=c==="backgroundColor"?b.parentNode:b;while((h===""||h==="transparent")&&g&&g.style)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(j){}d=d.blend(h&&h!=="transparent"?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(j){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery),jQuery.extend(jQuery.Color.names,{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32"});
diff --git a/wp-includes/js/jquery/jquery.form.js b/wp-includes/js/jquery/jquery.form.js
deleted file mode 100644
index d0cb23c238..0000000000
--- a/wp-includes/js/jquery/jquery.form.js
+++ /dev/null
@@ -1,825 +0,0 @@
-/*!
- * jQuery Form Plugin
- * version: 2.73 (03-MAY-2011)
- * @requires jQuery v1.3.2 or later
- *
- * Examples and documentation at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-;(function($) {
-
-/*
- Usage Note:
- -----------
- Do not use both ajaxSubmit and ajaxForm on the same form. These
- functions are intended to be exclusive. Use ajaxSubmit if you want
- to bind your own submit handler to the form. For example,
-
- $(document).ready(function() {
- $('#myForm').bind('submit', function(e) {
- e.preventDefault(); // <-- important
- $(this).ajaxSubmit({
- target: '#output'
- });
- });
- });
-
- Use ajaxForm when you want the plugin to manage all the event binding
- for you. For example,
-
- $(document).ready(function() {
- $('#myForm').ajaxForm({
- target: '#output'
- });
- });
-
- When using ajaxForm, the ajaxSubmit function will be invoked for you
- at the appropriate time.
-*/
-
-/**
- * ajaxSubmit() provides a mechanism for immediately submitting
- * an HTML form using AJAX.
- */
-$.fn.ajaxSubmit = function(options) {
- // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
- if (!this.length) {
- log('ajaxSubmit: skipping submit process - no element selected');
- return this;
- }
-
- if (typeof options == 'function') {
- options = { success: options };
- }
-
- var action = this.attr('action');
- var url = (typeof action === 'string') ? $.trim(action) : '';
- if (url) {
- // clean url (don't include hash vaue)
- url = (url.match(/^([^#]+)/)||[])[1];
- }
- url = url || window.location.href || '';
-
- options = $.extend(true, {
- url: url,
- success: $.ajaxSettings.success,
- type: this[0].getAttribute('method') || 'GET', // IE7 massage (see issue 57)
- iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
- }, options);
-
- // hook for manipulating the form data before it is extracted;
- // convenient for use with rich editors like tinyMCE or FCKEditor
- var veto = {};
- this.trigger('form-pre-serialize', [this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
- return this;
- }
-
- // provide opportunity to alter form data before it is serialized
- if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSerialize callback');
- return this;
- }
-
- var n,v,a = this.formToArray(options.semantic);
- if (options.data) {
- options.extraData = options.data;
- for (n in options.data) {
- if(options.data[n] instanceof Array) {
- for (var k in options.data[n]) {
- a.push( { name: n, value: options.data[n][k] } );
- }
- }
- else {
- v = options.data[n];
- v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
- a.push( { name: n, value: v } );
- }
- }
- }
-
- // give pre-submit callback an opportunity to abort the submit
- if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSubmit callback');
- return this;
- }
-
- // fire vetoable 'validate' event
- this.trigger('form-submit-validate', [a, this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
- return this;
- }
-
- var q = $.param(a);
-
- if (options.type.toUpperCase() == 'GET') {
- options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
- options.data = null; // data is null for 'get'
- }
- else {
- options.data = q; // data is the query string for 'post'
- }
-
- var $form = this, callbacks = [];
- if (options.resetForm) {
- callbacks.push(function() { $form.resetForm(); });
- }
- if (options.clearForm) {
- callbacks.push(function() { $form.clearForm(); });
- }
-
- // perform a load on the target only if dataType is not provided
- if (!options.dataType && options.target) {
- var oldSuccess = options.success || function(){};
- callbacks.push(function(data) {
- var fn = options.replaceTarget ? 'replaceWith' : 'html';
- $(options.target)[fn](data).each(oldSuccess, arguments);
- });
- }
- else if (options.success) {
- callbacks.push(options.success);
- }
-
- options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
- var context = options.context || options; // jQuery 1.4+ supports scope context
- for (var i=0, max=callbacks.length; i < max; i++) {
- callbacks[i].apply(context, [data, status, xhr || $form, $form]);
- }
- };
-
- // are there files to upload?
- var fileInputs = $('input:file', this).length > 0;
- var mp = 'multipart/form-data';
- var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
-
- // options.iframe allows user to force iframe mode
- // 06-NOV-09: now defaulting to iframe mode if file input is detected
- if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
- // hack to fix Safari hang (thanks to Tim Molendijk for this)
- // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
- if (options.closeKeepAlive) {
- $.get(options.closeKeepAlive, fileUpload);
- }
- else {
- fileUpload();
- }
- }
- else {
- $.ajax(options);
- }
-
- // fire 'notify' event
- this.trigger('form-submit-notify', [this, options]);
- return this;
-
-
- // private function for handling file uploads (hat tip to YAHOO!)
- function fileUpload() {
- var form = $form[0];
-
- if ($(':input[name=submit],:input[id=submit]', form).length) {
- // if there is an input with a name or id of 'submit' then we won't be
- // able to invoke the submit fn on the form (at least not x-browser)
- alert('Error: Form elements must not have name or id of "submit".');
- return;
- }
-
- var s = $.extend(true, {}, $.ajaxSettings, options);
- s.context = s.context || s;
- var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
- var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ s.iframeSrc +'" />');
- var io = $io[0];
-
- $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
-
- var xhr = { // mock object
- aborted: 0,
- responseText: null,
- responseXML: null,
- status: 0,
- statusText: 'n/a',
- getAllResponseHeaders: function() {},
- getResponseHeader: function() {},
- setRequestHeader: function() {},
- abort: function(status) {
- var e = (status === 'timeout' ? 'timeout' : 'aborted');
- log('aborting upload... ' + e);
- this.aborted = 1;
- $io.attr('src', s.iframeSrc); // abort op in progress
- xhr.error = e;
- s.error && s.error.call(s.context, xhr, e, e);
- g && $.event.trigger("ajaxError", [xhr, s, e]);
- s.complete && s.complete.call(s.context, xhr, e);
- }
- };
-
- var g = s.global;
- // trigger ajax global events so that activity/block indicators work like normal
- if (g && ! $.active++) {
- $.event.trigger("ajaxStart");
- }
- if (g) {
- $.event.trigger("ajaxSend", [xhr, s]);
- }
-
- if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
- if (s.global) {
- $.active--;
- }
- return;
- }
- if (xhr.aborted) {
- return;
- }
-
- var timedOut = 0, timeoutHandle;
-
- // add submitting element to data if we know it
- var sub = form.clk;
- if (sub) {
- var n = sub.name;
- if (n && !sub.disabled) {
- s.extraData = s.extraData || {};
- s.extraData[n] = sub.value;
- if (sub.type == "image") {
- s.extraData[n+'.x'] = form.clk_x;
- s.extraData[n+'.y'] = form.clk_y;
- }
- }
- }
-
- // take a breath so that pending repaints get some cpu time before the upload starts
- function doSubmit() {
- // make sure form attrs are set
- var t = $form.attr('target'), a = $form.attr('action');
-
- // update form attrs in IE friendly way
- form.setAttribute('target',id);
- if (form.getAttribute('method') != 'POST') {
- form.setAttribute('method', 'POST');
- }
- if (form.getAttribute('action') != s.url) {
- form.setAttribute('action', s.url);
- }
-
- // ie borks in some cases when setting encoding
- if (! s.skipEncodingOverride) {
- $form.attr({
- encoding: 'multipart/form-data',
- enctype: 'multipart/form-data'
- });
- }
-
- // support timout
- if (s.timeout) {
- timeoutHandle = setTimeout(function() { timedOut = true; cb(true); }, s.timeout);
- }
-
- // add "extra" data to form if provided in options
- var extraInputs = [];
- try {
- if (s.extraData) {
- for (var n in s.extraData) {
- extraInputs.push(
- $('<input type="hidden" name="'+n+'" value="'+s.extraData[n]+'" />')
- .appendTo(form)[0]);
- }
- }
-
- // add iframe to doc and submit the form
- $io.appendTo('body');
- io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
- form.submit();
- }
- finally {
- // reset attrs and remove "extra" input elements
- form.setAttribute('action',a);
- if(t) {
- form.setAttribute('target', t);
- } else {
- $form.removeAttr('target');
- }
- $(extraInputs).remove();
- }
- }
-
- if (s.forceSync) {
- doSubmit();
- }
- else {
- setTimeout(doSubmit, 10); // this lets dom updates render
- }
-
- var data, doc, domCheckCount = 50, callbackProcessed;
-
- function cb(e) {
- if (xhr.aborted || callbackProcessed) {
- return;
- }
- if (e === true && xhr) {
- xhr.abort('timeout');
- return;
- }
-
- var doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
- if (!doc || doc.location.href == s.iframeSrc) {
- // response not received yet
- if (!timedOut)
- return;
- }
- io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
-
- var ok = true;
- try {
- if (timedOut) {
- throw 'timeout';
- }
-
- var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
- log('isXml='+isXml);
- if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
- if (--domCheckCount) {
- // in some browsers (Opera) the iframe DOM is not always traversable when
- // the onload callback fires, so we loop a bit to accommodate
- log('requeing onLoad callback, DOM not available');
- setTimeout(cb, 250);
- return;
- }
- // let this fall through because server response could be an empty document
- //log('Could not access iframe DOM after mutiple tries.');
- //throw 'DOMException: not available';
- }
-
- //log('response detected');
- xhr.responseText = doc.body ? doc.body.innerHTML : doc.documentElement ? doc.documentElement.innerHTML : null;
- xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
- if (isXml)
- s.dataType = 'xml';
- xhr.getResponseHeader = function(header){
- var headers = {'content-type': s.dataType};
- return headers[header];
- };
-
- var scr = /(json|script|text)/.test(s.dataType);
- if (scr || s.textarea) {
- // see if user embedded response in textarea
- var ta = doc.getElementsByTagName('textarea')[0];
- if (ta) {
- xhr.responseText = ta.value;
- }
- else if (scr) {
- // account for browsers injecting pre around json response
- var pre = doc.getElementsByTagName('pre')[0];
- var b = doc.getElementsByTagName('body')[0];
- if (pre) {
- xhr.responseText = pre.textContent;
- }
- else if (b) {
- xhr.responseText = b.innerHTML;
- }
- }
- }
- else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
- xhr.responseXML = toXml(xhr.responseText);
- }
-
- data = httpData(xhr, s.dataType, s);
- }
- catch(e){
- log('error caught:',e);
- ok = false;
- xhr.error = e;
- s.error && s.error.call(s.context, xhr, 'error', e);
- g && $.event.trigger("ajaxError", [xhr, s, e]);
- }
-
- if (xhr.aborted) {
- log('upload aborted');
- ok = false;
- }
-
- // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
- if (ok) {
- s.success && s.success.call(s.context, data, 'success', xhr);
- g && $.event.trigger("ajaxSuccess", [xhr, s]);
- }
-
- g && $.event.trigger("ajaxComplete", [xhr, s]);
-
- if (g && ! --$.active) {
- $.event.trigger("ajaxStop");
- }
-
- s.complete && s.complete.call(s.context, xhr, ok ? 'success' : 'error');
-
- callbackProcessed = true;
- if (s.timeout)
- clearTimeout(timeoutHandle);
-
- // clean up
- setTimeout(function() {
- $io.removeData('form-plugin-onload');
- $io.remove();
- xhr.responseXML = null;
- }, 100);
- }
-
- var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
- if (window.ActiveXObject) {
- doc = new ActiveXObject('Microsoft.XMLDOM');
- doc.async = 'false';
- doc.loadXML(s);
- }
- else {
- doc = (new DOMParser()).parseFromString(s, 'text/xml');
- }
- return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
- };
- var parseJSON = $.parseJSON || function(s) {
- return window['eval']('(' + s + ')');
- };
-
- var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
- var ct = xhr.getResponseHeader('content-type') || '',
- xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
- data = xml ? xhr.responseXML : xhr.responseText;
-
- if (xml && data.documentElement.nodeName === 'parsererror') {
- $.error && $.error('parsererror');
- }
- if (s && s.dataFilter) {
- data = s.dataFilter(data, type);
- }
- if (typeof data === 'string') {
- if (type === 'json' || !type && ct.indexOf('json') >= 0) {
- data = parseJSON(data);
- } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
- $.globalEval(data);
- }
- }
- return data;
- };
- }
-};
-
-/**
- * ajaxForm() provides a mechanism for fully automating form submission.
- *
- * The advantages of using this method instead of ajaxSubmit() are:
- *
- * 1: This method will include coordinates for <input type="image" /> elements (if the element
- * is used to submit the form).
- * 2. This method will include the submit element's name/value data (for the element that was
- * used to submit the form).
- * 3. This method binds the submit() method to the form for you.
- *
- * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
- * passes the options argument along after properly binding events for submit elements and
- * the form itself.
- */
-$.fn.ajaxForm = function(options) {
- // in jQuery 1.3+ we can fix mistakes with the ready state
- if (this.length === 0) {
- var o = { s: this.selector, c: this.context };
- if (!$.isReady && o.s) {
- log('DOM not ready, queuing ajaxForm');
- $(function() {
- $(o.s,o.c).ajaxForm(options);
- });
- return this;
- }
- // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
- log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
- return this;
- }
-
- return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
- if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
- e.preventDefault();
- $(this).ajaxSubmit(options);
- }
- }).bind('click.form-plugin', function(e) {
- var target = e.target;
- var $el = $(target);
- if (!($el.is(":submit,input:image"))) {
- // is this a child element of the submit el? (ex: a span within a button)
- var t = $el.closest(':submit');
- if (t.length == 0) {
- return;
- }
- target = t[0];
- }
- var form = this;
- form.clk = target;
- if (target.type == 'image') {
- if (e.offsetX != undefined) {
- form.clk_x = e.offsetX;
- form.clk_y = e.offsetY;
- } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
- var offset = $el.offset();
- form.clk_x = e.pageX - offset.left;
- form.clk_y = e.pageY - offset.top;
- } else {
- form.clk_x = e.pageX - target.offsetLeft;
- form.clk_y = e.pageY - target.offsetTop;
- }
- }
- // clear form vars
- setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
- });
-};
-
-// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
-$.fn.ajaxFormUnbind = function() {
- return this.unbind('submit.form-plugin click.form-plugin');
-};
-
-/**
- * formToArray() gathers form element data into an array of objects that can
- * be passed to any of the following ajax functions: $.get, $.post, or load.
- * Each object in the array has both a 'name' and 'value' property. An example of
- * an array for a simple login form might be:
- *
- * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
- *
- * It is this array that is passed to pre-submit callback functions provided to the
- * ajaxSubmit() and ajaxForm() methods.
- */
-$.fn.formToArray = function(semantic) {
- var a = [];
- if (this.length === 0) {
- return a;
- }
-
- var form = this[0];
- var els = semantic ? form.getElementsByTagName('*') : form.elements;
- if (!els) {
- return a;
- }
-
- var i,j,n,v,el,max,jmax;
- for(i=0, max=els.length; i < max; i++) {
- el = els[i];
- n = el.name;
- if (!n) {
- continue;
- }
-
- if (semantic && form.clk && el.type == "image") {
- // handle image inputs on the fly when semantic == true
- if(!el.disabled && form.clk == el) {
- a.push({name: n, value: $(el).val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- continue;
- }
-
- v = $.fieldValue(el, true);
- if (v && v.constructor == Array) {
- for(j=0, jmax=v.length; j < jmax; j++) {
- a.push({name: n, value: v[j]});
- }
- }
- else if (v !== null && typeof v != 'undefined') {
- a.push({name: n, value: v});
- }
- }
-
- if (!semantic && form.clk) {
- // input type=='image' are not found in elements array! handle it here
- var $input = $(form.clk), input = $input[0];
- n = input.name;
- if (n && !input.disabled && input.type == 'image') {
- a.push({name: n, value: $input.val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- }
- return a;
-};
-
-/**
- * Serializes form data into a 'submittable' string. This method will return a string
- * in the format: name1=value1&amp;name2=value2
- */
-$.fn.formSerialize = function(semantic) {
- //hand off to jQuery.param for proper encoding
- return $.param(this.formToArray(semantic));
-};
-
-/**
- * Serializes all field elements in the jQuery object into a query string.
- * This method will return a string in the format: name1=value1&amp;name2=value2
- */
-$.fn.fieldSerialize = function(successful) {
- var a = [];
- this.each(function() {
- var n = this.name;
- if (!n) {
- return;
- }
- var v = $.fieldValue(this, successful);
- if (v && v.constructor == Array) {
- for (var i=0,max=v.length; i < max; i++) {
- a.push({name: n, value: v[i]});
- }
- }
- else if (v !== null && typeof v != 'undefined') {
- a.push({name: this.name, value: v});
- }
- });
- //hand off to jQuery.param for proper encoding
- return $.param(a);
-};
-
-/**
- * Returns the value(s) of the element in the matched set. For example, consider the following form:
- *
- * <form><fieldset>
- * <input name="A" type="text" />
- * <input name="A" type="text" />
- * <input name="B" type="checkbox" value="B1" />
- * <input name="B" type="checkbox" value="B2"/>
- * <input name="C" type="radio" value="C1" />
- * <input name="C" type="radio" value="C2" />
- * </fieldset></form>
- *
- * var v = $(':text').fieldValue();
- * // if no values are entered into the text inputs
- * v == ['','']
- * // if values entered into the text inputs are 'foo' and 'bar'
- * v == ['foo','bar']
- *
- * var v = $(':checkbox').fieldValue();
- * // if neither checkbox is checked
- * v === undefined
- * // if both checkboxes are checked
- * v == ['B1', 'B2']
- *
- * var v = $(':radio').fieldValue();
- * // if neither radio is checked
- * v === undefined
- * // if first radio is checked
- * v == ['C1']
- *
- * The successful argument controls whether or not the field element must be 'successful'
- * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true. If this value is false the value(s)
- * for each element is returned.
- *
- * Note: This method *always* returns an array. If no valid value can be determined the
- * array will be empty, otherwise it will contain one or more values.
- */
-$.fn.fieldValue = function(successful) {
- for (var val=[], i=0, max=this.length; i < max; i++) {
- var el = this[i];
- var v = $.fieldValue(el, successful);
- if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
- continue;
- }
- v.constructor == Array ? $.merge(val, v) : val.push(v);
- }
- return val;
-};
-
-/**
- * Returns the value of the field element.
- */
-$.fieldValue = function(el, successful) {
- var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
- if (successful === undefined) {
- successful = true;
- }
-
- if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
- (t == 'checkbox' || t == 'radio') && !el.checked ||
- (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
- tag == 'select' && el.selectedIndex == -1)) {
- return null;
- }
-
- if (tag == 'select') {
- var index = el.selectedIndex;
- if (index < 0) {
- return null;
- }
- var a = [], ops = el.options;
- var one = (t == 'select-one');
- var max = (one ? index+1 : ops.length);
- for(var i=(one ? index : 0); i < max; i++) {
- var op = ops[i];
- if (op.selected) {
- var v = op.value;
- if (!v) { // extra pain for IE...
- v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
- }
- if (one) {
- return v;
- }
- a.push(v);
- }
- }
- return a;
- }
- return $(el).val();
-};
-
-/**
- * Clears the form data. Takes the following actions on the form's input fields:
- * - input text fields will have their 'value' property set to the empty string
- * - select elements will have their 'selectedIndex' property set to -1
- * - checkbox and radio inputs will have their 'checked' property set to false
- * - inputs of type submit, button, reset, and hidden will *not* be effected
- * - button elements will *not* be effected
- */
-$.fn.clearForm = function() {
- return this.each(function() {
- $('input,select,textarea', this).clearFields();
- });
-};
-
-/**
- * Clears the selected form elements.
- */
-$.fn.clearFields = $.fn.clearInputs = function() {
- return this.each(function() {
- var t = this.type, tag = this.tagName.toLowerCase();
- if (t == 'text' || t == 'password' || tag == 'textarea') {
- this.value = '';
- }
- else if (t == 'checkbox' || t == 'radio') {
- this.checked = false;
- }
- else if (tag == 'select') {
- this.selectedIndex = -1;
- }
- });
-};
-
-/**
- * Resets the form data. Causes all form elements to be reset to their original value.
- */
-$.fn.resetForm = function() {
- return this.each(function() {
- // guard against an input with the name of 'reset'
- // note that IE reports the reset function as an 'object'
- if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
- this.reset();
- }
- });
-};
-
-/**
- * Enables or disables any matching elements.
- */
-$.fn.enable = function(b) {
- if (b === undefined) {
- b = true;
- }
- return this.each(function() {
- this.disabled = !b;
- });
-};
-
-/**
- * Checks/unchecks any matching checkboxes or radio buttons and
- * selects/deselects and matching option elements.
- */
-$.fn.selected = function(select) {
- if (select === undefined) {
- select = true;
- }
- return this.each(function() {
- var t = this.type;
- if (t == 'checkbox' || t == 'radio') {
- this.checked = select;
- }
- else if (this.tagName.toLowerCase() == 'option') {
- var $sel = $(this).parent('select');
- if (select && $sel[0] && $sel[0].type == 'select-one') {
- // deselect all other options
- $sel.find('option').selected(false);
- }
- this.selected = select;
- }
- });
-};
-
-// helper fn for console logging
-// set $.fn.ajaxSubmit.debug to true to enable debug logging
-function log() {
- if ($.fn.ajaxSubmit.debug) {
- var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
- if (window.console && window.console.log) {
- window.console.log(msg);
- }
- else if (window.opera && window.opera.postError) {
- window.opera.postError(msg);
- }
- }
-};
-
-})(jQuery);
diff --git a/wp-includes/js/jquery/jquery.form.min.js b/wp-includes/js/jquery/jquery.form.min.js
deleted file mode 100644
index 45ddd2f6c8..0000000000
--- a/wp-includes/js/jquery/jquery.form.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * jQuery Form Plugin
- * version: 2.73 (03-MAY-2011)
- * @requires jQuery v1.3.2 or later
- *
- * Examples and documentation at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-(function(b){b.fn.ajaxSubmit=function(t){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof t=="function"){t={success:t}}var h=this.attr("action");var d=(typeof h==="string")?b.trim(h):"";if(d){d=(d.match(/^([^#]+)/)||[])[1]}d=d||window.location.href||"";t=b.extend(true,{url:d,success:b.ajaxSettings.success,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var u={};this.trigger("form-pre-serialize",[this,t,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(t.beforeSerialize&&t.beforeSerialize(this,t)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var f,p,m=this.formToArray(t.semantic);if(t.data){t.extraData=t.data;for(f in t.data){if(t.data[f] instanceof Array){for(var i in t.data[f]){m.push({name:f,value:t.data[f][i]})}}else{p=t.data[f];p=b.isFunction(p)?p():p;m.push({name:f,value:p})}}}if(t.beforeSubmit&&t.beforeSubmit(m,this,t)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[m,this,t,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var c=b.param(m);if(t.type.toUpperCase()=="GET"){t.url+=(t.url.indexOf("?")>=0?"&":"?")+c;t.data=null}else{t.data=c}var s=this,l=[];if(t.resetForm){l.push(function(){s.resetForm()})}if(t.clearForm){l.push(function(){s.clearForm()})}if(!t.dataType&&t.target){var r=t.success||function(){};l.push(function(n){var k=t.replaceTarget?"replaceWith":"html";b(t.target)[k](n).each(r,arguments)})}else{if(t.success){l.push(t.success)}}t.success=function(w,n,x){var v=t.context||t;for(var q=0,k=l.length;q<k;q++){l[q].apply(v,[w,n,x||s,s])}};var g=b("input:file",this).length>0;var e="multipart/form-data";var j=(s.attr("enctype")==e||s.attr("encoding")==e);if(t.iframe!==false&&(g||t.iframe||j)){if(t.closeKeepAlive){b.get(t.closeKeepAlive,o)}else{o()}}else{b.ajax(t)}this.trigger("form-submit-notify",[this,t]);return this;function o(){var v=s[0];if(b(":input[name=submit],:input[id=submit]",v).length){alert('Error: Form elements must not have name or id of "submit".');return}var D=b.extend(true,{},b.ajaxSettings,t);D.context=D.context||D;var G="jqFormIO"+(new Date().getTime()),A="_"+G;var x=b('<iframe id="'+G+'" name="'+G+'" src="'+D.iframeSrc+'" />');var B=x[0];x.css({position:"absolute",top:"-1000px",left:"-1000px"});var y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(n){var O=(n==="timeout"?"timeout":"aborted");a("aborting upload... "+O);this.aborted=1;x.attr("src",D.iframeSrc);y.error=O;D.error&&D.error.call(D.context,y,O,O);K&&b.event.trigger("ajaxError",[y,D,O]);D.complete&&D.complete.call(D.context,y,O)}};var K=D.global;if(K&&!b.active++){b.event.trigger("ajaxStart")}if(K){b.event.trigger("ajaxSend",[y,D])}if(D.beforeSend&&D.beforeSend.call(D.context,y,D)===false){if(D.global){b.active--}return}if(y.aborted){return}var J=0,C;var z=v.clk;if(z){var H=z.name;if(H&&!z.disabled){D.extraData=D.extraData||{};D.extraData[H]=z.value;if(z.type=="image"){D.extraData[H+".x"]=v.clk_x;D.extraData[H+".y"]=v.clk_y}}}function I(){var Q=s.attr("target"),O=s.attr("action");v.setAttribute("target",G);if(v.getAttribute("method")!="POST"){v.setAttribute("method","POST")}if(v.getAttribute("action")!=D.url){v.setAttribute("action",D.url)}if(!D.skipEncodingOverride){s.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(D.timeout){C=setTimeout(function(){J=true;F(true)},D.timeout)}var P=[];try{if(D.extraData){for(var R in D.extraData){P.push(b('<input type="hidden" name="'+R+'" value="'+D.extraData[R]+'" />').appendTo(v)[0])}}x.appendTo("body");B.attachEvent?B.attachEvent("onload",F):B.addEventListener("load",F,false);v.submit()}finally{v.setAttribute("action",O);if(Q){v.setAttribute("target",Q)}else{s.removeAttr("target")}b(P).remove()}}if(D.forceSync){I()}else{setTimeout(I,10)}var M,N,L=50,w;function F(T){if(y.aborted||w){return}if(T===true&&y){y.abort("timeout");return}var S=B.contentWindow?B.contentWindow.document:B.contentDocument?B.contentDocument:B.document;if(!S||S.location.href==D.iframeSrc){if(!J){return}}B.detachEvent?B.detachEvent("onload",F):B.removeEventListener("load",F,false);var P=true;try{if(J){throw"timeout"}var U=D.dataType=="xml"||S.XMLDocument||b.isXMLDoc(S);a("isXml="+U);if(!U&&window.opera&&(S.body==null||S.body.innerHTML=="")){if(--L){a("requeing onLoad callback, DOM not available");setTimeout(F,250);return}}y.responseText=S.body?S.body.innerHTML:S.documentElement?S.documentElement.innerHTML:null;y.responseXML=S.XMLDocument?S.XMLDocument:S;if(U){D.dataType="xml"}y.getResponseHeader=function(W){var V={"content-type":D.dataType};return V[W]};var R=/(json|script|text)/.test(D.dataType);if(R||D.textarea){var O=S.getElementsByTagName("textarea")[0];if(O){y.responseText=O.value}else{if(R){var Q=S.getElementsByTagName("pre")[0];var n=S.getElementsByTagName("body")[0];if(Q){y.responseText=Q.textContent}else{if(n){y.responseText=n.innerHTML}}}}}else{if(D.dataType=="xml"&&!y.responseXML&&y.responseText!=null){y.responseXML=E(y.responseText)}}M=k(y,D.dataType,D)}catch(T){a("error caught:",T);P=false;y.error=T;D.error&&D.error.call(D.context,y,"error",T);K&&b.event.trigger("ajaxError",[y,D,T])}if(y.aborted){a("upload aborted");P=false}if(P){D.success&&D.success.call(D.context,M,"success",y);K&&b.event.trigger("ajaxSuccess",[y,D])}K&&b.event.trigger("ajaxComplete",[y,D]);if(K&&!--b.active){b.event.trigger("ajaxStop")}D.complete&&D.complete.call(D.context,y,P?"success":"error");w=true;if(D.timeout){clearTimeout(C)}setTimeout(function(){x.removeData("form-plugin-onload");x.remove();y.responseXML=null},100)}var E=b.parseXML||function(n,O){if(window.ActiveXObject){O=new ActiveXObject("Microsoft.XMLDOM");O.async="false";O.loadXML(n)}else{O=(new DOMParser()).parseFromString(n,"text/xml")}return(O&&O.documentElement&&O.documentElement.nodeName!="parsererror")?O:null};var q=b.parseJSON||function(n){return window["eval"]("("+n+")")};var k=function(S,Q,P){var O=S.getResponseHeader("content-type")||"",n=Q==="xml"||!Q&&O.indexOf("xml")>=0,R=n?S.responseXML:S.responseText;if(n&&R.documentElement.nodeName==="parsererror"){b.error&&b.error("parsererror")}if(P&&P.dataFilter){R=P.dataFilter(R,Q)}if(typeof R==="string"){if(Q==="json"||!Q&&O.indexOf("json")>=0){R=q(R)}else{if(Q==="script"||!Q&&O.indexOf("javascript")>=0){b.globalEval(R)}}}return R}}};b.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!b.isReady&&d.s){a("DOM not ready, queuing ajaxForm");b(function(){b(d.s,d.c).ajaxForm(c)});return this}a("terminating; zero elements found by selector"+(b.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(f){if(!f.isDefaultPrevented()){f.preventDefault();b(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(j){var i=j.target;var g=b(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length==0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!=undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof b.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)})};b.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};b.fn.formToArray=function(q){var p=[];if(this.length===0){return p}var d=this[0];var g=q?d.getElementsByTagName("*"):d.elements;if(!g){return p}var k,h,f,r,e,m,c;for(k=0,m=g.length;k<m;k++){e=g[k];f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(h=0,c=r.length;h<c;h++){p.push({name:f,value:r[h]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0];f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(j===undefined){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return b(c).val()};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c===undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c===undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.hotkeys.js b/wp-includes/js/jquery/jquery.hotkeys.js
deleted file mode 100644
index 85fa1ffcb9..0000000000
--- a/wp-includes/js/jquery/jquery.hotkeys.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/******************************************************************************************************************************
-
- * @ Original idea by by Binny V A, Original version: 2.00.A
- * @ http://www.openjs.com/scripts/events/keyboard_shortcuts/
- * @ Original License : BSD
-
- * @ jQuery Plugin by Tzury Bar Yochay
- mail: tzury.by@gmail.com
- blog: evalinux.wordpress.com
- face: facebook.com/profile.php?id=513676303
-
- (c) Copyrights 2007
-
- * @ jQuery Plugin version Beta (0.0.2)
- * @ License: jQuery-License.
-
-TODO:
- add queue support (as in gmail) e.g. 'x' then 'y', etc.
- add mouse + mouse wheel events.
-
-USAGE:
- $.hotkeys.add('Ctrl+c', function(){ alert('copy anyone?');});
- $.hotkeys.add('Ctrl+c', {target:'div#editor', type:'keyup', propagate: true},function(){ alert('copy anyone?');});>
- $.hotkeys.remove('Ctrl+c');
- $.hotkeys.remove('Ctrl+c', {target:'div#editor', type:'keypress'});
-
-******************************************************************************************************************************/
-(function (jQuery){
- this.version = '(beta)(0.0.3)';
- this.all = {};
- this.special_keys = {
- 27: 'esc', 9: 'tab', 32:'space', 13: 'return', 8:'backspace', 145: 'scroll', 20: 'capslock',
- 144: 'numlock', 19:'pause', 45:'insert', 36:'home', 46:'del',35:'end', 33: 'pageup',
- 34:'pagedown', 37:'left', 38:'up', 39:'right',40:'down', 112:'f1',113:'f2', 114:'f3',
- 115:'f4', 116:'f5', 117:'f6', 118:'f7', 119:'f8', 120:'f9', 121:'f10', 122:'f11', 123:'f12'};
-
- this.shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&",
- "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<",
- ".":">", "/":"?", "\\":"|" };
-
- this.add = function(combi, options, callback) {
- if (jQuery.isFunction(options)){
- callback = options;
- options = {};
- }
- var opt = {},
- defaults = {type: 'keydown', propagate: false, disableInInput: false, target: jQuery('html')[0]},
- that = this;
- opt = jQuery.extend( opt , defaults, options || {} );
- combi = combi.toLowerCase();
-
- // inspect if keystroke matches
- var inspector = function(event) {
- // WP: not needed with newer jQuery
- // event = jQuery.event.fix(event); // jQuery event normalization.
- var element = event.target;
- // @ TextNode -> nodeType == 3
- // WP: not needed with newer jQuery
- // element = (element.nodeType==3) ? element.parentNode : element;
-
- if(opt['disableInInput']) { // Disable shortcut keys in Input, Textarea fields
- var target = jQuery(element);
- if( target.is("input") || target.is("textarea")){
- return;
- }
- }
- var code = event.which,
- type = event.type,
- character = String.fromCharCode(code).toLowerCase(),
- special = that.special_keys[code],
- shift = event.shiftKey,
- ctrl = event.ctrlKey,
- alt= event.altKey,
- meta = event.metaKey,
- propagate = true, // default behaivour
- mapPoint = null;
-
- // in opera + safari, the event.target is unpredictable.
- // for example: 'keydown' might be associated with HtmlBodyElement
- // or the element where you last clicked with your mouse.
- // WP: needed for all browsers
- // if (jQuery.browser.opera || jQuery.browser.safari){
- while (!that.all[element] && element.parentNode){
- element = element.parentNode;
- }
- // }
- var cbMap = that.all[element].events[type].callbackMap;
- if(!shift && !ctrl && !alt && !meta) { // No Modifiers
- mapPoint = cbMap[special] || cbMap[character]
- }
- // deals with combinaitons (alt|ctrl|shift+anything)
- else{
- var modif = '';
- if(alt) modif +='alt+';
- if(ctrl) modif+= 'ctrl+';
- if(shift) modif += 'shift+';
- if(meta) modif += 'meta+';
- // modifiers + special keys or modifiers + characters or modifiers + shift characters
- mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
- }
- if (mapPoint){
- mapPoint.cb(event);
- if(!mapPoint.propagate) {
- event.stopPropagation();
- event.preventDefault();
- return false;
- }
- }
- };
- // first hook for this element
- if (!this.all[opt.target]){
- this.all[opt.target] = {events:{}};
- }
- if (!this.all[opt.target].events[opt.type]){
- this.all[opt.target].events[opt.type] = {callbackMap: {}}
- jQuery.event.add(opt.target, opt.type, inspector);
- }
- this.all[opt.target].events[opt.type].callbackMap[combi] = {cb: callback, propagate:opt.propagate};
- return jQuery;
- };
- this.remove = function(exp, opt) {
- opt = opt || {};
- target = opt.target || jQuery('html')[0];
- type = opt.type || 'keydown';
- exp = exp.toLowerCase();
- delete this.all[target].events[type].callbackMap[exp]
- return jQuery;
- };
- jQuery.hotkeys = this;
- return jQuery;
-})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.hotkeys.min.js b/wp-includes/js/jquery/jquery.hotkeys.min.js
deleted file mode 100644
index 3c2f66aa62..0000000000
--- a/wp-includes/js/jquery/jquery.hotkeys.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){this.version="(beta)(0.0.3)";this.all={};this.special_keys={27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};this.shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"};this.add=function(c,b,h){if(a.isFunction(b)){h=b;b={}}var d={},f={type:"keydown",propagate:false,disableInInput:false,target:a("html")[0]},e=this;d=a.extend(d,f,b||{});c=c.toLowerCase();var g=function(j){var o=j.target;if(d.disableInInput){var s=a(o);if(s.is("input")||s.is("textarea")){return}}var l=j.which,u=j.type,r=String.fromCharCode(l).toLowerCase(),t=e.special_keys[l],m=j.shiftKey,i=j.ctrlKey,p=j.altKey,w=j.metaKey,q=true,k=null;while(!e.all[o]&&o.parentNode){o=o.parentNode}var v=e.all[o].events[u].callbackMap;if(!m&&!i&&!p&&!w){k=v[t]||v[r]}else{var n="";if(p){n+="alt+"}if(i){n+="ctrl+"}if(m){n+="shift+"}if(w){n+="meta+"}k=v[n+t]||v[n+r]||v[n+e.shift_nums[r]]}if(k){k.cb(j);if(!k.propagate){j.stopPropagation();j.preventDefault();return false}}};if(!this.all[d.target]){this.all[d.target]={events:{}}}if(!this.all[d.target].events[d.type]){this.all[d.target].events[d.type]={callbackMap:{}};a.event.add(d.target,d.type,g)}this.all[d.target].events[d.type].callbackMap[c]={cb:h,propagate:d.propagate};return a};this.remove=function(c,b){b=b||{};target=b.target||a("html")[0];type=b.type||"keydown";c=c.toLowerCase();delete this.all[target].events[type].callbackMap[c];return a};a.hotkeys=this;return a})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.js b/wp-includes/js/jquery/jquery.js
deleted file mode 100644
index 40c1aa1009..0000000000
--- a/wp-includes/js/jquery/jquery.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
-//@ sourceMappingURL=jquery-1.10.2.min.map
-*/
-(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
-}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
-u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
-jQuery.noConflict();
diff --git a/wp-includes/js/jquery/jquery.masonry.min.js b/wp-includes/js/jquery/jquery.masonry.min.js
deleted file mode 100644
index 67be98867b..0000000000
--- a/wp-includes/js/jquery/jquery.masonry.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * jQuery Masonry v2.1.05
- * A dynamic layout plugin for jQuery
- * The flip-side of CSS Floats
- * http://masonry.desandro.com
- *
- * Licensed under the MIT license.
- * Copyright 2012 David DeSandro
- */
-(function(a,b,c){"use strict";var d=b.event,e;d.special.smartresize={setup:function(){b(this).bind("resize",d.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",d.special.smartresize.handler)},handler:function(a,c){var d=this,f=arguments;a.type="smartresize",e&&clearTimeout(e),e=setTimeout(function(){b.event.handle.apply(d,f)},c==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Mason=function(a,c){this.element=b(c),this._create(a),this._init()},b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}},b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return b?a.filter(b).add(a.find(b)):a},_getBricks:function(a){var b=this._filterFindBricks(a).css({position:"absolute"}).addClass("masonry-brick");return b},_create:function(c){this.options=b.extend(!0,{},b.Mason.settings,c),this.styleQueue=[];var d=this.element[0].style;this.originalStyle={height:d.height||""};var e=this.options.containerStyle;for(var f in e)this.originalStyle[f]=d[f]||"";this.element.css(e),this.horizontalDirection=this.options.isRTL?"right":"left",this.offset={x:parseInt(this.element.css("padding-"+this.horizontalDirection),10),y:parseInt(this.element.css("padding-top"),10)},this.isFluid=this.options.columnWidth&&typeof this.options.columnWidth=="function";var g=this;setTimeout(function(){g.element.addClass("masonry")},0),this.options.isResizable&&b(a).bind("smartresize.masonry",function(){g.resize()}),this.reloadItems()},_init:function(a){this._getColumns(),this._reLayout(a)},option:function(a,c){b.isPlainObject(a)&&(this.options=b.extend(!0,this.options,a))},layout:function(a,b){for(var c=0,d=a.length;c<d;c++)this._placeBrick(a[c]);var e={};e.height=Math.max.apply(Math,this.colYs);if(this.options.isFitWidth){var f=0;c=this.cols;while(--c){if(this.colYs[c]!==0)break;f++}e.width=(this.cols-f)*this.columnWidth-this.options.gutterWidth}this.styleQueue.push({$el:this.element,style:e});var g=this.isLaidOut?this.options.isAnimated?"animate":"css":"css",h=this.options.animationOptions,i;for(c=0,d=this.styleQueue.length;c<d;c++)i=this.styleQueue[c],i.$el[g](i.style,h);this.styleQueue=[],b&&b.call(a),this.isLaidOut=!0},_getColumns:function(){var a=this.options.isFitWidth?this.element.parent():this.element,b=a.width();this.columnWidth=this.isFluid?this.options.columnWidth(b):this.options.columnWidth||this.$bricks.outerWidth(!0)||b,this.columnWidth+=this.options.gutterWidth,this.cols=Math.floor((b+this.options.gutterWidth)/this.columnWidth),this.cols=Math.max(this.cols,1)},_placeBrick:function(a){var c=b(a),d,e,f,g,h;d=Math.ceil(c.outerWidth(!0)/this.columnWidth),d=Math.min(d,this.cols);if(d===1)f=this.colYs;else{e=this.cols+1-d,f=[];for(h=0;h<e;h++)g=this.colYs.slice(h,h+d),f[h]=Math.max.apply(Math,g)}var i=Math.min.apply(Math,f),j=0;for(var k=0,l=f.length;k<l;k++)if(f[k]===i){j=k;break}var m={top:i+this.offset.y};m[this.horizontalDirection]=this.columnWidth*j+this.offset.x,this.styleQueue.push({$el:c,style:m});var n=i+c.outerHeight(!0),o=this.cols+1-l;for(k=0;k<o;k++)this.colYs[j+k]=n},resize:function(){var a=this.cols;this._getColumns(),(this.isFluid||this.cols!==a)&&this._reLayout()},_reLayout:function(a){var b=this.cols;this.colYs=[];while(b--)this.colYs.push(0);this.layout(this.$bricks,a)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(a){this.reloadItems(),this._init(a)},appended:function(a,b,c){if(b){this._filterFindBricks(a).css({top:this.element.height()});var d=this;setTimeout(function(){d._appended(a,c)},1)}else this._appended(a,c)},_appended:function(a,b){var c=this._getBricks(a);this.$bricks=this.$bricks.add(c),this.layout(c,b)},remove:function(a){this.$bricks=this.$bricks.not(a),a.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="",this.style.top="",this.style.left=""});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"),b(a).unbind(".masonry")}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var f=function(b){a.console&&a.console.error(b)};b.fn.masonry=function(a){if(typeof a=="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"masonry");if(!d){f("cannot call methods on masonry prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(d[a])||a.charAt(0)==="_"){f("no such method '"+a+"' for masonry instance");return}d[a].apply(d,c)})}else this.each(function(){var c=b.data(this,"masonry");c?(c.option(a||{}),c._init()):b.data(this,"masonry",new b.Mason(a,this))});return this}})(window,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.query.js b/wp-includes/js/jquery/jquery.query.js
deleted file mode 100644
index ea5801ff2b..0000000000
--- a/wp-includes/js/jquery/jquery.query.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * jQuery.query - Query String Modification and Creation for jQuery
- * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
- * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
- * Date: 2009/8/13
- *
- * @author Blair Mitchelmore
- * @version 2.1.7
- *
- **/
-new function(e){var d=e.separator||"&";var c=e.spaces===false?false:true;var a=e.suffix===false?"":"[]";var g=e.prefix===false?false:true;var b=g?e.hash===true?"#":"?":"";var f=e.numbers===false?false:true;jQuery.query=new function(){var h=function(m,l){return m!=undefined&&m!==null&&(!!l?m.constructor==l:true)};var i=function(r){var l,q=/\[([^[]*)\]/g,n=/^([^[]+)(\[.*\])?$/.exec(r),o=n[1],p=[];while(l=q.exec(n[2])){p.push(l[1])}return[o,p]};var k=function(s,r,q){var t,p=r.shift();if(typeof s!="object"){s=null}if(p===""){if(!s){s=[]}if(h(s,Array)){s.push(r.length==0?q:k(null,r.slice(0),q))}else{if(h(s,Object)){var n=0;while(s[n++]!=null){}s[--n]=r.length==0?q:k(s[n],r.slice(0),q)}else{s=[];s.push(r.length==0?q:k(null,r.slice(0),q))}}}else{if(p&&p.match(/^\s*[0-9]+\s*$/)){var m=parseInt(p,10);if(!s){s=[]}s[m]=r.length==0?q:k(s[m],r.slice(0),q)}else{if(p){var m=p.replace(/^\s*|\s*$/g,"");if(!s){s={}}if(h(s,Array)){var l={};for(var n=0;n<s.length;++n){l[n]=s[n]}s=l}s[m]=r.length==0?q:k(s[m],r.slice(0),q)}else{return q}}}return s};var j=function(l){var m=this;m.keys={};if(l.queryObject){jQuery.each(l.get(),function(n,o){m.SET(n,o)})}else{jQuery.each(arguments,function(){var n=""+this;n=n.replace(/^[?#]/,"");n=n.replace(/[;&]$/,"");if(c){n=n.replace(/[+]/g," ")}jQuery.each(n.split(/[&;]/),function(){var o=decodeURIComponent(this.split("=")[0]||"");var p=decodeURIComponent(this.split("=")[1]||"");if(!o){return}if(f){if(/^[+-]?[0-9]+\.[0-9]*$/.test(p)){p=parseFloat(p)}else{if(/^[+-]?[0-9]+$/.test(p)){p=parseInt(p,10)}}}p=(!p&&p!==0)?true:p;if(p!==false&&p!==true&&typeof p!="number"){p=p}m.SET(o,p)})})}return m};j.prototype={queryObject:true,has:function(l,m){var n=this.get(l);return h(n,m)},GET:function(m){if(!h(m)){return this.keys}var l=i(m),n=l[0],p=l[1];var o=this.keys[n];while(o!=null&&p.length!=0){o=o[p.shift()]}return typeof o=="number"?o:o||""},get:function(l){var m=this.GET(l);if(h(m,Object)){return jQuery.extend(true,{},m)}else{if(h(m,Array)){return m.slice(0)}}return m},SET:function(m,r){var o=!h(r)?null:r;var l=i(m),n=l[0],q=l[1];var p=this.keys[n];this.keys[n]=k(p,q.slice(0),o);return this},set:function(l,m){return this.copy().SET(l,m)},REMOVE:function(l){return this.SET(l,null).COMPACT()},remove:function(l){return this.copy().REMOVE(l)},EMPTY:function(){var l=this;jQuery.each(l.keys,function(m,n){delete l.keys[m]});return l},load:function(l){var n=l.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");var m=l.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new j(l.length==m.length?"":m,l.length==n.length?"":n)},empty:function(){return this.copy().EMPTY()},copy:function(){return new j(this)},COMPACT:function(){function l(o){var n=typeof o=="object"?h(o,Array)?[]:{}:o;if(typeof o=="object"){function m(r,p,q){if(h(r,Array)){r.push(q)}else{r[p]=q}}jQuery.each(o,function(p,q){if(!h(q)){return true}m(n,p,l(q))})}return n}this.keys=l(this.keys);return this},compact:function(){return this.copy().COMPACT()},toString:function(){var n=0,r=[],q=[],m=this;var o=function(s){s=s+"";if(c){s=s.replace(/ /g,"+")}return encodeURIComponent(s)};var l=function(s,t,u){if(!h(u)||u===false){return}var v=[o(t)];if(u!==true){v.push("=");v.push(o(u))}s.push(v.join(""))};var p=function(t,s){var u=function(v){return !s||s==""?[v].join(""):[s,"[",v,"]"].join("")};jQuery.each(t,function(v,w){if(typeof w=="object"){p(w,u(v))}else{l(q,u(v),w)}})};p(this.keys);if(q.length>0){r.push(b)}r.push(q.join(d));return r.join("")}};return new j(location.search,location.hash)}}(jQuery.query||{});
diff --git a/wp-includes/js/jquery/jquery.schedule.js b/wp-includes/js/jquery/jquery.schedule.js
deleted file mode 100644
index f00e7b39e5..0000000000
--- a/wp-includes/js/jquery/jquery.schedule.js
+++ /dev/null
@@ -1,36 +0,0 @@
-
-(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""));};var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++;}
-if(typeof arguments[i]=="object"){for(var option in arguments[i])
-if(typeof ctx[option]!="undefined")
-ctx[option]=arguments[i][option];i++;}
-if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$"))))
-ctx["time"]=arguments[i++];if(typeof arguments[i]=="boolean")
-ctx["repeat"]=arguments[i++];if(typeof arguments[i]=="boolean")
-ctx["protect"]=arguments[i++];if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx["obj"]=arguments[i++];ctx["func"]=arguments[i++];}
-else if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string"))
-ctx["func"]=arguments[i++];while(typeof arguments[i]!="undefined")
-ctx["args"].push(arguments[i++]);if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0])
-if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined")
-ctx[option]=arguments[0][option];}
-else{for(var option in arguments[0])
-if(typeof ctx[option]!="undefined")
-ctx[option]=arguments[0][option];}
-i++;}
-ctx["_scheduler"]=this;ctx["_handle"]=null;var match=String(ctx["time"]).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined")
-ctx["time"]=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]]);if(ctx["id"]==null)
-ctx["id"]=(String(ctx["repeat"])+":"
-+String(ctx["protect"])+":"
-+String(ctx["time"])+":"
-+String(ctx["obj"])+":"
-+String(ctx["func"])+":"
-+String(ctx["args"]));if(ctx["protect"])
-if(typeof this.bucket[ctx["id"]]!="undefined")
-return this.bucket[ctx["id"]];if(!_isfn(ctx["func"])){if(ctx["obj"]!=null&&typeof ctx["obj"]=="object"&&typeof ctx["func"]=="string"&&_isfn(ctx["obj"][ctx["func"]]))
-ctx["func"]=ctx["obj"][ctx["func"]];else
-ctx["func"]=eval("function () { "+ctx["func"]+" }");}
-ctx["_handle"]=this._schedule(ctx);this.bucket[ctx["id"]]=ctx;return ctx;},reschedule:function(ctx){if(typeof ctx=="string")
-ctx=this.bucket[ctx];ctx["_handle"]=this._schedule(ctx);return ctx;},_schedule:function(ctx){var trampoline=function(){var obj=(ctx["obj"]!=null?ctx["obj"]:ctx);(ctx["func"]).apply(obj,ctx["args"]);if(typeof(ctx["_scheduler"]).bucket[ctx["id"]]!="undefined"&&ctx["repeat"])
-(ctx["_scheduler"])._schedule(ctx);else
-delete(ctx["_scheduler"]).bucket[ctx["id"]];};return setTimeout(trampoline,ctx["time"]);},cancel:function(ctx){if(typeof ctx=="string")
-ctx=this.bucket[ctx];if(typeof ctx=="object"){clearTimeout(ctx["_handle"]);delete this.bucket[ctx["id"]];}}};$.extend({scheduler$:new $.scheduler(),schedule:function(){return $.scheduler$.schedule.apply($.scheduler$,arguments)},reschedule:function(){return $.scheduler$.reschedule.apply($.scheduler$,arguments)},cancel:function(){return $.scheduler$.cancel.apply($.scheduler$,arguments)}});$.fn.extend({schedule:function(){var a=[{}];for(var i=0;i<arguments.length;i++)
-a.push(arguments[i]);return this.each(function(){a[0]={"id":this,"obj":this};return $.schedule.apply($,a);});}});})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.serialize-object.js b/wp-includes/js/jquery/jquery.serialize-object.js
deleted file mode 100644
index 03b905bf5b..0000000000
--- a/wp-includes/js/jquery/jquery.serialize-object.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*!
- * jQuery serializeObject - v0.2 - 1/20/2010
- * http://benalman.com/projects/jquery-misc-plugins/
- *
- * Copyright (c) 2010 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-
-// Whereas .serializeArray() serializes a form into an array, .serializeObject()
-// serializes a form into an (arguably more useful) object.
-
-(function($,undefined){
- '$:nomunge'; // Used by YUI compressor.
-
- $.fn.serializeObject = function(){
- var obj = {};
-
- $.each( this.serializeArray(), function(i,o){
- var n = o.name,
- v = o.value;
-
- obj[n] = obj[n] === undefined ? v
- : $.isArray( obj[n] ) ? obj[n].concat( v )
- : [ obj[n], v ];
- });
-
- return obj;
- };
-
-})(jQuery);
diff --git a/wp-includes/js/jquery/jquery.table-hotkeys.js b/wp-includes/js/jquery/jquery.table-hotkeys.js
deleted file mode 100644
index f8b17602e3..0000000000
--- a/wp-includes/js/jquery/jquery.table-hotkeys.js
+++ /dev/null
@@ -1,99 +0,0 @@
-(function($){
- $.fn.filter_visible = function(depth) {
- depth = depth || 3;
- var is_visible = function() {
- var p = $(this), i;
- for(i=0; i<depth-1; ++i) {
- if (!p.is(':visible')) return false;
- p = p.parent();
- }
- return true;
- }
- return this.filter(is_visible);
- };
- $.table_hotkeys = function(table, keys, opts) {
- opts = $.extend($.table_hotkeys.defaults, opts);
- var selected_class, destructive_class, set_current_row, adjacent_row_callback, get_adjacent_row, adjacent_row, prev_row, next_row, check, get_first_row, get_last_row, make_key_callback, first_row;
-
- selected_class = opts.class_prefix + opts.selected_suffix;
- destructive_class = opts.class_prefix + opts.destructive_suffix
- set_current_row = function (tr) {
- if ($.table_hotkeys.current_row) $.table_hotkeys.current_row.removeClass(selected_class);
- tr.addClass(selected_class);
- tr[0].scrollIntoView(false);
- $.table_hotkeys.current_row = tr;
- };
- adjacent_row_callback = function(which) {
- if (!adjacent_row(which) && $.isFunction(opts[which+'_page_link_cb'])) {
- opts[which+'_page_link_cb']();
- }
- };
- get_adjacent_row = function(which) {
- var first_row, method;
-
- if (!$.table_hotkeys.current_row) {
- first_row = get_first_row();
- $.table_hotkeys.current_row = first_row;
- return first_row[0];
- }
- method = 'prev' == which? $.fn.prevAll : $.fn.nextAll;
- return method.call($.table_hotkeys.current_row, opts.cycle_expr).filter_visible()[0];
- };
- adjacent_row = function(which) {
- var adj = get_adjacent_row(which);
- if (!adj) return false;
- set_current_row($(adj));
- return true;
- };
- prev_row = function() { return adjacent_row('prev'); };
- next_row = function() { return adjacent_row('next'); };
- check = function() {
- $(opts.checkbox_expr, $.table_hotkeys.current_row).each(function() {
- this.checked = !this.checked;
- });
- };
- get_first_row = function() {
- return $(opts.cycle_expr, table).filter_visible().eq(opts.start_row_index);
- };
- get_last_row = function() {
- var rows = $(opts.cycle_expr, table).filter_visible();
- return rows.eq(rows.length-1);
- };
- make_key_callback = function(expr) {
- return function() {
- if ( null == $.table_hotkeys.current_row ) return false;
- var clickable = $(expr, $.table_hotkeys.current_row);
- if (!clickable.length) return false;
- if (clickable.is('.'+destructive_class)) next_row() || prev_row();
- clickable.click();
- }
- };
- first_row = get_first_row();
- if (!first_row.length) return;
- if (opts.highlight_first)
- set_current_row(first_row);
- else if (opts.highlight_last)
- set_current_row(get_last_row());
- $.hotkeys.add(opts.prev_key, opts.hotkeys_opts, function() {return adjacent_row_callback('prev')});
- $.hotkeys.add(opts.next_key, opts.hotkeys_opts, function() {return adjacent_row_callback('next')});
- $.hotkeys.add(opts.mark_key, opts.hotkeys_opts, check);
- $.each(keys, function() {
- var callback, key;
-
- if ($.isFunction(this[1])) {
- callback = this[1];
- key = this[0];
- $.hotkeys.add(key, opts.hotkeys_opts, function(event) { return callback(event, $.table_hotkeys.current_row); });
- } else {
- key = this;
- $.hotkeys.add(key, opts.hotkeys_opts, make_key_callback('.'+opts.class_prefix+key));
- }
- });
-
- };
- $.table_hotkeys.current_row = null;
- $.table_hotkeys.defaults = {cycle_expr: 'tr', class_prefix: 'vim-', selected_suffix: 'current',
- destructive_suffix: 'destructive', hotkeys_opts: {disableInInput: true, type: 'keypress'},
- checkbox_expr: ':checkbox', next_key: 'j', prev_key: 'k', mark_key: 'x',
- start_row_index: 2, highlight_first: false, highlight_last: false, next_page_link_cb: false, prev_page_link_cb: false};
-})(jQuery);
diff --git a/wp-includes/js/jquery/jquery.table-hotkeys.min.js b/wp-includes/js/jquery/jquery.table-hotkeys.min.js
deleted file mode 100644
index b4aa238ebb..0000000000
--- a/wp-includes/js/jquery/jquery.table-hotkeys.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){a.fn.filter_visible=function(c){c=c||3;var b=function(){var e=a(this),d;for(d=0;d<c-1;++d){if(!e.is(":visible")){return false}e=e.parent()}return true};return this.filter(b)};a.table_hotkeys=function(p,q,b){b=a.extend(a.table_hotkeys.defaults,b);var i,l,e,f,m,d,k,o,c,h,g,n,j;i=b.class_prefix+b.selected_suffix;l=b.class_prefix+b.destructive_suffix;e=function(r){if(a.table_hotkeys.current_row){a.table_hotkeys.current_row.removeClass(i)}r.addClass(i);r[0].scrollIntoView(false);a.table_hotkeys.current_row=r};f=function(r){if(!d(r)&&a.isFunction(b[r+"_page_link_cb"])){b[r+"_page_link_cb"]()}};m=function(s){var r,t;if(!a.table_hotkeys.current_row){r=h();a.table_hotkeys.current_row=r;return r[0]}t="prev"==s?a.fn.prevAll:a.fn.nextAll;return t.call(a.table_hotkeys.current_row,b.cycle_expr).filter_visible()[0]};d=function(s){var r=m(s);if(!r){return false}e(a(r));return true};k=function(){return d("prev")};o=function(){return d("next")};c=function(){a(b.checkbox_expr,a.table_hotkeys.current_row).each(function(){this.checked=!this.checked})};h=function(){return a(b.cycle_expr,p).filter_visible().eq(b.start_row_index)};g=function(){var r=a(b.cycle_expr,p).filter_visible();return r.eq(r.length-1)};n=function(r){return function(){if(null==a.table_hotkeys.current_row){return false}var s=a(r,a.table_hotkeys.current_row);if(!s.length){return false}if(s.is("."+l)){o()||k()}s.click()}};j=h();if(!j.length){return}if(b.highlight_first){e(j)}else{if(b.highlight_last){e(g())}}a.hotkeys.add(b.prev_key,b.hotkeys_opts,function(){return f("prev")});a.hotkeys.add(b.next_key,b.hotkeys_opts,function(){return f("next")});a.hotkeys.add(b.mark_key,b.hotkeys_opts,c);a.each(q,function(){var s,r;if(a.isFunction(this[1])){s=this[1];r=this[0];a.hotkeys.add(r,b.hotkeys_opts,function(t){return s(t,a.table_hotkeys.current_row)})}else{r=this;a.hotkeys.add(r,b.hotkeys_opts,n("."+b.class_prefix+r))}})};a.table_hotkeys.current_row=null;a.table_hotkeys.defaults={cycle_expr:"tr",class_prefix:"vim-",selected_suffix:"current",destructive_suffix:"destructive",hotkeys_opts:{disableInInput:true,type:"keypress"},checkbox_expr:":checkbox",next_key:"j",prev_key:"k",mark_key:"x",start_row_index:2,highlight_first:false,highlight_last:false,next_page_link_cb:false,prev_page_link_cb:false}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/jquery.ui.touch-punch.js b/wp-includes/js/jquery/jquery.ui.touch-punch.js
deleted file mode 100644
index e10607a8f1..0000000000
--- a/wp-includes/js/jquery/jquery.ui.touch-punch.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * jQuery UI Touch Punch 0.2.2
- *
- * Copyright 2011, Dave Furfero
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Depends:
- * jquery.ui.widget.js
- * jquery.ui.mouse.js
- */
-(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f)}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown")};c._touchMove=function(f){if(!a){return}this._touchMoved=true;d(f,"mousemove")};c._touchEnd=function(f){if(!a){return}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click")}a=false};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f)}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/suggest.js b/wp-includes/js/jquery/suggest.js
deleted file mode 100644
index 3060507ff8..0000000000
--- a/wp-includes/js/jquery/suggest.js
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * jquery.suggest 1.1b - 2007-08-06
- * Patched by Mark Jaquith with Alexander Dick's "multiple items" patch to allow for auto-suggesting of more than one tag before submitting
- * See: http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comment-7228
- *
- * Uses code and techniques from following libraries:
- * 1. http://www.dyve.net/jquery/?autocomplete
- * 2. http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js
- *
- * All the new stuff written by Peter Vulgaris (www.vulgarisoip.com)
- * Feel free to do whatever you want with this file
- *
- */
-
-(function($) {
-
- $.suggest = function(input, options) {
- var $input, $results, timeout, prevLength, cache, cacheSize;
-
- $input = $(input).attr("autocomplete", "off");
- $results = $("<ul/>");
-
- timeout = false; // hold timeout ID for suggestion results to appear
- prevLength = 0; // last recorded length of $input.val()
- cache = []; // cache MRU list
- cacheSize = 0; // size of cache in chars (bytes?)
-
- $results.addClass(options.resultsClass).appendTo('body');
-
-
- resetPosition();
- $(window)
- .load(resetPosition) // just in case user is changing size of page while loading
- .resize(resetPosition);
-
- $input.blur(function() {
- setTimeout(function() { $results.hide() }, 200);
- });
-
- $input.keydown(processKey);
-
- function resetPosition() {
- // requires jquery.dimension plugin
- var offset = $input.offset();
- $results.css({
- top: (offset.top + input.offsetHeight) + 'px',
- left: offset.left + 'px'
- });
- }
-
-
- function processKey(e) {
-
- // handling up/down/escape requires results to be visible
- // handling enter/tab requires that AND a result to be selected
- if ((/27$|38$|40$/.test(e.keyCode) && $results.is(':visible')) ||
- (/^13$|^9$/.test(e.keyCode) && getCurrentResult())) {
-
- if (e.preventDefault)
- e.preventDefault();
- if (e.stopPropagation)
- e.stopPropagation();
-
- e.cancelBubble = true;
- e.returnValue = false;
-
- switch(e.keyCode) {
-
- case 38: // up
- prevResult();
- break;
-
- case 40: // down
- nextResult();
- break;
-
- case 9: // tab
- case 13: // return
- selectCurrentResult();
- break;
-
- case 27: // escape
- $results.hide();
- break;
-
- }
-
- } else if ($input.val().length != prevLength) {
-
- if (timeout)
- clearTimeout(timeout);
- timeout = setTimeout(suggest, options.delay);
- prevLength = $input.val().length;
-
- }
-
-
- }
-
-
- function suggest() {
-
- var q = $.trim($input.val()), multipleSepPos, items;
-
- if ( options.multiple ) {
- multipleSepPos = q.lastIndexOf(options.multipleSep);
- if ( multipleSepPos != -1 ) {
- q = $.trim(q.substr(multipleSepPos + options.multipleSep.length));
- }
- }
- if (q.length >= options.minchars) {
-
- cached = checkCache(q);
-
- if (cached) {
-
- displayItems(cached['items']);
-
- } else {
-
- $.get(options.source, {q: q}, function(txt) {
-
- $results.hide();
-
- items = parseTxt(txt, q);
-
- displayItems(items);
- addToCache(q, items, txt.length);
-
- });
-
- }
-
- } else {
-
- $results.hide();
-
- }
-
- }
-
-
- function checkCache(q) {
- var i;
- for (i = 0; i < cache.length; i++)
- if (cache[i]['q'] == q) {
- cache.unshift(cache.splice(i, 1)[0]);
- return cache[0];
- }
-
- return false;
-
- }
-
- function addToCache(q, items, size) {
- var cached;
- while (cache.length && (cacheSize + size > options.maxCacheSize)) {
- cached = cache.pop();
- cacheSize -= cached['size'];
- }
-
- cache.push({
- q: q,
- size: size,
- items: items
- });
-
- cacheSize += size;
-
- }
-
- function displayItems(items) {
- var html = '', i;
- if (!items)
- return;
-
- if (!items.length) {
- $results.hide();
- return;
- }
-
- resetPosition(); // when the form moves after the page has loaded
-
- for (i = 0; i < items.length; i++)
- html += '<li>' + items[i] + '</li>';
-
- $results.html(html).show();
-
- $results
- .children('li')
- .mouseover(function() {
- $results.children('li').removeClass(options.selectClass);
- $(this).addClass(options.selectClass);
- })
- .click(function(e) {
- e.preventDefault();
- e.stopPropagation();
- selectCurrentResult();
- });
-
- }
-
- function parseTxt(txt, q) {
-
- var items = [], tokens = txt.split(options.delimiter), i, token;
-
- // parse returned data for non-empty items
- for (i = 0; i < tokens.length; i++) {
- token = $.trim(tokens[i]);
- if (token) {
- token = token.replace(
- new RegExp(q, 'ig'),
- function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' }
- );
- items[items.length] = token;
- }
- }
-
- return items;
- }
-
- function getCurrentResult() {
- var $currentResult;
- if (!$results.is(':visible'))
- return false;
-
- $currentResult = $results.children('li.' + options.selectClass);
-
- if (!$currentResult.length)
- $currentResult = false;
-
- return $currentResult;
-
- }
-
- function selectCurrentResult() {
-
- $currentResult = getCurrentResult();
-
- if ($currentResult) {
- if ( options.multiple ) {
- if ( $input.val().indexOf(options.multipleSep) != -1 ) {
- $currentVal = $input.val().substr( 0, ( $input.val().lastIndexOf(options.multipleSep) + options.multipleSep.length ) );
- } else {
- $currentVal = "";
- }
- $input.val( $currentVal + $currentResult.text() + options.multipleSep);
- $input.focus();
- } else {
- $input.val($currentResult.text());
- }
- $results.hide();
-
- if (options.onSelect)
- options.onSelect.apply($input[0]);
-
- }
-
- }
-
- function nextResult() {
-
- $currentResult = getCurrentResult();
-
- if ($currentResult)
- $currentResult
- .removeClass(options.selectClass)
- .next()
- .addClass(options.selectClass);
- else
- $results.children('li:first-child').addClass(options.selectClass);
-
- }
-
- function prevResult() {
- var $currentResult = getCurrentResult();
-
- if ($currentResult)
- $currentResult
- .removeClass(options.selectClass)
- .prev()
- .addClass(options.selectClass);
- else
- $results.children('li:last-child').addClass(options.selectClass);
-
- }
- }
-
- $.fn.suggest = function(source, options) {
-
- if (!source)
- return;
-
- options = options || {};
- options.multiple = options.multiple || false;
- options.multipleSep = options.multipleSep || ", ";
- options.source = source;
- options.delay = options.delay || 100;
- options.resultsClass = options.resultsClass || 'ac_results';
- options.selectClass = options.selectClass || 'ac_over';
- options.matchClass = options.matchClass || 'ac_match';
- options.minchars = options.minchars || 2;
- options.delimiter = options.delimiter || '\n';
- options.onSelect = options.onSelect || false;
- options.maxCacheSize = options.maxCacheSize || 65536;
-
- this.each(function() {
- new $.suggest(this, options);
- });
-
- return this;
-
- };
-
-})(jQuery);
diff --git a/wp-includes/js/jquery/suggest.min.js b/wp-includes/js/jquery/suggest.min.js
deleted file mode 100644
index d28a7fb269..0000000000
--- a/wp-includes/js/jquery/suggest.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){a.suggest=function(n,f){var c,e,m,d,p,o;c=a(n).attr("autocomplete","off");e=a("<ul/>");m=false;d=0;p=[];o=0;e.addClass(f.resultsClass).appendTo("body");i();a(window).load(i).resize(i);c.blur(function(){setTimeout(function(){e.hide()},200)});c.keydown(l);function i(){var u=c.offset();e.css({top:(u.top+n.offsetHeight)+"px",left:u.left+"px"})}function l(u){if((/27$|38$|40$/.test(u.keyCode)&&e.is(":visible"))||(/^13$|^9$/.test(u.keyCode)&&s())){if(u.preventDefault){u.preventDefault()}if(u.stopPropagation){u.stopPropagation()}u.cancelBubble=true;u.returnValue=false;switch(u.keyCode){case 38:j();break;case 40:r();break;case 9:case 13:q();break;case 27:e.hide();break}}else{if(c.val().length!=d){if(m){clearTimeout(m)}m=setTimeout(k,f.delay);d=c.val().length}}}function k(){var w=a.trim(c.val()),v,u;if(f.multiple){v=w.lastIndexOf(f.multipleSep);if(v!=-1){w=a.trim(w.substr(v+f.multipleSep.length))}}if(w.length>=f.minchars){cached=t(w);if(cached){h(cached.items)}else{a.get(f.source,{q:w},function(x){e.hide();u=b(x,w);h(u);g(w,u,x.length)})}}else{e.hide()}}function t(v){var u;for(u=0;u<p.length;u++){if(p[u]["q"]==v){p.unshift(p.splice(u,1)[0]);return p[0]}}return false}function g(x,u,v){var w;while(p.length&&(o+v>f.maxCacheSize)){w=p.pop();o-=w.size}p.push({q:x,size:v,items:u});o+=v}function h(u){var w="",v;if(!u){return}if(!u.length){e.hide();return}i();for(v=0;v<u.length;v++){w+="<li>"+u[v]+"</li>"}e.html(w).show();e.children("li").mouseover(function(){e.children("li").removeClass(f.selectClass);a(this).addClass(f.selectClass)}).click(function(x){x.preventDefault();x.stopPropagation();q()})}function b(u,y){var v=[],z=u.split(f.delimiter),x,w;for(x=0;x<z.length;x++){w=a.trim(z[x]);if(w){w=w.replace(new RegExp(y,"ig"),function(A){return'<span class="'+f.matchClass+'">'+A+"</span>"});v[v.length]=w}}return v}function s(){var u;if(!e.is(":visible")){return false}u=e.children("li."+f.selectClass);if(!u.length){u=false}return u}function q(){$currentResult=s();if($currentResult){if(f.multiple){if(c.val().indexOf(f.multipleSep)!=-1){$currentVal=c.val().substr(0,(c.val().lastIndexOf(f.multipleSep)+f.multipleSep.length))}else{$currentVal=""}c.val($currentVal+$currentResult.text()+f.multipleSep);c.focus()}else{c.val($currentResult.text())}e.hide();if(f.onSelect){f.onSelect.apply(c[0])}}}function r(){$currentResult=s();if($currentResult){$currentResult.removeClass(f.selectClass).next().addClass(f.selectClass)}else{e.children("li:first-child").addClass(f.selectClass)}}function j(){var u=s();if(u){u.removeClass(f.selectClass).prev().addClass(f.selectClass)}else{e.children("li:last-child").addClass(f.selectClass)}}};a.fn.suggest=function(c,b){if(!c){return}b=b||{};b.multiple=b.multiple||false;b.multipleSep=b.multipleSep||", ";b.source=c;b.delay=b.delay||100;b.resultsClass=b.resultsClass||"ac_results";b.selectClass=b.selectClass||"ac_over";b.matchClass=b.matchClass||"ac_match";b.minchars=b.minchars||2;b.delimiter=b.delimiter||"\n";b.onSelect=b.onSelect||false;b.maxCacheSize=b.maxCacheSize||65536;this.each(function(){new a.suggest(this,b)});return this}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js b/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js
deleted file mode 100644
index d2e2d573ef..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js b/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js
deleted file mode 100644
index 4081f8c7a6..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.button.min.js b/wp-includes/js/jquery/ui/jquery.ui.button.min.js
deleted file mode 100644
index d294ce05fb..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.button.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.core.min.js b/wp-includes/js/jquery/ui/jquery.ui.core.min.js
deleted file mode 100644
index e96efd4ff8..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.core.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js b/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js
deleted file mode 100644
index bd4b62ed6e..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);
-return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js b/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js
deleted file mode 100644
index 990f202196..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js b/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js
deleted file mode 100644
index ac92817f3b..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.droppable.min.js b/wp-includes/js/jquery/ui/jquery.ui.droppable.min.js
deleted file mode 100644
index ba7b194003..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.droppable.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js
deleted file mode 100644
index ea34c3ccdd..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js
deleted file mode 100644
index 05a74f6eb7..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js
deleted file mode 100644
index 5b15f8ef0a..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js
deleted file mode 100644
index 02d148a161..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js
deleted file mode 100644
index 096ff58f59..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js
deleted file mode 100644
index 09d3a0ec04..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js
deleted file mode 100644
index 6b323bcd3e..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js
deleted file mode 100644
index 8aac9b3147..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js
deleted file mode 100644
index 1338dfa979..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js
deleted file mode 100644
index 0be8b0f317..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js
deleted file mode 100644
index 8bfffec5f0..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js
deleted file mode 100644
index b3de22e04f..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js
deleted file mode 100644
index cec83690d8..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.effect.min.js b/wp-includes/js/jquery/ui/jquery.ui.effect.min.js
deleted file mode 100644
index 50fbc7992b..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.effect.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.menu.min.js b/wp-includes/js/jquery/ui/jquery.ui.menu.min.js
deleted file mode 100644
index 113d53fb1c..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.menu.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js b/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js
deleted file mode 100644
index b7361fb7a9..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.position.min.js b/wp-includes/js/jquery/ui/jquery.ui.position.min.js
deleted file mode 100644
index 9bd2ecd47d..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.position.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js b/wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js
deleted file mode 100644
index 432ec0260a..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js b/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js
deleted file mode 100644
index 1c29259e4f..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.selectable.min.js b/wp-includes/js/jquery/ui/jquery.ui.selectable.min.js
deleted file mode 100644
index 2ac1c60c7a..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.selectable.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.slider.min.js b/wp-includes/js/jquery/ui/jquery.ui.slider.min.js
deleted file mode 100644
index 7e31927217..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.slider.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js b/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js
deleted file mode 100644
index 1a84db7ae1..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.spinner.min.js b/wp-includes/js/jquery/ui/jquery.ui.spinner.min.js
deleted file mode 100644
index 62cd8de6a7..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.spinner.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js b/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js
deleted file mode 100644
index e2f2ecb168..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,u))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js b/wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js
deleted file mode 100644
index 48e52d9303..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/jquery/ui/jquery.ui.widget.min.js b/wp-includes/js/jquery/ui/jquery.ui.widget.min.js
deleted file mode 100644
index d2358d39d5..0000000000
--- a/wp-includes/js/jquery/ui/jquery.ui.widget.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/json2.js b/wp-includes/js/json2.js
deleted file mode 100644
index b4c02d3f08..0000000000
--- a/wp-includes/js/json2.js
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- http://www.JSON.org/json2.js
- 2011-02-23
-
- Public Domain.
-
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
- See http://www.JSON.org/js.html
-
-
- This code should be minified before deployment.
- See http://javascript.crockford.com/jsmin.html
-
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
- NOT CONTROL.
-
-
- This file creates a global JSON object containing two methods: stringify
- and parse.
-
- JSON.stringify(value, replacer, space)
- value any JavaScript value, usually an object or array.
-
- replacer an optional parameter that determines how object
- values are stringified for objects. It can be a
- function or an array of strings.
-
- space an optional parameter that specifies the indentation
- of nested structures. If it is omitted, the text will
- be packed without extra whitespace. If it is a number,
- it will specify the number of spaces to indent at each
- level. If it is a string (such as '\t' or '&nbsp;'),
- it contains the characters used to indent at each level.
-
- This method produces a JSON text from a JavaScript value.
-
- When an object value is found, if the object contains a toJSON
- method, its toJSON method will be called and the result will be
- stringified. A toJSON method does not serialize: it returns the
- value represented by the name/value pair that should be serialized,
- or undefined if nothing should be serialized. The toJSON method
- will be passed the key associated with the value, and this will be
- bound to the value
-
- For example, this would serialize Dates as ISO strings.
-
- Date.prototype.toJSON = function (key) {
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- return this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z';
- };
-
- You can provide an optional replacer method. It will be passed the
- key and value of each member, with this bound to the containing
- object. The value that is returned from your method will be
- serialized. If your method returns undefined, then the member will
- be excluded from the serialization.
-
- If the replacer parameter is an array of strings, then it will be
- used to select the members to be serialized. It filters the results
- such that only members with keys listed in the replacer array are
- stringified.
-
- Values that do not have JSON representations, such as undefined or
- functions, will not be serialized. Such values in objects will be
- dropped; in arrays they will be replaced with null. You can use
- a replacer function to replace those with JSON values.
- JSON.stringify(undefined) returns undefined.
-
- The optional space parameter produces a stringification of the
- value that is filled with line breaks and indentation to make it
- easier to read.
-
- If the space parameter is a non-empty string, then that string will
- be used for indentation. If the space parameter is a number, then
- the indentation will be that many spaces.
-
- Example:
-
- text = JSON.stringify(['e', {pluribus: 'unum'}]);
- // text is '["e",{"pluribus":"unum"}]'
-
-
- text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
- // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
-
- text = JSON.stringify([new Date()], function (key, value) {
- return this[key] instanceof Date ?
- 'Date(' + this[key] + ')' : value;
- });
- // text is '["Date(---current time---)"]'
-
-
- JSON.parse(text, reviver)
- This method parses a JSON text to produce an object or array.
- It can throw a SyntaxError exception.
-
- The optional reviver parameter is a function that can filter and
- transform the results. It receives each of the keys and values,
- and its return value is used instead of the original value.
- If it returns what it received, then the structure is not modified.
- If it returns undefined then the member is deleted.
-
- Example:
-
- // Parse the text. Values that look like ISO date strings will
- // be converted to Date objects.
-
- myData = JSON.parse(text, function (key, value) {
- var a;
- if (typeof value === 'string') {
- a =
-/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
- if (a) {
- return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
- +a[5], +a[6]));
- }
- }
- return value;
- });
-
- myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
- var d;
- if (typeof value === 'string' &&
- value.slice(0, 5) === 'Date(' &&
- value.slice(-1) === ')') {
- d = new Date(value.slice(5, -1));
- if (d) {
- return d;
- }
- }
- return value;
- });
-
-
- This is a reference implementation. You are free to copy, modify, or
- redistribute.
-*/
-
-/*jslint evil: true, strict: false, regexp: false */
-
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
- call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
- getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
- lastIndex, length, parse, prototype, push, replace, slice, stringify,
- test, toJSON, toString, valueOf
-*/
-
-
-// Create a JSON object only if one does not already exist. We create the
-// methods in a closure to avoid creating global variables.
-
-var JSON;
-if (!JSON) {
- JSON = {};
-}
-
-(function () {
- "use strict";
-
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- if (typeof Date.prototype.toJSON !== 'function') {
-
- Date.prototype.toJSON = function (key) {
-
- return isFinite(this.valueOf()) ?
- this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z' : null;
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
- }
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
-
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can safely slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe escape
-// sequences.
-
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
- }
-
-
- function str(key, holder) {
-
-// Produce a string from holder[key].
-
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
-// If the value has a toJSON method, call it to obtain a replacement value.
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
-// If we were called with a replacer function, then call the replacer to
-// obtain a replacement value.
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
-// What happens next depends on the value's type.
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
-
-// JSON numbers must be finite. Encode non-finite numbers as null.
-
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
-
-// If the value is a boolean or null, convert it to a string. Note:
-// typeof null does not produce 'null'. The case is included here in
-// the remote chance that this gets fixed someday.
-
- return String(value);
-
-// If the type is 'object', we might be dealing with an object or an array or
-// null.
-
- case 'object':
-
-// Due to a specification blunder in ECMAScript, typeof null is 'object',
-// so watch out for that case.
-
- if (!value) {
- return 'null';
- }
-
-// Make an array to hold the partial results of stringifying this object value.
-
- gap += indent;
- partial = [];
-
-// Is the value an array?
-
- if (Object.prototype.toString.apply(value) === '[object Array]') {
-
-// The value is an array. Stringify every element. Use null as a placeholder
-// for non-JSON values.
-
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
-// Join all of the elements together, separated with commas, and wrap them in
-// brackets.
-
- v = partial.length === 0 ? '[]' : gap ?
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
-// If the replacer is an array, use it to select the members to be stringified.
-
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- if (typeof rep[i] === 'string') {
- k = rep[i];
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
-
-// Otherwise, iterate through all of the keys in the object.
-
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
-// Join all of the member texts together, separated with commas,
-// and wrap them in braces.
-
- v = partial.length === 0 ? '{}' : gap ?
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
- '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
-
-// If the JSON object does not yet have a stringify method, give it one.
-
- if (typeof JSON.stringify !== 'function') {
- JSON.stringify = function (value, replacer, space) {
-
-// The stringify method takes a value and an optional replacer, and an optional
-// space parameter, and returns a JSON text. The replacer can be a function
-// that can replace values, or an array of strings that will select the keys.
-// A default replacer method can be provided. Use of the space parameter can
-// produce text that is more easily readable.
-
- var i;
- gap = '';
- indent = '';
-
-// If the space parameter is a number, make an indent string containing that
-// many spaces.
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
-
-// If the space parameter is a string, it will be used as the indent string.
-
- } else if (typeof space === 'string') {
- indent = space;
- }
-
-// If there is a replacer, it must be a function or an array.
-// Otherwise, throw an error.
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
-// Make a fake root object containing our value under the key of ''.
-// Return the result of stringifying the value.
-
- return str('', {'': value});
- };
- }
-
-
-// If the JSON object does not yet have a parse method, give it one.
-
- if (typeof JSON.parse !== 'function') {
- JSON.parse = function (text, reviver) {
-
-// The parse method takes a text and an optional reviver function, and returns
-// a JavaScript value if the text is a valid JSON text.
-
- var j;
-
- function walk(holder, key) {
-
-// The walk method is used to recursively walk the resulting structure so
-// that modifications can be made.
-
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }
-
-
-// Parsing happens in four stages. In the first stage, we replace certain
-// Unicode characters with escape sequences. JavaScript handles many characters
-// incorrectly, either silently deleting them, or treating them as line endings.
-
- text = String(text);
- cx.lastIndex = 0;
- if (cx.test(text)) {
- text = text.replace(cx, function (a) {
- return '\\u' +
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
-// In the second stage, we run the text against regular expressions that look
-// for non-JSON patterns. We are especially concerned with '()' and 'new'
-// because they can cause invocation, and '=' because it can cause mutation.
-// But just to be safe, we want to reject all unexpected forms.
-
-// We split the second stage into 4 regexp operations in order to work around
-// crippling inefficiencies in IE's and Safari's regexp engines. First we
-// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-// replace all simple value tokens with ']' characters. Third, we delete all
-// open brackets that follow a colon or comma or that begin the text. Finally,
-// we look to see that the remaining characters are only whitespace or ']' or
-// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
- if (/^[\],:{}\s]*$/
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-// In the third stage we use the eval function to compile the text into a
-// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-// in JavaScript: it can begin a block or an object literal. We wrap the text
-// in parens to eliminate the ambiguity.
-
- j = eval('(' + text + ')');
-
-// In the optional fourth stage, we recursively walk the new structure, passing
-// each name/value pair to a reviver function for possible transformation.
-
- return typeof reviver === 'function' ?
- walk({'': j}, '') : j;
- }
-
-// If the text is not JSON parseable, then a SyntaxError is thrown.
-
- throw new SyntaxError('JSON.parse');
- };
- }
-}());
diff --git a/wp-includes/js/json2.min.js b/wp-includes/js/json2.min.js
deleted file mode 100644
index 0bdcc5ec97..0000000000
--- a/wp-includes/js/json2.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}()); \ No newline at end of file
diff --git a/wp-includes/js/mce-view.js b/wp-includes/js/mce-view.js
deleted file mode 100644
index 912c4c7ce4..0000000000
--- a/wp-includes/js/mce-view.js
+++ /dev/null
@@ -1,349 +0,0 @@
-// Ensure the global `wp` object exists.
-window.wp = window.wp || {};
-
-(function($){
- var views = {},
- instances = {};
-
- // Create the `wp.mce` object if necessary.
- wp.mce = wp.mce || {};
-
- // wp.mce.view
- // -----------
- // A set of utilities that simplifies adding custom UI within a TinyMCE editor.
- // At its core, it serves as a series of converters, transforming text to a
- // custom UI, and back again.
- wp.mce.view = {
- // ### defaults
- defaults: {
- // The default properties used for objects with the `pattern` key in
- // `wp.mce.view.add()`.
- pattern: {
- view: Backbone.View,
- text: function( instance ) {
- return instance.options.original;
- },
-
- toView: function( content ) {
- if ( ! this.pattern )
- return;
-
- this.pattern.lastIndex = 0;
- var match = this.pattern.exec( content );
-
- if ( ! match )
- return;
-
- return {
- index: match.index,
- content: match[0],
- options: {
- original: match[0],
- results: match
- }
- };
- }
- },
-
- // The default properties used for objects with the `shortcode` key in
- // `wp.mce.view.add()`.
- shortcode: {
- view: Backbone.View,
- text: function( instance ) {
- return instance.options.shortcode.string();
- },
-
- toView: function( content ) {
- var match = wp.shortcode.next( this.shortcode, content );
-
- if ( ! match )
- return;
-
- return {
- index: match.index,
- content: match.content,
- options: {
- shortcode: match.shortcode
- }
- };
- }
- }
- },
-
- // ### add( id, options )
- // Registers a new TinyMCE view.
- //
- // Accepts a unique `id` and an `options` object.
- //
- // `options` accepts the following properties:
- //
- // * `pattern` is the regular expression used to scan the content and
- // detect matching views.
- //
- // * `view` is a `Backbone.View` constructor. If a plain object is
- // provided, it will automatically extend the parent constructor
- // (usually `Backbone.View`). Views are instantiated when the `pattern`
- // is successfully matched. The instance's `options` object is provided
- // with the `original` matched value, the match `results` including
- // capture groups, and the `viewType`, which is the constructor's `id`.
- //
- // * `extend` an existing view by passing in its `id`. The current
- // view will inherit all properties from the parent view, and if
- // `view` is set to a plain object, it will extend the parent `view`
- // constructor.
- //
- // * `text` is a method that accepts an instance of the `view`
- // constructor and transforms it into a text representation.
- add: function( id, options ) {
- var parent, remove, base, properties;
-
- // Fetch the parent view or the default options.
- if ( options.extend )
- parent = wp.mce.view.get( options.extend );
- else if ( options.shortcode )
- parent = wp.mce.view.defaults.shortcode;
- else
- parent = wp.mce.view.defaults.pattern;
-
- // Extend the `options` object with the parent's properties.
- _.defaults( options, parent );
- options.id = id;
-
- // Create properties used to enhance the view for use in TinyMCE.
- properties = {
- // Ensure the wrapper element and references to the view are
- // removed. Otherwise, removed views could randomly restore.
- remove: function() {
- delete instances[ this.el.id ];
- this.$el.parent().remove();
-
- // Trigger the inherited `remove` method.
- if ( remove )
- remove.apply( this, arguments );
-
- return this;
- }
- };
-
- // If the `view` provided was an object, use the parent's
- // `view` constructor as a base. If a `view` constructor
- // was provided, treat that as the base.
- if ( _.isFunction( options.view ) ) {
- base = options.view;
- } else {
- base = parent.view;
- remove = options.view.remove;
- _.defaults( properties, options.view );
- }
-
- // If there's a `remove` method on the `base` view that wasn't
- // created by this method, inherit it.
- if ( ! remove && ! base._mceview )
- remove = base.prototype.remove;
-
- // Automatically create the new `Backbone.View` constructor.
- options.view = base.extend( properties, {
- // Flag that the new view has been created by `wp.mce.view`.
- _mceview: true
- });
-
- views[ id ] = options;
- },
-
- // ### get( id )
- // Returns a TinyMCE view options object.
- get: function( id ) {
- return views[ id ];
- },
-
- // ### remove( id )
- // Unregisters a TinyMCE view.
- remove: function( id ) {
- delete views[ id ];
- },
-
- // ### toViews( content )
- // Scans a `content` string for each view's pattern, replacing any
- // matches with wrapper elements, and creates a new view instance for
- // every match.
- //
- // To render the views, call `wp.mce.view.render( scope )`.
- toViews: function( content ) {
- var pieces = [ { content: content } ],
- current;
-
- _.each( views, function( view, viewType ) {
- current = pieces.slice();
- pieces = [];
-
- _.each( current, function( piece ) {
- var remaining = piece.content,
- result;
-
- // Ignore processed pieces, but retain their location.
- if ( piece.processed ) {
- pieces.push( piece );
- return;
- }
-
- // Iterate through the string progressively matching views
- // and slicing the string as we go.
- while ( remaining && (result = view.toView( remaining )) ) {
- // Any text before the match becomes an unprocessed piece.
- if ( result.index )
- pieces.push({ content: remaining.substring( 0, result.index ) });
-
- // Add the processed piece for the match.
- pieces.push({
- content: wp.mce.view.toView( viewType, result.options ),
- processed: true
- });
-
- // Update the remaining content.
- remaining = remaining.slice( result.index + result.content.length );
- }
-
- // There are no additional matches. If any content remains,
- // add it as an unprocessed piece.
- if ( remaining )
- pieces.push({ content: remaining });
- });
- });
-
- return _.pluck( pieces, 'content' ).join('');
- },
-
- toView: function( viewType, options ) {
- var view = wp.mce.view.get( viewType ),
- instance, id;
-
- if ( ! view )
- return '';
-
- // Create a new view instance.
- instance = new view.view( _.extend( options || {}, {
- viewType: viewType
- }) );
-
- // Use the view's `id` if it already exists. Otherwise,
- // create a new `id`.
- id = instance.el.id = instance.el.id || _.uniqueId('__wpmce-');
- instances[ id ] = instance;
-
- // Create a dummy `$wrapper` property to allow `$wrapper` to be
- // called in the view's `render` method without a conditional.
- instance.$wrapper = $();
-
- return wp.html.string({
- // If the view is a span, wrap it in a span.
- tag: 'span' === instance.tagName ? 'span' : 'div',
-
- attrs: {
- 'class': 'wp-view-wrap wp-view-type-' + viewType,
- 'data-wp-view': id,
- 'contenteditable': false
- }
- });
- },
-
- // ### render( scope )
- // Renders any view instances inside a DOM node `scope`.
- //
- // View instances are detected by the presence of wrapper elements.
- // To generate wrapper elements, pass your content through
- // `wp.mce.view.toViews( content )`.
- render: function( scope ) {
- $( '.wp-view-wrap', scope ).each( function() {
- var wrapper = $(this),
- view = wp.mce.view.instance( this );
-
- if ( ! view )
- return;
-
- // Link the real wrapper to the view.
- view.$wrapper = wrapper;
- // Render the view.
- view.render();
- // Detach the view element to ensure events are not unbound.
- view.$el.detach();
-
- // Empty the wrapper, attach the view element to the wrapper,
- // and add an ending marker to the wrapper to help regexes
- // scan the HTML string.
- wrapper.empty().append( view.el ).append('<span data-wp-view-end class="wp-view-end"></span>');
- });
- },
-
- // ### toText( content )
- // Scans an HTML `content` string and replaces any view instances with
- // their respective text representations.
- toText: function( content ) {
- return content.replace( /<(?:div|span)[^>]+data-wp-view="([^"]+)"[^>]*>.*?<span[^>]+data-wp-view-end[^>]*><\/span><\/(?:div|span)>/g, function( match, id ) {
- var instance = instances[ id ],
- view;
-
- if ( instance )
- view = wp.mce.view.get( instance.options.viewType );
-
- return instance && view ? view.text( instance ) : '';
- });
- },
-
- // ### Remove internal TinyMCE attributes.
- removeInternalAttrs: function( attrs ) {
- var result = {};
- _.each( attrs, function( value, attr ) {
- if ( -1 === attr.indexOf('data-mce') )
- result[ attr ] = value;
- });
- return result;
- },
-
- // ### Parse an attribute string and removes internal TinyMCE attributes.
- attrs: function( content ) {
- return wp.mce.view.removeInternalAttrs( wp.html.attrs( content ) );
- },
-
- // ### instance( scope )
- //
- // Accepts a MCE view wrapper `node` (i.e. a node with the
- // `wp-view-wrap` class).
- instance: function( node ) {
- var id = $( node ).data('wp-view');
-
- if ( id )
- return instances[ id ];
- },
-
- // ### Select a view.
- //
- // Accepts a MCE view wrapper `node` (i.e. a node with the
- // `wp-view-wrap` class).
- select: function( node ) {
- var $node = $(node);
-
- // Bail if node is already selected.
- if ( $node.hasClass('selected') )
- return;
-
- $node.addClass('selected');
- $( node.firstChild ).trigger('select');
- },
-
- // ### Deselect a view.
- //
- // Accepts a MCE view wrapper `node` (i.e. a node with the
- // `wp-view-wrap` class).
- deselect: function( node ) {
- var $node = $(node);
-
- // Bail if node is already selected.
- if ( ! $node.hasClass('selected') )
- return;
-
- $node.removeClass('selected');
- $( node.firstChild ).trigger('deselect');
- }
- };
-
-}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/mce-view.min.js b/wp-includes/js/mce-view.min.js
deleted file mode 100644
index 53e236adfa..0000000000
--- a/wp-includes/js/mce-view.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(b){var a={},c={};wp.mce=wp.mce||{};wp.mce.view={defaults:{pattern:{view:Backbone.View,text:function(d){return d.options.original},toView:function(e){if(!this.pattern){return}this.pattern.lastIndex=0;var d=this.pattern.exec(e);if(!d){return}return{index:d.index,content:d[0],options:{original:d[0],results:d}}}},shortcode:{view:Backbone.View,text:function(d){return d.options.shortcode.string()},toView:function(e){var d=wp.shortcode.next(this.shortcode,e);if(!d){return}return{index:d.index,content:d.content,options:{shortcode:d.shortcode}}}}},add:function(i,e){var g,d,h,f;if(e.extend){g=wp.mce.view.get(e.extend)}else{if(e.shortcode){g=wp.mce.view.defaults.shortcode}else{g=wp.mce.view.defaults.pattern}}_.defaults(e,g);e.id=i;f={remove:function(){delete c[this.el.id];this.$el.parent().remove();if(d){d.apply(this,arguments)}return this}};if(_.isFunction(e.view)){h=e.view}else{h=g.view;d=e.view.remove;_.defaults(f,e.view)}if(!d&&!h._mceview){d=h.prototype.remove}e.view=h.extend(f,{_mceview:true});a[i]=e},get:function(d){return a[d]},remove:function(d){delete a[d]},toViews:function(e){var d=[{content:e}],f;_.each(a,function(h,g){f=d.slice();d=[];_.each(f,function(k){var j=k.content,i;if(k.processed){d.push(k);return}while(j&&(i=h.toView(j))){if(i.index){d.push({content:j.substring(0,i.index)})}d.push({content:wp.mce.view.toView(g,i.options),processed:true});j=j.slice(i.index+i.content.length)}if(j){d.push({content:j})}})});return _.pluck(d,"content").join("")},toView:function(e,g){var f=wp.mce.view.get(e),d,h;if(!f){return""}d=new f.view(_.extend(g||{},{viewType:e}));h=d.el.id=d.el.id||_.uniqueId("__wpmce-");c[h]=d;d.$wrapper=b();return wp.html.string({tag:"span"===d.tagName?"span":"div",attrs:{"class":"wp-view-wrap wp-view-type-"+e,"data-wp-view":h,contenteditable:false}})},render:function(d){b(".wp-view-wrap",d).each(function(){var f=b(this),e=wp.mce.view.instance(this);if(!e){return}e.$wrapper=f;e.render();e.$el.detach();f.empty().append(e.el).append('<span data-wp-view-end class="wp-view-end"></span>')})},toText:function(d){return d.replace(/<(?:div|span)[^>]+data-wp-view="([^"]+)"[^>]*>.*?<span[^>]+data-wp-view-end[^>]*><\/span><\/(?:div|span)>/g,function(g,h){var e=c[h],f;if(e){f=wp.mce.view.get(e.options.viewType)}return e&&f?f.text(e):""})},removeInternalAttrs:function(e){var d={};_.each(e,function(g,f){if(-1===f.indexOf("data-mce")){d[f]=g}});return d},attrs:function(d){return wp.mce.view.removeInternalAttrs(wp.html.attrs(d))},instance:function(d){var e=b(d).data("wp-view");if(e){return c[e]}},select:function(e){var d=b(e);if(d.hasClass("selected")){return}d.addClass("selected");b(e.firstChild).trigger("select")},deselect:function(e){var d=b(e);if(!d.hasClass("selected")){return}d.removeClass("selected");b(e.firstChild).trigger("deselect")}}}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/media-editor.js b/wp-includes/js/media-editor.js
deleted file mode 100644
index fc497cd84d..0000000000
--- a/wp-includes/js/media-editor.js
+++ /dev/null
@@ -1,708 +0,0 @@
-// WordPress, TinyMCE, and Media
-// -----------------------------
-(function($){
- // Stores the editors' `wp.media.controller.Frame` instances.
- var workflows = {};
-
- wp.media.string = {
- // Joins the `props` and `attachment` objects,
- // outputting the proper object format based on the
- // attachment's type.
- props: function( props, attachment ) {
- var link, linkUrl, size, sizes, fallbacks,
- defaultProps = wp.media.view.settings.defaultProps;
-
- // Final fallbacks run after all processing has been completed.
- fallbacks = function( props ) {
- // Generate alt fallbacks and strip tags.
- if ( 'image' === props.type && ! props.alt ) {
- props.alt = props.caption || props.title || '';
- props.alt = props.alt.replace( /<\/?[^>]+>/g, '' );
- props.alt = props.alt.replace( /[\r\n]+/g, ' ' );
- }
-
- return props;
- };
-
- props = props ? _.clone( props ) : {};
-
- if ( attachment && attachment.type )
- props.type = attachment.type;
-
- if ( 'image' === props.type ) {
- props = _.defaults( props || {}, {
- align: defaultProps.align || getUserSetting( 'align', 'none' ),
- size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ),
- url: '',
- classes: []
- });
- }
-
- // All attachment-specific settings follow.
- if ( ! attachment )
- return fallbacks( props );
-
- props.title = props.title || attachment.title;
-
- link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
- if ( 'file' === link || 'embed' === link )
- linkUrl = attachment.url;
- else if ( 'post' === link )
- linkUrl = attachment.link;
- else if ( 'custom' === link )
- linkUrl = props.linkUrl;
- props.linkUrl = linkUrl || '';
-
- // Format properties for images.
- if ( 'image' === attachment.type ) {
- props.classes.push( 'wp-image-' + attachment.id );
-
- sizes = attachment.sizes;
- size = sizes && sizes[ props.size ] ? sizes[ props.size ] : attachment;
-
- _.extend( props, _.pick( attachment, 'align', 'caption', 'alt' ), {
- width: size.width,
- height: size.height,
- src: size.url,
- captionId: 'attachment_' + attachment.id
- });
- } else if ( 'video' === attachment.type || 'audio' === attachment.type ) {
- _.extend( props, _.pick( attachment, 'title', 'type', 'icon', 'mime' ) );
- // Format properties for non-images.
- } else {
- props.title = props.title || attachment.filename;
- props.rel = props.rel || 'attachment wp-att-' + attachment.id;
- }
-
- return fallbacks( props );
- },
-
- link: function( props, attachment ) {
- var options;
-
- props = wp.media.string.props( props, attachment );
-
- options = {
- tag: 'a',
- content: props.title,
- attrs: {
- href: props.linkUrl
- }
- };
-
- if ( props.rel )
- options.attrs.rel = props.rel;
-
- return wp.html.string( options );
- },
-
- audio: function( props, attachment ) {
- return wp.media.string._audioVideo( 'audio', props, attachment );
- },
-
- video: function( props, attachment ) {
- return wp.media.string._audioVideo( 'video', props, attachment );
- },
-
- _audioVideo: function( type, props, attachment ) {
- var shortcode, html, extension;
-
- props = wp.media.string.props( props, attachment );
- if ( props.link !== 'embed' )
- return wp.media.string.link( props );
-
- shortcode = {};
-
- if ( 'video' === type ) {
- if ( attachment.width )
- shortcode.width = attachment.width;
-
- if ( attachment.height )
- shortcode.height = attachment.height;
- }
-
- extension = attachment.filename.split('.').pop();
-
- if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {
- shortcode[extension] = attachment.url;
- } else {
- // Render unsupported audio and video files as links.
- return wp.media.string.link( props );
- }
-
- html = wp.shortcode.string({
- tag: type,
- attrs: shortcode
- });
-
- return html;
- },
-
- image: function( props, attachment ) {
- var img = {},
- options, classes, shortcode, html;
-
- props = wp.media.string.props( props, attachment );
- classes = props.classes || [];
-
- img.src = typeof attachment !== 'undefined' ? attachment.url : props.url;
- _.extend( img, _.pick( props, 'width', 'height', 'alt' ) );
-
- // Only assign the align class to the image if we're not printing
- // a caption, since the alignment is sent to the shortcode.
- if ( props.align && ! props.caption )
- classes.push( 'align' + props.align );
-
- if ( props.size )
- classes.push( 'size-' + props.size );
-
- img['class'] = _.compact( classes ).join(' ');
-
- // Generate `img` tag options.
- options = {
- tag: 'img',
- attrs: img,
- single: true
- };
-
- // Generate the `a` element options, if they exist.
- if ( props.linkUrl ) {
- options = {
- tag: 'a',
- attrs: {
- href: props.linkUrl
- },
- content: options
- };
- }
-
- html = wp.html.string( options );
-
- // Generate the caption shortcode.
- if ( props.caption ) {
- shortcode = {};
-
- if ( img.width )
- shortcode.width = img.width;
-
- if ( props.captionId )
- shortcode.id = props.captionId;
-
- if ( props.align )
- shortcode.align = 'align' + props.align;
-
- html = wp.shortcode.string({
- tag: 'caption',
- attrs: shortcode,
- content: html + ' ' + props.caption
- });
- }
-
- return html;
- }
- };
-
- wp.media.gallery = (function() {
- var galleries = {};
-
- return {
- defaults: {
- order: 'ASC',
- id: wp.media.view.settings.post.id,
- itemtag: 'dl',
- icontag: 'dt',
- captiontag: 'dd',
- columns: '3',
- link: 'post',
- size: 'thumbnail',
- orderby: 'menu_order ID'
- },
-
- attachments: function( shortcode ) {
- var shortcodeString = shortcode.string(),
- result = galleries[ shortcodeString ],
- attrs, args, query, others;
-
- delete galleries[ shortcodeString ];
-
- if ( result )
- return result;
-
- // Fill the default shortcode attributes.
- attrs = _.defaults( shortcode.attrs.named, wp.media.gallery.defaults );
- args = _.pick( attrs, 'orderby', 'order' );
-
- args.type = 'image';
- args.perPage = -1;
-
- // Mark the `orderby` override attribute.
- if ( 'rand' === attrs.orderby )
- attrs._orderbyRandom = true;
-
- // Map the `orderby` attribute to the corresponding model property.
- if ( ! attrs.orderby || /^menu_order(?: ID)?$/i.test( attrs.orderby ) )
- args.orderby = 'menuOrder';
-
- // Map the `ids` param to the correct query args.
- if ( attrs.ids ) {
- args.post__in = attrs.ids.split(',');
- args.orderby = 'post__in';
- } else if ( attrs.include ) {
- args.post__in = attrs.include.split(',');
- }
-
- if ( attrs.exclude )
- args.post__not_in = attrs.exclude.split(',');
-
- if ( ! args.post__in )
- args.uploadedTo = attrs.id;
-
- // Collect the attributes that were not included in `args`.
- others = _.omit( attrs, 'id', 'ids', 'include', 'exclude', 'orderby', 'order' );
-
- query = wp.media.query( args );
- query.gallery = new Backbone.Model( others );
- return query;
- },
-
- shortcode: function( attachments ) {
- var props = attachments.props.toJSON(),
- attrs = _.pick( props, 'orderby', 'order' ),
- shortcode, clone;
-
- if ( attachments.gallery )
- _.extend( attrs, attachments.gallery.toJSON() );
-
- // Convert all gallery shortcodes to use the `ids` property.
- // Ignore `post__in` and `post__not_in`; the attachments in
- // the collection will already reflect those properties.
- attrs.ids = attachments.pluck('id');
-
- // Copy the `uploadedTo` post ID.
- if ( props.uploadedTo )
- attrs.id = props.uploadedTo;
-
- // Check if the gallery is randomly ordered.
- if ( attrs._orderbyRandom )
- attrs.orderby = 'rand';
- delete attrs._orderbyRandom;
-
- // If the `ids` attribute is set and `orderby` attribute
- // is the default value, clear it for cleaner output.
- if ( attrs.ids && 'post__in' === attrs.orderby )
- delete attrs.orderby;
-
- // Remove default attributes from the shortcode.
- _.each( wp.media.gallery.defaults, function( value, key ) {
- if ( value === attrs[ key ] )
- delete attrs[ key ];
- });
-
- shortcode = new wp.shortcode({
- tag: 'gallery',
- attrs: attrs,
- type: 'single'
- });
-
- // Use a cloned version of the gallery.
- clone = new wp.media.model.Attachments( attachments.models, {
- props: props
- });
- clone.gallery = attachments.gallery;
- galleries[ shortcode.string() ] = clone;
-
- return shortcode;
- },
-
- edit: function( content ) {
- var shortcode = wp.shortcode.next( 'gallery', content ),
- defaultPostId = wp.media.gallery.defaults.id,
- attachments, selection;
-
- // Bail if we didn't match the shortcode or all of the content.
- if ( ! shortcode || shortcode.content !== content )
- return;
-
- // Ignore the rest of the match object.
- shortcode = shortcode.shortcode;
-
- if ( _.isUndefined( shortcode.get('id') ) && ! _.isUndefined( defaultPostId ) )
- shortcode.set( 'id', defaultPostId );
-
- attachments = wp.media.gallery.attachments( shortcode );
-
- selection = new wp.media.model.Selection( attachments.models, {
- props: attachments.props.toJSON(),
- multiple: true
- });
-
- selection.gallery = attachments.gallery;
-
- // Fetch the query's attachments, and then break ties from the
- // query to allow for sorting.
- selection.more().done( function() {
- // Break ties with the query.
- selection.props.set({ query: false });
- selection.unmirror();
- selection.props.unset('orderby');
- });
-
- // Destroy the previous gallery frame.
- if ( this.frame )
- this.frame.dispose();
-
- // Store the current gallery frame.
- this.frame = wp.media({
- frame: 'post',
- state: 'gallery-edit',
- title: wp.media.view.l10n.editGalleryTitle,
- editing: true,
- multiple: true,
- selection: selection
- }).open();
-
- return this.frame;
- }
- };
- }());
-
- wp.media.featuredImage = {
- get: function() {
- return wp.media.view.settings.post.featuredImageId;
- },
-
- set: function( id ) {
- var settings = wp.media.view.settings;
-
- settings.post.featuredImageId = id;
-
- wp.media.post( 'set-post-thumbnail', {
- json: true,
- post_id: settings.post.id,
- thumbnail_id: settings.post.featuredImageId,
- _wpnonce: settings.post.nonce
- }).done( function( html ) {
- $( '.inside', '#postimagediv' ).html( html );
- });
- },
-
- frame: function() {
- if ( this._frame )
- return this._frame;
-
- this._frame = wp.media({
- state: 'featured-image',
- states: [ new wp.media.controller.FeaturedImage() ]
- });
-
- this._frame.on( 'toolbar:create:featured-image', function( toolbar ) {
- this.createSelectToolbar( toolbar, {
- text: wp.media.view.l10n.setFeaturedImage
- });
- }, this._frame );
-
- this._frame.state('featured-image').on( 'select', this.select );
- return this._frame;
- },
-
- select: function() {
- var settings = wp.media.view.settings,
- selection = this.get('selection').single();
-
- if ( ! settings.post.featuredImageId )
- return;
-
- wp.media.featuredImage.set( selection ? selection.id : -1 );
- },
-
- init: function() {
- // Open the content media manager to the 'featured image' tab when
- // the post thumbnail is clicked.
- $('#postimagediv').on( 'click', '#set-post-thumbnail', function( event ) {
- event.preventDefault();
- // Stop propagation to prevent thickbox from activating.
- event.stopPropagation();
-
- wp.media.featuredImage.frame().open();
-
- // Update the featured image id when the 'remove' link is clicked.
- }).on( 'click', '#remove-post-thumbnail', function() {
- wp.media.view.settings.post.featuredImageId = -1;
- });
- }
- };
-
- $( wp.media.featuredImage.init );
-
- wp.media.editor = {
- insert: function( h ) {
- var mce = typeof(tinymce) != 'undefined',
- qt = typeof(QTags) != 'undefined',
- wpActiveEditor = window.wpActiveEditor,
- ed;
-
- // Delegate to the global `send_to_editor` if it exists.
- // This attempts to play nice with any themes/plugins that have
- // overridden the insert functionality.
- if ( window.send_to_editor )
- return window.send_to_editor.apply( this, arguments );
-
- if ( ! wpActiveEditor ) {
- if ( mce && tinymce.activeEditor ) {
- ed = tinymce.activeEditor;
- wpActiveEditor = window.wpActiveEditor = ed.id;
- } else if ( !qt ) {
- return false;
- }
- } else if ( mce ) {
- if ( tinymce.activeEditor && (tinymce.activeEditor.id == 'mce_fullscreen' || tinymce.activeEditor.id == 'wp_mce_fullscreen') )
- ed = tinymce.activeEditor;
- else
- ed = tinymce.get(wpActiveEditor);
- }
-
- if ( ed && !ed.isHidden() ) {
- // restore caret position on IE
- if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
- ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
-
- if ( h.indexOf('[caption') !== -1 ) {
- if ( ed.wpSetImgCaption )
- h = ed.wpSetImgCaption(h);
- } else if ( h.indexOf('[gallery') !== -1 ) {
- if ( ed.plugins.wpgallery )
- h = ed.plugins.wpgallery._do_gallery(h);
- } else if ( h.indexOf('[embed') === 0 ) {
- if ( ed.plugins.wordpress )
- h = ed.plugins.wordpress._setEmbed(h);
- }
-
- ed.execCommand('mceInsertContent', false, h);
- } else if ( qt ) {
- QTags.insertContent(h);
- } else {
- document.getElementById(wpActiveEditor).value += h;
- }
-
- // If the old thickbox remove function exists, call it in case
- // a theme/plugin overloaded it.
- if ( window.tb_remove )
- try { window.tb_remove(); } catch( e ) {}
- },
-
- add: function( id, options ) {
- var workflow = this.get( id );
-
- if ( workflow ) // only add once: if exists return existing
- return workflow;
-
- workflow = workflows[ id ] = wp.media( _.defaults( options || {}, {
- frame: 'post',
- state: 'insert',
- title: wp.media.view.l10n.addMedia,
- multiple: true
- } ) );
-
- workflow.on( 'insert', function( selection ) {
- var state = workflow.state();
-
- selection = selection || state.get('selection');
-
- if ( ! selection )
- return;
-
- $.when.apply( $, selection.map( function( attachment ) {
- var display = state.display( attachment ).toJSON();
- return this.send.attachment( display, attachment.toJSON() );
- }, this ) ).done( function() {
- wp.media.editor.insert( _.toArray( arguments ).join("\n\n") );
- });
- }, this );
-
- workflow.state('gallery-edit').on( 'update', function( selection ) {
- this.insert( wp.media.gallery.shortcode( selection ).string() );
- }, this );
-
- workflow.state('embed').on( 'select', function() {
- var state = workflow.state(),
- type = state.get('type'),
- embed = state.props.toJSON();
-
- embed.url = embed.url || '';
-
- if ( 'link' === type ) {
- _.defaults( embed, {
- title: embed.url,
- linkUrl: embed.url
- });
-
- this.send.link( embed ).done( function( resp ) {
- wp.media.editor.insert( resp );
- });
-
- } else if ( 'image' === type ) {
- _.defaults( embed, {
- title: embed.url,
- linkUrl: '',
- align: 'none',
- link: 'none'
- });
-
- if ( 'none' === embed.link )
- embed.linkUrl = '';
- else if ( 'file' === embed.link )
- embed.linkUrl = embed.url;
-
- this.insert( wp.media.string.image( embed ) );
- }
- }, this );
-
- workflow.state('featured-image').on( 'select', wp.media.featuredImage.select );
- workflow.setState( workflow.options.state );
- return workflow;
- },
-
- id: function( id ) {
- if ( id )
- return id;
-
- // If an empty `id` is provided, default to `wpActiveEditor`.
- id = wpActiveEditor;
-
- // If that doesn't work, fall back to `tinymce.activeEditor.id`.
- if ( ! id && typeof tinymce !== 'undefined' && tinymce.activeEditor )
- id = tinymce.activeEditor.id;
-
- // Last but not least, fall back to the empty string.
- id = id || '';
- return id;
- },
-
- get: function( id ) {
- id = this.id( id );
- return workflows[ id ];
- },
-
- remove: function( id ) {
- id = this.id( id );
- delete workflows[ id ];
- },
-
- send: {
- attachment: function( props, attachment ) {
- var caption = attachment.caption,
- options, html;
-
- // If captions are disabled, clear the caption.
- if ( ! wp.media.view.settings.captions )
- delete attachment.caption;
-
- props = wp.media.string.props( props, attachment );
-
- options = {
- id: attachment.id,
- post_content: attachment.description,
- post_excerpt: caption
- };
-
- if ( props.linkUrl )
- options.url = props.linkUrl;
-
- if ( 'image' === attachment.type ) {
- html = wp.media.string.image( props );
-
- _.each({
- align: 'align',
- size: 'image-size',
- alt: 'image_alt'
- }, function( option, prop ) {
- if ( props[ prop ] )
- options[ option ] = props[ prop ];
- });
- } else if ( 'video' === attachment.type ) {
- html = wp.media.string.video( props, attachment );
- } else if ( 'audio' === attachment.type ) {
- html = wp.media.string.audio( props, attachment );
- } else {
- html = wp.media.string.link( props );
- options.post_title = props.title;
- }
-
- return wp.media.post( 'send-attachment-to-editor', {
- nonce: wp.media.view.settings.nonce.sendToEditor,
- attachment: options,
- html: html,
- post_id: wp.media.view.settings.post.id
- });
- },
-
- link: function( embed ) {
- return wp.media.post( 'send-link-to-editor', {
- nonce: wp.media.view.settings.nonce.sendToEditor,
- src: embed.linkUrl,
- title: embed.title,
- html: wp.media.string.link( embed ),
- post_id: wp.media.view.settings.post.id
- });
- }
- },
-
- open: function( id, options ) {
- var workflow, editor;
-
- options = options || {};
-
- id = this.id( id );
-
- // Save a bookmark of the caret position in IE.
- if ( typeof tinymce !== 'undefined' ) {
- editor = tinymce.get( id );
-
- if ( tinymce.isIE && editor && ! editor.isHidden() ) {
- editor.focus();
- editor.windowManager.insertimagebookmark = editor.selection.getBookmark();
- }
- }
-
- workflow = this.get( id );
-
- // Redo workflow if state has changed
- if ( ! workflow || ( workflow.options && options.state !== workflow.options.state ) )
- workflow = this.add( id, options );
-
- return workflow.open();
- },
-
- init: function() {
- $(document.body).on( 'click', '.insert-media', function( event ) {
- var $this = $(this),
- editor = $this.data('editor'),
- options = {
- frame: 'post',
- state: 'insert',
- title: wp.media.view.l10n.addMedia,
- multiple: true
- };
-
- event.preventDefault();
-
- // Remove focus from the `.insert-media` button.
- // Prevents Opera from showing the outline of the button
- // above the modal.
- //
- // See: http://core.trac.wordpress.org/ticket/22445
- $this.blur();
-
- if ( $this.hasClass( 'gallery' ) ) {
- options.state = 'gallery';
- options.title = wp.media.view.l10n.createGalleryTitle;
- }
-
- wp.media.editor.open( editor, options );
- });
- }
- };
-
- _.bindAll( wp.media.editor, 'open' );
- $( wp.media.editor.init );
-}(jQuery));
diff --git a/wp-includes/js/media-editor.min.js b/wp-includes/js/media-editor.min.js
deleted file mode 100644
index 091450afa0..0000000000
--- a/wp-includes/js/media-editor.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(b){var a={};wp.media.string={props:function(f,i){var h,c,e,g,d,j=wp.media.view.settings.defaultProps;d=function(k){if("image"===k.type&&!k.alt){k.alt=k.caption||k.title||"";k.alt=k.alt.replace(/<\/?[^>]+>/g,"");k.alt=k.alt.replace(/[\r\n]+/g," ")}return k};f=f?_.clone(f):{};if(i&&i.type){f.type=i.type}if("image"===f.type){f=_.defaults(f||{},{align:j.align||getUserSetting("align","none"),size:j.size||getUserSetting("imgsize","medium"),url:"",classes:[]})}if(!i){return d(f)}f.title=f.title||i.title;h=f.link||j.link||getUserSetting("urlbutton","file");if("file"===h||"embed"===h){c=i.url}else{if("post"===h){c=i.link}else{if("custom"===h){c=f.linkUrl}}}f.linkUrl=c||"";if("image"===i.type){f.classes.push("wp-image-"+i.id);g=i.sizes;e=g&&g[f.size]?g[f.size]:i;_.extend(f,_.pick(i,"align","caption","alt"),{width:e.width,height:e.height,src:e.url,captionId:"attachment_"+i.id})}else{if("video"===i.type||"audio"===i.type){_.extend(f,_.pick(i,"title","type","icon","mime"))}else{f.title=f.title||i.filename;f.rel=f.rel||"attachment wp-att-"+i.id}}return d(f)},link:function(d,e){var c;d=wp.media.string.props(d,e);c={tag:"a",content:d.title,attrs:{href:d.linkUrl}};if(d.rel){c.attrs.rel=d.rel}return wp.html.string(c)},audio:function(c,d){return wp.media.string._audioVideo("audio",c,d)},video:function(c,d){return wp.media.string._audioVideo("video",c,d)},_audioVideo:function(e,d,g){var f,c,h;d=wp.media.string.props(d,g);if(d.link!=="embed"){return wp.media.string.link(d)}f={};if("video"===e){if(g.width){f.width=g.width}if(g.height){f.height=g.height}}h=g.filename.split(".").pop();if(_.contains(wp.media.view.settings.embedExts,h)){f[h]=g.url}else{return wp.media.string.link(d)}c=wp.shortcode.string({tag:e,attrs:f});return c},image:function(g,i){var c={},d,f,h,e;g=wp.media.string.props(g,i);f=g.classes||[];c.src=typeof i!=="undefined"?i.url:g.url;_.extend(c,_.pick(g,"width","height","alt"));if(g.align&&!g.caption){f.push("align"+g.align)}if(g.size){f.push("size-"+g.size)}c["class"]=_.compact(f).join(" ");d={tag:"img",attrs:c,single:true};if(g.linkUrl){d={tag:"a",attrs:{href:g.linkUrl},content:d}}e=wp.html.string(d);if(g.caption){h={};if(c.width){h.width=c.width}if(g.captionId){h.id=g.captionId}if(g.align){h.align="align"+g.align}e=wp.shortcode.string({tag:"caption",attrs:h,content:e+" "+g.caption})}return e}};wp.media.gallery=(function(){var c={};return{defaults:{order:"ASC",id:wp.media.view.settings.post.id,itemtag:"dl",icontag:"dt",captiontag:"dd",columns:"3",link:"post",size:"thumbnail",orderby:"menu_order ID"},attachments:function(h){var j=h.string(),d=c[j],f,e,i,g;delete c[j];if(d){return d}f=_.defaults(h.attrs.named,wp.media.gallery.defaults);e=_.pick(f,"orderby","order");e.type="image";e.perPage=-1;if("rand"===f.orderby){f._orderbyRandom=true}if(!f.orderby||/^menu_order(?: ID)?$/i.test(f.orderby)){e.orderby="menuOrder"}if(f.ids){e.post__in=f.ids.split(",");e.orderby="post__in"}else{if(f.include){e.post__in=f.include.split(",")}}if(f.exclude){e.post__not_in=f.exclude.split(",")}if(!e.post__in){e.uploadedTo=f.id}g=_.omit(f,"id","ids","include","exclude","orderby","order");i=wp.media.query(e);i.gallery=new Backbone.Model(g);return i},shortcode:function(d){var f=d.props.toJSON(),e=_.pick(f,"orderby","order"),g,h;if(d.gallery){_.extend(e,d.gallery.toJSON())}e.ids=d.pluck("id");if(f.uploadedTo){e.id=f.uploadedTo}if(e._orderbyRandom){e.orderby="rand"}delete e._orderbyRandom;if(e.ids&&"post__in"===e.orderby){delete e.orderby}_.each(wp.media.gallery.defaults,function(j,i){if(j===e[i]){delete e[i]}});g=new wp.shortcode({tag:"gallery",attrs:e,type:"single"});h=new wp.media.model.Attachments(d.models,{props:f});h.gallery=d.gallery;c[g.string()]=h;return g},edit:function(g){var f=wp.shortcode.next("gallery",g),h=wp.media.gallery.defaults.id,d,e;if(!f||f.content!==g){return}f=f.shortcode;if(_.isUndefined(f.get("id"))&&!_.isUndefined(h)){f.set("id",h)}d=wp.media.gallery.attachments(f);e=new wp.media.model.Selection(d.models,{props:d.props.toJSON(),multiple:true});e.gallery=d.gallery;e.more().done(function(){e.props.set({query:false});e.unmirror();e.props.unset("orderby")});if(this.frame){this.frame.dispose()}this.frame=wp.media({frame:"post",state:"gallery-edit",title:wp.media.view.l10n.editGalleryTitle,editing:true,multiple:true,selection:e}).open();return this.frame}}}());wp.media.featuredImage={get:function(){return wp.media.view.settings.post.featuredImageId},set:function(d){var c=wp.media.view.settings;c.post.featuredImageId=d;wp.media.post("set-post-thumbnail",{json:true,post_id:c.post.id,thumbnail_id:c.post.featuredImageId,_wpnonce:c.post.nonce}).done(function(e){b(".inside","#postimagediv").html(e)})},frame:function(){if(this._frame){return this._frame}this._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage()]});this._frame.on("toolbar:create:featured-image",function(c){this.createSelectToolbar(c,{text:wp.media.view.l10n.setFeaturedImage})},this._frame);this._frame.state("featured-image").on("select",this.select);return this._frame},select:function(){var d=wp.media.view.settings,c=this.get("selection").single();if(!d.post.featuredImageId){return}wp.media.featuredImage.set(c?c.id:-1)},init:function(){b("#postimagediv").on("click","#set-post-thumbnail",function(c){c.preventDefault();c.stopPropagation();wp.media.featuredImage.frame().open()}).on("click","#remove-post-thumbnail",function(){wp.media.view.settings.post.featuredImageId=-1})}};b(wp.media.featuredImage.init);wp.media.editor={insert:function(g){var d=typeof(tinymce)!="undefined",j=typeof(QTags)!="undefined",c=window.wpActiveEditor,f;if(window.send_to_editor){return window.send_to_editor.apply(this,arguments)}if(!c){if(d&&tinymce.activeEditor){f=tinymce.activeEditor;c=window.wpActiveEditor=f.id}else{if(!j){return false}}}else{if(d){if(tinymce.activeEditor&&(tinymce.activeEditor.id=="mce_fullscreen"||tinymce.activeEditor.id=="wp_mce_fullscreen")){f=tinymce.activeEditor}else{f=tinymce.get(c)}}}if(f&&!f.isHidden()){if(tinymce.isIE&&f.windowManager.insertimagebookmark){f.selection.moveToBookmark(f.windowManager.insertimagebookmark)}if(g.indexOf("[caption")!==-1){if(f.wpSetImgCaption){g=f.wpSetImgCaption(g)}}else{if(g.indexOf("[gallery")!==-1){if(f.plugins.wpgallery){g=f.plugins.wpgallery._do_gallery(g)}}else{if(g.indexOf("[embed")===0){if(f.plugins.wordpress){g=f.plugins.wordpress._setEmbed(g)}}}}f.execCommand("mceInsertContent",false,g)}else{if(j){QTags.insertContent(g)}else{document.getElementById(c).value+=g}}if(window.tb_remove){try{window.tb_remove()}catch(i){}}},add:function(e,c){var d=this.get(e);if(d){return d}d=a[e]=wp.media(_.defaults(c||{},{frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:true}));d.on("insert",function(f){var g=d.state();f=f||g.get("selection");if(!f){return}b.when.apply(b,f.map(function(i){var h=g.display(i).toJSON();return this.send.attachment(h,i.toJSON())},this)).done(function(){wp.media.editor.insert(_.toArray(arguments).join("\n\n"))})},this);d.state("gallery-edit").on("update",function(f){this.insert(wp.media.gallery.shortcode(f).string())},this);d.state("embed").on("select",function(){var g=d.state(),f=g.get("type"),h=g.props.toJSON();h.url=h.url||"";if("link"===f){_.defaults(h,{title:h.url,linkUrl:h.url});this.send.link(h).done(function(i){wp.media.editor.insert(i)})}else{if("image"===f){_.defaults(h,{title:h.url,linkUrl:"",align:"none",link:"none"});if("none"===h.link){h.linkUrl=""}else{if("file"===h.link){h.linkUrl=h.url}}this.insert(wp.media.string.image(h))}}},this);d.state("featured-image").on("select",wp.media.featuredImage.select);d.setState(d.options.state);return d},id:function(c){if(c){return c}c=wpActiveEditor;if(!c&&typeof tinymce!=="undefined"&&tinymce.activeEditor){c=tinymce.activeEditor.id}c=c||"";return c},get:function(c){c=this.id(c);return a[c]},remove:function(c){c=this.id(c);delete a[c]},send:{attachment:function(f,g){var c=g.caption,d,e;if(!wp.media.view.settings.captions){delete g.caption}f=wp.media.string.props(f,g);d={id:g.id,post_content:g.description,post_excerpt:c};if(f.linkUrl){d.url=f.linkUrl}if("image"===g.type){e=wp.media.string.image(f);_.each({align:"align",size:"image-size",alt:"image_alt"},function(h,i){if(f[i]){d[h]=f[i]}})}else{if("video"===g.type){e=wp.media.string.video(f,g)}else{if("audio"===g.type){e=wp.media.string.audio(f,g)}else{e=wp.media.string.link(f);d.post_title=f.title}}}return wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:d,html:e,post_id:wp.media.view.settings.post.id})},link:function(c){return wp.media.post("send-link-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,src:c.linkUrl,title:c.title,html:wp.media.string.link(c),post_id:wp.media.view.settings.post.id})}},open:function(f,c){var e,d;c=c||{};f=this.id(f);if(typeof tinymce!=="undefined"){d=tinymce.get(f);if(tinymce.isIE&&d&&!d.isHidden()){d.focus();d.windowManager.insertimagebookmark=d.selection.getBookmark()}}e=this.get(f);if(!e||(e.options&&c.state!==e.options.state)){e=this.add(f,c)}return e.open()},init:function(){b(document.body).on("click",".insert-media",function(e){var f=b(this),d=f.data("editor"),c={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:true};e.preventDefault();f.blur();if(f.hasClass("gallery")){c.state="gallery";c.title=wp.media.view.l10n.createGalleryTitle}wp.media.editor.open(d,c)})}};_.bindAll(wp.media.editor,"open");b(wp.media.editor.init)}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js
deleted file mode 100644
index f501b69fc6..0000000000
--- a/wp-includes/js/media-models.js
+++ /dev/null
@@ -1,862 +0,0 @@
-window.wp = window.wp || {};
-
-(function($){
- var Attachment, Attachments, Query, compare, l10n, media;
-
- /**
- * wp.media( attributes )
- *
- * Handles the default media experience. Automatically creates
- * and opens a media frame, and returns the result.
- * Does nothing if the controllers do not exist.
- *
- * @param {object} attributes The properties passed to the main media controller.
- * @return {object} A media workflow.
- */
- media = wp.media = function( attributes ) {
- var MediaFrame = media.view.MediaFrame,
- frame;
-
- if ( ! MediaFrame )
- return;
-
- attributes = _.defaults( attributes || {}, {
- frame: 'select'
- });
-
- if ( 'select' === attributes.frame && MediaFrame.Select )
- frame = new MediaFrame.Select( attributes );
- else if ( 'post' === attributes.frame && MediaFrame.Post )
- frame = new MediaFrame.Post( attributes );
-
- delete attributes.frame;
-
- return frame;
- };
-
- _.extend( media, { model: {}, view: {}, controller: {}, frames: {} });
-
- // Link any localized strings.
- l10n = media.model.l10n = typeof _wpMediaModelsL10n === 'undefined' ? {} : _wpMediaModelsL10n;
-
- // Link any settings.
- media.model.settings = l10n.settings || {};
- delete l10n.settings;
-
- /**
- * ========================================================================
- * UTILITIES
- * ========================================================================
- */
-
- /**
- * A basic comparator.
- *
- * @param {mixed} a The primary parameter to compare.
- * @param {mixed} b The primary parameter to compare.
- * @param {string} ac The fallback parameter to compare, a's cid.
- * @param {string} bc The fallback parameter to compare, b's cid.
- * @return {number} -1: a should come before b.
- * 0: a and b are of the same rank.
- * 1: b should come before a.
- */
- compare = function( a, b, ac, bc ) {
- if ( _.isEqual( a, b ) )
- return ac === bc ? 0 : (ac > bc ? -1 : 1);
- else
- return a > b ? -1 : 1;
- };
-
- _.extend( media, {
- /**
- * media.template( id )
- *
- * Fetches a template by id.
- * See wp.template() in `wp-includes/js/wp-util.js`.
- */
- template: wp.template,
-
- /**
- * media.post( [action], [data] )
- *
- * Sends a POST request to WordPress.
- * See wp.ajax.post() in `wp-includes/js/wp-util.js`.
- */
- post: wp.ajax.post,
-
- /**
- * media.ajax( [action], [options] )
- *
- * Sends an XHR request to WordPress.
- * See wp.ajax.send() in `wp-includes/js/wp-util.js`.
- */
- ajax: wp.ajax.send,
-
- // Scales a set of dimensions to fit within bounding dimensions.
- fit: function( dimensions ) {
- var width = dimensions.width,
- height = dimensions.height,
- maxWidth = dimensions.maxWidth,
- maxHeight = dimensions.maxHeight,
- constraint;
-
- // Compare ratios between the two values to determine which
- // max to constrain by. If a max value doesn't exist, then the
- // opposite side is the constraint.
- if ( ! _.isUndefined( maxWidth ) && ! _.isUndefined( maxHeight ) ) {
- constraint = ( width / height > maxWidth / maxHeight ) ? 'width' : 'height';
- } else if ( _.isUndefined( maxHeight ) ) {
- constraint = 'width';
- } else if ( _.isUndefined( maxWidth ) && height > maxHeight ) {
- constraint = 'height';
- }
-
- // If the value of the constrained side is larger than the max,
- // then scale the values. Otherwise return the originals; they fit.
- if ( 'width' === constraint && width > maxWidth ) {
- return {
- width : maxWidth,
- height: Math.round( maxWidth * height / width )
- };
- } else if ( 'height' === constraint && height > maxHeight ) {
- return {
- width : Math.round( maxHeight * width / height ),
- height: maxHeight
- };
- } else {
- return {
- width : width,
- height: height
- };
- }
- },
-
- // Truncates a string by injecting an ellipsis into the middle.
- // Useful for filenames.
- truncate: function( string, length, replacement ) {
- length = length || 30;
- replacement = replacement || '&hellip;';
-
- if ( string.length <= length )
- return string;
-
- return string.substr( 0, length / 2 ) + replacement + string.substr( -1 * length / 2 );
- }
- });
-
-
- /**
- * ========================================================================
- * MODELS
- * ========================================================================
- */
-
- /**
- * wp.media.attachment
- */
- media.attachment = function( id ) {
- return Attachment.get( id );
- };
-
- /**
- * wp.media.model.Attachment
- */
- Attachment = media.model.Attachment = Backbone.Model.extend({
- sync: function( method, model, options ) {
- // If the attachment does not yet have an `id`, return an instantly
- // rejected promise. Otherwise, all of our requests will fail.
- if ( _.isUndefined( this.id ) )
- return $.Deferred().rejectWith( this ).promise();
-
- // Overload the `read` request so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'get-attachment',
- id: this.id
- });
- return media.ajax( options );
-
- // Overload the `update` request so properties can be saved.
- } else if ( 'update' === method ) {
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update )
- return $.Deferred().rejectWith( this ).promise();
-
- options = options || {};
- options.context = this;
-
- // Set the action and ID.
- options.data = _.extend( options.data || {}, {
- action: 'save-attachment',
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: media.model.settings.post.id
- });
-
- // Record the values of the changed attributes.
- if ( model.hasChanged() ) {
- options.data.changes = {};
-
- _.each( model.changed, function( value, key ) {
- options.data.changes[ key ] = this.get( key );
- }, this );
- }
-
- return media.ajax( options );
-
- // Overload the `delete` request so attachments can be removed.
- // This will permanently delete an attachment.
- } else if ( 'delete' === method ) {
- options = options || {};
-
- if ( ! options.wait )
- this.destroyed = true;
-
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'delete-post',
- id: this.id,
- _wpnonce: this.get('nonces')['delete']
- });
-
- return media.ajax( options ).done( function() {
- this.destroyed = true;
- }).fail( function() {
- this.destroyed = false;
- });
-
- // Otherwise, fall back to `Backbone.sync()`.
- } else {
- return Backbone.Model.prototype.sync.apply( this, arguments );
- }
- },
-
- parse: function( resp, xhr ) {
- if ( ! resp )
- return resp;
-
- // Convert date strings into Date objects.
- resp.date = new Date( resp.date );
- resp.modified = new Date( resp.modified );
- return resp;
- },
-
- saveCompat: function( data, options ) {
- var model = this;
-
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update )
- return $.Deferred().rejectWith( this ).promise();
-
- return media.post( 'save-attachment-compat', _.defaults({
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: media.model.settings.post.id
- }, data ) ).done( function( resp, status, xhr ) {
- model.set( model.parse( resp, xhr ), options );
- });
- }
- }, {
- create: function( attrs ) {
- return Attachments.all.push( attrs );
- },
-
- get: _.memoize( function( id, attachment ) {
- return Attachments.all.push( attachment || { id: id } );
- })
- });
-
- /**
- * wp.media.model.Attachments
- */
- Attachments = media.model.Attachments = Backbone.Collection.extend({
- model: Attachment,
-
- initialize: function( models, options ) {
- options = options || {};
-
- this.props = new Backbone.Model();
- this.filters = options.filters || {};
-
- // Bind default `change` events to the `props` model.
- this.props.on( 'change', this._changeFilteredProps, this );
-
- this.props.on( 'change:order', this._changeOrder, this );
- this.props.on( 'change:orderby', this._changeOrderby, this );
- this.props.on( 'change:query', this._changeQuery, this );
-
- // Set the `props` model and fill the default property values.
- this.props.set( _.defaults( options.props || {} ) );
-
- // Observe another `Attachments` collection if one is provided.
- if ( options.observe )
- this.observe( options.observe );
- },
-
- // Automatically sort the collection when the order changes.
- _changeOrder: function( model, order ) {
- if ( this.comparator )
- this.sort();
- },
-
- // Set the default comparator only when the `orderby` property is set.
- _changeOrderby: function( model, orderby ) {
- // If a different comparator is defined, bail.
- if ( this.comparator && this.comparator !== Attachments.comparator )
- return;
-
- if ( orderby && 'post__in' !== orderby )
- this.comparator = Attachments.comparator;
- else
- delete this.comparator;
- },
-
- // If the `query` property is set to true, query the server using
- // the `props` values, and sync the results to this collection.
- _changeQuery: function( model, query ) {
- if ( query ) {
- this.props.on( 'change', this._requery, this );
- this._requery();
- } else {
- this.props.off( 'change', this._requery, this );
- }
- },
-
- _changeFilteredProps: function( model, options ) {
- // If this is a query, updating the collection will be handled by
- // `this._requery()`.
- if ( this.props.get('query') )
- return;
-
- var changed = _.chain( model.changed ).map( function( t, prop ) {
- var filter = Attachments.filters[ prop ],
- term = model.get( prop );
-
- if ( ! filter )
- return;
-
- if ( term && ! this.filters[ prop ] )
- this.filters[ prop ] = filter;
- else if ( ! term && this.filters[ prop ] === filter )
- delete this.filters[ prop ];
- else
- return;
-
- // Record the change.
- return true;
- }, this ).any().value();
-
- if ( ! changed )
- return;
-
- // If no `Attachments` model is provided to source the searches
- // from, then automatically generate a source from the existing
- // models.
- if ( ! this._source )
- this._source = new Attachments( this.models );
-
- this.reset( this._source.filter( this.validator, this ) );
- },
-
- validateDestroyed: false,
-
- validator: function( attachment ) {
- if ( ! this.validateDestroyed && attachment.destroyed )
- return false;
- return _.all( this.filters, function( filter, key ) {
- return !! filter.call( this, attachment );
- }, this );
- },
-
- validate: function( attachment, options ) {
- var valid = this.validator( attachment ),
- hasAttachment = !! this.get( attachment.cid );
-
- if ( ! valid && hasAttachment )
- this.remove( attachment, options );
- else if ( valid && ! hasAttachment )
- this.add( attachment, options );
-
- return this;
- },
-
- validateAll: function( attachments, options ) {
- options = options || {};
-
- _.each( attachments.models, function( attachment ) {
- this.validate( attachment, { silent: true });
- }, this );
-
- if ( ! options.silent )
- this.trigger( 'reset', this, options );
-
- return this;
- },
-
- observe: function( attachments ) {
- this.observers = this.observers || [];
- this.observers.push( attachments );
-
- attachments.on( 'add change remove', this._validateHandler, this );
- attachments.on( 'reset', this._validateAllHandler, this );
- this.validateAll( attachments );
- return this;
- },
-
- unobserve: function( attachments ) {
- if ( attachments ) {
- attachments.off( null, null, this );
- this.observers = _.without( this.observers, attachments );
-
- } else {
- _.each( this.observers, function( attachments ) {
- attachments.off( null, null, this );
- }, this );
- delete this.observers;
- }
-
- return this;
- },
-
- _validateHandler: function( attachment, attachments, options ) {
- // If we're not mirroring this `attachments` collection,
- // only retain the `silent` option.
- options = attachments === this.mirroring ? options : {
- silent: options && options.silent
- };
-
- return this.validate( attachment, options );
- },
-
- _validateAllHandler: function( attachments, options ) {
- return this.validateAll( attachments, options );
- },
-
- mirror: function( attachments ) {
- if ( this.mirroring && this.mirroring === attachments )
- return this;
-
- this.unmirror();
- this.mirroring = attachments;
-
- // Clear the collection silently. A `reset` event will be fired
- // when `observe()` calls `validateAll()`.
- this.reset( [], { silent: true } );
- this.observe( attachments );
-
- return this;
- },
-
- unmirror: function() {
- if ( ! this.mirroring )
- return;
-
- this.unobserve( this.mirroring );
- delete this.mirroring;
- },
-
- more: function( options ) {
- var deferred = $.Deferred(),
- mirroring = this.mirroring,
- attachments = this;
-
- if ( ! mirroring || ! mirroring.more )
- return deferred.resolveWith( this ).promise();
-
- // If we're mirroring another collection, forward `more` to
- // the mirrored collection. Account for a race condition by
- // checking if we're still mirroring that collection when
- // the request resolves.
- mirroring.more( options ).done( function() {
- if ( this === attachments.mirroring )
- deferred.resolveWith( this );
- });
-
- return deferred.promise();
- },
-
- hasMore: function() {
- return this.mirroring ? this.mirroring.hasMore() : false;
- },
-
- parse: function( resp, xhr ) {
- if ( ! _.isArray( resp ) )
- resp = [resp];
-
- return _.map( resp, function( attrs ) {
- var id, attachment, newAttributes;
-
- if ( attrs instanceof Backbone.Model ) {
- id = attrs.get( 'id' );
- attrs = attrs.attributes;
- } else {
- id = attrs.id;
- }
-
- attachment = Attachment.get( id );
- newAttributes = attachment.parse( attrs, xhr );
-
- if ( ! _.isEqual( attachment.attributes, newAttributes ) )
- attachment.set( newAttributes );
-
- return attachment;
- });
- },
-
- _requery: function() {
- if ( this.props.get('query') )
- this.mirror( Query.get( this.props.toJSON() ) );
- },
-
- // If this collection is sorted by `menuOrder`, recalculates and saves
- // the menu order to the database.
- saveMenuOrder: function() {
- if ( 'menuOrder' !== this.props.get('orderby') )
- return;
-
- // Removes any uploading attachments, updates each attachment's
- // menu order, and returns an object with an { id: menuOrder }
- // mapping to pass to the request.
- var attachments = this.chain().filter( function( attachment ) {
- return ! _.isUndefined( attachment.id );
- }).map( function( attachment, index ) {
- // Indices start at 1.
- index = index + 1;
- attachment.set( 'menuOrder', index );
- return [ attachment.id, index ];
- }).object().value();
-
- if ( _.isEmpty( attachments ) )
- return;
-
- return media.post( 'save-attachment-order', {
- nonce: media.model.settings.post.nonce,
- post_id: media.model.settings.post.id,
- attachments: attachments
- });
- }
- }, {
- comparator: function( a, b, options ) {
- var key = this.props.get('orderby'),
- order = this.props.get('order') || 'DESC',
- ac = a.cid,
- bc = b.cid;
-
- a = a.get( key );
- b = b.get( key );
-
- if ( 'date' === key || 'modified' === key ) {
- a = a || new Date();
- b = b || new Date();
- }
-
- // If `options.ties` is set, don't enforce the `cid` tiebreaker.
- if ( options && options.ties )
- ac = bc = null;
-
- return ( 'DESC' === order ) ? compare( a, b, ac, bc ) : compare( b, a, bc, ac );
- },
-
- filters: {
- // Note that this client-side searching is *not* equivalent
- // to our server-side searching.
- search: function( attachment ) {
- if ( ! this.props.get('search') )
- return true;
-
- return _.any(['title','filename','description','caption','name'], function( key ) {
- var value = attachment.get( key );
- return value && -1 !== value.search( this.props.get('search') );
- }, this );
- },
-
- type: function( attachment ) {
- var type = this.props.get('type');
- return ! type || -1 !== type.indexOf( attachment.get('type') );
- },
-
- uploadedTo: function( attachment ) {
- var uploadedTo = this.props.get('uploadedTo');
- if ( _.isUndefined( uploadedTo ) )
- return true;
-
- return uploadedTo === attachment.get('uploadedTo');
- }
- }
- });
-
- Attachments.all = new Attachments();
-
- /**
- * wp.media.query
- */
- media.query = function( props ) {
- return new Attachments( null, {
- props: _.extend( _.defaults( props || {}, { orderby: 'date' } ), { query: true } )
- });
- };
-
- /**
- * wp.media.model.Query
- *
- * A set of attachments that corresponds to a set of consecutively paged
- * queries on the server.
- *
- * Note: Do NOT change this.args after the query has been initialized.
- * Things will break.
- */
- Query = media.model.Query = Attachments.extend({
- initialize: function( models, options ) {
- var allowed;
-
- options = options || {};
- Attachments.prototype.initialize.apply( this, arguments );
-
- this.args = options.args;
- this._hasMore = true;
- this.created = new Date();
-
- this.filters.order = function( attachment ) {
- var orderby = this.props.get('orderby'),
- order = this.props.get('order');
-
- if ( ! this.comparator )
- return true;
-
- // We want any items that can be placed before the last
- // item in the set. If we add any items after the last
- // item, then we can't guarantee the set is complete.
- if ( this.length ) {
- return 1 !== this.comparator( attachment, this.last(), { ties: true });
-
- // Handle the case where there are no items yet and
- // we're sorting for recent items. In that case, we want
- // changes that occurred after we created the query.
- } else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
- return attachment.get( orderby ) >= this.created;
-
- // If we're sorting by menu order and we have no items,
- // accept any items that have the default menu order (0).
- } else if ( 'ASC' === order && 'menuOrder' === orderby ) {
- return attachment.get( orderby ) === 0;
- }
-
- // Otherwise, we don't want any items yet.
- return false;
- };
-
- // Observe the central `wp.Uploader.queue` collection to watch for
- // new matches for the query.
- //
- // Only observe when a limited number of query args are set. There
- // are no filters for other properties, so observing will result in
- // false positives in those queries.
- allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent' ];
- if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() )
- this.observe( wp.Uploader.queue );
- },
-
- hasMore: function() {
- return this._hasMore;
- },
-
- more: function( options ) {
- var query = this;
-
- if ( this._more && 'pending' === this._more.state() )
- return this._more;
-
- if ( ! this.hasMore() )
- return $.Deferred().resolveWith( this ).promise();
-
- options = options || {};
- options.remove = false;
-
- return this._more = this.fetch( options ).done( function( resp ) {
- if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page )
- query._hasMore = false;
- });
- },
-
- sync: function( method, model, options ) {
- var fallback;
-
- // Overload the read method so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'query-attachments',
- post_id: media.model.settings.post.id
- });
-
- // Clone the args so manipulation is non-destructive.
- args = _.clone( this.args );
-
- // Determine which page to query.
- if ( -1 !== args.posts_per_page )
- args.paged = Math.floor( this.length / args.posts_per_page ) + 1;
-
- options.data.query = args;
- return media.ajax( options );
-
- // Otherwise, fall back to Backbone.sync()
- } else {
- fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
- return fallback.sync.apply( this, arguments );
- }
- }
- }, {
- defaultProps: {
- orderby: 'date',
- order: 'DESC'
- },
-
- defaultArgs: {
- posts_per_page: 40
- },
-
- orderby: {
- allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
- valuemap: {
- 'id': 'ID',
- 'uploadedTo': 'parent',
- 'menuOrder': 'menu_order ID'
- }
- },
-
- propmap: {
- 'search': 's',
- 'type': 'post_mime_type',
- 'perPage': 'posts_per_page',
- 'menuOrder': 'menu_order',
- 'uploadedTo': 'post_parent'
- },
-
- // Caches query objects so queries can be easily reused.
- get: (function(){
- var queries = [];
-
- return function( props, options ) {
- var args = {},
- orderby = Query.orderby,
- defaults = Query.defaultProps,
- query;
-
- // Remove the `query` property. This isn't linked to a query,
- // this *is* the query.
- delete props.query;
-
- // Fill default args.
- _.defaults( props, defaults );
-
- // Normalize the order.
- props.order = props.order.toUpperCase();
- if ( 'DESC' !== props.order && 'ASC' !== props.order )
- props.order = defaults.order.toUpperCase();
-
- // Ensure we have a valid orderby value.
- if ( ! _.contains( orderby.allowed, props.orderby ) )
- props.orderby = defaults.orderby;
-
- // Generate the query `args` object.
- // Correct any differing property names.
- _.each( props, function( value, prop ) {
- if ( _.isNull( value ) )
- return;
-
- args[ Query.propmap[ prop ] || prop ] = value;
- });
-
- // Fill any other default query args.
- _.defaults( args, Query.defaultArgs );
-
- // `props.orderby` does not always map directly to `args.orderby`.
- // Substitute exceptions specified in orderby.keymap.
- args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
-
- // Search the query cache for matches.
- query = _.find( queries, function( query ) {
- return _.isEqual( query.args, args );
- });
-
- // Otherwise, create a new query and add it to the cache.
- if ( ! query ) {
- query = new Query( [], _.extend( options || {}, {
- props: props,
- args: args
- } ) );
- queries.push( query );
- }
-
- return query;
- };
- }())
- });
-
- /**
- * wp.media.model.Selection
- *
- * Used to manage a selection of attachments in the views.
- */
- media.model.Selection = Attachments.extend({
- initialize: function( models, options ) {
- Attachments.prototype.initialize.apply( this, arguments );
- this.multiple = options && options.multiple;
-
- // Refresh the `single` model whenever the selection changes.
- // Binds `single` instead of using the context argument to ensure
- // it receives no parameters.
- this.on( 'add remove reset', _.bind( this.single, this, false ) );
- },
-
- // Override the selection's add method.
- // If the workflow does not support multiple
- // selected attachments, reset the selection.
- add: function( models, options ) {
- if ( ! this.multiple )
- this.remove( this.models );
-
- return Attachments.prototype.add.call( this, models, options );
- },
-
- single: function( model ) {
- var previous = this._single;
-
- // If a `model` is provided, use it as the single model.
- if ( model )
- this._single = model;
-
- // If the single model isn't in the selection, remove it.
- if ( this._single && ! this.get( this._single.cid ) )
- delete this._single;
-
- this._single = this._single || this.last();
-
- // If single has changed, fire an event.
- if ( this._single !== previous ) {
- if ( previous ) {
- previous.trigger( 'selection:unsingle', previous, this );
-
- // If the model was already removed, trigger the collection
- // event manually.
- if ( ! this.get( previous.cid ) )
- this.trigger( 'selection:unsingle', previous, this );
- }
- if ( this._single )
- this._single.trigger( 'selection:single', this._single, this );
- }
-
- // Return the single model, or the last model as a fallback.
- return this._single;
- }
- });
-
- // Clean up. Prevents mobile browsers caching
- $(window).on('unload', function(){
- window.wp = null;
- });
-
-}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/media-models.min.js b/wp-includes/js/media-models.min.js
deleted file mode 100644
index 04bc333c6e..0000000000
--- a/wp-includes/js/media-models.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(f){var d,c,a,e,b,g;g=wp.media=function(h){var i=g.view.MediaFrame,j;if(!i){return}h=_.defaults(h||{},{frame:"select"});if("select"===h.frame&&i.Select){j=new i.Select(h)}else{if("post"===h.frame&&i.Post){j=new i.Post(h)}}delete h.frame;return j};_.extend(g,{model:{},view:{},controller:{},frames:{}});b=g.model.l10n=typeof _wpMediaModelsL10n==="undefined"?{}:_wpMediaModelsL10n;g.model.settings=b.settings||{};delete b.settings;e=function(i,h,j,k){if(_.isEqual(i,h)){return j===k?0:(j>k?-1:1)}else{return i>h?-1:1}};_.extend(g,{template:wp.template,post:wp.ajax.post,ajax:wp.ajax.send,fit:function(l){var i=l.width,h=l.height,k=l.maxWidth,j=l.maxHeight,m;if(!_.isUndefined(k)&&!_.isUndefined(j)){m=(i/h>k/j)?"width":"height"}else{if(_.isUndefined(j)){m="width"}else{if(_.isUndefined(k)&&h>j){m="height"}}}if("width"===m&&i>k){return{width:k,height:Math.round(k*h/i)}}else{if("height"===m&&h>j){return{width:Math.round(j*i/h),height:j}}else{return{width:i,height:h}}}},truncate:function(h,j,i){j=j||30;i=i||"&hellip;";if(h.length<=j){return h}return h.substr(0,j/2)+i+h.substr(-1*j/2)}});g.attachment=function(h){return d.get(h)};d=g.model.Attachment=Backbone.Model.extend({sync:function(j,i,h){if(_.isUndefined(this.id)){return f.Deferred().rejectWith(this).promise()}if("read"===j){h=h||{};h.context=this;h.data=_.extend(h.data||{},{action:"get-attachment",id:this.id});return g.ajax(h)}else{if("update"===j){if(!this.get("nonces")||!this.get("nonces").update){return f.Deferred().rejectWith(this).promise()}h=h||{};h.context=this;h.data=_.extend(h.data||{},{action:"save-attachment",id:this.id,nonce:this.get("nonces").update,post_id:g.model.settings.post.id});if(i.hasChanged()){h.data.changes={};_.each(i.changed,function(l,k){h.data.changes[k]=this.get(k)},this)}return g.ajax(h)}else{if("delete"===j){h=h||{};if(!h.wait){this.destroyed=true}h.context=this;h.data=_.extend(h.data||{},{action:"delete-post",id:this.id,_wpnonce:this.get("nonces")["delete"]});return g.ajax(h).done(function(){this.destroyed=true}).fail(function(){this.destroyed=false})}else{return Backbone.Model.prototype.sync.apply(this,arguments)}}}},parse:function(i,h){if(!i){return i}i.date=new Date(i.date);i.modified=new Date(i.modified);return i},saveCompat:function(j,i){var h=this;if(!this.get("nonces")||!this.get("nonces").update){return f.Deferred().rejectWith(this).promise()}return g.post("save-attachment-compat",_.defaults({id:this.id,nonce:this.get("nonces").update,post_id:g.model.settings.post.id},j)).done(function(m,k,l){h.set(h.parse(m,l),i)})}},{create:function(h){return c.all.push(h)},get:_.memoize(function(i,h){return c.all.push(h||{id:i})})});c=g.model.Attachments=Backbone.Collection.extend({model:d,initialize:function(i,h){h=h||{};this.props=new Backbone.Model();this.filters=h.filters||{};this.props.on("change",this._changeFilteredProps,this);this.props.on("change:order",this._changeOrder,this);this.props.on("change:orderby",this._changeOrderby,this);this.props.on("change:query",this._changeQuery,this);this.props.set(_.defaults(h.props||{}));if(h.observe){this.observe(h.observe)}},_changeOrder:function(i,h){if(this.comparator){this.sort()}},_changeOrderby:function(h,i){if(this.comparator&&this.comparator!==c.comparator){return}if(i&&"post__in"!==i){this.comparator=c.comparator}else{delete this.comparator}},_changeQuery:function(h,i){if(i){this.props.on("change",this._requery,this);this._requery()}else{this.props.off("change",this._requery,this)}},_changeFilteredProps:function(i,h){if(this.props.get("query")){return}var j=_.chain(i.changed).map(function(l,n){var m=c.filters[n],k=i.get(n);if(!m){return}if(k&&!this.filters[n]){this.filters[n]=m}else{if(!k&&this.filters[n]===m){delete this.filters[n]}else{return}}return true},this).any().value();if(!j){return}if(!this._source){this._source=new c(this.models)}this.reset(this._source.filter(this.validator,this))},validateDestroyed:false,validator:function(h){if(!this.validateDestroyed&&h.destroyed){return false}return _.all(this.filters,function(j,i){return !!j.call(this,h)},this)},validate:function(k,i){var j=this.validator(k),h=!!this.get(k.cid);if(!j&&h){this.remove(k,i)}else{if(j&&!h){this.add(k,i)}}return this},validateAll:function(h,i){i=i||{};_.each(h.models,function(j){this.validate(j,{silent:true})},this);if(!i.silent){this.trigger("reset",this,i)}return this},observe:function(h){this.observers=this.observers||[];this.observers.push(h);h.on("add change remove",this._validateHandler,this);h.on("reset",this._validateAllHandler,this);this.validateAll(h);return this},unobserve:function(h){if(h){h.off(null,null,this);this.observers=_.without(this.observers,h)}else{_.each(this.observers,function(i){i.off(null,null,this)},this);delete this.observers}return this},_validateHandler:function(j,h,i){i=h===this.mirroring?i:{silent:i&&i.silent};return this.validate(j,i)},_validateAllHandler:function(h,i){return this.validateAll(h,i)},mirror:function(h){if(this.mirroring&&this.mirroring===h){return this}this.unmirror();this.mirroring=h;this.reset([],{silent:true});this.observe(h);return this},unmirror:function(){if(!this.mirroring){return}this.unobserve(this.mirroring);delete this.mirroring},more:function(j){var i=f.Deferred(),k=this.mirroring,h=this;if(!k||!k.more){return i.resolveWith(this).promise()}k.more(j).done(function(){if(this===h.mirroring){i.resolveWith(this)}});return i.promise()},hasMore:function(){return this.mirroring?this.mirroring.hasMore():false},parse:function(i,h){if(!_.isArray(i)){i=[i]}return _.map(i,function(j){var m,l,k;if(j instanceof Backbone.Model){m=j.get("id");j=j.attributes}else{m=j.id}l=d.get(m);k=l.parse(j,h);if(!_.isEqual(l.attributes,k)){l.set(k)}return l})},_requery:function(){if(this.props.get("query")){this.mirror(a.get(this.props.toJSON()))}},saveMenuOrder:function(){if("menuOrder"!==this.props.get("orderby")){return}var h=this.chain().filter(function(i){return !_.isUndefined(i.id)}).map(function(j,i){i=i+1;j.set("menuOrder",i);return[j.id,i]}).object().value();if(_.isEmpty(h)){return}return g.post("save-attachment-order",{nonce:g.model.settings.post.nonce,post_id:g.model.settings.post.id,attachments:h})}},{comparator:function(j,i,k){var l=this.props.get("orderby"),h=this.props.get("order")||"DESC",m=j.cid,n=i.cid;j=j.get(l);i=i.get(l);if("date"===l||"modified"===l){j=j||new Date();i=i||new Date()}if(k&&k.ties){m=n=null}return("DESC"===h)?e(j,i,m,n):e(i,j,n,m)},filters:{search:function(h){if(!this.props.get("search")){return true}return _.any(["title","filename","description","caption","name"],function(i){var j=h.get(i);return j&&-1!==j.search(this.props.get("search"))},this)},type:function(i){var h=this.props.get("type");return !h||-1!==h.indexOf(i.get("type"))},uploadedTo:function(i){var h=this.props.get("uploadedTo");if(_.isUndefined(h)){return true}return h===i.get("uploadedTo")}}});c.all=new c();g.query=function(h){return new c(null,{props:_.extend(_.defaults(h||{},{orderby:"date"}),{query:true})})};a=g.model.Query=c.extend({initialize:function(j,h){var i;h=h||{};c.prototype.initialize.apply(this,arguments);this.args=h.args;this._hasMore=true;this.created=new Date();this.filters.order=function(m){var l=this.props.get("orderby"),k=this.props.get("order");if(!this.comparator){return true}if(this.length){return 1!==this.comparator(m,this.last(),{ties:true})}else{if("DESC"===k&&("date"===l||"modified"===l)){return m.get(l)>=this.created}else{if("ASC"===k&&"menuOrder"===l){return m.get(l)===0}}}return false};i=["s","order","orderby","posts_per_page","post_mime_type","post_parent"];if(wp.Uploader&&_(this.args).chain().keys().difference(i).isEmpty().value()){this.observe(wp.Uploader.queue)}},hasMore:function(){return this._hasMore},more:function(h){var i=this;if(this._more&&"pending"===this._more.state()){return this._more}if(!this.hasMore()){return f.Deferred().resolveWith(this).promise()}h=h||{};h.remove=false;return this._more=this.fetch(h).done(function(j){if(_.isEmpty(j)||-1===this.args.posts_per_page||j.length<this.args.posts_per_page){i._hasMore=false}})},sync:function(k,i,h){var j;if("read"===k){h=h||{};h.context=this;h.data=_.extend(h.data||{},{action:"query-attachments",post_id:g.model.settings.post.id});args=_.clone(this.args);if(-1!==args.posts_per_page){args.paged=Math.floor(this.length/args.posts_per_page)+1}h.data.query=args;return g.ajax(h)}else{j=c.prototype.sync?c.prototype:Backbone;return j.sync.apply(this,arguments)}}},{defaultProps:{orderby:"date",order:"DESC"},defaultArgs:{posts_per_page:40},orderby:{allowed:["name","author","date","title","modified","uploadedTo","id","post__in","menuOrder"],valuemap:{id:"ID",uploadedTo:"parent",menuOrder:"menu_order ID"}},propmap:{search:"s",type:"post_mime_type",perPage:"posts_per_page",menuOrder:"menu_order",uploadedTo:"post_parent"},get:(function(){var h=[];return function(k,j){var i={},m=a.orderby,n=a.defaultProps,l;delete k.query;_.defaults(k,n);k.order=k.order.toUpperCase();if("DESC"!==k.order&&"ASC"!==k.order){k.order=n.order.toUpperCase()}if(!_.contains(m.allowed,k.orderby)){k.orderby=n.orderby}_.each(k,function(o,p){if(_.isNull(o)){return}i[a.propmap[p]||p]=o});_.defaults(i,a.defaultArgs);i.orderby=m.valuemap[k.orderby]||k.orderby;l=_.find(h,function(o){return _.isEqual(o.args,i)});if(!l){l=new a([],_.extend(j||{},{props:k,args:i}));h.push(l)}return l}}())});g.model.Selection=c.extend({initialize:function(i,h){c.prototype.initialize.apply(this,arguments);this.multiple=h&&h.multiple;this.on("add remove reset",_.bind(this.single,this,false))},add:function(i,h){if(!this.multiple){this.remove(this.models)}return c.prototype.add.call(this,i,h)},single:function(h){var i=this._single;if(h){this._single=h}if(this._single&&!this.get(this._single.cid)){delete this._single}this._single=this._single||this.last();if(this._single!==i){if(i){i.trigger("selection:unsingle",i,this);if(!this.get(i.cid)){this.trigger("selection:unsingle",i,this)}}if(this._single){this._single.trigger("selection:single",this._single,this)}}return this._single}});f(window).on("unload",function(){window.wp=null})}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
deleted file mode 100644
index a14a57b042..0000000000
--- a/wp-includes/js/media-views.js
+++ /dev/null
@@ -1,3966 +0,0 @@
-(function($){
- var media = wp.media,
- Attachment = media.model.Attachment,
- Attachments = media.model.Attachments,
- Query = media.model.Query,
- l10n;
-
- // Link any localized strings.
- l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
-
- // Link any settings.
- media.view.settings = l10n.settings || {};
- delete l10n.settings;
-
- // Copy the `post` setting over to the model settings.
- media.model.settings.post = media.view.settings.post;
-
- // Check if the browser supports CSS 3.0 transitions
- $.support.transition = (function(){
- var style = document.documentElement.style,
- transitions = {
- WebkitTransition: 'webkitTransitionEnd',
- MozTransition: 'transitionend',
- OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend'
- }, transition;
-
- transition = _.find( _.keys( transitions ), function( transition ) {
- return ! _.isUndefined( style[ transition ] );
- });
-
- return transition && {
- end: transitions[ transition ]
- };
- }());
-
- // Makes it easier to bind events using transitions.
- media.transition = function( selector, sensitivity ) {
- var deferred = $.Deferred();
-
- sensitivity = sensitivity || 2000;
-
- if ( $.support.transition ) {
- if ( ! (selector instanceof $) )
- selector = $( selector );
-
- // Resolve the deferred when the first element finishes animating.
- selector.first().one( $.support.transition.end, deferred.resolve );
-
- // Just in case the event doesn't trigger, fire a callback.
- _.delay( deferred.resolve, sensitivity );
-
- // Otherwise, execute on the spot.
- } else {
- deferred.resolve();
- }
-
- return deferred.promise();
- };
-
- /**
- * ========================================================================
- * CONTROLLERS
- * ========================================================================
- */
-
- /**
- * wp.media.controller.Region
- */
- media.controller.Region = function( options ) {
- _.extend( this, _.pick( options || {}, 'id', 'view', 'selector' ) );
- };
-
- // Use Backbone's self-propagating `extend` inheritance method.
- media.controller.Region.extend = Backbone.Model.extend;
-
- _.extend( media.controller.Region.prototype, {
- mode: function( mode ) {
- if ( ! mode )
- return this._mode;
-
- // Bail if we're trying to change to the current mode.
- if ( mode === this._mode )
- return this;
-
- this.trigger('deactivate');
- this._mode = mode;
- this.render( mode );
- this.trigger('activate');
- return this;
- },
-
- render: function( mode ) {
- // If no mode is provided, just re-render the current mode.
- // If the provided mode isn't active, perform a full switch.
- if ( mode && mode !== this._mode )
- return this.mode( mode );
-
- var set = { view: null },
- view;
-
- this.trigger( 'create', set );
- view = set.view;
- this.trigger( 'render', view );
- if ( view )
- this.set( view );
- return this;
- },
-
- get: function() {
- return this.view.views.first( this.selector );
- },
-
- set: function( views, options ) {
- if ( options )
- options.add = false;
- return this.view.views.set( this.selector, views, options );
- },
-
- trigger: function( event ) {
- var base;
- if ( ! this._mode )
- return;
-
- var args = _.toArray( arguments );
- base = this.id + ':' + event;
-
- // Trigger `region:action:mode` event.
- args[0] = base + ':' + this._mode;
- this.view.trigger.apply( this.view, args );
-
- // Trigger `region:action` event.
- args[0] = base;
- this.view.trigger.apply( this.view, args );
- return this;
- }
- });
-
- /**
- * wp.media.controller.StateMachine
- */
- media.controller.StateMachine = function( states ) {
- this.states = new Backbone.Collection( states );
- };
-
- // Use Backbone's self-propagating `extend` inheritance method.
- media.controller.StateMachine.extend = Backbone.Model.extend;
-
- // Add events to the `StateMachine`.
- _.extend( media.controller.StateMachine.prototype, Backbone.Events, {
-
- // Fetch a state.
- //
- // If no `id` is provided, returns the active state.
- //
- // Implicitly creates states.
- state: function( id ) {
- // Ensure that the `states` collection exists so the `StateMachine`
- // can be used as a mixin.
- this.states = this.states || new Backbone.Collection();
-
- // Default to the active state.
- id = id || this._state;
-
- if ( id && ! this.states.get( id ) )
- this.states.add({ id: id });
- return this.states.get( id );
- },
-
- // Sets the active state.
- setState: function( id ) {
- var previous = this.state();
-
- // Bail if we're trying to select the current state, if we haven't
- // created the `states` collection, or are trying to select a state
- // that does not exist.
- if ( ( previous && id === previous.id ) || ! this.states || ! this.states.get( id ) )
- return this;
-
- if ( previous ) {
- previous.trigger('deactivate');
- this._lastState = previous.id;
- }
-
- this._state = id;
- this.state().trigger('activate');
-
- return this;
- },
-
- // Returns the previous active state.
- //
- // Call the `state()` method with no parameters to retrieve the current
- // active state.
- lastState: function() {
- if ( this._lastState )
- return this.state( this._lastState );
- }
- });
-
- // Map methods from the `states` collection to the `StateMachine` itself.
- _.each([ 'on', 'off', 'trigger' ], function( method ) {
- media.controller.StateMachine.prototype[ method ] = function() {
- // Ensure that the `states` collection exists so the `StateMachine`
- // can be used as a mixin.
- this.states = this.states || new Backbone.Collection();
- // Forward the method to the `states` collection.
- this.states[ method ].apply( this.states, arguments );
- return this;
- };
- });
-
-
- // wp.media.controller.State
- // ---------------------------
- media.controller.State = Backbone.Model.extend({
- constructor: function() {
- this.on( 'activate', this._preActivate, this );
- this.on( 'activate', this.activate, this );
- this.on( 'activate', this._postActivate, this );
- this.on( 'deactivate', this._deactivate, this );
- this.on( 'deactivate', this.deactivate, this );
- this.on( 'reset', this.reset, this );
- this.on( 'ready', this._ready, this );
- this.on( 'ready', this.ready, this );
- Backbone.Model.apply( this, arguments );
- this.on( 'change:menu', this._updateMenu, this );
- },
-
- ready: function() {},
- activate: function() {},
- deactivate: function() {},
- reset: function() {},
-
- _ready: function() {
- this._updateMenu();
- },
-
- _preActivate: function() {
- this.active = true;
- },
-
- _postActivate: function() {
- this.on( 'change:menu', this._menu, this );
- this.on( 'change:titleMode', this._title, this );
- this.on( 'change:content', this._content, this );
- this.on( 'change:toolbar', this._toolbar, this );
-
- this.frame.on( 'title:render:default', this._renderTitle, this );
-
- this._title();
- this._menu();
- this._toolbar();
- this._content();
- this._router();
- },
-
-
- _deactivate: function() {
- this.active = false;
-
- this.frame.off( 'title:render:default', this._renderTitle, this );
-
- this.off( 'change:menu', this._menu, this );
- this.off( 'change:titleMode', this._title, this );
- this.off( 'change:content', this._content, this );
- this.off( 'change:toolbar', this._toolbar, this );
- },
-
- _title: function() {
- this.frame.title.render( this.get('titleMode') || 'default' );
- },
-
- _renderTitle: function( view ) {
- view.$el.text( this.get('title') || '' );
- },
-
- _router: function() {
- var router = this.frame.router,
- mode = this.get('router'),
- view;
-
- this.frame.$el.toggleClass( 'hide-router', ! mode );
- if ( ! mode )
- return;
-
- this.frame.router.render( mode );
-
- view = router.get();
- if ( view && view.select )
- view.select( this.frame.content.mode() );
- },
-
- _menu: function() {
- var menu = this.frame.menu,
- mode = this.get('menu'),
- view;
-
- if ( ! mode )
- return;
-
- menu.mode( mode );
-
- view = menu.get();
- if ( view && view.select )
- view.select( this.id );
- },
-
- _updateMenu: function() {
- var previous = this.previous('menu'),
- menu = this.get('menu');
-
- if ( previous )
- this.frame.off( 'menu:render:' + previous, this._renderMenu, this );
-
- if ( menu )
- this.frame.on( 'menu:render:' + menu, this._renderMenu, this );
- },
-
- _renderMenu: function( view ) {
- var menuItem = this.get('menuItem'),
- title = this.get('title'),
- priority = this.get('priority');
-
- if ( ! menuItem && title ) {
- menuItem = { text: title };
-
- if ( priority )
- menuItem.priority = priority;
- }
-
- if ( ! menuItem )
- return;
-
- view.set( this.id, menuItem );
- }
- });
-
- _.each(['toolbar','content'], function( region ) {
- media.controller.State.prototype[ '_' + region ] = function() {
- var mode = this.get( region );
- if ( mode )
- this.frame[ region ].render( mode );
- };
- });
-
- // wp.media.controller.Library
- // ---------------------------
- media.controller.Library = media.controller.State.extend({
- defaults: {
- id: 'library',
- multiple: false, // false, 'add', 'reset'
- describe: false,
- toolbar: 'select',
- sidebar: 'settings',
- content: 'upload',
- router: 'browse',
- menu: 'default',
- searchable: true,
- filterable: false,
- sortable: true,
- title: l10n.mediaLibraryTitle,
-
- // Uses a user setting to override the content mode.
- contentUserSetting: true,
-
- // Sync the selection from the last state when 'multiple' matches.
- syncSelection: true
- },
-
- initialize: function() {
- var selection = this.get('selection'),
- props;
-
- // If a library isn't provided, query all media items.
- if ( ! this.get('library') )
- this.set( 'library', media.query() );
-
- // If a selection instance isn't provided, create one.
- if ( ! (selection instanceof media.model.Selection) ) {
- props = selection;
-
- if ( ! props ) {
- props = this.get('library').props.toJSON();
- props = _.omit( props, 'orderby', 'query' );
- }
-
- // If the `selection` attribute is set to an object,
- // it will use those values as the selection instance's
- // `props` model. Otherwise, it will copy the library's
- // `props` model.
- this.set( 'selection', new media.model.Selection( null, {
- multiple: this.get('multiple'),
- props: props
- }) );
- }
-
- if ( ! this.get('edge') )
- this.set( 'edge', 120 );
-
- if ( ! this.get('gutter') )
- this.set( 'gutter', 8 );
-
- this.resetDisplays();
- },
-
- activate: function() {
- this.syncSelection();
-
- wp.Uploader.queue.on( 'add', this.uploading, this );
-
- this.get('selection').on( 'add remove reset', this.refreshContent, this );
-
- if ( this.get('contentUserSetting') ) {
- this.frame.on( 'content:activate', this.saveContentMode, this );
- this.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );
- }
- },
-
- deactivate: function() {
- this.recordSelection();
-
- this.frame.off( 'content:activate', this.saveContentMode, this );
-
- // Unbind all event handlers that use this state as the context
- // from the selection.
- this.get('selection').off( null, null, this );
-
- wp.Uploader.queue.off( null, null, this );
- },
-
- reset: function() {
- this.get('selection').reset();
- this.resetDisplays();
- this.refreshContent();
- },
-
- resetDisplays: function() {
- var defaultProps = media.view.settings.defaultProps;
- this._displays = [];
- this._defaultDisplaySettings = {
- align: defaultProps.align || getUserSetting( 'align', 'none' ),
- size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ),
- link: defaultProps.link || getUserSetting( 'urlbutton', 'file' )
- };
- },
-
- display: function( attachment ) {
- var displays = this._displays;
-
- if ( ! displays[ attachment.cid ] )
- displays[ attachment.cid ] = new Backbone.Model( this.defaultDisplaySettings( attachment ) );
-
- return displays[ attachment.cid ];
- },
-
- defaultDisplaySettings: function( attachment ) {
- settings = this._defaultDisplaySettings;
- if ( settings.canEmbed = this.canEmbed( attachment ) )
- settings.link = 'embed';
- return settings;
- },
-
- canEmbed: function( attachment ) {
- // If uploading, we know the filename but not the mime type.
- if ( ! attachment.get('uploading') ) {
- var type = attachment.get('type');
- if ( type !== 'audio' && type !== 'video' )
- return false;
- }
-
- return _.contains( media.view.settings.embedExts, attachment.get('filename').split('.').pop() );
- },
-
- syncSelection: function() {
- var selection = this.get('selection'),
- manager = this.frame._selection;
-
- if ( ! this.get('syncSelection') || ! manager || ! selection )
- return;
-
- // If the selection supports multiple items, validate the stored
- // attachments based on the new selection's conditions. Record
- // the attachments that are not included; we'll maintain a
- // reference to those. Other attachments are considered in flux.
- if ( selection.multiple ) {
- selection.reset( [], { silent: true });
- selection.validateAll( manager.attachments );
- manager.difference = _.difference( manager.attachments.models, selection.models );
- }
-
- // Sync the selection's single item with the master.
- selection.single( manager.single );
- },
-
- recordSelection: function() {
- var selection = this.get('selection'),
- manager = this.frame._selection,
- filtered;
-
- if ( ! this.get('syncSelection') || ! manager || ! selection )
- return;
-
- // Record the currently active attachments, which is a combination
- // of the selection's attachments and the set of selected
- // attachments that this specific selection considered invalid.
- // Reset the difference and record the single attachment.
- if ( selection.multiple ) {
- manager.attachments.reset( selection.toArray().concat( manager.difference ) );
- manager.difference = [];
- } else {
- manager.attachments.add( selection.toArray() );
- }
-
- manager.single = selection._single;
- },
-
- refreshContent: function() {
- var selection = this.get('selection'),
- frame = this.frame,
- router = frame.router.get(),
- mode = frame.content.mode();
-
- // If the state is active, no items are selected, and the current
- // content mode is not an option in the state's router (provided
- // the state has a router), reset the content mode to the default.
- if ( this.active && ! selection.length && router && ! router.get( mode ) )
- this.frame.content.render( this.get('content') );
- },
-
- uploading: function( attachment ) {
- var content = this.frame.content;
-
- // If the uploader was selected, navigate to the browser.
- if ( 'upload' === content.mode() )
- this.frame.content.mode('browse');
-
- // Automatically select any uploading attachments.
- //
- // Selections that don't support multiple attachments automatically
- // limit themselves to one attachment (in this case, the last
- // attachment in the upload queue).
- this.get('selection').add( attachment );
- },
-
- saveContentMode: function() {
- // Only track the browse router on library states.
- if ( 'browse' !== this.get('router') )
- return;
-
- var mode = this.frame.content.mode(),
- view = this.frame.router.get();
-
- if ( view && view.get( mode ) )
- setUserSetting( 'libraryContent', mode );
- }
- });
-
- // wp.media.controller.GalleryEdit
- // -------------------------------
- media.controller.GalleryEdit = media.controller.Library.extend({
- defaults: {
- id: 'gallery-edit',
- multiple: false,
- describe: true,
- edge: 199,
- editing: false,
- sortable: true,
- searchable: false,
- toolbar: 'gallery-edit',
- content: 'browse',
- title: l10n.editGalleryTitle,
- priority: 60,
- dragInfo: true,
-
- // Don't sync the selection, as the Edit Gallery library
- // *is* the selection.
- syncSelection: false
- },
-
- initialize: function() {
- // If we haven't been provided a `library`, create a `Selection`.
- if ( ! this.get('library') )
- this.set( 'library', new media.model.Selection() );
-
- // The single `Attachment` view to be used in the `Attachments` view.
- if ( ! this.get('AttachmentView') )
- this.set( 'AttachmentView', media.view.Attachment.EditLibrary );
- media.controller.Library.prototype.initialize.apply( this, arguments );
- },
-
- activate: function() {
- var library = this.get('library');
-
- // Limit the library to images only.
- library.props.set( 'type', 'image' );
-
- // Watch for uploaded attachments.
- this.get('library').observe( wp.Uploader.queue );
-
- this.frame.on( 'content:render:browse', this.gallerySettings, this );
-
- media.controller.Library.prototype.activate.apply( this, arguments );
- },
-
- deactivate: function() {
- // Stop watching for uploaded attachments.
- this.get('library').unobserve( wp.Uploader.queue );
-
- this.frame.off( 'content:render:browse', this.gallerySettings, this );
-
- media.controller.Library.prototype.deactivate.apply( this, arguments );
- },
-
- gallerySettings: function( browser ) {
- var library = this.get('library');
-
- if ( ! library || ! browser )
- return;
-
- library.gallery = library.gallery || new Backbone.Model();
-
- browser.sidebar.set({
- gallery: new media.view.Settings.Gallery({
- controller: this,
- model: library.gallery,
- priority: 40
- })
- });
-
- browser.toolbar.set( 'reverse', {
- text: l10n.reverseOrder,
- priority: 80,
-
- click: function() {
- library.reset( library.toArray().reverse() );
- }
- });
- }
- });
-
- // wp.media.controller.GalleryAdd
- // ---------------------------------
- media.controller.GalleryAdd = media.controller.Library.extend({
- defaults: _.defaults({
- id: 'gallery-library',
- filterable: 'uploaded',
- multiple: 'add',
- menu: 'gallery',
- toolbar: 'gallery-add',
- title: l10n.addToGalleryTitle,
- priority: 100,
-
- // Don't sync the selection, as the Edit Gallery library
- // *is* the selection.
- syncSelection: false
- }, media.controller.Library.prototype.defaults ),
-
- initialize: function() {
- // If we haven't been provided a `library`, create a `Selection`.
- if ( ! this.get('library') )
- this.set( 'library', media.query({ type: 'image' }) );
-
- media.controller.Library.prototype.initialize.apply( this, arguments );
- },
-
- activate: function() {
- var library = this.get('library'),
- edit = this.frame.state('gallery-edit').get('library');
-
- if ( this.editLibrary && this.editLibrary !== edit )
- library.unobserve( this.editLibrary );
-
- // Accepts attachments that exist in the original library and
- // that do not exist in gallery's library.
- library.validator = function( attachment ) {
- return !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && media.model.Selection.prototype.validator.apply( this, arguments );
- };
-
- // Reset the library to ensure that all attachments are re-added
- // to the collection. Do so silently, as calling `observe` will
- // trigger the `reset` event.
- library.reset( library.mirroring.models, { silent: true });
- library.observe( edit );
- this.editLibrary = edit;
-
- media.controller.Library.prototype.activate.apply( this, arguments );
- }
- });
-
- // wp.media.controller.FeaturedImage
- // ---------------------------------
- media.controller.FeaturedImage = media.controller.Library.extend({
- defaults: _.defaults({
- id: 'featured-image',
- filterable: 'uploaded',
- multiple: false,
- toolbar: 'featured-image',
- title: l10n.setFeaturedImageTitle,
- priority: 60,
-
- syncSelection: false
- }, media.controller.Library.prototype.defaults ),
-
- initialize: function() {
- var library, comparator;
-
- // If we haven't been provided a `library`, create a `Selection`.
- if ( ! this.get('library') )
- this.set( 'library', media.query({ type: 'image' }) );
-
- media.controller.Library.prototype.initialize.apply( this, arguments );
-
- library = this.get('library');
- comparator = library.comparator;
-
- // Overload the library's comparator to push items that are not in
- // the mirrored query to the front of the aggregate collection.
- library.comparator = function( a, b ) {
- var aInQuery = !! this.mirroring.get( a.cid ),
- bInQuery = !! this.mirroring.get( b.cid );
-
- if ( ! aInQuery && bInQuery )
- return -1;
- else if ( aInQuery && ! bInQuery )
- return 1;
- else
- return comparator.apply( this, arguments );
- };
-
- // Add all items in the selection to the library, so any featured
- // images that are not initially loaded still appear.
- library.observe( this.get('selection') );
- },
-
- activate: function() {
- this.updateSelection();
- this.frame.on( 'open', this.updateSelection, this );
- media.controller.Library.prototype.activate.apply( this, arguments );
- },
-
- deactivate: function() {
- this.frame.off( 'open', this.updateSelection, this );
- media.controller.Library.prototype.deactivate.apply( this, arguments );
- },
-
- updateSelection: function() {
- var selection = this.get('selection'),
- id = media.view.settings.post.featuredImageId,
- attachment;
-
- if ( '' !== id && -1 !== id ) {
- attachment = Attachment.get( id );
- attachment.fetch();
- }
-
- selection.reset( attachment ? [ attachment ] : [] );
- }
- });
-
-
- // wp.media.controller.Embed
- // -------------------------
- media.controller.Embed = media.controller.State.extend({
- defaults: {
- id: 'embed',
- url: '',
- menu: 'default',
- content: 'embed',
- toolbar: 'main-embed',
- type: 'link',
-
- title: l10n.insertFromUrlTitle,
- priority: 120
- },
-
- // The amount of time used when debouncing the scan.
- sensitivity: 200,
-
- initialize: function() {
- this.debouncedScan = _.debounce( _.bind( this.scan, this ), this.sensitivity );
- this.props = new Backbone.Model({ url: '' });
- this.props.on( 'change:url', this.debouncedScan, this );
- this.props.on( 'change:url', this.refresh, this );
- this.on( 'scan', this.scanImage, this );
- },
-
- scan: function() {
- var scanners,
- embed = this,
- attributes = {
- type: 'link',
- scanners: []
- };
-
- // Scan is triggered with the list of `attributes` to set on the
- // state, useful for the 'type' attribute and 'scanners' attribute,
- // an array of promise objects for asynchronous scan operations.
- if ( this.props.get('url') )
- this.trigger( 'scan', attributes );
-
- if ( attributes.scanners.length ) {
- scanners = attributes.scanners = $.when.apply( $, attributes.scanners );
- scanners.always( function() {
- if ( embed.get('scanners') === scanners )
- embed.set( 'loading', false );
- });
- } else {
- attributes.scanners = null;
- }
-
- attributes.loading = !! attributes.scanners;
- this.set( attributes );
- },
-
- scanImage: function( attributes ) {
- var frame = this.frame,
- state = this,
- url = this.props.get('url'),
- image = new Image(),
- deferred = $.Deferred();
-
- attributes.scanners.push( deferred.promise() );
-
- // Try to load the image and find its width/height.
- image.onload = function() {
- deferred.resolve();
-
- if ( state !== frame.state() || url !== state.props.get('url') )
- return;
-
- state.set({
- type: 'image'
- });
-
- state.props.set({
- width: image.width,
- height: image.height
- });
- };
-
- image.onerror = deferred.reject;
- image.src = url;
- },
-
- refresh: function() {
- this.frame.toolbar.get().refresh();
- },
-
- reset: function() {
- this.props.clear().set({ url: '' });
-
- if ( this.active )
- this.refresh();
- }
- });
-
- /**
- * ========================================================================
- * VIEWS
- * ========================================================================
- */
-
- // wp.media.View
- // -------------
- //
- // The base view class.
- //
- // Undelegating events, removing events from the model, and
- // removing events from the controller mirror the code for
- // `Backbone.View.dispose` in Backbone 0.9.8 development.
- //
- // This behavior has since been removed, and should not be used
- // outside of the media manager.
- media.View = wp.Backbone.View.extend({
- constructor: function( options ) {
- if ( options && options.controller )
- this.controller = options.controller;
-
- wp.Backbone.View.apply( this, arguments );
- },
-
- dispose: function() {
- // Undelegating events, removing events from the model, and
- // removing events from the controller mirror the code for
- // `Backbone.View.dispose` in Backbone 0.9.8 development.
- this.undelegateEvents();
-
- if ( this.model && this.model.off )
- this.model.off( null, null, this );
-
- if ( this.collection && this.collection.off )
- this.collection.off( null, null, this );
-
- // Unbind controller events.
- if ( this.controller && this.controller.off )
- this.controller.off( null, null, this );
-
- return this;
- },
-
- remove: function() {
- this.dispose();
- return wp.Backbone.View.prototype.remove.apply( this, arguments );
- }
- });
-
- /**
- * wp.media.view.Frame
- */
- media.view.Frame = media.View.extend({
- initialize: function() {
- this._createRegions();
- this._createStates();
- },
-
- _createRegions: function() {
- // Clone the regions array.
- this.regions = this.regions ? this.regions.slice() : [];
-
- // Initialize regions.
- _.each( this.regions, function( region ) {
- this[ region ] = new media.controller.Region({
- view: this,
- id: region,
- selector: '.media-frame-' + region
- });
- }, this );
- },
-
- _createStates: function() {
- // Create the default `states` collection.
- this.states = new Backbone.Collection( null, {
- model: media.controller.State
- });
-
- // Ensure states have a reference to the frame.
- this.states.on( 'add', function( model ) {
- model.frame = this;
- model.trigger('ready');
- }, this );
-
- if ( this.options.states )
- this.states.add( this.options.states );
- },
-
- reset: function() {
- this.states.invoke( 'trigger', 'reset' );
- return this;
- }
- });
-
- // Make the `Frame` a `StateMachine`.
- _.extend( media.view.Frame.prototype, media.controller.StateMachine.prototype );
-
- /**
- * wp.media.view.MediaFrame
- */
- media.view.MediaFrame = media.view.Frame.extend({
- className: 'media-frame',
- template: media.template('media-frame'),
- regions: ['menu','title','content','toolbar','router'],
-
- initialize: function() {
- media.view.Frame.prototype.initialize.apply( this, arguments );
-
- _.defaults( this.options, {
- title: '',
- modal: true,
- uploader: true
- });
-
- // Ensure core UI is enabled.
- this.$el.addClass('wp-core-ui');
-
- // Initialize modal container view.
- if ( this.options.modal ) {
- this.modal = new media.view.Modal({
- controller: this,
- title: this.options.title
- });
-
- this.modal.content( this );
- }
-
- // Force the uploader off if the upload limit has been exceeded or
- // if the browser isn't supported.
- if ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported )
- this.options.uploader = false;
-
- // Initialize window-wide uploader.
- if ( this.options.uploader ) {
- this.uploader = new media.view.UploaderWindow({
- controller: this,
- uploader: {
- dropzone: this.modal ? this.modal.$el : this.$el,
- container: this.$el
- }
- });
- this.views.set( '.media-frame-uploader', this.uploader );
- }
-
- this.on( 'attach', _.bind( this.views.ready, this.views ), this );
-
- // Bind default title creation.
- this.on( 'title:create:default', this.createTitle, this );
- this.title.mode('default');
-
- // Bind default menu.
- this.on( 'menu:create:default', this.createMenu, this );
- },
-
- render: function() {
- // Activate the default state if no active state exists.
- if ( ! this.state() && this.options.state )
- this.setState( this.options.state );
-
- return media.view.Frame.prototype.render.apply( this, arguments );
- },
-
- createTitle: function( title ) {
- title.view = new media.View({
- controller: this,
- tagName: 'h1'
- });
- },
-
- createMenu: function( menu ) {
- menu.view = new media.view.Menu({
- controller: this
- });
- },
-
- createToolbar: function( toolbar ) {
- toolbar.view = new media.view.Toolbar({
- controller: this
- });
- },
-
- createRouter: function( router ) {
- router.view = new media.view.Router({
- controller: this
- });
- },
-
- createIframeStates: function( options ) {
- var settings = media.view.settings,
- tabs = settings.tabs,
- tabUrl = settings.tabUrl,
- $postId;
-
- if ( ! tabs || ! tabUrl )
- return;
-
- // Add the post ID to the tab URL if it exists.
- $postId = $('#post_ID');
- if ( $postId.length )
- tabUrl += '&post_id=' + $postId.val();
-
- // Generate the tab states.
- _.each( tabs, function( title, id ) {
- var frame = this.state( 'iframe:' + id ).set( _.defaults({
- tab: id,
- src: tabUrl + '&tab=' + id,
- title: title,
- content: 'iframe',
- menu: 'default'
- }, options ) );
- }, this );
-
- this.on( 'content:create:iframe', this.iframeContent, this );
- this.on( 'menu:render:default', this.iframeMenu, this );
- this.on( 'open', this.hijackThickbox, this );
- this.on( 'close', this.restoreThickbox, this );
- },
-
- iframeContent: function( content ) {
- this.$el.addClass('hide-toolbar');
- content.view = new media.view.Iframe({
- controller: this
- });
- },
-
- iframeMenu: function( view ) {
- var views = {};
-
- if ( ! view )
- return;
-
- _.each( media.view.settings.tabs, function( title, id ) {
- views[ 'iframe:' + id ] = {
- text: this.state( 'iframe:' + id ).get('title'),
- priority: 200
- };
- }, this );
-
- view.set( views );
- },
-
- hijackThickbox: function() {
- var frame = this;
-
- if ( ! window.tb_remove || this._tb_remove )
- return;
-
- this._tb_remove = window.tb_remove;
- window.tb_remove = function() {
- frame.close();
- frame.reset();
- frame.setState( frame.options.state );
- frame._tb_remove.call( window );
- };
- },
-
- restoreThickbox: function() {
- if ( ! this._tb_remove )
- return;
-
- window.tb_remove = this._tb_remove;
- delete this._tb_remove;
- }
- });
-
- // Map some of the modal's methods to the frame.
- _.each(['open','close','attach','detach','escape'], function( method ) {
- media.view.MediaFrame.prototype[ method ] = function( view ) {
- if ( this.modal )
- this.modal[ method ].apply( this.modal, arguments );
- return this;
- };
- });
-
- /**
- * wp.media.view.MediaFrame.Select
- */
- media.view.MediaFrame.Select = media.view.MediaFrame.extend({
- initialize: function() {
- media.view.MediaFrame.prototype.initialize.apply( this, arguments );
-
- _.defaults( this.options, {
- selection: [],
- library: {},
- multiple: false,
- state: 'library'
- });
-
- this.createSelection();
- this.createStates();
- this.bindHandlers();
- },
-
- createSelection: function() {
- var controller = this,
- selection = this.options.selection;
-
- if ( ! (selection instanceof media.model.Selection) ) {
- this.options.selection = new media.model.Selection( selection, {
- multiple: this.options.multiple
- });
- }
-
- this._selection = {
- attachments: new Attachments(),
- difference: []
- };
- },
-
- createStates: function() {
- var options = this.options;
-
- if ( this.options.states )
- return;
-
- // Add the default states.
- this.states.add([
- // Main states.
- new media.controller.Library({
- library: media.query( options.library ),
- multiple: options.multiple,
- title: options.title,
- priority: 20
- })
- ]);
- },
-
- bindHandlers: function() {
- this.on( 'router:create:browse', this.createRouter, this );
- this.on( 'router:render:browse', this.browseRouter, this );
- this.on( 'content:create:browse', this.browseContent, this );
- this.on( 'content:render:upload', this.uploadContent, this );
- this.on( 'toolbar:create:select', this.createSelectToolbar, this );
- },
-
- // Routers
- browseRouter: function( view ) {
- view.set({
- upload: {
- text: l10n.uploadFilesTitle,
- priority: 20
- },
- browse: {
- text: l10n.mediaLibraryTitle,
- priority: 40
- }
- });
- },
-
- // Content
- browseContent: function( content ) {
- var state = this.state();
-
- this.$el.removeClass('hide-toolbar');
-
- // Browse our library of attachments.
- content.view = new media.view.AttachmentsBrowser({
- controller: this,
- collection: state.get('library'),
- selection: state.get('selection'),
- model: state,
- sortable: state.get('sortable'),
- search: state.get('searchable'),
- filters: state.get('filterable'),
- display: state.get('displaySettings'),
- dragInfo: state.get('dragInfo'),
-
- AttachmentView: state.get('AttachmentView')
- });
- },
-
- uploadContent: function() {
- this.$el.removeClass('hide-toolbar');
- this.content.set( new media.view.UploaderInline({
- controller: this
- }) );
- },
-
- // Toolbars
- createSelectToolbar: function( toolbar, options ) {
- options = options || this.options.button || {};
- options.controller = this;
-
- toolbar.view = new media.view.Toolbar.Select( options );
- }
- });
-
- /**
- * wp.media.view.MediaFrame.Post
- */
- media.view.MediaFrame.Post = media.view.MediaFrame.Select.extend({
- initialize: function() {
- _.defaults( this.options, {
- multiple: true,
- editing: false,
- state: 'insert'
- });
-
- media.view.MediaFrame.Select.prototype.initialize.apply( this, arguments );
- this.createIframeStates();
- },
-
- createStates: function() {
- var options = this.options;
-
- // Add the default states.
- this.states.add([
- // Main states.
- new media.controller.Library({
- id: 'insert',
- title: l10n.insertMediaTitle,
- priority: 20,
- toolbar: 'main-insert',
- filterable: 'all',
- library: media.query( options.library ),
- multiple: options.multiple ? 'reset' : false,
- editable: true,
-
- // If the user isn't allowed to edit fields,
- // can they still edit it locally?
- allowLocalEdits: true,
-
- // Show the attachment display settings.
- displaySettings: true,
- // Update user settings when users adjust the
- // attachment display settings.
- displayUserSettings: true
- }),
-
- new media.controller.Library({
- id: 'gallery',
- title: l10n.createGalleryTitle,
- priority: 40,
- toolbar: 'main-gallery',
- filterable: 'uploaded',
- multiple: 'add',
- editable: false,
-
- library: media.query( _.defaults({
- type: 'image'
- }, options.library ) )
- }),
-
- // Embed states.
- new media.controller.Embed(),
-
- // Gallery states.
- new media.controller.GalleryEdit({
- library: options.selection,
- editing: options.editing,
- menu: 'gallery'
- }),
-
- new media.controller.GalleryAdd()
- ]);
-
-
- if ( media.view.settings.post.featuredImageId ) {
- this.states.add( new media.controller.FeaturedImage() );
- }
- },
-
- bindHandlers: function() {
- media.view.MediaFrame.Select.prototype.bindHandlers.apply( this, arguments );
- this.on( 'menu:create:gallery', this.createMenu, this );
- this.on( 'toolbar:create:main-insert', this.createToolbar, this );
- this.on( 'toolbar:create:main-gallery', this.createToolbar, this );
- this.on( 'toolbar:create:featured-image', this.featuredImageToolbar, this );
- this.on( 'toolbar:create:main-embed', this.mainEmbedToolbar, this );
-
- var handlers = {
- menu: {
- 'default': 'mainMenu',
- 'gallery': 'galleryMenu'
- },
-
- content: {
- 'embed': 'embedContent',
- 'edit-selection': 'editSelectionContent'
- },
-
- toolbar: {
- 'main-insert': 'mainInsertToolbar',
- 'main-gallery': 'mainGalleryToolbar',
- 'gallery-edit': 'galleryEditToolbar',
- 'gallery-add': 'galleryAddToolbar'
- }
- };
-
- _.each( handlers, function( regionHandlers, region ) {
- _.each( regionHandlers, function( callback, handler ) {
- this.on( region + ':render:' + handler, this[ callback ], this );
- }, this );
- }, this );
- },
-
- // Menus
- mainMenu: function( view ) {
- view.set({
- 'library-separator': new media.View({
- className: 'separator',
- priority: 100
- })
- });
- },
-
- galleryMenu: function( view ) {
- var lastState = this.lastState(),
- previous = lastState && lastState.id,
- frame = this;
-
- view.set({
- cancel: {
- text: l10n.cancelGalleryTitle,
- priority: 20,
- click: function() {
- if ( previous )
- frame.setState( previous );
- else
- frame.close();
- }
- },
- separateCancel: new media.View({
- className: 'separator',
- priority: 40
- })
- });
- },
-
- // Content
- embedContent: function() {
- var view = new media.view.Embed({
- controller: this,
- model: this.state()
- }).render();
-
- this.content.set( view );
- view.url.focus();
- },
-
- editSelectionContent: function() {
- var state = this.state(),
- selection = state.get('selection'),
- view;
-
- view = new media.view.AttachmentsBrowser({
- controller: this,
- collection: selection,
- selection: selection,
- model: state,
- sortable: true,
- search: false,
- dragInfo: true,
-
- AttachmentView: media.view.Attachment.EditSelection
- }).render();
-
- view.toolbar.set( 'backToLibrary', {
- text: l10n.returnToLibrary,
- priority: -100,
-
- click: function() {
- this.controller.content.mode('browse');
- }
- });
-
- // Browse our library of attachments.
- this.content.set( view );
- },
-
- // Toolbars
- selectionStatusToolbar: function( view ) {
- var editable = this.state().get('editable');
-
- view.set( 'selection', new media.view.Selection({
- controller: this,
- collection: this.state().get('selection'),
- priority: -40,
-
- // If the selection is editable, pass the callback to
- // switch the content mode.
- editable: editable && function() {
- this.controller.content.mode('edit-selection');
- }
- }).render() );
- },
-
- mainInsertToolbar: function( view ) {
- var controller = this;
-
- this.selectionStatusToolbar( view );
-
- view.set( 'insert', {
- style: 'primary',
- priority: 80,
- text: l10n.insertIntoPost,
- requires: { selection: true },
-
- click: function() {
- var state = controller.state(),
- selection = state.get('selection');
-
- controller.close();
- state.trigger( 'insert', selection ).reset();
- }
- });
- },
-
- mainGalleryToolbar: function( view ) {
- var controller = this;
-
- this.selectionStatusToolbar( view );
-
- view.set( 'gallery', {
- style: 'primary',
- text: l10n.createNewGallery,
- priority: 60,
- requires: { selection: true },
-
- click: function() {
- var selection = controller.state().get('selection'),
- edit = controller.state('gallery-edit'),
- models = selection.where({ type: 'image' });
-
- edit.set( 'library', new media.model.Selection( models, {
- props: selection.props.toJSON(),
- multiple: true
- }) );
-
- this.controller.setState('gallery-edit');
- }
- });
- },
-
- featuredImageToolbar: function( toolbar ) {
- this.createSelectToolbar( toolbar, {
- text: l10n.setFeaturedImage,
- state: this.options.state
- });
- },
-
- mainEmbedToolbar: function( toolbar ) {
- toolbar.view = new media.view.Toolbar.Embed({
- controller: this
- });
- },
-
- galleryEditToolbar: function() {
- var editing = this.state().get('editing');
- this.toolbar.set( new media.view.Toolbar({
- controller: this,
- items: {
- insert: {
- style: 'primary',
- text: editing ? l10n.updateGallery : l10n.insertGallery,
- priority: 80,
- requires: { library: true },
-
- click: function() {
- var controller = this.controller,
- state = controller.state();
-
- controller.close();
- state.trigger( 'update', state.get('library') );
-
- // Restore and reset the default state.
- controller.setState( controller.options.state );
- controller.reset();
- }
- }
- }
- }) );
- },
-
- galleryAddToolbar: function() {
- this.toolbar.set( new media.view.Toolbar({
- controller: this,
- items: {
- insert: {
- style: 'primary',
- text: l10n.addToGallery,
- priority: 80,
- requires: { selection: true },
-
- click: function() {
- var controller = this.controller,
- state = controller.state(),
- edit = controller.state('gallery-edit');
-
- edit.get('library').add( state.get('selection').models );
- state.trigger('reset');
- controller.setState('gallery-edit');
- }
- }
- }
- }) );
- }
- });
-
- /**
- * wp.media.view.Modal
- */
- media.view.Modal = media.View.extend({
- tagName: 'div',
- template: media.template('media-modal'),
-
- attributes: {
- tabindex: 0
- },
-
- events: {
- 'click .media-modal-backdrop, .media-modal-close': 'escapeHandler',
- 'keydown': 'keydown'
- },
-
- initialize: function() {
- _.defaults( this.options, {
- container: document.body,
- title: '',
- propagate: true,
- freeze: true
- });
- },
-
- prepare: function() {
- return {
- title: this.options.title
- };
- },
-
- attach: function() {
- if ( this.views.attached )
- return this;
-
- if ( ! this.views.rendered )
- this.render();
-
- this.$el.appendTo( this.options.container );
-
- // Manually mark the view as attached and trigger ready.
- this.views.attached = true;
- this.views.ready();
-
- return this.propagate('attach');
- },
-
- detach: function() {
- if ( this.$el.is(':visible') )
- this.close();
-
- this.$el.detach();
- this.views.attached = false;
- return this.propagate('detach');
- },
-
- open: function() {
- var $el = this.$el,
- options = this.options;
-
- if ( $el.is(':visible') )
- return this;
-
- if ( ! this.views.attached )
- this.attach();
-
- // If the `freeze` option is set, record the window's scroll position.
- if ( options.freeze ) {
- this._freeze = {
- scrollTop: $( window ).scrollTop()
- };
- }
-
- $el.show().focus();
- return this.propagate('open');
- },
-
- close: function( options ) {
- var freeze = this._freeze;
-
- if ( ! this.views.attached || ! this.$el.is(':visible') )
- return this;
-
- this.$el.hide();
- this.propagate('close');
-
- // If the `freeze` option is set, restore the container's scroll position.
- if ( freeze ) {
- $( window ).scrollTop( freeze.scrollTop );
- }
-
- if ( options && options.escape )
- this.propagate('escape');
-
- return this;
- },
-
- escape: function() {
- return this.close({ escape: true });
- },
-
- escapeHandler: function( event ) {
- event.preventDefault();
- this.escape();
- },
-
- content: function( content ) {
- this.views.set( '.media-modal-content', content );
- return this;
- },
-
- // Triggers a modal event and if the `propagate` option is set,
- // forwards events to the modal's controller.
- propagate: function( id ) {
- this.trigger( id );
-
- if ( this.options.propagate )
- this.controller.trigger( id );
-
- return this;
- },
-
- keydown: function( event ) {
- // Close the modal when escape is pressed.
- if ( 27 === event.which ) {
- event.preventDefault();
- this.escape();
- return;
- }
- }
- });
-
- // wp.media.view.FocusManager
- // ----------------------------
- media.view.FocusManager = media.View.extend({
- events: {
- keydown: 'recordTab',
- focusin: 'updateIndex'
- },
-
- focus: function() {
- if ( _.isUndefined( this.index ) )
- return;
-
- // Update our collection of `$tabbables`.
- this.$tabbables = this.$(':tabbable');
-
- // If tab is saved, focus it.
- this.$tabbables.eq( this.index ).focus();
- },
-
- recordTab: function( event ) {
- // Look for the tab key.
- if ( 9 !== event.keyCode )
- return;
-
- // First try to update the index.
- if ( _.isUndefined( this.index ) )
- this.updateIndex( event );
-
- // If we still don't have an index, bail.
- if ( _.isUndefined( this.index ) )
- return;
-
- var index = this.index + ( event.shiftKey ? -1 : 1 );
-
- if ( index >= 0 && index < this.$tabbables.length )
- this.index = index;
- else
- delete this.index;
- },
-
- updateIndex: function( event ) {
- this.$tabbables = this.$(':tabbable');
-
- var index = this.$tabbables.index( event.target );
-
- if ( -1 === index )
- delete this.index;
- else
- this.index = index;
- }
- });
-
- // wp.media.view.UploaderWindow
- // ----------------------------
- media.view.UploaderWindow = media.View.extend({
- tagName: 'div',
- className: 'uploader-window',
- template: media.template('uploader-window'),
-
- initialize: function() {
- var uploader;
-
- this.$browser = $('<a href="#" class="browser" />').hide().appendTo('body');
-
- uploader = this.options.uploader = _.defaults( this.options.uploader || {}, {
- dropzone: this.$el,
- browser: this.$browser,
- params: {}
- });
-
- // Ensure the dropzone is a jQuery collection.
- if ( uploader.dropzone && ! (uploader.dropzone instanceof $) )
- uploader.dropzone = $( uploader.dropzone );
-
- this.controller.on( 'activate', this.refresh, this );
- },
-
- refresh: function() {
- if ( this.uploader )
- this.uploader.refresh();
- },
-
- ready: function() {
- var postId = media.view.settings.post.id,
- dropzone;
-
- // If the uploader already exists, bail.
- if ( this.uploader )
- return;
-
- if ( postId )
- this.options.uploader.params.post_id = postId;
-
- this.uploader = new wp.Uploader( this.options.uploader );
-
- dropzone = this.uploader.dropzone;
- dropzone.on( 'dropzone:enter', _.bind( this.show, this ) );
- dropzone.on( 'dropzone:leave', _.bind( this.hide, this ) );
- },
-
- show: function() {
- var $el = this.$el.show();
-
- // Ensure that the animation is triggered by waiting until
- // the transparent element is painted into the DOM.
- _.defer( function() {
- $el.css({ opacity: 1 });
- });
- },
-
- hide: function() {
- var $el = this.$el.css({ opacity: 0 });
-
- media.transition( $el ).done( function() {
- // Transition end events are subject to race conditions.
- // Make sure that the value is set as intended.
- if ( '0' === $el.css('opacity') )
- $el.hide();
- });
- }
- });
-
- media.view.UploaderInline = media.View.extend({
- tagName: 'div',
- className: 'uploader-inline',
- template: media.template('uploader-inline'),
-
- initialize: function() {
- _.defaults( this.options, {
- message: '',
- status: true
- });
-
- if ( ! this.options.$browser && this.controller.uploader )
- this.options.$browser = this.controller.uploader.$browser;
-
- if ( _.isUndefined( this.options.postId ) )
- this.options.postId = media.view.settings.post.id;
-
- if ( this.options.status ) {
- this.views.set( '.upload-inline-status', new media.view.UploaderStatus({
- controller: this.controller
- }) );
- }
- },
-
- dispose: function() {
- if ( this.disposing )
- return media.View.prototype.dispose.apply( this, arguments );
-
- // Run remove on `dispose`, so we can be sure to refresh the
- // uploader with a view-less DOM. Track whether we're disposing
- // so we don't trigger an infinite loop.
- this.disposing = true;
- return this.remove();
- },
-
- remove: function() {
- var result = media.View.prototype.remove.apply( this, arguments );
-
- _.defer( _.bind( this.refresh, this ) );
- return result;
- },
-
- refresh: function() {
- var uploader = this.controller.uploader;
-
- if ( uploader )
- uploader.refresh();
- },
-
- ready: function() {
- var $browser = this.options.$browser,
- $placeholder;
-
- if ( this.controller.uploader ) {
- $placeholder = this.$('.browser');
-
- // Check if we've already replaced the placeholder.
- if ( $placeholder[0] === $browser[0] )
- return;
-
- $browser.detach().text( $placeholder.text() );
- $browser[0].className = $placeholder[0].className;
- $placeholder.replaceWith( $browser.show() );
- }
-
- this.refresh();
- return this;
- }
- });
-
- /**
- * wp.media.view.UploaderStatus
- */
- media.view.UploaderStatus = media.View.extend({
- className: 'media-uploader-status',
- template: media.template('uploader-status'),
-
- events: {
- 'click .upload-dismiss-errors': 'dismiss'
- },
-
- initialize: function() {
- this.queue = wp.Uploader.queue;
- this.queue.on( 'add remove reset', this.visibility, this );
- this.queue.on( 'add remove reset change:percent', this.progress, this );
- this.queue.on( 'add remove reset change:uploading', this.info, this );
-
- this.errors = wp.Uploader.errors;
- this.errors.reset();
- this.errors.on( 'add remove reset', this.visibility, this );
- this.errors.on( 'add', this.error, this );
- },
-
- dispose: function() {
- wp.Uploader.queue.off( null, null, this );
- media.View.prototype.dispose.apply( this, arguments );
- return this;
- },
-
- visibility: function() {
- this.$el.toggleClass( 'uploading', !! this.queue.length );
- this.$el.toggleClass( 'errors', !! this.errors.length );
- this.$el.toggle( !! this.queue.length || !! this.errors.length );
- },
-
- ready: function() {
- _.each({
- '$bar': '.media-progress-bar div',
- '$index': '.upload-index',
- '$total': '.upload-total',
- '$filename': '.upload-filename'
- }, function( selector, key ) {
- this[ key ] = this.$( selector );
- }, this );
-
- this.visibility();
- this.progress();
- this.info();
- },
-
- progress: function() {
- var queue = this.queue,
- $bar = this.$bar,
- memo = 0;
-
- if ( ! $bar || ! queue.length )
- return;
-
- $bar.width( ( queue.reduce( function( memo, attachment ) {
- if ( ! attachment.get('uploading') )
- return memo + 100;
-
- var percent = attachment.get('percent');
- return memo + ( _.isNumber( percent ) ? percent : 100 );
- }, 0 ) / queue.length ) + '%' );
- },
-
- info: function() {
- var queue = this.queue,
- index = 0, active;
-
- if ( ! queue.length )
- return;
-
- active = this.queue.find( function( attachment, i ) {
- index = i;
- return attachment.get('uploading');
- });
-
- this.$index.text( index + 1 );
- this.$total.text( queue.length );
- this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
- },
-
- filename: function( filename ) {
- return media.truncate( _.escape( filename ), 24 );
- },
-
- error: function( error ) {
- this.views.add( '.upload-errors', new media.view.UploaderStatusError({
- filename: this.filename( error.get('file').name ),
- message: error.get('message')
- }), { at: 0 });
- },
-
- dismiss: function( event ) {
- var errors = this.views.get('.upload-errors');
-
- event.preventDefault();
-
- if ( errors )
- _.invoke( errors, 'remove' );
- wp.Uploader.errors.reset();
- }
- });
-
- media.view.UploaderStatusError = media.View.extend({
- className: 'upload-error',
- template: media.template('uploader-status-error')
- });
-
- /**
- * wp.media.view.Toolbar
- */
- media.view.Toolbar = media.View.extend({
- tagName: 'div',
- className: 'media-toolbar',
-
- initialize: function() {
- var state = this.controller.state(),
- selection = this.selection = state.get('selection'),
- library = this.library = state.get('library');
-
- this._views = {};
-
- // The toolbar is composed of two `PriorityList` views.
- this.primary = new media.view.PriorityList();
- this.secondary = new media.view.PriorityList();
- this.primary.$el.addClass('media-toolbar-primary');
- this.secondary.$el.addClass('media-toolbar-secondary');
-
- this.views.set([ this.secondary, this.primary ]);
-
- if ( this.options.items )
- this.set( this.options.items, { silent: true });
-
- if ( ! this.options.silent )
- this.render();
-
- if ( selection )
- selection.on( 'add remove reset', this.refresh, this );
- if ( library )
- library.on( 'add remove reset', this.refresh, this );
- },
-
- dispose: function() {
- if ( this.selection )
- this.selection.off( null, null, this );
- if ( this.library )
- this.library.off( null, null, this );
- return media.View.prototype.dispose.apply( this, arguments );
- },
-
- ready: function() {
- this.refresh();
- },
-
- set: function( id, view, options ) {
- var list;
- options = options || {};
-
- // Accept an object with an `id` : `view` mapping.
- if ( _.isObject( id ) ) {
- _.each( id, function( view, id ) {
- this.set( id, view, { silent: true });
- }, this );
-
- } else {
- if ( ! ( view instanceof Backbone.View ) ) {
- view.classes = [ 'media-button-' + id ].concat( view.classes || [] );
- view = new media.view.Button( view ).render();
- }
-
- view.controller = view.controller || this.controller;
-
- this._views[ id ] = view;
-
- list = view.options.priority < 0 ? 'secondary' : 'primary';
- this[ list ].set( id, view, options );
- }
-
- if ( ! options.silent )
- this.refresh();
-
- return this;
- },
-
- get: function( id ) {
- return this._views[ id ];
- },
-
- unset: function( id, options ) {
- delete this._views[ id ];
- this.primary.unset( id, options );
- this.secondary.unset( id, options );
-
- if ( ! options || ! options.silent )
- this.refresh();
- return this;
- },
-
- refresh: function() {
- var state = this.controller.state(),
- library = state.get('library'),
- selection = state.get('selection');
-
- _.each( this._views, function( button ) {
- if ( ! button.model || ! button.options || ! button.options.requires )
- return;
-
- var requires = button.options.requires,
- disabled = false;
-
- // Prevent insertion of attachments if any of them are still uploading
- disabled = _.some( selection.models, function( attachment ) {
- return attachment.get('uploading') === true;
- });
-
- if ( requires.selection && selection && ! selection.length )
- disabled = true;
- else if ( requires.library && library && ! library.length )
- disabled = true;
-
- button.model.set( 'disabled', disabled );
- });
- }
- });
-
- // wp.media.view.Toolbar.Select
- // ----------------------------
- media.view.Toolbar.Select = media.view.Toolbar.extend({
- initialize: function() {
- var options = this.options,
- controller = options.controller,
- selection = controller.state().get('selection');
-
- _.bindAll( this, 'clickSelect' );
-
- _.defaults( options, {
- event: 'select',
- state: false,
- reset: true,
- close: true,
- text: l10n.select,
-
- // Does the button rely on the selection?
- requires: {
- selection: true
- }
- });
-
- options.items = _.defaults( options.items || {}, {
- select: {
- style: 'primary',
- text: options.text,
- priority: 80,
- click: this.clickSelect,
- requires: options.requires
- }
- });
-
- media.view.Toolbar.prototype.initialize.apply( this, arguments );
- },
-
- clickSelect: function() {
- var options = this.options,
- controller = this.controller;
-
- if ( options.close )
- controller.close();
-
- if ( options.event )
- controller.state().trigger( options.event );
-
- if ( options.state )
- controller.setState( options.state );
-
- if ( options.reset )
- controller.reset();
- }
- });
-
- // wp.media.view.Toolbar.Embed
- // ---------------------------
- media.view.Toolbar.Embed = media.view.Toolbar.Select.extend({
- initialize: function() {
- _.defaults( this.options, {
- text: l10n.insertIntoPost,
- requires: false
- });
-
- media.view.Toolbar.Select.prototype.initialize.apply( this, arguments );
- },
-
- refresh: function() {
- var url = this.controller.state().props.get('url');
- this.get('select').model.set( 'disabled', ! url || url === 'http://' );
-
- media.view.Toolbar.Select.prototype.refresh.apply( this, arguments );
- }
- });
-
- /**
- * wp.media.view.Button
- */
- media.view.Button = media.View.extend({
- tagName: 'a',
- className: 'media-button',
- attributes: { href: '#' },
-
- events: {
- 'click': 'click'
- },
-
- defaults: {
- text: '',
- style: '',
- size: 'large',
- disabled: false
- },
-
- initialize: function() {
- // Create a model with the provided `defaults`.
- this.model = new Backbone.Model( this.defaults );
-
- // If any of the `options` have a key from `defaults`, apply its
- // value to the `model` and remove it from the `options object.
- _.each( this.defaults, function( def, key ) {
- var value = this.options[ key ];
- if ( _.isUndefined( value ) )
- return;
-
- this.model.set( key, value );
- delete this.options[ key ];
- }, this );
-
- this.model.on( 'change', this.render, this );
- },
-
- render: function() {
- var classes = [ 'button', this.className ],
- model = this.model.toJSON();
-
- if ( model.style )
- classes.push( 'button-' + model.style );
-
- if ( model.size )
- classes.push( 'button-' + model.size );
-
- classes = _.uniq( classes.concat( this.options.classes ) );
- this.el.className = classes.join(' ');
-
- this.$el.attr( 'disabled', model.disabled );
- this.$el.text( this.model.get('text') );
-
- return this;
- },
-
- click: function( event ) {
- if ( '#' === this.attributes.href )
- event.preventDefault();
-
- if ( this.options.click && ! this.model.get('disabled') )
- this.options.click.apply( this, arguments );
- }
- });
-
- /**
- * wp.media.view.ButtonGroup
- */
- media.view.ButtonGroup = media.View.extend({
- tagName: 'div',
- className: 'button-group button-large media-button-group',
-
- initialize: function() {
- this.buttons = _.map( this.options.buttons || [], function( button ) {
- if ( button instanceof Backbone.View )
- return button;
- else
- return new media.view.Button( button ).render();
- });
-
- delete this.options.buttons;
-
- if ( this.options.classes )
- this.$el.addClass( this.options.classes );
- },
-
- render: function() {
- this.$el.html( $( _.pluck( this.buttons, 'el' ) ).detach() );
- return this;
- }
- });
-
- /**
- * wp.media.view.PriorityList
- */
-
- media.view.PriorityList = media.View.extend({
- tagName: 'div',
-
- initialize: function() {
- this._views = {};
-
- this.set( _.extend( {}, this._views, this.options.views ), { silent: true });
- delete this.options.views;
-
- if ( ! this.options.silent )
- this.render();
- },
-
- set: function( id, view, options ) {
- var priority, views, index;
-
- options = options || {};
-
- // Accept an object with an `id` : `view` mapping.
- if ( _.isObject( id ) ) {
- _.each( id, function( view, id ) {
- this.set( id, view );
- }, this );
- return this;
- }
-
- if ( ! (view instanceof Backbone.View) )
- view = this.toView( view, id, options );
-
- view.controller = view.controller || this.controller;
-
- this.unset( id );
-
- priority = view.options.priority || 10;
- views = this.views.get() || [];
-
- _.find( views, function( existing, i ) {
- if ( existing.options.priority > priority ) {
- index = i;
- return true;
- }
- });
-
- this._views[ id ] = view;
- this.views.add( view, {
- at: _.isNumber( index ) ? index : views.length || 0
- });
-
- return this;
- },
-
- get: function( id ) {
- return this._views[ id ];
- },
-
- unset: function( id ) {
- var view = this.get( id );
-
- if ( view )
- view.remove();
-
- delete this._views[ id ];
- return this;
- },
-
- toView: function( options ) {
- return new media.View( options );
- }
- });
-
- /**
- * wp.media.view.MenuItem
- */
- media.view.MenuItem = media.View.extend({
- tagName: 'a',
- className: 'media-menu-item',
-
- attributes: {
- href: '#'
- },
-
- events: {
- 'click': '_click'
- },
-
- _click: function( event ) {
- var clickOverride = this.options.click;
-
- if ( event )
- event.preventDefault();
-
- if ( clickOverride )
- clickOverride.call( this );
- else
- this.click();
- },
-
- click: function() {
- var state = this.options.state;
- if ( state )
- this.controller.setState( state );
- },
-
- render: function() {
- var options = this.options;
-
- if ( options.text )
- this.$el.text( options.text );
- else if ( options.html )
- this.$el.html( options.html );
-
- return this;
- }
- });
-
- /**
- * wp.media.view.Menu
- */
- media.view.Menu = media.view.PriorityList.extend({
- tagName: 'div',
- className: 'media-menu',
- property: 'state',
- ItemView: media.view.MenuItem,
- region: 'menu',
-
- toView: function( options, id ) {
- options = options || {};
- options[ this.property ] = options[ this.property ] || id;
- return new this.ItemView( options ).render();
- },
-
- ready: function() {
- media.view.PriorityList.prototype.ready.apply( this, arguments );
- this.visibility();
- },
-
- set: function() {
- media.view.PriorityList.prototype.set.apply( this, arguments );
- this.visibility();
- },
-
- unset: function() {
- media.view.PriorityList.prototype.unset.apply( this, arguments );
- this.visibility();
- },
-
- visibility: function() {
- var region = this.region,
- view = this.controller[ region ].get(),
- views = this.views.get(),
- hide = ! views || views.length < 2;
-
- if ( this === view )
- this.controller.$el.toggleClass( 'hide-' + region, hide );
- },
-
- select: function( id ) {
- var view = this.get( id );
-
- if ( ! view )
- return;
-
- this.deselect();
- view.$el.addClass('active');
- },
-
- deselect: function() {
- this.$el.children().removeClass('active');
- }
- });
-
- /**
- * wp.media.view.RouterItem
- */
- media.view.RouterItem = media.view.MenuItem.extend({
- click: function() {
- var contentMode = this.options.contentMode;
- if ( contentMode )
- this.controller.content.mode( contentMode );
- }
- });
-
- /**
- * wp.media.view.Router
- */
- media.view.Router = media.view.Menu.extend({
- tagName: 'div',
- className: 'media-router',
- property: 'contentMode',
- ItemView: media.view.RouterItem,
- region: 'router',
-
- initialize: function() {
- this.controller.on( 'content:render', this.update, this );
- media.view.Menu.prototype.initialize.apply( this, arguments );
- },
-
- update: function() {
- var mode = this.controller.content.mode();
- if ( mode )
- this.select( mode );
- }
- });
-
-
- /**
- * wp.media.view.Sidebar
- */
- media.view.Sidebar = media.view.PriorityList.extend({
- className: 'media-sidebar'
- });
-
- /**
- * wp.media.view.Attachment
- */
- media.view.Attachment = media.View.extend({
- tagName: 'li',
- className: 'attachment',
- template: media.template('attachment'),
-
- events: {
- 'click .attachment-preview': 'toggleSelectionHandler',
- 'change [data-setting]': 'updateSetting',
- 'change [data-setting] input': 'updateSetting',
- 'change [data-setting] select': 'updateSetting',
- 'change [data-setting] textarea': 'updateSetting',
- 'click .close': 'removeFromLibrary',
- 'click .check': 'removeFromSelection',
- 'click a': 'preventDefault'
- },
-
- buttons: {},
-
- initialize: function() {
- var selection = this.options.selection;
-
- this.model.on( 'change:sizes change:uploading', this.render, this );
- this.model.on( 'change:title', this._syncTitle, this );
- this.model.on( 'change:caption', this._syncCaption, this );
- this.model.on( 'change:percent', this.progress, this );
-
- // Update the selection.
- this.model.on( 'add', this.select, this );
- this.model.on( 'remove', this.deselect, this );
- if ( selection )
- selection.on( 'reset', this.updateSelect, this );
-
- // Update the model's details view.
- this.model.on( 'selection:single selection:unsingle', this.details, this );
- this.details( this.model, this.controller.state().get('selection') );
- },
-
- dispose: function() {
- var selection = this.options.selection;
-
- // Make sure all settings are saved before removing the view.
- this.updateAll();
-
- if ( selection )
- selection.off( null, null, this );
-
- media.View.prototype.dispose.apply( this, arguments );
- return this;
- },
-
- render: function() {
- var options = _.defaults( this.model.toJSON(), {
- orientation: 'landscape',
- uploading: false,
- type: '',
- subtype: '',
- icon: '',
- filename: '',
- caption: '',
- title: '',
- dateFormatted: '',
- width: '',
- height: '',
- compat: false,
- alt: '',
- description: ''
- });
-
- options.buttons = this.buttons;
- options.describe = this.controller.state().get('describe');
-
- if ( 'image' === options.type )
- options.size = this.imageSize();
-
- options.can = {};
- if ( options.nonces ) {
- options.can.remove = !! options.nonces['delete'];
- options.can.save = !! options.nonces.update;
- }
-
- if ( this.controller.state().get('allowLocalEdits') )
- options.allowLocalEdits = true;
-
- this.views.detach();
- this.$el.html( this.template( options ) );
-
- this.$el.toggleClass( 'uploading', options.uploading );
- if ( options.uploading )
- this.$bar = this.$('.media-progress-bar div');
- else
- delete this.$bar;
-
- // Check if the model is selected.
- this.updateSelect();
-
- // Update the save status.
- this.updateSave();
-
- this.views.render();
-
- return this;
- },
-
- progress: function() {
- if ( this.$bar && this.$bar.length )
- this.$bar.width( this.model.get('percent') + '%' );
- },
-
- toggleSelectionHandler: function( event ) {
- var method;
-
- if ( event.shiftKey )
- method = 'between';
- else if ( event.ctrlKey || event.metaKey )
- method = 'toggle';
-
- this.toggleSelection({
- method: method
- });
- },
-
- toggleSelection: function( options ) {
- var collection = this.collection,
- selection = this.options.selection,
- model = this.model,
- method = options && options.method,
- single, between, models, singleIndex, modelIndex;
-
- if ( ! selection )
- return;
-
- single = selection.single();
- method = _.isUndefined( method ) ? selection.multiple : method;
-
- // If the `method` is set to `between`, select all models that
- // exist between the current and the selected model.
- if ( 'between' === method && single && selection.multiple ) {
- // If the models are the same, short-circuit.
- if ( single === model )
- return;
-
- singleIndex = collection.indexOf( single );
- modelIndex = collection.indexOf( this.model );
-
- if ( singleIndex < modelIndex )
- models = collection.models.slice( singleIndex, modelIndex + 1 );
- else
- models = collection.models.slice( modelIndex, singleIndex + 1 );
-
- selection.add( models ).single( model );
- return;
-
- // If the `method` is set to `toggle`, just flip the selection
- // status, regardless of whether the model is the single model.
- } else if ( 'toggle' === method ) {
- selection[ this.selected() ? 'remove' : 'add' ]( model ).single( model );
- return;
- }
-
- if ( method !== 'add' )
- method = 'reset';
-
- if ( this.selected() ) {
- // If the model is the single model, remove it.
- // If it is not the same as the single model,
- // it now becomes the single model.
- selection[ single === model ? 'remove' : 'single' ]( model );
- } else {
- // If the model is not selected, run the `method` on the
- // selection. By default, we `reset` the selection, but the
- // `method` can be set to `add` the model to the selection.
- selection[ method ]( model ).single( model );
- }
- },
-
- updateSelect: function() {
- this[ this.selected() ? 'select' : 'deselect' ]();
- },
-
- selected: function() {
- var selection = this.options.selection;
- if ( selection )
- return !! selection.get( this.model.cid );
- },
-
- select: function( model, collection ) {
- var selection = this.options.selection;
-
- // Check if a selection exists and if it's the collection provided.
- // If they're not the same collection, bail; we're in another
- // selection's event loop.
- if ( ! selection || ( collection && collection !== selection ) )
- return;
-
- this.$el.addClass('selected');
- },
-
- deselect: function( model, collection ) {
- var selection = this.options.selection;
-
- // Check if a selection exists and if it's the collection provided.
- // If they're not the same collection, bail; we're in another
- // selection's event loop.
- if ( ! selection || ( collection && collection !== selection ) )
- return;
-
- this.$el.removeClass('selected');
- },
-
- details: function( model, collection ) {
- var selection = this.options.selection,
- details;
-
- if ( selection !== collection )
- return;
-
- details = selection.single();
- this.$el.toggleClass( 'details', details === this.model );
- },
-
- preventDefault: function( event ) {
- event.preventDefault();
- },
-
- imageSize: function( size ) {
- var sizes = this.model.get('sizes');
-
- size = size || 'medium';
-
- // Use the provided image size if possible.
- if ( sizes && sizes[ size ] ) {
- return _.clone( sizes[ size ] );
- } else {
- return {
- url: this.model.get('url'),
- width: this.model.get('width'),
- height: this.model.get('height'),
- orientation: this.model.get('orientation')
- };
- }
- },
-
- updateSetting: function( event ) {
- var $setting = $( event.target ).closest('[data-setting]'),
- setting, value;
-
- if ( ! $setting.length )
- return;
-
- setting = $setting.data('setting');
- value = event.target.value;
-
- if ( this.model.get( setting ) !== value )
- this.save( setting, value );
- },
-
- // Pass all the arguments to the model's save method.
- //
- // Records the aggregate status of all save requests and updates the
- // view's classes accordingly.
- save: function() {
- var view = this,
- save = this._save = this._save || { status: 'ready' },
- request = this.model.save.apply( this.model, arguments ),
- requests = save.requests ? $.when( request, save.requests ) : request;
-
- // If we're waiting to remove 'Saved.', stop.
- if ( save.savedTimer )
- clearTimeout( save.savedTimer );
-
- this.updateSave('waiting');
- save.requests = requests;
- requests.always( function() {
- // If we've performed another request since this one, bail.
- if ( save.requests !== requests )
- return;
-
- view.updateSave( requests.state() === 'resolved' ? 'complete' : 'error' );
- save.savedTimer = setTimeout( function() {
- view.updateSave('ready');
- delete save.savedTimer;
- }, 2000 );
- });
-
- },
-
- updateSave: function( status ) {
- var save = this._save = this._save || { status: 'ready' };
-
- if ( status && status !== save.status ) {
- this.$el.removeClass( 'save-' + save.status );
- save.status = status;
- }
-
- this.$el.addClass( 'save-' + save.status );
- return this;
- },
-
- updateAll: function() {
- var $settings = this.$('[data-setting]'),
- model = this.model,
- changed;
-
- changed = _.chain( $settings ).map( function( el ) {
- var $input = $('input, textarea, select, [value]', el ),
- setting, value;
-
- if ( ! $input.length )
- return;
-
- setting = $(el).data('setting');
- value = $input.val();
-
- // Record the value if it changed.
- if ( model.get( setting ) !== value )
- return [ setting, value ];
- }).compact().object().value();
-
- if ( ! _.isEmpty( changed ) )
- model.save( changed );
- },
-
- removeFromLibrary: function( event ) {
- // Stop propagation so the model isn't selected.
- event.stopPropagation();
-
- this.collection.remove( this.model );
- },
-
- removeFromSelection: function( event ) {
- var selection = this.options.selection;
- if ( ! selection )
- return;
-
- // Stop propagation so the model isn't selected.
- event.stopPropagation();
-
- selection.remove( this.model );
- }
- });
-
- // Ensure settings remain in sync between attachment views.
- _.each({
- caption: '_syncCaption',
- title: '_syncTitle'
- }, function( method, setting ) {
- media.view.Attachment.prototype[ method ] = function( model, value ) {
- var $setting = this.$('[data-setting="' + setting + '"]');
-
- if ( ! $setting.length )
- return this;
-
- // If the updated value is in sync with the value in the DOM, there
- // is no need to re-render. If we're currently editing the value,
- // it will automatically be in sync, suppressing the re-render for
- // the view we're editing, while updating any others.
- if ( value === $setting.find('input, textarea, select, [value]').val() )
- return this;
-
- return this.render();
- };
- });
-
- /**
- * wp.media.view.Attachment.Library
- */
- media.view.Attachment.Library = media.view.Attachment.extend({
- buttons: {
- check: true
- }
- });
-
- /**
- * wp.media.view.Attachment.EditLibrary
- */
- media.view.Attachment.EditLibrary = media.view.Attachment.extend({
- buttons: {
- close: true
- }
- });
-
- /**
- * wp.media.view.Attachments
- */
- media.view.Attachments = media.View.extend({
- tagName: 'ul',
- className: 'attachments',
-
- cssTemplate: media.template('attachments-css'),
-
- events: {
- 'scroll': 'scroll'
- },
-
- initialize: function() {
- this.el.id = _.uniqueId('__attachments-view-');
-
- _.defaults( this.options, {
- refreshSensitivity: 200,
- refreshThreshold: 3,
- AttachmentView: media.view.Attachment,
- sortable: false,
- resize: true
- });
-
- this._viewsByCid = {};
-
- this.collection.on( 'add', function( attachment, attachments, options ) {
- this.views.add( this.createAttachmentView( attachment ), {
- at: this.collection.indexOf( attachment )
- });
- }, this );
-
- this.collection.on( 'remove', function( attachment, attachments, options ) {
- var view = this._viewsByCid[ attachment.cid ];
- delete this._viewsByCid[ attachment.cid ];
-
- if ( view )
- view.remove();
- }, this );
-
- this.collection.on( 'reset', this.render, this );
-
- // Throttle the scroll handler.
- this.scroll = _.chain( this.scroll ).bind( this ).throttle( this.options.refreshSensitivity ).value();
-
- this.initSortable();
-
- _.bindAll( this, 'css' );
- this.model.on( 'change:edge change:gutter', this.css, this );
- this._resizeCss = _.debounce( _.bind( this.css, this ), this.refreshSensitivity );
- if ( this.options.resize )
- $(window).on( 'resize.attachments', this._resizeCss );
- this.css();
- },
-
- dispose: function() {
- this.collection.props.off( null, null, this );
- $(window).off( 'resize.attachments', this._resizeCss );
- media.View.prototype.dispose.apply( this, arguments );
- },
-
- css: function() {
- var $css = $( '#' + this.el.id + '-css' );
-
- if ( $css.length )
- $css.remove();
-
- media.view.Attachments.$head().append( this.cssTemplate({
- id: this.el.id,
- edge: this.edge(),
- gutter: this.model.get('gutter')
- }) );
- },
-
- edge: function() {
- var edge = this.model.get('edge'),
- gutter, width, columns;
-
- if ( ! this.$el.is(':visible') )
- return edge;
-
- gutter = this.model.get('gutter') * 2;
- width = this.$el.width() - gutter;
- columns = Math.ceil( width / ( edge + gutter ) );
- edge = Math.floor( ( width - ( columns * gutter ) ) / columns );
- return edge;
- },
-
- initSortable: function() {
- var collection = this.collection;
-
- if ( ! this.options.sortable || ! $.fn.sortable )
- return;
-
- this.$el.sortable( _.extend({
- // If the `collection` has a `comparator`, disable sorting.
- disabled: !! collection.comparator,
-
- // Prevent attachments from being dragged outside the bounding
- // box of the list.
- containment: this.$el,
-
- // Change the position of the attachment as soon as the
- // mouse pointer overlaps a thumbnail.
- tolerance: 'pointer',
-
- // Record the initial `index` of the dragged model.
- start: function( event, ui ) {
- ui.item.data('sortableIndexStart', ui.item.index());
- },
-
- // Update the model's index in the collection.
- // Do so silently, as the view is already accurate.
- update: function( event, ui ) {
- var model = collection.at( ui.item.data('sortableIndexStart') ),
- comparator = collection.comparator;
-
- // Temporarily disable the comparator to prevent `add`
- // from re-sorting.
- delete collection.comparator;
-
- // Silently shift the model to its new index.
- collection.remove( model, {
- silent: true
- }).add( model, {
- silent: true,
- at: ui.item.index()
- });
-
- // Restore the comparator.
- collection.comparator = comparator;
-
- // Fire the `reset` event to ensure other collections sync.
- collection.trigger( 'reset', collection );
-
- // If the collection is sorted by menu order,
- // update the menu order.
- collection.saveMenuOrder();
- }
- }, this.options.sortable ) );
-
- // If the `orderby` property is changed on the `collection`,
- // check to see if we have a `comparator`. If so, disable sorting.
- collection.props.on( 'change:orderby', function() {
- this.$el.sortable( 'option', 'disabled', !! collection.comparator );
- }, this );
-
- this.collection.props.on( 'change:orderby', this.refreshSortable, this );
- this.refreshSortable();
- },
-
- refreshSortable: function() {
- if ( ! this.options.sortable || ! $.fn.sortable )
- return;
-
- // If the `collection` has a `comparator`, disable sorting.
- var collection = this.collection,
- orderby = collection.props.get('orderby'),
- enabled = 'menuOrder' === orderby || ! collection.comparator;
-
- this.$el.sortable( 'option', 'disabled', ! enabled );
- },
-
- createAttachmentView: function( attachment ) {
- var view = new this.options.AttachmentView({
- controller: this.controller,
- model: attachment,
- collection: this.collection,
- selection: this.options.selection
- });
-
- return this._viewsByCid[ attachment.cid ] = view;
- },
-
- prepare: function() {
- // Create all of the Attachment views, and replace
- // the list in a single DOM operation.
- if ( this.collection.length ) {
- this.views.set( this.collection.map( this.createAttachmentView, this ) );
-
- // If there are no elements, clear the views and load some.
- } else {
- this.views.unset();
- this.collection.more().done( this.scroll );
- }
- },
-
- ready: function() {
- // Trigger the scroll event to check if we're within the
- // threshold to query for additional attachments.
- this.scroll();
- },
-
- scroll: function( event ) {
- // @todo: is this still necessary?
- if ( ! this.$el.is(':visible') )
- return;
-
- if ( this.collection.hasMore() && this.el.scrollHeight < this.el.scrollTop + ( this.el.clientHeight * this.options.refreshThreshold ) ) {
- this.collection.more().done( this.scroll );
- }
- }
- }, {
- $head: (function() {
- var $head;
- return function() {
- return $head = $head || $('head');
- };
- }())
- });
-
- /**
- * wp.media.view.Search
- */
- media.view.Search = media.View.extend({
- tagName: 'input',
- className: 'search',
-
- attributes: {
- type: 'search',
- placeholder: l10n.search
- },
-
- events: {
- 'input': 'search',
- 'keyup': 'search',
- 'change': 'search',
- 'search': 'search'
- },
-
- render: function() {
- this.el.value = this.model.escape('search');
- return this;
- },
-
- search: function( event ) {
- if ( event.target.value )
- this.model.set( 'search', event.target.value );
- else
- this.model.unset('search');
- }
- });
-
- /**
- * wp.media.view.AttachmentFilters
- */
- media.view.AttachmentFilters = media.View.extend({
- tagName: 'select',
- className: 'attachment-filters',
-
- events: {
- change: 'change'
- },
-
- keys: [],
-
- initialize: function() {
- this.createFilters();
- _.extend( this.filters, this.options.filters );
-
- // Build `<option>` elements.
- this.$el.html( _.chain( this.filters ).map( function( filter, value ) {
- return {
- el: $('<option></option>').val(value).text(filter.text)[0],
- priority: filter.priority || 50
- };
- }, this ).sortBy('priority').pluck('el').value() );
-
- this.model.on( 'change', this.select, this );
- this.select();
- },
-
- createFilters: function() {
- this.filters = {};
- },
-
- change: function( event ) {
- var filter = this.filters[ this.el.value ];
-
- if ( filter )
- this.model.set( filter.props );
- },
-
- select: function() {
- var model = this.model,
- value = 'all',
- props = model.toJSON();
-
- _.find( this.filters, function( filter, id ) {
- var equal = _.all( filter.props, function( prop, key ) {
- return prop === ( _.isUndefined( props[ key ] ) ? null : props[ key ] );
- });
-
- if ( equal )
- return value = id;
- });
-
- this.$el.val( value );
- }
- });
-
- media.view.AttachmentFilters.Uploaded = media.view.AttachmentFilters.extend({
- createFilters: function() {
- var type = this.model.get('type'),
- types = media.view.settings.mimeTypes,
- text;
-
- if ( types && type )
- text = types[ type ];
-
- this.filters = {
- all: {
- text: text || l10n.allMediaItems,
- props: {
- uploadedTo: null,
- orderby: 'date',
- order: 'DESC'
- },
- priority: 10
- },
-
- uploaded: {
- text: l10n.uploadedToThisPost,
- props: {
- uploadedTo: media.view.settings.post.id,
- orderby: 'menuOrder',
- order: 'ASC'
- },
- priority: 20
- }
- };
- }
- });
-
- media.view.AttachmentFilters.All = media.view.AttachmentFilters.extend({
- createFilters: function() {
- var filters = {};
-
- _.each( media.view.settings.mimeTypes || {}, function( text, key ) {
- filters[ key ] = {
- text: text,
- props: {
- type: key,
- uploadedTo: null,
- orderby: 'date',
- order: 'DESC'
- }
- };
- });
-
- filters.all = {
- text: l10n.allMediaItems,
- props: {
- type: null,
- uploadedTo: null,
- orderby: 'date',
- order: 'DESC'
- },
- priority: 10
- };
-
- filters.uploaded = {
- text: l10n.uploadedToThisPost,
- props: {
- type: null,
- uploadedTo: media.view.settings.post.id,
- orderby: 'menuOrder',
- order: 'ASC'
- },
- priority: 20
- };
-
- this.filters = filters;
- }
- });
-
-
-
- /**
- * wp.media.view.AttachmentsBrowser
- */
- media.view.AttachmentsBrowser = media.View.extend({
- tagName: 'div',
- className: 'attachments-browser',
-
- initialize: function() {
- _.defaults( this.options, {
- filters: false,
- search: true,
- display: false,
-
- AttachmentView: media.view.Attachment.Library
- });
-
- this.createToolbar();
- this.updateContent();
- this.createSidebar();
-
- this.collection.on( 'add remove reset', this.updateContent, this );
- },
-
- dispose: function() {
- this.options.selection.off( null, null, this );
- media.View.prototype.dispose.apply( this, arguments );
- return this;
- },
-
- createToolbar: function() {
- var filters, FiltersConstructor;
-
- this.toolbar = new media.view.Toolbar({
- controller: this.controller
- });
-
- this.views.add( this.toolbar );
-
- filters = this.options.filters;
- if ( 'uploaded' === filters )
- FiltersConstructor = media.view.AttachmentFilters.Uploaded;
- else if ( 'all' === filters )
- FiltersConstructor = media.view.AttachmentFilters.All;
-
- if ( FiltersConstructor ) {
- this.toolbar.set( 'filters', new FiltersConstructor({
- controller: this.controller,
- model: this.collection.props,
- priority: -80
- }).render() );
- }
-
- if ( this.options.search ) {
- this.toolbar.set( 'search', new media.view.Search({
- controller: this.controller,
- model: this.collection.props,
- priority: 60
- }).render() );
- }
-
- if ( this.options.dragInfo ) {
- this.toolbar.set( 'dragInfo', new media.View({
- el: $( '<div class="instructions">' + l10n.dragInfo + '</div>' )[0],
- priority: -40
- }) );
- }
- },
-
- updateContent: function() {
- var view = this;
-
- if( ! this.attachments )
- this.createAttachments();
-
- if ( ! this.collection.length ) {
- this.collection.more().done( function() {
- if ( ! view.collection.length )
- view.createUploader();
- });
- }
- },
-
- removeContent: function() {
- _.each(['attachments','uploader'], function( key ) {
- if ( this[ key ] ) {
- this[ key ].remove();
- delete this[ key ];
- }
- }, this );
- },
-
- createUploader: function() {
- this.removeContent();
-
- this.uploader = new media.view.UploaderInline({
- controller: this.controller,
- status: false,
- message: l10n.noItemsFound
- });
-
- this.views.add( this.uploader );
- },
-
- createAttachments: function() {
- this.removeContent();
-
- this.attachments = new media.view.Attachments({
- controller: this.controller,
- collection: this.collection,
- selection: this.options.selection,
- model: this.model,
- sortable: this.options.sortable,
-
- // The single `Attachment` view to be used in the `Attachments` view.
- AttachmentView: this.options.AttachmentView
- });
-
- this.views.add( this.attachments );
- },
-
- createSidebar: function() {
- var options = this.options,
- selection = options.selection,
- sidebar = this.sidebar = new media.view.Sidebar({
- controller: this.controller
- });
-
- this.views.add( sidebar );
-
- if ( this.controller.uploader ) {
- sidebar.set( 'uploads', new media.view.UploaderStatus({
- controller: this.controller,
- priority: 40
- }) );
- }
-
- selection.on( 'selection:single', this.createSingle, this );
- selection.on( 'selection:unsingle', this.disposeSingle, this );
-
- if ( selection.single() )
- this.createSingle();
- },
-
- createSingle: function() {
- var sidebar = this.sidebar,
- single = this.options.selection.single(),
- views = {};
-
- sidebar.set( 'details', new media.view.Attachment.Details({
- controller: this.controller,
- model: single,
- priority: 80
- }) );
-
- sidebar.set( 'compat', new media.view.AttachmentCompat({
- controller: this.controller,
- model: single,
- priority: 120
- }) );
-
- if ( this.options.display ) {
- sidebar.set( 'display', new media.view.Settings.AttachmentDisplay({
- controller: this.controller,
- model: this.model.display( single ),
- attachment: single,
- priority: 160,
- userSettings: this.model.get('displayUserSettings')
- }) );
- }
- },
-
- disposeSingle: function() {
- var sidebar = this.sidebar;
- sidebar.unset('details');
- sidebar.unset('compat');
- sidebar.unset('display');
- }
- });
-
- /**
- * wp.media.view.Selection
- */
- media.view.Selection = media.View.extend({
- tagName: 'div',
- className: 'media-selection',
- template: media.template('media-selection'),
-
- events: {
- 'click .edit-selection': 'edit',
- 'click .clear-selection': 'clear'
- },
-
- initialize: function() {
- _.defaults( this.options, {
- editable: false,
- clearable: true
- });
-
- this.attachments = new media.view.Attachments.Selection({
- controller: this.controller,
- collection: this.collection,
- selection: this.collection,
- model: new Backbone.Model({
- edge: 40,
- gutter: 5
- })
- });
-
- this.views.set( '.selection-view', this.attachments );
- this.collection.on( 'add remove reset', this.refresh, this );
- this.controller.on( 'content:activate', this.refresh, this );
- },
-
- ready: function() {
- this.refresh();
- },
-
- refresh: function() {
- // If the selection hasn't been rendered, bail.
- if ( ! this.$el.children().length )
- return;
-
- var collection = this.collection,
- editing = 'edit-selection' === this.controller.content.mode();
-
- // If nothing is selected, display nothing.
- this.$el.toggleClass( 'empty', ! collection.length );
- this.$el.toggleClass( 'one', 1 === collection.length );
- this.$el.toggleClass( 'editing', editing );
-
- this.$('.count').text( l10n.selected.replace('%d', collection.length) );
- },
-
- edit: function( event ) {
- event.preventDefault();
- if ( this.options.editable )
- this.options.editable.call( this, this.collection );
- },
-
- clear: function( event ) {
- event.preventDefault();
- this.collection.reset();
- }
- });
-
-
- /**
- * wp.media.view.Attachment.Selection
- */
- media.view.Attachment.Selection = media.view.Attachment.extend({
- className: 'attachment selection',
-
- // On click, just select the model, instead of removing the model from
- // the selection.
- toggleSelection: function() {
- this.options.selection.single( this.model );
- }
- });
-
- /**
- * wp.media.view.Attachments.Selection
- */
- media.view.Attachments.Selection = media.view.Attachments.extend({
- events: {},
- initialize: function() {
- _.defaults( this.options, {
- sortable: true,
- resize: false,
-
- // The single `Attachment` view to be used in the `Attachments` view.
- AttachmentView: media.view.Attachment.Selection
- });
- return media.view.Attachments.prototype.initialize.apply( this, arguments );
- }
- });
-
- /**
- * wp.media.view.Attachments.EditSelection
- */
- media.view.Attachment.EditSelection = media.view.Attachment.Selection.extend({
- buttons: {
- close: true
- }
- });
-
-
- /**
- * wp.media.view.Settings
- */
- media.view.Settings = media.View.extend({
- events: {
- 'click button': 'updateHandler',
- 'change input': 'updateHandler',
- 'change select': 'updateHandler',
- 'change textarea': 'updateHandler'
- },
-
- initialize: function() {
- this.model = this.model || new Backbone.Model();
- this.model.on( 'change', this.updateChanges, this );
- },
-
- prepare: function() {
- return _.defaults({
- model: this.model.toJSON()
- }, this.options );
- },
-
- render: function() {
- media.View.prototype.render.apply( this, arguments );
- // Select the correct values.
- _( this.model.attributes ).chain().keys().each( this.update, this );
- return this;
- },
-
- update: function( key ) {
- var value = this.model.get( key ),
- $setting = this.$('[data-setting="' + key + '"]'),
- $buttons, $value;
-
- // Bail if we didn't find a matching setting.
- if ( ! $setting.length )
- return;
-
- // Attempt to determine how the setting is rendered and update
- // the selected value.
-
- // Handle dropdowns.
- if ( $setting.is('select') ) {
- $value = $setting.find('[value="' + value + '"]');
-
- if ( $value.length ) {
- $setting.find('option').prop( 'selected', false );
- $value.prop( 'selected', true );
- } else {
- // If we can't find the desired value, record what *is* selected.
- this.model.set( key, $setting.find(':selected').val() );
- }
-
-
- // Handle button groups.
- } else if ( $setting.hasClass('button-group') ) {
- $buttons = $setting.find('button').removeClass('active');
- $buttons.filter( '[value="' + value + '"]' ).addClass('active');
-
- // Handle text inputs and textareas.
- } else if ( $setting.is('input[type="text"], textarea') ) {
- if ( ! $setting.is(':focus') )
- $setting.val( value );
-
- // Handle checkboxes.
- } else if ( $setting.is('input[type="checkbox"]') ) {
- $setting.attr( 'checked', !! value );
- }
- },
-
- updateHandler: function( event ) {
- var $setting = $( event.target ).closest('[data-setting]'),
- value = event.target.value,
- userSetting;
-
- event.preventDefault();
-
- if ( ! $setting.length )
- return;
-
- // Use the correct value for checkboxes.
- if ( $setting.is('input[type="checkbox"]') )
- value = $setting[0].checked;
-
- // Update the corresponding setting.
- this.model.set( $setting.data('setting'), value );
-
- // If the setting has a corresponding user setting,
- // update that as well.
- if ( userSetting = $setting.data('userSetting') )
- setUserSetting( userSetting, value );
- },
-
- updateChanges: function( model, options ) {
- if ( model.hasChanged() )
- _( model.changed ).chain().keys().each( this.update, this );
- }
- });
-
- /**
- * wp.media.view.Settings.AttachmentDisplay
- */
- media.view.Settings.AttachmentDisplay = media.view.Settings.extend({
- className: 'attachment-display-settings',
- template: media.template('attachment-display-settings'),
-
- initialize: function() {
- var attachment = this.options.attachment;
-
- _.defaults( this.options, {
- userSettings: false
- });
-
- media.view.Settings.prototype.initialize.apply( this, arguments );
- this.model.on( 'change:link', this.updateLinkTo, this );
-
- if ( attachment )
- attachment.on( 'change:uploading', this.render, this );
- },
-
- dispose: function() {
- var attachment = this.options.attachment;
- if ( attachment )
- attachment.off( null, null, this );
-
- media.view.Settings.prototype.dispose.apply( this, arguments );
- },
-
- render: function() {
- var attachment = this.options.attachment;
- if ( attachment ) {
- _.extend( this.options, {
- sizes: attachment.get('sizes'),
- type: attachment.get('type')
- });
- }
-
- media.view.Settings.prototype.render.call( this );
- this.updateLinkTo();
- return this;
- },
-
- updateLinkTo: function() {
- var linkTo = this.model.get('link'),
- $input = this.$('.link-to-custom'),
- attachment = this.options.attachment;
-
- if ( 'none' === linkTo || 'embed' === linkTo || ( ! attachment && 'custom' !== linkTo ) ) {
- $input.hide();
- return;
- }
-
- if ( attachment ) {
- if ( 'post' === linkTo ) {
- $input.val( attachment.get('link') );
- } else if ( 'file' === linkTo ) {
- $input.val( attachment.get('url') );
- } else if ( ! this.model.get('linkUrl') ) {
- $input.val('http://');
- }
-
- $input.prop( 'readonly', 'custom' !== linkTo );
- }
-
- $input.show();
-
- // If the input is visible, focus and select its contents.
- if ( $input.is(':visible') )
- $input.focus()[0].select();
- }
- });
-
- /**
- * wp.media.view.Settings.Gallery
- */
- media.view.Settings.Gallery = media.view.Settings.extend({
- className: 'gallery-settings',
- template: media.template('gallery-settings')
- });
-
- /**
- * wp.media.view.Attachment.Details
- */
- media.view.Attachment.Details = media.view.Attachment.extend({
- tagName: 'div',
- className: 'attachment-details',
- template: media.template('attachment-details'),
-
- events: {
- 'change [data-setting]': 'updateSetting',
- 'change [data-setting] input': 'updateSetting',
- 'change [data-setting] select': 'updateSetting',
- 'change [data-setting] textarea': 'updateSetting',
- 'click .delete-attachment': 'deleteAttachment',
- 'click .edit-attachment': 'editAttachment',
- 'click .refresh-attachment': 'refreshAttachment'
- },
-
- initialize: function() {
- this.focusManager = new media.view.FocusManager({
- el: this.el
- });
-
- media.view.Attachment.prototype.initialize.apply( this, arguments );
- },
-
- render: function() {
- media.view.Attachment.prototype.render.apply( this, arguments );
- this.focusManager.focus();
- return this;
- },
-
- deleteAttachment: function( event ) {
- event.preventDefault();
-
- if ( confirm( l10n.warnDelete ) )
- this.model.destroy();
- },
-
- editAttachment: function( event ) {
- this.$el.addClass('needs-refresh');
- },
-
- refreshAttachment: function( event ) {
- this.$el.removeClass('needs-refresh');
- event.preventDefault();
- this.model.fetch();
- }
- });
-
- /**
- * wp.media.view.AttachmentCompat
- */
- media.view.AttachmentCompat = media.View.extend({
- tagName: 'form',
- className: 'compat-item',
-
- events: {
- 'submit': 'preventDefault',
- 'change input': 'save',
- 'change select': 'save',
- 'change textarea': 'save'
- },
-
- initialize: function() {
- this.focusManager = new media.view.FocusManager({
- el: this.el
- });
-
- this.model.on( 'change:compat', this.render, this );
- },
-
- dispose: function() {
- if ( this.$(':focus').length )
- this.save();
-
- return media.View.prototype.dispose.apply( this, arguments );
- },
-
- render: function() {
- var compat = this.model.get('compat');
- if ( ! compat || ! compat.item )
- return;
-
- this.views.detach();
- this.$el.html( compat.item );
- this.views.render();
-
- this.focusManager.focus();
- return this;
- },
-
- preventDefault: function( event ) {
- event.preventDefault();
- },
-
- save: function( event ) {
- var data = {};
-
- if ( event )
- event.preventDefault();
-
- _.each( this.$el.serializeArray(), function( pair ) {
- data[ pair.name ] = pair.value;
- });
-
- this.model.saveCompat( data );
- }
- });
-
- /**
- * wp.media.view.Iframe
- */
- media.view.Iframe = media.View.extend({
- className: 'media-iframe',
-
- render: function() {
- this.views.detach();
- this.$el.html( '<iframe src="' + this.controller.state().get('src') + '" />' );
- this.views.render();
- return this;
- }
- });
-
- /**
- * wp.media.view.Embed
- */
- media.view.Embed = media.View.extend({
- className: 'media-embed',
-
- initialize: function() {
- this.url = new media.view.EmbedUrl({
- controller: this.controller,
- model: this.model.props
- }).render();
-
- this.views.set([ this.url ]);
- this.refresh();
- this.model.on( 'change:type', this.refresh, this );
- this.model.on( 'change:loading', this.loading, this );
- },
-
- settings: function( view ) {
- if ( this._settings )
- this._settings.remove();
- this._settings = view;
- this.views.add( view );
- },
-
- refresh: function() {
- var type = this.model.get('type'),
- constructor;
-
- if ( 'image' === type )
- constructor = media.view.EmbedImage;
- else if ( 'link' === type )
- constructor = media.view.EmbedLink;
- else
- return;
-
- this.settings( new constructor({
- controller: this.controller,
- model: this.model.props,
- priority: 40
- }) );
- },
-
- loading: function() {
- this.$el.toggleClass( 'embed-loading', this.model.get('loading') );
- }
- });
-
- /**
- * wp.media.view.EmbedUrl
- */
- media.view.EmbedUrl = media.View.extend({
- tagName: 'label',
- className: 'embed-url',
-
- events: {
- 'input': 'url',
- 'keyup': 'url',
- 'change': 'url'
- },
-
- initialize: function() {
- this.$input = $('<input/>').attr( 'type', 'text' ).val( this.model.get('url') );
- this.input = this.$input[0];
-
- this.spinner = $('<span class="spinner" />')[0];
- this.$el.append([ this.input, this.spinner ]);
-
- this.model.on( 'change:url', this.render, this );
- },
-
- render: function() {
- var $input = this.$input;
-
- if ( $input.is(':focus') )
- return;
-
- this.input.value = this.model.get('url') || 'http://';
- media.View.prototype.render.apply( this, arguments );
- return this;
- },
-
- ready: function() {
- this.focus();
- },
-
- url: function( event ) {
- this.model.set( 'url', event.target.value );
- },
-
- focus: function() {
- var $input = this.$input;
- // If the input is visible, focus and select its contents.
- if ( $input.is(':visible') )
- $input.focus()[0].select();
- }
- });
-
- /**
- * wp.media.view.EmbedLink
- */
- media.view.EmbedLink = media.view.Settings.extend({
- className: 'embed-link-settings',
- template: media.template('embed-link-settings')
- });
-
- /**
- * wp.media.view.EmbedImage
- */
- media.view.EmbedImage = media.view.Settings.AttachmentDisplay.extend({
- className: 'embed-image-settings',
- template: media.template('embed-image-settings'),
-
- initialize: function() {
- media.view.Settings.AttachmentDisplay.prototype.initialize.apply( this, arguments );
- this.model.on( 'change:url', this.updateImage, this );
- },
-
- updateImage: function() {
- this.$('img').attr( 'src', this.model.get('url') );
- }
- });
-}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/media-views.min.js b/wp-includes/js/media-views.min.js
deleted file mode 100644
index 89cc6fcba4..0000000000
--- a/wp-includes/js/media-views.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){var f=wp.media,d=f.model.Attachment,c=f.model.Attachments,a=f.model.Query,b;b=f.view.l10n=typeof _wpMediaViewsL10n==="undefined"?{}:_wpMediaViewsL10n;f.view.settings=b.settings||{};delete b.settings;f.model.settings.post=f.view.settings.post;e.support.transition=(function(){var g=document.documentElement.style,h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i;i=_.find(_.keys(h),function(j){return !_.isUndefined(g[j])});return i&&{end:h[i]}}());f.transition=function(g,h){var i=e.Deferred();h=h||2000;if(e.support.transition){if(!(g instanceof e)){g=e(g)}g.first().one(e.support.transition.end,i.resolve);_.delay(i.resolve,h)}else{i.resolve()}return i.promise()};f.controller.Region=function(g){_.extend(this,_.pick(g||{},"id","view","selector"))};f.controller.Region.extend=Backbone.Model.extend;_.extend(f.controller.Region.prototype,{mode:function(g){if(!g){return this._mode}if(g===this._mode){return this}this.trigger("deactivate");this._mode=g;this.render(g);this.trigger("activate");return this},render:function(h){if(h&&h!==this._mode){return this.mode(h)}var i={view:null},g;this.trigger("create",i);g=i.view;this.trigger("render",g);if(g){this.set(g)}return this},get:function(){return this.view.views.first(this.selector)},set:function(g,h){if(h){h.add=false}return this.view.views.set(this.selector,g,h)},trigger:function(h){var i;if(!this._mode){return}var g=_.toArray(arguments);i=this.id+":"+h;g[0]=i+":"+this._mode;this.view.trigger.apply(this.view,g);g[0]=i;this.view.trigger.apply(this.view,g);return this}});f.controller.StateMachine=function(g){this.states=new Backbone.Collection(g)};f.controller.StateMachine.extend=Backbone.Model.extend;_.extend(f.controller.StateMachine.prototype,Backbone.Events,{state:function(g){this.states=this.states||new Backbone.Collection();g=g||this._state;if(g&&!this.states.get(g)){this.states.add({id:g})}return this.states.get(g)},setState:function(h){var g=this.state();if((g&&h===g.id)||!this.states||!this.states.get(h)){return this}if(g){g.trigger("deactivate");this._lastState=g.id}this._state=h;this.state().trigger("activate");return this},lastState:function(){if(this._lastState){return this.state(this._lastState)}}});_.each(["on","off","trigger"],function(g){f.controller.StateMachine.prototype[g]=function(){this.states=this.states||new Backbone.Collection();this.states[g].apply(this.states,arguments);return this}});f.controller.State=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this);this.on("activate",this.activate,this);this.on("activate",this._postActivate,this);this.on("deactivate",this._deactivate,this);this.on("deactivate",this.deactivate,this);this.on("reset",this.reset,this);this.on("ready",this._ready,this);this.on("ready",this.ready,this);Backbone.Model.apply(this,arguments);this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=true},_postActivate:function(){this.on("change:menu",this._menu,this);this.on("change:titleMode",this._title,this);this.on("change:content",this._content,this);this.on("change:toolbar",this._toolbar,this);this.frame.on("title:render:default",this._renderTitle,this);this._title();this._menu();this._toolbar();this._content();this._router()},_deactivate:function(){this.active=false;this.frame.off("title:render:default",this._renderTitle,this);this.off("change:menu",this._menu,this);this.off("change:titleMode",this._title,this);this.off("change:content",this._content,this);this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(g){g.$el.text(this.get("title")||"")},_router:function(){var h=this.frame.router,i=this.get("router"),g;this.frame.$el.toggleClass("hide-router",!i);if(!i){return}this.frame.router.render(i);g=h.get();if(g&&g.select){g.select(this.frame.content.mode())}},_menu:function(){var i=this.frame.menu,h=this.get("menu"),g;if(!h){return}i.mode(h);g=i.get();if(g&&g.select){g.select(this.id)}},_updateMenu:function(){var g=this.previous("menu"),h=this.get("menu");if(g){this.frame.off("menu:render:"+g,this._renderMenu,this)}if(h){this.frame.on("menu:render:"+h,this._renderMenu,this)}},_renderMenu:function(g){var i=this.get("menuItem"),j=this.get("title"),h=this.get("priority");if(!i&&j){i={text:j};if(h){i.priority=h}}if(!i){return}g.set(this.id,i)}});_.each(["toolbar","content"],function(g){f.controller.State.prototype["_"+g]=function(){var h=this.get(g);if(h){this.frame[g].render(h)}}});f.controller.Library=f.controller.State.extend({defaults:{id:"library",multiple:false,describe:false,toolbar:"select",sidebar:"settings",content:"upload",router:"browse",menu:"default",searchable:true,filterable:false,sortable:true,title:b.mediaLibraryTitle,contentUserSetting:true,syncSelection:true},initialize:function(){var h=this.get("selection"),g;if(!this.get("library")){this.set("library",f.query())}if(!(h instanceof f.model.Selection)){g=h;if(!g){g=this.get("library").props.toJSON();g=_.omit(g,"orderby","query")}this.set("selection",new f.model.Selection(null,{multiple:this.get("multiple"),props:g}))}if(!this.get("edge")){this.set("edge",120)}if(!this.get("gutter")){this.set("gutter",8)}this.resetDisplays()},activate:function(){this.syncSelection();wp.Uploader.queue.on("add",this.uploading,this);this.get("selection").on("add remove reset",this.refreshContent,this);if(this.get("contentUserSetting")){this.frame.on("content:activate",this.saveContentMode,this);this.set("content",getUserSetting("libraryContent",this.get("content")))}},deactivate:function(){this.recordSelection();this.frame.off("content:activate",this.saveContentMode,this);this.get("selection").off(null,null,this);wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset();this.resetDisplays();this.refreshContent()},resetDisplays:function(){var g=f.view.settings.defaultProps;this._displays=[];this._defaultDisplaySettings={align:g.align||getUserSetting("align","none"),size:g.size||getUserSetting("imgsize","medium"),link:g.link||getUserSetting("urlbutton","file")}},display:function(h){var g=this._displays;if(!g[h.cid]){g[h.cid]=new Backbone.Model(this.defaultDisplaySettings(h))}return g[h.cid]},defaultDisplaySettings:function(g){settings=this._defaultDisplaySettings;if(settings.canEmbed=this.canEmbed(g)){settings.link="embed"}return settings},canEmbed:function(h){if(!h.get("uploading")){var g=h.get("type");if(g!=="audio"&&g!=="video"){return false}}return _.contains(f.view.settings.embedExts,h.get("filename").split(".").pop())},syncSelection:function(){var h=this.get("selection"),g=this.frame._selection;if(!this.get("syncSelection")||!g||!h){return}if(h.multiple){h.reset([],{silent:true});h.validateAll(g.attachments);g.difference=_.difference(g.attachments.models,h.models)}h.single(g.single)},recordSelection:function(){var i=this.get("selection"),h=this.frame._selection,g;if(!this.get("syncSelection")||!h||!i){return}if(i.multiple){h.attachments.reset(i.toArray().concat(h.difference));h.difference=[]}else{h.attachments.add(i.toArray())}h.single=i._single},refreshContent:function(){var h=this.get("selection"),j=this.frame,g=j.router.get(),i=j.content.mode();if(this.active&&!h.length&&g&&!g.get(i)){this.frame.content.render(this.get("content"))}},uploading:function(h){var g=this.frame.content;if("upload"===g.mode()){this.frame.content.mode("browse")}this.get("selection").add(h)},saveContentMode:function(){if("browse"!==this.get("router")){return}var h=this.frame.content.mode(),g=this.frame.router.get();if(g&&g.get(h)){setUserSetting("libraryContent",h)}}});f.controller.GalleryEdit=f.controller.Library.extend({defaults:{id:"gallery-edit",multiple:false,describe:true,edge:199,editing:false,sortable:true,searchable:false,toolbar:"gallery-edit",content:"browse",title:b.editGalleryTitle,priority:60,dragInfo:true,syncSelection:false},initialize:function(){if(!this.get("library")){this.set("library",new f.model.Selection())}if(!this.get("AttachmentView")){this.set("AttachmentView",f.view.Attachment.EditLibrary)}f.controller.Library.prototype.initialize.apply(this,arguments)},activate:function(){var g=this.get("library");g.props.set("type","image");this.get("library").observe(wp.Uploader.queue);this.frame.on("content:render:browse",this.gallerySettings,this);f.controller.Library.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue);this.frame.off("content:render:browse",this.gallerySettings,this);f.controller.Library.prototype.deactivate.apply(this,arguments)},gallerySettings:function(h){var g=this.get("library");if(!g||!h){return}g.gallery=g.gallery||new Backbone.Model();h.sidebar.set({gallery:new f.view.Settings.Gallery({controller:this,model:g.gallery,priority:40})});h.toolbar.set("reverse",{text:b.reverseOrder,priority:80,click:function(){g.reset(g.toArray().reverse())}})}});f.controller.GalleryAdd=f.controller.Library.extend({defaults:_.defaults({id:"gallery-library",filterable:"uploaded",multiple:"add",menu:"gallery",toolbar:"gallery-add",title:b.addToGalleryTitle,priority:100,syncSelection:false},f.controller.Library.prototype.defaults),initialize:function(){if(!this.get("library")){this.set("library",f.query({type:"image"}))}f.controller.Library.prototype.initialize.apply(this,arguments)},activate:function(){var g=this.get("library"),h=this.frame.state("gallery-edit").get("library");if(this.editLibrary&&this.editLibrary!==h){g.unobserve(this.editLibrary)}g.validator=function(i){return !!this.mirroring.get(i.cid)&&!h.get(i.cid)&&f.model.Selection.prototype.validator.apply(this,arguments)};g.reset(g.mirroring.models,{silent:true});g.observe(h);this.editLibrary=h;f.controller.Library.prototype.activate.apply(this,arguments)}});f.controller.FeaturedImage=f.controller.Library.extend({defaults:_.defaults({id:"featured-image",filterable:"uploaded",multiple:false,toolbar:"featured-image",title:b.setFeaturedImageTitle,priority:60,syncSelection:false},f.controller.Library.prototype.defaults),initialize:function(){var h,g;if(!this.get("library")){this.set("library",f.query({type:"image"}))}f.controller.Library.prototype.initialize.apply(this,arguments);h=this.get("library");g=h.comparator;h.comparator=function(j,i){var l=!!this.mirroring.get(j.cid),k=!!this.mirroring.get(i.cid);if(!l&&k){return -1}else{if(l&&!k){return 1}else{return g.apply(this,arguments)}}};h.observe(this.get("selection"))},activate:function(){this.updateSelection();this.frame.on("open",this.updateSelection,this);f.controller.Library.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this);f.controller.Library.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var g=this.get("selection"),i=f.view.settings.post.featuredImageId,h;if(""!==i&&-1!==i){h=d.get(i);h.fetch()}g.reset(h?[h]:[])}});f.controller.Embed=f.controller.State.extend({defaults:{id:"embed",url:"",menu:"default",content:"embed",toolbar:"main-embed",type:"link",title:b.insertFromUrlTitle,priority:120},sensitivity:200,initialize:function(){this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity);this.props=new Backbone.Model({url:""});this.props.on("change:url",this.debouncedScan,this);this.props.on("change:url",this.refresh,this);this.on("scan",this.scanImage,this)},scan:function(){var h,i=this,g={type:"link",scanners:[]};if(this.props.get("url")){this.trigger("scan",g)}if(g.scanners.length){h=g.scanners=e.when.apply(e,g.scanners);h.always(function(){if(i.get("scanners")===h){i.set("loading",false)}})}else{g.scanners=null}g.loading=!!g.scanners;this.set(g)},scanImage:function(h){var l=this.frame,j=this,i=this.props.get("url"),k=new Image(),g=e.Deferred();h.scanners.push(g.promise());k.onload=function(){g.resolve();if(j!==l.state()||i!==j.props.get("url")){return}j.set({type:"image"});j.props.set({width:k.width,height:k.height})};k.onerror=g.reject;k.src=i},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""});if(this.active){this.refresh()}}});f.View=wp.Backbone.View.extend({constructor:function(g){if(g&&g.controller){this.controller=g.controller}wp.Backbone.View.apply(this,arguments)},dispose:function(){this.undelegateEvents();if(this.model&&this.model.off){this.model.off(null,null,this)}if(this.collection&&this.collection.off){this.collection.off(null,null,this)}if(this.controller&&this.controller.off){this.controller.off(null,null,this)}return this},remove:function(){this.dispose();return wp.Backbone.View.prototype.remove.apply(this,arguments)}});f.view.Frame=f.View.extend({initialize:function(){this._createRegions();this._createStates()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[];_.each(this.regions,function(g){this[g]=new f.controller.Region({view:this,id:g,selector:".media-frame-"+g})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:f.controller.State});this.states.on("add",function(g){g.frame=this;g.trigger("ready")},this);if(this.options.states){this.states.add(this.options.states)}},reset:function(){this.states.invoke("trigger","reset");return this}});_.extend(f.view.Frame.prototype,f.controller.StateMachine.prototype);f.view.MediaFrame=f.view.Frame.extend({className:"media-frame",template:f.template("media-frame"),regions:["menu","title","content","toolbar","router"],initialize:function(){f.view.Frame.prototype.initialize.apply(this,arguments);_.defaults(this.options,{title:"",modal:true,uploader:true});this.$el.addClass("wp-core-ui");if(this.options.modal){this.modal=new f.view.Modal({controller:this,title:this.options.title});this.modal.content(this)}if(wp.Uploader.limitExceeded||!wp.Uploader.browser.supported){this.options.uploader=false}if(this.options.uploader){this.uploader=new f.view.UploaderWindow({controller:this,uploader:{dropzone:this.modal?this.modal.$el:this.$el,container:this.$el}});this.views.set(".media-frame-uploader",this.uploader)}this.on("attach",_.bind(this.views.ready,this.views),this);this.on("title:create:default",this.createTitle,this);this.title.mode("default");this.on("menu:create:default",this.createMenu,this)},render:function(){if(!this.state()&&this.options.state){this.setState(this.options.state)}return f.view.Frame.prototype.render.apply(this,arguments)},createTitle:function(g){g.view=new f.View({controller:this,tagName:"h1"})},createMenu:function(g){g.view=new f.view.Menu({controller:this})},createToolbar:function(g){g.view=new f.view.Toolbar({controller:this})},createRouter:function(g){g.view=new f.view.Router({controller:this})},createIframeStates:function(g){var j=f.view.settings,i=j.tabs,k=j.tabUrl,h;if(!i||!k){return}h=e("#post_ID");if(h.length){k+="&post_id="+h.val()}_.each(i,function(m,n){var l=this.state("iframe:"+n).set(_.defaults({tab:n,src:k+"&tab="+n,title:m,content:"iframe",menu:"default"},g))},this);this.on("content:create:iframe",this.iframeContent,this);this.on("menu:render:default",this.iframeMenu,this);this.on("open",this.hijackThickbox,this);this.on("close",this.restoreThickbox,this)},iframeContent:function(g){this.$el.addClass("hide-toolbar");g.view=new f.view.Iframe({controller:this})},iframeMenu:function(h){var g={};if(!h){return}_.each(f.view.settings.tabs,function(i,j){g["iframe:"+j]={text:this.state("iframe:"+j).get("title"),priority:200}},this);h.set(g)},hijackThickbox:function(){var g=this;if(!window.tb_remove||this._tb_remove){return}this._tb_remove=window.tb_remove;window.tb_remove=function(){g.close();g.reset();g.setState(g.options.state);g._tb_remove.call(window)}},restoreThickbox:function(){if(!this._tb_remove){return}window.tb_remove=this._tb_remove;delete this._tb_remove}});_.each(["open","close","attach","detach","escape"],function(g){f.view.MediaFrame.prototype[g]=function(h){if(this.modal){this.modal[g].apply(this.modal,arguments)}return this}});f.view.MediaFrame.Select=f.view.MediaFrame.extend({initialize:function(){f.view.MediaFrame.prototype.initialize.apply(this,arguments);_.defaults(this.options,{selection:[],library:{},multiple:false,state:"library"});this.createSelection();this.createStates();this.bindHandlers()},createSelection:function(){var g=this,h=this.options.selection;if(!(h instanceof f.model.Selection)){this.options.selection=new f.model.Selection(h,{multiple:this.options.multiple})}this._selection={attachments:new c(),difference:[]}},createStates:function(){var g=this.options;if(this.options.states){return}this.states.add([new f.controller.Library({library:f.query(g.library),multiple:g.multiple,title:g.title,priority:20})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this);this.on("router:render:browse",this.browseRouter,this);this.on("content:create:browse",this.browseContent,this);this.on("content:render:upload",this.uploadContent,this);this.on("toolbar:create:select",this.createSelectToolbar,this)},browseRouter:function(g){g.set({upload:{text:b.uploadFilesTitle,priority:20},browse:{text:b.mediaLibraryTitle,priority:40}})},browseContent:function(g){var h=this.state();this.$el.removeClass("hide-toolbar");g.view=new f.view.AttachmentsBrowser({controller:this,collection:h.get("library"),selection:h.get("selection"),model:h,sortable:h.get("sortable"),search:h.get("searchable"),filters:h.get("filterable"),display:h.get("displaySettings"),dragInfo:h.get("dragInfo"),AttachmentView:h.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar");this.content.set(new f.view.UploaderInline({controller:this}))},createSelectToolbar:function(h,g){g=g||this.options.button||{};g.controller=this;h.view=new f.view.Toolbar.Select(g)}});f.view.MediaFrame.Post=f.view.MediaFrame.Select.extend({initialize:function(){_.defaults(this.options,{multiple:true,editing:false,state:"insert"});f.view.MediaFrame.Select.prototype.initialize.apply(this,arguments);this.createIframeStates()},createStates:function(){var g=this.options;this.states.add([new f.controller.Library({id:"insert",title:b.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:f.query(g.library),multiple:g.multiple?"reset":false,editable:true,allowLocalEdits:true,displaySettings:true,displayUserSettings:true}),new f.controller.Library({id:"gallery",title:b.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:false,library:f.query(_.defaults({type:"image"},g.library))}),new f.controller.Embed(),new f.controller.GalleryEdit({library:g.selection,editing:g.editing,menu:"gallery"}),new f.controller.GalleryAdd()]);if(f.view.settings.post.featuredImageId){this.states.add(new f.controller.FeaturedImage())}},bindHandlers:function(){f.view.MediaFrame.Select.prototype.bindHandlers.apply(this,arguments);this.on("menu:create:gallery",this.createMenu,this);this.on("toolbar:create:main-insert",this.createToolbar,this);this.on("toolbar:create:main-gallery",this.createToolbar,this);this.on("toolbar:create:featured-image",this.featuredImageToolbar,this);this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this);var g={menu:{"default":"mainMenu",gallery:"galleryMenu"},content:{embed:"embedContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar"}};_.each(g,function(i,h){_.each(i,function(k,j){this.on(h+":render:"+j,this[k],this)},this)},this)},mainMenu:function(g){g.set({"library-separator":new f.View({className:"separator",priority:100})})},galleryMenu:function(g){var h=this.lastState(),i=h&&h.id,j=this;g.set({cancel:{text:b.cancelGalleryTitle,priority:20,click:function(){if(i){j.setState(i)}else{j.close()}}},separateCancel:new f.View({className:"separator",priority:40})})},embedContent:function(){var g=new f.view.Embed({controller:this,model:this.state()}).render();this.content.set(g);g.url.focus()},editSelectionContent:function(){var i=this.state(),h=i.get("selection"),g;g=new f.view.AttachmentsBrowser({controller:this,collection:h,selection:h,model:i,sortable:true,search:false,dragInfo:true,AttachmentView:f.view.Attachment.EditSelection}).render();g.toolbar.set("backToLibrary",{text:b.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse")}});this.content.set(g)},selectionStatusToolbar:function(g){var h=this.state().get("editable");g.set("selection",new f.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:h&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(h){var g=this;this.selectionStatusToolbar(h);h.set("insert",{style:"primary",priority:80,text:b.insertIntoPost,requires:{selection:true},click:function(){var j=g.state(),i=j.get("selection");g.close();j.trigger("insert",i).reset()}})},mainGalleryToolbar:function(h){var g=this;this.selectionStatusToolbar(h);h.set("gallery",{style:"primary",text:b.createNewGallery,priority:60,requires:{selection:true},click:function(){var i=g.state().get("selection"),j=g.state("gallery-edit"),k=i.where({type:"image"});j.set("library",new f.model.Selection(k,{props:i.props.toJSON(),multiple:true}));this.controller.setState("gallery-edit")}})},featuredImageToolbar:function(g){this.createSelectToolbar(g,{text:b.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(g){g.view=new f.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var g=this.state().get("editing");this.toolbar.set(new f.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g?b.updateGallery:b.insertGallery,priority:80,requires:{library:true},click:function(){var h=this.controller,i=h.state();h.close();i.trigger("update",i.get("library"));h.setState(h.options.state);h.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new f.view.Toolbar({controller:this,items:{insert:{style:"primary",text:b.addToGallery,priority:80,requires:{selection:true},click:function(){var g=this.controller,i=g.state(),h=g.state("gallery-edit");h.get("library").add(i.get("selection").models);i.trigger("reset");g.setState("gallery-edit")}}}}))}});f.view.Modal=f.View.extend({tagName:"div",template:f.template("media-modal"),attributes:{tabindex:0},events:{"click .media-modal-backdrop, .media-modal-close":"escapeHandler",keydown:"keydown"},initialize:function(){_.defaults(this.options,{container:document.body,title:"",propagate:true,freeze:true})},prepare:function(){return{title:this.options.title}},attach:function(){if(this.views.attached){return this}if(!this.views.rendered){this.render()}this.$el.appendTo(this.options.container);this.views.attached=true;this.views.ready();return this.propagate("attach")},detach:function(){if(this.$el.is(":visible")){this.close()}this.$el.detach();this.views.attached=false;return this.propagate("detach")},open:function(){var h=this.$el,g=this.options;if(h.is(":visible")){return this}if(!this.views.attached){this.attach()}if(g.freeze){this._freeze={scrollTop:e(window).scrollTop()}}h.show().focus();return this.propagate("open")},close:function(g){var h=this._freeze;if(!this.views.attached||!this.$el.is(":visible")){return this}this.$el.hide();this.propagate("close");if(h){e(window).scrollTop(h.scrollTop)}if(g&&g.escape){this.propagate("escape")}return this},escape:function(){return this.close({escape:true})},escapeHandler:function(g){g.preventDefault();this.escape()},content:function(g){this.views.set(".media-modal-content",g);return this},propagate:function(g){this.trigger(g);if(this.options.propagate){this.controller.trigger(g)}return this},keydown:function(g){if(27===g.which){g.preventDefault();this.escape();return}}});f.view.FocusManager=f.View.extend({events:{keydown:"recordTab",focusin:"updateIndex"},focus:function(){if(_.isUndefined(this.index)){return}this.$tabbables=this.$(":tabbable");this.$tabbables.eq(this.index).focus()},recordTab:function(h){if(9!==h.keyCode){return}if(_.isUndefined(this.index)){this.updateIndex(h)}if(_.isUndefined(this.index)){return}var g=this.index+(h.shiftKey?-1:1);if(g>=0&&g<this.$tabbables.length){this.index=g}else{delete this.index}},updateIndex:function(h){this.$tabbables=this.$(":tabbable");var g=this.$tabbables.index(h.target);if(-1===g){delete this.index}else{this.index=g}}});f.view.UploaderWindow=f.View.extend({tagName:"div",className:"uploader-window",template:f.template("uploader-window"),initialize:function(){var g;this.$browser=e('<a href="#" class="browser" />').hide().appendTo("body");g=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}});if(g.dropzone&&!(g.dropzone instanceof e)){g.dropzone=e(g.dropzone)}this.controller.on("activate",this.refresh,this)},refresh:function(){if(this.uploader){this.uploader.refresh()}},ready:function(){var h=f.view.settings.post.id,g;if(this.uploader){return}if(h){this.options.uploader.params.post_id=h}this.uploader=new wp.Uploader(this.options.uploader);g=this.uploader.dropzone;g.on("dropzone:enter",_.bind(this.show,this));g.on("dropzone:leave",_.bind(this.hide,this))},show:function(){var g=this.$el.show();_.defer(function(){g.css({opacity:1})})},hide:function(){var g=this.$el.css({opacity:0});f.transition(g).done(function(){if("0"===g.css("opacity")){g.hide()}})}});f.view.UploaderInline=f.View.extend({tagName:"div",className:"uploader-inline",template:f.template("uploader-inline"),initialize:function(){_.defaults(this.options,{message:"",status:true});if(!this.options.$browser&&this.controller.uploader){this.options.$browser=this.controller.uploader.$browser}if(_.isUndefined(this.options.postId)){this.options.postId=f.view.settings.post.id}if(this.options.status){this.views.set(".upload-inline-status",new f.view.UploaderStatus({controller:this.controller}))}},dispose:function(){if(this.disposing){return f.View.prototype.dispose.apply(this,arguments)}this.disposing=true;return this.remove()},remove:function(){var g=f.View.prototype.remove.apply(this,arguments);_.defer(_.bind(this.refresh,this));return g},refresh:function(){var g=this.controller.uploader;if(g){g.refresh()}},ready:function(){var g=this.options.$browser,h;if(this.controller.uploader){h=this.$(".browser");if(h[0]===g[0]){return}g.detach().text(h.text());g[0].className=h[0].className;h.replaceWith(g.show())}this.refresh();return this}});f.view.UploaderStatus=f.View.extend({className:"media-uploader-status",template:f.template("uploader-status"),events:{"click .upload-dismiss-errors":"dismiss"},initialize:function(){this.queue=wp.Uploader.queue;this.queue.on("add remove reset",this.visibility,this);this.queue.on("add remove reset change:percent",this.progress,this);this.queue.on("add remove reset change:uploading",this.info,this);this.errors=wp.Uploader.errors;this.errors.reset();this.errors.on("add remove reset",this.visibility,this);this.errors.on("add",this.error,this)},dispose:function(){wp.Uploader.queue.off(null,null,this);f.View.prototype.dispose.apply(this,arguments);return this},visibility:function(){this.$el.toggleClass("uploading",!!this.queue.length);this.$el.toggleClass("errors",!!this.errors.length);this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({"$bar":".media-progress-bar div","$index":".upload-index","$total":".upload-total","$filename":".upload-filename"},function(g,h){this[h]=this.$(g)},this);this.visibility();this.progress();this.info()},progress:function(){var g=this.queue,i=this.$bar,h=0;if(!i||!g.length){return}i.width((g.reduce(function(j,l){if(!l.get("uploading")){return j+100}var k=l.get("percent");return j+(_.isNumber(k)?k:100)},0)/g.length)+"%")},info:function(){var g=this.queue,h=0,i;if(!g.length){return}i=this.queue.find(function(k,j){h=j;return k.get("uploading")});this.$index.text(h+1);this.$total.text(g.length);this.$filename.html(i?this.filename(i.get("filename")):"")},filename:function(g){return f.truncate(_.escape(g),24)},error:function(g){this.views.add(".upload-errors",new f.view.UploaderStatusError({filename:this.filename(g.get("file").name),message:g.get("message")}),{at:0})},dismiss:function(g){var h=this.views.get(".upload-errors");g.preventDefault();if(h){_.invoke(h,"remove")}wp.Uploader.errors.reset()}});f.view.UploaderStatusError=f.View.extend({className:"upload-error",template:f.template("uploader-status-error")});f.view.Toolbar=f.View.extend({tagName:"div",className:"media-toolbar",initialize:function(){var i=this.controller.state(),h=this.selection=i.get("selection"),g=this.library=i.get("library");this._views={};this.primary=new f.view.PriorityList();this.secondary=new f.view.PriorityList();this.primary.$el.addClass("media-toolbar-primary");this.secondary.$el.addClass("media-toolbar-secondary");this.views.set([this.secondary,this.primary]);if(this.options.items){this.set(this.options.items,{silent:true})}if(!this.options.silent){this.render()}if(h){h.on("add remove reset",this.refresh,this)}if(g){g.on("add remove reset",this.refresh,this)}},dispose:function(){if(this.selection){this.selection.off(null,null,this)}if(this.library){this.library.off(null,null,this)}return f.View.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(j,g,h){var i;h=h||{};if(_.isObject(j)){_.each(j,function(k,l){this.set(l,k,{silent:true})},this)}else{if(!(g instanceof Backbone.View)){g.classes=["media-button-"+j].concat(g.classes||[]);g=new f.view.Button(g).render()}g.controller=g.controller||this.controller;this._views[j]=g;i=g.options.priority<0?"secondary":"primary";this[i].set(j,g,h)}if(!h.silent){this.refresh()}return this},get:function(g){return this._views[g]},unset:function(h,g){delete this._views[h];this.primary.unset(h,g);this.secondary.unset(h,g);if(!g||!g.silent){this.refresh()}return this},refresh:function(){var i=this.controller.state(),g=i.get("library"),h=i.get("selection");_.each(this._views,function(j){if(!j.model||!j.options||!j.options.requires){return}var l=j.options.requires,k=false;k=_.some(h.models,function(m){return m.get("uploading")===true});if(l.selection&&h&&!h.length){k=true}else{if(l.library&&g&&!g.length){k=true}}j.model.set("disabled",k)})}});f.view.Toolbar.Select=f.view.Toolbar.extend({initialize:function(){var h=this.options,g=h.controller,i=g.state().get("selection");_.bindAll(this,"clickSelect");_.defaults(h,{event:"select",state:false,reset:true,close:true,text:b.select,requires:{selection:true}});h.items=_.defaults(h.items||{},{select:{style:"primary",text:h.text,priority:80,click:this.clickSelect,requires:h.requires}});f.view.Toolbar.prototype.initialize.apply(this,arguments)},clickSelect:function(){var h=this.options,g=this.controller;if(h.close){g.close()}if(h.event){g.state().trigger(h.event)}if(h.state){g.setState(h.state)}if(h.reset){g.reset()}}});f.view.Toolbar.Embed=f.view.Toolbar.Select.extend({initialize:function(){_.defaults(this.options,{text:b.insertIntoPost,requires:false});f.view.Toolbar.Select.prototype.initialize.apply(this,arguments)},refresh:function(){var g=this.controller.state().props.get("url");this.get("select").model.set("disabled",!g||g==="http://");f.view.Toolbar.Select.prototype.refresh.apply(this,arguments)}});f.view.Button=f.View.extend({tagName:"a",className:"media-button",attributes:{href:"#"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:false},initialize:function(){this.model=new Backbone.Model(this.defaults);_.each(this.defaults,function(i,g){var h=this.options[g];if(_.isUndefined(h)){return}this.model.set(g,h);delete this.options[g]},this);this.model.on("change",this.render,this)},render:function(){var h=["button",this.className],g=this.model.toJSON();if(g.style){h.push("button-"+g.style)}if(g.size){h.push("button-"+g.size)}h=_.uniq(h.concat(this.options.classes));this.el.className=h.join(" ");this.$el.attr("disabled",g.disabled);this.$el.text(this.model.get("text"));return this},click:function(g){if("#"===this.attributes.href){g.preventDefault()}if(this.options.click&&!this.model.get("disabled")){this.options.click.apply(this,arguments)}}});f.view.ButtonGroup=f.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(g){if(g instanceof Backbone.View){return g}else{return new f.view.Button(g).render()}});delete this.options.buttons;if(this.options.classes){this.$el.addClass(this.options.classes)}},render:function(){this.$el.html(e(_.pluck(this.buttons,"el")).detach());return this}});f.view.PriorityList=f.View.extend({tagName:"div",initialize:function(){this._views={};this.set(_.extend({},this._views,this.options.views),{silent:true});delete this.options.views;if(!this.options.silent){this.render()}},set:function(l,h,j){var k,g,i;j=j||{};if(_.isObject(l)){_.each(l,function(m,n){this.set(n,m)},this);return this}if(!(h instanceof Backbone.View)){h=this.toView(h,l,j)}h.controller=h.controller||this.controller;this.unset(l);k=h.options.priority||10;g=this.views.get()||[];_.find(g,function(n,m){if(n.options.priority>k){i=m;return true}});this._views[l]=h;this.views.add(h,{at:_.isNumber(i)?i:g.length||0});return this},get:function(g){return this._views[g]},unset:function(h){var g=this.get(h);if(g){g.remove()}delete this._views[h];return this},toView:function(g){return new f.View(g)}});f.view.MenuItem=f.View.extend({tagName:"a",className:"media-menu-item",attributes:{href:"#"},events:{click:"_click"},_click:function(g){var h=this.options.click;if(g){g.preventDefault()}if(h){h.call(this)}else{this.click()}},click:function(){var g=this.options.state;if(g){this.controller.setState(g)}},render:function(){var g=this.options;if(g.text){this.$el.text(g.text)}else{if(g.html){this.$el.html(g.html)}}return this}});f.view.Menu=f.view.PriorityList.extend({tagName:"div",className:"media-menu",property:"state",ItemView:f.view.MenuItem,region:"menu",toView:function(g,h){g=g||{};g[this.property]=g[this.property]||h;return new this.ItemView(g).render()},ready:function(){f.view.PriorityList.prototype.ready.apply(this,arguments);this.visibility()},set:function(){f.view.PriorityList.prototype.set.apply(this,arguments);this.visibility()},unset:function(){f.view.PriorityList.prototype.unset.apply(this,arguments);this.visibility()},visibility:function(){var j=this.region,h=this.controller[j].get(),g=this.views.get(),i=!g||g.length<2;if(this===h){this.controller.$el.toggleClass("hide-"+j,i)}},select:function(h){var g=this.get(h);if(!g){return}this.deselect();g.$el.addClass("active")},deselect:function(){this.$el.children().removeClass("active")}});f.view.RouterItem=f.view.MenuItem.extend({click:function(){var g=this.options.contentMode;if(g){this.controller.content.mode(g)}}});f.view.Router=f.view.Menu.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:f.view.RouterItem,region:"router",initialize:function(){this.controller.on("content:render",this.update,this);f.view.Menu.prototype.initialize.apply(this,arguments)},update:function(){var g=this.controller.content.mode();if(g){this.select(g)}}});f.view.Sidebar=f.view.PriorityList.extend({className:"media-sidebar"});f.view.Attachment=f.View.extend({tagName:"li",className:"attachment",template:f.template("attachment"),events:{"click .attachment-preview":"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .close":"removeFromLibrary","click .check":"removeFromSelection","click a":"preventDefault"},buttons:{},initialize:function(){var g=this.options.selection;this.model.on("change:sizes change:uploading",this.render,this);this.model.on("change:title",this._syncTitle,this);this.model.on("change:caption",this._syncCaption,this);this.model.on("change:percent",this.progress,this);this.model.on("add",this.select,this);this.model.on("remove",this.deselect,this);if(g){g.on("reset",this.updateSelect,this)}this.model.on("selection:single selection:unsingle",this.details,this);this.details(this.model,this.controller.state().get("selection"))},dispose:function(){var g=this.options.selection;this.updateAll();if(g){g.off(null,null,this)}f.View.prototype.dispose.apply(this,arguments);return this},render:function(){var g=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:false,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:false,alt:"",description:""});g.buttons=this.buttons;g.describe=this.controller.state().get("describe");if("image"===g.type){g.size=this.imageSize()}g.can={};if(g.nonces){g.can.remove=!!g.nonces["delete"];g.can.save=!!g.nonces.update}if(this.controller.state().get("allowLocalEdits")){g.allowLocalEdits=true}this.views.detach();this.$el.html(this.template(g));this.$el.toggleClass("uploading",g.uploading);if(g.uploading){this.$bar=this.$(".media-progress-bar div")}else{delete this.$bar}this.updateSelect();this.updateSave();this.views.render();return this},progress:function(){if(this.$bar&&this.$bar.length){this.$bar.width(this.model.get("percent")+"%")}},toggleSelectionHandler:function(g){var h;if(g.shiftKey){h="between"}else{if(g.ctrlKey||g.metaKey){h="toggle"}}this.toggleSelection({method:h})},toggleSelection:function(p){var k=this.collection,l=this.options.selection,j=this.model,g=p&&p.method,m,n,h,i,o;if(!l){return}m=l.single();g=_.isUndefined(g)?l.multiple:g;if("between"===g&&m&&l.multiple){if(m===j){return}i=k.indexOf(m);o=k.indexOf(this.model);if(i<o){h=k.models.slice(i,o+1)}else{h=k.models.slice(o,i+1)}l.add(h).single(j);return}else{if("toggle"===g){l[this.selected()?"remove":"add"](j).single(j);return}}if(g!=="add"){g="reset"}if(this.selected()){l[m===j?"remove":"single"](j)}else{l[g](j).single(j)}},updateSelect:function(){this[this.selected()?"select":"deselect"]()},selected:function(){var g=this.options.selection;if(g){return !!g.get(this.model.cid)}},select:function(g,i){var h=this.options.selection;if(!h||(i&&i!==h)){return}this.$el.addClass("selected")},deselect:function(g,i){var h=this.options.selection;if(!h||(i&&i!==h)){return}this.$el.removeClass("selected")},details:function(g,j){var i=this.options.selection,h;if(i!==j){return}h=i.single();this.$el.toggleClass("details",h===this.model)},preventDefault:function(g){g.preventDefault()},imageSize:function(g){var h=this.model.get("sizes");g=g||"medium";if(h&&h[g]){return _.clone(h[g])}else{return{url:this.model.get("url"),width:this.model.get("width"),height:this.model.get("height"),orientation:this.model.get("orientation")}}},updateSetting:function(i){var g=e(i.target).closest("[data-setting]"),h,j;if(!g.length){return}h=g.data("setting");j=i.target.value;if(this.model.get(h)!==j){this.save(h,j)}},save:function(){var g=this,i=this._save=this._save||{status:"ready"},h=this.model.save.apply(this.model,arguments),j=i.requests?e.when(h,i.requests):h;if(i.savedTimer){clearTimeout(i.savedTimer)}this.updateSave("waiting");i.requests=j;j.always(function(){if(i.requests!==j){return}g.updateSave(j.state()==="resolved"?"complete":"error");i.savedTimer=setTimeout(function(){g.updateSave("ready");delete i.savedTimer},2000)})},updateSave:function(g){var h=this._save=this._save||{status:"ready"};if(g&&g!==h.status){this.$el.removeClass("save-"+h.status);h.status=g}this.$el.addClass("save-"+h.status);return this},updateAll:function(){var h=this.$("[data-setting]"),g=this.model,i;i=_.chain(h).map(function(k){var m=e("input, textarea, select, [value]",k),j,l;if(!m.length){return}j=e(k).data("setting");l=m.val();if(g.get(j)!==l){return[j,l]}}).compact().object().value();if(!_.isEmpty(i)){g.save(i)}},removeFromLibrary:function(g){g.stopPropagation();this.collection.remove(this.model)},removeFromSelection:function(h){var g=this.options.selection;if(!g){return}h.stopPropagation();g.remove(this.model)}});_.each({caption:"_syncCaption",title:"_syncTitle"},function(h,g){f.view.Attachment.prototype[h]=function(i,k){var j=this.$('[data-setting="'+g+'"]');if(!j.length){return this}if(k===j.find("input, textarea, select, [value]").val()){return this}return this.render()}});f.view.Attachment.Library=f.view.Attachment.extend({buttons:{check:true}});f.view.Attachment.EditLibrary=f.view.Attachment.extend({buttons:{close:true}});f.view.Attachments=f.View.extend({tagName:"ul",className:"attachments",cssTemplate:f.template("attachments-css"),events:{scroll:"scroll"},initialize:function(){this.el.id=_.uniqueId("__attachments-view-");_.defaults(this.options,{refreshSensitivity:200,refreshThreshold:3,AttachmentView:f.view.Attachment,sortable:false,resize:true});this._viewsByCid={};this.collection.on("add",function(i,g,h){this.views.add(this.createAttachmentView(i),{at:this.collection.indexOf(i)})},this);this.collection.on("remove",function(j,g,i){var h=this._viewsByCid[j.cid];delete this._viewsByCid[j.cid];if(h){h.remove()}},this);this.collection.on("reset",this.render,this);this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value();this.initSortable();_.bindAll(this,"css");this.model.on("change:edge change:gutter",this.css,this);this._resizeCss=_.debounce(_.bind(this.css,this),this.refreshSensitivity);if(this.options.resize){e(window).on("resize.attachments",this._resizeCss)}this.css()},dispose:function(){this.collection.props.off(null,null,this);e(window).off("resize.attachments",this._resizeCss);f.View.prototype.dispose.apply(this,arguments)},css:function(){var g=e("#"+this.el.id+"-css");if(g.length){g.remove()}f.view.Attachments.$head().append(this.cssTemplate({id:this.el.id,edge:this.edge(),gutter:this.model.get("gutter")}))},edge:function(){var i=this.model.get("edge"),j,h,g;if(!this.$el.is(":visible")){return i}j=this.model.get("gutter")*2;h=this.$el.width()-j;g=Math.ceil(h/(i+j));i=Math.floor((h-(g*j))/g);return i},initSortable:function(){var g=this.collection;if(!this.options.sortable||!e.fn.sortable){return}this.$el.sortable(_.extend({disabled:!!g.comparator,containment:this.$el,tolerance:"pointer",start:function(h,i){i.item.data("sortableIndexStart",i.item.index())},update:function(j,k){var i=g.at(k.item.data("sortableIndexStart")),h=g.comparator;delete g.comparator;g.remove(i,{silent:true}).add(i,{silent:true,at:k.item.index()});g.comparator=h;g.trigger("reset",g);g.saveMenuOrder()}},this.options.sortable));g.props.on("change:orderby",function(){this.$el.sortable("option","disabled",!!g.comparator)},this);this.collection.props.on("change:orderby",this.refreshSortable,this);this.refreshSortable()},refreshSortable:function(){if(!this.options.sortable||!e.fn.sortable){return}var i=this.collection,h=i.props.get("orderby"),g="menuOrder"===h||!i.comparator;this.$el.sortable("option","disabled",!g)},createAttachmentView:function(h){var g=new this.options.AttachmentView({controller:this.controller,model:h,collection:this.collection,selection:this.options.selection});return this._viewsByCid[h.cid]=g},prepare:function(){if(this.collection.length){this.views.set(this.collection.map(this.createAttachmentView,this))}else{this.views.unset();this.collection.more().done(this.scroll)}},ready:function(){this.scroll()},scroll:function(g){if(!this.$el.is(":visible")){return}if(this.collection.hasMore()&&this.el.scrollHeight<this.el.scrollTop+(this.el.clientHeight*this.options.refreshThreshold)){this.collection.more().done(this.scroll)}}},{$head:(function(){var g;return function(){return g=g||e("head")}}())});f.view.Search=f.View.extend({tagName:"input",className:"search",attributes:{type:"search",placeholder:b.search},events:{input:"search",keyup:"search",change:"search",search:"search"},render:function(){this.el.value=this.model.escape("search");return this},search:function(g){if(g.target.value){this.model.set("search",g.target.value)}else{this.model.unset("search")}}});f.view.AttachmentFilters=f.View.extend({tagName:"select",className:"attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters();_.extend(this.filters,this.options.filters);this.$el.html(_.chain(this.filters).map(function(g,h){return{el:e("<option></option>").val(h).text(g.text)[0],priority:g.priority||50}},this).sortBy("priority").pluck("el").value());this.model.on("change",this.select,this);this.select()},createFilters:function(){this.filters={}},change:function(h){var g=this.filters[this.el.value];if(g){this.model.set(g.props)}},select:function(){var g=this.model,i="all",h=g.toJSON();_.find(this.filters,function(k,l){var j=_.all(k.props,function(n,m){return n===(_.isUndefined(h[m])?null:h[m])});if(j){return i=l}});this.$el.val(i)}});f.view.AttachmentFilters.Uploaded=f.view.AttachmentFilters.extend({createFilters:function(){var h=this.model.get("type"),g=f.view.settings.mimeTypes,i;if(g&&h){i=g[h]}this.filters={all:{text:i||b.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10},uploaded:{text:b.uploadedToThisPost,props:{uploadedTo:f.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}}}});f.view.AttachmentFilters.All=f.view.AttachmentFilters.extend({createFilters:function(){var g={};_.each(f.view.settings.mimeTypes||{},function(i,h){g[h]={text:i,props:{type:h,uploadedTo:null,orderby:"date",order:"DESC"}}});g.all={text:b.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};g.uploaded={text:b.uploadedToThisPost,props:{type:null,uploadedTo:f.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};this.filters=g}});f.view.AttachmentsBrowser=f.View.extend({tagName:"div",className:"attachments-browser",initialize:function(){_.defaults(this.options,{filters:false,search:true,display:false,AttachmentView:f.view.Attachment.Library});this.createToolbar();this.updateContent();this.createSidebar();this.collection.on("add remove reset",this.updateContent,this)},dispose:function(){this.options.selection.off(null,null,this);f.View.prototype.dispose.apply(this,arguments);return this},createToolbar:function(){var h,g;this.toolbar=new f.view.Toolbar({controller:this.controller});this.views.add(this.toolbar);h=this.options.filters;if("uploaded"===h){g=f.view.AttachmentFilters.Uploaded}else{if("all"===h){g=f.view.AttachmentFilters.All}}if(g){this.toolbar.set("filters",new g({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search){this.toolbar.set("search",new f.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())}if(this.options.dragInfo){this.toolbar.set("dragInfo",new f.View({el:e('<div class="instructions">'+b.dragInfo+"</div>")[0],priority:-40}))}},updateContent:function(){var g=this;if(!this.attachments){this.createAttachments()}if(!this.collection.length){this.collection.more().done(function(){if(!g.collection.length){g.createUploader()}})}},removeContent:function(){_.each(["attachments","uploader"],function(g){if(this[g]){this[g].remove();delete this[g]}},this)},createUploader:function(){this.removeContent();this.uploader=new f.view.UploaderInline({controller:this.controller,status:false,message:b.noItemsFound});this.views.add(this.uploader)},createAttachments:function(){this.removeContent();this.attachments=new f.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,AttachmentView:this.options.AttachmentView});this.views.add(this.attachments)},createSidebar:function(){var g=this.options,h=g.selection,i=this.sidebar=new f.view.Sidebar({controller:this.controller});this.views.add(i);if(this.controller.uploader){i.set("uploads",new f.view.UploaderStatus({controller:this.controller,priority:40}))}h.on("selection:single",this.createSingle,this);h.on("selection:unsingle",this.disposeSingle,this);if(h.single()){this.createSingle()}},createSingle:function(){var h=this.sidebar,i=this.options.selection.single(),g={};h.set("details",new f.view.Attachment.Details({controller:this.controller,model:i,priority:80}));h.set("compat",new f.view.AttachmentCompat({controller:this.controller,model:i,priority:120}));if(this.options.display){h.set("display",new f.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(i),attachment:i,priority:160,userSettings:this.model.get("displayUserSettings")}))}},disposeSingle:function(){var g=this.sidebar;g.unset("details");g.unset("compat");g.unset("display")}});f.view.Selection=f.View.extend({tagName:"div",className:"media-selection",template:f.template("media-selection"),events:{"click .edit-selection":"edit","click .clear-selection":"clear"},initialize:function(){_.defaults(this.options,{editable:false,clearable:true});this.attachments=new f.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model({edge:40,gutter:5})});this.views.set(".selection-view",this.attachments);this.collection.on("add remove reset",this.refresh,this);this.controller.on("content:activate",this.refresh,this)},ready:function(){this.refresh()},refresh:function(){if(!this.$el.children().length){return}var h=this.collection,g="edit-selection"===this.controller.content.mode();this.$el.toggleClass("empty",!h.length);this.$el.toggleClass("one",1===h.length);this.$el.toggleClass("editing",g);this.$(".count").text(b.selected.replace("%d",h.length))},edit:function(g){g.preventDefault();if(this.options.editable){this.options.editable.call(this,this.collection)}},clear:function(g){g.preventDefault();this.collection.reset()}});f.view.Attachment.Selection=f.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});f.view.Attachments.Selection=f.view.Attachments.extend({events:{},initialize:function(){_.defaults(this.options,{sortable:true,resize:false,AttachmentView:f.view.Attachment.Selection});return f.view.Attachments.prototype.initialize.apply(this,arguments)}});f.view.Attachment.EditSelection=f.view.Attachment.Selection.extend({buttons:{close:true}});f.view.Settings=f.View.extend({events:{"click button":"updateHandler","change input":"updateHandler","change select":"updateHandler","change textarea":"updateHandler"},initialize:function(){this.model=this.model||new Backbone.Model();this.model.on("change",this.updateChanges,this)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){f.View.prototype.render.apply(this,arguments);_(this.model.attributes).chain().keys().each(this.update,this);return this},update:function(j){var k=this.model.get(j),i=this.$('[data-setting="'+j+'"]'),g,h;if(!i.length){return}if(i.is("select")){h=i.find('[value="'+k+'"]');if(h.length){i.find("option").prop("selected",false);h.prop("selected",true)}else{this.model.set(j,i.find(":selected").val())}}else{if(i.hasClass("button-group")){g=i.find("button").removeClass("active");g.filter('[value="'+k+'"]').addClass("active")}else{if(i.is('input[type="text"], textarea')){if(!i.is(":focus")){i.val(k)}}else{if(i.is('input[type="checkbox"]')){i.attr("checked",!!k)}}}}},updateHandler:function(i){var h=e(i.target).closest("[data-setting]"),j=i.target.value,g;i.preventDefault();if(!h.length){return}if(h.is('input[type="checkbox"]')){j=h[0].checked}this.model.set(h.data("setting"),j);if(g=h.data("userSetting")){setUserSetting(g,j)}},updateChanges:function(h,g){if(h.hasChanged()){_(h.changed).chain().keys().each(this.update,this)}}});f.view.Settings.AttachmentDisplay=f.view.Settings.extend({className:"attachment-display-settings",template:f.template("attachment-display-settings"),initialize:function(){var g=this.options.attachment;_.defaults(this.options,{userSettings:false});f.view.Settings.prototype.initialize.apply(this,arguments);this.model.on("change:link",this.updateLinkTo,this);if(g){g.on("change:uploading",this.render,this)}},dispose:function(){var g=this.options.attachment;if(g){g.off(null,null,this)}f.view.Settings.prototype.dispose.apply(this,arguments)},render:function(){var g=this.options.attachment;if(g){_.extend(this.options,{sizes:g.get("sizes"),type:g.get("type")})}f.view.Settings.prototype.render.call(this);this.updateLinkTo();return this},updateLinkTo:function(){var h=this.model.get("link"),i=this.$(".link-to-custom"),g=this.options.attachment;if("none"===h||"embed"===h||(!g&&"custom"!==h)){i.hide();return}if(g){if("post"===h){i.val(g.get("link"))}else{if("file"===h){i.val(g.get("url"))}else{if(!this.model.get("linkUrl")){i.val("http://")}}}i.prop("readonly","custom"!==h)}i.show();if(i.is(":visible")){i.focus()[0].select()}}});f.view.Settings.Gallery=f.view.Settings.extend({className:"gallery-settings",template:f.template("gallery-settings")});f.view.Attachment.Details=f.view.Attachment.extend({tagName:"div",className:"attachment-details",template:f.template("attachment-details"),events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .edit-attachment":"editAttachment","click .refresh-attachment":"refreshAttachment"},initialize:function(){this.focusManager=new f.view.FocusManager({el:this.el});f.view.Attachment.prototype.initialize.apply(this,arguments)},render:function(){f.view.Attachment.prototype.render.apply(this,arguments);this.focusManager.focus();return this},deleteAttachment:function(g){g.preventDefault();if(confirm(b.warnDelete)){this.model.destroy()}},editAttachment:function(g){this.$el.addClass("needs-refresh")},refreshAttachment:function(g){this.$el.removeClass("needs-refresh");g.preventDefault();this.model.fetch()}});f.view.AttachmentCompat=f.View.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.focusManager=new f.view.FocusManager({el:this.el});this.model.on("change:compat",this.render,this)},dispose:function(){if(this.$(":focus").length){this.save()}return f.View.prototype.dispose.apply(this,arguments)},render:function(){var g=this.model.get("compat");if(!g||!g.item){return}this.views.detach();this.$el.html(g.item);this.views.render();this.focusManager.focus();return this},preventDefault:function(g){g.preventDefault()},save:function(g){var h={};if(g){g.preventDefault()}_.each(this.$el.serializeArray(),function(i){h[i.name]=i.value});this.model.saveCompat(h)}});f.view.Iframe=f.View.extend({className:"media-iframe",render:function(){this.views.detach();this.$el.html('<iframe src="'+this.controller.state().get("src")+'" />');this.views.render();return this}});f.view.Embed=f.View.extend({className:"media-embed",initialize:function(){this.url=new f.view.EmbedUrl({controller:this.controller,model:this.model.props}).render();this.views.set([this.url]);this.refresh();this.model.on("change:type",this.refresh,this);this.model.on("change:loading",this.loading,this)},settings:function(g){if(this._settings){this._settings.remove()}this._settings=g;this.views.add(g)},refresh:function(){var h=this.model.get("type"),g;if("image"===h){g=f.view.EmbedImage}else{if("link"===h){g=f.view.EmbedLink}else{return}}this.settings(new g({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});f.view.EmbedUrl=f.View.extend({tagName:"label",className:"embed-url",events:{input:"url",keyup:"url",change:"url"},initialize:function(){this.$input=e("<input/>").attr("type","text").val(this.model.get("url"));this.input=this.$input[0];this.spinner=e('<span class="spinner" />')[0];this.$el.append([this.input,this.spinner]);this.model.on("change:url",this.render,this)},render:function(){var g=this.$input;if(g.is(":focus")){return}this.input.value=this.model.get("url")||"http://";f.View.prototype.render.apply(this,arguments);return this},ready:function(){this.focus()},url:function(g){this.model.set("url",g.target.value)},focus:function(){var g=this.$input;if(g.is(":visible")){g.focus()[0].select()}}});f.view.EmbedLink=f.view.Settings.extend({className:"embed-link-settings",template:f.template("embed-link-settings")});f.view.EmbedImage=f.view.Settings.AttachmentDisplay.extend({className:"embed-image-settings",template:f.template("embed-image-settings"),initialize:function(){f.view.Settings.AttachmentDisplay.prototype.initialize.apply(this,arguments);this.model.on("change:url",this.updateImage,this)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}})}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/background.png b/wp-includes/js/mediaelement/background.png
deleted file mode 100644
index fd428412ae..0000000000
--- a/wp-includes/js/mediaelement/background.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/bigplay.png b/wp-includes/js/mediaelement/bigplay.png
deleted file mode 100644
index 694553e31c..0000000000
--- a/wp-includes/js/mediaelement/bigplay.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/bigplay.svg b/wp-includes/js/mediaelement/bigplay.svg
deleted file mode 100644
index c2f62bbc0d..0000000000
--- a/wp-includes/js/mediaelement/bigplay.svg
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS6, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="bigplay-gradient.fw-Page%201" viewBox="0 0 100 200" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="100px" height="200px" > <defs> <radialGradient id="gradient1" cx="50%" cy="50%" r="50%"> <stop stop-color="#222222" stop-opacity="0" offset="70%"/> <stop stop-color="#222222" stop-opacity="0.0118" offset="70.202%"/> <stop stop-color="#333333" stop-opacity="1" offset="85%"/> <stop stop-color="#333333" stop-opacity="0" offset="100%"/> </radialGradient> <radialGradient id="gradient2" cx="50%" cy="50%" r="50%"> <stop stop-color="#bbbbbb" stop-opacity="0" offset="70%"/> <stop stop-color="#bbbbbb" stop-opacity="0.0118" offset="70.202%"/> <stop stop-color="#bbbbbb" stop-opacity="1" offset="85%"/> <stop stop-color="#bbbbbb" stop-opacity="0" offset="100%"/> </radialGradient> <filter id="filter1" x="-100%" y="-100%" width="300%" height="300%"> <!-- Glow --> <feColorMatrix result="out" in="SourceGraphic" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.251 0"/> <feMorphology result="out" in="out" operator="dilate" radius="3"/> <feGaussianBlur result="out" in="out" stdDeviation="1.5"/> <feBlend in="SourceGraphic" in2="out" mode="normal" result="Glow1"/> </filter> <filter id="filter2" x="-100%" y="-100%" width="300%" height="300%"> <!-- Glow --> <feColorMatrix result="out" in="SourceGraphic" type="matrix" values="0 0 0 0.8667 0 0 0 0 0.8667 0 0 0 0 0.8667 0 0 0 0 0.251 0"/> <feMorphology result="out" in="out" operator="dilate" radius="3"/> <feGaussianBlur result="out" in="out" stdDeviation="1.5"/> <feBlend in="SourceGraphic" in2="out" mode="normal" result="Glow2"/> </filter> </defs> <g id="Background"> </g> <g id="dark%20shadow"> <path d="M 22 50 C 22 34.5358 34.5358 22 50 22 C 65.4642 22 78 34.5358 78 50 C 78 65.4642 65.4642 78 50 78 C 34.5358 78 22 65.4642 22 50 ZM 5 50 C 5 74.8531 25.1469 95 50 95 C 74.8531 95 95 74.8531 95 50 C 95 25.1469 74.8531 5 50 5 C 25.1469 5 5 25.1469 5 50 Z" fill="url(#gradient1)"/> <path d="M 22 150 C 22 134.5358 34.5358 122 50 122 C 65.4642 122 78 134.5358 78 150 C 78 165.4642 65.4642 178 50 178 C 34.5358 178 22 165.4642 22 150 ZM 5 150 C 5 174.8531 25.1469 195 50 195 C 74.8531 195 95 174.8531 95 150 C 95 125.1469 74.8531 105 50 105 C 25.1469 105 5 125.1469 5 150 Z" fill="url(#gradient2)"/> </g> <g id="dark"> <path id="Polygon" filter="url(#filter1)" d="M 72.5 49.5 L 38.75 68.9856 L 38.75 30.0144 L 72.5 49.5 Z" fill="#ffffff"/> <path id="Ellipse" d="M 13 50.5 C 13 29.7891 29.7891 13 50.5 13 C 71.2109 13 88 29.7891 88 50.5 C 88 71.2109 71.2109 88 50.5 88 C 29.7891 88 13 71.2109 13 50.5 Z" stroke="#ffffff" stroke-width="5" fill="none"/> </g> <g id="light"> <path id="Polygon2" filter="url(#filter2)" d="M 72.5 149.5 L 38.75 168.9856 L 38.75 130.0144 L 72.5 149.5 Z" fill="#ffffff"/> <path id="Ellipse2" d="M 13 150.5 C 13 129.7891 29.7891 113 50.5 113 C 71.2109 113 88 129.7891 88 150.5 C 88 171.211 71.2109 188 50.5 188 C 29.7891 188 13 171.211 13 150.5 Z" stroke="#ffffff" stroke-width="5" fill="none"/> </g> </svg> \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/controls.png b/wp-includes/js/mediaelement/controls.png
deleted file mode 100644
index f6a857d800..0000000000
--- a/wp-includes/js/mediaelement/controls.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/controls.svg b/wp-includes/js/mediaelement/controls.svg
deleted file mode 100644
index af3bd41606..0000000000
--- a/wp-includes/js/mediaelement/controls.svg
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS6, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="controls.fw-Page%201" viewBox="0 0 144 32" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="144px" height="32px" > <defs> <radialGradient id="gradient1" cx="50%" cy="50%" r="50%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#f2f2f2" stop-opacity="0.2" offset="100%"/> </radialGradient> <linearGradient id="gradient2" x1="50%" y1="-7.8652%" x2="50%" y2="249.6629%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient3" x1="50%" y1="0%" x2="50%" y2="238.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient4" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient5" x1="50%" y1="-33.3333%" x2="50%" y2="152.0833%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient6" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient7" x1="50%" y1="-33.3333%" x2="50%" y2="152.0833%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient8" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient9" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient10" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient11" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient12" x1="50%" y1="0%" x2="50%" y2="238.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient13" x1="40%" y1="-140%" x2="40%" y2="98.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient14" x1="50%" y1="0%" x2="50%" y2="238.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient15" x1="60%" y1="-140%" x2="60%" y2="98.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient16" x1="50%" y1="0%" x2="50%" y2="298.4375%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient17" x1="50%" y1="0%" x2="50%" y2="238.75%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient18" x1="50%" y1="-200%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient19" x1="50%" y1="-200%" x2="50%" y2="110.9375%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient20" x1="55%" y1="0%" x2="55%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/> </linearGradient> <linearGradient id="gradient21" x1="50%" y1="0%" x2="50%" y2="100%"> <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/> <stop stop-color="#c8c8c8" stop-opacity="1" offset="99.4444%"/> </linearGradient> </defs> <g id="BG"> </g> <g id="controls"> <path id="Line" d="M 98.5 7.5 L 109.5 7.5 " stroke="#ffffff" stroke-width="1" fill="none"/> <path id="Line2" d="M 98.5 3.5 L 109.5 3.5 " stroke="#ffffff" stroke-width="1" fill="none"/> <path id="Line3" d="M 98.5 11.5 L 109.5 11.5 " stroke="#ffffff" stroke-width="1" fill="none"/> <path id="Ellipse" d="M 108 11.5 C 108 10.6716 108.4477 10 109 10 C 109.5523 10 110 10.6716 110 11.5 C 110 12.3284 109.5523 13 109 13 C 108.4477 13 108 12.3284 108 11.5 Z" fill="#ffffff"/> <path id="Ellipse2" d="M 104 7.5 C 104 6.6716 104.4477 6 105 6 C 105.5523 6 106 6.6716 106 7.5 C 106 8.3284 105.5523 9 105 9 C 104.4477 9 104 8.3284 104 7.5 Z" fill="#ffffff"/> <path id="Ellipse3" d="M 108 3.5 C 108 2.6716 108.4477 2 109 2 C 109.5523 2 110 2.6716 110 3.5 C 110 4.3284 109.5523 5 109 5 C 108.4477 5 108 4.3284 108 3.5 Z" fill="#ffffff"/> </g> <g id="backlight"> <g id="off"> <rect x="83" y="21" width="10" height="6" stroke="#ffffff" stroke-width="1" fill="#333333"/> </g> <g id="on"> <path id="Ellipse4" d="M 81 8 C 81 5.2385 84.134 3 88 3 C 91.866 3 95 5.2385 95 8 C 95 10.7615 91.866 13 88 13 C 84.134 13 81 10.7615 81 8 Z" fill="url(#gradient1)"/> <rect x="83" y="5" width="10" height="6" stroke="#ffffff" stroke-width="1" fill="#333333"/> </g> </g> <g id="loop"> <g id="on2"> <path d="M 73.795 4.205 C 75.2155 4.8785 76.2 6.3234 76.2 8 C 76.2 10.3196 74.3196 12.2 72 12.2 C 69.6804 12.2 67.8 10.3196 67.8 8 C 67.8 6.3234 68.7845 4.8785 70.205 4.205 L 68.875 2.875 C 67.1501 3.9289 66 5.8306 66 8 C 66 11.3138 68.6862 14 72 14 C 75.3138 14 78 11.3138 78 8 C 78 5.8306 76.8499 3.9289 75.125 2.875 L 73.795 4.205 Z" fill="url(#gradient2)"/> <path d="M 71 2 L 66 2 L 71 7 L 71 2 Z" fill="url(#gradient3)"/> </g> <g id="off2"> <path d="M 73.795 20.205 C 75.2155 20.8785 76.2 22.3234 76.2 24 C 76.2 26.3196 74.3196 28.2 72 28.2 C 69.6804 28.2 67.8 26.3196 67.8 24 C 67.8 22.3234 68.7845 20.8785 70.205 20.205 L 68.875 18.875 C 67.1501 19.9289 66 21.8306 66 24 C 66 27.3138 68.6862 30 72 30 C 75.3138 30 78 27.3138 78 24 C 78 21.8306 76.8499 19.9289 75.125 18.875 L 73.795 20.205 Z" fill="#a8a8b7"/> <path d="M 71 18 L 66 18 L 71 23 L 71 18 Z" fill="#a8a8b7"/> </g> </g> <g id="cc"> <rect visibility="hidden" x="49" y="2" width="14" height="12" stroke="#b0b0b0" stroke-width="1" fill="none"/> <text visibility="hidden" x="49" y="17" width="14" fill="#ffffff" style="font-size: 10px; color: #ffffff; font-family: Arial; text-align: center; "><tspan><![CDATA[cc]]></tspan></text> <path d="M 55 7 C 50.2813 3.7813 50.063 12.9405 55 10 " stroke="#ffffff" stroke-width="1" fill="none"/> <path d="M 60 7 C 55.2813 3.7813 55.063 12.9405 60 10 " stroke="#ffffff" stroke-width="1" fill="none"/> <path d="M 50 3 L 62 3 L 62 13 L 50 13 L 50 3 ZM 49 2 L 49 14 L 63 14 L 63 2 L 49 2 Z" fill="url(#gradient4)"/> <rect x="49" y="2" width="14" height="12" fill="none"/> </g> <g id="volume"> <g id="no%20sound"> <rect x="17" y="5" width="5" height="6" fill="url(#gradient5)"/> <path d="M 21 5 L 25 2 L 25 14 L 21 11.0625 L 21 5 Z" fill="url(#gradient6)"/> </g> <g id="sound%20bars"> <rect x="17" y="21" width="5" height="6" fill="url(#gradient7)"/> <path d="M 21 21 L 25 18 L 25 30 L 21 27.0625 L 21 21 Z" fill="url(#gradient8)"/> <path d="M 27 18 C 27 18 30.0625 17.375 30 24 C 29.9375 30.625 27 30 27 30 " stroke="#ffffff" stroke-width="1" fill="none"/> <path d="M 26 21.0079 C 26 21.0079 28.041 20.6962 27.9994 24 C 27.9577 27.3038 26 26.9921 26 26.9921 " stroke="#ffffff" stroke-width="1" fill="none"/> </g> </g> <g id="play/pause"> <g id="play"> <path id="Polygon" d="M 14 8.5 L 3 14 L 3 3 L 14 8.5 Z" fill="url(#gradient9)"/> </g> <g id="pause"> <rect x="3" y="18" width="3" height="12" fill="url(#gradient10)"/> <rect x="10" y="18" width="3" height="12" fill="url(#gradient11)"/> </g> </g> <g id="fullscreen"> <g id="enter%201"> <path d="M 34 2 L 39 2 L 34 7 L 34 2 Z" fill="url(#gradient12)"/> <path d="M 34 14 L 39 14 L 34 9 L 34 14 Z" fill="url(#gradient13)"/> <path d="M 46 2 L 41 2 L 46 7 L 46 2 Z" fill="url(#gradient14)"/> <path d="M 46 14 L 41 14 L 46 9 L 46 14 Z" fill="url(#gradient15)"/> </g> <g id="exit"> <path d="M 42 22 L 46 22 L 42 18 L 42 22 Z" fill="url(#gradient16)"/> <path d="M 38 22 L 38 18 L 34 22 L 38 22 Z" fill="url(#gradient17)"/> <path d="M 38 26 L 34 26 L 38 30 L 38 26 Z" fill="url(#gradient18)"/> <path d="M 42 26 L 42 30 L 46 26 L 42 26 Z" fill="url(#gradient19)"/> </g> </g> <g id="stop"> <rect x="115" y="3" width="10" height="10" fill="url(#gradient20)"/> </g> <g id="chooser"> <path d="M 135.2346 6.1522 C 136.2551 5.7295 137.4251 6.2141 137.8478 7.2346 C 138.2704 8.2551 137.7859 9.425 136.7654 9.8478 C 135.7449 10.2705 134.5749 9.7859 134.1522 8.7654 C 133.7295 7.7449 134.2141 6.5749 135.2346 6.1522 ZM 133.2735 1.4176 L 136 4.0054 L 138.7265 1.4176 L 138.8246 5.1754 L 142.5824 5.2735 L 139.9946 8 L 142.5824 10.7265 L 138.8246 10.8246 L 138.7265 14.5824 L 136 11.9946 L 133.2735 14.5824 L 133.1754 10.8246 L 129.4176 10.7265 L 132.0054 8 L 129.4176 5.2735 L 133.1754 5.1754 L 133.2735 1.4176 Z" fill="url(#gradient21)"/> </g> </svg> \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/flashmediaelement.swf b/wp-includes/js/mediaelement/flashmediaelement.swf
deleted file mode 100644
index c5d205a0ad..0000000000
--- a/wp-includes/js/mediaelement/flashmediaelement.swf
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/loading.gif b/wp-includes/js/mediaelement/loading.gif
deleted file mode 100644
index 612222be5e..0000000000
--- a/wp-includes/js/mediaelement/loading.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/mediaelement-and-player.min.js b/wp-includes/js/mediaelement/mediaelement-and-player.min.js
deleted file mode 100644
index f9d9a0b992..0000000000
--- a/wp-includes/js/mediaelement/mediaelement-and-player.min.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*!
-* MediaElement.js
-* HTML5 <video> and <audio> shim and player
-* http://mediaelementjs.com/
-*
-* Creates a JavaScript object that mimics HTML5 MediaElement API
-* for browsers that don't understand HTML5 or can't play the provided codec
-* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
-*
-* Copyright 2010-2013, John Dyer (http://j.hn)
-* License: MIT
-*
-*/var mejs=mejs||{};mejs.version="2.13.0";mejs.meIndex=0;
-mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo",
-"video/x-vimeo"]}]};
-mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+
-1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
-"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
-"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
-mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
-!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
-mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
-mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
-mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=
--1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window&&window.ontouchstart!=null;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;
-try{e.canPlayType("video/mp4")}catch(g){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=
-false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&h.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();
-else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
-mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
-mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
-mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
-false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""},
-positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
-this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
-this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
-this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in
-this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
-mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
-b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
-mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
-defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
-mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
-"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
-determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
-l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&
-b.httpsBasicAuthSite===true)){if(!d){g=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=
-0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},
-getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
-"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),
-m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>
-0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+
-g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
-'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=
-document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML=
-'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,
-videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},updateNative:function(a,
-b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
-mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
-{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
-c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
-a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+
-c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
-document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
-c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
-(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.locale.getLanguage=function(){return c.locale.language||navigator.language};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=
-c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]='<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",
-message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);
-(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
-
-/*!
- * MediaElementPlayer
- * http://mediaelementjs.com/
- *
- * Creates a controller bar for HTML5 <video> add <audio> tags
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
- *
- * Copyright 2010-2013, John Dyer (http://j.hn/)
- * License: MIT
- *
- */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
-(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
-hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
-0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
-"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;
-mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
-"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
-a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,
-1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==
-null?a.$media.attr("height"):a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});
-b.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,
-true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},
-controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);
-this.controlsEnabled=true},meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);
-c.findTracks();for(g in c.options.features){e=c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?
-c.media.play():c.media.pause()};c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&
-c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=
-mejs.players[j];m.id!=c.id&&c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&
-c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(d&&a.pluginType=="native"){a.load();
-a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===
-1||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()===
-"body"){d=f(window).width();c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");
-d.height(this.container.height()-this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!=
-"absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},
-false);a.options.showPosterWhenEnded&&a.options.autoRewind&&e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),
-k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(d.options.clickToPlayPause)e.paused?e.play():e.pause()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();
-k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",
-function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();
-j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,
-this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=
-this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}if(this.isDynamic)this.$node.insertBefore(this.container);else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+
-e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,
-e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")},
-false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
-"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
-(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
-this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
-m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
-e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
-Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b,
-c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
-f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
-false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:
-this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+
-'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
-j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
-if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true):
-e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0);
-k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
-false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
-mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
-"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l,
-left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show();
-t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover",
-function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},
-containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
-screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,
-"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
-f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();
-f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
-this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=
-f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+
-a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},
-function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});
-a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
-"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==
-null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&
-/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);
-this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},
-adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!=
-"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer==
-"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=
-a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-
-1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));
-b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
-ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
-parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
-stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
-if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
-"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")},
-click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},
-isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
-b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!=
-"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
-function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
-
diff --git a/wp-includes/js/mediaelement/mediaelementplayer.min.css b/wp-includes/js/mediaelement/mediaelementplayer.min.css
deleted file mode 100644
index 5d88e84e5d..0000000000
--- a/wp-includes/js/mediaelement/mediaelementplayer.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0;}.me-plugin{position:absolute;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden;}.mejs-fullscreen{overflow:hidden!important;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-clear{clear:both;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;}:root .mejs-poster img{display:none;}.mejs-poster img{border:0;padding:0;border:0;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat;}.no-svg .mejs-overlay-button{background-image:url(bigplay.png);}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat;}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;font-family:Helvetica,Arial;border:0;}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat;}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png);}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}.mejs-container .mejs-controls .mejs-time span{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{direction:ltr;width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;}@-webkit-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-moz-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-ms-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-o-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative;}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}.mejs-controls .mejs-sourcechooser-button{position:relative;}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,0.7);z-index:1000;overflow:hidden;}.mejs-postroll-layer-content{width:100%;height:100%;}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,0.7);color:#fff;padding:4px;z-index:100;cursor:pointer;} \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/silverlightmediaelement.xap b/wp-includes/js/mediaelement/silverlightmediaelement.xap
deleted file mode 100644
index 9d55c2e46a..0000000000
--- a/wp-includes/js/mediaelement/silverlightmediaelement.xap
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.css b/wp-includes/js/mediaelement/wp-mediaelement.css
deleted file mode 100644
index 18ad94855b..0000000000
--- a/wp-includes/js/mediaelement/wp-mediaelement.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.mejs-container, .mejs-embed, .mejs-embed body {
- background: #464646;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-loaded {
- background: #21759b;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-current {
- background: #d54e21;
-}
-
-.me-cannotplay {
- width: auto !important;
-}
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.js b/wp-includes/js/mediaelement/wp-mediaelement.js
deleted file mode 100644
index fb09e3cde3..0000000000
--- a/wp-includes/js/mediaelement/wp-mediaelement.js
+++ /dev/null
@@ -1,15 +0,0 @@
-(function ($) {
- // add mime-type aliases to MediaElement plugin support
- mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');
- mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');
-
- $(function () {
- var settings = {};
-
- if ( typeof _wpmejsSettings !== 'undefined' )
- settings.pluginPath = _wpmejsSettings.pluginPath;
-
- $('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer( settings );
- });
-
-}(jQuery));
diff --git a/wp-includes/js/plupload/changelog.txt b/wp-includes/js/plupload/changelog.txt
deleted file mode 100644
index 7aaff4c8bf..0000000000
--- a/wp-includes/js/plupload/changelog.txt
+++ /dev/null
@@ -1,241 +0,0 @@
-Version 1.5.7 (2013-04-10)
- HTML5: Workaround for squish problem in iOS6, when uploading resized images.
- HTML5: Fix failing workaround for FormData+Blob bug on Android...
- HTML5: Allow multiple uploads on iOS.
- Include VB build script that doesn't depend on Ant and is said to be native to Windows.
-Version 1.5.6 (2013-02-28)
- Fix regression: getPos() wrong on ie6/7.
- HTML5: Send file as binary string if it was mangled, even if multipart is set to false.
- HTML5: Add workaround Android browsers, that are unable to properly send blobs in FormData.
- HTML4/Flash/Silverlight: Destroy fails to cleanup everything when container not defined.
- UI, Queue: Use html() instead of text(), otherwise special characters fail to display properly.
- UI, Queue: Use on() instead of delegate() or live(). Update examples to use jQuery 1.9.0 by default.
- Queue: Blur rename input field when ESC is pressed.
- Additional language packs: Slovak.
-Version 1.5.5 (2013-01-23)
- UI Widget: Fix sortable feature, broken in jQuery UI 1.9.
- Queue: Replace live() with delegate(), as live() was removed from jQuery 1.9.
- HTML5: window.getComputedStyle in Firefox doesn't support dashed rulenames - use zIndex instead of z-index.
- HTML5/Flash/Silverlight/Gears: Process JPEGs, if quality parameter is present, whatever the scale factor.
- Flash: Survive invalid EXIF tag offsets.
- Flash: Allow only letters, digits and underscore in runtime id to avoid script injection.
- SilverLight: Prepend ampersand to the query string, for non multipart cases (as in Flash and HTML5).
- Add mime types for m2v,3gp,3g2 extensions.
-Version 1.5.4 (2012-04-12)
- Flash: Disable scripting if swf was loaded from another domain.
-Version 1.5.3 (2012-04-05)
- HTML5: Check if xhr object is initialized, before calling abort() on it.
- HTML4: Postpone form removal until uploaders state changes, to avoid error on resuming stopped uploads.
- BrowserPlus: Fix mechanical typo, that caused error during mime type check.
- BrowserPlus: browserPlus.Uploader.Cancel() has two required parameters, dies with the error if not passed.
- Flash: Improve runtime's behaviour during upload cancellation.
- Flash: Survive the case when GPSVersionID contains unexpected value.
- Flash: Fix random freeze in Chrome's bundled Flash Player.
- Flash: Avoid the silent break when URLStream not yet open, but close is called on it.
- Flash: Move Destroy handler out of Flash:Init handler, since it might be called not only after Flash:Init but also before it.
- Flash: Avoid warning during build with mxmlc.
- Try removeEventListener first in IE and only if it fails - detachEvent.
- Fix plupload.getPos to return proper value in IE8+.
- Do not initiate plupload.STARTED state, if file queue is empty.
- Additional language packs: Estonian, Polish, Korean, French-Canadian, Greek, Persian/Farsi.
-Version 1.5.2 (2012-01-06)
- UI Widget: Do not show UI if no runtime can be initialized.
- UI Widget: Timely update file size and total size if resize in action.
- UI Widget: Constrain renaming feature to queued files only.
- UI Widget: Disable Add button properly, if requested, rather then just hide.
- HTML4/HTML5/BrowserPlus: Avoid adding mime type twice to dialog trigger.
- HTML5: fix regression, when unresized images were failing on FF3.6.
- HTML5: Constrain Gecko 2,5,6 workaround to multipart mode only.
- HTML5/Flash: Take into account weird possibilities of ExifVersion being a string, rather then standard Undefined.
- Flash: Simplify event dispatching in BitmapDataUnlimited class, in order to avoid freezing on resizing in FP11.
- Add ability to disable file dialog trigger on request (uploader.disableBrowse(true/false)).
- Support for immediate abort of upload process, be it chunked upload or regular one.
- Abort all activity, before destroying uploader.
- Revive temporary file removal logic in upload.php.
- Fix potential vulnerability in dump.php and upload.php.
- Additional MIME types: application/vnd.openxmlformats-officedocument.*, application/x-javascript, application/json, text/css,css, application/vnd.oasis.opendocument.formula-templat.
- Additional language packs: Hungarian, Croatian, Serbian, Romanian.
-Version 1.5.1.1 (2011-09-27)
- HTML5: Fix mechanical typo, that successfully broke drag and drop, wherever could.
-Version 1.5.1 (2011-09-26)
- HTML4: Add support for server responses in HTML format.
- HTML5: Disable multiple file selection in Safari 5.x for Windows (see #363).
- HTML5: Gecko 2/5/6 should upload chunks as binary strings when in chunking mode and client side resize is requested.
- Flash: Enforce URLStream mode when custom headers are passed.
- Flash: Fix embedding problems in IE9 (and all other IEs).
- Flash/Gears/BrowserPlus/SilverLight: Expose multi_selection feature, to be used in required_features (mainly to overcome Safari for Windows problem).
- SilverLight: Properly handle custom and null headers.
- UploadComplete moved to fire after the last StateChanged event.
- Additional language packs: Finnish.
-Version 1.5b (2011-09-11)
- UI Widget: Fix sortable logic.
- UI Widget: Fix bug, when message was displayed simultaneously across all Plupload UI instances on the page.
- UI Widget: notify() method is now public - users can throw their own messages into the widget header.
- HTML4/HTML5: Revise input[type=file] placement logic to support cursor styling on Geko 2+.
- HTML5: Revise Drag'n'Drop detection logic.
- HTML5: Make Exif and GPS information available to user, introduce two new events: ExifData and GpsData.
- HTML5: Add support for File.prototype.slice() method (mozSlice/webkitSlice) in order to be able to upload files in chunks without preloading.
- HTML5: Remove any JPEG headers before restoring them, 'cause user agent (like Chrome), might be inserting it's own.
- Flash: Remove a limit on the depth of image header check, since it still fails in some cases and performance gain is negligible.
- Flash: Fix regression, when runtime hanged when not images where passed in as images.
- SilverLight: Fix bug, when JSON serializer was failing on null.
- SilverLight: Remove cast to integer for chunk boundary, which resulted in a wrong size for last chunks on huge files.
- SilverLight: Increase read buffer, add disposal of ImageStream and FileStream, optimize for performance.
- Updated build.xml to include language packs in release package under js/ folder.
- Gears/BrowserPlus: Add support for * file filter.
- BeforeUpload now can cancel upload if required.
- Additional MIME types: text/csv, image/photoshop, video/x-ms-wmv, video/avi, video/webm support
- Additional language packs: Japanese
- Cleaned examples.
-Version 1.4.3.2 (2011-04-13)
- Fixed bug in HTML5 runtime, when was reduced by a factor of 100 after every upload.
-Version 1.4.3.1 (2011-04-12)
- Fixed build script, mistakenly populating jquery.plupload.queue directory from jquery.ui.plupload sources.
- Fixed script urls in all examples, build script now will alter them automatically from dev to release when needed.
- Fixed isEmptyObj undefined error in HTML4 runtime.
- Fixed bug in UI Widget preventing UploadComplete from triggering.
-Version 1.4.3 (2011-04-11)
- Added Latvian language pack and updated French.
- Fixed bug in Flash runtime when JPEG header was not investigated deep enough to reach SOFn marker in large images.
- Fixed bug, when PNGs were cropped to width in Flash runtimes, rather then resized.
- Fixed Flash to allow multiple uploading of the same file, with different settings.
- Fixed Flash runtime to clean anonymous listeners properly.
- Fixed HTML5 runtime to resolve to mimeType in case-insensitive way.
- Fixed HTML5/Flash/SilverLight/Gears runtimes for inconsistency in naming of chunks feature, comparing to other runtimes.
- Fixed HTML4/HTML5 runtimes for input[type=file] to outsize contaner effectively enough to fill the whole click area.
- Fixed all runtimes to preserve position (relative/absolute) rule on containers that already have it.
- Fixed SilverLight runtime to support large files (over 2GB).
- Restructured the examples, src and build scripts to make it more clear that jQuery is optional.
- Added support for *.* filter.
- Added support for preserving ICC and IPTC headers when resizing JPEGs.
- Added Image.onerror/onabort handlers to HTML5 in order to gracefully bypass faulty images.
- Added ability to drop image size (by lowering quality), while preserving original dimension (HTML5/Flash/Gears).
- Ported EXIF, ICC, IPTC preservation code to Flash runtime.
-Version 1.4.2 (2011-02-20)
- Added Brazilian Portuguese, German, Russian and Spanish translations.
- Added support for file_data_name option to SilverLight runtime.
- Added support for better quality image resizing to Flash runtime.
- Added support for properly handling images with dimensions up to 8191x8191 pixels to Flash runtime.
- Added 'updatelist' event to UI Widget, which will be triggered every time file list will get redrawn.
- Added support for dynamically changing options to UI Widget.
- Fixed HTML4 runtime bug, when UploadFile handler was attached twice.
- Fixed HTML5 to use FileReader.readAsBinaryString() instead of File.getAsBinary() on newer WebKit browsers (like Chrome 9).
- Fixed Flash runtime from sending duplicate Filename param, when using FileReference.upload().
- Updated S3 example to illustrate support for a proper progress indication.
-Version 1.4.1 (2011-02-01)
- Added an example on how to use Plupload with Amazon S3 written in PHP but can easily be ported to other languages.
- Fixed bug where hidden input elements wasn't created when the multiple_queues option wasn't used.
- Fixed bug where FF4 would produce an exception about missing BlobBuilder.
-Version 1.4.0 (2011-01-26)
- Added removeEvent and removeAllEvents methods and modified addEvent accordingly, in order to support dynamic unload.
- Added unbindAll method.
- Added UploadComplete event, which fires when internal iterator reaches the end of the queue.
- Added public destroy method to plupload object, new event - Destroy, and corresponding handlers to all runtimes.
- Added Czech, Italian, French, Dutch translations.
- Added support for translatable error messages.
- Added two new options: browse_button_hover and browse_button_active, in order to support browse_button interactivity.
- Added support for 'multi_selection: false' to Silverlight runtime.
- Added support for video/mp4, video/x-m4v and audio/mp4 MIME Types.
- Added artificial sendAsBinary method to XMLHttpRequest.prototype for browsers that have support for BlobBuilder and typed arrays.
- Added version tracking variable into plupload object and version comment to the header of every file.
- Fixed measurements of browse_button element in order to size and position input[type=file] element to fit it fully.
- Fixed Flash runtime behavior for multiple_select=false and other simpleUpload usage cases: basically new FileReference has to be created for every select dialog.
- Fixed browser sniffer to match only Safari, for fakeSafariDragDrop (seems like Safari on Mac doesn't require it either).
- Fixed so that ExternalInterface escapes strings properly, before passing them to JS.
- Fixed eventual reinitialization of flash/silverlight runtimes, especially for cases when object wrapper needed to be programmatically hidden and then shown again.
- Fixed so that Plupload will now ignore files with duplicate names when adding to the queue, in one set. Mainly introduced to work around Safari on Windows bug (https://bugs.webkit.org/show_bug.cgi?id=37957).
- Fixed bug, when final UploadProgress was firing after FileUploaded for Flash simpleUpload.
- Fixed bug where upload would fail if an error was produced inside the FilesAdded event.
- Fixed bug in Flash runtime when it used a wrong size when resizing, but not chunking.
- Fixed bug in Silverlight runtime that would keep sending 0 byte packages when a picture was chunked before resized.
- Disabled blur filter (is going to be replaced with some bilinear resampling in next release).
- Completely revised UI Widget, to be more jQuery UI oriented. Optionally depends on UI Button, UI Sortable, UI ProgressBar.
-Version 1.3.0 (2010-11-24)
- Added new jQuery UI widget that supports jQuery UI themes.
- Added new multiple_queues option that enables you to upload multiple times in the queue widgets.
- Added support for crossdomain loading of the XAP and SWF files and crossdomain upload.
- Added new multiple_queues option that enables you to upload multiple times in the queue widgets.
- Added support for crossdomain loading of the XAP and SWF files and crossdomain upload.
- Added preinit/init options to to ease up the binding of custom events to queueWidget and the Uploader class.
- Added drag/drop support for Safari until they fix the broken drag/drop support on Windows.
- Added events example file that show how to bind all events and display event specific data.
- Added support for retaining Exif data on images when they where resized using the HTML5 runtime.
- Fixed logic issue with the upload.php example file. Chunking wasn't working correctly.
- Fixed issue with HTML4 not handling the form encoding correctly on older IE versions. Patch contributed by jinxdone.
- Fixed so the HTML4 runtime only submits the defined multipart_params arguments.
- Fixes issue where it wasn't possible to dynamically override url or mutlipart_params for the HTML4 runtime.
- Fixed so all runtimes pass the name, chunk and chunks parameters as multipart parameters instead of querystring parameters.
- Fixed so files are read using the newer FileReader class if it's available if not it tries the older getAsXXX on Gecko.
- Fixed bug where IE 9 beta 1 wouldn't render Silverlight properly.
- Fixed bug where Flash would do extra empty requests if images below a specific size would be uploaded.
- Fixed bug where Google Gears would resize and re-encode images even if the it wasn't changed in scale.
- Fixed bug where the HTML5 runtime wouldn't free memory after each request on Gecko.
-Version 1.2.4 (2010-09-08)
- Added new BeforeUpload event to make it easier to override settings before a file is uploaded.
- Added new automatic usage of FileReference in Flash if it's possible. Contributed by Marcel Jackwerth.
- Added new chunking support for Chrome 5 and Firefox 3.6 using the HTML 5 runtime.
- Added new multipart upload support for WebKit using the HTML 5 runtime and the FormData object.
- Added new image scaling method for the Flash runtime contributed by rcoopman.
- Added new alert error message if the user selected invalid files.
- Added new automatic unique name generation to the example.php script. Contributed by Brandon Kelly.
- Changed so the default upload method is multipart and the default chunk size is 0.
- Fixed progress issue with the HTML5 runtime running on Gecko.
- Fixed so longer extensions can be used such as .tar.gz.
- Fixed so the file extension is retained when using the unique_names option.
-Version 1.2.3 (2010-05-27)
- Added new drag/drop support for HTML5 running on Chrome beta.
- Added new multipart state for the features object. It's now possible to detect multipart support.
- Added new getFeatures function to all runtime. Basic concept by Javier Martinez Fernandez.
- Fixed bug where runtimes where initialized even if they didn't match the required_features setting.
-Version 1.2.2.1 (2010-05-04)
- Added new headers option, enables you to set custom headers for the upload requests.
- Fixed bug where the file extension checking was case sensitive.
-Version 1.2.2 (2010-04-26)
- Added new file_data_name option that enables you to set the multipart file data param. Patch contributed by Alex Ganov.
- Added new FILE_SIZE_ERROR type that will be triggered if the user selected a file that is to large or zero bytes.
- Added new FILE_EXTENSION_ERROR type that will be triggered if you add a file with an invalid file extension.
- Added new required_features setting, enables you to specify a list of required features that the runtime must have.
- Fixed so the plupload.buildUrl function uses the UTF compatible encodeURIComponent method instead of escape.
- Fixed so that all file types can be selected if you don't specify a filter setting.
- Fixed so more valid HTTP status codes are accepted as valid responses.
- Fixed so all runtimes fills the features object with available features.
- Fixed some issues with the HTML4 runtime if there wasn't any existing forms on the page.
- Fixed some conflict issues with HTML4 runtime and forms with the input names of action or target.
- Fixed bug where some Gecko versions would produce exceptions when checking the HTTP status of a XHR.
-Version 1.2.1 (2010-03-22)
- Fixed bug with incorrect aspect ratio in Flash image scaling.
- Fixed bug where chunked uploads could get scrambled in the Flash runtime. Patch contributed by Grady Werner.
- Fixed bug where a beta version of Chrome wouldn't handle drag/drop correctly because of missing drag effect.
- Fixed so the HTML 4 runtime displays N/A for file sizes and the progress is based on uploaded files instead of bytes.
- Fixed so chunking can be disabled properly in Flash but that will affect the progress bar.
- Fixed so queue widget displays the drag/drop message if file queue is emptied.
- Fixed small files are uploaded as one single chunk and not forced into 4 chunks in the Flash runtime.
-Version 1.2 (2010-03-09)
- Added new rename file support for jQuery queue widget, click on a file name to rename it if it's enabled.
- Added official ChunkUploaded event, it similar to FileUploaded but executed for each chunk.
- Added bytes per second support to total queue progress.
- Added better error handling to core API using the new Error event.
- Added better error handling to jQuery queue widget.
- Fixed so chunking uploads is dispatch from JS not from inside Flash/Silverlight.
-Version 1.1.1 (2010-02-25)
- Added new setup setting to queue widget. Makes it easier to bind custom events to uploader instance.
- Fixed so it's possible to disable chunking compleatly. It's now disabled by default.
- Fixed bug where multipart mode was enabled all the time in the Flash runtime.
- Fixed bug where chunked uploading in Silverlight would fail.
- Fixed bug where the delete button was visible while uploading.
- Fixed bug where unique_names setting wasn't working when the core API was used.
- Fixed bug where the queue widget wouldn't display the currently uploaded file if the unique_names was enabled.
-Version 1.1 (2010-02-24)
- Added new multipart and multipart_params support.
- Added new container option, enables you to specify where flash/silverlight objects would be added.
- Added chunking support to BrowserPlus runtime, contributed by Steve Spencer.
- Added FileUploaded event that fires when a file is uploaded.
- Added more easily understandable buttons to queue widget.
- Added html4 runtime, contributed by Ryan Demmer.
- Fixed issues with i18n support and added a Swedish and Danish language pack.
- Fixed bug where the Flash runtime could do empty requests if the image was scaled down.
- Fixed bug where uploading small images in Silverlight would produce an exception.
- Fixed so the runtime list can include whitespace or missing runtimes. Patch contributed by Øyvind Sean Kinsey.
- Fixed so to large files are ignored and never dispatched to the FilesAdded event.
-Version 1.0 (2010-02-03)
- First official release of Plupload.
diff --git a/wp-includes/js/plupload/handlers.js b/wp-includes/js/plupload/handlers.js
deleted file mode 100644
index 0b9937c4db..0000000000
--- a/wp-includes/js/plupload/handlers.js
+++ /dev/null
@@ -1,491 +0,0 @@
-var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
-
-function fileDialogStart() {
- jQuery("#media-upload-error").empty();
-}
-
-// progress and success handlers for media multi uploads
-function fileQueued(fileObj) {
- // Get rid of unused form
- jQuery('.media-blank').remove();
-
- var items = jQuery('#media-items').children(), postid = post_id || 0;
-
- // Collapse a single item
- if ( items.length == 1 ) {
- items.removeClass('open').find('.slidetoggle').slideUp(200);
- }
- // Create a progress bar containing the filename
- jQuery('<div class="media-item">')
- .attr( 'id', 'media-item-' + fileObj.id )
- .addClass('child-of-' + postid)
- .append('<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>',
- jQuery('<div class="filename original">').text( ' ' + fileObj.name ))
- .appendTo( jQuery('#media-items' ) );
-
- // Disable submit
- jQuery('#insert-gallery').prop('disabled', true);
-}
-
-function uploadStart() {
- try {
- if ( typeof topWin.tb_remove != 'undefined' )
- topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
- } catch(e){}
-
- return true;
-}
-
-function uploadProgress(up, file) {
- var item = jQuery('#media-item-' + file.id);
-
- jQuery('.bar', item).width( (200 * file.loaded) / file.size );
- jQuery('.percent', item).html( file.percent + '%' );
-}
-
-// check to see if a large file failed to upload
-function fileUploading(up, file) {
- var hundredmb = 100 * 1024 * 1024, max = parseInt(up.settings.max_file_size, 10);
-
- if ( max > hundredmb && file.size > hundredmb ) {
- setTimeout(function(){
- var done;
-
- if ( file.status < 3 && file.loaded == 0 ) { // not uploading
- wpFileError(file, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
- up.stop(); // stops the whole queue
- up.removeFile(file);
- up.start(); // restart the queue
- }
- }, 10000); // wait for 10 sec. for the file to start uploading
- }
-}
-
-function updateMediaForm() {
- var items = jQuery('#media-items').children();
-
- // Just one file, no need for collapsible part
- if ( items.length == 1 ) {
- items.addClass('open').find('.slidetoggle').show();
- jQuery('.insert-gallery').hide();
- } else if ( items.length > 1 ) {
- items.removeClass('open');
- // Only show Gallery button when there are at least two files.
- jQuery('.insert-gallery').show();
- }
-
- // Only show Save buttons when there is at least one file.
- if ( items.not('.media-blank').length > 0 )
- jQuery('.savebutton').show();
- else
- jQuery('.savebutton').hide();
-}
-
-function uploadSuccess(fileObj, serverData) {
- var item = jQuery('#media-item-' + fileObj.id);
-
- // on success serverData should be numeric, fix bug in html4 runtime returning the serverData wrapped in a <pre> tag
- serverData = serverData.replace(/^<pre>(\d+)<\/pre>$/, '$1');
-
- // if async-upload returned an error message, place it in the media item div and return
- if ( serverData.match(/media-upload-error|error-div/) ) {
- item.html(serverData);
- return;
- } else {
- jQuery('.percent', item).html( pluploadL10n.crunching );
- }
-
- prepareMediaItem(fileObj, serverData);
- updateMediaForm();
-
- // Increment the counter.
- if ( post_id && item.hasClass('child-of-' + post_id) )
- jQuery('#attachments-count').text(1 * jQuery('#attachments-count').text() + 1);
-}
-
-function setResize(arg) {
- if ( arg ) {
- if ( uploader.features.jpgresize )
- uploader.settings['resize'] = { width: resize_width, height: resize_height, quality: 100 };
- else
- uploader.settings.multipart_params.image_resize = true;
- } else {
- delete(uploader.settings.resize);
- delete(uploader.settings.multipart_params.image_resize);
- }
-}
-
-function prepareMediaItem(fileObj, serverData) {
- var f = ( typeof shortform == 'undefined' ) ? 1 : 2, item = jQuery('#media-item-' + fileObj.id);
- if ( f == 2 && shortform > 2 )
- f = shortform;
-
- try {
- if ( typeof topWin.tb_remove != 'undefined' )
- topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
- } catch(e){}
-
- if ( isNaN(serverData) || !serverData ) { // Old style: Append the HTML returned by the server -- thumbnail and form inputs
- item.append(serverData);
- prepareMediaItemInit(fileObj);
- } else { // New style: server data is just the attachment ID, fetch the thumbnail and form html from the server
- item.load('async-upload.php', {attachment_id:serverData, fetch:f}, function(){prepareMediaItemInit(fileObj);updateMediaForm()});
- }
-}
-
-function prepareMediaItemInit(fileObj) {
- var item = jQuery('#media-item-' + fileObj.id);
- // Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename
- jQuery('.thumbnail', item).clone().attr('class', 'pinkynail toggle').prependTo(item);
-
- // Replace the original filename with the new (unique) one assigned during upload
- jQuery('.filename.original', item).replaceWith( jQuery('.filename.new', item) );
-
- // Bind AJAX to the new Delete button
- jQuery('a.delete', item).click(function(){
- // Tell the server to delete it. TODO: handle exceptions
- jQuery.ajax({
- url: ajaxurl,
- type: 'post',
- success: deleteSuccess,
- error: deleteError,
- id: fileObj.id,
- data: {
- id : this.id.replace(/[^0-9]/g, ''),
- action : 'trash-post',
- _ajax_nonce : this.href.replace(/^.*wpnonce=/,'')
- }
- });
- return false;
- });
-
- // Bind AJAX to the new Undo button
- jQuery('a.undo', item).click(function(){
- // Tell the server to untrash it. TODO: handle exceptions
- jQuery.ajax({
- url: ajaxurl,
- type: 'post',
- id: fileObj.id,
- data: {
- id : this.id.replace(/[^0-9]/g,''),
- action: 'untrash-post',
- _ajax_nonce: this.href.replace(/^.*wpnonce=/,'')
- },
- success: function(data, textStatus){
- var item = jQuery('#media-item-' + fileObj.id);
-
- if ( type = jQuery('#type-of-' + fileObj.id).val() )
- jQuery('#' + type + '-counter').text(jQuery('#' + type + '-counter').text()-0+1);
-
- if ( post_id && item.hasClass('child-of-'+post_id) )
- jQuery('#attachments-count').text(jQuery('#attachments-count').text()-0+1);
-
- jQuery('.filename .trashnotice', item).remove();
- jQuery('.filename .title', item).css('font-weight','normal');
- jQuery('a.undo', item).addClass('hidden');
- jQuery('.menu_order_input', item).show();
- item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('undo');
- }
- });
- return false;
- });
-
- // Open this item if it says to start open (e.g. to display an error)
- jQuery('#media-item-' + fileObj.id + '.startopen').removeClass('startopen').addClass('open').find('slidetoggle').fadeIn();
-}
-
-// generic error message
-function wpQueueError(message) {
- jQuery('#media-upload-error').show().html( '<div class="error"><p>' + message + '</p></div>' );
-}
-
-// file-specific error messages
-function wpFileError(fileObj, message) {
- itemAjaxError(fileObj.id, message);
-}
-
-function itemAjaxError(id, message) {
- var item = jQuery('#media-item-' + id), filename = item.find('.filename').text(), last_err = item.data('last-err');
-
- if ( last_err == id ) // prevent firing an error for the same file twice
- return;
-
- item.html('<div class="error-div">'
- + '<a class="dismiss" href="#">' + pluploadL10n.dismiss + '</a>'
- + '<strong>' + pluploadL10n.error_uploading.replace('%s', jQuery.trim(filename)) + '</strong> '
- + message
- + '</div>').data('last-err', id);
-}
-
-function deleteSuccess(data, textStatus) {
- if ( data == '-1' )
- return itemAjaxError(this.id, 'You do not have permission. Has your session expired?');
-
- if ( data == '0' )
- return itemAjaxError(this.id, 'Could not be deleted. Has it been deleted already?');
-
- var id = this.id, item = jQuery('#media-item-' + id);
-
- // Decrement the counters.
- if ( type = jQuery('#type-of-' + id).val() )
- jQuery('#' + type + '-counter').text( jQuery('#' + type + '-counter').text() - 1 );
-
- if ( post_id && item.hasClass('child-of-'+post_id) )
- jQuery('#attachments-count').text( jQuery('#attachments-count').text() - 1 );
-
- if ( jQuery('form.type-form #media-items').children().length == 1 && jQuery('.hidden', '#media-items').length > 0 ) {
- jQuery('.toggle').toggle();
- jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
- }
-
- // Vanish it.
- jQuery('.toggle', item).toggle();
- jQuery('.slidetoggle', item).slideUp(200).siblings().removeClass('hidden');
- item.css( {backgroundColor:'#faa'} ).animate( {backgroundColor:'#f4f4f4'}, {queue:false, duration:500} ).addClass('undo');
-
- jQuery('.filename:empty', item).remove();
- jQuery('.filename .title', item).css('font-weight','bold');
- jQuery('.filename', item).append('<span class="trashnotice"> ' + pluploadL10n.deleted + ' </span>').siblings('a.toggle').hide();
- jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') );
- jQuery('.menu_order_input', item).hide();
-
- return;
-}
-
-function deleteError(X, textStatus, errorThrown) {
- // TODO
-}
-
-function uploadComplete() {
- jQuery('#insert-gallery').prop('disabled', false);
-}
-
-function switchUploader(s) {
- if ( s ) {
- deleteUserSetting('uploader');
- jQuery('.media-upload-form').removeClass('html-uploader');
-
- if ( typeof(uploader) == 'object' )
- uploader.refresh();
- } else {
- setUserSetting('uploader', '1'); // 1 == html uploader
- jQuery('.media-upload-form').addClass('html-uploader');
- }
-}
-
-function dndHelper(s) {
- var d = document.getElementById('dnd-helper');
-
- if ( s ) {
- d.style.display = 'block';
- } else {
- d.style.display = 'none';
- }
-}
-
-function uploadError(fileObj, errorCode, message, uploader) {
- var hundredmb = 100 * 1024 * 1024, max;
-
- switch (errorCode) {
- case plupload.FAILED:
- wpFileError(fileObj, pluploadL10n.upload_failed);
- break;
- case plupload.FILE_EXTENSION_ERROR:
- wpFileError(fileObj, pluploadL10n.invalid_filetype);
- break;
- case plupload.FILE_SIZE_ERROR:
- uploadSizeError(uploader, fileObj);
- break;
- case plupload.IMAGE_FORMAT_ERROR:
- wpFileError(fileObj, pluploadL10n.not_an_image);
- break;
- case plupload.IMAGE_MEMORY_ERROR:
- wpFileError(fileObj, pluploadL10n.image_memory_exceeded);
- break;
- case plupload.IMAGE_DIMENSIONS_ERROR:
- wpFileError(fileObj, pluploadL10n.image_dimensions_exceeded);
- break;
- case plupload.GENERIC_ERROR:
- wpQueueError(pluploadL10n.upload_failed);
- break;
- case plupload.IO_ERROR:
- max = parseInt(uploader.settings.max_file_size, 10);
-
- if ( max > hundredmb && fileObj.size > hundredmb )
- wpFileError(fileObj, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
- else
- wpQueueError(pluploadL10n.io_error);
- break;
- case plupload.HTTP_ERROR:
- wpQueueError(pluploadL10n.http_error);
- break;
- case plupload.INIT_ERROR:
- jQuery('.media-upload-form').addClass('html-uploader');
- break;
- case plupload.SECURITY_ERROR:
- wpQueueError(pluploadL10n.security_error);
- break;
-/* case plupload.UPLOAD_ERROR.UPLOAD_STOPPED:
- case plupload.UPLOAD_ERROR.FILE_CANCELLED:
- jQuery('#media-item-' + fileObj.id).remove();
- break;*/
- default:
- wpFileError(fileObj, pluploadL10n.default_error);
- }
-}
-
-function uploadSizeError( up, file, over100mb ) {
- var message;
-
- if ( over100mb )
- message = pluploadL10n.big_upload_queued.replace('%s', file.name) + ' ' + pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>');
- else
- message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
-
- jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>');
- up.removeFile(file);
-}
-
-jQuery(document).ready(function($){
- $('.media-upload-form').bind('click.uploader', function(e) {
- var target = $(e.target), tr, c;
-
- if ( target.is('input[type="radio"]') ) { // remember the last used image size and alignment
- tr = target.closest('tr');
-
- if ( tr.hasClass('align') )
- setUserSetting('align', target.val());
- else if ( tr.hasClass('image-size') )
- setUserSetting('imgsize', target.val());
-
- } else if ( target.is('button.button') ) { // remember the last used image link url
- c = e.target.className || '';
- c = c.match(/url([^ '"]+)/);
-
- if ( c && c[1] ) {
- setUserSetting('urlbutton', c[1]);
- target.siblings('.urlfield').val( target.data('link-url') );
- }
- } else if ( target.is('a.dismiss') ) {
- target.parents('.media-item').fadeOut(200, function(){
- $(this).remove();
- });
- } else if ( target.is('.upload-flash-bypass a') || target.is('a.uploader-html') ) { // switch uploader to html4
- $('#media-items, p.submit, span.big-file-warning').css('display', 'none');
- switchUploader(0);
- e.preventDefault();
- } else if ( target.is('.upload-html-bypass a') ) { // switch uploader to multi-file
- $('#media-items, p.submit, span.big-file-warning').css('display', '');
- switchUploader(1);
- e.preventDefault();
- } else if ( target.is('a.describe-toggle-on') ) { // Show
- target.parent().addClass('open');
- target.siblings('.slidetoggle').fadeIn(250, function(){
- var S = $(window).scrollTop(), H = $(window).height(), top = $(this).offset().top, h = $(this).height(), b, B;
-
- if ( H && top && h ) {
- b = top + h;
- B = S + H;
-
- if ( b > B ) {
- if ( b - B < top - S )
- window.scrollBy(0, (b - B) + 10);
- else
- window.scrollBy(0, top - S - 40);
- }
- }
- });
- e.preventDefault();
- } else if ( target.is('a.describe-toggle-off') ) { // Hide
- target.siblings('.slidetoggle').fadeOut(250, function(){
- target.parent().removeClass('open');
- });
- e.preventDefault();
- }
- });
-
- // init and set the uploader
- uploader_init = function() {
- uploader = new plupload.Uploader(wpUploaderInit);
-
- $('#image_resize').bind('change', function() {
- var arg = $(this).prop('checked');
-
- setResize( arg );
-
- if ( arg )
- setUserSetting('upload_resize', '1');
- else
- deleteUserSetting('upload_resize');
- });
-
- uploader.bind('Init', function(up) {
- var uploaddiv = $('#plupload-upload-ui');
-
- setResize( getUserSetting('upload_resize', false) );
-
- if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
- uploaddiv.addClass('drag-drop');
- $('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
- uploaddiv.addClass('drag-over');
- }).bind('dragleave.wp-uploader, drop.wp-uploader', function(){
- uploaddiv.removeClass('drag-over');
- });
- } else {
- uploaddiv.removeClass('drag-drop');
- $('#drag-drop-area').unbind('.wp-uploader');
- }
-
- if ( up.runtime == 'html4' )
- $('.upload-flash-bypass').hide();
- });
-
- uploader.init();
-
- uploader.bind('FilesAdded', function(up, files) {
- var hundredmb = 100 * 1024 * 1024, max = parseInt(up.settings.max_file_size, 10);
-
- $('#media-upload-error').html('');
- uploadStart();
-
- plupload.each(files, function(file){
- if ( max > hundredmb && file.size > hundredmb && up.runtime != 'html5' )
- uploadSizeError( up, file, true );
- else
- fileQueued(file);
- });
-
- up.refresh();
- up.start();
- });
-
- uploader.bind('BeforeUpload', function(up, file) {
- // something
- });
-
- uploader.bind('UploadFile', function(up, file) {
- fileUploading(up, file);
- });
-
- uploader.bind('UploadProgress', function(up, file) {
- uploadProgress(up, file);
- });
-
- uploader.bind('Error', function(up, err) {
- uploadError(err.file, err.code, err.message, up);
- up.refresh();
- });
-
- uploader.bind('FileUploaded', function(up, file, response) {
- uploadSuccess(file, response.response);
- });
-
- uploader.bind('UploadComplete', function(up, files) {
- uploadComplete();
- });
- }
-
- if ( typeof(wpUploaderInit) == 'object' )
- uploader_init();
-
-});
diff --git a/wp-includes/js/plupload/handlers.min.js b/wp-includes/js/plupload/handlers.min.js
deleted file mode 100644
index d099ba8668..0000000000
--- a/wp-includes/js/plupload/handlers.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var topWin=window.dialogArguments||opener||parent||top,uploader,uploader_init;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(b){jQuery(".media-blank").remove();var a=jQuery("#media-items").children(),c=post_id||0;if(a.length==1){a.removeClass("open").find(".slidetoggle").slideUp(200)}jQuery('<div class="media-item">').attr("id","media-item-"+b.id).addClass("child-of-"+c).append('<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>',jQuery('<div class="filename original">').text(" "+b.name)).appendTo(jQuery("#media-items"));jQuery("#insert-gallery").prop("disabled",true)}function uploadStart(){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(a){}return true}function uploadProgress(a,b){var c=jQuery("#media-item-"+b.id);jQuery(".bar",c).width((200*b.loaded)/b.size);jQuery(".percent",c).html(b.percent+"%")}function fileUploading(c,d){var b=100*1024*1024,a=parseInt(c.settings.max_file_size,10);if(a>b&&d.size>b){setTimeout(function(){var e;if(d.status<3&&d.loaded==0){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"));c.stop();c.removeFile(d);c.start()}},10000)}}function updateMediaForm(){var a=jQuery("#media-items").children();if(a.length==1){a.addClass("open").find(".slidetoggle").show();jQuery(".insert-gallery").hide()}else{if(a.length>1){a.removeClass("open");jQuery(".insert-gallery").show()}}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}}function uploadSuccess(c,a){var b=jQuery("#media-item-"+c.id);a=a.replace(/^<pre>(\d+)<\/pre>$/,"$1");if(a.match(/media-upload-error|error-div/)){b.html(a);return}else{jQuery(".percent",b).html(pluploadL10n.crunching)}prepareMediaItem(c,a);updateMediaForm();if(post_id&&b.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function setResize(a){if(a){if(uploader.features.jpgresize){uploader.settings.resize={width:resize_width,height:resize_height,quality:100}}else{uploader.settings.multipart_params.image_resize=true}}else{delete (uploader.settings.resize);delete (uploader.settings.multipart_params.image_resize)}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);if(d==2&&shortform>2){d=shortform}try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.delete",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(post_id&&c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery(".menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(a){jQuery("#media-upload-error").show().html('<div class="error"><p>'+a+"</p></div>")}function wpFileError(b,a){itemAjaxError(b.id,a)}function itemAjaxError(e,c){var b=jQuery("#media-item-"+e),a=b.find(".filename").text(),d=b.data("last-err");if(d==e){return}b.html('<div class="error-div"><a class="dismiss" href="#">'+pluploadL10n.dismiss+"</a><strong>"+pluploadL10n.error_uploading.replace("%s",jQuery.trim(a))+"</strong> "+c+"</div>").data("last-err",e)}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(post_id&&a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+pluploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",false)}function switchUploader(a){if(a){deleteUserSetting("uploader");jQuery(".media-upload-form").removeClass("html-uploader");if(typeof(uploader)=="object"){uploader.refresh()}}else{setUserSetting("uploader","1");jQuery(".media-upload-form").addClass("html-uploader")}}function dndHelper(a){var b=document.getElementById("dnd-helper");if(a){b.style.display="block"}else{b.style.display="none"}}function uploadError(d,f,c,e){var b=100*1024*1024,a;switch(f){case plupload.FAILED:wpFileError(d,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileError(d,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(e,d);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(d,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(d,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(d,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:a=parseInt(e.settings.max_file_size,10);if(a>b&&d.size>b){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"))}else{wpQueueError(pluploadL10n.io_error)}break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(d,pluploadL10n.default_error)}}function uploadSizeError(a,b,d){var c;if(d){c=pluploadL10n.big_upload_queued.replace("%s",b.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")}else{c=pluploadL10n.file_exceeds_size_limit.replace("%s",b.name)}jQuery("#media-items").append('<div id="media-item-'+b.id+'" class="media-item error"><p>'+c+"</p></div>");a.removeFile(b)}jQuery(document).ready(function(a){a(".media-upload-form").bind("click.uploader",function(f){var d=a(f.target),b,g;if(d.is('input[type="radio"]')){b=d.closest("tr");if(b.hasClass("align")){setUserSetting("align",d.val())}else{if(b.hasClass("image-size")){setUserSetting("imgsize",d.val())}}}else{if(d.is("button.button")){g=f.target.className||"";g=g.match(/url([^ '"]+)/);if(g&&g[1]){setUserSetting("urlbutton",g[1]);d.siblings(".urlfield").val(d.data("link-url"))}}else{if(d.is("a.dismiss")){d.parents(".media-item").fadeOut(200,function(){a(this).remove()})}else{if(d.is(".upload-flash-bypass a")||d.is("a.uploader-html")){a("#media-items, p.submit, span.big-file-warning").css("display","none");switchUploader(0);f.preventDefault()}else{if(d.is(".upload-html-bypass a")){a("#media-items, p.submit, span.big-file-warning").css("display","");switchUploader(1);f.preventDefault()}else{if(d.is("a.describe-toggle-on")){d.parent().addClass("open");d.siblings(".slidetoggle").fadeIn(250,function(){var i=a(window).scrollTop(),e=a(window).height(),k=a(this).offset().top,j=a(this).height(),c,l;if(e&&k&&j){c=k+j;l=i+e;if(c>l){if(c-l<k-i){window.scrollBy(0,(c-l)+10)}else{window.scrollBy(0,k-i-40)}}}});f.preventDefault()}else{if(d.is("a.describe-toggle-off")){d.siblings(".slidetoggle").fadeOut(250,function(){d.parent().removeClass("open")});f.preventDefault()}}}}}}}});uploader_init=function(){uploader=new plupload.Uploader(wpUploaderInit);a("#image_resize").bind("change",function(){var b=a(this).prop("checked");setResize(b);if(b){setUserSetting("upload_resize","1")}else{deleteUserSetting("upload_resize")}});uploader.bind("Init",function(b){var c=a("#plupload-upload-ui");setResize(getUserSetting("upload_resize",false));if(b.features.dragdrop&&!a(document.body).hasClass("mobile")){c.addClass("drag-drop");a("#drag-drop-area").bind("dragover.wp-uploader",function(){c.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){c.removeClass("drag-over")})}else{c.removeClass("drag-drop");a("#drag-drop-area").unbind(".wp-uploader")}if(b.runtime=="html4"){a(".upload-flash-bypass").hide()}});uploader.init();uploader.bind("FilesAdded",function(d,e){var c=100*1024*1024,b=parseInt(d.settings.max_file_size,10);a("#media-upload-error").html("");uploadStart();plupload.each(e,function(f){if(b>c&&f.size>c&&d.runtime!="html5"){uploadSizeError(d,f,true)}else{fileQueued(f)}});d.refresh();d.start()});uploader.bind("BeforeUpload",function(b,c){});uploader.bind("UploadFile",function(b,c){fileUploading(b,c)});uploader.bind("UploadProgress",function(b,c){uploadProgress(b,c)});uploader.bind("Error",function(b,c){uploadError(c.file,c.code,c.message,b);b.refresh()});uploader.bind("FileUploaded",function(b,d,c){uploadSuccess(d,c.response)});uploader.bind("UploadComplete",function(b,c){uploadComplete()})};if(typeof(wpUploaderInit)=="object"){uploader_init()}}); \ No newline at end of file
diff --git a/wp-includes/js/plupload/license.txt b/wp-includes/js/plupload/license.txt
deleted file mode 100644
index d511905c16..0000000000
--- a/wp-includes/js/plupload/license.txt
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/wp-includes/js/plupload/plupload.flash.js b/wp-includes/js/plupload/plupload.flash.js
deleted file mode 100644
index 7d3f0087c8..0000000000
--- a/wp-includes/js/plupload/plupload.flash.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(j){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(i){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(j,h,i){setTimeout(function(){var m=a[j],l,k;if(m){m.trigger("Flash:"+h,i)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(m,o){var k,l,h=0,i=b.body;if(c()<10){o({success:false});return}g[m.id]=false;a[m.id]=m;k=b.getElementById(m.settings.browse_button);l=b.createElement("div");l.id=m.id+"_flash_container";d.extend(l.style,{position:"absolute",top:"0px",background:m.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});l.className="plupload flash";if(m.settings.container){i=b.getElementById(m.settings.container);if(d.getStyle(i,"position")==="static"){i.style.position="relative"}}i.appendChild(l);(function(){var p,q;p='<object id="'+m.id+'_flash" type="application/x-shockwave-flash" data="'+m.settings.flash_swf_url+'" ';if(d.ua.ie){p+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '}p+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+m.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(m.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';if(d.ua.ie){q=b.createElement("div");l.appendChild(q);q.outerHTML=p;q=null}else{l.innerHTML=p}}());function n(){return b.getElementById(m.id+"_flash")}function j(){if(h++>5000){o({success:false});return}if(g[m.id]===false){setTimeout(j,1)}}j();k=l=null;m.bind("Destroy",function(p){var q;d.removeAllEvents(b.body,p.id);delete g[p.id];delete a[p.id];q=b.getElementById(p.id+"_flash_container");if(q){q.parentNode.removeChild(q)}});m.bind("Flash:Init",function(){var r={},q;try{n().setFileFilters(m.settings.filters,m.settings.multi_selection)}catch(p){o({success:false});return}if(g[m.id]){return}g[m.id]=true;m.bind("UploadFile",function(s,u){var v=s.settings,t=m.settings.resize||{};n().uploadFile(r[u.id],v.url,{name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,width:t.width,height:t.height,quality:t.quality,multipart:v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,format:/\.(jpg|jpeg)$/i.test(u.name)?"jpg":"png",headers:v.headers,urlstream_upload:v.urlstream_upload})});m.bind("CancelUpload",function(){n().cancelUpload()});m.bind("Flash:UploadProcess",function(t,s){var u=t.getFile(r[s.id]);if(u.status!=d.FAILED){u.loaded=s.loaded;u.size=s.size;t.trigger("UploadProgress",u)}});m.bind("Flash:UploadChunkComplete",function(s,u){var v,t=s.getFile(r[u.id]);v={chunk:u.chunk,chunks:u.chunks,response:u.text};s.trigger("ChunkUploaded",t,v);if(t.status!==d.FAILED&&s.state!==d.STOPPED){n().uploadNextChunk()}if(u.chunk==u.chunks-1){t.status=d.DONE;s.trigger("FileUploaded",t,{response:u.text})}});m.bind("Flash:SelectFiles",function(s,v){var u,t,w=[],x;for(t=0;t<v.length;t++){u=v[t];x=d.guid();r[x]=u.id;r[u.id]=x;w.push(new d.File(x,u.name,u.size))}if(w.length){m.trigger("FilesAdded",w)}});m.bind("Flash:SecurityError",function(s,t){m.trigger("Error",{code:d.SECURITY_ERROR,message:d.translate("Security error."),details:t.message,file:m.getFile(r[t.id])})});m.bind("Flash:GenericError",function(s,t){m.trigger("Error",{code:d.GENERIC_ERROR,message:d.translate("Generic error."),details:t.message,file:m.getFile(r[t.id])})});m.bind("Flash:IOError",function(s,t){m.trigger("Error",{code:d.IO_ERROR,message:d.translate("IO error."),details:t.message,file:m.getFile(r[t.id])})});m.bind("Flash:ImageError",function(s,t){m.trigger("Error",{code:parseInt(t.code,10),message:d.translate("Image error."),file:m.getFile(r[t.id])})});m.bind("Flash:StageEvent:rollOver",function(s){var t,u;t=b.getElementById(m.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.addClass(t,u)}});m.bind("Flash:StageEvent:rollOut",function(s){var t,u;t=b.getElementById(m.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.removeClass(t,u)}});m.bind("Flash:StageEvent:mouseDown",function(s){var t,u;t=b.getElementById(m.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.addClass(t,u);d.addEvent(b.body,"mouseup",function(){d.removeClass(t,u)},s.id)}});m.bind("Flash:StageEvent:mouseUp",function(s){var t,u;t=b.getElementById(m.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.removeClass(t,u)}});m.bind("Flash:ExifData",function(s,t){m.trigger("ExifData",m.getFile(r[t.id]),t.data)});m.bind("Flash:GpsData",function(s,t){m.trigger("GpsData",m.getFile(r[t.id]),t.data)});m.bind("QueueChanged",function(s){m.refresh()});m.bind("FilesRemoved",function(s,u){var t;for(t=0;t<u.length;t++){n().removeFile(r[u[t].id])}});m.bind("StateChanged",function(s){m.refresh()});m.bind("Refresh",function(s){var t,u,v;n().setFileFilters(m.settings.filters,m.settings.multi_selection);t=b.getElementById(s.settings.browse_button);if(t){u=d.getPos(t,b.getElementById(s.settings.container));v=d.getSize(t);d.extend(b.getElementById(s.id+"_flash_container").style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"})}});m.bind("DisableBrowse",function(s,t){n().disableBrowse(t)});o({success:true})})}})})(window,document,plupload); \ No newline at end of file
diff --git a/wp-includes/js/plupload/plupload.flash.swf b/wp-includes/js/plupload/plupload.flash.swf
deleted file mode 100644
index 416b08fed1..0000000000
--- a/wp-includes/js/plupload/plupload.flash.swf
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/plupload/plupload.html4.js b/wp-includes/js/plupload/plupload.html4.js
deleted file mode 100644
index 0a8f4033e3..0000000000
--- a/wp-includes/js/plupload/plupload.html4.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){if(!y.disabled){y.click()}C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.documentElement.innerText||B.documentElement.textContent;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit()});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}else{if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(i.files,function(A,y){if(A.status===b.DONE||A.status===b.FAILED){var B=e("form_"+A.id);if(B){B.parentNode.removeChild(B)}}})});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(i,A){var y=a.getElementById("input_"+q);if(y){y.disabled=A}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){B.parentNode.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload); \ No newline at end of file
diff --git a/wp-includes/js/plupload/plupload.html5.js b/wp-includes/js/plupload/plupload.html5.js
deleted file mode 100644
index a4b2a1fc0a..0000000000
--- a/wp-includes/js/plupload/plupload.html5.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(k,m,l,g){var d={},j;function c(s){var r=s.naturalWidth,u=s.naturalHeight;if(r*u>1024*1024){var t=m.createElement("canvas");t.width=t.height=1;var q=t.getContext("2d");q.drawImage(s,-r+1,0);return q.getImageData(0,0,1,1).data[3]===0}else{return false}}function f(u,r,z){var q=m.createElement("canvas");q.width=1;q.height=z;var A=q.getContext("2d");A.drawImage(u,0,0);var t=A.getImageData(0,0,1,z).data;var x=0;var v=z;var y=z;while(y>x){var s=t[(y-1)*4+3];if(s===0){v=y}else{x=y}y=(v+x)>>1}var w=(y/z);return(w===0)?1:w}function o(K,s,t){var v=K.naturalWidth,z=K.naturalHeight;var E=t.width,B=t.height;var F=s.getContext("2d");F.save();var r=c(K);if(r){v/=2;z/=2}var I=1024;var q=m.createElement("canvas");q.width=q.height=I;var u=q.getContext("2d");var G=f(K,v,z);var A=0;while(A<z){var J=A+I>z?z-A:I;var C=0;while(C<v){var D=C+I>v?v-C:I;u.clearRect(0,0,I,I);u.drawImage(K,-C,-A);var x=(C*E/v)<<0;var y=Math.ceil(D*E/v);var w=(A*B/z/G)<<0;var H=Math.ceil(J*B/z/G);F.drawImage(q,0,0,D,J,x,w,y,H);C+=I}A+=I}F.restore();q=u=null}function p(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsDataURL(r);q.onload=function(){s(q.result)}}else{return s(r.getAsDataURL())}}function n(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsBinaryString(r);q.onload=function(){s(q.result)}}else{return s(r.getAsBinary())}}function e(u,s,q,y){var t,r,x,v,w=this;p(d[u.id],function(z){t=m.createElement("canvas");t.style.display="none";m.body.appendChild(t);x=new Image();x.onerror=x.onabort=function(){y({success:false})};x.onload=function(){var F,A,C,B,E;if(!s.width){s.width=x.width}if(!s.height){s.height=x.height}v=Math.min(s.width/x.width,s.height/x.height);if(v<1){F=Math.round(x.width*v);A=Math.round(x.height*v)}else{if(s.quality&&q==="image/jpeg"){F=x.width;A=x.height}else{y({success:false});return}}t.width=F;t.height=A;o(x,t,{width:F,height:A});if(q==="image/jpeg"){B=new h(atob(z.substring(z.indexOf("base64,")+7)));if(B.headers&&B.headers.length){E=new a();if(E.init(B.get("exif")[0])){E.setExif("PixelXDimension",F);E.setExif("PixelYDimension",A);B.set("exif",E.getBinary());if(w.hasEventListener("ExifData")){w.trigger("ExifData",u,E.EXIF())}if(w.hasEventListener("GpsData")){w.trigger("GpsData",u,E.GPS())}}}}if(s.quality&&q==="image/jpeg"){try{z=t.toDataURL(q,s.quality/100)}catch(D){z=t.toDataURL(q)}}else{z=t.toDataURL(q)}z=z.substring(z.indexOf("base64,")+7);z=atob(z);if(B&&B.headers&&B.headers.length){z=B.restore(z);B.purge()}t.parentNode.removeChild(t);y({success:true,data:z})};x.src=z})}l.runtimes.Html5=l.addRuntime("html5",{getFeatures:function(){var v,r,u,t,s,q;r=u=s=q=false;if(k.XMLHttpRequest){v=new XMLHttpRequest();u=!!v.upload;r=!!(v.sendAsBinary||v.upload)}if(r){t=!!(v.sendAsBinary||(k.Uint8Array&&k.ArrayBuffer));s=!!(File&&(File.prototype.getAsDataURL||k.FileReader)&&t);q=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}j=l.ua.safari&&l.ua.windows;return{html5:r,dragdrop:(function(){var w=m.createElement("div");return("draggable" in w)||("ondragstart" in w&&"ondrop" in w)}()),jpgresize:s,pngresize:s,multipart:s||!!k.FileReader||!!k.FormData,canSendBinary:t,cantSendBlobInFormData:!!(l.ua.gecko&&k.FormData&&k.FileReader&&!FileReader.prototype.readAsArrayBuffer)||l.ua.android,progress:u,chunks:q,multi_selection:!(l.ua.safari&&l.ua.windows),triggerDialog:(l.ua.gecko&&k.FormData||l.ua.webkit)}},init:function(s,u){var q,t;function r(z){var x,w,y=[],A,v={};for(w=0;w<z.length;w++){x=z[w];if(v[x.name]&&l.ua.safari&&l.ua.windows){continue}v[x.name]=true;A=l.guid();d[A]=x;y.push(new l.File(A,x.fileName||x.name,x.fileSize||x.size))}if(y.length){s.trigger("FilesAdded",y)}}q=this.getFeatures();if(!q.html5){u({success:false});return}s.bind("Init",function(A){var J,I,F=[],z,G,w=A.settings.filters,x,E,v=m.body,H;J=m.createElement("div");J.id=A.id+"_html5_container";l.extend(J.style,{position:"absolute",background:s.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:s.settings.shim_bgcolor?"":0});J.className="plupload html5";if(s.settings.container){v=m.getElementById(s.settings.container);if(l.getStyle(v,"position")==="static"){v.style.position="relative"}}v.appendChild(J);no_type_restriction:for(z=0;z<w.length;z++){x=w[z].extensions.split(/,/);for(G=0;G<x.length;G++){if(x[G]==="*"){F=[];break no_type_restriction}E=l.mimeTypes[x[G]];if(E&&l.inArray(E,F)===-1){F.push(E)}}}J.innerHTML='<input id="'+s.id+'_html5" style="font-size:999px" type="file" accept="'+F.join(",")+'" '+(s.settings.multi_selection&&s.features.multi_selection?'multiple="multiple"':"")+" />";J.scrollTop=100;H=m.getElementById(s.id+"_html5");if(A.features.triggerDialog){l.extend(H.style,{position:"absolute",width:"100%",height:"100%"})}else{l.extend(H.style,{cssFloat:"right",styleFloat:"right"})}H.onchange=function(){r(this.files);this.value=""};I=m.getElementById(A.settings.browse_button);if(I){var C=A.settings.browse_button_hover,D=A.settings.browse_button_active,B=A.features.triggerDialog?I:J;if(C){l.addEvent(B,"mouseover",function(){l.addClass(I,C)},A.id);l.addEvent(B,"mouseout",function(){l.removeClass(I,C)},A.id)}if(D){l.addEvent(B,"mousedown",function(){l.addClass(I,D)},A.id);l.addEvent(m.body,"mouseup",function(){l.removeClass(I,D)},A.id)}if(A.features.triggerDialog){l.addEvent(I,"click",function(K){var y=m.getElementById(A.id+"_html5");if(y&&!y.disabled){y.click()}K.preventDefault()},A.id)}}});s.bind("PostInit",function(){var v=m.getElementById(s.settings.drop_element);if(v){if(j){l.addEvent(v,"dragenter",function(z){var y,w,x;y=m.getElementById(s.id+"_drop");if(!y){y=m.createElement("input");y.setAttribute("type","file");y.setAttribute("id",s.id+"_drop");y.setAttribute("multiple","multiple");l.addEvent(y,"change",function(){r(this.files);l.removeEvent(y,"change",s.id);y.parentNode.removeChild(y)},s.id);l.addEvent(y,"dragover",function(A){A.stopPropagation()},s.id);v.appendChild(y)}w=l.getPos(v,m.getElementById(s.settings.container));x=l.getSize(v);if(l.getStyle(v,"position")==="static"){l.extend(v.style,{position:"relative"})}l.extend(y.style,{position:"absolute",display:"block",top:0,left:0,width:x.w+"px",height:x.h+"px",opacity:0})},s.id);return}l.addEvent(v,"dragover",function(w){w.preventDefault()},s.id);l.addEvent(v,"drop",function(x){var w=x.dataTransfer;if(w&&w.files){r(w.files)}x.preventDefault()},s.id)}});s.bind("Refresh",function(v){var w,x,y,A,z;w=m.getElementById(s.settings.browse_button);if(w){x=l.getPos(w,m.getElementById(v.settings.container));y=l.getSize(w);A=m.getElementById(s.id+"_html5_container");l.extend(A.style,{top:x.y+"px",left:x.x+"px",width:y.w+"px",height:y.h+"px"});if(s.features.triggerDialog){if(l.getStyle(w,"position")==="static"){l.extend(w.style,{position:"relative"})}z=parseInt(l.getStyle(w,"zIndex"),10);if(isNaN(z)){z=0}l.extend(w.style,{zIndex:z});l.extend(A.style,{zIndex:z-1})}}});s.bind("DisableBrowse",function(v,x){var w=m.getElementById(v.id+"_html5");if(w){w.disabled=x}});s.bind("CancelUpload",function(){if(t&&t.abort){t.abort()}});s.bind("UploadFile",function(v,x){var y=v.settings,B,w;function A(D,G,C){var E;if(File.prototype.slice){try{D.slice();return D.slice(G,C)}catch(F){return D.slice(G,C-G)}}else{if(E=File.prototype.webkitSlice||File.prototype.mozSlice){return E.call(D,G,C)}else{return null}}}function z(C){var F=0,E=0;function D(){var L,P,N,O,K,M,H,G=v.settings.url;function J(S){if(t.sendAsBinary){t.sendAsBinary(S)}else{if(v.features.canSendBinary){var Q=new Uint8Array(S.length);for(var R=0;R<S.length;R++){Q[R]=(S.charCodeAt(R)&255)}t.send(Q.buffer)}}}function I(R){var V=0,W="----pluploadboundary"+l.guid(),T,S="--",U="\r\n",Q="";t=new XMLHttpRequest;if(t.upload){t.upload.onprogress=function(X){x.loaded=Math.min(x.size,E+X.loaded-V);v.trigger("UploadProgress",x)}}t.onreadystatechange=function(){var X,Z;if(t.readyState==4&&v.state!==l.STOPPED){try{X=t.status}catch(Y){X=0}if(X>=400){v.trigger("Error",{code:l.HTTP_ERROR,message:l.translate("HTTP Error."),file:x,status:X})}else{if(N){Z={chunk:F,chunks:N,response:t.responseText,status:X};v.trigger("ChunkUploaded",x,Z);E+=M;if(Z.cancelled){x.status=l.FAILED;return}x.loaded=Math.min(x.size,(F+1)*K)}else{x.loaded=x.size}v.trigger("UploadProgress",x);R=L=T=Q=null;if(!N||++F>=N){x.status=l.DONE;v.trigger("FileUploaded",x,{response:t.responseText,status:X})}else{D()}}}};if(v.settings.multipart&&q.multipart){O.name=x.target_name||x.name;t.open("post",G,true);l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)!=="string"&&!!k.FormData){T=new FormData();l.each(l.extend(O,v.settings.multipart_params),function(Y,X){T.append(X,Y)});T.append(v.settings.file_data_name,R);t.send(T);return}if(typeof(R)==="string"){t.setRequestHeader("Content-Type","multipart/form-data; boundary="+W);l.each(l.extend(O,v.settings.multipart_params),function(Y,X){Q+=S+W+U+'Content-Disposition: form-data; name="'+X+'"'+U+U;Q+=unescape(encodeURIComponent(Y))+U});H=l.mimeTypes[x.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";Q+=S+W+U+'Content-Disposition: form-data; name="'+v.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(x.name))+'"'+U+"Content-Type: "+H+U+U+R+U+S+W+S+U;V=Q.length-R.length;R=Q;J(R);return}}G=l.buildUrl(v.settings.url,l.extend(O,v.settings.multipart_params));t.open("post",G,true);t.setRequestHeader("Content-Type","application/octet-stream");l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)==="string"){J(R)}else{t.send(R)}}if(x.status==l.DONE||x.status==l.FAILED||v.state==l.STOPPED){return}O={name:x.target_name||x.name};if(y.chunk_size&&x.size>y.chunk_size&&(q.chunks||typeof(C)=="string")){K=y.chunk_size;N=Math.ceil(x.size/K);M=Math.min(K,x.size-(F*K));if(typeof(C)=="string"){L=C.substring(F*K,F*K+M)}else{L=A(C,F*K,F*K+M)}O.chunk=F;O.chunks=N}else{M=x.size;L=C}if(v.settings.multipart&&q.multipart&&typeof(L)!=="string"&&k.FileReader&&q.cantSendBlobInFormData&&q.chunks&&v.settings.chunk_size){(function(){var Q=new FileReader();Q.onload=function(){I(Q.result);Q=null};Q.readAsBinaryString(L)}())}else{I(L)}}D()}B=d[x.id];if(q.jpgresize&&v.settings.resize&&/\.(png|jpg|jpeg)$/i.test(x.name)){e.call(v,x,v.settings.resize,/\.png$/i.test(x.name)?"image/png":"image/jpeg",function(C){if(C.success){x.size=C.data.length;z(C.data)}else{if(q.chunks){z(B)}else{n(B,z)}}})}else{if(!q.chunks&&q.jpgresize){n(B,z)}else{z(B)}}});s.bind("Destroy",function(v){var x,y,w=m.body,z={inputContainer:v.id+"_html5_container",inputFile:v.id+"_html5",browseButton:v.settings.browse_button,dropElm:v.settings.drop_element};for(x in z){y=m.getElementById(z[x]);if(y){l.removeAllEvents(y,v.id)}}l.removeAllEvents(m.body,v.id);if(v.settings.container){w=m.getElementById(v.settings.container)}w.removeChild(m.getElementById(z.inputContainer))});u({success:true})}});function b(){var t=false,r;function u(w,y){var v=t?0:-8*(y-1),z=0,x;for(x=0;x<y;x++){z|=(r.charCodeAt(w+x)<<Math.abs(v+x*8))}return z}function q(x,v,w){var w=arguments.length===3?w:r.length-v-1;r=r.substr(0,v)+x+r.substr(w+v)}function s(w,x,z){var A="",v=t?0:-8*(z-1),y;for(y=0;y<z;y++){A+=String.fromCharCode((x>>Math.abs(v+y*8))&255)}q(A,w,z)}return{II:function(v){if(v===g){return t}else{t=v}},init:function(v){t=false;r=v},SEGMENT:function(v,x,w){switch(arguments.length){case 1:return r.substr(v,r.length-v-1);case 2:return r.substr(v,x);case 3:q(w,v,x);break;default:return r}},BYTE:function(v){return u(v,1)},SHORT:function(v){return u(v,2)},LONG:function(v,w){if(w===g){return u(v,4)}else{s(v,w,4)}},SLONG:function(v){var w=u(v,4);return(w>2147483647?w-4294967296:w)},STRING:function(v,w){var x="";for(w+=v;v<w;v++){x+=String.fromCharCode(u(v,1))}return x}}}function h(v){var x={65505:{app:"EXIF",name:"APP1",signature:"Exif\0"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\0"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop 3.0\0"}},w=[],u,q,s=g,t=0,r;u=new b();u.init(v);if(u.SHORT(0)!==65496){return}q=2;r=Math.min(1048576,v.length);while(q<=r){s=u.SHORT(q);if(s>=65488&&s<=65495){q+=2;continue}if(s===65498||s===65497){break}t=u.SHORT(q+2)+2;if(x[s]&&u.STRING(q+4,x[s].signature.length)===x[s].signature){w.push({hex:s,app:x[s].app.toUpperCase(),name:x[s].name.toUpperCase(),start:q,length:t,segment:u.SEGMENT(q,t)})}q+=t}u.init(null);return{headers:w,restore:function(B){u.init(B);var z=new h(B);if(!z.headers){return false}for(var A=z.headers.length;A>0;A--){var C=z.headers[A-1];u.SEGMENT(C.start,C.length,"")}z.purge();q=u.SHORT(2)==65504?4+u.SHORT(4):2;for(var A=0,y=w.length;A<y;A++){u.SEGMENT(q,0,w[A].segment);q+=w[A].length}return u.SEGMENT()},get:function(A){var B=[];for(var z=0,y=w.length;z<y;z++){if(w[z].app===A.toUpperCase()){B.push(w[z].segment)}}return B},set:function(B,A){var C=[];if(typeof(A)==="string"){C.push(A)}else{C=A}for(var z=ii=0,y=w.length;z<y;z++){if(w[z].app===B.toUpperCase()){w[z].segment=C[ii];w[z].length=C[ii].length;ii++}if(ii>=C.length){break}}},purge:function(){w=[];u.init(null)}}}function a(){var t,q,r={},w;t=new b();q={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};w={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function s(x,F){var z=t.SHORT(x),C,I,J,E,D,y,A,G,H=[],B={};for(C=0;C<z;C++){A=y=x+12*C+2;J=F[t.SHORT(A)];if(J===g){continue}E=t.SHORT(A+=2);D=t.LONG(A+=2);A+=4;H=[];switch(E){case 1:case 7:if(D>4){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.BYTE(A+I)}break;case 2:if(D>4){A=t.LONG(A)+r.tiffHeader}B[J]=t.STRING(A,D-1);continue;case 3:if(D>2){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.SHORT(A+I*2)}break;case 4:if(D>1){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)}break;case 5:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)/t.LONG(A+I*4+4)}break;case 9:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)}break;case 10:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)/t.SLONG(A+I*4+4)}break;default:continue}G=(D==1?H[0]:H);if(w.hasOwnProperty(J)&&typeof G!="object"){B[J]=w[J][G]}else{B[J]=G}}return B}function v(){var y=g,x=r.tiffHeader;t.II(t.SHORT(x)==18761);if(t.SHORT(x+=2)!==42){return false}r.IFD0=r.tiffHeader+t.LONG(x+=2);y=s(r.IFD0,q.tiff);r.exifIFD=("ExifIFDPointer" in y?r.tiffHeader+y.ExifIFDPointer:g);r.gpsIFD=("GPSInfoIFDPointer" in y?r.tiffHeader+y.GPSInfoIFDPointer:g);return true}function u(z,x,C){var E,B,A,D=0;if(typeof(x)==="string"){var y=q[z.toLowerCase()];for(hex in y){if(y[hex]===x){x=hex;break}}}E=r[z.toLowerCase()+"IFD"];B=t.SHORT(E);for(i=0;i<B;i++){A=E+12*i+2;if(t.SHORT(A)==x){D=A+8;break}}if(!D){return false}t.LONG(D,C);return true}return{init:function(x){r={tiffHeader:10};if(x===g||!x.length){return false}t.init(x);if(t.SHORT(0)===65505&&t.STRING(4,5).toUpperCase()==="EXIF\0"){return v()}return false},EXIF:function(){var y;y=s(r.exifIFD,q.exif);if(y.ExifVersion&&l.typeOf(y.ExifVersion)==="array"){for(var z=0,x="";z<y.ExifVersion.length;z++){x+=String.fromCharCode(y.ExifVersion[z])}y.ExifVersion=x}return y},GPS:function(){var x;x=s(r.gpsIFD,q.gps);if(x.GPSVersionID){x.GPSVersionID=x.GPSVersionID.join(".")}return x},setExif:function(x,y){if(x!=="PixelXDimension"&&x!=="PixelYDimension"){return false}return u("exif",x,y)},getBinary:function(){return t.SEGMENT()}}}})(window,document,plupload); \ No newline at end of file
diff --git a/wp-includes/js/plupload/plupload.js b/wp-includes/js/plupload/plupload.js
deleted file mode 100644
index 5b3ffb7161..0000000000
--- a/wp-includes/js/plupload/plupload.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*1.5.7*/
-(function(){var f=0,k=[],m={},i={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},l=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function j(){this.cancelBubble=true}(function(n){var o=n.split(/,/),p,r,q;for(p=0;p<o.length;p+=2){q=o[p+1].split(/ /);for(r=0;r<q.length;r++){i[q[r]]=o[p]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var g={VERSION:"1.5.7",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:i,ua:(function(){var r=navigator,q=r.userAgent,s=r.vendor,o,n,p;o=/WebKit/.test(q);p=o&&s.indexOf("Apple")!==-1;n=window.opera&&window.opera.buildNumber;return{windows:navigator.platform.indexOf("Win")!==-1,android:/Android/.test(q),ie:!o&&!n&&(/MSIE/gi).test(q)&&(/Explorer/gi).test(r.appName),webkit:o,gecko:!o&&/Gecko/.test(q),safari:p,opera:!!n}}()),typeOf:function(n){return({}).toString.call(n).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},extend:function(n){g.each(arguments,function(o,p){if(p>0){g.each(o,function(r,q){n[q]=r})}});return n},cleanName:function(n){var o,p;p=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(o=0;o<p.length;o+=2){n=n.replace(p[o],p[o+1])}n=n.replace(/\s+/g,"_");n=n.replace(/[^a-z0-9_\-\.]+/gi,"");return n},addRuntime:function(n,o){o.name=n;k[n]=o;k.push(o);return o},guid:function(){var n=new Date().getTime().toString(32),o;for(o=0;o<5;o++){n+=Math.floor(Math.random()*65535).toString(32)}return(g.guidPrefix||"p")+n+(f++).toString(32)},buildUrl:function(o,n){var p="";g.each(n,function(r,q){p+=(p?"&":"")+encodeURIComponent(q)+"="+encodeURIComponent(r)});if(p){o+=(o.indexOf("?")>0?"&":"?")+p}return o},each:function(q,r){var p,o,n;if(q){p=q.length;if(p===b){for(o in q){if(q.hasOwnProperty(o)){if(r(q[o],o)===false){return}}}}else{for(n=0;n<p;n++){if(r(q[n],n)===false){return}}}}},formatSize:function(n){if(n===b||/\D/.test(n)){return g.translate("N/A")}if(n>1073741824){return Math.round(n/1073741824,1)+" GB"}if(n>1048576){return Math.round(n/1048576,1)+" MB"}if(n>1024){return Math.round(n/1024,1)+" KB"}return n+" b"},getPos:function(o,s){var t=0,r=0,v,u=document,p,q;o=o;s=s||u.body;function n(B){var z,A,w=0,C=0;if(B){A=B.getBoundingClientRect();z=u.compatMode==="CSS1Compat"?u.documentElement:u.body;w=A.left+z.scrollLeft;C=A.top+z.scrollTop}return{x:w,y:C}}if(o&&o.getBoundingClientRect&&g.ua.ie&&(!u.documentMode||u.documentMode<8)){p=n(o);q=n(s);return{x:p.x-q.x,y:p.y-q.y}}v=o;while(v&&v!=s&&v.nodeType){t+=v.offsetLeft||0;r+=v.offsetTop||0;v=v.offsetParent}v=o.parentNode;while(v&&v!=s&&v.nodeType){t-=v.scrollLeft||0;r-=v.scrollTop||0;v=v.parentNode}return{x:t,y:r}},getSize:function(n){return{w:n.offsetWidth||n.clientWidth,h:n.offsetHeight||n.clientHeight}},parseSize:function(n){var o;if(typeof(n)=="string"){n=/^([0-9]+)([mgk]?)$/.exec(n.toLowerCase().replace(/[^0-9mkg]/g,""));o=n[2];n=+n[1];if(o=="g"){n*=1073741824}if(o=="m"){n*=1048576}if(o=="k"){n*=1024}}return n},xmlEncode:function(n){return n?(""+n).replace(l,function(o){return a[o]?"&"+a[o]+";":o}):n},toArray:function(p){var o,n=[];for(o=0;o<p.length;o++){n[o]=p[o]}return n},inArray:function(p,q){if(q){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(q,p)}for(var n=0,o=q.length;n<o;n++){if(q[n]===p){return n}}}return -1},addI18n:function(n){return g.extend(m,n)},translate:function(n){return m[n]||n},isEmptyObj:function(n){if(n===b){return true}for(var o in n){return false}return true},hasClass:function(p,o){var n;if(p.className==""){return false}n=new RegExp("(^|\\s+)"+o+"(\\s+|$)");return n.test(p.className)},addClass:function(o,n){if(!g.hasClass(o,n)){o.className=o.className==""?n:o.className.replace(/\s+$/,"")+" "+n}},removeClass:function(p,o){var n=new RegExp("(^|\\s+)"+o+"(\\s+|$)");p.className=p.className.replace(n,function(r,q,s){return q===" "&&s===" "?" ":""})},getStyle:function(o,n){if(o.currentStyle){return o.currentStyle[n]}else{if(window.getComputedStyle){return window.getComputedStyle(o,null)[n]}}},addEvent:function(s,n,t){var r,q,p,o;o=arguments[3];n=n.toLowerCase();if(e===b){e="Plupload_"+g.guid()}if(s.addEventListener){r=t;s.addEventListener(n,r,false)}else{if(s.attachEvent){r=function(){var u=window.event;if(!u.target){u.target=u.srcElement}u.preventDefault=h;u.stopPropagation=j;t(u)};s.attachEvent("on"+n,r)}}if(s[e]===b){s[e]=g.guid()}if(!d.hasOwnProperty(s[e])){d[s[e]]={}}q=d[s[e]];if(!q.hasOwnProperty(n)){q[n]=[]}q[n].push({func:r,orig:t,key:o})},removeEvent:function(s,n){var q,t,p;if(typeof(arguments[2])=="function"){t=arguments[2]}else{p=arguments[2]}n=n.toLowerCase();if(s[e]&&d[s[e]]&&d[s[e]][n]){q=d[s[e]][n]}else{return}for(var o=q.length-1;o>=0;o--){if(q[o].key===p||q[o].orig===t){if(s.removeEventListener){s.removeEventListener(n,q[o].func,false)}else{if(s.detachEvent){s.detachEvent("on"+n,q[o].func)}}q[o].orig=null;q[o].func=null;q.splice(o,1);if(t!==b){break}}}if(!q.length){delete d[s[e]][n]}if(g.isEmptyObj(d[s[e]])){delete d[s[e]];try{delete s[e]}catch(r){s[e]=b}}},removeAllEvents:function(o){var n=arguments[1];if(o[e]===b||!o[e]){return}g.each(d[o[e]],function(q,p){g.removeEvent(o,p,n)})}};g.Uploader=function(r){var o={},u,t=[],q,p=false;u=new g.QueueProgress();r=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},r);function s(){var w,x=0,v;if(this.state==g.STARTED){for(v=0;v<t.length;v++){if(!w&&t[v].status==g.QUEUED){w=t[v];w.status=g.UPLOADING;if(this.trigger("BeforeUpload",w)){this.trigger("UploadFile",w)}}else{x++}}if(x==t.length){this.stop();this.trigger("UploadComplete",t)}}}function n(){var w,v;u.reset();for(w=0;w<t.length;w++){v=t[w];if(v.size!==b){u.size+=v.size;u.loaded+=v.loaded}else{u.size=b}if(v.status==g.DONE){u.uploaded++}else{if(v.status==g.FAILED){u.failed++}else{u.queued++}}}if(u.size===b){u.percent=t.length>0?Math.ceil(u.uploaded/t.length*100):0}else{u.bytesPerSec=Math.ceil(u.loaded/((+new Date()-q||1)/1000));u.percent=u.size>0?Math.ceil(u.loaded/u.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:t,settings:r,total:u,id:g.guid(),init:function(){var A=this,B,x,w,z=0,y;if(typeof(r.preinit)=="function"){r.preinit(A)}else{g.each(r.preinit,function(D,C){A.bind(C,D)})}r.page_url=r.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(r.url)){r.url=r.page_url+r.url}r.chunk_size=g.parseSize(r.chunk_size);r.max_file_size=g.parseSize(r.max_file_size);A.bind("FilesAdded",function(C,F){var E,D,H=0,I,G=r.filters;if(G&&G.length){I=[];g.each(G,function(J){g.each(J.extensions.split(/,/),function(K){if(/^\s*\*\s*$/.test(K)){I.push("\\.*")}else{I.push("\\."+K.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});I=new RegExp(I.join("|")+"$","i")}for(E=0;E<F.length;E++){D=F[E];D.loaded=0;D.percent=0;D.status=g.QUEUED;if(I&&!I.test(D.name)){C.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:D});continue}if(D.size!==b&&D.size>r.max_file_size){C.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:D});continue}t.push(D);H++}if(H){c(function(){A.trigger("QueueChanged");A.refresh()},1)}else{return false}});if(r.unique_names){A.bind("UploadFile",function(C,D){var F=D.name.match(/\.([^.]+)$/),E="tmp";if(F){E=F[1]}D.target_name=D.id+"."+E})}A.bind("UploadProgress",function(C,D){D.percent=D.size>0?Math.ceil(D.loaded/D.size*100):100;n()});A.bind("StateChanged",function(C){if(C.state==g.STARTED){q=(+new Date())}else{if(C.state==g.STOPPED){for(B=C.files.length-1;B>=0;B--){if(C.files[B].status==g.UPLOADING){C.files[B].status=g.QUEUED;n()}}}}});A.bind("QueueChanged",n);A.bind("Error",function(C,D){if(D.file){D.file.status=g.FAILED;n();if(C.state==g.STARTED){c(function(){s.call(A)},1)}}});A.bind("FileUploaded",function(C,D){D.status=g.DONE;D.loaded=D.size;C.trigger("UploadProgress",D);c(function(){s.call(A)},1)});if(r.runtimes){x=[];y=r.runtimes.split(/\s?,\s?/);for(B=0;B<y.length;B++){if(k[y[B]]){x.push(k[y[B]])}}}else{x=k}function v(){var F=x[z++],E,C,D;if(F){E=F.getFeatures();C=A.settings.required_features;if(C){C=C.split(",");for(D=0;D<C.length;D++){if(!E[C[D]]){v();return}}}F.init(A,function(G){if(G&&G.success){A.features=E;A.runtime=F.name;A.trigger("Init",{runtime:F.name});A.trigger("PostInit");A.refresh()}else{v()}})}else{A.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}}v();if(typeof(r.init)=="function"){r.init(A)}else{g.each(r.init,function(D,C){A.bind(C,D)})}},refresh:function(){this.trigger("Refresh")},start:function(){if(t.length&&this.state!=g.STARTED){this.state=g.STARTED;this.trigger("StateChanged");s.call(this)}},stop:function(){if(this.state!=g.STOPPED){this.state=g.STOPPED;this.trigger("CancelUpload");this.trigger("StateChanged")}},disableBrowse:function(){p=arguments[0]!==b?arguments[0]:true;this.trigger("DisableBrowse",p)},getFile:function(w){var v;for(v=t.length-1;v>=0;v--){if(t[v].id===w){return t[v]}}},removeFile:function(w){var v;for(v=t.length-1;v>=0;v--){if(t[v].id===w.id){return this.splice(v,1)[0]}}},splice:function(x,v){var w;w=t.splice(x===b?0:x,v===b?t.length:v);this.trigger("FilesRemoved",w);this.trigger("QueueChanged");return w},trigger:function(w){var y=o[w.toLowerCase()],x,v;if(y){v=Array.prototype.slice.call(arguments);v[0]=this;for(x=0;x<y.length;x++){if(y[x].func.apply(y[x].scope,v)===false){return false}}}return true},hasEventListener:function(v){return !!o[v.toLowerCase()]},bind:function(v,x,w){var y;v=v.toLowerCase();y=o[v]||[];y.push({func:x,scope:w||this});o[v]=y},unbind:function(v){v=v.toLowerCase();var y=o[v],w,x=arguments[1];if(y){if(x!==b){for(w=y.length-1;w>=0;w--){if(y[w].func===x){y.splice(w,1);break}}}else{y=[]}if(!y.length){delete o[v]}}},unbindAll:function(){var v=this;g.each(o,function(x,w){v.unbind(w)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(q,o,p){var n=this;n.id=q;n.name=o;n.size=p;n.loaded=0;n.percent=0;n.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(n,o){}};g.QueueProgress=function(){var n=this;n.size=0;n.loaded=0;n.uploaded=0;n.failed=0;n.queued=0;n.percent=0;n.bytesPerSec=0;n.reset=function(){n.size=n.loaded=n.uploaded=n.failed=n.queued=n.percent=n.bytesPerSec=0}};g.runtimes={};window.plupload=g})(); \ No newline at end of file
diff --git a/wp-includes/js/plupload/plupload.silverlight.js b/wp-includes/js/plupload/plupload.silverlight.js
deleted file mode 100644
index ccaa95a000..0000000000
--- a/wp-includes/js/plupload/plupload.silverlight.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(g,b,d,e){var a={},h={};function c(o){var n,m=typeof o,j,l,k;if(o===e||o===null){return"null"}if(m==="string"){n="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(q,p){var i=n.indexOf(p);if(i+1){return"\\"+n.charAt(i+1)}q=p.charCodeAt().toString(16);return"\\u"+"0000".substring(q.length)+q})+'"'}if(m=="object"){j=o.length!==e;n="";if(j){for(l=0;l<o.length;l++){if(n){n+=","}n+=c(o[l])}n="["+n+"]"}else{for(k in o){if(o.hasOwnProperty(k)){if(n){n+=","}n+=c(k)+":"+c(o[k])}}n="{"+n+"}"}return n}return""+o}function f(r){var u=false,i=null,n=null,j,k,l,t,m,p=0;try{try{n=new ActiveXObject("AgControl.AgControl");if(n.IsVersionSupported(r)){u=true}n=null}catch(q){var o=navigator.plugins["Silverlight Plug-In"];if(o){j=o.description;if(j==="1.0.30226.2"){j="2.0.30226.2"}k=j.split(".");while(k.length>3){k.pop()}while(k.length<4){k.push(0)}l=r.split(".");while(l.length>4){l.pop()}do{t=parseInt(l[p],10);m=parseInt(k[p],10);p++}while(p<l.length&&t===m);if(t<=m&&!isNaN(t)){u=true}}}}catch(s){u=false}return u}d.silverlight={trigger:function(n,k){var m=a[n],l,j;if(m){j=d.toArray(arguments).slice(1);j[0]="Silverlight:"+k;setTimeout(function(){m.trigger.apply(m,j)},0)}}};d.runtimes.Silverlight=d.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(p,q){var o,m="",n=p.settings.filters,l,k=b.body;if(!f("2.0.31005.0")||(g.opera&&g.opera.buildNumber)){q({success:false});return}h[p.id]=false;a[p.id]=p;o=b.createElement("div");o.id=p.id+"_silverlight_container";d.extend(o.style,{position:"absolute",top:"0px",background:p.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:p.settings.shim_bgcolor||b.documentMode>8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l<n.length;l++){m+=(m!=""?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.")}o.innerHTML='<object id="'+p.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+p.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+p.id+",filter="+m+",multiselect="+p.settings.multi_selection+'"/></object>';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var i,r={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(s){i=[]});p.bind("Silverlight:SelectFile",function(s,v,t,u){var w;w=d.guid();r[w]=v;r[v]=w;i.push(new d.File(w,t,u))});p.bind("Silverlight:SelectSuccessful",function(){if(i.length){p.trigger("FilesAdded",i)}});p.bind("Silverlight:UploadChunkError",function(s,v,t,w,u){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:u,file:s.getFile(r[v])})});p.bind("Silverlight:UploadFileProgress",function(s,w,t,v){var u=s.getFile(r[w]);if(u.status!=d.FAILED){u.size=v;u.loaded=t;s.trigger("UploadProgress",u)}});p.bind("Refresh",function(s){var t,u,v;t=b.getElementById(s.settings.browse_button);if(t){u=d.getPos(t,b.getElementById(s.settings.container));v=d.getSize(t);d.extend(b.getElementById(s.id+"_silverlight_container").style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(s,v,t,y,x){var w,u=s.getFile(r[v]);w={chunk:t,chunks:y,response:x};s.trigger("ChunkUploaded",u,w);if(u.status!=d.FAILED&&s.state!==d.STOPPED){j().UploadNextChunk()}if(t==y-1){u.status=d.DONE;s.trigger("FileUploaded",u,{response:x})}});p.bind("Silverlight:UploadSuccessful",function(s,v,t){var u=s.getFile(r[v]);u.status=d.DONE;s.trigger("FileUploaded",u,{response:t})});p.bind("FilesRemoved",function(s,u){var t;for(t=0;t<u.length;t++){j().RemoveFile(r[u[t].id])}});p.bind("UploadFile",function(s,u){var v=s.settings,t=v.resize||{};j().UploadFile(r[u.id],s.settings.url,c({name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,image_width:t.width,image_height:t.height,image_quality:t.quality,multipart:!!v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,headers:v.headers}))});p.bind("CancelUpload",function(){j().CancelUpload()});p.bind("Silverlight:MouseEnter",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.addClass(t,u)}});p.bind("Silverlight:MouseLeave",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.removeClass(t,u)}});p.bind("Silverlight:MouseLeftButtonDown",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.addClass(t,u);d.addEvent(b.body,"mouseup",function(){d.removeClass(t,u)})}});p.bind("Sliverlight:StartSelectFiles",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.removeClass(t,u)}});p.bind("DisableBrowse",function(s,t){j().DisableBrowse(t)});p.bind("Destroy",function(s){var t;d.removeAllEvents(b.body,s.id);delete h[s.id];delete a[s.id];t=b.getElementById(s.id+"_silverlight_container");if(t){t.parentNode.removeChild(t)}});q({success:true})})}})})(window,document,plupload); \ No newline at end of file
diff --git a/wp-includes/js/plupload/plupload.silverlight.xap b/wp-includes/js/plupload/plupload.silverlight.xap
deleted file mode 100644
index e1584d3b1a..0000000000
--- a/wp-includes/js/plupload/plupload.silverlight.xap
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/plupload/wp-plupload.js b/wp-includes/js/plupload/wp-plupload.js
deleted file mode 100644
index dc91674930..0000000000
--- a/wp-includes/js/plupload/wp-plupload.js
+++ /dev/null
@@ -1,343 +0,0 @@
-window.wp = window.wp || {};
-
-(function( exports, $ ) {
- var Uploader;
-
- if ( typeof _wpPluploadSettings === 'undefined' )
- return;
-
- /*
- * An object that helps create a WordPress uploader using plupload.
- *
- * @param options - object - The options passed to the new plupload instance.
- * Accepts the following parameters:
- * - container - The id of uploader container.
- * - browser - The id of button to trigger the file select.
- * - dropzone - The id of file drop target.
- * - plupload - An object of parameters to pass to the plupload instance.
- * - params - An object of parameters to pass to $_POST when uploading the file.
- * Extends this.plupload.multipart_params under the hood.
- *
- * @param attributes - object - Attributes and methods for this specific instance.
- */
- Uploader = function( options ) {
- var self = this,
- elements = {
- container: 'container',
- browser: 'browse_button',
- dropzone: 'drop_element'
- },
- key, error;
-
- this.supports = {
- upload: Uploader.browser.supported
- };
-
- this.supported = this.supports.upload;
-
- if ( ! this.supported )
- return;
-
- // Use deep extend to ensure that multipart_params and other objects are cloned.
- this.plupload = $.extend( true, { multipart_params: {} }, Uploader.defaults );
- this.container = document.body; // Set default container.
-
- // Extend the instance with options
- //
- // Use deep extend to allow options.plupload to override individual
- // default plupload keys.
- $.extend( true, this, options );
-
- // Proxy all methods so this always refers to the current instance.
- for ( key in this ) {
- if ( $.isFunction( this[ key ] ) )
- this[ key ] = $.proxy( this[ key ], this );
- }
-
- // Ensure all elements are jQuery elements and have id attributes
- // Then set the proper plupload arguments to the ids.
- for ( key in elements ) {
- if ( ! this[ key ] )
- continue;
-
- this[ key ] = $( this[ key ] ).first();
-
- if ( ! this[ key ].length ) {
- delete this[ key ];
- continue;
- }
-
- if ( ! this[ key ].prop('id') )
- this[ key ].prop( 'id', '__wp-uploader-id-' + Uploader.uuid++ );
- this.plupload[ elements[ key ] ] = this[ key ].prop('id');
- }
-
- // If the uploader has neither a browse button nor a dropzone, bail.
- if ( ! ( this.browser && this.browser.length ) && ! ( this.dropzone && this.dropzone.length ) )
- return;
-
- this.uploader = new plupload.Uploader( this.plupload );
- delete this.plupload;
-
- // Set default params and remove this.params alias.
- this.param( this.params || {} );
- delete this.params;
-
- error = function( message, data, file ) {
- if ( file.attachment )
- file.attachment.destroy();
-
- Uploader.errors.unshift({
- message: message || pluploadL10n.default_error,
- data: data,
- file: file
- });
-
- self.error( message, data, file );
- };
-
- this.uploader.init();
-
- this.supports.dragdrop = this.uploader.features.dragdrop && ! Uploader.browser.mobile;
-
- // Generate drag/drop helper classes.
- (function( dropzone, supported ) {
- var timer, active;
-
- if ( ! dropzone )
- return;
-
- dropzone.toggleClass( 'supports-drag-drop', !! supported );
-
- if ( ! supported )
- return dropzone.unbind('.wp-uploader');
-
- // 'dragenter' doesn't fire correctly,
- // simulate it with a limited 'dragover'
- dropzone.bind( 'dragover.wp-uploader', function(){
- if ( timer )
- clearTimeout( timer );
-
- if ( active )
- return;
-
- dropzone.trigger('dropzone:enter').addClass('drag-over');
- active = true;
- });
-
- dropzone.bind('dragleave.wp-uploader, drop.wp-uploader', function(){
- // Using an instant timer prevents the drag-over class from
- // being quickly removed and re-added when elements inside the
- // dropzone are repositioned.
- //
- // See http://core.trac.wordpress.org/ticket/21705
- timer = setTimeout( function() {
- active = false;
- dropzone.trigger('dropzone:leave').removeClass('drag-over');
- }, 0 );
- });
- }( this.dropzone, this.supports.dragdrop ));
-
- if ( this.browser ) {
- this.browser.on( 'mouseenter', this.refresh );
- } else {
- this.uploader.disableBrowse( true );
- // If HTML5 mode, hide the auto-created file container.
- $('#' + this.uploader.id + '_html5_container').hide();
- }
-
- this.uploader.bind( 'FilesAdded', function( up, files ) {
- _.each( files, function( file ) {
- var attributes, image;
-
- // Ignore failed uploads.
- if ( plupload.FAILED === file.status )
- return;
-
- // Generate attributes for a new `Attachment` model.
- attributes = _.extend({
- file: file,
- uploading: true,
- date: new Date(),
- filename: file.name,
- menuOrder: 0,
- uploadedTo: wp.media.model.settings.post.id
- }, _.pick( file, 'loaded', 'size', 'percent' ) );
-
- // Handle early mime type scanning for images.
- image = /(?:jpe?g|png|gif)$/i.exec( file.name );
-
- // Did we find an image?
- if ( image ) {
- attributes.type = 'image';
-
- // `jpeg`, `png` and `gif` are valid subtypes.
- // `jpg` is not, so map it to `jpeg`.
- attributes.subtype = ( 'jpg' === image[0] ) ? 'jpeg' : image[0];
- }
-
- // Create the `Attachment`.
- file.attachment = wp.media.model.Attachment.create( attributes );
-
- Uploader.queue.add( file.attachment );
-
- self.added( file.attachment );
- });
-
- up.refresh();
- up.start();
- });
-
- this.uploader.bind( 'UploadProgress', function( up, file ) {
- file.attachment.set( _.pick( file, 'loaded', 'percent' ) );
- self.progress( file.attachment );
- });
-
- this.uploader.bind( 'FileUploaded', function( up, file, response ) {
- var complete;
-
- try {
- response = JSON.parse( response.response );
- } catch ( e ) {
- return error( pluploadL10n.default_error, e, file );
- }
-
- if ( ! _.isObject( response ) || _.isUndefined( response.success ) )
- return error( pluploadL10n.default_error, null, file );
- else if ( ! response.success )
- return error( response.data && response.data.message, response.data, file );
-
- _.each(['file','loaded','size','percent'], function( key ) {
- file.attachment.unset( key );
- });
-
- file.attachment.set( _.extend( response.data, { uploading: false }) );
- wp.media.model.Attachment.get( response.data.id, file.attachment );
-
- complete = Uploader.queue.all( function( attachment ) {
- return ! attachment.get('uploading');
- });
-
- if ( complete )
- Uploader.queue.reset();
-
- self.success( file.attachment );
- });
-
- this.uploader.bind( 'Error', function( up, pluploadError ) {
- var message = pluploadL10n.default_error,
- key;
-
- // Check for plupload errors.
- for ( key in Uploader.errorMap ) {
- if ( pluploadError.code === plupload[ key ] ) {
- message = Uploader.errorMap[ key ];
- if ( _.isFunction( message ) )
- message = message( pluploadError.file, pluploadError );
- break;
- }
- }
-
- error( message, pluploadError, pluploadError.file );
- up.refresh();
- });
-
- this.init();
- };
-
- // Adds the 'defaults' and 'browser' properties.
- $.extend( Uploader, _wpPluploadSettings );
-
- Uploader.uuid = 0;
-
- Uploader.errorMap = {
- 'FAILED': pluploadL10n.upload_failed,
- 'FILE_EXTENSION_ERROR': pluploadL10n.invalid_filetype,
- 'IMAGE_FORMAT_ERROR': pluploadL10n.not_an_image,
- 'IMAGE_MEMORY_ERROR': pluploadL10n.image_memory_exceeded,
- 'IMAGE_DIMENSIONS_ERROR': pluploadL10n.image_dimensions_exceeded,
- 'GENERIC_ERROR': pluploadL10n.upload_failed,
- 'IO_ERROR': pluploadL10n.io_error,
- 'HTTP_ERROR': pluploadL10n.http_error,
- 'SECURITY_ERROR': pluploadL10n.security_error,
-
- 'FILE_SIZE_ERROR': function( file ) {
- return pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
- }
- };
-
- $.extend( Uploader.prototype, {
- /**
- * Acts as a shortcut to extending the uploader's multipart_params object.
- *
- * param( key )
- * Returns the value of the key.
- *
- * param( key, value )
- * Sets the value of a key.
- *
- * param( map )
- * Sets values for a map of data.
- */
- param: function( key, value ) {
- if ( arguments.length === 1 && typeof key === 'string' )
- return this.uploader.settings.multipart_params[ key ];
-
- if ( arguments.length > 1 ) {
- this.uploader.settings.multipart_params[ key ] = value;
- } else {
- $.extend( this.uploader.settings.multipart_params, key );
- }
- },
-
- init: function() {},
- error: function() {},
- success: function() {},
- added: function() {},
- progress: function() {},
- complete: function() {},
- refresh: function() {
- var node, attached, container, id;
-
- if ( this.browser ) {
- node = this.browser[0];
-
- // Check if the browser node is in the DOM.
- while ( node ) {
- if ( node === document.body ) {
- attached = true;
- break;
- }
- node = node.parentNode;
- }
-
- // If the browser node is not attached to the DOM, use a
- // temporary container to house it, as the browser button
- // shims require the button to exist in the DOM at all times.
- if ( ! attached ) {
- id = 'wp-uploader-browser-' + this.uploader.id;
-
- container = $( '#' + id );
- if ( ! container.length ) {
- container = $('<div class="wp-uploader-browser" />').css({
- position: 'fixed',
- top: '-1000px',
- left: '-1000px',
- height: 0,
- width: 0
- }).attr( 'id', 'wp-uploader-browser-' + this.uploader.id ).appendTo('body');
- }
-
- container.append( this.browser );
- }
- }
-
- this.uploader.refresh();
- }
- });
-
- Uploader.queue = new wp.media.model.Attachments( [], { query: false });
- Uploader.errors = new Backbone.Collection();
-
- exports.Uploader = Uploader;
-})( wp, jQuery );
diff --git a/wp-includes/js/plupload/wp-plupload.min.js b/wp-includes/js/plupload/wp-plupload.min.js
deleted file mode 100644
index d9f179e20d..0000000000
--- a/wp-includes/js/plupload/wp-plupload.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(a,b){var c;if(typeof _wpPluploadSettings==="undefined"){return}c=function(f){var d=this,h={container:"container",browser:"browse_button",dropzone:"drop_element"},g,e;this.supports={upload:c.browser.supported};this.supported=this.supports.upload;if(!this.supported){return}this.plupload=b.extend(true,{multipart_params:{}},c.defaults);this.container=document.body;b.extend(true,this,f);for(g in this){if(b.isFunction(this[g])){this[g]=b.proxy(this[g],this)}}for(g in h){if(!this[g]){continue}this[g]=b(this[g]).first();if(!this[g].length){delete this[g];continue}if(!this[g].prop("id")){this[g].prop("id","__wp-uploader-id-"+c.uuid++)}this.plupload[h[g]]=this[g].prop("id")}if(!(this.browser&&this.browser.length)&&!(this.dropzone&&this.dropzone.length)){return}this.uploader=new plupload.Uploader(this.plupload);delete this.plupload;this.param(this.params||{});delete this.params;e=function(j,k,i){if(i.attachment){i.attachment.destroy()}c.errors.unshift({message:j||pluploadL10n.default_error,data:k,file:i});d.error(j,k,i)};this.uploader.init();this.supports.dragdrop=this.uploader.features.dragdrop&&!c.browser.mobile;(function(j,i){var l,k;if(!j){return}j.toggleClass("supports-drag-drop",!!i);if(!i){return j.unbind(".wp-uploader")}j.bind("dragover.wp-uploader",function(){if(l){clearTimeout(l)}if(k){return}j.trigger("dropzone:enter").addClass("drag-over");k=true});j.bind("dragleave.wp-uploader, drop.wp-uploader",function(){l=setTimeout(function(){k=false;j.trigger("dropzone:leave").removeClass("drag-over")},0)})}(this.dropzone,this.supports.dragdrop));if(this.browser){this.browser.on("mouseenter",this.refresh)}else{this.uploader.disableBrowse(true);b("#"+this.uploader.id+"_html5_container").hide()}this.uploader.bind("FilesAdded",function(i,j){_.each(j,function(l){var k,m;if(plupload.FAILED===l.status){return}k=_.extend({file:l,uploading:true,date:new Date(),filename:l.name,menuOrder:0,uploadedTo:wp.media.model.settings.post.id},_.pick(l,"loaded","size","percent"));m=/(?:jpe?g|png|gif)$/i.exec(l.name);if(m){k.type="image";k.subtype=("jpg"===m[0])?"jpeg":m[0]}l.attachment=wp.media.model.Attachment.create(k);c.queue.add(l.attachment);d.added(l.attachment)});i.refresh();i.start()});this.uploader.bind("UploadProgress",function(i,j){j.attachment.set(_.pick(j,"loaded","percent"));d.progress(j.attachment)});this.uploader.bind("FileUploaded",function(i,l,k){var j;try{k=JSON.parse(k.response)}catch(m){return e(pluploadL10n.default_error,m,l)}if(!_.isObject(k)||_.isUndefined(k.success)){return e(pluploadL10n.default_error,null,l)}else{if(!k.success){return e(k.data&&k.data.message,k.data,l)}}_.each(["file","loaded","size","percent"],function(n){l.attachment.unset(n)});l.attachment.set(_.extend(k.data,{uploading:false}));wp.media.model.Attachment.get(k.data.id,l.attachment);j=c.queue.all(function(n){return !n.get("uploading")});if(j){c.queue.reset()}d.success(l.attachment)});this.uploader.bind("Error",function(i,l){var k=pluploadL10n.default_error,j;for(j in c.errorMap){if(l.code===plupload[j]){k=c.errorMap[j];if(_.isFunction(k)){k=k(l.file,l)}break}}e(k,l,l.file);i.refresh()});this.init()};b.extend(c,_wpPluploadSettings);c.uuid=0;c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error,FILE_SIZE_ERROR:function(d){return pluploadL10n.file_exceeds_size_limit.replace("%s",d.name)}};b.extend(c.prototype,{param:function(d,e){if(arguments.length===1&&typeof d==="string"){return this.uploader.settings.multipart_params[d]}if(arguments.length>1){this.uploader.settings.multipart_params[d]=e}else{b.extend(this.uploader.settings.multipart_params,d)}},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){var f,e,d,g;if(this.browser){f=this.browser[0];while(f){if(f===document.body){e=true;break}f=f.parentNode}if(!e){g="wp-uploader-browser-"+this.uploader.id;d=b("#"+g);if(!d.length){d=b('<div class="wp-uploader-browser" />').css({position:"fixed",top:"-1000px",left:"-1000px",height:0,width:0}).attr("id","wp-uploader-browser-"+this.uploader.id).appendTo("body")}d.append(this.browser)}}this.uploader.refresh()}});c.queue=new wp.media.model.Attachments([],{query:false});c.errors=new Backbone.Collection();a.Uploader=c})(wp,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js
deleted file mode 100644
index 202c1cbacf..0000000000
--- a/wp-includes/js/quicktags.js
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Quicktags
- *
- * This is the HTML editor in WordPress. It can be attached to any textarea and will
- * append a toolbar above it. This script is self-contained (does not require external libraries).
- *
- * Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties:
- * settings = {
- * id : 'my_id', the HTML ID of the textarea, required
- * buttons: '' Comma separated list of the names of the default buttons to show. Optional.
- * Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close';
- * }
- *
- * The settings can also be a string quicktags_id.
- *
- * quicktags_id string The ID of the textarea that will be the editor canvas
- * buttons string Comma separated list of the default buttons names that will be shown in that instance.
- */
-
-// new edit toolbar used with permission
-// by Alex King
-// http://www.alexking.org/
-
-var QTags, edButtons = [], edCanvas,
-
-/**
- * Back-compat
- *
- * Define all former global functions so plugins that hack quicktags.js directly don't cause fatal errors.
- */
-edAddTag = function(){},
-edCheckOpenTags = function(){},
-edCloseAllTags = function(){},
-edInsertImage = function(){},
-edInsertLink = function(){},
-edInsertTag = function(){},
-edLink = function(){},
-edQuickLink = function(){},
-edRemoveTag = function(){},
-edShowButton = function(){},
-edShowLinks = function(){},
-edSpell = function(){},
-edToolbar = function(){};
-
-/**
- * Initialize new instance of the Quicktags editor
- */
-function quicktags(settings) {
- return new QTags(settings);
-}
-
-/**
- * Inserts content at the caret in the active editor (textarea)
- *
- * Added for back compatibility
- * @see QTags.insertContent()
- */
-function edInsertContent(bah, txt) {
- return QTags.insertContent(txt);
-}
-
-/**
- * Adds a button to all instances of the editor
- *
- * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc.
- * @see QTags.addButton()
- */
-function edButton(id, display, tagStart, tagEnd, access, open) {
- return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 );
-}
-
-(function(){
- // private stuff is prefixed with an underscore
- var _domReady = function(func) {
- var t, i, DOMContentLoaded;
-
- if ( typeof jQuery != 'undefined' ) {
- jQuery(document).ready(func);
- } else {
- t = _domReady;
- t.funcs = [];
-
- t.ready = function() {
- if ( ! t.isReady ) {
- t.isReady = true;
- for ( i = 0; i < t.funcs.length; i++ ) {
- t.funcs[i]();
- }
- }
- };
-
- if ( t.isReady ) {
- func();
- } else {
- t.funcs.push(func);
- }
-
- if ( ! t.eventAttached ) {
- if ( document.addEventListener ) {
- DOMContentLoaded = function(){document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);t.ready();};
- document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
- window.addEventListener('load', t.ready, false);
- } else if ( document.attachEvent ) {
- DOMContentLoaded = function(){if (document.readyState === 'complete'){ document.detachEvent('onreadystatechange', DOMContentLoaded);t.ready();}};
- document.attachEvent('onreadystatechange', DOMContentLoaded);
- window.attachEvent('onload', t.ready);
-
- (function(){
- try {
- document.documentElement.doScroll("left");
- } catch(e) {
- setTimeout(arguments.callee, 50);
- return;
- }
-
- t.ready();
- })();
- }
-
- t.eventAttached = true;
- }
- }
- },
-
- _datetime = (function() {
- var now = new Date(), zeroise;
-
- zeroise = function(number) {
- var str = number.toString();
-
- if ( str.length < 2 )
- str = "0" + str;
-
- return str;
- }
-
- return now.getUTCFullYear() + '-' +
- zeroise( now.getUTCMonth() + 1 ) + '-' +
- zeroise( now.getUTCDate() ) + 'T' +
- zeroise( now.getUTCHours() ) + ':' +
- zeroise( now.getUTCMinutes() ) + ':' +
- zeroise( now.getUTCSeconds() ) +
- '+00:00';
- })(),
- qt;
-
- qt = QTags = function(settings) {
- if ( typeof(settings) == 'string' )
- settings = {id: settings};
- else if ( typeof(settings) != 'object' )
- return false;
-
- var t = this,
- id = settings.id,
- canvas = document.getElementById(id),
- name = 'qt_' + id,
- tb, onclick, toolbar_id;
-
- if ( !id || !canvas )
- return false;
-
- t.name = name;
- t.id = id;
- t.canvas = canvas;
- t.settings = settings;
-
- if ( id == 'content' && typeof(adminpage) == 'string' && ( adminpage == 'post-new-php' || adminpage == 'post-php' ) ) {
- // back compat hack :-(
- edCanvas = canvas;
- toolbar_id = 'ed_toolbar';
- } else {
- toolbar_id = name + '_toolbar';
- }
-
- tb = document.createElement('div');
- tb.id = toolbar_id;
- tb.className = 'quicktags-toolbar';
-
- canvas.parentNode.insertBefore(tb, canvas);
- t.toolbar = tb;
-
- // listen for click events
- onclick = function(e) {
- e = e || window.event;
- var target = e.target || e.srcElement, visible = target.clientWidth || target.offsetWidth, i;
-
- // don't call the callback on pressing the accesskey when the button is not visible
- if ( !visible )
- return;
-
- // as long as it has the class ed_button, execute the callback
- if ( / ed_button /.test(' ' + target.className + ' ') ) {
- // we have to reassign canvas here
- t.canvas = canvas = document.getElementById(id);
- i = target.id.replace(name + '_', '');
-
- if ( t.theButtons[i] )
- t.theButtons[i].callback.call(t.theButtons[i], target, canvas, t);
- }
- };
-
- if ( tb.addEventListener ) {
- tb.addEventListener('click', onclick, false);
- } else if ( tb.attachEvent ) {
- tb.attachEvent('onclick', onclick);
- }
-
- t.getButton = function(id) {
- return t.theButtons[id];
- };
-
- t.getButtonElement = function(id) {
- return document.getElementById(name + '_' + id);
- };
-
- qt.instances[id] = t;
-
- if ( !qt.instances[0] ) {
- qt.instances[0] = qt.instances[id];
- _domReady( function(){ qt._buttonsInit(); } );
- }
- };
-
- qt.instances = {};
-
- qt.getInstance = function(id) {
- return qt.instances[id];
- };
-
- qt._buttonsInit = function() {
- var t = this, canvas, name, settings, theButtons, html, inst, ed, id, i, use,
- defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';
-
- for ( inst in t.instances ) {
- if ( inst == 0 )
- continue;
-
- ed = t.instances[inst];
- canvas = ed.canvas;
- name = ed.name;
- settings = ed.settings;
- html = '';
- theButtons = {};
- use = '';
-
- // set buttons
- if ( settings.buttons )
- use = ','+settings.buttons+',';
-
- for ( i in edButtons ) {
- if ( !edButtons[i] )
- continue;
-
- id = edButtons[i].id;
- if ( use && defaults.indexOf(','+id+',') != -1 && use.indexOf(','+id+',') == -1 )
- continue;
-
- if ( !edButtons[i].instance || edButtons[i].instance == inst ) {
- theButtons[id] = edButtons[i];
-
- if ( edButtons[i].html )
- html += edButtons[i].html(name + '_');
- }
- }
-
- if ( use && use.indexOf(',fullscreen,') != -1 ) {
- theButtons['fullscreen'] = new qt.FullscreenButton();
- html += theButtons['fullscreen'].html(name + '_');
- }
-
-
- if ( 'rtl' == document.getElementsByTagName('html')[0].dir ) {
- theButtons['textdirection'] = new qt.TextDirectionButton();
- html += theButtons['textdirection'].html(name + '_');
- }
-
- ed.toolbar.innerHTML = html;
- ed.theButtons = theButtons;
- }
- t.buttonsInitDone = true;
- };
-
- /**
- * Main API function for adding a button to Quicktags
- *
- * Adds qt.Button or qt.TagButton depending on the args. The first three args are always required.
- * To be able to add button(s) to Quicktags, your script should be enqueued as dependent
- * on "quicktags" and outputted in the footer. If you are echoing JS directly from PHP,
- * use add_action( 'admin_print_footer_scripts', 'output_my_js', 100 ) or add_action( 'wp_footer', 'output_my_js', 100 )
- *
- * Minimum required to add a button that calls an external function:
- * QTags.addButton( 'my_id', 'my button', my_callback );
- * function my_callback() { alert('yeah!'); }
- *
- * Minimum required to add a button that inserts a tag:
- * QTags.addButton( 'my_id', 'my button', '<span>', '</span>' );
- * QTags.addButton( 'my_id2', 'my button', '<br />' );
- *
- * @param string id Required. Button HTML ID
- * @param string display Required. Button's value="..."
- * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.
- * @param string arg2 Optional. Ending tag like "</span>"
- * @param string access_key Optional. Access key for the button.
- * @param string title Optional. Button's title="..."
- * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
- * @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present.
- * @return mixed null or the button object that is needed for back-compat.
- */
- qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) {
- var btn;
-
- if ( !id || !display )
- return;
-
- priority = priority || 0;
- arg2 = arg2 || '';
-
- if ( typeof(arg1) === 'function' ) {
- btn = new qt.Button(id, display, access_key, title, instance);
- btn.callback = arg1;
- } else if ( typeof(arg1) === 'string' ) {
- btn = new qt.TagButton(id, display, arg1, arg2, access_key, title, instance);
- } else {
- return;
- }
-
- if ( priority == -1 ) // back-compat
- return btn;
-
- if ( priority > 0 ) {
- while ( typeof(edButtons[priority]) != 'undefined' ) {
- priority++
- }
-
- edButtons[priority] = btn;
- } else {
- edButtons[edButtons.length] = btn;
- }
-
- if ( this.buttonsInitDone )
- this._buttonsInit(); // add the button HTML to all instances toolbars if addButton() was called too late
- };
-
- qt.insertContent = function(content) {
- var sel, startPos, endPos, scrollTop, text, canvas = document.getElementById(wpActiveEditor);
-
- if ( !canvas )
- return false;
-
- if ( document.selection ) { //IE
- canvas.focus();
- sel = document.selection.createRange();
- sel.text = content;
- canvas.focus();
- } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
- text = canvas.value;
- startPos = canvas.selectionStart;
- endPos = canvas.selectionEnd;
- scrollTop = canvas.scrollTop;
-
- canvas.value = text.substring(0, startPos) + content + text.substring(endPos, text.length);
-
- canvas.focus();
- canvas.selectionStart = startPos + content.length;
- canvas.selectionEnd = startPos + content.length;
- canvas.scrollTop = scrollTop;
- } else {
- canvas.value += content;
- canvas.focus();
- }
- return true;
- };
-
- // a plain, dumb button
- qt.Button = function(id, display, access, title, instance) {
- var t = this;
- t.id = id;
- t.display = display;
- t.access = access;
- t.title = title || '';
- t.instance = instance || '';
- };
- qt.Button.prototype.html = function(idPrefix) {
- var access = this.access ? ' accesskey="' + this.access + '"' : '';
- return '<input type="button" id="' + idPrefix + this.id + '"' + access + ' class="ed_button" title="' + this.title + '" value="' + this.display + '" />';
- };
- qt.Button.prototype.callback = function(){};
-
- // a button that inserts HTML tag
- qt.TagButton = function(id, display, tagStart, tagEnd, access, title, instance) {
- var t = this;
- qt.Button.call(t, id, display, access, title, instance);
- t.tagStart = tagStart;
- t.tagEnd = tagEnd;
- };
- qt.TagButton.prototype = new qt.Button();
- qt.TagButton.prototype.openTag = function(e, ed) {
- var t = this;
-
- if ( ! ed.openTags ) {
- ed.openTags = [];
- }
- if ( t.tagEnd ) {
- ed.openTags.push(t.id);
- e.value = '/' + e.value;
- }
- };
- qt.TagButton.prototype.closeTag = function(e, ed) {
- var t = this, i = t.isOpen(ed);
-
- if ( i !== false ) {
- ed.openTags.splice(i, 1);
- }
-
- e.value = t.display;
- };
- // whether a tag is open or not. Returns false if not open, or current open depth of the tag
- qt.TagButton.prototype.isOpen = function (ed) {
- var t = this, i = 0, ret = false;
- if ( ed.openTags ) {
- while ( ret === false && i < ed.openTags.length ) {
- ret = ed.openTags[i] == t.id ? i : false;
- i ++;
- }
- } else {
- ret = false;
- }
- return ret;
- };
- qt.TagButton.prototype.callback = function(element, canvas, ed) {
- var t = this, startPos, endPos, cursorPos, scrollTop, v = canvas.value, l, r, i, sel, endTag = v ? t.tagEnd : '';
-
- if ( document.selection ) { // IE
- canvas.focus();
- sel = document.selection.createRange();
- if ( sel.text.length > 0 ) {
- if ( !t.tagEnd )
- sel.text = sel.text + t.tagStart;
- else
- sel.text = t.tagStart + sel.text + endTag;
- } else {
- if ( !t.tagEnd ) {
- sel.text = t.tagStart;
- } else if ( t.isOpen(ed) === false ) {
- sel.text = t.tagStart;
- t.openTag(element, ed);
- } else {
- sel.text = endTag;
- t.closeTag(element, ed);
- }
- }
- canvas.focus();
- } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
- startPos = canvas.selectionStart;
- endPos = canvas.selectionEnd;
- cursorPos = endPos;
- scrollTop = canvas.scrollTop;
- l = v.substring(0, startPos); // left of the selection
- r = v.substring(endPos, v.length); // right of the selection
- i = v.substring(startPos, endPos); // inside the selection
- if ( startPos != endPos ) {
- if ( !t.tagEnd ) {
- canvas.value = l + i + t.tagStart + r; // insert self closing tags after the selection
- cursorPos += t.tagStart.length;
- } else {
- canvas.value = l + t.tagStart + i + endTag + r;
- cursorPos += t.tagStart.length + endTag.length;
- }
- } else {
- if ( !t.tagEnd ) {
- canvas.value = l + t.tagStart + r;
- cursorPos = startPos + t.tagStart.length;
- } else if ( t.isOpen(ed) === false ) {
- canvas.value = l + t.tagStart + r;
- t.openTag(element, ed);
- cursorPos = startPos + t.tagStart.length;
- } else {
- canvas.value = l + endTag + r;
- cursorPos = startPos + endTag.length;
- t.closeTag(element, ed);
- }
- }
-
- canvas.focus();
- canvas.selectionStart = cursorPos;
- canvas.selectionEnd = cursorPos;
- canvas.scrollTop = scrollTop;
- } else { // other browsers?
- if ( !endTag ) {
- canvas.value += t.tagStart;
- } else if ( t.isOpen(ed) !== false ) {
- canvas.value += t.tagStart;
- t.openTag(element, ed);
- } else {
- canvas.value += endTag;
- t.closeTag(element, ed);
- }
- canvas.focus();
- }
- };
-
- // removed
- qt.SpellButton = function() {};
-
- // the close tags button
- qt.CloseButton = function() {
- qt.Button.call(this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags);
- };
-
- qt.CloseButton.prototype = new qt.Button();
-
- qt._close = function(e, c, ed) {
- var button, element, tbo = ed.openTags;
-
- if ( tbo ) {
- while ( tbo.length > 0 ) {
- button = ed.getButton(tbo[tbo.length - 1]);
- element = document.getElementById(ed.name + '_' + button.id);
-
- if ( e )
- button.callback.call(button, element, c, ed);
- else
- button.closeTag(element, ed);
- }
- }
- };
-
- qt.CloseButton.prototype.callback = qt._close;
-
- qt.closeAllTags = function(editor_id) {
- var ed = this.getInstance(editor_id);
- qt._close('', ed.canvas, ed);
- };
-
- // the link button
- qt.LinkButton = function() {
- qt.TagButton.call(this, 'link', 'link', '', '</a>', 'a');
- };
- qt.LinkButton.prototype = new qt.TagButton();
- qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
- var URL, t = this;
-
- if ( typeof(wpLink) != 'undefined' ) {
- wpLink.open();
- return;
- }
-
- if ( ! defaultValue )
- defaultValue = 'http://';
-
- if ( t.isOpen(ed) === false ) {
- URL = prompt(quicktagsL10n.enterURL, defaultValue);
- if ( URL ) {
- t.tagStart = '<a href="' + URL + '">';
- qt.TagButton.prototype.callback.call(t, e, c, ed);
- }
- } else {
- qt.TagButton.prototype.callback.call(t, e, c, ed);
- }
- };
-
- // the img button
- qt.ImgButton = function() {
- qt.TagButton.call(this, 'img', 'img', '', '', 'm');
- };
- qt.ImgButton.prototype = new qt.TagButton();
- qt.ImgButton.prototype.callback = function(e, c, ed, defaultValue) {
- if ( ! defaultValue ) {
- defaultValue = 'http://';
- }
- var src = prompt(quicktagsL10n.enterImageURL, defaultValue), alt;
- if ( src ) {
- alt = prompt(quicktagsL10n.enterImageDescription, '');
- this.tagStart = '<img src="' + src + '" alt="' + alt + '" />';
- qt.TagButton.prototype.callback.call(this, e, c, ed);
- }
- };
-
- qt.FullscreenButton = function() {
- qt.Button.call(this, 'fullscreen', quicktagsL10n.fullscreen, 'f', quicktagsL10n.toggleFullscreen);
- };
- qt.FullscreenButton.prototype = new qt.Button();
- qt.FullscreenButton.prototype.callback = function(e, c) {
- if ( !c.id || typeof(fullscreen) == 'undefined' )
- return;
-
- fullscreen.on();
- };
-
- qt.TextDirectionButton = function() {
- qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection)
- };
- qt.TextDirectionButton.prototype = new qt.Button();
- qt.TextDirectionButton.prototype.callback = function(e, c) {
- var isRTL = ( 'rtl' == document.getElementsByTagName('html')[0].dir ),
- currentDirection = c.style.direction;
-
- if ( ! currentDirection )
- currentDirection = ( isRTL ) ? 'rtl' : 'ltr';
-
- c.style.direction = ( 'rtl' == currentDirection ) ? 'ltr' : 'rtl';
- c.focus();
- }
-
- // ensure backward compatibility
- edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b');
- edButtons[20] = new qt.TagButton('em','i','<em>','</em>','i'),
- edButtons[30] = new qt.LinkButton(), // special case
- edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n','q'),
- edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>','d'),
- edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>','s'),
- edButtons[70] = new qt.ImgButton(), // special case
- edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n','u'),
- edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n','o'),
- edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n','l'),
- edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'),
- edButtons[120] = new qt.TagButton('more','more','<!--more-->','','t'),
- edButtons[140] = new qt.CloseButton()
-
-})();
diff --git a/wp-includes/js/quicktags.min.js b/wp-includes/js/quicktags.min.js
deleted file mode 100644
index 56b1dbc06f..0000000000
--- a/wp-includes/js/quicktags.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var QTags,edButtons=[],edCanvas,edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,a,"",-1)}(function(){var b=function(g){var f,e,d;if(typeof jQuery!="undefined"){jQuery(document).ready(g)}else{f=b;f.funcs=[];f.ready=function(){if(!f.isReady){f.isReady=true;for(e=0;e<f.funcs.length;e++){f.funcs[e]()}}};if(f.isReady){g()}else{f.funcs.push(g)}if(!f.eventAttached){if(document.addEventListener){d=function(){document.removeEventListener("DOMContentLoaded",d,false);f.ready()};document.addEventListener("DOMContentLoaded",d,false);window.addEventListener("load",f.ready,false)}else{if(document.attachEvent){d=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",d);f.ready()}};document.attachEvent("onreadystatechange",d);window.attachEvent("onload",f.ready);(function(){try{document.documentElement.doScroll("left")}catch(h){setTimeout(arguments.callee,50);return}f.ready()})()}}f.eventAttached=true}}},a=(function(){var d=new Date(),e;e=function(f){var g=f.toString();if(g.length<2){g="0"+g}return g};return d.getUTCFullYear()+"-"+e(d.getUTCMonth()+1)+"-"+e(d.getUTCDate())+"T"+e(d.getUTCHours())+":"+e(d.getUTCMinutes())+":"+e(d.getUTCSeconds())+"+00:00"})(),c;c=QTags=function(j){if(typeof(j)=="string"){j={id:j}}else{if(typeof(j)!="object"){return false}}var i=this,k=j.id,h=document.getElementById(k),g="qt_"+k,d,f,e;if(!k||!h){return false}i.name=g;i.id=k;i.canvas=h;i.settings=j;if(k=="content"&&typeof(adminpage)=="string"&&(adminpage=="post-new-php"||adminpage=="post-php")){edCanvas=h;e="ed_toolbar"}else{e=g+"_toolbar"}d=document.createElement("div");d.id=e;d.className="quicktags-toolbar";h.parentNode.insertBefore(d,h);i.toolbar=d;f=function(n){n=n||window.event;var m=n.target||n.srcElement,o=m.clientWidth||m.offsetWidth,l;if(!o){return}if(/ ed_button /.test(" "+m.className+" ")){i.canvas=h=document.getElementById(k);l=m.id.replace(g+"_","");if(i.theButtons[l]){i.theButtons[l].callback.call(i.theButtons[l],m,h,i)}}};if(d.addEventListener){d.addEventListener("click",f,false)}else{if(d.attachEvent){d.attachEvent("onclick",f)}}i.getButton=function(l){return i.theButtons[l]};i.getButtonElement=function(l){return document.getElementById(g+"_"+l)};c.instances[k]=i;if(!c.instances[0]){c.instances[0]=c.instances[k];b(function(){c._buttonsInit()})}};c.instances={};c.getInstance=function(d){return c.instances[d]};c._buttonsInit=function(){var p=this,g,e,h,o,m,l,n,f,k,d,j=",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,";for(l in p.instances){if(l==0){continue}n=p.instances[l];g=n.canvas;e=n.name;h=n.settings;m="";o={};d="";if(h.buttons){d=","+h.buttons+","}for(k in edButtons){if(!edButtons[k]){continue}f=edButtons[k].id;if(d&&j.indexOf(","+f+",")!=-1&&d.indexOf(","+f+",")==-1){continue}if(!edButtons[k].instance||edButtons[k].instance==l){o[f]=edButtons[k];if(edButtons[k].html){m+=edButtons[k].html(e+"_")}}}if(d&&d.indexOf(",fullscreen,")!=-1){o.fullscreen=new c.FullscreenButton();m+=o.fullscreen.html(e+"_")}if("rtl"==document.getElementsByTagName("html")[0].dir){o.textdirection=new c.TextDirectionButton();m+=o.textdirection.html(e+"_")}n.toolbar.innerHTML=m;n.theButtons=o}p.buttonsInitDone=true};c.addButton=function(e,i,h,g,d,j,k,l){var f;if(!e||!i){return}k=k||0;g=g||"";if(typeof(h)==="function"){f=new c.Button(e,i,d,j,l);f.callback=h}else{if(typeof(h)==="string"){f=new c.TagButton(e,i,h,g,d,j,l)}else{return}}if(k==-1){return f}if(k>0){while(typeof(edButtons[k])!="undefined"){k++}edButtons[k]=f}else{edButtons[edButtons.length]=f}if(this.buttonsInitDone){this._buttonsInit()}};c.insertContent=function(g){var h,f,e,i,j,d=document.getElementById(wpActiveEditor);if(!d){return false}if(document.selection){d.focus();h=document.selection.createRange();h.text=g;d.focus()}else{if(d.selectionStart||d.selectionStart=="0"){j=d.value;f=d.selectionStart;e=d.selectionEnd;i=d.scrollTop;d.value=j.substring(0,f)+g+j.substring(e,j.length);d.focus();d.selectionStart=f+g.length;d.selectionEnd=f+g.length;d.scrollTop=i}else{d.value+=g;d.focus()}}return true};c.Button=function(i,g,e,h,d){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||"";f.instance=d||""};c.Button.prototype.html=function(e){var d=this.access?' accesskey="'+this.access+'"':"";return'<input type="button" id="'+e+this.id+'"'+d+' class="ed_button" title="'+this.title+'" value="'+this.display+'" />'};c.Button.prototype.callback=function(){};c.TagButton=function(k,i,g,f,e,j,d){var h=this;c.Button.call(h,k,i,e,j,d);h.tagStart=g;h.tagEnd=f};c.TagButton.prototype=new c.Button();c.TagButton.prototype.openTag=function(g,d){var f=this;if(!d.openTags){d.openTags=[]}if(f.tagEnd){d.openTags.push(f.id);g.value="/"+g.value}};c.TagButton.prototype.closeTag=function(h,d){var g=this,f=g.isOpen(d);if(f!==false){d.openTags.splice(f,1)}h.value=g.display};c.TagButton.prototype.isOpen=function(d){var g=this,f=0,e=false;if(d.openTags){while(e===false&&f<d.openTags.length){e=d.openTags[f]==g.id?f:false;f++}}else{e=false}return e};c.TagButton.prototype.callback=function(o,h,p){var u=this,q,e,m,g,s=h.value,j,d,n,f,k=s?u.tagEnd:"";if(document.selection){h.focus();f=document.selection.createRange();if(f.text.length>0){if(!u.tagEnd){f.text=f.text+u.tagStart}else{f.text=u.tagStart+f.text+k}}else{if(!u.tagEnd){f.text=u.tagStart}else{if(u.isOpen(p)===false){f.text=u.tagStart;u.openTag(o,p)}else{f.text=k;u.closeTag(o,p)}}}h.focus()}else{if(h.selectionStart||h.selectionStart=="0"){q=h.selectionStart;e=h.selectionEnd;m=e;g=h.scrollTop;j=s.substring(0,q);d=s.substring(e,s.length);n=s.substring(q,e);if(q!=e){if(!u.tagEnd){h.value=j+n+u.tagStart+d;m+=u.tagStart.length}else{h.value=j+u.tagStart+n+k+d;m+=u.tagStart.length+k.length}}else{if(!u.tagEnd){h.value=j+u.tagStart+d;m=q+u.tagStart.length}else{if(u.isOpen(p)===false){h.value=j+u.tagStart+d;u.openTag(o,p);m=q+u.tagStart.length}else{h.value=j+k+d;m=q+k.length;u.closeTag(o,p)}}}h.focus();h.selectionStart=m;h.selectionEnd=m;h.scrollTop=g}else{if(!k){h.value+=u.tagStart}else{if(u.isOpen(p)!==false){h.value+=u.tagStart;u.openTag(o,p)}else{h.value+=k;u.closeTag(o,p)}}h.focus()}}};c.SpellButton=function(){};c.CloseButton=function(){c.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};c.CloseButton.prototype=new c.Button();c._close=function(i,j,d){var g,f,h=d.openTags;if(h){while(h.length>0){g=d.getButton(h[h.length-1]);f=document.getElementById(d.name+"_"+g.id);if(i){g.callback.call(g,f,j,d)}else{g.closeTag(f,d)}}}};c.CloseButton.prototype.callback=c._close;c.closeAllTags=function(e){var d=this.getInstance(e);c._close("",d.canvas,d)};c.LinkButton=function(){c.TagButton.call(this,"link","link","","</a>","a")};c.LinkButton.prototype=new c.TagButton();c.LinkButton.prototype.callback=function(i,j,g,f){var d,h=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!f){f="http://"}if(h.isOpen(g)===false){d=prompt(quicktagsL10n.enterURL,f);if(d){h.tagStart='<a href="'+d+'">';c.TagButton.prototype.callback.call(h,i,j,g)}}else{c.TagButton.prototype.callback.call(h,i,j,g)}};c.ImgButton=function(){c.TagButton.call(this,"img","img","","","m")};c.ImgButton.prototype=new c.TagButton();c.ImgButton.prototype.callback=function(h,j,f,d){if(!d){d="http://"}var i=prompt(quicktagsL10n.enterImageURL,d),g;if(i){g=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart='<img src="'+i+'" alt="'+g+'" />';c.TagButton.prototype.callback.call(this,h,j,f)}};c.FullscreenButton=function(){c.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};c.FullscreenButton.prototype=new c.Button();c.FullscreenButton.prototype.callback=function(d,f){if(!f.id||typeof(fullscreen)=="undefined"){return}fullscreen.on()};c.TextDirectionButton=function(){c.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)};c.TextDirectionButton.prototype=new c.Button();c.TextDirectionButton.prototype.callback=function(f,h){var d=("rtl"==document.getElementsByTagName("html")[0].dir),g=h.style.direction;if(!g){g=(d)?"rtl":"ltr"}h.style.direction=("rtl"==g)?"ltr":"rtl";h.focus()};edButtons[10]=new c.TagButton("strong","b","<strong>","</strong>","b");edButtons[20]=new c.TagButton("em","i","<em>","</em>","i"),edButtons[30]=new c.LinkButton(),edButtons[40]=new c.TagButton("block","b-quote","\n\n<blockquote>","</blockquote>\n\n","q"),edButtons[50]=new c.TagButton("del","del",'<del datetime="'+a+'">',"</del>","d"),edButtons[60]=new c.TagButton("ins","ins",'<ins datetime="'+a+'">',"</ins>","s"),edButtons[70]=new c.ImgButton(),edButtons[80]=new c.TagButton("ul","ul","<ul>\n","</ul>\n\n","u"),edButtons[90]=new c.TagButton("ol","ol","<ol>\n","</ol>\n\n","o"),edButtons[100]=new c.TagButton("li","li","\t<li>","</li>\n","l"),edButtons[110]=new c.TagButton("code","code","<code>","</code>","c"),edButtons[120]=new c.TagButton("more","more","<!--more-->","","t"),edButtons[140]=new c.CloseButton()})(); \ No newline at end of file
diff --git a/wp-includes/js/shortcode.js b/wp-includes/js/shortcode.js
deleted file mode 100644
index 0f83a445bc..0000000000
--- a/wp-includes/js/shortcode.js
+++ /dev/null
@@ -1,342 +0,0 @@
-// Utility functions for parsing and handling shortcodes in Javascript.
-
-// Ensure the global `wp` object exists.
-window.wp = window.wp || {};
-
-(function(){
- wp.shortcode = {
- // ### Find the next matching shortcode
- //
- // Given a shortcode `tag`, a block of `text`, and an optional starting
- // `index`, returns the next matching shortcode or `undefined`.
- //
- // Shortcodes are formatted as an object that contains the match
- // `content`, the matching `index`, and the parsed `shortcode` object.
- next: function( tag, text, index ) {
- var re = wp.shortcode.regexp( tag ),
- match, result;
-
- re.lastIndex = index || 0;
- match = re.exec( text );
-
- if ( ! match )
- return;
-
- // If we matched an escaped shortcode, try again.
- if ( match[1] === '[' && match[7] === ']' )
- return wp.shortcode.next( tag, text, re.lastIndex );
-
- result = {
- index: match.index,
- content: match[0],
- shortcode: wp.shortcode.fromMatch( match )
- };
-
- // If we matched a leading `[`, strip it from the match
- // and increment the index accordingly.
- if ( match[1] ) {
- result.match = result.match.slice( 1 );
- result.index++;
- }
-
- // If we matched a trailing `]`, strip it from the match.
- if ( match[7] )
- result.match = result.match.slice( 0, -1 );
-
- return result;
- },
-
- // ### Replace matching shortcodes in a block of text
- //
- // Accepts a shortcode `tag`, content `text` to scan, and a `callback`
- // to process the shortcode matches and return a replacement string.
- // Returns the `text` with all shortcodes replaced.
- //
- // Shortcode matches are objects that contain the shortcode `tag`,
- // a shortcode `attrs` object, the `content` between shortcode tags,
- // and a boolean flag to indicate if the match was a `single` tag.
- replace: function( tag, text, callback ) {
- return text.replace( wp.shortcode.regexp( tag ), function( match, left, tag, attrs, slash, content, closing, right, offset ) {
- // If both extra brackets exist, the shortcode has been
- // properly escaped.
- if ( left === '[' && right === ']' )
- return match;
-
- // Create the match object and pass it through the callback.
- var result = callback( wp.shortcode.fromMatch( arguments ) );
-
- // Make sure to return any of the extra brackets if they
- // weren't used to escape the shortcode.
- return result ? left + result + right : match;
- });
- },
-
- // ### Generate a string from shortcode parameters
- //
- // Creates a `wp.shortcode` instance and returns a string.
- //
- // Accepts the same `options` as the `wp.shortcode()` constructor,
- // containing a `tag` string, a string or object of `attrs`, a boolean
- // indicating whether to format the shortcode using a `single` tag, and a
- // `content` string.
- string: function( options ) {
- return new wp.shortcode( options ).string();
- },
-
- // ### Generate a RegExp to identify a shortcode
- //
- // The base regex is functionally equivalent to the one found in
- // `get_shortcode_regex()` in `wp-includes/shortcodes.php`.
- //
- // Capture groups:
- //
- // 1. An extra `[` to allow for escaping shortcodes with double `[[]]`
- // 2. The shortcode name
- // 3. The shortcode argument list
- // 4. The self closing `/`
- // 5. The content of a shortcode when it wraps some content.
- // 6. The closing tag.
- // 7. An extra `]` to allow for escaping shortcodes with double `[[]]`
- regexp: _.memoize( function( tag ) {
- return new RegExp( '\\[(\\[?)(' + tag + ')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' );
- }),
-
-
- // ### Parse shortcode attributes
- //
- // Shortcodes accept many types of attributes. These can chiefly be
- // divided into named and numeric attributes:
- //
- // Named attributes are assigned on a key/value basis, while numeric
- // attributes are treated as an array.
- //
- // Named attributes can be formatted as either `name="value"`,
- // `name='value'`, or `name=value`. Numeric attributes can be formatted
- // as `"value"` or just `value`.
- attrs: _.memoize( function( text ) {
- var named = {},
- numeric = [],
- pattern, match;
-
- // This regular expression is reused from `shortcode_parse_atts()`
- // in `wp-includes/shortcodes.php`.
- //
- // Capture groups:
- //
- // 1. An attribute name, that corresponds to...
- // 2. a value in double quotes.
- // 3. An attribute name, that corresponds to...
- // 4. a value in single quotes.
- // 5. An attribute name, that corresponds to...
- // 6. an unquoted value.
- // 7. A numeric attribute in double quotes.
- // 8. An unquoted numeric attribute.
- pattern = /(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g;
-
- // Map zero-width spaces to actual spaces.
- text = text.replace( /[\u00a0\u200b]/g, ' ' );
-
- // Match and normalize attributes.
- while ( (match = pattern.exec( text )) ) {
- if ( match[1] ) {
- named[ match[1].toLowerCase() ] = match[2];
- } else if ( match[3] ) {
- named[ match[3].toLowerCase() ] = match[4];
- } else if ( match[5] ) {
- named[ match[5].toLowerCase() ] = match[6];
- } else if ( match[7] ) {
- numeric.push( match[7] );
- } else if ( match[8] ) {
- numeric.push( match[8] );
- }
- }
-
- return {
- named: named,
- numeric: numeric
- };
- }),
-
- // ### Generate a Shortcode Object from a RegExp match
- // Accepts a `match` object from calling `regexp.exec()` on a `RegExp`
- // generated by `wp.shortcode.regexp()`. `match` can also be set to the
- // `arguments` from a callback passed to `regexp.replace()`.
- fromMatch: function( match ) {
- var type;
-
- if ( match[4] )
- type = 'self-closing';
- else if ( match[6] )
- type = 'closed';
- else
- type = 'single';
-
- return new wp.shortcode({
- tag: match[2],
- attrs: match[3],
- type: type,
- content: match[5]
- });
- }
- };
-
-
- // Shortcode Objects
- // -----------------
- //
- // Shortcode objects are generated automatically when using the main
- // `wp.shortcode` methods: `next()`, `replace()`, and `string()`.
- //
- // To access a raw representation of a shortcode, pass an `options` object,
- // containing a `tag` string, a string or object of `attrs`, a string
- // indicating the `type` of the shortcode ('single', 'self-closing', or
- // 'closed'), and a `content` string.
- wp.shortcode = _.extend( function( options ) {
- _.extend( this, _.pick( options || {}, 'tag', 'attrs', 'type', 'content' ) );
-
- var attrs = this.attrs;
-
- // Ensure we have a correctly formatted `attrs` object.
- this.attrs = {
- named: {},
- numeric: []
- };
-
- if ( ! attrs )
- return;
-
- // Parse a string of attributes.
- if ( _.isString( attrs ) ) {
- this.attrs = wp.shortcode.attrs( attrs );
-
- // Identify a correctly formatted `attrs` object.
- } else if ( _.isEqual( _.keys( attrs ), [ 'named', 'numeric' ] ) ) {
- this.attrs = attrs;
-
- // Handle a flat object of attributes.
- } else {
- _.each( options.attrs, function( value, key ) {
- this.set( key, value );
- }, this );
- }
- }, wp.shortcode );
-
- _.extend( wp.shortcode.prototype, {
- // ### Get a shortcode attribute
- //
- // Automatically detects whether `attr` is named or numeric and routes
- // it accordingly.
- get: function( attr ) {
- return this.attrs[ _.isNumber( attr ) ? 'numeric' : 'named' ][ attr ];
- },
-
- // ### Set a shortcode attribute
- //
- // Automatically detects whether `attr` is named or numeric and routes
- // it accordingly.
- set: function( attr, value ) {
- this.attrs[ _.isNumber( attr ) ? 'numeric' : 'named' ][ attr ] = value;
- return this;
- },
-
- // ### Transform the shortcode match into a string
- string: function() {
- var text = '[' + this.tag;
-
- _.each( this.attrs.numeric, function( value ) {
- if ( /\s/.test( value ) )
- text += ' "' + value + '"';
- else
- text += ' ' + value;
- });
-
- _.each( this.attrs.named, function( value, name ) {
- text += ' ' + name + '="' + value + '"';
- });
-
- // If the tag is marked as `single` or `self-closing`, close the
- // tag and ignore any additional content.
- if ( 'single' === this.type )
- return text + ']';
- else if ( 'self-closing' === this.type )
- return text + ' /]';
-
- // Complete the opening tag.
- text += ']';
-
- if ( this.content )
- text += this.content;
-
- // Add the closing tag.
- return text + '[/' + this.tag + ']';
- }
- });
-}());
-
-// HTML utility functions
-// ----------------------
-//
-// Experimental. These functions may change or be removed in the future.
-(function(){
- wp.html = _.extend( wp.html || {}, {
- // ### Parse HTML attributes.
- //
- // Converts `content` to a set of parsed HTML attributes.
- // Utilizes `wp.shortcode.attrs( content )`, which is a valid superset of
- // the HTML attribute specification. Reformats the attributes into an
- // object that contains the `attrs` with `key:value` mapping, and a record
- // of the attributes that were entered using `empty` attribute syntax (i.e.
- // with no value).
- attrs: function( content ) {
- var result, attrs;
-
- // If `content` ends in a slash, strip it.
- if ( '/' === content[ content.length - 1 ] )
- content = content.slice( 0, -1 );
-
- result = wp.shortcode.attrs( content );
- attrs = result.named;
-
- _.each( result.numeric, function( key ) {
- if ( /\s/.test( key ) )
- return;
-
- attrs[ key ] = '';
- });
-
- return attrs;
- },
-
- // ### Convert an HTML-representation of an object to a string.
- string: function( options ) {
- var text = '<' + options.tag,
- content = options.content || '';
-
- _.each( options.attrs, function( value, attr ) {
- text += ' ' + attr;
-
- // Use empty attribute notation where possible.
- if ( '' === value )
- return;
-
- // Convert boolean values to strings.
- if ( _.isBoolean( value ) )
- value = value ? 'true' : 'false';
-
- text += '="' + value + '"';
- });
-
- // Return the result if it is a self-closing tag.
- if ( options.single )
- return text + ' />';
-
- // Complete the opening tag.
- text += '>';
-
- // If `content` is an object, recursively call this function.
- text += _.isObject( content ) ? wp.html.string( content ) : content;
-
- return text + '</' + options.tag + '>';
- }
- });
-}()); \ No newline at end of file
diff --git a/wp-includes/js/shortcode.min.js b/wp-includes/js/shortcode.min.js
deleted file mode 100644
index a3d9671943..0000000000
--- a/wp-includes/js/shortcode.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(){wp.shortcode={next:function(b,f,d){var e=wp.shortcode.regexp(b),c,a;e.lastIndex=d||0;c=e.exec(f);if(!c){return}if(c[1]==="["&&c[7]==="]"){return wp.shortcode.next(b,f,e.lastIndex)}a={index:c.index,content:c[0],shortcode:wp.shortcode.fromMatch(c)};if(c[1]){a.match=a.match.slice(1);a.index++}if(c[7]){a.match=a.match.slice(0,-1)}return a},replace:function(a,b,c){return b.replace(wp.shortcode.regexp(a),function(h,d,m,k,g,i,e,j,f){if(d==="["&&j==="]"){return h}var l=c(wp.shortcode.fromMatch(arguments));return l?d+l+j:h})},string:function(a){return new wp.shortcode(a).string()},regexp:_.memoize(function(a){return new RegExp("\\[(\\[?)("+a+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(e){var a={},c=[],d,b;d=/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");while((b=d.exec(e))){if(b[1]){a[b[1].toLowerCase()]=b[2]}else{if(b[3]){a[b[3].toLowerCase()]=b[4]}else{if(b[5]){a[b[5].toLowerCase()]=b[6]}else{if(b[7]){c.push(b[7])}else{if(b[8]){c.push(b[8])}}}}}}return{named:a,numeric:c}}),fromMatch:function(a){var b;if(a[4]){b="self-closing"}else{if(a[6]){b="closed"}else{b="single"}}return new wp.shortcode({tag:a[2],attrs:a[3],type:b,content:a[5]})}};wp.shortcode=_.extend(function(b){_.extend(this,_.pick(b||{},"tag","attrs","type","content"));var a=this.attrs;this.attrs={named:{},numeric:[]};if(!a){return}if(_.isString(a)){this.attrs=wp.shortcode.attrs(a)}else{if(_.isEqual(_.keys(a),["named","numeric"])){this.attrs=a}else{_.each(b.attrs,function(d,c){this.set(c,d)},this)}}},wp.shortcode);_.extend(wp.shortcode.prototype,{get:function(a){return this.attrs[_.isNumber(a)?"numeric":"named"][a]},set:function(a,b){this.attrs[_.isNumber(a)?"numeric":"named"][a]=b;return this},string:function(){var a="["+this.tag;_.each(this.attrs.numeric,function(b){if(/\s/.test(b)){a+=' "'+b+'"'}else{a+=" "+b}});_.each(this.attrs.named,function(c,b){a+=" "+b+'="'+c+'"'});if("single"===this.type){return a+"]"}else{if("self-closing"===this.type){return a+" /]"}}a+="]";if(this.content){a+=this.content}return a+"[/"+this.tag+"]"}})}());(function(){wp.html=_.extend(wp.html||{},{attrs:function(c){var a,b;if("/"===c[c.length-1]){c=c.slice(0,-1)}a=wp.shortcode.attrs(c);b=a.named;_.each(a.numeric,function(d){if(/\s/.test(d)){return}b[d]=""});return b},string:function(a){var c="<"+a.tag,b=a.content||"";_.each(a.attrs,function(e,d){c+=" "+d;if(""===e){return}if(_.isBoolean(e)){e=e?"true":"false"}c+='="'+e+'"'});if(a.single){return c+" />"}c+=">";c+=_.isObject(b)?wp.html.string(b):b;return c+"</"+a.tag+">"}})}()); \ No newline at end of file
diff --git a/wp-includes/js/swfobject.js b/wp-includes/js/swfobject.js
deleted file mode 100644
index 87e61553b3..0000000000
--- a/wp-includes/js/swfobject.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+encodeURI(O.location).toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); \ No newline at end of file
diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js
deleted file mode 100644
index f38172c38d..0000000000
--- a/wp-includes/js/swfupload/handlers.js
+++ /dev/null
@@ -1,375 +0,0 @@
-var topWin = window.dialogArguments || opener || parent || top;
-
-function fileDialogStart() {
- jQuery("#media-upload-error").empty();
-}
-
-// progress and success handlers for media multi uploads
-function fileQueued(fileObj) {
- // Get rid of unused form
- jQuery('.media-blank').remove();
- // Collapse a single item
- if ( jQuery('form.type-form #media-items').children().length == 1 && jQuery('.hidden', '#media-items').length > 0 ) {
- jQuery('.describe-toggle-on').show();
- jQuery('.describe-toggle-off').hide();
- jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
- }
- // Create a progress bar containing the filename
- jQuery('<div class="media-item">')
- .attr( 'id', 'media-item-' + fileObj.id )
- .addClass('child-of-' + post_id)
- .append('<div class="progress"><div class="bar"></div></div>',
- jQuery('<div class="filename original"><span class="percent"></span>').text( ' ' + fileObj.name ))
- .appendTo( jQuery('#media-items' ) );
- // Display the progress div
- jQuery('.progress', '#media-item-' + fileObj.id).show();
-
- // Disable submit and enable cancel
- jQuery('#insert-gallery').prop('disabled', true);
- jQuery('#cancel-upload').prop('disabled', false);
-}
-
-function uploadStart(fileObj) {
- try {
- if ( typeof topWin.tb_remove != 'undefined' )
- topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
- } catch(e){}
-
- return true;
-}
-
-function uploadProgress(fileObj, bytesDone, bytesTotal) {
- // Lengthen the progress bar
- var w = jQuery('#media-items').width() - 2, item = jQuery('#media-item-' + fileObj.id);
- jQuery('.bar', item).width( w * bytesDone / bytesTotal );
- jQuery('.percent', item).html( Math.ceil(bytesDone / bytesTotal * 100) + '%' );
-
- if ( bytesDone == bytesTotal )
- jQuery('.bar', item).html('<strong class="crunching">' + swfuploadL10n.crunching + '</strong>');
-}
-
-function prepareMediaItem(fileObj, serverData) {
- var f = ( typeof shortform == 'undefined' ) ? 1 : 2, item = jQuery('#media-item-' + fileObj.id);
- // Move the progress bar to 100%
- jQuery('.bar', item).remove();
- jQuery('.progress', item).hide();
-
- try {
- if ( typeof topWin.tb_remove != 'undefined' )
- topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
- } catch(e){}
-
- // Old style: Append the HTML returned by the server -- thumbnail and form inputs
- if ( isNaN(serverData) || !serverData ) {
- item.append(serverData);
- prepareMediaItemInit(fileObj);
- }
- // New style: server data is just the attachment ID, fetch the thumbnail and form html from the server
- else {
- item.load('async-upload.php', {attachment_id:serverData, fetch:f}, function(){prepareMediaItemInit(fileObj);updateMediaForm()});
- }
-}
-
-function prepareMediaItemInit(fileObj) {
- var item = jQuery('#media-item-' + fileObj.id);
- // Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename
- jQuery('.thumbnail', item).clone().attr('class', 'pinkynail toggle').prependTo(item);
-
- // Replace the original filename with the new (unique) one assigned during upload
- jQuery('.filename.original', item).replaceWith( jQuery('.filename.new', item) );
-
- // Also bind toggle to the links
- jQuery('a.toggle', item).click(function(){
- jQuery(this).siblings('.slidetoggle').slideToggle(350, function(){
- var w = jQuery(window).height(), t = jQuery(this).offset().top, h = jQuery(this).height(), b;
-
- if ( w && t && h ) {
- b = t + h;
-
- if ( b > w && (h + 48) < w )
- window.scrollBy(0, b - w + 13);
- else if ( b > w )
- window.scrollTo(0, t - 36);
- }
- });
- jQuery(this).siblings('.toggle').andSelf().toggle();
- jQuery(this).siblings('a.toggle').focus();
- return false;
- });
-
- // Bind AJAX to the new Delete button
- jQuery('a.delete', item).click(function(){
- // Tell the server to delete it. TODO: handle exceptions
- jQuery.ajax({
- url: ajaxurl,
- type: 'post',
- success: deleteSuccess,
- error: deleteError,
- id: fileObj.id,
- data: {
- id : this.id.replace(/[^0-9]/g, ''),
- action : 'trash-post',
- _ajax_nonce : this.href.replace(/^.*wpnonce=/,'')
- }
- });
- return false;
- });
-
- // Bind AJAX to the new Undo button
- jQuery('a.undo', item).click(function(){
- // Tell the server to untrash it. TODO: handle exceptions
- jQuery.ajax({
- url: ajaxurl,
- type: 'post',
- id: fileObj.id,
- data: {
- id : this.id.replace(/[^0-9]/g,''),
- action: 'untrash-post',
- _ajax_nonce: this.href.replace(/^.*wpnonce=/,'')
- },
- success: function(data, textStatus){
- var item = jQuery('#media-item-' + fileObj.id);
-
- if ( type = jQuery('#type-of-' + fileObj.id).val() )
- jQuery('#' + type + '-counter').text(jQuery('#' + type + '-counter').text()-0+1);
- if ( item.hasClass('child-of-'+post_id) )
- jQuery('#attachments-count').text(jQuery('#attachments-count').text()-0+1);
-
- jQuery('.filename .trashnotice', item).remove();
- jQuery('.filename .title', item).css('font-weight','normal');
- jQuery('a.undo', item).addClass('hidden');
- jQuery('a.describe-toggle-on, .menu_order_input', item).show();
- item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('undo');
- }
- });
- return false;
- });
-
- // Open this item if it says to start open (e.g. to display an error)
- jQuery('#media-item-' + fileObj.id + '.startopen').removeClass('startopen').slideToggle(500).siblings('.toggle').toggle();
-}
-
-function itemAjaxError(id, html) {
- var item = jQuery('#media-item-' + id);
- var filename = jQuery('.filename', item).text();
-
- item.html('<div class="error-div">'
- + '<a class="dismiss" href="#">' + swfuploadL10n.dismiss + '</a>'
- + '<strong>' + swfuploadL10n.error_uploading.replace('%s', filename) + '</strong><br />'
- + html
- + '</div>');
- item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})});
-}
-
-function deleteSuccess(data, textStatus) {
- if ( data == '-1' )
- return itemAjaxError(this.id, 'You do not have permission. Has your session expired?');
- if ( data == '0' )
- return itemAjaxError(this.id, 'Could not be deleted. Has it been deleted already?');
-
- var id = this.id, item = jQuery('#media-item-' + id);
-
- // Decrement the counters.
- if ( type = jQuery('#type-of-' + id).val() )
- jQuery('#' + type + '-counter').text( jQuery('#' + type + '-counter').text() - 1 );
- if ( item.hasClass('child-of-'+post_id) )
- jQuery('#attachments-count').text( jQuery('#attachments-count').text() - 1 );
-
- if ( jQuery('form.type-form #media-items').children().length == 1 && jQuery('.hidden', '#media-items').length > 0 ) {
- jQuery('.toggle').toggle();
- jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
- }
-
- // Vanish it.
- jQuery('.toggle', item).toggle();
- jQuery('.slidetoggle', item).slideUp(200).siblings().removeClass('hidden');
- item.css( {backgroundColor:'#faa'} ).animate( {backgroundColor:'#f4f4f4'}, {queue:false, duration:500} ).addClass('undo');
-
- jQuery('.filename:empty', item).remove();
- jQuery('.filename .title', item).css('font-weight','bold');
- jQuery('.filename', item).append('<span class="trashnotice"> ' + swfuploadL10n.deleted + ' </span>').siblings('a.toggle').hide();
- jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') );
- jQuery('.menu_order_input', item).hide();
-
- return;
-}
-
-function deleteError(X, textStatus, errorThrown) {
- // TODO
-}
-
-function updateMediaForm() {
- var one = jQuery('form.type-form #media-items').children(), items = jQuery('#media-items').children();
-
- // Just one file, no need for collapsible part
- if ( one.length == 1 ) {
- jQuery('.slidetoggle', one).slideDown(500).siblings().addClass('hidden').filter('.toggle').toggle();
- }
-
- // Only show Save buttons when there is at least one file.
- if ( items.not('.media-blank').length > 0 )
- jQuery('.savebutton').show();
- else
- jQuery('.savebutton').hide();
-
- // Only show Gallery button when there are at least two files.
- if ( items.length > 1 )
- jQuery('.insert-gallery').show();
- else
- jQuery('.insert-gallery').hide();
-}
-
-function uploadSuccess(fileObj, serverData) {
- // if async-upload returned an error message, place it in the media item div and return
- if ( serverData.match('media-upload-error') ) {
- jQuery('#media-item-' + fileObj.id).html(serverData);
- return;
- }
-
- prepareMediaItem(fileObj, serverData);
- updateMediaForm();
-
- // Increment the counter.
- if ( jQuery('#media-item-' + fileObj.id).hasClass('child-of-' + post_id) )
- jQuery('#attachments-count').text(1 * jQuery('#attachments-count').text() + 1);
-}
-
-function uploadComplete(fileObj) {
- // If no more uploads queued, enable the submit button
- if ( swfu.getStats().files_queued == 0 ) {
- jQuery('#cancel-upload').prop('disabled', true);
- jQuery('#insert-gallery').prop('disabled', false);
- }
-}
-
-
-// wp-specific error handlers
-
-// generic message
-function wpQueueError(message) {
- jQuery('#media-upload-error').show().text(message);
-}
-
-// file-specific message
-function wpFileError(fileObj, message) {
- var item = jQuery('#media-item-' + fileObj.id);
- var filename = jQuery('.filename', item).text();
-
- item.html('<div class="error-div">'
- + '<a class="dismiss" href="#">' + swfuploadL10n.dismiss + '</a>'
- + '<strong>' + swfuploadL10n.error_uploading.replace('%s', filename) + '</strong><br />'
- + message
- + '</div>');
- item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})});
-}
-
-function fileQueueError(fileObj, error_code, message) {
- // Handle this error separately because we don't want to create a FileProgress element for it.
- if ( error_code == SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED ) {
- wpQueueError(swfuploadL10n.queue_limit_exceeded);
- }
- else if ( error_code == SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT ) {
- fileQueued(fileObj);
- wpFileError(fileObj, swfuploadL10n.file_exceeds_size_limit);
- }
- else if ( error_code == SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE ) {
- fileQueued(fileObj);
- wpFileError(fileObj, swfuploadL10n.zero_byte_file);
- }
- else if ( error_code == SWFUpload.QUEUE_ERROR.INVALID_FILETYPE ) {
- fileQueued(fileObj);
- wpFileError(fileObj, swfuploadL10n.invalid_filetype);
- }
- else {
- wpQueueError(swfuploadL10n.default_error);
- }
-}
-
-function fileDialogComplete(num_files_queued) {
- try {
- if (num_files_queued > 0) {
- this.startUpload();
- }
- } catch (ex) {
- this.debug(ex);
- }
-}
-
-function switchUploader(s) {
- var f = document.getElementById(swfu.customSettings.swfupload_element_id), h = document.getElementById(swfu.customSettings.degraded_element_id);
- if ( s ) {
- f.style.display = 'block';
- h.style.display = 'none';
- } else {
- f.style.display = 'none';
- h.style.display = 'block';
- }
-}
-
-function swfuploadPreLoad() {
- if ( !uploaderMode ) {
- switchUploader(1);
- } else {
- switchUploader(0);
- }
-}
-
-function swfuploadLoadFailed() {
- switchUploader(0);
- jQuery('.upload-html-bypass').hide();
-}
-
-function uploadError(fileObj, errorCode, message) {
-
- switch (errorCode) {
- case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
- wpFileError(fileObj, swfuploadL10n.missing_upload_url);
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
- wpFileError(fileObj, swfuploadL10n.upload_limit_exceeded);
- break;
- case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
- wpQueueError(swfuploadL10n.http_error);
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
- wpQueueError(swfuploadL10n.upload_failed);
- break;
- case SWFUpload.UPLOAD_ERROR.IO_ERROR:
- wpQueueError(swfuploadL10n.io_error);
- break;
- case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
- wpQueueError(swfuploadL10n.security_error);
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
- case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
- jQuery('#media-item-' + fileObj.id).remove();
- break;
- default:
- wpFileError(fileObj, swfuploadL10n.default_error);
- }
-}
-
-function cancelUpload() {
- swfu.cancelQueue();
-}
-
-// remember the last used image size, alignment and url
-jQuery(document).ready(function($){
- $('input[type="radio"]', '#media-items').live('click', function(){
- var tr = $(this).closest('tr');
-
- if ( $(tr).hasClass('align') )
- setUserSetting('align', $(this).val());
- else if ( $(tr).hasClass('image-size') )
- setUserSetting('imgsize', $(this).val());
- });
-
- $('button.button', '#media-items').live('click', function(){
- var c = this.className || '';
- c = c.match(/url([^ '"]+)/);
- if ( c && c[1] ) {
- setUserSetting('urlbutton', c[1]);
- $(this).siblings('.urlfield').val( $(this).attr('title') );
- }
- });
-});
diff --git a/wp-includes/js/swfupload/handlers.min.js b/wp-includes/js/swfupload/handlers.min.js
deleted file mode 100644
index 5aaa8ee2d9..0000000000
--- a/wp-includes/js/swfupload/handlers.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery('<div class="media-item">').attr("id","media-item-"+a.id).addClass("child-of-"+post_id).append('<div class="progress"><div class="bar"></div></div>',jQuery('<div class="filename original"><span class="percent"></span>').text(" "+a.name)).appendTo(jQuery("#media-items"));jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").prop("disabled",true);jQuery("#cancel-upload").prop("disabled",false)}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(d,b){var c=jQuery("#media-item-"+d);var a=jQuery(".filename",c).text();c.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",a)+"</strong><br />"+b+"</div>");c.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").prop("disabled",true);jQuery("#insert-gallery").prop("disabled",false)}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(d,c){var b=jQuery("#media-item-"+d.id);var a=jQuery(".filename",b).text();b.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",a)+"</strong><br />"+c+"</div>");b.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); \ No newline at end of file
diff --git a/wp-includes/js/swfupload/license.txt b/wp-includes/js/swfupload/license.txt
deleted file mode 100644
index 8252ca9e24..0000000000
--- a/wp-includes/js/swfupload/license.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
- *
- * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
- *
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-
-The MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/wp-includes/js/swfupload/plugins/swfupload.cookies.js b/wp-includes/js/swfupload/plugins/swfupload.cookies.js
deleted file mode 100644
index dd3b78bbcf..0000000000
--- a/wp-includes/js/swfupload/plugins/swfupload.cookies.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- Cookie Plug-in
-
- This plug in automatically gets all the cookies for this site and adds them to the post_params.
- Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params.
- The cookies will override any other post params with the same name.
-*/
-
-var SWFUpload;
-if (typeof(SWFUpload) === "function") {
- SWFUpload.prototype.initSettings = function (oldInitSettings) {
- return function () {
- if (typeof(oldInitSettings) === "function") {
- oldInitSettings.call(this);
- }
-
- this.refreshCookies(false); // The false parameter must be sent since SWFUpload has not initialzed at this point
- };
- }(SWFUpload.prototype.initSettings);
-
- // refreshes the post_params and updates SWFUpload. The sendToFlash parameters is optional and defaults to True
- SWFUpload.prototype.refreshCookies = function (sendToFlash) {
- if (sendToFlash === undefined) {
- sendToFlash = true;
- }
- sendToFlash = !!sendToFlash;
-
- // Get the post_params object
- var postParams = this.settings.post_params;
-
- // Get the cookies
- var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value;
- for (i = 0; i < caLength; i++) {
- c = cookieArray[i];
-
- // Left Trim spaces
- while (c.charAt(0) === " ") {
- c = c.substring(1, c.length);
- }
- eqIndex = c.indexOf("=");
- if (eqIndex > 0) {
- name = c.substring(0, eqIndex);
- value = c.substring(eqIndex + 1);
- postParams[name] = value;
- }
- }
-
- if (sendToFlash) {
- this.setPostParams(postParams);
- }
- };
-
-}
diff --git a/wp-includes/js/swfupload/plugins/swfupload.queue.js b/wp-includes/js/swfupload/plugins/swfupload.queue.js
deleted file mode 100644
index f09933e387..0000000000
--- a/wp-includes/js/swfupload/plugins/swfupload.queue.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- Queue Plug-in
-
- Features:
- *Adds a cancelQueue() method for cancelling the entire queue.
- *All queued files are uploaded when startUpload() is called.
- *If false is returned from uploadComplete then the queue upload is stopped.
- If false is not returned (strict comparison) then the queue upload is continued.
- *Adds a QueueComplete event that is fired when all the queued files have finished uploading.
- Set the event handler with the queue_complete_handler setting.
-
- */
-
-var SWFUpload;
-if (typeof(SWFUpload) === "function") {
- SWFUpload.queue = {};
-
- SWFUpload.prototype.initSettings = (function (oldInitSettings) {
- return function () {
- if (typeof(oldInitSettings) === "function") {
- oldInitSettings.call(this);
- }
-
- this.queueSettings = {};
-
- this.queueSettings.queue_cancelled_flag = false;
- this.queueSettings.queue_upload_count = 0;
-
- this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
- this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
- this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
- this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
-
- this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
- };
- })(SWFUpload.prototype.initSettings);
-
- SWFUpload.prototype.startUpload = function (fileID) {
- this.queueSettings.queue_cancelled_flag = false;
- this.callFlash("StartUpload", [fileID]);
- };
-
- SWFUpload.prototype.cancelQueue = function () {
- this.queueSettings.queue_cancelled_flag = true;
- this.stopUpload();
-
- var stats = this.getStats();
- while (stats.files_queued > 0) {
- this.cancelUpload();
- stats = this.getStats();
- }
- };
-
- SWFUpload.queue.uploadStartHandler = function (file) {
- var returnValue;
- if (typeof(this.queueSettings.user_upload_start_handler) === "function") {
- returnValue = this.queueSettings.user_upload_start_handler.call(this, file);
- }
-
- // To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value.
- returnValue = (returnValue === false) ? false : true;
-
- this.queueSettings.queue_cancelled_flag = !returnValue;
-
- return returnValue;
- };
-
- SWFUpload.queue.uploadCompleteHandler = function (file) {
- var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
- var continueUpload;
-
- if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
- this.queueSettings.queue_upload_count++;
- }
-
- if (typeof(user_upload_complete_handler) === "function") {
- continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
- } else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
- // If the file was stopped and re-queued don't restart the upload
- continueUpload = false;
- } else {
- continueUpload = true;
- }
-
- if (continueUpload) {
- var stats = this.getStats();
- if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) {
- this.startUpload();
- } else if (this.queueSettings.queue_cancelled_flag === false) {
- this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
- this.queueSettings.queue_upload_count = 0;
- } else {
- this.queueSettings.queue_cancelled_flag = false;
- this.queueSettings.queue_upload_count = 0;
- }
- }
- };
-}
diff --git a/wp-includes/js/swfupload/plugins/swfupload.speed.js b/wp-includes/js/swfupload/plugins/swfupload.speed.js
deleted file mode 100644
index 3245c9c7db..0000000000
--- a/wp-includes/js/swfupload/plugins/swfupload.speed.js
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- Speed Plug-in
-
- Features:
- *Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc.
- - currentSpeed -- String indicating the upload speed, bytes per second
- - averageSpeed -- Overall average upload speed, bytes per second
- - movingAverageSpeed -- Speed over averaged over the last several measurements, bytes per second
- - timeRemaining -- Estimated remaining upload time in seconds
- - timeElapsed -- Number of seconds passed for this upload
- - percentUploaded -- Percentage of the file uploaded (0 to 100)
- - sizeUploaded -- Formatted size uploaded so far, bytes
-
- *Adds setting 'moving_average_history_size' for defining the window size used to calculate the moving average speed.
-
- *Adds several Formatting functions for formatting that values provided on the file object.
- - SWFUpload.speed.formatBPS(bps) -- outputs string formatted in the best units (Gbps, Mbps, Kbps, bps)
- - SWFUpload.speed.formatTime(seconds) -- outputs string formatted in the best units (x Hr y M z S)
- - SWFUpload.speed.formatSize(bytes) -- outputs string formatted in the best units (w GB x MB y KB z B )
- - SWFUpload.speed.formatPercent(percent) -- outputs string formatted with a percent sign (x.xx %)
- - SWFUpload.speed.formatUnits(baseNumber, divisionArray, unitLabelArray, fractionalBoolean)
- - Formats a number using the division array to determine how to apply the labels in the Label Array
- - factionalBoolean indicates whether the number should be returned as a single fractional number with a unit (speed)
- or as several numbers labeled with units (time)
- */
-
-var SWFUpload;
-if (typeof(SWFUpload) === "function") {
- SWFUpload.speed = {};
-
- SWFUpload.prototype.initSettings = (function (oldInitSettings) {
- return function () {
- if (typeof(oldInitSettings) === "function") {
- oldInitSettings.call(this);
- }
-
- this.ensureDefault = function (settingName, defaultValue) {
- this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
- };
-
- // List used to keep the speed stats for the files we are tracking
- this.fileSpeedStats = {};
- this.speedSettings = {};
-
- this.ensureDefault("moving_average_history_size", "10");
-
- this.speedSettings.user_file_queued_handler = this.settings.file_queued_handler;
- this.speedSettings.user_file_queue_error_handler = this.settings.file_queue_error_handler;
- this.speedSettings.user_upload_start_handler = this.settings.upload_start_handler;
- this.speedSettings.user_upload_error_handler = this.settings.upload_error_handler;
- this.speedSettings.user_upload_progress_handler = this.settings.upload_progress_handler;
- this.speedSettings.user_upload_success_handler = this.settings.upload_success_handler;
- this.speedSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
-
- this.settings.file_queued_handler = SWFUpload.speed.fileQueuedHandler;
- this.settings.file_queue_error_handler = SWFUpload.speed.fileQueueErrorHandler;
- this.settings.upload_start_handler = SWFUpload.speed.uploadStartHandler;
- this.settings.upload_error_handler = SWFUpload.speed.uploadErrorHandler;
- this.settings.upload_progress_handler = SWFUpload.speed.uploadProgressHandler;
- this.settings.upload_success_handler = SWFUpload.speed.uploadSuccessHandler;
- this.settings.upload_complete_handler = SWFUpload.speed.uploadCompleteHandler;
-
- delete this.ensureDefault;
- };
- })(SWFUpload.prototype.initSettings);
-
-
- SWFUpload.speed.fileQueuedHandler = function (file) {
- if (typeof this.speedSettings.user_file_queued_handler === "function") {
- file = SWFUpload.speed.extendFile(file);
-
- return this.speedSettings.user_file_queued_handler.call(this, file);
- }
- };
-
- SWFUpload.speed.fileQueueErrorHandler = function (file, errorCode, message) {
- if (typeof this.speedSettings.user_file_queue_error_handler === "function") {
- file = SWFUpload.speed.extendFile(file);
-
- return this.speedSettings.user_file_queue_error_handler.call(this, file, errorCode, message);
- }
- };
-
- SWFUpload.speed.uploadStartHandler = function (file) {
- if (typeof this.speedSettings.user_upload_start_handler === "function") {
- file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
- return this.speedSettings.user_upload_start_handler.call(this, file);
- }
- };
-
- SWFUpload.speed.uploadErrorHandler = function (file, errorCode, message) {
- file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
- SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
-
- if (typeof this.speedSettings.user_upload_error_handler === "function") {
- return this.speedSettings.user_upload_error_handler.call(this, file, errorCode, message);
- }
- };
- SWFUpload.speed.uploadProgressHandler = function (file, bytesComplete, bytesTotal) {
- this.updateTracking(file, bytesComplete);
- file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
-
- if (typeof this.speedSettings.user_upload_progress_handler === "function") {
- return this.speedSettings.user_upload_progress_handler.call(this, file, bytesComplete, bytesTotal);
- }
- };
-
- SWFUpload.speed.uploadSuccessHandler = function (file, serverData) {
- if (typeof this.speedSettings.user_upload_success_handler === "function") {
- file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
- return this.speedSettings.user_upload_success_handler.call(this, file, serverData);
- }
- };
- SWFUpload.speed.uploadCompleteHandler = function (file) {
- file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
- SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
-
- if (typeof this.speedSettings.user_upload_complete_handler === "function") {
- return this.speedSettings.user_upload_complete_handler.call(this, file);
- }
- };
-
- // Private: extends the file object with the speed plugin values
- SWFUpload.speed.extendFile = function (file, trackingList) {
- var tracking;
-
- if (trackingList) {
- tracking = trackingList[file.id];
- }
-
- if (tracking) {
- file.currentSpeed = tracking.currentSpeed;
- file.averageSpeed = tracking.averageSpeed;
- file.movingAverageSpeed = tracking.movingAverageSpeed;
- file.timeRemaining = tracking.timeRemaining;
- file.timeElapsed = tracking.timeElapsed;
- file.percentUploaded = tracking.percentUploaded;
- file.sizeUploaded = tracking.bytesUploaded;
-
- } else {
- file.currentSpeed = 0;
- file.averageSpeed = 0;
- file.movingAverageSpeed = 0;
- file.timeRemaining = 0;
- file.timeElapsed = 0;
- file.percentUploaded = 0;
- file.sizeUploaded = 0;
- }
-
- return file;
- };
-
- // Private: Updates the speed tracking object, or creates it if necessary
- SWFUpload.prototype.updateTracking = function (file, bytesUploaded) {
- var tracking = this.fileSpeedStats[file.id];
- if (!tracking) {
- this.fileSpeedStats[file.id] = tracking = {};
- }
-
- // Sanity check inputs
- bytesUploaded = bytesUploaded || tracking.bytesUploaded || 0;
- if (bytesUploaded < 0) {
- bytesUploaded = 0;
- }
- if (bytesUploaded > file.size) {
- bytesUploaded = file.size;
- }
-
- var tickTime = (new Date()).getTime();
- if (!tracking.startTime) {
- tracking.startTime = (new Date()).getTime();
- tracking.lastTime = tracking.startTime;
- tracking.currentSpeed = 0;
- tracking.averageSpeed = 0;
- tracking.movingAverageSpeed = 0;
- tracking.movingAverageHistory = [];
- tracking.timeRemaining = 0;
- tracking.timeElapsed = 0;
- tracking.percentUploaded = bytesUploaded / file.size;
- tracking.bytesUploaded = bytesUploaded;
- } else if (tracking.startTime > tickTime) {
- this.debug("When backwards in time");
- } else {
- // Get time and deltas
- var now = (new Date()).getTime();
- var lastTime = tracking.lastTime;
- var deltaTime = now - lastTime;
- var deltaBytes = bytesUploaded - tracking.bytesUploaded;
-
- if (deltaBytes === 0 || deltaTime === 0) {
- return tracking;
- }
-
- // Update tracking object
- tracking.lastTime = now;
- tracking.bytesUploaded = bytesUploaded;
-
- // Calculate speeds
- tracking.currentSpeed = (deltaBytes * 8 ) / (deltaTime / 1000);
- tracking.averageSpeed = (tracking.bytesUploaded * 8) / ((now - tracking.startTime) / 1000);
-
- // Calculate moving average
- tracking.movingAverageHistory.push(tracking.currentSpeed);
- if (tracking.movingAverageHistory.length > this.settings.moving_average_history_size) {
- tracking.movingAverageHistory.shift();
- }
-
- tracking.movingAverageSpeed = SWFUpload.speed.calculateMovingAverage(tracking.movingAverageHistory);
-
- // Update times
- tracking.timeRemaining = (file.size - tracking.bytesUploaded) * 8 / tracking.movingAverageSpeed;
- tracking.timeElapsed = (now - tracking.startTime) / 1000;
-
- // Update percent
- tracking.percentUploaded = (tracking.bytesUploaded / file.size * 100);
- }
-
- return tracking;
- };
- SWFUpload.speed.removeTracking = function (file, trackingList) {
- try {
- trackingList[file.id] = null;
- delete trackingList[file.id];
- } catch (ex) {
- }
- };
-
- SWFUpload.speed.formatUnits = function (baseNumber, unitDivisors, unitLabels, singleFractional) {
- var i, unit, unitDivisor, unitLabel;
-
- if (baseNumber === 0) {
- return "0 " + unitLabels[unitLabels.length - 1];
- }
-
- if (singleFractional) {
- unit = baseNumber;
- unitLabel = unitLabels.length >= unitDivisors.length ? unitLabels[unitDivisors.length - 1] : "";
- for (i = 0; i < unitDivisors.length; i++) {
- if (baseNumber >= unitDivisors[i]) {
- unit = (baseNumber / unitDivisors[i]).toFixed(2);
- unitLabel = unitLabels.length >= i ? " " + unitLabels[i] : "";
- break;
- }
- }
-
- return unit + unitLabel;
- } else {
- var formattedStrings = [];
- var remainder = baseNumber;
-
- for (i = 0; i < unitDivisors.length; i++) {
- unitDivisor = unitDivisors[i];
- unitLabel = unitLabels.length > i ? " " + unitLabels[i] : "";
-
- unit = remainder / unitDivisor;
- if (i < unitDivisors.length -1) {
- unit = Math.floor(unit);
- } else {
- unit = unit.toFixed(2);
- }
- if (unit > 0) {
- remainder = remainder % unitDivisor;
-
- formattedStrings.push(unit + unitLabel);
- }
- }
-
- return formattedStrings.join(" ");
- }
- };
-
- SWFUpload.speed.formatBPS = function (baseNumber) {
- var bpsUnits = [1073741824, 1048576, 1024, 1], bpsUnitLabels = ["Gbps", "Mbps", "Kbps", "bps"];
- return SWFUpload.speed.formatUnits(baseNumber, bpsUnits, bpsUnitLabels, true);
-
- };
- SWFUpload.speed.formatTime = function (baseNumber) {
- var timeUnits = [86400, 3600, 60, 1], timeUnitLabels = ["d", "h", "m", "s"];
- return SWFUpload.speed.formatUnits(baseNumber, timeUnits, timeUnitLabels, false);
-
- };
- SWFUpload.speed.formatBytes = function (baseNumber) {
- var sizeUnits = [1073741824, 1048576, 1024, 1], sizeUnitLabels = ["GB", "MB", "KB", "bytes"];
- return SWFUpload.speed.formatUnits(baseNumber, sizeUnits, sizeUnitLabels, true);
-
- };
- SWFUpload.speed.formatPercent = function (baseNumber) {
- return baseNumber.toFixed(2) + " %";
- };
-
- SWFUpload.speed.calculateMovingAverage = function (history) {
- var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
- var i;
- var mSum = 0, mCount = 0;
-
- size = history.length;
-
- // Check for sufficient data
- if (size >= 8) {
- // Clone the array and Calculate sum of the values
- for (i = 0; i < size; i++) {
- vals[i] = history[i];
- sum += vals[i];
- }
-
- mean = sum / size;
-
- // Calculate variance for the set
- for (i = 0; i < size; i++) {
- varianceTemp += Math.pow((vals[i] - mean), 2);
- }
-
- variance = varianceTemp / size;
- standardDev = Math.sqrt(variance);
-
- //Standardize the Data
- for (i = 0; i < size; i++) {
- vals[i] = (vals[i] - mean) / standardDev;
- }
-
- // Calculate the average excluding outliers
- var deviationRange = 2.0;
- for (i = 0; i < size; i++) {
-
- if (vals[i] <= deviationRange && vals[i] >= -deviationRange) {
- mCount++;
- mSum += history[i];
- }
- }
-
- } else {
- // Calculate the average (not enough data points to remove outliers)
- mCount = size;
- for (i = 0; i < size; i++) {
- mSum += history[i];
- }
- }
-
- return mSum / mCount;
- };
-
-} \ No newline at end of file
diff --git a/wp-includes/js/swfupload/plugins/swfupload.swfobject.js b/wp-includes/js/swfupload/plugins/swfupload.swfobject.js
deleted file mode 100644
index cb7aa8043d..0000000000
--- a/wp-includes/js/swfupload/plugins/swfupload.swfobject.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- SWFUpload.SWFObject Plugin
-
- Summary:
- This plugin uses SWFObject to embed SWFUpload dynamically in the page. SWFObject provides accurate Flash Player detection and DOM Ready loading.
- This plugin replaces the Graceful Degradation plugin.
-
- Features:
- * swfupload_load_failed_hander event
- * swfupload_pre_load_handler event
- * minimum_flash_version setting (default: "9.0.28")
- * SWFUpload.onload event for early loading
-
- Usage:
- Provide handlers and settings as needed. When using the SWFUpload.SWFObject plugin you should initialize SWFUploading
- in SWFUpload.onload rather than in window.onload. When initialized this way SWFUpload can load earlier preventing the UI flicker
- that was seen using the Graceful Degradation plugin.
-
- <script type="text/javascript">
- var swfu;
- SWFUpload.onload = function () {
- swfu = new SWFUpload({
- minimum_flash_version: "9.0.28",
- swfupload_pre_load_handler: swfuploadPreLoad,
- swfupload_load_failed_handler: swfuploadLoadFailed
- });
- };
- </script>
-
- Notes:
- You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8.
- The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met. Other issues such as missing SWF files, browser bugs
- or corrupt Flash Player installations will not trigger this event.
- The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found. It does not wait for SWFUpload to load and can
- be used to prepare the SWFUploadUI and hide alternate content.
- swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser.
- Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made.
-*/
-
-
-// SWFObject v2.1 must be loaded
-
-var SWFUpload;
-if (typeof(SWFUpload) === "function") {
- SWFUpload.onload = function () {};
-
- swfobject.addDomLoadEvent(function () {
- if (typeof(SWFUpload.onload) === "function") {
- setTimeout(function(){SWFUpload.onload.call(window);}, 200);
- }
- });
-
- SWFUpload.prototype.initSettings = (function (oldInitSettings) {
- return function () {
- if (typeof(oldInitSettings) === "function") {
- oldInitSettings.call(this);
- }
-
- this.ensureDefault = function (settingName, defaultValue) {
- this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
- };
-
- this.ensureDefault("minimum_flash_version", "9.0.28");
- this.ensureDefault("swfupload_pre_load_handler", null);
- this.ensureDefault("swfupload_load_failed_handler", null);
-
- delete this.ensureDefault;
-
- };
- })(SWFUpload.prototype.initSettings);
-
-
- SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
- return function () {
- var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
-
- if (hasFlash) {
- this.queueEvent("swfupload_pre_load_handler");
- if (typeof(oldLoadFlash) === "function") {
- oldLoadFlash.call(this);
- }
- } else {
- this.queueEvent("swfupload_load_failed_handler");
- }
- };
-
- }(SWFUpload.prototype.loadFlash);
-
- SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) {
- return function () {
- if (typeof(oldDisplayDebugInfo) === "function") {
- oldDisplayDebugInfo.call(this);
- }
-
- this.debug(
- [
- "SWFUpload.SWFObject Plugin settings:", "\n",
- "\t", "minimum_flash_version: ", this.settings.minimum_flash_version, "\n",
- "\t", "swfupload_pre_load_handler assigned: ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n",
- "\t", "swfupload_load_failed_handler assigned: ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n",
- ].join("")
- );
- };
- }(SWFUpload.prototype.displayDebugInfo);
-}
diff --git a/wp-includes/js/swfupload/swfupload.js b/wp-includes/js/swfupload/swfupload.js
deleted file mode 100644
index e65b19cb29..0000000000
--- a/wp-includes/js/swfupload/swfupload.js
+++ /dev/null
@@ -1,980 +0,0 @@
-/**
- * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
- *
- * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
- *
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-
-
-/* ******************* */
-/* Constructor & Init */
-/* ******************* */
-var SWFUpload;
-
-if (SWFUpload == undefined) {
- SWFUpload = function (settings) {
- this.initSWFUpload(settings);
- };
-}
-
-SWFUpload.prototype.initSWFUpload = function (settings) {
- try {
- this.customSettings = {}; // A container where developers can place their own settings associated with this instance.
- this.settings = settings;
- this.eventQueue = [];
- this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
- this.movieElement = null;
-
-
- // Setup global control tracking
- SWFUpload.instances[this.movieName] = this;
-
- // Load the settings. Load the Flash movie.
- this.initSettings();
- this.loadFlash();
- this.displayDebugInfo();
- } catch (ex) {
- delete SWFUpload.instances[this.movieName];
- throw ex;
- }
-};
-
-/* *************** */
-/* Static Members */
-/* *************** */
-SWFUpload.instances = {};
-SWFUpload.movieCount = 0;
-SWFUpload.version = "2.2.0 2009-03-25";
-SWFUpload.QUEUE_ERROR = {
- QUEUE_LIMIT_EXCEEDED : -100,
- FILE_EXCEEDS_SIZE_LIMIT : -110,
- ZERO_BYTE_FILE : -120,
- INVALID_FILETYPE : -130
-};
-SWFUpload.UPLOAD_ERROR = {
- HTTP_ERROR : -200,
- MISSING_UPLOAD_URL : -210,
- IO_ERROR : -220,
- SECURITY_ERROR : -230,
- UPLOAD_LIMIT_EXCEEDED : -240,
- UPLOAD_FAILED : -250,
- SPECIFIED_FILE_ID_NOT_FOUND : -260,
- FILE_VALIDATION_FAILED : -270,
- FILE_CANCELLED : -280,
- UPLOAD_STOPPED : -290
-};
-SWFUpload.FILE_STATUS = {
- QUEUED : -1,
- IN_PROGRESS : -2,
- ERROR : -3,
- COMPLETE : -4,
- CANCELLED : -5
-};
-SWFUpload.BUTTON_ACTION = {
- SELECT_FILE : -100,
- SELECT_FILES : -110,
- START_UPLOAD : -120
-};
-SWFUpload.CURSOR = {
- ARROW : -1,
- HAND : -2
-};
-SWFUpload.WINDOW_MODE = {
- WINDOW : "window",
- TRANSPARENT : "transparent",
- OPAQUE : "opaque"
-};
-
-// Private: takes a URL, determines if it is relative and converts to an absolute URL
-// using the current site. Only processes the URL if it can, otherwise returns the URL untouched
-SWFUpload.completeURL = function(url) {
- if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//)) {
- return url;
- }
-
- var currentURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
-
- var indexSlash = window.location.pathname.lastIndexOf("/");
- if (indexSlash <= 0) {
- path = "/";
- } else {
- path = window.location.pathname.substr(0, indexSlash) + "/";
- }
-
- return /*currentURL +*/ path + url;
-
-};
-
-
-/* ******************** */
-/* Instance Members */
-/* ******************** */
-
-// Private: initSettings ensures that all the
-// settings are set, getting a default value if one was not assigned.
-SWFUpload.prototype.initSettings = function () {
- this.ensureDefault = function (settingName, defaultValue) {
- this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
- };
-
- // Upload backend settings
- this.ensureDefault("upload_url", "");
- this.ensureDefault("preserve_relative_urls", false);
- this.ensureDefault("file_post_name", "Filedata");
- this.ensureDefault("post_params", {});
- this.ensureDefault("use_query_string", false);
- this.ensureDefault("requeue_on_error", false);
- this.ensureDefault("http_success", []);
- this.ensureDefault("assume_success_timeout", 0);
-
- // File Settings
- this.ensureDefault("file_types", "*.*");
- this.ensureDefault("file_types_description", "All Files");
- this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited"
- this.ensureDefault("file_upload_limit", 0);
- this.ensureDefault("file_queue_limit", 0);
-
- // Flash Settings
- this.ensureDefault("flash_url", "swfupload.swf");
- this.ensureDefault("prevent_swf_caching", true);
-
- // Button Settings
- this.ensureDefault("button_image_url", "");
- this.ensureDefault("button_width", 1);
- this.ensureDefault("button_height", 1);
- this.ensureDefault("button_text", "");
- this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
- this.ensureDefault("button_text_top_padding", 0);
- this.ensureDefault("button_text_left_padding", 0);
- this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
- this.ensureDefault("button_disabled", false);
- this.ensureDefault("button_placeholder_id", "");
- this.ensureDefault("button_placeholder", null);
- this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
- this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
-
- // Debug Settings
- this.ensureDefault("debug", false);
- this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API
-
- // Event Handlers
- this.settings.return_upload_start_handler = this.returnUploadStart;
- this.ensureDefault("swfupload_loaded_handler", null);
- this.ensureDefault("file_dialog_start_handler", null);
- this.ensureDefault("file_queued_handler", null);
- this.ensureDefault("file_queue_error_handler", null);
- this.ensureDefault("file_dialog_complete_handler", null);
-
- this.ensureDefault("upload_start_handler", null);
- this.ensureDefault("upload_progress_handler", null);
- this.ensureDefault("upload_error_handler", null);
- this.ensureDefault("upload_success_handler", null);
- this.ensureDefault("upload_complete_handler", null);
-
- this.ensureDefault("debug_handler", this.debugMessage);
-
- this.ensureDefault("custom_settings", {});
-
- // Other settings
- this.customSettings = this.settings.custom_settings;
-
- // Update the flash url if needed
- if (!!this.settings.prevent_swf_caching) {
- this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
- }
-
- if (!this.settings.preserve_relative_urls) {
- //this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url); // Don't need to do this one since flash doesn't look at it
- this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
- this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
- }
-
- delete this.ensureDefault;
-};
-
-// Private: loadFlash replaces the button_placeholder element with the flash movie.
-SWFUpload.prototype.loadFlash = function () {
- var targetElement, tempParent;
-
- // Make sure an element with the ID we are going to use doesn't already exist
- if (document.getElementById(this.movieName) !== null) {
- throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
- }
-
- // Get the element where we will be placing the flash movie
- targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
-
- if (targetElement == undefined) {
- throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
- }
-
- // Append the container and load the flash
- tempParent = document.createElement("div");
- tempParent.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
- targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
-
- // Fix IE Flash/Form bug
- if (window[this.movieName] == undefined) {
- window[this.movieName] = this.getMovieElement();
- }
-
-};
-
-// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
-SWFUpload.prototype.getFlashHTML = function () {
- // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
- return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
- '<param name="wmode" value="', this.settings.button_window_mode, '" />',
- '<param name="movie" value="', this.settings.flash_url, '" />',
- '<param name="quality" value="high" />',
- '<param name="menu" value="false" />',
- '<param name="allowScriptAccess" value="always" />',
- '<param name="flashvars" value="' + this.getFlashVars() + '" />',
- '</object>'].join("");
-};
-
-// Private: getFlashVars builds the parameter string that will be passed
-// to flash in the flashvars param.
-SWFUpload.prototype.getFlashVars = function () {
- // Build a string from the post param object
- var paramString = this.buildParamString();
- var httpSuccessString = this.settings.http_success.join(",");
-
- // Build the parameter string
- return ["movieName=", encodeURIComponent(this.movieName),
- "&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
- "&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
- "&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
- "&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
- "&amp;assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
- "&amp;params=", encodeURIComponent(paramString),
- "&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
- "&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
- "&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
- "&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
- "&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
- "&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
- "&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
- "&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
- "&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
- "&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
- "&amp;buttonText=", encodeURIComponent(this.settings.button_text),
- "&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
- "&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
- "&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
- "&amp;buttonAction=", encodeURIComponent(this.settings.button_action),
- "&amp;buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
- "&amp;buttonCursor=", encodeURIComponent(this.settings.button_cursor)
- ].join("");
-};
-
-// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload
-// The element is cached after the first lookup
-SWFUpload.prototype.getMovieElement = function () {
- if (this.movieElement == undefined) {
- this.movieElement = document.getElementById(this.movieName);
- }
-
- if (this.movieElement === null) {
- throw "Could not find Flash element";
- }
-
- return this.movieElement;
-};
-
-// Private: buildParamString takes the name/value pairs in the post_params setting object
-// and joins them up in to a string formatted "name=value&amp;name=value"
-SWFUpload.prototype.buildParamString = function () {
- var postParams = this.settings.post_params;
- var paramStringPairs = [];
-
- if (typeof(postParams) === "object") {
- for (var name in postParams) {
- if (postParams.hasOwnProperty(name)) {
- paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
- }
- }
- }
-
- return paramStringPairs.join("&amp;");
-};
-
-// Public: Used to remove a SWFUpload instance from the page. This method strives to remove
-// all references to the SWF, and other objects so memory is properly freed.
-// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
-// Credits: Major improvements provided by steffen
-SWFUpload.prototype.destroy = function () {
- try {
- // Make sure Flash is done before we try to remove it
- this.cancelUpload(null, false);
-
-
- // Remove the SWFUpload DOM nodes
- var movieElement = null;
- movieElement = this.getMovieElement();
-
- if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
- // Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround)
- for (var i in movieElement) {
- try {
- if (typeof(movieElement[i]) === "function") {
- movieElement[i] = null;
- }
- } catch (ex1) {}
- }
-
- // Remove the Movie Element from the page
- try {
- movieElement.parentNode.removeChild(movieElement);
- } catch (ex) {}
- }
-
- // Remove IE form fix reference
- window[this.movieName] = null;
-
- // Destroy other references
- SWFUpload.instances[this.movieName] = null;
- delete SWFUpload.instances[this.movieName];
-
- this.movieElement = null;
- this.settings = null;
- this.customSettings = null;
- this.eventQueue = null;
- this.movieName = null;
-
-
- return true;
- } catch (ex2) {
- return false;
- }
-};
-
-
-// Public: displayDebugInfo prints out settings and configuration
-// information about this SWFUpload instance.
-// This function (and any references to it) can be deleted when placing
-// SWFUpload in production.
-SWFUpload.prototype.displayDebugInfo = function () {
- this.debug(
- [
- "---SWFUpload Instance Info---\n",
- "Version: ", SWFUpload.version, "\n",
- "Movie Name: ", this.movieName, "\n",
- "Settings:\n",
- "\t", "upload_url: ", this.settings.upload_url, "\n",
- "\t", "flash_url: ", this.settings.flash_url, "\n",
- "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n",
- "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n",
- "\t", "http_success: ", this.settings.http_success.join(", "), "\n",
- "\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n",
- "\t", "file_post_name: ", this.settings.file_post_name, "\n",
- "\t", "post_params: ", this.settings.post_params.toString(), "\n",
- "\t", "file_types: ", this.settings.file_types, "\n",
- "\t", "file_types_description: ", this.settings.file_types_description, "\n",
- "\t", "file_size_limit: ", this.settings.file_size_limit, "\n",
- "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n",
- "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n",
- "\t", "debug: ", this.settings.debug.toString(), "\n",
-
- "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n",
-
- "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n",
- "\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
- "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n",
- "\t", "button_width: ", this.settings.button_width.toString(), "\n",
- "\t", "button_height: ", this.settings.button_height.toString(), "\n",
- "\t", "button_text: ", this.settings.button_text.toString(), "\n",
- "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n",
- "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n",
- "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
- "\t", "button_action: ", this.settings.button_action.toString(), "\n",
- "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n",
-
- "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n",
- "Event Handlers:\n",
- "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
- "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
- "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
- "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
- "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
- "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
- "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
- "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
- "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
- "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n"
- ].join("")
- );
-};
-
-/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
- the maintain v2 API compatibility
-*/
-// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
-SWFUpload.prototype.addSetting = function (name, value, default_value) {
- if (value == undefined) {
- return (this.settings[name] = default_value);
- } else {
- return (this.settings[name] = value);
- }
-};
-
-// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
-SWFUpload.prototype.getSetting = function (name) {
- if (this.settings[name] != undefined) {
- return this.settings[name];
- }
-
- return "";
-};
-
-
-
-// Private: callFlash handles function calls made to the Flash element.
-// Calls are made with a setTimeout for some functions to work around
-// bugs in the ExternalInterface library.
-SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
- argumentArray = argumentArray || [];
-
- var movieElement = this.getMovieElement();
- var returnValue, returnString;
-
- // Flash's method if calling ExternalInterface methods (code adapted from MooTools).
- try {
- returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
- returnValue = eval(returnString);
- } catch (ex) {
- throw "Call to " + functionName + " failed";
- }
-
- // Unescape file post param values
- if (returnValue != undefined && typeof returnValue.post === "object") {
- returnValue = this.unescapeFilePostParams(returnValue);
- }
-
- return returnValue;
-};
-
-/* *****************************
- -- Flash control methods --
- Your UI should use these
- to operate SWFUpload
- ***************************** */
-
-// WARNING: this function does not work in Flash Player 10
-// Public: selectFile causes a File Selection Dialog window to appear. This
-// dialog only allows 1 file to be selected.
-SWFUpload.prototype.selectFile = function () {
- this.callFlash("SelectFile");
-};
-
-// WARNING: this function does not work in Flash Player 10
-// Public: selectFiles causes a File Selection Dialog window to appear/ This
-// dialog allows the user to select any number of files
-// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
-// If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around
-// for this bug.
-SWFUpload.prototype.selectFiles = function () {
- this.callFlash("SelectFiles");
-};
-
-
-// Public: startUpload starts uploading the first file in the queue unless
-// the optional parameter 'fileID' specifies the ID
-SWFUpload.prototype.startUpload = function (fileID) {
- this.callFlash("StartUpload", [fileID]);
-};
-
-// Public: cancelUpload cancels any queued file. The fileID parameter may be the file ID or index.
-// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
-// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
-SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
- if (triggerErrorEvent !== false) {
- triggerErrorEvent = true;
- }
- this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
-};
-
-// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
-// If nothing is currently uploading then nothing happens.
-SWFUpload.prototype.stopUpload = function () {
- this.callFlash("StopUpload");
-};
-
-/* ************************
- * Settings methods
- * These methods change the SWFUpload settings.
- * SWFUpload settings should not be changed directly on the settings object
- * since many of the settings need to be passed to Flash in order to take
- * effect.
- * *********************** */
-
-// Public: getStats gets the file statistics object.
-SWFUpload.prototype.getStats = function () {
- return this.callFlash("GetStats");
-};
-
-// Public: setStats changes the SWFUpload statistics. You shouldn't need to
-// change the statistics but you can. Changing the statistics does not
-// affect SWFUpload accept for the successful_uploads count which is used
-// by the upload_limit setting to determine how many files the user may upload.
-SWFUpload.prototype.setStats = function (statsObject) {
- this.callFlash("SetStats", [statsObject]);
-};
-
-// Public: getFile retrieves a File object by ID or Index. If the file is
-// not found then 'null' is returned.
-SWFUpload.prototype.getFile = function (fileID) {
- if (typeof(fileID) === "number") {
- return this.callFlash("GetFileByIndex", [fileID]);
- } else {
- return this.callFlash("GetFile", [fileID]);
- }
-};
-
-// Public: addFileParam sets a name/value pair that will be posted with the
-// file specified by the Files ID. If the name already exists then the
-// exiting value will be overwritten.
-SWFUpload.prototype.addFileParam = function (fileID, name, value) {
- return this.callFlash("AddFileParam", [fileID, name, value]);
-};
-
-// Public: removeFileParam removes a previously set (by addFileParam) name/value
-// pair from the specified file.
-SWFUpload.prototype.removeFileParam = function (fileID, name) {
- this.callFlash("RemoveFileParam", [fileID, name]);
-};
-
-// Public: setUploadUrl changes the upload_url setting.
-SWFUpload.prototype.setUploadURL = function (url) {
- this.settings.upload_url = url.toString();
- this.callFlash("SetUploadURL", [url]);
-};
-
-// Public: setPostParams changes the post_params setting
-SWFUpload.prototype.setPostParams = function (paramsObject) {
- this.settings.post_params = paramsObject;
- this.callFlash("SetPostParams", [paramsObject]);
-};
-
-// Public: addPostParam adds post name/value pair. Each name can have only one value.
-SWFUpload.prototype.addPostParam = function (name, value) {
- this.settings.post_params[name] = value;
- this.callFlash("SetPostParams", [this.settings.post_params]);
-};
-
-// Public: removePostParam deletes post name/value pair.
-SWFUpload.prototype.removePostParam = function (name) {
- delete this.settings.post_params[name];
- this.callFlash("SetPostParams", [this.settings.post_params]);
-};
-
-// Public: setFileTypes changes the file_types setting and the file_types_description setting
-SWFUpload.prototype.setFileTypes = function (types, description) {
- this.settings.file_types = types;
- this.settings.file_types_description = description;
- this.callFlash("SetFileTypes", [types, description]);
-};
-
-// Public: setFileSizeLimit changes the file_size_limit setting
-SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
- this.settings.file_size_limit = fileSizeLimit;
- this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
-};
-
-// Public: setFileUploadLimit changes the file_upload_limit setting
-SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
- this.settings.file_upload_limit = fileUploadLimit;
- this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
-};
-
-// Public: setFileQueueLimit changes the file_queue_limit setting
-SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
- this.settings.file_queue_limit = fileQueueLimit;
- this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
-};
-
-// Public: setFilePostName changes the file_post_name setting
-SWFUpload.prototype.setFilePostName = function (filePostName) {
- this.settings.file_post_name = filePostName;
- this.callFlash("SetFilePostName", [filePostName]);
-};
-
-// Public: setUseQueryString changes the use_query_string setting
-SWFUpload.prototype.setUseQueryString = function (useQueryString) {
- this.settings.use_query_string = useQueryString;
- this.callFlash("SetUseQueryString", [useQueryString]);
-};
-
-// Public: setRequeueOnError changes the requeue_on_error setting
-SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
- this.settings.requeue_on_error = requeueOnError;
- this.callFlash("SetRequeueOnError", [requeueOnError]);
-};
-
-// Public: setHTTPSuccess changes the http_success setting
-SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
- if (typeof http_status_codes === "string") {
- http_status_codes = http_status_codes.replace(" ", "").split(",");
- }
-
- this.settings.http_success = http_status_codes;
- this.callFlash("SetHTTPSuccess", [http_status_codes]);
-};
-
-// Public: setHTTPSuccess changes the http_success setting
-SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) {
- this.settings.assume_success_timeout = timeout_seconds;
- this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]);
-};
-
-// Public: setDebugEnabled changes the debug_enabled setting
-SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
- this.settings.debug_enabled = debugEnabled;
- this.callFlash("SetDebugEnabled", [debugEnabled]);
-};
-
-// Public: setButtonImageURL loads a button image sprite
-SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
- if (buttonImageURL == undefined) {
- buttonImageURL = "";
- }
-
- this.settings.button_image_url = buttonImageURL;
- this.callFlash("SetButtonImageURL", [buttonImageURL]);
-};
-
-// Public: setButtonDimensions resizes the Flash Movie and button
-SWFUpload.prototype.setButtonDimensions = function (width, height) {
- this.settings.button_width = width;
- this.settings.button_height = height;
-
- var movie = this.getMovieElement();
- if (movie != undefined) {
- movie.style.width = width + "px";
- movie.style.height = height + "px";
- }
-
- this.callFlash("SetButtonDimensions", [width, height]);
-};
-// Public: setButtonText Changes the text overlaid on the button
-SWFUpload.prototype.setButtonText = function (html) {
- this.settings.button_text = html;
- this.callFlash("SetButtonText", [html]);
-};
-// Public: setButtonTextPadding changes the top and left padding of the text overlay
-SWFUpload.prototype.setButtonTextPadding = function (left, top) {
- this.settings.button_text_top_padding = top;
- this.settings.button_text_left_padding = left;
- this.callFlash("SetButtonTextPadding", [left, top]);
-};
-
-// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
-SWFUpload.prototype.setButtonTextStyle = function (css) {
- this.settings.button_text_style = css;
- this.callFlash("SetButtonTextStyle", [css]);
-};
-// Public: setButtonDisabled disables/enables the button
-SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
- this.settings.button_disabled = isDisabled;
- this.callFlash("SetButtonDisabled", [isDisabled]);
-};
-// Public: setButtonAction sets the action that occurs when the button is clicked
-SWFUpload.prototype.setButtonAction = function (buttonAction) {
- this.settings.button_action = buttonAction;
- this.callFlash("SetButtonAction", [buttonAction]);
-};
-
-// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
-SWFUpload.prototype.setButtonCursor = function (cursor) {
- this.settings.button_cursor = cursor;
- this.callFlash("SetButtonCursor", [cursor]);
-};
-
-/* *******************************
- Flash Event Interfaces
- These functions are used by Flash to trigger the various
- events.
-
- All these functions a Private.
-
- Because the ExternalInterface library is buggy the event calls
- are added to a queue and the queue then executed by a setTimeout.
- This ensures that events are executed in a determinate order and that
- the ExternalInterface bugs are avoided.
-******************************* */
-
-SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
- // Warning: Don't call this.debug inside here or you'll create an infinite loop
-
- if (argumentArray == undefined) {
- argumentArray = [];
- } else if (!(argumentArray instanceof Array)) {
- argumentArray = [argumentArray];
- }
-
- var self = this;
- if (typeof this.settings[handlerName] === "function") {
- // Queue the event
- this.eventQueue.push(function () {
- this.settings[handlerName].apply(this, argumentArray);
- });
-
- // Execute the next queued event
- setTimeout(function () {
- self.executeNextEvent();
- }, 0);
-
- } else if (this.settings[handlerName] !== null) {
- throw "Event handler " + handlerName + " is unknown or is not a function";
- }
-};
-
-// Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout
-// we must queue them in order to garentee that they are executed in order.
-SWFUpload.prototype.executeNextEvent = function () {
- // Warning: Don't call this.debug inside here or you'll create an infinite loop
-
- var f = this.eventQueue ? this.eventQueue.shift() : null;
- if (typeof(f) === "function") {
- f.apply(this);
- }
-};
-
-// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
-// properties that contain characters that are not valid for JavaScript identifiers. To work around this
-// the Flash Component escapes the parameter names and we must unescape again before passing them along.
-SWFUpload.prototype.unescapeFilePostParams = function (file) {
- var reg = /[$]([0-9a-f]{4})/i;
- var unescapedPost = {};
- var uk;
-
- if (file != undefined) {
- for (var k in file.post) {
- if (file.post.hasOwnProperty(k)) {
- uk = k;
- var match;
- while ((match = reg.exec(uk)) !== null) {
- uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
- }
- unescapedPost[uk] = file.post[k];
- }
- }
-
- file.post = unescapedPost;
- }
-
- return file;
-};
-
-// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
-SWFUpload.prototype.testExternalInterface = function () {
- try {
- return this.callFlash("TestExternalInterface");
- } catch (ex) {
- return false;
- }
-};
-
-// Private: This event is called by Flash when it has finished loading. Don't modify this.
-// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
-SWFUpload.prototype.flashReady = function () {
- // Check that the movie element is loaded correctly with its ExternalInterface methods defined
- var movieElement = this.getMovieElement();
-
- if (!movieElement) {
- this.debug("Flash called back ready but the flash movie can't be found.");
- return;
- }
-
- this.cleanUp(movieElement);
-
- this.queueEvent("swfupload_loaded_handler");
-};
-
-// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
-// This function is called by Flash each time the ExternalInterface functions are created.
-SWFUpload.prototype.cleanUp = function (movieElement) {
- // Pro-actively unhook all the Flash functions
- try {
- if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
- this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
- for (var key in movieElement) {
- try {
- if (typeof(movieElement[key]) === "function") {
- movieElement[key] = null;
- }
- } catch (ex) {
- }
- }
- }
- } catch (ex1) {
-
- }
-
- // Fix Flashes own cleanup code so if the SWFMovie was removed from the page
- // it doesn't display errors.
- window["__flash__removeCallback"] = function (instance, name) {
- try {
- if (instance) {
- instance[name] = null;
- }
- } catch (flashEx) {
-
- }
- };
-
-};
-
-
-/* This is a chance to do something before the browse window opens */
-SWFUpload.prototype.fileDialogStart = function () {
- this.queueEvent("file_dialog_start_handler");
-};
-
-
-/* Called when a file is successfully added to the queue. */
-SWFUpload.prototype.fileQueued = function (file) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("file_queued_handler", file);
-};
-
-
-/* Handle errors that occur when an attempt to queue a file fails. */
-SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
-};
-
-/* Called after the file dialog has closed and the selected files have been queued.
- You could call startUpload here if you want the queued files to begin uploading immediately. */
-SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
- this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
-};
-
-SWFUpload.prototype.uploadStart = function (file) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("return_upload_start_handler", file);
-};
-
-SWFUpload.prototype.returnUploadStart = function (file) {
- var returnValue;
- if (typeof this.settings.upload_start_handler === "function") {
- file = this.unescapeFilePostParams(file);
- returnValue = this.settings.upload_start_handler.call(this, file);
- } else if (this.settings.upload_start_handler != undefined) {
- throw "upload_start_handler must be a function";
- }
-
- // Convert undefined to true so if nothing is returned from the upload_start_handler it is
- // interpretted as 'true'.
- if (returnValue === undefined) {
- returnValue = true;
- }
-
- returnValue = !!returnValue;
-
- this.callFlash("ReturnUploadStart", [returnValue]);
-};
-
-
-
-SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
-};
-
-SWFUpload.prototype.uploadError = function (file, errorCode, message) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("upload_error_handler", [file, errorCode, message]);
-};
-
-SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
-};
-
-SWFUpload.prototype.uploadComplete = function (file) {
- file = this.unescapeFilePostParams(file);
- this.queueEvent("upload_complete_handler", file);
-};
-
-/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
- internal debug console. You can override this event and have messages written where you want. */
-SWFUpload.prototype.debug = function (message) {
- this.queueEvent("debug_handler", message);
-};
-
-
-/* **********************************
- Debug Console
- The debug console is a self contained, in page location
- for debug message to be sent. The Debug Console adds
- itself to the body if necessary.
-
- The console is automatically scrolled as messages appear.
-
- If you are using your own debug handler or when you deploy to production and
- have debug disabled you can remove these functions to reduce the file size
- and complexity.
-********************************** */
-
-// Private: debugMessage is the default debug_handler. If you want to print debug messages
-// call the debug() function. When overriding the function your own function should
-// check to see if the debug setting is true before outputting debug information.
-SWFUpload.prototype.debugMessage = function (message) {
- if (this.settings.debug) {
- var exceptionMessage, exceptionValues = [];
-
- // Check for an exception object and print it nicely
- if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
- for (var key in message) {
- if (message.hasOwnProperty(key)) {
- exceptionValues.push(key + ": " + message[key]);
- }
- }
- exceptionMessage = exceptionValues.join("\n") || "";
- exceptionValues = exceptionMessage.split("\n");
- exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
- SWFUpload.Console.writeLine(exceptionMessage);
- } else {
- SWFUpload.Console.writeLine(message);
- }
- }
-};
-
-SWFUpload.Console = {};
-SWFUpload.Console.writeLine = function (message) {
- var console, documentForm;
-
- try {
- console = document.getElementById("SWFUpload_Console");
-
- if (!console) {
- documentForm = document.createElement("form");
- document.getElementsByTagName("body")[0].appendChild(documentForm);
-
- console = document.createElement("textarea");
- console.id = "SWFUpload_Console";
- console.style.fontFamily = "monospace";
- console.setAttribute("wrap", "off");
- console.wrap = "off";
- console.style.overflow = "auto";
- console.style.width = "700px";
- console.style.height = "350px";
- console.style.margin = "5px";
- documentForm.appendChild(console);
- }
-
- console.value += message + "\n";
-
- console.scrollTop = console.scrollHeight - console.clientHeight;
- } catch (ex) {
- alert("Exception: " + ex.name + " Message: " + ex.message);
- }
-};
diff --git a/wp-includes/js/swfupload/swfupload.swf b/wp-includes/js/swfupload/swfupload.swf
deleted file mode 100644
index 7d94bbab5d..0000000000
--- a/wp-includes/js/swfupload/swfupload.swf
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/thickbox/loadingAnimation.gif b/wp-includes/js/thickbox/loadingAnimation.gif
deleted file mode 100644
index 030d4de59d..0000000000
--- a/wp-includes/js/thickbox/loadingAnimation.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/thickbox/macFFBgHack.png b/wp-includes/js/thickbox/macFFBgHack.png
deleted file mode 100644
index a032659389..0000000000
--- a/wp-includes/js/thickbox/macFFBgHack.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/thickbox/tb-close-2x.png b/wp-includes/js/thickbox/tb-close-2x.png
deleted file mode 100644
index fb820d6fde..0000000000
--- a/wp-includes/js/thickbox/tb-close-2x.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/thickbox/tb-close.png b/wp-includes/js/thickbox/tb-close.png
deleted file mode 100644
index 06d04070b6..0000000000
--- a/wp-includes/js/thickbox/tb-close.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/thickbox/thickbox.css b/wp-includes/js/thickbox/thickbox.css
deleted file mode 100644
index 53438f104b..0000000000
--- a/wp-includes/js/thickbox/thickbox.css
+++ /dev/null
@@ -1,178 +0,0 @@
-
-/* ----------------------------------------------------------------------------------------------------------------*/
-/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/
-/* ----------------------------------------------------------------------------------------------------------------*/
-#TB_window {
- font: 12px sans-serif;
- color: #333333;
-}
-
-#TB_secondLine {
- font: 10px sans-serif;
- color:#666666;
-}
-
-#TB_window a:link {color: #666666;}
-#TB_window a:visited {color: #666666;}
-#TB_window a:hover {color: #000;}
-#TB_window a:active {color: #666666;}
-#TB_window a:focus{color: #666666;}
-
-/* ----------------------------------------------------------------------------------------------------------------*/
-/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/
-/* ----------------------------------------------------------------------------------------------------------------*/
-#TB_overlay {
- position: fixed;
- z-index:100;
- top: 0px;
- left: 0px;
- height:100%;
- width:100%;
-}
-
-.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
-.TB_overlayBG {
- background-color:#000;
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";
- filter:alpha(opacity=75);
- -moz-opacity: 0.75;
- opacity: 0.75;
-}
-
-* html #TB_overlay { /* ie6 hack */
- position: absolute;
- height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
-}
-
-#TB_window {
- position: fixed;
- background: #ffffff;
- z-index: 102;
- color:#000000;
- visibility: hidden;
- text-align:left;
- top:50%;
- left:50%;
- border: 1px solid #555;
- -moz-box-shadow: rgba(0,0,0,1) 0 4px 30px;
- -webkit-box-shadow: rgba(0,0,0,1) 0 4px 30px;
- -khtml-box-shadow: rgba(0,0,0,1) 0 4px 30px;
- box-shadow: rgba(0,0,0,1) 0 4px 30px;
-}
-
-* html #TB_window { /* ie6 hack */
-position: absolute;
-margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
-}
-
-#TB_window img#TB_Image {
- display:block;
- margin: 15px 0 0 15px;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- border-top: 1px solid #666;
- border-left: 1px solid #666;
-}
-
-#TB_caption{
- height:25px;
- padding:7px 30px 10px 25px;
- float:left;
-}
-
-#TB_closeWindow{
- height:25px;
- padding:11px 25px 10px 0;
- float:right;
-}
-
-#TB_closeAjaxWindow{
- padding:6px 10px 0;
- text-align:right;
- float:right;
-}
-
-#TB_ajaxWindowTitle{
- float:left;
- padding:6px 10px 0;
-}
-
-#TB_title{
- background-color:#e8e8e8;
- height:27px;
-}
-
-#TB_ajaxContent{
- clear:both;
- padding:2px 15px 15px 15px;
- overflow:auto;
- text-align:left;
- line-height:1.4em;
-}
-
-#TB_ajaxContent.TB_modal{
- padding:15px;
-}
-
-#TB_ajaxContent p{
- padding:5px 0px 5px 0px;
-}
-
-#TB_load{
- position: fixed;
- display:none;
- z-index:103;
- top: 50%;
- left: 50%;
- background-color: #E8E8E8;
- border: 1px solid #555;
- margin: -45px 0pt 0pt -125px;
- padding: 40px 15px 15px;
-}
-
-* html #TB_load { /* ie6 hack */
-position: absolute;
-margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
-}
-
-#TB_HideSelect{
- z-index:99;
- position:fixed;
- top: 0;
- left: 0;
- background-color:#fff;
- border:none;
- filter:alpha(opacity=0);
- -moz-opacity: 0;
- opacity: 0;
- height:100%;
- width:100%;
-}
-
-* html #TB_HideSelect { /* ie6 hack */
- position: absolute;
- height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
-}
-
-#TB_iframeContent{
- clear:both;
- border:none;
- margin-bottom:-1px;
- _margin-bottom:1px;
-}
-
-.tb-close-icon {
- background: url('tb-close.png') no-repeat;
- height: 15px;
- width: 15px;
-}
-
-@media print,
- (-o-min-device-pixel-ratio: 5/4),
- (-webkit-min-device-pixel-ratio: 1.25),
- (min-resolution: 120dpi) {
- .tb-close-icon {
- background: url('tb-close-2x.png') no-repeat;
- background-size: 15px;
- }
-} \ No newline at end of file
diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js
deleted file mode 100644
index e874446b80..0000000000
--- a/wp-includes/js/thickbox/thickbox.js
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Thickbox 3.1 - One Box To Rule Them All.
- * By Cody Lindley (http://www.codylindley.com)
- * Copyright (c) 2007 cody lindley
- * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
-*/
-
-if ( typeof tb_pathToImage != 'string' ) {
- var tb_pathToImage = thickboxL10n.loadingAnimation;
-}
-
-/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
-
-//on page load call tb_init
-jQuery(document).ready(function(){
- tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
- imgLoader = new Image();// preload image
- imgLoader.src = tb_pathToImage;
-});
-
-//add thickbox to href & area elements that have a class of .thickbox
-function tb_init(domChunk){
- jQuery('body').on('click', domChunk, tb_click);
-}
-
-function tb_click(){
- var t = this.title || this.name || null;
- var a = this.href || this.alt;
- var g = this.rel || false;
- tb_show(t,a,g);
- this.blur();
- return false;
-}
-
-function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
-
- try {
- if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
- jQuery("body","html").css({height: "100%", width: "100%"});
- jQuery("html").css("overflow","hidden");
- if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
- jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
- jQuery("#TB_overlay").click(tb_remove);
- }
- }else{//all others
- if(document.getElementById("TB_overlay") === null){
- jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
- jQuery("#TB_overlay").click(tb_remove);
- }
- }
-
- if(tb_detectMacXFF()){
- jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
- }else{
- jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
- }
-
- if(caption===null){caption="";}
- jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>");//add loader to the page
- jQuery('#TB_load').show();//show loader
-
- var baseURL;
- if(url.indexOf("?")!==-1){ //ff there is a query string involved
- baseURL = url.substr(0, url.indexOf("?"));
- }else{
- baseURL = url;
- }
-
- var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
- var urlType = baseURL.toLowerCase().match(urlString);
-
- if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
-
- TB_PrevCaption = "";
- TB_PrevURL = "";
- TB_PrevHTML = "";
- TB_NextCaption = "";
- TB_NextURL = "";
- TB_NextHTML = "";
- TB_imageCount = "";
- TB_FoundURL = false;
- if(imageGroup){
- TB_TempArray = jQuery("a[rel="+imageGroup+"]").get();
- for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
- var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
- if (!(TB_TempArray[TB_Counter].href == url)) {
- if (TB_FoundURL) {
- TB_NextCaption = TB_TempArray[TB_Counter].title;
- TB_NextURL = TB_TempArray[TB_Counter].href;
- TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>";
- } else {
- TB_PrevCaption = TB_TempArray[TB_Counter].title;
- TB_PrevURL = TB_TempArray[TB_Counter].href;
- TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.prev+"</a></span>";
- }
- } else {
- TB_FoundURL = true;
- TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
- }
- }
- }
-
- imgPreloader = new Image();
- imgPreloader.onload = function(){
- imgPreloader.onload = null;
-
- // Resizing large images - orginal by Christian Montoya edited by me.
- var pagesize = tb_getPageSize();
- var x = pagesize[0] - 150;
- var y = pagesize[1] - 150;
- var imageWidth = imgPreloader.width;
- var imageHeight = imgPreloader.height;
- if (imageWidth > x) {
- imageHeight = imageHeight * (x / imageWidth);
- imageWidth = x;
- if (imageHeight > y) {
- imageWidth = imageWidth * (y / imageHeight);
- imageHeight = y;
- }
- } else if (imageHeight > y) {
- imageWidth = imageWidth * (y / imageHeight);
- imageHeight = y;
- if (imageWidth > x) {
- imageHeight = imageHeight * (x / imageWidth);
- imageWidth = x;
- }
- }
- // End Resizing
-
- TB_WIDTH = imageWidth + 30;
- TB_HEIGHT = imageHeight + 60;
- jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><div class='tb-close-icon'></div></a></div>");
-
- jQuery("#TB_closeWindowButton").click(tb_remove);
-
- if (!(TB_PrevHTML === "")) {
- function goPrev(){
- if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);}
- jQuery("#TB_window").remove();
- jQuery("body").append("<div id='TB_window'></div>");
- tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
- return false;
- }
- jQuery("#TB_prev").click(goPrev);
- }
-
- if (!(TB_NextHTML === "")) {
- function goNext(){
- jQuery("#TB_window").remove();
- jQuery("body").append("<div id='TB_window'></div>");
- tb_show(TB_NextCaption, TB_NextURL, imageGroup);
- return false;
- }
- jQuery("#TB_next").click(goNext);
-
- }
-
- jQuery(document).bind('keydown.thickbox', function(e){
- e.stopImmediatePropagation();
-
- if ( e.which == 27 ){ // close
- if ( ! jQuery(document).triggerHandler( 'wp_CloseOnEscape', [{ event: e, what: 'thickbox', cb: tb_remove }] ) )
- tb_remove();
-
- } else if ( e.which == 190 ){ // display previous image
- if(!(TB_NextHTML == "")){
- jQuery(document).unbind('thickbox');
- goNext();
- }
- } else if ( e.which == 188 ){ // display next image
- if(!(TB_PrevHTML == "")){
- jQuery(document).unbind('thickbox');
- goPrev();
- }
- }
- return false;
- });
-
- tb_position();
- jQuery("#TB_load").remove();
- jQuery("#TB_ImageOff").click(tb_remove);
- jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
- };
-
- imgPreloader.src = url;
- }else{//code to show html
-
- var queryString = url.replace(/^[^\?]+\??/,'');
- var params = tb_parseQuery( queryString );
-
- TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
- TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
- ajaxContentW = TB_WIDTH - 30;
- ajaxContentH = TB_HEIGHT - 45;
-
- if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
- urlNoQuery = url.split('TB_');
- jQuery("#TB_iframeContent").remove();
- if(params['modal'] != "true"){//iframe no modal
- jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><div class='tb-close-icon'></div></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
- }else{//iframe modal
- jQuery("#TB_overlay").unbind();
- jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
- }
- }else{// not an iframe, ajax
- if(jQuery("#TB_window").css("visibility") != "visible"){
- if(params['modal'] != "true"){//ajax no modal
- jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><div class='tb-close-icon'></div></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
- }else{//ajax modal
- jQuery("#TB_overlay").unbind();
- jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
- }
- }else{//this means the window is already up, we are just loading new content via ajax
- jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
- jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
- jQuery("#TB_ajaxContent")[0].scrollTop = 0;
- jQuery("#TB_ajaxWindowTitle").html(caption);
- }
- }
-
- jQuery("#TB_closeWindowButton").click(tb_remove);
-
- if(url.indexOf('TB_inline') != -1){
- jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
- jQuery("#TB_window").bind('tb_unload', function () {
- jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
- });
- tb_position();
- jQuery("#TB_load").remove();
- jQuery("#TB_window").css({'visibility':'visible'});
- }else if(url.indexOf('TB_iframe') != -1){
- tb_position();
- jQuery("#TB_load").remove();
- jQuery("#TB_window").css({'visibility':'visible'});
- }else{
- jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
- tb_position();
- jQuery("#TB_load").remove();
- tb_init("#TB_ajaxContent a.thickbox");
- jQuery("#TB_window").css({'visibility':'visible'});
- });
- }
-
- }
-
- if(!params['modal']){
- jQuery(document).bind('keyup.thickbox', function(e){
-
- if ( e.which == 27 ){ // close
- e.stopImmediatePropagation();
- if ( ! jQuery(document).triggerHandler( 'wp_CloseOnEscape', [{ event: e, what: 'thickbox', cb: tb_remove }] ) )
- tb_remove();
-
- return false;
- }
- });
- }
-
- } catch(e) {
- //nothing here
- }
-}
-
-//helper functions below
-function tb_showIframe(){
- jQuery("#TB_load").remove();
- jQuery("#TB_window").css({'visibility':'visible'});
-}
-
-function tb_remove() {
- jQuery("#TB_imageOff").unbind("click");
- jQuery("#TB_closeWindowButton").unbind("click");
- jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});
- jQuery("#TB_load").remove();
- if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
- jQuery("body","html").css({height: "auto", width: "auto"});
- jQuery("html").css("overflow","");
- }
- jQuery(document).unbind('.thickbox');
- return false;
-}
-
-function tb_position() {
-var isIE6 = typeof document.body.style.maxHeight === "undefined";
-jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
- if ( ! isIE6 ) { // take away IE6
- jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
- }
-}
-
-function tb_parseQuery ( query ) {
- var Params = {};
- if ( ! query ) {return Params;}// return empty object
- var Pairs = query.split(/[;&]/);
- for ( var i = 0; i < Pairs.length; i++ ) {
- var KeyVal = Pairs[i].split('=');
- if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
- var key = unescape( KeyVal[0] );
- var val = unescape( KeyVal[1] );
- val = val.replace(/\+/g, ' ');
- Params[key] = val;
- }
- return Params;
-}
-
-function tb_getPageSize(){
- var de = document.documentElement;
- var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
- var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
- arrayPageSize = [w,h];
- return arrayPageSize;
-}
-
-function tb_detectMacXFF() {
- var userAgent = navigator.userAgent.toLowerCase();
- if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
- return true;
- }
-}
diff --git a/wp-includes/js/tinymce/langs/wp-langs-en.js b/wp-includes/js/tinymce/langs/wp-langs-en.js
deleted file mode 100644
index 8afafa61fd..0000000000
--- a/wp-includes/js/tinymce/langs/wp-langs-en.js
+++ /dev/null
@@ -1,504 +0,0 @@
-tinyMCE.addI18n({en:{
-common:{
-edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
-apply:"Apply",
-insert:"Insert",
-update:"Update",
-cancel:"Cancel",
-close:"Close",
-browse:"Browse",
-class_name:"Class",
-not_set:"-- Not set --",
-clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
-clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
-popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
-invalid_data:"ERROR: Invalid values entered, these are marked in red.",
-invalid_data_number:"{#field} must be a number",
-invalid_data_min:"{#field} must be a number greater than {#min}",
-invalid_data_size:"{#field} must be a number or percentage",
-more_colors:"More colors"
-},
-colors:{
-"000000":"Black",
-"993300":"Burnt orange",
-"333300":"Dark olive",
-"003300":"Dark green",
-"003366":"Dark azure",
-"000080":"Navy Blue",
-"333399":"Indigo",
-"333333":"Very dark gray",
-"800000":"Maroon",
-"FF6600":"Orange",
-"808000":"Olive",
-"008000":"Green",
-"008080":"Teal",
-"0000FF":"Blue",
-"666699":"Grayish blue",
-"808080":"Gray",
-"FF0000":"Red",
-"FF9900":"Amber",
-"99CC00":"Yellow green",
-"339966":"Sea green",
-"33CCCC":"Turquoise",
-"3366FF":"Royal blue",
-"800080":"Purple",
-"999999":"Medium gray",
-"FF00FF":"Magenta",
-"FFCC00":"Gold",
-"FFFF00":"Yellow",
-"00FF00":"Lime",
-"00FFFF":"Aqua",
-"00CCFF":"Sky blue",
-"993366":"Brown",
-"C0C0C0":"Silver",
-"FF99CC":"Pink",
-"FFCC99":"Peach",
-"FFFF99":"Light yellow",
-"CCFFCC":"Pale green",
-"CCFFFF":"Pale cyan",
-"99CCFF":"Light sky blue",
-"CC99FF":"Plum",
-"FFFFFF":"White"
-},
-contextmenu:{
-align:"Alignment",
-left:"Left",
-center:"Center",
-right:"Right",
-full:"Full"
-},
-insertdatetime:{
-date_fmt:"%Y-%m-%d",
-time_fmt:"%H:%M:%S",
-insertdate_desc:"Insert date",
-inserttime_desc:"Insert time",
-months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
-months_short:"Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
-day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
-day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"
-},
-print:{
-print_desc:"Print"
-},
-preview:{
-preview_desc:"Preview"
-},
-directionality:{
-ltr_desc:"Direction left to right",
-rtl_desc:"Direction right to left"
-},
-layer:{
-insertlayer_desc:"Insert new layer",
-forward_desc:"Move forward",
-backward_desc:"Move backward",
-absolute_desc:"Toggle absolute positioning",
-content:"New layer..."
-},
-save:{
-save_desc:"Save",
-cancel_desc:"Cancel all changes"
-},
-nonbreaking:{
-nonbreaking_desc:"Insert non-breaking space character"
-},
-iespell:{
-iespell_desc:"Run spell checking",
-download:"ieSpell not detected. Do you want to install it now?"
-},
-advhr:{
-advhr_desc:"Horizontal rule"
-},
-emotions:{
-emotions_desc:"Emotions"
-},
-searchreplace:{
-search_desc:"Find",
-replace_desc:"Find/Replace"
-},
-advimage:{
-image_desc:"Insert/edit image"
-},
-advlink:{
-link_desc:"Insert/edit link"
-},
-xhtmlxtras:{
-cite_desc:"Citation",
-abbr_desc:"Abbreviation",
-acronym_desc:"Acronym",
-del_desc:"Deletion",
-ins_desc:"Insertion",
-attribs_desc:"Insert/Edit Attributes"
-},
-style:{
-desc:"Edit CSS Style"
-},
-paste:{
-paste_text_desc:"Paste as Plain Text",
-paste_word_desc:"Paste from Word",
-selectall_desc:"Select All",
-plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
-plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
-},
-paste_dlg:{
-text_title:"Use CTRL + V on your keyboard to paste the text into the window.",
-text_linebreaks:"Keep linebreaks",
-word_title:"Use CTRL + V on your keyboard to paste the text into the window."
-},
-table:{
-desc:"Inserts a new table",
-row_before_desc:"Insert row before",
-row_after_desc:"Insert row after",
-delete_row_desc:"Delete row",
-col_before_desc:"Insert column before",
-col_after_desc:"Insert column after",
-delete_col_desc:"Remove column",
-split_cells_desc:"Split merged table cells",
-merge_cells_desc:"Merge table cells",
-row_desc:"Table row properties",
-cell_desc:"Table cell properties",
-props_desc:"Table properties",
-paste_row_before_desc:"Paste table row before",
-paste_row_after_desc:"Paste table row after",
-cut_row_desc:"Cut table row",
-copy_row_desc:"Copy table row",
-del:"Delete table",
-row:"Row",
-col:"Column",
-cell:"Cell"
-},
-autosave:{
-unload_msg:"The changes you made will be lost if you navigate away from this page."
-},
-fullscreen:{
-desc:"Toggle fullscreen mode (Alt + Shift + G)"
-},
-media:{
-desc:"Insert / edit embedded media",
-edit:"Edit embedded media"
-},
-fullpage:{
-desc:"Document properties"
-},
-template:{
-desc:"Insert predefined template content"
-},
-visualchars:{
-desc:"Visual control characters on/off."
-},
-spellchecker:{
-desc:"Toggle spellchecker (Alt + Shift + N)",
-menu:"Spellchecker settings",
-ignore_word:"Ignore word",
-ignore_words:"Ignore all",
-langs:"Languages",
-wait:"Please wait...",
-sug:"Suggestions",
-no_sug:"No suggestions",
-no_mpell:"No misspellings found.",
-learn_word:"Learn word"
-},
-pagebreak:{
-desc:"Insert Page Break"
-},
-advlist:{
-types:"Types",
-def:"Default",
-lower_alpha:"Lower alpha",
-lower_greek:"Lower greek",
-lower_roman:"Lower roman",
-upper_alpha:"Upper alpha",
-upper_roman:"Upper roman",
-circle:"Circle",
-disc:"Disc",
-square:"Square"
-},
-aria:{
-rich_text_area:"Rich Text Area"
-},
-wordcount:{
-words:"Words: "
-}
-}});
-
-tinyMCE.addI18n("en.advanced",{
-style_select:"Styles",
-font_size:"Font size",
-fontdefault:"Font family",
-block:"Format",
-paragraph:"Paragraph",
-div:"Div",
-address:"Address",
-pre:"Preformatted",
-h1:"Heading 1",
-h2:"Heading 2",
-h3:"Heading 3",
-h4:"Heading 4",
-h5:"Heading 5",
-h6:"Heading 6",
-blockquote:"Blockquote",
-code:"Code",
-samp:"Code sample",
-dt:"Definition term ",
-dd:"Definition description",
-bold_desc:"Bold (Ctrl + B)",
-italic_desc:"Italic (Ctrl + I)",
-underline_desc:"Underline",
-striketrough_desc:"Strikethrough (Alt + Shift + D)",
-justifyleft_desc:"Align Left (Alt + Shift + L)",
-justifycenter_desc:"Align Center (Alt + Shift + C)",
-justifyright_desc:"Align Right (Alt + Shift + R)",
-justifyfull_desc:"Align Full (Alt + Shift + J)",
-bullist_desc:"Unordered list (Alt + Shift + U)",
-numlist_desc:"Ordered list (Alt + Shift + O)",
-outdent_desc:"Outdent",
-indent_desc:"Indent",
-undo_desc:"Undo (Ctrl + Z)",
-redo_desc:"Redo (Ctrl + Y)",
-link_desc:"Insert/edit link (Alt + Shift + A)",
-unlink_desc:"Unlink (Alt + Shift + S)",
-image_desc:"Insert/edit image (Alt + Shift + M)",
-cleanup_desc:"Cleanup messy code",
-code_desc:"Edit HTML Source",
-sub_desc:"Subscript",
-sup_desc:"Superscript",
-hr_desc:"Insert horizontal ruler",
-removeformat_desc:"Remove formatting",
-forecolor_desc:"Select text color",
-backcolor_desc:"Select background color",
-charmap_desc:"Insert custom character",
-visualaid_desc:"Toggle guidelines/invisible elements",
-anchor_desc:"Insert/edit anchor",
-cut_desc:"Cut",
-copy_desc:"Copy",
-paste_desc:"Paste",
-image_props_desc:"Image properties",
-newdocument_desc:"New document",
-help_desc:"Help",
-blockquote_desc:"Blockquote (Alt + Shift + Q)",
-clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
-path:"Path",
-newdocument:"Are you sure you want to clear all contents?",
-toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
-more_colors:"More colors",
-shortcuts_desc:"Accessibility Help",
-help_shortcut:" Press ALT F10 for toolbar. Press ALT 0 for help.",
-rich_text_area:"Rich Text Area",
-toolbar:"Toolbar"
-});
-
-tinyMCE.addI18n("en.advanced_dlg",{
-about_title:"About TinyMCE",
-about_general:"About",
-about_help:"Help",
-about_license:"License",
-about_plugins:"Plugins",
-about_plugin:"Plugin",
-about_author:"Author",
-about_version:"Version",
-about_loaded:"Loaded plugins",
-anchor_title:"Insert/edit anchor",
-anchor_name:"Anchor name",
-code_title:"HTML Source Editor",
-code_wordwrap:"Word wrap",
-colorpicker_title:"Select a color",
-colorpicker_picker_tab:"Picker",
-colorpicker_picker_title:"Color picker",
-colorpicker_palette_tab:"Palette",
-colorpicker_palette_title:"Palette colors",
-colorpicker_named_tab:"Named",
-colorpicker_named_title:"Named colors",
-colorpicker_color:"Color:",
-colorpicker_name:"Name:",
-charmap_title:"Select custom character",
-charmap_usage:"Use left and right arrows to navigate.",
-image_title:"Insert/edit image",
-image_src:"Image URL",
-image_alt:"Image description",
-image_list:"Image list",
-image_border:"Border",
-image_dimensions:"Dimensions",
-image_vspace:"Vertical space",
-image_hspace:"Horizontal space",
-image_align:"Alignment",
-image_align_baseline:"Baseline",
-image_align_top:"Top",
-image_align_middle:"Middle",
-image_align_bottom:"Bottom",
-image_align_texttop:"Text top",
-image_align_textbottom:"Text bottom",
-image_align_left:"Left",
-image_align_right:"Right",
-link_title:"Insert/edit link",
-link_url:"Link URL",
-link_target:"Target",
-link_target_same:"Open link in the same window",
-link_target_blank:"Open link in a new window",
-link_titlefield:"Title",
-link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
-link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
-link_list:"Link list",
-accessibility_help:"Accessibility Help",
-accessibility_usage_title:"General Usage"
-});
-
-tinyMCE.addI18n("en.media_dlg",{
-title:"Insert / edit embedded media",
-general:"General",
-advanced:"Advanced",
-file:"File/URL",
-list:"List",
-size:"Dimensions",
-preview:"Preview",
-constrain_proportions:"Constrain proportions",
-type:"Type",
-id:"Id",
-name:"Name",
-class_name:"Class",
-vspace:"V-Space",
-hspace:"H-Space",
-play:"Auto play",
-loop:"Loop",
-menu:"Show menu",
-quality:"Quality",
-scale:"Scale",
-align:"Align",
-salign:"SAlign",
-wmode:"WMode",
-bgcolor:"Background",
-base:"Base",
-flashvars:"Flashvars",
-liveconnect:"SWLiveConnect",
-autohref:"AutoHREF",
-cache:"Cache",
-hidden:"Hidden",
-controller:"Controller",
-kioskmode:"Kiosk mode",
-playeveryframe:"Play every frame",
-targetcache:"Target cache",
-correction:"No correction",
-enablejavascript:"Enable JavaScript",
-starttime:"Start time",
-endtime:"End time",
-href:"href",
-qtsrcchokespeed:"Choke speed",
-target:"Target",
-volume:"Volume",
-autostart:"Auto start",
-enabled:"Enabled",
-fullscreen:"Fullscreen",
-invokeurls:"Invoke URLs",
-mute:"Mute",
-stretchtofit:"Stretch to fit",
-windowlessvideo:"Windowless video",
-balance:"Balance",
-baseurl:"Base URL",
-captioningid:"Captioning id",
-currentmarker:"Current marker",
-currentposition:"Current position",
-defaultframe:"Default frame",
-playcount:"Play count",
-rate:"Rate",
-uimode:"UI Mode",
-flash_options:"Flash options",
-qt_options:"QuickTime options",
-wmp_options:"Windows media player options",
-rmp_options:"Real media player options",
-shockwave_options:"Shockwave options",
-autogotourl:"Auto goto URL",
-center:"Center",
-imagestatus:"Image status",
-maintainaspect:"Maintain aspect",
-nojava:"No java",
-prefetch:"Prefetch",
-shuffle:"Shuffle",
-console:"Console",
-numloop:"Num loops",
-controls:"Controls",
-scriptcallbacks:"Script callbacks",
-swstretchstyle:"Stretch style",
-swstretchhalign:"Stretch H-Align",
-swstretchvalign:"Stretch V-Align",
-sound:"Sound",
-progress:"Progress",
-qtsrc:"QT Src",
-qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
-align_top:"Top",
-align_right:"Right",
-align_bottom:"Bottom",
-align_left:"Left",
-align_center:"Center",
-align_top_left:"Top left",
-align_top_right:"Top right",
-align_bottom_left:"Bottom left",
-align_bottom_right:"Bottom right",
-flv_options:"Flash video options",
-flv_scalemode:"Scale mode",
-flv_buffer:"Buffer",
-flv_startimage:"Start image",
-flv_starttime:"Start time",
-flv_defaultvolume:"Default volume",
-flv_hiddengui:"Hidden GUI",
-flv_autostart:"Auto start",
-flv_loop:"Loop",
-flv_showscalemodes:"Show scale modes",
-flv_smoothvideo:"Smooth video",
-flv_jscallback:"JS Callback",
-html5_video_options:"HTML5 Video Options",
-altsource1:"Alternative source 1",
-altsource2:"Alternative source 2",
-preload:"Preload",
-poster:"Poster",
-source:"Source"
-});
-
-tinyMCE.addI18n("en.wordpress",{
-wp_adv_desc:"Show/Hide Kitchen Sink (Alt + Shift + Z)",
-wp_more_desc:"Insert More Tag (Alt + Shift + T)",
-wp_page_desc:"Insert Page break (Alt + Shift + P)",
-wp_help_desc:"Help (Alt + Shift + H)",
-wp_more_alt:"More...",
-wp_page_alt:"Next page...",
-add_media:"Add Media",
-add_image:"Add an Image",
-add_video:"Add Video",
-add_audio:"Add Audio",
-editgallery:"Edit Gallery",
-delgallery:"Delete Gallery",
-wp_fullscreen_desc:"Distraction Free Writing mode (Alt + Shift + W)"
-});
-
-tinyMCE.addI18n("en.wpeditimage",{
-edit_img:"Edit Image",
-del_img:"Delete Image",
-adv_settings:"Advanced Settings",
-none:"None",
-size:"Size",
-thumbnail:"Thumbnail",
-medium:"Medium",
-full_size:"Full Size",
-current_link:"Current Link",
-link_to_img:"Link to Image",
-link_help:"Enter a link URL or click above for presets.",
-adv_img_settings:"Advanced Image Settings",
-source:"Source",
-width:"Width",
-height:"Height",
-orig_size:"Original Size",
-css:"CSS Class",
-adv_link_settings:"Advanced Link Settings",
-link_rel:"Link Rel",
-height:"Height",
-orig_size:"Original Size",
-css:"CSS Class",
-s60:"60%",
-s70:"70%",
-s80:"80%",
-s90:"90%",
-s100:"100%",
-s110:"110%",
-s120:"120%",
-s130:"130%",
-img_title:"Title",
-caption:"Caption",
-alt:"Alternative Text"
-});
diff --git a/wp-includes/js/tinymce/langs/wp-langs.php b/wp-includes/js/tinymce/langs/wp-langs.php
deleted file mode 100644
index 9de90c2e0b..0000000000
--- a/wp-includes/js/tinymce/langs/wp-langs.php
+++ /dev/null
@@ -1,565 +0,0 @@
-<?php
-
-if ( ! defined( 'ABSPATH' ) )
- exit;
-
-if ( ! class_exists( '_WP_Editors' ) )
- require( ABSPATH . WPINC . '/class-wp-editor.php' );
-
-// deprecated, not used
-function mce_escape($text) {
- return esc_js($text);
-}
-
-function wp_mce_translation() {
-
- $default = array(
- 'common' => array(
- 'edit_confirm' => __('Do you want to use the WYSIWYG mode for this textarea?'),
- 'apply' => __('Apply'),
- 'insert' => __('Insert'),
- 'update' => __('Update'),
- 'cancel' => __('Cancel'),
- 'close' => __('Close'),
- 'browse' => __('Browse'),
- 'class_name' => __('Class'),
- 'not_set' => __('-- Not set --'),
- 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'),
- 'clipboard_no_support' => __('Currently not supported by your browser, use keyboard shortcuts instead.'),
- 'popup_blocked' => __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'),
- 'invalid_data' => __('ERROR: Invalid values entered, these are marked in red.'),
- 'invalid_data_number' => __('{#field} must be a number'),
- 'invalid_data_min' => __('{#field} must be a number greater than {#min}'),
- 'invalid_data_size' => __('{#field} must be a number or percentage'),
- 'more_colors' => __('More colors')
- ),
-
- 'colors' => array(
- '000000' => __('Black'),
- '993300' => __('Burnt orange'),
- '333300' => __('Dark olive'),
- '003300' => __('Dark green'),
- '003366' => __('Dark azure'),
- '000080' => __('Navy Blue'),
- '333399' => __('Indigo'),
- '333333' => __('Very dark gray'),
- '800000' => __('Maroon'),
- 'FF6600' => __('Orange'),
- '808000' => __('Olive'),
- '008000' => __('Green'),
- '008080' => __('Teal'),
- '0000FF' => __('Blue'),
- '666699' => __('Grayish blue'),
- '808080' => __('Gray'),
- 'FF0000' => __('Red'),
- 'FF9900' => __('Amber'),
- '99CC00' => __('Yellow green'),
- '339966' => __('Sea green'),
- '33CCCC' => __('Turquoise'),
- '3366FF' => __('Royal blue'),
- '800080' => __('Purple'),
- '999999' => __('Medium gray'),
- 'FF00FF' => __('Magenta'),
- 'FFCC00' => __('Gold'),
- 'FFFF00' => __('Yellow'),
- '00FF00' => __('Lime'),
- '00FFFF' => __('Aqua'),
- '00CCFF' => __('Sky blue'),
- '993366' => __('Brown'),
- 'C0C0C0' => __('Silver'),
- 'FF99CC' => __('Pink'),
- 'FFCC99' => __('Peach'),
- 'FFFF99' => __('Light yellow'),
- 'CCFFCC' => __('Pale green'),
- 'CCFFFF' => __('Pale cyan'),
- '99CCFF' => __('Light sky blue'),
- 'CC99FF' => __('Plum'),
- 'FFFFFF' => __('White')
- ),
-
- 'contextmenu' => array(
- 'align' => __('Alignment'), /* translators: alignment */
- 'left' => __('Left'), /* translators: alignment */
- 'center' => __('Center'), /* translators: alignment */
- 'right' => __('Right'), /* translators: alignment */
- 'full' => __('Full') /* translators: alignment */
- ),
-
- 'insertdatetime' => array(
- 'date_fmt' => __('%Y-%m-%d'), /* translators: year, month, date */
- 'time_fmt' => __('%H:%M:%S'), /* translators: hours, minutes, seconds */
- 'insertdate_desc' => __('Insert date'),
- 'inserttime_desc' => __('Insert time'),
- 'months_long' => __('January').','.__('February').','.__('March').','.__('April').','.__('May').','.__('June').','.__('July').','.__('August').','.__('September').','.__('October').','.__('November').','.__('December'),
- 'months_short' => __('Jan_January_abbreviation').','.__('Feb_February_abbreviation').','.__('Mar_March_abbreviation').','.__('Apr_April_abbreviation').','.__('May_May_abbreviation').','.__('Jun_June_abbreviation').','.__('Jul_July_abbreviation').','.__('Aug_August_abbreviation').','.__('Sep_September_abbreviation').','.__('Oct_October_abbreviation').','.__('Nov_November_abbreviation').','.__('Dec_December_abbreviation'),
- 'day_long' => __('Sunday').','.__('Monday').','.__('Tuesday').','.__('Wednesday').','.__('Thursday').','.__('Friday').','.__('Saturday'),
- 'day_short' => __('Sun').','.__('Mon').','.__('Tue').','.__('Wed').','.__('Thu').','.__('Fri').','.__('Sat')
- ),
-
- 'print' => array(
- 'print_desc' => __('Print')
- ),
-
- 'preview' => array(
- 'preview_desc' => __('Preview')
- ),
-
- 'directionality' => array(
- 'ltr_desc' => __('Direction left to right'),
- 'rtl_desc' => __('Direction right to left')
- ),
-
- 'layer' => array(
- 'insertlayer_desc' => __('Insert new layer'),
- 'forward_desc' => __('Move forward'),
- 'backward_desc' => __('Move backward'),
- 'absolute_desc' => __('Toggle absolute positioning'),
- 'content' => __('New layer...')
- ),
-
- 'save' => array(
- 'save_desc' => __('Save'),
- 'cancel_desc' => __('Cancel all changes')
- ),
-
- 'nonbreaking' => array(
- 'nonbreaking_desc' => __('Insert non-breaking space character')
- ),
-
- 'iespell' => array(
- 'iespell_desc' => __('Run spell checking'),
- 'download' => __('ieSpell not detected. Do you want to install it now?')
- ),
-
- 'advhr' => array(
- 'advhr_desc' => __('Horizontal rule')
- ),
-
- 'emotions' => array(
- 'emotions_desc' => __('Emotions')
- ),
-
- 'searchreplace' => array(
- 'search_desc' => __('Find'),
- 'replace_desc' => __('Find/Replace')
- ),
-
- 'advimage' => array(
- 'image_desc' => __('Insert/edit image')
- ),
-
- 'advlink' => array(
- 'link_desc' => __('Insert/edit link')
- ),
-
- 'xhtmlxtras' => array(
- 'cite_desc' => __('Citation'),
- 'abbr_desc' => __('Abbreviation'),
- 'acronym_desc' => __('Acronym'),
- 'del_desc' => __('Deletion'),
- 'ins_desc' => __('Insertion'),
- 'attribs_desc' => __('Insert/Edit Attributes')
- ),
-
- 'style' => array(
- 'desc' => __('Edit CSS Style')
- ),
-
- 'paste' => array(
- 'paste_text_desc' => __('Paste as Plain Text'),
- 'paste_word_desc' => __('Paste from Word'),
- 'selectall_desc' => __('Select All'),
- 'plaintext_mode_sticky' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.'),
- 'plaintext_mode' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode.')
- ),
-
- 'paste_dlg' => array(
- 'text_title' => __('Use CTRL+V on your keyboard to paste the text into the window.'),
- 'text_linebreaks' => __('Keep linebreaks'),
- 'word_title' => __('Use CTRL+V on your keyboard to paste the text into the window.')
- ),
-
- 'table' => array(
- 'desc' => __('Inserts a new table'),
- 'row_before_desc' => __('Insert row before'),
- 'row_after_desc' => __('Insert row after'),
- 'delete_row_desc' => __('Delete row'),
- 'col_before_desc' => __('Insert column before'),
- 'col_after_desc' => __('Insert column after'),
- 'delete_col_desc' => __('Remove column'),
- 'split_cells_desc' => __('Split merged table cells'),
- 'merge_cells_desc' => __('Merge table cells'),
- 'row_desc' => __('Table row properties'),
- 'cell_desc' => __('Table cell properties'),
- 'props_desc' => __('Table properties'),
- 'paste_row_before_desc' => __('Paste table row before'),
- 'paste_row_after_desc' => __('Paste table row after'),
- 'cut_row_desc' => __('Cut table row'),
- 'copy_row_desc' => __('Copy table row'),
- 'del' => __('Delete table'),
- 'row' => __('Row'),
- 'col' => __('Column'),
- 'cell' => __('Cell')
- ),
-
- 'autosave' => array(
- 'unload_msg' => __('The changes you made will be lost if you navigate away from this page.')
- ),
-
- 'fullscreen' => array(
- 'desc' => __('Toggle fullscreen mode (Alt + Shift + G)')
- ),
-
- 'media' => array(
- 'desc' => __('Insert / edit embedded media'),
- 'edit' => __('Edit embedded media')
- ),
-
- 'fullpage' => array(
- 'desc' => __('Document properties')
- ),
-
- 'template' => array(
- 'desc' => __('Insert predefined template content')
- ),
-
- 'visualchars' => array(
- 'desc' => __('Visual control characters on/off.')
- ),
-
- 'spellchecker' => array(
- 'desc' => __('Toggle spellchecker (Alt + Shift + N)'),
- 'menu' => __('Spellchecker settings'),
- 'ignore_word' => __('Ignore word'),
- 'ignore_words' => __('Ignore all'),
- 'langs' => __('Languages'),
- 'wait' => __('Please wait...'),
- 'sug' => __('Suggestions'),
- 'no_sug' => __('No suggestions'),
- 'no_mpell' => __('No misspellings found.'),
- 'learn_word' => __('Learn word')
- ),
-
- 'pagebreak' => array(
- 'desc' => __('Insert Page Break')
- ),
-
- 'advlist' => array(
- 'types' => __('Types'),
- 'def' => __('Default'),
- 'lower_alpha' => __('Lower alpha'),
- 'lower_greek' => __('Lower greek'),
- 'lower_roman' => __('Lower roman'),
- 'upper_alpha' => __('Upper alpha'),
- 'upper_roman' => __('Upper roman'),
- 'circle' => __('Circle'),
- 'disc' => __('Disc'),
- 'square' => __('Square')
- ),
-
- 'aria' => array(
- 'rich_text_area' => __('Rich Text Area')
- ),
-
- 'wordcount' => array(
- 'words' => __('Words:')
- )
- );
-
- $advanced = array(
- 'style_select' => __('Styles'), /* translators: TinyMCE inline styles */
- 'font_size' => __('Font size'),
- 'fontdefault' => __('Font family'),
- 'block' => __('Format'),
- 'paragraph' => __('Paragraph'),
- 'div' => __('Div'),
- 'address' => __('Address'),
- 'pre' => __('Preformatted'),
- 'h1' => __('Heading 1'),
- 'h2' => __('Heading 2'),
- 'h3' => __('Heading 3'),
- 'h4' => __('Heading 4'),
- 'h5' => __('Heading 5'),
- 'h6' => __('Heading 6'),
- 'blockquote' => __('Blockquote'),
- 'code' => __('Code'),
- 'samp' => __('Code sample'),
- 'dt' => __('Definition term '),
- 'dd' => __('Definition description'),
- 'bold_desc' => __('Bold (Ctrl + B)'),
- 'italic_desc' => __('Italic (Ctrl + I)'),
- 'underline_desc' => __('Underline'),
- 'striketrough_desc' => __('Strikethrough (Alt + Shift + D)'),
- 'justifyleft_desc' => __('Align Left (Alt + Shift + L)'),
- 'justifycenter_desc' => __('Align Center (Alt + Shift + C)'),
- 'justifyright_desc' => __('Align Right (Alt + Shift + R)'),
- 'justifyfull_desc' => __('Align Full (Alt + Shift + J)'),
- 'bullist_desc' => __('Unordered list (Alt + Shift + U)'),
- 'numlist_desc' => __('Ordered list (Alt + Shift + O)'),
- 'outdent_desc' => __('Outdent'),
- 'indent_desc' => __('Indent'),
- 'undo_desc' => __('Undo (Ctrl + Z)'),
- 'redo_desc' => __('Redo (Ctrl + Y)'),
- 'link_desc' => __('Insert/edit link (Alt + Shift + A)'),
- 'unlink_desc' => __('Unlink (Alt + Shift + S)'),
- 'image_desc' => __('Insert/edit image (Alt + Shift + M)'),
- 'cleanup_desc' => __('Cleanup messy code'),
- 'code_desc' => __('Edit HTML Source'),
- 'sub_desc' => __('Subscript'),
- 'sup_desc' => __('Superscript'),
- 'hr_desc' => __('Insert horizontal ruler'),
- 'removeformat_desc' => __('Remove formatting'),
- 'forecolor_desc' => __('Select text color'),
- 'backcolor_desc' => __('Select background color'),
- 'charmap_desc' => __('Insert custom character'),
- 'visualaid_desc' => __('Toggle guidelines/invisible elements'),
- 'anchor_desc' => __('Insert/edit anchor'),
- 'cut_desc' => __('Cut'),
- 'copy_desc' => __('Copy'),
- 'paste_desc' => __('Paste'),
- 'image_props_desc' => __('Image properties'),
- 'newdocument_desc' => __('New document'),
- 'help_desc' => __('Help'),
- 'blockquote_desc' => __('Blockquote (Alt + Shift + Q)'),
- 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'),
- 'path' => __('Path'),
- 'newdocument' => __('Are you sure you want to clear all contents?'),
- 'toolbar_focus' => __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'),
- 'more_colors' => __('More colors'),
- 'shortcuts_desc' => __('Accessibility Help'),
- 'help_shortcut' => __('Press ALT F10 for toolbar. Press ALT 0 for help.'),
- 'rich_text_area' => __('Rich Text Area'),
- 'toolbar' => __('Toolbar')
- );
-
- $advanced_dlg = array(
- 'about_title' => __('About TinyMCE'),
- 'about_general' => __('About'),
- 'about_help' => __('Help'),
- 'about_license' => __('License'),
- 'about_plugins' => __('Plugins'),
- 'about_plugin' => __('Plugin'),
- 'about_author' => __('Author'),
- 'about_version' => __('Version'),
- 'about_loaded' => __('Loaded plugins'),
- 'anchor_title' => __('Insert/edit anchor'),
- 'anchor_name' => __('Anchor name'),
- 'code_title' => __('HTML Source Editor'),
- 'code_wordwrap' => __('Word wrap'),
- 'colorpicker_title' => __('Select a color'),
- 'colorpicker_picker_tab' => __('Picker'),
- 'colorpicker_picker_title' => __('Color picker'),
- 'colorpicker_palette_tab' => __('Palette'),
- 'colorpicker_palette_title' => __('Palette colors'),
- 'colorpicker_named_tab' => __('Named'),
- 'colorpicker_named_title' => __('Named colors'),
- 'colorpicker_color' => __('Color:'),
- 'colorpicker_name' => _x('Name:', 'html attribute'),
- 'charmap_title' => __('Select custom character'),
- 'charmap_usage' => __('Use left and right arrows to navigate.'),
- 'image_title' => __('Insert/edit image'),
- 'image_src' => __('Image URL'),
- 'image_alt' => __('Image description'),
- 'image_list' => __('Image list'),
- 'image_border' => __('Border'),
- 'image_dimensions' => __('Dimensions'),
- 'image_vspace' => __('Vertical space'),
- 'image_hspace' => __('Horizontal space'),
- 'image_align' => __('Alignment'),
- 'image_align_baseline' => __('Baseline'),
- 'image_align_top' => __('Top'),
- 'image_align_middle' => __('Middle'),
- 'image_align_bottom' => __('Bottom'),
- 'image_align_texttop' => __('Text top'),
- 'image_align_textbottom' => __('Text bottom'),
- 'image_align_left' => __('Left'),
- 'image_align_right' => __('Right'),
- 'link_title' => __('Insert/edit link'),
- 'link_url' => __('Link URL'),
- 'link_target' => __('Target'),
- 'link_target_same' => __('Open link in the same window'),
- 'link_target_blank' => __('Open link in a new window'),
- 'link_titlefield' => __('Title'),
- 'link_is_email' => __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?'),
- 'link_is_external' => __('The URL you entered seems to external link, do you want to add the required http:// prefix?'),
- 'link_list' => __('Link list'),
- 'accessibility_help' => __('Accessibility Help'),
- 'accessibility_usage_title' => __('General Usage')
- );
-
- $media_dlg = array(
- 'title' => __('Insert / edit embedded media'),
- 'general' => __('General'),
- 'advanced' => __('Advanced'),
- 'file' => __('File/URL'),
- 'list' => __('List'),
- 'size' => __('Dimensions'),
- 'preview' => __('Preview'),
- 'constrain_proportions' => __('Constrain proportions'),
- 'type' => __('Type'),
- 'id' => __('Id'),
- 'name' => _x('Name', 'html attribute'),
- 'class_name' => __('Class'),
- 'vspace' => __('V-Space'),
- 'hspace' => __('H-Space'),
- 'play' => __('Auto play'),
- 'loop' => __('Loop'),
- 'menu' => __('Show menu'),
- 'quality' => __('Quality'),
- 'scale' => __('Scale'),
- 'align' => __('Align'),
- 'salign' => __('SAlign'),
- 'wmode' => __('WMode'),
- 'bgcolor' => __('Background'),
- 'base' => __('Base'),
- 'flashvars' => __('Flashvars'),
- 'liveconnect' => __('SWLiveConnect'),
- 'autohref' => __('AutoHREF'),
- 'cache' => __('Cache'),
- 'hidden' => __('Hidden'),
- 'controller' => __('Controller'),
- 'kioskmode' => __('Kiosk mode'),
- 'playeveryframe' => __('Play every frame'),
- 'targetcache' => __('Target cache'),
- 'correction' => __('No correction'),
- 'enablejavascript' => __('Enable JavaScript'),
- 'starttime' => __('Start time'),
- 'endtime' => __('End time'),
- 'href' => __('href'),
- 'qtsrcchokespeed' => __('Choke speed'),
- 'target' => __('Target'),
- 'volume' => __('Volume'),
- 'autostart' => __('Auto start'),
- 'enabled' => __('Enabled'),
- 'fullscreen' => __('Fullscreen'),
- 'invokeurls' => __('Invoke URLs'),
- 'mute' => __('Mute'),
- 'stretchtofit' => __('Stretch to fit'),
- 'windowlessvideo' => __('Windowless video'),
- 'balance' => __('Balance'),
- 'baseurl' => __('Base URL'),
- 'captioningid' => __('Captioning id'),
- 'currentmarker' => __('Current marker'),
- 'currentposition' => __('Current position'),
- 'defaultframe' => __('Default frame'),
- 'playcount' => __('Play count'),
- 'rate' => __('Rate'),
- 'uimode' => __('UI Mode'),
- 'flash_options' => __('Flash options'),
- 'qt_options' => __('QuickTime options'),
- 'wmp_options' => __('Windows media player options'),
- 'rmp_options' => __('Real media player options'),
- 'shockwave_options' => __('Shockwave options'),
- 'autogotourl' => __('Auto goto URL'),
- 'center' => __('Center'),
- 'imagestatus' => __('Image status'),
- 'maintainaspect' => __('Maintain aspect'),
- 'nojava' => __('No java'),
- 'prefetch' => __('Prefetch'),
- 'shuffle' => __('Shuffle'),
- 'console' => __('Console'),
- 'numloop' => __('Num loops'),
- 'controls' => __('Controls'),
- 'scriptcallbacks' => __('Script callbacks'),
- 'swstretchstyle' => __('Stretch style'),
- 'swstretchhalign' => __('Stretch H-Align'),
- 'swstretchvalign' => __('Stretch V-Align'),
- 'sound' => __('Sound'),
- 'progress' => __('Progress'),
- 'qtsrc' => __('QT Src'),
- 'qt_stream_warn' => __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.'),
- 'align_top' => __('Top'),
- 'align_right' => __('Right'),
- 'align_bottom' => __('Bottom'),
- 'align_left' => __('Left'),
- 'align_center' => __('Center'),
- 'align_top_left' => __('Top left'),
- 'align_top_right' => __('Top right'),
- 'align_bottom_left' => __('Bottom left'),
- 'align_bottom_right' => __('Bottom right'),
- 'flv_options' => __('Flash video options'),
- 'flv_scalemode' => __('Scale mode'),
- 'flv_buffer' => __('Buffer'),
- 'flv_startimage' => __('Start image'),
- 'flv_starttime' => __('Start time'),
- 'flv_defaultvolume' => __('Default volume'),
- 'flv_hiddengui' => __('Hidden GUI'),
- 'flv_autostart' => __('Auto start'),
- 'flv_loop' => __('Loop'),
- 'flv_showscalemodes' => __('Show scale modes'),
- 'flv_smoothvideo' => __('Smooth video'),
- 'flv_jscallback' => __('JS Callback'),
- 'html5_video_options' => __('HTML5 Video Options'),
- 'altsource1' => __('Alternative source 1'),
- 'altsource2' => __('Alternative source 2'),
- 'preload' => __('Preload'),
- 'poster' => __('Poster'),
- 'source' => __('Source')
- );
-
- $wordpress = array(
- 'wp_adv_desc' => __('Show/Hide Kitchen Sink (Alt + Shift + Z)'),
- 'wp_more_desc' => __('Insert More Tag (Alt + Shift + T)'),
- 'wp_page_desc' => __('Insert Page break (Alt + Shift + P)'),
- 'wp_help_desc' => __('Help (Alt + Shift + H)'),
- 'wp_more_alt' => __('More...'),
- 'wp_page_alt' => __('Next page...'),
- 'add_media' => __('Add Media'),
- 'add_image' => __('Add an Image'),
- 'add_video' => __('Add Video'),
- 'add_audio' => __('Add Audio'),
- 'editgallery' => __('Edit Gallery'),
- 'delgallery' => __('Delete Gallery'),
- 'wp_fullscreen_desc' => __('Distraction Free Writing mode (Alt + Shift + W)')
- );
-
- $wpeditimage = array(
- 'edit_img' => __('Edit Image'),
- 'del_img' => __('Delete Image'),
- 'adv_settings' => __('Advanced Settings'),
- 'none' => __('None'),
- 'size' => __('Size'),
- 'thumbnail' => __('Thumbnail'),
- 'medium' => __('Medium'),
- 'full_size' => __('Full Size'),
- 'current_link' => __('Current Link'),
- 'link_to_img' => __('Link to Image'),
- 'link_help' => __('Enter a link URL or click above for presets.'),
- 'adv_img_settings' => __('Advanced Image Settings'),
- 'source' => __('Source'),
- 'width' => __('Width'),
- 'height' => __('Height'),
- 'orig_size' => __('Original Size'),
- 'css' => __('CSS Class'),
- 'adv_link_settings' => __('Advanced Link Settings'),
- 'link_rel' => __('Link Rel'),
- 'height' => __('Height'),
- 'orig_size' => __('Original Size'),
- 'css' => __('CSS Class'),
- 's60' => __('60%'),
- 's70' => __('70%'),
- 's80' => __('80%'),
- 's90' => __('90%'),
- 's100' => __('100%'),
- 's110' => __('110%'),
- 's120' => __('120%'),
- 's130' => __('130%'),
- 'img_title' => __('Title'),
- 'caption' => __('Caption'),
- 'alt' => __('Alternative Text')
- );
-
- $locale = _WP_Editors::$mce_locale;
-
- $translated = 'tinyMCE.addI18n({' . $locale . ':' . json_encode( $default ) . "});\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced", ' . json_encode( $advanced ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced_dlg", ' . json_encode( $advanced_dlg ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.media_dlg", ' . json_encode( $media_dlg ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.wordpress", ' . json_encode( $wordpress ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.wpeditimage", ' . json_encode( $wpeditimage ) . ');';
-
- return $translated;
-}
-
-$lang = wp_mce_translation();
-
diff --git a/wp-includes/js/tinymce/license.txt b/wp-includes/js/tinymce/license.txt
deleted file mode 100644
index 1837b0acbe..0000000000
--- a/wp-includes/js/tinymce/license.txt
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/wp-includes/js/tinymce/mark_loaded_src.js b/wp-includes/js/tinymce/mark_loaded_src.js
deleted file mode 100644
index 2b53192671..0000000000
--- a/wp-includes/js/tinymce/mark_loaded_src.js
+++ /dev/null
@@ -1,20 +0,0 @@
-(function(){
- if ( typeof tinyMCEPreInit === 'undefined' )
- return;
-
- var t = tinyMCEPreInit, baseurl = t.base, markDone = tinymce.ScriptLoader.markDone, lang = t.ref.language,
- theme = t.ref.theme, plugins = t.ref.plugins, suffix = t.suffix;
-
- markDone( baseurl+'/langs/'+lang+'.js' );
- markDone( baseurl+'/themes/'+theme+'/editor_template'+suffix+'.js' );
- markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'.js' );
- markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'_dlg.js' );
-
- tinymce.each( plugins.split(','), function(plugin){
- if ( plugin && plugin.charAt(0) != '-' ) {
- markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
- markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
- markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' )
- }
- });
-})();
diff --git a/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js b/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
deleted file mode 100644
index 90847e78e3..0000000000
--- a/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){var d=this;d.editor=b;function a(e){var h=b.dom,g,f=b.selection.getSelectedBlocks();if(f.length){g=h.getAttrib(f[0],"dir");tinymce.each(f,function(i){if(!h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())){if(g!=e){h.setAttrib(i,"dir",e)}else{h.setAttrib(i,"dir",null)}}});b.nodeChanged()}}b.addCommand("mceDirectionLTR",function(){a("ltr")});b.addCommand("mceDirectionRTL",function(){a("rtl")});b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});b.onNodeChange.add(d._nodeChange,d)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js
deleted file mode 100644
index c90732bbd6..0000000000
--- a/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- tinymce.create('tinymce.plugins.Directionality', {
- init : function(ed, url) {
- var t = this;
-
- t.editor = ed;
-
- function setDir(dir) {
- var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks();
-
- if (blocks.length) {
- curDir = dom.getAttrib(blocks[0], "dir");
-
- tinymce.each(blocks, function(block) {
- // Add dir to block if the parent block doesn't already have that dir
- if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
- if (curDir != dir) {
- dom.setAttrib(block, "dir", dir);
- } else {
- dom.setAttrib(block, "dir", null);
- }
- }
- });
-
- ed.nodeChanged();
- }
- }
-
- ed.addCommand('mceDirectionLTR', function() {
- setDir("ltr");
- });
-
- ed.addCommand('mceDirectionRTL', function() {
- setDir("rtl");
- });
-
- ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
- ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
-
- ed.onNodeChange.add(t._nodeChange, t);
- },
-
- getInfo : function() {
- return {
- longname : 'Directionality',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- },
-
- // Private methods
-
- _nodeChange : function(ed, cm, n) {
- var dom = ed.dom, dir;
-
- n = dom.getParent(n, dom.isBlock);
- if (!n) {
- cm.setDisabled('ltr', 1);
- cm.setDisabled('rtl', 1);
- return;
- }
-
- dir = dom.getAttrib(n, 'dir');
- cm.setActive('ltr', dir == "ltr");
- cm.setDisabled('ltr', 0);
- cm.setActive('rtl', dir == "rtl");
- cm.setDisabled('rtl', 0);
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
-})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
deleted file mode 100644
index a2eb034839..0000000000
--- a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js
deleted file mode 100644
index a24a95657f..0000000000
--- a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var DOM = tinymce.DOM;
-
- tinymce.create('tinymce.plugins.FullScreenPlugin', {
- init : function(ed, url) {
- var t = this, s = {}, vp, posCss;
-
- t.editor = ed;
-
- // Register commands
- ed.addCommand('mceFullScreen', function() {
- var win, de = DOM.doc.documentElement;
-
- if (ed.getParam('fullscreen_is_enabled')) {
- if (ed.getParam('fullscreen_new_window'))
- closeFullscreen(); // Call to close in new window
- else {
- DOM.win.setTimeout(function() {
- tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
- tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
- tinyMCE.remove(ed);
- DOM.remove('mce_fullscreen_container');
- de.style.overflow = ed.getParam('fullscreen_html_overflow');
- DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
- DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
- }, 10);
- }
-
- return;
- }
-
- if (ed.getParam('fullscreen_new_window')) {
- win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
- try {
- win.resizeTo(screen.availWidth, screen.availHeight);
- } catch (e) {
- // Ignore
- }
- } else {
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
- s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
- s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
- vp = DOM.getViewPort();
- s.fullscreen_scrollx = vp.x;
- s.fullscreen_scrolly = vp.y;
-
- // Fixes an Opera bug where the scrollbars doesn't reappear
- if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
- s.fullscreen_overflow = 'auto';
-
- // Fixes an IE bug where horizontal scrollbars would appear
- if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
- s.fullscreen_overflow = 'auto';
-
- // Fixes an IE bug where the scrollbars doesn't reappear
- if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
- s.fullscreen_html_overflow = 'auto';
-
- if (s.fullscreen_overflow == '0px')
- s.fullscreen_overflow = '';
-
- DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
- de.style.overflow = 'hidden'; //Fix for IE6/7
- vp = DOM.getViewPort();
- DOM.win.scrollTo(0, 0);
-
- if (tinymce.isIE)
- vp.h -= 1;
-
- // Use fixed position if it exists
- if (tinymce.isIE6 || document.compatMode == 'BackCompat')
- posCss = 'absolute;top:' + vp.y;
- else
- posCss = 'fixed;top:0';
-
- n = DOM.add(DOM.doc.body, 'div', {
- id : 'mce_fullscreen_container',
- style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
- DOM.add(n, 'div', {id : 'mce_fullscreen'});
-
- tinymce.each(ed.settings, function(v, n) {
- s[n] = v;
- });
-
- s.id = 'mce_fullscreen';
- s.width = n.clientWidth;
- s.height = n.clientHeight - 15;
- s.fullscreen_is_enabled = true;
- s.fullscreen_editor_id = ed.id;
- s.theme_advanced_resizing = false;
- s.save_onsavecallback = function() {
- ed.setContent(tinyMCE.get(s.id).getContent());
- ed.execCommand('mceSave');
- };
-
- tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
- s[k] = v;
- });
-
- if (s.theme_advanced_toolbar_location === 'external')
- s.theme_advanced_toolbar_location = 'top';
-
- t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
- t.fullscreenEditor.onInit.add(function() {
- t.fullscreenEditor.setContent(ed.getContent());
- t.fullscreenEditor.focus();
- });
-
- t.fullscreenEditor.render();
-
- t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
- t.fullscreenElement.update();
- //document.body.overflow = 'hidden';
-
- t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
- var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
-
- // Get outer/inner size to get a delta size that can be used to calc the new iframe size
- outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
- innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
-
- fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
- });
- }
- });
-
- // Register buttons
- ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
-
- ed.onNodeChange.add(function(ed, cm) {
- cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
- });
- },
-
- getInfo : function() {
- return {
- longname : 'Fullscreen',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
deleted file mode 100644
index e21c29c750..0000000000
--- a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title></title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <script type="text/javascript" src="../../tiny_mce.js?ver=358-20121205"></script>
- <script type="text/javascript">
- function patchCallback(settings, key) {
- if (settings[key])
- settings[key] = "window.opener." + settings[key];
- }
-
- var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
-
- // Clone array
- for (var n in paSe)
- settings[n] = paSe[n];
-
- // Override options for fullscreen
- for (var n in paSe.fullscreen_settings)
- settings[n] = paSe.fullscreen_settings[n];
-
- // Patch callbacks, make them point to window.opener
- patchCallback(settings, 'urlconverter_callback');
- patchCallback(settings, 'insertlink_callback');
- patchCallback(settings, 'insertimage_callback');
- patchCallback(settings, 'setupcontent_callback');
- patchCallback(settings, 'save_callback');
- patchCallback(settings, 'onchange_callback');
- patchCallback(settings, 'init_instance_callback');
- patchCallback(settings, 'file_browser_callback');
- patchCallback(settings, 'cleanup_callback');
- patchCallback(settings, 'execcommand_callback');
- patchCallback(settings, 'oninit');
-
- // Set options
- delete settings.id;
- settings['mode'] = 'exact';
- settings['elements'] = 'fullscreenarea';
- settings['add_unload_trigger'] = false;
- settings['ask'] = false;
- settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
- settings['fullscreen_is_enabled'] = true;
- settings['fullscreen_editor_id'] = oeID;
- settings['theme_advanced_resizing'] = false;
- settings['strict_loading_mode'] = true;
-
- settings.save_onsavecallback = function() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
- window.opener.tinyMCE.get(oeID).execCommand('mceSave');
- window.close();
- };
-
- function unloadHandler(e) {
- moveContent();
- }
-
- function moveContent() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
- }
-
- function closeFullscreen() {
- moveContent();
- window.close();
- }
-
- function doParentSubmit() {
- moveContent();
-
- if (window.opener.tinyMCE.selectedInstance.formElement.form)
- window.opener.tinyMCE.selectedInstance.formElement.form.submit();
-
- window.close();
-
- return false;
- }
-
- function render() {
- var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
-
- e.value = window.opener.tinyMCE.get(oeID).getContent();
-
- vp = dom.getViewPort();
- settings.width = vp.w;
- settings.height = vp.h - 15;
-
- tinymce.dom.Event.add(window, 'resize', function() {
- var vp = dom.getViewPort();
-
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
- });
-
- tinyMCE.init(settings);
- }
-
- // Add onunload
- tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
- </script>
-</head>
-<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
-<form onsubmit="doParentSubmit();">
-<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
-</form>
-
-<script type="text/javascript">
- render();
-</script>
-
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js b/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
deleted file mode 100644
index 8bb96f9cbe..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
deleted file mode 100644
index 2a6f3ad299..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
+++ /dev/null
@@ -1,699 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
-
- tinymce.create('tinymce.plugins.InlinePopups', {
- init : function(ed, url) {
- // Replace window manager
- ed.onBeforeRenderUI.add(function() {
- ed.windowManager = new tinymce.InlineWindowManager(ed);
- DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
- });
- },
-
- getInfo : function() {
- return {
- longname : 'InlinePopups',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
- InlineWindowManager : function(ed) {
- var t = this;
-
- t.parent(ed);
- t.zIndex = 300000;
- t.count = 0;
- t.windows = {};
- },
-
- open : function(f, p) {
- var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
-
- f = f || {};
- p = p || {};
-
- // Run native windows
- if (!f.inline)
- return t.parent(f, p);
-
- parentWindow = t._frontWindow();
- if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
- parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
- }
-
- // Only store selection if the type is a normal window
- if (!f.type)
- t.bookmark = ed.selection.getBookmark(1);
-
- id = DOM.uniqueId();
- vp = DOM.getViewPort();
- f.width = parseInt(f.width || 320);
- f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
- f.min_width = parseInt(f.min_width || 150);
- f.min_height = parseInt(f.min_height || 100);
- f.max_width = parseInt(f.max_width || 2000);
- f.max_height = parseInt(f.max_height || 2000);
- f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
- f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
- f.movable = f.resizable = true;
- p.mce_width = f.width;
- p.mce_height = f.height;
- p.mce_inline = true;
- p.mce_window_id = id;
- p.mce_auto_focus = f.auto_focus;
-
- // Transpose
-// po = DOM.getPos(ed.getContainer());
-// f.left -= po.x;
-// f.top -= po.y;
-
- t.features = f;
- t.params = p;
- t.onOpen.dispatch(t, f, p);
-
- if (f.type) {
- opt += ' mceModal';
-
- if (f.type)
- opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
-
- f.resizable = false;
- }
-
- if (f.statusbar)
- opt += ' mceStatusbar';
-
- if (f.resizable)
- opt += ' mceResizable';
-
- if (f.minimizable)
- opt += ' mceMinimizable';
-
- if (f.maximizable)
- opt += ' mceMaximizable';
-
- if (f.movable)
- opt += ' mceMovable';
-
- // Create DOM objects
- t._addAll(DOM.doc.body,
- ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
- ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
- ['div', {id : id + '_top', 'class' : 'mceTop'},
- ['div', {'class' : 'mceLeft'}],
- ['div', {'class' : 'mceCenter'}],
- ['div', {'class' : 'mceRight'}],
- ['span', {id : id + '_title'}, f.title || '']
- ],
-
- ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
- ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
- ['span', {id : id + '_content'}],
- ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
- ],
-
- ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
- ['div', {'class' : 'mceLeft'}],
- ['div', {'class' : 'mceCenter'}],
- ['div', {'class' : 'mceRight'}],
- ['span', {id : id + '_status'}, 'Content']
- ],
-
- ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
- ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
- ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
- ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
- ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
- ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
- ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
- ]
- ]
- );
-
- DOM.setStyles(id, {top : -10000, left : -10000});
-
- // Fix gecko rendering bug, where the editors iframe messed with window contents
- if (tinymce.isGecko)
- DOM.setStyle(id, 'overflow', 'auto');
-
- // Measure borders
- if (!f.type) {
- dw += DOM.get(id + '_left').clientWidth;
- dw += DOM.get(id + '_right').clientWidth;
- dh += DOM.get(id + '_top').clientHeight;
- dh += DOM.get(id + '_bottom').clientHeight;
- }
-
- // Resize window
- DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
-
- u = f.url || f.file;
- if (u) {
- if (tinymce.relaxedDomain)
- u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
-
- u = tinymce._addVer(u);
- }
-
- if (!f.type) {
- DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
- DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
- DOM.setAttrib(id + '_ifr', 'src', u);
- } else {
- DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
-
- if (f.type == 'confirm')
- DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
-
- DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
- DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
-
- Event.add(id, 'keyup', function(evt) {
- var VK_ESCAPE = 27;
- if (evt.keyCode === VK_ESCAPE) {
- f.button_func(false);
- return Event.cancel(evt);
- }
- });
-
- Event.add(id, 'keydown', function(evt) {
- var cancelButton, VK_TAB = 9;
- if (evt.keyCode === VK_TAB) {
- cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
- if (cancelButton && cancelButton !== evt.target) {
- cancelButton.focus();
- } else {
- DOM.get(id + '_ok').focus();
- }
- return Event.cancel(evt);
- }
- });
- }
-
- // Register events
- mdf = Event.add(id, 'mousedown', function(e) {
- var n = e.target, w, vp;
-
- w = t.windows[id];
- t.focus(id);
-
- if (n.nodeName == 'A' || n.nodeName == 'a') {
- if (n.className == 'mceClose') {
- t.close(null, id);
- return Event.cancel(e);
- } else if (n.className == 'mceMax') {
- w.oldPos = w.element.getXY();
- w.oldSize = w.element.getSize();
-
- vp = DOM.getViewPort();
-
- // Reduce viewport size to avoid scrollbars
- vp.w -= 2;
- vp.h -= 2;
-
- w.element.moveTo(vp.x, vp.y);
- w.element.resizeTo(vp.w, vp.h);
- DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
- DOM.addClass(id + '_wrapper', 'mceMaximized');
- } else if (n.className == 'mceMed') {
- // Reset to old size
- w.element.moveTo(w.oldPos.x, w.oldPos.y);
- w.element.resizeTo(w.oldSize.w, w.oldSize.h);
- w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
-
- DOM.removeClass(id + '_wrapper', 'mceMaximized');
- } else if (n.className == 'mceMove')
- return t._startDrag(id, e, n.className);
- else if (DOM.hasClass(n, 'mceResize'))
- return t._startDrag(id, e, n.className.substring(13));
- }
- });
-
- clf = Event.add(id, 'click', function(e) {
- var n = e.target;
-
- t.focus(id);
-
- if (n.nodeName == 'A' || n.nodeName == 'a') {
- switch (n.className) {
- case 'mceClose':
- t.close(null, id);
- return Event.cancel(e);
-
- case 'mceButton mceOk':
- case 'mceButton mceCancel':
- f.button_func(n.className == 'mceButton mceOk');
- return Event.cancel(e);
- }
- }
- });
-
- // Make sure the tab order loops within the dialog.
- Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
- var iframe = DOM.get(id + '_ifr');
- if (iframe) {
- var body = iframe.contentWindow.document.body;
- var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
- if (evt.target.id === (id + '_left')) {
- focusable[focusable.length - 1].focus();
- } else {
- focusable[0].focus();
- }
- } else {
- DOM.get(id + '_ok').focus();
- }
- });
-
- // Add window
- w = t.windows[id] = {
- id : id,
- mousedown_func : mdf,
- click_func : clf,
- element : new Element(id, {blocker : 1, container : ed.getContainer()}),
- iframeElement : new Element(id + '_ifr'),
- features : f,
- deltaWidth : dw,
- deltaHeight : dh
- };
-
- w.iframeElement.on('focus', function() {
- t.focus(id);
- });
-
- // Setup blocker
- if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
- DOM.add(DOM.doc.body, 'div', {
- id : 'mceModalBlocker',
- 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
- style : {zIndex : t.zIndex - 1}
- });
-
- DOM.show('mceModalBlocker'); // Reduces flicker in IE
- DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
- } else
- DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
-
- if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
- DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
-
- DOM.setAttrib(id, 'aria-hidden', 'false');
- t.focus(id);
- t._fixIELayout(id, 1);
-
- // Focus ok button
- if (DOM.get(id + '_ok'))
- DOM.get(id + '_ok').focus();
- t.count++;
-
- return w;
- },
-
- focus : function(id) {
- var t = this, w;
-
- if (w = t.windows[id]) {
- w.zIndex = this.zIndex++;
- w.element.setStyle('zIndex', w.zIndex);
- w.element.update();
-
- id = id + '_wrapper';
- DOM.removeClass(t.lastId, 'mceFocus');
- DOM.addClass(id, 'mceFocus');
- t.lastId = id;
-
- if (w.focussedElement) {
- w.focussedElement.focus();
- } else if (DOM.get(id + '_ok')) {
- DOM.get(w.id + '_ok').focus();
- } else if (DOM.get(w.id + '_ifr')) {
- DOM.get(w.id + '_ifr').focus();
- }
- }
- },
-
- _addAll : function(te, ne) {
- var i, n, t = this, dom = tinymce.DOM;
-
- if (is(ne, 'string'))
- te.appendChild(dom.doc.createTextNode(ne));
- else if (ne.length) {
- te = te.appendChild(dom.create(ne[0], ne[1]));
-
- for (i=2; i<ne.length; i++)
- t._addAll(te, ne[i]);
- }
- },
-
- _startDrag : function(id, se, ac) {
- var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
-
- // Get positons and sizes
-// cp = DOM.getPos(t.editor.getContainer());
- cp = {x : 0, y : 0};
- vp = DOM.getViewPort();
-
- // Reduce viewport size to avoid scrollbars while dragging
- vp.w -= 2;
- vp.h -= 2;
-
- sex = se.screenX;
- sey = se.screenY;
- dx = dy = dw = dh = 0;
-
- // Handle mouse up
- mu = Event.add(d, 'mouseup', function(e) {
- Event.remove(d, 'mouseup', mu);
- Event.remove(d, 'mousemove', mm);
-
- if (eb)
- eb.remove();
-
- we.moveBy(dx, dy);
- we.resizeBy(dw, dh);
- sz = we.getSize();
- DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
- t._fixIELayout(id, 1);
-
- return Event.cancel(e);
- });
-
- if (ac != 'Move')
- startMove();
-
- function startMove() {
- if (eb)
- return;
-
- t._fixIELayout(id, 0);
-
- // Setup event blocker
- DOM.add(d.body, 'div', {
- id : 'mceEventBlocker',
- 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
- style : {zIndex : t.zIndex + 1}
- });
-
- if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
- DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
-
- eb = new Element('mceEventBlocker');
- eb.update();
-
- // Setup placeholder
- p = we.getXY();
- sz = we.getSize();
- sx = cp.x + p.x - vp.x;
- sy = cp.y + p.y - vp.y;
- DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
- ph = new Element('mcePlaceHolder');
- };
-
- // Handle mouse move/drag
- mm = Event.add(d, 'mousemove', function(e) {
- var x, y, v;
-
- startMove();
-
- x = e.screenX - sex;
- y = e.screenY - sey;
-
- switch (ac) {
- case 'ResizeW':
- dx = x;
- dw = 0 - x;
- break;
-
- case 'ResizeE':
- dw = x;
- break;
-
- case 'ResizeN':
- case 'ResizeNW':
- case 'ResizeNE':
- if (ac == "ResizeNW") {
- dx = x;
- dw = 0 - x;
- } else if (ac == "ResizeNE")
- dw = x;
-
- dy = y;
- dh = 0 - y;
- break;
-
- case 'ResizeS':
- case 'ResizeSW':
- case 'ResizeSE':
- if (ac == "ResizeSW") {
- dx = x;
- dw = 0 - x;
- } else if (ac == "ResizeSE")
- dw = x;
-
- dh = y;
- break;
-
- case 'mceMove':
- dx = x;
- dy = y;
- break;
- }
-
- // Boundary check
- if (dw < (v = w.features.min_width - sz.w)) {
- if (dx !== 0)
- dx += dw - v;
-
- dw = v;
- }
-
- if (dh < (v = w.features.min_height - sz.h)) {
- if (dy !== 0)
- dy += dh - v;
-
- dh = v;
- }
-
- dw = Math.min(dw, w.features.max_width - sz.w);
- dh = Math.min(dh, w.features.max_height - sz.h);
- dx = Math.max(dx, vp.x - (sx + vp.x));
- dy = Math.max(dy, vp.y - (sy + vp.y));
- dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
- dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
-
- // Move if needed
- if (dx + dy !== 0) {
- if (sx + dx < 0)
- dx = 0;
-
- if (sy + dy < 0)
- dy = 0;
-
- ph.moveTo(sx + dx, sy + dy);
- }
-
- // Resize if needed
- if (dw + dh !== 0)
- ph.resizeTo(sz.w + dw, sz.h + dh);
-
- return Event.cancel(e);
- });
-
- return Event.cancel(se);
- },
-
- resizeBy : function(dw, dh, id) {
- var w = this.windows[id];
-
- if (w) {
- w.element.resizeBy(dw, dh);
- w.iframeElement.resizeBy(dw, dh);
- }
- },
-
- close : function(win, id) {
- var t = this, w, d = DOM.doc, fw, id;
-
- id = t._findId(id || win);
-
- // Probably not inline
- if (!t.windows[id]) {
- t.parent(win);
- return;
- }
-
- t.count--;
-
- if (t.count == 0) {
- DOM.remove('mceModalBlocker');
- DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
- t.editor.focus();
- }
-
- if (w = t.windows[id]) {
- t.onClose.dispatch(t);
- Event.remove(d, 'mousedown', w.mousedownFunc);
- Event.remove(d, 'click', w.clickFunc);
- Event.clear(id);
- Event.clear(id + '_ifr');
-
- DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
- w.element.remove();
- delete t.windows[id];
-
- fw = t._frontWindow();
-
- if (fw)
- t.focus(fw.id);
- }
- },
-
- // Find front most window
- _frontWindow : function() {
- var fw, ix = 0;
- // Find front most window and focus that
- each (this.windows, function(w) {
- if (w.zIndex > ix) {
- fw = w;
- ix = w.zIndex;
- }
- });
- return fw;
- },
-
- setTitle : function(w, ti) {
- var e;
-
- w = this._findId(w);
-
- if (e = DOM.get(w + '_title'))
- e.innerHTML = DOM.encode(ti);
- },
-
- alert : function(txt, cb, s) {
- var t = this, w;
-
- w = t.open({
- title : t,
- type : 'alert',
- button_func : function(s) {
- if (cb)
- cb.call(s || t, s);
-
- t.close(null, w.id);
- },
- content : DOM.encode(t.editor.getLang(txt, txt)),
- inline : 1,
- width : 400,
- height : 130
- });
- },
-
- confirm : function(txt, cb, s) {
- var t = this, w;
-
- w = t.open({
- title : t,
- type : 'confirm',
- button_func : function(s) {
- if (cb)
- cb.call(s || t, s);
-
- t.close(null, w.id);
- },
- content : DOM.encode(t.editor.getLang(txt, txt)),
- inline : 1,
- width : 400,
- height : 130
- });
- },
-
- // Internal functions
-
- _findId : function(w) {
- var t = this;
-
- if (typeof(w) == 'string')
- return w;
-
- each(t.windows, function(wo) {
- var ifr = DOM.get(wo.id + '_ifr');
-
- if (ifr && w == ifr.contentWindow) {
- w = wo.id;
- return false;
- }
- });
-
- return w;
- },
-
- _fixIELayout : function(id, s) {
- var w, img;
-
- if (!tinymce.isIE6)
- return;
-
- // Fixes the bug where hover flickers and does odd things in IE6
- each(['n','s','w','e','nw','ne','sw','se'], function(v) {
- var e = DOM.get(id + '_resize_' + v);
-
- DOM.setStyles(e, {
- width : s ? e.clientWidth : '',
- height : s ? e.clientHeight : '',
- cursor : DOM.getStyle(e, 'cursor', 1)
- });
-
- DOM.setStyle(id + "_bottom", 'bottom', '-1px');
-
- e = 0;
- });
-
- // Fixes graphics glitch
- if (w = this.windows[id]) {
- // Fixes rendering bug after resize
- w.element.hide();
- w.element.show();
-
- // Forced a repaint of the window
- //DOM.get(id).style.filter = '';
-
- // IE has a bug where images used in CSS won't get loaded
- // sometimes when the cache in the browser is disabled
- // This fix tries to solve it by loading the images using the image object
- each(DOM.select('div,a', id), function(e, i) {
- if (e.currentStyle.backgroundImage != 'none') {
- img = new Image();
- img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
- }
- });
-
- DOM.get(id).style.filter = '';
- }
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
-})();
-
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
deleted file mode 100644
index 219139857e..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
deleted file mode 100644
index f957e49a3d..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
deleted file mode 100644
index b408ae1fe7..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
deleted file mode 100644
index 20acbbf7ae..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
deleted file mode 100644
index d5de1cc236..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif
deleted file mode 100644
index a5f068385d..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
deleted file mode 100644
index c2a2ad454d..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
deleted file mode 100644
index 0b4cc3682a..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
deleted file mode 100644
index ad07434df4..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Clearlooks 2 */
-
-/* Reset */
-.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
-
-/* General */
-.clearlooks2 {position:absolute; direction:ltr}
-.clearlooks2 .mceWrapper {position:static}
-.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
-.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
-.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
-
-/* Top */
-.clearlooks2 .mceTop,
-.clearlooks2 .mceTop div {
- top:0;
- width:100%;
- height:23px
-}
-.clearlooks2 .mceTop .mceLeft {
- width:55%;
- background-image: none;
- border-style: solid none none solid;
- border-width: 1px;
-}
-.clearlooks2 .mceTop .mceCenter {
-}
-.clearlooks2 .mceTop .mceRight {
- right:0;
- width:55%;
- height:23px;
- background-image: none;
- border-style: solid solid none none;
- border-width: 1px;
-}
-.clearlooks2 .mceTop span {
- width:100%;
- font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
- text-align:center;
- vertical-align:middle;
- line-height:23px;
- font-weight:bold;
-}
-.clearlooks2 .mceFocus .mceTop .mceLeft {
- background-image: none;
- border-style: solid none none solid;
- border-width: 1px;
-}
-.clearlooks2 .mceFocus .mceTop .mceCenter {
-}
-.clearlooks2 .mceFocus .mceTop .mceRight {
- background-image: none;
- border-style: solid solid none none;
- border-width: 1px;
-}
-.clearlooks2 .mceFocus .mceTop span {
-color:#FFF
-}
-
-/* Middle */
-.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
-.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
-.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:#E4F2FD;border-left:1px solid #c6d9e9}
-.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
-.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:#E4F2FD;border-right:1px solid #c6d9e9}
-
-/* Bottom */
-.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
-.clearlooks2 .mceBottom {left:0; bottom:0; width:100%;background:#E4F2FD;border-bottom:1px solid #c6d9e9}
-.clearlooks2 .mceBottom div {top:0}
-.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:#E4F2FD ;border-left:1px solid #c6d9e9}
-.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%}
-.clearlooks2 .mceBottom .mceRight {right:0; width:6px; background:#E4F2FD url(img/drag.gif) no-repeat;border-right:1px solid #c6d9e9}
-.clearlooks2 .mceBottom span {display:none}
-.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
-.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
-.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
-.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
-.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
-
-/* Actions */
-.clearlooks2 a {width:29px; height:16px; top:3px;}
-.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
-.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
-.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
-.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
-.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
-.clearlooks2 .mceMovable .mceMove {display:block}
-.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
-.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
-.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
-.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
-.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
-.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
-.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
-.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
-.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
-
-/* Resize */
-.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
-.clearlooks2 .mceResizable .mceResize {display:block}
-.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
-.clearlooks2 .mceMinimizable .mceMin {display:block}
-.clearlooks2 .mceMaximizable .mceMax {display:block}
-.clearlooks2 .mceMaximized .mceMed {display:block}
-.clearlooks2 .mceMaximized .mceMax {display:none}
-.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
-.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
-.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
-.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
-.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
-.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
-.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
-.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
-
-/* Alert/Confirm */
-.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
-.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
-.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
-.clearlooks2 a:hover {font-weight:bold;}
-.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#F9F9F9}
-.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
-.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
-.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
-.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
-.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/template.htm b/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
deleted file mode 100644
index 289b7acb54..0000000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
+++ /dev/null
@@ -1,387 +0,0 @@
-<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Template for dialogs</title>
-<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=358-20121205" />
-</head>
-<body>
-
-<div class="mceEditor">
- <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
- <div class="mceWrapper">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Blured</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
- <div class="mceWrapper mceMovable mceFocus">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Focused</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
- <div class="mceWrapper mceMovable mceFocus mceStatusbar">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
- <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar, Resizable</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
- <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Resizable, Maximizable</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
- <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Blurred, Maximizable, Statusbar, Resizable</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
- <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Maximized, Maximizable, Minimizable</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
- <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Blured</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>Content</span>
- <div class="mceRight"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Statusbar text.</span>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceMin" href="#"></a>
- <a class="mceMax" href="#"></a>
- <a class="mceMed" href="#"></a>
- <a class="mceClose" href="#"></a>
- <a class="mceResize mceResizeN" href="#"></a>
- <a class="mceResize mceResizeS" href="#"></a>
- <a class="mceResize mceResizeW" href="#"></a>
- <a class="mceResize mceResizeE" href="#"></a>
- <a class="mceResize mceResizeNW" href="#"></a>
- <a class="mceResize mceResizeNE" href="#"></a>
- <a class="mceResize mceResizeSW" href="#"></a>
- <a class="mceResize mceResizeSE" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
- <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Alert</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- </span>
- <div class="mceRight"></div>
- <div class="mceIcon"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceButton mceOk" href="#">Ok</a>
- <a class="mceClose" href="#"></a>
- </div>
- </div>
-
- <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
- <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
- <div class="mceTop">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- <span>Confirm</span>
- </div>
-
- <div class="mceMiddle">
- <div class="mceLeft"></div>
- <span>
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- </span>
- <div class="mceRight"></div>
- <div class="mceIcon"></div>
- </div>
-
- <div class="mceBottom">
- <div class="mceLeft"></div>
- <div class="mceCenter"></div>
- <div class="mceRight"></div>
- </div>
-
- <a class="mceMove" href="#"></a>
- <a class="mceButton mceOk" href="#">Ok</a>
- <a class="mceButton mceCancel" href="#">Cancel</a>
- <a class="mceClose" href="#"></a>
- </div>
- </div>
-</div>
-
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/plugins/media/css/media.css b/wp-includes/js/tinymce/plugins/media/css/media.css
deleted file mode 100644
index fd04898ca5..0000000000
--- a/wp-includes/js/tinymce/plugins/media/css/media.css
+++ /dev/null
@@ -1,17 +0,0 @@
-#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
-#hspace, #vspace { width: 50px }
-#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
-#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
-#width, #height { width: 40px }
-#src, #media_type { width: 250px }
-#class { width: 120px }
-#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
-.panel_wrapper div.current { height: 420px; overflow: auto }
-#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
-.mceAddSelectValue { background-color: #DDDDDD }
-#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
-#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
-#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
-#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
-#qt_qtsrc { width: 200px }
-iframe {border: 1px solid gray}
diff --git a/wp-includes/js/tinymce/plugins/media/editor_plugin.js b/wp-includes/js/tinymce/plugins/media/editor_plugin.js
deleted file mode 100644
index 9ac42e0d21..0000000000
--- a/wp-includes/js/tinymce/plugins/media/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m<d.length;m++){k=d[m][0];q={name:k,clsids:tinymce.explode(d[m][1]||""),mimes:tinymce.explode(d[m][2]||""),codebase:d[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;i+=(i?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});i=new RegExp("write("+i+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(s,t){if(t.name==="img"&&n.dom.hasClass(t.node,"mceItemMedia")){t.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(t,u,s){if(s.nodeName==="IMG"&&s.className.indexOf("mceItemMedia")!==-1){u.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var t,s;s=n.selection.getNode();if(o(s)){t=n.dom.getAttrib(s,"data-mce-json");if(t){t=h.parse(t);tinymce.each(b,function(u){var v=n.dom.getAttrib(s,u);if(v){t[u]=v}});t.type=r.getType(s.className).name.toLowerCase()}}if(!t){t={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:t})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(t,s,u){s.setActive("media",o(u))})},convertUrl:function(l,o){var k=this,n=k.editor,m=n.settings,p=m.url_converter,j=m.url_converter_scope||k;if(!l){return l}if(o){return n.documentBaseURI.toAbsolute(l)}return p.call(j,l,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":h.serialize(m,"'")});n.width=m.width=e(m.width||(m.type=="audio"?"300":"320"));n.height=m.height=e(m.height||(m.type=="audio"?"32":"240"));return n},dataToHtml:function(j,k){return this.editor.serializer.serialize(this.dataToImg(j,k),{forced_root_block:"",force_absolute:k})},htmlToData:function(l){var k,j,m;m={type:"flash",video:{sources:[]},params:{}};k=this.editor.parser.parse(l);j=k.getAll("img")[0];if(j){m=h.parse(j.attr("data-mce-json"));m.type=this.getType(j.attr("class")).name.toLowerCase();tinymce.each(b,function(n){var o=j.attr(n);if(o){m[n]=o}})}return m},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(n,J){var N,M,O,L,K;K=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(K){N=p.documentBaseURI;G.params.src=K;if(p.getParam("flash_video_player_absvideourl",true)){n=N.toAbsolute(n||"",true);J=N.toAbsolute(J||"",true)}O="";M=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(M,function(Q,P){Q=Q.replace(/\$url/,n||"");Q=Q.replace(/\$poster/,J||"");if(Q.length>0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new f("audio",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new f("object",1).attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B});tinymce.each(b,function(n){var J=G[n];if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&n!="type"){H.attr(n,J)}});for(I in G.params){s=new f("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});H.append(j)}if(G.object_html){y=new f("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(O){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(O)}function J(P,O){return H[(P.attr(O)||"").toLowerCase()]}function p(P){var O=P.replace(/^.*\.([^.]+)$/,"$1");return H[O.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=i.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:h.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new f("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!a[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=e(s.attr("width"));x=e(s.attr("height"));G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(b,function(O){M.attr(O,s.attr(O))});for(N in s.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":h.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js
deleted file mode 100644
index 517ef48604..0000000000
--- a/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js
+++ /dev/null
@@ -1,897 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
- mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
-
- // Media types supported by this plugin
- mediaTypes = [
- // Type, clsid:s, mime types, codebase
- ["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
- ["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
- ["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
- ["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
- ["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
- ["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
- ["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
- ["Iframe"],
- ["Video"],
- ["EmbeddedAudio"],
- ["Audio"]
- ];
-
- function normalizeSize(size) {
- return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
- }
-
- function toArray(obj) {
- var undef, out, i;
-
- if (obj && !obj.splice) {
- out = [];
-
- for (i = 0; true; i++) {
- if (obj[i])
- out[i] = obj[i];
- else
- break;
- }
-
- return out;
- }
-
- return obj;
- };
-
- tinymce.create('tinymce.plugins.MediaPlugin', {
- init : function(ed, url) {
- var self = this, lookup = {}, i, y, item, name;
-
- function isMediaImg(node) {
- return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
- };
-
- self.editor = ed;
- self.url = url;
-
- // Parse media types into a lookup table
- scriptRegExp = '';
- for (i = 0; i < mediaTypes.length; i++) {
- name = mediaTypes[i][0];
-
- item = {
- name : name,
- clsids : tinymce.explode(mediaTypes[i][1] || ''),
- mimes : tinymce.explode(mediaTypes[i][2] || ''),
- codebase : mediaTypes[i][3]
- };
-
- for (y = 0; y < item.clsids.length; y++)
- lookup['clsid:' + item.clsids[y]] = item;
-
- for (y = 0; y < item.mimes.length; y++)
- lookup[item.mimes[y]] = item;
-
- lookup['mceItem' + name] = item;
- lookup[name.toLowerCase()] = item;
-
- scriptRegExp += (scriptRegExp ? '|' : '') + name;
- }
-
- // Handle the media_types setting
- tinymce.each(ed.getParam("media_types",
- "video=mp4,m4v,ogv,webm;" +
- "silverlight=xap;" +
- "flash=swf,flv;" +
- "shockwave=dcr;" +
- "quicktime=mov,qt,mpg,mpeg;" +
- "shockwave=dcr;" +
- "windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
- "realmedia=rm,ra,ram;" +
- "java=jar;" +
- "audio=mp3,ogg"
- ).split(';'), function(item) {
- var i, extensions, type;
-
- item = item.split(/=/);
- extensions = tinymce.explode(item[1].toLowerCase());
- for (i = 0; i < extensions.length; i++) {
- type = lookup[item[0].toLowerCase()];
-
- if (type)
- lookup[extensions[i]] = type;
- }
- });
-
- scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
- self.lookup = lookup;
-
- ed.onPreInit.add(function() {
- // Allow video elements
- ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
-
- // Convert video elements to image placeholder
- ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
- var i = nodes.length;
-
- while (i--)
- self.objectToImg(nodes[i]);
- });
-
- // Convert image placeholders to video elements
- ed.serializer.addNodeFilter('img', function(nodes, name, args) {
- var i = nodes.length, node;
-
- while (i--) {
- node = nodes[i];
- if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
- self.imgToObject(node, args);
- }
- });
- });
-
- ed.onInit.add(function() {
- // Display "media" instead of "img" in element path
- if (ed.theme && ed.theme.onResolveName) {
- ed.theme.onResolveName.add(function(theme, path_object) {
- if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
- path_object.name = 'media';
- });
- }
-
- // Add contect menu if it's loaded
- if (ed && ed.plugins.contextmenu) {
- ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
- if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
- menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
- });
- }
- });
-
- // Register commands
- ed.addCommand('mceMedia', function() {
- var data, img;
-
- img = ed.selection.getNode();
- if (isMediaImg(img)) {
- data = ed.dom.getAttrib(img, 'data-mce-json');
- if (data) {
- data = JSON.parse(data);
-
- // Add some extra properties to the data object
- tinymce.each(rootAttributes, function(name) {
- var value = ed.dom.getAttrib(img, name);
-
- if (value)
- data[name] = value;
- });
-
- data.type = self.getType(img.className).name.toLowerCase();
- }
- }
-
- if (!data) {
- data = {
- type : 'flash',
- video: {sources:[]},
- params: {}
- };
- }
-
- ed.windowManager.open({
- file : url + '/media.htm',
- width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
- height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
- inline : 1
- }, {
- plugin_url : url,
- data : data
- });
- });
-
- // Register buttons
- ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
-
- // Update media selection status
- ed.onNodeChange.add(function(ed, cm, node) {
- cm.setActive('media', isMediaImg(node));
- });
- },
-
- convertUrl : function(url, force_absolute) {
- var self = this, editor = self.editor, settings = editor.settings,
- urlConverter = settings.url_converter,
- urlConverterScope = settings.url_converter_scope || self;
-
- if (!url)
- return url;
-
- if (force_absolute)
- return editor.documentBaseURI.toAbsolute(url);
-
- return urlConverter.call(urlConverterScope, url, 'src', 'object');
- },
-
- getInfo : function() {
- return {
- longname : 'Media',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- },
-
- /**
- * Converts the JSON data object to an img node.
- */
- dataToImg : function(data, force_absolute) {
- var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
-
- data.params.src = self.convertUrl(data.params.src, force_absolute);
-
- attrs = data.video.attrs;
- if (attrs)
- attrs.src = self.convertUrl(attrs.src, force_absolute);
-
- if (attrs)
- attrs.poster = self.convertUrl(attrs.poster, force_absolute);
-
- sources = toArray(data.video.sources);
- if (sources) {
- for (i = 0; i < sources.length; i++)
- sources[i].src = self.convertUrl(sources[i].src, force_absolute);
- }
-
- img = self.editor.dom.create('img', {
- id : data.id,
- style : data.style,
- align : data.align,
- hspace : data.hspace,
- vspace : data.vspace,
- src : self.editor.theme.url + '/img/trans.gif',
- 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
- 'data-mce-json' : JSON.serialize(data, "'")
- });
-
- img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
- img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
-
- return img;
- },
-
- /**
- * Converts the JSON data object to a HTML string.
- */
- dataToHtml : function(data, force_absolute) {
- return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
- },
-
- /**
- * Converts the JSON data object to a HTML string.
- */
- htmlToData : function(html) {
- var fragment, img, data;
-
- data = {
- type : 'flash',
- video: {sources:[]},
- params: {}
- };
-
- fragment = this.editor.parser.parse(html);
- img = fragment.getAll('img')[0];
-
- if (img) {
- data = JSON.parse(img.attr('data-mce-json'));
- data.type = this.getType(img.attr('class')).name.toLowerCase();
-
- // Add some extra properties to the data object
- tinymce.each(rootAttributes, function(name) {
- var value = img.attr(name);
-
- if (value)
- data[name] = value;
- });
- }
-
- return data;
- },
-
- /**
- * Get type item by extension, class, clsid or mime type.
- *
- * @method getType
- * @param {String} value Value to get type item by.
- * @return {Object} Type item object or undefined.
- */
- getType : function(value) {
- var i, values, typeItem;
-
- // Find type by checking the classes
- values = tinymce.explode(value, ' ');
- for (i = 0; i < values.length; i++) {
- typeItem = this.lookup[values[i]];
-
- if (typeItem)
- return typeItem;
- }
- },
-
- /**
- * Converts a tinymce.html.Node image element to video/object/embed.
- */
- imgToObject : function(node, args) {
- var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
- source, sources, params, param, typeItem, i, item, mp4Source, replacement,
- posterSrc, style, audio;
-
- // Adds the flash player
- function addPlayer(video_src, poster_src) {
- var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
-
- flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
- if (flashPlayer) {
- baseUri = editor.documentBaseURI;
- data.params.src = flashPlayer;
-
- // Convert the movie url to absolute urls
- if (editor.getParam('flash_video_player_absvideourl', true)) {
- video_src = baseUri.toAbsolute(video_src || '', true);
- poster_src = baseUri.toAbsolute(poster_src || '', true);
- }
-
- // Generate flash vars
- flashVarsOutput = '';
- flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
- tinymce.each(flashVars, function(value, name) {
- // Replace $url and $poster variables in flashvars value
- value = value.replace(/\$url/, video_src || '');
- value = value.replace(/\$poster/, poster_src || '');
-
- if (value.length > 0)
- flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
- });
-
- if (flashVarsOutput.length)
- data.params.flashvars = flashVarsOutput;
-
- params = editor.getParam('flash_video_player_params', {
- allowfullscreen: true,
- allowscriptaccess: true
- });
-
- tinymce.each(params, function(value, name) {
- data.params[name] = "" + value;
- });
- }
- };
-
- data = node.attr('data-mce-json');
- if (!data)
- return;
-
- data = JSON.parse(data);
- typeItem = this.getType(node.attr('class'));
-
- style = node.attr('data-mce-style');
- if (!style) {
- style = node.attr('style');
-
- if (style)
- style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
- }
-
- // Use node width/height to override the data width/height when the placeholder is resized
- data.width = node.attr('width') || data.width;
- data.height = node.attr('height') || data.height;
-
- // Handle iframe
- if (typeItem.name === 'Iframe') {
- replacement = new Node('iframe', 1);
-
- tinymce.each(rootAttributes, function(name) {
- var value = node.attr(name);
-
- if (name == 'class' && value)
- value = value.replace(/mceItem.+ ?/g, '');
-
- if (value && value.length > 0)
- replacement.attr(name, value);
- });
-
- for (name in data.params)
- replacement.attr(name, data.params[name]);
-
- replacement.attr({
- style: style,
- src: data.params.src
- });
-
- node.replace(replacement);
-
- return;
- }
-
- // Handle scripts
- if (this.editor.settings.media_use_script) {
- replacement = new Node('script', 1).attr('type', 'text/javascript');
-
- value = new Node('#text', 3);
- value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
- width: node.attr('width'),
- height: node.attr('height')
- })) + ');';
-
- replacement.append(value);
- node.replace(replacement);
-
- return;
- }
-
- // Add HTML5 video element
- if (typeItem.name === 'Video' && data.video.sources && data.video.sources[0]) {
- // Create new object element
- video = new Node('video', 1).attr(tinymce.extend({
- id : node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style
- }, data.video.attrs));
-
- // Get poster source and use that for flash fallback
- if (data.video.attrs)
- posterSrc = data.video.attrs.poster;
-
- sources = data.video.sources = toArray(data.video.sources);
- for (i = 0; i < sources.length; i++) {
- if (/\.mp4$/.test(sources[i].src))
- mp4Source = sources[i].src;
- }
-
- if (!sources[0].type) {
- video.attr('src', sources[0].src);
- sources.splice(0, 1);
- }
-
- for (i = 0; i < sources.length; i++) {
- source = new Node('source', 1).attr(sources[i]);
- source.shortEnded = true;
- video.append(source);
- }
-
- // Create flash fallback for video if we have a mp4 source
- if (mp4Source) {
- addPlayer(mp4Source, posterSrc);
- typeItem = self.getType('flash');
- } else
- data.params.src = '';
- }
-
- // Add HTML5 audio element
- if (typeItem.name === 'Audio' && data.video.sources && data.video.sources[0]) {
- // Create new object element
- audio = new Node('audio', 1).attr(tinymce.extend({
- id : node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style
- }, data.video.attrs));
-
- // Get poster source and use that for flash fallback
- if (data.video.attrs)
- posterSrc = data.video.attrs.poster;
-
- sources = data.video.sources = toArray(data.video.sources);
- if (!sources[0].type) {
- audio.attr('src', sources[0].src);
- sources.splice(0, 1);
- }
-
- for (i = 0; i < sources.length; i++) {
- source = new Node('source', 1).attr(sources[i]);
- source.shortEnded = true;
- audio.append(source);
- }
-
- data.params.src = '';
- }
-
- if (typeItem.name === 'EmbeddedAudio') {
- embed = new Node('embed', 1);
- embed.shortEnded = true;
- embed.attr({
- id: node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style,
- type: node.attr('type')
- });
-
- for (name in data.params)
- embed.attr(name, data.params[name]);
-
- tinymce.each(rootAttributes, function(name) {
- if (data[name] && name != 'type')
- embed.attr(name, data[name]);
- });
-
- data.params.src = '';
- }
-
- // Do we have a params src then we can generate object
- if (data.params.src) {
- // Is flv movie add player for it
- if (/\.flv$/i.test(data.params.src))
- addPlayer(data.params.src, '');
-
- if (args && args.force_absolute)
- data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
-
- // Create new object element
- object = new Node('object', 1).attr({
- id : node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style
- });
-
- tinymce.each(rootAttributes, function(name) {
- var value = data[name];
-
- if (name == 'class' && value)
- value = value.replace(/mceItem.+ ?/g, '');
-
- if (value && name != 'type')
- object.attr(name, value);
- });
-
- // Add params
- for (name in data.params) {
- param = new Node('param', 1);
- param.shortEnded = true;
- value = data.params[name];
-
- // Windows media needs to use url instead of src for the media URL
- if (name === 'src' && typeItem.name === 'WindowsMedia')
- name = 'url';
-
- param.attr({name: name, value: value});
- object.append(param);
- }
-
- // Setup add type and classid if strict is disabled
- if (this.editor.getParam('media_strict', true)) {
- object.attr({
- data: data.params.src,
- type: typeItem.mimes[0]
- });
- } else {
- if ( typeItem.clsids )
- object.attr('clsid', typeItem.clsids[0]);
- object.attr('codebase', typeItem.codebase);
-
- embed = new Node('embed', 1);
- embed.shortEnded = true;
- embed.attr({
- id: node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style,
- type: typeItem.mimes[0]
- });
-
- for (name in data.params)
- embed.attr(name, data.params[name]);
-
- tinymce.each(rootAttributes, function(name) {
- if (data[name] && name != 'type')
- embed.attr(name, data[name]);
- });
-
- object.append(embed);
- }
-
- // Insert raw HTML
- if (data.object_html) {
- value = new Node('#text', 3);
- value.raw = true;
- value.value = data.object_html;
- object.append(value);
- }
-
- // Append object to video element if it exists
- if (video)
- video.append(object);
- }
-
- if (video) {
- // Insert raw HTML
- if (data.video_html) {
- value = new Node('#text', 3);
- value.raw = true;
- value.value = data.video_html;
- video.append(value);
- }
- }
-
- if (audio) {
- // Insert raw HTML
- if (data.video_html) {
- value = new Node('#text', 3);
- value.raw = true;
- value.value = data.video_html;
- audio.append(value);
- }
- }
-
- var n = video || audio || object || embed;
- if (n)
- node.replace(n);
- else
- node.remove();
- },
-
- /**
- * Converts a tinymce.html.Node video/object/embed to an img element.
- *
- * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
- * <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
- *
- * The JSON structure will be like this:
- * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
- */
- objectToImg : function(node) {
- var object, embed, video, iframe, img, name, id, width, height, style, i, html,
- param, params, source, sources, data, type, lookup = this.lookup,
- matches, attrs, urlConverter = this.editor.settings.url_converter,
- urlConverterScope = this.editor.settings.url_converter_scope,
- hspace, vspace, align, bgcolor;
-
- function getInnerHTML(node) {
- return new tinymce.html.Serializer({
- inner: true,
- validate: false
- }).serialize(node);
- };
-
- function lookupAttribute(o, attr) {
- return lookup[(o.attr(attr) || '').toLowerCase()];
- }
-
- function lookupExtension(src) {
- var ext = src.replace(/^.*\.([^.]+)$/, '$1');
- return lookup[ext.toLowerCase() || ''];
- }
-
- // If node isn't in document
- if (!node.parent)
- return;
-
- // Handle media scripts
- if (node.name === 'script') {
- if (node.firstChild)
- matches = scriptRegExp.exec(node.firstChild.value);
-
- if (!matches)
- return;
-
- type = matches[1];
- data = {video : {}, params : JSON.parse(matches[2])};
- width = data.params.width;
- height = data.params.height;
- }
-
- // Setup data objects
- data = data || {
- video : {},
- params : {}
- };
-
- // Setup new image object
- img = new Node('img', 1);
- img.attr({
- src : this.editor.theme.url + '/img/trans.gif'
- });
-
- // Video element
- name = node.name;
- if (name === 'video' || name == 'audio') {
- video = node;
- object = node.getAll('object')[0];
- embed = node.getAll('embed')[0];
- width = video.attr('width');
- height = video.attr('height');
- id = video.attr('id');
- data.video = {attrs : {}, sources : []};
-
- // Get all video attributes
- attrs = data.video.attrs;
- for (name in video.attributes.map)
- attrs[name] = video.attributes.map[name];
-
- source = node.attr('src');
- if (source)
- data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
-
- // Get all sources
- sources = video.getAll("source");
- for (i = 0; i < sources.length; i++) {
- source = sources[i].remove();
-
- data.video.sources.push({
- src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
- type: source.attr('type'),
- media: source.attr('media')
- });
- }
-
- // Convert the poster URL
- if (attrs.poster)
- attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
- }
-
- // Object element
- if (node.name === 'object') {
- object = node;
- embed = node.getAll('embed')[0];
- }
-
- // Embed element
- if (node.name === 'embed')
- embed = node;
-
- // Iframe element
- if (node.name === 'iframe') {
- iframe = node;
- type = 'Iframe';
- }
-
- if (object) {
- // Get width/height
- width = width || object.attr('width');
- height = height || object.attr('height');
- style = style || object.attr('style');
- id = id || object.attr('id');
- hspace = hspace || object.attr('hspace');
- vspace = vspace || object.attr('vspace');
- align = align || object.attr('align');
- bgcolor = bgcolor || object.attr('bgcolor');
- data.name = object.attr('name');
-
- // Get all object params
- params = object.getAll("param");
- for (i = 0; i < params.length; i++) {
- param = params[i];
- name = param.remove().attr('name');
-
- if (!excludedAttrs[name])
- data.params[name] = param.attr('value');
- }
-
- data.params.src = data.params.src || object.attr('data');
- }
-
- if (embed) {
- // Get width/height
- width = width || embed.attr('width');
- height = height || embed.attr('height');
- style = style || embed.attr('style');
- id = id || embed.attr('id');
- hspace = hspace || embed.attr('hspace');
- vspace = vspace || embed.attr('vspace');
- align = align || embed.attr('align');
- bgcolor = bgcolor || embed.attr('bgcolor');
-
- // Get all embed attributes
- for (name in embed.attributes.map) {
- if (!excludedAttrs[name] && !data.params[name])
- data.params[name] = embed.attributes.map[name];
- }
- }
-
- if (iframe) {
- // Get width/height
- width = normalizeSize(iframe.attr('width'));
- height = normalizeSize(iframe.attr('height'));
- style = style || iframe.attr('style');
- id = iframe.attr('id');
- hspace = iframe.attr('hspace');
- vspace = iframe.attr('vspace');
- align = iframe.attr('align');
- bgcolor = iframe.attr('bgcolor');
-
- tinymce.each(rootAttributes, function(name) {
- img.attr(name, iframe.attr(name));
- });
-
- // Get all iframe attributes
- for (name in iframe.attributes.map) {
- if (!excludedAttrs[name] && !data.params[name])
- data.params[name] = iframe.attributes.map[name];
- }
- }
-
- // Use src not movie
- if (data.params.movie) {
- data.params.src = data.params.src || data.params.movie;
- delete data.params.movie;
- }
-
- // Convert the URL to relative/absolute depending on configuration
- if (data.params.src)
- data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
-
- if (video) {
- if (node.name === 'video')
- type = lookup.video.name;
- else if (node.name === 'audio')
- type = lookup.audio.name;
- }
-
- if (object && !type)
- type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
-
- if (embed && !type)
- type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
-
- // for embedded audio we preserve the original specified type
- if (embed && type == 'EmbeddedAudio') {
- data.params.type = embed.attr('type');
- }
-
- // Replace the video/object/embed element with a placeholder image containing the data
- node.replace(img);
-
- // Remove embed
- if (embed)
- embed.remove();
-
- // Serialize the inner HTML of the object element
- if (object) {
- html = getInnerHTML(object.remove());
-
- if (html)
- data.object_html = html;
- }
-
- // Serialize the inner HTML of the video element
- if (video) {
- html = getInnerHTML(video.remove());
-
- if (html)
- data.video_html = html;
- }
-
- data.hspace = hspace;
- data.vspace = vspace;
- data.align = align;
- data.bgcolor = bgcolor;
-
- // Set width/height of placeholder
- img.attr({
- id : id,
- 'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
- style : style,
- width : width || (node.name == 'audio' ? "300" : "320"),
- height : height || (node.name == 'audio' ? "32" : "240"),
- hspace : hspace,
- vspace : vspace,
- align : align,
- bgcolor : bgcolor,
- "data-mce-json" : JSON.serialize(data, "'")
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/media/js/embed.js b/wp-includes/js/tinymce/plugins/media/js/embed.js
deleted file mode 100644
index 6fe25de090..0000000000
--- a/wp-includes/js/tinymce/plugins/media/js/embed.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
- */
-
-function writeFlash(p) {
- writeEmbed(
- 'D27CDB6E-AE6D-11cf-96B8-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'application/x-shockwave-flash',
- p
- );
-}
-
-function writeShockWave(p) {
- writeEmbed(
- '166B1BCA-3F9C-11CF-8075-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
- 'application/x-director',
- p
- );
-}
-
-function writeQuickTime(p) {
- writeEmbed(
- '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
- 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
- 'video/quicktime',
- p
- );
-}
-
-function writeRealMedia(p) {
- writeEmbed(
- 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'audio/x-pn-realaudio-plugin',
- p
- );
-}
-
-function writeWindowsMedia(p) {
- p.url = p.src;
- writeEmbed(
- '6BF52A52-394A-11D3-B153-00C04F79FAA6',
- 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
- 'application/x-mplayer2',
- p
- );
-}
-
-function writeEmbed(cls, cb, mt, p) {
- var h = '', n;
-
- h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
- h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
- h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
- h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
- h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
- h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
- h += '>';
-
- for (n in p)
- h += '<param name="' + n + '" value="' + p[n] + '">';
-
- h += '<embed type="' + mt + '"';
-
- for (n in p)
- h += n + '="' + p[n] + '" ';
-
- h += '></embed></object>';
-
- document.write(h);
-}
diff --git a/wp-includes/js/tinymce/plugins/media/js/media.js b/wp-includes/js/tinymce/plugins/media/js/media.js
deleted file mode 100644
index b21abb5f3c..0000000000
--- a/wp-includes/js/tinymce/plugins/media/js/media.js
+++ /dev/null
@@ -1,513 +0,0 @@
-(function() {
- var url;
-
- if (url = tinyMCEPopup.getParam("media_external_list_url"))
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
-
- function get(id) {
- return document.getElementById(id);
- }
-
- function clone(obj) {
- var i, len, copy, attr;
-
- if (null == obj || "object" != typeof obj)
- return obj;
-
- // Handle Array
- if ('length' in obj) {
- copy = [];
-
- for (i = 0, len = obj.length; i < len; ++i) {
- copy[i] = clone(obj[i]);
- }
-
- return copy;
- }
-
- // Handle Object
- copy = {};
- for (attr in obj) {
- if (obj.hasOwnProperty(attr))
- copy[attr] = clone(obj[attr]);
- }
-
- return copy;
- }
-
- function getVal(id) {
- var elm = get(id);
-
- if (elm.nodeName == "SELECT")
- return elm.options[elm.selectedIndex].value;
-
- if (elm.type == "checkbox")
- return elm.checked;
-
- return elm.value;
- }
-
- function setVal(id, value, name) {
- if (typeof(value) != 'undefined' && value != null) {
- var elm = get(id);
-
- if (elm.nodeName == "SELECT")
- selectByValue(document.forms[0], id, value);
- else if (elm.type == "checkbox") {
- if (typeof(value) == 'string') {
- value = value.toLowerCase();
- value = (!name && value === 'true') || (name && value === name.toLowerCase());
- }
- elm.checked = !!value;
- } else
- elm.value = value;
- }
- }
-
- window.Media = {
- init : function() {
- var html, editor, self = this;
-
- self.editor = editor = tinyMCEPopup.editor;
-
- // Setup file browsers and color pickers
- get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
- get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
- get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
- get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
- get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
- get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
- get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
- get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media');
-
- html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
- if (html == "")
- get("linklistrow").style.display = 'none';
- else
- get("linklistcontainer").innerHTML = html;
-
- if (isVisible('filebrowser'))
- get('src').style.width = '230px';
-
- if (isVisible('video_filebrowser_altsource1'))
- get('video_altsource1').style.width = '220px';
-
- if (isVisible('video_filebrowser_altsource2'))
- get('video_altsource2').style.width = '220px';
-
- if (isVisible('audio_filebrowser_altsource1'))
- get('audio_altsource1').style.width = '220px';
-
- if (isVisible('audio_filebrowser_altsource2'))
- get('audio_altsource2').style.width = '220px';
-
- if (isVisible('filebrowser_poster'))
- get('video_poster').style.width = '220px';
-
- editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
-
- self.setDefaultDialogSettings(editor);
- self.data = clone(tinyMCEPopup.getWindowArg('data'));
- self.dataToForm();
- self.preview();
-
- updateColor('bgcolor_pick', 'bgcolor');
- },
-
- insert : function() {
- var editor = tinyMCEPopup.editor;
-
- this.formToData();
- editor.execCommand('mceRepaint');
- tinyMCEPopup.restoreSelection();
- editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
- tinyMCEPopup.close();
- },
-
- preview : function() {
- get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
- },
-
- moveStates : function(to_form, field) {
- var data = this.data, editor = this.editor,
- mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
-
- defaultStates = {
- // QuickTime
- quicktime_autoplay : true,
- quicktime_controller : true,
-
- // Flash
- flash_play : true,
- flash_loop : true,
- flash_menu : true,
-
- // WindowsMedia
- windowsmedia_autostart : true,
- windowsmedia_enablecontextmenu : true,
- windowsmedia_invokeurls : true,
-
- // RealMedia
- realmedia_autogotourl : true,
- realmedia_imagestatus : true
- };
-
- function parseQueryParams(str) {
- var out = {};
-
- if (str) {
- tinymce.each(str.split('&'), function(item) {
- var parts = item.split('=');
-
- out[unescape(parts[0])] = unescape(parts[1]);
- });
- }
-
- return out;
- };
-
- function setOptions(type, names) {
- var i, name, formItemName, value, list;
-
- if (type == data.type || type == 'global') {
- names = tinymce.explode(names);
- for (i = 0; i < names.length; i++) {
- name = names[i];
- formItemName = type == 'global' ? name : type + '_' + name;
-
- if (type == 'global')
- list = data;
- else if (type == 'video' || type == 'audio') {
- list = data.video.attrs;
-
- if (!list && !to_form)
- data.video.attrs = list = {};
- } else
- list = data.params;
-
- if (list) {
- if (to_form) {
- setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
- } else {
- delete list[name];
-
- value = getVal(formItemName);
- if ((type == 'video' || type == 'audio') && value === true)
- value = name;
-
- if (defaultStates[formItemName]) {
- if (value !== defaultStates[formItemName]) {
- value = "" + value;
- list[name] = value;
- }
- } else if (value) {
- value = "" + value;
- list[name] = value;
- }
- }
- }
- }
- }
- }
-
- if (!to_form) {
- data.type = get('media_type').options[get('media_type').selectedIndex].value;
- data.width = getVal('width');
- data.height = getVal('height');
-
- // Switch type based on extension
- src = getVal('src');
- if (field == 'src') {
- ext = src.replace(/^.*\.([^.]+)$/, '$1');
- if (typeInfo = mediaPlugin.getType(ext))
- data.type = typeInfo.name.toLowerCase();
-
- setVal('media_type', data.type);
- }
-
- if (data.type == "video" || data.type == "audio") {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src: getVal('src')};
- }
- }
-
- // Hide all fieldsets and show the one active
- get('video_options').style.display = 'none';
- get('audio_options').style.display = 'none';
- get('flash_options').style.display = 'none';
- get('quicktime_options').style.display = 'none';
- get('shockwave_options').style.display = 'none';
- get('windowsmedia_options').style.display = 'none';
- get('realmedia_options').style.display = 'none';
- get('embeddedaudio_options').style.display = 'none';
-
- if (get(data.type + '_options'))
- get(data.type + '_options').style.display = 'block';
-
- setVal('media_type', data.type);
-
- setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
- setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
- setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
- setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
- setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
- setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
- setOptions('audio', 'autoplay,loop,preload,controls');
- setOptions('embeddedaudio', 'autoplay,loop,controls');
- setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
-
- if (to_form) {
- if (data.type == 'video') {
- if (data.video.sources[0])
- setVal('src', data.video.sources[0].src);
-
- src = data.video.sources[1];
- if (src)
- setVal('video_altsource1', src.src);
-
- src = data.video.sources[2];
- if (src)
- setVal('video_altsource2', src.src);
- } else if (data.type == 'audio') {
- if (data.video.sources[0])
- setVal('src', data.video.sources[0].src);
-
- src = data.video.sources[1];
- if (src)
- setVal('audio_altsource1', src.src);
-
- src = data.video.sources[2];
- if (src)
- setVal('audio_altsource2', src.src);
- } else {
- // Check flash vars
- if (data.type == 'flash') {
- tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
- if (value == '$url')
- data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
- });
- }
-
- setVal('src', data.params.src);
- }
- } else {
- src = getVal("src");
-
- // YouTube Embed
- if (src.match(/youtube\.com\/embed\/\w+/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- setVal('src', src);
- setVal('media_type', data.type);
- } else {
- // YouTube *NEW*
- if (src.match(/youtu\.be\/[a-z1-9.-_]+/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // YouTube
- if (src.match(/youtube\.com(.+)v=([^&]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
- }
-
- // Google video
- if (src.match(/video\.google\.com(.+)docid=([^&]+)/)) {
- data.width = 425;
- data.height = 326;
- data.type = 'flash';
- src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // Vimeo
- if (src.match(/vimeo\.com\/([0-9]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // stream.cz
- if (src.match(/stream\.cz\/((?!object).)*\/([0-9]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // Google maps
- if (src.match(/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed";
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- if (data.type == 'video') {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src : src};
-
- src = getVal("video_altsource1");
- if (src)
- data.video.sources[1] = {src : src};
-
- src = getVal("video_altsource2");
- if (src)
- data.video.sources[2] = {src : src};
- } else if (data.type == 'audio') {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src : src};
-
- src = getVal("audio_altsource1");
- if (src)
- data.video.sources[1] = {src : src};
-
- src = getVal("audio_altsource2");
- if (src)
- data.video.sources[2] = {src : src};
- } else
- data.params.src = src;
-
- // Set default size
- setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
- setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
- }
- },
-
- dataToForm : function() {
- this.moveStates(true);
- },
-
- formToData : function(field) {
- if (field == "width" || field == "height")
- this.changeSize(field);
-
- if (field == 'source') {
- this.moveStates(false, field);
- setVal('source', this.editor.plugins.media.dataToHtml(this.data));
- this.panel = 'source';
- } else {
- if (this.panel == 'source') {
- this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
- this.dataToForm();
- this.panel = '';
- }
-
- this.moveStates(false, field);
- this.preview();
- }
- },
-
- beforeResize : function() {
- this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
- this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
- },
-
- changeSize : function(type) {
- var width, height, scale, size;
-
- if (get('constrain').checked) {
- width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
- height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
-
- if (type == 'width') {
- this.height = Math.round((width / this.width) * height);
- setVal('height', this.height);
- } else {
- this.width = Math.round((height / this.height) * width);
- setVal('width', this.width);
- }
- }
- },
-
- getMediaListHTML : function() {
- if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
- var html = "";
-
- html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
- html += '<option value="">---</option>';
-
- for (var i=0; i<tinyMCEMediaList.length; i++)
- html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
-
- html += '</select>';
-
- return html;
- }
-
- return "";
- },
-
- getMediaTypeHTML : function(editor) {
- function option(media_type, element) {
- if (!editor.schema.getElementRule(element || media_type)) {
- return '';
- }
-
- return '<option value="'+media_type+'">'+tinyMCEPopup.editor.translate("media_dlg."+media_type)+'</option>'
- }
-
- var html = "";
-
- html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
- html += option("video");
- html += option("audio");
- html += option("flash", "object");
- html += option("quicktime", "object");
- html += option("shockwave", "object");
- html += option("windowsmedia", "object");
- html += option("realmedia", "object");
- html += option("iframe");
-
- if (editor.getParam('media_embedded_audio', false)) {
- html += option('embeddedaudio', "object");
- }
-
- html += '</select>';
- return html;
- },
-
- setDefaultDialogSettings : function(editor) {
- var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
- tinymce.each(defaultDialogSettings, function(v, k) {
- setVal(k, v);
- });
- }
- };
-
- tinyMCEPopup.requireLangPack();
- tinyMCEPopup.onInit.add(function() {
- Media.init();
- });
-})();
diff --git a/wp-includes/js/tinymce/plugins/media/media.htm b/wp-includes/js/tinymce/plugins/media/media.htm
deleted file mode 100644
index f52888b4f7..0000000000
--- a/wp-includes/js/tinymce/plugins/media/media.htm
+++ /dev/null
@@ -1,922 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#media_dlg.title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/media.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/mctabs.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/validate.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/form_utils.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=358-20121205"></script>
- <link href="css/media.css?ver=358-20121205" rel="stylesheet" type="text/css" />
-</head>
-<body style="display: none" role="application">
-<form onsubmit="Media.insert();return false;" action="#">
- <div class="tabs" role="presentation">
- <ul>
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
- <li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="general_panel" class="panel current">
- <fieldset>
- <legend>{#media_dlg.general}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td><label for="media_type">{#media_dlg.type}</label></td>
- <td>
- <select id="media_type"></select>
- </td>
- </tr>
- <tr>
- <td><label for="src">{#media_dlg.file}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
- <td id="filebrowsercontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr id="linklistrow">
- <td><label for="linklist">{#media_dlg.list}</label></td>
- <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
- </tr>
- <tr>
- <td><label for="width">{#media_dlg.size}</label></td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
- <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
- <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset>
- <legend>{#media_dlg.preview}</legend>
- <div id="prev"></div>
- </fieldset>
- </div>
-
- <div id="advanced_panel" class="panel">
- <fieldset>
- <legend>{#media_dlg.advanced}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
- <tr>
- <td><label for="id">{#media_dlg.id}</label></td>
- <td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
- <td><label for="name">{#media_dlg.name}</label></td>
- <td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="align">{#media_dlg.align}</label></td>
- <td>
- <select id="align" name="align" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="top">{#media_dlg.align_top}</option>
- <option value="right">{#media_dlg.align_right}</option>
- <option value="bottom">{#media_dlg.align_bottom}</option>
- <option value="left">{#media_dlg.align_left}</option>
- </select>
- </td>
-
- <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
- <td id="bgcolor_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="vspace">{#media_dlg.vspace}</label></td>
- <td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
- <td><label for="hspace">{#media_dlg.hspace}</label></td>
- <td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="video_options">
- <legend>{#media_dlg.html5_video_options}</legend>
-
- <table role="presentation">
- <tr>
- <td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
- <td id="video_altsource1_filebrowser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
- <td id="video_altsource2_filebrowser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="video_poster">{#media_dlg.poster}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
- <td id="video_poster_filebrowser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="video_preload">{#media_dlg.preload}</label></td>
- <td>
- <select id="video_preload" name="video_preload" onchange="Media.formToData();">
- <option value="none">{#media_dlg.preload_none}</option>
- <option value="metadata">{#media_dlg.preload_metadata}</option>
- <option value="auto">{#media_dlg.preload_auto}</option>
- </select>
- </td>
- </tr>
- </table>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
- <td><label for="video_autoplay">{#media_dlg.play}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
- <td><label for="video_muted">{#media_dlg.mute}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
- <td><label for="video_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
- <td><label for="video_controls">{#media_dlg.controls}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="embeddedaudio_options">
- <legend>{#media_dlg.embedded_audio_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
- <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
- <td><label for="audio_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
- <td><label for="audio_controls">{#media_dlg.controls}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="audio_options">
- <legend>{#media_dlg.html5_audio_options}</legend>
-
- <table role="presentation">
- <tr>
- <td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
- <td id="audio_altsource1_filebrowser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
- <td id="audio_altsource2_filebrowser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="audio_preload">{#media_dlg.preload}</label></td>
- <td>
- <select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
- <option value="none">{#media_dlg.preload_none}</option>
- <option value="metadata">{#media_dlg.preload_metadata}</option>
- <option value="auto">{#media_dlg.preload_auto}</option>
- </select>
- </td>
- </tr>
- </table>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
- <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
- <td><label for="audio_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
-
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
- <td><label for="audio_controls">{#media_dlg.controls}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="flash_options">
- <legend>{#media_dlg.flash_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td><label for="flash_quality">{#media_dlg.quality}</label></td>
- <td>
- <select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="high">high</option>
- <option value="low">low</option>
- <option value="autolow">autolow</option>
- <option value="autohigh">autohigh</option>
- <option value="best">best</option>
- </select>
- </td>
-
- <td><label for="flash_scale">{#media_dlg.scale}</label></td>
- <td>
- <select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="showall">showall</option>
- <option value="noborder">noborder</option>
- <option value="exactfit">exactfit</option>
- <option value="noscale">noscale</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
- <td>
- <select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="window">window</option>
- <option value="opaque">opaque</option>
- <option value="transparent">transparent</option>
- </select>
- </td>
-
- <td><label for="flash_salign">{#media_dlg.salign}</label></td>
- <td>
- <select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="l">{#media_dlg.align_left}</option>
- <option value="t">{#media_dlg.align_top}</option>
- <option value="r">{#media_dlg.align_right}</option>
- <option value="b">{#media_dlg.align_bottom}</option>
- <option value="tl">{#media_dlg.align_top_left}</option>
- <option value="tr">{#media_dlg.align_top_right}</option>
- <option value="bl">{#media_dlg.align_bottom_left}</option>
- <option value="br">{#media_dlg.align_bottom_right}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="flash_play">{#media_dlg.play}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="flash_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="flash_menu">{#media_dlg.menu}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
- <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
- <table role="presentation">
- <tr>
- <td><label for="flash_base">{#media_dlg.base}</label></td>
- <td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
- <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="quicktime_options">
- <legend>{#media_dlg.qt_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
- <td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
- <td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
- <option value="">{#not_set}</option>
- <option value="tofit">tofit</option>
- <option value="aspect">aspect</option>
- </select>
- </td>
-
- <td colspan="2">&nbsp;</td>
- </tr>
-
- <tr>
- <td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
- <td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
-
- <td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
- <td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="quicktime_target">{#media_dlg.target}</label></td>
- <td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
-
- <td><label for="quicktime_href">{#media_dlg.href}</label></td>
- <td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
- <td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
-
- <td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
- <td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
- <td colspan="4">
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
- <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="windowsmedia_options">
- <legend>{#media_dlg.wmp_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
- <td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
- <td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
-
- <td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
- <td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
- <td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
-
- <td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
- <td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
- <td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
-
- <td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
- <td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
- <td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
-
- <td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
- <td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
- <td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
-
- <td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
- <td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
- </tr>
-
- </table>
- </fieldset>
-
- <fieldset id="realmedia_options">
- <legend>{#media_dlg.rmp_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_center">{#media_dlg.center}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
- <td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- &nbsp;
- </td>
- </tr>
-
- <tr>
- <td><label for="realmedia_console">{#media_dlg.console}</label></td>
- <td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
-
- <td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
- <td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
- <td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
-
- <td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
- <td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset id="shockwave_options">
- <legend>{#media_dlg.shockwave_options}</legend>
-
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
- <td>
- <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
- <option value="none">{#not_set}</option>
- <option value="meet">Meet</option>
- <option value="fill">Fill</option>
- <option value="stage">Stage</option>
- </select>
- </td>
-
- <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
- <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
- </tr>
-
- <tr>
- <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
- <td>
- <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
- <option value="none">{#not_set}</option>
- <option value="left">{#media_dlg.align_left}</option>
- <option value="center">{#media_dlg.align_center}</option>
- <option value="right">{#media_dlg.align_right}</option>
- </select>
- </td>
-
- <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
- <td>
- <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
- <option value="none">{#not_set}</option>
- <option value="meet">Meet</option>
- <option value="fill">Fill</option>
- <option value="stage">Stage</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
- <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
- <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
- </tr>
- </table>
- </td>
- </tr>
-
-
- <tr>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
- <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
- </tr>
- </table>
- </td>
-
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
- <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
- </div>
-
- <div id="source_panel" class="panel">
- <fieldset>
- <legend>{#media_dlg.source}</legend>
- <textarea id="source" style="width: 99%; height: 390px"></textarea>
- </fieldset>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#insert}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
- </form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/plugins/media/moxieplayer.swf b/wp-includes/js/tinymce/plugins/media/moxieplayer.swf
deleted file mode 100644
index 9c6daf9b73..0000000000
--- a/wp-includes/js/tinymce/plugins/media/moxieplayer.swf
+++ /dev/null
@@ -1 +0,0 @@
-<html><body>You are being <a href="https://raw.github.com/moxiecode/moxieplayer/master/bin-release/moxieplayer.swf">redirected</a>.</body></html> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js b/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
deleted file mode 100644
index 0ab05ebbb6..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*(&nbsp;)+/gi,/(&nbsp;|<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/&quot;/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/&nbsp;/gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length<d){i+="\n"}e([[l,i]])}j=h.dom.decode(tinymce.html.Entities.encodeRaw(j));if(g(k,"array")){e(k)}else{if(g(k,"string")){e(new RegExp(k,"gi"))}}if(f=="none"){e([[/\n+/g," "]])}else{if(f=="br"){e([[/\n/g,"<br />"]])}else{if(f=="p"){e([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{e([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js
deleted file mode 100644
index c8230e9c9b..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js
+++ /dev/null
@@ -1,885 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var each = tinymce.each,
- defs = {
- paste_auto_cleanup_on_paste : true,
- paste_enable_default_filters : true,
- paste_block_drop : false,
- paste_retain_style_properties : "none",
- paste_strip_class_attributes : "mso",
- paste_remove_spans : false,
- paste_remove_styles : false,
- paste_remove_styles_if_webkit : true,
- paste_convert_middot_lists : true,
- paste_convert_headers_to_strong : false,
- paste_dialog_width : "450",
- paste_dialog_height : "400",
- paste_max_consecutive_linebreaks: 2,
- paste_text_use_dialog : false,
- paste_text_sticky : false,
- paste_text_sticky_default : false,
- paste_text_notifyalways : false,
- paste_text_linebreaktype : "combined",
- paste_text_replacements : [
- [/\u2026/g, "..."],
- [/[\x93\x94\u201c\u201d]/g, '"'],
- [/[\x60\x91\x92\u2018\u2019]/g, "'"]
- ]
- };
-
- function getParam(ed, name) {
- return ed.getParam(name, defs[name]);
- }
-
- tinymce.create('tinymce.plugins.PastePlugin', {
- init : function(ed, url) {
- var t = this;
-
- t.editor = ed;
- t.url = url;
-
- // Setup plugin events
- t.onPreProcess = new tinymce.util.Dispatcher(t);
- t.onPostProcess = new tinymce.util.Dispatcher(t);
-
- // Register default handlers
- t.onPreProcess.add(t._preProcess);
- t.onPostProcess.add(t._postProcess);
-
- // Register optional preprocess handler
- t.onPreProcess.add(function(pl, o) {
- ed.execCallback('paste_preprocess', pl, o);
- });
-
- // Register optional postprocess
- t.onPostProcess.add(function(pl, o) {
- ed.execCallback('paste_postprocess', pl, o);
- });
-
- ed.onKeyDown.addToTop(function(ed, e) {
- // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
- return false; // Stop other listeners
- });
-
- // Initialize plain text flag
- ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
-
- // This function executes the process handlers and inserts the contents
- // force_rich overrides plain text mode set by user, important for pasting with execCommand
- function process(o, force_rich) {
- var dom = ed.dom, rng;
-
- // Execute pre process handlers
- t.onPreProcess.dispatch(t, o);
-
- // Create DOM structure
- o.node = dom.create('div', 0, o.content);
-
- // If pasting inside the same element and the contents is only one block
- // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
- if (tinymce.isGecko) {
- rng = ed.selection.getRng(true);
- if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
- // Is only one block node and it doesn't contain word stuff
- if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
- dom.remove(o.node.firstChild, true);
- }
- }
-
- // Execute post process handlers
- t.onPostProcess.dispatch(t, o);
-
- // Serialize content
- o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
-
- // Plain text option active?
- if ((!force_rich) && (ed.pasteAsPlainText)) {
- t._insertPlainText(o.content);
-
- if (!getParam(ed, "paste_text_sticky")) {
- ed.pasteAsPlainText = false;
- ed.controlManager.setActive("pastetext", false);
- }
- } else {
- t._insert(o.content);
- }
- }
-
- // Add command for external usage
- ed.addCommand('mceInsertClipboardContent', function(u, o) {
- process(o, true);
- });
-
- if (!getParam(ed, "paste_text_use_dialog")) {
- ed.addCommand('mcePasteText', function(u, v) {
- var cookie = tinymce.util.Cookie;
-
- ed.pasteAsPlainText = !ed.pasteAsPlainText;
- ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
-
- if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
- if (getParam(ed, "paste_text_sticky")) {
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
- } else {
- ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
- }
-
- if (!getParam(ed, "paste_text_notifyalways")) {
- cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
- }
- }
- });
- }
-
- ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
- ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
-
- // This function grabs the contents from the clipboard by adding a
- // hidden div and placing the caret inside it and after the browser paste
- // is done it grabs that contents and processes that
- function grabContent(e) {
- var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
-
- // Check if browser supports direct plaintext access
- if (e.clipboardData || dom.doc.dataTransfer) {
- textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
-
- if (ed.pasteAsPlainText) {
- e.preventDefault();
- process({content : dom.encode(textContent).replace(/\r?\n/g, '<br />')});
- return;
- }
- }
-
- if (dom.get('_mcePaste'))
- return;
-
- // Create container to paste into
- n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
-
- // If contentEditable mode we need to find out the position of the closest element
- if (body != ed.getDoc().body)
- posY = dom.getPos(ed.selection.getStart(), body).y;
- else
- posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
-
- // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
- // If also needs to be in view on IE or the paste would fail
- dom.setStyles(n, {
- position : 'absolute',
- left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
- top : posY - 25,
- width : 1,
- height : 1,
- overflow : 'hidden'
- });
-
- if (tinymce.isIE) {
- // Store away the old range
- oldRng = sel.getRng();
-
- // Select the container
- rng = dom.doc.body.createTextRange();
- rng.moveToElementText(n);
- rng.execCommand('Paste');
-
- // Remove container
- dom.remove(n);
-
- // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
- // to IE security settings so we pass the junk though better than nothing right
- if (n.innerHTML === '\uFEFF\uFEFF') {
- ed.execCommand('mcePasteWord');
- e.preventDefault();
- return;
- }
-
- // Restore the old range and clear the contents before pasting
- sel.setRng(oldRng);
- sel.setContent('');
-
- // For some odd reason we need to detach the the mceInsertContent call from the paste event
- // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
- // when it tries to restore the selection
- setTimeout(function() {
- // Process contents
- process({content : n.innerHTML});
- }, 0);
-
- // Block the real paste event
- return tinymce.dom.Event.cancel(e);
- } else {
- function block(e) {
- e.preventDefault();
- };
-
- // Block mousedown and click to prevent selection change
- dom.bind(ed.getDoc(), 'mousedown', block);
- dom.bind(ed.getDoc(), 'keydown', block);
-
- or = ed.selection.getRng();
-
- // Move select contents inside DIV
- n = n.firstChild;
- rng = ed.getDoc().createRange();
- rng.setStart(n, 0);
- rng.setEnd(n, 2);
- sel.setRng(rng);
-
- // Wait a while and grab the pasted contents
- window.setTimeout(function() {
- var h = '', nl;
-
- // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
- if (!dom.select('div.mcePaste > div.mcePaste').length) {
- nl = dom.select('div.mcePaste');
-
- // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
- each(nl, function(n) {
- var child = n.firstChild;
-
- // WebKit inserts a DIV container with lots of odd styles
- if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
- dom.remove(child, 1);
- }
-
- // Remove apply style spans
- each(dom.select('span.Apple-style-span', n), function(n) {
- dom.remove(n, 1);
- });
-
- // Remove bogus br elements
- each(dom.select('br[data-mce-bogus]', n), function(n) {
- dom.remove(n);
- });
-
- // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
- if (n.parentNode.className != 'mcePaste')
- h += n.innerHTML;
- });
- } else {
- // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
- // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
- h = '<p>' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '</p><p>').replace(/\r?\n/g, '<br />') + '</p>';
- }
-
- // Remove the nodes
- each(dom.select('div.mcePaste'), function(n) {
- dom.remove(n);
- });
-
- // Restore the old selection
- if (or)
- sel.setRng(or);
-
- process({content : h});
-
- // Unblock events ones we got the contents
- dom.unbind(ed.getDoc(), 'mousedown', block);
- dom.unbind(ed.getDoc(), 'keydown', block);
- }, 0);
- }
- }
-
- // Check if we should use the new auto process method
- if (getParam(ed, "paste_auto_cleanup_on_paste")) {
- // Is it's Opera or older FF use key handler
- if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
- ed.onKeyDown.addToTop(function(ed, e) {
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
- grabContent(e);
- });
- } else {
- // Grab contents on paste event on Gecko and WebKit
- ed.onPaste.addToTop(function(ed, e) {
- return grabContent(e);
- });
- }
- }
-
- ed.onInit.add(function() {
- ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
-
- // Block all drag/drop events
- if (getParam(ed, "paste_block_drop")) {
- ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- return false;
- });
- }
- });
-
- // Add legacy support
- t._legacySupport();
- },
-
- getInfo : function() {
- return {
- longname : 'Paste text/word',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- },
-
- _preProcess : function(pl, o) {
- var ed = this.editor,
- h = o.content,
- grep = tinymce.grep,
- explode = tinymce.explode,
- trim = tinymce.trim,
- len, stripClass;
-
- //console.log('Before preprocess:' + o.content);
-
- function process(items) {
- each(items, function(v) {
- // Remove or replace
- if (v.constructor == RegExp)
- h = h.replace(v, '');
- else
- h = h.replace(v[0], v[1]);
- });
- }
-
- if (ed.settings.paste_enable_default_filters == false) {
- return;
- }
-
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
- if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) {
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
- process([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, '$1']]);
-
- // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
- process([
- [/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
- [/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
- [/<BR><BR>/g, '<br>'] // Replace back the double brs but into a single BR
- ]);
- }
-
- // Detect Word content and process it more aggressive
- if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
- o.wordContent = true; // Mark the pasted contents as word specific content
- //console.log('Word contents detected.');
-
- // Process away some basic content
- process([
- /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
- /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
- ]);
-
- if (getParam(ed, "paste_convert_headers_to_strong")) {
- h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
- }
-
- if (getParam(ed, "paste_convert_middot_lists")) {
- process([
- [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
- [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
- [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
- ]);
- }
-
- process([
- // Word comments like conditional comments etc
- /<!--[\s\S]+?-->/gi,
-
- // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
- /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
-
- // Convert <s> into <strike> for line-though
- [/<(\/?)s>/gi, "<$1strike>"],
-
- // Replace nsbp entites to char since it's easier to handle
- [/&nbsp;/gi, "\u00a0"]
- ]);
-
- // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
- // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
- do {
- len = h.length;
- h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
- } while (len != h.length);
-
- // Remove all spans if no styles is to be retained
- if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
- h = h.replace(/<\/?span[^>]*>/gi, "");
- } else {
- // We're keeping styles, so at least clean them up.
- // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
-
- process([
- // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
- [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
- function(str, spaces) {
- return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
- }
- ],
-
- // Examine all styles: delete junk, transform some, and keep the rest
- [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
- function(str, tag, style) {
- var n = [],
- i = 0,
- s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
-
- // Examine each style definition within the tag's style attribute
- each(s, function(v) {
- var name, value,
- parts = explode(v, ":");
-
- function ensureUnits(v) {
- return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
- }
-
- if (parts.length == 2) {
- name = parts[0].toLowerCase();
- value = parts[1].toLowerCase();
-
- // Translate certain MS Office styles into their CSS equivalents
- switch (name) {
- case "mso-padding-alt":
- case "mso-padding-top-alt":
- case "mso-padding-right-alt":
- case "mso-padding-bottom-alt":
- case "mso-padding-left-alt":
- case "mso-margin-alt":
- case "mso-margin-top-alt":
- case "mso-margin-right-alt":
- case "mso-margin-bottom-alt":
- case "mso-margin-left-alt":
- case "mso-table-layout-alt":
- case "mso-height":
- case "mso-width":
- case "mso-vertical-align-alt":
- n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
- return;
-
- case "horiz-align":
- n[i++] = "text-align:" + value;
- return;
-
- case "vert-align":
- n[i++] = "vertical-align:" + value;
- return;
-
- case "font-color":
- case "mso-foreground":
- n[i++] = "color:" + value;
- return;
-
- case "mso-background":
- case "mso-highlight":
- n[i++] = "background:" + value;
- return;
-
- case "mso-default-height":
- n[i++] = "min-height:" + ensureUnits(value);
- return;
-
- case "mso-default-width":
- n[i++] = "min-width:" + ensureUnits(value);
- return;
-
- case "mso-padding-between-alt":
- n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
- return;
-
- case "text-line-through":
- if ((value == "single") || (value == "double")) {
- n[i++] = "text-decoration:line-through";
- }
- return;
-
- case "mso-zero-height":
- if (value == "yes") {
- n[i++] = "display:none";
- }
- return;
- }
-
- // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
- if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
- return;
- }
-
- // If it reached this point, it must be a valid CSS style
- n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
- }
- });
-
- // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
- if (i > 0) {
- return tag + ' style="' + n.join(';') + '"';
- } else {
- return tag;
- }
- }
- ]
- ]);
- }
- }
-
- // Replace headers with <strong>
- if (getParam(ed, "paste_convert_headers_to_strong")) {
- process([
- [/<h[1-6][^>]*>/gi, "<p><strong>"],
- [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
- ]);
- }
-
- process([
- // Copy paste from Java like Open Office will produce this junk on FF
- [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
- ]);
-
- // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
- // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
- stripClass = getParam(ed, "paste_strip_class_attributes");
-
- if (stripClass !== "none") {
- function removeClasses(match, g1) {
- if (stripClass === "all")
- return '';
-
- var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
- function(v) {
- return (/^(?!mso)/i.test(v));
- }
- );
-
- return cls.length ? ' class="' + cls.join(" ") + '"' : '';
- };
-
- h = h.replace(/ class="([^"]+)"/gi, removeClasses);
- h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
- }
-
- // Remove spans option
- if (getParam(ed, "paste_remove_spans")) {
- h = h.replace(/<\/?span[^>]*>/gi, "");
- }
-
- //console.log('After preprocess:' + h);
-
- o.content = h;
- },
-
- /**
- * Various post process items.
- */
- _postProcess : function(pl, o) {
- var t = this, ed = t.editor, dom = ed.dom, styleProps;
-
- if (ed.settings.paste_enable_default_filters == false) {
- return;
- }
-
- if (o.wordContent) {
- // Remove named anchors or TOC links
- each(dom.select('a', o.node), function(a) {
- if (!a.href || a.href.indexOf('#_Toc') != -1)
- dom.remove(a, 1);
- });
-
- if (getParam(ed, "paste_convert_middot_lists")) {
- t._convertLists(pl, o);
- }
-
- // Process styles
- styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
-
- // Process only if a string was specified and not equal to "all" or "*"
- if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
- styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
-
- // Retains some style properties
- each(dom.select('*', o.node), function(el) {
- var newStyle = {}, npc = 0, i, sp, sv;
-
- // Store a subset of the existing styles
- if (styleProps) {
- for (i = 0; i < styleProps.length; i++) {
- sp = styleProps[i];
- sv = dom.getStyle(el, sp);
-
- if (sv) {
- newStyle[sp] = sv;
- npc++;
- }
- }
- }
-
- // Remove all of the existing styles
- dom.setAttrib(el, 'style', '');
-
- if (styleProps && npc > 0)
- dom.setStyles(el, newStyle); // Add back the stored subset of styles
- else // Remove empty span tags that do not have class attributes
- if (el.nodeName == 'SPAN' && !el.className)
- dom.remove(el, true);
- });
- }
- }
-
- // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
- if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
- each(dom.select('*[style]', o.node), function(el) {
- el.removeAttribute('style');
- el.removeAttribute('data-mce-style');
- });
- } else {
- if (tinymce.isWebKit) {
- // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
- // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
- each(dom.select('*', o.node), function(el) {
- el.removeAttribute('data-mce-style');
- });
- }
- }
- },
-
- /**
- * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
- */
- _convertLists : function(pl, o) {
- var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
-
- // Convert middot lists into real semantic lists
- each(dom.select('p', o.node), function(p) {
- var sib, val = '', type, html, idx, parents;
-
- // Get text node value at beginning of paragraph
- for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
- val += sib.nodeValue;
-
- val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
-
- // Detect unordered lists look for bullets
- if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
- type = 'ul';
-
- // Detect ordered lists 1., a. or ixv.
- if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
- type = 'ol';
-
- // Check if node value matches the list pattern: o&nbsp;&nbsp;
- if (type) {
- margin = parseFloat(p.style.marginLeft || 0);
-
- if (margin > lastMargin)
- levels.push(margin);
-
- if (!listElm || type != lastType) {
- listElm = dom.create(type);
- dom.insertAfter(listElm, p);
- } else {
- // Nested list element
- if (margin > lastMargin) {
- listElm = li.appendChild(dom.create(type));
- } else if (margin < lastMargin) {
- // Find parent level based on margin value
- idx = tinymce.inArray(levels, margin);
- parents = dom.getParents(listElm.parentNode, type);
- listElm = parents[parents.length - 1 - idx] || listElm;
- }
- }
-
- // Remove middot or number spans if they exists
- each(dom.select('span', p), function(span) {
- var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
-
- // Remove span with the middot or the number
- if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
- dom.remove(span);
- else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
- dom.remove(span);
- });
-
- html = p.innerHTML;
-
- // Remove middot/list items
- if (type == 'ul')
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
- else
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
-
- // Create li and add paragraph data into the new li
- li = listElm.appendChild(dom.create('li', 0, html));
- dom.remove(p);
-
- lastMargin = margin;
- lastType = type;
- } else
- listElm = lastMargin = 0; // End list element
- });
-
- // Remove any left over makers
- html = o.node.innerHTML;
- if (html.indexOf('__MCE_ITEM__') != -1)
- o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
- },
-
- /**
- * Inserts the specified contents at the caret position.
- */
- _insert : function(h, skip_undo) {
- var ed = this.editor, r = ed.selection.getRng();
-
- // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
- if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
- ed.getDoc().execCommand('Delete', false, null);
-
- ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
- },
-
- /**
- * Instead of the old plain text method which tried to re-create a paste operation, the
- * new approach adds a plain text mode toggle switch that changes the behavior of paste.
- * This function is passed the same input that the regular paste plugin produces.
- * It performs additional scrubbing and produces (and inserts) the plain text.
- * This approach leverages all of the great existing functionality in the paste
- * plugin, and requires minimal changes to add the new functionality.
- * Speednet - June 2009
- */
- _insertPlainText : function(content) {
- var ed = this.editor,
- linebr = getParam(ed, "paste_text_linebreaktype"),
- rl = getParam(ed, "paste_text_replacements"),
- is = tinymce.is;
-
- function process(items) {
- each(items, function(v) {
- if (v.constructor == RegExp)
- content = content.replace(v, "");
- else
- content = content.replace(v[0], v[1]);
- });
- };
-
- if ((typeof(content) === "string") && (content.length > 0)) {
- // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
- if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
- process([
- /[\n\r]+/g
- ]);
- } else {
- // Otherwise just get rid of carriage returns (only need linefeeds)
- process([
- /\r+/g
- ]);
- }
-
- process([
- [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
- [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
- [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
- /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
- [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars.
- ]);
-
- var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks"));
- if (maxLinebreaks > -1) {
- var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g");
- var linebreakReplacement = "";
-
- while (linebreakReplacement.length < maxLinebreaks) {
- linebreakReplacement += "\n";
- }
-
- process([
- [maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks
- ]);
- }
-
- content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
-
- // Perform default or custom replacements
- if (is(rl, "array")) {
- process(rl);
- } else if (is(rl, "string")) {
- process(new RegExp(rl, "gi"));
- }
-
- // Treat paragraphs as specified in the config
- if (linebr == "none") {
- // Convert all line breaks to space
- process([
- [/\n+/g, " "]
- ]);
- } else if (linebr == "br") {
- // Convert all line breaks to <br />
- process([
- [/\n/g, "<br />"]
- ]);
- } else if (linebr == "p") {
- // Convert all line breaks to <p>...</p>
- process([
- [/\n+/g, "</p><p>"],
- [/^(.*<\/p>)(<p>)$/, '<p>$1']
- ]);
- } else {
- // defaults to "combined"
- // Convert single line breaks to <br /> and double line breaks to <p>...</p>
- process([
- [/\n\n/g, "</p><p>"],
- [/^(.*<\/p>)(<p>)$/, '<p>$1'],
- [/\n/g, "<br />"]
- ]);
- }
-
- ed.execCommand('mceInsertContent', false, content);
- }
- },
-
- /**
- * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
- */
- _legacySupport : function() {
- var t = this, ed = t.editor;
-
- // Register command(s) for backwards compatibility
- ed.addCommand("mcePasteWord", function() {
- ed.windowManager.open({
- file: t.url + "/pasteword.htm",
- width: parseInt(getParam(ed, "paste_dialog_width")),
- height: parseInt(getParam(ed, "paste_dialog_height")),
- inline: 1
- });
- });
-
- if (getParam(ed, "paste_text_use_dialog")) {
- ed.addCommand("mcePasteText", function() {
- ed.windowManager.open({
- file : t.url + "/pastetext.htm",
- width: parseInt(getParam(ed, "paste_dialog_width")),
- height: parseInt(getParam(ed, "paste_dialog_height")),
- inline : 1
- });
- });
- }
-
- // Register button for backwards compatibility
- ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/paste/js/pastetext.js b/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
deleted file mode 100644
index 81b1d6a01e..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
+++ /dev/null
@@ -1,36 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var PasteTextDialog = {
- init : function() {
- this.resize();
- },
-
- insert : function() {
- var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
-
- // Convert linebreaks into paragraphs
- if (document.getElementById('linebreaks').checked) {
- lines = h.split(/\r?\n/);
- if (lines.length > 1) {
- h = '';
- tinymce.each(lines, function(row) {
- h += '<p>' + row + '</p>';
- });
- }
- }
-
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
- tinyMCEPopup.close();
- },
-
- resize : function() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('content');
-
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 90) + 'px';
- }
-};
-
-tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
diff --git a/wp-includes/js/tinymce/plugins/paste/js/pasteword.js b/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
deleted file mode 100644
index 959bf3992d..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
+++ /dev/null
@@ -1,51 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var PasteWordDialog = {
- init : function() {
- var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
-
- // Create iframe
- el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
- ifr = document.getElementById('iframe');
- doc = ifr.contentWindow.document;
-
- // Force absolute CSS urls
- css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
- css = css.concat(tinymce.explode(ed.settings.content_css) || []);
- tinymce.each(css, function(u) {
- cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
- });
-
- // Write content into iframe
- doc.open();
- doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
- doc.close();
-
- doc.designMode = 'on';
- this.resize();
-
- window.setTimeout(function() {
- ifr.contentWindow.focus();
- }, 10);
- },
-
- insert : function() {
- var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
-
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
- tinyMCEPopup.close();
- },
-
- resize : function() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('iframe');
-
- if (el) {
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 90) + 'px';
- }
- }
-};
-
-tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
diff --git a/wp-includes/js/tinymce/plugins/paste/pastetext.htm b/wp-includes/js/tinymce/plugins/paste/pastetext.htm
deleted file mode 100644
index a1f735890c..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/pastetext.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#paste.paste_text_desc}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/pastetext.js?ver=358-20121205"></script>
-</head>
-<body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;">
- <form name="source" onsubmit="return PasteTextDialog.insert();" action="#">
- <div style="float: left" class="title">{#paste.paste_text_desc}</div>
-
- <div style="float: right">
- <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
- </div>
-
- <br style="clear: both" />
-
- <div>{#paste_dlg.text_title}</div>
-
- <textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
-
- <div class="mceActionPanel">
- <input type="submit" name="insert" value="{#insert}" id="insert" />
- <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
- </div>
- </form>
-</body>
-</html> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/paste/pasteword.htm b/wp-includes/js/tinymce/plugins/paste/pasteword.htm
deleted file mode 100644
index 0cfef68193..0000000000
--- a/wp-includes/js/tinymce/plugins/paste/pasteword.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#paste.paste_word_desc}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/pasteword.js?ver=358-20121205"></script>
-</head>
-<body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;">
- <form name="source" onsubmit="return PasteWordDialog.insert();" action="#">
- <div class="title">{#paste.paste_word_desc}</div>
-
- <div>{#paste_dlg.word_title}</div>
-
- <div id="iframecontainer"></div>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#insert}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
- </form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/changelog.txt b/wp-includes/js/tinymce/plugins/spellchecker/changelog.txt
deleted file mode 100644
index f41ec7fdb1..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/changelog.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Version 2.0.6 (2011-09-29)
- Fixed incorrect position of suggestion menu.
- Fixed handling of mispelled words with no suggestions in PSpellShell engine.
- Fixed PSpellShell command on Windows.
- Fixed bug where Javascript error is produced when enchant_dict_suggest() returns unexpected result.
-Version 2.0.5 (2011-03-24)
- Merged with the latest TinyMCE spellchecker version.
-Version 2.0.4 (2010-12-20)
- Fixed issue with the JSON class not having the correct number of parameters to ord calls.
-Version 2.0.3 (2010-04-19)
- Added standalone support. Will use native spellchecker for supported browsers.
- Added @package phpdoc comments. Patch contributed by Jacob Santos.
- Fixed some PHP missing function issue.
-Version 2.0.2 (2008-04-30)
- Added new EnchantSpell engine class contributed by Michel Weimerskirch.
- Added new general.remote_rpc_url option, enables you to proxy requests to another server.
- Fixed security hole in PSpellShell.php file if PSpellShell engine was used.
-Version 2.0.1 (2008-03-07)
- Fixed bug where spellchecker was auto focusing the editor in IE.
-Version 2.0 (2008-01-30)
- Fixed bug where the suggestions menu was placed at an incorrect location.
-Version 2.0rc1 (2008-01-14)
- Moved package from beta to release candidate.
-Version 2.0b3 (2007-12-xx)
- Fixed bug where the suggestions menu could appear at the wrong location.
-Version 2.0b2 (2007-11-29)
- Fixed bug where the spellchecker was removing the word when it was ignored.
-Version 2.0b1 (2007-11-21)
- Moved spellchecker from alpha to beta status.
-Version 2.0a2 (2007-11-13)
- Updated plugin so it works correctly with the TinyMCE 3.0a3 version.
-Version 2.0a1 (2007-11-01)
- Rewritten version for TinyMCE 3.0 this new version uses JSON RPC.
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
deleted file mode 100644
index cefc8cf2ce..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
- *
- * This class was contributed by Michel Weimerskirch.
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-class EnchantSpell extends SpellChecker {
- /**
- * Spellchecks an array of words.
- *
- * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
- * @param Array $words Array of words to check.
- * @return Array of misspelled words.
- */
- function &checkWords($lang, $words) {
- $r = enchant_broker_init();
-
- if (enchant_broker_dict_exists($r,$lang)) {
- $d = enchant_broker_request_dict($r, $lang);
-
- $returnData = array();
- foreach($words as $key => $value) {
- $correct = enchant_dict_check($d, $value);
- if(!$correct) {
- $returnData[] = trim($value);
- }
- }
-
- return $returnData;
- enchant_broker_free_dict($d);
- } else {
-
- }
- enchant_broker_free($r);
- }
-
- /**
- * Returns suggestions for a specific word.
- *
- * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
- * @param String $word Specific word to get suggestions for.
- * @return Array of suggestions for the specified word.
- */
- function &getSuggestions($lang, $word) {
- $r = enchant_broker_init();
-
- if (enchant_broker_dict_exists($r,$lang)) {
- $d = enchant_broker_request_dict($r, $lang);
- $suggs = enchant_dict_suggest($d, $word);
-
- // enchant_dict_suggest() sometimes returns NULL
- if (!is_array($suggs))
- $suggs = array();
-
- enchant_broker_free_dict($d);
- } else {
- $suggs = array();
- }
-
- enchant_broker_free($r);
-
- return $suggs;
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
deleted file mode 100644
index 03e4a7848e..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
+++ /dev/null
@@ -1,161 +0,0 @@
-<?php
-/**
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-class GoogleSpell extends SpellChecker {
- /**
- * Spellchecks an array of words.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {Array} $words Array of words to spellcheck.
- * @return {Array} Array of misspelled words.
- */
- function &checkWords($lang, $words) {
- $wordstr = implode(' ', $words);
- $matches = $this->_getMatches($lang, $wordstr);
- $words = array();
-
- for ($i=0; $i<count($matches); $i++)
- $words[] = $this->_unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8"));
-
- return $words;
- }
-
- /**
- * Returns suggestions of for a specific word.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {String} $word Specific word to get suggestions for.
- * @return {Array} Array of suggestions for the specified word.
- */
- function &getSuggestions($lang, $word) {
- $sug = array();
- $osug = array();
- $matches = $this->_getMatches($lang, $word);
-
- if (count($matches) > 0)
- $sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4])));
-
- // Remove empty
- foreach ($sug as $item) {
- if ($item)
- $osug[] = $item;
- }
-
- return $osug;
- }
-
- protected function &_getMatches($lang, $str) {
- $lang = preg_replace('/[^a-z\-]/i', '', $lang);
- $str = preg_replace('/[\x00-\x1F\x7F]/', '', $str);
- $server = "www.google.com";
- $port = 443;
- $path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
- $host = "www.google.com";
- $url = "https://" . $server;
-
- // Setup XML request
- $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>';
-
- $header = "POST ".$path." HTTP/1.0 \r\n";
- $header .= "MIME-Version: 1.0 \r\n";
- $header .= "Content-type: application/PTI26 \r\n";
- $header .= "Content-length: ".strlen($xml)." \r\n";
- $header .= "Content-transfer-encoding: text \r\n";
- $header .= "Request-number: 1 \r\n";
- $header .= "Document-type: Request \r\n";
- $header .= "Interface-Version: Test 1.4 \r\n";
- $header .= "Connection: close \r\n\r\n";
- $header .= $xml;
-
- // Use curl if it exists
- if (function_exists('curl_init')) {
- // Use curl
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- $xml = curl_exec($ch);
- curl_close($ch);
- } else {
- // Use raw sockets
- $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30);
- if ($fp) {
- // Send request
- fwrite($fp, $header);
-
- // Read response
- $xml = "";
- while (!feof($fp))
- $xml .= fgets($fp, 128);
-
- fclose($fp);
- } else
- echo "Could not open SSL connection to google.";
- }
-
- // Grab and parse content
- $matches = array();
- preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER);
-
- return $matches;
- }
-
- protected function _unhtmlentities($string) {
- $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
- $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
-
- $trans_tbl = get_html_translation_table(HTML_ENTITIES);
- $trans_tbl = array_flip($trans_tbl);
-
- return strtr($string, $trans_tbl);
- }
-}
-
-// Patch in multibyte support
-if (!function_exists('mb_substr')) {
- function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
- $limit = strlen($str);
-
- for ($s = 0; $start > 0;--$start) {// found the real start
- if ($s >= $limit)
- break;
-
- if ($str[$s] <= "\x7F")
- ++$s;
- else {
- ++$s; // skip length
-
- while ($str[$s] >= "\x80" && $str[$s] <= "\xBF")
- ++$s;
- }
- }
-
- if ($len == '')
- return substr($str, $s);
- else
- for ($e = $s; $len > 0; --$len) {//found the real end
- if ($e >= $limit)
- break;
-
- if ($str[$e] <= "\x7F")
- ++$e;
- else {
- ++$e;//skip length
-
- while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit)
- ++$e;
- }
- }
-
- return substr($str, $s, $e - $s);
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
deleted file mode 100644
index 3c6424d86e..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-class PSpell extends SpellChecker {
- /**
- * Spellchecks an array of words.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {Array} $words Array of words to spellcheck.
- * @return {Array} Array of misspelled words.
- */
- function &checkWords($lang, $words) {
- $plink = $this->_getPLink($lang);
-
- $outWords = array();
- foreach ($words as $word) {
- if (!pspell_check($plink, trim($word)))
- $outWords[] = utf8_encode($word);
- }
-
- return $outWords;
- }
-
- /**
- * Returns suggestions of for a specific word.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {String} $word Specific word to get suggestions for.
- * @return {Array} Array of suggestions for the specified word.
- */
- function &getSuggestions($lang, $word) {
- $words = pspell_suggest($this->_getPLink($lang), $word);
-
- for ($i=0; $i<count($words); $i++)
- $words[$i] = utf8_encode($words[$i]);
-
- return $words;
- }
-
- /**
- * Opens a link for pspell.
- */
- function &_getPLink($lang) {
- // Check for native PSpell support
- if (!function_exists("pspell_new"))
- $this->throwError("PSpell support not found in PHP installation.");
-
- // Setup PSpell link
- $plink = pspell_new(
- $lang,
- $this->_config['PSpell.spelling'],
- $this->_config['PSpell.jargon'],
- $this->_config['PSpell.encoding'],
- $this->_config['PSpell.mode']
- );
-
- // Setup PSpell link
-/* if (!$plink) {
- $pspellConfig = pspell_config_create(
- $lang,
- $this->_config['PSpell.spelling'],
- $this->_config['PSpell.jargon'],
- $this->_config['PSpell.encoding']
- );
-
- $plink = pspell_new_config($pspell_config);
- }*/
-
- if (!$plink)
- $this->throwError("No PSpell link found opened.");
-
- return $plink;
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
deleted file mode 100644
index 3d6d4a9a26..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/**
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-class PSpellShell extends SpellChecker {
- /**
- * Spellchecks an array of words.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {Array} $words Array of words to spellcheck.
- * @return {Array} Array of misspelled words.
- */
- function &checkWords($lang, $words) {
- $cmd = $this->_getCMD($lang);
-
- if ($fh = fopen($this->_tmpfile, "w")) {
- fwrite($fh, "!\n");
-
- foreach($words as $key => $value)
- fwrite($fh, "^" . $value . "\n");
-
- fclose($fh);
- } else
- $this->throwError("PSpell support was not found.");
-
- $data = shell_exec($cmd);
- @unlink($this->_tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/[\r\n]/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach ($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if ($dstr[0] == "@")
- continue;
-
- preg_match("/(\&|#) ([^ ]+) .*/i", $dstr, $matches);
-
- if (!empty($matches[2]))
- $returnData[] = utf8_encode(trim($matches[2]));
- }
-
- return $returnData;
- }
-
- /**
- * Returns suggestions of for a specific word.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {String} $word Specific word to get suggestions for.
- * @return {Array} Array of suggestions for the specified word.
- */
- function &getSuggestions($lang, $word) {
- $cmd = $this->_getCMD($lang);
-
- if (function_exists("mb_convert_encoding"))
- $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
- else
- $word = utf8_encode($word);
-
- if ($fh = fopen($this->_tmpfile, "w")) {
- fwrite($fh, "!\n");
- fwrite($fh, "^$word\n");
- fclose($fh);
- } else
- $this->throwError("Error opening tmp file.");
-
- $data = shell_exec($cmd);
- @unlink($this->_tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if ($dstr[0] == "@")
- continue;
-
- preg_match("/\&[^:]+:(.*)/i", $dstr, $matches);
-
- if (!empty($matches[1])) {
- $words = array_slice(explode(',', $matches[1]), 0, 10);
-
- for ($i=0; $i<count($words); $i++)
- $words[$i] = trim($words[$i]);
-
- return $words;
- }
- }
-
- return array();
- }
-
- function _getCMD($lang) {
- $this->_tmpfile = tempnam($this->_config['PSpellShell.tmp'], "tinyspell");
-
- $file = $this->_tmpfile;
- $lang = preg_replace("/[^-_a-z]/", "", strtolower($lang));
- $bin = $this->_config['PSpellShell.aspell'];
-
- if (preg_match("#win#i", php_uname()))
- return "$bin -a --lang=$lang --encoding=utf-8 -H < $file 2>&1";
-
- return "cat $file | $bin -a --lang=$lang --encoding=utf-8 -H";
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
deleted file mode 100644
index 5d9205fe6e..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-class SpellChecker {
- /**
- * Constructor.
- *
- * @param $config Configuration name/value array.
- */
- function SpellChecker(&$config) {
- $this->_config = $config;
- }
-
- /**
- * Simple loopback function everything that gets in will be send back.
- *
- * @param $args.. Arguments.
- * @return {Array} Array of all input arguments.
- */
- function &loopback(/* args.. */) {
- return func_get_args();
- }
-
- /**
- * Spellchecks an array of words.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {Array} $words Array of words to spellcheck.
- * @return {Array} Array of misspelled words.
- */
- function &checkWords($lang, $words) {
- return $words;
- }
-
- /**
- * Returns suggestions of for a specific word.
- *
- * @param {String} $lang Language code like sv or en.
- * @param {String} $word Specific word to get suggestions for.
- * @return {Array} Array of suggestions for the specified word.
- */
- function &getSuggestions($lang, $word) {
- return array();
- }
-
- /**
- * Throws an error message back to the user. This will stop all execution.
- *
- * @param {String} $str Message to send back to user.
- */
- function throwError($str) {
- die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
deleted file mode 100644
index 1f2b92caa2..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
+++ /dev/null
@@ -1,595 +0,0 @@
-<?php
-/**
- * $Id: JSON.php 40 2007-06-18 11:43:15Z spocke $
- *
- * @package MCManager.utils
- * @author Moxiecode
- * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
- */
-
-define('JSON_BOOL', 1);
-define('JSON_INT', 2);
-define('JSON_STR', 3);
-define('JSON_FLOAT', 4);
-define('JSON_NULL', 5);
-define('JSON_START_OBJ', 6);
-define('JSON_END_OBJ', 7);
-define('JSON_START_ARRAY', 8);
-define('JSON_END_ARRAY', 9);
-define('JSON_KEY', 10);
-define('JSON_SKIP', 11);
-
-define('JSON_IN_ARRAY', 30);
-define('JSON_IN_OBJECT', 40);
-define('JSON_IN_BETWEEN', 50);
-
-class Moxiecode_JSONReader {
- var $_data, $_len, $_pos;
- var $_value, $_token;
- var $_location, $_lastLocations;
- var $_needProp;
-
- function Moxiecode_JSONReader($data) {
- $this->_data = $data;
- $this->_len = strlen($data);
- $this->_pos = -1;
- $this->_location = JSON_IN_BETWEEN;
- $this->_lastLocations = array();
- $this->_needProp = false;
- }
-
- function getToken() {
- return $this->_token;
- }
-
- function getLocation() {
- return $this->_location;
- }
-
- function getTokenName() {
- switch ($this->_token) {
- case JSON_BOOL:
- return 'JSON_BOOL';
-
- case JSON_INT:
- return 'JSON_INT';
-
- case JSON_STR:
- return 'JSON_STR';
-
- case JSON_FLOAT:
- return 'JSON_FLOAT';
-
- case JSON_NULL:
- return 'JSON_NULL';
-
- case JSON_START_OBJ:
- return 'JSON_START_OBJ';
-
- case JSON_END_OBJ:
- return 'JSON_END_OBJ';
-
- case JSON_START_ARRAY:
- return 'JSON_START_ARRAY';
-
- case JSON_END_ARRAY:
- return 'JSON_END_ARRAY';
-
- case JSON_KEY:
- return 'JSON_KEY';
- }
-
- return 'UNKNOWN';
- }
-
- function getValue() {
- return $this->_value;
- }
-
- function readToken() {
- $chr = $this->read();
-
- if ($chr != null) {
- switch ($chr) {
- case '[':
- $this->_lastLocation[] = $this->_location;
- $this->_location = JSON_IN_ARRAY;
- $this->_token = JSON_START_ARRAY;
- $this->_value = null;
- $this->readAway();
- return true;
-
- case ']':
- $this->_location = array_pop($this->_lastLocation);
- $this->_token = JSON_END_ARRAY;
- $this->_value = null;
- $this->readAway();
-
- if ($this->_location == JSON_IN_OBJECT)
- $this->_needProp = true;
-
- return true;
-
- case '{':
- $this->_lastLocation[] = $this->_location;
- $this->_location = JSON_IN_OBJECT;
- $this->_needProp = true;
- $this->_token = JSON_START_OBJ;
- $this->_value = null;
- $this->readAway();
- return true;
-
- case '}':
- $this->_location = array_pop($this->_lastLocation);
- $this->_token = JSON_END_OBJ;
- $this->_value = null;
- $this->readAway();
-
- if ($this->_location == JSON_IN_OBJECT)
- $this->_needProp = true;
-
- return true;
-
- // String
- case '"':
- case '\'':
- return $this->_readString($chr);
-
- // Null
- case 'n':
- return $this->_readNull();
-
- // Bool
- case 't':
- case 'f':
- return $this->_readBool($chr);
-
- default:
- // Is number
- if (is_numeric($chr) || $chr == '-' || $chr == '.')
- return $this->_readNumber($chr);
-
- return true;
- }
- }
-
- return false;
- }
-
- function _readBool($chr) {
- $this->_token = JSON_BOOL;
- $this->_value = $chr == 't';
-
- if ($chr == 't')
- $this->skip(3); // rue
- else
- $this->skip(4); // alse
-
- $this->readAway();
-
- if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
- $this->_needProp = true;
-
- return true;
- }
-
- function _readNull() {
- $this->_token = JSON_NULL;
- $this->_value = null;
-
- $this->skip(3); // ull
- $this->readAway();
-
- if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
- $this->_needProp = true;
-
- return true;
- }
-
- function _readString($quote) {
- $output = "";
- $this->_token = JSON_STR;
- $endString = false;
-
- while (($chr = $this->peek()) != -1) {
- switch ($chr) {
- case '\\':
- // Read away slash
- $this->read();
-
- // Read escape code
- $chr = $this->read();
- switch ($chr) {
- case 't':
- $output .= "\t";
- break;
-
- case 'b':
- $output .= "\b";
- break;
-
- case 'f':
- $output .= "\f";
- break;
-
- case 'r':
- $output .= "\r";
- break;
-
- case 'n':
- $output .= "\n";
- break;
-
- case 'u':
- $output .= $this->_int2utf8(hexdec($this->read(4)));
- break;
-
- default:
- $output .= $chr;
- break;
- }
-
- break;
-
- case '\'':
- case '"':
- if ($chr == $quote)
- $endString = true;
-
- $chr = $this->read();
- if ($chr != -1 && $chr != $quote)
- $output .= $chr;
-
- break;
-
- default:
- $output .= $this->read();
- }
-
- // String terminated
- if ($endString)
- break;
- }
-
- $this->readAway();
- $this->_value = $output;
-
- // Needed a property
- if ($this->_needProp) {
- $this->_token = JSON_KEY;
- $this->_needProp = false;
- return true;
- }
-
- if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
- $this->_needProp = true;
-
- return true;
- }
-
- function _int2utf8($int) {
- $int = intval($int);
-
- switch ($int) {
- case 0:
- return chr(0);
-
- case ($int & 0x7F):
- return chr($int);
-
- case ($int & 0x7FF):
- return chr(0xC0 | (($int >> 6) & 0x1F)) . chr(0x80 | ($int & 0x3F));
-
- case ($int & 0xFFFF):
- return chr(0xE0 | (($int >> 12) & 0x0F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr (0x80 | ($int & 0x3F));
-
- case ($int & 0x1FFFFF):
- return chr(0xF0 | ($int >> 18)) . chr(0x80 | (($int >> 12) & 0x3F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr(0x80 | ($int & 0x3F));
- }
- }
-
- function _readNumber($start) {
- $value = "";
- $isFloat = false;
-
- $this->_token = JSON_INT;
- $value .= $start;
-
- while (($chr = $this->peek()) != -1) {
- if (is_numeric($chr) || $chr == '-' || $chr == '.') {
- if ($chr == '.')
- $isFloat = true;
-
- $value .= $this->read();
- } else
- break;
- }
-
- $this->readAway();
-
- if ($isFloat) {
- $this->_token = JSON_FLOAT;
- $this->_value = floatval($value);
- } else
- $this->_value = intval($value);
-
- if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
- $this->_needProp = true;
-
- return true;
- }
-
- function readAway() {
- while (($chr = $this->peek()) != null) {
- if ($chr != ':' && $chr != ',' && $chr != ' ')
- return;
-
- $this->read();
- }
- }
-
- function read($len = 1) {
- if ($this->_pos < $this->_len) {
- if ($len > 1) {
- $str = substr($this->_data, $this->_pos + 1, $len);
- $this->_pos += $len;
-
- return $str;
- } else
- return $this->_data[++$this->_pos];
- }
-
- return null;
- }
-
- function skip($len) {
- $this->_pos += $len;
- }
-
- function peek() {
- if ($this->_pos < $this->_len)
- return $this->_data[$this->_pos + 1];
-
- return null;
- }
-}
-
-/**
- * This class handles JSON stuff.
- *
- * @package MCManager.utils
- */
-class Moxiecode_JSON {
- function Moxiecode_JSON() {
- }
-
- function decode($input) {
- $reader = new Moxiecode_JSONReader($input);
-
- return $this->readValue($reader);
- }
-
- function readValue(&$reader) {
- $this->data = array();
- $this->parents = array();
- $this->cur =& $this->data;
- $key = null;
- $loc = JSON_IN_ARRAY;
-
- while ($reader->readToken()) {
- switch ($reader->getToken()) {
- case JSON_STR:
- case JSON_INT:
- case JSON_BOOL:
- case JSON_FLOAT:
- case JSON_NULL:
- switch ($reader->getLocation()) {
- case JSON_IN_OBJECT:
- $this->cur[$key] = $reader->getValue();
- break;
-
- case JSON_IN_ARRAY:
- $this->cur[] = $reader->getValue();
- break;
-
- default:
- return $reader->getValue();
- }
- break;
-
- case JSON_KEY:
- $key = $reader->getValue();
- break;
-
- case JSON_START_OBJ:
- case JSON_START_ARRAY:
- if ($loc == JSON_IN_OBJECT)
- $this->addArray($key);
- else
- $this->addArray(null);
-
- $cur =& $obj;
-
- $loc = $reader->getLocation();
- break;
-
- case JSON_END_OBJ:
- case JSON_END_ARRAY:
- $loc = $reader->getLocation();
-
- if (count($this->parents) > 0) {
- $this->cur =& $this->parents[count($this->parents) - 1];
- array_pop($this->parents);
- }
- break;
- }
- }
-
- return $this->data[0];
- }
-
- // This method was needed since PHP is crapy and doesn't have pointers/references
- function addArray($key) {
- $this->parents[] =& $this->cur;
- $ar = array();
-
- if ($key)
- $this->cur[$key] =& $ar;
- else
- $this->cur[] =& $ar;
-
- $this->cur =& $ar;
- }
-
- function getDelim($index, &$reader) {
- switch ($reader->getLocation()) {
- case JSON_IN_ARRAY:
- case JSON_IN_OBJECT:
- if ($index > 0)
- return ",";
- break;
- }
-
- return "";
- }
-
- function encode($input) {
- switch (gettype($input)) {
- case 'boolean':
- return $input ? 'true' : 'false';
-
- case 'integer':
- return (int) $input;
-
- case 'float':
- case 'double':
- return (float) $input;
-
- case 'NULL':
- return 'null';
-
- case 'string':
- return $this->encodeString($input);
-
- case 'array':
- return $this->_encodeArray($input);
-
- case 'object':
- return $this->_encodeArray(get_object_vars($input));
- }
-
- return '';
- }
-
- function encodeString($input) {
- // Needs to be escaped
- if (preg_match('/[^a-zA-Z0-9]/', $input)) {
- $output = '';
-
- for ($i=0; $i<strlen($input); $i++) {
- switch ($input[$i]) {
- case "\b":
- $output .= "\\b";
- break;
-
- case "\t":
- $output .= "\\t";
- break;
-
- case "\f":
- $output .= "\\f";
- break;
-
- case "\r":
- $output .= "\\r";
- break;
-
- case "\n":
- $output .= "\\n";
- break;
-
- case '\\':
- $output .= "\\\\";
- break;
-
- case '\'':
- $output .= "\\'";
- break;
-
- case '"':
- $output .= '\"';
- break;
-
- default:
- $byte = ord($input[$i]);
-
- if (($byte & 0xE0) == 0xC0) {
- $char = pack('C*', $byte, ord($input[$i + 1]));
- $i += 1;
- $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
- } if (($byte & 0xF0) == 0xE0) {
- $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]));
- $i += 2;
- $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
- } if (($byte & 0xF8) == 0xF0) {
- $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]), ord($input[$i + 3]));
- $i += 3;
- $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
- } if (($byte & 0xFC) == 0xF8) {
- $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]), ord($input[$i + 3]), ord($input[$i + 4]));
- $i += 4;
- $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
- } if (($byte & 0xFE) == 0xFC) {
- $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]), ord($input[$i + 3]), ord($input[$i + 4]), ord($input[$i + 5]));
- $i += 5;
- $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
- } else if ($byte < 128)
- $output .= $input[$i];
- }
- }
-
- return '"' . $output . '"';
- }
-
- return '"' . $input . '"';
- }
-
- function _utf82utf16($utf8) {
- if (function_exists('mb_convert_encoding'))
- return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
-
- switch (strlen($utf8)) {
- case 1:
- return $utf8;
-
- case 2:
- return chr(0x07 & (ord($utf8[0]) >> 2)) . chr((0xC0 & (ord($utf8[0]) << 6)) | (0x3F & ord($utf8[1])));
-
- case 3:
- return chr((0xF0 & (ord($utf8[0]) << 4)) | (0x0F & (ord($utf8[1]) >> 2))) . chr((0xC0 & (ord($utf8[1]) << 6)) | (0x7F & ord($utf8[2])));
- }
-
- return '';
- }
-
- function _encodeArray($input) {
- $output = '';
- $isIndexed = true;
-
- $keys = array_keys($input);
- for ($i=0; $i<count($keys); $i++) {
- if (!is_int($keys[$i])) {
- $output .= $this->encodeString($keys[$i]) . ':' . $this->encode($input[$keys[$i]]);
- $isIndexed = false;
- } else
- $output .= $this->encode($input[$keys[$i]]);
-
- if ($i != count($keys) - 1)
- $output .= ',';
- }
-
- return $isIndexed ? '[' . $output . ']' : '{' . $output . '}';
- }
-}
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
deleted file mode 100644
index a1fb4cd09e..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
+++ /dev/null
@@ -1,268 +0,0 @@
-<?php
-/**
- * $Id: Logger.class.php 10 2007-05-27 10:55:12Z spocke $
- *
- * @package MCFileManager.filesystems
- * @author Moxiecode
- * @copyright Copyright © 2005, Moxiecode Systems AB, All rights reserved.
- */
-
-// File type contstants
-define('MC_LOGGER_DEBUG', 0);
-define('MC_LOGGER_INFO', 10);
-define('MC_LOGGER_WARN', 20);
-define('MC_LOGGER_ERROR', 30);
-define('MC_LOGGER_FATAL', 40);
-
-/**
- * Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's
- * designed to be compact but still powerful and flexible.
- */
-class Moxiecode_Logger {
- // Private fields
- var $_path;
- var $_filename;
- var $_maxSize;
- var $_maxFiles;
- var $_maxSizeBytes;
- var $_level;
- var $_format;
-
- /**
- * Constructs a new logger instance.
- */
- function Moxiecode_Logger() {
- $this->_path = "";
- $this->_filename = "{level}.log";
- $this->setMaxSize("100k");
- $this->_maxFiles = 10;
- $this->_level = MC_LOGGER_DEBUG;
- $this->_format = "[{time}] [{level}] {message}";
- }
-
- /**
- * Sets the current log level, use the MC_LOGGER constants.
- *
- * @param int $level Log level instance for example MC_LOGGER_DEBUG.
- */
- function setLevel($level) {
- if (is_string($level)) {
- switch (strtolower($level)) {
- case "debug":
- $level = MC_LOGGER_DEBUG;
- break;
-
- case "info":
- $level = MC_LOGGER_INFO;
- break;
-
- case "warn":
- case "warning":
- $level = MC_LOGGER_WARN;
- break;
-
- case "error":
- $level = MC_LOGGER_ERROR;
- break;
-
- case "fatal":
- $level = MC_LOGGER_FATAL;
- break;
-
- default:
- $level = MC_LOGGER_FATAL;
- }
- }
-
- $this->_level = $level;
- }
-
- /**
- * Returns the current log level for example MC_LOGGER_DEBUG.
- *
- * @return int Current log level for example MC_LOGGER_DEBUG.
- */
- function getLevel() {
- return $this->_level;
- }
-
- function setPath($path) {
- $this->_path = $path;
- }
-
- function getPath() {
- return $this->_path;
- }
-
- function setFileName($file_name) {
- $this->_filename = $file_name;
- }
-
- function getFileName() {
- return $this->_filename;
- }
-
- function setFormat($format) {
- $this->_format = $format;
- }
-
- function getFormat() {
- return $this->_format;
- }
-
- function setMaxSize($size) {
- // Fix log max size
- $logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size));
-
- // Is KB
- if (strpos((strtolower($size)), "k") > 0)
- $logMaxSizeBytes *= 1024;
-
- // Is MB
- if (strpos((strtolower($size)), "m") > 0)
- $logMaxSizeBytes *= (1024 * 1024);
-
- $this->_maxSizeBytes = $logMaxSizeBytes;
- $this->_maxSize = $size;
- }
-
- function getMaxSize() {
- return $this->_maxSize;
- }
-
- function setMaxFiles($max_files) {
- $this->_maxFiles = $max_files;
- }
-
- function getMaxFiles() {
- return $this->_maxFiles;
- }
-
- function debug($msg) {
- $args = func_get_args();
- $this->_logMsg(MC_LOGGER_DEBUG, implode(', ', $args));
- }
-
- function info($msg) {
- $args = func_get_args();
- $this->_logMsg(MC_LOGGER_INFO, implode(', ', $args));
- }
-
- function warn($msg) {
- $args = func_get_args();
- $this->_logMsg(MC_LOGGER_WARN, implode(', ', $args));
- }
-
- function error($msg) {
- $args = func_get_args();
- $this->_logMsg(MC_LOGGER_ERROR, implode(', ', $args));
- }
-
- function fatal($msg) {
- $args = func_get_args();
- $this->_logMsg(MC_LOGGER_FATAL, implode(', ', $args));
- }
-
- function isDebugEnabled() {
- return $this->_level >= MC_LOGGER_DEBUG;
- }
-
- function isInfoEnabled() {
- return $this->_level >= MC_LOGGER_INFO;
- }
-
- function isWarnEnabled() {
- return $this->_level >= MC_LOGGER_WARN;
- }
-
- function isErrorEnabled() {
- return $this->_level >= MC_LOGGER_ERROR;
- }
-
- function isFatalEnabled() {
- return $this->_level >= MC_LOGGER_FATAL;
- }
-
- function _logMsg($level, $message) {
- $roll = false;
-
- if ($level < $this->_level)
- return;
-
- $logFile = $this->toOSPath($this->_path . "/" . $this->_filename);
-
- switch ($level) {
- case MC_LOGGER_DEBUG:
- $levelName = "DEBUG";
- break;
-
- case MC_LOGGER_INFO:
- $levelName = "INFO";
- break;
-
- case MC_LOGGER_WARN:
- $levelName = "WARN";
- break;
-
- case MC_LOGGER_ERROR:
- $levelName = "ERROR";
- break;
-
- case MC_LOGGER_FATAL:
- $levelName = "FATAL";
- break;
- }
-
- $logFile = str_replace('{level}', strtolower($levelName), $logFile);
-
- $text = $this->_format;
- $text = str_replace('{time}', date("Y-m-d H:i:s"), $text);
- $text = str_replace('{level}', strtolower($levelName), $text);
- $text = str_replace('{message}', $message, $text);
- $message = $text . "\r\n";
-
- // Check filesize
- if (file_exists($logFile)) {
- $size = @filesize($logFile);
-
- if ($size + strlen($message) > $this->_maxSizeBytes)
- $roll = true;
- }
-
- // Roll if the size is right
- if ($roll) {
- for ($i=$this->_maxFiles-1; $i>=1; $i--) {
- $rfile = $this->toOSPath($logFile . "." . $i);
- $nfile = $this->toOSPath($logFile . "." . ($i+1));
-
- if (@file_exists($rfile))
- @rename($rfile, $nfile);
- }
-
- @rename($logFile, $this->toOSPath($logFile . ".1"));
-
- // Delete last logfile
- $delfile = $this->toOSPath($logFile . "." . ($this->_maxFiles + 1));
- if (@file_exists($delfile))
- @unlink($delfile);
- }
-
- // Append log line
- if (($fp = @fopen($logFile, "a")) != null) {
- @fputs($fp, $message);
- @fflush($fp);
- @fclose($fp);
- }
- }
-
- /**
- * Converts a Unix path to OS specific path.
- *
- * @param String $path Unix path to convert.
- */
- function toOSPath($path) {
- return str_replace("/", DIRECTORY_SEPARATOR, $path);
- }
-}
-
-?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/config.php b/wp-includes/js/tinymce/plugins/spellchecker/config.php
deleted file mode 100644
index 795495a664..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/config.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * config.php
- *
- * @package MCManager.includes
- */
- // General settings
- $config['general.engine'] = 'GoogleSpell';
- //$config['general.engine'] = 'PSpell';
- //$config['general.engine'] = 'PSpellShell';
- //$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';
-
- // PSpell settings
- $config['PSpell.mode'] = PSPELL_FAST;
- $config['PSpell.spelling'] = "";
- $config['PSpell.jargon'] = "";
- $config['PSpell.encoding'] = "";
-
- // PSpellShell settings
- $config['PSpellShell.mode'] = PSPELL_FAST;
- $config['PSpellShell.aspell'] = '/usr/bin/aspell';
- $config['PSpellShell.tmp'] = '/tmp';
-
- // Windows PSpellShell settings
- //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
- //$config['PSpellShell.tmp'] = 'c:/temp';
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/css/content.css b/wp-includes/js/tinymce/plugins/spellchecker/css/content.css
deleted file mode 100644
index 656ce1eee6..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/css/content.css
+++ /dev/null
@@ -1 +0,0 @@
-.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js
deleted file mode 100644
index 48549c9239..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js
deleted file mode 100644
index 925d2f21a6..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js
+++ /dev/null
@@ -1,436 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
-
- tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
- getInfo : function() {
- return {
- longname : 'Spellchecker',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- },
-
- init : function(ed, url) {
- var t = this, cm;
-
- t.url = url;
- t.editor = ed;
- t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
-
- if (t.rpcUrl == '{backend}') {
- // Sniff if the browser supports native spellchecking (Don't know of a better way)
- if (tinymce.isIE)
- return;
-
- t.hasSupport = true;
-
- // Disable the context menu when spellchecking is active
- ed.onContextMenu.addToTop(function(ed, e) {
- if (t.active)
- return false;
- });
- }
-
- // Register commands
- ed.addCommand('mceSpellCheck', function() {
- if (t.rpcUrl == '{backend}') {
- // Enable/disable native spellchecker
- t.editor.getBody().spellcheck = t.active = !t.active;
- return;
- }
-
- if (!t.active) {
- ed.setProgressState(1);
- t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
- if (r.length > 0) {
- t.active = 1;
- t._markWords(r);
- ed.setProgressState(0);
- ed.nodeChanged();
- } else {
- ed.setProgressState(0);
-
- if (ed.getParam('spellchecker_report_no_misspellings', true))
- ed.windowManager.alert('spellchecker.no_mpell');
- }
- });
- } else
- t._done();
- });
-
- if (ed.settings.content_css !== false)
- ed.contentCSS.push(url + '/css/content.css');
-
- ed.onClick.add(t._showMenu, t);
- ed.onContextMenu.add(t._showMenu, t);
- ed.onBeforeGetContent.add(function() {
- if (t.active)
- t._removeWords();
- });
-
- ed.onNodeChange.add(function(ed, cm) {
- cm.setActive('spellchecker', t.active);
- });
-
- ed.onSetContent.add(function() {
- t._done();
- });
-
- ed.onBeforeGetContent.add(function() {
- t._done();
- });
-
- ed.onBeforeExecCommand.add(function(ed, cmd) {
- if (cmd == 'mceFullScreen')
- t._done();
- });
-
- // Find selected language
- t.languages = {};
- each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
- if (k.indexOf('+') === 0) {
- k = k.substring(1);
- t.selectedLang = v;
- }
-
- t.languages[k] = v;
- });
- },
-
- createControl : function(n, cm) {
- var t = this, c, ed = t.editor;
-
- if (n == 'spellchecker') {
- // Use basic button if we use the native spellchecker
- if (t.rpcUrl == '{backend}') {
- // Create simple toggle button if we have native support
- if (t.hasSupport)
- c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
-
- return c;
- }
-
- c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
-
- c.onRenderMenu.add(function(c, m) {
- m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
- each(t.languages, function(v, k) {
- var o = {icon : 1}, mi;
-
- o.onclick = function() {
- if (v == t.selectedLang) {
- return;
- }
- mi.setSelected(1);
- t.selectedItem.setSelected(0);
- t.selectedItem = mi;
- t.selectedLang = v;
- };
-
- o.title = k;
- mi = m.add(o);
- mi.setSelected(v == t.selectedLang);
-
- if (v == t.selectedLang)
- t.selectedItem = mi;
- })
- });
-
- return c;
- }
- },
-
- // Internal functions
-
- _walk : function(n, f) {
- var d = this.editor.getDoc(), w;
-
- if (d.createTreeWalker) {
- w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
-
- while ((n = w.nextNode()) != null)
- f.call(this, n);
- } else
- tinymce.walk(n, f, 'childNodes');
- },
-
- _getSeparators : function() {
- var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');
-
- // Build word separator regexp
- for (i=0; i<str.length; i++)
- re += '\\' + str.charAt(i);
-
- return re;
- },
-
- _getWords : function() {
- var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
-
- // Get area text
- this._walk(ed.getBody(), function(n) {
- if (n.nodeType == 3)
- tx += n.nodeValue + ' ';
- });
-
- // split the text up into individual words
- if (ed.getParam('spellchecker_word_pattern')) {
- // look for words that match the pattern
- rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
- } else {
- // Split words by separator
- tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
- tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
- rawWords = tx.split(' ');
- }
-
- // Build word array and remove duplicates
- each(rawWords, function(v) {
- if (!lo[v]) {
- wl.push(v);
- lo[v] = 1;
- }
- });
-
- return wl;
- },
-
- _removeWords : function(w) {
- var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true);
-
- each(dom.select('span').reverse(), function(n) {
- if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
- if (!w || dom.decode(n.innerHTML) == w)
- dom.remove(n, 1);
- }
- });
-
- se.setRng(r);
- },
-
- _markWords : function(wl) {
- var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [],
- w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
-
- // Collect all text nodes
- this._walk(ed.getBody(), function(n) {
- if (n.nodeType == 3) {
- nl.push(n);
- }
- });
-
- // Wrap incorrect words in spans
- each(nl, function(n) {
- var node, elem, txt, pos, v = n.nodeValue;
-
- if (rx.test(v)) {
- // Encode the content
- v = dom.encode(v);
- // Create container element
- elem = dom.create('span', {'class' : 'mceItemHidden'});
-
- // Following code fixes IE issues by creating text nodes
- // using DOM methods instead of innerHTML.
- // Bug #3124: <PRE> elements content is broken after spellchecking.
- // Bug #1408: Preceding whitespace characters are removed
- // @TODO: I'm not sure that both are still issues on IE9.
- if (tinymce.isIE) {
- // Enclose mispelled words with temporal tag
- v = v.replace(rx, '$1<mcespell>$2</mcespell>');
- // Loop over the content finding mispelled words
- while ((pos = v.indexOf('<mcespell>')) != -1) {
- // Add text node for the content before the word
- txt = v.substring(0, pos);
- if (txt.length) {
- node = doc.createTextNode(dom.decode(txt));
- elem.appendChild(node);
- }
- v = v.substring(pos+10);
- pos = v.indexOf('</mcespell>');
- txt = v.substring(0, pos);
- v = v.substring(pos+11);
- // Add span element for the word
- elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
- }
- // Add text node for the rest of the content
- if (v.length) {
- node = doc.createTextNode(dom.decode(v));
- elem.appendChild(node);
- }
- } else {
- // Other browsers preserve whitespace characters on innerHTML usage
- elem.innerHTML = v.replace(rx, '$1<span class="mceItemHiddenSpellWord">$2</span>');
- }
-
- // Finally, replace the node with the container
- dom.replace(elem, n);
- }
- });
-
- se.setRng(r);
- },
-
- _showMenu : function(ed, e) {
- var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
-
- e = 0; // Fixes IE memory leak
-
- if (!m) {
- m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
- t._menu = m;
- }
-
- if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
- m.removeAll();
- m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
-
- t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
- var ignoreRpc;
-
- m.removeAll();
-
- if (r.length > 0) {
- m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
- each(r, function(v) {
- m.add({title : v, onclick : function() {
- dom.replace(ed.getDoc().createTextNode(v), wordSpan);
- t._checkDone();
- }});
- });
-
- m.addSeparator();
- } else
- m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
-
- if (ed.getParam('show_ignore_words', true)) {
- ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
- m.add({
- title : 'spellchecker.ignore_word',
- onclick : function() {
- var word = wordSpan.innerHTML;
-
- dom.remove(wordSpan, 1);
- t._checkDone();
-
- // tell the server if we need to
- if (ignoreRpc) {
- ed.setProgressState(1);
- t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
- ed.setProgressState(0);
- });
- }
- }
- });
-
- m.add({
- title : 'spellchecker.ignore_words',
- onclick : function() {
- var word = wordSpan.innerHTML;
-
- t._removeWords(dom.decode(word));
- t._checkDone();
-
- // tell the server if we need to
- if (ignoreRpc) {
- ed.setProgressState(1);
- t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
- ed.setProgressState(0);
- });
- }
- }
- });
- }
-
- if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
- m.add({
- title : 'spellchecker.learn_word',
- onclick : function() {
- var word = wordSpan.innerHTML;
-
- dom.remove(wordSpan, 1);
- t._checkDone();
-
- ed.setProgressState(1);
- t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
- ed.setProgressState(0);
- });
- }
- });
- }
-
- m.update();
- });
-
- p1 = DOM.getPos(ed.getContentAreaContainer());
- m.settings.offset_x = p1.x;
- m.settings.offset_y = p1.y;
-
- ed.selection.select(wordSpan);
- p1 = dom.getPos(wordSpan);
- m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
-
- return tinymce.dom.Event.cancel(e);
- } else
- m.hideMenu();
- },
-
- _checkDone : function() {
- var t = this, ed = t.editor, dom = ed.dom, o;
-
- each(dom.select('span'), function(n) {
- if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
- o = true;
- return false;
- }
- });
-
- if (!o)
- t._done();
- },
-
- _done : function() {
- var t = this, la = t.active;
-
- if (t.active) {
- t.active = 0;
- t._removeWords();
-
- if (t._menu)
- t._menu.hideMenu();
-
- if (la)
- t.editor.nodeChanged();
- }
- },
-
- _sendRPC : function(m, p, cb) {
- var t = this;
-
- JSONRequest.sendRPC({
- url : t.rpcUrl,
- method : m,
- params : p,
- success : cb,
- error : function(e, x) {
- t.editor.setProgressState(0);
- t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
- }
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif b/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
deleted file mode 100644
index 7d0a4dbca0..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php b/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
deleted file mode 100644
index ffea3a0c1f..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-/**
- * general.php
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
- */
-
-@error_reporting(E_ALL ^ E_NOTICE);
-$config = array();
-
-require_once(dirname(__FILE__) . "/../classes/utils/Logger.php");
-require_once(dirname(__FILE__) . "/../classes/utils/JSON.php");
-require_once(dirname(__FILE__) . "/../config.php");
-require_once(dirname(__FILE__) . "/../classes/SpellChecker.php");
-
-if (isset($config['general.engine']))
- require_once(dirname(__FILE__) . "/../classes/" . $config["general.engine"] . ".php");
-
-/**
- * Returns an request value by name without magic quoting.
- *
- * @param String $name Name of parameter to get.
- * @param String $default_value Default value to return if value not found.
- * @return String request value by name without magic quoting or default value.
- */
-function getRequestParam($name, $default_value = false) {
- if (!isset($_REQUEST[$name]))
- return $default_value;
-
- if (is_array($_REQUEST[$name])) {
- $newarray = array();
-
- foreach ($_REQUEST[$name] as $name => $value)
- $newarray[$name] = $value;
-
- return $newarray;
- }
-
- return $_REQUEST[$name];
-}
-
-function &getLogger() {
- global $mcLogger, $man;
-
- if (isset($man))
- $mcLogger = $man->getLogger();
-
- if (!$mcLogger) {
- $mcLogger = new Moxiecode_Logger();
-
- // Set logger options
- $mcLogger->setPath(dirname(__FILE__) . "/../logs");
- $mcLogger->setMaxSize("100kb");
- $mcLogger->setMaxFiles("10");
- $mcLogger->setFormat("{time} - {message}");
- }
-
- return $mcLogger;
-}
-
-function debug($msg) {
- $args = func_get_args();
-
- $log = getLogger();
- $log->debug(implode(', ', $args));
-}
-
-function info($msg) {
- $args = func_get_args();
-
- $log = getLogger();
- $log->info(implode(', ', $args));
-}
-
-function error($msg) {
- $args = func_get_args();
-
- $log = getLogger();
- $log->error(implode(', ', $args));
-}
-
-function warn($msg) {
- $args = func_get_args();
-
- $log = getLogger();
- $log->warn(implode(', ', $args));
-}
-
-function fatal($msg) {
- $args = func_get_args();
-
- $log = getLogger();
- $log->fatal(implode(', ', $args));
-}
-
-?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/rpc.php b/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
deleted file mode 100644
index 6a567348ce..0000000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * $Id: rpc.php 915 2008-09-03 08:45:28Z spocke $
- *
- * @package MCManager.includes
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-require_once("./includes/general.php");
-
-// Set RPC response headers
-header('Content-Type: text/plain');
-header('Content-Encoding: UTF-8');
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-
-$raw = "";
-
-// Try param
-if (isset($_POST["json_data"]))
- $raw = getRequestParam("json_data");
-
-// Try globals array
-if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"]))
- $raw = $_GLOBALS["HTTP_RAW_POST_DATA"];
-
-// Try globals variable
-if (!$raw && isset($HTTP_RAW_POST_DATA))
- $raw = $HTTP_RAW_POST_DATA;
-
-// Try stream
-if (!$raw) {
- if (!function_exists('file_get_contents')) {
- $fp = fopen("php://input", "r");
- if ($fp) {
- $raw = "";
-
- while (!feof($fp))
- $raw = fread($fp, 1024);
-
- fclose($fp);
- }
- } else
- $raw = "" . file_get_contents("php://input");
-}
-
-// No input data
-if (!$raw)
- die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
-
-// Passthrough request to remote server
-if (isset($config['general.remote_rpc_url'])) {
- $url = parse_url($config['general.remote_rpc_url']);
-
- // Setup request
- $req = "POST " . $url["path"] . " HTTP/1.0\r\n";
- $req .= "Connection: close\r\n";
- $req .= "Host: " . $url['host'] . "\r\n";
- $req .= "Content-Length: " . strlen($raw) . "\r\n";
- $req .= "\r\n" . $raw;
-
- if (!isset($url['port']) || !$url['port'])
- $url['port'] = 80;
-
- $errno = $errstr = "";
-
- $socket = fsockopen($url['host'], intval($url['port']), $errno, $errstr, 30);
- if ($socket) {
- // Send request headers
- fputs($socket, $req);
-
- // Read response headers and data
- $resp = "";
- while (!feof($socket))
- $resp .= fgets($socket, 4096);
-
- fclose($socket);
-
- // Split response header/data
- $resp = explode("\r\n\r\n", $resp);
- echo $resp[1]; // Output body
- }
-
- die();
-}
-
-// Get JSON data
-$json = new Moxiecode_JSON();
-$input = $json->decode($raw);
-
-// Execute RPC
-if (isset($config['general.engine'])) {
- $spellchecker = new $config['general.engine']($config);
- $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
-} else
- die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
-
-// Request and response id should always be the same
-$output = array(
- "id" => $input->id,
- "result" => $result,
- "error" => null
-);
-
-// Return JSON encoded string
-echo $json->encode($output);
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js b/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js
deleted file mode 100644
index 2c51291615..0000000000
--- a/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
deleted file mode 100644
index 94f45320d6..0000000000
--- a/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
-
- tinymce.create('tinymce.plugins.TabFocusPlugin', {
- init : function(ed, url) {
- function tabCancel(ed, e) {
- if (e.keyCode === 9)
- return Event.cancel(e);
- }
-
- function tabHandler(ed, e) {
- var x, i, f, el, v;
-
- function find(d) {
- el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
-
- function canSelectRecursive(e) {
- return e.nodeName==="BODY" || (e.type != 'hidden' &&
- !(e.style.display == "none") &&
- !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
- }
- function canSelectInOldIe(el) {
- return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
- }
- function isOldIe() {
- return tinymce.isIE6 || tinymce.isIE7;
- }
- function canSelect(el) {
- return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
- }
-
- each(el, function(e, i) {
- if (e.id == ed.id) {
- x = i;
- return false;
- }
- });
- if (d > 0) {
- for (i = x + 1; i < el.length; i++) {
- if (canSelect(el[i]))
- return el[i];
- }
- } else {
- for (i = x - 1; i >= 0; i--) {
- if (canSelect(el[i]))
- return el[i];
- }
- }
-
- return null;
- }
-
- if (e.keyCode === 9) {
- v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
-
- if (v.length == 1) {
- v[1] = v[0];
- v[0] = ':prev';
- }
-
- // Find element to focus
- if (e.shiftKey) {
- if (v[0] == ':prev')
- el = find(-1);
- else
- el = DOM.get(v[0]);
- } else {
- if (v[1] == ':next')
- el = find(1);
- else
- el = DOM.get(v[1]);
- }
-
- if (el) {
- if (el.id && (ed = tinymce.get(el.id || el.name)))
- ed.focus();
- else
- window.setTimeout(function() {
- if (!tinymce.isWebKit)
- window.focus();
- el.focus();
- }, 10);
-
- return Event.cancel(e);
- }
- }
- }
-
- ed.onKeyUp.add(tabCancel);
-
- if (tinymce.isGecko) {
- ed.onKeyPress.add(tabHandler);
- ed.onKeyDown.add(tabCancel);
- } else
- ed.onKeyDown.add(tabHandler);
-
- },
-
- getInfo : function() {
- return {
- longname : 'Tabfocus',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
deleted file mode 100644
index 3a87f1e0ed..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{init:function(g,d){var k=this,f=g.getParam("wordpress_adv_toolbar","toolbar2"),j=0,e,b,i,h,c;e='<img src="'+d+'/img/trans.gif" class="mce-wp-more mceItemNoResize" title="'+g.getLang("wordpress.wp_more_alt")+'" />';b='<img src="'+d+'/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+g.getLang("wordpress.wp_page_alt")+'" />';if(getUserSetting("hidetb","0")=="1"){g.settings.wordpress_adv_hidden=0}g.onPostRender.add(function(){var l=g.controlManager.get(f);if(g.getParam("wordpress_adv_hidden",1)&&l){a.hide(l.id);k._resizeIframe(g,f,28)}});g.addCommand("WP_More",function(){g.execCommand("mceInsertContent",0,e)});g.addCommand("WP_Page",function(){g.execCommand("mceInsertContent",0,b)});g.addCommand("WP_Help",function(){g.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})});g.addCommand("WP_Adv",function(){var l=g.controlManager,m=l.get(f).id;if("undefined"==m){return}if(a.isHidden(m)){l.setActive("wp_adv",1);a.show(m);k._resizeIframe(g,f,-28);g.settings.wordpress_adv_hidden=0;setUserSetting("hidetb","1")}else{l.setActive("wp_adv",0);a.hide(m);k._resizeIframe(g,f,28);g.settings.wordpress_adv_hidden=1;setUserSetting("hidetb","0")}});g.addCommand("WP_Medialib",function(){if(typeof wp!=="undefined"&&wp.media&&wp.media.editor){wp.media.editor.open(g.id)}});g.addButton("wp_more",{title:"wordpress.wp_more_desc",cmd:"WP_More"});g.addButton("wp_page",{title:"wordpress.wp_page_desc",image:d+"/img/page.gif",cmd:"WP_Page"});g.addButton("wp_help",{title:"wordpress.wp_help_desc",cmd:"WP_Help"});g.addButton("wp_adv",{title:"wordpress.wp_adv_desc",cmd:"WP_Adv"});g.addButton("add_media",{title:"wordpress.add_media",image:d+"/img/image.gif",cmd:"WP_Medialib"});g.onBeforeExecCommand.add(function(s,r,v,q,m){var y=tinymce.DOM,p,l,u,x,w,t;if("mceFullScreen"==r){if("mce_fullscreen"!=s.id&&y.select("a.thickbox").length){s.settings.theme_advanced_buttons1+=",|,add_media"}}if("JustifyLeft"==r||"JustifyRight"==r||"JustifyCenter"==r){p=s.selection.getNode();if(p.nodeName=="IMG"){t=r.substr(7).toLowerCase();w="align"+t;l=s.dom.getParent(p,"dl.wp-caption");u=s.dom.getParent(p,"div.mceTemp");if(l&&u){x=s.dom.hasClass(l,w)?"alignnone":w;l.className=l.className.replace(/align[^ '"]+\s?/g,"");s.dom.addClass(l,x);if(x=="aligncenter"){s.dom.addClass(u,"mceIEcenter")}else{s.dom.removeClass(u,"mceIEcenter")}m.terminate=true;s.execCommand("mceRepaint")}else{if(s.dom.hasClass(p,w)){s.dom.addClass(p,"alignnone")}else{s.dom.removeClass(p,"alignnone")}}}}if(tinymce.isWebKit&&("InsertUnorderedList"==r||"InsertOrderedList"==r)){if(!c){c=s.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")}s.getDoc().head.appendChild(c)}});g.onExecCommand.add(function(l,n,m,o){if(tinymce.isWebKit&&c&&("InsertUnorderedList"==n||"InsertOrderedList"==n)){l.dom.remove(c)}});g.onInit.add(function(n){var m=n.getParam("body_class",""),l=n.getBody();if(m){m=m.split(" ")}else{m=[]}if(n.getParam("directionality","")=="rtl"){m.push("rtl")}if(tinymce.isIE9){m.push("ie9")}else{if(tinymce.isIE8){m.push("ie8")}else{if(tinymce.isIE7){m.push("ie7")}}}if(n.id!="wp_mce_fullscreen"&&n.id!="mce_fullscreen"){m.push("wp-editor")}else{if(n.id=="mce_fullscreen"){m.push("mce-fullscreen")}}tinymce.each(m,function(o){if(o){n.dom.addClass(l,o)}});n.onNodeChange.add(function(p,o,r){var q;if(r.nodeName=="IMG"){q=p.dom.getParent(r,"dl.wp-caption")}else{if(r.nodeName=="DIV"&&p.dom.hasClass(r,"mceTemp")){q=r.firstChild;if(!p.dom.hasClass(q,"wp-caption")){q=false}}}if(q){if(p.dom.hasClass(q,"alignleft")){o.setActive("justifyleft",1)}else{if(p.dom.hasClass(q,"alignright")){o.setActive("justifyright",1)}else{if(p.dom.hasClass(q,"aligncenter")){o.setActive("justifycenter",1)}}}}});n.onBeforeSetContent.add(function(p,q){if(q.content){q.content=q.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>");q.content=q.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,"</$1>")}})});if("undefined"!=typeof(jQuery)){g.onKeyUp.add(function(m,n){var l=n.keyCode||n.charCode;if(l==j){return}if(13==l||8==j||46==j){jQuery(document).triggerHandler("wpcountwords",[m.getContent({format:"raw"})])}j=l})}g.onSaveContent.addToTop(function(l,m){m.content=m.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g,"<p>&nbsp;</p>")});g.onSaveContent.add(function(l,m){if(l.isHidden()){m.content=m.element.value}else{if(l.getParam("wpautop",true)&&typeof(switchEditors)=="object"){m.content=switchEditors.pre_wpautop(m.content)}}});k._handleMoreBreak(g,d);h="alt+shift";g.addShortcut(h+"+c","justifycenter_desc","JustifyCenter");g.addShortcut(h+"+r","justifyright_desc","JustifyRight");g.addShortcut(h+"+l","justifyleft_desc","JustifyLeft");g.addShortcut(h+"+j","justifyfull_desc","JustifyFull");g.addShortcut(h+"+q","blockquote_desc","mceBlockQuote");g.addShortcut(h+"+u","bullist_desc","InsertUnorderedList");g.addShortcut(h+"+o","numlist_desc","InsertOrderedList");g.addShortcut(h+"+n","spellchecker.desc","mceSpellCheck");g.addShortcut(h+"+a","link_desc","WP_Link");g.addShortcut(h+"+s","unlink_desc","unlink");g.addShortcut(h+"+m","image_desc","WP_Medialib");g.addShortcut(h+"+z","wordpress.wp_adv_desc","WP_Adv");g.addShortcut(h+"+t","wordpress.wp_more_desc","WP_More");g.addShortcut(h+"+d","striketrough_desc","Strikethrough");g.addShortcut(h+"+h","help_desc","WP_Help");g.addShortcut(h+"+p","wordpress.wp_page_desc","WP_Page");g.addShortcut("ctrl+s","save_desc",function(){if("function"==typeof autosave){autosave()}});if(/\bwpfullscreen\b/.test(g.settings.plugins)){g.addShortcut(h+"+w","wordpress.wp_fullscreen_desc","wpFullScreen")}else{if(/\bfullscreen\b/.test(g.settings.plugins)){g.addShortcut(h+"+g","fullscreen.desc","mceFullScreen")}}g.onInit.add(function(l){tinymce.dom.Event.add(l.getWin(),"scroll",function(m){l.plugins.wordpress._hideButtons()});tinymce.dom.Event.add(l.getBody(),"dragstart",function(m){l.plugins.wordpress._hideButtons()})});g.onBeforeExecCommand.add(function(l,n,m,o){l.plugins.wordpress._hideButtons()});g.onSaveContent.add(function(l,m){l.plugins.wordpress._hideButtons()});g.onMouseDown.add(function(l,m){if(m.target.nodeName!="IMG"){l.plugins.wordpress._hideButtons()}});g.onKeyDown.add(function(l,m){if(m.which==tinymce.VK.DELETE||m.which==tinymce.VK.BACKSPACE){l.plugins.wordpress._hideButtons()}});i=function(l){var m;if(l.target.id=="mceModalBlocker"||l.target.className=="ui-widget-overlay"){for(m in g.windowManager.windows){g.windowManager.close(null,m)}}};tinymce.dom.Event.remove(document.body,"click",i);tinymce.dom.Event.add(document.body,"click",i)},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.0"}},_setEmbed:function(b){return b.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(d,c){return'<img width="300" height="200" src="'+tinymce.baseURL+'/plugins/wordpress/img/trans.gif" class="wp-oembed mceItemNoResize" alt="'+c+'" title="'+c+'" />'})},_getEmbed:function(b){return b.replace(/<img[^>]+>/g,function(c){if(c.indexOf('class="wp-oembed')!=-1){var d=c.match(/alt="([^\"]+)"/);if(d[1]){c="[embed]"+d[1]+"[/embed]"}}return c})},_showButtons:function(f,d){var g=tinyMCE.activeEditor,i,h,b,j=tinymce.DOM,e,c;b=g.dom.getViewPort(g.getWin());i=j.getPos(g.getContentAreaContainer());h=g.dom.getPos(f);e=Math.max(h.x-b.x,0)+i.x;c=Math.max(h.y-b.y,0)+i.y;j.setStyles(d,{top:c+5+"px",left:e+5+"px",display:"block"})},_hideButtons:function(){var b=tinymce.DOM;b.hide(b.select("#wp_editbtns, #wp_gallerybtns"))},_resizeIframe:function(c,e,b){var d=c.getContentAreaContainer().firstChild;a.setStyle(d,"height",d.clientHeight+b);c.theme.deltaHeight+=b},_handleMoreBreak:function(c,d){var e,b;e='<img src="'+d+'/img/trans.gif" alt="$1" class="mce-wp-more mceItemNoResize" title="'+c.getLang("wordpress.wp_more_alt")+'" />';b='<img src="'+d+'/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+c.getLang("wordpress.wp_page_alt")+'" />';c.onPostRender.add(function(){if(c.theme.onResolveName){c.theme.onResolveName.add(function(f,g){if(g.node.nodeName=="IMG"){if(c.dom.hasClass(g.node,"mce-wp-more")){g.name="wpmore"}if(c.dom.hasClass(g.node,"mce-wp-nextpage")){g.name="wppage"}}})}});c.onBeforeSetContent.add(function(f,g){if(g.content){g.content=g.content.replace(/<!--more(.*?)-->/g,e);g.content=g.content.replace(/<!--nextpage-->/g,b)}});c.onPostProcess.add(function(f,g){if(g.get){g.content=g.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mce-wp-more')!==-1){var h,j=(h=i.match(/alt="(.*?)"/))?h[1]:"";i="<!--more"+j+"-->"}if(i.indexOf('class="mce-wp-nextpage')!==-1){i="<!--nextpage-->"}return i})}});c.onNodeChange.add(function(g,f,h){f.setActive("wp_page",h.nodeName==="IMG"&&g.dom.hasClass(h,"mce-wp-nextpage"));f.setActive("wp_more",h.nodeName==="IMG"&&g.dom.hasClass(h,"mce-wp-more"))})}});tinymce.PluginManager.add("wordpress",tinymce.plugins.WordPress)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
deleted file mode 100644
index 653eb7c8b2..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
+++ /dev/null
@@ -1,437 +0,0 @@
-/**
- * WordPress plugin.
- */
-
-(function() {
- var DOM = tinymce.DOM;
-
- tinymce.create('tinymce.plugins.WordPress', {
- init : function(ed, url) {
- var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key, style;
- moreHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-more mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';
- nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';
-
- if ( getUserSetting('hidetb', '0') == '1' )
- ed.settings.wordpress_adv_hidden = 0;
-
- // Hides the specified toolbar and resizes the iframe
- ed.onPostRender.add(function() {
- var adv_toolbar = ed.controlManager.get(tbId);
- if ( ed.getParam('wordpress_adv_hidden', 1) && adv_toolbar ) {
- DOM.hide(adv_toolbar.id);
- t._resizeIframe(ed, tbId, 28);
- }
- });
-
- // Register commands
- ed.addCommand('WP_More', function() {
- ed.execCommand('mceInsertContent', 0, moreHTML);
- });
-
- ed.addCommand('WP_Page', function() {
- ed.execCommand('mceInsertContent', 0, nextpageHTML);
- });
-
- ed.addCommand('WP_Help', function() {
- ed.windowManager.open({
- url : tinymce.baseURL + '/wp-mce-help.php',
- width : 450,
- height : 420,
- inline : 1
- });
- });
-
- ed.addCommand('WP_Adv', function() {
- var cm = ed.controlManager, id = cm.get(tbId).id;
-
- if ( 'undefined' == id )
- return;
-
- if ( DOM.isHidden(id) ) {
- cm.setActive('wp_adv', 1);
- DOM.show(id);
- t._resizeIframe(ed, tbId, -28);
- ed.settings.wordpress_adv_hidden = 0;
- setUserSetting('hidetb', '1');
- } else {
- cm.setActive('wp_adv', 0);
- DOM.hide(id);
- t._resizeIframe(ed, tbId, 28);
- ed.settings.wordpress_adv_hidden = 1;
- setUserSetting('hidetb', '0');
- }
- });
-
- ed.addCommand('WP_Medialib', function() {
- if ( typeof wp !== 'undefined' && wp.media && wp.media.editor )
- wp.media.editor.open( ed.id );
- });
-
- // Register buttons
- ed.addButton('wp_more', {
- title : 'wordpress.wp_more_desc',
- cmd : 'WP_More'
- });
-
- ed.addButton('wp_page', {
- title : 'wordpress.wp_page_desc',
- image : url + '/img/page.gif',
- cmd : 'WP_Page'
- });
-
- ed.addButton('wp_help', {
- title : 'wordpress.wp_help_desc',
- cmd : 'WP_Help'
- });
-
- ed.addButton('wp_adv', {
- title : 'wordpress.wp_adv_desc',
- cmd : 'WP_Adv'
- });
-
- // Add Media button
- ed.addButton('add_media', {
- title : 'wordpress.add_media',
- image : url + '/img/image.gif',
- cmd : 'WP_Medialib'
- });
-
- // Add Media buttons to fullscreen and handle align buttons for image captions
- ed.onBeforeExecCommand.add(function(ed, cmd, ui, val, o) {
- var DOM = tinymce.DOM, n, DL, DIV, cls, a, align;
- if ( 'mceFullScreen' == cmd ) {
- if ( 'mce_fullscreen' != ed.id && DOM.select('a.thickbox').length )
- ed.settings.theme_advanced_buttons1 += ',|,add_media';
- }
-
- if ( 'JustifyLeft' == cmd || 'JustifyRight' == cmd || 'JustifyCenter' == cmd ) {
- n = ed.selection.getNode();
-
- if ( n.nodeName == 'IMG' ) {
- align = cmd.substr(7).toLowerCase();
- a = 'align' + align;
- DL = ed.dom.getParent(n, 'dl.wp-caption');
- DIV = ed.dom.getParent(n, 'div.mceTemp');
-
- if ( DL && DIV ) {
- cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a;
- DL.className = DL.className.replace(/align[^ '"]+\s?/g, '');
- ed.dom.addClass(DL, cls);
-
- if (cls == 'aligncenter')
- ed.dom.addClass(DIV, 'mceIEcenter');
- else
- ed.dom.removeClass(DIV, 'mceIEcenter');
-
- o.terminate = true;
- ed.execCommand('mceRepaint');
- } else {
- if ( ed.dom.hasClass(n, a) )
- ed.dom.addClass(n, 'alignnone');
- else
- ed.dom.removeClass(n, 'alignnone');
- }
- }
- }
-
- if ( tinymce.isWebKit && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) ) {
- if ( !style )
- style = ed.dom.create('style', {'type': 'text/css'}, '#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}');
-
- ed.getDoc().head.appendChild( style );
- }
- });
-
- ed.onExecCommand.add( function( ed, cmd, ui, val ) {
- if ( tinymce.isWebKit && style && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) )
- ed.dom.remove( style );
- });
-
- ed.onInit.add(function(ed) {
- var bodyClass = ed.getParam('body_class', ''), body = ed.getBody();
-
- // add body classes
- if ( bodyClass )
- bodyClass = bodyClass.split(' ');
- else
- bodyClass = [];
-
- if ( ed.getParam('directionality', '') == 'rtl' )
- bodyClass.push('rtl');
-
- if ( tinymce.isIE9 )
- bodyClass.push('ie9');
- else if ( tinymce.isIE8 )
- bodyClass.push('ie8');
- else if ( tinymce.isIE7 )
- bodyClass.push('ie7');
-
- if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' )
- bodyClass.push('wp-editor');
- else if ( ed.id == 'mce_fullscreen' )
- bodyClass.push('mce-fullscreen');
-
- tinymce.each( bodyClass, function(cls){
- if ( cls )
- ed.dom.addClass(body, cls);
- });
-
- // make sure these run last
- ed.onNodeChange.add( function(ed, cm, e) {
- var DL;
-
- if ( e.nodeName == 'IMG' ) {
- DL = ed.dom.getParent(e, 'dl.wp-caption');
- } else if ( e.nodeName == 'DIV' && ed.dom.hasClass(e, 'mceTemp') ) {
- DL = e.firstChild;
-
- if ( ! ed.dom.hasClass(DL, 'wp-caption') )
- DL = false;
- }
-
- if ( DL ) {
- if ( ed.dom.hasClass(DL, 'alignleft') )
- cm.setActive('justifyleft', 1);
- else if ( ed.dom.hasClass(DL, 'alignright') )
- cm.setActive('justifyright', 1);
- else if ( ed.dom.hasClass(DL, 'aligncenter') )
- cm.setActive('justifycenter', 1);
- }
- });
-
- // remove invalid parent paragraphs when pasting HTML and/or switching to the HTML editor and back
- ed.onBeforeSetContent.add(function(ed, o) {
- if ( o.content ) {
- o.content = o.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi, '<$1$2>');
- o.content = o.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi, '</$1>');
- }
- });
- });
-
- // Word count
- if ( 'undefined' != typeof(jQuery) ) {
- ed.onKeyUp.add(function(ed, e) {
- var k = e.keyCode || e.charCode;
-
- if ( k == last )
- return;
-
- if ( 13 == k || 8 == last || 46 == last )
- jQuery(document).triggerHandler('wpcountwords', [ ed.getContent({format : 'raw'}) ]);
-
- last = k;
- });
- };
-
- // keep empty paragraphs :(
- ed.onSaveContent.addToTop(function(ed, o) {
- o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>');
- });
-
- ed.onSaveContent.add(function(ed, o) {
- // If editor is hidden, we just want the textarea's value to be saved
- if ( ed.isHidden() )
- o.content = o.element.value;
- else if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' )
- o.content = switchEditors.pre_wpautop(o.content);
- });
-
- /* disable for now
- ed.onBeforeSetContent.add(function(ed, o) {
- o.content = t._setEmbed(o.content);
- });
-
- ed.onPostProcess.add(function(ed, o) {
- if ( o.get )
- o.content = t._getEmbed(o.content);
- });
- */
-
- // Add listeners to handle more break
- t._handleMoreBreak(ed, url);
-
- // Add custom shortcuts
- mod_key = 'alt+shift';
-
- // if ( tinymce.isGecko ) // disable for mow, too many shortcuts conflicts
- // mod_key = 'ctrl+alt';
-
- ed.addShortcut(mod_key + '+c', 'justifycenter_desc', 'JustifyCenter');
- ed.addShortcut(mod_key + '+r', 'justifyright_desc', 'JustifyRight');
- ed.addShortcut(mod_key + '+l', 'justifyleft_desc', 'JustifyLeft');
- ed.addShortcut(mod_key + '+j', 'justifyfull_desc', 'JustifyFull');
- ed.addShortcut(mod_key + '+q', 'blockquote_desc', 'mceBlockQuote');
- ed.addShortcut(mod_key + '+u', 'bullist_desc', 'InsertUnorderedList');
- ed.addShortcut(mod_key + '+o', 'numlist_desc', 'InsertOrderedList');
- ed.addShortcut(mod_key + '+n', 'spellchecker.desc', 'mceSpellCheck');
- ed.addShortcut(mod_key + '+a', 'link_desc', 'WP_Link');
- ed.addShortcut(mod_key + '+s', 'unlink_desc', 'unlink');
- ed.addShortcut(mod_key + '+m', 'image_desc', 'WP_Medialib');
- ed.addShortcut(mod_key + '+z', 'wordpress.wp_adv_desc', 'WP_Adv');
- ed.addShortcut(mod_key + '+t', 'wordpress.wp_more_desc', 'WP_More');
- ed.addShortcut(mod_key + '+d', 'striketrough_desc', 'Strikethrough');
- ed.addShortcut(mod_key + '+h', 'help_desc', 'WP_Help');
- ed.addShortcut(mod_key + '+p', 'wordpress.wp_page_desc', 'WP_Page');
- ed.addShortcut('ctrl+s', 'save_desc', function(){if('function'==typeof autosave)autosave();});
-
- if ( /\bwpfullscreen\b/.test(ed.settings.plugins) )
- ed.addShortcut(mod_key + '+w', 'wordpress.wp_fullscreen_desc', 'wpFullScreen');
- else if ( /\bfullscreen\b/.test(ed.settings.plugins) )
- ed.addShortcut(mod_key + '+g', 'fullscreen.desc', 'mceFullScreen');
-
- // popup buttons for images and the gallery
- ed.onInit.add(function(ed) {
- tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {
- ed.plugins.wordpress._hideButtons();
- });
- tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) {
- ed.plugins.wordpress._hideButtons();
- });
- });
-
- ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onSaveContent.add(function(ed, o) {
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onMouseDown.add(function(ed, e) {
- if ( e.target.nodeName != 'IMG' )
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onKeyDown.add(function(ed, e){
- if ( e.which == tinymce.VK.DELETE || e.which == tinymce.VK.BACKSPACE )
- ed.plugins.wordpress._hideButtons();
- });
-
- closeOnClick = function(e){
- var id;
-
- if ( e.target.id == 'mceModalBlocker' || e.target.className == 'ui-widget-overlay' ) {
- for ( id in ed.windowManager.windows ) {
- ed.windowManager.close(null, id);
- }
- }
- }
-
- // close popups when clicking on the background
- tinymce.dom.Event.remove(document.body, 'click', closeOnClick);
- tinymce.dom.Event.add(document.body, 'click', closeOnClick);
- },
-
- getInfo : function() {
- return {
- longname : 'WordPress Plugin',
- author : 'WordPress', // add Moxiecode?
- authorurl : 'http://wordpress.org',
- infourl : 'http://wordpress.org',
- version : '3.0'
- };
- },
-
- // Internal functions
- _setEmbed : function(c) {
- return c.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g, function(a,b){
- return '<img width="300" height="200" src="' + tinymce.baseURL + '/plugins/wordpress/img/trans.gif" class="wp-oembed mceItemNoResize" alt="'+b+'" title="'+b+'" />';
- });
- },
-
- _getEmbed : function(c) {
- return c.replace(/<img[^>]+>/g, function(a) {
- if ( a.indexOf('class="wp-oembed') != -1 ) {
- var u = a.match(/alt="([^\"]+)"/);
- if ( u[1] )
- a = '[embed]' + u[1] + '[/embed]';
- }
- return a;
- });
- },
-
- _showButtons : function(n, id) {
- var ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y;
-
- vp = ed.dom.getViewPort(ed.getWin());
- p1 = DOM.getPos(ed.getContentAreaContainer());
- p2 = ed.dom.getPos(n);
-
- X = Math.max(p2.x - vp.x, 0) + p1.x;
- Y = Math.max(p2.y - vp.y, 0) + p1.y;
-
- DOM.setStyles(id, {
- 'top' : Y+5+'px',
- 'left' : X+5+'px',
- 'display' : 'block'
- });
- },
-
- _hideButtons : function() {
- var DOM = tinymce.DOM;
- DOM.hide( DOM.select('#wp_editbtns, #wp_gallerybtns') );
- },
-
- // Resizes the iframe by a relative height value
- _resizeIframe : function(ed, tb_id, dy) {
- var ifr = ed.getContentAreaContainer().firstChild;
-
- DOM.setStyle(ifr, 'height', ifr.clientHeight + dy); // Resize iframe
- ed.theme.deltaHeight += dy; // For resize cookie
- },
-
- _handleMoreBreak : function(ed, url) {
- var moreHTML, nextpageHTML;
-
- moreHTML = '<img src="' + url + '/img/trans.gif" alt="$1" class="mce-wp-more mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';
- nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';
-
- // Display morebreak instead if img in element path
- ed.onPostRender.add(function() {
- if (ed.theme.onResolveName) {
- ed.theme.onResolveName.add(function(th, o) {
- if (o.node.nodeName == 'IMG') {
- if ( ed.dom.hasClass(o.node, 'mce-wp-more') )
- o.name = 'wpmore';
- if ( ed.dom.hasClass(o.node, 'mce-wp-nextpage') )
- o.name = 'wppage';
- }
-
- });
- }
- });
-
- // Replace morebreak with images
- ed.onBeforeSetContent.add(function(ed, o) {
- if ( o.content ) {
- o.content = o.content.replace(/<!--more(.*?)-->/g, moreHTML);
- o.content = o.content.replace(/<!--nextpage-->/g, nextpageHTML);
- }
- });
-
- // Replace images with morebreak
- ed.onPostProcess.add(function(ed, o) {
- if (o.get)
- o.content = o.content.replace(/<img[^>]+>/g, function(im) {
- if (im.indexOf('class="mce-wp-more') !== -1) {
- var m, moretext = (m = im.match(/alt="(.*?)"/)) ? m[1] : '';
- im = '<!--more'+moretext+'-->';
- }
- if (im.indexOf('class="mce-wp-nextpage') !== -1)
- im = '<!--nextpage-->';
-
- return im;
- });
- });
-
- // Set active buttons if user selected pagebreak or more break
- ed.onNodeChange.add(function(ed, cm, n) {
- cm.setActive('wp_page', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce-wp-nextpage'));
- cm.setActive('wp_more', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce-wp-more'));
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif b/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif
deleted file mode 100644
index f8ad22383a..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/image.gif b/wp-includes/js/tinymce/plugins/wordpress/img/image.gif
deleted file mode 100644
index cf464afec1..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/image.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/media.gif b/wp-includes/js/tinymce/plugins/wordpress/img/media.gif
deleted file mode 100644
index 786e4f55de..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/media.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/page.gif b/wp-includes/js/tinymce/plugins/wordpress/img/page.gif
deleted file mode 100644
index 1cea78ac2b..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/page.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif b/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
deleted file mode 100644
index 388486517f..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/video.gif b/wp-includes/js/tinymce/plugins/wordpress/img/video.gif
deleted file mode 100644
index ddd20b1279..0000000000
--- a/wp-includes/js/tinymce/plugins/wordpress/img/video.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js
deleted file mode 100644
index 1ba21e3ce3..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.WPDialogs",{init:function(a,b){tinymce.create("tinymce.WPWindowManager:tinymce.InlineWindowManager",{WPWindowManager:function(c){this.parent(c)},open:function(e,g){var d=this,c;if(!e.wpDialog){return this.parent(e,g)}else{if(!e.id){return}}c=jQuery("#"+e.id);if(!c.length){return}d.features=e;d.params=g;d.onOpen.dispatch(d,e,g);d.element=d.windows[e.id]=c;d.bookmark=d.editor.selection.getBookmark(1);if(!c.data("wpdialog")){c.wpdialog({title:e.title,width:e.width,height:e.height,modal:true,dialogClass:"wp-dialog",zIndex:300000})}c.wpdialog("open")},close:function(){if(!this.features.wpDialog){return this.parent.apply(this,arguments)}this.element.wpdialog("close")}});a.onBeforeRenderUI.add(function(){a.windowManager=new tinymce.WPWindowManager(a)})},getInfo:function(){return{longname:"WPDialogs",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"0.1"}}});tinymce.PluginManager.add("wpdialogs",tinymce.plugins.WPDialogs)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js
deleted file mode 100644
index b301413b2d..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- tinymce.create('tinymce.plugins.WPDialogs', {
- init : function(ed, url) {
- tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', {
- WPWindowManager : function(ed) {
- this.parent(ed);
- },
-
- open : function(f, p) {
- var t = this, element;
-
- if ( ! f.wpDialog )
- return this.parent( f, p );
- else if ( ! f.id )
- return;
-
- element = jQuery('#' + f.id);
- if ( ! element.length )
- return;
-
- t.features = f;
- t.params = p;
- t.onOpen.dispatch(t, f, p);
- t.element = t.windows[ f.id ] = element;
-
- // Store selection
- t.bookmark = t.editor.selection.getBookmark(1);
-
- // Create the dialog if necessary
- if ( ! element.data('wpdialog') ) {
- element.wpdialog({
- title: f.title,
- width: f.width,
- height: f.height,
- modal: true,
- dialogClass: 'wp-dialog',
- zIndex: 300000
- });
- }
-
- element.wpdialog('open');
- },
- close : function() {
- if ( ! this.features.wpDialog )
- return this.parent.apply( this, arguments );
-
- this.element.wpdialog('close');
- }
- });
-
- // Replace window manager
- ed.onBeforeRenderUI.add(function() {
- ed.windowManager = new tinymce.WPWindowManager(ed);
- });
- },
-
- getInfo : function() {
- return {
- longname : 'WPDialogs',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : 'http://wordpress.org',
- version : '0.1'
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wpdialogs', tinymce.plugins.WPDialogs);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js b/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js
deleted file mode 100644
index e8c7d1d0ab..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/**
- * popup.js
- *
- * An altered version of tinyMCEPopup to work in the same window as tinymce.
- *
- * ------------------------------------------------------------------
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-// Some global instances
-
-/**
- * TinyMCE popup/dialog helper class. This gives you easy access to the
- * parent editor instance and a bunch of other things. It's higly recommended
- * that you load this script into your dialogs.
- *
- * @static
- * @class tinyMCEPopup
- */
-var tinyMCEPopup = {
- /**
- * Initializes the popup this will be called automatically.
- *
- * @method init
- */
- init : function() {
- var t = this, w, ti;
-
- // Find window & API
- w = t.getWin();
- tinymce = w.tinymce;
- tinyMCE = w.tinyMCE;
- t.editor = tinymce.EditorManager.activeEditor;
- t.params = t.editor.windowManager.params;
- t.features = t.editor.windowManager.features;
- t.dom = tinymce.dom;
-
- // Setup on init listeners
- t.listeners = [];
- t.onInit = {
- add : function(f, s) {
- t.listeners.push({func : f, scope : s});
- }
- };
-
- t.isWindow = false;
- t.id = t.features.id;
- t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
- },
-
- /**
- * Returns the reference to the parent window that opened the dialog.
- *
- * @method getWin
- * @return {Window} Reference to the parent window that opened the dialog.
- */
- getWin : function() {
- return window;
- },
-
- /**
- * Returns a window argument/parameter by name.
- *
- * @method getWindowArg
- * @param {String} n Name of the window argument to retrieve.
- * @param {String} dv Optional default value to return.
- * @return {String} Argument value or default value if it wasn't found.
- */
- getWindowArg : function(n, dv) {
- var v = this.params[n];
-
- return tinymce.is(v) ? v : dv;
- },
-
- /**
- * Returns a editor parameter/config option value.
- *
- * @method getParam
- * @param {String} n Name of the editor config option to retrieve.
- * @param {String} dv Optional default value to return.
- * @return {String} Parameter value or default value if it wasn't found.
- */
- getParam : function(n, dv) {
- return this.editor.getParam(n, dv);
- },
-
- /**
- * Returns a language item by key.
- *
- * @method getLang
- * @param {String} n Language item like mydialog.something.
- * @param {String} dv Optional default value to return.
- * @return {String} Language value for the item like "my string" or the default value if it wasn't found.
- */
- getLang : function(n, dv) {
- return this.editor.getLang(n, dv);
- },
-
- /**
- * Executed a command on editor that opened the dialog/popup.
- *
- * @method execCommand
- * @param {String} cmd Command to execute.
- * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
- * @param {Object} val Optional value to pass with the comman like an URL.
- * @param {Object} a Optional arguments object.
- */
- execCommand : function(cmd, ui, val, a) {
- a = a || {};
- a.skip_focus = 1;
-
- this.restoreSelection();
- return this.editor.execCommand(cmd, ui, val, a);
- },
-
- /**
- * Resizes the dialog to the inner size of the window. This is needed since various browsers
- * have different border sizes on windows.
- *
- * @method resizeToInnerSize
- */
- resizeToInnerSize : function() {
- var t = this;
-
- // Detach it to workaround a Chrome specific bug
- // https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
- setTimeout(function() {
- var vp = t.dom.getViewPort(window);
-
- t.editor.windowManager.resizeBy(
- t.getWindowArg('mce_width') - vp.w,
- t.getWindowArg('mce_height') - vp.h,
- t.id || window
- );
- }, 0);
- },
-
- /**
- * Will executed the specified string when the page has been loaded. This function
- * was added for compatibility with the 2.x branch.
- *
- * @method executeOnLoad
- * @param {String} s String to evalutate on init.
- */
- executeOnLoad : function(s) {
- this.onInit.add(function() {
- eval(s);
- });
- },
-
- /**
- * Stores the current editor selection for later restoration. This can be useful since some browsers
- * loses its selection if a control element is selected/focused inside the dialogs.
- *
- * @method storeSelection
- */
- storeSelection : function() {
- this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
- },
-
- /**
- * Restores any stored selection. This can be useful since some browsers
- * loses its selection if a control element is selected/focused inside the dialogs.
- *
- * @method restoreSelection
- */
- restoreSelection : function() {
- var t = tinyMCEPopup;
-
- if (!t.isWindow && tinymce.isIE)
- t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
- },
-
- /**
- * Loads a specific dialog language pack. If you pass in plugin_url as a arugment
- * when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.
- *
- * @method requireLangPack
- */
- requireLangPack : function() {
- var t = this, u = t.getWindowArg('plugin_url') || t.getWindowArg('theme_url');
-
- if (u && t.editor.settings.language && t.features.translate_i18n !== false) {
- u += '/langs/' + t.editor.settings.language + '_dlg.js';
-
- if (!tinymce.ScriptLoader.isDone(u)) {
- document.write('<script type="text/javascript" src="' + tinymce._addVer(u) + '"></script>');
- tinymce.ScriptLoader.markDone(u);
- }
- }
- },
-
- /**
- * Executes a color picker on the specified element id. When the user
- * then selects a color it will be set as the value of the specified element.
- *
- * @method pickColor
- * @param {DOMEvent} e DOM event object.
- * @param {string} element_id Element id to be filled with the color value from the picker.
- */
- pickColor : function(e, element_id) {
- this.execCommand('mceColorPicker', true, {
- color : document.getElementById(element_id).value,
- func : function(c) {
- document.getElementById(element_id).value = c;
-
- try {
- document.getElementById(element_id).onchange();
- } catch (ex) {
- // Try fire event, ignore errors
- }
- }
- });
- },
-
- /**
- * Opens a filebrowser/imagebrowser this will set the output value from
- * the browser as a value on the specified element.
- *
- * @method openBrowser
- * @param {string} element_id Id of the element to set value in.
- * @param {string} type Type of browser to open image/file/flash.
- * @param {string} option Option name to get the file_broswer_callback function name from.
- */
- openBrowser : function(element_id, type, option) {
- tinyMCEPopup.restoreSelection();
- this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
- },
-
- /**
- * Creates a confirm dialog. Please don't use the blocking behavior of this
- * native version use the callback method instead then it can be extended.
- *
- * @method confirm
- * @param {String} t Title for the new confirm dialog.
- * @param {function} cb Callback function to be executed after the user has selected ok or cancel.
- * @param {Object} s Optional scope to execute the callback in.
- */
- confirm : function(t, cb, s) {
- this.editor.windowManager.confirm(t, cb, s, window);
- },
-
- /**
- * Creates an alert dialog. Please don't use the blocking behavior of this
- * native version use the callback method instead then it can be extended.
- *
- * @method alert
- * @param {String} t Title for the new alert dialog.
- * @param {function} cb Callback function to be executed after the user has selected ok.
- * @param {Object} s Optional scope to execute the callback in.
- */
- alert : function(tx, cb, s) {
- this.editor.windowManager.alert(tx, cb, s, window);
- },
-
- /**
- * Closes the current window.
- *
- * @method close
- */
- close : function() {
- var t = this;
-
- // To avoid domain relaxing issue in Opera
- function close() {
- t.editor.windowManager.close(window);
- t.editor = null;
- };
-
- if (tinymce.isOpera)
- t.getWin().setTimeout(close, 0);
- else
- close();
- },
-
- // Internal functions
-
- _restoreSelection : function() {
- var e = window.event.srcElement;
-
- if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))
- tinyMCEPopup.restoreSelection();
- },
-
-/* _restoreSelection : function() {
- var e = window.event.srcElement;
-
- // If user focus a non text input or textarea
- if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
- tinyMCEPopup.restoreSelection();
- },*/
-
- _onDOMLoaded : function() {
- var t = tinyMCEPopup, ti = document.title, bm, h, nv;
-
- if (t.domLoaded)
- return;
-
- t.domLoaded = 1;
-
- tinyMCEPopup.init();
-
- // Translate page
- if (t.features.translate_i18n !== false) {
- h = document.body.innerHTML;
-
- // Replace a=x with a="x" in IE
- if (tinymce.isIE)
- h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
-
- document.dir = t.editor.getParam('directionality','');
-
- if ((nv = t.editor.translate(h)) && nv != h)
- document.body.innerHTML = nv;
-
- if ((nv = t.editor.translate(ti)) && nv != ti)
- document.title = ti = nv;
- }
-
- document.body.style.display = '';
-
- // Restore selection in IE when focus is placed on a non textarea or input element of the type text
- if (tinymce.isIE) {
- document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
-
- // Add base target element for it since it would fail with modal dialogs
- t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});
- }
-
- t.restoreSelection();
-
- // Set inline title
- if (!t.isWindow)
- t.editor.windowManager.setTitle(window, ti);
- else
- window.focus();
-
- if (!tinymce.isIE && !t.isWindow) {
- tinymce.dom.Event._add(document, 'focus', function() {
- t.editor.windowManager.focus(t.id);
- });
- }
-
- // Patch for accessibility
- tinymce.each(t.dom.select('select'), function(e) {
- e.onkeydown = tinyMCEPopup._accessHandler;
- });
-
- // Call onInit
- // Init must be called before focus so the selection won't get lost by the focus call
- tinymce.each(t.listeners, function(o) {
- o.func.call(o.scope, t.editor);
- });
-
- // Move focus to window
- if (t.getWindowArg('mce_auto_focus', true)) {
- window.focus();
-
- // Focus element with mceFocus class
- tinymce.each(document.forms, function(f) {
- tinymce.each(f.elements, function(e) {
- if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
- e.focus();
- return false; // Break loop
- }
- });
- });
- }
-
- document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
- },
-
- _accessHandler : function(e) {
- e = e || window.event;
-
- if (e.keyCode == 13 || e.keyCode == 32) {
- e = e.target || e.srcElement;
-
- if (e.onchange)
- e.onchange();
-
- return tinymce.dom.Event.cancel(e);
- }
- },
-
- _closeWinKeyHandler : function(e) {
- e = e || window.event;
-
- if (e.keyCode == 27)
- tinyMCEPopup.close();
- },
-
- _wait : function() {
- // Use IE method
- if (document.attachEvent) {
- document.attachEvent("onreadystatechange", function() {
- if (document.readyState === "complete") {
- document.detachEvent("onreadystatechange", arguments.callee);
- tinyMCEPopup._onDOMLoaded();
- }
- });
-
- if (document.documentElement.doScroll && window == window.top) {
- (function() {
- if (tinyMCEPopup.domLoaded)
- return;
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch (ex) {
- setTimeout(arguments.callee, 0);
- return;
- }
-
- tinyMCEPopup._onDOMLoaded();
- })();
- }
-
- document.attachEvent('onload', tinyMCEPopup._onDOMLoaded);
- } else if (document.addEventListener) {
- window.addEventListener('DOMContentLoaded', tinyMCEPopup._onDOMLoaded, false);
- window.addEventListener('load', tinyMCEPopup._onDOMLoaded, false);
- }
- }
-};
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.min.js b/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.min.js
deleted file mode 100644
index abacbd3a1f..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=tinymce.dom;b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=false;b.id=b.features.id;b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return window},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);a.editor=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;tinyMCEPopup.init();if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){tinymce.dom.Event._add(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}}; \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js b/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js
deleted file mode 100644
index cb168ddfad..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js
+++ /dev/null
@@ -1,28 +0,0 @@
-(function($){
- $.ui.dialog.prototype.options.closeOnEscape = false;
- $.widget('wp.wpdialog', $.ui.dialog, {
- // Work around a bug in jQuery UI 1.9.1.
- // http://bugs.jqueryui.com/ticket/8805
- widgetEventPrefix: 'wpdialog',
-
- open: function() {
- var ed;
-
- // Initialize tinyMCEPopup if it exists and the editor is active.
- if ( tinyMCEPopup && typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) {
- tinyMCEPopup.init();
- }
-
- // Add beforeOpen event.
- if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
- return;
- }
-
- // Open the dialog.
- this._super();
- // WebKit leaves focus in the TinyMCE editor unless we shift focus.
- this.element.focus();
- this._trigger('refresh');
- }
- });
-})(jQuery);
diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.min.js b/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.min.js
deleted file mode 100644
index 60bf4fe93f..0000000000
--- a/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){a.ui.dialog.prototype.options.closeOnEscape=false;a.widget("wp.wpdialog",a.ui.dialog,{widgetEventPrefix:"wpdialog",open:function(){var b;if(tinyMCEPopup&&typeof tinyMCE!="undefined"&&(b=tinyMCE.activeEditor)&&!b.isHidden()){tinyMCEPopup.init()}if(this.isOpen()||false===this._trigger("beforeOpen")){return}this._super();this.element.focus();this._trigger("refresh")}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css b/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
deleted file mode 100644
index e380ad594a..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
+++ /dev/null
@@ -1,443 +0,0 @@
-
-html, body {
- background-color: #fff;
- margin: 0;
- padding: 0;
-}
-
-body {
- font-family: sans-serif;
- font-size: 12px;
- line-height: 1.4em;
-}
-
-a.button {
- padding: 4px 8px;
-}
-
-textarea,
-input,
-select {
- font: inherit;
- margin: 1px;
- padding: 3px;
-}
-
-p.help {
- margin: 4px 0;
- font-size: 12px;
- font-style: italic;
-}
-
-abbr.required {
- color: #FF0000;
- text-align: left;
-}
-
-img.alignright,
-.alignright {
- float: right;
- margin-left: 5px;
-}
-
-img.alignleft,
-.alignleft {
- float: left;
- margin-right: 5px;
-}
-
-img.aligncenter {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-label {
- cursor: pointer;
-}
-
-th.label {
- width: 107px;
-}
-
-#media-upload #basic th.label {
- padding: 5px 5px 5px 0;
-}
-
-.show-align {
- height: 200px;
- width: 480px;
- float: right;
- background-color: #f1f1f1;
- cursor: default;
- -moz-user-select: none;
- user-select: none;
- overflow: hidden;
-}
-
-#img-edit {
- border: 1px solid #dfdfdf;
- width: 623px;
- margin: 15px auto;
-}
-
-#media-upload .media-upload-form table.describe {
- border-top-style: none;
- border-top-width: 0;
-}
-
-#img_demo_txt {
- font-size: 9px;
- line-height: 13px;
- font-family: Monaco,"Courier New",Courier,monospace;
- color: #888;
-}
-
-#img_demo {
- padding: 0;
-}
-
-#saveeditimg {
- padding: 10px 0 0 5px;
- border-top: 1px solid #ccc;
-}
-
-#sidemenu,
-#sidemenu li {
- list-style: none;
-}
-
-#sidemenu li {
- display: inline;
-}
-
-#sidemenu a {
- border-bottom-style: solid;
- border-bottom-width: 1px;
- border-top-style: solid;
- border-top-width: 1px;
- display: block;
- float: left;
- height: 28px;
- line-height: 28px;
- text-decoration: none;
- text-align: center;
- white-space: nowrap;
- margin: 0;
- padding: 0pt 7px;
- background-color: #f9f9f9;
- border-color: #f9f9f9;
- border-bottom-color: #dfdfdf;
-}
-
-a {
- color: #21759B;
-}
-
-a:hover,
-a:active,
-a:focus {
- color: #D54E21;
-}
-
-#sidemenu a.current {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- border-style: solid;
- border-width: 1px;
- font-weight: normal;
- background-color: #fff;
- border-color: #dfdfdf #dfdfdf #fff;
- color: #D54E21;
-}
-
-#adv_settings .field label {
- padding: 0 5px 5px;
-}
-
-#media-upload h3 {
- clear: both;
- padding: 0pt 0pt 3px;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- font-family: Georgia,"Times New Roman",Times,serif;
- font-size: 20px;
- font-weight: normal;
- line-height: normal;
- margin: 0 0 10px -4px;
- padding: 15px 0 3px;
- border-bottom-color: #DADADA;
- color: #5A5A5A;
-}
-
-#img_dim #width,
-#img_dim #height,
-#img_prop #border,
-#img_prop #vspace,
-#img_prop #hspace {
- width: 36px;
-}
-
-#img_dim abbr {
- padding: 0 4px;
-}
-
-#show_align_sp {
- width: 115px;
-}
-
-#img_dim input,
-#img_prop input {
- margin-right: 10px;
-}
-
-#basic .align .field label {
- padding: 0 0 0 24px;
-}
-
-#basic {
- padding-top: 2px;
-}
-
-td {
- padding: 2px 0;
-}
-
-#img_size {
- float: right;
- text-align: center;
- cursor: pointer;
- background-color: #f1f1f1;
- padding: 5px 0;
- width: 45px;
-}
-
-#img_size div {
- font-size: 10px;
- padding: 2px;
- border: 1px solid #f1f1f1;
- line-height: 15px;
- height: 15px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- color: #07273E;
-}
-
-#img_size div#s100 {
- border-color: #A3A3A3;
- background-color: #E5E5E5;
-}
-
-#img_size_div {
- width: 100px;
- float: left;
- cursor: default;
-}
-
-#img_size_title {
- margin: 0 7px 5px;
- text-align: right;
- font-weight: bold;
-}
-
-#img_align_td {
- padding: 2px 0 8px;
-}
-
-#media-upload tr.align td.field {
- text-align: center;
-}
-
-.describe td {
- vertical-align: middle;
-}
-
-#media-upload .describe th.label {
- padding-top: .5em;
- text-align: left;
-}
-
-#media-upload .describe {
- border-top-width: 1px;
- border-top-style: solid;
- padding: 5px;
- width: 100%;
- clear: both;
- cursor: default;
-}
-
-form {
- margin: 1em;
-}
-
-.describe input[type="text"],
-.describe textarea {
- width: 460px;
- border: 1px solid #dfdfdf;
- -webkit-border-radius: 4px;
- border-radius: 4px;
-}
-
-.media-upload-form label,
-.media-upload-form legend {
- font-weight: bold;
- font-size: 12px;
- color: #464646;
-}
-
-.align .field label {
- display: inline;
- padding: 0 0 0 28px;
- margin: 0 1em 0 0;
-}
-
-.image-align-none-label {
- background: url(../../../../../../wp-admin/images/align-none.png) no-repeat center left;
-}
-
-.image-align-left-label {
- background: url(../../../../../../wp-admin/images/align-left.png) no-repeat center left;
-}
-
-.image-align-center-label {
- background: url(../../../../../../wp-admin/images/align-center.png) no-repeat center left;
-}
-
-.image-align-right-label {
- background: url(../../../../../../wp-admin/images/align-right.png) no-repeat center left;
-}
-
-div#media-upload-header {
- margin: 0;
- padding: 0 5px;
- font-weight: bold;
- position: relative;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- height: 33px;
- background-color: #f9f9f9;
- border-bottom-color: #dfdfdf;
-}
-
-body#media-upload ul#sidemenu {
- font-weight: normal;
- margin: 0 5px;
- position: relative;
- left: 0px;
- bottom: -4px;
-}
-
-div#media-upload-error {
- margin: 1em;
- font-weight: bold;
-}
-
-#TB_window #TB_title {
- background-color: #222222;
- color: #CFCFCF;
-}
-
-.hidden {
- display: none;
-}
-
-/* RTL */
-body#media-upload.rtl ul#sidemenu {
- left: auto;
- right: 0;
-}
-
-.rtl #basic .align .field label {
- display: block;
- float: right;
- padding: 0 24px 0 0;
- margin: 5px 3px 5px 5px;
-}
-
-.rtl .align .field input {
- display: block;
- float: right;
- margin: 5px 15px 5px 0;
-}
-
-.rtl tr.image-size label {
- margin: 0;
-}
-
-.rtl tr.image-size input {
- margin: 3px 15px 0 5px;
-}
-
-.rtl .image-align-none-label,
-.rtl .image-align-left-label,
-.rtl .image-align-center-label,
-.rtl .image-align-right-label {
- background-position: center right;
-}
-
-#media-upload.rtl .describe th.label {
- text-align: right;
-}
-
-.rtl .show-align,
-.rtl #img_size,
-.rtl .alignright,
-.rtl #img_demo.alignleft {
- float: left;
-}
-
-.rtl tr.image-size label,
-.rtl tr.image-size input,
-.rtl #img_dim label,
-.rtl #img_dim input,
-.rtl #img_prop label,
-.rtl #img_prop input,
-.rtl #img_size_div,
-.rtl .alignleft,
-.rtl #img_demo.alignright {
- float: right;
-}
-
-.rtl #img_dim label,
-.rtl #img_prop label {
- margin: 5px 0pt;
-}
-
-.rtl #img_dim input,
-.rtl #img_prop input {
- margin: 0 5px 0 10px;
-}
-
-.rtl #img_size_title {
- text-align: left;
-}
-
-/**
- * Retina display 2x icons
- */
-@media print,
- (-o-min-device-pixel-ratio: 5/4),
- (-webkit-min-device-pixel-ratio: 1.25),
- (min-resolution: 120dpi) {
- .image-align-none-label {
- background: url(../../../../../../wp-admin/images/align-none-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-left-label {
- background: url(../../../../../../wp-admin/images/align-left-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-center-label {
- background: url(../../../../../../wp-admin/images/align-center-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-right-label {
- background: url(../../../../../../wp-admin/images/align-right-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-}
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html b/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
deleted file mode 100644
index 32d702b1a8..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title></title>
-
-<link rel="stylesheet" href="css/editimage.css?ver=358-20121205" type="text/css" media="all" />
-<link rel="stylesheet" href="../../../../css/buttons.css?ver=358-20121205" type="text/css" media="all" />
-<script type="text/javascript" src="js/editimage.min.js?ver=358-20121205"></script>
-<script type="text/javascript" src="../../utils/form_utils.js?ver=358-20121205"></script>
-<base target="_self" />
-</head>
-
-<body id="media-upload" class="wp-core-ui" style="display:none;">
-<script type="text/javascript">
-if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
- document.body.className += ' rtl';
-</script>
-<div id="media-upload-header">
- <ul id="sidemenu">
- <li><a href="javascript:;" id="tab_basic" class="current" onclick="wpImage.setTabs(this);">{#wpeditimage.edit_img}</a></li>
- <li><a href="javascript:;" id="tab_advanced" onclick="wpImage.setTabs(this);">{#wpeditimage.adv_settings}</a></li>
- </ul>
-</div>
-
-<div id="img-edit">
-<form class="media-upload-form" action="" onsubmit="wpImage.update();">
- <div id="img_size_div">
- <div id="img_size_title">{#wpeditimage.size}</div>
- <div id="img_size" onmouseout="wpImage.showSizeRem()">
- <div id="s130" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s130}</div>
- <div id="s120" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s120}</div>
- <div id="s110" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s110}</div>
- <div id="s100" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s100}</div>
- <div id="s90" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s90}</div>
- <div id="s80" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s80}</div>
- <div id="s70" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s70}</div>
- <div id="s60" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s60}</div>
- </div>
- </div>
- <div class="show-align" id="show_align">
- <img id="img_demo" src="img/image.png" alt="" />
- <span id="img_demo_txt">
- Lorem ipsum dolor sit amet consectetuer velit pretium euismod ipsum enim. Mi cursus at a mollis senectus id arcu gravida quis urna. Sed et felis id tempus Morbi mauris tincidunt enim In mauris. Pede eu risus velit libero natoque enim lorem adipiscing ipsum consequat. In malesuada et sociis tincidunt tempus pellentesque cursus convallis ipsum Suspendisse. Risus In ac quis ut Nunc convallis laoreet ante Suspendisse Nam. Amet amet urna condimentum Vestibulum sem at Curabitur lorem et cursus. Sodales tortor fermentum leo dui habitant Nunc Sed Vestibulum.
- Ut lorem In penatibus libero id ipsum sagittis nec elit Sed. Condimentum eget Vivamus vel consectetuer lorem molestie turpis amet tellus id. Condimentum vel ridiculus Fusce sed pede Nam nunc sodales eros tempor. Sit lacus magna dictumst Curabitur fringilla auctor id vitae wisi facilisi. Fermentum eget turpis felis velit leo Nunc Proin orci molestie Praesent. Curabitur tellus scelerisque suscipit ut sem amet cursus mi Morbi eu. Donec libero Vestibulum augue et mollis accumsan ornare condimentum In enim. Leo eget ac consectetuer quis condimentum malesuada.
- Condimentum commodo et Lorem fringilla malesuada libero volutpat sem tellus enim. Tincidunt sed at Aenean nec nonummy porttitor Nam Sed Nulla ut. Auctor leo In aliquet Curabitur eros et velit Quisque justo morbi. Et vel mauris sit nulla semper vitae et quis at dui. Id at elit laoreet justo eu mauris Quisque et interdum pharetra. Nullam accumsan interdum Maecenas condimentum quis quis Fusce a sollicitudin Sed. Non Quisque Vivamus congue porttitor non semper ipsum porttitor quis vel. Donec eros lacus volutpat et tincidunt sem convallis id venenatis sit. Consectetuer odio.
- Semper faucibus Morbi nulla convallis orci Aliquam Sed porttitor et Pellentesque. Venenatis laoreet lorem id a a Morbi augue turpis id semper. Arcu volutpat ac mauris Vestibulum fringilla Aenean condimentum nibh sed id. Sagittis eu lacus orci urna tellus tellus pretium Curabitur dui nunc. Et nibh eu eu nibh adipiscing at lorem Vestibulum adipiscing augue. Magna convallis Phasellus dolor malesuada Curabitur ornare adipiscing tellus Aliquam tempus. Id Aliquam Integer augue Nulla consectetuer ac Donec Curabitur tincidunt et. Id vel Nunc amet lacus dui magna ridiculus penatibus laoreet Duis. Enim sagittis nibh quis Nulla nec laoreet vel Maecenas mattis vel.
- </span>
- </div>
-
- <div id="div_basic">
- <table id="basic" class="describe">
- <tbody>
-
- <tr class="align">
- <th valign="top" scope="row" class="label">
- <label for="img_align_td">
- <span class="alignleft">{#contextmenu.align}</span>
- </label>
- </th>
- <td class="field" id="img_align_td">
- <input type="radio" onclick="wpImage.imgAlignCls('alignnone')" name="img_align" id="alignnone" value="alignnone" />
- <label for="alignnone" class="align image-align-none-label">{#wpeditimage.none}</label>
-
- <input type="radio" onclick="wpImage.imgAlignCls('alignleft')" name="img_align" id="alignleft" value="alignleft" />
- <label for="alignleft" class="align image-align-left-label">{#contextmenu.left}</label>
-
- <input type="radio" onclick="wpImage.imgAlignCls('aligncenter')" name="img_align" id="aligncenter" value="aligncenter" />
- <label for="aligncenter" class="align image-align-center-label">{#contextmenu.center}</label>
-
- <input type="radio" onclick="wpImage.imgAlignCls('alignright')" name="img_align" id="alignright" value="alignright" />
- <label for="alignright" class="align image-align-right-label">{#contextmenu.right}</label>
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="img_title">
- <span class="alignleft">{#wpeditimage.img_title}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="img_title" name="img_title" value="" aria-required="true" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="img_alt">
- <span class="alignleft">{#wpeditimage.alt}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="img_alt" name="img_alt" value="" size="60" />
- </td>
- </tr>
-
- <tr id="cap_field">
- <th valign="top" scope="row" class="label">
- <label for="img_cap">
- <span class="alignleft">{#wpeditimage.caption}</span>
- </label>
- </th>
- <td class="field">
- <textarea id="img_cap_text"></textarea>
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="link_href">
- <span class="alignleft" id="lb_link_href">{#advanced_dlg.link_url}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="link_href" name="link_href" value="" size="60" /><br />
- <input type="button" class="button" onclick="wpImage.I('link_href').value='';" value="{#wpeditimage.none}" />
- <input type="button" class="button" id="img_url_current" onclick="wpImage.img_seturl('current')" value="{#wpeditimage.current_link}" />
- <input type="button" class="button" id="img_url_img" onclick="wpImage.img_seturl('link')" value="{#wpeditimage.link_to_img}" />
- <p class="help">{#wpeditimage.link_help}</p>
- </td>
- </tr>
- </tbody>
- </table></div>
-
- <div id="div_advanced" style="display:none;">
- <h3>{#wpeditimage.adv_img_settings}</h3>
- <table id="adv_settings_img" class="describe">
- <tbody>
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="img_src">
- <span class="alignleft">{#wpeditimage.source}</span>
- <span class="alignright"><abbr title="required" class="required">*</abbr></span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="img_src" name="img_src" value="" onblur="wpImage.checkVal(this)" aria-required="true" size="60" />
- </td>
- </tr>
-
- <tr id="img_dim">
- <th valign="top" scope="row" class="label">
- <label>
- <span class="alignleft">{#wpeditimage.size}</span>
- </label>
- </th>
- <td class="field">
- <label for="width">{#wpeditimage.width}</label>
- <input type="text" maxlength="5" id="width" name="width" value="" />
-
- <label for="height">{#wpeditimage.height}</label>
- <input type="text" maxlength="5" id="height" name="height" value="" />
-
- <input type="button" class="button" id="orig_size" name="orig_size" value="{#wpeditimage.orig_size}" onclick="wpImage.origSize();" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="img_classes">
- <span class="alignleft">{#wpeditimage.css}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="img_classes" name="img_classes" value="" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="img_style">
- <span class="alignleft">{#advanced.style_select}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="img_style" name="img_style" value="" size="60" onblur="wpImage.demoSetStyle();" />
- </td>
- </tr>
-
- <tr id="img_prop">
- <th valign="top" scope="row" class="label">
- <label for="img_prop">
- <span class="alignleft">{#advanced.image_props_desc}</span>
- </label>
- </th>
- <td class="field">
- <label for="border">{#advanced_dlg.image_border}</label>
- <input type="text" maxlength="5" id="border" name="border" value="" onblur="wpImage.updateStyle('border')" />
-
- <label for="vspace">{#advanced_dlg.image_vspace}</label>
- <input type="text" maxlength="5" id="vspace" name="vspace" value="" onblur="wpImage.updateStyle('vspace')" />
-
- <label for="hspace">{#advanced_dlg.image_hspace}</label>
- <input type="text" maxlength="5" id="hspace" name="hspace" value="" onblur="wpImage.updateStyle('hspace')" />
- </td>
- </tr>
- </tbody>
- </table>
-
- <h3>{#wpeditimage.adv_link_settings}</h3>
- <table id="adv_settings_link" class="describe">
- <tbody>
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="link_title">
- <span class="alignleft">{#advanced_dlg.link_titlefield}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="link_title" name="link_title" value="" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="link_rel">
- <span class="alignleft">{#wpeditimage.link_rel}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="link_rel" name="link_rel" value="" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="link_classes">
- <span class="alignleft">{#wpeditimage.css}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="link_classes" name="link_classes" value="" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label for="link_style">
- <span class="alignleft">{#advanced.style_select}</span>
- </label>
- </th>
- <td class="field">
- <input type="text" id="link_style" name="link_style" value="" size="60" />
- </td>
- </tr>
-
- <tr>
- <th valign="top" scope="row" class="label">
- <label>
- <span class="alignleft">{#advanced_dlg.link_target}</span>
- </label>
- </th>
- <td class="field">
- <label for="link_target">
- {#advanced_dlg.link_target_blank}
- </label>
- <input type="checkbox" id="link_target" name="link_target" value="_blank" />
- </td>
- </tr>
- </tbody>
- </table></div>
-
- <div id="saveeditimg">
- <input type="hidden" id="align" name="align" value="" />
-
- <input type="submit" id="saveimg" class="button" value="{#update}" />
- <input type="button" class="button" id="cancelimg" name="cancelimg" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
-</form>
-</div>
-
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
deleted file mode 100644
index e4d1984a3a..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,c){var d=this,b={};d.url=c;d.editor=a;d._createButtons();a.addCommand("WP_EditImage",d._editImage);a.onInit.add(function(e){e.dom.events.add(e.getBody(),"mousedown",function(g){var f;if(g.target.nodeName=="IMG"&&(f=e.dom.getParent(g.target,"div.mceTemp"))){if(tinymce.isGecko){e.selection.select(f)}else{if(tinymce.isWebKit){e.dom.events.prevent(g)}}}});e.dom.events.add(e.getBody(),"keydown",function(j){var k,f,i,h,g;if(j.keyCode==13){k=e.selection.getNode();f=e.dom.getParent(k,"dl.wp-caption");if(f){i=e.dom.getParent(f,"div.mceTemp")}if(i){e.dom.events.cancel(j);h=e.dom.create("p",{},"\uFEFF");e.dom.insertAfter(h,i);e.selection.setCursorLocation(h,0);return false}}});if("ontouchstart" in window){e.dom.events.add(e.getBody(),"touchstart",function(f){d._showButtons(f)})}});a.onMouseUp.add(function(f,g){if(tinymce.isWebKit||tinymce.isOpera){return}if(b.x&&(g.clientX!=b.x||g.clientY!=b.y)){var h=f.selection.getNode();if("IMG"==h.nodeName){window.setTimeout(function(){var e=f.dom.getParent(h,"dl.wp-caption"),i;if(h.width!=b.img_w||h.height!=b.img_h){h.className=h.className.replace(/size-[^ "']+/,"")}if(e){i=f.dom.getAttrib(h,"width")||h.width;i=parseInt(i,10);f.dom.setStyle(e,"width",10+i);f.execCommand("mceRepaint")}},100)}}b={}});a.onMouseDown.add(function(f,g){d._showButtons(g)});a.onBeforeSetContent.add(function(e,f){f.content=e.wpSetImgCaption(f.content)});a.onPostProcess.add(function(e,f){if(f.get){f.content=e.wpGetImgCaption(f.content)}});a.wpSetImgCaption=function(e){return d._do_shcode(e)};a.wpGetImgCaption=function(e){return d._get_shcode(e)};a.onBeforeExecCommand.add(function(e,h,g,j){var f,i;if(h=="mceInsertContent"){f=e.dom.getParent(e.selection.getNode(),"div.mceTemp");if(!f){return}i=e.dom.create("p");e.dom.insertAfter(i,f);e.selection.setCursorLocation(i,0)}})},_do_shcode:function(a){return a.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(j,i,h){var d,m,k,l,f,g,e=tinymce.trim;d=i.match(/id=['"]([^'"]*)['"] ?/);if(d){i=i.replace(d[0],"")}m=i.match(/align=['"]([^'"]*)['"] ?/);if(m){i=i.replace(m[0],"")}k=i.match(/width=['"]([0-9]*)['"] ?/);if(k){i=i.replace(k[0],"")}h=e(h);g=h.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i);if(g&&g[2]){l=e(g[2]);g=e(g[1])}else{l=e(i).replace(/caption=['"]/,"").replace(/['"]$/,"");g=h}d=(d&&d[1])?d[1]:"";m=(m&&m[1])?m[1]:"alignnone";k=(k&&k[1])?k[1]:"";if(!k||!l){return h}f="mceTemp";if(m=="aligncenter"){f+=" mceIEcenter"}return'<div class="'+f+'"><dl id="'+d+'" class="wp-caption '+m+'" style="width: '+(10+parseInt(k))+'px"><dt class="wp-caption-dt">'+g+'</dt><dd class="wp-caption-dd">'+l+"</dd></dl></div>"})},_get_shcode:function(a){return a.replace(/<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g,function(d,c){var e=c.replace(/<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(i,f,l,j){var k,h,g;g=l.match(/width="([0-9]*)"/);g=(g&&g[1])?g[1]:"";if(!g||!j){return l}k=f.match(/id="([^"]*)"/);k=(k&&k[1])?k[1]:"";h=f.match(/class="([^"]*)"/);h=(h&&h[1])?h[1]:"";h=h.match(/align[a-z]+/)||"alignnone";j=j.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(b){return b.replace(/[\r\n\t]+/," ")});j=j.replace(/\s*\n\s*/g,"<br />");return'[caption id="'+k+'" align="'+h+'" width="'+g+'"]'+l+" "+j+"[/caption]"});if(e.indexOf("[caption")!==0){e=c.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2")}return e})},_createButtons:function(){var b=this,a=tinymce.activeEditor,d=tinymce.DOM,e,c,f;if(d.get("wp_editbtns")){return}f=(window.devicePixelRatio&&window.devicePixelRatio>1)||(window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches);d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:f?b.url+"/img/image-2x.png":b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){b._editImage();a.plugins.wordpress._hideButtons()});c=d.add("wp_editbtns","img",{src:f?b.url+"/img/delete-2x.png":b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(j){var g=tinymce.activeEditor,i=g.selection.getNode(),h;if(i.nodeName=="IMG"&&g.dom.getAttrib(i,"class").indexOf("mceItem")==-1){if((h=g.dom.getParent(i,"div"))&&g.dom.hasClass(h,"mceTemp")){g.dom.remove(h)}else{if(i.parentNode.nodeName=="A"&&i.parentNode.childNodes.length==1){i=i.parentNode}if(i.parentNode.nodeName=="P"&&i.parentNode.childNodes.length==1){i=i.parentNode}g.dom.remove(i)}g.execCommand("mceRepaint");return false}g.plugins.wordpress._hideButtons()})},_editImage:function(){var d=tinymce.activeEditor,e=this.url,g=d.selection.getNode(),c,f,a,b=g.className;if(b.indexOf("mceItem")!=-1||b.indexOf("wpGallery")!=-1||g.nodeName!="IMG"){return}c=tinymce.DOM.getViewPort();f=680<(c.h-70)?680:c.h-70;a=650<c.w?650:c.w;d.windowManager.open({file:e+"/editimage.html",width:a+"px",height:f+"px",inline:true})},_showButtons:function(c){var a=this.editor,b=c.target;if(b.nodeName!="IMG"){if(b.firstChild&&b.firstChild.nodeName=="IMG"&&b.childNodes.length==1){b=b.firstChild}else{a.plugins.wordpress._hideButtons();return}}if(a.dom.getAttrib(b,"class").indexOf("mceItem")==-1){mouse={x:c.clientX,y:c.clientY,img_w:b.clientWidth,img_h:b.clientHeight};if(c.type=="touchstart"){a.selection.select(b);a.dom.events.cancel(c)}a.plugins.wordpress._hideButtons();a.plugins.wordpress._showButtons(b,"wp_editbtns")}},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
deleted file mode 100644
index 17aa30e206..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
+++ /dev/null
@@ -1,325 +0,0 @@
-
-(function() {
- tinymce.create('tinymce.plugins.wpEditImage', {
- url: '',
- editor: {},
-
- init: function(ed, url) {
- var t = this, mouse = {};
-
- t.url = url;
- t.editor = ed;
- t._createButtons();
-
- ed.addCommand('WP_EditImage', t._editImage);
-
- ed.onInit.add(function(ed) {
- ed.dom.events.add(ed.getBody(), 'mousedown', function(e) {
- var parent;
-
- if ( e.target.nodeName == 'IMG' && ( parent = ed.dom.getParent(e.target, 'div.mceTemp') ) ) {
- if ( tinymce.isGecko )
- ed.selection.select(parent);
- else if ( tinymce.isWebKit )
- ed.dom.events.prevent(e);
- }
- });
-
- // when pressing Return inside a caption move the caret to a new parapraph under it
- ed.dom.events.add(ed.getBody(), 'keydown', function(e) {
- var n, DL, DIV, P, content;
-
- if ( e.keyCode == 13 ) {
- n = ed.selection.getNode();
- DL = ed.dom.getParent(n, 'dl.wp-caption');
-
- if ( DL )
- DIV = ed.dom.getParent(DL, 'div.mceTemp');
-
- if ( DIV ) {
- ed.dom.events.cancel(e);
- P = ed.dom.create('p', {}, '\uFEFF');
- ed.dom.insertAfter( P, DIV );
- ed.selection.setCursorLocation(P, 0);
- return false;
- }
- }
- });
-
- // iOS6 doesn't show the buttons properly on click, show them on 'touchstart'
- if ( 'ontouchstart' in window ) {
- ed.dom.events.add(ed.getBody(), 'touchstart', function(e){
- t._showButtons(e);
- });
- }
- });
-
- // resize the caption <dl> when the image is soft-resized by the user
- ed.onMouseUp.add(function(ed, e) {
- if ( tinymce.isWebKit || tinymce.isOpera )
- return;
-
- if ( mouse.x && (e.clientX != mouse.x || e.clientY != mouse.y) ) {
- var n = ed.selection.getNode();
-
- if ( 'IMG' == n.nodeName ) {
- window.setTimeout(function(){
- var DL = ed.dom.getParent(n, 'dl.wp-caption'), width;
-
- if ( n.width != mouse.img_w || n.height != mouse.img_h )
- n.className = n.className.replace(/size-[^ "']+/, '');
-
- if ( DL ) {
- width = ed.dom.getAttrib(n, 'width') || n.width;
- width = parseInt(width, 10);
- ed.dom.setStyle(DL, 'width', 10 + width);
- ed.execCommand('mceRepaint');
- }
- }, 100);
- }
- }
- mouse = {};
- });
-
- // show editimage buttons
- ed.onMouseDown.add(function(ed, e){
- t._showButtons(e);
- });
-
- ed.onBeforeSetContent.add(function(ed, o) {
- o.content = ed.wpSetImgCaption(o.content);
- });
-
- ed.onPostProcess.add(function(ed, o) {
- if (o.get)
- o.content = ed.wpGetImgCaption(o.content);
- });
-
- ed.wpSetImgCaption = function(content) {
- return t._do_shcode(content);
- };
-
- ed.wpGetImgCaption = function(content) {
- return t._get_shcode(content);
- };
-
- // When inserting content, if the caret is inside a caption create new paragraph under
- // and move the caret there
- ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
- var node, p;
-
- if ( cmd == 'mceInsertContent' ) {
- node = ed.dom.getParent(ed.selection.getNode(), 'div.mceTemp');
-
- if ( !node )
- return;
-
- p = ed.dom.create('p');
- ed.dom.insertAfter( p, node );
- ed.selection.setCursorLocation(p, 0);
- }
- });
- },
-
- _do_shcode : function(content) {
- return content.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function(a,b,c){
- var id, cls, w, cap, div_cls, img, trim = tinymce.trim;
-
- id = b.match(/id=['"]([^'"]*)['"] ?/);
- if ( id )
- b = b.replace(id[0], '');
-
- cls = b.match(/align=['"]([^'"]*)['"] ?/);
- if ( cls )
- b = b.replace(cls[0], '');
-
- w = b.match(/width=['"]([0-9]*)['"] ?/);
- if ( w )
- b = b.replace(w[0], '');
-
- c = trim(c);
- img = c.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i);
-
- if ( img && img[2] ) {
- cap = trim( img[2] );
- img = trim( img[1] );
- } else {
- // old captions shortcode style
- cap = trim(b).replace(/caption=['"]/, '').replace(/['"]$/, '');
- img = c;
- }
-
- id = ( id && id[1] ) ? id[1] : '';
- cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
- w = ( w && w[1] ) ? w[1] : '';
-
- if ( !w || !cap )
- return c;
-
- div_cls = 'mceTemp';
- if ( cls == 'aligncenter' )
- div_cls += ' mceIEcenter';
-
- return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+( 10 + parseInt(w) )+
- 'px"><dt class="wp-caption-dt">'+img+'</dt><dd class="wp-caption-dd">'+cap+'</dd></dl></div>';
- });
- },
-
- _get_shcode : function(content) {
- return content.replace(/<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g, function(a, b){
- var ret = b.replace(/<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function(a,b,c,cap){
- var id, cls, w;
-
- w = c.match(/width="([0-9]*)"/);
- w = ( w && w[1] ) ? w[1] : '';
-
- if ( !w || !cap )
- return c;
-
- id = b.match(/id="([^"]*)"/);
- id = ( id && id[1] ) ? id[1] : '';
-
- cls = b.match(/class="([^"]*)"/);
- cls = ( cls && cls[1] ) ? cls[1] : '';
- cls = cls.match(/align[a-z]+/) || 'alignnone';
-
- cap = cap.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
- // no line breaks inside HTML tags
- return a.replace(/[\r\n\t]+/, ' ');
- });
-
- // convert remaining line breaks to <br>
- cap = cap.replace(/\s*\n\s*/g, '<br />');
-
- return '[caption id="'+id+'" align="'+cls+'" width="'+w+'"]'+c+' '+cap+'[/caption]';
- });
-
- if ( ret.indexOf('[caption') !== 0 ) {
- // the caption html seems brocken, try to find the image that may be wrapped in a link
- // and may be followed by <p> with the caption text.
- ret = b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, '<p>$1</p>$2');
- }
-
- return ret;
- });
- },
-
- _createButtons : function() {
- var t = this, ed = tinymce.activeEditor, DOM = tinymce.DOM, editButton, dellButton, isRetina;
-
- if ( DOM.get('wp_editbtns') )
- return;
-
- isRetina = ( window.devicePixelRatio && window.devicePixelRatio > 1 ) || // WebKit, Opera
- ( window.matchMedia && window.matchMedia('(min-resolution:130dpi)').matches ); // Firefox, IE10, Opera
-
- DOM.add(document.body, 'div', {
- id : 'wp_editbtns',
- style : 'display:none;'
- });
-
- editButton = DOM.add('wp_editbtns', 'img', {
- src : isRetina ? t.url+'/img/image-2x.png' : t.url+'/img/image.png',
- id : 'wp_editimgbtn',
- width : '24',
- height : '24',
- title : ed.getLang('wpeditimage.edit_img')
- });
-
- tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
- t._editImage();
- ed.plugins.wordpress._hideButtons();
- });
-
- dellButton = DOM.add('wp_editbtns', 'img', {
- src : isRetina ? t.url+'/img/delete-2x.png' : t.url+'/img/delete.png',
- id : 'wp_delimgbtn',
- width : '24',
- height : '24',
- title : ed.getLang('wpeditimage.del_img')
- });
-
- tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
- var ed = tinymce.activeEditor, el = ed.selection.getNode(), parent;
-
- if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) {
- if ( (parent = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(parent, 'mceTemp') ) {
- ed.dom.remove(parent);
- } else {
- if ( el.parentNode.nodeName == 'A' && el.parentNode.childNodes.length == 1 )
- el = el.parentNode;
-
- if ( el.parentNode.nodeName == 'P' && el.parentNode.childNodes.length == 1 )
- el = el.parentNode;
-
- ed.dom.remove(el);
- }
-
- ed.execCommand('mceRepaint');
- return false;
- }
- ed.plugins.wordpress._hideButtons();
- });
- },
-
- _editImage : function() {
- var ed = tinymce.activeEditor, url = this.url, el = ed.selection.getNode(), vp, H, W, cls = el.className;
-
- if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' )
- return;
-
- vp = tinymce.DOM.getViewPort();
- H = 680 < (vp.h - 70) ? 680 : vp.h - 70;
- W = 650 < vp.w ? 650 : vp.w;
-
- ed.windowManager.open({
- file: url + '/editimage.html',
- width: W+'px',
- height: H+'px',
- inline: true
- });
- },
-
- _showButtons : function(e) {
- var ed = this.editor, target = e.target;
-
- if ( target.nodeName != 'IMG' ) {
- if ( target.firstChild && target.firstChild.nodeName == 'IMG' && target.childNodes.length == 1 ) {
- target = target.firstChild;
- } else {
- ed.plugins.wordpress._hideButtons();
- return;
- }
- }
-
- if ( ed.dom.getAttrib(target, 'class').indexOf('mceItem') == -1 ) {
- mouse = {
- x: e.clientX,
- y: e.clientY,
- img_w: target.clientWidth,
- img_h: target.clientHeight
- };
-
- if ( e.type == 'touchstart' ) {
- ed.selection.select(target);
- ed.dom.events.cancel(e);
- }
-
- ed.plugins.wordpress._hideButtons();
- ed.plugins.wordpress._showButtons(target, 'wp_editbtns');
- }
- },
-
- getInfo : function() {
- return {
- longname : 'Edit Image',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : "1.0"
- };
- }
- });
-
- tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png b/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png
deleted file mode 100644
index 859d853548..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png b/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png
deleted file mode 100644
index fe537f0a70..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png b/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png
deleted file mode 100644
index b3843ce511..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png b/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png
deleted file mode 100644
index ee6f0755f5..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
deleted file mode 100644
index 18e781179f..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
+++ /dev/null
@@ -1,613 +0,0 @@
-
-var tinymce = null, tinyMCEPopup, tinyMCE, wpImage;
-
-tinyMCEPopup = {
- init: function() {
- var t = this, w, ti;
-
- // Find window & API
- w = t.getWin();
- tinymce = w.tinymce;
- tinyMCE = w.tinyMCE;
- t.editor = tinymce.EditorManager.activeEditor;
- t.params = t.editor.windowManager.params;
- t.features = t.editor.windowManager.features;
-
- // Setup local DOM
- t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
- t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
- },
-
- getWin : function() {
- return (!window.frameElement && window.dialogArguments) || opener || parent || top;
- },
-
- getParam : function(n, dv) {
- return this.editor.getParam(n, dv);
- },
-
- close : function() {
- var t = this;
-
- // To avoid domain relaxing issue in Opera
- function close() {
- t.editor.windowManager.close(window);
- tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
- };
-
- if (tinymce.isOpera)
- t.getWin().setTimeout(close, 0);
- else
- close();
- },
-
- execCommand : function(cmd, ui, val, a) {
- a = a || {};
- a.skip_focus = 1;
-
- this.restoreSelection();
- return this.editor.execCommand(cmd, ui, val, a);
- },
-
- storeSelection : function() {
- this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
- },
-
- restoreSelection : function() {
- var t = tinyMCEPopup;
-
- if ( tinymce.isIE )
- t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
- }
-}
-tinyMCEPopup.init();
-
-wpImage = {
- preInit : function() {
- // import colors stylesheet from parent
- var ed = tinyMCEPopup.editor, win = tinyMCEPopup.getWin(), styles = win.document.styleSheets, url, i;
-
- for ( i = 0; i < styles.length; i++ ) {
- url = styles.item(i).href;
- if ( url && url.indexOf('colors') != -1 ) {
- document.getElementsByTagName('head')[0].appendChild( ed.dom.create('link', {rel:'stylesheet', href: url}) );
- break;
- }
- }
- },
-
- I : function(e) {
- return document.getElementById(e);
- },
-
- current : '',
- link : '',
- link_rel : '',
- target_value : '',
- current_size_sel : 's100',
- width : '',
- height : '',
- align : '',
- img_alt : '',
-
- setTabs : function(tab) {
- var t = this;
-
- if ( 'current' == tab.className ) return false;
- t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none';
- t.I('div_basic').style.display = ( 'tab_basic' == tab.id ) ? 'block' : 'none';
- t.I('tab_basic').className = t.I('tab_advanced').className = '';
- tab.className = 'current';
- return false;
- },
-
- img_seturl : function(u) {
- var t = this, rel = t.I('link_rel').value;
-
- if ( 'current' == u ) {
- t.I('link_href').value = t.current;
- t.I('link_rel').value = t.link_rel;
- } else {
- t.I('link_href').value = t.link;
- if ( rel ) {
- rel = rel.replace( /attachment|wp-att-[0-9]+/gi, '' );
- t.I('link_rel').value = tinymce.trim(rel);
- }
- }
- },
-
- imgAlignCls : function(v) {
- var t = this, cls = t.I('img_classes').value;
-
- t.I('img_demo').className = t.align = v;
-
- cls = cls.replace( /align[^ "']+/gi, '' );
- cls += (' ' + v);
- cls = cls.replace( /\s+/g, ' ' ).replace( /^\s/, '' );
-
- if ( 'aligncenter' == v ) {
- t.I('hspace').value = '';
- t.updateStyle('hspace');
- }
-
- t.I('img_classes').value = cls;
- },
-
- showSize : function(el) {
- var t = this, demo = t.I('img_demo'), w = t.width, h = t.height, id = el.id || 's100', size;
-
- size = parseInt(id.substring(1)) / 200;
- demo.width = Math.round(w * size);
- demo.height = Math.round(h * size);
-
- t.showSizeClear();
- el.style.borderColor = '#A3A3A3';
- el.style.backgroundColor = '#E5E5E5';
- },
-
- showSizeSet : function() {
- var t = this, s130, s120, s110;
-
- if ( (t.width * 1.3) > parseInt(t.preloadImg.width) ) {
- s130 = t.I('s130'), s120 = t.I('s120'), s110 = t.I('s110');
-
- s130.onclick = s120.onclick = s110.onclick = null;
- s130.onmouseover = s120.onmouseover = s110.onmouseover = null;
- s130.style.color = s120.style.color = s110.style.color = '#aaa';
- }
- },
-
- showSizeRem : function() {
- var t = this, demo = t.I('img_demo'), f = document.forms[0];
-
- demo.width = Math.round(f.width.value * 0.5);
- demo.height = Math.round(f.height.value * 0.5);
- t.showSizeClear();
- t.I(t.current_size_sel).style.borderColor = '#A3A3A3';
- t.I(t.current_size_sel).style.backgroundColor = '#E5E5E5';
-
- return false;
- },
-
- showSizeClear : function() {
- var divs = this.I('img_size').getElementsByTagName('div'), i;
-
- for ( i = 0; i < divs.length; i++ ) {
- divs[i].style.borderColor = '#f1f1f1';
- divs[i].style.backgroundColor = '#f1f1f1';
- }
- },
-
- imgEditSize : function(el) {
- var t = this, f = document.forms[0], W, H, w, h, id;
-
- if ( ! t.preloadImg || ! t.preloadImg.width || ! t.preloadImg.height )
- return;
-
- W = parseInt(t.preloadImg.width), H = parseInt(t.preloadImg.height), w = t.width || W, h = t.height || H, id = el.id || 's100';
-
- size = parseInt(id.substring(1)) / 100;
-
- w = Math.round(w * size);
- h = Math.round(h * size);
-
- f.width.value = Math.min(W, w);
- f.height.value = Math.min(H, h);
-
- t.current_size_sel = id;
- t.demoSetSize();
- },
-
- demoSetSize : function(img) {
- var demo = this.I('img_demo'), f = document.forms[0];
-
- demo.width = f.width.value ? Math.round(f.width.value * 0.5) : '';
- demo.height = f.height.value ? Math.round(f.height.value * 0.5) : '';
- },
-
- demoSetStyle : function() {
- var f = document.forms[0], demo = this.I('img_demo'), dom = tinyMCEPopup.editor.dom;
-
- if (demo) {
- dom.setAttrib(demo, 'style', f.img_style.value);
- dom.setStyle(demo, 'width', '');
- dom.setStyle(demo, 'height', '');
- }
- },
-
- origSize : function() {
- var t = this, f = document.forms[0], el = t.I('s100');
-
- f.width.value = t.width = t.preloadImg.width;
- f.height.value = t.height = t.preloadImg.height;
- t.showSizeSet();
- t.demoSetSize();
- t.showSize(el);
- },
-
- init : function() {
- var ed = tinyMCEPopup.editor, h;
-
- h = document.body.innerHTML;
- document.body.innerHTML = ed.translate(h);
- window.setTimeout( function(){wpImage.setup();}, 500 );
- },
-
- setup : function() {
- var t = this, c, el, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor,
- d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, DD, caption = '', dlc, pa;
-
- document.dir = tinyMCEPopup.editor.getParam('directionality','');
-
- if ( tinyMCEPopup.editor.getParam('wpeditimage_disable_captions', false) )
- t.I('cap_field').style.display = 'none';
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
- if (el.nodeName != 'IMG')
- return;
-
- f.img_src.value = d.src = link = ed.dom.getAttrib(el, 'src');
- ed.dom.setStyle(el, 'float', '');
- t.getImageData();
- c = ed.dom.getAttrib(el, 'class');
-
- if ( DL = dom.getParent(el, 'dl') ) {
- dlc = ed.dom.getAttrib(DL, 'class');
- dlc = dlc.match(/align[^ "']+/i);
- if ( dlc && ! dom.hasClass(el, dlc) ) {
- c += ' '+dlc;
- tinymce.trim(c);
- }
-
- DD = ed.dom.select('dd.wp-caption-dd', DL);
- if ( DD && DD[0] )
- caption = ed.serializer.serialize(DD[0]).replace(/^<p>/, '').replace(/<\/p>$/, '');
- }
-
- f.img_cap_text.value = caption;
- f.img_title.value = ed.dom.getAttrib(el, 'title');
- f.img_alt.value = ed.dom.getAttrib(el, 'alt');
- f.border.value = ed.dom.getAttrib(el, 'border');
- f.vspace.value = ed.dom.getAttrib(el, 'vspace');
- f.hspace.value = ed.dom.getAttrib(el, 'hspace');
- f.align.value = ed.dom.getAttrib(el, 'align');
- f.width.value = t.width = ed.dom.getAttrib(el, 'width');
- f.height.value = t.height = ed.dom.getAttrib(el, 'height');
- f.img_classes.value = c;
- f.img_style.value = ed.dom.getAttrib(el, 'style');
-
- // Move attribs to styles
- if ( dom.getAttrib(el, 'hspace') )
- t.updateStyle('hspace');
-
- if ( dom.getAttrib(el, 'border') )
- t.updateStyle('border');
-
- if ( dom.getAttrib(el, 'vspace') )
- t.updateStyle('vspace');
-
- if ( pa = ed.dom.getParent(el, 'A') ) {
- f.link_href.value = t.current = ed.dom.getAttrib(pa, 'href');
- f.link_title.value = ed.dom.getAttrib(pa, 'title');
- f.link_rel.value = t.link_rel = ed.dom.getAttrib(pa, 'rel');
- f.link_style.value = ed.dom.getAttrib(pa, 'style');
- t.target_value = ed.dom.getAttrib(pa, 'target');
- f.link_classes.value = ed.dom.getAttrib(pa, 'class');
- }
-
- f.link_target.checked = ( t.target_value && t.target_value == '_blank' ) ? 'checked' : '';
-
- fname = link.substring( link.lastIndexOf('/') );
- fname = fname.replace(/-[0-9]{2,4}x[0-9]{2,4}/, '' );
- t.link = link.substring( 0, link.lastIndexOf('/') ) + fname;
-
- if ( c.indexOf('alignleft') != -1 ) {
- t.I('alignleft').checked = "checked";
- d.className = t.align = "alignleft";
- } else if ( c.indexOf('aligncenter') != -1 ) {
- t.I('aligncenter').checked = "checked";
- d.className = t.align = "aligncenter";
- } else if ( c.indexOf('alignright') != -1 ) {
- t.I('alignright').checked = "checked";
- d.className = t.align = "alignright";
- } else if ( c.indexOf('alignnone') != -1 ) {
- t.I('alignnone').checked = "checked";
- d.className = t.align = "alignnone";
- }
-
- if ( t.width && t.preloadImg.width )
- t.showSizeSet();
-
- document.body.style.display = '';
- },
-
- remove : function() {
- var ed = tinyMCEPopup.editor, p, el;
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
- if (el.nodeName != 'IMG') return;
-
- if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') )
- ed.dom.remove(p);
- else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 )
- ed.dom.remove(p);
- else ed.dom.remove(el);
-
- ed.execCommand('mceRepaint');
- tinyMCEPopup.close();
- return;
- },
-
- update : function() {
- var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null,
- DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html,
- id, cap_id = '', cap, DT, DD, cap_width, div_cls, lnk = '', pa, aa, caption;
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
-
- if (el.nodeName != 'IMG') return;
- if (f.img_src.value === '') {
- t.remove();
- return;
- }
-
- if ( f.img_cap_text.value != '' && f.width.value != '' ) {
- do_caption = 1;
- img_class = img_class.replace( /align[^ "']+\s?/gi, '' );
- }
-
- A = ed.dom.getParent(el, 'a');
- P = ed.dom.getParent(el, 'p');
- DL = ed.dom.getParent(el, 'dl');
- DIV = ed.dom.getParent(el, 'div');
-
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
- if ( f.width.value != el.width || f.height.value != el.height )
- img_class = img_class.replace(/size-[^ "']+/, '');
-
- ed.dom.setAttribs(el, {
- src : f.img_src.value,
- title : f.img_title.value,
- alt : f.img_alt.value,
- width : f.width.value,
- height : f.height.value,
- style : f.img_style.value,
- 'class' : img_class
- });
-
- if ( f.link_href.value ) {
- // Create new anchor elements
- if ( A == null ) {
- if ( ! f.link_href.value.match(/https?:\/\//i) )
- f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value);
-
- ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
-
- tinymce.each(ed.dom.select("a"), function(n) {
- if ( ed.dom.getAttrib(n, 'href') == '#mce_temp_url#' ) {
-
- ed.dom.setAttribs(n, {
- href : f.link_href.value,
- title : f.link_title.value,
- rel : f.link_rel.value,
- target : (f.link_target.checked == true) ? '_blank' : '',
- 'class' : f.link_classes.value,
- style : f.link_style.value
- });
- }
- });
- } else {
- ed.dom.setAttribs(A, {
- href : f.link_href.value,
- title : f.link_title.value,
- rel : f.link_rel.value,
- target : (f.link_target.checked == true) ? '_blank' : '',
- 'class' : f.link_classes.value,
- style : f.link_style.value
- });
- }
- }
-
- if ( do_caption ) {
- cap_width = 10 + parseInt(f.width.value);
- div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
- caption = f.img_cap_text.value;
-
- caption = caption.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
- return a.replace(/[\r\n\t]+/, ' ');
- });
-
- caption = caption.replace(/\s*\n\s*/g, '<br />');
-
- if ( DL ) {
- ed.dom.setAttribs(DL, {
- 'class' : 'wp-caption '+t.align,
- style : 'width: '+cap_width+'px;'
- });
-
- if ( DIV )
- ed.dom.setAttrib(DIV, 'class', div_cls);
-
- if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp-caption-dd') )
- ed.dom.setHTML(DD, caption);
-
- } else {
- if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] )
- cap_id = 'attachment_'+id[1];
-
- if ( f.link_href.value && (lnk = ed.dom.getParent(el, 'a')) ) {
- if ( lnk.childNodes.length == 1 ) {
- html = ed.dom.getOuterHTML(lnk);
- } else {
- html = ed.dom.getOuterHTML(lnk);
- html = html.match(/<a [^>]+>/i);
- html = html+ed.dom.getOuterHTML(el)+'</a>';
- }
- } else {
- html = ed.dom.getOuterHTML(el);
- }
-
- html = '<dl id="'+cap_id+'" class="wp-caption '+t.align+'" style="width: '+cap_width+
- 'px"><dt class="wp-caption-dt">'+html+'</dt><dd class="wp-caption-dd">'+caption+'</dd></dl>';
-
- cap = ed.dom.create('div', {'class': div_cls}, html);
-
- if ( P ) {
- P.parentNode.insertBefore(cap, P);
- if ( P.childNodes.length == 1 )
- ed.dom.remove(P);
- else if ( lnk && lnk.childNodes.length == 1 )
- ed.dom.remove(lnk);
- else ed.dom.remove(el);
- } else if ( pa = ed.dom.getParent(el, 'TD,TH,LI') ) {
- pa.appendChild(cap);
- if ( lnk && lnk.childNodes.length == 1 )
- ed.dom.remove(lnk);
- else ed.dom.remove(el);
- }
- }
-
- } else {
- if ( DL && DIV ) {
- if ( f.link_href.value && (aa = ed.dom.getParent(el, 'a')) ) html = ed.dom.getOuterHTML(aa);
- else html = ed.dom.getOuterHTML(el);
-
- P = ed.dom.create('p', {}, html);
- DIV.parentNode.insertBefore(P, DIV);
- ed.dom.remove(DIV);
- }
- }
-
- if ( f.img_classes.value.indexOf('aligncenter') != -1 ) {
- if ( P && ( ! P.style || P.style.textAlign != 'center' ) )
- ed.dom.setStyle(P, 'textAlign', 'center');
- } else {
- if ( P && P.style && P.style.textAlign == 'center' )
- ed.dom.setStyle(P, 'textAlign', '');
- }
-
- if ( ! f.link_href.value && A ) {
- b = ed.selection.getBookmark();
- ed.dom.remove(A, 1);
- ed.selection.moveToBookmark(b);
- }
-
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- ed.execCommand('mceRepaint');
- tinyMCEPopup.close();
- },
-
- updateStyle : function(ty) {
- var dom = tinyMCEPopup.dom, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value});
-
- if (tinyMCEPopup.editor.settings.inline_styles) {
- // Handle align
- if (ty == 'align') {
- dom.setStyle(img, 'float', '');
- dom.setStyle(img, 'vertical-align', '');
-
- v = f.align.value;
- if (v) {
- if (v == 'left' || v == 'right')
- dom.setStyle(img, 'float', v);
- else
- img.style.verticalAlign = v;
- }
- }
-
- // Handle border
- if (ty == 'border') {
- dom.setStyle(img, 'border', '');
-
- v = f.border.value;
- if (v || v == '0') {
- if (v == '0')
- img.style.border = '0';
- else
- img.style.border = v + 'px solid black';
- }
- }
-
- // Handle hspace
- if (ty == 'hspace') {
- dom.setStyle(img, 'marginLeft', '');
- dom.setStyle(img, 'marginRight', '');
-
- v = f.hspace.value;
- if (v) {
- img.style.marginLeft = v + 'px';
- img.style.marginRight = v + 'px';
- }
- }
-
- // Handle vspace
- if (ty == 'vspace') {
- dom.setStyle(img, 'marginTop', '');
- dom.setStyle(img, 'marginBottom', '');
-
- v = f.vspace.value;
- if (v) {
- img.style.marginTop = v + 'px';
- img.style.marginBottom = v + 'px';
- }
- }
-
- // Merge
- f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText));
- this.demoSetStyle();
- }
- },
-
- checkVal : function(f) {
-
- if ( f.value == '' ) {
- // if ( f.id == 'width' ) f.value = this.width || this.preloadImg.width;
- // if ( f.id == 'height' ) f.value = this.height || this.preloadImg.height;
- if ( f.id == 'img_src' ) f.value = this.I('img_demo').src || this.preloadImg.src;
- }
- },
-
- resetImageData : function() {
- var f = document.forms[0];
-
- f.width.value = f.height.value = '';
- },
-
- updateImageData : function() {
- var f = document.forms[0], t = wpImage, w = f.width.value, h = f.height.value;
-
- if ( !w && h )
- w = f.width.value = t.width = Math.round( t.preloadImg.width / (t.preloadImg.height / h) );
- else if ( w && !h )
- h = f.height.value = t.height = Math.round( t.preloadImg.height / (t.preloadImg.width / w) );
-
- if ( !w )
- f.width.value = t.width = t.preloadImg.width;
-
- if ( !h )
- f.height.value = t.height = t.preloadImg.height;
-
- t.showSizeSet();
- t.demoSetSize();
- if ( f.img_style.value )
- t.demoSetStyle();
- },
-
- getImageData : function() {
- var t = wpImage, f = document.forms[0];
-
- t.preloadImg = new Image();
- t.preloadImg.onload = t.updateImageData;
- t.preloadImg.onerror = t.resetImageData;
- t.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.img_src.value);
- }
-};
-
-window.onload = function(){wpImage.init();}
-wpImage.preInit();
-
diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js
deleted file mode 100644
index eebfb3d5ac..0000000000
--- a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getParam:function(b,a){return this.editor.getParam(b,a)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}}};tinyMCEPopup.init();wpImage={preInit:function(){var a=tinyMCEPopup.editor,e=tinyMCEPopup.getWin(),d=e.document.styleSheets,b,c;for(c=0;c<d.length;c++){b=d.item(c).href;if(b&&b.indexOf("colors")!=-1){document.getElementsByTagName("head")[0].appendChild(a.dom.create("link",{rel:"stylesheet",href:b}));break}}},I:function(a){return document.getElementById(a)},current:"",link:"",link_rel:"",target_value:"",current_size_sel:"s100",width:"",height:"",align:"",img_alt:"",setTabs:function(b){var a=this;if("current"==b.className){return false}a.I("div_advanced").style.display=("tab_advanced"==b.id)?"block":"none";a.I("div_basic").style.display=("tab_basic"==b.id)?"block":"none";a.I("tab_basic").className=a.I("tab_advanced").className="";b.className="current";return false},img_seturl:function(b){var c=this,a=c.I("link_rel").value;if("current"==b){c.I("link_href").value=c.current;c.I("link_rel").value=c.link_rel}else{c.I("link_href").value=c.link;if(a){a=a.replace(/attachment|wp-att-[0-9]+/gi,"");c.I("link_rel").value=tinymce.trim(a)}}},imgAlignCls:function(b){var c=this,a=c.I("img_classes").value;c.I("img_demo").className=c.align=b;a=a.replace(/align[^ "']+/gi,"");a+=(" "+b);a=a.replace(/\s+/g," ").replace(/^\s/,"");if("aligncenter"==b){c.I("hspace").value="";c.updateStyle("hspace")}c.I("img_classes").value=a},showSize:function(e){var c=this,f=c.I("img_demo"),a=c.width,d=c.height,g=e.id||"s100",b;b=parseInt(g.substring(1))/200;f.width=Math.round(a*b);f.height=Math.round(d*b);c.showSizeClear();e.style.borderColor="#A3A3A3";e.style.backgroundColor="#E5E5E5"},showSizeSet:function(){var b=this,d,c,a;if((b.width*1.3)>parseInt(b.preloadImg.width)){d=b.I("s130"),c=b.I("s120"),a=b.I("s110");d.onclick=c.onclick=a.onclick=null;d.onmouseover=c.onmouseover=a.onmouseover=null;d.style.color=c.style.color=a.style.color="#aaa"}},showSizeRem:function(){var a=this,c=a.I("img_demo"),b=document.forms[0];c.width=Math.round(b.width.value*0.5);c.height=Math.round(b.height.value*0.5);a.showSizeClear();a.I(a.current_size_sel).style.borderColor="#A3A3A3";a.I(a.current_size_sel).style.backgroundColor="#E5E5E5";return false},showSizeClear:function(){var b=this.I("img_size").getElementsByTagName("div"),a;for(a=0;a<b.length;a++){b[a].style.borderColor="#f1f1f1";b[a].style.backgroundColor="#f1f1f1"}},imgEditSize:function(g){var d=this,i=document.forms[0],a,c,b,e,j;if(!d.preloadImg||!d.preloadImg.width||!d.preloadImg.height){return}a=parseInt(d.preloadImg.width),c=parseInt(d.preloadImg.height),b=d.width||a,e=d.height||c,j=g.id||"s100";size=parseInt(j.substring(1))/100;b=Math.round(b*size);e=Math.round(e*size);i.width.value=Math.min(a,b);i.height.value=Math.min(c,e);d.current_size_sel=j;d.demoSetSize()},demoSetSize:function(a){var c=this.I("img_demo"),b=document.forms[0];c.width=b.width.value?Math.round(b.width.value*0.5):"";c.height=b.height.value?Math.round(b.height.value*0.5):""},demoSetStyle:function(){var b=document.forms[0],a=this.I("img_demo"),c=tinyMCEPopup.editor.dom;if(a){c.setAttrib(a,"style",b.img_style.value);c.setStyle(a,"width","");c.setStyle(a,"height","")}},origSize:function(){var a=this,c=document.forms[0],b=a.I("s100");c.width.value=a.width=a.preloadImg.width;c.height.value=a.height=a.preloadImg.height;a.showSizeSet();a.demoSetSize();a.showSize(b)},init:function(){var a=tinyMCEPopup.editor,b;b=document.body.innerHTML;document.body.innerHTML=a.translate(b);window.setTimeout(function(){wpImage.setup()},500)},setup:function(){var q=this,l,b,m,e,j=document.forms[0],i=tinyMCEPopup.editor,k=q.I("img_demo"),h=tinyMCEPopup.dom,a,g,p="",o,n;document.dir=tinyMCEPopup.editor.getParam("directionality","");if(tinyMCEPopup.editor.getParam("wpeditimage_disable_captions",false)){q.I("cap_field").style.display="none"}tinyMCEPopup.restoreSelection();b=i.selection.getNode();if(b.nodeName!="IMG"){return}j.img_src.value=k.src=m=i.dom.getAttrib(b,"src");i.dom.setStyle(b,"float","");q.getImageData();l=i.dom.getAttrib(b,"class");if(a=h.getParent(b,"dl")){o=i.dom.getAttrib(a,"class");o=o.match(/align[^ "']+/i);if(o&&!h.hasClass(b,o)){l+=" "+o;tinymce.trim(l)}g=i.dom.select("dd.wp-caption-dd",a);if(g&&g[0]){p=i.serializer.serialize(g[0]).replace(/^<p>/,"").replace(/<\/p>$/,"")}}j.img_cap_text.value=p;j.img_title.value=i.dom.getAttrib(b,"title");j.img_alt.value=i.dom.getAttrib(b,"alt");j.border.value=i.dom.getAttrib(b,"border");j.vspace.value=i.dom.getAttrib(b,"vspace");j.hspace.value=i.dom.getAttrib(b,"hspace");j.align.value=i.dom.getAttrib(b,"align");j.width.value=q.width=i.dom.getAttrib(b,"width");j.height.value=q.height=i.dom.getAttrib(b,"height");j.img_classes.value=l;j.img_style.value=i.dom.getAttrib(b,"style");if(h.getAttrib(b,"hspace")){q.updateStyle("hspace")}if(h.getAttrib(b,"border")){q.updateStyle("border")}if(h.getAttrib(b,"vspace")){q.updateStyle("vspace")}if(n=i.dom.getParent(b,"A")){j.link_href.value=q.current=i.dom.getAttrib(n,"href");j.link_title.value=i.dom.getAttrib(n,"title");j.link_rel.value=q.link_rel=i.dom.getAttrib(n,"rel");j.link_style.value=i.dom.getAttrib(n,"style");q.target_value=i.dom.getAttrib(n,"target");j.link_classes.value=i.dom.getAttrib(n,"class")}j.link_target.checked=(q.target_value&&q.target_value=="_blank")?"checked":"";e=m.substring(m.lastIndexOf("/"));e=e.replace(/-[0-9]{2,4}x[0-9]{2,4}/,"");q.link=m.substring(0,m.lastIndexOf("/"))+e;if(l.indexOf("alignleft")!=-1){q.I("alignleft").checked="checked";k.className=q.align="alignleft"}else{if(l.indexOf("aligncenter")!=-1){q.I("aligncenter").checked="checked";k.className=q.align="aligncenter"}else{if(l.indexOf("alignright")!=-1){q.I("alignright").checked="checked";k.className=q.align="alignright"}else{if(l.indexOf("alignnone")!=-1){q.I("alignnone").checked="checked";k.className=q.align="alignnone"}}}}if(q.width&&q.preloadImg.width){q.showSizeSet()}document.body.style.display=""},remove:function(){var a=tinyMCEPopup.editor,c,b;tinyMCEPopup.restoreSelection();b=a.selection.getNode();if(b.nodeName!="IMG"){return}if((c=a.dom.getParent(b,"div"))&&a.dom.hasClass(c,"mceTemp")){a.dom.remove(c)}else{if((c=a.dom.getParent(b,"A"))&&c.childNodes.length==1){a.dom.remove(c)}else{a.dom.remove(b)}}a.execCommand("mceRepaint");tinyMCEPopup.close();return},update:function(){var m=this,v=document.forms[0],g=tinyMCEPopup.editor,e,y,d=null,n,h,p,r,o=null,k=v.img_classes.value,l,q,u="",j,i,s,a,B,x="",c,z,w;tinyMCEPopup.restoreSelection();e=g.selection.getNode();if(e.nodeName!="IMG"){return}if(v.img_src.value===""){m.remove();return}if(v.img_cap_text.value!=""&&v.width.value!=""){o=1;k=k.replace(/align[^ "']+\s?/gi,"")}p=g.dom.getParent(e,"a");h=g.dom.getParent(e,"p");n=g.dom.getParent(e,"dl");r=g.dom.getParent(e,"div");tinyMCEPopup.execCommand("mceBeginUndoLevel");if(v.width.value!=e.width||v.height.value!=e.height){k=k.replace(/size-[^ "']+/,"")}g.dom.setAttribs(e,{src:v.img_src.value,title:v.img_title.value,alt:v.img_alt.value,width:v.width.value,height:v.height.value,style:v.img_style.value,"class":k});if(v.link_href.value){if(p==null){if(!v.link_href.value.match(/https?:\/\//i)){v.link_href.value=tinyMCEPopup.editor.documentBaseURI.toAbsolute(v.link_href.value)}g.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("mceInsertLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(g.dom.select("a"),function(b){if(g.dom.getAttrib(b,"href")=="#mce_temp_url#"){g.dom.setAttribs(b,{href:v.link_href.value,title:v.link_title.value,rel:v.link_rel.value,target:(v.link_target.checked==true)?"_blank":"","class":v.link_classes.value,style:v.link_style.value})}})}else{g.dom.setAttribs(p,{href:v.link_href.value,title:v.link_title.value,rel:v.link_rel.value,target:(v.link_target.checked==true)?"_blank":"","class":v.link_classes.value,style:v.link_style.value})}}if(o){a=10+parseInt(v.width.value);B=(m.align=="aligncenter")?"mceTemp mceIEcenter":"mceTemp";w=v.img_cap_text.value;w=w.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(b){return b.replace(/[\r\n\t]+/," ")});w=w.replace(/\s*\n\s*/g,"<br />");if(n){g.dom.setAttribs(n,{"class":"wp-caption "+m.align,style:"width: "+a+"px;"});if(r){g.dom.setAttrib(r,"class",B)}if((i=g.dom.getParent(e,"dt"))&&(s=i.nextSibling)&&g.dom.hasClass(s,"wp-caption-dd")){g.dom.setHTML(s,w)}}else{if((q=v.img_classes.value.match(/wp-image-([0-9]{1,6})/))&&q[1]){u="attachment_"+q[1]}if(v.link_href.value&&(x=g.dom.getParent(e,"a"))){if(x.childNodes.length==1){l=g.dom.getOuterHTML(x)}else{l=g.dom.getOuterHTML(x);l=l.match(/<a [^>]+>/i);l=l+g.dom.getOuterHTML(e)+"</a>"}}else{l=g.dom.getOuterHTML(e)}l='<dl id="'+u+'" class="wp-caption '+m.align+'" style="width: '+a+'px"><dt class="wp-caption-dt">'+l+'</dt><dd class="wp-caption-dd">'+w+"</dd></dl>";j=g.dom.create("div",{"class":B},l);if(h){h.parentNode.insertBefore(j,h);if(h.childNodes.length==1){g.dom.remove(h)}else{if(x&&x.childNodes.length==1){g.dom.remove(x)}else{g.dom.remove(e)}}}else{if(c=g.dom.getParent(e,"TD,TH,LI")){c.appendChild(j);if(x&&x.childNodes.length==1){g.dom.remove(x)}else{g.dom.remove(e)}}}}}else{if(n&&r){if(v.link_href.value&&(z=g.dom.getParent(e,"a"))){l=g.dom.getOuterHTML(z)}else{l=g.dom.getOuterHTML(e)}h=g.dom.create("p",{},l);r.parentNode.insertBefore(h,r);g.dom.remove(r)}}if(v.img_classes.value.indexOf("aligncenter")!=-1){if(h&&(!h.style||h.style.textAlign!="center")){g.dom.setStyle(h,"textAlign","center")}}else{if(h&&h.style&&h.style.textAlign=="center"){g.dom.setStyle(h,"textAlign","")}}if(!v.link_href.value&&p){y=g.selection.getBookmark();g.dom.remove(p,1);g.selection.moveToBookmark(y)}tinyMCEPopup.execCommand("mceEndUndoLevel");g.execCommand("mceRepaint");tinyMCEPopup.close()},updateStyle:function(a){var e=tinyMCEPopup.dom,c,d=document.forms[0],b=e.create("img",{style:d.img_style.value});if(tinyMCEPopup.editor.settings.inline_styles){if(a=="align"){e.setStyle(b,"float","");e.setStyle(b,"vertical-align","");c=d.align.value;if(c){if(c=="left"||c=="right"){e.setStyle(b,"float",c)}else{b.style.verticalAlign=c}}}if(a=="border"){e.setStyle(b,"border","");c=d.border.value;if(c||c=="0"){if(c=="0"){b.style.border="0"}else{b.style.border=c+"px solid black"}}}if(a=="hspace"){e.setStyle(b,"marginLeft","");e.setStyle(b,"marginRight","");c=d.hspace.value;if(c){b.style.marginLeft=c+"px";b.style.marginRight=c+"px"}}if(a=="vspace"){e.setStyle(b,"marginTop","");e.setStyle(b,"marginBottom","");c=d.vspace.value;if(c){b.style.marginTop=c+"px";b.style.marginBottom=c+"px"}}d.img_style.value=e.serializeStyle(e.parseStyle(b.style.cssText));this.demoSetStyle()}},checkVal:function(a){if(a.value==""){if(a.id=="img_src"){a.value=this.I("img_demo").src||this.preloadImg.src}}},resetImageData:function(){var a=document.forms[0];a.width.value=a.height.value=""},updateImageData:function(){var d=document.forms[0],b=wpImage,a=d.width.value,c=d.height.value;if(!a&&c){a=d.width.value=b.width=Math.round(b.preloadImg.width/(b.preloadImg.height/c))}else{if(a&&!c){c=d.height.value=b.height=Math.round(b.preloadImg.height/(b.preloadImg.width/a))}}if(!a){d.width.value=b.width=b.preloadImg.width}if(!c){d.height.value=b.height=b.preloadImg.height}b.showSizeSet();b.demoSetSize();if(d.img_style.value){b.demoSetStyle()}},getImageData:function(){var a=wpImage,b=document.forms[0];a.preloadImg=new Image();a.preloadImg.onload=a.updateImageData;a.preloadImg.onerror=a.resetImageData;a.preloadImg.src=tinyMCEPopup.editor.documentBaseURI.toAbsolute(b.img_src.value)}};window.onload=function(){wpImage.init()};wpImage.preInit(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css b/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css
deleted file mode 100644
index 686fedf29c..0000000000
--- a/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-Distraction Free Writing mode TinyMCE Styles
-*/
-
-html,
-body {
- background: transparent;
- width: auto !important;
- max-width: none !important;
- margin: 0 !important;
- padding: 0 !important;
- min-height: 0 !important;
-}
diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js
deleted file mode 100644
index ce779891e7..0000000000
--- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{resize_timeout:false,init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenInit",function(){var j,h,i;a=tinyMCE.activeEditor;j=a.getDoc();h=j.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(k,l){e[l]=k});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_statusbar_location="none";e.content_css=e.content_css?e.content_css+","+e.wp_fullscreen_content_css:e.wp_fullscreen_content_css;e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;tinymce.each(a.getParam("wp_fullscreen_settings"),function(m,l){e[l]=m});i=new tinymce.Editor("wp_mce_fullscreen",e);i.onInit.add(function(k){var m=tinymce.DOM,l=m.select("a.mceButton",m.get("wp-fullscreen-buttons"));if(!a.isHidden()){k.setContent(a.getContent())}else{k.setContent(switchEditors.wpautop(k.getElement().value))}setTimeout(function(){k.onNodeChange.add(function(o,n,p){tinymce.each(l,function(s){var r,q;if(r=m.get("wp_mce_fullscreen_"+s.id.substr(6))){q=r.className;if(q){s.className=q}}})})},1000);k.dom.addClass(k.getBody(),"wp-fullscreen-editor");k.focus()});i.render();if("undefined"!=fullscreen){i.dom.bind(i.dom.doc,"mousemove",function(k){fullscreen.bounder("showToolbar","hideToolbar",2000,k)})}});a.addCommand("wpFullScreen",function(){if(typeof(fullscreen)=="undefined"){return}if("wp_mce_fullscreen"==a.id){fullscreen.off()}else{fullscreen.on()}});a.addButton("wp_fullscreen",{title:"wordpress.wp_fullscreen_desc",cmd:"wpFullScreen"});if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(j,l){var k=tinymce.DOM,i=a.getBody(),n=k.get(a.id+"_ifr"),h,m=a.dom.win.scrollY;if(d.resize_timeout){return}d.resize_timeout=true;setTimeout(function(){d.resize_timeout=false},500);h=i.scrollHeight>300?i.scrollHeight:300;if(h!=n.scrollHeight){k.setStyle(n,"height",h+"px");a.getWin().scrollTo(0,0)}if(l&&l.type=="paste"&&tinymce.isWebKit){setTimeout(function(){a.dom.win.scrollTo(0,m)},40)}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden"});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("wpAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
deleted file mode 100644
index 4618fcfe67..0000000000
--- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * WP Fullscreen TinyMCE plugin
- *
- * Contains code from Moxiecode Systems AB released under LGPL http://tinymce.moxiecode.com/license
- */
-
-(function() {
- tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
- resize_timeout: false,
-
- init : function(ed, url) {
- var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM;
-
- // Register commands
- ed.addCommand('wpFullScreenClose', function() {
- // this removes the editor, content has to be saved first with tinyMCE.execCommand('wpFullScreenSave');
- if ( ed.getParam('wp_fullscreen_is_enabled') ) {
- DOM.win.setTimeout(function() {
- tinyMCE.remove(ed);
- DOM.remove('wp_mce_fullscreen_parent');
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
- }, 10);
- }
- });
-
- ed.addCommand('wpFullScreenSave', function() {
- var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
-
- ed.focus();
- edd = tinyMCE.get( ed.getParam('wp_fullscreen_editor_id') );
-
- edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
- });
-
- ed.addCommand('wpFullScreenInit', function() {
- var d, b, fsed;
-
- ed = tinyMCE.activeEditor;
- d = ed.getDoc();
- b = d.body;
-
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
-
- tinymce.each(ed.settings, function(v, n) {
- s[n] = v;
- });
-
- s.id = 'wp_mce_fullscreen';
- s.wp_fullscreen_is_enabled = true;
- s.wp_fullscreen_editor_id = ed.id;
- s.theme_advanced_resizing = false;
- s.theme_advanced_statusbar_location = 'none';
- s.content_css = s.content_css ? s.content_css + ',' + s.wp_fullscreen_content_css : s.wp_fullscreen_content_css;
- s.height = tinymce.isIE ? b.scrollHeight : b.offsetHeight;
-
- tinymce.each(ed.getParam('wp_fullscreen_settings'), function(v, k) {
- s[k] = v;
- });
-
- fsed = new tinymce.Editor('wp_mce_fullscreen', s);
- fsed.onInit.add(function(edd) {
- var DOM = tinymce.DOM, buttons = DOM.select('a.mceButton', DOM.get('wp-fullscreen-buttons'));
-
- if ( !ed.isHidden() )
- edd.setContent( ed.getContent() );
- else
- edd.setContent( switchEditors.wpautop( edd.getElement().value ) );
-
- setTimeout(function(){ // add last
- edd.onNodeChange.add(function(ed, cm, e){
- tinymce.each(buttons, function(c) {
- var btn, cls;
-
- if ( btn = DOM.get( 'wp_mce_fullscreen_' + c.id.substr(6) ) ) {
- cls = btn.className;
-
- if ( cls )
- c.className = cls;
- }
- });
- });
- }, 1000);
-
- edd.dom.addClass(edd.getBody(), 'wp-fullscreen-editor');
- edd.focus();
- });
-
- fsed.render();
-
- if ( 'undefined' != fullscreen ) {
- fsed.dom.bind( fsed.dom.doc, 'mousemove', function(e){
- fullscreen.bounder( 'showToolbar', 'hideToolbar', 2000, e );
- });
- }
- });
-
- ed.addCommand('wpFullScreen', function() {
- if ( typeof(fullscreen) == 'undefined' )
- return;
-
- if ( 'wp_mce_fullscreen' == ed.id )
- fullscreen.off();
- else
- fullscreen.on();
- });
-
- // Register buttons
- ed.addButton('wp_fullscreen', {
- title : 'wordpress.wp_fullscreen_desc',
- cmd : 'wpFullScreen'
- });
-
- // END fullscreen
-//----------------------------------------------------------------
- // START autoresize
-
- if ( ed.getParam('fullscreen_is_enabled') || !ed.getParam('wp_fullscreen_is_enabled') )
- return;
-
- /**
- * This method gets executed each time the editor needs to resize.
- */
- function resize(editor, e) {
- var DOM = tinymce.DOM, body = ed.getBody(), ifr = DOM.get(ed.id + '_ifr'), height, y = ed.dom.win.scrollY;
-
- if ( t.resize_timeout )
- return;
-
- // sometimes several events are fired few ms apart, trottle down resizing a little
- t.resize_timeout = true;
- setTimeout(function(){
- t.resize_timeout = false;
- }, 500);
-
- height = body.scrollHeight > 300 ? body.scrollHeight : 300;
-
- if ( height != ifr.scrollHeight ) {
- DOM.setStyle(ifr, 'height', height + 'px');
- ed.getWin().scrollTo(0, 0); // iframe window object, make sure there's no scrolling
- }
-
- // WebKit scrolls to top on paste...
- if ( e && e.type == 'paste' && tinymce.isWebKit ) {
- setTimeout(function(){
- ed.dom.win.scrollTo(0, y);
- }, 40);
- }
- };
-
- // Add appropriate listeners for resizing content area
- ed.onInit.add(function(ed, l) {
- ed.onChange.add(resize);
- ed.onSetContent.add(resize);
- ed.onPaste.add(resize);
- ed.onKeyUp.add(resize);
- ed.onPostRender.add(resize);
-
- ed.getBody().style.overflowY = "hidden";
- });
-
- if ( ed.getParam('autoresize_on_init', true) ) {
- ed.onLoadContent.add(function(ed, l) {
- // Because the content area resizes when its content CSS loads,
- // and we can't easily add a listener to its onload event,
- // we'll just trigger a resize after a short loading period
- setTimeout(function() {
- resize();
- }, 1200);
- });
- }
-
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
- ed.addCommand('wpAutoResize', resize);
- },
-
- getInfo : function() {
- return {
- longname : 'WP Fullscreen',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : '1.0'
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wpfullscreen', tinymce.plugins.wpFullscreenPlugin);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js
deleted file mode 100644
index 8fb2a4e87f..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.wpGallery",{init:function(a,b){var c=this;c.url=b;c.editor=a;c._createButtons();a.addCommand("WP_Gallery",function(){if(tinymce.isIE){a.selection.moveToBookmark(a.wpGalleryBookmark)}var e=a.selection.getNode(),d=wp.media.gallery,f;if(typeof wp==="undefined"||!wp.media||!wp.media.gallery){return}if(e.nodeName!="IMG"||a.dom.getAttrib(e,"class").indexOf("wp-gallery")==-1){return}f=d.edit("["+a.dom.getAttrib(e,"title")+"]");f.state("gallery-edit").on("update",function(g){var h=d.shortcode(g).string().slice(1,-1);a.dom.setAttrib(e,"title",h)})});a.onInit.add(function(d){if("ontouchstart" in window){d.dom.events.add(d.getBody(),"touchstart",function(g){var f=g.target;if(f.nodeName=="IMG"&&d.dom.hasClass(f,"wp-gallery")){d.selection.select(f);d.dom.events.cancel(g);d.plugins.wordpress._hideButtons();d.plugins.wordpress._showButtons(f,"wp_gallerybtns")}})}});a.onMouseDown.add(function(d,f){if(f.target.nodeName=="IMG"&&d.dom.hasClass(f.target,"wp-gallery")){d.plugins.wordpress._hideButtons();d.plugins.wordpress._showButtons(f.target,"wp_gallerybtns")}});a.onBeforeSetContent.add(function(d,e){e.content=c._do_gallery(e.content)});a.onPostProcess.add(function(d,e){if(e.get){e.content=c._get_gallery(e.content)}})},_do_gallery:function(a){return a.replace(/\[gallery([^\]]*)\]/g,function(d,c){return'<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wp-gallery mceItem" title="gallery'+tinymce.DOM.encode(c)+'" />'})},_get_gallery:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("wp-gallery")!=-1){return"<p>["+tinymce.trim(a(d,"title"))+"]</p>"}return e})},_createButtons:function(){var b=this,a=tinymce.activeEditor,d=tinymce.DOM,e,c,f;if(d.get("wp_gallerybtns")){return}f=(window.devicePixelRatio&&window.devicePixelRatio>1)||(window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches);d.add(document.body,"div",{id:"wp_gallerybtns",style:"display:none;"});e=d.add("wp_gallerybtns","img",{src:f?b.url+"/img/edit-2x.png":b.url+"/img/edit.png",id:"wp_editgallery",width:"24",height:"24",title:a.getLang("wordpress.editgallery")});tinymce.dom.Event.add(e,"mousedown",function(h){var g=tinymce.activeEditor;g.wpGalleryBookmark=g.selection.getBookmark("simple");g.execCommand("WP_Gallery");g.plugins.wordpress._hideButtons()});c=d.add("wp_gallerybtns","img",{src:f?b.url+"/img/delete-2x.png":b.url+"/img/delete.png",id:"wp_delgallery",width:"24",height:"24",title:a.getLang("wordpress.delgallery")});tinymce.dom.Event.add(c,"mousedown",function(i){var g=tinymce.activeEditor,h=g.selection.getNode();if(h.nodeName=="IMG"&&g.dom.hasClass(h,"wp-gallery")){g.dom.remove(h);g.execCommand("mceRepaint");g.dom.events.cancel(i)}g.plugins.wordpress._hideButtons()})},getInfo:function(){return{longname:"Gallery Settings",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpgallery",tinymce.plugins.wpGallery)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
deleted file mode 100644
index 986304dc62..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
+++ /dev/null
@@ -1,156 +0,0 @@
-
-(function() {
- tinymce.create('tinymce.plugins.wpGallery', {
-
- init : function(ed, url) {
- var t = this;
-
- t.url = url;
- t.editor = ed;
- t._createButtons();
-
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
- ed.addCommand('WP_Gallery', function() {
- if ( tinymce.isIE )
- ed.selection.moveToBookmark( ed.wpGalleryBookmark );
-
- var el = ed.selection.getNode(),
- gallery = wp.media.gallery,
- frame;
-
- // Check if the `wp.media.gallery` API exists.
- if ( typeof wp === 'undefined' || ! wp.media || ! wp.media.gallery )
- return;
-
- // Make sure we've selected a gallery node.
- if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('wp-gallery') == -1 )
- return;
-
- frame = gallery.edit( '[' + ed.dom.getAttrib( el, 'title' ) + ']' );
-
- frame.state('gallery-edit').on( 'update', function( selection ) {
- var shortcode = gallery.shortcode( selection ).string().slice( 1, -1 );
- ed.dom.setAttrib( el, 'title', shortcode );
- });
- });
-
- ed.onInit.add(function(ed) {
- // iOS6 doesn't show the buttons properly on click, show them on 'touchstart'
- if ( 'ontouchstart' in window ) {
- ed.dom.events.add(ed.getBody(), 'touchstart', function(e){
- var target = e.target;
-
- if ( target.nodeName == 'IMG' && ed.dom.hasClass(target, 'wp-gallery') ) {
- ed.selection.select(target);
- ed.dom.events.cancel(e);
- ed.plugins.wordpress._hideButtons();
- ed.plugins.wordpress._showButtons(target, 'wp_gallerybtns');
- }
- });
- }
- });
-
- ed.onMouseDown.add(function(ed, e) {
- if ( e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'wp-gallery') ) {
- ed.plugins.wordpress._hideButtons();
- ed.plugins.wordpress._showButtons(e.target, 'wp_gallerybtns');
- }
- });
-
- ed.onBeforeSetContent.add(function(ed, o) {
- o.content = t._do_gallery(o.content);
- });
-
- ed.onPostProcess.add(function(ed, o) {
- if (o.get)
- o.content = t._get_gallery(o.content);
- });
- },
-
- _do_gallery : function(co) {
- return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){
- return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wp-gallery mceItem" title="gallery'+tinymce.DOM.encode(b)+'" />';
- });
- },
-
- _get_gallery : function(co) {
-
- function getAttr(s, n) {
- n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
- return n ? tinymce.DOM.decode(n[1]) : '';
- };
-
- return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function(a,im) {
- var cls = getAttr(im, 'class');
-
- if ( cls.indexOf('wp-gallery') != -1 )
- return '<p>['+tinymce.trim(getAttr(im, 'title'))+']</p>';
-
- return a;
- });
- },
-
- _createButtons : function() {
- var t = this, ed = tinymce.activeEditor, DOM = tinymce.DOM, editButton, dellButton, isRetina;
-
- if ( DOM.get('wp_gallerybtns') )
- return;
-
- isRetina = ( window.devicePixelRatio && window.devicePixelRatio > 1 ) || // WebKit, Opera
- ( window.matchMedia && window.matchMedia('(min-resolution:130dpi)').matches ); // Firefox, IE10, Opera
-
- DOM.add(document.body, 'div', {
- id : 'wp_gallerybtns',
- style : 'display:none;'
- });
-
- editButton = DOM.add('wp_gallerybtns', 'img', {
- src : isRetina ? t.url+'/img/edit-2x.png' : t.url+'/img/edit.png',
- id : 'wp_editgallery',
- width : '24',
- height : '24',
- title : ed.getLang('wordpress.editgallery')
- });
-
- tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
- var ed = tinymce.activeEditor;
- ed.wpGalleryBookmark = ed.selection.getBookmark('simple');
- ed.execCommand("WP_Gallery");
- ed.plugins.wordpress._hideButtons();
- });
-
- dellButton = DOM.add('wp_gallerybtns', 'img', {
- src : isRetina ? t.url+'/img/delete-2x.png' : t.url+'/img/delete.png',
- id : 'wp_delgallery',
- width : '24',
- height : '24',
- title : ed.getLang('wordpress.delgallery')
- });
-
- tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
- var ed = tinymce.activeEditor, el = ed.selection.getNode();
-
- if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'wp-gallery') ) {
- ed.dom.remove(el);
-
- ed.execCommand('mceRepaint');
- ed.dom.events.cancel(e);
- }
-
- ed.plugins.wordpress._hideButtons();
- });
- },
-
- getInfo : function() {
- return {
- longname : 'Gallery Settings',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : "1.0"
- };
- }
- });
-
- tinymce.PluginManager.add('wpgallery', tinymce.plugins.wpGallery);
-})();
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png b/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png
deleted file mode 100644
index 859d853548..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png b/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png
deleted file mode 100644
index fe537f0a70..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png b/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png
deleted file mode 100644
index b43dc234a7..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png b/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png
deleted file mode 100644
index 793193bf92..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif b/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif
deleted file mode 100644
index 388486517f..0000000000
--- a/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js b/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js
deleted file mode 100644
index 4185316c3c..0000000000
--- a/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.wpLink",{init:function(a,b){var c=true;a.addCommand("WP_Link",function(){if(c){return}a.windowManager.open({id:"wp-link",width:480,height:"auto",wpDialog:true,title:a.getLang("advlink.link_desc")},{plugin_url:b})});a.addButton("link",{title:"advanced.link_desc",cmd:"WP_Link"});a.onNodeChange.add(function(e,d,g,f){c=f&&g.nodeName!="A"})},getInfo:function(){return{longname:"WordPress Link Dialog",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wplink",tinymce.plugins.wpLink)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js
deleted file mode 100644
index f36e86369b..0000000000
--- a/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js
+++ /dev/null
@@ -1,59 +0,0 @@
-(function() {
- tinymce.create('tinymce.plugins.wpLink', {
- /**
- * Initializes the plugin, this will be executed after the plugin has been created.
- * This call is done before the editor instance has finished its initialization so use the onInit event
- * of the editor instance to intercept that event.
- *
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
- * @param {string} url Absolute URL to where the plugin is located.
- */
- init : function(ed, url) {
- var disabled = true;
-
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
- ed.addCommand('WP_Link', function() {
- if ( disabled )
- return;
- ed.windowManager.open({
- id : 'wp-link',
- width : 480,
- height : "auto",
- wpDialog : true,
- title : ed.getLang('advlink.link_desc')
- }, {
- plugin_url : url // Plugin absolute URL
- });
- });
-
- // Register example button
- ed.addButton('link', {
- title : 'advanced.link_desc',
- cmd : 'WP_Link'
- });
-
- ed.onNodeChange.add(function(ed, cm, n, co) {
- disabled = co && n.nodeName != 'A';
- });
- },
- /**
- * Returns information about the plugin as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @return {Object} Name/value array containing information about the plugin.
- */
- getInfo : function() {
- return {
- longname : 'WordPress Link Dialog',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : "1.0"
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink);
-})();
-
diff --git a/wp-includes/js/tinymce/plugins/wpview/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpview/editor_plugin.js
deleted file mode 100644
index 05533d2a8a..0000000000
--- a/wp-includes/js/tinymce/plugins/wpview/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=tinymce.VK,a=tinymce.dom.TreeWalker,b;tinymce.create("tinymce.plugins.wpView",{init:function(f,e){var d=this;if(typeof wp==="undefined"||!wp.mce){return}f.onPreInit.add(function(g){g.schema.addValidElements("div[*],span[*]")});f.onBeforeSetContent.add(function(g,h){if(!h.content){return}h.content=wp.mce.view.toViews(h.content)});f.onSetContent.add(function(g,h){wp.mce.view.render(g.getDoc())});f.onInit.add(function(g){g.selection.onBeforeSetContent.add(function(i,l){var h=d.getParentView(i.getNode()),k,j;if(!h){return}if(!h.nextSibling||d.isView(h.nextSibling)){j=g.getDoc().createTextNode("");g.dom.insertAfter(j,h)}else{k=new a(h.nextSibling,h.nextSibling);j=k.next()}i.select(j);i.collapse(true)});g.selection.onSetContent.add(function(h,j){if(!j.context){return}var i=h.getNode();if(!i.innerHTML){return}i.innerHTML=wp.mce.view.toViews(i.innerHTML);wp.mce.view.render(i)})});f.onPostProcess.add(function(g,h){if((!h.get&&!h.save)||!h.content){return}h.content=wp.mce.view.toText(h.content)});f.onNodeChange.addToTop(function(i,g,j,l,k){var h=d.getParentView(j);if(h){d.select(h);return false}else{d.deselect()}});f.onKeyDown.addToTop(function(i,j){var k=j.keyCode,h,g;if(!b){return}h=d.getParentView(i.selection.getNode());if(h!==b){d.deselect();return}if(k===c.DELETE||k===c.BACKSPACE){if((g=wp.mce.view.instance(b))){g.remove();d.deselect()}}if(j.metaKey||j.ctrlKey||(k>=112&&k<=123)){return}j.preventDefault()})},getParentView:function(d){while(d){if(this.isView(d)){return d}d=d.parentNode}},isView:function(d){return(/(?:^|\s)wp-view-wrap(?:\s|$)/).test(d.className)},select:function(d){if(d===b){return}this.deselect();b=d;wp.mce.view.select(b)},deselect:function(){if(b){wp.mce.view.deselect(b)}b=null},getInfo:function(){return{longname:"WordPress Views",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"1.0"}}});tinymce.PluginManager.add("wpview",tinymce.plugins.wpView)})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
deleted file mode 100644
index f7044c461a..0000000000
--- a/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * WordPress View plugin.
- */
-
-(function() {
- var VK = tinymce.VK,
- TreeWalker = tinymce.dom.TreeWalker,
- selected;
-
- tinymce.create('tinymce.plugins.wpView', {
- init : function( editor, url ) {
- var wpView = this;
-
- // Check if the `wp.mce` API exists.
- if ( typeof wp === 'undefined' || ! wp.mce )
- return;
-
- editor.onPreInit.add( function( editor ) {
- // Add elements so we can set `contenteditable` to false.
- editor.schema.addValidElements('div[*],span[*]');
- });
-
- // When the editor's content changes, scan the new content for
- // matching view patterns, and transform the matches into
- // view wrappers. Since the editor's DOM is outdated at this point,
- // we'll wait to render the views.
- editor.onBeforeSetContent.add( function( editor, o ) {
- if ( ! o.content )
- return;
-
- o.content = wp.mce.view.toViews( o.content );
- });
-
- // When the editor's content has been updated and the DOM has been
- // processed, render the views in the document.
- editor.onSetContent.add( function( editor, o ) {
- wp.mce.view.render( editor.getDoc() );
- });
-
- editor.onInit.add( function( editor ) {
-
- // When a view is selected, ensure content that is being pasted
- // or inserted is added to a text node (instead of the view).
- editor.selection.onBeforeSetContent.add( function( selection, o ) {
- var view = wpView.getParentView( selection.getNode() ),
- walker, target;
-
- // If the selection is not within a view, bail.
- if ( ! view )
- return;
-
- // If there are no additional nodes or the next node is a
- // view, create a text node after the current view.
- if ( ! view.nextSibling || wpView.isView( view.nextSibling ) ) {
- target = editor.getDoc().createTextNode('');
- editor.dom.insertAfter( target, view );
-
- // Otherwise, find the next text node.
- } else {
- walker = new TreeWalker( view.nextSibling, view.nextSibling );
- target = walker.next();
- }
-
- // Select the `target` text node.
- selection.select( target );
- selection.collapse( true );
- });
-
- // When the selection's content changes, scan any new content
- // for matching views and immediately render them.
- //
- // Runs on paste and on inserting nodes/html.
- editor.selection.onSetContent.add( function( selection, o ) {
- if ( ! o.context )
- return;
-
- var node = selection.getNode();
-
- if ( ! node.innerHTML )
- return;
-
- node.innerHTML = wp.mce.view.toViews( node.innerHTML );
- wp.mce.view.render( node );
- });
- });
-
- // When the editor's contents are being accessed as a string,
- // transform any views back to their text representations.
- editor.onPostProcess.add( function( editor, o ) {
- if ( ( ! o.get && ! o.save ) || ! o.content )
- return;
-
- o.content = wp.mce.view.toText( o.content );
- });
-
- // Triggers when the selection is changed.
- // Add the event handler to the top of the stack.
- editor.onNodeChange.addToTop( function( editor, controlManager, node, collapsed, o ) {
- var view = wpView.getParentView( node );
-
- // Update the selected view.
- if ( view ) {
- wpView.select( view );
-
- // Prevent the selection from propagating to other plugins.
- return false;
-
- // If we've clicked off of the selected view, deselect it.
- } else {
- wpView.deselect();
- }
- });
-
- editor.onKeyDown.addToTop( function( editor, event ) {
- var keyCode = event.keyCode,
- view, instance;
-
- // If a view isn't selected, let the event go on its merry way.
- if ( ! selected )
- return;
-
- // If the caret is not within the selected view, deselect the
- // view and bail.
- view = wpView.getParentView( editor.selection.getNode() );
- if ( view !== selected ) {
- wpView.deselect();
- return;
- }
-
- // If delete or backspace is pressed, delete the view.
- if ( keyCode === VK.DELETE || keyCode === VK.BACKSPACE ) {
- if ( (instance = wp.mce.view.instance( selected )) ) {
- instance.remove();
- wpView.deselect();
- }
- }
-
- // Let keypresses that involve the command or control keys through.
- // Also, let any of the F# keys through.
- if ( event.metaKey || event.ctrlKey || ( keyCode >= 112 && keyCode <= 123 ) )
- return;
-
- event.preventDefault();
- });
- },
-
- getParentView : function( node ) {
- while ( node ) {
- if ( this.isView( node ) )
- return node;
-
- node = node.parentNode;
- }
- },
-
- isView : function( node ) {
- return (/(?:^|\s)wp-view-wrap(?:\s|$)/).test( node.className );
- },
-
- select : function( view ) {
- if ( view === selected )
- return;
-
- this.deselect();
- selected = view;
- wp.mce.view.select( selected );
- },
-
- deselect : function() {
- if ( selected )
- wp.mce.view.deselect( selected );
- selected = null;
- },
-
- getInfo : function() {
- return {
- longname : 'WordPress Views',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : 'http://wordpress.org',
- version : '1.0'
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add( 'wpview', tinymce.plugins.wpView );
-})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/themes/advanced/about.htm b/wp-includes/js/tinymce/themes/advanced/about.htm
deleted file mode 100644
index c7ff0a4c4c..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/about.htm
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.about_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/mctabs.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/about.js?ver=358-20121205"></script>
-</head>
-<body id="about" style="display: none">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
- <li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
- <li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="general_panel" class="panel current">
- <h3>{#advanced_dlg.about_title}</h3>
- <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
- <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
- by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
- <p>Copyright &copy; 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
- <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
-
- <div id="buttoncontainer">
- <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
- </div>
- </div>
-
- <div id="plugins_panel" class="panel">
- <div id="pluginscontainer">
- <h3>{#advanced_dlg.about_loaded}</h3>
-
- <div id="plugintablecontainer">
- </div>
-
- <p>&nbsp;</p>
- </div>
- </div>
-
- <div id="help_panel" class="panel noscroll" style="overflow: visible;">
- <div id="iframecontainer"></div>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
- </div>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/anchor.htm b/wp-includes/js/tinymce/themes/advanced/anchor.htm
deleted file mode 100644
index 6571a72d74..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/anchor.htm
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.anchor_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/anchor.js?ver=358-20121205"></script>
-</head>
-<body style="display: none" role="application" aria-labelledby="app_title">
-<form onsubmit="AnchorDialog.update();return false;" action="#">
- <table border="0" cellpadding="4" cellspacing="0" role="presentation">
- <tr>
- <td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
- </tr>
- <tr>
- <td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
- <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
- </tr>
- </table>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#update}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
-</form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/charmap.htm b/wp-includes/js/tinymce/themes/advanced/charmap.htm
deleted file mode 100644
index 41bfaf178b..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/charmap.htm
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.charmap_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/charmap.js?ver=358-20121205"></script>
-</head>
-<body id="charmap" style="display:none" role="application">
-<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
- <tr>
- <td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
- </tr>
- <tr>
- <td id="charmapView" rowspan="2" align="left" valign="top">
- <!-- Chars will be rendered here -->
- </td>
- <td width="100" align="center" valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
- <tr>
- <td id="codeV">&nbsp;</td>
- </tr>
- <tr>
- <td id="codeN">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td valign="bottom" style="padding-bottom: 3px;">
- <table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
- <tr>
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
- </tr>
- <tr>
- <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
- </tr>
- <tr>
- <td style="font-size: 1px;">&nbsp;</td>
- </tr>
- <tr>
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
- </tr>
- <tr>
- <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
- </tr>
-
-</table>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/color_picker.htm b/wp-includes/js/tinymce/themes/advanced/color_picker.htm
deleted file mode 100644
index 208cdbd365..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/color_picker.htm
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.colorpicker_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/mctabs.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/color_picker.js?ver=358-20121205"></script>
-</head>
-<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
- <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
-<form onsubmit="insertAction();return false" action="#">
- <div class="tabs">
- <ul>
- <li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
- <li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
- <li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="picker_panel" class="panel current">
- <fieldset>
- <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
- <div id="picker">
- <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
-
- <div id="light">
- <!-- Will be filled with divs -->
- </div>
-
- <br style="clear: both" />
- </div>
- </fieldset>
- </div>
-
- <div id="rgb_panel" class="panel">
- <fieldset>
- <legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
- <div id="webcolors">
- <!-- Gets filled with web safe colors-->
- </div>
-
- <br style="clear: both" />
- </fieldset>
- </div>
-
- <div id="named_panel" class="panel">
- <fieldset id="named_picker_label">
- <legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
- <div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
- <!-- Gets filled with named colors-->
- </div>
-
- <br style="clear: both" />
-
- <div id="colornamecontainer">
- {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
- </div>
- </fieldset>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#apply}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
- <div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
- </div>
-</form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/editor_template.js b/wp-includes/js/tinymce/themes/advanced/editor_template.js
deleted file mode 100644
index 4b8d563757..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/editor_template.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+z,role:"toolbar"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{},"&#160;")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/themes/advanced/editor_template_src.js b/wp-includes/js/tinymce/themes/advanced/editor_template_src.js
deleted file mode 100644
index 84039ce2ac..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/editor_template_src.js
+++ /dev/null
@@ -1,1490 +0,0 @@
-/**
- * editor_template_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function(tinymce) {
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
-
- // Generates a preview for a format
- function getPreviewCss(ed, fmt) {
- var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
-
- previewStyles = ed.settings.preview_styles;
-
- // No preview forced
- if (previewStyles === false)
- return '';
-
- // Default preview
- if (!previewStyles)
- previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
-
- // Removes any variables since these can't be previewed
- function removeVars(val) {
- return val.replace(/%(\w+)/g, '');
- };
-
- // Create block/inline element to use for preview
- name = fmt.block || fmt.inline || 'span';
- previewElm = dom.create(name);
-
- // Add format styles to preview element
- each(fmt.styles, function(value, name) {
- value = removeVars(value);
-
- if (value)
- dom.setStyle(previewElm, name, value);
- });
-
- // Add attributes to preview element
- each(fmt.attributes, function(value, name) {
- value = removeVars(value);
-
- if (value)
- dom.setAttrib(previewElm, name, value);
- });
-
- // Add classes to preview element
- each(fmt.classes, function(value) {
- value = removeVars(value);
-
- if (!dom.hasClass(previewElm, value))
- dom.addClass(previewElm, value);
- });
-
- // Add the previewElm outside the visual area
- dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
- ed.getBody().appendChild(previewElm);
-
- // Get parent container font size so we can compute px values out of em/% for older IE:s
- parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
- parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
-
- each(previewStyles.split(' '), function(name) {
- var value = dom.getStyle(previewElm, name, true);
-
- // If background is transparent then check if the body has a background color we can use
- if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
- value = dom.getStyle(ed.getBody(), name, true);
-
- // Ignore white since it's the default color, not the nicest fix
- if (dom.toHex(value).toLowerCase() == '#ffffff') {
- return;
- }
- }
-
- // Old IE won't calculate the font size so we need to do that manually
- if (name == 'font-size') {
- if (/em|%$/.test(value)) {
- if (parentFontSize === 0) {
- return;
- }
-
- // Convert font size from em/% to px
- value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
- value = (value * parentFontSize) + 'px';
- }
- }
-
- previewCss += name + ':' + value + ';';
- });
-
- dom.remove(previewElm);
-
- return previewCss;
- };
-
- // Tell it to load theme specific language pack(s)
- tinymce.ThemeManager.requireLangPack('advanced');
-
- tinymce.create('tinymce.themes.AdvancedTheme', {
- sizes : [8, 10, 12, 14, 18, 24, 36],
-
- // Control name lookup, format: title, command
- controls : {
- bold : ['bold_desc', 'Bold'],
- italic : ['italic_desc', 'Italic'],
- underline : ['underline_desc', 'Underline'],
- strikethrough : ['striketrough_desc', 'Strikethrough'],
- justifyleft : ['justifyleft_desc', 'JustifyLeft'],
- justifycenter : ['justifycenter_desc', 'JustifyCenter'],
- justifyright : ['justifyright_desc', 'JustifyRight'],
- justifyfull : ['justifyfull_desc', 'JustifyFull'],
- bullist : ['bullist_desc', 'InsertUnorderedList'],
- numlist : ['numlist_desc', 'InsertOrderedList'],
- outdent : ['outdent_desc', 'Outdent'],
- indent : ['indent_desc', 'Indent'],
- cut : ['cut_desc', 'Cut'],
- copy : ['copy_desc', 'Copy'],
- paste : ['paste_desc', 'Paste'],
- undo : ['undo_desc', 'Undo'],
- redo : ['redo_desc', 'Redo'],
- link : ['link_desc', 'mceLink'],
- unlink : ['unlink_desc', 'unlink'],
- image : ['image_desc', 'mceImage'],
- cleanup : ['cleanup_desc', 'mceCleanup'],
- help : ['help_desc', 'mceHelp'],
- code : ['code_desc', 'mceCodeEditor'],
- hr : ['hr_desc', 'InsertHorizontalRule'],
- removeformat : ['removeformat_desc', 'RemoveFormat'],
- sub : ['sub_desc', 'subscript'],
- sup : ['sup_desc', 'superscript'],
- forecolor : ['forecolor_desc', 'ForeColor'],
- forecolorpicker : ['forecolor_desc', 'mceForeColor'],
- backcolor : ['backcolor_desc', 'HiliteColor'],
- backcolorpicker : ['backcolor_desc', 'mceBackColor'],
- charmap : ['charmap_desc', 'mceCharMap'],
- visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
- anchor : ['anchor_desc', 'mceInsertAnchor'],
- newdocument : ['newdocument_desc', 'mceNewDocument'],
- blockquote : ['blockquote_desc', 'mceBlockQuote']
- },
-
- stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
-
- init : function(ed, url) {
- var t = this, s, v, o;
-
- t.editor = ed;
- t.url = url;
- t.onResolveName = new tinymce.util.Dispatcher(this);
- s = ed.settings;
-
- ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
- ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
-
- // Setup default buttons
- if (!s.theme_advanced_buttons1) {
- s = extend({
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
- theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
- theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
- }, s);
- }
-
- // Default settings
- t.settings = s = extend({
- theme_advanced_path : true,
- theme_advanced_toolbar_location : 'top',
- theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
- theme_advanced_toolbar_align : "left",
- theme_advanced_statusbar_location : "bottom",
- theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
- theme_advanced_more_colors : 1,
- theme_advanced_row_height : 23,
- theme_advanced_resize_horizontal : 1,
- theme_advanced_resizing_use_cookie : 1,
- theme_advanced_font_sizes : "1,2,3,4,5,6,7",
- theme_advanced_font_selector : "span",
- theme_advanced_show_current_color: 0,
- readonly : ed.settings.readonly
- }, s);
-
- // Setup default font_size_style_values
- if (!s.font_size_style_values)
- s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
-
- if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
- s.font_size_style_values = tinymce.explode(s.font_size_style_values);
- s.font_size_classes = tinymce.explode(s.font_size_classes || '');
-
- // Parse string value
- o = {};
- ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
- each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
- var cl;
-
- if (k == v && v >= 1 && v <= 7) {
- k = v + ' (' + t.sizes[v - 1] + 'pt)';
- cl = s.font_size_classes[v - 1];
- v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
- }
-
- if (/^\s*\./.test(v))
- cl = v.replace(/\./g, '');
-
- o[k] = cl ? {'class' : cl} : {fontSize : v};
- });
-
- s.theme_advanced_font_sizes = o;
- }
-
- if ((v = s.theme_advanced_path_location) && v != 'none')
- s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
-
- if (s.theme_advanced_statusbar_location == 'none')
- s.theme_advanced_statusbar_location = 0;
-
- if (ed.settings.content_css !== false)
- ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
-
- // Init editor
- ed.onInit.add(function() {
- if (!ed.settings.readonly) {
- ed.onNodeChange.add(t._nodeChanged, t);
- ed.onKeyUp.add(t._updateUndoStatus, t);
- ed.onMouseUp.add(t._updateUndoStatus, t);
- ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
- t._updateUndoStatus(ed);
- });
- }
- });
-
- ed.onSetProgressState.add(function(ed, b, ti) {
- var co, id = ed.id, tb;
-
- if (b) {
- t.progressTimer = setTimeout(function() {
- co = ed.getContainer();
- co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
- tb = DOM.get(ed.id + '_tbl');
-
- DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
- DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
- }, ti || 0);
- } else {
- DOM.remove(id + '_blocker');
- DOM.remove(id + '_progress');
- clearTimeout(t.progressTimer);
- }
- });
-
- DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
-
- if (s.skin_variant)
- DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
- },
-
- _isHighContrast : function() {
- var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
-
- actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
- DOM.remove(div);
-
- return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
- },
-
- createControl : function(n, cf) {
- var cd, c;
-
- if (c = cf.createControl(n))
- return c;
-
- switch (n) {
- case "styleselect":
- return this._createStyleSelect();
-
- case "formatselect":
- return this._createBlockFormats();
-
- case "fontselect":
- return this._createFontSelect();
-
- case "fontsizeselect":
- return this._createFontSizeSelect();
-
- case "forecolor":
- return this._createForeColorMenu();
-
- case "backcolor":
- return this._createBackColorMenu();
- }
-
- if ((cd = this.controls[n]))
- return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
- },
-
- execCommand : function(cmd, ui, val) {
- var f = this['_' + cmd];
-
- if (f) {
- f.call(this, ui, val);
- return true;
- }
-
- return false;
- },
-
- _importClasses : function(e) {
- var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
-
- if (ctrl.getLength() == 0) {
- each(ed.dom.getClasses(), function(o, idx) {
- var name = 'style_' + idx, fmt;
-
- fmt = {
- inline : 'span',
- attributes : {'class' : o['class']},
- selector : '*'
- };
-
- ed.formatter.register(name, fmt);
-
- ctrl.add(o['class'], name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- });
- }
- },
-
- _createStyleSelect : function(n) {
- var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
-
- // Setup style select box
- ctrl = ctrlMan.createListBox('styleselect', {
- title : 'advanced.style_select',
- onselect : function(name) {
- var matches, formatNames = [], removedFormat;
-
- each(ctrl.items, function(item) {
- formatNames.push(item.value);
- });
-
- ed.focus();
- ed.undoManager.add();
-
- // Toggle off the current format(s)
- matches = ed.formatter.matchAll(formatNames);
- tinymce.each(matches, function(match) {
- if (!name || match == name) {
- if (match)
- ed.formatter.remove(match);
-
- removedFormat = true;
- }
- });
-
- if (!removedFormat)
- ed.formatter.apply(name);
-
- ed.undoManager.add();
- ed.nodeChanged();
-
- return false; // No auto select
- }
- });
-
- // Handle specified format
- ed.onPreInit.add(function() {
- var counter = 0, formats = ed.getParam('style_formats');
-
- if (formats) {
- each(formats, function(fmt) {
- var name, keys = 0;
-
- each(fmt, function() {keys++;});
-
- if (keys > 1) {
- name = fmt.name = fmt.name || 'style_' + (counter++);
- ed.formatter.register(name, fmt);
- ctrl.add(fmt.title, name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- } else
- ctrl.add(fmt.title);
- });
- } else {
- each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
- var name, fmt;
-
- if (val) {
- name = 'style_' + (counter++);
- fmt = {
- inline : 'span',
- classes : val,
- selector : '*'
- };
-
- ed.formatter.register(name, fmt);
- ctrl.add(t.editor.translate(key), name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- }
- });
- }
- });
-
- // Auto import classes if the ctrl box is empty
- if (ctrl.getLength() == 0) {
- ctrl.onPostRender.add(function(ed, n) {
- if (!ctrl.NativeListBox) {
- Event.add(n.id + '_text', 'focus', t._importClasses, t);
- Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
- Event.add(n.id + '_open', 'focus', t._importClasses, t);
- Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
- } else
- Event.add(n.id, 'focus', t._importClasses, t);
- });
- }
-
- return ctrl;
- },
-
- _createFontSelect : function() {
- var c, t = this, ed = t.editor;
-
- c = ed.controlManager.createListBox('fontselect', {
- title : 'advanced.fontdefault',
- onselect : function(v) {
- var cur = c.items[c.selectedIndex];
-
- if (!v && cur) {
- ed.execCommand('FontName', false, cur.value);
- return;
- }
-
- ed.execCommand('FontName', false, v);
-
- // Fake selection, execCommand will fire a nodeChange and update the selection
- c.select(function(sv) {
- return v == sv;
- });
-
- if (cur && cur.value == v) {
- c.select(null);
- }
-
- return false; // No auto select
- }
- });
-
- if (c) {
- each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
- c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
- });
- }
-
- return c;
- },
-
- _createFontSizeSelect : function() {
- var t = this, ed = t.editor, c, i = 0, cl = [];
-
- c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
- var cur = c.items[c.selectedIndex];
-
- if (!v && cur) {
- cur = cur.value;
-
- if (cur['class']) {
- ed.formatter.toggle('fontsize_class', {value : cur['class']});
- ed.undoManager.add();
- ed.nodeChanged();
- } else {
- ed.execCommand('FontSize', false, cur.fontSize);
- }
-
- return;
- }
-
- if (v['class']) {
- ed.focus();
- ed.undoManager.add();
- ed.formatter.toggle('fontsize_class', {value : v['class']});
- ed.undoManager.add();
- ed.nodeChanged();
- } else
- ed.execCommand('FontSize', false, v.fontSize);
-
- // Fake selection, execCommand will fire a nodeChange and update the selection
- c.select(function(sv) {
- return v == sv;
- });
-
- if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
- c.select(null);
- }
-
- return false; // No auto select
- }});
-
- if (c) {
- each(t.settings.theme_advanced_font_sizes, function(v, k) {
- var fz = v.fontSize;
-
- if (fz >= 1 && fz <= 7)
- fz = t.sizes[parseInt(fz) - 1] + 'pt';
-
- c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
- });
- }
-
- return c;
- },
-
- _createBlockFormats : function() {
- var c, fmts = {
- p : 'advanced.paragraph',
- address : 'advanced.address',
- pre : 'advanced.pre',
- h1 : 'advanced.h1',
- h2 : 'advanced.h2',
- h3 : 'advanced.h3',
- h4 : 'advanced.h4',
- h5 : 'advanced.h5',
- h6 : 'advanced.h6',
- div : 'advanced.div',
- blockquote : 'advanced.blockquote',
- code : 'advanced.code',
- dt : 'advanced.dt',
- dd : 'advanced.dd',
- samp : 'advanced.samp'
- }, t = this;
-
- c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
- t.editor.execCommand('FormatBlock', false, v);
- return false;
- }});
-
- if (c) {
- each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
- c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
- return getPreviewCss(t.editor, {block: v});
- }});
- });
- }
-
- return c;
- },
-
- _createForeColorMenu : function() {
- var c, t = this, s = t.settings, o = {}, v;
-
- if (s.theme_advanced_more_colors) {
- o.more_colors_func = function() {
- t._mceColorPicker(0, {
- color : c.value,
- func : function(co) {
- c.setColor(co);
- }
- });
- };
- }
-
- if (v = s.theme_advanced_text_colors)
- o.colors = v;
-
- if (s.theme_advanced_default_foreground_color)
- o.default_color = s.theme_advanced_default_foreground_color;
-
- o.title = 'advanced.forecolor_desc';
- o.cmd = 'ForeColor';
- o.scope = this;
-
- c = t.editor.controlManager.createColorSplitButton('forecolor', o);
-
- return c;
- },
-
- _createBackColorMenu : function() {
- var c, t = this, s = t.settings, o = {}, v;
-
- if (s.theme_advanced_more_colors) {
- o.more_colors_func = function() {
- t._mceColorPicker(0, {
- color : c.value,
- func : function(co) {
- c.setColor(co);
- }
- });
- };
- }
-
- if (v = s.theme_advanced_background_colors)
- o.colors = v;
-
- if (s.theme_advanced_default_background_color)
- o.default_color = s.theme_advanced_default_background_color;
-
- o.title = 'advanced.backcolor_desc';
- o.cmd = 'HiliteColor';
- o.scope = this;
-
- c = t.editor.controlManager.createColorSplitButton('backcolor', o);
-
- return c;
- },
-
- renderUI : function(o) {
- var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
-
- if (ed.settings) {
- ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
- }
-
- // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
- // Maybe actually inherit it from the original textara?
- n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
- DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
-
- if (!DOM.boxModel)
- n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
-
- n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
- n = tb = DOM.add(n, 'tbody');
-
- switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
- case "rowlayout":
- ic = t._rowLayout(s, tb, o);
- break;
-
- case "customlayout":
- ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
- break;
-
- default:
- ic = t._simpleLayout(s, tb, o, p);
- }
-
- n = o.targetNode;
-
- // Add classes to first and last TRs
- nl = sc.rows;
- DOM.addClass(nl[0], 'mceFirst');
- DOM.addClass(nl[nl.length - 1], 'mceLast');
-
- // Add classes to first and last TDs
- each(DOM.select('tr', tb), function(n) {
- DOM.addClass(n.firstChild, 'mceFirst');
- DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
- });
-
- if (DOM.get(s.theme_advanced_toolbar_container))
- DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
- else
- DOM.insertAfter(p, n);
-
- Event.add(ed.id + '_path_row', 'click', function(e) {
- e = e.target;
-
- if (e.nodeName == 'A') {
- t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
- return false;
- }
- });
-/*
- if (DOM.get(ed.id + '_path_row')) {
- Event.add(ed.id + '_tbl', 'mouseover', function(e) {
- var re;
-
- e = e.target;
-
- if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
- re = DOM.get(ed.id + '_path_row');
- t.lastPath = re.innerHTML;
- DOM.setHTML(re, e.parentNode.title);
- }
- });
-
- Event.add(ed.id + '_tbl', 'mouseout', function(e) {
- if (t.lastPath) {
- DOM.setHTML(ed.id + '_path_row', t.lastPath);
- t.lastPath = 0;
- }
- });
- }
-*/
-
- if (!ed.getParam('accessibility_focus'))
- Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
-
- if (s.theme_advanced_toolbar_location == 'external')
- o.deltaHeight = 0;
-
- t.deltaHeight = o.deltaHeight;
- o.targetNode = null;
-
- ed.onKeyDown.add(function(ed, evt) {
- var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
-
- if (evt.altKey) {
- if (evt.keyCode === DOM_VK_F10) {
- // Make sure focus is given to toolbar in Safari.
- // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
- if (tinymce.isWebKit) {
- window.focus();
- }
- t.toolbarGroup.focus();
- return Event.cancel(evt);
- } else if (evt.keyCode === DOM_VK_F11) {
- DOM.get(ed.id + '_path_row').focus();
- return Event.cancel(evt);
- }
- }
- });
-
- // alt+0 is the UK recommended shortcut for accessing the list of access controls.
- ed.addShortcut('alt+0', '', 'mceShortcuts', t);
-
- return {
- iframeContainer : ic,
- editorContainer : ed.id + '_parent',
- sizeContainer : sc,
- deltaHeight : o.deltaHeight
- };
- },
-
- getInfo : function() {
- return {
- longname : 'Advanced theme',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- }
- },
-
- resizeBy : function(dw, dh) {
- var e = DOM.get(this.editor.id + '_ifr');
-
- this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
- },
-
- resizeTo : function(w, h, store) {
- var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
-
- // Boundery fix box
- w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
- h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
- w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
- h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
-
- // Resize iframe and container
- DOM.setStyle(e, 'height', '');
- DOM.setStyle(ifr, 'height', h);
-
- if (s.theme_advanced_resize_horizontal) {
- DOM.setStyle(e, 'width', '');
- DOM.setStyle(ifr, 'width', w);
-
- // Make sure that the size is never smaller than the over all ui
- if (w < e.clientWidth) {
- w = e.clientWidth;
- DOM.setStyle(ifr, 'width', e.clientWidth);
- }
- }
-
- // Store away the size
- if (store && s.theme_advanced_resizing_use_cookie) {
- Cookie.setHash("TinyMCE_" + ed.id + "_size", {
- cw : w,
- ch : h
- });
- }
- },
-
- destroy : function() {
- var id = this.editor.id;
-
- Event.clear(id + '_resize');
- Event.clear(id + '_path_row');
- Event.clear(id + '_external_close');
- },
-
- // Internal functions
-
- _simpleLayout : function(s, tb, o, p) {
- var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
-
- if (s.readonly) {
- n = DOM.add(tb, 'tr');
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
- return ic;
- }
-
- // Create toolbar container at top
- if (lo == 'top')
- t._addToolbars(tb, o);
-
- // Create external toolbar
- if (lo == 'external') {
- n = c = DOM.create('div', {style : 'position:relative'});
- n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
- DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
- n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
- etb = DOM.add(n, 'tbody');
-
- if (p.firstChild.className == 'mceOldBoxModel')
- p.firstChild.appendChild(c);
- else
- p.insertBefore(c, p.firstChild);
-
- t._addToolbars(etb, o);
-
- ed.onMouseUp.add(function() {
- var e = DOM.get(ed.id + '_external');
- DOM.show(e);
-
- DOM.hide(lastExtID);
-
- var f = Event.add(ed.id + '_external_close', 'click', function() {
- DOM.hide(ed.id + '_external');
- Event.remove(ed.id + '_external_close', 'click', f);
- return false;
- });
-
- DOM.show(e);
- DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
-
- // Fixes IE rendering bug
- DOM.hide(e);
- DOM.show(e);
- e.style.filter = '';
-
- lastExtID = ed.id + '_external';
-
- e = null;
- });
- }
-
- if (sl == 'top')
- t._addStatusBar(tb, o);
-
- // Create iframe container
- if (!s.theme_advanced_toolbar_container) {
- n = DOM.add(tb, 'tr');
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
- }
-
- // Create toolbar container at bottom
- if (lo == 'bottom')
- t._addToolbars(tb, o);
-
- if (sl == 'bottom')
- t._addStatusBar(tb, o);
-
- return ic;
- },
-
- _rowLayout : function(s, tb, o) {
- var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
-
- dc = s.theme_advanced_containers_default_class || '';
- da = s.theme_advanced_containers_default_align || 'center';
-
- each(explode(s.theme_advanced_containers || ''), function(c, i) {
- var v = s['theme_advanced_container_' + c] || '';
-
- switch (c.toLowerCase()) {
- case 'mceeditor':
- n = DOM.add(tb, 'tr');
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
- break;
-
- case 'mceelementpath':
- t._addStatusBar(tb, o);
- break;
-
- default:
- a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
- a = 'mce' + t._ufirst(a);
-
- n = DOM.add(DOM.add(tb, 'tr'), 'td', {
- 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
- });
-
- to = cf.createToolbar("toolbar" + i);
- t._addControls(v, to);
- DOM.setHTML(n, to.renderHTML());
- o.deltaHeight -= s.theme_advanced_row_height;
- }
- });
-
- return ic;
- },
-
- _addControls : function(v, tb) {
- var t = this, s = t.settings, di, cf = t.editor.controlManager;
-
- if (s.theme_advanced_disable && !t._disabled) {
- di = {};
-
- each(explode(s.theme_advanced_disable), function(v) {
- di[v] = 1;
- });
-
- t._disabled = di;
- } else
- di = t._disabled;
-
- each(explode(v), function(n) {
- var c;
-
- if (di && di[n])
- return;
-
- // Compatiblity with 2.x
- if (n == 'tablecontrols') {
- each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
- n = t.createControl(n, cf);
-
- if (n)
- tb.add(n);
- });
-
- return;
- }
-
- c = t.createControl(n, cf);
-
- if (c)
- tb.add(c);
- });
- },
-
- _addToolbars : function(c, o) {
- var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
-
- toolbarGroup = cf.createToolbarGroup('toolbargroup', {
- 'name': ed.getLang('advanced.toolbar'),
- 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
- });
-
- t.toolbarGroup = toolbarGroup;
-
- a = s.theme_advanced_toolbar_align.toLowerCase();
- a = 'mce' + t._ufirst(a);
-
- n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});
-
- // Create toolbar and add the controls
- for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
- toolbarsExist = true;
- tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
-
- if (s['theme_advanced_buttons' + i + '_add'])
- v += ',' + s['theme_advanced_buttons' + i + '_add'];
-
- if (s['theme_advanced_buttons' + i + '_add_before'])
- v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
-
- t._addControls(v, tb);
- toolbarGroup.add(tb);
-
- o.deltaHeight -= s.theme_advanced_row_height;
- }
- // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
- if (!toolbarsExist)
- o.deltaHeight -= s.theme_advanced_row_height;
- h.push(toolbarGroup.renderHTML());
- h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
- DOM.setHTML(n, h.join(''));
- },
-
- _addStatusBar : function(tb, o) {
- var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
-
- n = DOM.add(tb, 'tr');
- n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
- n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
- if (s.theme_advanced_path) {
- DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
- DOM.add(n, 'span', {}, ': ');
- } else {
- DOM.add(n, 'span', {}, '&#160;');
- }
-
-
- if (s.theme_advanced_resizing) {
- DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
-
- if (s.theme_advanced_resizing_use_cookie) {
- ed.onPostRender.add(function() {
- var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
-
- if (!o)
- return;
-
- t.resizeTo(o.cw, o.ch);
- });
- }
-
- ed.onPostRender.add(function() {
- Event.add(ed.id + '_resize', 'click', function(e) {
- e.preventDefault();
- });
-
- Event.add(ed.id + '_resize', 'mousedown', function(e) {
- var mouseMoveHandler1, mouseMoveHandler2,
- mouseUpHandler1, mouseUpHandler2,
- startX, startY, startWidth, startHeight, width, height, ifrElm;
-
- function resizeOnMove(e) {
- e.preventDefault();
-
- width = startWidth + (e.screenX - startX);
- height = startHeight + (e.screenY - startY);
-
- t.resizeTo(width, height);
- };
-
- function endResize(e) {
- // Stop listening
- Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
- Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
- Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
- Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
-
- width = startWidth + (e.screenX - startX);
- height = startHeight + (e.screenY - startY);
- t.resizeTo(width, height, true);
-
- ed.nodeChanged();
- };
-
- e.preventDefault();
-
- // Get the current rect size
- startX = e.screenX;
- startY = e.screenY;
- ifrElm = DOM.get(t.editor.id + '_ifr');
- startWidth = width = ifrElm.clientWidth;
- startHeight = height = ifrElm.clientHeight;
-
- // Register envent handlers
- mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
- mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
- mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
- mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
- });
- });
- }
-
- o.deltaHeight -= 21;
- n = tb = null;
- },
-
- _updateUndoStatus : function(ed) {
- var cm = ed.controlManager, um = ed.undoManager;
-
- cm.setDisabled('undo', !um.hasUndo() && !um.typing);
- cm.setDisabled('redo', !um.hasRedo());
- },
-
- _nodeChanged : function(ed, cm, n, co, ob) {
- var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
-
- tinymce.each(t.stateControls, function(c) {
- cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
- });
-
- function getParent(name) {
- var i, parents = ob.parents, func = name;
-
- if (typeof(name) == 'string') {
- func = function(node) {
- return node.nodeName == name;
- };
- }
-
- for (i = 0; i < parents.length; i++) {
- if (func(parents[i]))
- return parents[i];
- }
- };
-
- cm.setActive('visualaid', ed.hasVisual);
- t._updateUndoStatus(ed);
- cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
-
- p = getParent('A');
- if (c = cm.get('link')) {
- c.setDisabled((!p && co) || (p && !p.href));
- c.setActive(!!p && (!p.name && !p.id));
- }
-
- if (c = cm.get('unlink')) {
- c.setDisabled(!p && co);
- c.setActive(!!p && !p.name && !p.id);
- }
-
- if (c = cm.get('anchor')) {
- c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
- }
-
- p = getParent('IMG');
- if (c = cm.get('image'))
- c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
-
- if (c = cm.get('styleselect')) {
- t._importClasses();
-
- formatNames = [];
- each(c.items, function(item) {
- formatNames.push(item.value);
- });
-
- matches = ed.formatter.matchAll(formatNames);
- c.select(matches[0]);
- tinymce.each(matches, function(match, index) {
- if (index > 0) {
- c.mark(match);
- }
- });
- }
-
- if (c = cm.get('formatselect')) {
- p = getParent(ed.dom.isBlock);
-
- if (p)
- c.select(p.nodeName.toLowerCase());
- }
-
- // Find out current fontSize, fontFamily and fontClass
- getParent(function(n) {
- if (n.nodeName === 'SPAN') {
- if (!cl && n.className)
- cl = n.className;
- }
-
- if (ed.dom.is(n, s.theme_advanced_font_selector)) {
- if (!fz && n.style.fontSize)
- fz = n.style.fontSize;
-
- if (!fn && n.style.fontFamily)
- fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
-
- if (!fc && n.style.color)
- fc = n.style.color;
-
- if (!bc && n.style.backgroundColor)
- bc = n.style.backgroundColor;
- }
-
- return false;
- });
-
- if (c = cm.get('fontselect')) {
- c.select(function(v) {
- return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
- });
- }
-
- // Select font size
- if (c = cm.get('fontsizeselect')) {
- // Use computed style
- if (s.theme_advanced_runtime_fontsize && !fz && !cl)
- fz = ed.dom.getStyle(n, 'fontSize', true);
-
- c.select(function(v) {
- if (v.fontSize && v.fontSize === fz)
- return true;
-
- if (v['class'] && v['class'] === cl)
- return true;
- });
- }
-
- if (s.theme_advanced_show_current_color) {
- function updateColor(controlId, color) {
- if (c = cm.get(controlId)) {
- if (!color)
- color = c.settings.default_color;
- if (color !== c.value) {
- c.displayColor(color);
- }
- }
- }
- updateColor('forecolor', fc);
- updateColor('backcolor', bc);
- }
-
- if (s.theme_advanced_show_current_color) {
- function updateColor(controlId, color) {
- if (c = cm.get(controlId)) {
- if (!color)
- color = c.settings.default_color;
- if (color !== c.value) {
- c.displayColor(color);
- }
- }
- };
-
- updateColor('forecolor', fc);
- updateColor('backcolor', bc);
- }
-
- if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
- p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
-
- if (t.statusKeyboardNavigation) {
- t.statusKeyboardNavigation.destroy();
- t.statusKeyboardNavigation = null;
- }
-
- DOM.setHTML(p, '');
-
- getParent(function(n) {
- var na = n.nodeName.toLowerCase(), u, pi, ti = '';
-
- // Ignore non element and bogus/hidden elements
- if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
- return;
-
- // Handle prefix
- if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
- na = n.scopeName + ':' + na;
-
- // Remove internal prefix
- na = na.replace(/mce\:/g, '');
-
- // Handle node name
- switch (na) {
- case 'b':
- na = 'strong';
- break;
-
- case 'i':
- na = 'em';
- break;
-
- case 'img':
- if (v = DOM.getAttrib(n, 'src'))
- ti += 'src: ' + v + ' ';
-
- break;
-
- case 'a':
- if (v = DOM.getAttrib(n, 'name')) {
- ti += 'name: ' + v + ' ';
- na += '#' + v;
- }
-
- if (v = DOM.getAttrib(n, 'href'))
- ti += 'href: ' + v + ' ';
-
- break;
-
- case 'font':
- if (v = DOM.getAttrib(n, 'face'))
- ti += 'font: ' + v + ' ';
-
- if (v = DOM.getAttrib(n, 'size'))
- ti += 'size: ' + v + ' ';
-
- if (v = DOM.getAttrib(n, 'color'))
- ti += 'color: ' + v + ' ';
-
- break;
-
- case 'span':
- if (v = DOM.getAttrib(n, 'style'))
- ti += 'style: ' + v + ' ';
-
- break;
- }
-
- if (v = DOM.getAttrib(n, 'id'))
- ti += 'id: ' + v + ' ';
-
- if (v = n.className) {
- v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '');
-
- if (v) {
- ti += 'class: ' + v + ' ';
-
- if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
- na += '.' + v;
- }
- }
-
- na = na.replace(/(html:)/g, '');
- na = {name : na, node : n, title : ti};
- t.onResolveName.dispatch(t, na);
- ti = na.title;
- na = na.name;
-
- //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
- pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
-
- if (p.hasChildNodes()) {
- p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
- p.insertBefore(pi, p.firstChild);
- } else
- p.appendChild(pi);
- }, ed.getBody());
-
- if (DOM.select('a', p).length > 0) {
- t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
- root: ed.id + "_path_row",
- items: DOM.select('a', p),
- excludeFromTabOrder: true,
- onCancel: function() {
- ed.focus();
- }
- }, DOM);
- }
- }
- },
-
- // Commands gets called by execCommand
-
- _sel : function(v) {
- this.editor.execCommand('mceSelectNodeDepth', false, v);
- },
-
- _mceInsertAnchor : function(ui, v) {
- var ed = this.editor;
-
- ed.windowManager.open({
- url : this.url + '/anchor.htm',
- width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
- height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
- inline : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceCharMap : function() {
- var ed = this.editor;
-
- ed.windowManager.open({
- url : this.url + '/charmap.htm',
- width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
- height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
- inline : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceHelp : function() {
- var ed = this.editor;
-
- ed.windowManager.open({
- url : this.url + '/about.htm',
- width : 480,
- height : 380,
- inline : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceShortcuts : function() {
- var ed = this.editor;
- ed.windowManager.open({
- url: this.url + '/shortcuts.htm',
- width: 480,
- height: 380,
- inline: true
- }, {
- theme_url: this.url
- });
- },
-
- _mceColorPicker : function(u, v) {
- var ed = this.editor;
-
- v = v || {};
-
- ed.windowManager.open({
- url : this.url + '/color_picker.htm',
- width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
- height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
- close_previous : false,
- inline : true
- }, {
- input_color : v.color,
- func : v.func,
- theme_url : this.url
- });
- },
-
- _mceCodeEditor : function(ui, val) {
- var ed = this.editor;
-
- ed.windowManager.open({
- url : this.url + '/source_editor.htm',
- width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
- height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
- inline : true,
- resizable : true,
- maximizable : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceImage : function(ui, val) {
- var ed = this.editor;
-
- // Internal image object like a flash placeholder
- if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
- return;
-
- ed.windowManager.open({
- url : this.url + '/image.htm',
- width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
- height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
- inline : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceLink : function(ui, val) {
- var ed = this.editor;
-
- ed.windowManager.open({
- url : this.url + '/link.htm',
- width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
- height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
- inline : true
- }, {
- theme_url : this.url
- });
- },
-
- _mceNewDocument : function() {
- var ed = this.editor;
-
- ed.windowManager.confirm('advanced.newdocument', function(s) {
- if (s)
- ed.execCommand('mceSetContent', false, '');
- });
- },
-
- _mceForeColor : function() {
- var t = this;
-
- this._mceColorPicker(0, {
- color: t.fgColor,
- func : function(co) {
- t.fgColor = co;
- t.editor.execCommand('ForeColor', false, co);
- }
- });
- },
-
- _mceBackColor : function() {
- var t = this;
-
- this._mceColorPicker(0, {
- color: t.bgColor,
- func : function(co) {
- t.bgColor = co;
- t.editor.execCommand('HiliteColor', false, co);
- }
- });
- },
-
- _ufirst : function(s) {
- return s.substring(0, 1).toUpperCase() + s.substring(1);
- }
- });
-
- tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
-}(tinymce));
diff --git a/wp-includes/js/tinymce/themes/advanced/image.htm b/wp-includes/js/tinymce/themes/advanced/image.htm
deleted file mode 100644
index 1a3d72e258..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/image.htm
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.image_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/mctabs.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/form_utils.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/image.js?ver=358-20121205"></script>
-</head>
-<body id="image" style="display: none">
-<form onsubmit="ImageDialog.update();return false;" action="#">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="general_panel" class="panel current">
- <table border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
- <td><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
- <td id="srcbrowsercontainer">&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><label for="image_list">{#advanced_dlg.image_list}</label></td>
- <td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
- <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
- <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
- <option value="">{#not_set}</option>
- <option value="baseline">{#advanced_dlg.image_align_baseline}</option>
- <option value="top">{#advanced_dlg.image_align_top}</option>
- <option value="middle">{#advanced_dlg.image_align_middle}</option>
- <option value="bottom">{#advanced_dlg.image_align_bottom}</option>
- <option value="text-top">{#advanced_dlg.image_align_texttop}</option>
- <option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
- <option value="left">{#advanced_dlg.image_align_left}</option>
- <option value="right">{#advanced_dlg.image_align_right}</option>
- </select></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
- <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
- x
- <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
- <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
- <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
- <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
- </tr>
- </table>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#insert}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
-</form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg b/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg
deleted file mode 100644
index b1a377aba7..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/flash.gif b/wp-includes/js/tinymce/themes/advanced/img/flash.gif
deleted file mode 100644
index dec3f7c702..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/flash.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png b/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png
deleted file mode 100644
index 1af3e3e6c5..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/icons.gif b/wp-includes/js/tinymce/themes/advanced/img/icons.gif
deleted file mode 100644
index ca22249018..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/icons.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/iframe.gif b/wp-includes/js/tinymce/themes/advanced/img/iframe.gif
deleted file mode 100644
index 410c7ad084..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/iframe.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif b/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif
deleted file mode 100644
index acdf4085f3..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif b/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif
deleted file mode 100644
index 8f10e7aa6b..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif b/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif
deleted file mode 100644
index fdfe0b9ac0..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif b/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif
deleted file mode 100644
index 9314d04470..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/trans.gif b/wp-includes/js/tinymce/themes/advanced/img/trans.gif
deleted file mode 100644
index 388486517f..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/trans.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/video.gif b/wp-includes/js/tinymce/themes/advanced/img/video.gif
deleted file mode 100644
index 3570104077..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/video.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif b/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif
deleted file mode 100644
index ab50f2d887..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/js/about.js b/wp-includes/js/tinymce/themes/advanced/js/about.js
deleted file mode 100644
index daf4909ad2..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/about.js
+++ /dev/null
@@ -1,73 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-function init() {
- var ed, tcont;
-
- tinyMCEPopup.resizeToInnerSize();
- ed = tinyMCEPopup.editor;
-
- // Give FF some time
- window.setTimeout(insertHelpIFrame, 10);
-
- tcont = document.getElementById('plugintablecontainer');
- document.getElementById('plugins_tab').style.display = 'none';
-
- var html = "";
- html += '<table id="plugintable">';
- html += '<thead>';
- html += '<tr>';
- html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
- html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
- html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
- html += '</tr>';
- html += '</thead>';
- html += '<tbody>';
-
- tinymce.each(ed.plugins, function(p, n) {
- var info;
-
- if (!p.getInfo)
- return;
-
- html += '<tr>';
-
- info = p.getInfo();
-
- if (info.infourl != null && info.infourl != '')
- html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
- else
- html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
-
- if (info.authorurl != null && info.authorurl != '')
- html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
- else
- html += '<td width="35%">' + info.author + '</td>';
-
- html += '<td width="15%">' + info.version + '</td>';
- html += '</tr>';
-
- document.getElementById('plugins_tab').style.display = '';
-
- });
-
- html += '</tbody>';
- html += '</table>';
-
- tcont.innerHTML = html;
-
- tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
- tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
-}
-
-function insertHelpIFrame() {
- var html;
-
- if (tinyMCEPopup.getParam('docs_url')) {
- html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
- document.getElementById('iframecontainer').innerHTML = html;
- document.getElementById('help_tab').style.display = 'block';
- document.getElementById('help_tab').setAttribute("aria-hidden", "false");
- }
-}
-
-tinyMCEPopup.onInit.add(init);
diff --git a/wp-includes/js/tinymce/themes/advanced/js/anchor.js b/wp-includes/js/tinymce/themes/advanced/js/anchor.js
deleted file mode 100644
index a3a018635b..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/anchor.js
+++ /dev/null
@@ -1,56 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var AnchorDialog = {
- init : function(ed) {
- var action, elm, f = document.forms[0];
-
- this.editor = ed;
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
- v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
-
- if (v) {
- this.action = 'update';
- f.anchorName.value = v;
- }
-
- f.insert.value = ed.getLang(elm ? 'update' : 'insert');
- },
-
- update : function() {
- var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
-
- if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
- tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
- return;
- }
-
- tinyMCEPopup.restoreSelection();
-
- if (this.action != 'update')
- ed.selection.collapse(1);
-
- var aRule = ed.schema.getElementRule('a');
- if (!aRule || aRule.attributes.name) {
- attribName = 'name';
- } else {
- attribName = 'id';
- }
-
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
- if (elm) {
- elm.setAttribute(attribName, name);
- elm[attribName] = name;
- ed.undoManager.add();
- } else {
- // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
- var attrs = {'class' : 'mceItemAnchor'};
- attrs[attribName] = name;
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
- ed.nodeChanged();
- }
-
- tinyMCEPopup.close();
- }
-};
-
-tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
diff --git a/wp-includes/js/tinymce/themes/advanced/js/charmap.js b/wp-includes/js/tinymce/themes/advanced/js/charmap.js
deleted file mode 100644
index cbb4172bac..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/charmap.js
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * charmap.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-tinyMCEPopup.requireLangPack();
-
-var charmap = [
- ['&nbsp;', '&#160;', true, 'no-break space'],
- ['&amp;', '&#38;', true, 'ampersand'],
- ['&quot;', '&#34;', true, 'quotation mark'],
-// finance
- ['&cent;', '&#162;', true, 'cent sign'],
- ['&euro;', '&#8364;', true, 'euro sign'],
- ['&pound;', '&#163;', true, 'pound sign'],
- ['&yen;', '&#165;', true, 'yen sign'],
-// signs
- ['&copy;', '&#169;', true, 'copyright sign'],
- ['&reg;', '&#174;', true, 'registered sign'],
- ['&trade;', '&#8482;', true, 'trade mark sign'],
- ['&permil;', '&#8240;', true, 'per mille sign'],
- ['&micro;', '&#181;', true, 'micro sign'],
- ['&middot;', '&#183;', true, 'middle dot'],
- ['&bull;', '&#8226;', true, 'bullet'],
- ['&hellip;', '&#8230;', true, 'three dot leader'],
- ['&prime;', '&#8242;', true, 'minutes / feet'],
- ['&Prime;', '&#8243;', true, 'seconds / inches'],
- ['&sect;', '&#167;', true, 'section sign'],
- ['&para;', '&#182;', true, 'paragraph sign'],
- ['&szlig;', '&#223;', true, 'sharp s / ess-zed'],
-// quotations
- ['&lsaquo;', '&#8249;', true, 'single left-pointing angle quotation mark'],
- ['&rsaquo;', '&#8250;', true, 'single right-pointing angle quotation mark'],
- ['&laquo;', '&#171;', true, 'left pointing guillemet'],
- ['&raquo;', '&#187;', true, 'right pointing guillemet'],
- ['&lsquo;', '&#8216;', true, 'left single quotation mark'],
- ['&rsquo;', '&#8217;', true, 'right single quotation mark'],
- ['&ldquo;', '&#8220;', true, 'left double quotation mark'],
- ['&rdquo;', '&#8221;', true, 'right double quotation mark'],
- ['&sbquo;', '&#8218;', true, 'single low-9 quotation mark'],
- ['&bdquo;', '&#8222;', true, 'double low-9 quotation mark'],
- ['&lt;', '&#60;', true, 'less-than sign'],
- ['&gt;', '&#62;', true, 'greater-than sign'],
- ['&le;', '&#8804;', true, 'less-than or equal to'],
- ['&ge;', '&#8805;', true, 'greater-than or equal to'],
- ['&ndash;', '&#8211;', true, 'en dash'],
- ['&mdash;', '&#8212;', true, 'em dash'],
- ['&macr;', '&#175;', true, 'macron'],
- ['&oline;', '&#8254;', true, 'overline'],
- ['&curren;', '&#164;', true, 'currency sign'],
- ['&brvbar;', '&#166;', true, 'broken bar'],
- ['&uml;', '&#168;', true, 'diaeresis'],
- ['&iexcl;', '&#161;', true, 'inverted exclamation mark'],
- ['&iquest;', '&#191;', true, 'turned question mark'],
- ['&circ;', '&#710;', true, 'circumflex accent'],
- ['&tilde;', '&#732;', true, 'small tilde'],
- ['&deg;', '&#176;', true, 'degree sign'],
- ['&minus;', '&#8722;', true, 'minus sign'],
- ['&plusmn;', '&#177;', true, 'plus-minus sign'],
- ['&divide;', '&#247;', true, 'division sign'],
- ['&frasl;', '&#8260;', true, 'fraction slash'],
- ['&times;', '&#215;', true, 'multiplication sign'],
- ['&sup1;', '&#185;', true, 'superscript one'],
- ['&sup2;', '&#178;', true, 'superscript two'],
- ['&sup3;', '&#179;', true, 'superscript three'],
- ['&frac14;', '&#188;', true, 'fraction one quarter'],
- ['&frac12;', '&#189;', true, 'fraction one half'],
- ['&frac34;', '&#190;', true, 'fraction three quarters'],
-// math / logical
- ['&fnof;', '&#402;', true, 'function / florin'],
- ['&int;', '&#8747;', true, 'integral'],
- ['&sum;', '&#8721;', true, 'n-ary sumation'],
- ['&infin;', '&#8734;', true, 'infinity'],
- ['&radic;', '&#8730;', true, 'square root'],
- ['&sim;', '&#8764;', false,'similar to'],
- ['&cong;', '&#8773;', false,'approximately equal to'],
- ['&asymp;', '&#8776;', true, 'almost equal to'],
- ['&ne;', '&#8800;', true, 'not equal to'],
- ['&equiv;', '&#8801;', true, 'identical to'],
- ['&isin;', '&#8712;', false,'element of'],
- ['&notin;', '&#8713;', false,'not an element of'],
- ['&ni;', '&#8715;', false,'contains as member'],
- ['&prod;', '&#8719;', true, 'n-ary product'],
- ['&and;', '&#8743;', false,'logical and'],
- ['&or;', '&#8744;', false,'logical or'],
- ['&not;', '&#172;', true, 'not sign'],
- ['&cap;', '&#8745;', true, 'intersection'],
- ['&cup;', '&#8746;', false,'union'],
- ['&part;', '&#8706;', true, 'partial differential'],
- ['&forall;', '&#8704;', false,'for all'],
- ['&exist;', '&#8707;', false,'there exists'],
- ['&empty;', '&#8709;', false,'diameter'],
- ['&nabla;', '&#8711;', false,'backward difference'],
- ['&lowast;', '&#8727;', false,'asterisk operator'],
- ['&prop;', '&#8733;', false,'proportional to'],
- ['&ang;', '&#8736;', false,'angle'],
-// undefined
- ['&acute;', '&#180;', true, 'acute accent'],
- ['&cedil;', '&#184;', true, 'cedilla'],
- ['&ordf;', '&#170;', true, 'feminine ordinal indicator'],
- ['&ordm;', '&#186;', true, 'masculine ordinal indicator'],
- ['&dagger;', '&#8224;', true, 'dagger'],
- ['&Dagger;', '&#8225;', true, 'double dagger'],
-// alphabetical special chars
- ['&Agrave;', '&#192;', true, 'A - grave'],
- ['&Aacute;', '&#193;', true, 'A - acute'],
- ['&Acirc;', '&#194;', true, 'A - circumflex'],
- ['&Atilde;', '&#195;', true, 'A - tilde'],
- ['&Auml;', '&#196;', true, 'A - diaeresis'],
- ['&Aring;', '&#197;', true, 'A - ring above'],
- ['&AElig;', '&#198;', true, 'ligature AE'],
- ['&Ccedil;', '&#199;', true, 'C - cedilla'],
- ['&Egrave;', '&#200;', true, 'E - grave'],
- ['&Eacute;', '&#201;', true, 'E - acute'],
- ['&Ecirc;', '&#202;', true, 'E - circumflex'],
- ['&Euml;', '&#203;', true, 'E - diaeresis'],
- ['&Igrave;', '&#204;', true, 'I - grave'],
- ['&Iacute;', '&#205;', true, 'I - acute'],
- ['&Icirc;', '&#206;', true, 'I - circumflex'],
- ['&Iuml;', '&#207;', true, 'I - diaeresis'],
- ['&ETH;', '&#208;', true, 'ETH'],
- ['&Ntilde;', '&#209;', true, 'N - tilde'],
- ['&Ograve;', '&#210;', true, 'O - grave'],
- ['&Oacute;', '&#211;', true, 'O - acute'],
- ['&Ocirc;', '&#212;', true, 'O - circumflex'],
- ['&Otilde;', '&#213;', true, 'O - tilde'],
- ['&Ouml;', '&#214;', true, 'O - diaeresis'],
- ['&Oslash;', '&#216;', true, 'O - slash'],
- ['&OElig;', '&#338;', true, 'ligature OE'],
- ['&Scaron;', '&#352;', true, 'S - caron'],
- ['&Ugrave;', '&#217;', true, 'U - grave'],
- ['&Uacute;', '&#218;', true, 'U - acute'],
- ['&Ucirc;', '&#219;', true, 'U - circumflex'],
- ['&Uuml;', '&#220;', true, 'U - diaeresis'],
- ['&Yacute;', '&#221;', true, 'Y - acute'],
- ['&Yuml;', '&#376;', true, 'Y - diaeresis'],
- ['&THORN;', '&#222;', true, 'THORN'],
- ['&agrave;', '&#224;', true, 'a - grave'],
- ['&aacute;', '&#225;', true, 'a - acute'],
- ['&acirc;', '&#226;', true, 'a - circumflex'],
- ['&atilde;', '&#227;', true, 'a - tilde'],
- ['&auml;', '&#228;', true, 'a - diaeresis'],
- ['&aring;', '&#229;', true, 'a - ring above'],
- ['&aelig;', '&#230;', true, 'ligature ae'],
- ['&ccedil;', '&#231;', true, 'c - cedilla'],
- ['&egrave;', '&#232;', true, 'e - grave'],
- ['&eacute;', '&#233;', true, 'e - acute'],
- ['&ecirc;', '&#234;', true, 'e - circumflex'],
- ['&euml;', '&#235;', true, 'e - diaeresis'],
- ['&igrave;', '&#236;', true, 'i - grave'],
- ['&iacute;', '&#237;', true, 'i - acute'],
- ['&icirc;', '&#238;', true, 'i - circumflex'],
- ['&iuml;', '&#239;', true, 'i - diaeresis'],
- ['&eth;', '&#240;', true, 'eth'],
- ['&ntilde;', '&#241;', true, 'n - tilde'],
- ['&ograve;', '&#242;', true, 'o - grave'],
- ['&oacute;', '&#243;', true, 'o - acute'],
- ['&ocirc;', '&#244;', true, 'o - circumflex'],
- ['&otilde;', '&#245;', true, 'o - tilde'],
- ['&ouml;', '&#246;', true, 'o - diaeresis'],
- ['&oslash;', '&#248;', true, 'o slash'],
- ['&oelig;', '&#339;', true, 'ligature oe'],
- ['&scaron;', '&#353;', true, 's - caron'],
- ['&ugrave;', '&#249;', true, 'u - grave'],
- ['&uacute;', '&#250;', true, 'u - acute'],
- ['&ucirc;', '&#251;', true, 'u - circumflex'],
- ['&uuml;', '&#252;', true, 'u - diaeresis'],
- ['&yacute;', '&#253;', true, 'y - acute'],
- ['&thorn;', '&#254;', true, 'thorn'],
- ['&yuml;', '&#255;', true, 'y - diaeresis'],
- ['&Alpha;', '&#913;', true, 'Alpha'],
- ['&Beta;', '&#914;', true, 'Beta'],
- ['&Gamma;', '&#915;', true, 'Gamma'],
- ['&Delta;', '&#916;', true, 'Delta'],
- ['&Epsilon;', '&#917;', true, 'Epsilon'],
- ['&Zeta;', '&#918;', true, 'Zeta'],
- ['&Eta;', '&#919;', true, 'Eta'],
- ['&Theta;', '&#920;', true, 'Theta'],
- ['&Iota;', '&#921;', true, 'Iota'],
- ['&Kappa;', '&#922;', true, 'Kappa'],
- ['&Lambda;', '&#923;', true, 'Lambda'],
- ['&Mu;', '&#924;', true, 'Mu'],
- ['&Nu;', '&#925;', true, 'Nu'],
- ['&Xi;', '&#926;', true, 'Xi'],
- ['&Omicron;', '&#927;', true, 'Omicron'],
- ['&Pi;', '&#928;', true, 'Pi'],
- ['&Rho;', '&#929;', true, 'Rho'],
- ['&Sigma;', '&#931;', true, 'Sigma'],
- ['&Tau;', '&#932;', true, 'Tau'],
- ['&Upsilon;', '&#933;', true, 'Upsilon'],
- ['&Phi;', '&#934;', true, 'Phi'],
- ['&Chi;', '&#935;', true, 'Chi'],
- ['&Psi;', '&#936;', true, 'Psi'],
- ['&Omega;', '&#937;', true, 'Omega'],
- ['&alpha;', '&#945;', true, 'alpha'],
- ['&beta;', '&#946;', true, 'beta'],
- ['&gamma;', '&#947;', true, 'gamma'],
- ['&delta;', '&#948;', true, 'delta'],
- ['&epsilon;', '&#949;', true, 'epsilon'],
- ['&zeta;', '&#950;', true, 'zeta'],
- ['&eta;', '&#951;', true, 'eta'],
- ['&theta;', '&#952;', true, 'theta'],
- ['&iota;', '&#953;', true, 'iota'],
- ['&kappa;', '&#954;', true, 'kappa'],
- ['&lambda;', '&#955;', true, 'lambda'],
- ['&mu;', '&#956;', true, 'mu'],
- ['&nu;', '&#957;', true, 'nu'],
- ['&xi;', '&#958;', true, 'xi'],
- ['&omicron;', '&#959;', true, 'omicron'],
- ['&pi;', '&#960;', true, 'pi'],
- ['&rho;', '&#961;', true, 'rho'],
- ['&sigmaf;', '&#962;', true, 'final sigma'],
- ['&sigma;', '&#963;', true, 'sigma'],
- ['&tau;', '&#964;', true, 'tau'],
- ['&upsilon;', '&#965;', true, 'upsilon'],
- ['&phi;', '&#966;', true, 'phi'],
- ['&chi;', '&#967;', true, 'chi'],
- ['&psi;', '&#968;', true, 'psi'],
- ['&omega;', '&#969;', true, 'omega'],
-// symbols
- ['&alefsym;', '&#8501;', false,'alef symbol'],
- ['&piv;', '&#982;', false,'pi symbol'],
- ['&real;', '&#8476;', false,'real part symbol'],
- ['&thetasym;','&#977;', false,'theta symbol'],
- ['&upsih;', '&#978;', false,'upsilon - hook symbol'],
- ['&weierp;', '&#8472;', false,'Weierstrass p'],
- ['&image;', '&#8465;', false,'imaginary part'],
-// arrows
- ['&larr;', '&#8592;', true, 'leftwards arrow'],
- ['&uarr;', '&#8593;', true, 'upwards arrow'],
- ['&rarr;', '&#8594;', true, 'rightwards arrow'],
- ['&darr;', '&#8595;', true, 'downwards arrow'],
- ['&harr;', '&#8596;', true, 'left right arrow'],
- ['&crarr;', '&#8629;', false,'carriage return'],
- ['&lArr;', '&#8656;', false,'leftwards double arrow'],
- ['&uArr;', '&#8657;', false,'upwards double arrow'],
- ['&rArr;', '&#8658;', false,'rightwards double arrow'],
- ['&dArr;', '&#8659;', false,'downwards double arrow'],
- ['&hArr;', '&#8660;', false,'left right double arrow'],
- ['&there4;', '&#8756;', false,'therefore'],
- ['&sub;', '&#8834;', false,'subset of'],
- ['&sup;', '&#8835;', false,'superset of'],
- ['&nsub;', '&#8836;', false,'not a subset of'],
- ['&sube;', '&#8838;', false,'subset of or equal to'],
- ['&supe;', '&#8839;', false,'superset of or equal to'],
- ['&oplus;', '&#8853;', false,'circled plus'],
- ['&otimes;', '&#8855;', false,'circled times'],
- ['&perp;', '&#8869;', false,'perpendicular'],
- ['&sdot;', '&#8901;', false,'dot operator'],
- ['&lceil;', '&#8968;', false,'left ceiling'],
- ['&rceil;', '&#8969;', false,'right ceiling'],
- ['&lfloor;', '&#8970;', false,'left floor'],
- ['&rfloor;', '&#8971;', false,'right floor'],
- ['&lang;', '&#9001;', false,'left-pointing angle bracket'],
- ['&rang;', '&#9002;', false,'right-pointing angle bracket'],
- ['&loz;', '&#9674;', true, 'lozenge'],
- ['&spades;', '&#9824;', true, 'black spade suit'],
- ['&clubs;', '&#9827;', true, 'black club suit'],
- ['&hearts;', '&#9829;', true, 'black heart suit'],
- ['&diams;', '&#9830;', true, 'black diamond suit'],
- ['&ensp;', '&#8194;', false,'en space'],
- ['&emsp;', '&#8195;', false,'em space'],
- ['&thinsp;', '&#8201;', false,'thin space'],
- ['&zwnj;', '&#8204;', false,'zero width non-joiner'],
- ['&zwj;', '&#8205;', false,'zero width joiner'],
- ['&lrm;', '&#8206;', false,'left-to-right mark'],
- ['&rlm;', '&#8207;', false,'right-to-left mark'],
- ['&shy;', '&#173;', false,'soft hyphen']
-];
-
-tinyMCEPopup.onInit.add(function() {
- tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
- addKeyboardNavigation();
-});
-
-function addKeyboardNavigation(){
- var tableElm, cells, settings;
-
- cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
-
- settings ={
- root: "charmapgroup",
- items: cells
- };
- cells[0].tabindex=0;
- tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
- if (tinymce.isGecko) {
- cells[0].focus();
- } else {
- setTimeout(function(){
- cells[0].focus();
- }, 100);
- }
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
-}
-
-function renderCharMapHTML() {
- var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
- var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
- '<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
- '"><tr height="' + tdHeight + '">';
- var cols=-1;
-
- for (i=0; i<charmap.length; i++) {
- var previewCharFn;
-
- if (charmap[i][2]==true) {
- cols++;
- previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
- html += ''
- + '<td class="charmap">'
- + '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate("advanced_dlg.charmap_usage")+'">'
- + charmap[i][1]
- + '</a></td>';
- if ((cols+1) % charsPerRow == 0)
- html += '</tr><tr height="' + tdHeight + '">';
- }
- }
-
- if (cols % charsPerRow > 0) {
- var padd = charsPerRow - (cols % charsPerRow);
- for (var i=0; i<padd-1; i++)
- html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
- }
-
- html += '</tr></table></div>';
- html = html.replace(/<tr height="20"><\/tr>/g, '');
-
- return html;
-}
-
-function insertChar(chr) {
- tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
-
- // Refocus in window
- if (tinyMCEPopup.isWindow)
- window.focus();
-
- tinyMCEPopup.editor.focus();
- tinyMCEPopup.close();
-}
-
-function previewChar(codeA, codeB, codeN) {
- var elmA = document.getElementById('codeA');
- var elmB = document.getElementById('codeB');
- var elmV = document.getElementById('codeV');
- var elmN = document.getElementById('codeN');
-
- if (codeA=='#160;') {
- elmV.innerHTML = '__';
- } else {
- elmV.innerHTML = '&' + codeA;
- }
-
- elmB.innerHTML = '&amp;' + codeA;
- elmA.innerHTML = '&amp;' + codeB;
- elmN.innerHTML = codeN;
-}
diff --git a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js
deleted file mode 100644
index cc891c1711..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js
+++ /dev/null
@@ -1,345 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
-
-var colors = [
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
-];
-
-var named = {
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
-};
-
-var namedLookup = {};
-
-function init() {
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
-
- tinyMCEPopup.resizeToInnerSize();
-
- generatePicker();
- generateWebColors();
- generateNamedColors();
-
- if (inputColor) {
- changeFinalColor(inputColor);
-
- col = convertHexToRGB(inputColor);
-
- if (col)
- updateLight(col.r, col.g, col.b);
- }
-
- for (key in named) {
- value = named[key];
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
- }
-}
-
-function toHexColor(color) {
- var matches, red, green, blue, toInt = parseInt;
-
- function hex(value) {
- value = parseInt(value).toString(16);
-
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
- };
-
- color = tinymce.trim(color);
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
- color = namedLookup[color] || color;
-
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1]);
- green = toInt(matches[2]);
- blue = toInt(matches[3]);
- } else {
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1], 16);
- green = toInt(matches[2], 16);
- blue = toInt(matches[3], 16);
- } else {
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1] + matches[1], 16);
- green = toInt(matches[2] + matches[2], 16);
- blue = toInt(matches[3] + matches[3], 16);
- } else {
- return '';
- }
- }
- }
-
- return '#' + hex(red) + hex(green) + hex(blue);
-}
-
-function insertAction() {
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
-
- var hexColor = toHexColor(color);
-
- if (hexColor === '') {
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
- tinyMCEPopup.alert(text + ': ' + color);
- }
- else {
- tinyMCEPopup.restoreSelection();
-
- if (f)
- f(hexColor);
-
- tinyMCEPopup.close();
- }
-}
-
-function showColor(color, name) {
- if (name)
- document.getElementById("colorname").innerHTML = name;
-
- document.getElementById("preview").style.backgroundColor = color;
- document.getElementById("color").value = color.toUpperCase();
-}
-
-function convertRGBToHex(col) {
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
-
- if (!col)
- return col;
-
- var rgb = col.replace(re, "$1,$2,$3").split(',');
- if (rgb.length == 3) {
- r = parseInt(rgb[0]).toString(16);
- g = parseInt(rgb[1]).toString(16);
- b = parseInt(rgb[2]).toString(16);
-
- r = r.length == 1 ? '0' + r : r;
- g = g.length == 1 ? '0' + g : g;
- b = b.length == 1 ? '0' + b : b;
-
- return "#" + r + g + b;
- }
-
- return col;
-}
-
-function convertHexToRGB(col) {
- if (col.indexOf('#') != -1) {
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
-
- r = parseInt(col.substring(0, 2), 16);
- g = parseInt(col.substring(2, 4), 16);
- b = parseInt(col.substring(4, 6), 16);
-
- return {r : r, g : g, b : b};
- }
-
- return null;
-}
-
-function generatePicker() {
- var el = document.getElementById('light'), h = '', i;
-
- for (i = 0; i < detail; i++){
- h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
- + ' onclick="changeFinalColor(this.style.backgroundColor)"'
- + ' onmousedown="isMouseDown = true; return false;"'
- + ' onmouseup="isMouseDown = false;"'
- + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
- + ' onmouseover="isMouseOver = true;"'
- + ' onmouseout="isMouseOver = false;"'
- + '></div>';
- }
-
- el.innerHTML = h;
-}
-
-function generateWebColors() {
- var el = document.getElementById('webcolors'), h = '', i;
-
- if (el.className == 'generated')
- return;
-
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
- h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
- + '<tr>';
-
- for (i=0; i<colors.length; i++) {
- h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
- + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
- }
- h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
- h += '</a></td>';
- if ((i+1) % 18 == 0)
- h += '</tr><tr>';
- }
-
- h += '</table></div>';
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el.firstChild);
-}
-
-function paintCanvas(el) {
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
- var context;
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
- context.fillStyle = canvas.getAttribute('data-color');
- context.fillRect(0, 0, 10, 10);
- }
- });
-}
-function generateNamedColors() {
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
-
- if (el.className == 'generated')
- return;
-
- for (n in named) {
- v = named[n];
- h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
- }
- h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
- h += '</a>';
- i++;
- }
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el);
-}
-
-function enableKeyboardNavigation(el) {
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
- root: el,
- items: tinyMCEPopup.dom.select('a', el)
- }, tinyMCEPopup.dom);
-}
-
-function dechex(n) {
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
-}
-
-function computeColor(e) {
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
-
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
-
- partWidth = document.getElementById('colors').width / 6;
- partDetail = detail / 2;
- imHeight = document.getElementById('colors').height;
-
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
-
- coef = (imHeight - y) / imHeight;
- r = 128 + (r - 128) * coef;
- g = 128 + (g - 128) * coef;
- b = 128 + (b - 128) * coef;
-
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
- updateLight(r, g, b);
-}
-
-function updateLight(r, g, b) {
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
-
- for (i=0; i<detail; i++) {
- if ((i>=0) && (i<partDetail)) {
- finalCoef = i / partDetail;
- finalR = dechex(255 - (255 - r) * finalCoef);
- finalG = dechex(255 - (255 - g) * finalCoef);
- finalB = dechex(255 - (255 - b) * finalCoef);
- } else {
- finalCoef = 2 - i / partDetail;
- finalR = dechex(r * finalCoef);
- finalG = dechex(g * finalCoef);
- finalB = dechex(b * finalCoef);
- }
-
- color = finalR + finalG + finalB;
-
- setCol('gs' + i, '#'+color);
- }
-}
-
-function changeFinalColor(color) {
- if (color.indexOf('#') == -1)
- color = convertRGBToHex(color);
-
- setCol('preview', color);
- document.getElementById('color').value = color;
-}
-
-function setCol(e, c) {
- try {
- document.getElementById(e).style.backgroundColor = c;
- } catch (ex) {
- // Ignore IE warning
- }
-}
-
-tinyMCEPopup.onInit.add(init);
diff --git a/wp-includes/js/tinymce/themes/advanced/js/image.js b/wp-includes/js/tinymce/themes/advanced/js/image.js
deleted file mode 100644
index 3f93e2d321..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/image.js
+++ /dev/null
@@ -1,253 +0,0 @@
-var ImageDialog = {
- preInit : function() {
- var url;
-
- tinyMCEPopup.requireLangPack();
-
- if (url = tinyMCEPopup.getParam("external_image_list_url"))
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
- },
-
- init : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor;
-
- // Setup browse button
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
- if (isVisible('srcbrowser'))
- document.getElementById('src').style.width = '180px';
-
- e = ed.selection.getNode();
-
- this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
-
- if (e.nodeName == 'IMG') {
- f.src.value = ed.dom.getAttrib(e, 'src');
- f.alt.value = ed.dom.getAttrib(e, 'alt');
- f.border.value = this.getAttrib(e, 'border');
- f.vspace.value = this.getAttrib(e, 'vspace');
- f.hspace.value = this.getAttrib(e, 'hspace');
- f.width.value = ed.dom.getAttrib(e, 'width');
- f.height.value = ed.dom.getAttrib(e, 'height');
- f.insert.value = ed.getLang('update');
- this.styleVal = ed.dom.getAttrib(e, 'style');
- selectByValue(f, 'image_list', f.src.value);
- selectByValue(f, 'align', this.getAttrib(e, 'align'));
- this.updateStyle();
- }
- },
-
- fillFileList : function(id, l) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- l = typeof(l) === 'function' ? l() : window[l];
-
- if (l && l.length > 0) {
- lst.options[lst.options.length] = new Option('', '');
-
- tinymce.each(l, function(o) {
- lst.options[lst.options.length] = new Option(o[0], o[1]);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- update : function() {
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
-
- tinyMCEPopup.restoreSelection();
-
- if (f.src.value === '') {
- if (ed.selection.getNode().nodeName == 'IMG') {
- ed.dom.remove(ed.selection.getNode());
- ed.execCommand('mceRepaint');
- }
-
- tinyMCEPopup.close();
- return;
- }
-
- if (!ed.settings.inline_styles) {
- args = tinymce.extend(args, {
- vspace : nl.vspace.value,
- hspace : nl.hspace.value,
- border : nl.border.value,
- align : getSelectValue(f, 'align')
- });
- } else
- args.style = this.styleVal;
-
- tinymce.extend(args, {
- src : f.src.value.replace(/ /g, '%20'),
- alt : f.alt.value,
- width : f.width.value,
- height : f.height.value
- });
-
- el = ed.selection.getNode();
-
- if (el && el.nodeName == 'IMG') {
- ed.dom.setAttribs(el, args);
- tinyMCEPopup.editor.execCommand('mceRepaint');
- tinyMCEPopup.editor.focus();
- } else {
- tinymce.each(args, function(value, name) {
- if (value === "") {
- delete args[name];
- }
- });
-
- ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
- ed.undoManager.add();
- }
-
- tinyMCEPopup.close();
- },
-
- updateStyle : function() {
- var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
-
- if (tinyMCEPopup.editor.settings.inline_styles) {
- tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
- st[key] = value;
- });
-
- // Handle align
- v = getSelectValue(f, 'align');
- if (v) {
- if (v == 'left' || v == 'right') {
- st['float'] = v;
- delete st['vertical-align'];
- } else {
- st['vertical-align'] = v;
- delete st['float'];
- }
- } else {
- delete st['float'];
- delete st['vertical-align'];
- }
-
- // Handle border
- v = f.border.value;
- if (v || v == '0') {
- if (v == '0')
- st['border'] = '0';
- else
- st['border'] = v + 'px solid black';
- } else
- delete st['border'];
-
- // Handle hspace
- v = f.hspace.value;
- if (v) {
- delete st['margin'];
- st['margin-left'] = v + 'px';
- st['margin-right'] = v + 'px';
- } else {
- delete st['margin-left'];
- delete st['margin-right'];
- }
-
- // Handle vspace
- v = f.vspace.value;
- if (v) {
- delete st['margin'];
- st['margin-top'] = v + 'px';
- st['margin-bottom'] = v + 'px';
- } else {
- delete st['margin-top'];
- delete st['margin-bottom'];
- }
-
- // Merge
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
- this.styleVal = dom.serializeStyle(st, 'img');
- }
- },
-
- getAttrib : function(e, at) {
- var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
-
- if (ed.settings.inline_styles) {
- switch (at) {
- case 'align':
- if (v = dom.getStyle(e, 'float'))
- return v;
-
- if (v = dom.getStyle(e, 'vertical-align'))
- return v;
-
- break;
-
- case 'hspace':
- v = dom.getStyle(e, 'margin-left')
- v2 = dom.getStyle(e, 'margin-right');
- if (v && v == v2)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
-
- case 'vspace':
- v = dom.getStyle(e, 'margin-top')
- v2 = dom.getStyle(e, 'margin-bottom');
- if (v && v == v2)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
-
- case 'border':
- v = 0;
-
- tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
- sv = dom.getStyle(e, 'border-' + sv + '-width');
-
- // False or not the same as prev
- if (!sv || (sv != v && v !== 0)) {
- v = 0;
- return false;
- }
-
- if (sv)
- v = sv;
- });
-
- if (v)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
- }
- }
-
- if (v = dom.getAttrib(e, at))
- return v;
-
- return '';
- },
-
- resetImageData : function() {
- var f = document.forms[0];
-
- f.width.value = f.height.value = "";
- },
-
- updateImageData : function() {
- var f = document.forms[0], t = ImageDialog;
-
- if (f.width.value == "")
- f.width.value = t.preloadImg.width;
-
- if (f.height.value == "")
- f.height.value = t.preloadImg.height;
- },
-
- getImageData : function() {
- var f = document.forms[0];
-
- this.preloadImg = new Image();
- this.preloadImg.onload = this.updateImageData;
- this.preloadImg.onerror = this.resetImageData;
- this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
- }
-};
-
-ImageDialog.preInit();
-tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
diff --git a/wp-includes/js/tinymce/themes/advanced/js/link.js b/wp-includes/js/tinymce/themes/advanced/js/link.js
deleted file mode 100644
index b08b2ba9c2..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/link.js
+++ /dev/null
@@ -1,159 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var LinkDialog = {
- preInit : function() {
- var url;
-
- if (url = tinyMCEPopup.getParam("external_link_list_url"))
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
- },
-
- init : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor;
-
- // Setup browse button
- document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
- if (isVisible('hrefbrowser'))
- document.getElementById('href').style.width = '180px';
-
- this.fillClassList('class_list');
- this.fillFileList('link_list', 'tinyMCELinkList');
- this.fillTargetList('target_list');
-
- if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
- f.href.value = ed.dom.getAttrib(e, 'href');
- f.linktitle.value = ed.dom.getAttrib(e, 'title');
- f.insert.value = ed.getLang('update');
- selectByValue(f, 'link_list', f.href.value);
- selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
- selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
- }
- },
-
- update : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
-
- tinyMCEPopup.restoreSelection();
- e = ed.dom.getParent(ed.selection.getNode(), 'A');
-
- // Remove element if there is no href
- if (!f.href.value) {
- if (e) {
- b = ed.selection.getBookmark();
- ed.dom.remove(e, 1);
- ed.selection.moveToBookmark(b);
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- tinyMCEPopup.close();
- return;
- }
- }
-
- // Create new anchor elements
- if (e == null) {
- ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
-
- tinymce.each(ed.dom.select("a"), function(n) {
- if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
- e = n;
-
- ed.dom.setAttribs(e, {
- href : href,
- title : f.linktitle.value,
- target : f.target_list ? getSelectValue(f, "target_list") : null,
- 'class' : f.class_list ? getSelectValue(f, "class_list") : null
- });
- }
- });
- } else {
- ed.dom.setAttribs(e, {
- href : href,
- title : f.linktitle.value
- });
-
- if (f.target_list) {
- ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
- }
-
- if (f.class_list) {
- ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
- }
- }
-
- // Don't move caret if selection was image
- if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
- ed.focus();
- ed.selection.select(e);
- ed.selection.collapse(0);
- tinyMCEPopup.storeSelection();
- }
-
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- tinyMCEPopup.close();
- },
-
- checkPrefix : function(n) {
- if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
- n.value = 'mailto:' + n.value;
-
- if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
- n.value = 'http://' + n.value;
- },
-
- fillFileList : function(id, l) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- l = window[l];
-
- if (l && l.length > 0) {
- lst.options[lst.options.length] = new Option('', '');
-
- tinymce.each(l, function(o) {
- lst.options[lst.options.length] = new Option(o[0], o[1]);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- fillClassList : function(id) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
- cl = [];
-
- tinymce.each(v.split(';'), function(v) {
- var p = v.split('=');
-
- cl.push({'title' : p[0], 'class' : p[1]});
- });
- } else
- cl = tinyMCEPopup.editor.dom.getClasses();
-
- if (cl.length > 0) {
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
-
- tinymce.each(cl, function(o) {
- lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- fillTargetList : function(id) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
-
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
-
- if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
- tinymce.each(v.split(','), function(v) {
- v = v.split('=');
- lst.options[lst.options.length] = new Option(v[0], v[1]);
- });
- }
- }
-};
-
-LinkDialog.preInit();
-tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
diff --git a/wp-includes/js/tinymce/themes/advanced/js/source_editor.js b/wp-includes/js/tinymce/themes/advanced/js/source_editor.js
deleted file mode 100644
index d4179371a0..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/js/source_editor.js
+++ /dev/null
@@ -1,78 +0,0 @@
-tinyMCEPopup.requireLangPack();
-tinyMCEPopup.onInit.add(onLoadInit);
-
-function saveContent() {
- tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Remove Gecko spellchecking
- if (tinymce.isGecko)
- document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
-
- document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
-
- if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
- turnWrapOn();
- document.getElementById('wraped').checked = true;
- }
-
- resizeInputs();
-}
-
-function setWrap(val) {
- var v, n, s = document.getElementById('htmlSource');
-
- s.wrap = val;
-
- if (!tinymce.isIE) {
- v = s.value;
- n = s.cloneNode(false);
- n.setAttribute("wrap", val);
- s.parentNode.replaceChild(n, s);
- n.value = v;
- }
-}
-
-function setWhiteSpaceCss(value) {
- var el = document.getElementById('htmlSource');
- tinymce.DOM.setStyle(el, 'white-space', value);
-}
-
-function turnWrapOff() {
- if (tinymce.isWebKit) {
- setWhiteSpaceCss('pre');
- } else {
- setWrap('off');
- }
-}
-
-function turnWrapOn() {
- if (tinymce.isWebKit) {
- setWhiteSpaceCss('pre-wrap');
- } else {
- setWrap('soft');
- }
-}
-
-function toggleWordWrap(elm) {
- if (elm.checked) {
- turnWrapOn();
- } else {
- turnWrapOff();
- }
-}
-
-function resizeInputs() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('htmlSource');
-
- if (el) {
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 65) + 'px';
- }
-}
diff --git a/wp-includes/js/tinymce/themes/advanced/link.htm b/wp-includes/js/tinymce/themes/advanced/link.htm
deleted file mode 100644
index 0180002be1..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/link.htm
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.link_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/mctabs.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/form_utils.js?ver=358-20121205"></script>
- <script type="text/javascript" src="../../utils/validate.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/link.js?ver=358-20121205"></script>
-</head>
-<body id="link" style="display: none">
-<form onsubmit="LinkDialog.update();return false;" action="#">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="general_panel" class="panel current">
- <table border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
- <td><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
- <td id="hrefbrowsercontainer">&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><label for="link_list">{#advanced_dlg.link_list}</label></td>
- <td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
- </tr>
- <tr>
- <td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
- <td><select id="target_list" name="target_list"></select></td>
- </tr>
- <tr>
- <td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
- <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
- </tr>
- <tr>
- <td><label for="class_list">{#class_name}</label></td>
- <td><select id="class_list" name="class_list"></select></td>
- </tr>
- </table>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#insert}" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
- </div>
-</form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/shortcuts.htm b/wp-includes/js/tinymce/themes/advanced/shortcuts.htm
deleted file mode 100644
index 781801e058..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/shortcuts.htm
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>{#advanced_dlg.accessibility_help}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
- </head>
- <body id="content">
- <h1>{#advanced_dlg.accessibility_usage_title}</h1>
- <h2>Toolbars</h2>
- <p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
- Press enter to activate a button and return focus to the editor.
- Press escape to return focus to the editor without performing any actions.</p>
-
- <h2>Status Bar</h2>
- <p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
- Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
-
- <h2>Context Menu</h2>
- <p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
- To close submenus press the left arrow key. Press escape to close the context menu.</p>
-
- <h1>Keyboard Shortcuts</h1>
- <table>
- <thead>
- <tr>
- <th>Keystroke</th>
- <th>Function</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Control-B</td><td>Bold</td>
- </tr>
- <tr>
- <td>Control-I</td><td>Italic</td>
- </tr>
- <tr>
- <td>Control-Z</td><td>Undo</td>
- </tr>
- <tr>
- <td>Control-Y</td><td>Redo</td>
- </tr>
- </tbody>
- </table>
- </body>
-</html>
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/content.css b/wp-includes/js/tinymce/themes/advanced/skins/default/content.css
deleted file mode 100644
index 4d63ca9810..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/content.css
+++ /dev/null
@@ -1,50 +0,0 @@
-body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-body {background:#FFF;}
-body.mceForceColors {background:#FFF; color:#000;}
-body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-/* IE */
-* html body {
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css
deleted file mode 100644
index 8950ba3851..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDDDDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-background:#F0F0EE;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;}
-a:hover {color:#2B6FB6;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #CCC;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-border:0; margin:0; padding:0;
-font-weight:bold;
-width:94px; height:26px;
-background:url(img/buttons.png) 0 -26px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#insert {background:url(img/buttons.png) 0 -52px}
-#cancel {background:url(img/buttons.png) 0 0; float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png b/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png
deleted file mode 100644
index 1e53560e0a..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif
deleted file mode 100644
index d2f93671ca..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif
deleted file mode 100644
index 85e31dfb2d..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif
deleted file mode 100644
index adfdddccd7..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif
deleted file mode 100644
index 5bb90fd6a4..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif
deleted file mode 100644
index 06812cb410..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css
deleted file mode 100644
index 2e8c658891..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css
+++ /dev/null
@@ -1,219 +0,0 @@
-/* Reset */
-.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
-.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
-.defaultSkin table td {vertical-align:middle}
-
-/* Containers */
-.defaultSkin table {direction:ltr;background:transparent}
-.defaultSkin iframe {display:block;}
-.defaultSkin .mceToolbar {height:26px}
-.defaultSkin .mceLeft {text-align:left}
-.defaultSkin .mceRight {text-align:right}
-
-/* External */
-.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
-.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
-
-/* Layout */
-.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
-.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
-.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
-.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
-.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
-.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
-.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
-.defaultSkin .mceStatusbar div {float:left; margin:2px}
-.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
-.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
-.defaultSkin table.mceToolbar {margin-left:3px}
-.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
-.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
-.defaultSkin td.mceCenter {text-align:center;}
-.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
-.defaultSkin td.mceRight table {margin:0 0 0 auto;}
-
-/* Button */
-.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
-.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
-.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
-.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.defaultSkin .mceButtonLabeled {width:auto}
-.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
-.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
-.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
-
-/* Separator */
-.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
-
-/* ListBox */
-.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
-.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
-.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
-.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
-.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
-.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
-.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
-.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
-.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
-.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
-
-/* SplitButton */
-.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
-.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
-.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
-.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
-.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
-.defaultSkin .mceSplitButton span.mceOpen {display:none}
-.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
-.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
-.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
-.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
-
-/* ColorSplitButton */
-.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
-.defaultSkin .mceColorSplitMenu td {padding:2px}
-.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
-.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
-.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
-.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
-.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
-
-/* Menu */
-.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
-.defaultSkin .mceNoIcons span.mceIcon {width:0;}
-.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
-.defaultSkin .mceMenu table {background:#FFF}
-.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
-.defaultSkin .mceMenu td {height:20px}
-.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
-.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
-.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
-.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
-.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
-.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
-.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
-.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
-.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
-.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
-.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
-.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
-.defaultSkin .mceMenu span.mceMenuLine {display:none}
-.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
-.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
-
-/* Progress,Resize */
-.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
-.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.defaultSkin .mce_formatPreview a {font-size:10px}
-.defaultSkin .mce_p span.mceText {}
-.defaultSkin .mce_address span.mceText {font-style:italic}
-.defaultSkin .mce_pre span.mceText {font-family:monospace}
-.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
-
-/* Theme */
-.defaultSkin span.mce_bold {background-position:0 0}
-.defaultSkin span.mce_italic {background-position:-60px 0}
-.defaultSkin span.mce_underline {background-position:-140px 0}
-.defaultSkin span.mce_strikethrough {background-position:-120px 0}
-.defaultSkin span.mce_undo {background-position:-160px 0}
-.defaultSkin span.mce_redo {background-position:-100px 0}
-.defaultSkin span.mce_cleanup {background-position:-40px 0}
-.defaultSkin span.mce_bullist {background-position:-20px 0}
-.defaultSkin span.mce_numlist {background-position:-80px 0}
-.defaultSkin span.mce_justifyleft {background-position:-460px 0}
-.defaultSkin span.mce_justifyright {background-position:-480px 0}
-.defaultSkin span.mce_justifycenter {background-position:-420px 0}
-.defaultSkin span.mce_justifyfull {background-position:-440px 0}
-.defaultSkin span.mce_anchor {background-position:-200px 0}
-.defaultSkin span.mce_indent {background-position:-400px 0}
-.defaultSkin span.mce_outdent {background-position:-540px 0}
-.defaultSkin span.mce_link {background-position:-500px 0}
-.defaultSkin span.mce_unlink {background-position:-640px 0}
-.defaultSkin span.mce_sub {background-position:-600px 0}
-.defaultSkin span.mce_sup {background-position:-620px 0}
-.defaultSkin span.mce_removeformat {background-position:-580px 0}
-.defaultSkin span.mce_newdocument {background-position:-520px 0}
-.defaultSkin span.mce_image {background-position:-380px 0}
-.defaultSkin span.mce_help {background-position:-340px 0}
-.defaultSkin span.mce_code {background-position:-260px 0}
-.defaultSkin span.mce_hr {background-position:-360px 0}
-.defaultSkin span.mce_visualaid {background-position:-660px 0}
-.defaultSkin span.mce_charmap {background-position:-240px 0}
-.defaultSkin span.mce_paste {background-position:-560px 0}
-.defaultSkin span.mce_copy {background-position:-700px 0}
-.defaultSkin span.mce_cut {background-position:-680px 0}
-.defaultSkin span.mce_blockquote {background-position:-220px 0}
-.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
-.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
-.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
-.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
-
-/* Plugins */
-.defaultSkin span.mce_advhr {background-position:-0px -20px}
-.defaultSkin span.mce_ltr {background-position:-20px -20px}
-.defaultSkin span.mce_rtl {background-position:-40px -20px}
-.defaultSkin span.mce_emotions {background-position:-60px -20px}
-.defaultSkin span.mce_fullpage {background-position:-80px -20px}
-.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
-.defaultSkin span.mce_iespell {background-position:-120px -20px}
-.defaultSkin span.mce_insertdate {background-position:-140px -20px}
-.defaultSkin span.mce_inserttime {background-position:-160px -20px}
-.defaultSkin span.mce_absolute {background-position:-180px -20px}
-.defaultSkin span.mce_backward {background-position:-200px -20px}
-.defaultSkin span.mce_forward {background-position:-220px -20px}
-.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
-.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
-.defaultSkin span.mce_movebackward {background-position:-280px -20px}
-.defaultSkin span.mce_moveforward {background-position:-300px -20px}
-.defaultSkin span.mce_media {background-position:-320px -20px}
-.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
-.defaultSkin span.mce_pastetext {background-position:-360px -20px}
-.defaultSkin span.mce_pasteword {background-position:-380px -20px}
-.defaultSkin span.mce_selectall {background-position:-400px -20px}
-.defaultSkin span.mce_preview {background-position:-420px -20px}
-.defaultSkin span.mce_print {background-position:-440px -20px}
-.defaultSkin span.mce_cancel {background-position:-460px -20px}
-.defaultSkin span.mce_save {background-position:-480px -20px}
-.defaultSkin span.mce_replace {background-position:-500px -20px}
-.defaultSkin span.mce_search {background-position:-520px -20px}
-.defaultSkin span.mce_styleprops {background-position:-560px -20px}
-.defaultSkin span.mce_table {background-position:-580px -20px}
-.defaultSkin span.mce_cell_props {background-position:-600px -20px}
-.defaultSkin span.mce_delete_table {background-position:-620px -20px}
-.defaultSkin span.mce_delete_col {background-position:-640px -20px}
-.defaultSkin span.mce_delete_row {background-position:-660px -20px}
-.defaultSkin span.mce_col_after {background-position:-680px -20px}
-.defaultSkin span.mce_col_before {background-position:-700px -20px}
-.defaultSkin span.mce_row_after {background-position:-720px -20px}
-.defaultSkin span.mce_row_before {background-position:-740px -20px}
-.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
-.defaultSkin span.mce_table_props {background-position:-980px -20px}
-.defaultSkin span.mce_row_props {background-position:-780px -20px}
-.defaultSkin span.mce_split_cells {background-position:-800px -20px}
-.defaultSkin span.mce_template {background-position:-820px -20px}
-.defaultSkin span.mce_visualchars {background-position:-840px -20px}
-.defaultSkin span.mce_abbr {background-position:-860px -20px}
-.defaultSkin span.mce_acronym {background-position:-880px -20px}
-.defaultSkin span.mce_attribs {background-position:-900px -20px}
-.defaultSkin span.mce_cite {background-position:-920px -20px}
-.defaultSkin span.mce_del {background-position:-940px -20px}
-.defaultSkin span.mce_ins {background-position:-960px -20px}
-.defaultSkin span.mce_pagebreak {background-position:0 -40px}
-.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
-.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
-.defaultSkin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css b/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css
deleted file mode 100644
index ee3d369d02..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css
+++ /dev/null
@@ -1,24 +0,0 @@
-body, td, pre { margin:8px;}
-body.mceForceColors {background:#FFF; color:#000;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css
deleted file mode 100644
index fa3c31a05d..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-background:#F0F0EE;
-color: black;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE; color:#000;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;background-color:transparent;}
-a:hover {color:#2B6FB6;background-color:transparent;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;background-color:transparent;}
-input.invalid {border:1px solid #EE0000;background-color:transparent;}
-input {background:#FFF; border:1px solid #CCC;color:black;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-font-weight:bold;
-width:94px; height:23px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#cancel {float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
-.tabs li.current {font-weight: bold; margin-right:2px;}
-.tabs span {float:left; display:block; padding:0px 10px 0 0;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css
deleted file mode 100644
index 86829c59c1..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Reset */
-.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
-.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
-.highcontrastSkin table td {vertical-align:middle}
-
-.highcontrastSkin .mceIconOnly {display: block !important;}
-
-/* External */
-.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
-.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
-
-/* Layout */
-.highcontrastSkin table.mceLayout {border: 1px solid;}
-.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
-.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
-.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
-.highcontrastSkin .mceStatusbar div {float:left}
-.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
-
-.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
-.highcontrastSkin .mceToolbar tr { display: block;}
-.highcontrastSkin .mceToolbar table { display: block; }
-
-/* Button */
-
-.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
-.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
-.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
-.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
-
-/* Separator */
-.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
-
-/* ListBox */
-.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
-.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
-.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
-.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
-.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
-.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
-
-.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
-
-/* SplitButton */
-.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-
-.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
-.highcontrastSkin .mceSplitButton tr { display: table-row; }
-.highcontrastSkin table.mceSplitButton { display: table; }
-.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
-.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
-.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
-.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
-
-/* Menu */
-.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
-.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr}
-.highcontrastSkin .mceMenu table {background:white; color: black}
-.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
-.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
-.highcontrastSkin .mceMenu td {height:2em}
-.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
-.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
-.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
-.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
-.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
-.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
-.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
-.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
-.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
-.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
-.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal}
-
-/* ColorSplitButton */
-.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
-.highcontrastSkin .mceColorSplitMenu td {padding:2px}
-.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
-.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
-.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
-.highcontrastSkin .mceColorPreview {display:none;}
-.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
-
-/* Progress,Resize */
-.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
-.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.highcontrastSkin .mce_p span.mceText {}
-.highcontrastSkin .mce_address span.mceText {font-style:italic}
-.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
-.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css
deleted file mode 100644
index 631fa0ec87..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css
+++ /dev/null
@@ -1,48 +0,0 @@
-body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-body {background:#FFF;}
-body.mceForceColors {background:#FFF; color:#000;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-/* IE */
-* html body {
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css
deleted file mode 100644
index 84d2fe9722..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDDDDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-background:#F0F0EE;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;}
-a:hover {color:#2B6FB6;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #CCC;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-border:0; margin:0; padding:0;
-font-weight:bold;
-width:94px; height:26px;
-background:url(../default/img/buttons.png) 0 -26px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#insert {background:url(../default/img/buttons.png) 0 -52px}
-#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png
deleted file mode 100644
index 13a5cb0309..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png
deleted file mode 100644
index 7fc57f2bc2..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png
deleted file mode 100644
index c0dcc6cac2..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css
deleted file mode 100644
index abd5d8deba..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Reset */
-.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
-.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
-.o2k7Skin table td {vertical-align:middle}
-
-/* Containers */
-.o2k7Skin table {background:transparent}
-.o2k7Skin iframe {display:block;}
-.o2k7Skin .mceToolbar {height:26px}
-
-/* External */
-.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
-.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
-
-/* Layout */
-.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
-.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
-.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
-.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
-.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
-.o2k7Skin td.mceToolbar{background:#E5EFFD}
-.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
-.o2k7Skin .mceStatusbar div {float:left; padding:2px}
-.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
-.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
-.o2k7Skin table.mceToolbar {margin-left:3px}
-.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
-.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
-.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
-.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
-.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
-.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
-.o2k7Skin td.mceCenter {text-align:center;}
-.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
-.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
-
-/* Button */
-.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
-.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
-.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
-.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
-.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
-.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.o2k7Skin .mceButtonLabeled {width:auto}
-.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
-.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
-.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
-
-/* Separator */
-.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
-
-/* ListBox */
-.o2k7Skin .mceListBox {padding-left: 3px}
-.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
-.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
-.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
-.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
-.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
-.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
-.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px}
-.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
-.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
-
-/* SplitButton */
-.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
-.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
-.o2k7Skin .mceSplitButton a.mceAction {width:22px}
-.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
-.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
-.o2k7Skin .mceSplitButton span.mceOpen {display:none}
-.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
-.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
-.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
-
-/* ColorSplitButton */
-.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
-.o2k7Skin .mceColorSplitMenu td {padding:2px}
-.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
-.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
-.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
-.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
-.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
-
-/* Menu */
-.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr}
-.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
-.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
-.o2k7Skin .mceMenu table {background:#FFF}
-.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
-.o2k7Skin .mceMenu td {height:20px}
-.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
-.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
-.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
-.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
-.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
-.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
-.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
-.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
-.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
-.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
-.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
-.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
-.o2k7Skin .mceMenu span.mceMenuLine {display:none}
-.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
-.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal}
-
-/* Progress,Resize */
-.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
-.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.o2k7Skin .mce_formatPreview a {font-size:10px}
-.o2k7Skin .mce_p span.mceText {}
-.o2k7Skin .mce_address span.mceText {font-style:italic}
-.o2k7Skin .mce_pre span.mceText {font-family:monospace}
-.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
-
-/* Theme */
-.o2k7Skin span.mce_bold {background-position:0 0}
-.o2k7Skin span.mce_italic {background-position:-60px 0}
-.o2k7Skin span.mce_underline {background-position:-140px 0}
-.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
-.o2k7Skin span.mce_undo {background-position:-160px 0}
-.o2k7Skin span.mce_redo {background-position:-100px 0}
-.o2k7Skin span.mce_cleanup {background-position:-40px 0}
-.o2k7Skin span.mce_bullist {background-position:-20px 0}
-.o2k7Skin span.mce_numlist {background-position:-80px 0}
-.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
-.o2k7Skin span.mce_justifyright {background-position:-480px 0}
-.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
-.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
-.o2k7Skin span.mce_anchor {background-position:-200px 0}
-.o2k7Skin span.mce_indent {background-position:-400px 0}
-.o2k7Skin span.mce_outdent {background-position:-540px 0}
-.o2k7Skin span.mce_link {background-position:-500px 0}
-.o2k7Skin span.mce_unlink {background-position:-640px 0}
-.o2k7Skin span.mce_sub {background-position:-600px 0}
-.o2k7Skin span.mce_sup {background-position:-620px 0}
-.o2k7Skin span.mce_removeformat {background-position:-580px 0}
-.o2k7Skin span.mce_newdocument {background-position:-520px 0}
-.o2k7Skin span.mce_image {background-position:-380px 0}
-.o2k7Skin span.mce_help {background-position:-340px 0}
-.o2k7Skin span.mce_code {background-position:-260px 0}
-.o2k7Skin span.mce_hr {background-position:-360px 0}
-.o2k7Skin span.mce_visualaid {background-position:-660px 0}
-.o2k7Skin span.mce_charmap {background-position:-240px 0}
-.o2k7Skin span.mce_paste {background-position:-560px 0}
-.o2k7Skin span.mce_copy {background-position:-700px 0}
-.o2k7Skin span.mce_cut {background-position:-680px 0}
-.o2k7Skin span.mce_blockquote {background-position:-220px 0}
-.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
-.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
-.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
-.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
-
-/* Plugins */
-.o2k7Skin span.mce_advhr {background-position:-0px -20px}
-.o2k7Skin span.mce_ltr {background-position:-20px -20px}
-.o2k7Skin span.mce_rtl {background-position:-40px -20px}
-.o2k7Skin span.mce_emotions {background-position:-60px -20px}
-.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
-.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
-.o2k7Skin span.mce_iespell {background-position:-120px -20px}
-.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
-.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
-.o2k7Skin span.mce_absolute {background-position:-180px -20px}
-.o2k7Skin span.mce_backward {background-position:-200px -20px}
-.o2k7Skin span.mce_forward {background-position:-220px -20px}
-.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
-.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
-.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
-.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
-.o2k7Skin span.mce_media {background-position:-320px -20px}
-.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
-.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
-.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
-.o2k7Skin span.mce_selectall {background-position:-400px -20px}
-.o2k7Skin span.mce_preview {background-position:-420px -20px}
-.o2k7Skin span.mce_print {background-position:-440px -20px}
-.o2k7Skin span.mce_cancel {background-position:-460px -20px}
-.o2k7Skin span.mce_save {background-position:-480px -20px}
-.o2k7Skin span.mce_replace {background-position:-500px -20px}
-.o2k7Skin span.mce_search {background-position:-520px -20px}
-.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
-.o2k7Skin span.mce_table {background-position:-580px -20px}
-.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
-.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
-.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
-.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
-.o2k7Skin span.mce_col_after {background-position:-680px -20px}
-.o2k7Skin span.mce_col_before {background-position:-700px -20px}
-.o2k7Skin span.mce_row_after {background-position:-720px -20px}
-.o2k7Skin span.mce_row_before {background-position:-740px -20px}
-.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
-.o2k7Skin span.mce_table_props {background-position:-980px -20px}
-.o2k7Skin span.mce_row_props {background-position:-780px -20px}
-.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
-.o2k7Skin span.mce_template {background-position:-820px -20px}
-.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
-.o2k7Skin span.mce_abbr {background-position:-860px -20px}
-.o2k7Skin span.mce_acronym {background-position:-880px -20px}
-.o2k7Skin span.mce_attribs {background-position:-900px -20px}
-.o2k7Skin span.mce_cite {background-position:-920px -20px}
-.o2k7Skin span.mce_del {background-position:-940px -20px}
-.o2k7Skin span.mce_ins {background-position:-960px -20px}
-.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
-.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
-.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
-.o2k7Skin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css
deleted file mode 100644
index 85812cde3f..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Black */
-.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
-.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
-.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
-.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
-.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
-.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
-.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css
deleted file mode 100644
index d64c361693..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Silver */
-.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
-.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
-.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
-.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
deleted file mode 100644
index c979af99b5..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
+++ /dev/null
@@ -1,132 +0,0 @@
-
-body.mceForceColors {background:#FFF; color:#000;}
-body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
-td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat center center}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
-
-/* WordPress styles */
-body {
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
- font-size: 13px;
- line-height: 19px;
- color: #333;
- margin: 10px;
-}
-
-.aligncenter,
-dl.aligncenter {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-.alignleft {
- float: left;
-}
-
-.alignright {
- float: right;
-}
-
-.wp-caption {
- border: 1px solid #ddd;
- text-align: center;
- background-color: #f3f3f3;
- padding-top: 4px;
- margin: 10px 0;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.mceIEcenter {
- text-align: center;
-}
-
-.wp-caption img {
- margin: 0;
- padding: 0;
- border: 0 none;
- -webkit-user-drag: none;
-}
-
-.wp-caption-dd {
- font-size: 11px;
- line-height: 17px;
- padding: 0 4px 5px;
- margin: 0;
-}
-
-pre {
- font: 12px/18px Consolas, Monaco, monospace;
-}
-
-td {
- color: #000;
- font-size: 11px;
- margin: 8px;
-}
-
-/* Styles for the WordPress plugins */
-img.mce-wp-nextpage,
-img.mce-wp-more {
- border: 0;
- border-top: 1px dotted #cccccc;
- display: block;
- width: 95%;
- height: 12px;
- margin: 15px auto 0;
-}
-
-img.mce-wp-more {
- background: transparent url("img/more_bug.gif") no-repeat right top;
-}
-
-img.mce-wp-nextpage {
- background: transparent url("img/page_bug.gif") no-repeat right top;
-}
-
-img.wp-gallery {
- border: 1px dashed #888;
- background: #f2f8ff url("img/gallery.png") no-repeat scroll center center;
- width: 99%;
- height: 250px;
-}
-
-img.wp-oembed {
- border: 1px dashed #888;
- background: #f7f5f2 url("img/embedded.png") no-repeat scroll center center;
- width: 300px;
- height: 250px;
-}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css
deleted file mode 100644
index 6eaf010a3a..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-background:#f1f1f1;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#f1f1f1;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;}
-a:hover {color:#2B6FB6;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-form {margin: 0;}
-fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #dfdfdf;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #dfdfdf;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert,
-#cancel,
-#apply,
-.mceActionPanel .button,
-input.mceButton,
-.updateButton {
- border: 1px solid #bbb;
- margin:0;
- padding:0 0 1px;
- font-weight:bold;
- font-size: 11px;
- width:94px;
- height:24px;
- color:#000;
- cursor:pointer;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background-color: #eee;
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff));
- background-image: -webkit-linear-gradient(bottom, #ddd, #fff);
- background-image: -moz-linear-gradient(bottom, #ddd, #fff);
- background-image: -o-linear-gradient(bottom, #ddd, #fff);
- background-image: linear-gradient(to top, #ddd, #fff);
-}
-
-#insert:hover,
-#cancel:hover,
-input.mceButton:hover,
-.updateButton:hover,
-#insert:focus,
-#cancel:focus,
-input.mceButton:focus,
-.updateButton:focus {
- border: 1px solid #555;
-}
-
-.mceActionPanel #insert {
- float: right;
-}
-
-/* Browse */
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor, a.browse {text-decoration:none}
-div.iframecontainer {background: #fff;}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-#charmap #charmapView {background-color:#fff;}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper {text-align:center; padding-top:4px; white-space: nowrap; float: right;}
-#colorpicker #insert, #colorpicker #cancel {width: 90px}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png
deleted file mode 100644
index 09d71ede10..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png
deleted file mode 100644
index e8c39fc889..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif
deleted file mode 100644
index 4589cb4dc6..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif
deleted file mode 100644
index a7fa1b2f04..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif
deleted file mode 100644
index 06812cb410..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/themes/advanced/source_editor.htm b/wp-includes/js/tinymce/themes/advanced/source_editor.htm
deleted file mode 100644
index 5548c693e8..0000000000
--- a/wp-includes/js/tinymce/themes/advanced/source_editor.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#advanced_dlg.code_title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=358-20121205"></script>
- <script type="text/javascript" src="js/source_editor.js?ver=358-20121205"></script>
-</head>
-<body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
- <form name="source" onsubmit="saveContent();return false;" action="#">
- <div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
-
- <div id="wrapline" style="float: right">
- <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
- </div>
-
- <br style="clear: both" />
-
- <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
-
- <div class="mceActionPanel">
- <input type="submit" role="button" name="insert" value="{#update}" id="insert" />
- <input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
- </div>
- </form>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/tiny_mce.js b/wp-includes/js/tinymce/tiny_mce.js
deleted file mode 100644
index 7814fdff01..0000000000
--- a/wp-includes/js/tinymce/tiny_mce.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.8-wp2",releaseDate:"2013-02-11",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&c.isArray(g)){return true}return typeof(g)==f},isArray:Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(a){var j=tinymce.VK,f=j.BACKSPACE,k=j.DELETE,e=a.dom,l=a.selection,H=a.settings,v=a.parser,o=a.serializer,E=tinymce.each;function A(N,M){try{a.getDoc().execCommand(N,false,M)}catch(L){}}function n(){var L=a.getDoc().documentMode;return L?L:6}function z(L){return L.isDefaultPrevented()}function J(){function L(R){var N,P,M,S,O,Q,T;function U(){if(O.nodeType==3){if(R&&Q==O.length){return true}if(!R&&Q===0){return true}}}N=l.getRng();var V=[N.startContainer,N.startOffset,N.endContainer,N.endOffset];if(!N.collapsed){R=true}O=N[(R?"start":"end")+"Container"];Q=N[(R?"start":"end")+"Offset"];if(O.nodeType==3){P=e.getParent(N.startContainer,e.isBlock);if(R){P=e.getNext(P,e.isBlock)}if(P&&(U()||!N.collapsed)){M=e.create("em",{id:"__mceDel"});E(tinymce.grep(P.childNodes),function(W){M.appendChild(W)});P.appendChild(M)}}N=e.createRng();N.setStart(V[0],V[1]);N.setEnd(V[2],V[3]);l.setRng(N);a.getDoc().execCommand(R?"ForwardDelete":"Delete",false,null);if(M){S=l.getBookmark();while(T=e.get("__mceDel")){e.remove(T,true)}l.moveToBookmark(S)}}a.onKeyDown.add(function(M,O){var N;N=O.keyCode==k;if(!z(O)&&(N||O.keyCode==f)&&!j.modifierPressed(O)){O.preventDefault();L(N)}});a.addCommand("Delete",function(){L()})}function q(){function L(O){var N=e.create("body");var P=O.cloneContents();N.appendChild(P);return l.serializer.serialize(N,{format:"html"})}function M(N){var P=L(N);var Q=e.createRng();Q.selectNode(a.getBody());var O=L(Q);return P===O}a.onKeyDown.add(function(O,Q){var P=Q.keyCode,N;if(!z(Q)&&(P==k||P==f)){N=O.selection.isCollapsed();if(N&&!e.isEmpty(O.getBody())){return}if(tinymce.isIE&&!N){return}if(!N&&!M(O.selection.getRng())){return}O.setContent("");O.selection.setCursorLocation(O.getBody(),0);O.nodeChanged()}})}function I(){a.onKeyDown.add(function(L,M){if(!z(M)&&M.keyCode==65&&j.metaKeyPressed(M)){M.preventDefault();L.execCommand("SelectAll")}})}function K(){if(!a.settings.content_editable){e.bind(a.getDoc(),"focusin",function(L){l.setRng(l.getRng())});e.bind(a.getDoc(),"mousedown",function(L){if(L.target==a.getDoc().documentElement){a.getWin().focus();l.setRng(l.getRng())}})}}function B(){a.onKeyDown.add(function(L,O){if(!z(O)&&O.keyCode===f){if(l.isCollapsed()&&l.getRng(true).startOffset===0){var N=l.getNode();var M=N.previousSibling;if(M&&M.nodeName&&M.nodeName.toLowerCase()==="hr"){e.remove(M);tinymce.dom.Event.cancel(O)}}}})}function y(){if(!Range.prototype.getClientRects){a.onMouseDown.add(function(M,N){if(!z(N)&&N.target.nodeName==="HTML"){var L=M.getBody();L.blur();setTimeout(function(){L.focus()},0)}})}}function h(){a.onClick.add(function(L,M){M=M.target;if(/^(IMG|HR)$/.test(M.nodeName)){l.getSel().setBaseAndExtent(M,0,M,1)}if(M.nodeName=="A"&&e.hasClass(M,"mceItemAnchor")){l.select(M)}L.nodeChanged()})}function c(){function M(){var O=e.getAttribs(l.getStart().cloneNode(false));return function(){var P=l.getStart();if(P!==a.getBody()){e.setAttrib(P,"style",null);E(O,function(Q){P.setAttributeNode(Q.cloneNode(true))})}}}function L(){return !l.isCollapsed()&&e.getParent(l.getStart(),e.isBlock)!=e.getParent(l.getEnd(),e.isBlock)}function N(O,P){P.preventDefault();return false}a.onKeyPress.add(function(O,Q){var P;if(!z(Q)&&(Q.keyCode==8||Q.keyCode==46)&&L()){P=M();O.getDoc().execCommand("delete",false,null);P();Q.preventDefault();return false}});e.bind(a.getDoc(),"cut",function(P){var O;if(!z(P)&&L()){O=M();a.onKeyUp.addToTop(N);setTimeout(function(){O();a.onKeyUp.remove(N)},0)}})}function b(){var M,L;e.bind(a.getDoc(),"selectionchange",function(){if(L){clearTimeout(L);L=0}L=window.setTimeout(function(){var N=l.getRng();if(!M||!tinymce.dom.RangeUtils.compareRanges(N,M)){a.nodeChanged();M=N}},50)})}function x(){document.body.setAttribute("role","application")}function t(){a.onKeyDown.add(function(L,N){if(!z(N)&&N.keyCode===f){if(l.isCollapsed()&&l.getRng(true).startOffset===0){var M=l.getNode().previousSibling;if(M&&M.nodeName&&M.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(N)}}}})}function C(){if(n()>7){return}A("RespectVisibilityInDesign",true);a.contentStyles.push(".mceHideBrInPre pre br {display: none}");e.addClass(a.getBody(),"mceHideBrInPre");v.addNodeFilter("pre",function(L,N){var O=L.length,Q,M,R,P;while(O--){Q=L[O].getAll("br");M=Q.length;while(M--){R=Q[M];P=R.prev;if(P&&P.type===3&&P.value.charAt(P.value-1)!="\n"){P.value+="\n"}else{R.parent.insert(new tinymce.html.Node("#text",3),R,true).value="\n"}}}});o.addNodeFilter("pre",function(L,N){var O=L.length,Q,M,R,P;while(O--){Q=L[O].getAll("br");M=Q.length;while(M--){R=Q[M];P=R.prev;if(P&&P.type==3){P.value=P.value.replace(/\r?\n$/,"")}}}})}function g(){e.bind(a.getBody(),"mouseup",function(N){var M,L=l.getNode();if(L.nodeName=="IMG"){if(M=e.getStyle(L,"width")){e.setAttrib(L,"width",M.replace(/[^0-9%]+/g,""));e.setStyle(L,"width","")}if(M=e.getStyle(L,"height")){e.setAttrib(L,"height",M.replace(/[^0-9%]+/g,""));e.setStyle(L,"height","")}}})}function d(){a.onKeyDown.add(function(R,S){var Q,L,M,O,P,T,N;Q=S.keyCode==k;if(!z(S)&&(Q||S.keyCode==f)&&!j.modifierPressed(S)){L=l.getRng();M=L.startContainer;O=L.startOffset;N=L.collapsed;if(M.nodeType==3&&M.nodeValue.length>0&&((O===0&&!N)||(N&&O===(Q?0:1)))){T=M.previousSibling;if(T&&T.nodeName=="IMG"){return}nonEmptyElements=R.schema.getNonEmptyElements();S.preventDefault();P=e.create("br",{id:"__tmp"});M.parentNode.insertBefore(P,M);R.getDoc().execCommand(Q?"ForwardDelete":"Delete",false,null);M=l.getRng().startContainer;T=M.previousSibling;if(T&&T.nodeType==1&&!e.isBlock(T)&&e.isEmpty(T)&&!nonEmptyElements[T.nodeName.toLowerCase()]){e.remove(T)}e.remove("__tmp")}}})}function G(){a.onKeyDown.add(function(P,Q){var N,M,R,L,O;if(z(Q)||Q.keyCode!=j.BACKSPACE){return}N=l.getRng();M=N.startContainer;R=N.startOffset;L=e.getRoot();O=M;if(!N.collapsed||R!==0){return}while(O&&O.parentNode&&O.parentNode.firstChild==O&&O.parentNode!=L){O=O.parentNode}if(O.tagName==="BLOCKQUOTE"){P.formatter.toggle("blockquote",null,O);N=e.createRng();N.setStart(M,0);N.setEnd(M,0);l.setRng(N)}})}function F(){function L(){a._refreshContentEditable();A("StyleWithCSS",false);A("enableInlineTableEditing",false);if(!H.object_resizing){A("enableObjectResizing",false)}}if(!H.readonly){a.onBeforeExecCommand.add(L);a.onMouseDown.add(L)}}function s(){function L(M,N){E(e.select("a"),function(Q){var O=Q.parentNode,P=e.getRoot();if(O.lastChild===Q){while(O&&!e.isBlock(O)){if(O.parentNode.lastChild!==O||O===P){return}O=O.parentNode}e.add(O,"br",{"data-mce-bogus":1})}})}a.onExecCommand.add(function(M,N){if(N==="CreateLink"){L(M)}});a.onSetContent.add(l.onSetContent.add(L))}function m(){if(H.forced_root_block){a.onInit.add(function(){A("DefaultParagraphSeparator",H.forced_root_block)})}}function p(){function L(N,M){if(!N||!M.initial){a.execCommand("mceRepaint")}}a.onUndo.add(L);a.onRedo.add(L);a.onSetContent.add(L)}function i(){a.onKeyDown.add(function(M,N){var L;if(!z(N)&&N.keyCode==f){L=M.getDoc().selection.createRange();if(L&&L.item){N.preventDefault();M.undoManager.beforeChange();e.remove(L.item(0));M.undoManager.add()}}})}function r(){var L;if(n()>=10){L="";E("p div h1 h2 h3 h4 h5 h6".split(" "),function(M,N){L+=(N>0?",":"")+M+":empty"});a.contentStyles.push(L+"{padding-right: 1px !important}")}}function u(){var N,M,ad,L,Y,ab,Z,ac,O,P,aa,W,V,X=document,T=a.getDoc();if(!H.object_resizing||H.webkit_fake_resize===false){return}A("enableObjectResizing",false);aa={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function R(ah){var ag,af;ag=ah.screenX-ab;af=ah.screenY-Z;W=ag*Y[2]+ac;V=af*Y[3]+O;W=W<5?5:W;V=V<5?5:V;if(j.modifierPressed(ah)||(ad.nodeName=="IMG"&&Y[2]*Y[3]!==0)){W=Math.round(V/P);V=Math.round(W*P)}e.setStyles(L,{width:W,height:V});if(Y[2]<0&&L.clientWidth<=W){e.setStyle(L,"left",N+(ac-W))}if(Y[3]<0&&L.clientHeight<=V){e.setStyle(L,"top",M+(O-V))}}function ae(){function af(ag,ah){if(ah){if(ad.style[ag]||!a.schema.isValid(ad.nodeName.toLowerCase(),ag)){e.setStyle(ad,ag,ah)}else{e.setAttrib(ad,ag,ah)}}}af("width",W);af("height",V);e.unbind(T,"mousemove",R);e.unbind(T,"mouseup",ae);if(X!=T){e.unbind(X,"mousemove",R);e.unbind(X,"mouseup",ae)}e.remove(L);Q(ad)}function Q(ai){var ag,ah,af;S();ag=e.getPos(ai);N=ag.x;M=ag.y;ah=ai.offsetWidth;af=ai.offsetHeight;if(ad!=ai){ad=ai;W=V=0}E(aa,function(al,aj){var ak;ak=e.get("mceResizeHandle"+aj);if(!ak){ak=e.add(T.documentElement,"div",{id:"mceResizeHandle"+aj,"class":"mceResizeHandle",style:"cursor:"+aj+"-resize; margin:0; padding:0"});e.bind(ak,"mousedown",function(am){am.preventDefault();ae();ab=am.screenX;Z=am.screenY;ac=ad.clientWidth;O=ad.clientHeight;P=O/ac;Y=al;L=ad.cloneNode(true);e.addClass(L,"mceClonedResizable");e.setStyles(L,{left:N,top:M,margin:0});T.documentElement.appendChild(L);e.bind(T,"mousemove",R);e.bind(T,"mouseup",ae);if(X!=T){e.bind(X,"mousemove",R);e.bind(X,"mouseup",ae)}})}else{e.show(ak)}e.setStyles(ak,{left:(ah*al[0]+N)-(ak.offsetWidth/2),top:(af*al[1]+M)-(ak.offsetHeight/2)})});if(!tinymce.isOpera&&ad.nodeName=="IMG"){ad.setAttribute("data-mce-selected","1")}}function S(){if(ad){ad.removeAttribute("data-mce-selected")}for(var af in aa){e.hide("mceResizeHandle"+af)}}a.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function U(){var af=e.getParent(l.getNode(),"table,img");E(e.select("img[data-mce-selected]"),function(ag){ag.removeAttribute("data-mce-selected")});if(af){Q(af)}else{S()}}a.onNodeChange.add(U);e.bind(T,"selectionchange",U);a.serializer.addAttributeFilter("data-mce-selected",function(af,ag){var ah=af.length;while(ah--){af[ah].attr(ag,null)}})}function D(){if(n()<9){v.addNodeFilter("noscript",function(L){var M=L.length,N,O;while(M--){N=L[M];O=N.firstChild;if(O){N.attr("data-mce-innertext",O.value)}}});o.addNodeFilter("noscript",function(L){var M=L.length,N,P,O;while(M--){N=L[M];P=L[M].firstChild;if(P){P.value=tinymce.html.Entities.decode(P.value)}else{O=N.attributes.map["data-mce-innertext"];if(O){N.attr("data-mce-innertext",null);P=new tinymce.html.Node("#text",3);P.value=O;P.raw=true;N.append(P)}}}})}}t();G();q();if(tinymce.isWebKit){d();J();K();h();m();if(tinymce.isIDevice){b()}else{u();I()}}if(tinymce.isIE){B();x();C();g();i();r();D()}if(tinymce.isGecko){B();y();c();F();s();p()}if(tinymce.isOpera){u()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G.toUpperCase()]={};v[G]={}}if(!s[G]){s[G]=s[K]}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getTextBlockElements=function(){return textBlockElementsMap};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x;u.elements=s}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-mce-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(n){var p,q,y,x,A,o,r,l,u,v,k,t,m,z,s;t=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();m=h.getTextBlockElements();for(p=0;p<n.length;p++){q=n[p];if(!q.parent||q.fixed){continue}if(m[q.name]&&q.parent.name=="li"){z=q.next;while(z){if(m[z.name]){z.name="li";z.fixed=true;q.parent.insert(z,q.parent)}else{break}z=z.next}q.unwrap(q);continue}x=[q];for(y=q.parent;y&&!h.isValidChild(y.name,q.name)&&!t[y.name];y=y.parent){x.push(y)}if(y&&x.length>1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u<x.length-1;u++){if(h.isValidChild(o.name,x[u].name)){r=f.filterNode(x[u].clone());o.append(r)}else{r=o}for(l=x[u].firstChild;l&&l!=x[u+1];){s=l.next;r.append(l);l=s}o=r}if(!A.isEmpty(k)){y.insert(A,x[0],true);y.insert(q,A)}else{y.insert(q,x[0],true)}y=x[0];if(y.isEmpty(k)||y.firstChild===y.lastChild&&y.firstChild.name==="br"){y.empty().remove()}}else{if(q.parent){if(q.name==="li"){z=q.prev;if(z&&(z.name==="ul"||z.name==="ul")){z.append(q);continue}z=q.next;if(z&&(z.name==="ul"||z.name==="ul")){z.insert(q,z.firstChild,true);continue}q.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(q.parent.name,"div")&&h.isValidChild("div",q.name)){q.wrap(f.filterNode(new a("div",1)))}else{if(q.name==="style"||q.name==="script"){q.empty().remove()}else{q.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(k.readyState=="complete"){i();return}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){if(!q){return false}var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="<span>\uFEFF</span>";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},scrollIntoView:function(k){var j,h,g=this,i=g.dom;h=i.getViewPort(g.editor.getWin());j=i.getPos(k).y;if(j<h.y||j+25>h.y+h.h){g.editor.getWin().scrollTo(0,j<h.y?j:j-h.h+25)}},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}a.cancel(z);break;case u:if(i){q.moveFocus(1)}a.cancel(z);break;case y:if(o){q.moveFocus(-1)}a.cancel(z);break;case A:if(o){q.moveFocus(1)}a.cancel(z);break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keydown",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){b.dom.Event.cancel(f);return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_style){G.contentStyles.push(H.content_style)}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(k.isIE8){if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,o=m.getContainer(),n=m.getDoc();if(!m.removed){m.removed=1;if(b&&n){n.execCommand("SelectAll")}m.save();l.setStyle(m.id,"display",m.orgDisplay);if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(o);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(o)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getBody(),"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(j.nodeType===3&&j.nodeValue.length==0){l=j;j=j.nextSibling;e.remove(l);continue}if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,A=a.isArray,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G="\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function I(ab){return !!aa.schema.getTextBlocks()[ab.toLowerCase()]}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)&&(!am.inline||!H(aA))){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===3){return}if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)&&!ay(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,I)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(B){var v=e.getRng(true),G,j,A,u,p,M,C,o,k,n,t,J,x,D;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function z(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(U<S.y||U+25>S.y+S.h){f.getWin().scrollTo(0,U<S.y?U:U-S.h+25)}}function r(O){var P=A,R,Q,N;R=O||t=="TABLE"?i.create(O||x):p.cloneNode(false);N=R;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(P.nodeName)){if(P.id=="_mce_caret"){continue}Q=P.cloneNode(false);i.setAttrib(Q,"id","");if(R.hasChildNodes()){Q.appendChild(R.firstChild);R.appendChild(Q)}else{N=Q;R.appendChild(Q)}}}while(P=P.parentNode)}if(!b.isIE){N.innerHTML='<br data-mce-bogus="1">'}return R}function q(Q){var P,O,N;if(A.nodeType==3&&(Q?u>0:u<A.nodeValue.length)){return false}if(A.parentNode==p&&D&&!Q){return true}if(Q&&A.nodeType==1&&A==p.firstChild){return true}if(A.nodeName==="TABLE"||(A.previousSibling&&A.previousSibling.nodeName=="TABLE")){return(D&&!Q)||(!D&&Q)}P=new a(A,p);if(A.nodeType==3){if(Q&&u==0){P.prev()}else{if(!Q&&u==A.nodeValue.length){P.next()}}}while(O=P.current()){if(O.nodeType===1){if(!O.getAttribute("data-mce-bogus")){N=O.nodeName.toLowerCase();if(c[N]&&N!=="br"){return false}}}else{if(O.nodeType===3&&!/^[ \t\r\n]*$/.test(O.nodeValue)){return false}}if(Q){P.prev()}else{P.next()}}return true}function l(N,T){var U,S,P,R,Q,O=x||"P";S=i.getParent(N,i.isBlock);if(!S||!E(S)){S=S||j;if(!S.hasChildNodes()){U=i.create(O);S.appendChild(U);v.setStart(U,0);v.setEnd(U,0);return U}R=N;while(R.parentNode!=S){R=R.parentNode}while(R&&!i.isBlock(R)){P=R;R=R.previousSibling}if(P){U=i.create(O);P.parentNode.insertBefore(U,P);R=P;while(R&&!i.isBlock(R)){Q=R.nextSibling;U.appendChild(R);R=Q}v.setStart(N,T);v.setEnd(N,T)}}return N}function H(){function N(P){var O=n[P?"firstChild":"lastChild"];while(O){if(O.nodeType==1){break}O=O[P?"nextSibling":"previousSibling"]}return O===p}o=x?r(x):i.create("BR");if(N(true)&&N()){i.replace(o,n)}else{if(N(true)){n.parentNode.insertBefore(o,n)}else{if(N()){i.insertAfter(o,n);F(o)}else{G=v.cloneRange();G.setStartAfter(p);G.setEndAfter(n);k=G.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function y(){var O=new a(A,p),N;while(N=O.next()){if(c[N.nodeName.toLowerCase()]||N.length>0){return true}}}function L(){var P,O,N;if(A&&A.nodeType==3&&u>=A.nodeValue.length){if(!b.isIE&&!y()){P=i.create("br");v.insertNode(P);v.setStartAfter(P);v.setEndAfter(P);O=true}}P=i.create("br");v.insertNode(P);if(b.isIE&&t=="PRE"&&(!M||M<8)){P.parentNode.insertBefore(i.doc.createTextNode("\r"),P)}N=i.create("span",{},"&nbsp;");P.parentNode.insertBefore(N,P);e.scrollIntoView(N);i.remove(N);if(!O){v.setStartAfter(P);v.setEndAfter(P)}else{v.setStartBefore(P);v.setEndBefore(P)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(B.isDefaultPrevented()){return}A=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;C=B.shiftKey;if(A.nodeType==1&&A.hasChildNodes()){D=u>A.childNodes.length-1;A=A.childNodes[Math.min(u,A.childNodes.length-1)]||A;if(D&&A.nodeType==3){u=A.nodeValue.length}else{u=0}}j=K(A);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||C){L()}return}if((x&&!C)||(!x&&C)){A=l(A,u)}p=i.getParent(A,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!B.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&C){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!C){L();return}}else{if((!x&&!C&&t!="LI")||(x&&C)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);z(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/tiny_mce_popup.js b/wp-includes/js/tinymce/tiny_mce_popup.js
deleted file mode 100644
index bb8e58c88a..0000000000
--- a/wp-includes/js/tinymce/tiny_mce_popup.js
+++ /dev/null
@@ -1,5 +0,0 @@
-
-// Uncomment and change this document.domain value if you are loading the script cross subdomains
-// document.domain = 'moxiecode.com';
-
-var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/utils/editable_selects.js b/wp-includes/js/tinymce/utils/editable_selects.js
deleted file mode 100644
index 4d9ffe272b..0000000000
--- a/wp-includes/js/tinymce/utils/editable_selects.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * editable_selects.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-var TinyMCE_EditableSelects = {
- editSelectElm : null,
-
- init : function() {
- var nl = document.getElementsByTagName("select"), i, d = document, o;
-
- for (i=0; i<nl.length; i++) {
- if (nl[i].className.indexOf('mceEditableSelect') != -1) {
- o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
-
- o.className = 'mceAddSelectValue';
-
- nl[i].options[nl[i].options.length] = o;
- nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
- }
- }
- },
-
- onChangeEditableSelect : function(e) {
- var d = document, ne, se = window.event ? window.event.srcElement : e.target;
-
- if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
- ne = d.createElement("input");
- ne.id = se.id + "_custom";
- ne.name = se.name + "_custom";
- ne.type = "text";
-
- ne.style.width = se.offsetWidth + 'px';
- se.parentNode.insertBefore(ne, se);
- se.style.display = 'none';
- ne.focus();
- ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
- ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
- TinyMCE_EditableSelects.editSelectElm = se;
- }
- },
-
- onBlurEditableSelectInput : function() {
- var se = TinyMCE_EditableSelects.editSelectElm;
-
- if (se) {
- if (se.previousSibling.value != '') {
- addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
- selectByValue(document.forms[0], se.id, se.previousSibling.value);
- } else
- selectByValue(document.forms[0], se.id, '');
-
- se.style.display = 'inline';
- se.parentNode.removeChild(se.previousSibling);
- TinyMCE_EditableSelects.editSelectElm = null;
- }
- },
-
- onKeyDown : function(e) {
- e = e || window.event;
-
- if (e.keyCode == 13)
- TinyMCE_EditableSelects.onBlurEditableSelectInput();
- }
-};
diff --git a/wp-includes/js/tinymce/utils/form_utils.js b/wp-includes/js/tinymce/utils/form_utils.js
deleted file mode 100644
index 6f62fe606d..0000000000
--- a/wp-includes/js/tinymce/utils/form_utils.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * form_utils.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
-
-function getColorPickerHTML(id, target_form_element) {
- var h = "", dom = tinyMCEPopup.dom;
-
- if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
- label.id = label.id || dom.uniqueId();
- }
-
- h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
- h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
-
- return h;
-}
-
-function updateColor(img_id, form_element_id) {
- document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
-}
-
-function setBrowserDisabled(id, state) {
- var img = document.getElementById(id);
- var lnk = document.getElementById(id + "_link");
-
- if (lnk) {
- if (state) {
- lnk.setAttribute("realhref", lnk.getAttribute("href"));
- lnk.removeAttribute("href");
- tinyMCEPopup.dom.addClass(img, 'disabled');
- } else {
- if (lnk.getAttribute("realhref"))
- lnk.setAttribute("href", lnk.getAttribute("realhref"));
-
- tinyMCEPopup.dom.removeClass(img, 'disabled');
- }
- }
-}
-
-function getBrowserHTML(id, target_form_element, type, prefix) {
- var option = prefix + "_" + type + "_browser_callback", cb, html;
-
- cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
-
- if (!cb)
- return "";
-
- html = "";
- html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
- html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
-
- return html;
-}
-
-function openBrowser(img_id, target_form_element, type, option) {
- var img = document.getElementById(img_id);
-
- if (img.className != "mceButtonDisabled")
- tinyMCEPopup.openBrowser(target_form_element, type, option);
-}
-
-function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
- if (!form_obj || !form_obj.elements[field_name])
- return;
-
- if (!value)
- value = "";
-
- var sel = form_obj.elements[field_name];
-
- var found = false;
- for (var i=0; i<sel.options.length; i++) {
- var option = sel.options[i];
-
- if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
- option.selected = true;
- found = true;
- } else
- option.selected = false;
- }
-
- if (!found && add_custom && value != '') {
- var option = new Option(value, value);
- option.selected = true;
- sel.options[sel.options.length] = option;
- sel.selectedIndex = sel.options.length - 1;
- }
-
- return found;
-}
-
-function getSelectValue(form_obj, field_name) {
- var elm = form_obj.elements[field_name];
-
- if (elm == null || elm.options == null || elm.selectedIndex === -1)
- return "";
-
- return elm.options[elm.selectedIndex].value;
-}
-
-function addSelectValue(form_obj, field_name, name, value) {
- var s = form_obj.elements[field_name];
- var o = new Option(name, value);
- s.options[s.options.length] = o;
-}
-
-function addClassesToList(list_id, specific_option) {
- // Setup class droplist
- var styleSelectElm = document.getElementById(list_id);
- var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
- styles = tinyMCEPopup.getParam(specific_option, styles);
-
- if (styles) {
- var stylesAr = styles.split(';');
-
- for (var i=0; i<stylesAr.length; i++) {
- if (stylesAr != "") {
- var key, value;
-
- key = stylesAr[i].split('=')[0];
- value = stylesAr[i].split('=')[1];
-
- styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
- }
- }
- } else {
- tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
- styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
- });
- }
-}
-
-function isVisible(element_id) {
- var elm = document.getElementById(element_id);
-
- return elm && elm.style.display != "none";
-}
-
-function convertRGBToHex(col) {
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
-
- var rgb = col.replace(re, "$1,$2,$3").split(',');
- if (rgb.length == 3) {
- r = parseInt(rgb[0]).toString(16);
- g = parseInt(rgb[1]).toString(16);
- b = parseInt(rgb[2]).toString(16);
-
- r = r.length == 1 ? '0' + r : r;
- g = g.length == 1 ? '0' + g : g;
- b = b.length == 1 ? '0' + b : b;
-
- return "#" + r + g + b;
- }
-
- return col;
-}
-
-function convertHexToRGB(col) {
- if (col.indexOf('#') != -1) {
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
-
- r = parseInt(col.substring(0, 2), 16);
- g = parseInt(col.substring(2, 4), 16);
- b = parseInt(col.substring(4, 6), 16);
-
- return "rgb(" + r + "," + g + "," + b + ")";
- }
-
- return col;
-}
-
-function trimSize(size) {
- return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
-}
-
-function getCSSSize(size) {
- size = trimSize(size);
-
- if (size == "")
- return "";
-
- // Add px
- if (/^[0-9]+$/.test(size))
- size += 'px';
- // Sanity check, IE doesn't like broken values
- else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
- return "";
-
- return size;
-}
-
-function getStyle(elm, attrib, style) {
- var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
-
- if (val != '')
- return '' + val;
-
- if (typeof(style) == 'undefined')
- style = attrib;
-
- return tinyMCEPopup.dom.getStyle(elm, style);
-}
diff --git a/wp-includes/js/tinymce/utils/mctabs.js b/wp-includes/js/tinymce/utils/mctabs.js
deleted file mode 100644
index 027ef40e74..0000000000
--- a/wp-includes/js/tinymce/utils/mctabs.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * mctabs.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-function MCTabs() {
- this.settings = [];
- this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
-};
-
-MCTabs.prototype.init = function(settings) {
- this.settings = settings;
-};
-
-MCTabs.prototype.getParam = function(name, default_value) {
- var value = null;
-
- value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
-
- // Fix bool values
- if (value == "true" || value == "false")
- return (value == "true");
-
- return value;
-};
-
-MCTabs.prototype.showTab =function(tab){
- tab.className = 'current';
- tab.setAttribute("aria-selected", true);
- tab.setAttribute("aria-expanded", true);
- tab.tabIndex = 0;
-};
-
-MCTabs.prototype.hideTab =function(tab){
- var t=this;
-
- tab.className = '';
- tab.setAttribute("aria-selected", false);
- tab.setAttribute("aria-expanded", false);
- tab.tabIndex = -1;
-};
-
-MCTabs.prototype.showPanel = function(panel) {
- panel.className = 'current';
- panel.setAttribute("aria-hidden", false);
-};
-
-MCTabs.prototype.hidePanel = function(panel) {
- panel.className = 'panel';
- panel.setAttribute("aria-hidden", true);
-};
-
-MCTabs.prototype.getPanelForTab = function(tabElm) {
- return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
-};
-
-MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
- var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
-
- tabElm = document.getElementById(tab_id);
-
- if (panel_id === undefined) {
- panel_id = t.getPanelForTab(tabElm);
- }
-
- panelElm= document.getElementById(panel_id);
- panelContainerElm = panelElm ? panelElm.parentNode : null;
- tabContainerElm = tabElm ? tabElm.parentNode : null;
- selectionClass = t.getParam('selection_class', 'current');
-
- if (tabElm && tabContainerElm) {
- nodes = tabContainerElm.childNodes;
-
- // Hide all other tabs
- for (i = 0; i < nodes.length; i++) {
- if (nodes[i].nodeName == "LI") {
- t.hideTab(nodes[i]);
- }
- }
-
- // Show selected tab
- t.showTab(tabElm);
- }
-
- if (panelElm && panelContainerElm) {
- nodes = panelContainerElm.childNodes;
-
- // Hide all other panels
- for (i = 0; i < nodes.length; i++) {
- if (nodes[i].nodeName == "DIV")
- t.hidePanel(nodes[i]);
- }
-
- if (!avoid_focus) {
- tabElm.focus();
- }
-
- // Show selected panel
- t.showPanel(panelElm);
- }
-};
-
-MCTabs.prototype.getAnchor = function() {
- var pos, url = document.location.href;
-
- if ((pos = url.lastIndexOf('#')) != -1)
- return url.substring(pos + 1);
-
- return "";
-};
-
-
-//Global instance
-var mcTabs = new MCTabs();
-
-tinyMCEPopup.onInit.add(function() {
- var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
-
- each(dom.select('div.tabs'), function(tabContainerElm) {
- var keyNav;
-
- dom.setAttrib(tabContainerElm, "role", "tablist");
-
- var items = tinyMCEPopup.dom.select('li', tabContainerElm);
- var action = function(id) {
- mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
- mcTabs.onChange.dispatch(id);
- };
-
- each(items, function(item) {
- dom.setAttrib(item, 'role', 'tab');
- dom.bind(item, 'click', function(evt) {
- action(item.id);
- });
- });
-
- dom.bind(dom.getRoot(), 'keydown', function(evt) {
- if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
- keyNav.moveFocus(evt.shiftKey ? -1 : 1);
- tinymce.dom.Event.cancel(evt);
- }
- });
-
- each(dom.select('a', tabContainerElm), function(a) {
- dom.setAttrib(a, 'tabindex', '-1');
- });
-
- keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
- root: tabContainerElm,
- items: items,
- onAction: action,
- actOnFocus: true,
- enableLeftRight: true,
- enableUpDown: true
- }, tinyMCEPopup.dom);
- });
-}); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/utils/validate.js b/wp-includes/js/tinymce/utils/validate.js
deleted file mode 100644
index 760d0290fd..0000000000
--- a/wp-includes/js/tinymce/utils/validate.js
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * validate.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-/**
- // String validation:
-
- if (!Validator.isEmail('myemail'))
- alert('Invalid email.');
-
- // Form validation:
-
- var f = document.forms['myform'];
-
- if (!Validator.isEmail(f.myemail))
- alert('Invalid email.');
-*/
-
-var Validator = {
- isEmail : function(s) {
- return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
- },
-
- isAbsUrl : function(s) {
- return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
- },
-
- isSize : function(s) {
- return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
- },
-
- isId : function(s) {
- return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
- },
-
- isEmpty : function(s) {
- var nl, i;
-
- if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
- return true;
-
- if (s.type == 'checkbox' && !s.checked)
- return true;
-
- if (s.type == 'radio') {
- for (i=0, nl = s.form.elements; i<nl.length; i++) {
- if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
- return false;
- }
-
- return true;
- }
-
- return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
- },
-
- isNumber : function(s, d) {
- return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
- },
-
- test : function(s, p) {
- s = s.nodeType == 1 ? s.value : s;
-
- return s == '' || new RegExp(p).test(s);
- }
-};
-
-var AutoValidator = {
- settings : {
- id_cls : 'id',
- int_cls : 'int',
- url_cls : 'url',
- number_cls : 'number',
- email_cls : 'email',
- size_cls : 'size',
- required_cls : 'required',
- invalid_cls : 'invalid',
- min_cls : 'min',
- max_cls : 'max'
- },
-
- init : function(s) {
- var n;
-
- for (n in s)
- this.settings[n] = s[n];
- },
-
- validate : function(f) {
- var i, nl, s = this.settings, c = 0;
-
- nl = this.tags(f, 'label');
- for (i=0; i<nl.length; i++) {
- this.removeClass(nl[i], s.invalid_cls);
- nl[i].setAttribute('aria-invalid', false);
- }
-
- c += this.validateElms(f, 'input');
- c += this.validateElms(f, 'select');
- c += this.validateElms(f, 'textarea');
-
- return c == 3;
- },
-
- invalidate : function(n) {
- this.mark(n.form, n);
- },
-
- getErrorMessages : function(f) {
- var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
- nl = this.tags(f, "label");
- for (i=0; i<nl.length; i++) {
- if (this.hasClass(nl[i], s.invalid_cls)) {
- field = document.getElementById(nl[i].getAttribute("for"));
- values = { field: nl[i].textContent };
- if (this.hasClass(field, s.min_cls, true)) {
- message = ed.getLang('invalid_data_min');
- values.min = this.getNum(field, s.min_cls);
- } else if (this.hasClass(field, s.number_cls)) {
- message = ed.getLang('invalid_data_number');
- } else if (this.hasClass(field, s.size_cls)) {
- message = ed.getLang('invalid_data_size');
- } else {
- message = ed.getLang('invalid_data');
- }
-
- message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
- return values[b] || '{#' + b + '}';
- });
- messages.push(message);
- }
- }
- return messages;
- },
-
- reset : function(e) {
- var t = ['label', 'input', 'select', 'textarea'];
- var i, j, nl, s = this.settings;
-
- if (e == null)
- return;
-
- for (i=0; i<t.length; i++) {
- nl = this.tags(e.form ? e.form : e, t[i]);
- for (j=0; j<nl.length; j++) {
- this.removeClass(nl[j], s.invalid_cls);
- nl[j].setAttribute('aria-invalid', false);
- }
- }
- },
-
- validateElms : function(f, e) {
- var nl, i, n, s = this.settings, st = true, va = Validator, v;
-
- nl = this.tags(f, e);
- for (i=0; i<nl.length; i++) {
- n = nl[i];
-
- this.removeClass(n, s.invalid_cls);
-
- if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.size_cls) && !va.isSize(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.id_cls) && !va.isId(n))
- st = this.mark(f, n);
-
- if (this.hasClass(n, s.min_cls, true)) {
- v = this.getNum(n, s.min_cls);
-
- if (isNaN(v) || parseInt(n.value) < parseInt(v))
- st = this.mark(f, n);
- }
-
- if (this.hasClass(n, s.max_cls, true)) {
- v = this.getNum(n, s.max_cls);
-
- if (isNaN(v) || parseInt(n.value) > parseInt(v))
- st = this.mark(f, n);
- }
- }
-
- return st;
- },
-
- hasClass : function(n, c, d) {
- return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
- },
-
- getNum : function(n, c) {
- c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
- c = c.replace(/[^0-9]/g, '');
-
- return c;
- },
-
- addClass : function(n, c, b) {
- var o = this.removeClass(n, c);
- n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
- },
-
- removeClass : function(n, c) {
- c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
- return n.className = c != ' ' ? c : '';
- },
-
- tags : function(f, s) {
- return f.getElementsByTagName(s);
- },
-
- mark : function(f, n) {
- var s = this.settings;
-
- this.addClass(n, s.invalid_cls);
- n.setAttribute('aria-invalid', 'true');
- this.markLabels(f, n, s.invalid_cls);
-
- return false;
- },
-
- markLabels : function(f, n, ic) {
- var nl, i;
-
- nl = this.tags(f, "label");
- for (i=0; i<nl.length; i++) {
- if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
- this.addClass(nl[i], ic);
- }
-
- return null;
- }
-};
diff --git a/wp-includes/js/tinymce/wp-mce-help.php b/wp-includes/js/tinymce/wp-mce-help.php
deleted file mode 100644
index 88c728b447..0000000000
--- a/wp-includes/js/tinymce/wp-mce-help.php
+++ /dev/null
@@ -1,281 +0,0 @@
-<?php
-/**
- * @package TinyMCE
- * @author Moxiecode
- * @copyright Copyright © 2005-2006, Moxiecode Systems AB, All rights reserved.
- */
-
-/** @ignore */
-require_once('../../../wp-load.php');
-header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
-<head>
-<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
-<title><?php _e('Rich Editor Help'); ?></title>
-<script type="text/javascript" src="tiny_mce_popup.js?ver=358-20121205"></script>
-<?php
-wp_admin_css( 'wp-admin', true );
-?>
-<style type="text/css">
- body {
- min-width: 0;
- }
- #wphead {
- font-size: 80%;
- border-top: 0;
- color: #555;
- background-color: #f1f1f1;
- }
- #wphead h1 {
- font-size: 24px;
- color: #555;
- margin: 0;
- padding: 10px;
- }
- #tabs {
- padding: 15px 15px 3px;
- background-color: #f1f1f1;
- border-bottom: 1px solid #dfdfdf;
- margin: 0;
- }
- #tabs li {
- display: inline;
- }
- #tabs a.current {
- background-color: #fff;
- border-color: #dfdfdf;
- border-bottom-color: #fff;
- color: #d54e21;
- }
- #tabs a {
- color: #2583AD;
- padding: 6px;
- border-width: 1px 1px 0;
- border-style: solid solid none;
- border-color: #f1f1f1;
- text-decoration: none;
- }
- #tabs a:hover {
- color: #d54e21;
- }
- .wrap h2 {
- border-bottom-color: #dfdfdf;
- color: #555;
- margin: 5px 0;
- padding: 0;
- font-size: 18px;
- }
- #user_info {
- right: 5%;
- top: 5px;
- }
- h3 {
- font-size: 1.1em;
- margin-top: 10px;
- margin-bottom: 0px;
- }
- #flipper {
- margin: 0;
- padding: 5px 20px 10px;
- background-color: #fff;
- border-left: 1px solid #dfdfdf;
- border-bottom: 1px solid #dfdfdf;
- }
- * html {
- overflow-x: hidden;
- overflow-y: scroll;
- }
- #flipper div p {
- margin-top: 0.4em;
- margin-bottom: 0.8em;
- text-align: justify;
- }
- th {
- text-align: center;
- }
- .top th {
- text-decoration: underline;
- }
- .top .key {
- text-align: center;
- width: 5em;
- }
- .top .action {
- text-align: left;
- }
- .align {
- border-left: 3px double #333;
- border-right: 3px double #333;
- }
- .keys {
- margin-bottom: 15px;
- width: 100%;
- border: 0 none;
- }
- .keys p {
- display: inline-block;
- margin: 0px;
- padding: 0px;
- }
- .keys .left { text-align: left; }
- .keys .center { text-align: center; }
- .keys .right { text-align: right; }
- td b {
- font-family: "Times New Roman" Times serif;
- }
- #buttoncontainer {
- text-align: center;
- margin-bottom: 20px;
- }
- #buttoncontainer a, #buttoncontainer a:hover {
- border-bottom: 0px;
- }
- .macos .win,
- .windows .mac {
- display: none;
- }
-</style>
-<?php if ( is_rtl() ) : ?>
-<style type="text/css">
- #wphead, #tabs {
- padding-left: auto;
- padding-right: 15px;
- }
- #flipper {
- margin: 5px 0 3px 10px;
- }
- .keys .left, .top, .action { text-align: right; }
- .keys .right { text-align: left; }
- td b { font-family: Tahoma, "Times New Roman", Times, serif }
-</style>
-<?php endif; ?>
-</head>
-<body class="windows wp-core-ui">
-<script type="text/javascript">
-if ( tinymce.isMac )
- document.body.className = document.body.className.replace(/windows/, 'macos');
-</script>
-
-<ul id="tabs">
- <li><a id="tab1" href="javascript:flipTab(1)" title="<?php esc_attr_e('Basics of Rich Editing'); ?>" accesskey="1" class="current"><?php _e('Basics'); ?></a></li>
- <li><a id="tab2" href="javascript:flipTab(2)" title="<?php esc_attr_e('Advanced use of the Rich Editor'); ?>" accesskey="2"><?php _e('Advanced'); ?></a></li>
- <li><a id="tab3" href="javascript:flipTab(3)" title="<?php esc_attr_e('Hotkeys'); ?>" accesskey="3"><?php _e('Hotkeys'); ?></a></li>
- <li><a id="tab4" href="javascript:flipTab(4)" title="<?php esc_attr_e('About the software'); ?>" accesskey="4"><?php _e('About'); ?></a></li>
-</ul>
-
-<div id="flipper" class="wrap">
-
-<div id="content1">
- <h2><?php _e('Rich Editing Basics'); ?></h2>
- <p><?php _e('<em>Rich editing</em>, also called WYSIWYG for What You See Is What You Get, means your text is formatted as you type. The rich editor creates HTML code behind the scenes while you concentrate on writing. Font styles, links and images all appear approximately as they will on the internet.'); ?></p>
- <p><?php _e('WordPress includes a rich HTML editor that works well in all major web browsers used today. However editing HTML is not the same as typing text. Each web page has two major components: the structure, which is the actual HTML code and is produced by the editor as you type, and the display, that is applied to it by the currently selected WordPress theme and is defined in style.css. WordPress is producing valid XHTML 1.0 which means that inserting multiple line breaks (BR tags) after a paragraph would not produce white space on the web page. The BR tags will be removed as invalid by the internal HTML correcting functions.'); ?></p>
- <p><?php _e('While using the editor, most basic keyboard shortcuts work like in any other text editor. For example: Shift+Enter inserts line break, Ctrl+C = copy, Ctrl+X = cut, Ctrl+Z = undo, Ctrl+Y = redo, Ctrl+A = select all, etc. (on Mac use the Command key instead of Ctrl). See the Hotkeys tab for all available keyboard shortcuts.'); ?></p>
- <p><?php _e('If you do not like the way the rich editor works, you may turn it off from Your Profile submenu, under Users in the admin menu.'); ?></p>
-</div>
-
-<div id="content2" class="hidden">
- <h2><?php _e('Advanced Rich Editing'); ?></h2>
- <h3><?php _e('Images and Attachments'); ?></h3>
- <p><?php _e('There is a button in the editor toolbar for inserting images that are already hosted somewhere on the internet. If you have a URL for an image, click this button and enter the URL in the box which appears.'); ?></p>
- <p><?php _e('If you need to upload an image or another media file from your computer, you can use the Media Library button above the editor. The media library will attempt to create a thumbnail-sized copy from each uploaded image. To insert your image into the post, first click on the thumbnail to reveal a menu of options. When you have selected the options you like, click "Insert into Post" and your image or file will appear in the post you are editing.'); ?></p>
- <h3><?php _e('HTML in the Rich Editor'); ?></h3>
- <p><?php _e('Any HTML entered directly into the rich editor will show up as text when the post is viewed. What you see is what you get. When you want to include HTML elements that cannot be generated with the toolbar buttons, you must enter it by hand in the Text editor. Examples are tables and &lt;code&gt;. To do this, click the Text tab and edit the code, then switch back to Visual mode. If the code is valid and understood by the editor, you should see it rendered immediately.'); ?></p>
- <h3><?php _e('Pasting in the Rich Editor'); ?></h3>
- <p><?php _e('When pasting content from another web page the results can be inconsistent and depend on your browser and on the web page you are pasting from. The editor tries to correct any invalid HTML code that was pasted, but for best results try using the Text tab or one of the paste buttons that are on the second row. Alternatively try pasting paragraph by paragraph. In most browsers to select one paragraph at a time, triple-click on it.'); ?></p>
- <p><?php _e('Pasting content from another application, like Word or Excel, is best done with the Paste from Word button on the second row, or in Text mode.'); ?></p>
-</div>
-
-<div id="content3" class="hidden">
- <h2><?php _e('Writing at Full Speed'); ?></h2>
- <p><?php _e('Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Ctrl + letter. Macintosh uses Command + letter.'); ?></p>
-
- <table class="keys">
- <tr class="top"><th class="key center"><?php _e('Letter'); ?></th><th class="left"><?php _e('Action'); ?></th><th class="key center"><?php _e('Letter'); ?></th><th class="left"><?php _e('Action'); ?></th></tr>
- <tr><th>c</th><td><?php _e('Copy'); ?></td><th>v</th><td><?php _e('Paste'); ?></td></tr>
- <tr><th>a</th><td><?php _e('Select all'); ?></td><th>x</th><td><?php _e('Cut'); ?></td></tr>
- <tr><th>z</th><td><?php _e('Undo'); ?></td><th>y</th><td><?php _e('Redo'); ?></td></tr>
-
- <tr><th>b</th><td><?php _e('Bold'); ?></td><th>i</th><td><?php _e('Italic'); ?></td></tr>
- <tr><th>u</th><td><?php _e('Underline'); ?></td><th>1</th><td><?php _e('Heading 1'); ?></td></tr>
- <tr><th>2</th><td><?php _e('Heading 2'); ?></td><th>3</th><td><?php _e('Heading 3'); ?></td></tr>
- <tr><th>4</th><td><?php _e('Heading 4'); ?></td><th>5</th><td><?php _e('Heading 5'); ?></td></tr>
- <tr><th>6</th><td><?php _e('Heading 6'); ?></td><th>9</th><td><?php _e('Address'); ?></td></tr>
- </table>
-
- <p><?php _e('The following shortcuts use different access keys: Alt + Shift + letter.'); ?></p>
- <table class="keys">
- <tr class="top"><th class="key center"><?php _e('Letter'); ?></th><th class="left"><?php _e('Action'); ?></th><th class="key center"><?php _e('Letter'); ?></th><th class="left"><?php _e('Action'); ?></th></tr>
- <tr><th>n</th><td><?php _e('Check Spelling'); ?></td><th>l</th><td><?php _e('Align Left'); ?></td></tr>
- <tr><th>j</th><td><?php _e('Justify Text'); ?></td><th>c</th><td><?php _e('Align Center'); ?></td></tr>
- <tr><th>d</th><td><span style="text-decoration: line-through;"><?php _e('Strikethrough'); ?></span></td><th>r</th><td><?php _e('Align Right'); ?></td></tr>
- <tr><th>u</th><td><strong>&bull;</strong> <?php _e('List'); ?></td><th>a</th><td><?php _e('Insert link'); ?></td></tr>
- <tr><th>o</th><td>1. <?php _e('List'); ?></td><th>s</th><td><?php _e('Remove link'); ?></td></tr>
- <tr><th>q</th><td><?php _e('Quote'); ?></td><th>m</th><td><?php _e('Insert Image'); ?></td></tr>
- <tr><th>w</th><td><?php _e('Distraction Free Writing mode'); ?></td><th>t</th><td><?php _e('Insert More Tag'); ?></td></tr>
- <tr><th>p</th><td><?php _e('Insert Page Break tag'); ?></td><th>h</th><td><?php _e('Help'); ?></td></tr>
- </table>
-
- <p style="padding: 15px 10px 10px;"><?php _e('Editor width in Distraction Free Writing mode:'); ?></p>
- <table class="keys">
- <tr><th><span class="win">Alt +</span><span class="mac">Ctrl +</span></th><td><?php _e('Wider'); ?></td>
- <th><span class="win">Alt -</span><span class="mac">Ctrl -</span></th><td><?php _e('Narrower'); ?></td></tr>
- <tr><th><span class="win">Alt 0</span><span class="mac">Ctrl 0</span></th><td><?php _e('Default width'); ?></td><th></th><td></td></tr>
- </table>
-</div>
-
-<div id="content4" class="hidden">
- <h2><?php _e('About TinyMCE'); ?></h2>
-
- <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p>
- <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.home_url('/wp-includes/js/tinymce/license.txt').'" target="_blank" title="'.esc_attr__('GNU Library General Public License').'">'); ?></p>
- <p><?php _e('Copyright &copy; 2003-2011, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.'); ?></p>
- <p><?php _e('For more information about this software visit the <a href="http://tinymce.com" target="_blank">TinyMCE website</a>.'); ?></p>
-
- <div id="buttoncontainer">
- <a href="http://www.moxiecode.com" target="_blank"><img src="themes/advanced/img/gotmoxie.png" alt="<?php esc_attr_e('Got Moxie?'); ?>" style="border: 0" /></a>
- </div>
-
-</div>
-</div>
-
-<div class="mceActionPanel">
- <div style="margin: 8px auto; text-align: center;padding-bottom: 10px;">
- <input type="button" id="cancel" name="cancel" value="<?php esc_attr_e('Close'); ?>" title="<?php esc_attr_e('Close'); ?>" onclick="tinyMCEPopup.close();" />
- </div>
-</div>
-<script type="text/javascript">
- function d(id) { return document.getElementById(id); }
-
- function flipTab(n) {
- var i, c, t;
-
- for ( i = 1; i <= 4; i++ ) {
- c = d('content'+i.toString());
- t = d('tab'+i.toString());
- if ( n == i ) {
- c.className = '';
- t.className = 'current';
- } else {
- c.className = 'hidden';
- t.className = '';
- }
- }
- }
-
- tinyMCEPopup.onInit.add(function() {
- var win = tinyMCEPopup.getWin();
-
- d('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
- d('date').innerHTML = tinymce.releaseDate;
-
- if ( win.fullscreen && win.fullscreen.settings.visible ) {
- d('content1').className = 'hidden';
- d('tabs').className = 'hidden';
- d('content3').className = 'dfw';
- }
- });
-</script>
-</body>
-</html>
diff --git a/wp-includes/js/tinymce/wp-tinymce-schema.js b/wp-includes/js/tinymce/wp-tinymce-schema.js
deleted file mode 100644
index 503a56399b..0000000000
--- a/wp-includes/js/tinymce/wp-tinymce-schema.js
+++ /dev/null
@@ -1,940 +0,0 @@
-/**
- * TinyMCE Schema.js
- *
- * Duck-punched by WordPress core to support a sane schema superset.
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-(function(tinymce) {
- var mapCache = {}, makeMap = tinymce.makeMap, each = tinymce.each;
-
- function split(str, delim) {
- return str.split(delim || ',');
- };
-
- /**
- * Unpacks the specified lookup and string data it will also parse it into an object
- * map with sub object for it's children. This will later also include the attributes.
- */
- function unpack(lookup, data) {
- var key, elements = {};
-
- function replace(value) {
- return value.replace(/[A-Z]+/g, function(key) {
- return replace(lookup[key]);
- });
- };
-
- // Unpack lookup
- for (key in lookup) {
- if (lookup.hasOwnProperty(key))
- lookup[key] = replace(lookup[key]);
- }
-
- // Unpack and parse data into object map
- replace(data).replace(/#/g, '#text').replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g, function(str, name, attributes, children) {
- attributes = split(attributes, '|');
-
- elements[name] = {
- attributes : makeMap(attributes),
- attributesOrder : attributes,
- children : makeMap(children, '|', {'#comment' : {}})
- }
- });
-
- return elements;
- };
-
- /**
- * Returns the HTML5 schema and caches it in the mapCache.
- */
- function getHTML5() {
- var html5 = mapCache.html5;
-
- if (!html5) {
- html5 = mapCache.html5 = unpack({
- A : 'accesskey|class|contextmenu|dir|draggable|dropzone|hidden|id|inert|itemid|itemprop|itemref|itemscope|itemtype|lang|spellcheck|style|tabindex|title|translate|item|role|subject|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
- B : '#|a|abbr|area|audio|b|bdi|bdo|br|button|canvas|cite|code|command|data|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|math|meta|meter|noscript|object|output|progress|q|ruby|s|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|u|var|video|wbr',
- C : '#|a|abbr|area|address|article|aside|audio|b|bdi|bdo|blockquote|br|button|canvas|cite|code|command|data|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|math|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|s|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|u|ul|var|video|wbr'
- }, 'html[A|manifest][body|head]' +
- 'head[A][base|command|link|meta|noscript|script|style|title]' +
- 'title[A][#]' +
- 'base[A|href|target][]' +
- 'link[A|href|rel|media|type|sizes|crossorigin|hreflang][]' +
- 'meta[A|http-equiv|name|content|charset][]' +
- 'style[A|type|media|scoped][#]' +
- 'script[A|charset|type|src|defer|async|crossorigin][#]' +
- 'noscript[A][C]' +
- 'body[A|onafterprint|onbeforeprint|onbeforeunload|onblur|onerror|onfocus|onfullscreenchange|onfullscreenerror|onhashchange|onload|onmessage|onoffline|ononline|onpagehide|onpageshow|onpopstate|onresize|onscroll|onstorage|onunload][C]' +
- 'section[A][C]' +
- 'nav[A][C]' +
- 'article[A][C]' +
- 'aside[A][C]' +
- 'h1[A][B]' +
- 'h2[A][B]' +
- 'h3[A][B]' +
- 'h4[A][B]' +
- 'h5[A][B]' +
- 'h6[A][B]' +
- 'hgroup[A][h1|h2|h3|h4|h5|h6]' +
- 'header[A][C]' +
- 'footer[A][C]' +
- 'address[A][C]' +
- 'p[A][B]' +
- 'br[A][]' +
- 'pre[A][B]' +
- 'dialog[A|open][C|dd|dt]' +
- 'blockquote[A|cite][C]' +
- 'ol[A|start|reversed][li]' +
- 'ul[A][li]' +
- 'li[A|value][C]' +
- 'dl[A][dd|dt]' +
- 'dt[A][C|B]' +
- 'dd[A][C]' +
- 'a[A|href|target|download|ping|rel|media|type][B]' +
- 'em[A][B]' +
- 'strong[A][B]' +
- 'small[A][B]' +
- 's[A][B]' +
- 'cite[A][B]' +
- 'q[A|cite][B]' +
- 'dfn[A][B]' +
- 'abbr[A][B]' +
- 'code[A][B]' +
- 'var[A][B]' +
- 'samp[A][B]' +
- 'kbd[A][B]' +
- 'sub[A][B]' +
- 'sup[A][B]' +
- 'i[A][B]' +
- 'b[A][B]' +
- 'u[A][B]' +
- 'mark[A][B]' +
- 'progress[A|value|max][B]' +
- 'meter[A|value|min|max|low|high|optimum][B]' +
- 'time[A|datetime][B]' +
- 'ruby[A][B|rt|rp]' +
- 'rt[A][B]' +
- 'rp[A][B]' +
- 'bdi[A][B]' +
- 'bdo[A][B]' +
- 'span[A][B]' +
- 'ins[A|cite|datetime][C|B]' +
- 'del[A|cite|datetime][C|B]' +
- 'figure[A][C|legend|figcaption]' +
- 'figcaption[A][C]' +
- 'img[A|alt|src|srcset|crossorigin|usemap|ismap|width|height][]' +
- 'iframe[A|name|src|srcdoc|height|width|sandbox|seamless|allowfullscreen][C|B]' +
- 'embed[A|src|height|width|type][]' +
- 'object[A|data|type|typemustmatch|name|usemap|form|width|height][C|B|param]' +
- 'param[A|name|value][]' +
- 'summary[A][B]' +
- 'details[A|open][C|legend|summary]' +
- 'command[A|type|label|icon|disabled|checked|radiogroup|command][]' +
- 'menu[A|type|label][C|li]' +
- 'legend[A][C|B]' +
- 'div[A][C]' +
- 'source[A|src|type|media][]' +
- 'track[A|kind|src|srclang|label|default][]' +
- 'audio[A|src|autobuffer|autoplay|loop|controls|crossorigin|preload|mediagroup|muted][C|source|track]' +
- 'video[A|src|autobuffer|autoplay|loop|controls|width|height|poster|crossorigin|preload|mediagroup|muted][C|source|track]' +
- 'hr[A][]' +
- 'form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]' +
- 'fieldset[A|disabled|form|name][C|legend]' +
- 'label[A|form|for][B]' +
- 'input[A|type|accept|alt|autocomplete|autofocus|checked|dirname|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|inputmode|list|max|maxlength|min|multiple|name|pattern|placeholder|readonly|required|size|src|step|value|width|files][]' +
- 'button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|type|value][B]' +
- 'select[A|autofocus|disabled|form|multiple|name|required|size][option|optgroup]' +
- 'data[A|value][B]' +
- 'datalist[A][B|option]' +
- 'optgroup[A|disabled|label][option]' +
- 'option[A|disabled|selected|label|value][#]' +
- 'textarea[A|autocomplete|autofocus|cols|dirname|disabled|form|inputmode|maxlength|name|placeholder|readonly|required|rows|wrap][#]' +
- 'keygen[A|autofocus|challenge|disabled|form|keytype|name][]' +
- 'output[A|for|form|name][B]' +
- 'canvas[A|width|height][a|button|input]' +
- 'map[A|name][C|B]' +
- 'area[A|alt|coords|shape|href|target|download|ping|rel|media|hreflang|type][]' +
- 'math[A][]' +
- 'svg[A][]' +
- 'table[A][caption|colgroup|thead|tfoot|tbody|tr]' +
- 'caption[A][C]' +
- 'colgroup[A|span][col]' +
- 'col[A|span][]' +
- 'thead[A][tr]' +
- 'tfoot[A][tr]' +
- 'tbody[A][tr]' +
- 'tr[A][th|td]' +
- 'th[A|headers|rowspan|colspan|scope][C]' +
- 'td[A|headers|rowspan|colspan][C]' +
- 'wbr[A][]'
- );
- }
-
- return html5;
- };
-
- /**
- * Returns the HTML4 schema and caches it in the mapCache.
- */
- function getHTML4() {
- var html4 = mapCache.html4;
-
- if (!html4) {
- // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size
- html4 = mapCache.html4 = unpack({
- Z : 'H|K|N|O|P',
- Y : 'X|form|R|Q',
- ZG : 'E|span|width|align|char|charoff|valign',
- X : 'p|T|div|U|W|isindex|fieldset|table',
- ZF : 'E|align|char|charoff|valign',
- W : 'pre|hr|blockquote|address|center|noframes',
- ZE : 'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height',
- ZD : '[E][S]',
- U : 'ul|ol|dl|menu|dir',
- ZC : 'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q',
- T : 'h1|h2|h3|h4|h5|h6',
- ZB : 'X|S|Q',
- S : 'R|P',
- ZA : 'a|G|J|M|O|P',
- R : 'a|H|K|N|O',
- Q : 'noscript|P',
- P : 'ins|del|script',
- O : 'input|select|textarea|label|button',
- N : 'M|L',
- M : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym',
- L : 'sub|sup',
- K : 'J|I',
- J : 'tt|i|b|u|s|strike',
- I : 'big|small|font|basefont',
- H : 'G|F',
- G : 'br|span|bdo',
- F : 'object|applet|img|map|iframe',
- E : 'A|B|C',
- D : 'accesskey|tabindex|onfocus|onblur',
- C : 'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
- B : 'lang|xml:lang|dir',
- A : 'id|class|style|title'
- }, 'script[id|charset|type|language|src|defer|xml:space][]' +
- 'style[B|id|type|media|title|xml:space][]' +
- 'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]' +
- 'param[id|name|value|valuetype|type][]' +
- 'p[E|align][#|S]' +
- 'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]' +
- 'br[A|clear][]' +
- 'span[E][#|S]' +
- 'bdo[A|C|B][#|S]' +
- 'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]' +
- 'h1[E|align][#|S]' +
- 'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]' +
- 'map[B|C|A|name][X|form|Q|area]' +
- 'h2[E|align][#|S]' +
- 'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]' +
- 'h3[E|align][#|S]' +
- 'tt[E][#|S]' +
- 'i[E][#|S]' +
- 'b[E][#|S]' +
- 'u[E][#|S]' +
- 's[E][#|S]' +
- 'strike[E][#|S]' +
- 'big[E][#|S]' +
- 'small[E][#|S]' +
- 'font[A|B|size|color|face][#|S]' +
- 'basefont[id|size|color|face][]' +
- 'em[E][#|S]' +
- 'strong[E][#|S]' +
- 'dfn[E][#|S]' +
- 'code[E][#|S]' +
- 'q[E|cite][#|S]' +
- 'samp[E][#|S]' +
- 'kbd[E][#|S]' +
- 'var[E][#|S]' +
- 'cite[E][#|S]' +
- 'abbr[E][#|S]' +
- 'acronym[E][#|S]' +
- 'sub[E][#|S]' +
- 'sup[E][#|S]' +
- 'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]' +
- 'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]' +
- 'optgroup[E|disabled|label][option]' +
- 'option[E|selected|disabled|label|value][]' +
- 'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]' +
- 'label[E|for|accesskey|onfocus|onblur][#|S]' +
- 'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' +
- 'h4[E|align][#|S]' +
- 'ins[E|cite|datetime][#|Y]' +
- 'h5[E|align][#|S]' +
- 'del[E|cite|datetime][#|Y]' +
- 'h6[E|align][#|S]' +
- 'div[E|align][#|Y]' +
- 'ul[E|type|compact][li]' +
- 'li[E|type|value][#|Y]' +
- 'ol[E|type|compact|start][li]' +
- 'dl[E|compact][dt|dd]' +
- 'dt[E][#|S]' +
- 'dd[E][#|Y]' +
- 'menu[E|compact][li]' +
- 'dir[E|compact][li]' +
- 'pre[E|width|xml:space][#|ZA]' +
- 'hr[E|align|noshade|size|width][]' +
- 'blockquote[E|cite][#|Y]' +
- 'address[E][#|S|p]' +
- 'center[E][#|Y]' +
- 'noframes[E][#|Y]' +
- 'isindex[A|B|prompt][]' +
- 'fieldset[E][#|legend|Y]' +
- 'legend[E|accesskey|align][#|S]' +
- 'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]' +
- 'caption[E|align][#|S]' +
- 'col[ZG][]' +
- 'colgroup[ZG][col]' +
- 'thead[ZF][tr]' +
- 'tr[ZF|bgcolor][th|td]' +
- 'th[E|ZE][#|Y]' +
- 'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]' +
- 'noscript[E][#|Y]' +
- 'td[E|ZE][#|Y]' +
- 'tfoot[ZF][tr]' +
- 'tbody[ZF][tr]' +
- 'area[E|D|shape|coords|href|nohref|alt|target][]' +
- 'base[id|href|target][]' +
- 'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]'
- );
- }
-
- return html4;
- };
-
- /**
- * WordPress Core
- *
- * Returns a schema that is the result of a deep merge between the HTML5
- * and HTML4 schemas.
- */
- function getSaneSchema() {
- var cachedMapCache = mapCache,
- html5, html4;
-
- if ( mapCache.sane )
- return mapCache.sane;
-
- // Bust the mapCache so we're not dealing with the other schema objects.
- mapCache = {};
- html5 = getHTML5();
- html4 = getHTML4();
- mapCache = cachedMapCache;
-
- each( html4, function( html4settings, tag ) {
- var html5settings = html5[ tag ],
- difference = [];
-
- // Merge tags missing in HTML5 mode.
- if ( ! html5settings ) {
- html5[ tag ] = html4settings;
- return;
- }
-
- // Merge attributes missing from this HTML5 tag.
- each( html4settings.attributes, function( attribute, key ) {
- if ( ! html5settings.attributes[ key ] )
- html5settings.attributes[ key ] = attribute;
- });
-
- // Merge any missing attributes into the attributes order.
- each( html4settings.attributesOrder, function( key ) {
- if ( -1 === tinymce.inArray( html5settings.attributesOrder, key ) )
- difference.push( key );
- });
-
- html5settings.attributesOrder = html5settings.attributesOrder.concat( difference );
-
- // Merge children missing from this HTML5 tag.
- each( html4settings.children, function( child, key ) {
- if ( ! html5settings.children[ key ] )
- html5settings.children[ key ] = child;
- });
- });
-
- return mapCache.sane = html5;
- }
-
- /**
- * Schema validator class.
- *
- * @class tinymce.html.Schema
- * @example
- * if (tinymce.activeEditor.schema.isValidChild('p', 'span'))
- * alert('span is valid child of p.');
- *
- * if (tinymce.activeEditor.schema.getElementRule('p'))
- * alert('P is a valid element.');
- *
- * @class tinymce.html.Schema
- * @version 3.4
- */
-
- /**
- * Constructs a new Schema instance.
- *
- * @constructor
- * @method Schema
- * @param {Object} settings Name/value settings object.
- */
- tinymce.html.Schema = function(settings) {
- var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
- var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
-
- // Creates an lookup table map object for the specified option or the default value
- function createLookupTable(option, default_value, extend) {
- var value = settings[option];
-
- if (!value) {
- // Get cached default map or make it if needed
- value = mapCache[option];
-
- if (!value) {
- value = makeMap(default_value, ' ', makeMap(default_value.toUpperCase(), ' '));
- value = tinymce.extend(value, extend);
-
- mapCache[option] = value;
- }
- } else {
- // Create custom map
- value = makeMap(value, ',', makeMap(value.toUpperCase(), ' '));
- }
-
- return value;
- };
-
- settings = settings || {};
-
- /**
- * WordPress core uses a sane schema in place of the default "HTML5" schema.
- */
- schemaItems = settings.schema == "html5" ? getSaneSchema() : getHTML4();
-
- // Allow all elements and attributes if verify_html is set to false
- if (settings.verify_html === false)
- settings.valid_elements = '*[*]';
-
- // Build styles list
- if (settings.valid_styles) {
- validStyles = {};
-
- // Convert styles into a rule list
- each(settings.valid_styles, function(value, key) {
- validStyles[key] = tinymce.explode(value);
- });
- }
-
- // Setup map objects
- whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea');
- selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
- shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source wbr');
- boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');
- nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object', shortEndedElementsMap);
- textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' +
- 'blockquote center dir fieldset header footer article section hgroup aside nav figure');
- blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +
- 'th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup', textBlockElementsMap);
-
- // Converts a wildcard expression string to a regexp for example *a will become /.*a/.
- function patternToRegExp(str) {
- return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
- };
-
- // Parses the specified valid_elements string and adds to the current rules
- // This function is a bit hard to read since it's heavily optimized for speed
- function addValidElements(valid_elements) {
- var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
- prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
- elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
- attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
- hasPatternsRegExp = /[*?+]/;
-
- if (valid_elements) {
- // Split valid elements into an array with rules
- valid_elements = split(valid_elements);
-
- if (elements['@']) {
- globalAttributes = elements['@'].attributes;
- globalAttributesOrder = elements['@'].attributesOrder;
- }
-
- // Loop all rules
- for (ei = 0, el = valid_elements.length; ei < el; ei++) {
- // Parse element rule
- matches = elementRuleRegExp.exec(valid_elements[ei]);
- if (matches) {
- // Setup local names for matches
- prefix = matches[1];
- elementName = matches[2];
- outputName = matches[3];
- attrData = matches[4];
-
- // Create new attributes and attributesOrder
- attributes = {};
- attributesOrder = [];
-
- // Create the new element
- element = {
- attributes : attributes,
- attributesOrder : attributesOrder
- };
-
- // Padd empty elements prefix
- if (prefix === '#')
- element.paddEmpty = true;
-
- // Remove empty elements prefix
- if (prefix === '-')
- element.removeEmpty = true;
-
- // Copy attributes from global rule into current rule
- if (globalAttributes) {
- for (key in globalAttributes)
- attributes[key] = globalAttributes[key];
-
- attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
- }
-
- // Attributes defined
- if (attrData) {
- attrData = split(attrData, '|');
- for (ai = 0, al = attrData.length; ai < al; ai++) {
- matches = attrRuleRegExp.exec(attrData[ai]);
- if (matches) {
- attr = {};
- attrType = matches[1];
- attrName = matches[2].replace(/::/g, ':');
- prefix = matches[3];
- value = matches[4];
-
- // Required
- if (attrType === '!') {
- element.attributesRequired = element.attributesRequired || [];
- element.attributesRequired.push(attrName);
- attr.required = true;
- }
-
- // Denied from global
- if (attrType === '-') {
- delete attributes[attrName];
- attributesOrder.splice(tinymce.inArray(attributesOrder, attrName), 1);
- continue;
- }
-
- // Default value
- if (prefix) {
- // Default value
- if (prefix === '=') {
- element.attributesDefault = element.attributesDefault || [];
- element.attributesDefault.push({name: attrName, value: value});
- attr.defaultValue = value;
- }
-
- // Forced value
- if (prefix === ':') {
- element.attributesForced = element.attributesForced || [];
- element.attributesForced.push({name: attrName, value: value});
- attr.forcedValue = value;
- }
-
- // Required values
- if (prefix === '<')
- attr.validValues = makeMap(value, '?');
- }
-
- // Check for attribute patterns
- if (hasPatternsRegExp.test(attrName)) {
- element.attributePatterns = element.attributePatterns || [];
- attr.pattern = patternToRegExp(attrName);
- element.attributePatterns.push(attr);
- } else {
- // Add attribute to order list if it doesn't already exist
- if (!attributes[attrName])
- attributesOrder.push(attrName);
-
- attributes[attrName] = attr;
- }
- }
- }
- }
-
- // Global rule, store away these for later usage
- if (!globalAttributes && elementName == '@') {
- globalAttributes = attributes;
- globalAttributesOrder = attributesOrder;
- }
-
- // Handle substitute elements such as b/strong
- if (outputName) {
- element.outputName = elementName;
- elements[outputName] = element;
- }
-
- // Add pattern or exact element
- if (hasPatternsRegExp.test(elementName)) {
- element.pattern = patternToRegExp(elementName);
- patternElements.push(element);
- } else
- elements[elementName] = element;
- }
- }
- }
- };
-
- function setValidElements(valid_elements) {
- elements = {};
- patternElements = [];
-
- addValidElements(valid_elements);
-
- each(schemaItems, function(element, name) {
- children[name] = element.children;
- });
- };
-
- // Adds custom non HTML elements to the schema
- function addCustomElements(custom_elements) {
- var customElementRegExp = /^(~)?(.+)$/;
-
- if (custom_elements) {
- each(split(custom_elements), function(rule) {
- var matches = customElementRegExp.exec(rule),
- inline = matches[1] === '~',
- cloneName = inline ? 'span' : 'div',
- name = matches[2];
-
- children[name] = children[cloneName];
- customElementsMap[name] = cloneName;
-
- // If it's not marked as inline then add it to valid block elements
- if (!inline) {
- blockElementsMap[name.toUpperCase()] = {};
- blockElementsMap[name] = {};
- }
-
- // Add elements clone if needed
- if (!elements[name]) {
- elements[name] = elements[cloneName];
- }
-
- // Add custom elements at span/div positions
- each(children, function(element, child) {
- if (element[cloneName])
- element[name] = element[cloneName];
- });
- });
- }
- };
-
- // Adds valid children to the schema object
- function addValidChildren(valid_children) {
- var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
-
- if (valid_children) {
- each(split(valid_children), function(rule) {
- var matches = childRuleRegExp.exec(rule), parent, prefix;
-
- if (matches) {
- prefix = matches[1];
-
- // Add/remove items from default
- if (prefix)
- parent = children[matches[2]];
- else
- parent = children[matches[2]] = {'#comment' : {}};
-
- parent = children[matches[2]];
-
- each(split(matches[3], '|'), function(child) {
- if (prefix === '-')
- delete parent[child];
- else
- parent[child] = {};
- });
- }
- });
- }
- };
-
- function getElementRule(name) {
- var element = elements[name], i;
-
- // Exact match found
- if (element)
- return element;
-
- // No exact match then try the patterns
- i = patternElements.length;
- while (i--) {
- element = patternElements[i];
-
- if (element.pattern.test(name))
- return element;
- }
- };
-
- if (!settings.valid_elements) {
- // No valid elements defined then clone the elements from the schema spec
- each(schemaItems, function(element, name) {
- elements[name] = {
- attributes : element.attributes,
- attributesOrder : element.attributesOrder
- };
-
- children[name] = element.children;
- });
-
- // Switch these on HTML4
- if (settings.schema != "html5") {
- each(split('strong/b,em/i'), function(item) {
- item = split(item, '/');
- elements[item[1]].outputName = item[0];
- });
- }
-
- // Add default alt attribute for images
- elements.img.attributesDefault = [{name: 'alt', value: ''}];
-
- // Remove these if they are empty by default
- each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) {
- if (elements[name]) {
- elements[name].removeEmpty = true;
- }
- });
-
- // Padd these by default
- each(split('p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption'), function(name) {
- elements[name].paddEmpty = true;
- });
- } else
- setValidElements(settings.valid_elements);
-
- addCustomElements(settings.custom_elements);
- addValidChildren(settings.valid_children);
- addValidElements(settings.extended_valid_elements);
-
- // Todo: Remove this when we fix list handling to be valid
- addValidChildren('+ol[ul|ol],+ul[ul|ol]');
-
- // Delete invalid elements
- if (settings.invalid_elements) {
- tinymce.each(tinymce.explode(settings.invalid_elements), function(item) {
- if (elements[item])
- delete elements[item];
- });
- }
-
- // If the user didn't allow span only allow internal spans
- if (!getElementRule('span'))
- addValidElements('span[!data-mce-type|*]');
-
- /**
- * Name/value map object with valid parents and children to those parents.
- *
- * @example
- * children = {
- * div:{p:{}, h1:{}}
- * };
- * @field children
- * @type {Object}
- */
- self.children = children;
-
- /**
- * Name/value map object with valid styles for each element.
- *
- * @field styles
- * @type {Object}
- */
- self.styles = validStyles;
-
- /**
- * Returns a map with boolean attributes.
- *
- * @method getBoolAttrs
- * @return {Object} Name/value lookup map for boolean attributes.
- */
- self.getBoolAttrs = function() {
- return boolAttrMap;
- };
-
- /**
- * Returns a map with block elements.
- *
- * @method getBlockElements
- * @return {Object} Name/value lookup map for block elements.
- */
- self.getBlockElements = function() {
- return blockElementsMap;
- };
-
- /**
- * Returns a map with text block elements. Such as: p,h1-h6,div,address
- *
- * @method getTextBlockElements
- * @return {Object} Name/value lookup map for block elements.
- */
- self.getTextBlockElements = function() {
- return textBlockElementsMap;
- };
-
- /**
- * Returns a map with short ended elements such as BR or IMG.
- *
- * @method getShortEndedElements
- * @return {Object} Name/value lookup map for short ended elements.
- */
- self.getShortEndedElements = function() {
- return shortEndedElementsMap;
- };
-
- /**
- * Returns a map with self closing tags such as <li>.
- *
- * @method getSelfClosingElements
- * @return {Object} Name/value lookup map for self closing tags elements.
- */
- self.getSelfClosingElements = function() {
- return selfClosingElementsMap;
- };
-
- /**
- * Returns a map with elements that should be treated as contents regardless if it has text
- * content in them or not such as TD, VIDEO or IMG.
- *
- * @method getNonEmptyElements
- * @return {Object} Name/value lookup map for non empty elements.
- */
- self.getNonEmptyElements = function() {
- return nonEmptyElementsMap;
- };
-
- /**
- * Returns a map with elements where white space is to be preserved like PRE or SCRIPT.
- *
- * @method getWhiteSpaceElements
- * @return {Object} Name/value lookup map for white space elements.
- */
- self.getWhiteSpaceElements = function() {
- return whiteSpaceElementsMap;
- };
-
- /**
- * Returns true/false if the specified element and it's child is valid or not
- * according to the schema.
- *
- * @method isValidChild
- * @param {String} name Element name to check for.
- * @param {String} child Element child to verify.
- * @return {Boolean} True/false if the element is a valid child of the specified parent.
- */
- self.isValidChild = function(name, child) {
- var parent = children[name];
-
- return !!(parent && parent[child]);
- };
-
- /**
- * Returns true/false if the specified element name and optional attribute is
- * valid according to the schema.
- *
- * @method isValid
- * @param {String} name Name of element to check.
- * @param {String} attr Optional attribute name to check for.
- * @return {Boolean} True/false if the element and attribute is valid.
- */
- self.isValid = function(name, attr) {
- var attrPatterns, i, rule = getElementRule(name);
-
- // Check if it's a valid element
- if (rule) {
- if (attr) {
- // Check if attribute name exists
- if (rule.attributes[attr]) {
- return true;
- }
-
- // Check if attribute matches a regexp pattern
- attrPatterns = rule.attributePatterns;
- if (attrPatterns) {
- i = attrPatterns.length;
- while (i--) {
- if (attrPatterns[i].pattern.test(name)) {
- return true;
- }
- }
- }
- } else {
- return true;
- }
- }
-
- // No match
- return false;
- };
-
- /**
- * Returns true/false if the specified element is valid or not
- * according to the schema.
- *
- * @method getElementRule
- * @param {String} name Element name to check for.
- * @return {Object} Element object or undefined if the element isn't valid.
- */
- self.getElementRule = getElementRule;
-
- /**
- * Returns an map object of all custom elements.
- *
- * @method getCustomElements
- * @return {Object} Name/value map object of all custom elements.
- */
- self.getCustomElements = function() {
- return customElementsMap;
- };
-
- /**
- * Parses a valid elements string and adds it to the schema. The valid elements format is for example "element[attr=default|otherattr]".
- * Existing rules will be replaced with the ones specified, so this extends the schema.
- *
- * @method addValidElements
- * @param {String} valid_elements String in the valid elements format to be parsed.
- */
- self.addValidElements = addValidElements;
-
- /**
- * Parses a valid elements string and sets it to the schema. The valid elements format is for example "element[attr=default|otherattr]".
- * Existing rules will be replaced with the ones specified, so this extends the schema.
- *
- * @method setValidElements
- * @param {String} valid_elements String in the valid elements format to be parsed.
- */
- self.setValidElements = setValidElements;
-
- /**
- * Adds custom non HTML elements to the schema.
- *
- * @method addCustomElements
- * @param {String} custom_elements Comma separated list of custom elements to add.
- */
- self.addCustomElements = addCustomElements;
-
- /**
- * Parses a valid children string and adds them to the schema structure. The valid children format is for example: "element[child1|child2]".
- *
- * @method addValidChildren
- * @param {String} valid_children Valid children elements string to parse
- */
- self.addValidChildren = addValidChildren;
-
- self.elements = elements;
- };
-})(tinymce);
diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz
deleted file mode 100644
index 600163f068..0000000000
--- a/wp-includes/js/tinymce/wp-tinymce.js.gz
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/wp-tinymce.php b/wp-includes/js/tinymce/wp-tinymce.php
deleted file mode 100644
index 83a003d720..0000000000
--- a/wp-includes/js/tinymce/wp-tinymce.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/**
- * Disable error reporting
- *
- * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
- */
-error_reporting(0);
-
-$basepath = dirname(__FILE__);
-
-function get_file($path) {
-
- if ( function_exists('realpath') )
- $path = realpath($path);
-
- if ( ! $path || ! @is_file($path) )
- return false;
-
- return @file_get_contents($path);
-}
-
-$expires_offset = 31536000; // 1 year
-
-header('Content-Type: application/x-javascript; charset=UTF-8');
-header('Vary: Accept-Encoding'); // Handle proxies
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
-
-if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
- && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
-
- header('Content-Encoding: gzip');
- echo $file;
-} else {
- echo get_file($basepath . '/tiny_mce.js');
- echo get_file($basepath . '/wp-tinymce-schema.js');
-}
-exit;
diff --git a/wp-includes/js/tw-sack.js b/wp-includes/js/tw-sack.js
deleted file mode 100644
index f93f2a429c..0000000000
--- a/wp-includes/js/tw-sack.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Simple AJAX Code-Kit (SACK) v1.6.1 */
-/* ©2005 Gregory Wild-Smith */
-/* www.twilightuniverse.com */
-/* Software licenced under a modified X11 licence,
- see documentation or authors website for more details */
-
-function sack(file) {
- this.xmlhttp = null;
-
- this.resetData = function() {
- this.method = "POST";
- this.queryStringSeparator = "?";
- this.argumentSeparator = "&";
- this.URLString = "";
- this.encodeURIString = true;
- this.execute = false;
- this.element = null;
- this.elementObj = null;
- this.requestFile = file;
- this.vars = new Object();
- this.responseStatus = new Array(2);
- };
-
- this.resetFunctions = function() {
- this.onLoading = function() { };
- this.onLoaded = function() { };
- this.onInteractive = function() { };
- this.onCompletion = function() { };
- this.onError = function() { };
- this.onFail = function() { };
- };
-
- this.reset = function() {
- this.resetFunctions();
- this.resetData();
- };
-
- this.createAJAX = function() {
- try {
- this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e1) {
- try {
- this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (e2) {
- this.xmlhttp = null;
- }
- }
-
- if (! this.xmlhttp) {
- if (typeof XMLHttpRequest != "undefined") {
- this.xmlhttp = new XMLHttpRequest();
- } else {
- this.failed = true;
- }
- }
- };
-
- this.setVar = function(name, value){
- this.vars[name] = Array(value, false);
- };
-
- this.encVar = function(name, value, returnvars) {
- if (true == returnvars) {
- return Array(encodeURIComponent(name), encodeURIComponent(value));
- } else {
- this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
- }
- }
-
- this.processURLString = function(string, encode) {
- encoded = encodeURIComponent(this.argumentSeparator);
- regexp = new RegExp(this.argumentSeparator + "|" + encoded);
- varArray = string.split(regexp);
- for (i = 0; i < varArray.length; i++){
- urlVars = varArray[i].split("=");
- if (true == encode){
- this.encVar(urlVars[0], urlVars[1]);
- } else {
- this.setVar(urlVars[0], urlVars[1]);
- }
- }
- }
-
- this.createURLString = function(urlstring) {
- if (this.encodeURIString && this.URLString.length) {
- this.processURLString(this.URLString, true);
- }
-
- if (urlstring) {
- if (this.URLString.length) {
- this.URLString += this.argumentSeparator + urlstring;
- } else {
- this.URLString = urlstring;
- }
- }
-
- // prevents caching of URLString
- this.setVar("rndval", new Date().getTime());
-
- urlstringtemp = new Array();
- for (key in this.vars) {
- if (false == this.vars[key][1] && true == this.encodeURIString) {
- encoded = this.encVar(key, this.vars[key][0], true);
- delete this.vars[key];
- this.vars[encoded[0]] = Array(encoded[1], true);
- key = encoded[0];
- }
-
- urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
- }
- if (urlstring){
- this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
- } else {
- this.URLString += urlstringtemp.join(this.argumentSeparator);
- }
- }
-
- this.runResponse = function() {
- eval(this.response);
- }
-
- this.runAJAX = function(urlstring) {
- if (this.failed) {
- this.onFail();
- } else {
- this.createURLString(urlstring);
- if (this.element) {
- this.elementObj = document.getElementById(this.element);
- }
- if (this.xmlhttp) {
- var self = this;
- if (this.method == "GET") {
- totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
- this.xmlhttp.open(this.method, totalurlstring, true);
- } else {
- this.xmlhttp.open(this.method, this.requestFile, true);
- try {
- this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
- } catch (e) { }
- }
-
- this.xmlhttp.onreadystatechange = function() {
- switch (self.xmlhttp.readyState) {
- case 1:
- self.onLoading();
- break;
- case 2:
- self.onLoaded();
- break;
- case 3:
- self.onInteractive();
- break;
- case 4:
- self.response = self.xmlhttp.responseText;
- self.responseXML = self.xmlhttp.responseXML;
- self.responseStatus[0] = self.xmlhttp.status;
- self.responseStatus[1] = self.xmlhttp.statusText;
-
- if (self.execute) {
- self.runResponse();
- }
-
- if (self.elementObj) {
- elemNodeName = self.elementObj.nodeName;
- elemNodeName.toLowerCase();
- if (elemNodeName == "input"
- || elemNodeName == "select"
- || elemNodeName == "option"
- || elemNodeName == "textarea") {
- self.elementObj.value = self.response;
- } else {
- self.elementObj.innerHTML = self.response;
- }
- }
- if (self.responseStatus[0] == "200") {
- self.onCompletion();
- } else {
- self.onError();
- }
-
- self.URLString = "";
- break;
- }
- };
-
- this.xmlhttp.send(this.URLString);
- }
- }
- };
-
- this.reset();
- this.createAJAX();
-}
diff --git a/wp-includes/js/tw-sack.min.js b/wp-includes/js/tw-sack.min.js
deleted file mode 100644
index d1b5561e50..0000000000
--- a/wp-includes/js/tw-sack.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2)};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){}};this.reset=function(){this.resetFunctions();this.resetData()};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){this.xmlhttp=null}}if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}else{this.failed=true}}};this.setVar=function(name,value){this.vars[name]=Array(value,false)};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value))}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true)}};this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1])}else{this.setVar(urlVars[0],urlVars[1])}}};this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true)}if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring}else{this.URLString=urlstring}}this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0]}urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0]}if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator)}else{this.URLString+=urlstringtemp.join(this.argumentSeparator)}};this.runResponse=function(){eval(this.response)};this.runAJAX=function(urlstring){if(this.failed){this.onFail()}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element)}if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;if(self.execute){self.runResponse()}if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response}else{self.elementObj.innerHTML=self.response}}if(self.responseStatus[0]=="200"){self.onCompletion()}else{self.onError()}self.URLString="";break}};this.xmlhttp.send(this.URLString)}}};this.reset();this.createAJAX()}; \ No newline at end of file
diff --git a/wp-includes/js/underscore.min.js b/wp-includes/js/underscore.min.js
deleted file mode 100644
index 88d63a5b46..0000000000
--- a/wp-includes/js/underscore.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// Underscore.js 1.4.4
-// http://underscorejs.org
-// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore may be freely distributed under the MIT license.
-(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index<t.index?-1:1}),"value")};var F=function(n,t,r,e){var u={},i=k(t||w.identity);return A(n,function(t,a){var o=i.call(r,t,a,n);e(u,o,t)}),u};w.groupBy=function(n,t,r){return F(n,t,r,function(n,t,r){(w.has(n,t)?n[t]:n[t]=[]).push(r)})},w.countBy=function(n,t,r){return F(n,t,r,function(n,t){w.has(n,t)||(n[t]=0),n[t]++})},w.sortedIndex=function(n,t,r,e){r=null==r?w.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); \ No newline at end of file
diff --git a/wp-includes/js/utils.js b/wp-includes/js/utils.js
deleted file mode 100644
index d7566362a4..0000000000
--- a/wp-includes/js/utils.js
+++ /dev/null
@@ -1,171 +0,0 @@
-// utility functions
-
-var wpCookies = {
-// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
-
- each : function(obj, cb, scope) {
- var n, l;
-
- if ( !obj )
- return 0;
-
- scope = scope || obj;
-
- if ( typeof(obj.length) != 'undefined' ) {
- for ( n = 0, l = obj.length; n < l; n++ ) {
- if ( cb.call(scope, obj[n], n, obj) === false )
- return 0;
- }
- } else {
- for ( n in obj ) {
- if ( obj.hasOwnProperty(n) ) {
- if ( cb.call(scope, obj[n], n, obj) === false ) {
- return 0;
- }
- }
- }
- }
- return 1;
- },
-
- /**
- * Get a multi-values cookie.
- * Returns a JS object with the name: 'value' pairs.
- */
- getHash : function(name) {
- var all = this.get(name), ret;
-
- if ( all ) {
- this.each( all.split('&'), function(pair) {
- pair = pair.split('=');
- ret = ret || {};
- ret[pair[0]] = pair[1];
- });
- }
- return ret;
- },
-
- /**
- * Set a multi-values cookie.
- *
- * 'values_obj' is the JS object that is stored. It is encoded as URI in wpCookies.set().
- */
- setHash : function(name, values_obj, expires, path, domain, secure) {
- var str = '';
-
- this.each(values_obj, function(val, key) {
- str += (!str ? '' : '&') + key + '=' + val;
- });
-
- this.set(name, str, expires, path, domain, secure);
- },
-
- /**
- * Get a cookie.
- */
- get : function(name) {
- var cookie = document.cookie, e, p = name + "=", b;
-
- if ( !cookie )
- return;
-
- b = cookie.indexOf("; " + p);
-
- if ( b == -1 ) {
- b = cookie.indexOf(p);
-
- if ( b != 0 )
- return null;
-
- } else {
- b += 2;
- }
-
- e = cookie.indexOf(";", b);
-
- if ( e == -1 )
- e = cookie.length;
-
- return decodeURIComponent( cookie.substring(b + p.length, e) );
- },
-
- /**
- * Set a cookie.
- *
- * The 'expires' arg can be either a JS Date() object set to the expiration date (back-compat)
- * or the number of seconds until expiration
- */
- set : function(name, value, expires, path, domain, secure) {
- var d = new Date();
-
- if ( typeof(expires) == 'object' && expires.toGMTString ) {
- expires = expires.toGMTString();
- } else if ( parseInt(expires, 10) ) {
- d.setTime( d.getTime() + ( parseInt(expires, 10) * 1000 ) ); // time must be in miliseconds
- expires = d.toGMTString();
- } else {
- expires = '';
- }
-
- document.cookie = name + "=" + encodeURIComponent(value) +
- ((expires) ? "; expires=" + expires : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
- },
-
- /**
- * Remove a cookie.
- *
- * This is done by setting it to an empty value and setting the expiration time in the past.
- */
- remove : function(name, path) {
- this.set(name, '', -1000, path);
- }
-};
-
-// Returns the value as string. Second arg or empty string is returned when value is not set.
-function getUserSetting( name, def ) {
- var obj = getAllUserSettings();
-
- if ( obj.hasOwnProperty(name) )
- return obj[name];
-
- if ( typeof def != 'undefined' )
- return def;
-
- return '';
-}
-
-// Both name and value must be only ASCII letters, numbers or underscore
-// and the shorter, the better (cookies can store maximum 4KB). Not suitable to store text.
-function setUserSetting( name, value, _del ) {
- if ( 'object' !== typeof userSettings )
- return false;
-
- var cookie = 'wp-settings-' + userSettings.uid, all = wpCookies.getHash(cookie) || {}, path = userSettings.url,
- n = name.toString().replace(/[^A-Za-z0-9_]/, ''), v = value.toString().replace(/[^A-Za-z0-9_]/, '');
-
- if ( _del ) {
- delete all[n];
- } else {
- all[n] = v;
- }
-
- wpCookies.setHash(cookie, all, 31536000, path);
- wpCookies.set('wp-settings-time-'+userSettings.uid, userSettings.time, 31536000, path);
-
- return name;
-}
-
-function deleteUserSetting( name ) {
- return setUserSetting( name, '', 1 );
-}
-
-// Returns all settings as js object.
-function getAllUserSettings() {
- if ( 'object' !== typeof userSettings )
- return {};
-
- return wpCookies.getHash('wp-settings-' + userSettings.uid) || {};
-}
diff --git a/wp-includes/js/utils.min.js b/wp-includes/js/utils.min.js
deleted file mode 100644
index 941ac2ef6f..0000000000
--- a/wp-includes/js/utils.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var wpCookies={each:function(d,a,c){var e,b;if(!d){return 0}c=c||d;if(typeof(d.length)!="undefined"){for(e=0,b=d.length;e<b;e++){if(a.call(c,d[e],e,d)===false){return 0}}}else{for(e in d){if(d.hasOwnProperty(e)){if(a.call(c,d[e],e,d)===false){return 0}}}}return 1},getHash:function(b){var c=this.get(b),a;if(c){this.each(c.split("&"),function(d){d=d.split("=");a=a||{};a[d[0]]=d[1]})}return a},setHash:function(b,c,a,f,d,e){var g="";this.each(c,function(i,h){g+=(!g?"":"&")+h+"="+i});this.set(b,g,a,f,d,e)},get:function(c){var d=document.cookie,g,f=c+"=",a;if(!d){return}a=d.indexOf("; "+f);if(a==-1){a=d.indexOf(f);if(a!=0){return null}}else{a+=2}g=d.indexOf(";",a);if(g==-1){g=d.length}return decodeURIComponent(d.substring(a+f.length,g))},set:function(b,e,a,g,c,f){var h=new Date();if(typeof(a)=="object"&&a.toGMTString){a=a.toGMTString()}else{if(parseInt(a,10)){h.setTime(h.getTime()+(parseInt(a,10)*1000));a=h.toGMTString()}else{a=""}}document.cookie=b+"="+encodeURIComponent(e)+((a)?"; expires="+a:"")+((g)?"; path="+g:"")+((c)?"; domain="+c:"")+((f)?"; secure":"")},remove:function(a,b){this.set(a,"",-1000,b)}};function getUserSetting(a,b){var c=getAllUserSettings();if(c.hasOwnProperty(a)){return c[a]}if(typeof b!="undefined"){return b}return""}function setUserSetting(c,f,b){if("object"!==typeof userSettings){return false}var d="wp-settings-"+userSettings.uid,e=wpCookies.getHash(d)||{},g=userSettings.url,h=c.toString().replace(/[^A-Za-z0-9_]/,""),a=f.toString().replace(/[^A-Za-z0-9_]/,"");if(b){delete e[h]}else{e[h]=a}wpCookies.setHash(d,e,31536000,g);wpCookies.set("wp-settings-time-"+userSettings.uid,userSettings.time,31536000,g);return c}function deleteUserSetting(a){return setUserSetting(a,"",1)}function getAllUserSettings(){if("object"!==typeof userSettings){return{}}return wpCookies.getHash("wp-settings-"+userSettings.uid)||{}}; \ No newline at end of file
diff --git a/wp-includes/js/wp-ajax-response.js b/wp-includes/js/wp-ajax-response.js
deleted file mode 100644
index d5b003cf56..0000000000
--- a/wp-includes/js/wp-ajax-response.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var wpAjax = jQuery.extend( {
- unserialize: function( s ) {
- var r = {}, q, pp, i, p;
- if ( !s ) { return r; }
- q = s.split('?'); if ( q[1] ) { s = q[1]; }
- pp = s.split('&');
- for ( i in pp ) {
- if ( jQuery.isFunction(pp.hasOwnProperty) && !pp.hasOwnProperty(i) ) { continue; }
- p = pp[i].split('=');
- r[p[0]] = p[1];
- }
- return r;
- },
- parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission
- var parsed = {}, re = jQuery('#' + r).html(''), err = '';
-
- if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) {
- parsed.responses = [];
- parsed.errors = false;
- jQuery('response', x).each( function() {
- var th = jQuery(this), child = jQuery(this.firstChild), response;
- response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') };
- response.data = jQuery( 'response_data', child ).text();
- response.supplemental = {};
- if ( !jQuery( 'supplemental', child ).children().each( function() {
- response.supplemental[this.nodeName] = jQuery(this).text();
- } ).size() ) { response.supplemental = false }
- response.errors = [];
- if ( !jQuery('wp_error', child).each( function() {
- var code = jQuery(this).attr('code'), anError, errorData, formField;
- anError = { code: code, message: this.firstChild.nodeValue, data: false };
- errorData = jQuery('wp_error_data[code="' + code + '"]', x);
- if ( errorData ) { anError.data = errorData.get(); }
- formField = jQuery( 'form-field', errorData ).text();
- if ( formField ) { code = formField; }
- if ( e ) { wpAjax.invalidateForm( jQuery('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') ); }
- err += '<p>' + anError.message + '</p>';
- response.errors.push( anError );
- parsed.errors = true;
- } ).size() ) { response.errors = false; }
- parsed.responses.push( response );
- } );
- if ( err.length ) { re.html( '<div class="error">' + err + '</div>' ); }
- return parsed;
- }
- if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }
- x = parseInt(x,10);
- if ( -1 == x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
- else if ( 0 === x ) { return !re.html('<div class="error"><p>' + wpAjax.broken + '</p></div>'); }
- return true;
- },
- invalidateForm: function ( selector ) {
- return jQuery( selector ).addClass( 'form-invalid' ).find('input:visible').change( function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } );
- },
- validateForm: function( selector ) {
- selector = jQuery( selector );
- return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() == ''; } ) ).size();
- }
-}, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'An unidentified error has occurred.' } );
-
-// Basic form validation
-jQuery(document).ready( function($){
- $('form.validate').submit( function() { return wpAjax.validateForm( $(this) ); } );
-});
diff --git a/wp-includes/js/wp-ajax-response.min.js b/wp-includes/js/wp-ajax-response.min.js
deleted file mode 100644
index bdfa53ab06..0000000000
--- a/wp-includes/js/wp-ajax-response.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var wpAjax=jQuery.extend({unserialize:function(c){var d={},e,a,b,f;if(!c){return d}e=c.split("?");if(e[1]){c=e[1]}a=c.split("&");for(b in a){if(jQuery.isFunction(a.hasOwnProperty)&&!a.hasOwnProperty(b)){continue}f=a[b].split("=");d[f[0]]=f[1]}return d},parseAjaxResponse:function(a,f,g){var b={},c=jQuery("#"+f).html(""),d="";if(a&&typeof a=="object"&&a.getElementsByTagName("wp_ajax")){b.responses=[];b.errors=false;jQuery("response",a).each(function(){var h=jQuery(this),i=jQuery(this.firstChild),e;e={action:h.attr("action"),what:i.get(0).nodeName,id:i.attr("id"),oldId:i.attr("old_id"),position:i.attr("position")};e.data=jQuery("response_data",i).text();e.supplemental={};if(!jQuery("supplemental",i).children().each(function(){e.supplemental[this.nodeName]=jQuery(this).text()}).size()){e.supplemental=false}e.errors=[];if(!jQuery("wp_error",i).each(function(){var j=jQuery(this).attr("code"),m,l,k;m={code:j,message:this.firstChild.nodeValue,data:false};l=jQuery('wp_error_data[code="'+j+'"]',a);if(l){m.data=l.get()}k=jQuery("form-field",l).text();if(k){j=k}if(g){wpAjax.invalidateForm(jQuery("#"+g+' :input[name="'+j+'"]').parents(".form-field:first"))}d+="<p>"+m.message+"</p>";e.errors.push(m);b.errors=true}).size()){e.errors=false}b.responses.push(e)});if(d.length){c.html('<div class="error">'+d+"</div>")}return b}if(isNaN(a)){return !c.html('<div class="error"><p>'+a+"</p></div>")}a=parseInt(a,10);if(-1==a){return !c.html('<div class="error"><p>'+wpAjax.noPerm+"</p></div>")}else{if(0===a){return !c.html('<div class="error"><p>'+wpAjax.broken+"</p></div>")}}return true},invalidateForm:function(a){return jQuery(a).addClass("form-invalid").find("input:visible").change(function(){jQuery(this).closest(".form-invalid").removeClass("form-invalid")})},validateForm:function(a){a=jQuery(a);return !wpAjax.invalidateForm(a.find(".form-required").filter(function(){return jQuery("input:visible",this).val()==""})).size()}},wpAjax||{noPerm:"You do not have permission to do that.",broken:"An unidentified error has occurred."});jQuery(document).ready(function(a){a("form.validate").submit(function(){return wpAjax.validateForm(a(this))})}); \ No newline at end of file
diff --git a/wp-includes/js/wp-auth-check.js b/wp-includes/js/wp-auth-check.js
deleted file mode 100644
index 667143de5d..0000000000
--- a/wp-includes/js/wp-auth-check.js
+++ /dev/null
@@ -1,106 +0,0 @@
-// Interim login dialog
-(function($){
- var wrap, check, next;
-
- function show() {
- var parent = $('#wp-auth-check'), form = $('#wp-auth-check-form'), noframe = wrap.find('.wp-auth-fallback-expired'), frame, loaded = false;
-
- if ( form.length ) {
- // Add unload confirmation to counter (frame-busting) JS redirects
- $(window).on( 'beforeunload.wp-auth-check', function(e) {
- e.originalEvent.returnValue = window.authcheckL10n.beforeunload;
- });
-
- frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
- frame.load( function(e) {
- var height, body;
-
- loaded = true;
-
- try {
- body = $(this).contents().find('body');
- height = body.height();
- } catch(e) {
- wrap.addClass('fallback');
- parent.css( 'max-height', '' );
- form.remove();
- noframe.focus();
- return;
- }
-
- if ( height ) {
- if ( body && body.hasClass('interim-login-success') )
- hide();
- else
- parent.css( 'max-height', height + 40 + 'px' );
- } else if ( ! body || ! body.length ) {
- // Catch "silent" iframe origin exceptions in WebKit after another page is loaded in the iframe
- wrap.addClass('fallback');
- parent.css( 'max-height', '' );
- form.remove();
- noframe.focus();
- }
- }).attr( 'src', form.data('src') );
-
- $('#wp-auth-check-form').append( frame );
- }
-
- wrap.removeClass('hidden');
-
- if ( frame ) {
- frame.focus();
- // WebKit doesn't throw an error if the iframe fails to load because of "X-Frame-Options: DENY" header.
- // Wait for 10 sec. and switch to the fallback text.
- setTimeout( function() {
- if ( ! loaded ) {
- wrap.addClass('fallback');
- form.remove();
- noframe.focus();
- }
- }, 10000 );
- } else {
- noframe.focus();
- }
- }
-
- function hide() {
- $(window).off( 'beforeunload.wp-auth-check' );
-
- // When on the Edit Post screen, speed up heartbeat after the user logs in to quickly refresh nonces
- if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' )
- && typeof wp != 'undefined' && wp.heartbeat ) {
-
- wp.heartbeat.interval( 'fast', 1 );
- }
-
- wrap.fadeOut( 200, function() {
- wrap.addClass('hidden').css('display', '');
- $('#wp-auth-check-frame').remove();
- });
- }
-
- function schedule() {
- var interval = parseInt( window.authcheckL10n.interval, 10 ) || 180; // in seconds, default 3 min.
- next = ( new Date() ).getTime() + ( interval * 1000 );
- }
-
- $( document ).on( 'heartbeat-tick.wp-auth-check', function( e, data ) {
- if ( 'wp-auth-check' in data ) {
- schedule();
- if ( ! data['wp-auth-check'] && wrap.hasClass('hidden') )
- show();
- else if ( data['wp-auth-check'] && ! wrap.hasClass('hidden') )
- hide();
- }
- }).on( 'heartbeat-send.wp-auth-check', function( e, data ) {
- if ( ( new Date() ).getTime() > next )
- data['wp-auth-check'] = true;
- }).ready( function() {
- schedule();
- wrap = $('#wp-auth-check-wrap');
- wrap.find('.wp-auth-check-close').on( 'click', function(e) {
- hide();
- });
- });
-
-}(jQuery));
diff --git a/wp-includes/js/wp-auth-check.min.js b/wp-includes/js/wp-auth-check.min.js
deleted file mode 100644
index 0bdbb3f9a9..0000000000
--- a/wp-includes/js/wp-auth-check.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(f){var e,b,d;function a(){var j=f("#wp-auth-check"),k=f("#wp-auth-check-form"),h=e.find(".wp-auth-fallback-expired"),l,i=false;if(k.length){f(window).on("beforeunload.wp-auth-check",function(m){m.originalEvent.returnValue=window.authcheckL10n.beforeunload});l=f('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",h.text());l.load(function(o){var n,m;i=true;try{m=f(this).contents().find("body");n=m.height()}catch(o){e.addClass("fallback");j.css("max-height","");k.remove();h.focus();return}if(n){if(m&&m.hasClass("interim-login-success")){c()}else{j.css("max-height",n+40+"px")}}else{if(!m||!m.length){e.addClass("fallback");j.css("max-height","");k.remove();h.focus()}}}).attr("src",k.data("src"));f("#wp-auth-check-form").append(l)}e.removeClass("hidden");if(l){l.focus();setTimeout(function(){if(!i){e.addClass("fallback");k.remove();h.focus()}},10000)}else{h.focus()}}function c(){f(window).off("beforeunload.wp-auth-check");if(typeof adminpage!="undefined"&&(adminpage=="post-php"||adminpage=="post-new-php")&&typeof wp!="undefined"&&wp.heartbeat){wp.heartbeat.interval("fast",1)}e.fadeOut(200,function(){e.addClass("hidden").css("display","");f("#wp-auth-check-frame").remove()})}function g(){var h=parseInt(window.authcheckL10n.interval,10)||180;d=(new Date()).getTime()+(h*1000)}f(document).on("heartbeat-tick.wp-auth-check",function(i,h){if("wp-auth-check" in h){g();if(!h["wp-auth-check"]&&e.hasClass("hidden")){a()}else{if(h["wp-auth-check"]&&!e.hasClass("hidden")){c()}}}}).on("heartbeat-send.wp-auth-check",function(i,h){if((new Date()).getTime()>d){h["wp-auth-check"]=true}}).ready(function(){g();e=f("#wp-auth-check-wrap");e.find(".wp-auth-check-close").on("click",function(h){c()})})}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/wp-backbone.js b/wp-includes/js/wp-backbone.js
deleted file mode 100644
index 9e0041d4d0..0000000000
--- a/wp-includes/js/wp-backbone.js
+++ /dev/null
@@ -1,384 +0,0 @@
-window.wp = window.wp || {};
-
-(function ($) {
- // Create the WordPress Backbone namespace.
- wp.Backbone = {};
-
-
- // wp.Backbone.Subviews
- // --------------------
- //
- // A subview manager.
- wp.Backbone.Subviews = function( view, views ) {
- this.view = view;
- this._views = _.isArray( views ) ? { '': views } : views || {};
- };
-
- wp.Backbone.Subviews.extend = Backbone.Model.extend;
-
- _.extend( wp.Backbone.Subviews.prototype, {
- // ### Fetch all of the subviews
- //
- // Returns an array of all subviews.
- all: function() {
- return _.flatten( this._views );
- },
-
- // ### Get a selector's subviews
- //
- // Fetches all subviews that match a given `selector`.
- //
- // If no `selector` is provided, it will grab all subviews attached
- // to the view's root.
- get: function( selector ) {
- selector = selector || '';
- return this._views[ selector ];
- },
-
- // ### Get a selector's first subview
- //
- // Fetches the first subview that matches a given `selector`.
- //
- // If no `selector` is provided, it will grab the first subview
- // attached to the view's root.
- //
- // Useful when a selector only has one subview at a time.
- first: function( selector ) {
- var views = this.get( selector );
- return views && views.length ? views[0] : null;
- },
-
- // ### Register subview(s)
- //
- // Registers any number of `views` to a `selector`.
- //
- // When no `selector` is provided, the root selector (the empty string)
- // is used. `views` accepts a `Backbone.View` instance or an array of
- // `Backbone.View` instances.
- //
- // ---
- //
- // Accepts an `options` object, which has a significant effect on the
- // resulting behavior.
- //
- // `options.silent` &ndash; *boolean, `false`*
- // > If `options.silent` is true, no DOM modifications will be made.
- //
- // `options.add` &ndash; *boolean, `false`*
- // > Use `Views.add()` as a shortcut for setting `options.add` to true.
- //
- // > By default, the provided `views` will replace
- // any existing views associated with the selector. If `options.add`
- // is true, the provided `views` will be added to the existing views.
- //
- // `options.at` &ndash; *integer, `undefined`*
- // > When adding, to insert `views` at a specific index, use
- // `options.at`. By default, `views` are added to the end of the array.
- set: function( selector, views, options ) {
- var existing, next;
-
- if ( ! _.isString( selector ) ) {
- options = views;
- views = selector;
- selector = '';
- }
-
- options = options || {};
- views = _.isArray( views ) ? views : [ views ];
- existing = this.get( selector );
- next = views;
-
- if ( existing ) {
- if ( options.add ) {
- if ( _.isUndefined( options.at ) ) {
- next = existing.concat( views );
- } else {
- next = existing;
- next.splice.apply( next, [ options.at, 0 ].concat( views ) );
- }
- } else {
- _.each( next, function( view ) {
- view.__detach = true;
- });
-
- _.each( existing, function( view ) {
- if ( view.__detach )
- view.$el.detach();
- else
- view.remove();
- });
-
- _.each( next, function( view ) {
- delete view.__detach;
- });
- }
- }
-
- this._views[ selector ] = next;
-
- _.each( views, function( subview ) {
- var constructor = subview.Views || wp.Backbone.Subviews,
- subviews = subview.views = subview.views || new constructor( subview );
- subviews.parent = this.view;
- subviews.selector = selector;
- }, this );
-
- if ( ! options.silent )
- this._attach( selector, views, _.extend({ ready: this._isReady() }, options ) );
-
- return this;
- },
-
- // ### Add subview(s) to existing subviews
- //
- // An alias to `Views.set()`, which defaults `options.add` to true.
- //
- // Adds any number of `views` to a `selector`.
- //
- // When no `selector` is provided, the root selector (the empty string)
- // is used. `views` accepts a `Backbone.View` instance or an array of
- // `Backbone.View` instances.
- //
- // Use `Views.set()` when setting `options.add` to `false`.
- //
- // Accepts an `options` object. By default, provided `views` will be
- // inserted at the end of the array of existing views. To insert
- // `views` at a specific index, use `options.at`. If `options.silent`
- // is true, no DOM modifications will be made.
- //
- // For more information on the `options` object, see `Views.set()`.
- add: function( selector, views, options ) {
- if ( ! _.isString( selector ) ) {
- options = views;
- views = selector;
- selector = '';
- }
-
- return this.set( selector, views, _.extend({ add: true }, options ) );
- },
-
- // ### Stop tracking subviews
- //
- // Stops tracking `views` registered to a `selector`. If no `views` are
- // set, then all of the `selector`'s subviews will be unregistered and
- // removed.
- //
- // Accepts an `options` object. If `options.silent` is set, `remove`
- // will *not* be triggered on the unregistered views.
- unset: function( selector, views, options ) {
- var existing;
-
- if ( ! _.isString( selector ) ) {
- options = views;
- views = selector;
- selector = '';
- }
-
- views = views || [];
-
- if ( existing = this.get( selector ) ) {
- views = _.isArray( views ) ? views : [ views ];
- this._views[ selector ] = views.length ? _.difference( existing, views ) : [];
- }
-
- if ( ! options || ! options.silent )
- _.invoke( views, 'remove' );
-
- return this;
- },
-
- // ### Detach all subviews
- //
- // Detaches all subviews from the DOM.
- //
- // Helps to preserve all subview events when re-rendering the master
- // view. Used in conjunction with `Views.render()`.
- detach: function() {
- $( _.pluck( this.all(), 'el' ) ).detach();
- return this;
- },
-
- // ### Render all subviews
- //
- // Renders all subviews. Used in conjunction with `Views.detach()`.
- render: function() {
- var options = {
- ready: this._isReady()
- };
-
- _.each( this._views, function( views, selector ) {
- this._attach( selector, views, options );
- }, this );
-
- this.rendered = true;
- return this;
- },
-
- // ### Remove all subviews
- //
- // Triggers the `remove()` method on all subviews. Detaches the master
- // view from its parent. Resets the internals of the views manager.
- //
- // Accepts an `options` object. If `options.silent` is set, `unset`
- // will *not* be triggered on the master view's parent.
- remove: function( options ) {
- if ( ! options || ! options.silent ) {
- if ( this.parent && this.parent.views )
- this.parent.views.unset( this.selector, this.view, { silent: true });
- delete this.parent;
- delete this.selector;
- }
-
- _.invoke( this.all(), 'remove' );
- this._views = [];
- return this;
- },
-
- // ### Replace a selector's subviews
- //
- // By default, sets the `$target` selector's html to the subview `els`.
- //
- // Can be overridden in subclasses.
- replace: function( $target, els ) {
- $target.html( els );
- return this;
- },
-
- // ### Insert subviews into a selector
- //
- // By default, appends the subview `els` to the end of the `$target`
- // selector. If `options.at` is set, inserts the subview `els` at the
- // provided index.
- //
- // Can be overridden in subclasses.
- insert: function( $target, els, options ) {
- var at = options && options.at,
- $children;
-
- if ( _.isNumber( at ) && ($children = $target.children()).length > at )
- $children.eq( at ).before( els );
- else
- $target.append( els );
-
- return this;
- },
-
- // ### Trigger the ready event
- //
- // **Only use this method if you know what you're doing.**
- // For performance reasons, this method does not check if the view is
- // actually attached to the DOM. It's taking your word for it.
- //
- // Fires the ready event on the current view and all attached subviews.
- ready: function() {
- this.view.trigger('ready');
-
- // Find all attached subviews, and call ready on them.
- _.chain( this.all() ).map( function( view ) {
- return view.views;
- }).flatten().where({ attached: true }).invoke('ready');
- },
-
- // #### Internal. Attaches a series of views to a selector.
- //
- // Checks to see if a matching selector exists, renders the views,
- // performs the proper DOM operation, and then checks if the view is
- // attached to the document.
- _attach: function( selector, views, options ) {
- var $selector = selector ? this.view.$( selector ) : this.view.$el,
- managers;
-
- // Check if we found a location to attach the views.
- if ( ! $selector.length )
- return this;
-
- managers = _.chain( views ).pluck('views').flatten().value();
-
- // Render the views if necessary.
- _.each( managers, function( manager ) {
- if ( manager.rendered )
- return;
-
- manager.view.render();
- manager.rendered = true;
- }, this );
-
- // Insert or replace the views.
- this[ options.add ? 'insert' : 'replace' ]( $selector, _.pluck( views, 'el' ), options );
-
- // Set attached and trigger ready if the current view is already
- // attached to the DOM.
- _.each( managers, function( manager ) {
- manager.attached = true;
-
- if ( options.ready )
- manager.ready();
- }, this );
-
- return this;
- },
-
- // #### Internal. Checks if the current view is in the DOM.
- _isReady: function() {
- var node = this.view.el;
- while ( node ) {
- if ( node === document.body )
- return true;
- node = node.parentNode;
- }
-
- return false;
- }
- });
-
-
- // wp.Backbone.View
- // ----------------
- //
- // The base view class.
- wp.Backbone.View = Backbone.View.extend({
- // The constructor for the `Views` manager.
- Subviews: wp.Backbone.Subviews,
-
- constructor: function() {
- this.views = new this.Subviews( this, this.views );
- this.on( 'ready', this.ready, this );
-
- Backbone.View.apply( this, arguments );
- },
-
- remove: function() {
- var result = Backbone.View.prototype.remove.apply( this, arguments );
-
- // Recursively remove child views.
- if ( this.views )
- this.views.remove();
-
- return result;
- },
-
- render: function() {
- var options;
-
- if ( this.prepare )
- options = this.prepare();
-
- this.views.detach();
-
- if ( this.template ) {
- options = options || {};
- this.trigger( 'prepare', options );
- this.$el.html( this.template( options ) );
- }
-
- this.views.render();
- return this;
- },
-
- prepare: function() {
- return this.options;
- },
-
- ready: function() {}
- });
-}(jQuery));
diff --git a/wp-includes/js/wp-backbone.min.js b/wp-includes/js/wp-backbone.min.js
deleted file mode 100644
index a96dac9ed4..0000000000
--- a/wp-includes/js/wp-backbone.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(a){wp.Backbone={};wp.Backbone.Subviews=function(c,b){this.view=c;this._views=_.isArray(b)?{"":b}:b||{}};wp.Backbone.Subviews.extend=Backbone.Model.extend;_.extend(wp.Backbone.Subviews.prototype,{all:function(){return _.flatten(this._views)},get:function(b){b=b||"";return this._views[b]},first:function(b){var c=this.get(b);return c&&c.length?c[0]:null},set:function(b,c,d){var f,e;if(!_.isString(b)){d=c;c=b;b=""}d=d||{};c=_.isArray(c)?c:[c];f=this.get(b);e=c;if(f){if(d.add){if(_.isUndefined(d.at)){e=f.concat(c)}else{e=f;e.splice.apply(e,[d.at,0].concat(c))}}else{_.each(e,function(g){g.__detach=true});_.each(f,function(g){if(g.__detach){g.$el.detach()}else{g.remove()}});_.each(e,function(g){delete g.__detach})}}this._views[b]=e;_.each(c,function(i){var g=i.Views||wp.Backbone.Subviews,h=i.views=i.views||new g(i);h.parent=this.view;h.selector=b},this);if(!d.silent){this._attach(b,c,_.extend({ready:this._isReady()},d))}return this},add:function(b,c,d){if(!_.isString(b)){d=c;c=b;b=""}return this.set(b,c,_.extend({add:true},d))},unset:function(b,c,d){var e;if(!_.isString(b)){d=c;c=b;b=""}c=c||[];if(e=this.get(b)){c=_.isArray(c)?c:[c];this._views[b]=c.length?_.difference(e,c):[]}if(!d||!d.silent){_.invoke(c,"remove")}return this},detach:function(){a(_.pluck(this.all(),"el")).detach();return this},render:function(){var b={ready:this._isReady()};_.each(this._views,function(d,c){this._attach(c,d,b)},this);this.rendered=true;return this},remove:function(b){if(!b||!b.silent){if(this.parent&&this.parent.views){this.parent.views.unset(this.selector,this.view,{silent:true})}delete this.parent;delete this.selector}_.invoke(this.all(),"remove");this._views=[];return this},replace:function(b,c){b.html(c);return this},insert:function(c,f,e){var b=e&&e.at,d;if(_.isNumber(b)&&(d=c.children()).length>b){d.eq(b).before(f)}else{c.append(f)}return this},ready:function(){this.view.trigger("ready");_.chain(this.all()).map(function(b){return b.views}).flatten().where({attached:true}).invoke("ready")},_attach:function(b,c,d){var f=b?this.view.$(b):this.view.$el,e;if(!f.length){return this}e=_.chain(c).pluck("views").flatten().value();_.each(e,function(g){if(g.rendered){return}g.view.render();g.rendered=true},this);this[d.add?"insert":"replace"](f,_.pluck(c,"el"),d);_.each(e,function(g){g.attached=true;if(d.ready){g.ready()}},this);return this},_isReady:function(){var b=this.view.el;while(b){if(b===document.body){return true}b=b.parentNode}return false}});wp.Backbone.View=Backbone.View.extend({Subviews:wp.Backbone.Subviews,constructor:function(){this.views=new this.Subviews(this,this.views);this.on("ready",this.ready,this);Backbone.View.apply(this,arguments)},remove:function(){var b=Backbone.View.prototype.remove.apply(this,arguments);if(this.views){this.views.remove()}return b},render:function(){var b;if(this.prepare){b=this.prepare()}this.views.detach();if(this.template){b=b||{};this.trigger("prepare",b);this.$el.html(this.template(b))}this.views.render();return this},prepare:function(){return this.options},ready:function(){}})}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/wp-list-revisions.js b/wp-includes/js/wp-list-revisions.js
deleted file mode 100644
index 9c702c6595..0000000000
--- a/wp-includes/js/wp-list-revisions.js
+++ /dev/null
@@ -1,24 +0,0 @@
-(function(w) {
- var init = function() {
- var pr = document.getElementById('post-revisions'),
- inputs = pr ? pr.getElementsByTagName('input') : [];
- pr.onclick = function() {
- var i, checkCount = 0, side;
- for ( i = 0; i < inputs.length; i++ ) {
- checkCount += inputs[i].checked ? 1 : 0;
- side = inputs[i].getAttribute('name');
- if ( ! inputs[i].checked &&
- ( 'left' == side && 1 > checkCount || 'right' == side && 1 < checkCount && ( ! inputs[i-1] || ! inputs[i-1].checked ) ) &&
- ! ( inputs[i+1] && inputs[i+1].checked && 'right' == inputs[i+1].getAttribute('name') ) )
- inputs[i].style.visibility = 'hidden';
- else if ( 'left' == side || 'right' == side )
- inputs[i].style.visibility = 'visible';
- }
- }
- pr.onclick();
- }
- if ( w && w.addEventListener )
- w.addEventListener('load', init, false);
- else if ( w && w.attachEvent )
- w.attachEvent('onload', init);
-})(window);
diff --git a/wp-includes/js/wp-list-revisions.min.js b/wp-includes/js/wp-list-revisions.min.js
deleted file mode 100644
index 417572db4f..0000000000
--- a/wp-includes/js/wp-list-revisions.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){var b=function(){var d=document.getElementById("post-revisions"),c=d?d.getElementsByTagName("input"):[];d.onclick=function(){var g,f=0,e;for(g=0;g<c.length;g++){f+=c[g].checked?1:0;e=c[g].getAttribute("name");if(!c[g].checked&&("left"==e&&1>f||"right"==e&&1<f&&(!c[g-1]||!c[g-1].checked))&&!(c[g+1]&&c[g+1].checked&&"right"==c[g+1].getAttribute("name"))){c[g].style.visibility="hidden"}else{if("left"==e||"right"==e){c[g].style.visibility="visible"}}}};d.onclick()};if(a&&a.addEventListener){a.addEventListener("load",b,false)}else{if(a&&a.attachEvent){a.attachEvent("onload",b)}}})(window); \ No newline at end of file
diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js
deleted file mode 100644
index 5decd3a845..0000000000
--- a/wp-includes/js/wp-lists.js
+++ /dev/null
@@ -1,464 +0,0 @@
-(function($) {
-var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
-
-wpList = {
- settings: {
- url: ajaxurl, type: 'POST',
- response: 'ajax-response',
-
- what: '',
- alt: 'alternate', altOffset: 0,
- addColor: null, delColor: null, dimAddColor: null, dimDelColor: null,
-
- confirm: null,
- addBefore: null, addAfter: null,
- delBefore: null, delAfter: null,
- dimBefore: null, dimAfter: null
- },
-
- nonce: function(e,s) {
- var url = wpAjax.unserialize(e.attr('href'));
- return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[name="_ajax_nonce"]').val() || url._wpnonce || $('#' + s.element + ' input[name="_wpnonce"]').val() || 0;
- },
-
- parseData: function(e,t) {
- var d = [], wpListsData;
-
- try {
- wpListsData = $(e).attr('data-wp-lists') || '';
- wpListsData = wpListsData.match(new RegExp(t+':[\\S]+'));
-
- if ( wpListsData )
- d = wpListsData[0].split(':');
- } catch(r) {}
-
- return d;
- },
-
- pre: function(e,s,a) {
- var bg, r;
-
- s = $.extend( {}, this.wpList.settings, {
- element: null,
- nonce: 0,
- target: e.get(0)
- }, s || {} );
-
- if ( $.isFunction( s.confirm ) ) {
- if ( 'add' != a ) {
- bg = $('#' + s.element).css('backgroundColor');
- $('#' + s.element).css('backgroundColor', '#FF9966');
- }
- r = s.confirm.call(this, e, s, a, bg);
-
- if ( 'add' != a )
- $('#' + s.element).css('backgroundColor', bg );
-
- if ( !r )
- return false;
- }
-
- return s;
- },
-
- ajaxAdd: function( e, s ) {
- e = $(e);
- s = s || {};
- var list = this, data = wpList.parseData(e,'add'), es, valid, formData, res, rres;
-
- s = wpList.pre.call( list, e, s, 'add' );
-
- s.element = data[2] || e.attr( 'id' ) || s.element || null;
-
- if ( data[3] )
- s.addColor = '#' + data[3];
- else
- s.addColor = s.addColor || '#FFFF33';
-
- if ( !s )
- return false;
-
- if ( !e.is('[id="' + s.element + '-submit"]') )
- return !wpList.add.call( list, e, s );
-
- if ( !s.element )
- return true;
-
- s.action = 'add-' + s.what;
-
- s.nonce = wpList.nonce(e,s);
-
- es = $('#' + s.element + ' :input').not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]');
- valid = wpAjax.validateForm( '#' + s.element );
-
- if ( !valid )
- return false;
-
- s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( data[4] || '' ) ) );
- formData = $.isFunction(es.fieldSerialize) ? es.fieldSerialize() : es.serialize();
-
- if ( formData )
- s.data += '&' + formData;
-
- if ( $.isFunction(s.addBefore) ) {
- s = s.addBefore( s );
- if ( !s )
- return true;
- }
-
- if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) )
- return true;
-
- s.success = function(r) {
- res = wpAjax.parseAjaxResponse(r, s.response, s.element);
-
- rres = r;
-
- if ( !res || res.errors )
- return false;
-
- if ( true === res )
- return true;
-
- jQuery.each( res.responses, function() {
- wpList.add.call( list, this.data, $.extend( {}, s, { // this.firstChild.nodevalue
- pos: this.position || 0,
- id: this.id || 0,
- oldId: this.oldId || null
- } ) );
- } );
-
- list.wpList.recolor();
- $(list).trigger( 'wpListAddEnd', [ s, list.wpList ] );
- wpList.clear.call(list,'#' + s.element);
- };
-
- s.complete = function(x, st) {
- if ( $.isFunction(s.addAfter) ) {
- var _s = $.extend( { xml: x, status: st, parsed: res }, s );
- s.addAfter( rres, _s );
- }
- };
-
- $.ajax( s );
- return false;
- },
-
- ajaxDel: function( e, s ) {
- e = $(e);
- s = s || {};
- var list = this, data = wpList.parseData(e,'delete'), element, res, rres;
-
- s = wpList.pre.call( list, e, s, 'delete' );
-
- s.element = data[2] || s.element || null;
-
- if ( data[3] )
- s.delColor = '#' + data[3];
- else
- s.delColor = s.delColor || '#faa';
-
- if ( !s || !s.element )
- return false;
-
- s.action = 'delete-' + s.what;
-
- s.nonce = wpList.nonce(e,s);
-
- s.data = $.extend(
- { action: s.action, id: s.element.split('-').pop(), _ajax_nonce: s.nonce },
- wpAjax.unserialize( data[4] || '' )
- );
-
- if ( $.isFunction(s.delBefore) ) {
- s = s.delBefore( s, list );
- if ( !s )
- return true;
- }
-
- if ( !s.data._ajax_nonce )
- return true;
-
- element = $('#' + s.element);
-
- if ( 'none' != s.delColor ) {
- element.css( 'backgroundColor', s.delColor ).fadeOut( 350, function(){
- list.wpList.recolor();
- $(list).trigger( 'wpListDelEnd', [ s, list.wpList ] );
- });
- } else {
- list.wpList.recolor();
- $(list).trigger( 'wpListDelEnd', [ s, list.wpList ] );
- }
-
- s.success = function(r) {
- res = wpAjax.parseAjaxResponse(r, s.response, s.element);
- rres = r;
-
- if ( !res || res.errors ) {
- element.stop().stop().css( 'backgroundColor', '#faa' ).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
- return false;
- }
- };
-
- s.complete = function(x, st) {
- if ( $.isFunction(s.delAfter) ) {
- element.queue( function() {
- var _s = $.extend( { xml: x, status: st, parsed: res }, s );
- s.delAfter( rres, _s );
- }).dequeue();
- }
- }
-
- $.ajax( s );
- return false;
- },
-
- ajaxDim: function( e, s ) {
- if ( $(e).parent().css('display') == 'none' ) // Prevent hidden links from being clicked by hotkeys
- return false;
-
- e = $(e);
- s = s || {};
-
- var list = this, data = wpList.parseData(e,'dim'), element, isClass, color, dimColor, res, rres;
-
- s = wpList.pre.call( list, e, s, 'dim' );
-
- s.element = data[2] || s.element || null;
- s.dimClass = data[3] || s.dimClass || null;
-
- if ( data[4] )
- s.dimAddColor = '#' + data[4];
- else
- s.dimAddColor = s.dimAddColor || '#FFFF33';
-
- if ( data[5] )
- s.dimDelColor = '#' + data[5];
- else
- s.dimDelColor = s.dimDelColor || '#FF3333';
-
- if ( !s || !s.element || !s.dimClass )
- return true;
-
- s.action = 'dim-' + s.what;
-
- s.nonce = wpList.nonce(e,s);
-
- s.data = $.extend(
- { action: s.action, id: s.element.split('-').pop(), dimClass: s.dimClass, _ajax_nonce : s.nonce },
- wpAjax.unserialize( data[6] || '' )
- );
-
- if ( $.isFunction(s.dimBefore) ) {
- s = s.dimBefore( s );
- if ( !s )
- return true;
- }
-
- element = $('#' + s.element);
- isClass = element.toggleClass(s.dimClass).is('.' + s.dimClass);
- color = wpList.getColor( element );
- element.toggleClass( s.dimClass );
- dimColor = isClass ? s.dimAddColor : s.dimDelColor;
-
- if ( 'none' != dimColor ) {
- element
- .animate( { backgroundColor: dimColor }, 'fast' )
- .queue( function() { element.toggleClass(s.dimClass); $(this).dequeue(); } )
- .animate( { backgroundColor: color }, { complete: function() {
- $(this).css( 'backgroundColor', '' );
- $(list).trigger( 'wpListDimEnd', [ s, list.wpList ] );
- }
- });
- } else {
- $(list).trigger( 'wpListDimEnd', [ s, list.wpList ] );
- }
-
- if ( !s.data._ajax_nonce )
- return true;
-
- s.success = function(r) {
- res = wpAjax.parseAjaxResponse(r, s.response, s.element);
- rres = r;
-
- if ( !res || res.errors ) {
- element.stop().stop().css( 'backgroundColor', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
- return false;
- }
- };
-
- s.complete = function(x, st) {
- if ( $.isFunction(s.dimAfter) ) {
- element.queue( function() {
- var _s = $.extend( { xml: x, status: st, parsed: res }, s );
- s.dimAfter( rres, _s );
- }).dequeue();
- }
- };
-
- $.ajax( s );
- return false;
- },
-
- getColor: function( el ) {
- var color = jQuery(el).css('backgroundColor');
-
- return color || '#ffffff';
- },
-
- add: function( e, s ) {
- e = $(e);
-
- var list = $(this), old = false, _s = { pos: 0, id: 0, oldId: null }, ba, ref, color;
-
- if ( 'string' == typeof s )
- s = { what: s };
-
- s = $.extend(_s, this.wpList.settings, s);
-
- if ( !e.size() || !s.what )
- return false;
-
- if ( s.oldId )
- old = $('#' + s.what + '-' + s.oldId);
-
- if ( s.id && ( s.id != s.oldId || !old || !old.size() ) )
- $('#' + s.what + '-' + s.id).remove();
-
- if ( old && old.size() ) {
- old.before(e);
- old.remove();
- } else if ( isNaN(s.pos) ) {
- ba = 'after';
-
- if ( '-' == s.pos.substr(0,1) ) {
- s.pos = s.pos.substr(1);
- ba = 'before';
- }
-
- ref = list.find( '#' + s.pos );
-
- if ( 1 === ref.size() )
- ref[ba](e);
- else
- list.append(e);
-
- } else if ( 'comment' != s.what || 0 === $('#' + s.element).length ) {
- if ( s.pos < 0 ) {
- list.prepend(e);
- } else {
- list.append(e);
- }
- }
-
- if ( s.alt ) {
- if ( ( list.children(':visible').index( e[0] ) + s.altOffset ) % 2 ) { e.removeClass( s.alt ); }
- else { e.addClass( s.alt ); }
- }
-
- if ( 'none' != s.addColor ) {
- color = wpList.getColor( e );
- e.css( 'backgroundColor', s.addColor ).animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } );
- }
- list.each( function() { this.wpList.process( e ); } );
- return e;
- },
-
- clear: function(e) {
- var list = this, t, tag;
-
- e = $(e);
-
- if ( list.wpList && e.parents( '#' + list.id ).size() )
- return;
-
- e.find(':input').each( function() {
- if ( $(this).parents('.form-no-clear').size() )
- return;
-
- t = this.type.toLowerCase();
- tag = this.tagName.toLowerCase();
-
- if ( 'text' == t || 'password' == t || 'textarea' == tag )
- this.value = '';
- else if ( 'checkbox' == t || 'radio' == t )
- this.checked = false;
- else if ( 'select' == tag )
- this.selectedIndex = null;
- });
- },
-
- process: function(el) {
- var list = this,
- $el = $(el || document);
-
- $el.delegate( 'form[data-wp-lists^="add:' + list.id + ':"]', 'submit', function(){
- return list.wpList.add(this);
- });
-
- $el.delegate( 'a[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', 'click', function(){
- return list.wpList.add(this);
- });
-
- $el.delegate( '[data-wp-lists^="delete:' + list.id + ':"]', 'click', function(){
- return list.wpList.del(this);
- });
-
- $el.delegate( '[data-wp-lists^="dim:' + list.id + ':"]', 'click', function(){
- return list.wpList.dim(this);
- });
- },
-
- recolor: function() {
- var list = this, items, eo;
-
- if ( !list.wpList.settings.alt )
- return;
-
- items = $('.list-item:visible', list);
-
- if ( !items.size() )
- items = $(list).children(':visible');
-
- eo = [':even',':odd'];
-
- if ( list.wpList.settings.altOffset % 2 )
- eo.reverse();
-
- items.filter(eo[0]).addClass(list.wpList.settings.alt).end().filter(eo[1]).removeClass(list.wpList.settings.alt);
- },
-
- init: function() {
- var lists = this;
-
- lists.wpList.process = function(a) {
- lists.each( function() {
- this.wpList.process(a);
- } );
- };
-
- lists.wpList.recolor = function() {
- lists.each( function() {
- this.wpList.recolor();
- } );
- };
- }
-};
-
-$.fn.wpList = function( settings ) {
- this.each( function() {
- var _this = this;
-
- this.wpList = { settings: $.extend( {}, wpList.settings, { what: wpList.parseData(this,'list')[1] || '' }, settings ) };
- $.each( fs, function(i,f) { _this.wpList[i] = function( e, s ) { return wpList[f].call( _this, e, s ); }; } );
- } );
-
- wpList.init.call(this);
-
- this.wpList.process();
-
- return this;
-};
-
-})(jQuery);
diff --git a/wp-includes/js/wp-lists.min.js b/wp-includes/js/wp-lists.min.js
deleted file mode 100644
index 76e6af14d5..0000000000
--- a/wp-includes/js/wp-lists.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(b){var a={add:"ajaxAdd",del:"ajaxDel",dim:"ajaxDim",process:"process",recolor:"recolor"},c;c={settings:{url:ajaxurl,type:"POST",response:"ajax-response",what:"",alt:"alternate",altOffset:0,addColor:null,delColor:null,dimAddColor:null,dimDelColor:null,confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(g,f){var d=wpAjax.unserialize(g.attr("href"));return f.nonce||d._ajax_nonce||b("#"+f.element+' input[name="_ajax_nonce"]').val()||d._wpnonce||b("#"+f.element+' input[name="_wpnonce"]').val()||0},parseData:function(i,g){var j=[],f;try{f=b(i).attr("data-wp-lists")||"";f=f.match(new RegExp(g+":[\\S]+"));if(f){j=f[0].split(":")}}catch(h){}return j},pre:function(i,g,d){var f,h;g=b.extend({},this.wpList.settings,{element:null,nonce:0,target:i.get(0)},g||{});if(b.isFunction(g.confirm)){if("add"!=d){f=b("#"+g.element).css("backgroundColor");b("#"+g.element).css("backgroundColor","#FF9966")}h=g.confirm.call(this,i,g,d,f);if("add"!=d){b("#"+g.element).css("backgroundColor",f)}if(!h){return false}}return g},ajaxAdd:function(h,m){h=b(h);m=m||{};var i=this,g=c.parseData(h,"add"),k,d,f,j,l;m=c.pre.call(i,h,m,"add");m.element=g[2]||h.attr("id")||m.element||null;if(g[3]){m.addColor="#"+g[3]}else{m.addColor=m.addColor||"#FFFF33"}if(!m){return false}if(!h.is('[id="'+m.element+'-submit"]')){return !c.add.call(i,h,m)}if(!m.element){return true}m.action="add-"+m.what;m.nonce=c.nonce(h,m);k=b("#"+m.element+" :input").not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]');d=wpAjax.validateForm("#"+m.element);if(!d){return false}m.data=b.param(b.extend({_ajax_nonce:m.nonce,action:m.action},wpAjax.unserialize(g[4]||"")));f=b.isFunction(k.fieldSerialize)?k.fieldSerialize():k.serialize();if(f){m.data+="&"+f}if(b.isFunction(m.addBefore)){m=m.addBefore(m);if(!m){return true}}if(!m.data.match(/_ajax_nonce=[a-f0-9]+/)){return true}m.success=function(e){j=wpAjax.parseAjaxResponse(e,m.response,m.element);l=e;if(!j||j.errors){return false}if(true===j){return true}jQuery.each(j.responses,function(){c.add.call(i,this.data,b.extend({},m,{pos:this.position||0,id:this.id||0,oldId:this.oldId||null}))});i.wpList.recolor();b(i).trigger("wpListAddEnd",[m,i.wpList]);c.clear.call(i,"#"+m.element)};m.complete=function(e,n){if(b.isFunction(m.addAfter)){var o=b.extend({xml:e,status:n,parsed:j},m);m.addAfter(l,o)}};b.ajax(m);return false},ajaxDel:function(k,h){k=b(k);h=h||{};var j=this,i=c.parseData(k,"delete"),g,f,d;h=c.pre.call(j,k,h,"delete");h.element=i[2]||h.element||null;if(i[3]){h.delColor="#"+i[3]}else{h.delColor=h.delColor||"#faa"}if(!h||!h.element){return false}h.action="delete-"+h.what;h.nonce=c.nonce(k,h);h.data=b.extend({action:h.action,id:h.element.split("-").pop(),_ajax_nonce:h.nonce},wpAjax.unserialize(i[4]||""));if(b.isFunction(h.delBefore)){h=h.delBefore(h,j);if(!h){return true}}if(!h.data._ajax_nonce){return true}g=b("#"+h.element);if("none"!=h.delColor){g.css("backgroundColor",h.delColor).fadeOut(350,function(){j.wpList.recolor();b(j).trigger("wpListDelEnd",[h,j.wpList])})}else{j.wpList.recolor();b(j).trigger("wpListDelEnd",[h,j.wpList])}h.success=function(e){f=wpAjax.parseAjaxResponse(e,h.response,h.element);d=e;if(!f||f.errors){g.stop().stop().css("backgroundColor","#faa").show().queue(function(){j.wpList.recolor();b(this).dequeue()});return false}};h.complete=function(e,l){if(b.isFunction(h.delAfter)){g.queue(function(){var m=b.extend({xml:e,status:l,parsed:f},h);h.delAfter(d,m)}).dequeue()}};b.ajax(h);return false},ajaxDim:function(i,n){if(b(i).parent().css("display")=="none"){return false}i=b(i);n=n||{};var j=this,g=c.parseData(i,"dim"),h,d,f,l,k,m;n=c.pre.call(j,i,n,"dim");n.element=g[2]||n.element||null;n.dimClass=g[3]||n.dimClass||null;if(g[4]){n.dimAddColor="#"+g[4]}else{n.dimAddColor=n.dimAddColor||"#FFFF33"}if(g[5]){n.dimDelColor="#"+g[5]}else{n.dimDelColor=n.dimDelColor||"#FF3333"}if(!n||!n.element||!n.dimClass){return true}n.action="dim-"+n.what;n.nonce=c.nonce(i,n);n.data=b.extend({action:n.action,id:n.element.split("-").pop(),dimClass:n.dimClass,_ajax_nonce:n.nonce},wpAjax.unserialize(g[6]||""));if(b.isFunction(n.dimBefore)){n=n.dimBefore(n);if(!n){return true}}h=b("#"+n.element);d=h.toggleClass(n.dimClass).is("."+n.dimClass);f=c.getColor(h);h.toggleClass(n.dimClass);l=d?n.dimAddColor:n.dimDelColor;if("none"!=l){h.animate({backgroundColor:l},"fast").queue(function(){h.toggleClass(n.dimClass);b(this).dequeue()}).animate({backgroundColor:f},{complete:function(){b(this).css("backgroundColor","");b(j).trigger("wpListDimEnd",[n,j.wpList])}})}else{b(j).trigger("wpListDimEnd",[n,j.wpList])}if(!n.data._ajax_nonce){return true}n.success=function(e){k=wpAjax.parseAjaxResponse(e,n.response,n.element);m=e;if(!k||k.errors){h.stop().stop().css("backgroundColor","#FF3333")[d?"removeClass":"addClass"](n.dimClass).show().queue(function(){j.wpList.recolor();b(this).dequeue()});return false}};n.complete=function(e,o){if(b.isFunction(n.dimAfter)){h.queue(function(){var p=b.extend({xml:e,status:o,parsed:k},n);n.dimAfter(m,p)}).dequeue()}};b.ajax(n);return false},getColor:function(e){var d=jQuery(e).css("backgroundColor");return d||"#ffffff"},add:function(k,g){k=b(k);var i=b(this),d=false,j={pos:0,id:0,oldId:null},l,h,f;if("string"==typeof g){g={what:g}}g=b.extend(j,this.wpList.settings,g);if(!k.size()||!g.what){return false}if(g.oldId){d=b("#"+g.what+"-"+g.oldId)}if(g.id&&(g.id!=g.oldId||!d||!d.size())){b("#"+g.what+"-"+g.id).remove()}if(d&&d.size()){d.before(k);d.remove()}else{if(isNaN(g.pos)){l="after";if("-"==g.pos.substr(0,1)){g.pos=g.pos.substr(1);l="before"}h=i.find("#"+g.pos);if(1===h.size()){h[l](k)}else{i.append(k)}}else{if("comment"!=g.what||0===b("#"+g.element).length){if(g.pos<0){i.prepend(k)}else{i.append(k)}}}}if(g.alt){if((i.children(":visible").index(k[0])+g.altOffset)%2){k.removeClass(g.alt)}else{k.addClass(g.alt)}}if("none"!=g.addColor){f=c.getColor(k);k.css("backgroundColor",g.addColor).animate({backgroundColor:f},{complete:function(){b(this).css("backgroundColor","")}})}i.each(function(){this.wpList.process(k)});return k},clear:function(h){var g=this,f,d;h=b(h);if(g.wpList&&h.parents("#"+g.id).size()){return}h.find(":input").each(function(){if(b(this).parents(".form-no-clear").size()){return}f=this.type.toLowerCase();d=this.tagName.toLowerCase();if("text"==f||"password"==f||"textarea"==d){this.value=""}else{if("checkbox"==f||"radio"==f){this.checked=false}else{if("select"==d){this.selectedIndex=null}}}})},process:function(e){var f=this,d=b(e||document);d.delegate('form[data-wp-lists^="add:'+f.id+':"]',"submit",function(){return f.wpList.add(this)});d.delegate('a[data-wp-lists^="add:'+f.id+':"], input[data-wp-lists^="add:'+f.id+':"]',"click",function(){return f.wpList.add(this)});d.delegate('[data-wp-lists^="delete:'+f.id+':"]',"click",function(){return f.wpList.del(this)});d.delegate('[data-wp-lists^="dim:'+f.id+':"]',"click",function(){return f.wpList.dim(this)})},recolor:function(){var f=this,e,d;if(!f.wpList.settings.alt){return}e=b(".list-item:visible",f);if(!e.size()){e=b(f).children(":visible")}d=[":even",":odd"];if(f.wpList.settings.altOffset%2){d.reverse()}e.filter(d[0]).addClass(f.wpList.settings.alt).end().filter(d[1]).removeClass(f.wpList.settings.alt)},init:function(){var d=this;d.wpList.process=function(e){d.each(function(){this.wpList.process(e)})};d.wpList.recolor=function(){d.each(function(){this.wpList.recolor()})}}};b.fn.wpList=function(d){this.each(function(){var e=this;this.wpList={settings:b.extend({},c.settings,{what:c.parseData(this,"list")[1]||""},d)};b.each(a,function(g,h){e.wpList[g]=function(i,f){return c[h].call(e,i,f)}})});c.init.call(this);this.wpList.process();return this}})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/wp-pointer.js b/wp-includes/js/wp-pointer.js
deleted file mode 100644
index 23b0e43dfe..0000000000
--- a/wp-includes/js/wp-pointer.js
+++ /dev/null
@@ -1,281 +0,0 @@
-/**
- * Pointer jQuery widget.
- */
-(function($){
- var identifier = 0,
- zindex = 9999;
-
- $.widget("wp.pointer", {
- options: {
- pointerClass: 'wp-pointer',
- pointerWidth: 320,
- content: function( respond, event, t ) {
- return $(this).text();
- },
- buttons: function( event, t ) {
- var close = ( wpPointerL10n ) ? wpPointerL10n.dismiss : 'Dismiss',
- button = $('<a class="close" href="#">' + close + '</a>');
-
- return button.bind( 'click.pointer', function(e) {
- e.preventDefault();
- t.element.pointer('close');
- });
- },
- position: 'top',
- show: function( event, t ) {
- t.pointer.show();
- t.opened();
- },
- hide: function( event, t ) {
- t.pointer.hide();
- t.closed();
- },
- document: document
- },
-
- _create: function() {
- var positioning,
- family;
-
- this.content = $('<div class="wp-pointer-content"></div>');
- this.arrow = $('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');
-
- family = this.element.parents().add( this.element );
- positioning = 'absolute';
-
- if ( family.filter(function(){ return 'fixed' === $(this).css('position'); }).length )
- positioning = 'fixed';
-
- this.pointer = $('<div />')
- .append( this.content )
- .append( this.arrow )
- .attr('id', 'wp-pointer-' + identifier++)
- .addClass( this.options.pointerClass )
- .css({'position': positioning, 'width': this.options.pointerWidth+'px', 'display': 'none'})
- .appendTo( this.options.document.body );
- },
-
- _setOption: function( key, value ) {
- var o = this.options,
- tip = this.pointer;
-
- // Handle document transfer
- if ( key === "document" && value !== o.document ) {
- tip.detach().appendTo( value.body );
-
- // Handle class change
- } else if ( key === "pointerClass" ) {
- tip.removeClass( o.pointerClass ).addClass( value );
- }
-
- // Call super method.
- $.Widget.prototype._setOption.apply( this, arguments );
-
- // Reposition automatically
- if ( key === "position" ) {
- this.reposition();
-
- // Update content automatically if pointer is open
- } else if ( key === "content" && this.active ) {
- this.update();
- }
- },
-
- destroy: function() {
- this.pointer.remove();
- $.Widget.prototype.destroy.call( this );
- },
-
- widget: function() {
- return this.pointer;
- },
-
- update: function( event ) {
- var self = this,
- o = this.options,
- dfd = $.Deferred(),
- content;
-
- if ( o.disabled )
- return;
-
- dfd.done( function( content ) {
- self._update( event, content );
- })
-
- // Either o.content is a string...
- if ( typeof o.content === 'string' ) {
- content = o.content;
-
- // ...or o.content is a callback.
- } else {
- content = o.content.call( this.element[0], dfd.resolve, event, this._handoff() );
- }
-
- // If content is set, then complete the update.
- if ( content )
- dfd.resolve( content );
-
- return dfd.promise();
- },
-
- /**
- * Update is separated into two functions to allow events to defer
- * updating the pointer (e.g. fetch content with ajax, etc).
- */
- _update: function( event, content ) {
- var buttons,
- o = this.options;
-
- if ( ! content )
- return;
-
- this.pointer.stop(); // Kill any animations on the pointer.
- this.content.html( content );
-
- buttons = o.buttons.call( this.element[0], event, this._handoff() );
- if ( buttons ) {
- buttons.wrap('<div class="wp-pointer-buttons" />').parent().appendTo( this.content );
- }
-
- this.reposition();
- },
-
- reposition: function() {
- var position;
-
- if ( this.options.disabled )
- return;
-
- position = this._processPosition( this.options.position );
-
- // Reposition pointer.
- this.pointer.css({
- top: 0,
- left: 0,
- zIndex: zindex++ // Increment the z-index so that it shows above other opened pointers.
- }).show().position($.extend({
- of: this.element,
- collision: 'fit none'
- }, position )); // the object comes before this.options.position so the user can override position.of.
-
- this.repoint();
- },
-
- repoint: function() {
- var o = this.options,
- edge;
-
- if ( o.disabled )
- return;
-
- edge = ( typeof o.position == 'string' ) ? o.position : o.position.edge;
-
- // Remove arrow classes.
- this.pointer[0].className = this.pointer[0].className.replace( /wp-pointer-[^\s'"]*/, '' );
-
- // Add arrow class.
- this.pointer.addClass( 'wp-pointer-' + edge );
- },
-
- _processPosition: function( position ) {
- var opposite = {
- top: 'bottom',
- bottom: 'top',
- left: 'right',
- right: 'left'
- },
- result;
-
- // If the position object is a string, it is shorthand for position.edge.
- if ( typeof position == 'string' ) {
- result = {
- edge: position + ''
- };
- } else {
- result = $.extend( {}, position );
- }
-
- if ( ! result.edge )
- return result;
-
- if ( result.edge == 'top' || result.edge == 'bottom' ) {
- result.align = result.align || 'left';
-
- result.at = result.at || result.align + ' ' + opposite[ result.edge ];
- result.my = result.my || result.align + ' ' + result.edge;
- } else {
- result.align = result.align || 'top';
-
- result.at = result.at || opposite[ result.edge ] + ' ' + result.align;
- result.my = result.my || result.edge + ' ' + result.align;
- }
-
- return result;
- },
-
- open: function( event ) {
- var self = this,
- o = this.options;
-
- if ( this.active || o.disabled || this.element.is(':hidden') )
- return;
-
- this.update().done( function() {
- self._open( event );
- });
- },
-
- _open: function( event ) {
- var self = this,
- o = this.options;
-
- if ( this.active || o.disabled || this.element.is(':hidden') )
- return;
-
- this.active = true;
-
- this._trigger( "open", event, this._handoff() );
-
- this._trigger( "show", event, this._handoff({
- opened: function() {
- self._trigger( "opened", event, self._handoff() );
- }
- }));
- },
-
- close: function( event ) {
- if ( !this.active || this.options.disabled )
- return;
-
- var self = this;
- this.active = false;
-
- this._trigger( "close", event, this._handoff() );
- this._trigger( "hide", event, this._handoff({
- closed: function() {
- self._trigger( "closed", event, self._handoff() );
- }
- }));
- },
-
- sendToTop: function( event ) {
- if ( this.active )
- this.pointer.css( 'z-index', zindex++ );
- },
-
- toggle: function( event ) {
- if ( this.pointer.is(':hidden') )
- this.open( event );
- else
- this.close( event );
- },
-
- _handoff: function( extend ) {
- return $.extend({
- pointer: this.pointer,
- element: this.element
- }, extend);
- }
- });
-})(jQuery);
diff --git a/wp-includes/js/wp-pointer.min.js b/wp-includes/js/wp-pointer.min.js
deleted file mode 100644
index 65531c8412..0000000000
--- a/wp-includes/js/wp-pointer.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(c){var a=0,b=9999;c.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.dismiss:"Dismiss",d=c('<a class="close" href="#">'+g+"</a>");return d.bind("click.pointer",function(h){h.preventDefault();e.element.pointer("close")})},position:"top",show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('<div class="wp-pointer-content"></div>');this.arrow=c('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');d=this.element.parents().add(this.element);e="absolute";if(d.filter(function(){return"fixed"===c(this).css("position")}).length){e="fixed"}this.pointer=c("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+a++).addClass(this.options.pointerClass).css({position:e,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d==="document"&&f!==g.document){e.detach().appendTo(f.body)}else{if(d==="pointerClass"){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d==="position"){this.reposition()}else{if(d==="content"&&this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content==="string"){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element,collision:"fit none"},d));this.repoint()},repoint:function(){var e=this.options,d;if(e.disabled){return}d=(typeof e.position=="string")?e.position:e.position.edge;this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,"");this.pointer.addClass("wp-pointer-"+d)},_processPosition:function(e){var f={top:"bottom",bottom:"top",left:"right",right:"left"},d;if(typeof e=="string"){d={edge:e+""}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge=="top"||d.edge=="bottom"){d.align=d.align||"left";d.at=d.at||d.align+" "+f[d.edge];d.my=d.my||d.align+" "+d.edge}else{d.align=d.align||"top";d.at=d.at||f[d.edge]+" "+d.align;d.my=d.my||d.edge+" "+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.active=true;this._trigger("open",e,this._handoff());this._trigger("show",e,this._handoff({opened:function(){d._trigger("opened",e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger("close",e,this._handoff());this._trigger("hide",e,this._handoff({closed:function(){d._trigger("closed",e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css("z-index",b++)}},toggle:function(d){if(this.pointer.is(":hidden")){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery); \ No newline at end of file
diff --git a/wp-includes/js/wp-util.js b/wp-includes/js/wp-util.js
deleted file mode 100644
index 701ec3ea43..0000000000
--- a/wp-includes/js/wp-util.js
+++ /dev/null
@@ -1,105 +0,0 @@
-window.wp = window.wp || {};
-
-(function ($) {
- // Check for the utility settings.
- var settings = typeof _wpUtilSettings === 'undefined' ? {} : _wpUtilSettings;
-
- /**
- * wp.template( id )
- *
- * Fetches a template by id.
- *
- * @param {string} id A string that corresponds to a DOM element with an id prefixed with "tmpl-".
- * For example, "attachment" maps to "tmpl-attachment".
- * @return {function} A function that lazily-compiles the template requested.
- */
- wp.template = _.memoize(function ( id ) {
- var compiled,
- options = {
- evaluate: /<#([\s\S]+?)#>/g,
- interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
- escape: /\{\{([^\}]+?)\}\}(?!\})/g,
- variable: 'data'
- };
-
- return function ( data ) {
- compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options );
- return compiled( data );
- };
- });
-
- // wp.ajax
- // ------
- //
- // Tools for sending ajax requests with JSON responses and built in error handling.
- // Mirrors and wraps jQuery's ajax APIs.
- wp.ajax = {
- settings: settings.ajax || {},
-
- /**
- * wp.ajax.post( [action], [data] )
- *
- * Sends a POST request to WordPress.
- *
- * @param {string} action The slug of the action to fire in WordPress.
- * @param {object} data The data to populate $_POST with.
- * @return {$.promise} A jQuery promise that represents the request.
- */
- post: function( action, data ) {
- return wp.ajax.send({
- data: _.isObject( action ) ? action : _.extend( data || {}, { action: action })
- });
- },
-
- /**
- * wp.ajax.send( [action], [options] )
- *
- * Sends a POST request to WordPress.
- *
- * @param {string} action The slug of the action to fire in WordPress.
- * @param {object} options The options passed to jQuery.ajax.
- * @return {$.promise} A jQuery promise that represents the request.
- */
- send: function( action, options ) {
- if ( _.isObject( action ) ) {
- options = action;
- } else {
- options = options || {};
- options.data = _.extend( options.data || {}, { action: action });
- }
-
- options = _.defaults( options || {}, {
- type: 'POST',
- url: wp.ajax.settings.url,
- context: this
- });
-
- return $.Deferred( function( deferred ) {
- // Transfer success/error callbacks.
- if ( options.success )
- deferred.done( options.success );
- if ( options.error )
- deferred.fail( options.error );
-
- delete options.success;
- delete options.error;
-
- // Use with PHP's wp_send_json_success() and wp_send_json_error()
- $.ajax( options ).done( function( response ) {
- // Treat a response of `1` as successful for backwards
- // compatibility with existing handlers.
- if ( response === '1' || response === 1 )
- response = { success: true };
-
- if ( _.isObject( response ) && ! _.isUndefined( response.success ) )
- deferred[ response.success ? 'resolveWith' : 'rejectWith' ]( this, [response.data] );
- else
- deferred.rejectWith( this, [response] );
- }).fail( function() {
- deferred.rejectWith( this, arguments );
- });
- }).promise();
- }
- };
-
-}(jQuery));
diff --git a/wp-includes/js/wp-util.min.js b/wp-includes/js/wp-util.min.js
deleted file mode 100644
index d5dbd2ea93..0000000000
--- a/wp-includes/js/wp-util.min.js
+++ /dev/null
@@ -1 +0,0 @@
-window.wp=window.wp||{};(function(b){var a=typeof _wpUtilSettings==="undefined"?{}:_wpUtilSettings;wp.template=_.memoize(function(e){var d,c={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(f){d=d||_.template(b("#tmpl-"+e).html(),null,c);return d(f)}});wp.ajax={settings:a.ajax||{},post:function(d,c){return wp.ajax.send({data:_.isObject(d)?d:_.extend(c||{},{action:d})})},send:function(d,c){if(_.isObject(d)){c=d}else{c=c||{};c.data=_.extend(c.data||{},{action:d})}c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this});return b.Deferred(function(e){if(c.success){e.done(c.success)}if(c.error){e.fail(c.error)}delete c.success;delete c.error;b.ajax(c).done(function(f){if(f==="1"||f===1){f={success:true}}if(_.isObject(f)&&!_.isUndefined(f.success)){e[f.success?"resolveWith":"rejectWith"](this,[f.data])}else{e.rejectWith(this,[f])}}).fail(function(){e.rejectWith(this,arguments)})}).promise()}}}(jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/wplink.js b/wp-includes/js/wplink.js
deleted file mode 100644
index 4e4cec560b..0000000000
--- a/wp-includes/js/wplink.js
+++ /dev/null
@@ -1,608 +0,0 @@
-var wpLink;
-
-(function($){
- var inputs = {}, rivers = {}, ed, River, Query;
-
- wpLink = {
- timeToTriggerRiver: 150,
- minRiverAJAXDuration: 200,
- riverBottomThreshold: 5,
- keySensitivity: 100,
- lastSearch: '',
- textarea: '',
-
- init : function() {
- inputs.dialog = $('#wp-link');
- inputs.submit = $('#wp-link-submit');
- // URL
- inputs.url = $('#url-field');
- inputs.nonce = $('#_ajax_linking_nonce');
- // Secondary options
- inputs.title = $('#link-title-field');
- // Advanced Options
- inputs.openInNewTab = $('#link-target-checkbox');
- inputs.search = $('#search-field');
- // Build Rivers
- rivers.search = new River( $('#search-results') );
- rivers.recent = new River( $('#most-recent-results') );
- rivers.elements = $('.query-results', inputs.dialog);
-
- // Bind event handlers
- inputs.dialog.keydown( wpLink.keydown );
- inputs.dialog.keyup( wpLink.keyup );
- inputs.submit.click( function(e){
- e.preventDefault();
- wpLink.update();
- });
- $('#wp-link-cancel').click( function(e){
- e.preventDefault();
- wpLink.close();
- });
- $('#internal-toggle').click( wpLink.toggleInternalLinking );
-
- rivers.elements.bind('river-select', wpLink.updateFields );
-
- inputs.search.keyup( wpLink.searchInternalLinks );
-
- inputs.dialog.bind('wpdialogrefresh', wpLink.refresh);
- inputs.dialog.bind('wpdialogbeforeopen', wpLink.beforeOpen);
- inputs.dialog.bind('wpdialogclose', wpLink.onClose);
- },
-
- beforeOpen : function() {
- wpLink.range = null;
-
- if ( ! wpLink.isMCE() && document.selection ) {
- wpLink.textarea.focus();
- wpLink.range = document.selection.createRange();
- }
- },
-
- open : function() {
- if ( !wpActiveEditor )
- return;
-
- this.textarea = $('#'+wpActiveEditor).get(0);
-
- // Initialize the dialog if necessary (html mode).
- if ( ! inputs.dialog.data('wpdialog') ) {
- inputs.dialog.wpdialog({
- title: wpLinkL10n.title,
- width: 480,
- height: 'auto',
- modal: true,
- dialogClass: 'wp-dialog'
- });
- }
-
- inputs.dialog.wpdialog('open');
- },
-
- isMCE : function() {
- return tinyMCEPopup && ( ed = tinyMCEPopup.editor ) && ! ed.isHidden();
- },
-
- refresh : function() {
- // Refresh rivers (clear links, check visibility)
- rivers.search.refresh();
- rivers.recent.refresh();
-
- if ( wpLink.isMCE() )
- wpLink.mceRefresh();
- else
- wpLink.setDefaultValues();
-
- // Focus the URL field and highlight its contents.
- // If this is moved above the selection changes,
- // IE will show a flashing cursor over the dialog.
- inputs.url.focus()[0].select();
- // Load the most recent results if this is the first time opening the panel.
- if ( ! rivers.recent.ul.children().length )
- rivers.recent.ajax();
- },
-
- mceRefresh : function() {
- var e;
- ed = tinyMCEPopup.editor;
-
- tinyMCEPopup.restoreSelection();
-
- // If link exists, select proper values.
- if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) {
- // Set URL and description.
- inputs.url.val( ed.dom.getAttrib(e, 'href') );
- inputs.title.val( ed.dom.getAttrib(e, 'title') );
- // Set open in new tab.
- inputs.openInNewTab.prop('checked', ( "_blank" == ed.dom.getAttrib( e, 'target' ) ) );
- // Update save prompt.
- inputs.submit.val( wpLinkL10n.update );
-
- // If there's no link, set the default values.
- } else {
- wpLink.setDefaultValues();
- }
-
- tinyMCEPopup.storeSelection();
- },
-
- close : function() {
- if ( wpLink.isMCE() )
- tinyMCEPopup.close();
- else
- inputs.dialog.wpdialog('close');
- },
-
- onClose: function() {
- if ( ! wpLink.isMCE() ) {
- wpLink.textarea.focus();
- if ( wpLink.range ) {
- wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
- wpLink.range.select();
- }
- }
- },
-
- getAttrs : function() {
- return {
- href : inputs.url.val(),
- title : inputs.title.val(),
- target : inputs.openInNewTab.prop('checked') ? '_blank' : ''
- };
- },
-
- update : function() {
- if ( wpLink.isMCE() )
- wpLink.mceUpdate();
- else
- wpLink.htmlUpdate();
- },
-
- htmlUpdate : function() {
- var attrs, html, begin, end, cursor,
- textarea = wpLink.textarea;
-
- if ( ! textarea )
- return;
-
- attrs = wpLink.getAttrs();
-
- // If there's no href, return.
- if ( ! attrs.href || attrs.href == 'http://' )
- return;
-
- // Build HTML
- html = '<a href="' + attrs.href + '"';
-
- if ( attrs.title )
- html += ' title="' + attrs.title + '"';
- if ( attrs.target )
- html += ' target="' + attrs.target + '"';
-
- html += '>';
-
- // Insert HTML
- if ( document.selection && wpLink.range ) {
- // IE
- // Note: If no text is selected, IE will not place the cursor
- // inside the closing tag.
- textarea.focus();
- wpLink.range.text = html + wpLink.range.text + '</a>';
- wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
- wpLink.range.select();
-
- wpLink.range = null;
- } else if ( typeof textarea.selectionStart !== 'undefined' ) {
- // W3C
- begin = textarea.selectionStart;
- end = textarea.selectionEnd;
- selection = textarea.value.substring( begin, end );
- html = html + selection + '</a>';
- cursor = begin + html.length;
-
- // If no next is selected, place the cursor inside the closing tag.
- if ( begin == end )
- cursor -= '</a>'.length;
-
- textarea.value = textarea.value.substring( 0, begin )
- + html
- + textarea.value.substring( end, textarea.value.length );
-
- // Update cursor position
- textarea.selectionStart = textarea.selectionEnd = cursor;
- }
-
- wpLink.close();
- textarea.focus();
- },
-
- mceUpdate : function() {
- var ed = tinyMCEPopup.editor,
- attrs = wpLink.getAttrs(),
- e, b;
-
- tinyMCEPopup.restoreSelection();
- e = ed.dom.getParent(ed.selection.getNode(), 'A');
-
- // If the values are empty, unlink and return
- if ( ! attrs.href || attrs.href == 'http://' ) {
- if ( e ) {
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
- b = ed.selection.getBookmark();
- ed.dom.remove(e, 1);
- ed.selection.moveToBookmark(b);
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- wpLink.close();
- }
- return;
- }
-
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
- if (e == null) {
- ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
-
- tinymce.each(ed.dom.select("a"), function(n) {
- if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
- e = n;
- ed.dom.setAttribs(e, attrs);
- }
- });
-
- // Sometimes WebKit lets a user create a link where
- // they shouldn't be able to. In this case, CreateLink
- // injects "#mce_temp_url#" into their content. Fix it.
- if ( $(e).text() == '#mce_temp_url#' ) {
- ed.dom.remove(e);
- e = null;
- }
- } else {
- ed.dom.setAttribs(e, attrs);
- }
-
- // Don't move caret if selection was image
- if ( e && (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') ) {
- ed.focus();
- ed.selection.select(e);
- ed.selection.collapse(0);
- tinyMCEPopup.storeSelection();
- }
-
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- wpLink.close();
- },
-
- updateFields : function( e, li, originalEvent ) {
- inputs.url.val( li.children('.item-permalink').val() );
- inputs.title.val( li.hasClass('no-title') ? '' : li.children('.item-title').text() );
- if ( originalEvent && originalEvent.type == "click" )
- inputs.url.focus();
- },
- setDefaultValues : function() {
- var selectedText,
- textarea = wpLink.textarea;
-
- // Set URL and description to defaults.
- // Leave the new tab setting as-is.
- inputs.url.val('http://');
- inputs.title.val('');
- if ( wpLink.isMCE() ) {
- selectedText = tinyMCEPopup.editor.selection.getContent( { format: 'text' } );
- } else {
- if ( document.selection && wpLink.range ) {
- selectedText = wpLink.range.text;
- } else if ( typeof textarea.selectionStart !== 'undefined' ) {
- selectedText = textarea.value.substring( textarea.selectionStart, textarea.selectionEnd );
- }
- }
- if ( selectedText && ( selectedText = selectedText.replace( /^\s+|\s+$/g, '' ) ) ) {
- if ( ! $('#search-panel').is(':visible') )
- $('#internal-toggle').trigger('click');
- inputs.search.val( selectedText ).trigger('keyup');
- }
-
- // Update save prompt.
- inputs.submit.val( wpLinkL10n.save );
- },
-
- searchInternalLinks : function() {
- var t = $(this), waiting,
- search = t.val();
-
- if ( search.length > 2 ) {
- rivers.recent.hide();
- rivers.search.show();
-
- // Don't search if the keypress didn't change the title.
- if ( wpLink.lastSearch == search )
- return;
-
- wpLink.lastSearch = search;
- waiting = t.parent().find('.spinner').show();
-
- rivers.search.change( search );
- rivers.search.ajax( function(){ waiting.hide(); });
- } else {
- rivers.search.hide();
- rivers.recent.show();
- }
- },
-
- next : function() {
- rivers.search.next();
- rivers.recent.next();
- },
- prev : function() {
- rivers.search.prev();
- rivers.recent.prev();
- },
-
- keydown : function( event ) {
- var fn, key = $.ui.keyCode;
-
- switch( event.which ) {
- case key.UP:
- fn = 'prev';
- case key.DOWN:
- fn = fn || 'next';
- clearInterval( wpLink.keyInterval );
- wpLink[ fn ]();
- wpLink.keyInterval = setInterval( wpLink[ fn ], wpLink.keySensitivity );
- break;
- default:
- return;
- }
- event.preventDefault();
- },
- keyup: function( event ) {
- var key = $.ui.keyCode;
-
- switch( event.which ) {
- case key.ESCAPE:
- event.stopImmediatePropagation();
- if ( ! $(document).triggerHandler( 'wp_CloseOnEscape', [{ event: event, what: 'wplink', cb: wpLink.close }] ) )
- wpLink.close();
-
- return false;
- break;
- case key.UP:
- case key.DOWN:
- clearInterval( wpLink.keyInterval );
- break;
- default:
- return;
- }
- event.preventDefault();
- },
-
- delayedCallback : function( func, delay ) {
- var timeoutTriggered, funcTriggered, funcArgs, funcContext;
-
- if ( ! delay )
- return func;
-
- setTimeout( function() {
- if ( funcTriggered )
- return func.apply( funcContext, funcArgs );
- // Otherwise, wait.
- timeoutTriggered = true;
- }, delay);
-
- return function() {
- if ( timeoutTriggered )
- return func.apply( this, arguments );
- // Otherwise, wait.
- funcArgs = arguments;
- funcContext = this;
- funcTriggered = true;
- };
- },
-
- toggleInternalLinking : function( event ) {
- var panel = $('#search-panel'),
- widget = inputs.dialog.wpdialog('widget'),
- // We're about to toggle visibility; it's currently the opposite
- visible = !panel.is(':visible'),
- win = $(window);
-
- $(this).toggleClass('toggle-arrow-active', visible);
-
- inputs.dialog.height('auto');
- panel.slideToggle( 300, function() {
- setUserSetting('wplink', visible ? '1' : '0');
- inputs[ visible ? 'search' : 'url' ].focus();
-
- // Move the box if the box is now expanded, was opened in a collapsed state,
- // and if it needs to be moved. (Judged by bottom not being positive or
- // bottom being smaller than top.)
- var scroll = win.scrollTop(),
- top = widget.offset().top,
- bottom = top + widget.outerHeight(),
- diff = bottom - win.height();
-
- if ( diff > scroll ) {
- widget.animate({'top': diff < top ? top - diff : scroll }, 200);
- }
- });
- event.preventDefault();
- }
- }
-
- River = function( element, search ) {
- var self = this;
- this.element = element;
- this.ul = element.children('ul');
- this.waiting = element.find('.river-waiting');
-
- this.change( search );
- this.refresh();
-
- element.scroll( function(){ self.maybeLoad(); });
- element.delegate('li', 'click', function(e){ self.select( $(this), e ); });
- };
-
- $.extend( River.prototype, {
- refresh: function() {
- this.deselect();
- this.visible = this.element.is(':visible');
- },
- show: function() {
- if ( ! this.visible ) {
- this.deselect();
- this.element.show();
- this.visible = true;
- }
- },
- hide: function() {
- this.element.hide();
- this.visible = false;
- },
- // Selects a list item and triggers the river-select event.
- select: function( li, event ) {
- var liHeight, elHeight, liTop, elTop;
-
- if ( li.hasClass('unselectable') || li == this.selected )
- return;
-
- this.deselect();
- this.selected = li.addClass('selected');
- // Make sure the element is visible
- liHeight = li.outerHeight();
- elHeight = this.element.height();
- liTop = li.position().top;
- elTop = this.element.scrollTop();
-
- if ( liTop < 0 ) // Make first visible element
- this.element.scrollTop( elTop + liTop );
- else if ( liTop + liHeight > elHeight ) // Make last visible element
- this.element.scrollTop( elTop + liTop - elHeight + liHeight );
-
- // Trigger the river-select event
- this.element.trigger('river-select', [ li, event, this ]);
- },
- deselect: function() {
- if ( this.selected )
- this.selected.removeClass('selected');
- this.selected = false;
- },
- prev: function() {
- if ( ! this.visible )
- return;
-
- var to;
- if ( this.selected ) {
- to = this.selected.prev('li');
- if ( to.length )
- this.select( to );
- }
- },
- next: function() {
- if ( ! this.visible )
- return;
-
- var to = this.selected ? this.selected.next('li') : $('li:not(.unselectable):first', this.element);
- if ( to.length )
- this.select( to );
- },
- ajax: function( callback ) {
- var self = this,
- delay = this.query.page == 1 ? 0 : wpLink.minRiverAJAXDuration,
- response = wpLink.delayedCallback( function( results, params ) {
- self.process( results, params );
- if ( callback )
- callback( results, params );
- }, delay );
-
- this.query.ajax( response );
- },
- change: function( search ) {
- if ( this.query && this._search == search )
- return;
-
- this._search = search;
- this.query = new Query( search );
- this.element.scrollTop(0);
- },
- process: function( results, params ) {
- var list = '', alt = true, classes = '',
- firstPage = params.page == 1;
-
- if ( !results ) {
- if ( firstPage ) {
- list += '<li class="unselectable"><span class="item-title"><em>'
- + wpLinkL10n.noMatchesFound
- + '</em></span></li>';
- }
- } else {
- $.each( results, function() {
- classes = alt ? 'alternate' : '';
- classes += this['title'] ? '' : ' no-title';
- list += classes ? '<li class="' + classes + '">' : '<li>';
- list += '<input type="hidden" class="item-permalink" value="' + this['permalink'] + '" />';
- list += '<span class="item-title">';
- list += this['title'] ? this['title'] : wpLinkL10n.noTitle;
- list += '</span><span class="item-info">' + this['info'] + '</span></li>';
- alt = ! alt;
- });
- }
-
- this.ul[ firstPage ? 'html' : 'append' ]( list );
- },
- maybeLoad: function() {
- var self = this,
- el = this.element,
- bottom = el.scrollTop() + el.height();
-
- if ( ! this.query.ready() || bottom < this.ul.height() - wpLink.riverBottomThreshold )
- return;
-
- setTimeout(function() {
- var newTop = el.scrollTop(),
- newBottom = newTop + el.height();
-
- if ( ! self.query.ready() || newBottom < self.ul.height() - wpLink.riverBottomThreshold )
- return;
-
- self.waiting.show();
- el.scrollTop( newTop + self.waiting.outerHeight() );
-
- self.ajax( function() { self.waiting.hide(); });
- }, wpLink.timeToTriggerRiver );
- }
- });
-
- Query = function( search ) {
- this.page = 1;
- this.allLoaded = false;
- this.querying = false;
- this.search = search;
- };
-
- $.extend( Query.prototype, {
- ready: function() {
- return !( this.querying || this.allLoaded );
- },
- ajax: function( callback ) {
- var self = this,
- query = {
- action : 'wp-link-ajax',
- page : this.page,
- '_ajax_linking_nonce' : inputs.nonce.val()
- };
-
- if ( this.search )
- query.search = this.search;
-
- this.querying = true;
-
- $.post( ajaxurl, query, function(r) {
- self.page++;
- self.querying = false;
- self.allLoaded = !r;
- callback( r, query );
- }, "json" );
- }
- });
-
- $(document).ready( wpLink.init );
-})(jQuery);
diff --git a/wp-includes/js/wplink.min.js b/wp-includes/js/wplink.min.js
deleted file mode 100644
index 0a60b872a7..0000000000
--- a/wp-includes/js/wplink.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",init:function(){b.dialog=f("#wp-link");b.submit=f("#wp-link-submit");b.url=f("#url-field");b.nonce=f("#_ajax_linking_nonce");b.title=f("#link-title-field");b.openInNewTab=f("#link-target-checkbox");b.search=f("#search-field");e.search=new a(f("#search-results"));e.recent=new a(f("#most-recent-results"));e.elements=f(".query-results",b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){g.preventDefault();wpLink.update()});f("#wp-link-cancel").click(function(g){g.preventDefault();wpLink.close()});f("#internal-toggle").click(wpLink.toggleInternalLinking);e.elements.bind("river-select",wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind("wpdialogrefresh",wpLink.refresh);b.dialog.bind("wpdialogbeforeopen",wpLink.beforeOpen);b.dialog.bind("wpdialogclose",wpLink.onClose)},beforeOpen:function(){wpLink.range=null;if(!wpLink.isMCE()&&document.selection){wpLink.textarea.focus();wpLink.range=document.selection.createRange()}},open:function(){if(!wpActiveEditor){return}this.textarea=f("#"+wpActiveEditor).get(0);if(!b.dialog.data("wpdialog")){b.dialog.wpdialog({title:wpLinkL10n.title,width:480,height:"auto",modal:true,dialogClass:"wp-dialog"})}b.dialog.wpdialog("open")},isMCE:function(){return tinyMCEPopup&&(d=tinyMCEPopup.editor)&&!d.isHidden()},refresh:function(){e.search.refresh();e.recent.refresh();if(wpLink.isMCE()){wpLink.mceRefresh()}else{wpLink.setDefaultValues()}b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},mceRefresh:function(){var g;d=tinyMCEPopup.editor;tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),"A")){b.url.val(d.dom.getAttrib(g,"href"));b.title.val(d.dom.getAttrib(g,"title"));b.openInNewTab.prop("checked",("_blank"==d.dom.getAttrib(g,"target")));b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues()}tinyMCEPopup.storeSelection()},close:function(){if(wpLink.isMCE()){tinyMCEPopup.close()}else{b.dialog.wpdialog("close")}},onClose:function(){if(!wpLink.isMCE()){wpLink.textarea.focus();if(wpLink.range){wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select()}}},getAttrs:function(){return{href:b.url.val(),title:b.title.val(),target:b.openInNewTab.prop("checked")?"_blank":""}},update:function(){if(wpLink.isMCE()){wpLink.mceUpdate()}else{wpLink.htmlUpdate()}},htmlUpdate:function(){var i,j,k,h,l,g=wpLink.textarea;if(!g){return}i=wpLink.getAttrs();if(!i.href||i.href=="http://"){return}j='<a href="'+i.href+'"';if(i.title){j+=' title="'+i.title+'"'}if(i.target){j+=' target="'+i.target+'"'}j+=">";if(document.selection&&wpLink.range){g.focus();wpLink.range.text=j+wpLink.range.text+"</a>";wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select();wpLink.range=null}else{if(typeof g.selectionStart!=="undefined"){k=g.selectionStart;h=g.selectionEnd;selection=g.value.substring(k,h);j=j+selection+"</a>";l=k+j.length;if(k==h){l-="</a>".length}g.value=g.value.substring(0,k)+j+g.value.substring(h,g.value.length);g.selectionStart=g.selectionEnd=l}}wpLink.close();g.focus()},mceUpdate:function(){var h=tinyMCEPopup.editor,i=wpLink.getAttrs(),j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),"A");if(!i.href||i.href=="http://"){if(j){tinyMCEPopup.execCommand("mceBeginUndoLevel");g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()}return}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(j==null){h.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("mceInsertLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(h.dom.select("a"),function(k){if(h.dom.getAttrib(k,"href")=="#mce_temp_url#"){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()=="#mce_temp_url#"){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&&(j.childNodes.length!=1||j.firstChild.nodeName!="IMG")){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()},updateFields:function(i,h,g){b.url.val(h.children(".item-permalink").val());b.title.val(h.hasClass("no-title")?"":h.children(".item-title").text());if(g&&g.type=="click"){b.url.focus()}},setDefaultValues:function(){var h,g=wpLink.textarea;b.url.val("http://");b.title.val("");if(wpLink.isMCE()){h=tinyMCEPopup.editor.selection.getContent({format:"text"})}else{if(document.selection&&wpLink.range){h=wpLink.range.text}else{if(typeof g.selectionStart!=="undefined"){h=g.value.substring(g.selectionStart,g.selectionEnd)}}}if(h&&(h=h.replace(/^\s+|\s+$/g,""))){if(!f("#search-panel").is(":visible")){f("#internal-toggle").trigger("click")}b.search.val(h).trigger("keyup")}b.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length>2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.parent().find(".spinner").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:h.stopImmediatePropagation();if(!f(document).triggerHandler("wp_CloseOnEscape",[{event:h,what:"wplink",cb:wpLink.close}])){wpLink.close()}return false;break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:n<o?o-n:l},200)}});h.preventDefault()}};a=function(i,h){var g=this;this.element=i;this.ul=i.children("ul");this.waiting=i.find(".river-waiting");this.change(h);this.refresh();i.scroll(function(){g.maybeLoad()});i.delegate("li","click",function(j){g.select(f(this),j)})};f.extend(a.prototype,{refresh:function(){this.deselect();this.visible=this.element.is(":visible")},show:function(){if(!this.visible){this.deselect();this.element.show();this.visible=true}},hide:function(){this.element.hide();this.visible=false},select:function(h,k){var j,i,l,g;if(h.hasClass("unselectable")||h==this.selected){return}this.deselect();this.selected=h.addClass("selected");j=h.outerHeight();i=this.element.height();l=h.position().top;g=this.element.scrollTop();if(l<0){this.element.scrollTop(g+l)}else{if(l+j>i){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+='<li class="unselectable"><span class="item-title"><em>'+wpLinkL10n.noMatchesFound+"</em></span></li>"}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'<li class="'+g+'">':"<li>";i+='<input type="hidden" class="item-permalink" value="'+this["permalink"]+'" />';i+='<span class="item-title">';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+='</span><span class="item-info">'+this["info"]+"</span></li>";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g<this.ul.height()-wpLink.riverBottomThreshold){return}setTimeout(function(){var j=i.scrollTop(),k=j+i.height();if(!h.query.ready()||k<h.ul.height()-wpLink.riverBottomThreshold){return}h.waiting.show();i.scrollTop(j+h.waiting.outerHeight());h.ajax(function(){h.waiting.hide()})},wpLink.timeToTriggerRiver)}});c=function(g){this.page=1;this.allLoaded=false;this.querying=false;this.search=g};f.extend(c.prototype,{ready:function(){return !(this.querying||this.allLoaded)},ajax:function(i){var g=this,h={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:b.nonce.val()};if(this.search){h.search=this.search}this.querying=true;f.post(ajaxurl,h,function(j){g.page++;g.querying=false;g.allLoaded=!j;i(j,h)},"json")}});f(document).ready(wpLink.init)})(jQuery); \ No newline at end of file