/* 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/searchreplace.js']) {
  _$jscoverage['plugins/searchreplace.js'] = [];
  _$jscoverage['plugins/searchreplace.js'][10] = 0;
  _$jscoverage['plugins/searchreplace.js'][12] = 0;
  _$jscoverage['plugins/searchreplace.js'][15] = 0;
  _$jscoverage['plugins/searchreplace.js'][16] = 0;
  _$jscoverage['plugins/searchreplace.js'][17] = 0;
  _$jscoverage['plugins/searchreplace.js'][19] = 0;
  _$jscoverage['plugins/searchreplace.js'][21] = 0;
  _$jscoverage['plugins/searchreplace.js'][31] = 0;
  _$jscoverage['plugins/searchreplace.js'][32] = 0;
  _$jscoverage['plugins/searchreplace.js'][33] = 0;
  _$jscoverage['plugins/searchreplace.js'][34] = 0;
  _$jscoverage['plugins/searchreplace.js'][35] = 0;
  _$jscoverage['plugins/searchreplace.js'][37] = 0;
  _$jscoverage['plugins/searchreplace.js'][38] = 0;
  _$jscoverage['plugins/searchreplace.js'][39] = 0;
  _$jscoverage['plugins/searchreplace.js'][40] = 0;
  _$jscoverage['plugins/searchreplace.js'][41] = 0;
  _$jscoverage['plugins/searchreplace.js'][42] = 0;
  _$jscoverage['plugins/searchreplace.js'][43] = 0;
  _$jscoverage['plugins/searchreplace.js'][44] = 0;
  _$jscoverage['plugins/searchreplace.js'][46] = 0;
  _$jscoverage['plugins/searchreplace.js'][50] = 0;
  _$jscoverage['plugins/searchreplace.js'][51] = 0;
  _$jscoverage['plugins/searchreplace.js'][52] = 0;
  _$jscoverage['plugins/searchreplace.js'][55] = 0;
  _$jscoverage['plugins/searchreplace.js'][57] = 0;
  _$jscoverage['plugins/searchreplace.js'][58] = 0;
  _$jscoverage['plugins/searchreplace.js'][60] = 0;
  _$jscoverage['plugins/searchreplace.js'][61] = 0;
  _$jscoverage['plugins/searchreplace.js'][62] = 0;
  _$jscoverage['plugins/searchreplace.js'][64] = 0;
  _$jscoverage['plugins/searchreplace.js'][65] = 0;
  _$jscoverage['plugins/searchreplace.js'][68] = 0;
  _$jscoverage['plugins/searchreplace.js'][69] = 0;
  _$jscoverage['plugins/searchreplace.js'][70] = 0;
  _$jscoverage['plugins/searchreplace.js'][71] = 0;
  _$jscoverage['plugins/searchreplace.js'][72] = 0;
  _$jscoverage['plugins/searchreplace.js'][73] = 0;
  _$jscoverage['plugins/searchreplace.js'][75] = 0;
  _$jscoverage['plugins/searchreplace.js'][77] = 0;
  _$jscoverage['plugins/searchreplace.js'][78] = 0;
  _$jscoverage['plugins/searchreplace.js'][79] = 0;
  _$jscoverage['plugins/searchreplace.js'][80] = 0;
  _$jscoverage['plugins/searchreplace.js'][83] = 0;
  _$jscoverage['plugins/searchreplace.js'][84] = 0;
  _$jscoverage['plugins/searchreplace.js'][85] = 0;
  _$jscoverage['plugins/searchreplace.js'][90] = 0;
  _$jscoverage['plugins/searchreplace.js'][91] = 0;
  _$jscoverage['plugins/searchreplace.js'][92] = 0;
  _$jscoverage['plugins/searchreplace.js'][93] = 0;
  _$jscoverage['plugins/searchreplace.js'][94] = 0;
  _$jscoverage['plugins/searchreplace.js'][95] = 0;
  _$jscoverage['plugins/searchreplace.js'][97] = 0;
  _$jscoverage['plugins/searchreplace.js'][98] = 0;
  _$jscoverage['plugins/searchreplace.js'][99] = 0;
  _$jscoverage['plugins/searchreplace.js'][102] = 0;
  _$jscoverage['plugins/searchreplace.js'][103] = 0;
  _$jscoverage['plugins/searchreplace.js'][104] = 0;
  _$jscoverage['plugins/searchreplace.js'][105] = 0;
  _$jscoverage['plugins/searchreplace.js'][108] = 0;
  _$jscoverage['plugins/searchreplace.js'][109] = 0;
  _$jscoverage['plugins/searchreplace.js'][112] = 0;
  _$jscoverage['plugins/searchreplace.js'][113] = 0;
  _$jscoverage['plugins/searchreplace.js'][114] = 0;
  _$jscoverage['plugins/searchreplace.js'][116] = 0;
  _$jscoverage['plugins/searchreplace.js'][119] = 0;
  _$jscoverage['plugins/searchreplace.js'][120] = 0;
  _$jscoverage['plugins/searchreplace.js'][126] = 0;
  _$jscoverage['plugins/searchreplace.js'][127] = 0;
  _$jscoverage['plugins/searchreplace.js'][128] = 0;
  _$jscoverage['plugins/searchreplace.js'][129] = 0;
  _$jscoverage['plugins/searchreplace.js'][131] = 0;
  _$jscoverage['plugins/searchreplace.js'][135] = 0;
  _$jscoverage['plugins/searchreplace.js'][136] = 0;
  _$jscoverage['plugins/searchreplace.js'][138] = 0;
  _$jscoverage['plugins/searchreplace.js'][139] = 0;
  _$jscoverage['plugins/searchreplace.js'][140] = 0;
  _$jscoverage['plugins/searchreplace.js'][142] = 0;
  _$jscoverage['plugins/searchreplace.js'][144] = 0;
  _$jscoverage['plugins/searchreplace.js'][146] = 0;
  _$jscoverage['plugins/searchreplace.js'][147] = 0;
  _$jscoverage['plugins/searchreplace.js'][148] = 0;
  _$jscoverage['plugins/searchreplace.js'][150] = 0;
  _$jscoverage['plugins/searchreplace.js'][151] = 0;
  _$jscoverage['plugins/searchreplace.js'][153] = 0;
  _$jscoverage['plugins/searchreplace.js'][154] = 0;
  _$jscoverage['plugins/searchreplace.js'][155] = 0;
  _$jscoverage['plugins/searchreplace.js'][157] = 0;
  _$jscoverage['plugins/searchreplace.js'][158] = 0;
  _$jscoverage['plugins/searchreplace.js'][159] = 0;
  _$jscoverage['plugins/searchreplace.js'][160] = 0;
  _$jscoverage['plugins/searchreplace.js'][162] = 0;
  _$jscoverage['plugins/searchreplace.js'][163] = 0;
  _$jscoverage['plugins/searchreplace.js'][164] = 0;
  _$jscoverage['plugins/searchreplace.js'][166] = 0;
  _$jscoverage['plugins/searchreplace.js'][167] = 0;
  _$jscoverage['plugins/searchreplace.js'][168] = 0;
  _$jscoverage['plugins/searchreplace.js'][169] = 0;
  _$jscoverage['plugins/searchreplace.js'][170] = 0;
  _$jscoverage['plugins/searchreplace.js'][171] = 0;
  _$jscoverage['plugins/searchreplace.js'][174] = 0;
  _$jscoverage['plugins/searchreplace.js'][176] = 0;
  _$jscoverage['plugins/searchreplace.js'][177] = 0;
  _$jscoverage['plugins/searchreplace.js'][178] = 0;
  _$jscoverage['plugins/searchreplace.js'][183] = 0;
}
_$jscoverage['plugins/searchreplace.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///commands &#26597;&#25214;&#26367;&#25442;</span>","<span class=\"c\">///commandsName  SearchReplace</span>","<span class=\"c\">///commandsTitle  &#26597;&#35810;&#26367;&#25442;</span>","<span class=\"c\">///commandsDialog  dialogs\\searchreplace</span>","<span class=\"c\">/*</span>","<span class=\"c\"> * @description &#26597;&#25214;&#26367;&#25442;</span>","<span class=\"c\"> * @author zhanyi</span>","<span class=\"c\"> */</span>","UE<span class=\"k\">.</span>plugins<span class=\"k\">[</span><span class=\"s\">'searchreplace'</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> currentRange<span class=\"k\">,</span>","        first<span class=\"k\">,</span>","        me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'reset'</span><span class=\"k\">,</span><span class=\"k\">function</span><span class=\"k\">()</span><span class=\"k\">{</span>","        currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","        first <span class=\"k\">=</span> <span class=\"k\">null</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\">'searchreplace'</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>cmdName<span class=\"k\">,</span>opt<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>","                sel <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">,</span>","                range<span class=\"k\">,</span>","                nativeRange<span class=\"k\">,</span>","                num <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span>","                opt <span class=\"k\">=</span> utils<span class=\"k\">.</span>extend<span class=\"k\">(</span>opt<span class=\"k\">,</span><span class=\"k\">{</span>","                    all <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">,</span>","                    casesensitive <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">,</span>","                    dir <span class=\"k\">:</span> <span class=\"s\">1</span>","                <span class=\"k\">}</span><span class=\"k\">,</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> searchStr <span class=\"k\">=</span> opt<span class=\"k\">.</span>searchStr<span class=\"k\">;</span>","            <span class=\"k\">if</span><span class=\"k\">(</span>browser<span class=\"k\">.</span>ie<span class=\"k\">)</span><span class=\"k\">{</span>","                me<span class=\"k\">.</span>focus<span class=\"k\">();</span>","                <span class=\"k\">while</span><span class=\"k\">(</span><span class=\"s\">1</span><span class=\"k\">)</span><span class=\"k\">{</span>","                    <span class=\"k\">var</span> tmpRange<span class=\"k\">;</span>","","                    nativeRange <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>selection<span class=\"k\">.</span>createRange<span class=\"k\">();</span>","                    tmpRange <span class=\"k\">=</span> nativeRange<span class=\"k\">.</span>duplicate<span class=\"k\">();</span>","                    tmpRange<span class=\"k\">.</span>moveToElementText<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">);</span>","                    <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>all<span class=\"k\">)</span><span class=\"k\">{</span>","                        first <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span>","                        opt<span class=\"k\">.</span>dir <span class=\"k\">=</span> <span class=\"s\">1</span><span class=\"k\">;</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>currentRange<span class=\"k\">)</span><span class=\"k\">{</span>","                            tmpRange<span class=\"k\">.</span>setEndPoint<span class=\"k\">(</span>opt<span class=\"k\">.</span>dir <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">'EndToStart'</span> <span class=\"k\">:</span> <span class=\"s\">'StartToEnd'</span><span class=\"k\">,</span>currentRange<span class=\"k\">);</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            tmpRange<span class=\"k\">.</span>moveToElementText<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">);</span>","                        <span class=\"k\">}</span>","","                    <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                        tmpRange<span class=\"k\">.</span>setEndPoint<span class=\"k\">(</span>opt<span class=\"k\">.</span>dir <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">'EndToStart'</span> <span class=\"k\">:</span> <span class=\"s\">'StartToEnd'</span><span class=\"k\">,</span>nativeRange<span class=\"k\">);</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>hasOwnProperty<span class=\"k\">(</span><span class=\"s\">\"replaceStr\"</span><span class=\"k\">))</span><span class=\"k\">{</span>","                            tmpRange<span class=\"k\">.</span>setEndPoint<span class=\"k\">(</span>opt<span class=\"k\">.</span>dir <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">'StartToEnd'</span> <span class=\"k\">:</span> <span class=\"s\">'EndToStart'</span><span class=\"k\">,</span>nativeRange<span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                    nativeRange <span class=\"k\">=</span> tmpRange<span class=\"k\">.</span>duplicate<span class=\"k\">();</span>","","                    <span class=\"k\">if</span><span class=\"k\">(</span><span class=\"s\">/^\\/[^/]+\\/\\w*$/</span><span class=\"k\">.</span>test<span class=\"k\">(</span>opt<span class=\"k\">.</span>searchStr<span class=\"k\">))</span><span class=\"k\">{</span>","                        <span class=\"k\">var</span> str <span class=\"k\">=</span> tmpRange<span class=\"k\">.</span>text<span class=\"k\">,</span>","                            reg <span class=\"k\">=</span> <span class=\"k\">new</span> RegExp<span class=\"k\">(</span>opt<span class=\"k\">.</span>searchStr<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">/^\\/|\\/\\w*$/g</span><span class=\"k\">,</span><span class=\"s\">''</span><span class=\"k\">),</span><span class=\"s\">'g'</span> <span class=\"k\">+</span> <span class=\"k\">(</span>opt<span class=\"k\">.</span>casesensitive <span class=\"k\">?</span> <span class=\"s\">''</span><span class=\"k\">:</span><span class=\"s\">'i'</span><span class=\"k\">));</span>","                        <span class=\"k\">var</span> match <span class=\"k\">=</span> str<span class=\"k\">.</span>match<span class=\"k\">(</span>reg<span class=\"k\">);</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>match <span class=\"k\">&amp;&amp;</span> match<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">{</span>","                            searchStr <span class=\"k\">=</span> opt<span class=\"k\">.</span>dir <span class=\"k\">&lt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> match<span class=\"k\">[</span>match<span class=\"k\">.</span>length <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">]</span> <span class=\"k\">:</span> match<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">];</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                            <span class=\"k\">return</span> num<span class=\"k\">;</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>tmpRange<span class=\"k\">.</span>findText<span class=\"k\">(</span>searchStr<span class=\"k\">,</span>opt<span class=\"k\">.</span>dir<span class=\"k\">,</span>opt<span class=\"k\">.</span>casesensitive <span class=\"k\">?</span> <span class=\"s\">4</span> <span class=\"k\">:</span> <span class=\"s\">0</span><span class=\"k\">))</span><span class=\"k\">{</span>","                        currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                        tmpRange <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>selection<span class=\"k\">.</span>createRange<span class=\"k\">();</span>","                        tmpRange<span class=\"k\">.</span>scrollIntoView<span class=\"k\">();</span>","                        currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                        <span class=\"k\">return</span> num<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    tmpRange<span class=\"k\">.</span>select<span class=\"k\">();</span>","                    <span class=\"c\">//&#26367;&#25442;</span>","                    <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>hasOwnProperty<span class=\"k\">(</span><span class=\"s\">\"replaceStr\"</span><span class=\"k\">))</span><span class=\"k\">{</span>","                        range <span class=\"k\">=</span> sel<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","                        range<span class=\"k\">.</span>deleteContents<span class=\"k\">().</span>insertNode<span class=\"k\">(</span>range<span class=\"k\">.</span>document<span class=\"k\">.</span>createTextNode<span class=\"k\">(</span>opt<span class=\"k\">.</span>replaceStr<span class=\"k\">)).</span>select<span class=\"k\">();</span>","                        currentRange <span class=\"k\">=</span> sel<span class=\"k\">.</span>getNative<span class=\"k\">().</span>createRange<span class=\"k\">();</span>","","                    <span class=\"k\">}</span>","                    num<span class=\"k\">++;</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>opt<span class=\"k\">.</span>all<span class=\"k\">)</span><span class=\"k\">{</span>","                        <span class=\"k\">break</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\">var</span> w <span class=\"k\">=</span> me<span class=\"k\">.</span>window<span class=\"k\">,</span>nativeSel <span class=\"k\">=</span> sel<span class=\"k\">.</span>getNative<span class=\"k\">();</span>","                <span class=\"k\">while</span><span class=\"k\">(</span><span class=\"s\">1</span><span class=\"k\">)</span><span class=\"k\">{</span>","                    <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>all<span class=\"k\">)</span><span class=\"k\">{</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>currentRange<span class=\"k\">)</span><span class=\"k\">{</span>","                            currentRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                            nativeRange <span class=\"k\">=</span> currentRange<span class=\"k\">;</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            nativeRange  <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createRange<span class=\"k\">();</span>","                            nativeRange<span class=\"k\">.</span>setStart<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">,</span><span class=\"s\">0</span><span class=\"k\">);</span>","                            nativeRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","","                        nativeSel<span class=\"k\">.</span>removeAllRanges<span class=\"k\">();</span>","                        nativeSel<span class=\"k\">.</span>addRange<span class=\"k\">(</span> nativeRange <span class=\"k\">);</span>","                        first <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span>","                        opt<span class=\"k\">.</span>dir <span class=\"k\">=</span> <span class=\"s\">1</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                        <span class=\"c\">//safari&#24377;&#20986;&#23618;&#65292;&#21407;&#29983;&#24050;&#32463;&#25214;&#19981;&#21040;range&#20102;&#65292;&#25152;&#20197;&#38656;&#35201;&#20808;&#36873;&#22238;&#26469;&#65292;&#20877;&#21462;&#21407;&#29983;</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>browser<span class=\"k\">.</span>safari<span class=\"k\">)</span><span class=\"k\">{</span>","                            me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>select<span class=\"k\">();</span>","","                        <span class=\"k\">}</span>","                        <span class=\"k\">var</span> nativeSel <span class=\"k\">=</span> w<span class=\"k\">.</span>getSelection<span class=\"k\">();</span>","                        <span class=\"k\">if</span><span class=\"k\">(!</span>nativeSel<span class=\"k\">.</span>rangeCount<span class=\"k\">)</span><span class=\"k\">{</span>","                            nativeRange <span class=\"k\">=</span> currentRange <span class=\"k\">||</span> me<span class=\"k\">.</span>_bakNativeRange<span class=\"k\">;</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            nativeRange <span class=\"k\">=</span> nativeSel<span class=\"k\">.</span>getRangeAt<span class=\"k\">(</span><span class=\"s\">0</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","","                        <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>hasOwnProperty<span class=\"k\">(</span><span class=\"s\">\"replaceStr\"</span><span class=\"k\">))</span><span class=\"k\">{</span>","                            nativeRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span>opt<span class=\"k\">.</span>dir <span class=\"k\">==</span> <span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"k\">true</span> <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","","                    <span class=\"c\">//&#22914;&#26524;&#26159;&#31532;&#19968;&#27425;&#24182;&#19988;&#28023;&#36873;&#20013;&#20102;&#20869;&#23481;&#37027;&#23601;&#35201;&#28165;&#38500;&#65292;&#20026;find&#20570;&#20934;&#22791;</span>","","                    <span class=\"k\">if</span><span class=\"k\">(!</span>first<span class=\"k\">)</span><span class=\"k\">{</span>","                        nativeRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span> opt<span class=\"k\">.</span>dir <span class=\"k\">&lt;</span><span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"k\">true</span> <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">);</span>","                        nativeSel<span class=\"k\">.</span>removeAllRanges<span class=\"k\">();</span>","                        nativeSel<span class=\"k\">.</span>addRange<span class=\"k\">(</span> nativeRange <span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                        nativeSel<span class=\"k\">.</span>removeAllRanges<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","                    <span class=\"c\">//&#26159;&#27491;&#21017;&#26597;&#25214;</span>","","                    <span class=\"k\">if</span><span class=\"k\">(</span><span class=\"s\">/^\\/[^/]+\\/\\w*$/</span><span class=\"k\">.</span>test<span class=\"k\">(</span>opt<span class=\"k\">.</span>searchStr<span class=\"k\">))</span><span class=\"k\">{</span>","                        <span class=\"k\">var</span> tmpRange <span class=\"k\">=</span> nativeRange<span class=\"k\">.</span>cloneRange<span class=\"k\">();</span>","                        <span class=\"c\">//&#21521;&#21069;&#26597;&#25214;</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>dir <span class=\"k\">&lt;</span> <span class=\"s\">0</span> <span class=\"k\">)</span><span class=\"k\">{</span>","                            nativeRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                            nativeRange<span class=\"k\">.</span>setStart<span class=\"k\">(</span>me<span class=\"k\">.</span>body<span class=\"k\">,</span><span class=\"s\">0</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            nativeRange<span class=\"k\">.</span>setEnd<span class=\"k\">(</span>me<span class=\"k\">.</span>body<span class=\"k\">,</span>me<span class=\"k\">.</span>body<span class=\"k\">.</span>childNodes<span class=\"k\">.</span>length<span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                        <span class=\"k\">var</span> str <span class=\"k\">=</span> nativeRange <span class=\"k\">+</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                            reg <span class=\"k\">=</span> <span class=\"k\">new</span> RegExp<span class=\"k\">(</span>opt<span class=\"k\">.</span>searchStr<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">/^\\/|\\/\\w*$/g</span><span class=\"k\">,</span><span class=\"s\">''</span><span class=\"k\">),</span><span class=\"s\">'g'</span> <span class=\"k\">+</span> <span class=\"k\">(</span>opt<span class=\"k\">.</span>casesensitive <span class=\"k\">?</span> <span class=\"s\">''</span><span class=\"k\">:</span><span class=\"s\">'i'</span><span class=\"k\">));</span>","                        <span class=\"k\">var</span> match <span class=\"k\">=</span> str<span class=\"k\">.</span>match<span class=\"k\">(</span>reg<span class=\"k\">);</span>","                        <span class=\"k\">if</span><span class=\"k\">(</span>match <span class=\"k\">&amp;&amp;</span> match<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">{</span>","                            searchStr <span class=\"k\">=</span> opt<span class=\"k\">.</span>dir <span class=\"k\">&lt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> match<span class=\"k\">[</span>match<span class=\"k\">.</span>length <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">]</span> <span class=\"k\">:</span> match<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">];</span>","                        <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                            currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                            <span class=\"k\">return</span> num<span class=\"k\">;</span>","                        <span class=\"k\">}</span>","                        nativeSel<span class=\"k\">.</span>removeAllRanges<span class=\"k\">();</span>","                        nativeRange <span class=\"k\">=</span> tmpRange<span class=\"k\">;</span>","                        nativeSel<span class=\"k\">.</span>addRange<span class=\"k\">(</span>nativeRange<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>w<span class=\"k\">.</span>find<span class=\"k\">(</span>searchStr<span class=\"k\">,</span>opt<span class=\"k\">.</span>casesensitive<span class=\"k\">,</span>opt<span class=\"k\">.</span>dir <span class=\"k\">&lt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"k\">true</span> <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">)</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                        currentRange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                        nativeSel<span class=\"k\">.</span>removeAllRanges<span class=\"k\">();</span>","                        <span class=\"k\">return</span> num<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    first <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span>","                    range <span class=\"k\">=</span> w<span class=\"k\">.</span>getSelection<span class=\"k\">().</span>getRangeAt<span class=\"k\">(</span><span class=\"s\">0</span><span class=\"k\">);</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>range<span class=\"k\">.</span>collapsed<span class=\"k\">)</span><span class=\"k\">{</span>","","                        <span class=\"k\">if</span><span class=\"k\">(</span>opt<span class=\"k\">.</span>hasOwnProperty<span class=\"k\">(</span><span class=\"s\">\"replaceStr\"</span><span class=\"k\">))</span><span class=\"k\">{</span>","                            range<span class=\"k\">.</span>deleteContents<span class=\"k\">();</span>","                            <span class=\"k\">var</span> text <span class=\"k\">=</span> w<span class=\"k\">.</span>document<span class=\"k\">.</span>createTextNode<span class=\"k\">(</span>opt<span class=\"k\">.</span>replaceStr<span class=\"k\">);</span>","                            range<span class=\"k\">.</span>insertNode<span class=\"k\">(</span>text<span class=\"k\">);</span>","                            range<span class=\"k\">.</span>selectNode<span class=\"k\">(</span>text<span class=\"k\">);</span>","                            nativeSel<span class=\"k\">.</span>addRange<span class=\"k\">(</span>range<span class=\"k\">);</span>","","                        <span class=\"k\">}</span>","                        currentRange <span class=\"k\">=</span> range<span class=\"k\">.</span>cloneRange<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","                    num<span class=\"k\">++;</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>opt<span class=\"k\">.</span>all<span class=\"k\">)</span><span class=\"k\">{</span>","                        <span class=\"k\">break</span><span class=\"k\">;</span>","                    <span class=\"k\">}</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>","","<span class=\"k\">}</span><span class=\"k\">;</span>"];
_$jscoverage['plugins/searchreplace.js'][10]++;
UE.plugins.searchreplace = (function () {
  _$jscoverage['plugins/searchreplace.js'][12]++;
  var currentRange, first, me = this;
  _$jscoverage['plugins/searchreplace.js'][15]++;
  me.addListener("reset", (function () {
  _$jscoverage['plugins/searchreplace.js'][16]++;
  currentRange = null;
  _$jscoverage['plugins/searchreplace.js'][17]++;
  first = null;
}));
  _$jscoverage['plugins/searchreplace.js'][19]++;
  me.commands.searchreplace = {execCommand: (function (cmdName, opt) {
  _$jscoverage['plugins/searchreplace.js'][21]++;
  var me = this, sel = me.selection, range, nativeRange, num = 0, opt = utils.extend(opt, {all: false, casesensitive: false, dir: 1}, true);
  _$jscoverage['plugins/searchreplace.js'][31]++;
  var searchStr = opt.searchStr;
  _$jscoverage['plugins/searchreplace.js'][32]++;
  if (browser.ie) {
    _$jscoverage['plugins/searchreplace.js'][33]++;
    me.focus();
    _$jscoverage['plugins/searchreplace.js'][34]++;
    while (true) {
      _$jscoverage['plugins/searchreplace.js'][35]++;
      var tmpRange;
      _$jscoverage['plugins/searchreplace.js'][37]++;
      nativeRange = me.document.selection.createRange();
      _$jscoverage['plugins/searchreplace.js'][38]++;
      tmpRange = nativeRange.duplicate();
      _$jscoverage['plugins/searchreplace.js'][39]++;
      tmpRange.moveToElementText(me.document.body);
      _$jscoverage['plugins/searchreplace.js'][40]++;
      if (opt.all) {
        _$jscoverage['plugins/searchreplace.js'][41]++;
        first = 0;
        _$jscoverage['plugins/searchreplace.js'][42]++;
        opt.dir = 1;
        _$jscoverage['plugins/searchreplace.js'][43]++;
        if (currentRange) {
          _$jscoverage['plugins/searchreplace.js'][44]++;
          tmpRange.setEndPoint(((opt.dir == -1)? "EndToStart": "StartToEnd"), currentRange);
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][46]++;
          tmpRange.moveToElementText(me.document.body);
        }
      }
      else {
        _$jscoverage['plugins/searchreplace.js'][50]++;
        tmpRange.setEndPoint(((opt.dir == -1)? "EndToStart": "StartToEnd"), nativeRange);
        _$jscoverage['plugins/searchreplace.js'][51]++;
        if (opt.hasOwnProperty("replaceStr")) {
          _$jscoverage['plugins/searchreplace.js'][52]++;
          tmpRange.setEndPoint(((opt.dir == -1)? "StartToEnd": "EndToStart"), nativeRange);
        }
      }
      _$jscoverage['plugins/searchreplace.js'][55]++;
      nativeRange = tmpRange.duplicate();
      _$jscoverage['plugins/searchreplace.js'][57]++;
      if (/^\/[^/]+\/\w*$/.test(opt.searchStr)) {
        _$jscoverage['plugins/searchreplace.js'][58]++;
        var str = tmpRange.text, reg = new RegExp(opt.searchStr.replace(/^\/|\/\w*$/g, ""), ("g" + (opt.casesensitive? "": "i")));
        _$jscoverage['plugins/searchreplace.js'][60]++;
        var match = str.match(reg);
        _$jscoverage['plugins/searchreplace.js'][61]++;
        if ((match && match.length)) {
          _$jscoverage['plugins/searchreplace.js'][62]++;
          searchStr = ((opt.dir < 0)? match[(match.length - 1)]: match[0]);
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][64]++;
          currentRange = null;
          _$jscoverage['plugins/searchreplace.js'][65]++;
          return num;
        }
      }
      _$jscoverage['plugins/searchreplace.js'][68]++;
      if ((! tmpRange.findText(searchStr, opt.dir, (opt.casesensitive? 4: 0)))) {
        _$jscoverage['plugins/searchreplace.js'][69]++;
        currentRange = null;
        _$jscoverage['plugins/searchreplace.js'][70]++;
        tmpRange = me.document.selection.createRange();
        _$jscoverage['plugins/searchreplace.js'][71]++;
        tmpRange.scrollIntoView();
        _$jscoverage['plugins/searchreplace.js'][72]++;
        currentRange = null;
        _$jscoverage['plugins/searchreplace.js'][73]++;
        return num;
      }
      _$jscoverage['plugins/searchreplace.js'][75]++;
      tmpRange.select();
      _$jscoverage['plugins/searchreplace.js'][77]++;
      if (opt.hasOwnProperty("replaceStr")) {
        _$jscoverage['plugins/searchreplace.js'][78]++;
        range = sel.getRange();
        _$jscoverage['plugins/searchreplace.js'][79]++;
        range.deleteContents().insertNode(range.document.createTextNode(opt.replaceStr)).select();
        _$jscoverage['plugins/searchreplace.js'][80]++;
        currentRange = sel.getNative().createRange();
      }
      _$jscoverage['plugins/searchreplace.js'][83]++;
      (num++);
      _$jscoverage['plugins/searchreplace.js'][84]++;
      if ((! opt.all)) {
        _$jscoverage['plugins/searchreplace.js'][85]++;
        break;
      }
}
  }
  else {
    _$jscoverage['plugins/searchreplace.js'][90]++;
    var w = me.window, nativeSel = sel.getNative();
    _$jscoverage['plugins/searchreplace.js'][91]++;
    while (true) {
      _$jscoverage['plugins/searchreplace.js'][92]++;
      if (opt.all) {
        _$jscoverage['plugins/searchreplace.js'][93]++;
        if (currentRange) {
          _$jscoverage['plugins/searchreplace.js'][94]++;
          currentRange.collapse(false);
          _$jscoverage['plugins/searchreplace.js'][95]++;
          nativeRange = currentRange;
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][97]++;
          nativeRange = me.document.createRange();
          _$jscoverage['plugins/searchreplace.js'][98]++;
          nativeRange.setStart(me.document.body, 0);
          _$jscoverage['plugins/searchreplace.js'][99]++;
          nativeRange.collapse(true);
        }
        _$jscoverage['plugins/searchreplace.js'][102]++;
        nativeSel.removeAllRanges();
        _$jscoverage['plugins/searchreplace.js'][103]++;
        nativeSel.addRange(nativeRange);
        _$jscoverage['plugins/searchreplace.js'][104]++;
        first = 0;
        _$jscoverage['plugins/searchreplace.js'][105]++;
        opt.dir = 1;
      }
      else {
        _$jscoverage['plugins/searchreplace.js'][108]++;
        if (browser.safari) {
          _$jscoverage['plugins/searchreplace.js'][109]++;
          me.selection.getRange().select();
        }
        _$jscoverage['plugins/searchreplace.js'][112]++;
        var nativeSel = w.getSelection();
        _$jscoverage['plugins/searchreplace.js'][113]++;
        if ((! nativeSel.rangeCount)) {
          _$jscoverage['plugins/searchreplace.js'][114]++;
          nativeRange = (currentRange || me._bakNativeRange);
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][116]++;
          nativeRange = nativeSel.getRangeAt(0);
        }
        _$jscoverage['plugins/searchreplace.js'][119]++;
        if (opt.hasOwnProperty("replaceStr")) {
          _$jscoverage['plugins/searchreplace.js'][120]++;
          nativeRange.collapse(((opt.dir == 1)? true: false));
        }
      }
      _$jscoverage['plugins/searchreplace.js'][126]++;
      if ((! first)) {
        _$jscoverage['plugins/searchreplace.js'][127]++;
        nativeRange.collapse(((opt.dir < 0)? true: false));
        _$jscoverage['plugins/searchreplace.js'][128]++;
        nativeSel.removeAllRanges();
        _$jscoverage['plugins/searchreplace.js'][129]++;
        nativeSel.addRange(nativeRange);
      }
      else {
        _$jscoverage['plugins/searchreplace.js'][131]++;
        nativeSel.removeAllRanges();
      }
      _$jscoverage['plugins/searchreplace.js'][135]++;
      if (/^\/[^/]+\/\w*$/.test(opt.searchStr)) {
        _$jscoverage['plugins/searchreplace.js'][136]++;
        var tmpRange = nativeRange.cloneRange();
        _$jscoverage['plugins/searchreplace.js'][138]++;
        if ((opt.dir < 0)) {
          _$jscoverage['plugins/searchreplace.js'][139]++;
          nativeRange.collapse(true);
          _$jscoverage['plugins/searchreplace.js'][140]++;
          nativeRange.setStart(me.body, 0);
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][142]++;
          nativeRange.setEnd(me.body, me.body.childNodes.length);
        }
        _$jscoverage['plugins/searchreplace.js'][144]++;
        var str = (nativeRange + ""), reg = new RegExp(opt.searchStr.replace(/^\/|\/\w*$/g, ""), ("g" + (opt.casesensitive? "": "i")));
        _$jscoverage['plugins/searchreplace.js'][146]++;
        var match = str.match(reg);
        _$jscoverage['plugins/searchreplace.js'][147]++;
        if ((match && match.length)) {
          _$jscoverage['plugins/searchreplace.js'][148]++;
          searchStr = ((opt.dir < 0)? match[(match.length - 1)]: match[0]);
        }
        else {
          _$jscoverage['plugins/searchreplace.js'][150]++;
          currentRange = null;
          _$jscoverage['plugins/searchreplace.js'][151]++;
          return num;
        }
        _$jscoverage['plugins/searchreplace.js'][153]++;
        nativeSel.removeAllRanges();
        _$jscoverage['plugins/searchreplace.js'][154]++;
        nativeRange = tmpRange;
        _$jscoverage['plugins/searchreplace.js'][155]++;
        nativeSel.addRange(nativeRange);
      }
      _$jscoverage['plugins/searchreplace.js'][157]++;
      if ((! w.find(searchStr, opt.casesensitive, ((opt.dir < 0)? true: false)))) {
        _$jscoverage['plugins/searchreplace.js'][158]++;
        currentRange = null;
        _$jscoverage['plugins/searchreplace.js'][159]++;
        nativeSel.removeAllRanges();
        _$jscoverage['plugins/searchreplace.js'][160]++;
        return num;
      }
      _$jscoverage['plugins/searchreplace.js'][162]++;
      first = 0;
      _$jscoverage['plugins/searchreplace.js'][163]++;
      range = w.getSelection().getRangeAt(0);
      _$jscoverage['plugins/searchreplace.js'][164]++;
      if ((! range.collapsed)) {
        _$jscoverage['plugins/searchreplace.js'][166]++;
        if (opt.hasOwnProperty("replaceStr")) {
          _$jscoverage['plugins/searchreplace.js'][167]++;
          range.deleteContents();
          _$jscoverage['plugins/searchreplace.js'][168]++;
          var text = w.document.createTextNode(opt.replaceStr);
          _$jscoverage['plugins/searchreplace.js'][169]++;
          range.insertNode(text);
          _$jscoverage['plugins/searchreplace.js'][170]++;
          range.selectNode(text);
          _$jscoverage['plugins/searchreplace.js'][171]++;
          nativeSel.addRange(range);
        }
        _$jscoverage['plugins/searchreplace.js'][174]++;
        currentRange = range.cloneRange();
      }
      _$jscoverage['plugins/searchreplace.js'][176]++;
      (num++);
      _$jscoverage['plugins/searchreplace.js'][177]++;
      if ((! opt.all)) {
        _$jscoverage['plugins/searchreplace.js'][178]++;
        break;
      }
}
  }
  _$jscoverage['plugins/searchreplace.js'][183]++;
  return true;
})};
});
