16 lines
39 KiB
JavaScript
16 lines
39 KiB
JavaScript
(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[986],{1576:function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",l="minute",i="hour",o="day",s="week",u="month",d="quarter",c="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,u),l=n-a<0,i=t.clone().add(r+(l?-1:1),u);return+(-(r+(n-a)/(l?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:s,d:o,D:f,h:i,m:l,s:a,ms:r,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",x={};x[y]=v;var w="$isDayjsObject",k=function(e){return e instanceof C||!(!e||!e[w])},A=function e(t,n,r){var a;if(!t)return y;if("string"==typeof t){var l=t.toLowerCase();x[l]&&(a=l),n&&(x[l]=n,a=l);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var o=t.name;x[o]=t,a=o}return!r&&a&&(y=a),a||!r&&y},$=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},_=b;_.l=A,_.i=k,_.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function v(e){this.$L=A(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var a=r[2]-1||0,l=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,l)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,l)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return _},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=$(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return $(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<$(e)},g.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!_.u(t)||t,d=_.p(e),p=function(e,t){var a=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?a:a.endOf(o)},m=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case c:return r?p(1,0):p(31,11);case u:return r?p(1,v):p(0,v+1);case s:var y=this.$locale().weekStart||0,x=(h<y?h+7:h)-y;return p(r?g-x:g+(6-x),v);case o:case f:return m(b+"Hours",0);case i:return m(b+"Minutes",1);case l:return m(b+"Seconds",2);case a:return m(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,s=_.p(e),d="set"+(this.$u?"UTC":""),p=(n={},n[o]=d+"Date",n[f]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[i]=d+"Hours",n[l]=d+"Minutes",n[a]=d+"Seconds",n[r]=d+"Milliseconds",n)[s],m=s===o?this.$D+(t-this.$W):t;if(s===u||s===c){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[_.p(e)]()},g.add=function(r,d){var f,p=this;r=Number(r);var m=_.p(d),h=function(e){var t=$(p);return _.w(t.date(t.date()+Math.round(e*r)),p)};if(m===u)return this.set(u,this.$M+r);if(m===c)return this.set(c,this.$y+r);if(m===o)return h(1);if(m===s)return h(7);var v=(f={},f[l]=t,f[i]=n,f[a]=e,f)[m]||1,g=this.$d.getTime()+r*v;return _.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=_.z(this),l=this.$H,i=this.$m,o=this.$M,s=n.weekdays,u=n.months,d=n.meridiem,c=function(e,n,a,l){return e&&(e[n]||e(t,r))||a[n].slice(0,l)},f=function(e){return _.s(l%12||12,e,"0")},m=d||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(h,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return o+1;case"MM":return _.s(o+1,2,"0");case"MMM":return c(n.monthsShort,o,u,3);case"MMMM":return c(u,o);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return c(n.weekdaysMin,t.$W,s,2);case"ddd":return c(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(l);case"HH":return _.s(l,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(l,i,!0);case"A":return m(l,i,!1);case"m":return String(i);case"mm":return _.s(i,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,p){var m,h=this,v=_.p(f),g=$(r),b=(g.utcOffset()-this.utcOffset())*t,y=this-g,x=function(){return _.m(h,g)};switch(v){case c:m=x()/12;break;case u:m=x();break;case d:m=x()/3;break;case s:m=(y-b)/6048e5;break;case o:m=(y-b)/864e5;break;case i:m=y/n;break;case l:m=y/t;break;case a:m=y/e;break;default:m=y}return p?m:_.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return x[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=A(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return _.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),M=C.prototype;return $.prototype=M,[["$ms",r],["$s",a],["$m",l],["$H",i],["$W",o],["$M",u],["$y",c],["$D",f]].forEach(function(e){M[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),$.extend=function(e,t){return e.$i||(e(t,C,$),e.$i=!0),$},$.locale=A,$.isDayjs=k,$.unix=function(e){return $(1e3*e)},$.en=x[y],$.Ls=x,$.p={},$})},16638:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return rt}});n(18111),n(22489),n(61701),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698);var r=n(56768),a=n(90144),l=n(45130),i=n(24232),o=n(60782),s=n(97387),u=n(59856),d=n(24556),c=n(10496),f=n(42517),p=n(58911),m=n(52384),h=n(46522),v=n(47209),g=n(76459),b=n(13707),y=n(34707),x=n(24305),w=n(84279),k=(0,r.pM)({name:"Remove",render(){return(0,r.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,r.h)("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:"\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 32px;\n "}))}}),A=n(70652),$=n(79882),_=n(88733),C=n(82813),M=n(70151),R=n(38741),D=n(37901),I=n(25972),F=n(54880),S=n(93913),E=n(64075),T=n(36272),B=n(32797);function O(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const z=(0,$.a)({name:"InputNumber",common:E.A,peers:{Button:T.A,Input:B.A},self:O});var P=z,L=n(34350),N=(0,L.c)([(0,L.cB)("input-number-suffix","\n display: inline-block;\n margin-right: 10px;\n "),(0,L.cB)("input-number-prefix","\n display: inline-block;\n margin-left: 10px;\n ")]);function V(e){return void 0===e||null===e||"string"===typeof e&&""===e.trim()?null:Number(e)}function U(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||"-"===e||"-0"===e}function W(e){return void 0===e||null===e||!Number.isNaN(e)}function j(e,t){return"number"!==typeof e?"":void 0===t?String(e):e.toFixed(t)}function K(e){if(null===e)return null;if("number"===typeof e)return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const H=800,X=100,Y=Object.assign(Object.assign({},$.A.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]});var q=(0,r.pM)({name:"InputNumber",props:Y,slots:Object,setup(e){const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:l}=(0,_.Ay)(e),i=(0,$.A)("InputNumber","-input-number",N,P,e,n),{localeRef:o}=(0,C.A)("InputNumber"),s=(0,M.A)(e),{mergedSizeRef:u,mergedDisabledRef:d,mergedStatusRef:c}=s,f=(0,a.KR)(null),p=(0,a.KR)(null),m=(0,a.KR)(null),h=(0,a.KR)(e.defaultValue),v=(0,a.lW)(e,"value"),w=(0,y.A)(v,h),k=(0,a.KR)(""),A=e=>{const t=String(e).split(".")[1];return t?t.length:0},I=t=>{const n=[e.min,e.max,e.step,t].map(e=>void 0===e?0:A(e));return Math.max(...n)},F=(0,x.A)(()=>{const{placeholder:t}=e;return void 0!==t?t:o.value.placeholder}),S=(0,x.A)(()=>{const t=K(e.step);return null!==t?0===t?1:Math.abs(t):1}),E=(0,x.A)(()=>{const t=K(e.min);return null!==t?t:null}),T=(0,x.A)(()=>{const t=K(e.max);return null!==t?t:null}),B=()=>{const{value:t}=w;if(W(t)){const{format:n,precision:r}=e;n?k.value=n(t):null===t||void 0===r||A(t)>r?k.value=j(t,void 0):k.value=j(t,r)}else k.value=String(t)};B();const O=t=>{const{value:n}=w;if(t===n)return void B();const{"onUpdate:value":r,onUpdateValue:a,onChange:l}=e,{nTriggerFormInput:i,nTriggerFormChange:o}=s;l&&(0,D.T)(l,t),a&&(0,D.T)(a,t),r&&(0,D.T)(r,t),h.value=t,i(),o()},z=({offset:t,doUpdateIfValid:n,fixPrecision:r,isInputing:a})=>{const{value:l}=k;if(a&&U(l))return!1;const i=(e.parse||V)(l);if(null===i)return n&&O(null),null;if(W(i)){const l=A(i),{precision:o}=e;if(void 0!==o&&o<l&&!r)return!1;let s=Number.parseFloat((i+t).toFixed(null!==o&&void 0!==o?o:I(i)));if(W(s)){const{value:t}=T,{value:r}=E;if(null!==t&&s>t){if(!n||a)return!1;s=t}if(null!==r&&s<r){if(!n||a)return!1;s=r}return!(e.validator&&!e.validator(s))&&(n&&O(s),s)}}return!1},L=(0,x.A)(()=>{const e=z({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1===e}),Y=(0,x.A)(()=>{const{value:t}=w;if(e.validator&&null===t)return!1;const{value:n}=S,r=z({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1!==r}),q=(0,x.A)(()=>{const{value:t}=w;if(e.validator&&null===t)return!1;const{value:n}=S,r=z({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1!==r});function Q(t){const{onFocus:n}=e,{nTriggerFormFocus:r}=s;n&&(0,D.T)(n,t),r()}function G(t){var n,a;if(t.target===(null===(n=f.value)||void 0===n?void 0:n.wrapperElRef))return;const l=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(!1!==l){const e=null===(a=f.value)||void 0===a?void 0:a.inputElRef;e&&(e.value=String(l||"")),w.value===l&&B()}else B();const{onBlur:i}=e,{nTriggerFormBlur:o}=s;i&&(0,D.T)(i,t),o(),(0,r.dY)(()=>{B()})}function Z(t){const{onClear:n}=e;n&&(0,D.T)(n,t)}function J(){const{value:t}=q;if(!t)return void ce();const{value:n}=w;if(null===n)e.validator||O(re());else{const{value:e}=S;z({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function ee(){const{value:t}=Y;if(!t)return void ue();const{value:n}=w;if(null===n)e.validator||O(re());else{const{value:e}=S;z({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const te=Q,ne=G;function re(){if(e.validator)return null;const{value:t}=E,{value:n}=T;return null!==t?Math.max(0,t):null!==n?Math.min(0,n):0}function ae(e){Z(e),O(null)}function le(e){var t,n,r;(null===(t=m.value)||void 0===t?void 0:t.$el.contains(e.target))&&e.preventDefault(),(null===(n=p.value)||void 0===n?void 0:n.$el.contains(e.target))&&e.preventDefault(),null===(r=f.value)||void 0===r||r.activate()}let ie=null,oe=null,se=null;function ue(){se&&(window.clearTimeout(se),se=null),ie&&(window.clearInterval(ie),ie=null)}let de=null;function ce(){de&&(window.clearTimeout(de),de=null),oe&&(window.clearInterval(oe),oe=null)}function fe(){ue(),se=window.setTimeout(()=>{ie=window.setInterval(()=>{ee()},X)},H),(0,g.on)("mouseup",document,ue,{once:!0})}function pe(){ce(),de=window.setTimeout(()=>{oe=window.setInterval(()=>{J()},X)},H),(0,g.on)("mouseup",document,ce,{once:!0})}const me=()=>{oe||J()},he=()=>{ie||ee()};function ve(t){var n,r;if("Enter"===t.key){if(t.target===(null===(n=f.value)||void 0===n?void 0:n.wrapperElRef))return;const e=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==e&&(null===(r=f.value)||void 0===r||r.deactivate())}else if("ArrowUp"===t.key){if(!q.value)return;if(!1===e.keyboard.ArrowUp)return;t.preventDefault();const n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==n&&J()}else if("ArrowDown"===t.key){if(!Y.value)return;if(!1===e.keyboard.ArrowDown)return;t.preventDefault();const n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==n&&ee()}}function ge(t){k.value=t,!e.updateValueOnInput||e.format||e.parse||void 0!==e.precision||z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}(0,r.wB)(w,()=>{B()});const be={focus:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.focus()},blur:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.blur()},select:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.select()}},ye=(0,R.I)("InputNumber",l,n);return Object.assign(Object.assign({},be),{rtlEnabled:ye,inputInstRef:f,minusButtonInstRef:p,addButtonInstRef:m,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:h,mergedValue:w,mergedPlaceholder:F,displayedValueInvalid:L,mergedSize:u,mergedDisabled:d,displayedValue:k,addable:q,minusable:Y,mergedStatus:c,handleFocus:te,handleBlur:ne,handleClear:ae,handleMouseDown:le,handleAddClick:me,handleMinusClick:he,handleAddMousedown:pe,handleMinusMousedown:fe,handleKeyDown:ve,handleUpdateDisplayedValue:ge,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:(0,r.EW)(()=>{const{self:{iconColorDisabled:e}}=i.value,[t,n,r,a]=(0,b.B3)(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${a}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>(0,r.h)(F.b2,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>(0,I.Nj)(t["minus-icon"],()=>[(0,r.h)(w.A,{clsPrefix:e},{default:()=>(0,r.h)(k,null)})])}),a=()=>(0,r.h)(F.b2,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>(0,I.Nj)(t["add-icon"],()=>[(0,r.h)(w.A,{clsPrefix:e},{default:()=>(0,r.h)(A.A,null)})])});return(0,r.h)("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},(0,r.h)(S.A,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var a;return this.showButton&&"both"===this.buttonPlacement?[n(),(0,I.iQ)(t.prefix,t=>t?(0,r.h)("span",{class:`${e}-input-number-prefix`},t):null)]:null===(a=t.prefix)||void 0===a?void 0:a.call(t)},suffix:()=>{var l;return this.showButton?[(0,I.iQ)(t.suffix,t=>t?(0,r.h)("span",{class:`${e}-input-number-suffix`},t):null),"right"===this.buttonPlacement?n():null,a()]:null===(l=t.suffix)||void 0===l?void 0:l.call(t)}}))}}),Q=n(19605),G=n(92720),Z=n(68042),J=(n(44114),n(25216)),ee=n(77727),te=n(14764),ne=n(92548),re=(0,L.cB)("collapse","width: 100%;",[(0,L.cB)("collapse-item","\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n margin: var(--n-item-margin);\n ",[(0,L.cM)("disabled",[(0,L.cE)("header","cursor: not-allowed;",[(0,L.cE)("header-main","\n color: var(--n-title-text-color-disabled);\n "),(0,L.cB)("collapse-item-arrow","\n color: var(--n-arrow-color-disabled);\n ")])]),(0,L.cB)("collapse-item","margin-left: 32px;"),(0,L.c)("&:first-child","margin-top: 0;"),(0,L.c)("&:first-child >",[(0,L.cE)("header","padding-top: 0;")]),(0,L.cM)("left-arrow-placement",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","margin-right: 4px;")])]),(0,L.cM)("right-arrow-placement",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","margin-left: 4px;")])]),(0,L.cE)("content-wrapper",[(0,L.cE)("content-inner","padding-top: 16px;"),(0,ne._)({duration:"0.15s"})]),(0,L.cM)("active",[(0,L.cE)("header",[(0,L.cM)("active",[(0,L.cB)("collapse-item-arrow","transform: rotate(90deg);")])])]),(0,L.c)("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),(0,L.C5)("disabled",[(0,L.cM)("trigger-area-main",[(0,L.cE)("header",[(0,L.cE)("header-main","cursor: pointer;"),(0,L.cB)("collapse-item-arrow","cursor: default;")])]),(0,L.cM)("trigger-area-arrow",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","cursor: pointer;")])]),(0,L.cM)("trigger-area-extra",[(0,L.cE)("header",[(0,L.cE)("header-extra","cursor: pointer;")])])]),(0,L.cE)("header","\n font-size: var(--n-title-font-size);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n transition: color .3s var(--n-bezier);\n position: relative;\n padding: var(--n-title-padding);\n color: var(--n-title-text-color);\n ",[(0,L.cE)("header-main","\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n color: var(--n-title-text-color);\n "),(0,L.cE)("header-extra","\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,L.cB)("collapse-item-arrow","\n display: flex;\n transition:\n transform .15s var(--n-bezier),\n color .3s var(--n-bezier);\n font-size: 18px;\n color: var(--n-arrow-color);\n ")])])]);const ae=Object.assign(Object.assign({},$.A.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),le=(0,ee.D)("n-collapse");var ie=(0,r.pM)({name:"Collapse",props:ae,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:l,mergedRtlRef:i}=(0,_.Ay)(e),o=(0,a.KR)(e.defaultExpandedNames),s=(0,r.EW)(()=>e.expandedNames),u=(0,y.A)(s,o),d=(0,$.A)("Collapse","-collapse",re,te.A,e,n);function c(t){const{"onUpdate:expandedNames":n,onUpdateExpandedNames:r,onExpandedNamesChange:a}=e;r&&(0,D.T)(r,t),n&&(0,D.T)(n,t),a&&(0,D.T)(a,t),o.value=t}function f(t){const{onItemHeaderClick:n}=e;n&&(0,D.T)(n,t)}function p(t,n,r){const{accordion:a}=e,{value:l}=u;if(a)t?(c([n]),f({name:n,expanded:!0,event:r})):(c([]),f({name:n,expanded:!1,event:r}));else if(Array.isArray(l)){const e=l.slice(),t=e.findIndex(e=>n===e);~t?(e.splice(t,1),c(e),f({name:n,expanded:!1,event:r})):(e.push(n),c(e),f({name:n,expanded:!0,event:r}))}else c([n]),f({name:n,expanded:!0,event:r})}(0,r.Gt)(le,{props:e,mergedClsPrefixRef:n,expandedNamesRef:u,slots:t,toggleItem:p});const m=(0,R.I)("Collapse",i,n),h=(0,r.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{titleFontWeight:t,dividerColor:n,titlePadding:r,titleTextColor:a,titleTextColorDisabled:l,textColor:i,arrowColor:o,fontSize:s,titleFontSize:u,arrowColorDisabled:c,itemMargin:f}}=d.value;return{"--n-font-size":s,"--n-bezier":e,"--n-text-color":i,"--n-divider-color":n,"--n-title-padding":r,"--n-title-font-size":u,"--n-title-text-color":a,"--n-title-text-color-disabled":l,"--n-title-font-weight":t,"--n-arrow-color":o,"--n-arrow-color-disabled":c,"--n-item-margin":f}}),v=l?(0,J.R)("collapse",void 0,h,e):void 0;return{rtlEnabled:m,mergedTheme:d,mergedClsPrefix:n,cssVars:l?void 0:h,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,r.h)("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),oe=n(65049),se=n(11336),ue=(0,r.pM)({name:"ChevronLeft",render(){return(0,r.h)("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),de=n(86074),ce=n(35268),fe=n(74978),pe=n(55405),me=(0,r.pM)({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){const t=(0,fe.A)((0,a.lW)(e,"show"));return{onceTrue:t}},render(){return(0,r.h)(pe.A,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:n,clsPrefix:a}=this,i="show"===t&&n,o=(0,r.h)("div",{class:`${a}-collapse-item__content-wrapper`},(0,r.h)("div",{class:`${a}-collapse-item__content-inner`},this.$slots));return i?(0,r.bo)(o,[[l.aG,e]]):e?o:null}})}});const he={title:String,name:[String,Number],disabled:Boolean,displayDirective:String};var ve=(0,r.pM)({name:"CollapseItem",props:he,setup(e){const{mergedRtlRef:t}=(0,_.Ay)(e),n=(0,oe.sX)(),l=(0,x.A)(()=>{var t;return null!==(t=e.name)&&void 0!==t?t:n}),i=(0,r.WQ)(le);i||(0,ce.$8)("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:o,props:s,mergedClsPrefixRef:u,slots:d}=i,c=(0,r.EW)(()=>{const{value:e}=o;if(Array.isArray(e)){const{value:t}=l;return!~e.findIndex(e=>e===t)}if(e){const{value:t}=l;return t!==e}return!0}),f=(0,R.I)("Collapse",t,u);return{rtlEnabled:f,collapseSlots:d,randomName:n,mergedClsPrefix:u,collapsed:c,triggerAreas:(0,a.lW)(s,"triggerAreas"),mergedDisplayDirective:(0,r.EW)(()=>{const{displayDirective:t}=e;return t||s.displayDirective}),arrowPlacement:(0,r.EW)(()=>s.arrowPlacement),handleClick(t){let n="main";(0,se.d)(t,"arrow")&&(n="arrow"),(0,se.d)(t,"extra")&&(n="extra"),s.triggerAreas.includes(n)&&i&&!e.disabled&&i.toggleItem(c.value,l.value,t)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:n,collapsed:a,mergedDisplayDirective:l,mergedClsPrefix:i,disabled:o,triggerAreas:s}=this,u=(0,I.Vu)(t.header,{collapsed:a},()=>[this.title]),d=t["header-extra"]||e["header-extra"],c=t.arrow||e.arrow;return(0,r.h)("div",{class:[`${i}-collapse-item`,`${i}-collapse-item--${n}-arrow-placement`,o&&`${i}-collapse-item--disabled`,!a&&`${i}-collapse-item--active`,s.map(e=>`${i}-collapse-item--trigger-area-${e}`)]},(0,r.h)("div",{class:[`${i}-collapse-item__header`,!a&&`${i}-collapse-item__header--active`]},(0,r.h)("div",{class:`${i}-collapse-item__header-main`,onClick:this.handleClick},"right"===n&&u,(0,r.h)("div",{class:`${i}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},(0,I.Vu)(c,{collapsed:a},()=>[(0,r.h)(w.A,{clsPrefix:i},{default:()=>this.rtlEnabled?(0,r.h)(ue,null):(0,r.h)(de.A,null)})])),"left"===n&&u),(0,I.aD)(d,{collapsed:a},e=>(0,r.h)("div",{class:`${i}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},e))),(0,r.h)(me,{clsPrefix:i,displayDirective:l,show:!a},t))}}),ge=n(22695),be=n(82089),ye=n(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/
|
||
const xe=(0,ye.A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var we=n(91733);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/
|
||
const ke=(0,ye.A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var Ae=n(7023),$e=n(1576),_e=n.n($e),Ce=n(74911),Me=n(35720),Re=n(98728),De=n(15227);const Ie={class:"passage-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},Fe={class:"flex flex-col gap-4 mb-8"},Se={class:"flex items-center gap-2"},Ee={key:0},Te={key:0,class:"bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg flex items-start gap-3 mt-2"},Be={key:1,class:"bg-yellow-50 dark:bg-yellow-900/20 p-4 rounded-lg flex items-start gap-3 mt-2"},Oe={class:"max-w-2xl mx-auto"},ze={key:1,class:"text-gray-400 text-sm"},Pe={class:"max-w-4xl mx-auto space-y-6"},Le={key:0,class:"flex justify-center py-12"},Ne={key:1,class:"flex flex-col items-center justify-center py-16 text-center"},Ve={key:2,class:"space-y-6"},Ue={class:"flex items-center gap-1"},We=["innerHTML"],je=["innerHTML"],Ke=["innerHTML"],He={class:"mt-6 pt-4 border-t border-gray-100 dark:border-gray-800"},Xe={class:"flex items-center gap-2 mb-3"},Ye={class:"flex flex-wrap gap-2"},qe=["onClick"],Qe={key:0,class:"flex justify-center mt-8"},Ge={key:1,class:"text-center text-gray-400 text-sm mt-8"},Ze='<svg fill="currentColor" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google Gemini</title><path d="M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"/></svg>',Je='<svg fill="currentColor" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>';var et={__name:"PassageView",setup(e){const t=(0,s.J)(),n=(0,Re.rd)(),g=(0,o.Pj)(),b=new Ce.A({html:!0,breaks:!0,linkify:!0}),y=(0,a.KR)("generate"),x=(0,a.KR)(!1),w=(0,a.KR)(!1),k=(0,a.KR)(!1),A=(0,a.KR)(!1),$=(0,a.KR)(!1),_=(0,a.KR)("unlimited"),C=(0,a.KR)(1),M=(0,a.KR)(!0),R=(0,a.KR)([]),D=(0,a.KR)([]),I=(0,a.KR)([]),S=(0,a.KR)([]),E=(0,r.EW)(()=>g.getters.userInfo),T=(0,r.EW)(()=>E.value?.is_vip),B=(0,a.Kh)({mode:0,count:5,dict_ids:[],list_ids:[],word_ids:[],model:"gemini-3-pro"}),O=[{label:"Gemini 3 Pro (推荐)",value:"gemini-3-pro"}],z=e=>_e()(e).format("YYYY年MM月DD日 HH:mm"),P=e=>b.render(e||""),L=e=>{const t=n.resolve({path:"/word",query:{word_id:e}});window.open(t.href,"_blank")},N=async()=>{k.value=!0;try{const e=await Me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/dict/list");0===e.data.code&&(D.value=e.data.data.map(e=>({label:e.name,value:e.id})))}catch(e){console.error("Fetch dicts error:",e)}finally{k.value=!1}},V=async e=>{if(e){A.value=!0;try{const t=await Me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),n=t.data.data||t.data,r=new Set(B.word_ids),a=I.value.filter(e=>r.has(e.value)),l=(n.list||[]).map(e=>({label:e.word+(e.translations&&e.translations[0]?` (${e.translations[0].meaning})`:""),value:e.id})),i=[...a,...l],o=new Map;i.forEach(e=>o.set(e.value,e)),I.value=Array.from(o.values())}catch(t){console.error("Search words error:",t)}finally{A.value=!1}}},U=e=>{B.list_ids=B.list_ids.filter(t=>t!==e),S.value=S.value.filter(t=>t.id!==e)},W=async(e=!1)=>{if(!w.value){w.value=!0;try{const t=await Me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/ai_passage/list",{params:{page:C.value}}),n=t.data,r=n.list||[],a=n.pagination||{};R.value=e?[...R.value,...r]:r,M.value=C.value<(a.total_pages||0)}catch(n){console.error("Fetch history error:",n),t.error("获取历史记录失败")}finally{w.value=!1}}},j=()=>{M.value&&(C.value++,W(!0))},K=async()=>{if(1===B.mode&&B.dict_ids.length,3!==B.mode||0!==B.list_ids.length)if(4!==B.mode||0!==B.word_ids.length){x.value=!0;try{const e={mode:B.mode,model:B.model,count:B.count};1===B.mode&&(e.dict_ids=B.dict_ids),3===B.mode&&(e.dict_ids=B.list_ids),4===B.mode&&(e.word_ids=B.word_ids);const n=await Me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/ai_passage/generate",e);void 0!==n.data.remaining_usage&&(_.value=n.data.remaining_usage),t.success(`生成成功!剩余试用次数:${n.data.remaining_usage}`),y.value="history",C.value=1,W()}catch(e){console.error("Generate error:",e),e.response?.data?.message?t.error(e.response.data.message):t.error("生成失败,请稍后重试")}finally{x.value=!1}}else t.warning("请至少选择一个单词");else t.warning("请至少选择一个词单")};return(0,r.wB)(()=>B.mode,e=>{1===e&&0===D.value.length&&N()}),(0,r.wB)(y,e=>{"history"===e&&0===R.value.length&&W()}),(0,r.sV)(()=>{document.title="AI 助记短文 - Word Helper"}),(e,t)=>{const n=(0,r.gN)("motion-fade"),o=(0,r.gN)("motion-slide-visible-once-left");return(0,r.uX)(),(0,r.CE)("div",Ie,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Fe,[(0,r.Lk)("div",Se,[(0,r.bF)((0,a.R1)(u._),{size:"32",class:"text-primary"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ge.A))]),_:1}),t[10]||(t[10]=(0,r.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"AI 助记短文",-1))]),t[13]||(t[13]=(0,r.Lk)("p",{class:"text-gray-500 dark:text-gray-400"}," 利用 AI 生成包含目标单词的趣味短文,帮助您在语境中记忆单词。 ",-1)),E.value?(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Ee,[T.value?((0,r.uX)(),(0,r.CE)("div",Te,[(0,r.bF)((0,a.R1)(be.A),{class:"w-5 h-5 text-blue-500 mt-0.5 flex-shrink-0"}),t[11]||(t[11]=(0,r.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"}," 您是VIP用户,可无限量畅享AI助记短文功能。 ",-1))])):((0,r.uX)(),(0,r.CE)("div",Be,[(0,r.bF)((0,a.R1)(xe),{class:"w-5 h-5 text-yellow-500 mt-0.5 flex-shrink-0"}),t[12]||(t[12]=(0,r.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"},[(0,r.eW)(" 非VIP用户可试用3次AI助记短文功能,"),(0,r.Lk)("a",{href:"https://www.xn--xhq44jb2fzpc.com/subscribe",target:"_blank",class:"text-yellow-600 dark:text-yellow-400 font-bold hover:underline"},"赞助"),(0,r.eW)("可获得会员权限。 ")],-1))]))])),[[n]]):(0,r.Q3)("",!0)])),[[o]]),(0,r.bF)((0,a.R1)(d.A),{type:"segment",animated:"",value:y.value,"onUpdate:value":t[6]||(t[6]=e=>y.value=e),class:"mb-8"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(c.A),{name:"generate",tab:"生成短文"},{default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Oe,[(0,r.bF)((0,a.R1)(f.Ay),{title:"生成配置",class:"rounded-xl shadow-sm"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(p.A),{ref:"formRef",model:B,"label-placement":"top"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(m.Ay),{label:"单词来源"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(h.A),{value:B.mode,"onUpdate:value":t[0]||(t[0]=e=>B.mode=e),name:"mode",class:"grid grid-cols-2 gap-2 w-full"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(v.A),{value:0,label:"最近学习"}),(0,r.bF)((0,a.R1)(v.A),{value:1,label:"词书"}),(0,r.bF)((0,a.R1)(v.A),{value:2,label:"生词本"}),(0,r.bF)((0,a.R1)(v.A),{value:3,label:"词单"}),(0,r.bF)((0,a.R1)(v.A),{value:4,label:"自定义"})]),_:1},8,["value"])]),_:1}),4!==B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:0,label:"单词数量"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(q),{value:B.count,"onUpdate:value":t[1]||(t[1]=e=>B.count=e),min:1,max:20,class:"w-full"},null,8,["value"])]),_:1})):(0,r.Q3)("",!0),1===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:1,label:"选择词书"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.dict_ids,"onUpdate:value":t[2]||(t[2]=e=>B.dict_ids=e),multiple:"",filterable:"",placeholder:"请选择词书(不选代表全部)",options:D.value,loading:k.value,clearable:""},null,8,["value","options","loading"])]),_:1})):(0,r.Q3)("",!0),3===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:2,label:"选择词单"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"w-full border border-gray-300 dark:border-gray-700 rounded p-2 cursor-pointer hover:border-primary transition-colors min-h-[34px] flex flex-wrap gap-2",onClick:t[3]||(t[3]=e=>$.value=!0)},[S.value.length>0?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(S.value,e=>((0,r.uX)(),(0,r.Wv)((0,a.R1)(G.Ay),{key:e.id,closable:"",onClose:(0,l.D$)(t=>U(e.id),["stop"]),size:"small"},{default:(0,r.k6)(()=>[(0,r.eW)((0,i.v_)(e.name),1)]),_:2},1032,["onClose"]))),128)):((0,r.uX)(),(0,r.CE)("span",ze,"点击选择词单..."))])]),_:1})):(0,r.Q3)("",!0),4===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:3,label:"选择单词 (最多20个)"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.word_ids,"onUpdate:value":t[4]||(t[4]=e=>B.word_ids=e),multiple:"",filterable:"",remote:"",placeholder:"输入单词搜索...",options:I.value,loading:A.value,onSearch:V,"max-tag-count":5,clearable:""},null,8,["value","options","loading"])]),_:1})):(0,r.Q3)("",!0),(0,r.bF)((0,a.R1)(m.Ay),{label:"AI 模型"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.model,"onUpdate:value":t[5]||(t[5]=e=>B.model=e),options:O},null,8,["value"])]),_:1}),(0,r.bF)((0,a.R1)(F.Ay),{type:"primary",block:"",size:"large",loading:x.value,onClick:K},{default:(0,r.k6)(()=>[...t[14]||(t[14]=[(0,r.eW)(" 生成短文 ",-1)])]),_:1},8,["loading"])]),_:1},8,["model"])]),_:1})])),[[n]])]),_:1}),(0,r.bF)((0,a.R1)(c.A),{name:"history",tab:"历史记录"},{default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Pe,[w.value&&1===C.value?((0,r.uX)(),(0,r.CE)("div",Le,[(0,r.bF)((0,a.R1)(Z.A),{size:"large"})])):0===R.value.length?((0,r.uX)(),(0,r.CE)("div",Ne,[(0,r.bF)((0,a.R1)(u._),{size:"64",class:"text-gray-300 dark:text-gray-600 mb-4"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(we.A))]),_:1}),t[15]||(t[15]=(0,r.Lk)("p",{class:"text-gray-500 dark:text-gray-400"},"暂无生成记录,快去生成第一篇吧!",-1))])):((0,r.uX)(),(0,r.CE)("div",Ve,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(R.value,e=>((0,r.uX)(),(0,r.Wv)((0,a.R1)(f.Ay),{key:e.id,class:"rounded-xl shadow-sm hover:shadow-md transition-shadow",title:z(e.created_at),size:"medium"},{"header-extra":(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(G.Ay),{size:"small",type:"gpt-5"===e.model?"success":"info",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Ue,[(0,r.Lk)("span",{class:"w-4 h-4 flex items-center justify-center",innerHTML:"gpt-5"===e.model?Je:Ze},null,8,We),(0,r.Lk)("span",null,(0,i.v_)("gpt-5"===e.model?"GPT-5":"Gemini 3 Pro"),1)])]),_:2},1032,["type"])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"prose dark:prose-invert max-w-none mb-6 text-base leading-relaxed",innerHTML:P(e.content)},null,8,je),(0,r.bF)((0,a.R1)(ie),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ve),{title:"查看中文翻译",name:"1"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"prose dark:prose-invert max-w-none text-gray-600 dark:text-gray-300 p-4 bg-gray-50 dark:bg-gray-800/50 rounded-lg",innerHTML:P(e.translation)},null,8,Ke)]),_:2},1024)]),_:2},1024),(0,r.Lk)("div",He,[(0,r.Lk)("div",Xe,[(0,r.bF)((0,a.R1)(u._),{size:"16",class:"text-gray-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ke))]),_:1}),t[16]||(t[16]=(0,r.Lk)("span",{class:"text-xs text-gray-500 font-medium"},"关联单词",-1))]),(0,r.Lk)("div",Ye,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.words,e=>((0,r.uX)(),(0,r.CE)("div",{key:e.id,class:"group cursor-pointer px-3 py-1.5 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg text-sm hover:border-primary hover:text-primary transition-all flex items-center gap-1 shadow-sm",onClick:t=>L(e.id)},[(0,r.Lk)("span",null,(0,i.v_)(e.word),1),(0,r.bF)((0,a.R1)(u._),{size:"12",class:"opacity-0 group-hover:opacity-100 transition-opacity"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Ae.A))]),_:1})],8,qe))),128))])])]),_:2},1032,["title"]))),128)),M.value?((0,r.uX)(),(0,r.CE)("div",Qe,[(0,r.bF)((0,a.R1)(F.Ay),{loading:w.value,onClick:j,secondary:""},{default:(0,r.k6)(()=>[...t[17]||(t[17]=[(0,r.eW)(" 加载更多历史记录 ",-1)])]),_:1},8,["loading"])])):R.value.length>0?((0,r.uX)(),(0,r.CE)("div",Ge," 没有更多记录了 ")):(0,r.Q3)("",!0)]))])),[[n]])]),_:1})]),_:1},8,["value"]),(0,r.bF)(De.A,{show:$.value,"onUpdate:show":t[7]||(t[7]=e=>$.value=e),modelValue:B.list_ids,"onUpdate:modelValue":t[8]||(t[8]=e=>B.list_ids=e),selectedList:S.value,"onUpdate:selectedList":t[9]||(t[9]=e=>S.value=e),"max-count":10},null,8,["show","modelValue","selectedList"])])}}},tt=n(71241);const nt=(0,tt.A)(et,[["__scopeId","data-v-27b499a4"]]);var rt=nt}}]);
|
||
//# sourceMappingURL=986.ef9ba720.js.map
|