varSw=Object.defineProperty;varkv=d=>{throwTypeError(d)};varxw=(d,t,e)=>tind?Sw(d,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[t]=e;varM=(d,t,e)=>xw(d,typeoft!="symbol"?t+"":t,e),sg=(d,t,e)=>t.has(d)||kv("Cannot "+e);varn=(d,t,e)=>(sg(d,t,"read from private field"),e?e.call(d):t.get(d)),m=(d,t,e)=>t.has(d)?kv("Cannot add the same private member more than once"):tinstanceofWeakSet?t.add(d):t.set(d,e),p=(d,t,e,s)=>(sg(d,t,"write to private field"),s?s.call(d,e):t.set(d,e),e),b=(d,t,e)=>(sg(d,t,"access private method"),e);varYt=(d,t,e,s)=>({set_(i){p(d,t,i,e)},get_(){returnn(d,t,s)}});import{EasEw}from"./el-alert-BgSrlmWj.js";import{Easzu}from"./index-D0UXUP15.js";import{vasCw}from"./directive-9-T0mYyg.js";import{dasCi,oasO,cas$,qasC,sasH,nasSe,aaasX,gasft,jasrt,xasut,wasJ,MasAe,adasii,easUt,fasJt,Aasgt,yaset,DasSi,Hascb,alas_w,aQaskw,PasKh,tasTv,aLasig,zaspg,acasTw,agasPw,aRasMw,GasIw,KasDw,aBasLw,vasFw}from"./index-DdQQsURt.js";import{AasOw}from"./AppConfirmDialog-Cc3hmoaY.js";import{Eashb,aasdb}from"./el-form-item-Bf1ASn5W.js";import{EasVu}from"./index-CMWHMPp0.js";import{aasub,EasOp}from"./el-checkbox-C30U6HyK.js";import{EasGu}from"./el-input-number-8Eh01QWw.js";/* empty css */import{_as_i}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{EasRp,aasNp}from"./el-select-BslWanml.js";import{EasRw}from"./el-slider-DkuDEniy.js";import{EasNw}from"./el-switch-Dhsc7NkN.js";import"./el-popper-B8UgShUN.js";import"./el-tooltip-l0sNRNKZ.js";import"./el-scrollbar-DrHhzmuH.js";import{EasBw}from"./el-tag-CPRZ_Dgw.js";import{Easfb}from"./el-pagination-ggw-iiXB.js";import{Easpb}from"./el-progress-D9QUFMWN.js";import{Eas$w}from"./el-upload-BOcssSNB.js";import{aasUw,basHw,saszw,casVw,rasGw,uasjw,easWw,fasPv,hasXw,iasqw,jasQm,kasng,lasYw,masJf,nasKw,oasQw,pasJw,tasZw,qastA,vaseA,wassA,xasiA}from"./dataProcess-CQdQ3Rvp.js";import{uasnA}from"./models-Dmz7mWuU.js";import"./vnode-CqdGOdYr.js";import"./castArray-CpvD1ywp.js";import"./_baseClone-D4mnAM_M.js";import"./raf-BYY9WY16.js";import"./index-0bM-ph_e.js";import"./index-Cgs7GwqN.js";import"./omit-DNWyMDNK.js";import"./index-r223TcOB.js";import"./index-DBPUxcNG.js";import"./index-BV2APNtK.js";import"./scroll-CpiyMIWy.js";import"./clamp-V2IKZsEW.js";import"./toNumber-CQdo6fpk.js";import"./_baseIteratee-D4ynv-ep.js";import"./debounce-GPVXeeg3.js";import"./validator-DheTm7v_.js";import"./model-DEzmeLDW.js";constSl={min:1,max:50};functionJm(d,t=1){conste=Number(d),s=Number.isFinite(e)?Math.trunc(e):t;returnMath.min(Sl.max,Math.max(Sl.min,s))}constrA={class:"generation-option-row dataset-split-row"},aA={class:"dataset-split-config"},oA={class:"dataset-split-grid"},lA={class:"dataset-split-field"},cA={class:"dataset-split-input"},hA={class:"dataset-split-field"},dA={class:"dataset-split-input"},uA={class:"dataset-split-field"},fA={class:"dataset-split-input"},pA={key:0,role:"alert"},gA=Ci({__name:"DatasetSplitEditor",props:{modelValue:{},ariaLabelPrefix:{default:""}},emits:["update:modelValue"],setup(d,{emit:t}){conste=d,s=t,i=rt(()=>{const{train:o,validation:l,test:c}=e.modelValue;returno+l+c});functionr(o,l){s("update:modelValue",{...e.modelValue,[o]:Math.min(100,Math.max(0,Number(l)||0))})}functiona(o){return`${e.ariaLabelPrefix}${o}比例`}return(o,l)=>{constc=Gu;returnO(),$("div",rA,[l[9]||(l[9]=C("div",{class:"generation-option-copy"},[C("strong",null,"数据集划分"),C("small",null,"按比例将生成后的问答对随机划分为训练集、验证集和测试集")],-1)),C("div",aA,[C("div",oA,[C("label",lA,[l[4]||(l[4]=C("span",null,"训练集",-1)),C("span",cA,[H(c,{"model-value":d.modelValue.train,min:0,max:100,step:1,precision:0,"controls-position":"right","aria-label":a("训练集"),"onUpdate:modelValue":l[0]||(l[0]=h=>r("train",h))},null,8,["model-value","aria-label"]),l[3]||(l[3]=C("span",null,"%",-1))])]),C("label",hA,[l[6]||(l[6]=C("span",null,"验证集",-1)),C("span"
`)){o.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),a.collapseToStart();return}const{startContainer:l,startOffset:c}=o,h=[],u=[];if(l.nodeType===Node.TEXT_NODE){const S=l.parentElement;if(u.push(l.nodeValue.slice(c).replaceAll(af,"")),S!==this.editorDiv){let x=h;for(const A of this.editorDiv.childNodes){if(A===S){x=u;continue}x.push(b(v=Kt,wr,Nf).call(v,A))}}h.push(l.nodeValue.slice(0,c).replaceAll(af,""))}else if(l===this.editorDiv){let S=h,x=0;for(const A of this.editorDiv.childNodes)x++===c&&(S=u),S.push(b(w=Kt,wr,Nf).call(w,A))}p(this,js,`${h.join(`
`),position:A,pageIndex:_-1,rect:h.slice(0),rotation:u,annotationElementId:f,id:f,deleted:!1,popupRef:g,comment:(v==null?void 0:v.str)||null,richText:y,creationDate:w,modificationDate:S}}const a=await super.deserialize(e,s,i);return p(a,Ws,e.fontSize),a.color=B.makeHexColor(...e.color),p(a,js,b(o=Kt,wr,xm).call(o,e.value)),a._initialData=r,e.comment&&a.setCommentData(e),a}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const s=Mt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),i=Object.assign(super.serialize(e),{color:s,fontSize:n(this,Ws),value:b(this,xe,r0).call(this)});return this.addComment(i),e?(i.isCopy=!0,i):this.annotationElementId&&!b(this,xe,a0).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){const s=super.renderAnnotationElement(e);if(!s)return null;const{style:i}=s;i.fontSize=`calc(${n(this,Ws)}px*var(--total-scale-factor))`,i.color=this.color,s.replaceChildren();for(const r of n(this,js).split(`
`)){const a=document.createElement("div");a.append(r?document.createTextNode(r):document.createElement("br")),s.append(a)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:n(this,js)}}),s}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};js=new WeakMap,yu=new WeakMap,sl=new WeakMap,Ws=new WeakMap,xe=new WeakSet,s0=function(e){const s=r=>{this.editorDiv.style.fontSize=`calc(${r}px*var(--total-scale-factor))`,this.translate(0,-(r-n(this,Ws))*this.parentScale),p(this,Ws,r),b(this,xe,Rf).call(this)},i=n(this,Ws);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:pt.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},i0=function(e){const s=r=>{this.color=r,this.onUpdatedColor()},i=this.color;this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:pt.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},n0=function(){var i;const e=[];this.editorDiv.normalize();let s=null;for(const r of this.editorDiv.childNodes)(s==null?void 0:s.nodeType)===Node.TEXT_NODE&&r.nodeName==="BR"||(e.push(b(i=Kt,wr,Nf).call(i,r)),s=r);return e.join(`
`)},Rf=function(){const[e,s]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:r,div:a}=this,o=a.style.display,l=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",r.div.append(this.div),i=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",l)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/s):(this.width=i.height/e,this.height=i.width/s),this.fixAndSetPosition()},wr=new WeakSet,Nf=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(af,"")},Bf=function(){if(this.editorDiv.replaceChildren(),!!n(this,js))for(const e of n(this,js).split(`
`)){const s=document.createElement("div");s.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(s)}},r0=function(){return n(this,js).replaceAll(""," ")},xm=function(e){return e.replaceAll(" ","")},a0=function(e){const{value:s,fontSize:i,color:r,pageIndex:a}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==s||e.fontSize!==i||e.color.some((o,l)=>o!==r[l])||e.pageIndex!==a},m(Kt,wr),M(Kt,"_freeTextDefaultContent",""),M(Kt,"_internalPadding",0),M(Kt,"_defaultColor",null),M(Kt,"_defaultFontSize",10),M(Kt,"_type","freetext"),M(Kt,"_editorType",ct.FREETEXT);let Sm=Kt;class q{toSVGPath(){Ct("Abstract method `toSVGPath` must be implemented.")}get box(){Ct("Abstract getter `box` must be implemented.")}serialize(t,e){Ct("Abstract method `serialize` must be implemented.")}static _rescale(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o<l;o+=2)a[o]=e+t[o]*i,a[o+1]=s+t[o+1]*r;return a}static _rescaleAndSwap(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o<l;o+=2)a[o]=e+t[o+1]*i,a[o+1]=s+t[o]*r;return a}static _translate(t,e,s,i){i||(i=new Float32Array(t.length));for(let r=0,a=t.length;r<a;r+=2)i[r]=e+t[r],i[r+1]=s+t[r+1];return i}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,e,s,i,r){switch(r){case 90:return[1-e/s,t/i];case 180:return[1-t/s,1-e/i];case 270:return[e/s,1-t/i];default:return[t/s,e/i]}}static createBezierPoints(t,e,s,i,r,a){return[(t+5*s)/6,(e+5*i)/6,(5*s+r)/6,(5*i+a)/6,(s+r)/2,(i+a)/2]}}M(q,"PRECISION",1e-4);var Xs,zi,jc,Wc,mn,bt,il,nl,wu,Au,Xc,qc,ua,Su,Pp,Mp,_e,Hh,o0,l0,c0,h0,d0,u0;const Dn=class Dn{constructor({x:t,y:e},s,i,r,a,o=0){m(this,_e);m(this,Xs);m(this,zi,[]);m(this,jc);m(this,Wc);m(this,mn,[]);m(this,bt,new Float32Array(18));m(this,il);m(this,nl);m(this,wu);m(this,Au);m(this,Xc);m(this,qc);m(this,ua,[]);p(this,Xs,s),p(this,qc,r*i),p(this,Wc,a),n(this,bt).set([NaN,NaN,NaN,NaN,t,e],6),p(this,jc,o),p(this,Au,n(Dn,Su)*i),p(this,wu,n(Dn,Mp)*i),p(this,Xc,i),n(this,ua).push(t,e)}isEmpty(){return isNaN(n(this,bt)[8])}add({x:t,y:e}){var I;p(this,il,t),p(this,nl,e);const[s,i,r,a]=n(this,Xs);let[o,l,c,h]=n(this,bt).subarray(8,12);const u=t-c,f=e-h,g=Math.hypot(u,f);if(g<n(this,wu))return!1;const y=g-n(this,Au),v=y/g,w=v*u,S=v*f;let x=o,A=l;o=c,l=h,c+=w,h+=S,(I=n(this,ua))==null||I.push(t,e);const _=-S/y,E=w/y,k=_*n(this,qc),P=E*n(this,qc);return n(this,bt).set(n(this,bt).subarray(2,8),0),n(this,bt).set([c+k,h+P],4),n(this,bt).set(n(this,bt).subarray(14,18),12),n(this,bt).set([c-k,h-P],16),isNaN(n(this,bt)[6])?(n(this,mn).length===0&&(n(this,bt).set([o+k,l+P],2),n(this,mn).push(NaN,NaN,NaN,NaN,(o+k-s)/r,(l+P-i)/a),n(this,bt).set([o-k,l-P],14),n(this,zi).push(NaN,NaN,NaN,NaN,(o-k-s)/r,(l-P-i)/a)),n(this,bt).set([x,A,o,l,c,h],6),!this.isEmpty()):(n(this,bt).set([x,A,o,l,c,h],6),Math.abs(Math.atan2(A-l,x-o)-Math.atan2(S,w))<Math.PI/2?([o,l,c,h]=n(this,bt).subarray(2,6),n(this,mn).push(NaN,NaN,NaN,NaN,((o+c)/2-s)/r,((l+h)/2-i)/a),[o,l,x,A]=n(this,bt).subarray(14,18),n(this,zi).push(NaN,NaN,NaN,NaN,((x+o)/2-s)/r,((A+l)/2-i)/a),!0):([x,A,o,l,c,h]=n(this,bt).subarray(0,6),n(this,mn).push(((x+5*o)/6-s)/r,((A+5*l)/6-i)/a,((5*o+c)/6-s)/r,((5*l+h)/6-i)/a,((o+c)/2-s)/r,((l+h)/2-i)/a),[c,h,o,l,x,A]=n(this,bt).subarray(12,18),n(this,zi).push(((x+5*o)/6-s)/r,((A+5*l)/6-i)/a,((5*o+c)/6-s)/r,((5*l+h)/6-i)/a,((o+c)/2-s)/r,((l+h)/2-i)/a),!0))}toSVGPath(){if(this.isEmpty())return"";const t=n(this,mn),e=n(this,zi);if(isNaN(n(this,bt)[6])&&!this.isEmpty())return b(this,_e,o0).call(this);const s=[];s.push(`M${t[4]}${t[5]}`);for(let i=6;i<t.length;i+=6)isNaN(t[i])?s.push(`L${t[i+4]}${t[i+5]}`):s.push(`C${t[i]}${t[i+1]}${t[i+2]}${t[i+3]}${t[i+4]}${t[i+5]}`);b(this,_e,c0).call(this,s);for(let i=e.length-6;i>=6;i-=6)isNaN(e[i])?s.push(`L${e[i+4]}${e[i+5]}`):s.push(`C${e[i]}${e[i+1]}${e[i+2]}${e[i+3]}${e[i+4]}${e[i+5]}`);return b(this,_e,l0).call(this,s),s.join(" ")}newFreeDrawOutline(t,e,s,i,r,a){return new f0(t,e,s,i,r,a)}getOutlines(){var u;const t=n(this,mn),e=n(this,zi),s=n(this,bt),[i,r,a,o]=n