WordPress/wp-includes/js/media-views.min.js

1 line
98 KiB
JavaScript
Raw Normal View History

!function(i){var s={};function o(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=i,o.c=s,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=26)}(Array(26).concat([function(e,t,i){var s,o,n,r=wp.media,a=jQuery;r.isTouchDevice="ontouchend"in document,n=r.view.l10n=window._wpMediaViewsL10n||{},r.view.settings=n.settings||{},delete n.settings,r.model.settings.post=r.view.settings.post,a.support.transition=(s=document.documentElement.style,o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},(n=_.find(_.keys(o),function(e){return!_.isUndefined(s[e])}))&&{end:o[n]}),r.events=_.extend({},Backbone.Events),r.transition=function(e,t){var i=a.Deferred();return t=t||2e3,a.support.transition?((e=!(e instanceof a)?a(e):e).first().one(a.support.transition.end,i.resolve),_.delay(i.resolve,t)):i.resolve(),i.promise()},r.controller.Region=i(27),r.controller.StateMachine=i(28),r.controller.State=i(29),r.selectionSync=i(30),r.controller.Library=i(31),r.controller.ImageDetails=i(32),r.controller.GalleryEdit=i(33),r.controller.GalleryAdd=i(34),r.controller.CollectionEdit=i(35),r.controller.CollectionAdd=i(36),r.controller.FeaturedImage=i(37),r.controller.ReplaceImage=i(38),r.controller.EditImage=i(39),r.controller.MediaLibrary=i(40),r.controller.Embed=i(41),r.controller.Cropper=i(42),r.controller.CustomizeImageCropper=i(43),r.controller.SiteIconCropper=i(44),r.View=i(45),r.view.Frame=i(46),r.view.MediaFrame=i(47),r.view.MediaFrame.Select=i(48),r.view.MediaFrame.Post=i(49),r.view.MediaFrame.ImageDetails=i(50),r.view.Modal=i(51),r.view.FocusManager=i(52),r.view.UploaderWindow=i(53),r.view.EditorUploader=i(54),r.view.UploaderInline=i(55),r.view.UploaderStatus=i(56),r.view.UploaderStatusError=i(57),r.view.Toolbar=i(58),r.view.Toolbar.Select=i(59),r.view.Toolbar.Embed=i(60),r.view.Button=i(61),r.view.ButtonGroup=i(62),r.view.PriorityList=i(63),r.view.MenuItem=i(64),r.view.Menu=i(65),r.view.RouterItem=i(66),r.view.Router=i(67),r.view.Sidebar=i(68),r.view.Attachment=i(69),r.view.Attachment.Library=i(70),r.view.Attachment.EditLibrary=i(71),r.view.Attachments=i(72),r.view.Search=i(73),r.view.AttachmentFilters=i(74),r.view.DateFilter=i(75),r.view.AttachmentFilters.Uploaded=i(76),r.view.AttachmentFilters.All=i(77),r.view.AttachmentsBrowser=i(78),r.view.Selection=i(79),r.view.Attachment.Selection=i(80),r.view.Attachments.Selection=i(81),r.view.Attachment.EditSelection=i(82),r.view.Settings=i(83),r.view.Settings.AttachmentDisplay=i(84),r.view.Settings.Gallery=i(85),r.view.Settings.Playlist=i(86),r.view.Attachment.Details=i(87),r.view.AttachmentCompat=i(88),r.view.Iframe=i(89),r.view.Embed=i(90),r.view.Label=i(91),r.view.EmbedUrl=i(92),r.view.EmbedLink=i(93),r.view.EmbedImage=i(94),r.view.ImageDetails=i(95),r.view.Cropper=i(96),r.view.SiteIconCropper=i(97),r.view.SiteIconPreview=i(98),r.view.EditImage=i(99),r.view.Spinner=i(100)},function(e,t){function i(e){_.extend(this,_.pick(e||{},"id","view","selector"))}i.extend=Backbone.Model.extend,_.extend(i.prototype,{mode:function(e){return e?(e===this._mode||(this.trigger("deactivate"),this._mode=e,this.render(e),this.trigger("activate")),this):this._mode},render:function(e){if(e&&e!==this._mode)return this.mode(e);e={view:null};return this.trigger("create",e),e=e.view,this.trigger("render",e),e&&this.set(e),this},get:function(){return this.view.views.first(this.selector)},set:function(e,t){return t&&(t.add=!1),this.view.views.set(this.selector,e,t)},trigger:function(e){var t,i;if(this._mode)return i=_.toArray(arguments),t=this.id+":"+e,i[0]=t+":"+this._mode,this.view.trigger.apply(this.view,i),i[0]=t,this.view.trigger.apply(this.view,i),this}}),e.exports=i},function(e,t){function i(e){this.states=new Backbone.C