/* automatically generated by JSCoverage - do not edit */
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    _$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (typeof _$jscoverage !== 'object') {
  _$jscoverage = {};
}
if (! _$jscoverage['plugins/music.js']) {
  _$jscoverage['plugins/music.js'] = [];
  _$jscoverage['plugins/music.js'][24] = 0;
  _$jscoverage['plugins/music.js'][25] = 0;
  _$jscoverage['plugins/music.js'][37] = 0;
  _$jscoverage['plugins/music.js'][38] = 0;
  _$jscoverage['plugins/music.js'][50] = 0;
  _$jscoverage['plugins/music.js'][51] = 0;
  _$jscoverage['plugins/music.js'][53] = 0;
  _$jscoverage['plugins/music.js'][54] = 0;
  _$jscoverage['plugins/music.js'][55] = 0;
  _$jscoverage['plugins/music.js'][57] = 0;
  _$jscoverage['plugins/music.js'][59] = 0;
  _$jscoverage['plugins/music.js'][60] = 0;
  _$jscoverage['plugins/music.js'][61] = 0;
  _$jscoverage['plugins/music.js'][62] = 0;
  _$jscoverage['plugins/music.js'][66] = 0;
  _$jscoverage['plugins/music.js'][67] = 0;
  _$jscoverage['plugins/music.js'][69] = 0;
  _$jscoverage['plugins/music.js'][70] = 0;
  _$jscoverage['plugins/music.js'][72] = 0;
  _$jscoverage['plugins/music.js'][73] = 0;
  _$jscoverage['plugins/music.js'][74] = 0;
  _$jscoverage['plugins/music.js'][76] = 0;
  _$jscoverage['plugins/music.js'][79] = 0;
  _$jscoverage['plugins/music.js'][81] = 0;
  _$jscoverage['plugins/music.js'][83] = 0;
  _$jscoverage['plugins/music.js'][86] = 0;
  _$jscoverage['plugins/music.js'][89] = 0;
}
_$jscoverage['plugins/music.js'].source = ["<span class=\"c\">/**</span>","<span class=\"c\"> * &#25554;&#20837;&#38899;&#20048;&#21629;&#20196;</span>","<span class=\"c\"> * @file</span>","<span class=\"c\"> */</span>","","<span class=\"c\">/**</span>","<span class=\"c\"> * &#22312;&#24403;&#21069;&#20809;&#26631;&#22788;&#25554;&#20837;&#38899;&#20048;</span>","<span class=\"c\"> * @command music</span>","<span class=\"c\"> * @method execCommand</span>","<span class=\"c\"> * @param { KeyValueMap } musicOptions &#25554;&#20837;&#38899;&#20048;&#30340;&#21442;&#25968;&#39033;&#65292; &#25903;&#25345;&#30340;key&#26377;&#65306; url=&gt;&#38899;&#20048;&#22320;&#22336;&#65307;</span>","<span class=\"c\"> * width=&gt;&#38899;&#20048;&#23481;&#22120;&#23485;&#24230;&#65307;height=&gt;&#38899;&#20048;&#23481;&#22120;&#39640;&#24230;&#65307;align=&gt;&#38899;&#20048;&#25991;&#20214;&#30340;&#23545;&#40784;&#26041;&#24335;&#65292; &#21487;&#36873;&#20540;&#26377;: left, center, right, none</span>","<span class=\"c\"> * @example</span>","<span class=\"c\"> * ```javascript</span>","<span class=\"c\"> * //editor&#26159;&#32534;&#36753;&#22120;&#23454;&#20363;</span>","<span class=\"c\"> * //&#22312;&#32534;&#36753;&#22120;&#37324;&#25554;&#20837;&#19968;&#20010;&#8220;&#26893;&#29289;&#22823;&#25112;&#20725;&#23608;&#8221;&#30340;APP</span>","<span class=\"c\"> * editor.execCommand( 'music' , {</span>","<span class=\"c\"> *     width: 400,</span>","<span class=\"c\"> *     height: 95,</span>","<span class=\"c\"> *     align: \"center\",</span>","<span class=\"c\"> *     url: \"&#38899;&#20048;&#22320;&#22336;\"</span>","<span class=\"c\"> * } );</span>","<span class=\"c\"> * ```</span>","<span class=\"c\"> */</span>","UE<span class=\"k\">.</span>plugins<span class=\"k\">[</span><span class=\"s\">'music'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","    <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">,</span>","        div<span class=\"k\">;</span>","","    <span class=\"c\">/*</span>","<span class=\"c\">     * &#21019;&#24314;&#25554;&#20837;&#38899;&#20048;&#23383;&#31526;&#20018;</span>","<span class=\"c\">     * @param url &#38899;&#20048;&#22320;&#22336;</span>","<span class=\"c\">     * @param width &#38899;&#20048;&#23485;&#24230;</span>","<span class=\"c\">     * @param height &#38899;&#20048;&#39640;&#24230;</span>","<span class=\"c\">     * @param align &#23545;&#40784;</span>","<span class=\"c\">     * @param toEmbed &#26159;&#21542;&#20197;flash&#20195;&#26367;&#26174;&#31034;</span>","<span class=\"c\">     * @param addParagraph  &#26159;&#21542;&#38656;&#35201;&#28155;&#21152;P&#26631;&#31614;</span>","<span class=\"c\">     */</span>","    <span class=\"k\">function</span> creatInsertStr<span class=\"k\">(</span>url<span class=\"k\">,</span>width<span class=\"k\">,</span>height<span class=\"k\">,</span>align<span class=\"k\">,</span>toEmbed<span class=\"k\">,</span>addParagraph<span class=\"k\">)</span><span class=\"k\">{</span>","        <span class=\"k\">return</span>  <span class=\"k\">!</span>toEmbed <span class=\"k\">?</span>","            <span class=\"k\">(</span>addParagraph<span class=\"k\">?</span> <span class=\"k\">(</span><span class=\"s\">'&lt;p '</span><span class=\"k\">+</span> <span class=\"k\">(</span>align <span class=\"k\">!=</span><span class=\"s\">\"none\"</span> <span class=\"k\">?</span> <span class=\"k\">(</span> align <span class=\"k\">==</span> <span class=\"s\">\"center\"</span><span class=\"k\">?</span> <span class=\"s\">' style=\"text-align:center;\" '</span><span class=\"k\">:</span><span class=\"s\">' style=\"float:\"'</span><span class=\"k\">+</span> align <span class=\"k\">)</span> <span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&gt;'</span><span class=\"k\">):</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;img align=\"'</span><span class=\"k\">+</span>align<span class=\"k\">+</span><span class=\"s\">'\" width=\"'</span><span class=\"k\">+</span> width <span class=\"k\">+</span><span class=\"s\">'\" height=\"'</span> <span class=\"k\">+</span> height <span class=\"k\">+</span> <span class=\"s\">'\" _url=\"'</span><span class=\"k\">+</span>url<span class=\"k\">+</span><span class=\"s\">'\" class=\"edui-faked-music\"'</span> <span class=\"k\">+</span>","                <span class=\"s\">' src=\"'</span><span class=\"k\">+</span>me<span class=\"k\">.</span>options<span class=\"k\">.</span>langPath<span class=\"k\">+</span>me<span class=\"k\">.</span>options<span class=\"k\">.</span>lang<span class=\"k\">+</span><span class=\"s\">'/images/music.png\" /&gt;'</span> <span class=\"k\">+</span>","                <span class=\"k\">(</span>addParagraph<span class=\"k\">?</span><span class=\"s\">'&lt;/p&gt;'</span><span class=\"k\">:</span><span class=\"s\">''</span><span class=\"k\">)</span>","            <span class=\"k\">:</span>","            <span class=\"s\">'&lt;embed type=\"application/x-shockwave-flash\" class=\"edui-faked-music\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"'</span> <span class=\"k\">+</span>","                <span class=\"s\">' src=\"'</span> <span class=\"k\">+</span> url <span class=\"k\">+</span> <span class=\"s\">'\" width=\"'</span> <span class=\"k\">+</span> width  <span class=\"k\">+</span> <span class=\"s\">'\" height=\"'</span> <span class=\"k\">+</span> height  <span class=\"k\">+</span> <span class=\"s\">'\" align=\"'</span> <span class=\"k\">+</span> align <span class=\"k\">+</span> <span class=\"s\">'\"'</span> <span class=\"k\">+</span>","                <span class=\"k\">(</span> align <span class=\"k\">!=</span><span class=\"s\">\"none\"</span> <span class=\"k\">?</span> <span class=\"s\">' style= \"'</span><span class=\"k\">+</span> <span class=\"k\">(</span> align <span class=\"k\">==</span> <span class=\"s\">\"center\"</span><span class=\"k\">?</span> <span class=\"s\">\"display:block;\"</span><span class=\"k\">:</span><span class=\"s\">\" float: \"</span><span class=\"k\">+</span> align <span class=\"k\">)</span>  <span class=\"k\">+</span> <span class=\"s\">'\"'</span> <span class=\"k\">:</span><span class=\"s\">''</span> <span class=\"k\">)</span> <span class=\"k\">+</span>","                <span class=\"s\">' wmode=\"transparent\" play=\"true\" loop=\"false\" menu=\"false\" allowscriptaccess=\"never\" allowfullscreen=\"true\" &gt;'</span><span class=\"k\">;</span>","    <span class=\"k\">}</span>","","    <span class=\"k\">function</span> switchImgAndEmbed<span class=\"k\">(</span>img2embed<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> tmpdiv<span class=\"k\">,</span>","            nodes <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">,</span> <span class=\"k\">!</span>img2embed <span class=\"k\">?</span> <span class=\"s\">\"embed\"</span> <span class=\"k\">:</span> <span class=\"s\">\"img\"</span><span class=\"k\">);</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> node<span class=\"k\">;</span> node <span class=\"k\">=</span> nodes<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>node<span class=\"k\">.</span>className <span class=\"k\">!=</span> <span class=\"s\">\"edui-faked-music\"</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">continue</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            tmpdiv <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">\"div\"</span><span class=\"k\">);</span>","            <span class=\"c\">//&#20808;&#30475;float&#22312;&#30475;align,&#28014;&#21160;&#26377;&#30340;&#26159;&#26102;&#20505;&#26159;&#22312;float&#19978;&#23450;&#20041;&#30340;</span>","            <span class=\"k\">var</span> align <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getComputedStyle<span class=\"k\">(</span>node<span class=\"k\">,</span><span class=\"s\">'float'</span><span class=\"k\">);</span>","            align <span class=\"k\">=</span> align <span class=\"k\">==</span> <span class=\"s\">'none'</span> <span class=\"k\">?</span> <span class=\"k\">(</span>node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'align'</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">:</span> align<span class=\"k\">;</span>","            tmpdiv<span class=\"k\">.</span>innerHTML <span class=\"k\">=</span> creatInsertStr<span class=\"k\">(</span>img2embed <span class=\"k\">?</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"_url\"</span><span class=\"k\">)</span> <span class=\"k\">:</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"src\"</span><span class=\"k\">),</span> node<span class=\"k\">.</span>width<span class=\"k\">,</span> node<span class=\"k\">.</span>height<span class=\"k\">,</span> align<span class=\"k\">,</span> img2embed<span class=\"k\">);</span>","            node<span class=\"k\">.</span>parentNode<span class=\"k\">.</span>replaceChild<span class=\"k\">(</span>tmpdiv<span class=\"k\">.</span>firstChild<span class=\"k\">,</span> node<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span>","","    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">\"beforegetcontent\"</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","        switchImgAndEmbed<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","    <span class=\"k\">}</span><span class=\"k\">);</span>","    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'aftersetcontent'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","        switchImgAndEmbed<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","    <span class=\"k\">}</span><span class=\"k\">);</span>","    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'aftergetcontent'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmdName<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span>cmdName <span class=\"k\">==</span> <span class=\"s\">'aftergetcontent'</span> <span class=\"k\">&amp;&amp;</span> me<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'source'</span><span class=\"k\">))</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","        switchImgAndEmbed<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","    <span class=\"k\">}</span><span class=\"k\">);</span>","","    me<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"music\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        execCommand<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> musicObj<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">,</span>","                str <span class=\"k\">=</span> creatInsertStr<span class=\"k\">(</span>musicObj<span class=\"k\">.</span>url<span class=\"k\">,</span> musicObj<span class=\"k\">.</span>width <span class=\"k\">||</span> <span class=\"s\">400</span><span class=\"k\">,</span> musicObj<span class=\"k\">.</span>height <span class=\"k\">||</span> <span class=\"s\">95</span><span class=\"k\">,</span> <span class=\"s\">\"none\"</span><span class=\"k\">,</span> <span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","            me<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"inserthtml\"</span><span class=\"k\">,</span>str<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryCommandState<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">,</span>","                img <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>getClosedNode<span class=\"k\">(),</span>","                flag <span class=\"k\">=</span> img <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>img<span class=\"k\">.</span>className <span class=\"k\">==</span> <span class=\"s\">\"edui-faked-music\"</span><span class=\"k\">);</span>","            <span class=\"k\">return</span> flag <span class=\"k\">?</span> <span class=\"s\">1</span> <span class=\"k\">:</span> <span class=\"s\">0</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","<span class=\"k\">}</span><span class=\"k\">;</span>"];
_$jscoverage['plugins/music.js'][24]++;
UE.plugins.music = (function () {
  _$jscoverage['plugins/music.js'][25]++;
  var me = this, div;
  _$jscoverage['plugins/music.js'][37]++;
  function creatInsertStr(url, width, height, align, toEmbed, addParagraph) {
    _$jscoverage['plugins/music.js'][38]++;
    return ((! toEmbed)? ((addParagraph? ("<p " + ((align != "none")? ((align == "center")? " style=\"text-align:center;\" ": (" style=\"float:\"" + align)): "") + ">"): "") + "<img align=\"" + align + "\" width=\"" + width + "\" height=\"" + height + "\" _url=\"" + url + "\" class=\"edui-faked-music\"" + " src=\"" + me.options.langPath + me.options.lang + "/images/music.png\" />" + (addParagraph? "</p>": "")): ("<embed type=\"application/x-shockwave-flash\" class=\"edui-faked-music\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"" + " src=\"" + url + "\" width=\"" + width + "\" height=\"" + height + "\" align=\"" + align + "\"" + ((align != "none")? (" style= \"" + ((align == "center")? "display:block;": (" float: " + align)) + "\""): "") + " wmode=\"transparent\" play=\"true\" loop=\"false\" menu=\"false\" allowscriptaccess=\"never\" allowfullscreen=\"true\" >"));
}
  _$jscoverage['plugins/music.js'][50]++;
  function switchImgAndEmbed(img2embed) {
    _$jscoverage['plugins/music.js'][51]++;
    var tmpdiv, nodes = domUtils.getElementsByTagName(me.document, ((! img2embed)? "embed": "img"));
    _$jscoverage['plugins/music.js'][53]++;
    for (var i = 0, node; (node = nodes[(i++)]);) {
      _$jscoverage['plugins/music.js'][54]++;
      if ((node.className != "edui-faked-music")) {
        _$jscoverage['plugins/music.js'][55]++;
        continue;
      }
      _$jscoverage['plugins/music.js'][57]++;
      tmpdiv = me.document.createElement("div");
      _$jscoverage['plugins/music.js'][59]++;
      var align = domUtils.getComputedStyle(node, "float");
      _$jscoverage['plugins/music.js'][60]++;
      align = ((align == "none")? (node.getAttribute("align") || ""): align);
      _$jscoverage['plugins/music.js'][61]++;
      tmpdiv.innerHTML = creatInsertStr((img2embed? node.getAttribute("_url"): node.getAttribute("src")), node.width, node.height, align, img2embed);
      _$jscoverage['plugins/music.js'][62]++;
      node.parentNode.replaceChild(tmpdiv.firstChild, node);
}
}
  _$jscoverage['plugins/music.js'][66]++;
  me.addListener("beforegetcontent", (function () {
  _$jscoverage['plugins/music.js'][67]++;
  switchImgAndEmbed(true);
}));
  _$jscoverage['plugins/music.js'][69]++;
  me.addListener("aftersetcontent", (function () {
  _$jscoverage['plugins/music.js'][70]++;
  switchImgAndEmbed(false);
}));
  _$jscoverage['plugins/music.js'][72]++;
  me.addListener("aftergetcontent", (function (cmdName) {
  _$jscoverage['plugins/music.js'][73]++;
  if (((cmdName == "aftergetcontent") && me.queryCommandState("source"))) {
    _$jscoverage['plugins/music.js'][74]++;
    return;
  }
  _$jscoverage['plugins/music.js'][76]++;
  switchImgAndEmbed(false);
}));
  _$jscoverage['plugins/music.js'][79]++;
  me.commands.music = {execCommand: (function (cmd, musicObj) {
  _$jscoverage['plugins/music.js'][81]++;
  var me = this, str = creatInsertStr(musicObj.url, (musicObj.width || 400), (musicObj.height || 95), "none", false, true);
  _$jscoverage['plugins/music.js'][83]++;
  me.execCommand("inserthtml", str);
}), queryCommandState: (function () {
  _$jscoverage['plugins/music.js'][86]++;
  var me = this, img = me.selection.getRange().getClosedNode(), flag = (img && (img.className == "edui-faked-music"));
  _$jscoverage['plugins/music.js'][89]++;
  return (flag? 1: 0);
})};
});
