/* 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['ui/menu.js']) {
  _$jscoverage['ui/menu.js'] = [];
  _$jscoverage['ui/menu.js'][5] = 0;
  _$jscoverage['ui/menu.js'][6] = 0;
  _$jscoverage['ui/menu.js'][15] = 0;
  _$jscoverage['ui/menu.js'][16] = 0;
  _$jscoverage['ui/menu.js'][19] = 0;
  _$jscoverage['ui/menu.js'][21] = 0;
  _$jscoverage['ui/menu.js'][26] = 0;
  _$jscoverage['ui/menu.js'][29] = 0;
  _$jscoverage['ui/menu.js'][33] = 0;
  _$jscoverage['ui/menu.js'][34] = 0;
  _$jscoverage['ui/menu.js'][35] = 0;
  _$jscoverage['ui/menu.js'][38] = 0;
  _$jscoverage['ui/menu.js'][39] = 0;
  _$jscoverage['ui/menu.js'][40] = 0;
  _$jscoverage['ui/menu.js'][41] = 0;
  _$jscoverage['ui/menu.js'][42] = 0;
  _$jscoverage['ui/menu.js'][43] = 0;
  _$jscoverage['ui/menu.js'][44] = 0;
  _$jscoverage['ui/menu.js'][45] = 0;
  _$jscoverage['ui/menu.js'][50] = 0;
  _$jscoverage['ui/menu.js'][54] = 0;
  _$jscoverage['ui/menu.js'][55] = 0;
  _$jscoverage['ui/menu.js'][59] = 0;
  _$jscoverage['ui/menu.js'][60] = 0;
  _$jscoverage['ui/menu.js'][62] = 0;
  _$jscoverage['ui/menu.js'][63] = 0;
  _$jscoverage['ui/menu.js'][64] = 0;
  _$jscoverage['ui/menu.js'][65] = 0;
  _$jscoverage['ui/menu.js'][67] = 0;
  _$jscoverage['ui/menu.js'][71] = 0;
  _$jscoverage['ui/menu.js'][72] = 0;
  _$jscoverage['ui/menu.js'][73] = 0;
  _$jscoverage['ui/menu.js'][74] = 0;
  _$jscoverage['ui/menu.js'][75] = 0;
  _$jscoverage['ui/menu.js'][77] = 0;
  _$jscoverage['ui/menu.js'][78] = 0;
  _$jscoverage['ui/menu.js'][79] = 0;
  _$jscoverage['ui/menu.js'][80] = 0;
  _$jscoverage['ui/menu.js'][81] = 0;
  _$jscoverage['ui/menu.js'][82] = 0;
  _$jscoverage['ui/menu.js'][85] = 0;
  _$jscoverage['ui/menu.js'][88] = 0;
  _$jscoverage['ui/menu.js'][89] = 0;
  _$jscoverage['ui/menu.js'][90] = 0;
  _$jscoverage['ui/menu.js'][92] = 0;
  _$jscoverage['ui/menu.js'][93] = 0;
  _$jscoverage['ui/menu.js'][94] = 0;
  _$jscoverage['ui/menu.js'][95] = 0;
  _$jscoverage['ui/menu.js'][101] = 0;
  _$jscoverage['ui/menu.js'][102] = 0;
  _$jscoverage['ui/menu.js'][103] = 0;
  _$jscoverage['ui/menu.js'][104] = 0;
  _$jscoverage['ui/menu.js'][105] = 0;
  _$jscoverage['ui/menu.js'][106] = 0;
  _$jscoverage['ui/menu.js'][109] = 0;
  _$jscoverage['ui/menu.js'][112] = 0;
  _$jscoverage['ui/menu.js'][113] = 0;
  _$jscoverage['ui/menu.js'][115] = 0;
  _$jscoverage['ui/menu.js'][118] = 0;
  _$jscoverage['ui/menu.js'][121] = 0;
  _$jscoverage['ui/menu.js'][127] = 0;
  _$jscoverage['ui/menu.js'][128] = 0;
  _$jscoverage['ui/menu.js'][129] = 0;
  _$jscoverage['ui/menu.js'][130] = 0;
  _$jscoverage['ui/menu.js'][131] = 0;
  _$jscoverage['ui/menu.js'][132] = 0;
  _$jscoverage['ui/menu.js'][133] = 0;
  _$jscoverage['ui/menu.js'][136] = 0;
  _$jscoverage['ui/menu.js'][138] = 0;
  _$jscoverage['ui/menu.js'][143] = 0;
  _$jscoverage['ui/menu.js'][144] = 0;
  _$jscoverage['ui/menu.js'][148] = 0;
  _$jscoverage['ui/menu.js'][149] = 0;
  _$jscoverage['ui/menu.js'][150] = 0;
  _$jscoverage['ui/menu.js'][154] = 0;
  _$jscoverage['ui/menu.js'][158] = 0;
  _$jscoverage['ui/menu.js'][165] = 0;
  _$jscoverage['ui/menu.js'][172] = 0;
  _$jscoverage['ui/menu.js'][173] = 0;
  _$jscoverage['ui/menu.js'][174] = 0;
  _$jscoverage['ui/menu.js'][175] = 0;
  _$jscoverage['ui/menu.js'][176] = 0;
  _$jscoverage['ui/menu.js'][179] = 0;
  _$jscoverage['ui/menu.js'][180] = 0;
  _$jscoverage['ui/menu.js'][181] = 0;
  _$jscoverage['ui/menu.js'][182] = 0;
  _$jscoverage['ui/menu.js'][183] = 0;
  _$jscoverage['ui/menu.js'][185] = 0;
  _$jscoverage['ui/menu.js'][186] = 0;
  _$jscoverage['ui/menu.js'][187] = 0;
  _$jscoverage['ui/menu.js'][188] = 0;
  _$jscoverage['ui/menu.js'][190] = 0;
  _$jscoverage['ui/menu.js'][191] = 0;
  _$jscoverage['ui/menu.js'][193] = 0;
  _$jscoverage['ui/menu.js'][194] = 0;
  _$jscoverage['ui/menu.js'][195] = 0;
  _$jscoverage['ui/menu.js'][198] = 0;
  _$jscoverage['ui/menu.js'][199] = 0;
  _$jscoverage['ui/menu.js'][200] = 0;
  _$jscoverage['ui/menu.js'][201] = 0;
  _$jscoverage['ui/menu.js'][203] = 0;
  _$jscoverage['ui/menu.js'][206] = 0;
  _$jscoverage['ui/menu.js'][207] = 0;
  _$jscoverage['ui/menu.js'][208] = 0;
  _$jscoverage['ui/menu.js'][211] = 0;
  _$jscoverage['ui/menu.js'][212] = 0;
  _$jscoverage['ui/menu.js'][213] = 0;
  _$jscoverage['ui/menu.js'][214] = 0;
  _$jscoverage['ui/menu.js'][215] = 0;
  _$jscoverage['ui/menu.js'][216] = 0;
  _$jscoverage['ui/menu.js'][217] = 0;
  _$jscoverage['ui/menu.js'][218] = 0;
  _$jscoverage['ui/menu.js'][223] = 0;
  _$jscoverage['ui/menu.js'][224] = 0;
  _$jscoverage['ui/menu.js'][225] = 0;
  _$jscoverage['ui/menu.js'][226] = 0;
  _$jscoverage['ui/menu.js'][227] = 0;
  _$jscoverage['ui/menu.js'][228] = 0;
  _$jscoverage['ui/menu.js'][229] = 0;
  _$jscoverage['ui/menu.js'][230] = 0;
  _$jscoverage['ui/menu.js'][232] = 0;
  _$jscoverage['ui/menu.js'][238] = 0;
  _$jscoverage['ui/menu.js'][243] = 0;
  _$jscoverage['ui/menu.js'][246] = 0;
  _$jscoverage['ui/menu.js'][247] = 0;
  _$jscoverage['ui/menu.js'][251] = 0;
  _$jscoverage['ui/menu.js'][252] = 0;
  _$jscoverage['ui/menu.js'][253] = 0;
  _$jscoverage['ui/menu.js'][254] = 0;
  _$jscoverage['ui/menu.js'][256] = 0;
  _$jscoverage['ui/menu.js'][261] = 0;
  _$jscoverage['ui/menu.js'][262] = 0;
  _$jscoverage['ui/menu.js'][263] = 0;
  _$jscoverage['ui/menu.js'][264] = 0;
  _$jscoverage['ui/menu.js'][265] = 0;
  _$jscoverage['ui/menu.js'][266] = 0;
  _$jscoverage['ui/menu.js'][267] = 0;
  _$jscoverage['ui/menu.js'][268] = 0;
  _$jscoverage['ui/menu.js'][271] = 0;
  _$jscoverage['ui/menu.js'][274] = 0;
  _$jscoverage['ui/menu.js'][275] = 0;
}
_$jscoverage['ui/menu.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///import uicore</span>","<span class=\"c\">///import ui\\popup.js</span>","<span class=\"c\">///import ui\\stateful.js</span>","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","    <span class=\"k\">var</span> utils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>utils<span class=\"k\">,</span>","        domUtils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>dom<span class=\"k\">.</span>domUtils<span class=\"k\">,</span>","        uiUtils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>uiUtils<span class=\"k\">,</span>","        UIBase <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>UIBase<span class=\"k\">,</span>","        Popup <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Popup<span class=\"k\">,</span>","        Stateful <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Stateful<span class=\"k\">,</span>","        CellAlignPicker <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>CellAlignPicker<span class=\"k\">,</span>","","        Menu <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Menu <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>options<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initOptions<span class=\"k\">(</span>options<span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initMenu<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">var</span> menuSeparator <span class=\"k\">=</span> <span class=\"k\">{</span>","        renderHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-menuitem edui-menuseparator\"&gt;&lt;div class=\"edui-menuseparator-inner\"&gt;&lt;/div&gt;&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        postRender<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryAutoHide<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">true</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    Menu<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        items<span class=\"k\">:</span><span class=\"k\">null</span><span class=\"k\">,</span>","        uiName<span class=\"k\">:</span><span class=\"s\">'menu'</span><span class=\"k\">,</span>","        initMenu<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>items <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items <span class=\"k\">||</span> <span class=\"k\">[];</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initPopup<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initItems<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        initItems<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</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> i <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> item <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>item <span class=\"k\">==</span> <span class=\"s\">'-'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getSeparator<span class=\"k\">();</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(!(</span>item <span class=\"k\">instanceof</span> MenuItem<span class=\"k\">))</span> <span class=\"k\">{</span>","                    item<span class=\"k\">.</span>editor <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">;</span>","                    item<span class=\"k\">.</span>theme <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">;</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>createItem<span class=\"k\">(</span>item<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getSeparator<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> menuSeparator<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        createItem<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>item<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"c\">//&#26032;&#22686;&#19968;&#20010;&#21442;&#25968;menu, &#35813;&#21442;&#25968;&#23384;&#20648;&#20102;menuItem&#25152;&#23545;&#24212;&#30340;menu&#24341;&#29992;</span>","            item<span class=\"k\">.</span>menu <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> <span class=\"k\">new</span> MenuItem<span class=\"k\">(</span>item<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _Popup_getContentHtmlTpl<span class=\"k\">:</span>Popup<span class=\"k\">.</span>prototype<span class=\"k\">.</span>getContentHtmlTpl<span class=\"k\">,</span>","        getContentHtmlTpl<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length <span class=\"k\">==</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_Popup_getContentHtmlTpl<span class=\"k\">();</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> buff <span class=\"k\">=</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> i <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> item <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span>","                buff<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> item<span class=\"k\">.</span>renderHtml<span class=\"k\">();</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">(</span><span class=\"s\">'&lt;div class=\"%%-body\"&gt;'</span> <span class=\"k\">+</span> buff<span class=\"k\">.</span>join<span class=\"k\">(</span><span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _Popup_postRender<span class=\"k\">:</span>Popup<span class=\"k\">.</span>prototype<span class=\"k\">.</span>postRender<span class=\"k\">,</span>","        postRender<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>","            <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> i <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> item <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span>","                item<span class=\"k\">.</span>ownerMenu <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","                item<span class=\"k\">.</span>postRender<span class=\"k\">();</span>","            <span class=\"k\">}</span>","            domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(),</span> <span class=\"s\">'mouseover'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>evt<span class=\"k\">)</span> <span class=\"k\">{</span>","                evt <span class=\"k\">=</span> evt <span class=\"k\">||</span> event<span class=\"k\">;</span>","                <span class=\"k\">var</span> rel <span class=\"k\">=</span> evt<span class=\"k\">.</span>relatedTarget <span class=\"k\">||</span> evt<span class=\"k\">.</span>fromElement<span class=\"k\">;</span>","                <span class=\"k\">var</span> el <span class=\"k\">=</span> me<span class=\"k\">.</span>getDom<span class=\"k\">();</span>","                <span class=\"k\">if</span> <span class=\"k\">(!</span>uiUtils<span class=\"k\">.</span>contains<span class=\"k\">(</span>el<span class=\"k\">,</span> rel<span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> el <span class=\"k\">!==</span> rel<span class=\"k\">)</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'over'</span><span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_Popup_postRender<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryAutoHide<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>el<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>el<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>uiUtils<span class=\"k\">.</span>contains<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(),</span> el<span class=\"k\">))</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> <span class=\"k\">false</span><span class=\"k\">;</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> i <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> item <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>item<span class=\"k\">.</span>queryAutoHide<span class=\"k\">(</span>el<span class=\"k\">)</span> <span class=\"k\">===</span> <span class=\"k\">false</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> <span class=\"k\">false</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>","        clearItems<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</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> i <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> item <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span>","                clearTimeout<span class=\"k\">(</span>item<span class=\"k\">.</span>_showingTimer<span class=\"k\">);</span>","                clearTimeout<span class=\"k\">(</span>item<span class=\"k\">.</span>_closingTimer<span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>item<span class=\"k\">.</span>subMenu<span class=\"k\">)</span> <span class=\"k\">{</span>","                    item<span class=\"k\">.</span>subMenu<span class=\"k\">.</span>destroy<span class=\"k\">();</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>items <span class=\"k\">=</span> <span class=\"k\">[];</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        destroy<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">())</span> <span class=\"k\">{</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">());</span>","            <span class=\"k\">}</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>clearItems<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        dispose<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>destroy<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    utils<span class=\"k\">.</span>inherits<span class=\"k\">(</span>Menu<span class=\"k\">,</span> Popup<span class=\"k\">);</span>","","    <span class=\"c\">/**</span>","<span class=\"c\">     * @update 2013/04/03 hancong03 &#26032;&#22686;&#19968;&#20010;&#21442;&#25968;menu, &#35813;&#21442;&#25968;&#23384;&#20648;&#20102;menuItem&#25152;&#23545;&#24212;&#30340;menu&#24341;&#29992;</span>","<span class=\"c\">     * @type {Function}</span>","<span class=\"c\">     */</span>","    <span class=\"k\">var</span> MenuItem <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>MenuItem <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>options<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">this</span><span class=\"k\">.</span>initOptions<span class=\"k\">(</span>options<span class=\"k\">);</span>","        <span class=\"k\">this</span><span class=\"k\">.</span>initUIBase<span class=\"k\">();</span>","        <span class=\"k\">this</span><span class=\"k\">.</span>Stateful_init<span class=\"k\">();</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu <span class=\"k\">instanceof</span> Menu<span class=\"k\">))</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>options<span class=\"k\">.</span>className <span class=\"k\">&amp;&amp;</span> options<span class=\"k\">.</span>className<span class=\"k\">.</span>indexOf<span class=\"k\">(</span><span class=\"s\">\"aligntd\"</span><span class=\"k\">)</span> <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</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>","","                <span class=\"c\">//&#33719;&#21462;&#21333;&#20803;&#26684;&#23545;&#40784;&#21021;&#22987;&#29366;&#24577;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>selected <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span> <span class=\"s\">'cellalignment'</span> <span class=\"k\">);</span>","","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu <span class=\"k\">=</span> <span class=\"k\">new</span> Popup<span class=\"k\">(</span><span class=\"k\">{</span>","                    content<span class=\"k\">:</span><span class=\"k\">new</span> CellAlignPicker<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">),</span>","                    parentMenu<span class=\"k\">:</span>me<span class=\"k\">,</span>","                    editor<span class=\"k\">:</span>me<span class=\"k\">.</span>editor<span class=\"k\">,</span>","                    destroy<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">())</span> <span class=\"k\">{</span>","                            domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">());</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">\"postRenderAfter\"</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(),</span> <span class=\"s\">\"mouseover\"</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        me<span class=\"k\">.</span>addState<span class=\"k\">(</span><span class=\"s\">'opened'</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> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu <span class=\"k\">=</span> <span class=\"k\">new</span> Menu<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    MenuItem<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        label<span class=\"k\">:</span><span class=\"s\">''</span><span class=\"k\">,</span>","        subMenu<span class=\"k\">:</span><span class=\"k\">null</span><span class=\"k\">,</span>","        ownerMenu<span class=\"k\">:</span><span class=\"k\">null</span><span class=\"k\">,</span>","        uiName<span class=\"k\">:</span><span class=\"s\">'menuitem'</span><span class=\"k\">,</span>","        alwalysHoverable<span class=\"k\">:</span><span class=\"k\">true</span><span class=\"k\">,</span>","        getHtmlTpl<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"s\">'&lt;div id=\"##\" class=\"%%\" stateful onclick=\"$$._onClick(event, this);\"&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div class=\"%%-body\"&gt;'</span> <span class=\"k\">+</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>renderLabelHtml<span class=\"k\">()</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        postRender<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>","            <span class=\"k\">this</span><span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'over'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                me<span class=\"k\">.</span>ownerMenu<span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'submenuover'</span><span class=\"k\">,</span> me<span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>me<span class=\"k\">.</span>subMenu<span class=\"k\">)</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>delayShowSubMenu<span class=\"k\">();</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>className <span class=\"k\">+=</span> <span class=\"s\">' edui-hassubmenu'</span><span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>render<span class=\"k\">();</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'out'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>delayHideSubMenu<span class=\"k\">();</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'over'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    clearTimeout<span class=\"k\">(</span>me<span class=\"k\">.</span>_closingTimer<span class=\"k\">);</span>","                    me<span class=\"k\">.</span>_closingTimer <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                    me<span class=\"k\">.</span>addState<span class=\"k\">(</span><span class=\"s\">'opened'</span><span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>ownerMenu<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'hide'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>hideSubMenu<span class=\"k\">();</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>ownerMenu<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'submenuover'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> subMenu<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>subMenu <span class=\"k\">!==</span> me<span class=\"k\">)</span> <span class=\"k\">{</span>","                        me<span class=\"k\">.</span>delayHideSubMenu<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>_bakQueryAutoHide <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>queryAutoHide<span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>queryAutoHide <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>el<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>el <span class=\"k\">&amp;&amp;</span> uiUtils<span class=\"k\">.</span>contains<span class=\"k\">(</span>me<span class=\"k\">.</span>getDom<span class=\"k\">(),</span> el<span class=\"k\">))</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> <span class=\"k\">false</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakQueryAutoHide<span class=\"k\">(</span>el<span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>tabIndex <span class=\"k\">=</span> <span class=\"s\">'-1'</span><span class=\"k\">;</span>","            uiUtils<span class=\"k\">.</span>makeUnselectable<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">());</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>Stateful_postRender<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        delayShowSubMenu<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>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>me<span class=\"k\">.</span>isDisabled<span class=\"k\">())</span> <span class=\"k\">{</span>","                me<span class=\"k\">.</span>addState<span class=\"k\">(</span><span class=\"s\">'opened'</span><span class=\"k\">);</span>","                clearTimeout<span class=\"k\">(</span>me<span class=\"k\">.</span>_showingTimer<span class=\"k\">);</span>","                clearTimeout<span class=\"k\">(</span>me<span class=\"k\">.</span>_closingTimer<span class=\"k\">);</span>","                me<span class=\"k\">.</span>_closingTimer <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                me<span class=\"k\">.</span>_showingTimer <span class=\"k\">=</span> setTimeout<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>showSubMenu<span class=\"k\">();</span>","                <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"s\">250</span><span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        delayHideSubMenu<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>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>me<span class=\"k\">.</span>isDisabled<span class=\"k\">())</span> <span class=\"k\">{</span>","                me<span class=\"k\">.</span>removeState<span class=\"k\">(</span><span class=\"s\">'opened'</span><span class=\"k\">);</span>","                clearTimeout<span class=\"k\">(</span>me<span class=\"k\">.</span>_showingTimer<span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(!</span>me<span class=\"k\">.</span>_closingTimer<span class=\"k\">)</span> <span class=\"k\">{</span>","                    me<span class=\"k\">.</span>_closingTimer <span class=\"k\">=</span> setTimeout<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(!</span>me<span class=\"k\">.</span>hasState<span class=\"k\">(</span><span class=\"s\">'opened'</span><span class=\"k\">))</span> <span class=\"k\">{</span>","                            me<span class=\"k\">.</span>hideSubMenu<span class=\"k\">();</span>","                        <span class=\"k\">}</span>","                        me<span class=\"k\">.</span>_closingTimer <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"s\">400</span><span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-arrow\"&gt;&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div class=\"edui-box edui-icon\"&gt;&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div class=\"edui-box edui-label %%-label\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getStateDom<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryAutoHide<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>el<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu <span class=\"k\">&amp;&amp;</span> <span class=\"k\">this</span><span class=\"k\">.</span>hasState<span class=\"k\">(</span><span class=\"s\">'opened'</span><span class=\"k\">))</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>queryAutoHide<span class=\"k\">(</span>el<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onClick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>event<span class=\"k\">,</span> this_<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>hasState<span class=\"k\">(</span><span class=\"s\">'disabled'</span><span class=\"k\">))</span> <span class=\"k\">return</span><span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'click'</span><span class=\"k\">,</span> event<span class=\"k\">,</span> this_<span class=\"k\">)</span> <span class=\"k\">!==</span> <span class=\"k\">false</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>showSubMenu<span class=\"k\">();</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    Popup<span class=\"k\">.</span>postHide<span class=\"k\">(</span>event<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        showSubMenu<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">());</span>","            rect<span class=\"k\">.</span>right <span class=\"k\">-=</span> <span class=\"s\">5</span><span class=\"k\">;</span>","            rect<span class=\"k\">.</span>left <span class=\"k\">+=</span> <span class=\"s\">2</span><span class=\"k\">;</span>","            rect<span class=\"k\">.</span>width <span class=\"k\">-=</span> <span class=\"s\">7</span><span class=\"k\">;</span>","            rect<span class=\"k\">.</span>top <span class=\"k\">-=</span> <span class=\"s\">4</span><span class=\"k\">;</span>","            rect<span class=\"k\">.</span>bottom <span class=\"k\">+=</span> <span class=\"s\">4</span><span class=\"k\">;</span>","            rect<span class=\"k\">.</span>height <span class=\"k\">+=</span> <span class=\"s\">8</span><span class=\"k\">;</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>showAnchorRect<span class=\"k\">(</span>rect<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        hideSubMenu<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>subMenu<span class=\"k\">.</span>hide<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    utils<span class=\"k\">.</span>inherits<span class=\"k\">(</span>MenuItem<span class=\"k\">,</span> UIBase<span class=\"k\">);</span>","    utils<span class=\"k\">.</span>extend<span class=\"k\">(</span>MenuItem<span class=\"k\">.</span>prototype<span class=\"k\">,</span> Stateful<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/menu.js'][5]++;
(function () {
  _$jscoverage['ui/menu.js'][6]++;
  var utils = baidu.editor.utils, domUtils = baidu.editor.dom.domUtils, uiUtils = baidu.editor.ui.uiUtils, UIBase = baidu.editor.ui.UIBase, Popup = baidu.editor.ui.Popup, Stateful = baidu.editor.ui.Stateful, CellAlignPicker = baidu.editor.ui.CellAlignPicker, Menu = (baidu.editor.ui.Menu = (function (options) {
  _$jscoverage['ui/menu.js'][15]++;
  this.initOptions(options);
  _$jscoverage['ui/menu.js'][16]++;
  this.initMenu();
}));
  _$jscoverage['ui/menu.js'][19]++;
  var menuSeparator = {renderHtml: (function () {
  _$jscoverage['ui/menu.js'][21]++;
  return "<div class=\"edui-menuitem edui-menuseparator\"><div class=\"edui-menuseparator-inner\"></div></div>";
}), postRender: (function () {
}), queryAutoHide: (function () {
  _$jscoverage['ui/menu.js'][26]++;
  return true;
})};
  _$jscoverage['ui/menu.js'][29]++;
  Menu.prototype = {items: null, uiName: "menu", initMenu: (function () {
  _$jscoverage['ui/menu.js'][33]++;
  this.items = (this.items || []);
  _$jscoverage['ui/menu.js'][34]++;
  this.initPopup();
  _$jscoverage['ui/menu.js'][35]++;
  this.initItems();
}), initItems: (function () {
  _$jscoverage['ui/menu.js'][38]++;
  for (var i = 0; (i < this.items.length); (i++)) {
    _$jscoverage['ui/menu.js'][39]++;
    var item = this.items[i];
    _$jscoverage['ui/menu.js'][40]++;
    if ((item == "-")) {
      _$jscoverage['ui/menu.js'][41]++;
      this.items[i] = this.getSeparator();
    }
    else {
      _$jscoverage['ui/menu.js'][42]++;
      if ((! (item instanceof MenuItem))) {
        _$jscoverage['ui/menu.js'][43]++;
        item.editor = this.editor;
        _$jscoverage['ui/menu.js'][44]++;
        item.theme = this.editor.options.theme;
        _$jscoverage['ui/menu.js'][45]++;
        this.items[i] = this.createItem(item);
      }
    }
}
}), getSeparator: (function () {
  _$jscoverage['ui/menu.js'][50]++;
  return menuSeparator;
}), createItem: (function (item) {
  _$jscoverage['ui/menu.js'][54]++;
  item.menu = this;
  _$jscoverage['ui/menu.js'][55]++;
  return new MenuItem(item);
}), _Popup_getContentHtmlTpl: Popup.prototype.getContentHtmlTpl, getContentHtmlTpl: (function () {
  _$jscoverage['ui/menu.js'][59]++;
  if ((this.items.length == 0)) {
    _$jscoverage['ui/menu.js'][60]++;
    return this._Popup_getContentHtmlTpl();
  }
  _$jscoverage['ui/menu.js'][62]++;
  var buff = [];
  _$jscoverage['ui/menu.js'][63]++;
  for (var i = 0; (i < this.items.length); (i++)) {
    _$jscoverage['ui/menu.js'][64]++;
    var item = this.items[i];
    _$jscoverage['ui/menu.js'][65]++;
    buff[i] = item.renderHtml();
}
  _$jscoverage['ui/menu.js'][67]++;
  return ("<div class=\"%%-body\">" + buff.join("") + "</div>");
}), _Popup_postRender: Popup.prototype.postRender, postRender: (function () {
  _$jscoverage['ui/menu.js'][71]++;
  var me = this;
  _$jscoverage['ui/menu.js'][72]++;
  for (var i = 0; (i < this.items.length); (i++)) {
    _$jscoverage['ui/menu.js'][73]++;
    var item = this.items[i];
    _$jscoverage['ui/menu.js'][74]++;
    item.ownerMenu = this;
    _$jscoverage['ui/menu.js'][75]++;
    item.postRender();
}
  _$jscoverage['ui/menu.js'][77]++;
  domUtils.on(this.getDom(), "mouseover", (function (evt) {
  _$jscoverage['ui/menu.js'][78]++;
  evt = (evt || event);
  _$jscoverage['ui/menu.js'][79]++;
  var rel = (evt.relatedTarget || evt.fromElement);
  _$jscoverage['ui/menu.js'][80]++;
  var el = me.getDom();
  _$jscoverage['ui/menu.js'][81]++;
  if (((! uiUtils.contains(el, rel)) && (el !== rel))) {
    _$jscoverage['ui/menu.js'][82]++;
    me.fireEvent("over");
  }
}));
  _$jscoverage['ui/menu.js'][85]++;
  this._Popup_postRender();
}), queryAutoHide: (function (el) {
  _$jscoverage['ui/menu.js'][88]++;
  if (el) {
    _$jscoverage['ui/menu.js'][89]++;
    if (uiUtils.contains(this.getDom(), el)) {
      _$jscoverage['ui/menu.js'][90]++;
      return false;
    }
    _$jscoverage['ui/menu.js'][92]++;
    for (var i = 0; (i < this.items.length); (i++)) {
      _$jscoverage['ui/menu.js'][93]++;
      var item = this.items[i];
      _$jscoverage['ui/menu.js'][94]++;
      if ((item.queryAutoHide(el) === false)) {
        _$jscoverage['ui/menu.js'][95]++;
        return false;
      }
}
  }
}), clearItems: (function () {
  _$jscoverage['ui/menu.js'][101]++;
  for (var i = 0; (i < this.items.length); (i++)) {
    _$jscoverage['ui/menu.js'][102]++;
    var item = this.items[i];
    _$jscoverage['ui/menu.js'][103]++;
    clearTimeout(item._showingTimer);
    _$jscoverage['ui/menu.js'][104]++;
    clearTimeout(item._closingTimer);
    _$jscoverage['ui/menu.js'][105]++;
    if (item.subMenu) {
      _$jscoverage['ui/menu.js'][106]++;
      item.subMenu.destroy();
    }
}
  _$jscoverage['ui/menu.js'][109]++;
  this.items = [];
}), destroy: (function () {
  _$jscoverage['ui/menu.js'][112]++;
  if (this.getDom()) {
    _$jscoverage['ui/menu.js'][113]++;
    domUtils.remove(this.getDom());
  }
  _$jscoverage['ui/menu.js'][115]++;
  this.clearItems();
}), dispose: (function () {
  _$jscoverage['ui/menu.js'][118]++;
  this.destroy();
})};
  _$jscoverage['ui/menu.js'][121]++;
  utils.inherits(Menu, Popup);
  _$jscoverage['ui/menu.js'][127]++;
  var MenuItem = (baidu.editor.ui.MenuItem = (function (options) {
  _$jscoverage['ui/menu.js'][128]++;
  this.initOptions(options);
  _$jscoverage['ui/menu.js'][129]++;
  this.initUIBase();
  _$jscoverage['ui/menu.js'][130]++;
  this.Stateful_init();
  _$jscoverage['ui/menu.js'][131]++;
  if ((this.subMenu && (! (this.subMenu instanceof Menu)))) {
    _$jscoverage['ui/menu.js'][132]++;
    if ((options.className && (options.className.indexOf("aligntd") != -1))) {
      _$jscoverage['ui/menu.js'][133]++;
      var me = this;
      _$jscoverage['ui/menu.js'][136]++;
      this.subMenu.selected = this.editor.queryCommandValue("cellalignment");
      _$jscoverage['ui/menu.js'][138]++;
      this.subMenu = new Popup({content: new CellAlignPicker(this.subMenu), parentMenu: me, editor: me.editor, destroy: (function () {
  _$jscoverage['ui/menu.js'][143]++;
  if (this.getDom()) {
    _$jscoverage['ui/menu.js'][144]++;
    domUtils.remove(this.getDom());
  }
})});
      _$jscoverage['ui/menu.js'][148]++;
      this.subMenu.addListener("postRenderAfter", (function () {
  _$jscoverage['ui/menu.js'][149]++;
  domUtils.on(this.getDom(), "mouseover", (function () {
  _$jscoverage['ui/menu.js'][150]++;
  me.addState("opened");
}));
}));
    }
    else {
      _$jscoverage['ui/menu.js'][154]++;
      this.subMenu = new Menu(this.subMenu);
    }
  }
}));
  _$jscoverage['ui/menu.js'][158]++;
  MenuItem.prototype = {label: "", subMenu: null, ownerMenu: null, uiName: "menuitem", alwalysHoverable: true, getHtmlTpl: (function () {
  _$jscoverage['ui/menu.js'][165]++;
  return ("<div id=\"##\" class=\"%%\" stateful onclick=\"$$._onClick(event, this);\">" + "<div class=\"%%-body\">" + this.renderLabelHtml() + "</div>" + "</div>");
}), postRender: (function () {
  _$jscoverage['ui/menu.js'][172]++;
  var me = this;
  _$jscoverage['ui/menu.js'][173]++;
  this.addListener("over", (function () {
  _$jscoverage['ui/menu.js'][174]++;
  me.ownerMenu.fireEvent("submenuover", me);
  _$jscoverage['ui/menu.js'][175]++;
  if (me.subMenu) {
    _$jscoverage['ui/menu.js'][176]++;
    me.delayShowSubMenu();
  }
}));
  _$jscoverage['ui/menu.js'][179]++;
  if (this.subMenu) {
    _$jscoverage['ui/menu.js'][180]++;
    this.getDom().className += " edui-hassubmenu";
    _$jscoverage['ui/menu.js'][181]++;
    this.subMenu.render();
    _$jscoverage['ui/menu.js'][182]++;
    this.addListener("out", (function () {
  _$jscoverage['ui/menu.js'][183]++;
  me.delayHideSubMenu();
}));
    _$jscoverage['ui/menu.js'][185]++;
    this.subMenu.addListener("over", (function () {
  _$jscoverage['ui/menu.js'][186]++;
  clearTimeout(me._closingTimer);
  _$jscoverage['ui/menu.js'][187]++;
  me._closingTimer = null;
  _$jscoverage['ui/menu.js'][188]++;
  me.addState("opened");
}));
    _$jscoverage['ui/menu.js'][190]++;
    this.ownerMenu.addListener("hide", (function () {
  _$jscoverage['ui/menu.js'][191]++;
  me.hideSubMenu();
}));
    _$jscoverage['ui/menu.js'][193]++;
    this.ownerMenu.addListener("submenuover", (function (t, subMenu) {
  _$jscoverage['ui/menu.js'][194]++;
  if ((subMenu !== me)) {
    _$jscoverage['ui/menu.js'][195]++;
    me.delayHideSubMenu();
  }
}));
    _$jscoverage['ui/menu.js'][198]++;
    this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide;
    _$jscoverage['ui/menu.js'][199]++;
    this.subMenu.queryAutoHide = (function (el) {
  _$jscoverage['ui/menu.js'][200]++;
  if ((el && uiUtils.contains(me.getDom(), el))) {
    _$jscoverage['ui/menu.js'][201]++;
    return false;
  }
  _$jscoverage['ui/menu.js'][203]++;
  return this._bakQueryAutoHide(el);
});
  }
  _$jscoverage['ui/menu.js'][206]++;
  this.getDom().style.tabIndex = "-1";
  _$jscoverage['ui/menu.js'][207]++;
  uiUtils.makeUnselectable(this.getDom());
  _$jscoverage['ui/menu.js'][208]++;
  this.Stateful_postRender();
}), delayShowSubMenu: (function () {
  _$jscoverage['ui/menu.js'][211]++;
  var me = this;
  _$jscoverage['ui/menu.js'][212]++;
  if ((! me.isDisabled())) {
    _$jscoverage['ui/menu.js'][213]++;
    me.addState("opened");
    _$jscoverage['ui/menu.js'][214]++;
    clearTimeout(me._showingTimer);
    _$jscoverage['ui/menu.js'][215]++;
    clearTimeout(me._closingTimer);
    _$jscoverage['ui/menu.js'][216]++;
    me._closingTimer = null;
    _$jscoverage['ui/menu.js'][217]++;
    me._showingTimer = setTimeout((function () {
  _$jscoverage['ui/menu.js'][218]++;
  me.showSubMenu();
}), 250);
  }
}), delayHideSubMenu: (function () {
  _$jscoverage['ui/menu.js'][223]++;
  var me = this;
  _$jscoverage['ui/menu.js'][224]++;
  if ((! me.isDisabled())) {
    _$jscoverage['ui/menu.js'][225]++;
    me.removeState("opened");
    _$jscoverage['ui/menu.js'][226]++;
    clearTimeout(me._showingTimer);
    _$jscoverage['ui/menu.js'][227]++;
    if ((! me._closingTimer)) {
      _$jscoverage['ui/menu.js'][228]++;
      me._closingTimer = setTimeout((function () {
  _$jscoverage['ui/menu.js'][229]++;
  if ((! me.hasState("opened"))) {
    _$jscoverage['ui/menu.js'][230]++;
    me.hideSubMenu();
  }
  _$jscoverage['ui/menu.js'][232]++;
  me._closingTimer = null;
}), 400);
    }
  }
}), renderLabelHtml: (function () {
  _$jscoverage['ui/menu.js'][238]++;
  return ("<div class=\"edui-arrow\"></div>" + "<div class=\"edui-box edui-icon\"></div>" + "<div class=\"edui-box edui-label %%-label\">" + (this.label || "") + "</div>");
}), getStateDom: (function () {
  _$jscoverage['ui/menu.js'][243]++;
  return this.getDom();
}), queryAutoHide: (function (el) {
  _$jscoverage['ui/menu.js'][246]++;
  if ((this.subMenu && this.hasState("opened"))) {
    _$jscoverage['ui/menu.js'][247]++;
    return this.subMenu.queryAutoHide(el);
  }
}), _onClick: (function (event, this_) {
  _$jscoverage['ui/menu.js'][251]++;
  if (this.hasState("disabled")) {
    _$jscoverage['ui/menu.js'][251]++;
    return;
  }
  _$jscoverage['ui/menu.js'][252]++;
  if ((this.fireEvent("click", event, this_) !== false)) {
    _$jscoverage['ui/menu.js'][253]++;
    if (this.subMenu) {
      _$jscoverage['ui/menu.js'][254]++;
      this.showSubMenu();
    }
    else {
      _$jscoverage['ui/menu.js'][256]++;
      Popup.postHide(event);
    }
  }
}), showSubMenu: (function () {
  _$jscoverage['ui/menu.js'][261]++;
  var rect = uiUtils.getClientRect(this.getDom());
  _$jscoverage['ui/menu.js'][262]++;
  rect.right -= 5;
  _$jscoverage['ui/menu.js'][263]++;
  rect.left += 2;
  _$jscoverage['ui/menu.js'][264]++;
  rect.width -= 7;
  _$jscoverage['ui/menu.js'][265]++;
  rect.top -= 4;
  _$jscoverage['ui/menu.js'][266]++;
  rect.bottom += 4;
  _$jscoverage['ui/menu.js'][267]++;
  rect.height += 8;
  _$jscoverage['ui/menu.js'][268]++;
  this.subMenu.showAnchorRect(rect, true, true);
}), hideSubMenu: (function () {
  _$jscoverage['ui/menu.js'][271]++;
  this.subMenu.hide();
})};
  _$jscoverage['ui/menu.js'][274]++;
  utils.inherits(MenuItem, UIBase);
  _$jscoverage['ui/menu.js'][275]++;
  utils.extend(MenuItem.prototype, Stateful, true);
})();
