NEW_CKEDITOR.plugins.add("embedsemantic",{icons:"embedsemantic",hidpi:!0,requires:"embedbase",onLoad:function(){this.registerOembedTag()},init:function(e){var t=NEW_CKEDITOR.plugins.embedBase.createWidgetBaseDefinition(e),a=t.init;NEW_CKEDITOR.tools.extend(t,{dialog:"embedBase",button:e.lang.embedbase.button,allowedContent:"oembed",requiredContent:"oembed",styleableElements:"oembed",providerUrl:new NEW_CKEDITOR.template(e.config.embed_provider||"//ckeditor.iframe.ly/api/oembed?url={url}&callback={callback}"),init:function(){var t=this;a.call(this),this.once("ready",(function(){this.data.loadOnReady&&this.loadContent(this.data.url,{callback:function(){t.setData("loadOnReady",!1),e.fire("updateSnapshot")}})}))},upcast:function(e,t){if("oembed"==e.name){var a=e.children[0];if(a&&a.type==NEW_CKEDITOR.NODE_TEXT&&a.value)return t.url=a.value,t.loadOnReady=!0,a=new NEW_CKEDITOR.htmlParser.element("div"),e.replaceWith(a),a.attributes.class=e.attributes.class,a}},downcast:function(e){var t=new NEW_CKEDITOR.htmlParser.element("oembed");return t.add(new NEW_CKEDITOR.htmlParser.text(this.data.url)),e.attributes.class&&(t.attributes.class=e.attributes.class),t}},!0),e.widgets.add("embedSemantic",t)},registerOembedTag:function(){var e,t=NEW_CKEDITOR.dtd;for(e in t.oembed={"#":1},t)t[e].div&&(t[e].oembed=1)}});