WordPress/wp-admin/js/widgets/media-audio-widget.min.js
desrosj 26335af1ac Build/Test Tools: Update devDependencies.
This updates the following `devDependencies`:

- `dotenv` from `16.4.5` to `16.4.7`
- `dotenv-expand` from `11.0.6` to `12.0.1`
- `postcss` from `8.4.47` to `8.4.49`
- `qunit` from `2.22.0` to `2.23.1`
- `sass` from `1.79.4` to `1.79.6`
- `terser-webpack-plugin` from `5.3.10` to `5.3.11`
- `uglify-js` from `3.17.4` to `3.19.3`
- `uuid` from `9.0.1` to `11.0.3`
- `webpack` from `5.90.2` to `5.97.1`

Additionally, `npm audit fix` has been run.

Follow up to [58585].

See #62220.
Built from https://develop.svn.wordpress.org/trunk@59509


git-svn-id: http://core.svn.wordpress.org/trunk@58895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 19:06:24 +00:00

2 lines
1.4 KiB
JavaScript

/*! This file is auto-generated */
(d=>{var a=wp.media.view.MediaFrame.AudioDetails.extend({createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new wp.media.controller.MediaLibrary({type:"audio",id:"add-audio-source",title:wp.media.view.l10n.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}}),e=d.MediaWidgetModel.extend({}),t=d.MediaWidgetControl.extend({showDisplaySettings:!1,mapModelToMediaFrameProps:function(e){e=d.MediaWidgetControl.prototype.mapModelToMediaFrameProps.call(this,e);return e.link="embed",e},renderPreview:function(){var e,d=this,t=d.model.get("attachment_id"),a=d.model.get("url");(t||a)&&(t=d.$el.find(".media-widget-preview"),e=wp.template("wp-media-widget-audio-preview"),t.html(e({model:{attachment_id:d.model.get("attachment_id"),src:a},error:d.model.get("error")})),wp.mediaelement.initialize())},editMedia:function(){var d=this,e=d.mapModelToMediaFrameProps(d.model.toJSON()),t=new a({frame:"audio",state:"audio-details",metadata:e});(wp.media.frame=t).$el.addClass("media-widget"),e=function(e){d.selectedAttachment.set(e),d.model.set(_.extend(d.model.defaults(),d.mapMediaToModelProps(e),{error:!1}))},t.state("audio-details").on("update",e),t.state("replace-audio").on("replace",e),t.on("close",function(){t.detach()}),t.open()}});d.controlConstructors.media_audio=t,d.modelConstructors.media_audio=e})(wp.mediaWidgets);