1import{w as ne,j as se,b as oe,E as z}from"./element-BXz0WBGW.js";import{_ as le}from"./index-BWEVWcZV.js";import{H as p,L as _,P as l,M as f,O as w,X as O,F as R,Z as b,R as P,I as X,ab as q,e as g,ag as S,c as W,n as A,u as D,Y as V}from"./vue-DgJjd7my.js";import"./axios-42ANG6Sg.js";const ie=["èµå","å彩","å
å彩","æ¶æ¶å½©","è²æ
","裸è","æ´äº¤","æ¯å","å°æ¯","æµ·æ´å ","æªæ¯","å¼¹è¯","çç¸ç©","è¯éª","ä¼ é","æ´é±","é»å®¢","æ¨é©¬","ç
æ¯è½¯ä»¶","åè¯","åè¯","代å¼å票","èµ°ç§","è¿ç¦å","ç¿»å¢","VPNç ´è§£","ç§æ","åå¨","éªæ","ææç»ç»","æç«¯ä¸»ä¹","æ³è½®å","èªæ","èªæ®","人ä½å¨å®","代å","å èè¯","è¿·è¯","æ¥è¯","ç½èµ","æ£çèµå","èèæº","ç¾å®¶ä¹","èµç","èµé©¬","é»è²ç½ç«","æäººè§é¢","å·æ","èµ°å
","ä¸å¤æ
","é«å©è´·","å¥è·¯è´·","æ´å嬿¶","éæ³éèµ","åºæ°éªå±"],ae=["æå¼º","æå¥½","第ä¸","é¦é","å¯ä¸","ç»å¯¹","100%","å½å®¶çº§","顶级","æè´","å®ç¾","å²ä¸","å
¨ç½æä½","ç¬å®¶","é¦å","çç","é¢è¢åç","ä¸çé¢å
","å¡«è¡¥å½å
空ç½","空åç»å","æ°¸ä¹
","ä¸è½","ç¹æ","è¿
éè§æ","å
æ²»ç¾ç
","æ æéæ¬¾","ç¹å»é¢å¥","æåè·å¥","å
¨æ°å
å","ç§æå
¨ç½","éè¿å°±æ²¡æºä¼","å
¨å½é¦å","å
¨ç½é¦å","ééå å","è¡ä¸ç¬¬ä¸","NO.1","第ä¸åç","岿 åä¾","åæ å¤äºº","ç»æ ä»
æ","æé«çº§","æä½³","æå
·","æä¾¿å®"],re=2e4;function ue(h,o=ie,v=ae){const i=String(h||"").slice(0,re);if(!i.trim())return{hits:[],sensitiveCount:0,forbiddenCount:0,sensitiveWords:[],forbiddenWords:[]};const t=[],c=(e,r)=>{let C=0;for(;C<i.length;){const m=i.indexOf(e,C);if(m===-1)break;t.push({word:e,index:m,length:e.length,type:r}),C=m+e.length}},$=[...o].sort((e,r)=>r.length-e.length),E=[...v].sort((e,r)=>r.length-e.length);$.forEach(e=>e&&c(e,"sensitive")),E.forEach(e=>e&&c(e,"forbidden")),t.sort((e,r)=>e.index-r.index||r.length-e.length);const y=[],d=[];t.forEach(e=>{const r=e.index+e.length;d.some(([m,B])=>!(r<=m||e.index>=B))||(y.push(e),d.push([e.index,r]))});const I=[...new Set(y.filter(e=>e.type==="sensitive").map(e=>e.word))],H=[...new Set(y.filter(e=>e.type==="forbidden").map(e=>e.word))];return{hits:y,sensitiveCount:y.filter(e=>e.type==="sensitive").length,forbiddenCount:y.filter(e=>e.type==="forbidden").length,sensitiveWords:I,forbiddenWords:H}}function ce(h,o){if(!o.length)return[{text:h,type:"normal"}];const v=[];let i=0;return o.forEach((t,c)=>{t.index>i&&v.push({text:h.slice(i,t.index),type:"normal"}),v.push({text:h.slice(t.index,t.index+t.length),type:t.type,word:t.word,hitIndex:c}),i=t.index+t.length}),i<h.length&&v.push({text:h.slice(i),type:"normal"}),v}function K(h,o,v){const i=new Set(o.filter(c=>c.type===v).map(c=>c.word));let t=String(h||"");return i.forEach(c=>{t=t.split(c).join("")}),t}const de={class:"tool-panel"},ve={class:"lookup-operation tool-split-panel"},pe={class:"tool-split"},fe={class:"tool-split__left"},he={class:"input-tip"},_e={class:"tool-split__right"},ge={class:"preview-head"},ye={key:0,class:"preview-head__actions"},me={class:"result-toolbar"},be={class:"result-toolbar__stats"},we={class:"stat-sensitive"},xe={class:"stat-forbidden"},ke={key:0,class:"result-toolbar__nav"},Ce={class:"nav-pos"},Se=["id"],We={key:1,class:"safe-tip"},$e={key:1,class:"preview-placeholder"},Ee={__name:"SensitiveWordChecker",setup(h){const o=g(""),v=g(!1),i=g(!1),t=g([]),c=g(0),$=g(0),E=g([]),y=g([]),d=g(-1),I=g(null),H=W(()=>i.value?ce(o.value,t.value):[]),e=W(()=>d.value>=0?d.value+1:0),r=W(()=>t.value[d.value]||null),C=W(()=>{const n=r.value;return n?`${n.type}:${n.word}`:""}),m=W(()=>{const n=[],s=new Set;return t.value.forEach((u,x)=>{const k=`${u.type}:${u.word}`;s.has(k)||(s.add(k),n.push({word:u.word,type:u.type,firstIndex:x,count:t.value.filter(T=>T.type===u.type&&T.word===u.word).length}))}),n});function B(n){const s=m.value.find(u=>`${u.type}:${u.word}`===n);s&&N(s.firstIndex)}function N(n){n<0||n>=t.value.length||(d.value=n,A(()=>{const s=I.value,u=s==null?void 0:s.querySelector(`#hit-${n}`);if(!s||!u)return;const x=u.offsetTop-s.clientHeight/2+u.offsetHeight/2;s.scrollTo({top:Math.max(0,x),behavior:"smooth"})}))}function U(){if(!t.value.length)return;const n=d.value<0?0:(d.value+1)%t.value.length;N(n)}function Y(){if(!t.value.length)return;const n=d.value<0?t.value.length-1:(d.value-1+t.value.length)%t.value.length;N(n)}
1function F(){const n=ue(o.value);t.value=n.hits,c.value=n.sensitiveCount,$.value=n.forbiddenCount,E.value=n.sensitiveWords,y.value=n.forbiddenWords,i.value=!0,d.value=-1,n.hits.length&&A(()=>N(0))}function Z(){if(!o.value.trim()){z.warning("请è¾å
¥å¾
æ£æµå
容");return}v.value=!0,F(),v.value=!1}function G(){o.value=K(o.value,t.value,"sensitive"),L()}function J(){o.value=K(o.value,t.value,"forbidden"),L()}function L(){F()}async function Q(){try{await navigator.clipboard.writeText(o.value),z.success("å·²å¤å¶å
容")}catch{z.error("å¤å¶å¤±è´¥")}}return(n,s)=>{var M,j;const u=S("el-input"),x=S("el-icon"),k=S("el-button"),T=S("el-option"),ee=S("el-select");return p(),_("div",de,[l("div",ve,[l("div",pe,[l("div",fe,[f(u,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=a=>o.value=a),type:"textarea",rows:12,placeholder:"请è¾å
¥æç²è´´å¾
æ£æµææ¬å
容",resize:"none",maxlength:"20000","show-word-limit":"",class:"content-input"},null,8,["modelValue"]),l("div",he,[f(x,{class:"input-tip-icon"},{default:w(()=>[f(D(ne))]),_:1}),s[1]||(s[1]=l("span",{class:"input-tip-text"}," ææè¯ï¼çº¢è²ï¼ï¼æ¶æ¿è²æ
ç䏿æè¯æ±ï¼è¿ç¦è¯ï¼æ©è²ï¼ï¼å¤¸å¼ èåå®£ä¼ ç¨è¯ ",-1))]),f(k,{type:"primary",class:"lookup-button",loading:v.value,onClick:Z},{default:w(()=>[...s[2]||(s[2]=[V(" å¼å§æ£æµ ",-1)])]),_:1},8,["loading"])]),l("div",_e,[l("div",ge,[s[4]||(s[4]=l("span",{class:"preview-head__title"},"æ£æµç»æ",-1)),i.value?(p(),_("div",ye,[f(k,{size:"small",onClick:G},{default:w(()=>[V("ææè¯å é¤ ("+b(E.value.length)+")",1)]),_:1}),f(k,{size:"small",onClick:J},{default:w(()=>[V("è¿ç¦è¯å é¤ ("+b(y.value.length)+")",1)]),_:1}),f(k,{size:"small",type:"primary",onClick:Q},{default:w(()=>[...s[3]||(s[3]=[V("å
容å¤å¶",-1)])]),_:1})])):O("",!0)]),i.value?(p(),_(R,{key:0},[l("div",me,[l("div",be,[l("span",null,"å
± "+b(o.value.length)+" å",1),l("span",we,"ææè¯ "+b(c.value),1),l("span",xe,"è¿ç¦è¯ "+b($.value),1)]),t.value.length?(p(),_("div",ke,[l("button",{type:"button",class:"nav-icon-btn",title:"ä¸ä¸å¤",onClick:Y},[f(x,null,{default:w(()=>[f(D(se))]),_:1})]),l("span",Ce,b(e.value)+"/"+b(t.value.length),1),l("span",{class:P(["nav-current",((M=r.value)==null?void 0:M.type)==="sensitive"?"is-sensitive":"is-forbidden"])},b((j=r.value)==null?void 0:j.word),3),l("button",{type:"button",class:"nav-icon-btn",title:"ä¸ä¸å¤",onClick:U},[f(x,null,{default:w(()=>[f(D(oe))]),_:1})]),m.value.length>1?(p(),X(ee,{key:0,"model-value":C.value,size:"small",class:"nav-select",placeholder:"è¯æ¡",onChange:B},{default:w(()=>[(p(!0),_(R,null,q(m.value,a=>(p(),X(T,{key:`${a.type}-${a.word}`,label:`${a.word}${a.count>1?` Ã${a.count}`:""}`,value:`${a.type}:${a.word}`},null,8,["label","value"]))),128))]),_:1},8,["model-value"])):O("",!0)])):O("",!0)]),H.value.length?(p(),_("div",{key:0,ref_key:"highlightBoxRef",ref:I,class:"highlight-box"},[(p(!0),_(R,null,q(H.value,(a,te)=>(p(),_("span",{key:te,id:a.hitIndex!==void 0?`hit-${a.hitIndex}`:void 0,class:P({"hl-sensitive":a.type==="sensitive","hl-forbidden":a.type==="forbidden","hl-active":a.hitIndex===d.value})},b(a.text),11,Se))),128))],512)):(p(),_("p",We,"æªæ£æµå°ææè¿ç¦è¯")),s[5]||(s[5]=l("p",{class:"legend-tip"},"ææè¯çº¢è²é«äº®ï¼è¿ç¦è¯æ©è²é«äº®ï¼æ£æµç»æä»
ä¾åè",-1))],64)):(p(),_("div",$e,"左侧è¾å
¥å
å®¹å¹¶æ£æµåï¼æ¤å¤æ¾ç¤ºé«äº®ç»æ"))])])])])}}},Ve=le(Ee,[["__scopeId","data-v-a3801b50"]]);export{Ve as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.