wordHelper/dist/js/169.6eb60ec2.js

54 lines
42 KiB
JavaScript

"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[169],{9845:function(e,t,n){n.d(t,{A:function(){return h}});var i=n(56768),r=n(84279),a=(0,i.pM)({name:"Empty",render(){return(0,i.h)("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),(0,i.h)("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),o=n(79882),l=n(88733),s=n(82813),d=n(25216),c=n(34350),v=n(52945),u=(0,c.cB)("empty","\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n",[(0,c.cE)("icon","\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n ",[(0,c.c)("+",[(0,c.cE)("description","\n margin-top: 8px;\n ")])]),(0,c.cE)("description","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,c.cE)("extra","\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n ")]);const p=Object.assign(Object.assign({},o.A.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var h=(0,i.pM)({name:"Empty",props:p,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=(0,l.Ay)(e),p=(0,o.A)("Empty","-empty",u,v.A,e,t),{localeRef:h}=(0,s.A)("Empty"),g=(0,i.EW)(()=>{var t,n,i;return null!==(t=e.description)&&void 0!==t?t:null===(i=null===(n=null===r||void 0===r?void 0:r.value)||void 0===n?void 0:n.Empty)||void 0===i?void 0:i.description}),f=(0,i.EW)(()=>{var e,t;return(null===(t=null===(e=null===r||void 0===r?void 0:r.value)||void 0===e?void 0:e.Empty)||void 0===t?void 0:t.renderIcon)||(()=>(0,i.h)(a,null))}),y=(0,i.EW)(()=>{const{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{[(0,c.cF)("iconSize",t)]:i,[(0,c.cF)("fontSize",t)]:r,textColor:a,iconColor:o,extraTextColor:l}}=p.value;return{"--n-icon-size":i,"--n-font-size":r,"--n-bezier":n,"--n-text-color":a,"--n-icon-color":o,"--n-extra-text-color":l}}),m=n?(0,d.R)("empty",(0,i.EW)(()=>{let t="";const{size:n}=e;return t+=n[0],t}),y,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:f,localizedDescription:(0,i.EW)(()=>g.value||h.value.description),cssVars:n?void 0:y,themeClass:null===m||void 0===m?void 0:m.themeClass,onRender:null===m||void 0===m?void 0:m.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return null===n||void 0===n||n(),(0,i.h)("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?(0,i.h)("div",{class:`${t}-empty__icon`},e.icon?e.icon():(0,i.h)(r.A,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?(0,i.h)("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?(0,i.h)("div",{class:`${t}-empty__extra`},e.extra()):null)}})},18495:function(e,t,n){n.d(t,{A:function(){return r}});var i=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 r=(0,i.A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},19629:function(e,t,n){n.d(t,{A:function(){return r}});var i=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 r=(0,i.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},38307:function(e,t,n){n.d(t,{A:function(){return r}});var i=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 r=(0,i.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},55200:function(e,t,n){n.d(t,{A:function(){return r}});var i=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 r=(0,i.A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},56169:function(e,t,n){n.r(t),n.d(t,{default:function(){return pt}});n(44114),n(18111),n(61701);var i=n(56768),r=n(90144),a=n(24232),o=n(45130),l=n(98728),s=n(97387),d=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 c=(0,d.A)("book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);var v=n(35161);
/**
* @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 u=(0,d.A)("list-plus",[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]]),p=(0,d.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var h=n(18495);
/**
* @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 g=(0,d.A)("bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);var f=n(55200),y=n(7023),m=n(91733),x=n(29554);
/**
* @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 b=(0,d.A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var k=n(38307),w=n(19629),_=n(54880),C=n(92720),R=n(59856),z=n(42517),A=n(68042),E=n(64498),L=n(71168),F=n(8508),P=n(93913),$=n(9845),j=n(79882),B=n(88733),W=n(38741),S=n(25216),M=n(77727),X=n(27355),T=n(34350),O=(0,T.c)([(0,T.cB)("list","\n --n-merged-border-color: var(--n-border-color);\n --n-merged-color: var(--n-color);\n --n-merged-color-hover: var(--n-color-hover);\n margin: 0;\n font-size: var(--n-font-size);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n padding: 0;\n list-style-type: none;\n color: var(--n-text-color);\n background-color: var(--n-merged-color);\n ",[(0,T.cM)("show-divider",[(0,T.cB)("list-item",[(0,T.c)("&:not(:last-child)",[(0,T.cE)("divider","\n background-color: var(--n-merged-border-color);\n ")])])]),(0,T.cM)("clickable",[(0,T.cB)("list-item","\n cursor: pointer;\n ")]),(0,T.cM)("bordered","\n border: 1px solid var(--n-merged-border-color);\n border-radius: var(--n-border-radius);\n "),(0,T.cM)("hoverable",[(0,T.cB)("list-item","\n border-radius: var(--n-border-radius);\n ",[(0,T.c)("&:hover","\n background-color: var(--n-merged-color-hover);\n ",[(0,T.cE)("divider","\n background-color: transparent;\n ")])])]),(0,T.cM)("bordered, hoverable",[(0,T.cB)("list-item","\n padding: 12px 20px;\n "),(0,T.cE)("header, footer","\n padding: 12px 20px;\n ")]),(0,T.cE)("header, footer","\n padding: 12px 0;\n box-sizing: border-box;\n transition: border-color .3s var(--n-bezier);\n ",[(0,T.c)("&:not(:last-child)","\n border-bottom: 1px solid var(--n-merged-border-color);\n ")]),(0,T.cB)("list-item","\n position: relative;\n padding: 12px 0; \n box-sizing: border-box;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ",[(0,T.cE)("prefix","\n margin-right: 20px;\n flex: 0;\n "),(0,T.cE)("suffix","\n margin-left: 20px;\n flex: 0;\n "),(0,T.cE)("main","\n flex: 1;\n "),(0,T.cE)("divider","\n height: 1px;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: transparent;\n transition: background-color .3s var(--n-bezier);\n pointer-events: none;\n ")])]),(0,T.EM)((0,T.cB)("list","\n --n-merged-color-hover: var(--n-color-hover-modal);\n --n-merged-color: var(--n-color-modal);\n --n-merged-border-color: var(--n-border-color-modal);\n ")),(0,T.ES)((0,T.cB)("list","\n --n-merged-color-hover: var(--n-color-hover-popover);\n --n-merged-color: var(--n-color-popover);\n --n-merged-border-color: var(--n-border-color-popover);\n "))]);const I=Object.assign(Object.assign({},j.A.props),{size:{type:String,default:"medium"},bordered:Boolean,clickable:Boolean,hoverable:Boolean,showDivider:{type:Boolean,default:!0}}),K=(0,M.D)("n-list");var H=(0,i.pM)({name:"List",props:I,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:a}=(0,B.Ay)(e),o=(0,W.I)("List",a,t),l=(0,j.A)("List","-list",O,X.A,e,t);(0,i.Gt)(K,{showDividerRef:(0,r.lW)(e,"showDivider"),mergedClsPrefixRef:t});const s=(0,i.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:t,textColor:n,color:i,colorModal:r,colorPopover:a,borderColor:o,borderColorModal:s,borderColorPopover:d,borderRadius:c,colorHover:v,colorHoverModal:u,colorHoverPopover:p}}=l.value;return{"--n-font-size":t,"--n-bezier":e,"--n-text-color":n,"--n-color":i,"--n-border-radius":c,"--n-border-color":o,"--n-border-color-modal":s,"--n-border-color-popover":d,"--n-color-modal":r,"--n-color-popover":a,"--n-color-hover":v,"--n-color-hover-modal":u,"--n-color-hover-popover":p}}),d=n?(0,S.R)("list",void 0,s,e):void 0;return{mergedClsPrefix:t,rtlEnabled:o,cssVars:n?void 0:s,themeClass:null===d||void 0===d?void 0:d.themeClass,onRender:null===d||void 0===d?void 0:d.onRender}},render(){var e;const{$slots:t,mergedClsPrefix:n,onRender:r}=this;return null===r||void 0===r||r(),(0,i.h)("ul",{class:[`${n}-list`,this.rtlEnabled&&`${n}-list--rtl`,this.bordered&&`${n}-list--bordered`,this.showDivider&&`${n}-list--show-divider`,this.hoverable&&`${n}-list--hoverable`,this.clickable&&`${n}-list--clickable`,this.themeClass],style:this.cssVars},t.header?(0,i.h)("div",{class:`${n}-list__header`},t.header()):null,null===(e=t.default)||void 0===e?void 0:e.call(t),t.footer?(0,i.h)("div",{class:`${n}-list__footer`},t.footer()):null)}}),D=n(35268),q=(0,i.pM)({name:"ListItem",slots:Object,setup(){const e=(0,i.WQ)(K,null);return e||(0,D.$8)("list-item","`n-list-item` must be placed in `n-list`."),{showDivider:e.showDividerRef,mergedClsPrefix:e.mergedClsPrefixRef}},render(){const{$slots:e,mergedClsPrefix:t}=this;return(0,i.h)("li",{class:`${t}-list-item`},e.prefix?(0,i.h)("div",{class:`${t}-list-item__prefix`},e.prefix()):null,e.default?(0,i.h)("div",{class:`${t}-list-item__main`},e):null,e.suffix?(0,i.h)("div",{class:`${t}-list-item__suffix`},e.suffix()):null,this.showDivider&&(0,i.h)("div",{class:`${t}-list-item__divider`}))}}),N=n(43585),V=n(69313),Q=(0,T.cB)("thing","\n display: flex;\n transition: color .3s var(--n-bezier);\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n",[(0,T.cB)("thing-avatar","\n margin-right: 12px;\n margin-top: 2px;\n "),(0,T.cB)("thing-avatar-header-wrapper","\n display: flex;\n flex-wrap: nowrap;\n ",[(0,T.cB)("thing-header-wrapper","\n flex: 1;\n ")]),(0,T.cB)("thing-main","\n flex-grow: 1;\n ",[(0,T.cB)("thing-header","\n display: flex;\n margin-bottom: 4px;\n justify-content: space-between;\n align-items: center;\n ",[(0,T.cE)("title","\n font-size: 16px;\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n color: var(--n-title-text-color);\n ")]),(0,T.cE)("description",[(0,T.c)("&:not(:last-child)","\n margin-bottom: 4px;\n ")]),(0,T.cE)("content",[(0,T.c)("&:not(:first-child)","\n margin-top: 12px;\n ")]),(0,T.cE)("footer",[(0,T.c)("&:not(:first-child)","\n margin-top: 12px;\n ")]),(0,T.cE)("action",[(0,T.c)("&:not(:first-child)","\n margin-top: 12px;\n ")])])]);const U=Object.assign(Object.assign({},j.A.props),{title:String,titleExtra:String,description:String,descriptionClass:String,descriptionStyle:[String,Object],content:String,contentClass:String,contentStyle:[String,Object],contentIndented:Boolean});var Z=(0,i.pM)({name:"Thing",props:U,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:a}=(0,B.Ay)(e),o=(0,j.A)("Thing","-thing",Q,V.A,e,n),l=(0,W.I)("Thing",a,n),s=(0,i.EW)(()=>{const{self:{titleTextColor:e,textColor:t,titleFontWeight:n,fontSize:i},common:{cubicBezierEaseInOut:r}}=o.value;return{"--n-bezier":r,"--n-font-size":i,"--n-text-color":t,"--n-title-font-weight":n,"--n-title-text-color":e}}),d=r?(0,S.R)("thing",void 0,s,e):void 0;return()=>{var a;const{value:o}=n,c=!!l&&l.value;return null===(a=null===d||void 0===d?void 0:d.onRender)||void 0===a||a.call(d),(0,i.h)("div",{class:[`${o}-thing`,null===d||void 0===d?void 0:d.themeClass,c&&`${o}-thing--rtl`],style:r?void 0:s.value},t.avatar&&e.contentIndented?(0,i.h)("div",{class:`${o}-thing-avatar`},t.avatar()):null,(0,i.h)("div",{class:`${o}-thing-main`},!e.contentIndented&&(t.header||e.title||t["header-extra"]||e.titleExtra||t.avatar)?(0,i.h)("div",{class:`${o}-thing-avatar-header-wrapper`},t.avatar?(0,i.h)("div",{class:`${o}-thing-avatar`},t.avatar()):null,t.header||e.title||t["header-extra"]||e.titleExtra?(0,i.h)("div",{class:`${o}-thing-header-wrapper`},(0,i.h)("div",{class:`${o}-thing-header`},t.header||e.title?(0,i.h)("div",{class:`${o}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?(0,i.h)("div",{class:`${o}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null),t.description||e.description?(0,i.h)("div",{class:[`${o}-thing-main__description`,e.descriptionClass],style:e.descriptionStyle},t.description?t.description():e.description):null):null):(0,i.h)(i.FK,null,t.header||e.title||t["header-extra"]||e.titleExtra?(0,i.h)("div",{class:`${o}-thing-header`},t.header||e.title?(0,i.h)("div",{class:`${o}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?(0,i.h)("div",{class:`${o}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null):null,t.description||e.description?(0,i.h)("div",{class:[`${o}-thing-main__description`,e.descriptionClass],style:e.descriptionStyle},t.description?t.description():e.description):null),t.default||e.content?(0,i.h)("div",{class:[`${o}-thing-main__content`,e.contentClass],style:e.contentStyle},t.default?t.default():e.content):null,t.footer?(0,i.h)("div",{class:`${o}-thing-main__footer`},t.footer()):null,t.action?(0,i.h)("div",{class:`${o}-thing-main__action`},t.action()):null))}}}),Y=n(35720),G=n(74911);const J={class:"word-detail-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},ee={key:0,class:"mb-6 flex items-center justify-between bg-primary/10 dark:bg-primary/20 rounded-lg px-4 py-3 border border-primary/20",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},te={class:"flex items-center gap-2"},ne={class:"font-medium text-primary"},ie={class:"text-sm font-mono text-primary"},re={class:"font-bold"},ae={class:"opacity-80"},oe={class:"mb-8 flex flex-col md:flex-row md:items-center justify-between gap-4",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},le={class:"flex flex-col md:flex-row md:items-center gap-3 md:gap-4 min-w-0"},se={class:"flex flex-col md:flex-row md:items-center gap-2 md:gap-4 min-w-0"},de={class:"text-4xl font-bold text-gray-900 dark:text-white break-all min-w-0"},ce={class:"flex flex-col gap-1 shrink-0"},ve={key:0,class:"text-sm text-gray-500 dark:text-gray-400"},ue={key:1,class:"text-sm text-gray-500 dark:text-gray-400"},pe={class:"flex items-center gap-2 shrink-0"},he={key:0,class:"flex items-center gap-3"},ge={class:"grid grid-cols-1 lg:grid-cols-3 gap-8"},fe={class:"lg:col-span-2 space-y-8"},ye={key:0,class:"flex flex-wrap gap-2",initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{delay:200}}},me={key:1,class:"flex flex-col gap-3",initial:{opacity:0,x:-20},enter:{opacity:1,x:0,transition:{delay:250}}},xe=["onClick"],be={class:"p-2 bg-blue-100 dark:bg-blue-800 rounded-full text-blue-600 dark:text-blue-300"},ke={class:"flex-1 flex items-center flex-wrap gap-2"},we={class:"text-gray-700 dark:text-gray-200"},_e={class:"font-bold text-blue-700 dark:text-blue-400"},Ce={class:"flex items-center gap-2"},Re={key:0,class:"space-y-6"},ze={class:"flex items-baseline gap-2 mb-3"},Ae={class:"px-2 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 font-mono text-sm font-bold"},Ee={class:"text-lg text-gray-800 dark:text-gray-200"},Le={key:0,class:"pl-4 border-l-2 border-gray-200 dark:border-gray-700 space-y-3"},Fe={class:"text-gray-700 dark:text-gray-300"},Pe={class:"text-gray-500 dark:text-gray-500 text-sm mt-0.5"},$e={key:1,class:"text-gray-400 text-center py-4"},je={class:"flex items-center gap-2"},Be={class:"relative overflow-hidden"},We=["innerHTML"],Se=["innerHTML"],Me={class:"mt-2 text-xs text-gray-400 text-right"},Xe={key:1,class:"absolute inset-0 flex items-center justify-center"},Te={key:2,class:"text-gray-400 text-center py-4"},Oe={key:0,class:"flex justify-between items-center mt-4 border-t border-gray-100 dark:border-gray-700 pt-3"},Ie={class:"text-xs text-gray-400"},Ke={class:"space-y-8"},He={class:"flex items-center gap-2"},De={class:"grid grid-cols-2 gap-4 text-center"},qe={class:"p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},Ne={class:"text-xl font-bold text-gray-900 dark:text-white mt-1"},Ve={class:"p-3 bg-green-50 dark:bg-green-900/20 rounded-lg"},Qe={class:"text-xl font-bold text-green-600 dark:text-green-400 mt-1"},Ue={class:"flex items-center justify-between"},Ze={class:"flex items-center gap-2"},Ye={key:0,class:"space-y-4"},Ge={class:"text-gray-700 dark:text-gray-300 whitespace-pre-wrap text-sm"},Je={class:"flex justify-end mt-2"},et={class:"text-xs text-gray-400"},tt={key:0,class:"mt-2 flex items-center justify-end gap-2"},nt={key:0,class:"text-center pt-2"},it={key:1,class:"flex justify-center py-4"},rt={key:2,class:"text-gray-400 text-center py-4 text-sm"},at={class:"flex justify-end gap-2"},ot={key:0,class:"py-8 flex justify-center"},lt={key:1,class:"py-8"},st={class:"p-2 bg-blue-100 dark:bg-blue-900/30 rounded-lg text-blue-600 dark:text-blue-400"},dt={class:"text-xs text-gray-400"};var ct={__name:"WordDetailView",setup(e){const t=new G.A({html:!0,breaks:!0}),n=(0,l.lq)(),d=(0,l.rd)(),j=(0,s.J)(),B=(0,r.KR)(!1),W=(0,r.KR)(null),S=(0,r.KR)({last:null,next:null}),M=(0,r.KR)(!1),X=(0,r.KR)(!1),T=(0,r.KR)({}),O=(0,r.KR)({content:""}),I=(0,r.KR)([]),K=(0,r.KR)(1),D=(0,r.KR)(0),V=(0,r.KR)(!1),Q=(0,r.KR)([]),U=(0,r.KR)(1),ct=(0,r.KR)(0),vt=(0,r.KR)(!1),ut=(0,r.KR)("slide-left"),pt=(0,r.KR)(!1),ht=(0,r.KR)([]),gt=(0,r.KR)(!1),ft=(0,i.EW)(()=>"true"===n.query.learn),yt=(0,i.EW)(()=>Number(n.query.word_id)),mt=(0,i.EW)(()=>Number(n.query.dict_id)),xt=(0,i.EW)(()=>Q.value[0]||null),bt=async(e=1,t=!1)=>{if(yt.value){V.value=!0;try{const n=await Y.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",{params:{word_id:yt.value,page:e,limit:5}});I.value=t?[...I.value,...n.data.list]:n.data.list,D.value=n.data.pagination.total_items,K.value=e}catch(n){console.error("Fetch notes failed:",n),j.error("获取笔记失败")}finally{V.value=!1}}},kt=()=>{bt(K.value+1,!0)},wt=async(e=1)=>{if(yt.value){vt.value=!0;try{const t=await Y.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/ai_passage",{params:{word_id:yt.value,page:e,limit:1}});Q.value=t.data.list,ct.value=t.data.pagination.total_items,U.value=e}catch(t){console.error("Fetch ai passages failed:",t)}finally{vt.value=!1}}},_t=()=>{U.value>1&&(ut.value="slide-right",wt(U.value-1))},Ct=()=>{U.value<ct.value&&(ut.value="slide-left",wt(U.value+1))},Rt=async()=>{if(yt.value){B.value=!0,bt(1),wt(1);try{const e={word_id:yt.value,learn:ft.value};ft.value&&mt.value&&(e.dict_id=mt.value);const t=await Y.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/word",e);S.value={last:t.data.last,next:t.data.next};const n={...t.data};delete n.last,delete n.next,W.value=n}catch(e){console.error("Fetch word detail failed:",e),j.error("获取单词详情失败")}finally{B.value=!1}}},zt=e=>{e&&d.push({name:"word-detail",query:{...n.query,word_id:e}})},At=async()=>{if(W.value)try{const e=await Y.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/favorite",{word_id:W.value.id});W.value.is_favorite=e.data.is_favorite,j.success(e.data.message)}catch(e){j.error("操作失败")}},Et=(e=null)=>{e&&e.id?(T.value=e,O.value.content=e.content):(T.value={},O.value.content=""),M.value=!0},Lt=async()=>{if(O.value.content.trim()){X.value=!0;try{const e={word_id:W.value.id,content:O.value.content};T.value.id&&(e.note_id=T.value.id);const t=await Y.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);j.success(t.data.message),M.value=!1,bt(1)}catch(e){j.error("保存笔记失败")}finally{X.value=!1}}else j.warning("笔记内容不能为空")},Ft=async e=>{try{const t=await Y.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/del_note",{note_id:e});j.success(t.data.message),bt(1)}catch(t){j.error("删除笔记失败")}},Pt=async()=>{W.value?.id&&(pt.value=!0,await $t())},$t=async()=>{gt.value=!0;try{const e=await Y.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/contain_status",{params:{word_id:W.value.id}});ht.value=e.data.list.map(e=>({...e,loading:!1}))}catch(e){j.error("获取词单列表失败")}finally{gt.value=!1}},jt=async(e,t)=>{if(!e.loading){e.loading=!0;try{const n=t?"https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/add_word":"https://newfront.xn--xhq44jb2fzpc.com/word_helper/word_list/rmv_word",i=await Y.A.post(n,{list_id:e.id,word_id:[W.value.id]});e.has_word=t,e.word_count=i.data.current_count,j.success(t?"已加入词单":"已移出词单")}catch(n){j.error("操作失败")}finally{e.loading=!1}}},Bt=e=>{const t=d.resolve({path:"/list_detail",query:{list_id:e}});window.open(t.href,"_blank")};return(0,i.wB)(()=>n.query.word_id,e=>{e&&Rt()},{immediate:!0}),(0,i.sV)(()=>{document.title="单词详情 - Word Helper"}),(e,n)=>{const l=(0,i.gN)("motion");return(0,i.uX)(),(0,i.CE)("div",J,[ft.value&&W.value?.dict?(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",ee,[(0,i.Lk)("div",te,[(0,i.bF)((0,r.R1)(c),{class:"w-4 h-4 text-primary"}),(0,i.Lk)("span",ne,(0,a.v_)(W.value.dict.name),1)]),(0,i.Lk)("div",ie,[(0,i.Lk)("span",re,(0,a.v_)(W.value.dict.current_order),1),n[6]||(n[6]=(0,i.Lk)("span",{class:"mx-1 opacity-60"},"/",-1)),(0,i.Lk)("span",ae,(0,a.v_)(W.value.dict.total_words),1)])])),[[l]]):(0,i.Q3)("",!0),(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",oe,[(0,i.Lk)("div",le,[(0,i.Lk)("div",se,[(0,i.Lk)("h1",de,(0,a.v_)(W.value?.word),1),(0,i.Lk)("div",ce,[W.value?.uk_accent?((0,i.uX)(),(0,i.CE)("div",ve," 英 ["+(0,a.v_)(W.value.uk_accent)+"] ",1)):(0,i.Q3)("",!0),W.value?.us_accent?((0,i.uX)(),(0,i.CE)("div",ue," 美 ["+(0,a.v_)(W.value.us_accent)+"] ",1)):(0,i.Q3)("",!0)])]),(0,i.Lk)("div",pe,[(0,i.Lk)("button",{onClick:At,class:(0,a.C4)(["p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",W.value?.is_favorite?"text-yellow-500":"text-gray-400"]),title:"加入/移出生词本"},[(0,i.bF)((0,r.R1)(v.A),{class:(0,a.C4)({"fill-current":W.value?.is_favorite})},null,8,["class"])],2),(0,i.Lk)("button",{onClick:Pt,class:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors text-gray-400 hover:text-primary",title:"词单快速管理"},[(0,i.bF)((0,r.R1)(u))])])]),ft.value?((0,i.uX)(),(0,i.CE)("div",he,[(0,i.bF)((0,r.R1)(_.Ay),{secondary:"",disabled:!S.value.last,onClick:n[0]||(n[0]=e=>zt(S.value.last))},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(p))]),default:(0,i.k6)(()=>[n[7]||(n[7]=(0,i.eW)(" 上一个 ",-1))]),_:1},8,["disabled"]),(0,i.bF)((0,r.R1)(_.Ay),{type:"primary",disabled:!S.value.next,onClick:n[1]||(n[1]=e=>zt(S.value.next))},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(h.A))]),default:(0,i.k6)(()=>[n[8]||(n[8]=(0,i.eW)(" 下一个 ",-1))]),_:1},8,["disabled"])])):(0,i.Q3)("",!0)])),[[l]]),(0,i.Lk)("div",ge,[(0,i.Lk)("div",fe,[W.value?.dictionaries?.length?(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",ye,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(W.value.dictionaries,e=>((0,i.uX)(),(0,i.Wv)((0,r.R1)(C.Ay),{key:e.id,type:"info",size:"small",round:""},{default:(0,i.k6)(()=>[(0,i.eW)((0,a.v_)(e.tag||e.name),1)]),_:2},1024))),128))])),[[l]]):(0,i.Q3)("",!0),W.value?.official_lists?.length?(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",me,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(W.value.official_lists,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id,class:"cursor-pointer group flex items-center gap-3 p-3 rounded-lg bg-blue-50 dark:bg-blue-900/10 border border-blue-100 dark:border-blue-900/30 hover:shadow-md hover:border-blue-200 dark:hover:border-blue-800 transition-all",onClick:t=>Bt(e.id)},[(0,i.Lk)("div",be,[(0,i.bF)((0,r.R1)(g),{class:"w-4 h-4"})]),(0,i.Lk)("div",ke,[(0,i.Lk)("span",we,[n[9]||(n[9]=(0,i.eW)("收录于 ",-1)),(0,i.Lk)("span",_e,(0,a.v_)(e.name),1)]),(0,i.bF)((0,r.R1)(C.Ay),{type:"success",round:"",size:"small"},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(R._),{component:(0,r.R1)(f.A)},null,8,["component"])]),default:(0,i.k6)(()=>[n[10]||(n[10]=(0,i.eW)(" 官方词单 ",-1))]),_:1})]),(0,i.bF)((0,r.R1)(y.A),{class:"w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity transform group-hover:translate-x-1"})],8,xe))),128))])),[[l]]):(0,i.Q3)("",!0),(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,r.R1)(z.Ay),{class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:300}}},{header:(0,i.k6)(()=>[(0,i.Lk)("div",Ce,[(0,i.bF)((0,r.R1)(m.A),{class:"w-5 h-5 text-primary"}),n[11]||(n[11]=(0,i.Lk)("span",{class:"font-bold"},"释义与例句",-1))])]),default:(0,i.k6)(()=>[W.value?.translations?.length?((0,i.uX)(),(0,i.CE)("div",Re,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(W.value.translations,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id,class:"border-b border-gray-100 dark:border-gray-700 last:border-0 pb-6 last:pb-0"},[(0,i.Lk)("div",ze,[(0,i.Lk)("span",Ae,(0,a.v_)(e.pos),1),(0,i.Lk)("span",Ee,(0,a.v_)(e.meaning),1)]),e.examples?.length?((0,i.uX)(),(0,i.CE)("div",Le,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.examples,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id},[(0,i.Lk)("p",Fe,(0,a.v_)(e.sentence_en),1),(0,i.Lk)("p",Pe,(0,a.v_)(e.sentence_cn),1)]))),128))])):(0,i.Q3)("",!0)]))),128))])):((0,i.uX)(),(0,i.CE)("div",$e,"暂无释义"))]),_:1})),[[l]]),(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,r.R1)(z.Ay),{class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:500}}},{header:(0,i.k6)(()=>[(0,i.Lk)("div",je,[(0,i.bF)((0,r.R1)(x.A),{class:"w-5 h-5 text-purple-500"}),n[12]||(n[12]=(0,i.Lk)("span",{class:"font-bold"},"AI 助记短文",-1))])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",Be,[(0,i.bF)(o.eB,{name:ut.value,mode:"out-in"},{default:(0,i.k6)(()=>[xt.value?((0,i.uX)(),(0,i.CE)("div",{key:xt.value.id,class:"w-full"},[(0,i.Lk)("div",{class:"text-gray-700 dark:text-gray-300 leading-relaxed mb-2 markdown-body",innerHTML:(0,r.R1)(t).render(xt.value.content)},null,8,We),(0,i.Lk)("div",{class:"text-gray-500 dark:text-gray-400 text-sm border-t border-gray-100 dark:border-gray-700 pt-2",innerHTML:(0,r.R1)(t).render(xt.value.translation)},null,8,Se),(0,i.Lk)("div",Me,(0,a.v_)(new Date(xt.value.created_at).toLocaleDateString()),1)])):vt.value?((0,i.uX)(),(0,i.CE)("div",Xe,[(0,i.bF)((0,r.R1)(A.A),{size:"small"})])):((0,i.uX)(),(0,i.CE)("div",Te,"暂无我生成过的助记短文"))]),_:1},8,["name"])]),ct.value>0?((0,i.uX)(),(0,i.CE)("div",Oe,[(0,i.bF)((0,r.R1)(_.Ay),{size:"small",secondary:"",disabled:U.value<=1||vt.value,onClick:_t},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(p),{class:"w-3 h-3"})]),default:(0,i.k6)(()=>[n[13]||(n[13]=(0,i.eW)(" 上一篇 ",-1))]),_:1},8,["disabled"]),(0,i.Lk)("span",Ie,(0,a.v_)(U.value)+" / "+(0,a.v_)(ct.value),1),(0,i.bF)((0,r.R1)(_.Ay),{size:"small",secondary:"",disabled:U.value>=ct.value||vt.value,onClick:Ct},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(h.A),{class:"w-3 h-3"})]),default:(0,i.k6)(()=>[n[14]||(n[14]=(0,i.eW)(" 下一篇 ",-1))]),_:1},8,["disabled"])])):(0,i.Q3)("",!0)]),_:1})),[[l]])]),(0,i.Lk)("div",Ke,[(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,r.R1)(z.Ay),{class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:400}}},{header:(0,i.k6)(()=>[(0,i.Lk)("div",He,[(0,i.bF)((0,r.R1)(b),{class:"w-5 h-5 text-blue-500"}),n[15]||(n[15]=(0,i.Lk)("span",{class:"font-bold"},"抽查历史",-1))])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",De,[(0,i.Lk)("div",qe,[n[16]||(n[16]=(0,i.Lk)("div",{class:"text-xs text-gray-500 dark:text-gray-400"},"抽查次数",-1)),(0,i.Lk)("div",Ne,(0,a.v_)(W.value?.stats?.total_tests||0),1)]),(0,i.Lk)("div",Ve,[n[17]||(n[17]=(0,i.Lk)("div",{class:"text-xs text-gray-500 dark:text-gray-400"},"正确率",-1)),(0,i.Lk)("div",Qe,(0,a.v_)(W.value?.stats?.accuracy||0)+"%",1)])])]),_:1})),[[l]]),(0,i.bo)(((0,i.uX)(),(0,i.Wv)((0,r.R1)(z.Ay),{class:"rounded-xl shadow-sm dark:bg-gray-800",bordered:!1,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:600}}},{header:(0,i.k6)(()=>[(0,i.Lk)("div",Ue,[(0,i.Lk)("div",Ze,[(0,i.bF)((0,r.R1)(k.A),{class:"w-5 h-5 text-amber-500"}),n[18]||(n[18]=(0,i.Lk)("span",{class:"font-bold"},"用户笔记",-1))]),(0,i.bF)((0,r.R1)(_.Ay),{size:"tiny",secondary:"",circle:"",onClick:Et},{icon:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(w.A),{class:"w-4 h-4"})]),_:1})])]),default:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(E.A),{type:"warning","show-icon":"",class:"mb-4 text-xs"},{default:(0,i.k6)(()=>[...n[19]||(n[19]=[(0,i.eW)(" 每个用户对同一单词只能有一条笔记,如重复新建笔记,新笔记内容会替换旧内容,旧笔记不会保存! ",-1)])]),_:1}),I.value.length?((0,i.uX)(),(0,i.CE)("div",Ye,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(I.value,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id,class:"p-3 bg-yellow-50 dark:bg-yellow-900/10 rounded-lg border border-yellow-100 dark:border-yellow-900/30"},[(0,i.Lk)("div",Ge,(0,a.v_)(e.content),1),(0,i.Lk)("div",Je,[(0,i.Lk)("span",et,(0,a.v_)(new Date(e.updated_at).toLocaleDateString()),1)]),e.owner?((0,i.uX)(),(0,i.CE)("div",tt,[(0,i.bF)((0,r.R1)(C.Ay),{type:"success",size:"tiny",bordered:!1},{default:(0,i.k6)(()=>[...n[20]||(n[20]=[(0,i.eW)("我的笔记",-1)])]),_:1}),(0,i.bF)((0,r.R1)(_.Ay),{size:"tiny",text:"",type:"primary",onClick:t=>Et(e)},{default:(0,i.k6)(()=>[...n[21]||(n[21]=[(0,i.eW)("编辑",-1)])]),_:1},8,["onClick"]),(0,i.bF)((0,r.R1)(L.A),{onPositiveClick:t=>Ft(e.id)},{trigger:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(_.Ay),{size:"tiny",text:"",type:"error"},{default:(0,i.k6)(()=>[...n[22]||(n[22]=[(0,i.eW)("删除",-1)])]),_:1})]),default:(0,i.k6)(()=>[n[23]||(n[23]=(0,i.eW)(" 确定要删除这条笔记吗? ",-1))]),_:1},8,["onPositiveClick"])])):(0,i.Q3)("",!0)]))),128)),I.value.length<D.value?((0,i.uX)(),(0,i.CE)("div",nt,[(0,i.bF)((0,r.R1)(_.Ay),{text:"",type:"primary",size:"small",loading:V.value,onClick:kt},{default:(0,i.k6)(()=>[...n[24]||(n[24]=[(0,i.eW)(" 加载更多笔记 ",-1)])]),_:1},8,["loading"])])):(0,i.Q3)("",!0)])):V.value?((0,i.uX)(),(0,i.CE)("div",it,[(0,i.bF)((0,r.R1)(A.A),{size:"small"})])):((0,i.uX)(),(0,i.CE)("div",rt," 暂无笔记,点击右上角添加 "))]),_:1})),[[l]])])]),(0,i.bF)((0,r.R1)(F.A),{show:M.value,"onUpdate:show":n[4]||(n[4]=e=>M.value=e),preset:"card",title:T.value.id?"编辑笔记":"添加笔记",class:"w-full max-w-lg"},{footer:(0,i.k6)(()=>[(0,i.Lk)("div",at,[(0,i.bF)((0,r.R1)(_.Ay),{onClick:n[3]||(n[3]=e=>M.value=!1)},{default:(0,i.k6)(()=>[...n[25]||(n[25]=[(0,i.eW)("取消",-1)])]),_:1}),(0,i.bF)((0,r.R1)(_.Ay),{type:"primary",loading:X.value,onClick:Lt},{default:(0,i.k6)(()=>[...n[26]||(n[26]=[(0,i.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(P.A),{value:O.value.content,"onUpdate:value":n[2]||(n[2]=e=>O.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["show","title"]),(0,i.bF)((0,r.R1)(F.A),{show:pt.value,"onUpdate:show":n[5]||(n[5]=e=>pt.value=e),preset:"card",title:"词单快速管理",class:"w-full max-w-md"},{default:(0,i.k6)(()=>[gt.value?((0,i.uX)(),(0,i.CE)("div",ot,[(0,i.bF)((0,r.R1)(A.A),{size:"medium"})])):0===ht.value.length?((0,i.uX)(),(0,i.CE)("div",lt,[(0,i.bF)((0,r.R1)($.A),{description:"暂无自建词单"})])):((0,i.uX)(),(0,i.Wv)((0,r.R1)(H),{key:2,hoverable:"",clickable:""},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(ht.value,e=>((0,i.uX)(),(0,i.Wv)((0,r.R1)(q),{key:e.id},{prefix:(0,i.k6)(()=>[(0,i.Lk)("div",st,[(0,i.bF)((0,r.R1)(c),{class:"w-5 h-5"})])]),suffix:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(N.A),{value:e.has_word,loading:e.loading,"onUpdate:value":t=>jt(e,t)},null,8,["value","loading","onUpdate:value"])]),default:(0,i.k6)(()=>[(0,i.bF)((0,r.R1)(Z),{title:e.name},{description:(0,i.k6)(()=>[(0,i.Lk)("span",dt,"共 "+(0,a.v_)(e.word_count)+" 词",1)]),_:2},1032,["title"])]),_:2},1024))),128))]),_:1})),n[27]||(n[27]=(0,i.Lk)("div",{class:"mt-4 text-xs text-gray-400 text-center"}," 点击开关一键将当前单词添加/移除词单 ",-1))]),_:1},8,["show"])])}}},vt=n(71241);const ut=(0,vt.A)(ct,[["__scopeId","data-v-7d603710"]]);var pt=ut},68042:function(e,t,n){n.d(t,{A:function(){return m}});var i=n(55472),r=n(37485),a=n(56768),o=n(90144),l=n(45130),s=n(21905),d=n(79882),c=n(88733),v=n(25216),u=n(34350),p=n(54507),h=n(29895),g=(0,u.c)([(0,u.c)("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),(0,u.cB)("spin-container","\n position: relative;\n ",[(0,u.cB)("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[(0,h.v)()])]),(0,u.cB)("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),(0,u.cB)("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[(0,u.cM)("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),(0,u.cB)("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),(0,u.cB)("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[(0,u.cM)("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]);const f={small:20,medium:18,large:16},y=Object.assign(Object.assign({},d.A.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number});var m=(0,a.pM)({name:"Spin",props:y,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=(0,c.Ay)(e),l=(0,d.A)("Spin","-spin",g,p.A,e,t),s=(0,a.EW)(()=>{const{size:t}=e,{common:{cubicBezierEaseInOut:n},self:r}=l.value,{opacitySpinning:a,color:o,textColor:s}=r,d="number"===typeof t?(0,i.Cw)(t):r[(0,u.cF)("size",t)];return{"--n-bezier":n,"--n-opacity-spinning":a,"--n-size":d,"--n-color":o,"--n-text-color":s}}),h=n?(0,v.R)("spin",(0,a.EW)(()=>{const{size:t}=e;return"number"===typeof t?String(t):t[0]}),s,e):void 0,y=(0,r.A)(e,["spinning","show"]),m=(0,o.KR)(!1);return(0,a.nT)(t=>{let n;if(y.value){const{delay:i}=e;if(i)return n=window.setTimeout(()=>{m.value=!0},i),void t(()=>{clearTimeout(n)})}m.value=y.value}),{mergedClsPrefix:t,active:m,mergedStrokeWidth:(0,a.EW)(()=>{const{strokeWidth:t}=e;if(void 0!==t)return t;const{size:n}=e;return f["number"===typeof n?"medium":n]}),cssVars:n?void 0:s,themeClass:null===h||void 0===h?void 0:h.themeClass,onRender:null===h||void 0===h?void 0:h.onRender}},render(){var e,t;const{$slots:n,mergedClsPrefix:i,description:r}=this,o=n.icon&&this.rotate,d=(r||n.description)&&(0,a.h)("div",{class:`${i}-spin-description`},r||(null===(e=n.description)||void 0===e?void 0:e.call(n))),c=n.icon?(0,a.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,a.h)("div",{class:[`${i}-spin`,o&&`${i}-spin--rotate`],style:n.default?"":this.cssVars},n.icon()),d):(0,a.h)("div",{class:[`${i}-spin-body`,this.themeClass]},(0,a.h)(s.A,{clsPrefix:i,style:n.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${i}-spin`}),d);return null===(t=this.onRender)||void 0===t||t.call(this),n.default?(0,a.h)("div",{class:[`${i}-spin-container`,this.themeClass],style:this.cssVars},(0,a.h)("div",{class:[`${i}-spin-content`,this.active&&`${i}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),(0,a.h)(l.eB,{name:"fade-in-transition"},{default:()=>this.active?c:null})):c}})},71168:function(e,t,n){n.d(t,{A:function(){return A}});var i=n(56768),r=n(90144),a=n(79882),o=n(88733),l=n(37901),s=n(86866),d=n(91462),c=n(36921),v=n(29767),u=n(77727);const p=(0,u.D)("n-popconfirm");var h=n(84279),g=n(73921),f=n(82813),y=n(25216),m=n(52126),x=n(25972),b=n(54880);const k={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},w=(0,m.Y)(k);var _=(0,i.pM)({name:"NPopconfirmPanel",props:k,setup(e){const{localeRef:t}=(0,f.A)("Popconfirm"),{inlineThemeDisabled:n}=(0,o.Ay)(),{mergedClsPrefixRef:a,mergedThemeRef:l,props:s}=(0,i.WQ)(p),d=(0,i.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:n,iconColor:i}}=l.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":n,"--n-icon-color":i}}),c=n?(0,y.R)("popconfirm-panel",void 0,d,s):void 0;return Object.assign(Object.assign({},(0,f.A)("Popconfirm")),{mergedClsPrefix:a,cssVars:n?void 0:d,localizedPositiveText:(0,i.EW)(()=>e.positiveText||t.value.positiveText),localizedNegativeText:(0,i.EW)(()=>e.negativeText||t.value.negativeText),positiveButtonProps:(0,r.lW)(s,"positiveButtonProps"),negativeButtonProps:(0,r.lW)(s,"negativeButtonProps"),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:null===c||void 0===c?void 0:c.themeClass,onRender:null===c||void 0===c?void 0:c.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:n,$slots:r}=this,a=(0,x.Nj)(r.action,()=>null===this.negativeText&&null===this.positiveText?[]:[null!==this.negativeText&&(0,i.h)(b.Ay,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),null!==this.positiveText&&(0,i.h)(b.Ay,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return null===(e=this.onRender)||void 0===e||e.call(this),(0,i.h)("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},(0,x.iQ)(r.default,e=>n||e?(0,i.h)("div",{class:`${t}-popconfirm__body`},n?(0,i.h)("div",{class:`${t}-popconfirm__icon`},(0,x.Nj)(r.icon,()=>[(0,i.h)(h.A,{clsPrefix:t},{default:()=>(0,i.h)(g.A,null)})])):null,e):null),a?(0,i.h)("div",{class:[`${t}-popconfirm__action`]},a):null)}}),C=n(34350),R=(0,C.cB)("popconfirm",[(0,C.cE)("body","\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n ",[(0,C.cE)("icon","\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n ")]),(0,C.cE)("action","\n display: flex;\n justify-content: flex-end;\n ",[(0,C.c)("&:not(:first-child)","margin-top: 8px"),(0,C.cB)("button",[(0,C.c)("&:not(:last-child)","margin-right: 8px;")])])]);const z=Object.assign(Object.assign(Object.assign({},a.A.props),c.vY),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function});var A=(0,i.pM)({name:"Popconfirm",props:z,slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,o.Ay)(),n=(0,a.A)("Popconfirm","-popconfirm",R,v.A,e,t),s=(0,r.KR)(null);function d(t){var n;if(!(null===(n=s.value)||void 0===n?void 0:n.getMergedShow()))return;const{onPositiveClick:i,"onUpdate:show":r}=e;Promise.resolve(!i||i(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}function c(t){var n;if(!(null===(n=s.value)||void 0===n?void 0:n.getMergedShow()))return;const{onNegativeClick:i,"onUpdate:show":r}=e;Promise.resolve(!i||i(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}(0,i.Gt)(p,{mergedThemeRef:n,mergedClsPrefixRef:t,props:e});const u={setShow(e){var t;null===(t=s.value)||void 0===t||t.setShow(e)},syncPosition(){var e;null===(e=s.value)||void 0===e||e.syncPosition()},mergedTheme:n,popoverInstRef:s,handlePositiveClick:d,handleNegativeClick:c};return u},render(){const{$slots:e,$props:t,mergedTheme:n}=this;return(0,i.h)(c.Ay,Object.assign({},(0,s.c)(t,w),{theme:n.peers.Popover,themeOverrides:n.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.trigger,default:()=>{const n=(0,d.a)(t,w);return(0,i.h)(_,Object.assign({},n,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}})}}]);
//# sourceMappingURL=169.6eb60ec2.js.map