yxuse 2.0.23 → 2.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs2.js CHANGED
@@ -34,7 +34,7 @@ __p += '`),ye&&(P+=`' +
34
34
  function print() { __p += __j.call(arguments, '') }
35
35
  `:`;
36
36
  `)+P+`return __p
37
- }`;var pe=df(function(){return Se(d,te+"return "+P).apply(r,v)});if(pe.source=P,_u(pe))throw pe;return pe}function _m(e){return Te(e).toLowerCase()}function ym(e){return Te(e).toUpperCase()}function wm(e,t,n){if(e=Te(e),e&&(n||t===r))return ws(e);if(!e||!(t=Et(t)))return e;var o=Yt(e),s=Yt(t),d=bs(o,s),v=xs(o,s)+1;return Rn(o,d,v).join("")}function bm(e,t,n){if(e=Te(e),e&&(n||t===r))return e.slice(0,Es(e)+1);if(!e||!(t=Et(t)))return e;var o=Yt(e),s=xs(o,Yt(t))+1;return Rn(o,0,s).join("")}function xm(e,t,n){if(e=Te(e),e&&(n||t===r))return e.replace(Yr,"");if(!e||!(t=Et(t)))return e;var o=Yt(e),s=bs(o,Yt(t));return Rn(o,s).join("")}function Sm(e,t){var n=Ae,o=De;if(We(t)){var s="separator"in t?t.separator:s;n="length"in t?de(t.length):n,o="omission"in t?Et(t.omission):o}e=Te(e);var d=e.length;if(mr(e)){var v=Yt(e);d=v.length}if(n>=d)return e;var _=n-_r(o);if(_<1)return o;var E=v?Rn(v,0,_).join(""):e.slice(0,_);if(s===r)return E+o;if(v&&(_+=E.length-_),yu(s)){if(e.slice(_).search(s)){var O,L=E;for(s.global||(s=Pa(s.source,Te(Bi.exec(s))+"g")),s.lastIndex=0;O=s.exec(L);)var P=O.index;E=E.slice(0,P===r?_:P)}}else if(e.indexOf(Et(s),_)!=_){var J=E.lastIndexOf(s);J>-1&&(E=E.slice(0,J))}return E+o}function Em(e){return e=Te(e),e&&Ai.test(e)?e.replace(Ci,jc):e}var Tm=Tr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),xu=dl("toUpperCase");function cf(e,t,n){return e=Te(e),t=n?r:t,t===r?Kc(e)?nd(e):Wc(e):e.match(t)||[]}var df=ge(function(e,t){try{return xt(e,r,t)}catch(n){return _u(n)?n:new le(n)}}),Cm=cn(function(e,t){return Ot(t,function(n){n=jt(n),ln(e,n,vu(e[n],e))}),e});function Im(e){var t=e==null?0:e.length,n=re();return e=t?Fe(e,function(o){if(typeof o[1]!="function")throw new Lt(y);return[n(o[0]),o[1]]}):[],ge(function(o){for(var s=-1;++s<t;){var d=e[s];if(xt(d[0],this,o))return xt(d[1],this,o)}})}function Am(e){return jd(Ft(e,A))}function Su(e){return function(){return e}}function Nm(e,t){return e==null||e!==e?t:e}var Dm=pl(),Bm=pl(!0);function yt(e){return e}function Eu(e){return zs(typeof e=="function"?e:Ft(e,A))}function Rm(e){return Gs(Ft(e,A))}function Om(e,t){return Xs(e,Ft(t,A))}var Lm=ge(function(e,t){return function(n){return ei(n,e,t)}}),Pm=ge(function(e,t){return function(n){return ei(e,n,t)}});function Tu(e,t,n){var o=je(t),s=ro(t,o);n==null&&!(We(t)&&(s.length||!o.length))&&(n=t,t=e,e=this,s=ro(t,je(t)));var d=!(We(n)&&"chain"in n)||!!n.chain,v=hn(e);return Ot(s,function(_){var E=t[_];e[_]=E,v&&(e.prototype[_]=function(){var O=this.__chain__;if(d||O){var L=e(this.__wrapped__),P=L.__actions__=vt(this.__actions__);return P.push({func:E,args:arguments,thisArg:e}),L.__chain__=O,L}return E.apply(e,Cn([this.value()],arguments))})}),e}function Fm(){return rt._===this&&(rt._=sd),this}function Cu(){}function km(e){return e=de(e),ge(function(t){return Ks(t,e)})}var Mm=ru(Fe),Wm=ru(gs),Vm=ru(Aa);function hf(e){return fu(e)?Na(jt(e)):vh(e)}function Um(e){return function(t){return e==null?r:Zn(e,t)}}var $m=vl(),Ym=vl(!0);function Iu(){return[]}function Au(){return!1}function zm(){return{}}function Hm(){return""}function Gm(){return!0}function Xm(e,t){if(e=de(e),e<1||e>nt)return[];var n=Me,o=at(e,Me);t=re(t),e-=Me;for(var s=Ra(o,t);++n<e;)t(n);return s}function Km(e){return fe(e)?Fe(e,jt):Tt(e)?[e]:vt(Rl(Te(e)))}function qm(e){var t=++ad;return Te(e)+t}var Zm=lo(function(e,t){return e+t},0),Jm=iu("ceil"),Qm=lo(function(e,t){return e/t},1),jm=iu("floor");function e_(e){return e&&e.length?no(e,yt,Ya):r}function t_(e,t){return e&&e.length?no(e,re(t,2),Ya):r}function n_(e){return _s(e,yt)}function r_(e,t){return _s(e,re(t,2))}function i_(e){return e&&e.length?no(e,yt,Xa):r}function o_(e,t){return e&&e.length?no(e,re(t,2),Xa):r}var a_=lo(function(e,t){return e*t},1),u_=iu("round"),s_=lo(function(e,t){return e-t},0);function l_(e){return e&&e.length?Ba(e,yt):0}function f_(e,t){return e&&e.length?Ba(e,re(t,2)):0}return l.after=Rg,l.ary=Yl,l.assign=yv,l.assignIn=rf,l.assignInWith=So,l.assignWith=wv,l.at=bv,l.before=zl,l.bind=vu,l.bindAll=Cm,l.bindKey=Hl,l.castArray=zg,l.chain=Vl,l.chunk=jh,l.compact=ep,l.concat=tp,l.cond=Im,l.conforms=Am,l.constant=Su,l.countBy=lg,l.create=xv,l.curry=Gl,l.curryRight=Xl,l.debounce=Kl,l.defaults=Sv,l.defaultsDeep=Ev,l.defer=Og,l.delay=Lg,l.difference=np,l.differenceBy=rp,l.differenceWith=ip,l.drop=op,l.dropRight=ap,l.dropRightWhile=up,l.dropWhile=sp,l.fill=lp,l.filter=cg,l.flatMap=pg,l.flatMapDeep=gg,l.flatMapDepth=vg,l.flatten=Fl,l.flattenDeep=fp,l.flattenDepth=cp,l.flip=Pg,l.flow=Dm,l.flowRight=Bm,l.fromPairs=dp,l.functions=Bv,l.functionsIn=Rv,l.groupBy=mg,l.initial=pp,l.intersection=gp,l.intersectionBy=vp,l.intersectionWith=mp,l.invert=Lv,l.invertBy=Pv,l.invokeMap=yg,l.iteratee=Eu,l.keyBy=wg,l.keys=je,l.keysIn=_t,l.map=mo,l.mapKeys=kv,l.mapValues=Mv,l.matches=Rm,l.matchesProperty=Om,l.memoize=yo,l.merge=Wv,l.mergeWith=of,l.method=Lm,l.methodOf=Pm,l.mixin=Tu,l.negate=wo,l.nthArg=km,l.omit=Vv,l.omitBy=Uv,l.once=Fg,l.orderBy=bg,l.over=Mm,l.overArgs=kg,l.overEvery=Wm,l.overSome=Vm,l.partial=mu,l.partialRight=ql,l.partition=xg,l.pick=$v,l.pickBy=af,l.property=hf,l.propertyOf=Um,l.pull=bp,l.pullAll=Ml,l.pullAllBy=xp,l.pullAllWith=Sp,l.pullAt=Ep,l.range=$m,l.rangeRight=Ym,l.rearg=Mg,l.reject=Tg,l.remove=Tp,l.rest=Wg,l.reverse=pu,l.sampleSize=Ig,l.set=zv,l.setWith=Hv,l.shuffle=Ag,l.slice=Cp,l.sortBy=Bg,l.sortedUniq=Op,l.sortedUniqBy=Lp,l.split=pm,l.spread=Vg,l.tail=Pp,l.take=Fp,l.takeRight=kp,l.takeRightWhile=Mp,l.takeWhile=Wp,l.tap=eg,l.throttle=Ug,l.thru=vo,l.toArray=ef,l.toPairs=uf,l.toPairsIn=sf,l.toPath=Km,l.toPlainObject=nf,l.transform=Gv,l.unary=$g,l.union=Vp,l.unionBy=Up,l.unionWith=$p,l.uniq=Yp,l.uniqBy=zp,l.uniqWith=Hp,l.unset=Xv,l.unzip=gu,l.unzipWith=Wl,l.update=Kv,l.updateWith=qv,l.values=Ar,l.valuesIn=Zv,l.without=Gp,l.words=cf,l.wrap=Yg,l.xor=Xp,l.xorBy=Kp,l.xorWith=qp,l.zip=Zp,l.zipObject=Jp,l.zipObjectDeep=Qp,l.zipWith=jp,l.entries=uf,l.entriesIn=sf,l.extend=rf,l.extendWith=So,Tu(l,l),l.add=Zm,l.attempt=df,l.camelCase=em,l.capitalize=lf,l.ceil=Jm,l.clamp=Jv,l.clone=Hg,l.cloneDeep=Xg,l.cloneDeepWith=Kg,l.cloneWith=Gg,l.conformsTo=qg,l.deburr=ff,l.defaultTo=Nm,l.divide=Qm,l.endsWith=tm,l.eq=Ht,l.escape=nm,l.escapeRegExp=rm,l.every=fg,l.find=dg,l.findIndex=Ll,l.findKey=Tv,l.findLast=hg,l.findLastIndex=Pl,l.findLastKey=Cv,l.floor=jm,l.forEach=Ul,l.forEachRight=$l,l.forIn=Iv,l.forInRight=Av,l.forOwn=Nv,l.forOwnRight=Dv,l.get=wu,l.gt=Zg,l.gte=Jg,l.has=Ov,l.hasIn=bu,l.head=kl,l.identity=yt,l.includes=_g,l.indexOf=hp,l.inRange=Qv,l.invoke=Fv,l.isArguments=jn,l.isArray=fe,l.isArrayBuffer=Qg,l.isArrayLike=mt,l.isArrayLikeObject=ze,l.isBoolean=jg,l.isBuffer=On,l.isDate=ev,l.isElement=tv,l.isEmpty=nv,l.isEqual=rv,l.isEqualWith=iv,l.isError=_u,l.isFinite=ov,l.isFunction=hn,l.isInteger=Zl,l.isLength=bo,l.isMap=Jl,l.isMatch=av,l.isMatchWith=uv,l.isNaN=sv,l.isNative=lv,l.isNil=cv,l.isNull=fv,l.isNumber=Ql,l.isObject=We,l.isObjectLike=Ue,l.isPlainObject=ai,l.isRegExp=yu,l.isSafeInteger=dv,l.isSet=jl,l.isString=xo,l.isSymbol=Tt,l.isTypedArray=Ir,l.isUndefined=hv,l.isWeakMap=pv,l.isWeakSet=gv,l.join=_p,l.kebabCase=im,l.last=Mt,l.lastIndexOf=yp,l.lowerCase=om,l.lowerFirst=am,l.lt=vv,l.lte=mv,l.max=e_,l.maxBy=t_,l.mean=n_,l.meanBy=r_,l.min=i_,l.minBy=o_,l.stubArray=Iu,l.stubFalse=Au,l.stubObject=zm,l.stubString=Hm,l.stubTrue=Gm,l.multiply=a_,l.nth=wp,l.noConflict=Fm,l.noop=Cu,l.now=_o,l.pad=um,l.padEnd=sm,l.padStart=lm,l.parseInt=fm,l.random=jv,l.reduce=Sg,l.reduceRight=Eg,l.repeat=cm,l.replace=dm,l.result=Yv,l.round=u_,l.runInContext=S,l.sample=Cg,l.size=Ng,l.snakeCase=hm,l.some=Dg,l.sortedIndex=Ip,l.sortedIndexBy=Ap,l.sortedIndexOf=Np,l.sortedLastIndex=Dp,l.sortedLastIndexBy=Bp,l.sortedLastIndexOf=Rp,l.startCase=gm,l.startsWith=vm,l.subtract=s_,l.sum=l_,l.sumBy=f_,l.template=mm,l.times=Xm,l.toFinite=pn,l.toInteger=de,l.toLength=tf,l.toLower=_m,l.toNumber=Wt,l.toSafeInteger=_v,l.toString=Te,l.toUpper=ym,l.trim=wm,l.trimEnd=bm,l.trimStart=xm,l.truncate=Sm,l.unescape=Em,l.uniqueId=qm,l.upperCase=Tm,l.upperFirst=xu,l.each=Ul,l.eachRight=$l,l.first=kl,Tu(l,function(){var e={};return Jt(l,function(t,n){Ce.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=u,Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Ot(["drop","take"],function(e,t){_e.prototype[e]=function(n){n=n===r?1:Ze(de(n),0);var o=this.__filtered__&&!t?new _e(this):this.clone();return o.__filtered__?o.__takeCount__=at(n,o.__takeCount__):o.__views__.push({size:at(n,Me),type:e+(o.__dir__<0?"Right":"")}),o},_e.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==Ye||n==Xe;_e.prototype[e]=function(s){var d=this.clone();return d.__iteratees__.push({iteratee:re(s,3),type:n}),d.__filtered__=d.__filtered__||o,d}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");_e.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");_e.prototype[e]=function(){return this.__filtered__?new _e(this):this[n](1)}}),_e.prototype.compact=function(){return this.filter(yt)},_e.prototype.find=function(e){return this.filter(e).head()},_e.prototype.findLast=function(e){return this.reverse().find(e)},_e.prototype.invokeMap=ge(function(e,t){return typeof e=="function"?new _e(this):this.map(function(n){return ei(n,e,t)})}),_e.prototype.reject=function(e){return this.filter(wo(re(e)))},_e.prototype.slice=function(e,t){e=de(e);var n=this;return n.__filtered__&&(e>0||t<0)?new _e(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=de(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},_e.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_e.prototype.toArray=function(){return this.take(Me)},Jt(_e.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),s=l[o?"take"+(t=="last"?"Right":""):t],d=o||/^find/.test(t);s&&(l.prototype[t]=function(){var v=this.__wrapped__,_=o?[1]:arguments,E=v instanceof _e,O=_[0],L=E||fe(v),P=function(me){var ye=s.apply(l,Cn([me],_));return o&&J?ye[0]:ye};L&&n&&typeof O=="function"&&O.length!=1&&(E=L=!1);var J=this.__chain__,te=!!this.__actions__.length,ie=d&&!J,pe=E&&!te;if(!d&&L){v=pe?v:new _e(this);var oe=e.apply(v,_);return oe.__actions__.push({func:vo,args:[P],thisArg:r}),new Pt(oe,J)}return ie&&pe?e.apply(this,_):(oe=this.thru(P),ie?o?oe.value()[0]:oe.value():oe)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ui[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var s=arguments;if(o&&!this.__chain__){var d=this.value();return t.apply(fe(d)?d:[],s)}return this[n](function(v){return t.apply(fe(v)?v:[],s)})}}),Jt(_e.prototype,function(e,t){var n=l[t];if(n){var o=n.name+"";Ce.call(xr,o)||(xr[o]=[]),xr[o].push({name:t,func:n})}}),xr[so(r,q).name]=[{name:"wrapper",func:r}],_e.prototype.clone=Ed,_e.prototype.reverse=Td,_e.prototype.value=Cd,l.prototype.at=tg,l.prototype.chain=ng,l.prototype.commit=rg,l.prototype.next=ig,l.prototype.plant=ag,l.prototype.reverse=ug,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=sg,l.prototype.first=l.prototype.head,Xr&&(l.prototype[Xr]=og),l},yr=rd();Hn?((Hn.exports=yr)._=yr,Ea._=yr):rt._=yr}).call($t.commonjsGlobal)})($o,$o.exports);var Z0=$o.exports;const Nf=$t.getDefaultExportFromCjs(Z0),Vt=/[\u4e00-\u9fa5]+/;let Vu;const Df=["svg","g","path","polyline","circle"],J0={childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["readonly"]};let Uu;class Q0{constructor(){en(this,"from");en(this,"to");en(this,"yxI18nThesaurus");en(this,"systemKey");en(this,"dbKey");en(this,"unknownWords");en(this,"unknownWordsNode");en(this,"rootDocument");en(this,"unknownWordsInputNode");this.from="zh",this.to="en",this.yxI18nThesaurus={},this.systemKey="station-control",this.dbKey="",this.initTranslate=this.initTranslate.bind(this),this.unknownWords=[],this.unknownWordsNode=new Map,this.unknownWordsInputNode=new Map,this.rootDocument=null}initTranslate(u){return et(this,arguments,function*({to:i,systemKey:r}){if(i!=="zh"){if(i==="cht")return this.handleTraditionalChinese();yield this.initConfig({to:i,systemKey:r}),this.observerRouteChange()}})}handleTraditionalChinese(){document.body.style.fontFamily="PingFang SC",document.body.style["font-variant-east-asian"]="traditional",document.documentElement.lang="zh-tw"}observerRouteChange(){Uu=new MutationObserver(r=>{r.length>0&&r.forEach((u,h)=>{switch(u.type){case"characterData":this.handleTextNodes(u.target);break;case"childList":this.handleChildListMutation(u);break;case"attributes":u.attributeName==="placeholder"&&Vt.test(u.target.placeholder)?this.replaceInputValue(u.target,"placeholder"):u.attributeName==="readonly"&&this.replaceInputValue(u.target,"value");break}})}),Uu.observe(this.rootDocument,J0);const i=Uu.takeRecords();i.length>0&&i.forEach(r=>{})}handleTextNodes(i){if(Vt.test(i==null?void 0:i.data)||Vt.test(i==null?void 0:i.nodeValue)){const r=i.nodeValue.replace(/\s/g,"");this.yxI18nThesaurus[r]?i.nodeValue=this.yxI18nThesaurus[r]:(this.unknownWords.includes(r)||this.unknownWords.push(r),this.collectNeedsTranslateNode(i,r))}}handleChildListMutation(i){if(i.addedNodes.length>0&&i.removedNodes.length>0)return this.addedNode(i);i.removedNodes.length>0&&i.removedNodes[0].id!=="nprogress"||this.addedNode(i)}addedNode(i){var r,u,h;if(i.addedNodes.length>0){const g=i.target.tagName.toLowerCase();if(Df.includes(g)||Df.includes((u=(r=i.addedNodes[0])==null?void 0:r.tagName)==null?void 0:u.toLowerCase()))return;const y=(h=i.addedNodes[0])==null?void 0:h.className,w=i.target.nodeValue;if(y&&y!=="")y.includes("v-modal")?this.throttleTraversingNode(i.previousSibling):y.includes("tooltip")?this.replaceValue("innerText",i.addedNodes[0]):y.includes("message")?this.throttleTraversingNode(i.addedNodes[0]):y.includes("loading")?i.addedNodes[0].childNodes[0].nodeValue&&this.replaceValue("nodeValue",i.addedNodes[0].childNodes[0]):w?this.replaceValue("nodeValue",i.target):Vt.test(i.addedNodes[0].innerText)&&this.throttleTraversingNode(i.addedNodes[0]);else{const C=i.addedNodes[0];C&&C.nodeType===Node.TEXT_NODE&&Vt.test(C.nodeValue)?this.replaceValue("nodeValue",C):this.throttleTraversingNode(C)}}else this.throttleTraversingNode(i.target),this.replaceDocumentTitle()}startMicroTaskQueue(){Vu&&clearTimeout(Vu),Vu=setTimeout(()=>{if(this.replaceDocumentTitle(),this.unknownWords.length>0)Nf.throttle(()=>this.translateUnknownWords(this.unknownWords,this.unknownWordsNode.size),1e3,{leading:!0})();else{if(this.unknownWordsInputNode.size>0){for(const i of this.unknownWordsInputNode.values())this.replaceInputValue(i,"placeholder",!0),i.value!==""&&this.replaceInputValue(i,"value",!0);this.unknownWordsInputNode.clear()}this.replaceUnknownWordsNodeList(!0)}},500)}throttleTraversingNode(i){Nf.throttle(()=>this.traversingNode(i),500,{leading:!0})()}traversingNode(i){if(!i)return;const r=g=>this.replaceTextByNode(g),u=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(g){return g.tagName&&g.tagName.toLowerCase()==="svg"?NodeFilter.FILTER_REJECT:(r(g),NodeFilter.FILTER_SKIP)}});let h;for(;h=u.nextNode();)r(h)}replaceTextByNode(i,r=!1){i.title&&Vt.test(i.title)&&this.replaceValue("title",i),i.nodeType===Node.ELEMENT_NODE?["textarea","input"].includes(i.tagName.toLowerCase())&&(Vt.test(i.placeholder)&&this.replaceInputValue(i,"placeholder"),i.value&&Vt.test(i.value)&&this.replaceInputValue(i,"value"),i.value!==""&&i.readOnly&&this.collectNeedsTranslateInputNode(i)):i.nodeType===Node.TEXT_NODE&&(Vt.test(i.nodeValue)||Vt.test(i.data))&&this.replaceValue("nodeValue",i,r)}replaceInputValue(i,r,u=!1){const h=i[r];this.yxI18nThesaurus[h]?i[r]=this.yxI18nThesaurus[h]:(this.unknownWords.includes(h)||this.unknownWords.push(h),u||this.collectNeedsTranslateInputNode(i))}collectNeedsTranslateInputNode(i){const r=Math.random().toString(16).split(".")[1];this.unknownWordsInputNode.has(r)||(this.unknownWordsInputNode.set(r,i),this.startMicroTaskQueue())}replaceDocumentTitle(){const i=document.title;Vt.test(i)&&this.yxI18nThesaurus[i]&&(document.title=this.yxI18nThesaurus[i])}collectNeedsTranslateNode(i){const r=Math.random().toString(16).split(".")[1];this.unknownWordsNode.has(r)||(this.unknownWordsNode.set(r,i),this.startMicroTaskQueue())}replaceValue(i,r,u=!1){if(r[i]==="")return;const h=r[i].replace(/\s/g,"");this.yxI18nThesaurus[h]?r[i]=this.yxI18nThesaurus[h]:(this.unknownWords.includes(h)||this.unknownWords.push(h),u?this.startMicroTaskQueue():this.collectNeedsTranslateNode(r))}translateUnknownWords(i,r){return et(this,null,function*(){const u=i.filter(y=>y.trim()!=="");if(u.length===0)return;const h=Array.from(new Set(u)),g=yield Af({words:h,toSource:this.to,systemFlag:this.systemKey});if(!g||Object.keys(g).length===0){this.unknownWords=[];return}this.yxI18nThesaurus=Je(Je({},this.yxI18nThesaurus),g),yield fi(this.dbKey,this.yxI18nThesaurus),this.unknownWords=[],this.replaceUnknownWordsNodeList(),this.startMicroTaskQueue()})}replaceUnknownWordsNodeList(i=!1){if(this.unknownWordsNode.size>0){for(const r of this.unknownWordsNode.values())Vt.test(r.nodeValue)&&this.replaceTextByNode(r,!0);i&&this.unknownWordsNode.clear()}}initConfig(u){return et(this,arguments,function*({to:i,systemKey:r}){this.to=i||this.to,this.systemKey=r||this.systemKey,this.dbKey=`${this.systemKey}_${this.to}`,document.querySelector("html").classList.add(i),this.rootDocument=document.querySelector("body"),(yield Uo("lang"))!==i&&(yield fi("lang",i));const g=yield Uo(this.dbKey);if(!g)yield fi(this.dbKey,{});else try{const y=yield Af({words:[],toSource:this.to,systemFlag:this.systemKey});this.yxI18nThesaurus=y,yield fi(this.dbKey,this.yxI18nThesaurus)}catch(y){this.yxI18nThesaurus=g}})}getYxI18nThesaurus(){return this.yxI18nThesaurus}}const Qu=new Q0,ju=Qu.initTranslate,es=a=>et(exports,null,function*(){(yield Uo("lang"))!==a&&(yield fi("lang",a),bi.postMessage(JSON.stringify({type:"lang"})),location.reload())}),ts=()=>et(exports,null,function*(){return(yield Uo("lang"))||""}),ns=a=>Qu.getYxI18nThesaurus()[a]||a,ac=a=>{const i=Qu.getYxI18nThesaurus();return Object.keys(i).find(r=>i[r]===a)||a},uc=Object.freeze(Object.defineProperty({__proto__:null,changeLang:es,getLang:ts,getWordByYxI18nThesaurus:ns,getZhWordByYxI18nThesaurus:ac,initTranslate:ju},Symbol.toStringTag,{value:"Module"})),j0={props:{value:{typeof:Number}}},e1={class:"badge-container"};function t1(a,i,r,u,h,g){return f.withDirectives((f.openBlock(),f.createElementBlock("div",e1,[f.createBaseVNode("sup",null,f.toDisplayString(r.value),1)],512)),[[Kt.vShow,r.value>0]])}const sc=rr(j0,[["render",t1],["__scopeId","data-v-588a1297"]]),n1={components:{theme:F0,issue:U0,Badge:sc,lang:G0},props:{showTool:{typeof:Boolean,default:!1},badgeValue:{typeof:Number}},data(){return{columns:"repeat(2, 1fr)",rows:window.isRenderLang?"repeat(2, 1fr)":"lfr",config:[{name:"theme",label:"主题切换",icon:"theme",icon_active:"https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/toolbar-theme-back.svg",position:[50,0],desc:"跳转到问题反馈页面",action:"hiddenTool",component:"Theme",data:window.theme,"grid-area":window.isRenderLang?"1 / 1 / 2 / 3":"1 / 1 / 2 / 2",show:window.theme.length>0},{name:"lang",label:"语言切换",icon:"lang",position:[100,0],desc:"语言切换",component:"Lang",isShowBadge:!0,"grid-area":"2 / 1 / 3 / 2",show:window.isRenderLang?window.isRenderLang:!1},{name:"issue",label:"问题反馈",icon:"issue",position:[100,0],desc:"跳转到问题反馈页面",component:"Issue",isShowBadge:!0,"grid-area":window.isRenderLang?"2 / 2 / 3 / 3":"1 / 2 / 2 / 3",show:window.isRenderIssue?window.isRenderIssue:!1}],curComponent:{},curTheme:mi(),langList:[{name:"中文-Chinese",lang:"zh"},{name:"中文(香港)-Chinese(Hong Kong)",lang:"cht"},{name:"英语-English",lang:"en"}]}},computed:{configList(){return this.config.filter(a=>a.show)}},watch:{showTool(a){a?this.curTheme=this.getCurTheme():this.curComponent={}}},mounted(){this.curTheme=this.getCurTheme()},methods:{changeLang:es,getCurTheme(){return mi()},configHandle(a){if(a.name==="issue"){const i=window.location.pathname.split("/")[1];window.open(`/${i}/integrated/#/workOrderManagement`),this.$emit("zero")}else this.curComponent=a},chooseTheme(a){is(a),this.curTheme=a.id},getPosition(a){return{0:{"grid-row":2,"grid-column":1},1:{"grid-row":1,"grid-column":2},2:{"grid-row":2,"grid-column":3},3:{"grid-row":3,"grid-column":2}}[a]}}},r1=["onClick"],i1=["title"],o1={class:"tool-icon relative flex justify-center items-center"},a1={class:"yx-icon",style:{color:"var(--color-main-100)"},color:`var(--color-main-100)
37
+ }`;var pe=df(function(){return Se(d,te+"return "+P).apply(r,v)});if(pe.source=P,_u(pe))throw pe;return pe}function _m(e){return Te(e).toLowerCase()}function ym(e){return Te(e).toUpperCase()}function wm(e,t,n){if(e=Te(e),e&&(n||t===r))return ws(e);if(!e||!(t=Et(t)))return e;var o=Yt(e),s=Yt(t),d=bs(o,s),v=xs(o,s)+1;return Rn(o,d,v).join("")}function bm(e,t,n){if(e=Te(e),e&&(n||t===r))return e.slice(0,Es(e)+1);if(!e||!(t=Et(t)))return e;var o=Yt(e),s=xs(o,Yt(t))+1;return Rn(o,0,s).join("")}function xm(e,t,n){if(e=Te(e),e&&(n||t===r))return e.replace(Yr,"");if(!e||!(t=Et(t)))return e;var o=Yt(e),s=bs(o,Yt(t));return Rn(o,s).join("")}function Sm(e,t){var n=Ae,o=De;if(We(t)){var s="separator"in t?t.separator:s;n="length"in t?de(t.length):n,o="omission"in t?Et(t.omission):o}e=Te(e);var d=e.length;if(mr(e)){var v=Yt(e);d=v.length}if(n>=d)return e;var _=n-_r(o);if(_<1)return o;var E=v?Rn(v,0,_).join(""):e.slice(0,_);if(s===r)return E+o;if(v&&(_+=E.length-_),yu(s)){if(e.slice(_).search(s)){var O,L=E;for(s.global||(s=Pa(s.source,Te(Bi.exec(s))+"g")),s.lastIndex=0;O=s.exec(L);)var P=O.index;E=E.slice(0,P===r?_:P)}}else if(e.indexOf(Et(s),_)!=_){var J=E.lastIndexOf(s);J>-1&&(E=E.slice(0,J))}return E+o}function Em(e){return e=Te(e),e&&Ai.test(e)?e.replace(Ci,jc):e}var Tm=Tr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),xu=dl("toUpperCase");function cf(e,t,n){return e=Te(e),t=n?r:t,t===r?Kc(e)?nd(e):Wc(e):e.match(t)||[]}var df=ge(function(e,t){try{return xt(e,r,t)}catch(n){return _u(n)?n:new le(n)}}),Cm=cn(function(e,t){return Ot(t,function(n){n=jt(n),ln(e,n,vu(e[n],e))}),e});function Im(e){var t=e==null?0:e.length,n=re();return e=t?Fe(e,function(o){if(typeof o[1]!="function")throw new Lt(y);return[n(o[0]),o[1]]}):[],ge(function(o){for(var s=-1;++s<t;){var d=e[s];if(xt(d[0],this,o))return xt(d[1],this,o)}})}function Am(e){return jd(Ft(e,A))}function Su(e){return function(){return e}}function Nm(e,t){return e==null||e!==e?t:e}var Dm=pl(),Bm=pl(!0);function yt(e){return e}function Eu(e){return zs(typeof e=="function"?e:Ft(e,A))}function Rm(e){return Gs(Ft(e,A))}function Om(e,t){return Xs(e,Ft(t,A))}var Lm=ge(function(e,t){return function(n){return ei(n,e,t)}}),Pm=ge(function(e,t){return function(n){return ei(e,n,t)}});function Tu(e,t,n){var o=je(t),s=ro(t,o);n==null&&!(We(t)&&(s.length||!o.length))&&(n=t,t=e,e=this,s=ro(t,je(t)));var d=!(We(n)&&"chain"in n)||!!n.chain,v=hn(e);return Ot(s,function(_){var E=t[_];e[_]=E,v&&(e.prototype[_]=function(){var O=this.__chain__;if(d||O){var L=e(this.__wrapped__),P=L.__actions__=vt(this.__actions__);return P.push({func:E,args:arguments,thisArg:e}),L.__chain__=O,L}return E.apply(e,Cn([this.value()],arguments))})}),e}function Fm(){return rt._===this&&(rt._=sd),this}function Cu(){}function km(e){return e=de(e),ge(function(t){return Ks(t,e)})}var Mm=ru(Fe),Wm=ru(gs),Vm=ru(Aa);function hf(e){return fu(e)?Na(jt(e)):vh(e)}function Um(e){return function(t){return e==null?r:Zn(e,t)}}var $m=vl(),Ym=vl(!0);function Iu(){return[]}function Au(){return!1}function zm(){return{}}function Hm(){return""}function Gm(){return!0}function Xm(e,t){if(e=de(e),e<1||e>nt)return[];var n=Me,o=at(e,Me);t=re(t),e-=Me;for(var s=Ra(o,t);++n<e;)t(n);return s}function Km(e){return fe(e)?Fe(e,jt):Tt(e)?[e]:vt(Rl(Te(e)))}function qm(e){var t=++ad;return Te(e)+t}var Zm=lo(function(e,t){return e+t},0),Jm=iu("ceil"),Qm=lo(function(e,t){return e/t},1),jm=iu("floor");function e_(e){return e&&e.length?no(e,yt,Ya):r}function t_(e,t){return e&&e.length?no(e,re(t,2),Ya):r}function n_(e){return _s(e,yt)}function r_(e,t){return _s(e,re(t,2))}function i_(e){return e&&e.length?no(e,yt,Xa):r}function o_(e,t){return e&&e.length?no(e,re(t,2),Xa):r}var a_=lo(function(e,t){return e*t},1),u_=iu("round"),s_=lo(function(e,t){return e-t},0);function l_(e){return e&&e.length?Ba(e,yt):0}function f_(e,t){return e&&e.length?Ba(e,re(t,2)):0}return l.after=Rg,l.ary=Yl,l.assign=yv,l.assignIn=rf,l.assignInWith=So,l.assignWith=wv,l.at=bv,l.before=zl,l.bind=vu,l.bindAll=Cm,l.bindKey=Hl,l.castArray=zg,l.chain=Vl,l.chunk=jh,l.compact=ep,l.concat=tp,l.cond=Im,l.conforms=Am,l.constant=Su,l.countBy=lg,l.create=xv,l.curry=Gl,l.curryRight=Xl,l.debounce=Kl,l.defaults=Sv,l.defaultsDeep=Ev,l.defer=Og,l.delay=Lg,l.difference=np,l.differenceBy=rp,l.differenceWith=ip,l.drop=op,l.dropRight=ap,l.dropRightWhile=up,l.dropWhile=sp,l.fill=lp,l.filter=cg,l.flatMap=pg,l.flatMapDeep=gg,l.flatMapDepth=vg,l.flatten=Fl,l.flattenDeep=fp,l.flattenDepth=cp,l.flip=Pg,l.flow=Dm,l.flowRight=Bm,l.fromPairs=dp,l.functions=Bv,l.functionsIn=Rv,l.groupBy=mg,l.initial=pp,l.intersection=gp,l.intersectionBy=vp,l.intersectionWith=mp,l.invert=Lv,l.invertBy=Pv,l.invokeMap=yg,l.iteratee=Eu,l.keyBy=wg,l.keys=je,l.keysIn=_t,l.map=mo,l.mapKeys=kv,l.mapValues=Mv,l.matches=Rm,l.matchesProperty=Om,l.memoize=yo,l.merge=Wv,l.mergeWith=of,l.method=Lm,l.methodOf=Pm,l.mixin=Tu,l.negate=wo,l.nthArg=km,l.omit=Vv,l.omitBy=Uv,l.once=Fg,l.orderBy=bg,l.over=Mm,l.overArgs=kg,l.overEvery=Wm,l.overSome=Vm,l.partial=mu,l.partialRight=ql,l.partition=xg,l.pick=$v,l.pickBy=af,l.property=hf,l.propertyOf=Um,l.pull=bp,l.pullAll=Ml,l.pullAllBy=xp,l.pullAllWith=Sp,l.pullAt=Ep,l.range=$m,l.rangeRight=Ym,l.rearg=Mg,l.reject=Tg,l.remove=Tp,l.rest=Wg,l.reverse=pu,l.sampleSize=Ig,l.set=zv,l.setWith=Hv,l.shuffle=Ag,l.slice=Cp,l.sortBy=Bg,l.sortedUniq=Op,l.sortedUniqBy=Lp,l.split=pm,l.spread=Vg,l.tail=Pp,l.take=Fp,l.takeRight=kp,l.takeRightWhile=Mp,l.takeWhile=Wp,l.tap=eg,l.throttle=Ug,l.thru=vo,l.toArray=ef,l.toPairs=uf,l.toPairsIn=sf,l.toPath=Km,l.toPlainObject=nf,l.transform=Gv,l.unary=$g,l.union=Vp,l.unionBy=Up,l.unionWith=$p,l.uniq=Yp,l.uniqBy=zp,l.uniqWith=Hp,l.unset=Xv,l.unzip=gu,l.unzipWith=Wl,l.update=Kv,l.updateWith=qv,l.values=Ar,l.valuesIn=Zv,l.without=Gp,l.words=cf,l.wrap=Yg,l.xor=Xp,l.xorBy=Kp,l.xorWith=qp,l.zip=Zp,l.zipObject=Jp,l.zipObjectDeep=Qp,l.zipWith=jp,l.entries=uf,l.entriesIn=sf,l.extend=rf,l.extendWith=So,Tu(l,l),l.add=Zm,l.attempt=df,l.camelCase=em,l.capitalize=lf,l.ceil=Jm,l.clamp=Jv,l.clone=Hg,l.cloneDeep=Xg,l.cloneDeepWith=Kg,l.cloneWith=Gg,l.conformsTo=qg,l.deburr=ff,l.defaultTo=Nm,l.divide=Qm,l.endsWith=tm,l.eq=Ht,l.escape=nm,l.escapeRegExp=rm,l.every=fg,l.find=dg,l.findIndex=Ll,l.findKey=Tv,l.findLast=hg,l.findLastIndex=Pl,l.findLastKey=Cv,l.floor=jm,l.forEach=Ul,l.forEachRight=$l,l.forIn=Iv,l.forInRight=Av,l.forOwn=Nv,l.forOwnRight=Dv,l.get=wu,l.gt=Zg,l.gte=Jg,l.has=Ov,l.hasIn=bu,l.head=kl,l.identity=yt,l.includes=_g,l.indexOf=hp,l.inRange=Qv,l.invoke=Fv,l.isArguments=jn,l.isArray=fe,l.isArrayBuffer=Qg,l.isArrayLike=mt,l.isArrayLikeObject=ze,l.isBoolean=jg,l.isBuffer=On,l.isDate=ev,l.isElement=tv,l.isEmpty=nv,l.isEqual=rv,l.isEqualWith=iv,l.isError=_u,l.isFinite=ov,l.isFunction=hn,l.isInteger=Zl,l.isLength=bo,l.isMap=Jl,l.isMatch=av,l.isMatchWith=uv,l.isNaN=sv,l.isNative=lv,l.isNil=cv,l.isNull=fv,l.isNumber=Ql,l.isObject=We,l.isObjectLike=Ue,l.isPlainObject=ai,l.isRegExp=yu,l.isSafeInteger=dv,l.isSet=jl,l.isString=xo,l.isSymbol=Tt,l.isTypedArray=Ir,l.isUndefined=hv,l.isWeakMap=pv,l.isWeakSet=gv,l.join=_p,l.kebabCase=im,l.last=Mt,l.lastIndexOf=yp,l.lowerCase=om,l.lowerFirst=am,l.lt=vv,l.lte=mv,l.max=e_,l.maxBy=t_,l.mean=n_,l.meanBy=r_,l.min=i_,l.minBy=o_,l.stubArray=Iu,l.stubFalse=Au,l.stubObject=zm,l.stubString=Hm,l.stubTrue=Gm,l.multiply=a_,l.nth=wp,l.noConflict=Fm,l.noop=Cu,l.now=_o,l.pad=um,l.padEnd=sm,l.padStart=lm,l.parseInt=fm,l.random=jv,l.reduce=Sg,l.reduceRight=Eg,l.repeat=cm,l.replace=dm,l.result=Yv,l.round=u_,l.runInContext=S,l.sample=Cg,l.size=Ng,l.snakeCase=hm,l.some=Dg,l.sortedIndex=Ip,l.sortedIndexBy=Ap,l.sortedIndexOf=Np,l.sortedLastIndex=Dp,l.sortedLastIndexBy=Bp,l.sortedLastIndexOf=Rp,l.startCase=gm,l.startsWith=vm,l.subtract=s_,l.sum=l_,l.sumBy=f_,l.template=mm,l.times=Xm,l.toFinite=pn,l.toInteger=de,l.toLength=tf,l.toLower=_m,l.toNumber=Wt,l.toSafeInteger=_v,l.toString=Te,l.toUpper=ym,l.trim=wm,l.trimEnd=bm,l.trimStart=xm,l.truncate=Sm,l.unescape=Em,l.uniqueId=qm,l.upperCase=Tm,l.upperFirst=xu,l.each=Ul,l.eachRight=$l,l.first=kl,Tu(l,function(){var e={};return Jt(l,function(t,n){Ce.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=u,Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Ot(["drop","take"],function(e,t){_e.prototype[e]=function(n){n=n===r?1:Ze(de(n),0);var o=this.__filtered__&&!t?new _e(this):this.clone();return o.__filtered__?o.__takeCount__=at(n,o.__takeCount__):o.__views__.push({size:at(n,Me),type:e+(o.__dir__<0?"Right":"")}),o},_e.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==Ye||n==Xe;_e.prototype[e]=function(s){var d=this.clone();return d.__iteratees__.push({iteratee:re(s,3),type:n}),d.__filtered__=d.__filtered__||o,d}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");_e.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");_e.prototype[e]=function(){return this.__filtered__?new _e(this):this[n](1)}}),_e.prototype.compact=function(){return this.filter(yt)},_e.prototype.find=function(e){return this.filter(e).head()},_e.prototype.findLast=function(e){return this.reverse().find(e)},_e.prototype.invokeMap=ge(function(e,t){return typeof e=="function"?new _e(this):this.map(function(n){return ei(n,e,t)})}),_e.prototype.reject=function(e){return this.filter(wo(re(e)))},_e.prototype.slice=function(e,t){e=de(e);var n=this;return n.__filtered__&&(e>0||t<0)?new _e(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=de(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},_e.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_e.prototype.toArray=function(){return this.take(Me)},Jt(_e.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),s=l[o?"take"+(t=="last"?"Right":""):t],d=o||/^find/.test(t);s&&(l.prototype[t]=function(){var v=this.__wrapped__,_=o?[1]:arguments,E=v instanceof _e,O=_[0],L=E||fe(v),P=function(me){var ye=s.apply(l,Cn([me],_));return o&&J?ye[0]:ye};L&&n&&typeof O=="function"&&O.length!=1&&(E=L=!1);var J=this.__chain__,te=!!this.__actions__.length,ie=d&&!J,pe=E&&!te;if(!d&&L){v=pe?v:new _e(this);var oe=e.apply(v,_);return oe.__actions__.push({func:vo,args:[P],thisArg:r}),new Pt(oe,J)}return ie&&pe?e.apply(this,_):(oe=this.thru(P),ie?o?oe.value()[0]:oe.value():oe)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ui[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var s=arguments;if(o&&!this.__chain__){var d=this.value();return t.apply(fe(d)?d:[],s)}return this[n](function(v){return t.apply(fe(v)?v:[],s)})}}),Jt(_e.prototype,function(e,t){var n=l[t];if(n){var o=n.name+"";Ce.call(xr,o)||(xr[o]=[]),xr[o].push({name:t,func:n})}}),xr[so(r,q).name]=[{name:"wrapper",func:r}],_e.prototype.clone=Ed,_e.prototype.reverse=Td,_e.prototype.value=Cd,l.prototype.at=tg,l.prototype.chain=ng,l.prototype.commit=rg,l.prototype.next=ig,l.prototype.plant=ag,l.prototype.reverse=ug,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=sg,l.prototype.first=l.prototype.head,Xr&&(l.prototype[Xr]=og),l},yr=rd();Hn?((Hn.exports=yr)._=yr,Ea._=yr):rt._=yr}).call($t.commonjsGlobal)})($o,$o.exports);var Z0=$o.exports;const Nf=$t.getDefaultExportFromCjs(Z0),Vt=/[\u4e00-\u9fa5]+/;let Vu;const Df=["svg","g","path","polyline","circle"],J0={childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["readonly"]};let Uu;class Q0{constructor(){en(this,"from");en(this,"to");en(this,"yxI18nThesaurus");en(this,"systemKey");en(this,"dbKey");en(this,"unknownWords");en(this,"unknownWordsNode");en(this,"rootDocument");en(this,"unknownWordsInputNode");this.from="zh",this.to="en",this.yxI18nThesaurus={},this.systemKey="station-control",this.dbKey="",this.initTranslate=this.initTranslate.bind(this),this.unknownWords=[],this.unknownWordsNode=new Map,this.unknownWordsInputNode=new Map,this.rootDocument=null}initTranslate(u){return et(this,arguments,function*({to:i,systemKey:r}){if(i!=="zh"){if(i==="cht")return this.handleTraditionalChinese();yield this.initConfig({to:i,systemKey:r}),this.observerRouteChange()}})}handleTraditionalChinese(){document.body.style.fontFamily="PingFang SC",document.body.style["font-variant-east-asian"]="traditional",document.documentElement.lang="zh-tw"}observerRouteChange(){Uu=new MutationObserver(r=>{r.length>0&&r.forEach((u,h)=>{switch(u.type){case"characterData":this.handleTextNodes(u.target);break;case"childList":this.handleChildListMutation(u);break;case"attributes":u.attributeName==="placeholder"&&Vt.test(u.target.placeholder)?this.replaceInputValue(u.target,"placeholder"):u.attributeName==="readonly"&&(this.replaceInputValue(u.target,"placeholder"),this.replaceInputValue(u.target,"value"));break}})}),Uu.observe(this.rootDocument,J0);const i=Uu.takeRecords();i.length>0&&i.forEach(r=>{})}handleTextNodes(i){if(Vt.test(i==null?void 0:i.data)||Vt.test(i==null?void 0:i.nodeValue)){const r=i.nodeValue.replace(/\s/g,"");this.yxI18nThesaurus[r]?i.nodeValue=this.yxI18nThesaurus[r]:(this.unknownWords.includes(r)||this.unknownWords.push(r),this.collectNeedsTranslateNode(i,r))}}handleChildListMutation(i){if(i.addedNodes.length>0&&i.removedNodes.length>0)return this.addedNode(i);i.removedNodes.length>0&&i.removedNodes[0].id!=="nprogress"||this.addedNode(i)}addedNode(i){var r,u,h;if(i.addedNodes.length>0){const g=i.target.tagName.toLowerCase();if(Df.includes(g)||Df.includes((u=(r=i.addedNodes[0])==null?void 0:r.tagName)==null?void 0:u.toLowerCase()))return;const y=(h=i.addedNodes[0])==null?void 0:h.className,w=i.target.nodeValue;if(y&&y!=="")y.includes("v-modal")?this.throttleTraversingNode(i.previousSibling):y.includes("tooltip")?this.replaceValue("innerText",i.addedNodes[0]):y.includes("message")?this.throttleTraversingNode(i.addedNodes[0]):y.includes("loading")?i.addedNodes[0].childNodes.length>0&&i.addedNodes[0].childNodes[0].nodeValue&&this.replaceValue("nodeValue",i.addedNodes[0].childNodes[0]):w?this.replaceValue("nodeValue",i.target):Vt.test(i.addedNodes[0].innerText)&&this.throttleTraversingNode(i.addedNodes[0]);else{const C=i.addedNodes[0];C&&C.nodeType===Node.TEXT_NODE&&Vt.test(C.nodeValue)?this.replaceValue("nodeValue",C):this.throttleTraversingNode(C)}}else this.throttleTraversingNode(i.target),this.replaceDocumentTitle()}startMicroTaskQueue(){Vu&&clearTimeout(Vu),Vu=setTimeout(()=>{if(this.replaceDocumentTitle(),this.unknownWords.length>0)Nf.throttle(()=>this.translateUnknownWords(this.unknownWords,this.unknownWordsNode.size),1e3,{leading:!0})();else{if(this.unknownWordsInputNode.size>0){for(const i of this.unknownWordsInputNode.values())this.replaceInputValue(i,"placeholder",!0),i.value!==""&&this.replaceInputValue(i,"value",!0);this.unknownWordsInputNode.clear()}this.replaceUnknownWordsNodeList(!0)}},500)}throttleTraversingNode(i){Nf.throttle(()=>this.traversingNode(i),500,{leading:!0})()}traversingNode(i){if(!i)return;const r=g=>this.replaceTextByNode(g),u=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(g){return g.tagName&&g.tagName.toLowerCase()==="svg"?NodeFilter.FILTER_REJECT:(r(g),NodeFilter.FILTER_SKIP)}});let h;for(;h=u.nextNode();)r(h)}replaceTextByNode(i,r=!1){i.title&&Vt.test(i.title)&&this.replaceValue("title",i),i.nodeType===Node.ELEMENT_NODE?["textarea","input"].includes(i.tagName.toLowerCase())&&(Vt.test(i.placeholder)&&this.replaceInputValue(i,"placeholder"),i.value&&Vt.test(i.value)&&this.replaceInputValue(i,"value"),i.value!==""&&i.readOnly&&this.collectNeedsTranslateInputNode(i)):i.nodeType===Node.TEXT_NODE&&(Vt.test(i.nodeValue)||Vt.test(i.data))&&this.replaceValue("nodeValue",i,r)}replaceInputValue(i,r,u=!1){const h=i[r];this.yxI18nThesaurus[h]?i[r]=this.yxI18nThesaurus[h]:(this.unknownWords.includes(h)||this.unknownWords.push(h),u||this.collectNeedsTranslateInputNode(i))}collectNeedsTranslateInputNode(i){const r=Math.random().toString(16).split(".")[1];this.unknownWordsInputNode.has(r)||(this.unknownWordsInputNode.set(r,i),this.startMicroTaskQueue())}replaceDocumentTitle(){const i=document.title;Vt.test(i)&&this.yxI18nThesaurus[i]&&(document.title=this.yxI18nThesaurus[i])}collectNeedsTranslateNode(i){const r=Math.random().toString(16).split(".")[1];this.unknownWordsNode.has(r)||(this.unknownWordsNode.set(r,i),this.startMicroTaskQueue())}replaceValue(i,r,u=!1){if(r[i]==="")return;const h=r[i].replace(/\s/g,"");this.yxI18nThesaurus[h]?r[i]=this.yxI18nThesaurus[h]:(this.unknownWords.includes(h)||this.unknownWords.push(h),u?this.startMicroTaskQueue():this.collectNeedsTranslateNode(r))}translateUnknownWords(i,r){return et(this,null,function*(){const u=i.filter(y=>y.trim()!=="");if(u.length===0)return;const h=Array.from(new Set(u)),g=yield Af({words:h,toSource:this.to,systemFlag:this.systemKey});if(!g||Object.keys(g).length===0){this.unknownWords=[];return}this.yxI18nThesaurus=Je(Je({},this.yxI18nThesaurus),g),yield fi(this.dbKey,this.yxI18nThesaurus),this.unknownWords=[],this.replaceUnknownWordsNodeList(),this.startMicroTaskQueue()})}replaceUnknownWordsNodeList(i=!1){if(this.unknownWordsNode.size>0){for(const r of this.unknownWordsNode.values())Vt.test(r.nodeValue)&&this.replaceTextByNode(r,!0);i&&this.unknownWordsNode.clear()}}initConfig(u){return et(this,arguments,function*({to:i,systemKey:r}){this.to=i||this.to,this.systemKey=r||this.systemKey,this.dbKey=`${this.systemKey}_${this.to}`,document.querySelector("html").classList.add(i),this.rootDocument=document.querySelector("body"),(yield Uo("lang"))!==i&&(yield fi("lang",i));const g=yield Uo(this.dbKey);if(!g)yield fi(this.dbKey,{});else try{const y=yield Af({words:[],toSource:this.to,systemFlag:this.systemKey});this.yxI18nThesaurus=y,yield fi(this.dbKey,this.yxI18nThesaurus)}catch(y){this.yxI18nThesaurus=g}})}getYxI18nThesaurus(){return this.yxI18nThesaurus}}const Qu=new Q0,ju=Qu.initTranslate,es=a=>et(exports,null,function*(){(yield Uo("lang"))!==a&&(yield fi("lang",a),bi.postMessage(JSON.stringify({type:"lang"})),location.reload())}),ts=()=>et(exports,null,function*(){return(yield Uo("lang"))||""}),ns=a=>Qu.getYxI18nThesaurus()[a]||a,ac=a=>{const i=Qu.getYxI18nThesaurus();return Object.keys(i).find(r=>i[r]===a)||a},uc=Object.freeze(Object.defineProperty({__proto__:null,changeLang:es,getLang:ts,getWordByYxI18nThesaurus:ns,getZhWordByYxI18nThesaurus:ac,initTranslate:ju},Symbol.toStringTag,{value:"Module"})),j0={props:{value:{typeof:Number}}},e1={class:"badge-container"};function t1(a,i,r,u,h,g){return f.withDirectives((f.openBlock(),f.createElementBlock("div",e1,[f.createBaseVNode("sup",null,f.toDisplayString(r.value),1)],512)),[[Kt.vShow,r.value>0]])}const sc=rr(j0,[["render",t1],["__scopeId","data-v-588a1297"]]),n1={components:{theme:F0,issue:U0,Badge:sc,lang:G0},props:{showTool:{typeof:Boolean,default:!1},badgeValue:{typeof:Number}},data(){return{columns:"repeat(2, 1fr)",rows:window.isRenderLang?"repeat(2, 1fr)":"lfr",config:[{name:"theme",label:"主题切换",icon:"theme",icon_active:"https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/toolbar-theme-back.svg",position:[50,0],desc:"跳转到问题反馈页面",action:"hiddenTool",component:"Theme",data:window.theme,"grid-area":window.isRenderLang?"1 / 1 / 2 / 3":"1 / 1 / 2 / 2",show:window.theme.length>0},{name:"lang",label:"语言切换",icon:"lang",position:[100,0],desc:"语言切换",component:"Lang",isShowBadge:!0,"grid-area":"2 / 1 / 3 / 2",show:window.isRenderLang?window.isRenderLang:!1},{name:"issue",label:"问题反馈",icon:"issue",position:[100,0],desc:"跳转到问题反馈页面",component:"Issue",isShowBadge:!0,"grid-area":window.isRenderLang?"2 / 2 / 3 / 3":"1 / 2 / 2 / 3",show:window.isRenderIssue?window.isRenderIssue:!1}],curComponent:{},curTheme:mi(),langList:[{name:"中文-Chinese",lang:"zh"},{name:"中文(香港)-Chinese(Hong Kong)",lang:"cht"},{name:"英语-English",lang:"en"}]}},computed:{configList(){return this.config.filter(a=>a.show)}},watch:{showTool(a){a?this.curTheme=this.getCurTheme():this.curComponent={}}},mounted(){this.curTheme=this.getCurTheme()},methods:{changeLang:es,getCurTheme(){return mi()},configHandle(a){if(a.name==="issue"){const i=window.location.pathname.split("/")[1];window.open(`/${i}/integrated/#/workOrderManagement`),this.$emit("zero")}else this.curComponent=a},chooseTheme(a){is(a),this.curTheme=a.id},getPosition(a){return{0:{"grid-row":2,"grid-column":1},1:{"grid-row":1,"grid-column":2},2:{"grid-row":2,"grid-column":3},3:{"grid-row":3,"grid-column":2}}[a]}}},r1=["onClick"],i1=["title"],o1={class:"tool-icon relative flex justify-center items-center"},a1={class:"yx-icon",style:{color:"var(--color-main-100)"},color:`var(--color-main-100)
38
38
  `,size:"24"},u1={class:"mt-10 text-center"},s1={key:1,class:"w-full h-full"},l1={key:0,class:"toolbar-wrap-component"},f1={class:"yx-icon",style:{color:"var(--color-main-100)"},color:"var(--color-main-100)",size:"30"},c1=["title","onClick"],d1={key:1,class:"box-border w-full h-full py-10 overflow-y-auto"},h1=["onClick","title"];function p1(a,i,r,u,h,g){const y=f.resolveComponent("Badge");return f.openBlock(),f.createBlock(Kt.Transition,{name:"zoom",mode:"out-in"},{default:f.withCtx(()=>[f.withDirectives(f.createBaseVNode("div",{class:f.normalizeClass(["toolbar-container",r.showTool?"zoom-in":"zoom-out "])},[h.curComponent.name?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle({"grid-template-columns":h.columns,"grid-template-rows":h.rows}),class:"toolbar-wrap"},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(g.configList,w=>(f.openBlock(),f.createElementBlock("div",{class:"flex justify-center items-center",onClick:C=>g.configHandle(w),style:f.normalizeStyle({"grid-area":w["grid-area"]})},[f.createBaseVNode("div",{title:w.label,class:"flex flex-col justify-center items-center"},[f.createBaseVNode("div",o1,[f.createBaseVNode("i",a1,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(w.icon)))]),w.isShowBadge?(f.openBlock(),f.createBlock(y,{key:0,value:r.badgeValue},null,8,["value"])):f.createCommentVNode("",!0)]),f.createBaseVNode("span",u1,f.toDisplayString(w.label),1)],8,i1)],12,r1))),256))],4)),h.curComponent.name?(f.openBlock(),f.createElementBlock("div",s1,[h.curComponent.name==="theme"?(f.openBlock(),f.createElementBlock("div",l1,[f.createBaseVNode("div",{class:"flex flex-col toolbar-center items-center",onClick:i[0]||(i[0]=w=>h.curComponent={}),title:"返回"},[f.createBaseVNode("i",f1,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(h.curComponent.icon)))])]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(h.curComponent.data,(w,C)=>(f.openBlock(),f.createElementBlock("div",{style:f.normalizeStyle([{background:w.themeColor,boxShadow:`0px 4px 7px 0px ${w.themeColor}`},g.getPosition(C)]),title:w.name,class:f.normalizeClass(["theme",h.curTheme===w.id?"select":""]),onClick:N=>g.chooseTheme(w)},null,14,c1))),256))])):h.curComponent.name==="lang"?(f.openBlock(),f.createElementBlock("div",d1,[f.createBaseVNode("div",{onClick:i[1]||(i[1]=w=>h.curComponent={}),class:"px-10 cursor-pointer"},"返回"),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(h.langList,w=>(f.openBlock(),f.createElementBlock("div",{onClick:C=>g.changeLang(w.lang),title:w.name,class:"px-10 cursor-pointer mt-10 whitespace-nowrap truncate"},f.toDisplayString(w.name),9,h1))),256))])):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],2),[[Kt.vShow,r.showTool]])]),_:1})}const g1=rr(n1,[["render",p1],["__scopeId","data-v-b8083f17"]]),v1={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",fill:"none",viewBox:"0 0 25 25"},m1=f.createBaseVNode("g",{stroke:"currentColor","stroke-linejoin":"round","stroke-width":"2"},[f.createBaseVNode("path",{d:"M9 3H4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM9 14H4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1ZM20 3h-5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM20 14h-5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1Z"})],-1),_1=[m1];function y1(a,i){return f.openBlock(),f.createElementBlock("svg",v1,_1)}const w1={render:y1},rs={name:"YxToolbar",components:{ToolbarContainer:g1,menuIcon:w1,Badge:sc},mixins:[B0],data(){return{showTool:!1,position:{top:0,left:0},badgeValue:0,showBadge:window.isRenderIssue}},computed:{showClass(){return this.status?"expanded":"folded"}},mounted(){this.showBadge&&this.getCount(),this.initToolPosition()},methods:{initToolPosition(){const a=document.querySelector(".toolbar-wrap"),i=window.innerWidth-60-100+"px",r=window.innerHeight-60-100+"px";a.style.setProperty("--tool-left",i),a.style.setProperty("--tool-top",r)},getCount(){return et(this,null,function*(){const{data:a}=yield Xu.getCommentUntreatedCount();this.badgeValue=a.count})},handlerClickTool(a){this.mousePoint.x===a.screenX&&this.mousePoint.y===a.screenY&&(this.switchStatus(),this.getAllPosition(),this.setPanel(),this.showTool=!0)},switchStatus(){this.status=!this.status},getAllPosition(){this.toolPos=this.getDomPosition(this.toolDom),this.panelPos=this.getDomPosition(this.panelDom)},getDomPosition(a){return a.getBoundingClientRect()},setPanel(){const r=window.innerWidth-this.panelWidth,u=window.innerHeight-this.panelHeight;let h=this.toolPos.left+this.toolPos.width/2-this.panelWidth/2,g=this.toolPos.top+this.toolPos.height/2-this.panelHeight/2;h<0&&(h=0),g<0&&(g=0),h>r&&(h=r-40),g>u&&(g=u-40),this.setPanelPosition(h,g)},setPanelPosition(a,i){this.panelDom.style.left=a+"px",this.panelDom.style.top=i+"px"},mousedownTool(a){this.mousePoint.x=a.screenX,this.mousePoint.y=a.screenY},close(){this.status=!1,this.showTool=!1}}},Bf=()=>{Kt.useCssVars(a=>({"7d9b552a":a.panelWidthPX,"53d65213":a.panelHeightPX}))},Rf=rs.setup;rs.setup=Rf?(a,i)=>(Bf(),Rf(a,i)):Bf;const b1={id:"toolbar-wrap",class:"toolbar-wrap"},x1={class:"yx-icon"};function S1(a,i,r,u,h,g){const y=f.resolveComponent("Badge"),w=f.resolveComponent("ToolbarContainer");return f.openBlock(),f.createElementBlock("div",b1,[f.createBaseVNode("div",{class:f.normalizeClass(["tool",`${g.showClass}`]),onClick:i[0]||(i[0]=(...C)=>g.handlerClickTool&&g.handlerClickTool(...C)),onMousedown:i[1]||(i[1]=(...C)=>g.mousedownTool&&g.mousedownTool(...C)),onMouseup:i[2]||(i[2]=(...C)=>a.mouseupTool&&a.mouseupTool(...C))},[f.createBaseVNode("i",x1,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent("menuIcon")))]),h.showBadge?(f.openBlock(),f.createBlock(y,{key:0,value:h.badgeValue},null,8,["value"])):f.createCommentVNode("",!0)],34),f.createBaseVNode("div",{class:f.normalizeClass(["mask",`${g.showClass}`]),onClick:i[3]||(i[3]=(...C)=>g.close&&g.close(...C))},null,2),f.createVNode(w,{onZero:i[4]||(i[4]=C=>h.badgeValue=0),badgeValue:h.badgeValue,class:"panel",showTool:h.showTool},null,8,["badgeValue","showTool"])])}const Of=rr(rs,[["render",S1],["__scopeId","data-v-1d4b1d0f"]]);var Fr;const Lr=class Lr{constructor(i){mf(this,Fr,"yxToolbarV2");const{theme:r,isRenderIssue:u,isRenderLang:h}=i;return Lr.instance||(window.theme=r,window.isRenderIssue=u,window.isRenderLang=h,this.init(),Lr.instance=this),Lr.instance}get vueVersion(){return f.version[0]}init(){this.mount()}mount(){const i=document.createElement("div");if(i.id=To(this,Fr),document.body.appendChild(i),this.vueVersion==="3")return Kt.createApp(Of).mount(`#${To(this,Fr)}`);{const r=require("vue");return new r({render:u=>u(Of)}).$mount(`#${To(this,Fr)}`)}}};Fr=new WeakMap,Lr.instance=null;let vi=Lr;const lc=Object.freeze(Object.defineProperty({__proto__:null,Toolbar:vi,Update:tc,YxDialog:Pf,YxForm:Qf,YxFormV2:ic,YxIcon:nc,YxSearchForm:Jf,YxTable:Zf,YxUpload:rc},Symbol.toStringTag,{value:"Module"})),fc=a=>et(exports,null,function*(){var r;a=Je(Je({},b_),a);let i=mi();try{yield E1(a);const{data:u}=yield Kt.http.get(a.themeApiUrl);if(a.isRenderLang&&a.systemKey){const y=yield ts();yield ju({to:y||a.lang,systemKey:a.systemKey})}a.isRenderToolbar&&new vi({theme:u,isRenderIssue:a.isRenderIssue,isRenderLang:a.isRenderLang});let h=i?(r=u.find(y=>y.id===i))==null?void 0:r.themeUrl:"";if(!i||!h){const w=u.find(C=>C.defaultTheme===1)||u[0];h=w.themeUrl,i=w.id}const g=yield Gu(h);cc({themeCssVar:g,themeId:i}),Lf(),bi.onmessage=y=>{const w=JSON.parse(y.data);w.type==="theme"&&(Gu(w.data.themeUrl),Yo.yxSubscribe.publish({type:"theme",data:null})),w.type==="lang"&&location.reload()}}catch(u){Lf(),os()}}),E1=a=>et(exports,null,function*(){Kt.setSystemConfig(Je({},a))}),Lf=()=>{const a=document.createElement("style");a.innerHTML=w_,document.head.appendChild(a)},cc=({themeCssVar:a,themeId:i})=>{const r=localStorage.getItem("ttcGlobalState")||"{}",u=JSON.parse(r);u.theme={themeCssVar:a,id:i},localStorage.setItem("ttcGlobalState",JSON.stringify(u))},is=a=>et(exports,null,function*(){const i=yield Gu(a.themeUrl);cc({themeCssVar:i,themeId:a==null?void 0:a.id}),bi.postMessage(JSON.stringify({type:"theme",data:a})),Yo.yxSubscribe.publish({type:"theme",data:a})}),os=()=>{const a=wi(),i=document.documentElement;Object.keys(a).forEach(r=>{r!=="exclude"&&Object.keys(a[r]).forEach(u=>{const h=`--${r}-${u}`;i.style.setProperty(h,a[r][u])})})},Gu=a=>et(exports,null,function*(){const r=yield(yield fetch(a)).json(),u=document.createElement("style");let h=`:root {
39
39
  `;return Object.keys(r).forEach(g=>{g!=="exclude"&&Object.keys(r[g]).forEach(y=>{const w=`--${g}-${y}`,C=r[g][y];h+=` ${w}: ${C};
40
40
  `})}),h+="}",u.appendChild(document.createTextNode(h)),document.head.appendChild(u),r}),dc=()=>et(exports,null,function*(){const{data:a}=yield Xu.getUserThemeList(),i=a.find(u=>u.defaultTheme===1);return i?i.themeUrl:a[0].themeUrl}),mi=()=>{var r;const a=localStorage.getItem("ttcGlobalState"),i=a&&((r=JSON.parse(a))==null?void 0:r.theme);return(i==null?void 0:i.id)||null},wi=()=>{var r;const a=localStorage.getItem("ttcGlobalState"),i=a&&((r=JSON.parse(a))==null?void 0:r.theme);return(i==null?void 0:i.themeCssVar)||{}},hc=a=>{const i=wi();return(i==null?void 0:i[a])||{}},pc=(a,i)=>{const r=wi();if(!r.exclude)return null;for(let u in r.exclude){const h=r.exclude[u];for(let g of Object.keys(h))for(let y of Object.keys(h[g]))if(`--${g}-${y}`===a&&Yo.isColorEqual(h[g][y],i))return i}return null},gc=Object.freeze(Object.defineProperty({__proto__:null,changeTheme:is,findColorByTheme:pc,getCurTheme:mi,getCurThemeCssVar:wi,getDefaultThemeUrl:dc,getGroupColor:hc,install:fc,updateTheme:os},Symbol.toStringTag,{value:"Module"})),T1={install:a=>{a.config.globalProperties.$yx18n=i=>ns(i)}},vc=Object.freeze(Object.defineProperty({__proto__:null,default:T1},Symbol.toStringTag,{value:"Module"})),bi=new BroadcastChannel("YXUSE_BC"),C1={utils:Yo.utils2,api:Xu.api2,theme:gc,components:lc,directives:g_.directives,BC:bi,translate:uc,yxi18n:vc,yxHooks:$t.yxHooks,yxIcon:h_.yxIcon2};exports.BC=bi;exports.Toolbar=vi;exports.Update=tc;exports._sfc_main=Pf;exports._sfc_main$1=Zf;exports._sfc_main$2=rc;exports._sfc_main$3=ic;exports.changeLang=es;exports.changeTheme=is;exports.components2=lc;exports.findColorByTheme=pc;exports.form=Qf;exports.getCurTheme=mi;exports.getCurThemeCssVar=wi;exports.getDefaultThemeUrl=dc;exports.getGroupColor=hc;exports.getLang=ts;exports.getWordByYxI18nThesaurus=ns;exports.getZhWordByYxI18nThesaurus=ac;exports.index=Jf;exports.index$1=nc;exports.index$2=C1;exports.initTranslate=ju;exports.install=fc;exports.theme2=gc;exports.translate2=uc;exports.updateTheme=os;exports.yxi18n2=vc;
Binary file
package/lib/index.es2.js CHANGED
@@ -7468,7 +7468,7 @@ class M1 {
7468
7468
  this.handleChildListMutation(u);
7469
7469
  break;
7470
7470
  case "attributes":
7471
- u.attributeName === "placeholder" && Kt.test(u.target.placeholder) ? this.replaceInputValue(u.target, "placeholder") : u.attributeName === "readonly" && this.replaceInputValue(u.target, "value");
7471
+ u.attributeName === "placeholder" && Kt.test(u.target.placeholder) ? this.replaceInputValue(u.target, "placeholder") : u.attributeName === "readonly" && (this.replaceInputValue(u.target, "placeholder"), this.replaceInputValue(u.target, "value"));
7472
7472
  break;
7473
7473
  }
7474
7474
  });
@@ -7499,7 +7499,7 @@ class M1 {
7499
7499
  return;
7500
7500
  const _ = (h = i.addedNodes[0]) == null ? void 0 : h.className, y = i.target.nodeValue;
7501
7501
  if (_ && _ !== "")
7502
- _.includes("v-modal") ? this.throttleTraversingNode(i.previousSibling) : _.includes("tooltip") ? this.replaceValue("innerText", i.addedNodes[0]) : _.includes("message") ? this.throttleTraversingNode(i.addedNodes[0]) : _.includes("loading") ? i.addedNodes[0].childNodes[0].nodeValue && this.replaceValue("nodeValue", i.addedNodes[0].childNodes[0]) : y ? this.replaceValue("nodeValue", i.target) : Kt.test(i.addedNodes[0].innerText) && this.throttleTraversingNode(i.addedNodes[0]);
7502
+ _.includes("v-modal") ? this.throttleTraversingNode(i.previousSibling) : _.includes("tooltip") ? this.replaceValue("innerText", i.addedNodes[0]) : _.includes("message") ? this.throttleTraversingNode(i.addedNodes[0]) : _.includes("loading") ? i.addedNodes[0].childNodes.length > 0 && i.addedNodes[0].childNodes[0].nodeValue && this.replaceValue("nodeValue", i.addedNodes[0].childNodes[0]) : y ? this.replaceValue("nodeValue", i.target) : Kt.test(i.addedNodes[0].innerText) && this.throttleTraversingNode(i.addedNodes[0]);
7503
7503
  else {
7504
7504
  const E = i.addedNodes[0];
7505
7505
  E && E.nodeType === Node.TEXT_NODE && Kt.test(E.nodeValue) ? this.replaceValue("nodeValue", E) : this.throttleTraversingNode(E);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yxuse",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "keywords": [
5
5
  "yx"
6
6
  ],