st-comp 0.0.195 → 0.0.196
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/es/VarietySearch.cjs +2 -2
- package/es/VarietySearch.js +891 -891
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +2 -2
- package/lib/{index-ec9fb74c.js → index-dac23ed6.js} +4 -4
- package/lib/{python-9c93f491.js → python-fdc6b946.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietySearch/components/FactorScreen/index.vue +4 -0
package/lib/bundle.js
CHANGED
package/lib/bundle.umd.cjs
CHANGED
|
@@ -820,9 +820,9 @@ ${u.data.colorValue}`}}],data:o.data.map(u=>({...u,itemStyle:{color:u.color},chi
|
|
|
820
820
|
`:">",o},fg.prototype.renderInline=function(n,e,t){let i="";const r=this.rules;for(let o=0,s=n.length;o<s;o++){const a=n[o].type;typeof r[a]<"u"?i+=r[a](n,o,e,t,this):i+=this.renderToken(n,o,e)}return i},fg.prototype.renderInlineAsText=function(n,e,t){let i="";for(let r=0,o=n.length;r<o;r++)switch(n[r].type){case"text":i+=n[r].content;break;case"image":i+=this.renderInlineAsText(n[r].children,e,t);break;case"html_inline":case"html_block":i+=n[r].content;break;case"softbreak":case"hardbreak":i+=`
|
|
821
821
|
`;break}return i},fg.prototype.render=function(n,e,t){let i="";const r=this.rules;for(let o=0,s=n.length;o<s;o++){const a=n[o].type;a==="inline"?i+=this.renderInline(n[o].children,e,t):typeof r[a]<"u"?i+=r[a](n,o,e,t,this):i+=this.renderToken(n,o,e,t)}return i};function ma(){this.__rules__=[],this.__cache__=null}ma.prototype.__find__=function(n){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===n)return e;return-1},ma.prototype.__compile__=function(){const n=this,e=[""];n.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(i){e.indexOf(i)<0&&e.push(i)})}),n.__cache__={},e.forEach(function(t){n.__cache__[t]=[],n.__rules__.forEach(function(i){i.enabled&&(t&&i.alt.indexOf(t)<0||n.__cache__[t].push(i.fn))})})},ma.prototype.at=function(n,e,t){const i=this.__find__(n),r=t||{};if(i===-1)throw new Error("Parser rule not found: "+n);this.__rules__[i].fn=e,this.__rules__[i].alt=r.alt||[],this.__cache__=null},ma.prototype.before=function(n,e,t,i){const r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},ma.prototype.after=function(n,e,t,i){const r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},ma.prototype.push=function(n,e,t){const i=t||{};this.__rules__.push({name:n,enabled:!0,fn:e,alt:i.alt||[]}),this.__cache__=null},ma.prototype.enable=function(n,e){Array.isArray(n)||(n=[n]);const t=[];return n.forEach(function(i){const r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,t.push(i)},this),this.__cache__=null,t},ma.prototype.enableOnly=function(n,e){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(n,e)},ma.prototype.disable=function(n,e){Array.isArray(n)||(n=[n]);const t=[];return n.forEach(function(i){const r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,t.push(i)},this),this.__cache__=null,t},ma.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};function ju(n,e,t){this.type=n,this.tag=e,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ju.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let i=0,r=t.length;i<r;i++)if(t[i][0]===e)return i;return-1},ju.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},ju.prototype.attrSet=function(e,t){const i=this.attrIndex(e),r=[e,t];i<0?this.attrPush(r):this.attrs[i]=r},ju.prototype.attrGet=function(e){const t=this.attrIndex(e);let i=null;return t>=0&&(i=this.attrs[t][1]),i},ju.prototype.attrJoin=function(e,t){const i=this.attrIndex(e);i<0?this.attrPush([e,t]):this.attrs[i][1]=this.attrs[i][1]+" "+t};function Ide(n,e,t){this.src=n,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Ide.prototype.Token=ju;const oDt=/\r\n?|\n/g,sDt=/\0/g;function aDt(n){let e;e=n.src.replace(oDt,`
|
|
822
822
|
`),e=e.replace(sDt,"�"),n.src=e}function lDt(n){let e;n.inlineMode?(e=new n.Token("inline","",0),e.content=n.src,e.map=[0,1],e.children=[],n.tokens.push(e)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}function uDt(n){const e=n.tokens;for(let t=0,i=e.length;t<i;t++){const r=e[t];r.type==="inline"&&n.md.inline.parse(r.content,n.md,n.env,r.children)}}function cDt(n){return/^<a[>\s]/i.test(n)}function dDt(n){return/^<\/a\s*>/i.test(n)}function hDt(n){const e=n.tokens;if(n.md.options.linkify)for(let t=0,i=e.length;t<i;t++){if(e[t].type!=="inline"||!n.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let s=r.length-1;s>=0;s--){const a=r[s];if(a.type==="link_close"){for(s--;r[s].level!==a.level&&r[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(cDt(a.content)&&o>0&&o--,dDt(a.content)&&o++),!(o>0)&&a.type==="text"&&n.md.linkify.test(a.content)){const l=a.content;let u=n.md.linkify.match(l);const d=[];let h=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&r[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p].url,m=n.md.normalizeLink(g);if(!n.md.validateLink(m))continue;let y=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(y)?y=n.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=n.md.normalizeLinkText(y):y=n.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const b=u[p].index;if(b>f){const w=new n.Token("text","",0);w.content=l.slice(f,b),w.level=h,d.push(w)}const C=new n.Token("link_open","a",1);C.attrs=[["href",m]],C.level=h++,C.markup="linkify",C.info="auto",d.push(C);const _=new n.Token("text","",0);_.content=y,_.level=h,d.push(_);const v=new n.Token("link_close","a",-1);v.level=--h,v.markup="linkify",v.info="auto",d.push(v),f=u[p].lastIndex}if(f<l.length){const p=new n.Token("text","",0);p.content=l.slice(f),p.level=h,d.push(p)}e[t].children=r=Tde(r,s,d)}}}}const Rde=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,fDt=/\((c|tm|r)\)/i,pDt=/\((c|tm|r)\)/ig,gDt={c:"©",r:"®",tm:"™"};function mDt(n,e){return gDt[e.toLowerCase()]}function bDt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&(i.content=i.content.replace(pDt,mDt)),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function _Dt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&Rde.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function yDt(n){let e;if(n.md.options.typographer)for(e=n.tokens.length-1;e>=0;e--)n.tokens[e].type==="inline"&&(fDt.test(n.tokens[e].content)&&bDt(n.tokens[e].children),Rde.test(n.tokens[e].content)&&_Dt(n.tokens[e].children))}const vDt=/['"]/,Ode=/['"]/g,Fde="’";function Iw(n,e,t){return n.slice(0,e)+t+n.slice(e+1)}function CDt(n,e){let t;const i=[];for(let r=0;r<n.length;r++){const o=n[r],s=n[r].level;for(t=i.length-1;t>=0&&!(i[t].level<=s);t--);if(i.length=t+1,o.type!=="text")continue;let a=o.content,l=0,u=a.length;e:for(;l<u;){Ode.lastIndex=l;const d=Ode.exec(a);if(!d)break;let h=!0,f=!0;l=d.index+1;const p=d[0]==="'";let g=32;if(d.index-1>=0)g=a.charCodeAt(d.index-1);else for(t=r-1;t>=0&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t--)if(n[t].content){g=n[t].content.charCodeAt(n[t].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(t=r+1;t<n.length&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t++)if(n[t].content){m=n[t].content.charCodeAt(0);break}const y=H8(g)||z8(String.fromCharCode(g)),b=H8(m)||z8(String.fromCharCode(m)),C=V8(g),_=V8(m);if(_?h=!1:b&&(C||y||(h=!1)),C?f=!1:y&&(_||b||(f=!1)),m===34&&d[0]==='"'&&g>=48&&g<=57&&(f=h=!1),h&&f&&(h=y,f=b),!h&&!f){p&&(o.content=Iw(o.content,d.index,Fde));continue}if(f)for(t=i.length-1;t>=0;t--){let v=i[t];if(i[t].level<s)break;if(v.single===p&&i[t].level===s){v=i[t];let w,x;p?(w=e.md.options.quotes[2],x=e.md.options.quotes[3]):(w=e.md.options.quotes[0],x=e.md.options.quotes[1]),o.content=Iw(o.content,d.index,x),n[v.token].content=Iw(n[v.token].content,v.pos,w),l+=x.length-1,v.token===r&&(l+=w.length-1),a=o.content,u=a.length,i.length=t;continue e}}h?i.push({token:r,pos:d.index,single:p,level:s}):f&&p&&(o.content=Iw(o.content,d.index,Fde))}}}function wDt(n){if(n.md.options.typographer)for(let e=n.tokens.length-1;e>=0;e--)n.tokens[e].type!=="inline"||!vDt.test(n.tokens[e].content)||CDt(n.tokens[e].children,n)}function xDt(n){let e,t;const i=n.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;const s=i[o].children,a=s.length;for(e=0;e<a;e++)s[e].type==="text_special"&&(s[e].type="text");for(e=t=0;e<a;e++)s[e].type==="text"&&e+1<a&&s[e+1].type==="text"?s[e+1].content=s[e].content+s[e+1].content:(e!==t&&(s[t]=s[e]),t++);e!==t&&(s.length=t)}}const TO=[["normalize",aDt],["block",lDt],["inline",uDt],["linkify",hDt],["replacements",yDt],["smartquotes",wDt],["text_join",xDt]];function AO(){this.ruler=new ma;for(let n=0;n<TO.length;n++)this.ruler.push(TO[n][0],TO[n][1])}AO.prototype.process=function(n){const e=this.ruler.getRules("");for(let t=0,i=e.length;t<i;t++)e[t](n)},AO.prototype.State=Ide;function Yc(n,e,t,i){this.src=n,this.md=e,this.env=t,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,s=0,a=0,l=0,u=r.length,d=!1;s<u;s++){const h=r.charCodeAt(s);if(!d)if(Ui(h)){a++,h===9?l+=4-l%4:l++;continue}else d=!0;(h===10||s===u-1)&&(h!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Yc.prototype.push=function(n,e,t){const i=new ju(n,e,t);return i.block=!0,t<0&&this.level--,i.level=this.level,t>0&&this.level++,this.tokens.push(i),i},Yc.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Yc.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Yc.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const i=this.src.charCodeAt(e);if(!Ui(i))break}return e},Yc.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Ui(this.src.charCodeAt(--e)))return e+1;return e},Yc.prototype.skipChars=function(e,t){for(let i=this.src.length;e<i&&this.src.charCodeAt(e)===t;e++);return e},Yc.prototype.skipCharsBack=function(e,t,i){if(e<=i)return e;for(;e>i;)if(t!==this.src.charCodeAt(--e))return e+1;return e},Yc.prototype.getLines=function(e,t,i,r){if(e>=t)return"";const o=new Array(t-e);for(let s=0,a=e;a<t;a++,s++){let l=0;const u=this.bMarks[a];let d=u,h;for(a+1<t||r?h=this.eMarks[a]+1:h=this.eMarks[a];d<h&&l<i;){const f=this.src.charCodeAt(d);if(Ui(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-u<this.tShift[a])l++;else break;d++}l>i?o[s]=new Array(l-i+1).join(" ")+this.src.slice(d,h):o[s]=this.src.slice(d,h)}return o.join("")},Yc.prototype.Token=ju;const SDt=65536;function IO(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];return n.src.slice(t,i)}function Pde(n){const e=[],t=n.length;let i=0,r=n.charCodeAt(i),o=!1,s=0,a="";for(;i<t;)r===124&&(o?(a+=n.substring(s,i-1),s=i):(e.push(a+n.substring(s,i)),a="",s=i+1)),o=r===92,i++,r=n.charCodeAt(i);return e.push(a+n.substring(s)),e}function DDt(n,e,t,i){if(e+2>t)return!1;let r=e+1;if(n.sCount[r]<n.blkIndent||n.sCount[r]-n.blkIndent>=4)return!1;let o=n.bMarks[r]+n.tShift[r];if(o>=n.eMarks[r])return!1;const s=n.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=n.eMarks[r])return!1;const a=n.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!Ui(a)||s===45&&Ui(a))return!1;for(;o<n.eMarks[r];){const v=n.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!Ui(v))return!1;o++}let l=IO(n,e+1),u=l.split("|");const d=[];for(let v=0;v<u.length;v++){const w=u[v].trim();if(!w){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?d.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=IO(n,e).trim(),l.indexOf("|")===-1||n.sCount[e]-n.blkIndent>=4)return!1;u=Pde(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const h=u.length;if(h===0||h!==d.length)return!1;if(i)return!0;const f=n.parentType;n.parentType="table";const p=n.md.block.ruler.getRules("blockquote"),g=n.push("table_open","table",1),m=[e,0];g.map=m;const y=n.push("thead_open","thead",1);y.map=[e,e+1];const b=n.push("tr_open","tr",1);b.map=[e,e+1];for(let v=0;v<u.length;v++){const w=n.push("th_open","th",1);d[v]&&(w.attrs=[["style","text-align:"+d[v]]]);const x=n.push("inline","",0);x.content=u[v].trim(),x.children=[],n.push("th_close","th",-1)}n.push("tr_close","tr",-1),n.push("thead_close","thead",-1);let C,_=0;for(r=e+2;r<t&&!(n.sCount[r]<n.blkIndent);r++){let v=!1;for(let x=0,S=p.length;x<S;x++)if(p[x](n,r,t,!0)){v=!0;break}if(v||(l=IO(n,r).trim(),!l)||n.sCount[r]-n.blkIndent>=4||(u=Pde(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),_+=h-u.length,_>SDt))break;if(r===e+2){const x=n.push("tbody_open","tbody",1);x.map=C=[e+2,0]}const w=n.push("tr_open","tr",1);w.map=[r,r+1];for(let x=0;x<h;x++){const S=n.push("td_open","td",1);d[x]&&(S.attrs=[["style","text-align:"+d[x]]]);const D=n.push("inline","",0);D.content=u[x]?u[x].trim():"",D.children=[],n.push("td_close","td",-1)}n.push("tr_close","tr",-1)}return C&&(n.push("tbody_close","tbody",-1),C[1]=r),n.push("table_close","table",-1),m[1]=r,n.parentType=f,n.line=r,!0}function NDt(n,e,t){if(n.sCount[e]-n.blkIndent<4)return!1;let i=e+1,r=i;for(;i<t;){if(n.isEmpty(i)){i++;continue}if(n.sCount[i]-n.blkIndent>=4){i++,r=i;continue}break}n.line=r;const o=n.push("code_block","code",0);return o.content=n.getLines(e,r,4+n.blkIndent,!1)+`
|
|
823
|
-
`,o.map=[e,n.line],!0}function EDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||r+3>o)return!1;const s=n.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=n.skipChars(r,s);let l=r-a;if(l<3)return!1;const u=n.src.slice(a,r),d=n.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let h=e,f=!1;for(;h++,!(h>=t||(r=a=n.bMarks[h]+n.tShift[h],o=n.eMarks[h],r<o&&n.sCount[h]<n.blkIndent));)if(n.src.charCodeAt(r)===s&&!(n.sCount[h]-n.blkIndent>=4)&&(r=n.skipChars(r,s),!(r-a<l)&&(r=n.skipSpaces(r),!(r<o)))){f=!0;break}l=n.sCount[e],n.line=h+(f?1:0);const p=n.push("fence","code",0);return p.info=d,p.content=n.getLines(e+1,h,l,!0),p.markup=u,p.map=[e,n.line],!0}function kDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];const s=n.lineMax;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],l=[],u=[],d=[],h=n.md.block.ruler.getRules("blockquote"),f=n.parentType;n.parentType="blockquote";let p=!1,g;for(g=e;g<t;g++){const _=n.sCount[g]<n.blkIndent;if(r=n.bMarks[g]+n.tShift[g],o=n.eMarks[g],r>=o)break;if(n.src.charCodeAt(r++)===62&&!_){let w=n.sCount[g]+1,x,S;n.src.charCodeAt(r)===32?(r++,w++,S=!1,x=!0):n.src.charCodeAt(r)===9?(x=!0,(n.bsCount[g]+w)%4===3?(r++,w++,S=!1):S=!0):x=!1;let D=w;for(a.push(n.bMarks[g]),n.bMarks[g]=r;r<o;){const N=n.src.charCodeAt(r);if(Ui(N))N===9?D+=4-(D+n.bsCount[g]+(S?1:0))%4:D++;else break;r++}p=r>=o,l.push(n.bsCount[g]),n.bsCount[g]=n.sCount[g]+1+(x?1:0),u.push(n.sCount[g]),n.sCount[g]=D-w,d.push(n.tShift[g]),n.tShift[g]=r-n.bMarks[g];continue}if(p)break;let v=!1;for(let w=0,x=h.length;w<x;w++)if(h[w](n,g,t,!0)){v=!0;break}if(v){n.lineMax=g,n.blkIndent!==0&&(a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]-=n.blkIndent);break}a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]=-1}const m=n.blkIndent;n.blkIndent=0;const y=n.push("blockquote_open","blockquote",1);y.markup=">";const b=[e,0];y.map=b,n.md.block.tokenize(n,e,g);const C=n.push("blockquote_close","blockquote",-1);C.markup=">",n.lineMax=s,n.parentType=f,b[1]=n.line;for(let _=0;_<d.length;_++)n.bMarks[_+e]=a[_],n.tShift[_+e]=d[_],n.sCount[_+e]=u[_],n.bsCount[_+e]=l[_];return n.blkIndent=m,!0}function LDt(n,e,t,i){const r=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let o=n.bMarks[e]+n.tShift[e];const s=n.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){const u=n.src.charCodeAt(o++);if(u!==s&&!Ui(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;n.line=e+1;const l=n.push("hr","hr",0);return l.map=[e,n.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Bde(n,e){const t=n.eMarks[e];let i=n.bMarks[e]+n.tShift[e];const r=n.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<t){const o=n.src.charCodeAt(i);if(!Ui(o))return-1}return i}function Vde(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];let r=t;if(r+1>=i)return-1;let o=n.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=n.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=n.src.charCodeAt(r),!Ui(o))?-1:r}function MDt(n,e){const t=n.level+2;for(let i=e+2,r=n.tokens.length-2;i<r;i++)n.tokens[i].level===t&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}function TDt(n,e,t,i){let r,o,s,a,l=e,u=!0;if(n.sCount[l]-n.blkIndent>=4||n.listIndent>=0&&n.sCount[l]-n.listIndent>=4&&n.sCount[l]<n.blkIndent)return!1;let d=!1;i&&n.parentType==="paragraph"&&n.sCount[l]>=n.blkIndent&&(d=!0);let h,f,p;if((p=Vde(n,l))>=0){if(h=!0,s=n.bMarks[l]+n.tShift[l],f=Number(n.src.slice(s,p-1)),d&&f!==1)return!1}else if((p=Bde(n,l))>=0)h=!1;else return!1;if(d&&n.skipSpaces(p)>=n.eMarks[l])return!1;if(i)return!0;const g=n.src.charCodeAt(p-1),m=n.tokens.length;h?(a=n.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=n.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(g);let b=!1;const C=n.md.block.ruler.getRules("list"),_=n.parentType;for(n.parentType="list";l<t;){o=p,r=n.eMarks[l];const v=n.sCount[l]+p-(n.bMarks[l]+n.tShift[l]);let w=v;for(;o<r;){const B=n.src.charCodeAt(o);if(B===9)w+=4-(w+n.bsCount[l])%4;else if(B===32)w++;else break;o++}const x=o;let S;x>=r?S=1:S=w-v,S>4&&(S=1);const D=v+S;a=n.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,h&&(a.info=n.src.slice(s,p-1));const k=n.tight,E=n.tShift[l],L=n.sCount[l],A=n.listIndent;if(n.listIndent=n.blkIndent,n.blkIndent=D,n.tight=!0,n.tShift[l]=x-n.bMarks[l],n.sCount[l]=w,x>=r&&n.isEmpty(l+1)?n.line=Math.min(n.line+2,t):n.md.block.tokenize(n,l,t,!0),(!n.tight||b)&&(u=!1),b=n.line-l>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=A,n.tShift[l]=E,n.sCount[l]=L,n.tight=k,a=n.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=n.line,N[1]=l,l>=t||n.sCount[l]<n.blkIndent||n.sCount[l]-n.blkIndent>=4)break;let R=!1;for(let B=0,I=C.length;B<I;B++)if(C[B](n,l,t,!0)){R=!0;break}if(R)break;if(h){if(p=Vde(n,l),p<0)break;s=n.bMarks[l]+n.tShift[l]}else if(p=Bde(n,l),p<0)break;if(g!==n.src.charCodeAt(p-1))break}return h?a=n.push("ordered_list_close","ol",-1):a=n.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),y[1]=l,n.line=l,n.parentType=_,u&&MDt(n,m),!0}function ADt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e],s=e+1;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==91)return!1;function a(C){const _=n.lineMax;if(C>=_||n.isEmpty(C))return null;let v=!1;if(n.sCount[C]-n.blkIndent>3&&(v=!0),n.sCount[C]<0&&(v=!0),!v){const S=n.md.block.ruler.getRules("reference"),D=n.parentType;n.parentType="reference";let N=!1;for(let k=0,E=S.length;k<E;k++)if(S[k](n,C,_,!0)){N=!0;break}if(n.parentType=D,N)return null}const w=n.bMarks[C]+n.tShift[C],x=n.eMarks[C];return n.src.slice(w,x+1)}let l=n.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){const C=l.charCodeAt(r);if(C===91)return!1;if(C===93){u=r;break}else if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(C===92&&(r++,r<o&&l.charCodeAt(r)===10)){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}const d=n.md.helpers.parseLinkDestination(l,r,o);if(!d.ok)return!1;const h=n.md.normalizeLink(d.str);if(!n.md.validateLink(h))return!1;r=d.pos;const f=r,p=s,g=r;for(;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}let m=n.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const C=a(s);if(C===null)break;l+=C,r=o,o=l.length,s++,m=n.md.helpers.parseLinkTitle(l,r,o,m)}let y;for(r<o&&g!==r&&m.ok?(y=m.str,r=m.pos):(y="",r=f,s=p);r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10&&y)for(y="",r=f,s=p;r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const b=Aw(l.slice(1,u));return b?(i||(typeof n.env.references>"u"&&(n.env.references={}),typeof n.env.references[b]>"u"&&(n.env.references[b]={title:y,href:h}),n.line=s),!0):!1}const IDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],RDt="[a-zA-Z_:][a-zA-Z0-9:._-]*",ODt="[^\"'=<>`\\x00-\\x20]+",FDt="'[^']*'",PDt='"[^"]*"',BDt="(?:"+ODt+"|"+FDt+"|"+PDt+")",zde="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+RDt+"(?:\\s*=\\s*"+BDt+")?)")+"*\\s*\\/?>",Hde="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",VDt="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",zDt="<[?][\\s\\S]*?[?]>",HDt="<![A-Za-z][^>]*>",jDt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",WDt=new RegExp("^(?:"+zde+"|"+Hde+"|"+VDt+"|"+zDt+"|"+HDt+"|"+jDt+")"),$Dt=new RegExp("^(?:"+zde+"|"+Hde+")"),pg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+IDt.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp($Dt.source+"\\s*$"),/^$/,!1]];function UDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||!n.md.options.html||n.src.charCodeAt(r)!==60)return!1;let s=n.src.slice(r,o),a=0;for(;a<pg.length&&!pg[a][0].test(s);a++);if(a===pg.length)return!1;if(i)return pg[a][2];let l=e+1;if(!pg[a][1].test(s)){for(;l<t&&!(n.sCount[l]<n.blkIndent);l++)if(r=n.bMarks[l]+n.tShift[l],o=n.eMarks[l],s=n.src.slice(r,o),pg[a][1].test(s)){s.length!==0&&l++;break}}n.line=l;const u=n.push("html_block","",0);return u.map=[e,l],u.content=n.getLines(e,l,n.blkIndent,!0),!0}function qDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let s=n.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=n.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=n.src.charCodeAt(++r);if(a>6||r<o&&!Ui(s))return!1;if(i)return!0;o=n.skipSpacesBack(o,r);const l=n.skipCharsBack(o,35,r);l>r&&Ui(n.src.charCodeAt(l-1))&&(o=l),n.line=e+1;const u=n.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,n.line];const d=n.push("inline","",0);d.content=n.src.slice(r,o).trim(),d.map=[e,n.line],d.children=[];const h=n.push("heading_close","h"+String(a),-1);return h.markup="########".slice(0,a),!0}function KDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph");if(n.sCount[e]-n.blkIndent>=4)return!1;const r=n.parentType;n.parentType="paragraph";let o=0,s,a=e+1;for(;a<t&&!n.isEmpty(a);a++){if(n.sCount[a]-n.blkIndent>3)continue;if(n.sCount[a]>=n.blkIndent){let p=n.bMarks[a]+n.tShift[a];const g=n.eMarks[a];if(p<g&&(s=n.src.charCodeAt(p),(s===45||s===61)&&(p=n.skipChars(p,s),p=n.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(n.sCount[a]<0)continue;let f=!1;for(let p=0,g=i.length;p<g;p++)if(i[p](n,a,t,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=n.getLines(e,a,n.blkIndent,!1).trim();n.line=a+1;const u=n.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[e,n.line];const d=n.push("inline","",0);d.content=l,d.map=[e,n.line-1],d.children=[];const h=n.push("heading_close","h"+String(o),-1);return h.markup=String.fromCharCode(s),n.parentType=r,!0}function GDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph"),r=n.parentType;let o=e+1;for(n.parentType="paragraph";o<t&&!n.isEmpty(o);o++){if(n.sCount[o]-n.blkIndent>3||n.sCount[o]<0)continue;let u=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](n,o,t,!0)){u=!0;break}if(u)break}const s=n.getLines(e,o,n.blkIndent,!1).trim();n.line=o;const a=n.push("paragraph_open","p",1);a.map=[e,n.line];const l=n.push("inline","",0);return l.content=s,l.map=[e,n.line],l.children=[],n.push("paragraph_close","p",-1),n.parentType=r,!0}const Rw=[["table",DDt,["paragraph","reference"]],["code",NDt],["fence",EDt,["paragraph","reference","blockquote","list"]],["blockquote",kDt,["paragraph","reference","blockquote","list"]],["hr",LDt,["paragraph","reference","blockquote","list"]],["list",TDt,["paragraph","reference","blockquote"]],["reference",ADt],["html_block",UDt,["paragraph","reference","blockquote"]],["heading",qDt,["paragraph","reference","blockquote"]],["lheading",KDt],["paragraph",GDt]];function Ow(){this.ruler=new ma;for(let n=0;n<Rw.length;n++)this.ruler.push(Rw[n][0],Rw[n][1],{alt:(Rw[n][2]||[]).slice()})}Ow.prototype.tokenize=function(n,e,t){const i=this.ruler.getRules(""),r=i.length,o=n.md.options.maxNesting;let s=e,a=!1;for(;s<t&&(n.line=s=n.skipEmptyLines(s),!(s>=t||n.sCount[s]<n.blkIndent));){if(n.level>=o){n.line=t;break}const l=n.line;let u=!1;for(let d=0;d<r;d++)if(u=i[d](n,s,t,!1),u){if(l>=n.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");n.tight=!a,n.isEmpty(n.line-1)&&(a=!0),s=n.line,s<t&&n.isEmpty(s)&&(a=!0,s++,n.line=s)}},Ow.prototype.parse=function(n,e,t,i){if(!n)return;const r=new this.State(n,e,t,i);this.tokenize(r,r.line,r.lineMax)},Ow.prototype.State=Yc;function j8(n,e,t,i){this.src=n,this.env=t,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}j8.prototype.pushPending=function(){const n=new ju("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n},j8.prototype.push=function(n,e,t){this.pending&&this.pushPending();const i=new ju(n,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},j8.prototype.scanDelims=function(n,e){const t=this.posMax,i=this.src.charCodeAt(n),r=n>0?this.src.charCodeAt(n-1):32;let o=n;for(;o<t&&this.src.charCodeAt(o)===i;)o++;const s=o-n,a=o<t?this.src.charCodeAt(o):32,l=H8(r)||z8(String.fromCharCode(r)),u=H8(a)||z8(String.fromCharCode(a)),d=V8(r),h=V8(a),f=!h&&(!u||d||l),p=!d&&(!l||h||u);return{can_open:f&&(e||!p||l),can_close:p&&(e||!f||u),length:s}},j8.prototype.Token=ju;function YDt(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function QDt(n,e){let t=n.pos;for(;t<n.posMax&&!YDt(n.src.charCodeAt(t));)t++;return t===n.pos?!1:(e||(n.pending+=n.src.slice(n.pos,t)),n.pos=t,!0)}const ZDt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function XDt(n,e){if(!n.md.options.linkify||n.linkLevel>0)return!1;const t=n.pos,i=n.posMax;if(t+3>i||n.src.charCodeAt(t)!==58||n.src.charCodeAt(t+1)!==47||n.src.charCodeAt(t+2)!==47)return!1;const r=n.pending.match(ZDt);if(!r)return!1;const o=r[1],s=n.md.linkify.matchAtStart(n.src.slice(t-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=n.md.normalizeLink(a);if(!n.md.validateLink(l))return!1;if(!e){n.pending=n.pending.slice(0,-o.length);const u=n.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=n.push("text","",0);d.content=n.md.normalizeLinkText(a);const h=n.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return n.pos+=a.length-o.length,!0}function JDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==10)return!1;const i=n.pending.length-1,r=n.posMax;if(!e)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&n.pending.charCodeAt(o-1)===32;)o--;n.pending=n.pending.slice(0,o),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(t++;t<r&&Ui(n.src.charCodeAt(t));)t++;return n.pos=t,!0}const RO=[];for(let n=0;n<256;n++)RO.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){RO[n.charCodeAt(0)]=1});function eNt(n,e){let t=n.pos;const i=n.posMax;if(n.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let r=n.src.charCodeAt(t);if(r===10){for(e||n.push("hardbreak","br",0),t++;t<i&&(r=n.src.charCodeAt(t),!!Ui(r));)t++;return n.pos=t,!0}let o=n.src[t];if(r>=55296&&r<=56319&&t+1<i){const a=n.src.charCodeAt(t+1);a>=56320&&a<=57343&&(o+=n.src[t+1],t++)}const s="\\"+o;if(!e){const a=n.push("text_special","",0);r<256&&RO[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return n.pos=t+1,!0}function tNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=n.posMax;for(;t<o&&n.src.charCodeAt(t)===96;)t++;const s=n.src.slice(r,t),a=s.length;if(n.backticksScanned&&(n.backticks[a]||0)<=r)return e||(n.pending+=s),n.pos+=a,!0;let l=t,u;for(;(u=n.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&n.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===a){if(!e){const h=n.push("code_inline","code",0);h.markup=s,h.content=n.src.slice(t,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return n.pos=l,!0}n.backticks[d]=u}return n.backticksScanned=!0,e||(n.pending+=s),n.pos+=a,!0}function nNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==126)return!1;const r=n.scanDelims(n.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=n.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=n.push("text","",0),a.content=s+s,n.delimiters.push({marker:i,length:0,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return n.pos+=r.length,!0}function jde(n,e){let t;const i=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const a=e[s.end];t=n.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[a.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[a.token-1].type==="text"&&n.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const o=i.pop();let s=o+1;for(;s<n.tokens.length&&n.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=n.tokens[s],n.tokens[s]=n.tokens[o],n.tokens[o]=t)}}function iNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;jde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&jde(n,e[i].delimiters)}const Wde={tokenize:nNt,postProcess:iNt};function rNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==95&&i!==42)return!1;const r=n.scanDelims(n.pos,i===42);for(let o=0;o<r.length;o++){const s=n.push("text","",0);s.content=String.fromCharCode(i),n.delimiters.push({marker:i,length:r.length,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return n.pos+=r.length,!0}function $de(n,e){const t=e.length;for(let i=t-1;i>=0;i--){const r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=n.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=n.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(n.tokens[e[i-1].token].content="",n.tokens[e[r.end+1].token].content="",i--)}}function oNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;$de(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&$de(n,e[i].delimiters)}const Ude={tokenize:rNt,postProcess:oNt};function sNt(n,e){let t,i,r,o,s="",a="",l=n.pos,u=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;const d=n.pos,h=n.posMax,f=n.pos+1,p=n.md.helpers.parseLinkLabel(n,n.pos,!0);if(p<0)return!1;let g=p+1;if(g<h&&n.src.charCodeAt(g)===40){for(u=!1,g++;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(g>=h)return!1;if(l=g,r=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),r.ok){for(s=n.md.normalizeLink(r.str),n.md.validateLink(s)?g=r.pos:s="",l=g;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(r=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<h&&l!==g&&r.ok)for(a=r.str,g=r.pos;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);}(g>=h||n.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof n.env.references>"u")return!1;if(g<h&&n.src.charCodeAt(g)===91?(l=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?i=n.src.slice(l,g++):g=p+1):g=p+1,i||(i=n.src.slice(f,p)),o=n.env.references[Aw(i)],!o)return n.pos=d,!1;s=o.href,a=o.title}if(!e){n.pos=f,n.posMax=p;const m=n.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),n.linkLevel++,n.md.inline.tokenize(n),n.linkLevel--,n.push("link_close","a",-1)}return n.pos=g,n.posMax=h,!0}function aNt(n,e){let t,i,r,o,s,a,l,u,d="";const h=n.pos,f=n.posMax;if(n.src.charCodeAt(n.pos)!==33||n.src.charCodeAt(n.pos+1)!==91)return!1;const p=n.pos+2,g=n.md.helpers.parseLinkLabel(n,n.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&n.src.charCodeAt(o)===40){for(o++;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(o>=f)return!1;for(u=o,a=n.md.helpers.parseLinkDestination(n.src,o,n.posMax),a.ok&&(d=n.md.normalizeLink(a.str),n.md.validateLink(d)?o=a.pos:d=""),u=o;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(a=n.md.helpers.parseLinkTitle(n.src,o,n.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);else l="";if(o>=f||n.src.charCodeAt(o)!==41)return n.pos=h,!1;o++}else{if(typeof n.env.references>"u")return!1;if(o<f&&n.src.charCodeAt(o)===91?(u=o+1,o=n.md.helpers.parseLinkLabel(n,o),o>=0?r=n.src.slice(u,o++):o=g+1):o=g+1,r||(r=n.src.slice(p,g)),s=n.env.references[Aw(r)],!s)return n.pos=h,!1;d=s.href,l=s.title}if(!e){i=n.src.slice(p,g);const m=[];n.md.inline.parse(i,n.md,n.env,m);const y=n.push("image","img",0),b=[["src",d],["alt",""]];y.attrs=b,y.children=m,y.content=i,l&&b.push(["title",l])}return n.pos=o,n.posMax=f,!0}const lNt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,uNt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function cNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==60)return!1;const i=n.pos,r=n.posMax;for(;;){if(++t>=r)return!1;const s=n.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=n.src.slice(i+1,t);if(uNt.test(o)){const s=n.md.normalizeLink(o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}if(lNt.test(o)){const s=n.md.normalizeLink("mailto:"+o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}return!1}function dNt(n){return/^<a[>\s]/i.test(n)}function hNt(n){return/^<\/a\s*>/i.test(n)}function fNt(n){const e=n|32;return e>=97&&e<=122}function pNt(n,e){if(!n.md.options.html)return!1;const t=n.posMax,i=n.pos;if(n.src.charCodeAt(i)!==60||i+2>=t)return!1;const r=n.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!fNt(r))return!1;const o=n.src.slice(i).match(WDt);if(!o)return!1;if(!e){const s=n.push("html_inline","",0);s.content=o[0],dNt(s.content)&&n.linkLevel++,hNt(s.content)&&n.linkLevel--}return n.pos+=o[0].length,!0}const gNt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mNt=/^&([a-z][a-z0-9]{1,31});/i;function bNt(n,e){const t=n.pos,i=n.posMax;if(n.src.charCodeAt(t)!==38||t+1>=i)return!1;if(n.src.charCodeAt(t+1)===35){const o=n.src.slice(t).match(gNt);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=n.push("text_special","",0);a.content=MO(s)?Tw(s):Tw(65533),a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}else{const o=n.src.slice(t).match(mNt);if(o){const s=Mde(o[0]);if(s!==o[0]){if(!e){const a=n.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}}return!1}function qde(n){const e={},t=n.length;if(!t)return;let i=0,r=-2;const o=[];for(let s=0;s<t;s++){const a=n[s];if(o.push(0),(n[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=i-o[i]-1,d=u;for(;u>l;u-=o[u]+1){const h=n[u];if(h.marker===a.marker&&h.open&&h.end<0){let f=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=u>0&&!n[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,h.end=s,h.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function _Nt(n){const e=n.tokens_meta,t=n.tokens_meta.length;qde(n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&qde(e[i].delimiters)}function yNt(n){let e,t,i=0;const r=n.tokens,o=n.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&i--,r[e].level=i,r[e].nesting>0&&i++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const OO=[["text",QDt],["linkify",XDt],["newline",JDt],["escape",eNt],["backticks",tNt],["strikethrough",Wde.tokenize],["emphasis",Ude.tokenize],["link",sNt],["image",aNt],["autolink",cNt],["html_inline",pNt],["entity",bNt]],FO=[["balance_pairs",_Nt],["strikethrough",Wde.postProcess],["emphasis",Ude.postProcess],["fragments_join",yNt]];function W8(){this.ruler=new ma;for(let n=0;n<OO.length;n++)this.ruler.push(OO[n][0],OO[n][1]);this.ruler2=new ma;for(let n=0;n<FO.length;n++)this.ruler2.push(FO[n][0],FO[n][1])}W8.prototype.skipToken=function(n){const e=n.pos,t=this.ruler.getRules(""),i=t.length,r=n.md.options.maxNesting,o=n.cache;if(typeof o[e]<"u"){n.pos=o[e];return}let s=!1;if(n.level<r){for(let a=0;a<i;a++)if(n.level++,s=t[a](n,!0),n.level--,s){if(e>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;s||n.pos++,o[e]=n.pos},W8.prototype.tokenize=function(n){const e=this.ruler.getRules(""),t=e.length,i=n.posMax,r=n.md.options.maxNesting;for(;n.pos<i;){const o=n.pos;let s=!1;if(n.level<r){for(let a=0;a<t;a++)if(s=e[a](n,!1),s){if(o>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(n.pos>=i)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()},W8.prototype.parse=function(n,e,t,i){const r=new this.State(n,e,t,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)},W8.prototype.State=j8;function vNt(n){const e={};n=n||{},e.src_Any=Dde.source,e.src_Cc=Nde.source,e.src_Z=kde.source,e.src_P=NO.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(n["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function PO(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){n[i]=t[i]})}),n}function Fw(n){return Object.prototype.toString.call(n)}function CNt(n){return Fw(n)==="[object String]"}function wNt(n){return Fw(n)==="[object Object]"}function xNt(n){return Fw(n)==="[object RegExp]"}function Kde(n){return Fw(n)==="[object Function]"}function SNt(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Gde={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function DNt(n){return Object.keys(n||{}).reduce(function(e,t){return e||Gde.hasOwnProperty(t)},!1)}const NNt={"http:":{validate:function(n,e,t){const i=n.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,e,t){const i=n.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&n[e-3]===":"||e>=3&&n[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(n,e,t){const i=n.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},ENt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",kNt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function LNt(n){n.__index__=-1,n.__text_cache__=""}function MNt(n){return function(e,t){const i=e.slice(t);return n.test(i)?i.match(n)[0].length:0}}function Yde(){return function(n,e){e.normalize(n)}}function Pw(n){const e=n.re=vNt(n.__opts__),t=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||t.push(ENt),t.push(e.src_xn),e.src_tlds=t.join("|");function i(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const r=[];n.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(n.__schemas__).forEach(function(a){const l=n.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(n.__compiled__[a]=u,wNt(l)){xNt(l.validate)?u.validate=MNt(l.validate):Kde(l.validate)?u.validate=l.validate:o(a,l),Kde(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Yde();return}if(CNt(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){n.__compiled__[n.__schemas__[a]]&&(n.__compiled__[a].validate=n.__compiled__[n.__schemas__[a]].validate,n.__compiled__[a].normalize=n.__compiled__[n.__schemas__[a]].normalize)}),n.__compiled__[""]={validate:null,normalize:Yde()};const s=Object.keys(n.__compiled__).filter(function(a){return a.length>0&&n.__compiled__[a]}).map(SNt).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),n.re.schema_at_start=RegExp("^"+n.re.schema_search.source,"i"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),LNt(n)}function TNt(n,e){const t=n.__index__,i=n.__last_index__,r=n.__text_cache__.slice(t,i);this.schema=n.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function BO(n,e){const t=new TNt(n,e);return n.__compiled__[t.schema].normalize(t,n),t}function Ua(n,e){if(!(this instanceof Ua))return new Ua(n,e);e||DNt(n)&&(e=n,n={}),this.__opts__=PO({},Gde,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=PO({},NNt,n),this.__compiled__={},this.__tlds__=kNt,this.__tlds_replaced__=!1,this.re={},Pw(this)}Ua.prototype.add=function(e,t){return this.__schemas__[e]=t,Pw(this),this},Ua.prototype.set=function(e){return this.__opts__=PO(this.__opts__,e),this},Ua.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,r,o,s,a,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],l.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ua.prototype.pretest=function(e){return this.re.pretest.test(e)},Ua.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},Ua.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(BO(this,i)),i=this.__last_index__);let r=i?e.slice(i):e;for(;this.test(r);)t.push(BO(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null},Ua.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,BO(this,0)):null},Ua.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Pw(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Pw(this),this)},Ua.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ua.prototype.onCompile=function(){};const gg=2147483647,Qc=36,VO=1,$8=26,ANt=38,INt=700,Qde=72,Zde=128,Xde="-",RNt=/^xn--/,ONt=/[^\0-\x7F]/,FNt=/[\x2E\u3002\uFF0E\uFF61]/g,PNt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},zO=Qc-VO,Zc=Math.floor,HO=String.fromCharCode;function wh(n){throw new RangeError(PNt[n])}function BNt(n,e){const t=[];let i=n.length;for(;i--;)t[i]=e(n[i]);return t}function Jde(n,e){const t=n.split("@");let i="";t.length>1&&(i=t[0]+"@",n=t[1]),n=n.replace(FNt,".");const r=n.split("."),o=BNt(r,e).join(".");return i+o}function e0e(n){const e=[];let t=0;const i=n.length;for(;t<i;){const r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=n.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const VNt=n=>String.fromCodePoint(...n),zNt=function(n){return n>=48&&n<58?26+(n-48):n>=65&&n<91?n-65:n>=97&&n<123?n-97:Qc},t0e=function(n,e){return n+22+75*(n<26)-((e!=0)<<5)},n0e=function(n,e,t){let i=0;for(n=t?Zc(n/INt):n>>1,n+=Zc(n/e);n>zO*$8>>1;i+=Qc)n=Zc(n/zO);return Zc(i+(zO+1)*n/(n+ANt))},i0e=function(n){const e=[],t=n.length;let i=0,r=Zde,o=Qde,s=n.lastIndexOf(Xde);s<0&&(s=0);for(let a=0;a<s;++a)n.charCodeAt(a)>=128&&wh("not-basic"),e.push(n.charCodeAt(a));for(let a=s>0?s+1:0;a<t;){const l=i;for(let d=1,h=Qc;;h+=Qc){a>=t&&wh("invalid-input");const f=zNt(n.charCodeAt(a++));f>=Qc&&wh("invalid-input"),f>Zc((gg-i)/d)&&wh("overflow"),i+=f*d;const p=h<=o?VO:h>=o+$8?$8:h-o;if(f<p)break;const g=Qc-p;d>Zc(gg/g)&&wh("overflow"),d*=g}const u=e.length+1;o=n0e(i-l,u,l==0),Zc(i/u)>gg-r&&wh("overflow"),r+=Zc(i/u),i%=u,e.splice(i++,0,r)}return String.fromCodePoint(...e)},r0e=function(n){const e=[];n=e0e(n);const t=n.length;let i=Zde,r=0,o=Qde;for(const l of n)l<128&&e.push(HO(l));const s=e.length;let a=s;for(s&&e.push(Xde);a<t;){let l=gg;for(const d of n)d>=i&&d<l&&(l=d);const u=a+1;l-i>Zc((gg-r)/u)&&wh("overflow"),r+=(l-i)*u,i=l;for(const d of n)if(d<i&&++r>gg&&wh("overflow"),d===i){let h=r;for(let f=Qc;;f+=Qc){const p=f<=o?VO:f>=o+$8?$8:f-o;if(h<p)break;const g=h-p,m=Qc-p;e.push(HO(t0e(p+g%m,0))),h=Zc(g/m)}e.push(HO(t0e(h,0))),o=n0e(r,u,a===s),r=0,++a}++r,++i}return e.join("")},o0e={version:"2.3.1",ucs2:{decode:e0e,encode:VNt},decode:i0e,encode:r0e,toASCII:function(n){return Jde(n,function(e){return ONt.test(e)?"xn--"+r0e(e):e})},toUnicode:function(n){return Jde(n,function(e){return RNt.test(e)?i0e(e.slice(4).toLowerCase()):e})}},HNt={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},jNt=/^(vbscript|javascript|file|data):/,WNt=/^data:image\/(gif|png|jpeg|webp);/;function $Nt(n){const e=n.trim().toLowerCase();return jNt.test(e)?WNt.test(e):!0}const s0e=["http:","https:","mailto:"];function UNt(n){const e=DO(n,!0);if(e.hostname&&(!e.protocol||s0e.indexOf(e.protocol)>=0))try{e.hostname=o0e.toASCII(e.hostname)}catch{}return B8(SO(e))}function qNt(n){const e=DO(n,!0);if(e.hostname&&(!e.protocol||s0e.indexOf(e.protocol)>=0))try{e.hostname=o0e.toUnicode(e.hostname)}catch{}return dg(SO(e),dg.defaultChars+"%")}function Il(n,e){if(!(this instanceof Il))return new Il(n,e);e||LO(n)||(e=n||{},n="default"),this.inline=new W8,this.block=new Ow,this.core=new AO,this.renderer=new fg,this.linkify=new Ua,this.validateLink=$Nt,this.normalizeLink=UNt,this.normalizeLinkText=qNt,this.utils=eDt,this.helpers=Mw({},rDt),this.options={},this.configure(n),e&&this.set(e)}Il.prototype.set=function(n){return Mw(this.options,n),this},Il.prototype.configure=function(n){const e=this;if(LO(n)){const t=n;if(n=HNt[t],!n)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(t){n.components[t].rules&&e[t].ruler.enableOnly(n.components[t].rules),n.components[t].rules2&&e[t].ruler2.enableOnly(n.components[t].rules2)}),this},Il.prototype.enable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(n,!0))},this),t=t.concat(this.inline.ruler2.enable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Il.prototype.disable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(n,!0))},this),t=t.concat(this.inline.ruler2.disable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Il.prototype.use=function(n){const e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this},Il.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");const t=new this.core.State(n,this,e);return this.core.process(t),t.tokens},Il.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)},Il.prototype.parseInline=function(n,e){const t=new this.core.State(n,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Il.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};const KNt=["innerHTML"],GNt={__name:"FactorDescription",props:c.mergeModels({factorType:{type:String,default:"模版"},data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const{request:e}=c.inject("stConfig"),t=new Il,i=c.ref(""),r=c.useModel(n,"visible");return c.onMounted(async()=>{const{data:o}=await e.post("/middleLayer/special/getOss",{url:"resource/factor_select.md"}),s=new Uint8Array(o.data),l=new TextDecoder("utf-8").decode(s);i.value=t.render(l)}),(o,s)=>{const a=YS,l=GS,u=o1,d=l1;return c.openBlock(),c.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),title:n.factorType==="模版"?"因子说明":"脚本编写说明",width:"1000","align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:c.withCtx(()=>[c.createVNode(u,{height:"500px"},{default:c.withCtx(()=>[n.factorType==="模版"?(c.openBlock(),c.createBlock(l,{key:0,data:n.data,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(a,{prop:"factorName",label:"因子名称",width:"200"}),c.createVNode(a,{prop:"factorDesc",label:"因子说明"}),c.createVNode(a,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])):c.createCommentVNode("",!0),n.factorType==="脚本"?(c.openBlock(),c.createElementBlock("div",{key:1,class:"markdown-body",innerHTML:i.value},null,8,KNt)):c.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}},AAt="",a0e=n=>(c.pushScopeId("data-v-f1bea35b"),n=n(),c.popScopeId(),n),YNt={class:"factor-screen"},QNt={style:{"white-space":"pre-line"}},ZNt={class:"custom-header"},XNt={class:"left"},JNt=["id"],eEt={class:"right"},tEt={class:"form-row"},nEt={class:"index"},iEt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},rEt=a0e(()=>c.createElementVNode("span",null,"~",-1)),oEt=a0e(()=>c.createElementVNode("span",null,"&&代表and,||代表or",-1)),sEt={class:"dialog-footer"},aEt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=c.useModel(n,"data"),i=c.ref(),r=c.ref(),o=c.ref(!1),s=c.ref(!1),a=c.ref("脚本"),l=c.ref(null),u=c.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null,factorSelectExpr:""}),d=()=>{const{list:_,sqlEnable:v,sqlValue:w,factorSelectExpr:x}=t.value;u.value={list:JSON.parse(JSON.stringify(_)),sqlEnable:v,sqlValue:w,factorSelectExpr:x},u.value.list.length||p(),o.value=!0},h=()=>{if(a.value==="模版")l.value.validate(_=>{const{list:v,sqlEnable:w,sqlValue:x}=u.value;if(_){if(w){if(!x)return Hn.error("SQL语句不能为空");const S=bde(x),D=v.map((k,E)=>`条件${E+1}`),N=S.filter(k=>!D.includes(k));if(N.length)return Hn.error(`请检查SQL语句, 不存在[${N}]`)}t.value={list:JSON.parse(JSON.stringify(v)),sqlEnable:w,sqlValue:x,factorSelectExpr:""},o.value=!1}});else{const _=i.value.getValue();if(!_)return Hn.error("请输入脚本语句");t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:_},o.value=!1}},f=_=>{u.value.list.splice(_,1)},p=_=>{switch(_){case"compare":{u.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{u.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},g=()=>{l.value.validate(_=>{if(_)if(u.value.sqlValue){const v=bde(u.value.sqlValue);u.value.sqlValue=u.value.list.reduce((w,x,S)=>(v.includes(`条件${S+1}`)||(w+=`&& 条件${S+1} `),w),u.value.sqlValue)}else u.value.sqlValue=u.value.list.reduce((v,w,x)=>(x===0?v+=`条件${x+1} `:v+=`&& 条件${x+1} `,v),"")})},m=_=>{switch(_.key){case"compare":{const{cycle:v,factor:w,compareType:x,cycle2:S,factor2:D}=_;let N="";return N+=` ${e.config.cycleOptions.find(({value:k})=>k===v).label}`,N+=` ${e.config.factorOptions.find(({value:k})=>k===w).label}`,N+=` ${x}`,N+=` ${e.config.cycleOptions.find(({value:k})=>k===S).label}`,N+=` ${e.config.factorOptions.find(({value:k})=>k===D).label}`,N}default:{const{cycle:v,factor:w,score:x}=_;let S="";return S+=` ${e.config.cycleOptions.find(({value:D})=>D===v).label}`,S+=` ${e.config.factorOptions.find(({value:D})=>D===w).label}`,S+=` ${x[0]||x[0]===0?`${x[0]}分`:"∞"}`,S+=" ~",S+=` ${x[1]||x[1]===0?`${x[1]}分`:"∞"}`,S}}},y=(_,v)=>{switch(_){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(v,1);break}case"scriptTag":{AH.confirm("是否确认删除因子筛选: 脚本模式","删除操作",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""}});break}}},b=()=>{r.value.open(i.value)},C=(_,v)=>{if(!i.value)return Hn.error("未检测到编辑器实例");let w=_;const x=pSt(v);if(x.length){const E=x.reduce((L,A,R,B)=>(L+=`${A}=`,R<B.length-1&&(L+=","),L),"");w=`${w}(${E})`}const S=i.value.getInstance(),D=S.getPosition(),k=i.value.getValue().split(`
|
|
823
|
+
`,o.map=[e,n.line],!0}function EDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||r+3>o)return!1;const s=n.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=n.skipChars(r,s);let l=r-a;if(l<3)return!1;const u=n.src.slice(a,r),d=n.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let h=e,f=!1;for(;h++,!(h>=t||(r=a=n.bMarks[h]+n.tShift[h],o=n.eMarks[h],r<o&&n.sCount[h]<n.blkIndent));)if(n.src.charCodeAt(r)===s&&!(n.sCount[h]-n.blkIndent>=4)&&(r=n.skipChars(r,s),!(r-a<l)&&(r=n.skipSpaces(r),!(r<o)))){f=!0;break}l=n.sCount[e],n.line=h+(f?1:0);const p=n.push("fence","code",0);return p.info=d,p.content=n.getLines(e+1,h,l,!0),p.markup=u,p.map=[e,n.line],!0}function kDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];const s=n.lineMax;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],l=[],u=[],d=[],h=n.md.block.ruler.getRules("blockquote"),f=n.parentType;n.parentType="blockquote";let p=!1,g;for(g=e;g<t;g++){const _=n.sCount[g]<n.blkIndent;if(r=n.bMarks[g]+n.tShift[g],o=n.eMarks[g],r>=o)break;if(n.src.charCodeAt(r++)===62&&!_){let w=n.sCount[g]+1,x,S;n.src.charCodeAt(r)===32?(r++,w++,S=!1,x=!0):n.src.charCodeAt(r)===9?(x=!0,(n.bsCount[g]+w)%4===3?(r++,w++,S=!1):S=!0):x=!1;let D=w;for(a.push(n.bMarks[g]),n.bMarks[g]=r;r<o;){const N=n.src.charCodeAt(r);if(Ui(N))N===9?D+=4-(D+n.bsCount[g]+(S?1:0))%4:D++;else break;r++}p=r>=o,l.push(n.bsCount[g]),n.bsCount[g]=n.sCount[g]+1+(x?1:0),u.push(n.sCount[g]),n.sCount[g]=D-w,d.push(n.tShift[g]),n.tShift[g]=r-n.bMarks[g];continue}if(p)break;let v=!1;for(let w=0,x=h.length;w<x;w++)if(h[w](n,g,t,!0)){v=!0;break}if(v){n.lineMax=g,n.blkIndent!==0&&(a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]-=n.blkIndent);break}a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]=-1}const m=n.blkIndent;n.blkIndent=0;const y=n.push("blockquote_open","blockquote",1);y.markup=">";const b=[e,0];y.map=b,n.md.block.tokenize(n,e,g);const C=n.push("blockquote_close","blockquote",-1);C.markup=">",n.lineMax=s,n.parentType=f,b[1]=n.line;for(let _=0;_<d.length;_++)n.bMarks[_+e]=a[_],n.tShift[_+e]=d[_],n.sCount[_+e]=u[_],n.bsCount[_+e]=l[_];return n.blkIndent=m,!0}function LDt(n,e,t,i){const r=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let o=n.bMarks[e]+n.tShift[e];const s=n.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){const u=n.src.charCodeAt(o++);if(u!==s&&!Ui(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;n.line=e+1;const l=n.push("hr","hr",0);return l.map=[e,n.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Bde(n,e){const t=n.eMarks[e];let i=n.bMarks[e]+n.tShift[e];const r=n.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<t){const o=n.src.charCodeAt(i);if(!Ui(o))return-1}return i}function Vde(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];let r=t;if(r+1>=i)return-1;let o=n.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=n.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=n.src.charCodeAt(r),!Ui(o))?-1:r}function MDt(n,e){const t=n.level+2;for(let i=e+2,r=n.tokens.length-2;i<r;i++)n.tokens[i].level===t&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}function TDt(n,e,t,i){let r,o,s,a,l=e,u=!0;if(n.sCount[l]-n.blkIndent>=4||n.listIndent>=0&&n.sCount[l]-n.listIndent>=4&&n.sCount[l]<n.blkIndent)return!1;let d=!1;i&&n.parentType==="paragraph"&&n.sCount[l]>=n.blkIndent&&(d=!0);let h,f,p;if((p=Vde(n,l))>=0){if(h=!0,s=n.bMarks[l]+n.tShift[l],f=Number(n.src.slice(s,p-1)),d&&f!==1)return!1}else if((p=Bde(n,l))>=0)h=!1;else return!1;if(d&&n.skipSpaces(p)>=n.eMarks[l])return!1;if(i)return!0;const g=n.src.charCodeAt(p-1),m=n.tokens.length;h?(a=n.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=n.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(g);let b=!1;const C=n.md.block.ruler.getRules("list"),_=n.parentType;for(n.parentType="list";l<t;){o=p,r=n.eMarks[l];const v=n.sCount[l]+p-(n.bMarks[l]+n.tShift[l]);let w=v;for(;o<r;){const B=n.src.charCodeAt(o);if(B===9)w+=4-(w+n.bsCount[l])%4;else if(B===32)w++;else break;o++}const x=o;let S;x>=r?S=1:S=w-v,S>4&&(S=1);const D=v+S;a=n.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,h&&(a.info=n.src.slice(s,p-1));const k=n.tight,E=n.tShift[l],L=n.sCount[l],A=n.listIndent;if(n.listIndent=n.blkIndent,n.blkIndent=D,n.tight=!0,n.tShift[l]=x-n.bMarks[l],n.sCount[l]=w,x>=r&&n.isEmpty(l+1)?n.line=Math.min(n.line+2,t):n.md.block.tokenize(n,l,t,!0),(!n.tight||b)&&(u=!1),b=n.line-l>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=A,n.tShift[l]=E,n.sCount[l]=L,n.tight=k,a=n.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=n.line,N[1]=l,l>=t||n.sCount[l]<n.blkIndent||n.sCount[l]-n.blkIndent>=4)break;let R=!1;for(let B=0,I=C.length;B<I;B++)if(C[B](n,l,t,!0)){R=!0;break}if(R)break;if(h){if(p=Vde(n,l),p<0)break;s=n.bMarks[l]+n.tShift[l]}else if(p=Bde(n,l),p<0)break;if(g!==n.src.charCodeAt(p-1))break}return h?a=n.push("ordered_list_close","ol",-1):a=n.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),y[1]=l,n.line=l,n.parentType=_,u&&MDt(n,m),!0}function ADt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e],s=e+1;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==91)return!1;function a(C){const _=n.lineMax;if(C>=_||n.isEmpty(C))return null;let v=!1;if(n.sCount[C]-n.blkIndent>3&&(v=!0),n.sCount[C]<0&&(v=!0),!v){const S=n.md.block.ruler.getRules("reference"),D=n.parentType;n.parentType="reference";let N=!1;for(let k=0,E=S.length;k<E;k++)if(S[k](n,C,_,!0)){N=!0;break}if(n.parentType=D,N)return null}const w=n.bMarks[C]+n.tShift[C],x=n.eMarks[C];return n.src.slice(w,x+1)}let l=n.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){const C=l.charCodeAt(r);if(C===91)return!1;if(C===93){u=r;break}else if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(C===92&&(r++,r<o&&l.charCodeAt(r)===10)){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}const d=n.md.helpers.parseLinkDestination(l,r,o);if(!d.ok)return!1;const h=n.md.normalizeLink(d.str);if(!n.md.validateLink(h))return!1;r=d.pos;const f=r,p=s,g=r;for(;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}let m=n.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const C=a(s);if(C===null)break;l+=C,r=o,o=l.length,s++,m=n.md.helpers.parseLinkTitle(l,r,o,m)}let y;for(r<o&&g!==r&&m.ok?(y=m.str,r=m.pos):(y="",r=f,s=p);r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10&&y)for(y="",r=f,s=p;r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const b=Aw(l.slice(1,u));return b?(i||(typeof n.env.references>"u"&&(n.env.references={}),typeof n.env.references[b]>"u"&&(n.env.references[b]={title:y,href:h}),n.line=s),!0):!1}const IDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],RDt="[a-zA-Z_:][a-zA-Z0-9:._-]*",ODt="[^\"'=<>`\\x00-\\x20]+",FDt="'[^']*'",PDt='"[^"]*"',BDt="(?:"+ODt+"|"+FDt+"|"+PDt+")",zde="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+RDt+"(?:\\s*=\\s*"+BDt+")?)")+"*\\s*\\/?>",Hde="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",VDt="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",zDt="<[?][\\s\\S]*?[?]>",HDt="<![A-Za-z][^>]*>",jDt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",WDt=new RegExp("^(?:"+zde+"|"+Hde+"|"+VDt+"|"+zDt+"|"+HDt+"|"+jDt+")"),$Dt=new RegExp("^(?:"+zde+"|"+Hde+")"),pg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+IDt.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp($Dt.source+"\\s*$"),/^$/,!1]];function UDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||!n.md.options.html||n.src.charCodeAt(r)!==60)return!1;let s=n.src.slice(r,o),a=0;for(;a<pg.length&&!pg[a][0].test(s);a++);if(a===pg.length)return!1;if(i)return pg[a][2];let l=e+1;if(!pg[a][1].test(s)){for(;l<t&&!(n.sCount[l]<n.blkIndent);l++)if(r=n.bMarks[l]+n.tShift[l],o=n.eMarks[l],s=n.src.slice(r,o),pg[a][1].test(s)){s.length!==0&&l++;break}}n.line=l;const u=n.push("html_block","",0);return u.map=[e,l],u.content=n.getLines(e,l,n.blkIndent,!0),!0}function qDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let s=n.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=n.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=n.src.charCodeAt(++r);if(a>6||r<o&&!Ui(s))return!1;if(i)return!0;o=n.skipSpacesBack(o,r);const l=n.skipCharsBack(o,35,r);l>r&&Ui(n.src.charCodeAt(l-1))&&(o=l),n.line=e+1;const u=n.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,n.line];const d=n.push("inline","",0);d.content=n.src.slice(r,o).trim(),d.map=[e,n.line],d.children=[];const h=n.push("heading_close","h"+String(a),-1);return h.markup="########".slice(0,a),!0}function KDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph");if(n.sCount[e]-n.blkIndent>=4)return!1;const r=n.parentType;n.parentType="paragraph";let o=0,s,a=e+1;for(;a<t&&!n.isEmpty(a);a++){if(n.sCount[a]-n.blkIndent>3)continue;if(n.sCount[a]>=n.blkIndent){let p=n.bMarks[a]+n.tShift[a];const g=n.eMarks[a];if(p<g&&(s=n.src.charCodeAt(p),(s===45||s===61)&&(p=n.skipChars(p,s),p=n.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(n.sCount[a]<0)continue;let f=!1;for(let p=0,g=i.length;p<g;p++)if(i[p](n,a,t,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=n.getLines(e,a,n.blkIndent,!1).trim();n.line=a+1;const u=n.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[e,n.line];const d=n.push("inline","",0);d.content=l,d.map=[e,n.line-1],d.children=[];const h=n.push("heading_close","h"+String(o),-1);return h.markup=String.fromCharCode(s),n.parentType=r,!0}function GDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph"),r=n.parentType;let o=e+1;for(n.parentType="paragraph";o<t&&!n.isEmpty(o);o++){if(n.sCount[o]-n.blkIndent>3||n.sCount[o]<0)continue;let u=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](n,o,t,!0)){u=!0;break}if(u)break}const s=n.getLines(e,o,n.blkIndent,!1).trim();n.line=o;const a=n.push("paragraph_open","p",1);a.map=[e,n.line];const l=n.push("inline","",0);return l.content=s,l.map=[e,n.line],l.children=[],n.push("paragraph_close","p",-1),n.parentType=r,!0}const Rw=[["table",DDt,["paragraph","reference"]],["code",NDt],["fence",EDt,["paragraph","reference","blockquote","list"]],["blockquote",kDt,["paragraph","reference","blockquote","list"]],["hr",LDt,["paragraph","reference","blockquote","list"]],["list",TDt,["paragraph","reference","blockquote"]],["reference",ADt],["html_block",UDt,["paragraph","reference","blockquote"]],["heading",qDt,["paragraph","reference","blockquote"]],["lheading",KDt],["paragraph",GDt]];function Ow(){this.ruler=new ma;for(let n=0;n<Rw.length;n++)this.ruler.push(Rw[n][0],Rw[n][1],{alt:(Rw[n][2]||[]).slice()})}Ow.prototype.tokenize=function(n,e,t){const i=this.ruler.getRules(""),r=i.length,o=n.md.options.maxNesting;let s=e,a=!1;for(;s<t&&(n.line=s=n.skipEmptyLines(s),!(s>=t||n.sCount[s]<n.blkIndent));){if(n.level>=o){n.line=t;break}const l=n.line;let u=!1;for(let d=0;d<r;d++)if(u=i[d](n,s,t,!1),u){if(l>=n.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");n.tight=!a,n.isEmpty(n.line-1)&&(a=!0),s=n.line,s<t&&n.isEmpty(s)&&(a=!0,s++,n.line=s)}},Ow.prototype.parse=function(n,e,t,i){if(!n)return;const r=new this.State(n,e,t,i);this.tokenize(r,r.line,r.lineMax)},Ow.prototype.State=Yc;function j8(n,e,t,i){this.src=n,this.env=t,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}j8.prototype.pushPending=function(){const n=new ju("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n},j8.prototype.push=function(n,e,t){this.pending&&this.pushPending();const i=new ju(n,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},j8.prototype.scanDelims=function(n,e){const t=this.posMax,i=this.src.charCodeAt(n),r=n>0?this.src.charCodeAt(n-1):32;let o=n;for(;o<t&&this.src.charCodeAt(o)===i;)o++;const s=o-n,a=o<t?this.src.charCodeAt(o):32,l=H8(r)||z8(String.fromCharCode(r)),u=H8(a)||z8(String.fromCharCode(a)),d=V8(r),h=V8(a),f=!h&&(!u||d||l),p=!d&&(!l||h||u);return{can_open:f&&(e||!p||l),can_close:p&&(e||!f||u),length:s}},j8.prototype.Token=ju;function YDt(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function QDt(n,e){let t=n.pos;for(;t<n.posMax&&!YDt(n.src.charCodeAt(t));)t++;return t===n.pos?!1:(e||(n.pending+=n.src.slice(n.pos,t)),n.pos=t,!0)}const ZDt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function XDt(n,e){if(!n.md.options.linkify||n.linkLevel>0)return!1;const t=n.pos,i=n.posMax;if(t+3>i||n.src.charCodeAt(t)!==58||n.src.charCodeAt(t+1)!==47||n.src.charCodeAt(t+2)!==47)return!1;const r=n.pending.match(ZDt);if(!r)return!1;const o=r[1],s=n.md.linkify.matchAtStart(n.src.slice(t-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=n.md.normalizeLink(a);if(!n.md.validateLink(l))return!1;if(!e){n.pending=n.pending.slice(0,-o.length);const u=n.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=n.push("text","",0);d.content=n.md.normalizeLinkText(a);const h=n.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return n.pos+=a.length-o.length,!0}function JDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==10)return!1;const i=n.pending.length-1,r=n.posMax;if(!e)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&n.pending.charCodeAt(o-1)===32;)o--;n.pending=n.pending.slice(0,o),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(t++;t<r&&Ui(n.src.charCodeAt(t));)t++;return n.pos=t,!0}const RO=[];for(let n=0;n<256;n++)RO.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){RO[n.charCodeAt(0)]=1});function eNt(n,e){let t=n.pos;const i=n.posMax;if(n.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let r=n.src.charCodeAt(t);if(r===10){for(e||n.push("hardbreak","br",0),t++;t<i&&(r=n.src.charCodeAt(t),!!Ui(r));)t++;return n.pos=t,!0}let o=n.src[t];if(r>=55296&&r<=56319&&t+1<i){const a=n.src.charCodeAt(t+1);a>=56320&&a<=57343&&(o+=n.src[t+1],t++)}const s="\\"+o;if(!e){const a=n.push("text_special","",0);r<256&&RO[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return n.pos=t+1,!0}function tNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=n.posMax;for(;t<o&&n.src.charCodeAt(t)===96;)t++;const s=n.src.slice(r,t),a=s.length;if(n.backticksScanned&&(n.backticks[a]||0)<=r)return e||(n.pending+=s),n.pos+=a,!0;let l=t,u;for(;(u=n.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&n.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===a){if(!e){const h=n.push("code_inline","code",0);h.markup=s,h.content=n.src.slice(t,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return n.pos=l,!0}n.backticks[d]=u}return n.backticksScanned=!0,e||(n.pending+=s),n.pos+=a,!0}function nNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==126)return!1;const r=n.scanDelims(n.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=n.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=n.push("text","",0),a.content=s+s,n.delimiters.push({marker:i,length:0,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return n.pos+=r.length,!0}function jde(n,e){let t;const i=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const a=e[s.end];t=n.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[a.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[a.token-1].type==="text"&&n.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const o=i.pop();let s=o+1;for(;s<n.tokens.length&&n.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=n.tokens[s],n.tokens[s]=n.tokens[o],n.tokens[o]=t)}}function iNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;jde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&jde(n,e[i].delimiters)}const Wde={tokenize:nNt,postProcess:iNt};function rNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==95&&i!==42)return!1;const r=n.scanDelims(n.pos,i===42);for(let o=0;o<r.length;o++){const s=n.push("text","",0);s.content=String.fromCharCode(i),n.delimiters.push({marker:i,length:r.length,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return n.pos+=r.length,!0}function $de(n,e){const t=e.length;for(let i=t-1;i>=0;i--){const r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=n.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=n.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(n.tokens[e[i-1].token].content="",n.tokens[e[r.end+1].token].content="",i--)}}function oNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;$de(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&$de(n,e[i].delimiters)}const Ude={tokenize:rNt,postProcess:oNt};function sNt(n,e){let t,i,r,o,s="",a="",l=n.pos,u=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;const d=n.pos,h=n.posMax,f=n.pos+1,p=n.md.helpers.parseLinkLabel(n,n.pos,!0);if(p<0)return!1;let g=p+1;if(g<h&&n.src.charCodeAt(g)===40){for(u=!1,g++;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(g>=h)return!1;if(l=g,r=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),r.ok){for(s=n.md.normalizeLink(r.str),n.md.validateLink(s)?g=r.pos:s="",l=g;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(r=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<h&&l!==g&&r.ok)for(a=r.str,g=r.pos;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);}(g>=h||n.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof n.env.references>"u")return!1;if(g<h&&n.src.charCodeAt(g)===91?(l=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?i=n.src.slice(l,g++):g=p+1):g=p+1,i||(i=n.src.slice(f,p)),o=n.env.references[Aw(i)],!o)return n.pos=d,!1;s=o.href,a=o.title}if(!e){n.pos=f,n.posMax=p;const m=n.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),n.linkLevel++,n.md.inline.tokenize(n),n.linkLevel--,n.push("link_close","a",-1)}return n.pos=g,n.posMax=h,!0}function aNt(n,e){let t,i,r,o,s,a,l,u,d="";const h=n.pos,f=n.posMax;if(n.src.charCodeAt(n.pos)!==33||n.src.charCodeAt(n.pos+1)!==91)return!1;const p=n.pos+2,g=n.md.helpers.parseLinkLabel(n,n.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&n.src.charCodeAt(o)===40){for(o++;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(o>=f)return!1;for(u=o,a=n.md.helpers.parseLinkDestination(n.src,o,n.posMax),a.ok&&(d=n.md.normalizeLink(a.str),n.md.validateLink(d)?o=a.pos:d=""),u=o;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(a=n.md.helpers.parseLinkTitle(n.src,o,n.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);else l="";if(o>=f||n.src.charCodeAt(o)!==41)return n.pos=h,!1;o++}else{if(typeof n.env.references>"u")return!1;if(o<f&&n.src.charCodeAt(o)===91?(u=o+1,o=n.md.helpers.parseLinkLabel(n,o),o>=0?r=n.src.slice(u,o++):o=g+1):o=g+1,r||(r=n.src.slice(p,g)),s=n.env.references[Aw(r)],!s)return n.pos=h,!1;d=s.href,l=s.title}if(!e){i=n.src.slice(p,g);const m=[];n.md.inline.parse(i,n.md,n.env,m);const y=n.push("image","img",0),b=[["src",d],["alt",""]];y.attrs=b,y.children=m,y.content=i,l&&b.push(["title",l])}return n.pos=o,n.posMax=f,!0}const lNt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,uNt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function cNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==60)return!1;const i=n.pos,r=n.posMax;for(;;){if(++t>=r)return!1;const s=n.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=n.src.slice(i+1,t);if(uNt.test(o)){const s=n.md.normalizeLink(o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}if(lNt.test(o)){const s=n.md.normalizeLink("mailto:"+o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}return!1}function dNt(n){return/^<a[>\s]/i.test(n)}function hNt(n){return/^<\/a\s*>/i.test(n)}function fNt(n){const e=n|32;return e>=97&&e<=122}function pNt(n,e){if(!n.md.options.html)return!1;const t=n.posMax,i=n.pos;if(n.src.charCodeAt(i)!==60||i+2>=t)return!1;const r=n.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!fNt(r))return!1;const o=n.src.slice(i).match(WDt);if(!o)return!1;if(!e){const s=n.push("html_inline","",0);s.content=o[0],dNt(s.content)&&n.linkLevel++,hNt(s.content)&&n.linkLevel--}return n.pos+=o[0].length,!0}const gNt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mNt=/^&([a-z][a-z0-9]{1,31});/i;function bNt(n,e){const t=n.pos,i=n.posMax;if(n.src.charCodeAt(t)!==38||t+1>=i)return!1;if(n.src.charCodeAt(t+1)===35){const o=n.src.slice(t).match(gNt);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=n.push("text_special","",0);a.content=MO(s)?Tw(s):Tw(65533),a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}else{const o=n.src.slice(t).match(mNt);if(o){const s=Mde(o[0]);if(s!==o[0]){if(!e){const a=n.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}}return!1}function qde(n){const e={},t=n.length;if(!t)return;let i=0,r=-2;const o=[];for(let s=0;s<t;s++){const a=n[s];if(o.push(0),(n[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=i-o[i]-1,d=u;for(;u>l;u-=o[u]+1){const h=n[u];if(h.marker===a.marker&&h.open&&h.end<0){let f=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=u>0&&!n[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,h.end=s,h.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function _Nt(n){const e=n.tokens_meta,t=n.tokens_meta.length;qde(n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&qde(e[i].delimiters)}function yNt(n){let e,t,i=0;const r=n.tokens,o=n.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&i--,r[e].level=i,r[e].nesting>0&&i++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const OO=[["text",QDt],["linkify",XDt],["newline",JDt],["escape",eNt],["backticks",tNt],["strikethrough",Wde.tokenize],["emphasis",Ude.tokenize],["link",sNt],["image",aNt],["autolink",cNt],["html_inline",pNt],["entity",bNt]],FO=[["balance_pairs",_Nt],["strikethrough",Wde.postProcess],["emphasis",Ude.postProcess],["fragments_join",yNt]];function W8(){this.ruler=new ma;for(let n=0;n<OO.length;n++)this.ruler.push(OO[n][0],OO[n][1]);this.ruler2=new ma;for(let n=0;n<FO.length;n++)this.ruler2.push(FO[n][0],FO[n][1])}W8.prototype.skipToken=function(n){const e=n.pos,t=this.ruler.getRules(""),i=t.length,r=n.md.options.maxNesting,o=n.cache;if(typeof o[e]<"u"){n.pos=o[e];return}let s=!1;if(n.level<r){for(let a=0;a<i;a++)if(n.level++,s=t[a](n,!0),n.level--,s){if(e>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;s||n.pos++,o[e]=n.pos},W8.prototype.tokenize=function(n){const e=this.ruler.getRules(""),t=e.length,i=n.posMax,r=n.md.options.maxNesting;for(;n.pos<i;){const o=n.pos;let s=!1;if(n.level<r){for(let a=0;a<t;a++)if(s=e[a](n,!1),s){if(o>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(n.pos>=i)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()},W8.prototype.parse=function(n,e,t,i){const r=new this.State(n,e,t,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)},W8.prototype.State=j8;function vNt(n){const e={};n=n||{},e.src_Any=Dde.source,e.src_Cc=Nde.source,e.src_Z=kde.source,e.src_P=NO.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(n["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function PO(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){n[i]=t[i]})}),n}function Fw(n){return Object.prototype.toString.call(n)}function CNt(n){return Fw(n)==="[object String]"}function wNt(n){return Fw(n)==="[object Object]"}function xNt(n){return Fw(n)==="[object RegExp]"}function Kde(n){return Fw(n)==="[object Function]"}function SNt(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Gde={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function DNt(n){return Object.keys(n||{}).reduce(function(e,t){return e||Gde.hasOwnProperty(t)},!1)}const NNt={"http:":{validate:function(n,e,t){const i=n.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,e,t){const i=n.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&n[e-3]===":"||e>=3&&n[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(n,e,t){const i=n.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},ENt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",kNt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function LNt(n){n.__index__=-1,n.__text_cache__=""}function MNt(n){return function(e,t){const i=e.slice(t);return n.test(i)?i.match(n)[0].length:0}}function Yde(){return function(n,e){e.normalize(n)}}function Pw(n){const e=n.re=vNt(n.__opts__),t=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||t.push(ENt),t.push(e.src_xn),e.src_tlds=t.join("|");function i(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const r=[];n.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(n.__schemas__).forEach(function(a){const l=n.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(n.__compiled__[a]=u,wNt(l)){xNt(l.validate)?u.validate=MNt(l.validate):Kde(l.validate)?u.validate=l.validate:o(a,l),Kde(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Yde();return}if(CNt(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){n.__compiled__[n.__schemas__[a]]&&(n.__compiled__[a].validate=n.__compiled__[n.__schemas__[a]].validate,n.__compiled__[a].normalize=n.__compiled__[n.__schemas__[a]].normalize)}),n.__compiled__[""]={validate:null,normalize:Yde()};const s=Object.keys(n.__compiled__).filter(function(a){return a.length>0&&n.__compiled__[a]}).map(SNt).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),n.re.schema_at_start=RegExp("^"+n.re.schema_search.source,"i"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),LNt(n)}function TNt(n,e){const t=n.__index__,i=n.__last_index__,r=n.__text_cache__.slice(t,i);this.schema=n.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function BO(n,e){const t=new TNt(n,e);return n.__compiled__[t.schema].normalize(t,n),t}function Ua(n,e){if(!(this instanceof Ua))return new Ua(n,e);e||DNt(n)&&(e=n,n={}),this.__opts__=PO({},Gde,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=PO({},NNt,n),this.__compiled__={},this.__tlds__=kNt,this.__tlds_replaced__=!1,this.re={},Pw(this)}Ua.prototype.add=function(e,t){return this.__schemas__[e]=t,Pw(this),this},Ua.prototype.set=function(e){return this.__opts__=PO(this.__opts__,e),this},Ua.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,r,o,s,a,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],l.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ua.prototype.pretest=function(e){return this.re.pretest.test(e)},Ua.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},Ua.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(BO(this,i)),i=this.__last_index__);let r=i?e.slice(i):e;for(;this.test(r);)t.push(BO(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null},Ua.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,BO(this,0)):null},Ua.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Pw(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Pw(this),this)},Ua.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ua.prototype.onCompile=function(){};const gg=2147483647,Qc=36,VO=1,$8=26,ANt=38,INt=700,Qde=72,Zde=128,Xde="-",RNt=/^xn--/,ONt=/[^\0-\x7F]/,FNt=/[\x2E\u3002\uFF0E\uFF61]/g,PNt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},zO=Qc-VO,Zc=Math.floor,HO=String.fromCharCode;function wh(n){throw new RangeError(PNt[n])}function BNt(n,e){const t=[];let i=n.length;for(;i--;)t[i]=e(n[i]);return t}function Jde(n,e){const t=n.split("@");let i="";t.length>1&&(i=t[0]+"@",n=t[1]),n=n.replace(FNt,".");const r=n.split("."),o=BNt(r,e).join(".");return i+o}function e0e(n){const e=[];let t=0;const i=n.length;for(;t<i;){const r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=n.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const VNt=n=>String.fromCodePoint(...n),zNt=function(n){return n>=48&&n<58?26+(n-48):n>=65&&n<91?n-65:n>=97&&n<123?n-97:Qc},t0e=function(n,e){return n+22+75*(n<26)-((e!=0)<<5)},n0e=function(n,e,t){let i=0;for(n=t?Zc(n/INt):n>>1,n+=Zc(n/e);n>zO*$8>>1;i+=Qc)n=Zc(n/zO);return Zc(i+(zO+1)*n/(n+ANt))},i0e=function(n){const e=[],t=n.length;let i=0,r=Zde,o=Qde,s=n.lastIndexOf(Xde);s<0&&(s=0);for(let a=0;a<s;++a)n.charCodeAt(a)>=128&&wh("not-basic"),e.push(n.charCodeAt(a));for(let a=s>0?s+1:0;a<t;){const l=i;for(let d=1,h=Qc;;h+=Qc){a>=t&&wh("invalid-input");const f=zNt(n.charCodeAt(a++));f>=Qc&&wh("invalid-input"),f>Zc((gg-i)/d)&&wh("overflow"),i+=f*d;const p=h<=o?VO:h>=o+$8?$8:h-o;if(f<p)break;const g=Qc-p;d>Zc(gg/g)&&wh("overflow"),d*=g}const u=e.length+1;o=n0e(i-l,u,l==0),Zc(i/u)>gg-r&&wh("overflow"),r+=Zc(i/u),i%=u,e.splice(i++,0,r)}return String.fromCodePoint(...e)},r0e=function(n){const e=[];n=e0e(n);const t=n.length;let i=Zde,r=0,o=Qde;for(const l of n)l<128&&e.push(HO(l));const s=e.length;let a=s;for(s&&e.push(Xde);a<t;){let l=gg;for(const d of n)d>=i&&d<l&&(l=d);const u=a+1;l-i>Zc((gg-r)/u)&&wh("overflow"),r+=(l-i)*u,i=l;for(const d of n)if(d<i&&++r>gg&&wh("overflow"),d===i){let h=r;for(let f=Qc;;f+=Qc){const p=f<=o?VO:f>=o+$8?$8:f-o;if(h<p)break;const g=h-p,m=Qc-p;e.push(HO(t0e(p+g%m,0))),h=Zc(g/m)}e.push(HO(t0e(h,0))),o=n0e(r,u,a===s),r=0,++a}++r,++i}return e.join("")},o0e={version:"2.3.1",ucs2:{decode:e0e,encode:VNt},decode:i0e,encode:r0e,toASCII:function(n){return Jde(n,function(e){return ONt.test(e)?"xn--"+r0e(e):e})},toUnicode:function(n){return Jde(n,function(e){return RNt.test(e)?i0e(e.slice(4).toLowerCase()):e})}},HNt={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},jNt=/^(vbscript|javascript|file|data):/,WNt=/^data:image\/(gif|png|jpeg|webp);/;function $Nt(n){const e=n.trim().toLowerCase();return jNt.test(e)?WNt.test(e):!0}const s0e=["http:","https:","mailto:"];function UNt(n){const e=DO(n,!0);if(e.hostname&&(!e.protocol||s0e.indexOf(e.protocol)>=0))try{e.hostname=o0e.toASCII(e.hostname)}catch{}return B8(SO(e))}function qNt(n){const e=DO(n,!0);if(e.hostname&&(!e.protocol||s0e.indexOf(e.protocol)>=0))try{e.hostname=o0e.toUnicode(e.hostname)}catch{}return dg(SO(e),dg.defaultChars+"%")}function Il(n,e){if(!(this instanceof Il))return new Il(n,e);e||LO(n)||(e=n||{},n="default"),this.inline=new W8,this.block=new Ow,this.core=new AO,this.renderer=new fg,this.linkify=new Ua,this.validateLink=$Nt,this.normalizeLink=UNt,this.normalizeLinkText=qNt,this.utils=eDt,this.helpers=Mw({},rDt),this.options={},this.configure(n),e&&this.set(e)}Il.prototype.set=function(n){return Mw(this.options,n),this},Il.prototype.configure=function(n){const e=this;if(LO(n)){const t=n;if(n=HNt[t],!n)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(t){n.components[t].rules&&e[t].ruler.enableOnly(n.components[t].rules),n.components[t].rules2&&e[t].ruler2.enableOnly(n.components[t].rules2)}),this},Il.prototype.enable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(n,!0))},this),t=t.concat(this.inline.ruler2.enable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Il.prototype.disable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(n,!0))},this),t=t.concat(this.inline.ruler2.disable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Il.prototype.use=function(n){const e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this},Il.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");const t=new this.core.State(n,this,e);return this.core.process(t),t.tokens},Il.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)},Il.prototype.parseInline=function(n,e){const t=new this.core.State(n,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Il.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};const KNt=["innerHTML"],GNt={__name:"FactorDescription",props:c.mergeModels({factorType:{type:String,default:"模版"},data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const{request:e}=c.inject("stConfig"),t=new Il,i=c.ref(""),r=c.useModel(n,"visible");return c.onMounted(async()=>{const{data:o}=await e.post("/middleLayer/special/getOss",{url:"resource/factor_select.md"}),s=new Uint8Array(o.data),l=new TextDecoder("utf-8").decode(s);i.value=t.render(l)}),(o,s)=>{const a=YS,l=GS,u=o1,d=l1;return c.openBlock(),c.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),title:n.factorType==="模版"?"因子说明":"脚本编写说明",width:"1000","align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:c.withCtx(()=>[c.createVNode(u,{height:"500px"},{default:c.withCtx(()=>[n.factorType==="模版"?(c.openBlock(),c.createBlock(l,{key:0,data:n.data,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(a,{prop:"factorName",label:"因子名称",width:"200"}),c.createVNode(a,{prop:"factorDesc",label:"因子说明"}),c.createVNode(a,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])):c.createCommentVNode("",!0),n.factorType==="脚本"?(c.openBlock(),c.createElementBlock("div",{key:1,class:"markdown-body",innerHTML:i.value},null,8,KNt)):c.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}},AAt="",a0e=n=>(c.pushScopeId("data-v-deab9c48"),n=n(),c.popScopeId(),n),YNt={class:"factor-screen"},QNt={style:{"white-space":"pre-line"}},ZNt={class:"custom-header"},XNt={class:"left"},JNt=["id"],eEt={class:"right"},tEt={class:"form-row"},nEt={class:"index"},iEt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},rEt=a0e(()=>c.createElementVNode("span",null,"~",-1)),oEt=a0e(()=>c.createElementVNode("span",null,"&&代表and,||代表or",-1)),sEt={class:"dialog-footer"},aEt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=c.useModel(n,"data"),i=c.ref(),r=c.ref(),o=c.ref(!1),s=c.ref(!1),a=c.ref("脚本"),l=c.ref(null),u=c.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null,factorSelectExpr:""}),d=()=>{const{list:_,sqlEnable:v,sqlValue:w,factorSelectExpr:x}=t.value;u.value={list:JSON.parse(JSON.stringify(_)),sqlEnable:v,sqlValue:w,factorSelectExpr:x},u.value.list.length||p(),o.value=!0},h=()=>{if(a.value==="模版")l.value.validate(_=>{const{list:v,sqlEnable:w,sqlValue:x}=u.value;if(_){if(w){if(!x)return Hn.error("SQL语句不能为空");const S=bde(x),D=v.map((k,E)=>`条件${E+1}`),N=S.filter(k=>!D.includes(k));if(N.length)return Hn.error(`请检查SQL语句, 不存在[${N}]`)}t.value={list:JSON.parse(JSON.stringify(v)),sqlEnable:w,sqlValue:x,factorSelectExpr:""},o.value=!1}});else{const _=i.value.getValue();if(!_)return Hn.error("请输入脚本语句");t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:_},o.value=!1}},f=_=>{u.value.list.splice(_,1)},p=_=>{switch(_){case"compare":{u.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{u.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},g=()=>{l.value.validate(_=>{if(_)if(u.value.sqlValue){const v=bde(u.value.sqlValue);u.value.sqlValue=u.value.list.reduce((w,x,S)=>(v.includes(`条件${S+1}`)||(w+=`&& 条件${S+1} `),w),u.value.sqlValue)}else u.value.sqlValue=u.value.list.reduce((v,w,x)=>(x===0?v+=`条件${x+1} `:v+=`&& 条件${x+1} `,v),"")})},m=_=>{switch(_.key){case"compare":{const{cycle:v,factor:w,compareType:x,cycle2:S,factor2:D}=_;let N="";return N+=` ${e.config.cycleOptions.find(({value:k})=>k===v).label}`,N+=` ${e.config.factorOptions.find(({value:k})=>k===w).label}`,N+=` ${x}`,N+=` ${e.config.cycleOptions.find(({value:k})=>k===S).label}`,N+=` ${e.config.factorOptions.find(({value:k})=>k===D).label}`,N}default:{const{cycle:v,factor:w,score:x}=_;let S="";return S+=` ${e.config.cycleOptions.find(({value:D})=>D===v).label}`,S+=` ${e.config.factorOptions.find(({value:D})=>D===w).label}`,S+=` ${x[0]||x[0]===0?`${x[0]}分`:"∞"}`,S+=" ~",S+=` ${x[1]||x[1]===0?`${x[1]}分`:"∞"}`,S}}},y=(_,v)=>{switch(_){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(v,1);break}case"scriptTag":{AH.confirm("是否确认删除因子筛选: 脚本模式","删除操作",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""}});break}}},b=()=>{r.value.open(i.value)},C=(_,v)=>{if(!i.value)return Hn.error("未检测到编辑器实例");let w=_;const x=pSt(v);if(x.length){const E=x.reduce((L,A,R,B)=>(L+=`${A}=`,R<B.length-1&&(L+=","),L),"");w=`${w}(${E})`}const S=i.value.getInstance(),D=S.getPosition(),k=i.value.getValue().split(`
|
|
824
824
|
`);if(D.lineNumber<=k.length){const E=D.lineNumber-1,L=k[E],A=D.column-1,R=A>0?L[A-1]:"",B=A<L.length?L[A]:"";let I=w;R&&R!==" "&&!/[\s({[ ]/.test(R)&&(I=" "+I),B&&B!==" "&&!/[\s)}\]]/.test(B)&&(I=I+" ");const T=L.substring(0,A)+I+L.substring(A);k[E]=T;const O=k.join(`
|
|
825
|
-
`);i.value.setValue(O);const P=D.column+I.length;S.setPosition({lineNumber:D.lineNumber,column:P}),S.focus()}};return c.watch(()=>o.value,_=>{switch(_){case!0:{c.nextTick(()=>{i.value.resize(),t.value.factorSelectExpr&&(a.value="脚本",i.value.setValue(t.value.factorSelectExpr),i.value.focusToEnd())});break}case!1:{r.value.close();break}}}),c.watch(()=>a.value,_=>{_==="模版"&&r.value.close(),_==="脚本"&&c.nextTick(()=>{i.value.focusToEnd()})},{deep:!0}),(_,v)=>{var oe;const w=xH,x=N6,S=cz,D=Ko,N=yn,k=rl,E=vV,L=Gx,A=c.resolveComponent("st-customFunction"),R=ql,B=Ul,I=I6,T=R6,O=Kx,P=jl,U=A6,K=o1,$=l1,z=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",YNt,[c.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(c.openBlock(),c.createBlock(x,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:v[0]||(v[0]=ue=>y("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(w,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(t.value.list,(ue,le)=>(c.openBlock(),c.createBlock(x,{closable:"",type:"info",onClose:X=>y("factorTag",le)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m(ue)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),t.value.factorSelectExpr?(c.openBlock(),c.createBlock(S,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(x,{closable:"",type:"info",onClose:v[1]||(v[1]=ue=>y("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",QNt,c.toDisplayString(t.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(D,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode($,{"modal-class":"factor-dialog",modelValue:o.value,"onUpdate:modelValue":v[8]||(v[8]=ue=>o.value=ue),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ue,titleClass:le})=>[c.createElementVNode("div",ZNt,[c.createElementVNode("div",XNt,[c.createElementVNode("span",{id:ue,class:c.normalizeClass(le)}," 因子筛选 ",10,JNt),c.createVNode(k,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(N,{onClick:v[2]||(v[2]=X=>s.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ih))]),_:1})]),_:1}),c.createVNode(L,{modelValue:a.value,"onUpdate:modelValue":v[3]||(v[3]=X=>a.value=X),size:"small"},{default:c.withCtx(()=>[c.createVNode(E,{label:"模版",value:"模版"}),c.createVNode(E,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(A,{size:"small",onInsert:C},null,512),[[c.vShow,a.value==="脚本"]])]),c.createElementVNode("div",eEt,[a.value==="脚本"?(c.openBlock(),c.createBlock(D,{key:0,size:"small",type:"primary",onClick:b},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(N,{onClick:v[4]||(v[4]=X=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(i1))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",sEt,[c.createVNode(D,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[a.value==="模版"?(c.openBlock(),c.createBlock(K,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(U,{ref_key:"dialogFormRef",ref:l,model:u.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.list,(ue,le)=>(c.openBlock(),c.createElementBlock("div",tEt,[c.createElementVNode("span",nEt,c.toDisplayString(`条件${le+1}`),1),ue.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.compareType,"onUpdate:modelValue":X=>ue.compareType=X,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],X=>c.createVNode(R,{label:X,value:X,key:X},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:1,prop:"list."+le+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle2,"onUpdate:modelValue":X=>ue.cycle2=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor2,"onUpdate:modelValue":X=>ue.factor2=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[1,3].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{prop:"list."+le+".score",rules:{validator:c.unref(fSt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",iEt,[c.createVNode(T,{modelValue:ue.score[0],"onUpdate:modelValue":X=>ue.score[0]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),rEt,c.createVNode(T,{modelValue:ue.score[1],"onUpdate:modelValue":X=>ue.score[1]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(N,{onClick:X=>f(le)},{default:c.withCtx(()=>[c.createVNode(c.unref(_x))]),_:2},1032,["onClick"])]))),256)),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:p,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:v[5]||(v[5]=ue=>p("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(I,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(L,{modelValue:u.value.sqlEnable,"onUpdate:modelValue":v[6]||(v[6]=ue=>u.value.sqlEnable=ue)},{default:c.withCtx(()=>[c.createVNode(O,{label:"关闭",value:0}),c.createVNode(O,{label:"启用",value:1})]),_:1},8,["modelValue"]),u.value.sqlEnable?(c.openBlock(),c.createBlock(D,{key:0,type:"primary",size:"small",onClick:g,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),u.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(P,{modelValue:u.value.sqlValue,"onUpdate:modelValue":v[7]||(v[7]=ue=>u.value.sqlValue=ue),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),oEt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},a.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(pde,{ref_key:"monacoEditorRef",ref:i,language:"lua",suggestionEnable:!0},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(GNt,{visible:s.value,"onUpdate:visible":v[9]||(v[9]=ue=>s.value=ue),factorType:a.value,data:(oe=n.config.factorDescriptions)==null?void 0:oe.filter(ue=>[1,3].includes(ue.type))},null,8,["visible","factorType","data"]),c.createVNode(z,{ref_key:"stVarSelectDialogRef",ref:r},null,512)],64)}}},[["__scopeId","data-v-f1bea35b"]]),RAt="",Bw=n=>(c.pushScopeId("data-v-3e69da40"),n=n(),c.popScopeId(),n),lEt={key:0,class:"common-indicator"},uEt={class:"indicator"},cEt=Bw(()=>c.createElementVNode("div",{class:"title"},[c.createElementVNode("span",null,"常用指标: "),c.createElementVNode("span",null,"不限")],-1)),dEt={class:"options"},hEt=["onClick"],fEt={class:"tags"},pEt=["onClick"],gEt={style:{"font-size":"18px"}},mEt={key:0,class:"out-box"},bEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),_Et={key:0,class:"convenient-option-box"},yEt={class:"out-box"},vEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),CEt={key:0},wEt={key:0},xEt={key:0},SEt={key:1},DEt={class:"tFeaturelncomes-option-box"},NEt={class:"tFeaturelncomes-out-box"},EEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),kEt={key:2},LEt={key:3},MEt={key:4},TEt={key:5},AEt={key:6},IEt={style:{display:"flex","align-items":"center"}},REt={key:7},OEt={class:"dialog-footer"},FEt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.useModel(n,"data"),r=n,o=c.ref(!1),s=c.computed(()=>{var b;return(b=r.data.find(C=>C.radioType==="1"))==null?void 0:b.key}),a=c.computed(()=>{let b=[];return r.varietyMarket===null&&!r.commonOption.length?b=r.config.options:(b=r.config.options,r.varietyMarket&&(b=b.filter(({parent:C})=>C.varietyMarketIds.includes(r.varietyMarket))),r.commonOption.length&&(b=b.filter(({parent:C})=>{const{commonOptionIds:_}=C;return[...new Set([..._,...r.commonOption])].length!==[..._,...r.commonOption].length}))),b}),l=c.ref({}),u=c.ref({}),d=b=>{l.value=b;const C={key:b.key,type:b.type,label:b.label};switch(b.key){case"st":{u.value={...C,st:null};break}case"tFeaturelncomes":{u.value={...C,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{u.value={...C,priceLevels:null};break}case"peTtmLevels":{u.value={...C,peTtmLevels:null};break}case"optionsCpType":{u.value={...C,optionsCpType:null};break}case"perVolumn":{u.value={...C,radio:null,levels:[]};break}case"mainFlow":{u.value={...C,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{u.value={...C,enumType:null};break}default:u.value={...C,range:[null,null],unit:b.defaultUnit.length?[...b.defaultUnit]:[null,null],radioType:s.value&&s.value!==b.key?"0":b.defaultRadioType,rankRange:b.defaultRankRange||[null,null]}}o.value=!0},h=()=>{var C,_;switch(u.value.key){case"st":{const{label:v,st:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:w,withFewYears:x,yearsCount:S,netProfit:D}=u.value;if(["",null].includes(x)||["",null].includes(S)||["",null].includes(D))return Hn.warning("格式错误: 请填写完整");u.value.tagText=`${v}: ${x}年内${S}年以上盈利${w===1?"超":"跌"}过${D}亿`;break}case"priceLevels":{const{label:v,priceLevels:w}=u.value;if(!w||w.length===0)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:w}=u.value;if(!w||w.length===0)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:w,levels:x}=u.value;if(!w)return Hn.warning("格式错误: 请选择时间");if(!(x!=null&&x.length))return Hn.warning("格式错误: 请选择分位");u.value.tagText=`${v}: ${(C=e.find(S=>S.value===w))==null?void 0:C.label}${x.map(S=>`${S}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:w,radio:x,rankRange:S}=u.value,D=N=>{if(N===""||N===null||N===void 0)return!1;const k=Number(N);return!isNaN(k)};if(!x)return Hn.warning("格式错误: 请选择时间");if(!D(S[0])&&!D(S[1]))return Hn.warning(`格式错误: 请填写${w==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ${S[0]}${w==="0"?"%":""} ~ ${S[1]}${w==="0"?"%":""}`:["",null].includes(S[0])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≤${S[1]}${w==="0"?"%":""}`:u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≥${S[0]}${w==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${(_=t.find(x=>x.value===w))==null?void 0:_.label}`;break}default:{const{label:v,unit:w,radioType:x}=u.value,S=x==="1"?u.value.rankRange:u.value.range;if(["",null].includes(S[0])&&["",null].includes(S[1]))return Hn.warning("格式错误: 请至少填写一个值");if(x==="1"){const k=Number(S[0]),E=Number(S[1]);if(isNaN(k)||isNaN(E))return Hn.warning("格式错误: 请填写数字");if(k<0||E<0)return Hn.warning("格式错误: 请填写大于0的数字");if(k>E)return Hn.warning("格式错误: 请填写正确的排名范围")}const D=x==="1"?"":w[0]??"",N=x==="1"?"":w[1]??"";!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}${x==="1"?"排名":""}: ${S[0]}${D} ~ ${S[1]}${N}`:["",null].includes(S[0])?u.value.tagText=`${v}${x==="1"?"排名":""}: ≤${S[1]}${N}`:u.value.tagText=`${v}${x==="1"?"排名":""}: ≥${S[0]}${D}`}}const b=i.value.findIndex(({key:v})=>v===u.value.key);b===-1?i.value.push(u.value):i.value.splice(b,1,u.value),o.value=!1},f=b=>{l.value=a.value.find(({key:C})=>C===b.key),u.value=JSON.parse(JSON.stringify(b)),o.value=!0},p=b=>{i.value.splice(b,1)},g=b=>{u.value.range=[...b.range],u.value.unit=[...b.unit]},m=b=>{switch(b){case"≤0":Object.assign(u.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(u.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>a.value,()=>{i.value.length&&(i.value=i.value.filter(({key:b})=>a.value.find(C=>C.key===b)))});const y=()=>{u.value.radio=null,u.value.rankRange=[null,null]};return(b,C)=>{const _=N6,v=vV,w=Gx,x=jl,S=Ko,D=ql,N=Ul,k=Kx,E=R6,L=l1;return n.config.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",lEt,[c.createElementVNode("div",uEt,[cEt,c.createElementVNode("div",dEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,A=>(c.openBlock(),c.createElementBlock("span",{key:A.key,onClick:R=>d(A)},c.toDisplayString(A.label),9,hEt))),128))])]),c.createElementVNode("div",fEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(A,R)=>(c.openBlock(),c.createBlock(_,{closable:"",type:"info",onClose:B=>p(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(A.tagText),1),c.createElementVNode("span",{class:"edit",onClick:B=>f(A)},"编辑",8,pEt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(L,{modelValue:o.value,"onUpdate:modelValue":C[26]||(C[26]=A=>o.value=A),title:l.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",OEt,[c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var A;return[l.value.type===void 0&&u.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",mEt,[bEt,c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[2]||(C[2]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[3]||(C[3]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):l.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(A=l.value.convenientOptions)!=null&&A.length?(c.openBlock(),c.createElementBlock("div",_Et,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.convenientOptions,R=>(c.openBlock(),c.createBlock(S,{key:R.text,onClick:B=>g(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",yEt,[vEt,c.createVNode(x,{modelValue:u.value.range[0],"onUpdate:modelValue":C[5]||(C[5]=R=>u.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",CEt,c.toDisplayString(u.value.unit[0]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[0],"onUpdate:modelValue":C[4]||(C[4]=R=>u.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.range[1],"onUpdate:modelValue":C[7]||(C[7]=R=>u.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",wEt,c.toDisplayString(u.value.unit[1]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[1],"onUpdate:modelValue":C[6]||(C[6]=R=>u.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[l.value.key==="st"?(c.openBlock(),c.createElementBlock("div",xEt,[c.createVNode(w,{modelValue:u.value.st,"onUpdate:modelValue":C[8]||(C[8]=R=>u.value.st=R)},{default:c.withCtx(()=>[c.createVNode(k,{label:"是",value:1}),c.createVNode(k,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",SEt,[c.createElementVNode("div",DEt,[c.createVNode(S,{onClick:C[9]||(C[9]=R=>m("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(S,{onClick:C[10]||(C[10]=R=>m("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(S,{onClick:C[11]||(C[11]=R=>m("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(S,{onClick:C[12]||(C[12]=R=>m("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(S,{onClick:C[13]||(C[13]=R=>m("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",NEt,[EEt,c.createElementVNode("div",null,[c.createVNode(E,{modelValue:u.value.withFewYears,"onUpdate:modelValue":C[14]||(C[14]=R=>u.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(E,{modelValue:u.value.yearsCount,"onUpdate:modelValue":C[15]||(C[15]=R=>u.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(u.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(E,{modelValue:u.value.netProfit,"onUpdate:modelValue":C[16]||(C[16]=R=>u.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),l.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",kEt,[c.createVNode(N,{modelValue:u.value.priceLevels,"onUpdate:modelValue":C[17]||(C[17]=R=>u.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",LEt,[c.createVNode(N,{modelValue:u.value.peTtmLevels,"onUpdate:modelValue":C[18]||(C[18]=R=>u.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",MEt,[c.createVNode(w,{modelValue:u.value.optionsCpType,"onUpdate:modelValue":C[19]||(C[19]=R=>u.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(k,{label:"看涨",value:1}),c.createVNode(k,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",TEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[20]||(C[20]=R=>u.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(k,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(N,{modelValue:u.value.levels,"onUpdate:modelValue":C[21]||(C[21]=R=>u.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",AEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[22]||(C[22]=R=>u.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(k,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(k,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(k,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(k,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",IEt,[c.createElementVNode("span",null,c.toDisplayString(u.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[23]||(C[23]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[24]||(C[24]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),l.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",REt,[c.createVNode(w,{modelValue:u.value.enumType,"onUpdate:modelValue":C[25]||(C[25]=R=>u.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,B)=>c.createVNode(k,{key:B,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[l.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",gEt,c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(v,{label:"数值",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:l.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[1]||(C[1]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"},onChange:y},{default:c.withCtx(()=>[c.createVNode(v,{label:"涨幅范围",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-3e69da40"]]),FAt="",mg=n=>(c.pushScopeId("data-v-efd872de"),n=n(),c.popScopeId(),n),PEt={class:"variety-search"},BEt={key:0,class:"variety-search-row"},VEt={class:"title"},zEt=mg(()=>c.createElementVNode("span",null,"品种市场: ",-1)),HEt={key:1,class:"variety-search-row"},jEt={class:"title"},WEt=mg(()=>c.createElementVNode("span",null,"常用选项: ",-1)),$Et={key:2,class:"variety-search-row"},UEt={class:"title"},qEt=mg(()=>c.createElementVNode("span",null,"上市板块: ",-1)),KEt={key:3,class:"variety-search-row"},GEt={class:"title"},YEt=mg(()=>c.createElementVNode("span",null,"自定标签: ",-1)),QEt={key:4,class:"variety-search-row"},ZEt={class:"title"},XEt=mg(()=>c.createElementVNode("span",null,"价差转换: ",-1)),JEt={key:5,class:"variety-search-row"},ekt={class:"title"},tkt=mg(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),nkt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]});const r=c.computed(()=>{const h={};return Object.keys(mde).forEach(f=>{const p=mde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),e({formatData:h=>{var p,g,m,y,b,C;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:_}=h,{type:v,jcList:w}=_;switch(v){case 1:{f.translateType=1,f.jcType=w.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:_}=h;if((C=_==null?void 0:_.list)!=null&&C.length&&(f.tbFeatureFactorScores=_.list.map(v=>{switch(v.key){case"compare":return{freqId:v.cycle,factorId:v.factor,compareType:v.compareType,freqId2:v.cycle2,factorId2:v.factor2};default:return{freqId:v.cycle,factorId:v.factor,startScore:v.score[0],endScore:v.score[1]}}})),_.sqlEnable){const v=_.list.reduce((x,S,D)=>{var k,E;const N=`条件${D+1}`;switch(S.key){case"compare":{let L="";(k=r.value.factorScreen)!=null&&k.cycleShow?L=`freq_id = ${S.cycle} and factor_id = ${S.factor} ${S.compareType} freq_id = ${S.cycle2} and factor_id = ${S.factor2}`:L=`factor_id = ${S.factor} ${S.compareType} factor_id = ${S.factor2}`,x.set(N,`(${L})`);break}default:{let L=`factor_id = ${S.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(L=`freq_id = ${S.cycle} and factor_id = ${S.factor} and `),(S.score[0]||S.score[0]===0)&&(S.score[1]||S.score[1]===0)?L+=`score >= ${S.score[0]} and score <= ${S.score[1]}`:S.score[0]||S.score[0]===0?L+=`score >= ${S.score[0]}`:(S.score[1]||S.score[1]===0)&&(L+=`score <= ${S.score[1]}`),x.set(N,`(${L})`)}}return x},new Map([]));let w=_.sqlValue;for(const[x,S]of v){const D=new RegExp(x,"g");w=w.replace(D,S)}f.sql=w,f.sqlExpression=_.sqlValue}f.enableSql=_.sqlEnable===1?2:1,_.factorSelectExpr&&(f.factorSelectExpr=_.factorSelectExpr)}{const _=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],v=h.commonIndicator.reduce((E,L)=>{const{key:A,type:R,range:B,unit:I,radioType:T,radio:O,rankRange:P}=L;if(A==="mainFlow"){let[U,K]=P,$=T==="0"?`netInfow${O}d`:`last${O}DayMainFlowRank`;E.push({column:$,start:U,end:K})}if(A==="auditOpinionType")E.push({column:L.key,enumType:L.enumType});else if(T==="1")f.sortBy={column:L.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(A)){let[U,K]=B;["",null].includes(U)||(U=U/100),["",null].includes(K)||(K=K/100),E.push({column:L.key,start:U,end:K})}else if(R===void 0&&!_.includes(A)){let[U,K]=B;if(!["",null].includes(U))switch(I[0]){case"亿":U=U*1e8;break;case"千万":U=U*1e7;break;default:U=U;break}if(!["",null].includes(K))switch(I[1]){case"亿":K=K*1e8;break;case"千万":K=K*1e7;break;default:K=K;break}E.push({column:L.key,start:U,end:K})}return E},[]);v.length&&(f.query=v);const w=h.commonIndicator.find(({key:E})=>E==="st");w&&(f.st=w.st);const x=h.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");x&&(f.netProfitQueryDto={...x,netProfit:x.netProfit*1e8});const S=h.commonIndicator.find(({key:E})=>E==="priceLevels");S&&(f.priceLevels=S.priceLevels);const D=h.commonIndicator.find(({key:E})=>E==="peTtmLevels");D&&(f.peTtmLevels=D.peTtmLevels);const N={};h.commonIndicator.forEach(E=>{const{key:L}=E;switch(L){case"expireDays":["",null].includes(E.range[0])||(N.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(N.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(N.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(N.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(N.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(N.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(N.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(N.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(N.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(N.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(N.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(N.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(N.minVolume=E.range[0]),["",null].includes(E.range[1])||(N.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(N.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(N.maxOpenInterest=E.range[1]);break;case"optionsCpType":N.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(N.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(N.maxOptionGear=E.range[1]);break}});const k=h.commonIndicator.find(({key:E})=>E==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(N).length&&(f.searchOptionDto={...f.searchOptionDto,...N})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=Kx,g=Gx,m=Td,y=dV,b=ql,C=Ul;return c.openBlock(),c.createElementBlock("div",PEt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",BEt,[c.createElementVNode("div",VEt,[zEt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(p,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",HEt,[c.createElementVNode("div",jEt,[WEt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",$Et,[c.createElementVNode("div",UEt,[qEt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",KEt,[c.createElementVNode("div",GEt,[YEt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",QEt,[c.createElementVNode("div",ZEt,[XEt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",JEt,[c.createElementVNode("div",ekt,[tkt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(aEt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(FEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-efd872de"]]),ikt={install(n){n.component("st-varietySearch",nkt)}},BAt="",rkt={class:"variety-auto-complete"},okt={key:0},skt={class:"label"},akt=En({__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(n,{emit:e}){const t=c.inject("stConfig"),i=e,r=n,o=c.ref(""),s=async(u,d)=>{if(u===""||u==="null")d([]);else{const h={keyWord:u,pageNum:1,pageSize:999,userId:c0("id"),hotSearchFlag:1},{body:f}=await t.request.post("/common/qt/getFeatureInfosByPage",h),p=f.list.map(({code:g,featureName:m})=>({label:`${g} ${m}`,value:g}));d(p)}},a=({label:u,value:d})=>{const h=u.split(" ").at(-1);i("select",{name:h,code:d}),r.selectClearEnable&&(o.value="")},l=u=>{i("change",u)};return(u,d)=>{const h=GB;return c.openBlock(),c.createElementBlock("div",rkt,[n.labelShowEnable?(c.openBlock(),c.createElementBlock("span",okt,"品种搜索:")):c.createCommentVNode("",!0),c.createVNode(h,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),clearable:"",size:r.size,placeholder:r.placeholder,"fetch-suggestions":s,onSelect:a,onChange:l},{default:c.withCtx(({item:f})=>[c.createElementVNode("div",skt,c.toDisplayString(f.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},[["__scopeId","data-v-d433c4b8"]]),zAt="",HAt="",lkt=n=>(c.pushScopeId("data-v-e4f6c06a"),n=n(),c.popScopeId(),n),ukt={class:"custom-header"},ckt={class:"left"},dkt=lkt(()=>c.createElementVNode("span",null," 选择变量 ",-1)),hkt={class:"right"},fkt={class:"custom-body"},pkt={class:"config-list"},gkt={class:"config-item"},mkt={key:0},bkt={key:0},_kt={key:1},ykt={key:0},vkt={style:{"max-width":"820px"}},Ckt={style:{"white-space":"pre-line"}},wkt=En({__name:"index",props:{useCase:{type:String,default:"1"}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(null),o=c.ref(!1),s=c.ref(null),a=c.ref([]),l=c.computed(()=>{var h;return((h=a.value.find(f=>f.varName===s.value))==null?void 0:h.formatList)??[]}),u=h=>h.replace(/^\[|\]$/g,"").split("],[").map(g=>{const m=g.replace(/\[|\]/g,""),[y,b]=m.split(",");return{label:y.trim(),value:b.trim()}}),d=h=>{const f=[];for(let C=0;C<h.length;C++){const _=h[C];switch(console.log(_),_.vtype){case"text":{f.push(_.param);break}default:{if(!_.modelValue)return Hn.error("请检查插入格式内是否填写完整");let v=_.modelValue;_.prefix&&(v=`${_.prefix}${v}`),_.suffix&&(v=`${v}${_.suffix}`),f.push(v);break}}}if(!r.value)return Hn.error("未检测到编辑器实例");const p=f.join("_"),g=r.value.getInstance(),m=g.getPosition(),b=r.value.getValue().split(`
|
|
825
|
+
`);i.value.setValue(O);const P=D.column+I.length;S.setPosition({lineNumber:D.lineNumber,column:P}),S.focus()}};return c.watch(()=>o.value,_=>{switch(_){case!0:{c.nextTick(()=>{i.value.resize(),t.value.factorSelectExpr&&(a.value="脚本",i.value.setValue(t.value.factorSelectExpr),i.value.focusToEnd()),(t.value.sqlEnable&&t.value.sqlValue||!t.value.sqlEnable&&t.value.list.length)&&(a.value="模版")});break}case!1:{r.value.close();break}}}),c.watch(()=>a.value,_=>{_==="模版"&&r.value.close(),_==="脚本"&&c.nextTick(()=>{i.value.focusToEnd()})},{deep:!0}),(_,v)=>{var oe;const w=xH,x=N6,S=cz,D=Ko,N=yn,k=rl,E=vV,L=Gx,A=c.resolveComponent("st-customFunction"),R=ql,B=Ul,I=I6,T=R6,O=Kx,P=jl,U=A6,K=o1,$=l1,z=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",YNt,[c.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(c.openBlock(),c.createBlock(x,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:v[0]||(v[0]=ue=>y("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(w,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(t.value.list,(ue,le)=>(c.openBlock(),c.createBlock(x,{closable:"",type:"info",onClose:X=>y("factorTag",le)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m(ue)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),t.value.factorSelectExpr?(c.openBlock(),c.createBlock(S,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(x,{closable:"",type:"info",onClose:v[1]||(v[1]=ue=>y("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",QNt,c.toDisplayString(t.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(D,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode($,{"modal-class":"factor-dialog",modelValue:o.value,"onUpdate:modelValue":v[8]||(v[8]=ue=>o.value=ue),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ue,titleClass:le})=>[c.createElementVNode("div",ZNt,[c.createElementVNode("div",XNt,[c.createElementVNode("span",{id:ue,class:c.normalizeClass(le)}," 因子筛选 ",10,JNt),c.createVNode(k,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(N,{onClick:v[2]||(v[2]=X=>s.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ih))]),_:1})]),_:1}),c.createVNode(L,{modelValue:a.value,"onUpdate:modelValue":v[3]||(v[3]=X=>a.value=X),size:"small"},{default:c.withCtx(()=>[c.createVNode(E,{label:"模版",value:"模版"}),c.createVNode(E,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(A,{size:"small",onInsert:C},null,512),[[c.vShow,a.value==="脚本"]])]),c.createElementVNode("div",eEt,[a.value==="脚本"?(c.openBlock(),c.createBlock(D,{key:0,size:"small",type:"primary",onClick:b},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(N,{onClick:v[4]||(v[4]=X=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(i1))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",sEt,[c.createVNode(D,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[a.value==="模版"?(c.openBlock(),c.createBlock(K,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(U,{ref_key:"dialogFormRef",ref:l,model:u.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.list,(ue,le)=>(c.openBlock(),c.createElementBlock("div",tEt,[c.createElementVNode("span",nEt,c.toDisplayString(`条件${le+1}`),1),ue.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.compareType,"onUpdate:modelValue":X=>ue.compareType=X,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],X=>c.createVNode(R,{label:X,value:X,key:X},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:1,prop:"list."+le+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle2,"onUpdate:modelValue":X=>ue.cycle2=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor2,"onUpdate:modelValue":X=>ue.factor2=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[1,3].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{prop:"list."+le+".score",rules:{validator:c.unref(fSt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",iEt,[c.createVNode(T,{modelValue:ue.score[0],"onUpdate:modelValue":X=>ue.score[0]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),rEt,c.createVNode(T,{modelValue:ue.score[1],"onUpdate:modelValue":X=>ue.score[1]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(N,{onClick:X=>f(le)},{default:c.withCtx(()=>[c.createVNode(c.unref(_x))]),_:2},1032,["onClick"])]))),256)),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:p,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:v[5]||(v[5]=ue=>p("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(I,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(L,{modelValue:u.value.sqlEnable,"onUpdate:modelValue":v[6]||(v[6]=ue=>u.value.sqlEnable=ue)},{default:c.withCtx(()=>[c.createVNode(O,{label:"关闭",value:0}),c.createVNode(O,{label:"启用",value:1})]),_:1},8,["modelValue"]),u.value.sqlEnable?(c.openBlock(),c.createBlock(D,{key:0,type:"primary",size:"small",onClick:g,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),u.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(P,{modelValue:u.value.sqlValue,"onUpdate:modelValue":v[7]||(v[7]=ue=>u.value.sqlValue=ue),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),oEt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},a.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(pde,{ref_key:"monacoEditorRef",ref:i,language:"lua",suggestionEnable:!0},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(GNt,{visible:s.value,"onUpdate:visible":v[9]||(v[9]=ue=>s.value=ue),factorType:a.value,data:(oe=n.config.factorDescriptions)==null?void 0:oe.filter(ue=>[1,3].includes(ue.type))},null,8,["visible","factorType","data"]),c.createVNode(z,{ref_key:"stVarSelectDialogRef",ref:r},null,512)],64)}}},[["__scopeId","data-v-deab9c48"]]),RAt="",Bw=n=>(c.pushScopeId("data-v-3e69da40"),n=n(),c.popScopeId(),n),lEt={key:0,class:"common-indicator"},uEt={class:"indicator"},cEt=Bw(()=>c.createElementVNode("div",{class:"title"},[c.createElementVNode("span",null,"常用指标: "),c.createElementVNode("span",null,"不限")],-1)),dEt={class:"options"},hEt=["onClick"],fEt={class:"tags"},pEt=["onClick"],gEt={style:{"font-size":"18px"}},mEt={key:0,class:"out-box"},bEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),_Et={key:0,class:"convenient-option-box"},yEt={class:"out-box"},vEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),CEt={key:0},wEt={key:0},xEt={key:0},SEt={key:1},DEt={class:"tFeaturelncomes-option-box"},NEt={class:"tFeaturelncomes-out-box"},EEt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),kEt={key:2},LEt={key:3},MEt={key:4},TEt={key:5},AEt={key:6},IEt={style:{display:"flex","align-items":"center"}},REt={key:7},OEt={class:"dialog-footer"},FEt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.useModel(n,"data"),r=n,o=c.ref(!1),s=c.computed(()=>{var b;return(b=r.data.find(C=>C.radioType==="1"))==null?void 0:b.key}),a=c.computed(()=>{let b=[];return r.varietyMarket===null&&!r.commonOption.length?b=r.config.options:(b=r.config.options,r.varietyMarket&&(b=b.filter(({parent:C})=>C.varietyMarketIds.includes(r.varietyMarket))),r.commonOption.length&&(b=b.filter(({parent:C})=>{const{commonOptionIds:_}=C;return[...new Set([..._,...r.commonOption])].length!==[..._,...r.commonOption].length}))),b}),l=c.ref({}),u=c.ref({}),d=b=>{l.value=b;const C={key:b.key,type:b.type,label:b.label};switch(b.key){case"st":{u.value={...C,st:null};break}case"tFeaturelncomes":{u.value={...C,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{u.value={...C,priceLevels:null};break}case"peTtmLevels":{u.value={...C,peTtmLevels:null};break}case"optionsCpType":{u.value={...C,optionsCpType:null};break}case"perVolumn":{u.value={...C,radio:null,levels:[]};break}case"mainFlow":{u.value={...C,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{u.value={...C,enumType:null};break}default:u.value={...C,range:[null,null],unit:b.defaultUnit.length?[...b.defaultUnit]:[null,null],radioType:s.value&&s.value!==b.key?"0":b.defaultRadioType,rankRange:b.defaultRankRange||[null,null]}}o.value=!0},h=()=>{var C,_;switch(u.value.key){case"st":{const{label:v,st:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:w,withFewYears:x,yearsCount:S,netProfit:D}=u.value;if(["",null].includes(x)||["",null].includes(S)||["",null].includes(D))return Hn.warning("格式错误: 请填写完整");u.value.tagText=`${v}: ${x}年内${S}年以上盈利${w===1?"超":"跌"}过${D}亿`;break}case"priceLevels":{const{label:v,priceLevels:w}=u.value;if(!w||w.length===0)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:w}=u.value;if(!w||w.length===0)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:w,levels:x}=u.value;if(!w)return Hn.warning("格式错误: 请选择时间");if(!(x!=null&&x.length))return Hn.warning("格式错误: 请选择分位");u.value.tagText=`${v}: ${(C=e.find(S=>S.value===w))==null?void 0:C.label}${x.map(S=>`${S}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:w,radio:x,rankRange:S}=u.value,D=N=>{if(N===""||N===null||N===void 0)return!1;const k=Number(N);return!isNaN(k)};if(!x)return Hn.warning("格式错误: 请选择时间");if(!D(S[0])&&!D(S[1]))return Hn.warning(`格式错误: 请填写${w==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ${S[0]}${w==="0"?"%":""} ~ ${S[1]}${w==="0"?"%":""}`:["",null].includes(S[0])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≤${S[1]}${w==="0"?"%":""}`:u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≥${S[0]}${w==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:w}=u.value;if(w===null)return Hn.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${(_=t.find(x=>x.value===w))==null?void 0:_.label}`;break}default:{const{label:v,unit:w,radioType:x}=u.value,S=x==="1"?u.value.rankRange:u.value.range;if(["",null].includes(S[0])&&["",null].includes(S[1]))return Hn.warning("格式错误: 请至少填写一个值");if(x==="1"){const k=Number(S[0]),E=Number(S[1]);if(isNaN(k)||isNaN(E))return Hn.warning("格式错误: 请填写数字");if(k<0||E<0)return Hn.warning("格式错误: 请填写大于0的数字");if(k>E)return Hn.warning("格式错误: 请填写正确的排名范围")}const D=x==="1"?"":w[0]??"",N=x==="1"?"":w[1]??"";!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}${x==="1"?"排名":""}: ${S[0]}${D} ~ ${S[1]}${N}`:["",null].includes(S[0])?u.value.tagText=`${v}${x==="1"?"排名":""}: ≤${S[1]}${N}`:u.value.tagText=`${v}${x==="1"?"排名":""}: ≥${S[0]}${D}`}}const b=i.value.findIndex(({key:v})=>v===u.value.key);b===-1?i.value.push(u.value):i.value.splice(b,1,u.value),o.value=!1},f=b=>{l.value=a.value.find(({key:C})=>C===b.key),u.value=JSON.parse(JSON.stringify(b)),o.value=!0},p=b=>{i.value.splice(b,1)},g=b=>{u.value.range=[...b.range],u.value.unit=[...b.unit]},m=b=>{switch(b){case"≤0":Object.assign(u.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(u.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>a.value,()=>{i.value.length&&(i.value=i.value.filter(({key:b})=>a.value.find(C=>C.key===b)))});const y=()=>{u.value.radio=null,u.value.rankRange=[null,null]};return(b,C)=>{const _=N6,v=vV,w=Gx,x=jl,S=Ko,D=ql,N=Ul,k=Kx,E=R6,L=l1;return n.config.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",lEt,[c.createElementVNode("div",uEt,[cEt,c.createElementVNode("div",dEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,A=>(c.openBlock(),c.createElementBlock("span",{key:A.key,onClick:R=>d(A)},c.toDisplayString(A.label),9,hEt))),128))])]),c.createElementVNode("div",fEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(A,R)=>(c.openBlock(),c.createBlock(_,{closable:"",type:"info",onClose:B=>p(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(A.tagText),1),c.createElementVNode("span",{class:"edit",onClick:B=>f(A)},"编辑",8,pEt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(L,{modelValue:o.value,"onUpdate:modelValue":C[26]||(C[26]=A=>o.value=A),title:l.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",OEt,[c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var A;return[l.value.type===void 0&&u.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",mEt,[bEt,c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[2]||(C[2]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[3]||(C[3]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):l.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(A=l.value.convenientOptions)!=null&&A.length?(c.openBlock(),c.createElementBlock("div",_Et,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.convenientOptions,R=>(c.openBlock(),c.createBlock(S,{key:R.text,onClick:B=>g(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",yEt,[vEt,c.createVNode(x,{modelValue:u.value.range[0],"onUpdate:modelValue":C[5]||(C[5]=R=>u.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",CEt,c.toDisplayString(u.value.unit[0]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[0],"onUpdate:modelValue":C[4]||(C[4]=R=>u.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.range[1],"onUpdate:modelValue":C[7]||(C[7]=R=>u.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",wEt,c.toDisplayString(u.value.unit[1]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[1],"onUpdate:modelValue":C[6]||(C[6]=R=>u.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[l.value.key==="st"?(c.openBlock(),c.createElementBlock("div",xEt,[c.createVNode(w,{modelValue:u.value.st,"onUpdate:modelValue":C[8]||(C[8]=R=>u.value.st=R)},{default:c.withCtx(()=>[c.createVNode(k,{label:"是",value:1}),c.createVNode(k,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",SEt,[c.createElementVNode("div",DEt,[c.createVNode(S,{onClick:C[9]||(C[9]=R=>m("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(S,{onClick:C[10]||(C[10]=R=>m("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(S,{onClick:C[11]||(C[11]=R=>m("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(S,{onClick:C[12]||(C[12]=R=>m("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(S,{onClick:C[13]||(C[13]=R=>m("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",NEt,[EEt,c.createElementVNode("div",null,[c.createVNode(E,{modelValue:u.value.withFewYears,"onUpdate:modelValue":C[14]||(C[14]=R=>u.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(E,{modelValue:u.value.yearsCount,"onUpdate:modelValue":C[15]||(C[15]=R=>u.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(u.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(E,{modelValue:u.value.netProfit,"onUpdate:modelValue":C[16]||(C[16]=R=>u.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),l.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",kEt,[c.createVNode(N,{modelValue:u.value.priceLevels,"onUpdate:modelValue":C[17]||(C[17]=R=>u.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",LEt,[c.createVNode(N,{modelValue:u.value.peTtmLevels,"onUpdate:modelValue":C[18]||(C[18]=R=>u.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",MEt,[c.createVNode(w,{modelValue:u.value.optionsCpType,"onUpdate:modelValue":C[19]||(C[19]=R=>u.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(k,{label:"看涨",value:1}),c.createVNode(k,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",TEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[20]||(C[20]=R=>u.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(k,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(N,{modelValue:u.value.levels,"onUpdate:modelValue":C[21]||(C[21]=R=>u.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",AEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[22]||(C[22]=R=>u.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(k,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(k,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(k,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(k,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",IEt,[c.createElementVNode("span",null,c.toDisplayString(u.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[23]||(C[23]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[24]||(C[24]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),l.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",REt,[c.createVNode(w,{modelValue:u.value.enumType,"onUpdate:modelValue":C[25]||(C[25]=R=>u.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,B)=>c.createVNode(k,{key:B,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[l.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",gEt,c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(v,{label:"数值",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:l.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[1]||(C[1]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"},onChange:y},{default:c.withCtx(()=>[c.createVNode(v,{label:"涨幅范围",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-3e69da40"]]),FAt="",mg=n=>(c.pushScopeId("data-v-efd872de"),n=n(),c.popScopeId(),n),PEt={class:"variety-search"},BEt={key:0,class:"variety-search-row"},VEt={class:"title"},zEt=mg(()=>c.createElementVNode("span",null,"品种市场: ",-1)),HEt={key:1,class:"variety-search-row"},jEt={class:"title"},WEt=mg(()=>c.createElementVNode("span",null,"常用选项: ",-1)),$Et={key:2,class:"variety-search-row"},UEt={class:"title"},qEt=mg(()=>c.createElementVNode("span",null,"上市板块: ",-1)),KEt={key:3,class:"variety-search-row"},GEt={class:"title"},YEt=mg(()=>c.createElementVNode("span",null,"自定标签: ",-1)),QEt={key:4,class:"variety-search-row"},ZEt={class:"title"},XEt=mg(()=>c.createElementVNode("span",null,"价差转换: ",-1)),JEt={key:5,class:"variety-search-row"},ekt={class:"title"},tkt=mg(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),nkt=En({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]});const r=c.computed(()=>{const h={};return Object.keys(mde).forEach(f=>{const p=mde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),e({formatData:h=>{var p,g,m,y,b,C;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:_}=h,{type:v,jcList:w}=_;switch(v){case 1:{f.translateType=1,f.jcType=w.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:_}=h;if((C=_==null?void 0:_.list)!=null&&C.length&&(f.tbFeatureFactorScores=_.list.map(v=>{switch(v.key){case"compare":return{freqId:v.cycle,factorId:v.factor,compareType:v.compareType,freqId2:v.cycle2,factorId2:v.factor2};default:return{freqId:v.cycle,factorId:v.factor,startScore:v.score[0],endScore:v.score[1]}}})),_.sqlEnable){const v=_.list.reduce((x,S,D)=>{var k,E;const N=`条件${D+1}`;switch(S.key){case"compare":{let L="";(k=r.value.factorScreen)!=null&&k.cycleShow?L=`freq_id = ${S.cycle} and factor_id = ${S.factor} ${S.compareType} freq_id = ${S.cycle2} and factor_id = ${S.factor2}`:L=`factor_id = ${S.factor} ${S.compareType} factor_id = ${S.factor2}`,x.set(N,`(${L})`);break}default:{let L=`factor_id = ${S.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(L=`freq_id = ${S.cycle} and factor_id = ${S.factor} and `),(S.score[0]||S.score[0]===0)&&(S.score[1]||S.score[1]===0)?L+=`score >= ${S.score[0]} and score <= ${S.score[1]}`:S.score[0]||S.score[0]===0?L+=`score >= ${S.score[0]}`:(S.score[1]||S.score[1]===0)&&(L+=`score <= ${S.score[1]}`),x.set(N,`(${L})`)}}return x},new Map([]));let w=_.sqlValue;for(const[x,S]of v){const D=new RegExp(x,"g");w=w.replace(D,S)}f.sql=w,f.sqlExpression=_.sqlValue}f.enableSql=_.sqlEnable===1?2:1,_.factorSelectExpr&&(f.factorSelectExpr=_.factorSelectExpr)}{const _=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],v=h.commonIndicator.reduce((E,L)=>{const{key:A,type:R,range:B,unit:I,radioType:T,radio:O,rankRange:P}=L;if(A==="mainFlow"){let[U,K]=P,$=T==="0"?`netInfow${O}d`:`last${O}DayMainFlowRank`;E.push({column:$,start:U,end:K})}if(A==="auditOpinionType")E.push({column:L.key,enumType:L.enumType});else if(T==="1")f.sortBy={column:L.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(A)){let[U,K]=B;["",null].includes(U)||(U=U/100),["",null].includes(K)||(K=K/100),E.push({column:L.key,start:U,end:K})}else if(R===void 0&&!_.includes(A)){let[U,K]=B;if(!["",null].includes(U))switch(I[0]){case"亿":U=U*1e8;break;case"千万":U=U*1e7;break;default:U=U;break}if(!["",null].includes(K))switch(I[1]){case"亿":K=K*1e8;break;case"千万":K=K*1e7;break;default:K=K;break}E.push({column:L.key,start:U,end:K})}return E},[]);v.length&&(f.query=v);const w=h.commonIndicator.find(({key:E})=>E==="st");w&&(f.st=w.st);const x=h.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");x&&(f.netProfitQueryDto={...x,netProfit:x.netProfit*1e8});const S=h.commonIndicator.find(({key:E})=>E==="priceLevels");S&&(f.priceLevels=S.priceLevels);const D=h.commonIndicator.find(({key:E})=>E==="peTtmLevels");D&&(f.peTtmLevels=D.peTtmLevels);const N={};h.commonIndicator.forEach(E=>{const{key:L}=E;switch(L){case"expireDays":["",null].includes(E.range[0])||(N.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(N.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(N.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(N.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(N.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(N.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(N.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(N.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(N.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(N.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(N.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(N.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(N.minVolume=E.range[0]),["",null].includes(E.range[1])||(N.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(N.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(N.maxOpenInterest=E.range[1]);break;case"optionsCpType":N.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(N.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(N.maxOptionGear=E.range[1]);break}});const k=h.commonIndicator.find(({key:E})=>E==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(N).length&&(f.searchOptionDto={...f.searchOptionDto,...N})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=Kx,g=Gx,m=Td,y=dV,b=ql,C=Ul;return c.openBlock(),c.createElementBlock("div",PEt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",BEt,[c.createElementVNode("div",VEt,[zEt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(p,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",HEt,[c.createElementVNode("div",jEt,[WEt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",$Et,[c.createElementVNode("div",UEt,[qEt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",KEt,[c.createElementVNode("div",GEt,[YEt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:k})=>(c.openBlock(),c.createBlock(m,{label:N,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",QEt,[c.createElementVNode("div",ZEt,[XEt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",JEt,[c.createElementVNode("div",ekt,[tkt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(aEt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(FEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-efd872de"]]),ikt={install(n){n.component("st-varietySearch",nkt)}},BAt="",rkt={class:"variety-auto-complete"},okt={key:0},skt={class:"label"},akt=En({__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(n,{emit:e}){const t=c.inject("stConfig"),i=e,r=n,o=c.ref(""),s=async(u,d)=>{if(u===""||u==="null")d([]);else{const h={keyWord:u,pageNum:1,pageSize:999,userId:c0("id"),hotSearchFlag:1},{body:f}=await t.request.post("/common/qt/getFeatureInfosByPage",h),p=f.list.map(({code:g,featureName:m})=>({label:`${g} ${m}`,value:g}));d(p)}},a=({label:u,value:d})=>{const h=u.split(" ").at(-1);i("select",{name:h,code:d}),r.selectClearEnable&&(o.value="")},l=u=>{i("change",u)};return(u,d)=>{const h=GB;return c.openBlock(),c.createElementBlock("div",rkt,[n.labelShowEnable?(c.openBlock(),c.createElementBlock("span",okt,"品种搜索:")):c.createCommentVNode("",!0),c.createVNode(h,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),clearable:"",size:r.size,placeholder:r.placeholder,"fetch-suggestions":s,onSelect:a,onChange:l},{default:c.withCtx(({item:f})=>[c.createElementVNode("div",skt,c.toDisplayString(f.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},[["__scopeId","data-v-d433c4b8"]]),zAt="",HAt="",lkt=n=>(c.pushScopeId("data-v-e4f6c06a"),n=n(),c.popScopeId(),n),ukt={class:"custom-header"},ckt={class:"left"},dkt=lkt(()=>c.createElementVNode("span",null," 选择变量 ",-1)),hkt={class:"right"},fkt={class:"custom-body"},pkt={class:"config-list"},gkt={class:"config-item"},mkt={key:0},bkt={key:0},_kt={key:1},ykt={key:0},vkt={style:{"max-width":"820px"}},Ckt={style:{"white-space":"pre-line"}},wkt=En({__name:"index",props:{useCase:{type:String,default:"1"}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(null),o=c.ref(!1),s=c.ref(null),a=c.ref([]),l=c.computed(()=>{var h;return((h=a.value.find(f=>f.varName===s.value))==null?void 0:h.formatList)??[]}),u=h=>h.replace(/^\[|\]$/g,"").split("],[").map(g=>{const m=g.replace(/\[|\]/g,""),[y,b]=m.split(",");return{label:y.trim(),value:b.trim()}}),d=h=>{const f=[];for(let C=0;C<h.length;C++){const _=h[C];switch(console.log(_),_.vtype){case"text":{f.push(_.param);break}default:{if(!_.modelValue)return Hn.error("请检查插入格式内是否填写完整");let v=_.modelValue;_.prefix&&(v=`${_.prefix}${v}`),_.suffix&&(v=`${v}${_.suffix}`),f.push(v);break}}}if(!r.value)return Hn.error("未检测到编辑器实例");const p=f.join("_"),g=r.value.getInstance(),m=g.getPosition(),b=r.value.getValue().split(`
|
|
826
826
|
`);if(m.lineNumber<=b.length){const C=m.lineNumber-1,_=b[C],v=m.column-1,w=v>0?_[v-1]:"",x=v<_.length?_[v]:"";let S=p;w&&w!==" "&&!/[\s({[ ]/.test(w)&&(S=" "+S),x&&x!==" "&&!/[\s)}\]]/.test(x)&&(S=S+" ");const D=_.substring(0,v)+S+_.substring(v);b[C]=D;const N=b.join(`
|
|
827
827
|
`);r.value.setValue(N);const k=m.column+S.length;g.setPosition({lineNumber:m.lineNumber,column:k}),g.focus()}};return c.onMounted(async()=>{const{body:h}=await t.request.post("/common/conf/queryAllBackVariables",{useCase:i.useCase});a.value=h??[]}),e({open:h=>{r.value=h,o.value=!0},close:()=>{o.value=!1}}),(h,f)=>{const p=ql,g=Ul,m=yn,y=jl,b=Ko,C=rl,_=l1;return c.openBlock(),c.createBlock(_,{"modal-class":"var-select-dialog",modelValue:o.value,"onUpdate:modelValue":f[2]||(f[2]=v=>o.value=v),"align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(()=>[c.createElementVNode("div",ukt,[c.createElementVNode("div",ckt,[dkt,c.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"选择变量",filterable:"",clearable:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,(v,w)=>(c.openBlock(),c.createBlock(p,{key:w,label:v.varName,value:v.varName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",hkt,[c.createVNode(m,{class:"el-icon--left",onClick:f[1]||(f[1]=v=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(i1))]),_:1})])])]),default:c.withCtx(()=>[c.createElementVNode("div",fkt,[l.value.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(l.value,(v,w)=>(c.openBlock(),c.createElementBlock("div",{class:"format-item",key:w},[c.createElementVNode("span",null,"格式"+c.toDisplayString(w+1)+":",1),c.createElementVNode("div",pkt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(v.configList,(x,S)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",gkt,[x.vtype==="text"?(c.openBlock(),c.createElementBlock("span",mkt,c.toDisplayString(x.param),1)):c.createCommentVNode("",!0),x.vtype==="inputVariety"?(c.openBlock(),c.createBlock(akt,{key:1,size:"small",placeholder:x.param,selectClearEnable:!1,labelShowEnable:!1,onSelect:({name:D,code:N})=>x.modelValue=N,onChange:D=>x.modelValue=D,style:{width:"100px"}},null,8,["placeholder","onSelect","onChange"])):c.createCommentVNode("",!0),x.vtype==="input"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[x.prefix?(c.openBlock(),c.createElementBlock("span",bkt,c.toDisplayString(x.prefix),1)):c.createCommentVNode("",!0),c.createVNode(y,{modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,size:"small"},null,8,["modelValue","onUpdate:modelValue","placeholder"]),x.suffix?(c.openBlock(),c.createElementBlock("span",_kt,c.toDisplayString(x.suffix),1)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),x.vtype==="select"?(c.openBlock(),c.createBlock(g,{key:3,modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,clearable:"",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u(x.optionsStr),D=>(c.openBlock(),c.createBlock(p,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):c.createCommentVNode("",!0)]),S!==v.configList.length-1?(c.openBlock(),c.createElementBlock("span",ykt,"_")):c.createCommentVNode("",!0)],64))),256))]),c.createVNode(b,{type:"primary",plain:"",size:"small",onClick:x=>d(v.configList)},{default:c.withCtx(()=>[c.createTextVNode(" 插入变量 ")]),_:2},1032,["onClick"]),c.createVNode(C,{effect:"dark",placement:"top-start"},{content:c.withCtx(()=>[c.createElementVNode("div",vkt,[c.createElementVNode("span",Ckt,c.toDisplayString(v.tip),1)])]),default:c.withCtx(()=>[c.createVNode(m,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ih))]),_:1})]),_:2},1024)]))),128)):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-e4f6c06a"]]),xkt={install(n){n.component("st-varSelectDialog",wkt)}},WAt="",$At="",Skt={key:0,class:"footer-box"},Dkt={__name:"index",props:c.mergeModels({tableData:{type:Array,default:[]},tableColumn:{type:Array,default:[]},tableLoading:{type:[String,null],default:null},config:{type:Object}},{tableActiveData:{default:()=>[]},tableActiveDataModifiers:{}}),emits:c.mergeModels(["touchBottom"],["update:tableActiveData"]),setup(n,{emit:e}){const t=e,i=n,r=c.computed(()=>({headerHeight:50,rowHeight:50,tableActiveNum:9,tableActiveKey:"id",pageUpDownEnabled:!0,...i.config})),o=c.ref(null),s=c.ref(0);let a=0,l=!1,u=null;const d=c.useModel(n,"tableActiveData"),h=c.computed(()=>d.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:C})=>{const{tableActiveNum:_,tableActiveKey:v}=r.value;if(h.value.includes(b[v]))return;const w=Math.floor(C/_)*_,x=w+_;d.value=i.tableData.slice(w,x)},p=({code:b})=>{const{tableData:C}=i,{tableActiveNum:_,tableActiveKey:v,pageUpDownEnabled:w}=r.value;if(!C.length||!w)return;const x=C.findIndex(k=>k[v]===h.value.at(0)),S=C.findIndex(k=>k[v]===h.value.at(-1));let D=null,N=null;switch(b){case"PageUp":if(x===0)return;D=x-_>0?x-_:0,N=D+_-1,d.value=C.slice(D,N+1),m(D,"PageUp");break;case"PageDown":if(S===C.length-1)return;D=x+_,N=D+_-1,d.value=C.slice(D,N+1),m(N,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,C)=>{b!==null&&(clearTimeout(u),l=!0,C==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),c.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),u=setTimeout(()=>{l=!1},500)}))},y=({rowData:b})=>{if(!d.value.length)return;let C="";const{tableActiveKey:_}=r.value;return b[_]===h.value[0]&&(C+=" virtual-table-active-start"),h.value.includes(b[_])&&(C+=" virtual-table-active-row"),b[_]===h.value[h.value.length-1]&&(C+=" virtual-table-active-end"),C};return c.onMounted(()=>{window.addEventListener("keydown",p)}),c.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),c.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,C)=>{const _=Kg,v=Ko,w=tS,x=rCe,S=oCe;return c.openBlock(),c.createBlock(S,null,{default:c.withCtx(({height:D,width:N})=>[c.createVNode(x,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:N,height:D,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":y,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:C[0]||(C[0]=k=>m(n.tableData.length-1,"PageDown"))},{empty:c.withCtx(()=>[c.createVNode(_,{description:"暂无数据",style:{height:"100%"}})]),footer:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",Skt,[n.tableLoading==="more"?(c.openBlock(),c.createBlock(w,{key:0},{default:c.withCtx(()=>[c.createVNode(v,{type:"primary",text:"",loading:""},{default:c.withCtx(()=>[c.createTextVNode("正在加载更多数据")]),_:1})]),_:1})):n.tableLoading==="all"?(c.openBlock(),c.createBlock(w,{key:1},{default:c.withCtx(()=>[c.createTextVNode(" 已无更多数据 ")]),_:1})):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]),_:2},1032,["data","columns","width","height","header-height","row-height","row-event-handlers","footer-height"])]),_:1})}}},UAt="",Nkt=En(Dkt,[["__scopeId","data-v-7e702a8a"]]),Ekt={install(n){n.component("st-virtualTable",Nkt)}},kkt={install(n){KCe.install(n),Oet.install(n),Pet.install(n),rtt.install(n),Ltt.install(n),Att.install(n),dlt.install(n),Vlt.install(n),mut.install(n),Mut.install(n),Zut.install(n),oct.install(n),uct.install(n),Fxt.install(n),Vxt.install(n),$xt.install(n),Kxt.install(n),Qxt.install(n),Jxt.install(n),aSt.install(n),hSt.install(n),ikt.install(n),xkt.install(n),Ekt.install(n)}};/*!-----------------------------------------------------------------------------
|
|
828
828
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|