(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.jQuery;var n=e.n(o);const t=window.wp.compose,{ajaxurl:i,VPAdminVariables:r}=window,c=n()("body");c.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',(function(){this.select()})),c.on("click",".vp-onclick-selection",(function(){window.getSelection().selectAllChildren(this)})),c.on("copy cut",".vp-onclick-selection",(e=>{const o=window.getSelection().toString().replace(/[\n\r]+/g,"");e.originalEvent.clipboardData.setData("text/plain",o),e.originalEvent.preventDefault()}));const a=n()("#vp_format_video"),l=n()("#post-format-video");let s=null;function p(e){null!==s&&s===e||(s=e,a[e?"show":"hide"]())}a.length&&l.length&&(p(l.is(":checked")),c.on("change","[name=post_format]",(()=>{p(l.is(":checked"))})));let u=null,d=function(e){u=n().ajax({url:i,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:e.val(),nonce:r.nonce},complete(o){const n=o.responseJSON;n&&void 0!==n.html&&e.next(".vp-oembed-preview").html(n.html)}})};var h,m,v,f;d=(0,t.debounce)(300,(h=d,m=[],v=null,(f=function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];m=o,v||(v=requestAnimationFrame((function(){v=null,h.apply(void 0,m)})))}).cancel=function(){v&&(cancelAnimationFrame(v),v=null)},f)),c.on("change input",'.vp-input[name="_vp_format_video_url"]',(function(){null!==u&&u.abort();const e=n()(this);e.next(".vp-oembed-preview").html(""),d(e)})),c.on("change","input[name='vp_general[register_portfolio_post_type]']",(function(){n()(this).is(":checked")||confirm("Are you sure you want to turn off the Portfolio custom post type and related taxonomies? Make sure you don't use this post type on your site, otherwise you might see errors on the frontend.")||n()(this).prop("checked",!0)}))})();