@forsion/extend 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +35 -15
- package/SIGNATURE +8 -7
- package/dist/THIRD_PARTY_NOTICES.md +144 -0
- package/dist/desktop.mjs +8 -8
- package/dist/main.js +179 -1
- package/manifest.json +3 -3
- package/package.json +6 -2
package/dist/main.js
CHANGED
|
@@ -1 +1,179 @@
|
|
|
1
|
-
"use strict";(()=>{})();
|
|
1
|
+
"use strict";(()=>{var qe,T,Tt,Kn,ae,Pt,It,Rt,Ze,Te,ye,Lt,ot,et,tt,Dt,Le={},De=[],jn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ne=Array.isArray;function ee(t,e){for(var n in e)t[n]=e[n];return t}function rt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Yn(t,e,n){var r,a,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?qe.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return Ie(t,s,r,a,null)}function Ie(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Tt,__i:-1,__u:0};return a==null&&T.vnode!=null&&T.vnode(i),i}function R(t){return t.children}function Re(t,e){this.props=t,this.context=e}function de(t,e){if(e==null)return t.__?de(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?de(t):null}function Qn(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],a=[],i=ee({},e);i.__v=e.__v+1,T.vnode&&T.vnode(i),at(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??de(e),!!(32&e.__u),a),i.__v=e.__v,i.__.__k[i.__i]=i,zt(r,i,a),e.__e=e.__=null,i.__e!=n&&Ft(i)}}function Ft(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Ft(t)}function nt(t){(!t.__d&&(t.__d=!0)&&ae.push(t)&&!Fe.__r++||Pt!=T.debounceRendering)&&((Pt=T.debounceRendering)||It)(Fe)}function Fe(){try{for(var t,e=1;ae.length;)ae.length>e&&ae.sort(Rt),t=ae.shift(),e=ae.length,Qn(t)}finally{ae.length=Fe.__r=0}}function qt(t,e,n,r,a,i,s,c,u,d,m){var f,l,g,h,x,w,_=r&&r.__k||De,p=e.length;for(u=Gn(n,e,_,u,p),f=0;f<p;f++)(g=n.__k[f])!=null&&(l=g.__i!=-1&&_[g.__i]||Le,g.__i=f,w=at(t,g,l,a,i,s,c,u,d,m),h=g.__e,g.ref&&l.ref!=g.ref&&(l.ref&&it(l.ref,null,g),m.push(g.ref,g.__c||h,g)),x==null&&h!=null&&(x=h),4&g.__u?(u=Nt(g,u,t),l.__e&&(l.__e=null)):typeof g.type=="function"&&w!==void 0?u=w:h&&(u=h.nextSibling),g.__u&=-7);return n.__e=x,u}function Gn(t,e,n,r,a){var i,s,c,u,d,m=n.length,f=m,l=0;for(t.__k=new Array(a),i=0;i<a;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[i]=Ie(null,s,null,null,null):Ne(s)?s=t.__k[i]=Ie(R,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=Ie(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,u=i+l,s.__=t,s.__b=t.__b+1,c=null,(d=s.__i=Zn(s,n,u,f))!=-1&&(f--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(a>m?l--:a<m&&l++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?l--:d==u+1?l++:(d>u?l--:l++,s.__u|=4))):t.__k[i]=null;if(f)for(i=0;i<m;i++)(c=n[i])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=de(c)),Ot(c,c));return r}function Nt(t,e,n){var r,a;if(typeof t.type=="function"){for(r=t.__k,a=0;r&&a<r.length;a++)r[a]&&(r[a].__=t,e=Nt(r[a],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=de(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Zn(t,e,n,r){var a,i,s,c=t.key,u=t.type,d=e[n],m=d!=null&&(2&d.__u)==0;if(d===null&&c==null||m&&c==d.key&&u==d.type)return n;if(r>(m?1:0)){for(a=n-1,i=n+1;a>=0||i<e.length;)if((d=e[s=a>=0?a--:i++])!=null&&(2&d.__u)==0&&c==d.key&&u==d.type)return s}return-1}function Mt(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||jn.test(e)?n:n+"px"}function Ee(t,e,n,r,a){var i,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Mt(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Mt(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(Lt,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[ye]=r[ye]:(n[ye]=ot,t.addEventListener(e,i?tt:et,i)):t.removeEventListener(e,i?tt:et,i);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Et(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Te]==null)e[Te]=ot++;else if(e[Te]<n[ye])return;return n(T.event?T.event(e):e)}}}function at(t,e,n,r,a,i,s,c,u,d){var m,f,l,g,h,x,w,_,p,b,y,C,E,F,O,re,H=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[c=e.__e=n.__e]),(m=T.__b)&&m(e);e:if(typeof H=="function"){f=s.length;try{if(p=e.props,b=H.prototype&&H.prototype.render,y=(m=H.contextType)&&r[m.__c],C=m?y?y.props.value:m.__:r,n.__c?_=(l=e.__c=n.__c).__=l.__E:(b?e.__c=l=new H(p,C):(e.__c=l=new Re(p,C),l.constructor=H,l.render=to),y&&y.sub(l),l.state||(l.state={}),l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),b&&l.__s==null&&(l.__s=l.state),b&&H.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ee({},l.__s)),ee(l.__s,H.getDerivedStateFromProps(p,l.__s))),h=l.props,x=l.state,l.__v=e,g)b&&H.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),b&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(b&&H.getDerivedStateFromProps==null&&p!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(p,C),e.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(p,l.__s,C)===!1){e.__v!=n.__v&&(l.props=p,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Z){Z&&(Z.__=e)}),De.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&s.push(l),c=de(n);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(p,l.__s,C),b&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,x,w)})}if(l.context=C,l.props=p,l.__P=t,l.__e=!1,E=T.__r,F=0,b)l.state=l.__s,l.__d=!1,E&&E(e),m=l.render(l.props,l.state,l.context),De.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,E&&E(e),m=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++F<25);l.state=l.__s,l.getChildContext!=null&&(r=ee(ee({},r),l.getChildContext())),b&&!g&&l.getSnapshotBeforeUpdate!=null&&(w=l.getSnapshotBeforeUpdate(h,x)),O=m!=null&&m.type===R&&m.key==null?Ut(m.props.children):m,c=qt(t,Ne(O)?O:[O],e,n,r,a,i,s,c,u,d),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(s.length=f,e.__v=null,u||i!=null){if(Z.then){for(e.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i!=null&&(i[i.indexOf(c)]=null),e.__e=c}else if(i!=null)for(re=i.length;re--;)rt(i[re])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),Z.then||Bt(e),T.__e(Z,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=eo(n.__e,e,n,r,a,i,s,u,d);return(m=T.diffed)&&m(e),128&e.__u?void 0:c}function Bt(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Bt))}function zt(t,e,n){for(var r=0;r<n.length;r++)it(n[r],n[++r],n[++r]);T.__c&&T.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){T.__e(i,a.__v)}})}function Ut(t){return typeof t!="object"||t==null||t.__b>0?t:Ne(t)?t.map(Ut):t.constructor!==void 0?null:ee({},t)}function eo(t,e,n,r,a,i,s,c,u){var d,m,f,l,g,h,x,w=n.props||Le,_=e.props,p=e.type;if(p=="svg"?a="http://www.w3.org/2000/svg":p=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!p&&(p?g.localName==p:g.nodeType==3)){t=g,i[d]=null;break}}if(t==null){if(p==null)return document.createTextNode(_);t=document.createElementNS(a,p,_.is&&_),c&&(T.__m&&T.__m(e,i),c=!1),i=null}if(p==null)w===_||c&&t.data==_||(t.data=_);else{if(i=p=="textarea"&&_.defaultValue!=null?null:i&&qe.call(t.childNodes),!c&&i!=null)for(w={},d=0;d<t.attributes.length;d++)w[(g=t.attributes[d]).name]=g.value;for(d in w)g=w[d],d=="dangerouslySetInnerHTML"?f=g:d=="children"||d in _||d=="value"&&"defaultValue"in _||d=="checked"&&"defaultChecked"in _||Ee(t,d,null,g,a);for(d in _)g=_[d],d=="children"?l=g:d=="dangerouslySetInnerHTML"?m=g:d=="value"?h=g:d=="checked"?x=g:c&&typeof g!="function"||w[d]===g||Ee(t,d,g,w[d],a);if(m)c||f&&(m.__html==f.__html||m.__html==t.innerHTML)||(t.innerHTML=m.__html),e.__k=[];else if(f&&(t.innerHTML=""),qt(e.type=="template"?t.content:t,Ne(l)?l:[l],e,n,r,p=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&de(n,0),c,u),i!=null)for(d=i.length;d--;)rt(i[d]);c&&p!="textarea"||(d="value",p=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[d]||p=="progress"&&!h||p=="option"&&h!=w[d])&&Ee(t,d,h,w[d],a),d="checked",x!=null&&x!=t[d]&&Ee(t,d,x,w[d],a))}return t}function it(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(a){T.__e(a,n)}}function Ot(t,e,n){var r,a;if(T.unmount&&T.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||it(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(a=0;a<r.length;a++)r[a]&&Ot(r[a],e,n||typeof t.type!="function");n||rt(t.__e),t.__c=t.__=t.__e=void 0}function to(t,e,n){return this.constructor(t,n)}function st(t,e,n){var r,a,i,s;e==document&&(e=document.documentElement),T.__&&T.__(t,e),a=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],at(e,t=(!r&&n||e).__k=Yn(R,null,[t]),a||Le,Le,e.namespaceURI,!r&&n?[n]:a?null:e.firstChild?qe.call(e.childNodes):null,i,!r&&n?n:a?a.__e:e.firstChild,r,s),zt(i,t,s),t.props.children=null}function Ht(t){function e(n){var r,a;return this.getChildContext||(r=new Set,(a={})[e.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,nt(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return e.__c="__cC"+Dt++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}qe=De.slice,T={__e:function(t,e,n,r){for(var a,i,s;e=e.__;)if((a=e.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(t)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,r||{}),s=a.__d),s)return a.__E=a}catch(c){t=c}throw t}},Tt=0,Kn=function(t){return t!=null&&t.constructor===void 0},Re.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ee({},this.state),typeof t=="function"&&(t=t(ee({},n),this.props)),t&&ee(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),nt(this))},Re.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),nt(this))},Re.prototype.render=R,ae=[],It=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(t,e){return t.__v.__b-e.__v.__b},Fe.__r=0,Ze=Math.random().toString(8),Te="__d"+Ze,ye="__a"+Ze,Lt=/(PointerCapture)$|Capture$/i,ot=0,et=Et(!1),tt=Et(!0),Dt=0;var be,q,ct,$t,_e=0,Qt=[],z=T,Xt=z.__b,Wt=z.__r,Vt=z.diffed,Jt=z.__c,Kt=z.unmount,jt=z.__;function ze(t,e){z.__h&&z.__h(q,t,_e||e),_e=0;var n=q.__H||(q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function v(t){return _e=1,no(en,t)}function no(t,e,n){var r=ze(be++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):en(void 0,e),function(c){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,c);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.__f)){var a=function(c,u,d){if(!r.__c.__H)return!0;var m=!1,f=r.__c.props!==c;if(r.__c.__H.__.some(function(g){if(g.__N){m=!0;var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(f=!0)}}),i){var l=i.call(this,c,u,d);return m?l||f:l}return!m||f};q.__f=!0;var i=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(c,u,d){if(this.__e){var m=i;i=void 0,a(c,u,d),i=m}s&&s.call(this,c,u,d)},q.shouldComponentUpdate=a}return r.__N||r.__}function N(t,e){var n=ze(be++,3);!z.__s&&Zt(n.__H,e)&&(n.__=t,n.u=e,q.__H.__h.push(n))}function $(t){return _e=5,ve(function(){return{current:t}},[])}function ve(t,e){var n=ze(be++,7);return Zt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ie(t,e){return _e=8,ve(function(){return t},e)}function Gt(t){var e=q.context[t.__c],n=ze(be++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(q)),e.props.value):t.__}function oo(){for(var t;t=Qt.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Be),e.__h.some(lt),e.__h=[]}catch(n){e.__h=[],z.__e(n,t.__v)}}}z.__b=function(t){q=null,Xt&&Xt(t)},z.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),jt&&jt(t,e)},z.__r=function(t){Wt&&Wt(t),be=0;var e=(q=t.__c).__H;e&&(ct===q?(e.__h=[],q.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Be),e.__h.some(lt),e.__h=[],be=0)),ct=q},z.diffed=function(t){Vt&&Vt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Qt.push(e)!==1&&$t===z.requestAnimationFrame||(($t=z.requestAnimationFrame)||ro)(oo)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),ct=q=null},z.__c=function(t,e){e.some(function(n){try{n.__h.some(Be),n.__h=n.__h.filter(function(r){return!r.__||lt(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],z.__e(r,n.__v)}}),Jt&&Jt(t,e)},z.unmount=function(t){Kt&&Kt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Be(r)}catch(a){e=a}}),n.__H=void 0,e&&z.__e(e,n.__v))};var Yt=typeof requestAnimationFrame=="function";function ro(t){var e,n=function(){clearTimeout(r),Yt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Yt&&(e=requestAnimationFrame(n))}function Be(t){var e=q,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),q=e}function lt(t){var e=q;t.__c=t.__(),q=e}function Zt(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function en(t,e){return typeof e=="function"?e(t):e}var ao={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","common.cancel":"\u53D6\u6D88","common.copied":"\u5DF2\u590D\u5236","common.copyFailed":"\u590D\u5236\u5931\u8D25","common.done":"\u5B8C\u6210","common.loadFailed":"\u6CA1\u80FD\u52A0\u8F7D","common.loadMore":"\u52A0\u8F7D\u66F4\u591A","common.loading":"\u52A0\u8F7D\u4E2D\u2026","common.openInBrowser":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00","common.retry":"\u91CD\u8BD5","common.save":"\u4FDD\u5B58","common.thisWeek":"\u672C\u5468","common.today":"\u4ECA\u65E5","common.unlimited":"\u4E0D\u9650","signin.button":"\u767B\u5F55 Forsion","signin.desc":"\u767B\u5F55 Forsion \u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u7BA1\u7406\u8D26\u53F7\u3001\u989D\u5EA6\u3001\u5B89\u5168\u4E0E\u53CD\u9988\u3002","signin.pending":"\u7B49\u5F85\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u767B\u5F55\u2026","signin.deviceHint":"\u6D4F\u89C8\u5668\u4F1A\u81EA\u52A8\u6253\u5F00\u767B\u5F55\u9875\uFF1B\u6CA1\u6709\u6253\u5F00\u7684\u8BDD\uFF0C\u7528\u624B\u673A\u626B\u7801\u6216\u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u5E76\u6838\u5BF9\u9A8C\u8BC1\u7801\u3002","signin.code":"\u9A8C\u8BC1\u7801","signin.openLink":"\u6253\u5F00\u767B\u5F55\u9875","signin.copyLink":"\u590D\u5236\u94FE\u63A5","signin.qrLabel":"\u767B\u5F55\u4E8C\u7EF4\u7801","account.profile.title":"\u4E2A\u4EBA\u8D44\u6599","account.profile.desc":"\u5934\u50CF\u3001\u6635\u79F0\uFF0C\u4EE5\u53CA\u7ED1\u5B9A\u7684\u624B\u673A\u548C\u90AE\u7BB1","account.avatar.change":"\u66F4\u6362\u5934\u50CF","account.avatar.saved":"\u5934\u50CF\u5DF2\u66F4\u65B0","account.nickname.edit":"\u4FEE\u6539\u6635\u79F0","account.nickname.label":"\u6635\u79F0","account.nickname.saved":"\u6635\u79F0\u5DF2\u66F4\u65B0","account.role.admin":"\u7BA1\u7406\u5458","account.username":"\u7528\u6237\u540D {name}","account.contact.phone":"\u624B\u673A","account.contact.email":"\u90AE\u7BB1","account.contact.unbound":"\u672A\u7ED1\u5B9A","account.contact.manage":"\u53BB\u5B89\u5168\u9875\u7BA1\u7406","account.web.open":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u4E2A\u4EBA\u4E2D\u5FC3","account.web.desc":"\u4E91\u7A7A\u95F4\u3001AI \u5927\u8111\u3001\u6295\u7A3F\u4E0E\u4E3B\u9898\u5728\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7BA1\u7406\u3002","member.title":"\u4F1A\u5458","member.desc":"\u5F53\u524D\u6863\u4F4D\u3001\u65B9\u6848\u4E0E\u5230\u671F\u65E5","member.upgrade":"\u5347\u7EA7\u4F1A\u5458","member.renew":"\u7EED\u8D39","member.freeName":"\u514D\u8D39\u7248","member.freeHint":"\u5347\u7EA7\u4F1A\u5458\u53EF\u4EE5\u83B7\u5F97\u66F4\u591A AI \u989D\u5EA6","member.expires":"{date} \u5230\u671F","member.noExpiry":"\u957F\u671F\u6709\u6548","member.loadFailed":"\u4F1A\u5458\u4FE1\u606F\u6682\u65F6\u62FF\u4E0D\u5230\u3002","local.title":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u8D26\u53F7","local.desc":"\u5728\u767B\u5F55\u8FC7\u7684\u8D26\u53F7\u4E4B\u95F4\u5207\u6362","local.current":"\u5F53\u524D","local.switch":"\u5207\u6362","local.add":"\u767B\u5F55\u5176\u4ED6\u8D26\u53F7","local.signOut":"\u9000\u51FA\u767B\u5F55","local.empty":"\u8FD8\u6CA1\u6709\u4FDD\u5B58\u7684\u8D26\u53F7","local.loadFailed":"\u8D26\u53F7\u5217\u8868\u6682\u65F6\u8BFB\u4E0D\u5230","quota.ai.title":"AI \u989D\u5EA6","quota.ai.desc":"\u4ECA\u65E5\u548C\u672C\u5468\u5404\u8FD8\u5269\u591A\u5C11\uFF1B\u7528\u5B8C\u540E\u53EF\u4EE5\u7528\u989D\u5EA6\u91CD\u7F6E\u5361\u6062\u590D","quota.resetDaily":"\u6BCF\u5929 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","quota.resetWeekly":"{date} 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","card.title":"\u989D\u5EA6\u91CD\u7F6E\u5361","card.desc":"\u628A\u4ECA\u65E5\u548C\u672C\u5468\u7684 AI \u989D\u5EA6\u6062\u590D\u5230 100%","card.owned":"\u6301\u6709 {n} \u5F20","card.use":"\u4F7F\u7528\u4E00\u5F20","card.useConfirm":"\u786E\u8BA4\u4F7F\u7528","card.used":"\u5DF2\u4F7F\u7528 1 \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","card.left":"\u8FD8\u5269 {n} \u5F20","card.noneHint":"\u6CA1\u6709\u989D\u5EA6\u91CD\u7F6E\u5361\u4E86\uFF0C\u53EF\u4EE5\u7528\u79EF\u5206\u5151\u6362\u3002","card.exchange":"\u7528\u79EF\u5206\u5151\u6362","card.price":"\u6BCF\u5F20 {price} \u79EF\u5206\uFF0C\u4E00\u6B21 1\u201350 \u5F20","card.count":"\u5151\u6362\u5F20\u6570","card.cost":"\u82B1\u8D39 {cost} \u79EF\u5206","card.countHint":"\u586B 1\u201350","card.exchangeButton":"\u5151\u6362","card.exchangeConfirm":"\u786E\u8BA4\u82B1\u8D39 {cost} \u79EF\u5206","card.exchanged":"\u5DF2\u5151\u6362 {n} \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","points.title":"\u79EF\u5206","points.desc":"\u79EF\u5206\u53EF\u4EE5\u5151\u6362\u989D\u5EA6\u91CD\u7F6E\u5361\uFF0C\u4E5F\u80FD\u5728 AI \u989D\u5EA6\u7528\u5B8C\u540E\u81EA\u52A8\u62B5\u6263","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","points.autoDeduct":"\u79EF\u5206\u81EA\u52A8\u62B5\u6263","points.autoDeductDesc":"AI \u989D\u5EA6\u7528\u5B8C\u540E\uFF0C\u81EA\u52A8\u7528\u79EF\u5206\u7EE7\u7EED","bg.title":"\u540E\u53F0\u989D\u5EA6","bg.desc":"Muse \u4E0E\u81EA\u52A8\u5316\u4F7F\u7528\uFF0C\u548C AI \u989D\u5EA6\u5206\u5F00\u8BA1\u7B97","bg.autoMain":"\u7528\u5B8C\u540E\u6539\u7528 AI \u989D\u5EA6\u7EE7\u7EED","bg.autoMainDesc":"\u5173\u7740\u65F6\uFF0C\u540E\u53F0\u989D\u5EA6\u7528\u5B8C\u540E Muse \u4E0E\u81EA\u52A8\u5316\u4F1A\u6682\u505C","bg.convert":"\u4ECE AI \u989D\u5EA6\u8F6C\u5165","bg.convertDesc":"\u6309 AI \u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B\u8F6C\u5165\uFF0C\u672C\u5468\u671F\u5185\u6709\u6548","bg.convertConfirm":"\u786E\u8BA4\u8F6C\u5165 {pct}%","bg.converted":"\u5DF2\u4ECE AI \u989D\u5EA6\u8F6C\u5165 {pct}%","invite.title":"\u9080\u8BF7\u4E0E\u5151\u6362","invite.desc":"\u9080\u8BF7\u597D\u53CB\u6CE8\u518C\uFF0C\u6216\u5151\u6362\u4F60\u6536\u5230\u7684\u7801","invite.myCode":"\u6211\u7684\u9080\u8BF7\u7801","invite.count":"\u5DF2\u9080\u8BF7 {n} \u4EBA","invite.copyCode":"\u590D\u5236\u9080\u8BF7\u7801","invite.copyLink":"\u590D\u5236\u9080\u8BF7\u94FE\u63A5","invite.loadFailed":"\u9080\u8BF7\u7801\u6682\u65F6\u62FF\u4E0D\u5230","invite.claim":"\u586B\u5199\u9080\u8BF7\u7801","invite.claimDesc":"\u6CE8\u518C\u540E 7 \u5929\u5185\uFF0C\u53EF\u4EE5\u8865\u586B\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimPlaceholder":"\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimSubmit":"\u63D0\u4EA4","invite.claimed":"\u9080\u8BF7\u7801\u5DF2\u751F\u6548","redeem.title":"\u5151\u6362\u7801","redeem.desc":"\u5151\u6362\u79EF\u5206\u3001\u4F1A\u5458\u6216\u5176\u4ED6\u5956\u52B1","redeem.placeholder":"\u8F93\u5165\u5151\u6362\u7801","redeem.submit":"\u5151\u6362","redeem.success":"\u5151\u6362\u6210\u529F","redeem.successWith":"\u5151\u6362\u6210\u529F\uFF1A{what}","redeem.gotPoints":"{n} \u79EF\u5206","redeem.gotMembership":"\u4F1A\u5458","sec.methods.title":"\u767B\u5F55\u65B9\u5F0F","sec.methods.desc":"\u624B\u673A\u548C\u90AE\u7BB1\u53EF\u4EE5\u7528\u6765\u767B\u5F55\u3001\u627E\u56DE\u5BC6\u7801","sec.bind":"\u7ED1\u5B9A","sec.change":"\u66F4\u6362","sec.phone":"\u624B\u673A\u53F7","sec.email":"\u90AE\u7BB1\u5730\u5740","sec.newPhone":"\u65B0\u624B\u673A\u53F7","sec.newEmail":"\u65B0\u90AE\u7BB1\u5730\u5740","sec.phonePlaceholder":"\u4E2D\u56FD\u5927\u9646\u53F7\u7801\u76F4\u63A5\u586B\uFF0C\u5176\u4ED6\u5730\u533A\u5E26 +\u533A\u53F7","sec.emailPlaceholder":"name@example.com","sec.code":"\u9A8C\u8BC1\u7801","sec.codePlaceholder":"\u8F93\u5165\u9A8C\u8BC1\u7801","sec.sendCode":"\u53D1\u9001\u9A8C\u8BC1\u7801","sec.resendIn":"{s} \u79D2\u540E\u91CD\u53D1","sec.codeSent":"\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001","sec.bindSubmit":"\u786E\u8BA4\u7ED1\u5B9A","sec.phoneBound":"\u624B\u673A\u5DF2\u7ED1\u5B9A","sec.emailBound":"\u90AE\u7BB1\u5DF2\u7ED1\u5B9A","sec.devices.title":"\u767B\u5F55\u8BBE\u5907","sec.devices.desc":"\u62C5\u5FC3\u8D26\u53F7\u88AB\u522B\u4EBA\u7528\u4E86\uFF0C\u53EF\u4EE5\u8BA9\u6240\u6709\u8BBE\u5907\u91CD\u65B0\u767B\u5F55","sec.logoutAll":"\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDesc":"\u5305\u62EC\u8FD9\u53F0\u7535\u8111\uFF0C\u6240\u6709\u8BBE\u5907\u90FD\u8981\u91CD\u65B0\u767B\u5F55","sec.logoutAllConfirm":"\u786E\u8BA4\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDone":"\u5DF2\u9000\u51FA\u6240\u6709\u8BBE\u5907","pw.title":"\u5BC6\u7801","pw.desc":"{min}\u2013{max} \u4F4D\uFF0C\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C","pw.change":"\u4FEE\u6539\u5BC6\u7801","pw.modeLabel":"\u4FEE\u6539\u65B9\u5F0F","pw.mode.current":"\u7528\u5F53\u524D\u5BC6\u7801","pw.mode.code":"\u7528\u9A8C\u8BC1\u7801","pw.current":"\u5F53\u524D\u5BC6\u7801","pw.currentRequired":"\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801","pw.new":"\u65B0\u5BC6\u7801","pw.confirm":"\u518D\u8F93\u4E00\u6B21\u65B0\u5BC6\u7801","pw.mismatch":"\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u4E0D\u4E00\u81F4","pw.submit":"\u4FEE\u6539\u5BC6\u7801","pw.submitReset":"\u8BBE\u7F6E\u65B0\u5BC6\u7801","pw.changed":"\u5BC6\u7801\u5DF2\u66F4\u65B0","pw.noPasswordYet":"\u8FD9\u4E2A\u8D26\u53F7\u8FD8\u6CA1\u6709\u8BBE\u7F6E\u5BC6\u7801\uFF0C\u8BF7\u6539\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u3002","pw.codeNeedsContact":"\u7ED1\u5B9A\u624B\u673A\u6216\u90AE\u7BB1\u540E\uFF0C\u624D\u80FD\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u5BC6\u7801\u3002","pw.via":"\u9A8C\u8BC1\u7801\u53D1\u5230","pw.codeTo":"\u9A8C\u8BC1\u7801\u4F1A\u53D1\u5230 {target}","pw.rulesLabel":"\u5BC6\u7801\u89C4\u5219","pw.req.length":"{min}\u2013{max} \u4F4D","pw.req.lower":"\u542B\u5C0F\u5199\u5B57\u6BCD","pw.req.upper":"\u542B\u5927\u5199\u5B57\u6BCD","pw.req.special":"\u542B\u7279\u6B8A\u5B57\u7B26","pw.req.space":"\u4E0D\u542B\u7A7A\u683C","pw.rule.format":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","pw.rule.min":"\u5BC6\u7801\u81F3\u5C11 8 \u4F4D","pw.rule.max":"\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D","pw.rule.space":"\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C","pw.rule.lower":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD","pw.rule.upper":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD","pw.rule.special":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26","del.title":"\u6CE8\u9500\u8D26\u53F7","del.desc":"\u6C38\u4E45\u5220\u9664\u8D26\u53F7\u548C\u5168\u90E8\u6570\u636E\uFF0C\u65E0\u6CD5\u6062\u590D","del.start":"\u6CE8\u9500\u8D26\u53F7","del.warn":"\u6CE8\u9500\u540E\uFF0C\u8D26\u53F7\u3001\u79EF\u5206\u3001\u4F1A\u5458\u3001\u4E91\u7A7A\u95F4\u548C\u5168\u90E8\u6570\u636E\u90FD\u4F1A\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u627E\u56DE\u3002","del.methodLabel":"\u9A8C\u8BC1\u65B9\u5F0F","del.byCode":"\u9A8C\u8BC1\u7801","del.byPassword":"\u5BC6\u7801","del.codeLabel":"\u53D1\u5230 {target} \u7684\u9A8C\u8BC1\u7801","del.passwordLabel":"\u8D26\u53F7\u5BC6\u7801","del.submit":"\u6CE8\u9500\u8D26\u53F7","del.confirm":"\u786E\u8BA4\u6C38\u4E45\u6CE8\u9500","del.done":"\u8D26\u53F7\u5DF2\u6CE8\u9500","usage.overview.title":"\u7528\u91CF\u6982\u89C8","usage.overview.desc":"\u6240\u9009\u65F6\u95F4\u6BB5\u5185\u7684\u8BF7\u6C42\u4E0E AI \u989D\u5EA6\u6D88\u8017","usage.range":"\u65F6\u95F4\u8303\u56F4","usage.days":"{n} \u5929","usage.requests":"\u8BF7\u6C42\u6B21\u6570","usage.successRate":"\u6210\u529F\u7387","usage.consumption":"AI \u989D\u5EA6\u6D88\u8017","usage.ofToday":"\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650","usage.unlimitedNote":"\u4F60\u7684 AI \u989D\u5EA6\u4E0D\u9650\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.noLimitNote":"\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u4E3A 0 \u6216\u6682\u65F6\u62FF\u4E0D\u5230\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.byModel.title":"\u6309\u6A21\u578B","usage.byModel.desc":"\u5404\u6A21\u578B\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.byApp.title":"\u6309\u5E94\u7528","usage.byApp.desc":"\u5404\u5E94\u7528\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.col.model":"\u6A21\u578B","usage.col.app":"\u5E94\u7528","usage.col.requests":"\u8BF7\u6C42","usage.col.consumption":"\u989D\u5EA6\u6D88\u8017","usage.empty":"\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u7528\u91CF","usage.appUnknown":"\u5176\u4ED6","usage.recent.title":"\u6700\u8FD1\u6D88\u8017","usage.recent.desc":"\u6BCF\u6B21\u8C03\u7528\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B","usage.recentEmpty":"\u8FD8\u6CA1\u6709\u6D88\u8017\u8BB0\u5F55","usage.failed":"\u5931\u8D25","usage.shown":"\u5DF2\u663E\u793A {shown} / {total} \u6761","fb.list.title":"\u6211\u7684\u53CD\u9988","fb.list.desc":"\u63D0\u4EA4\u8FC7\u7684\u95EE\u9898\u548C\u5EFA\u8BAE\uFF0C\u56DE\u590D\u4F1A\u663E\u793A\u5728\u8FD9\u91CC","fb.new":"\u65B0\u5EFA\u53CD\u9988","fb.empty":"\u8FD8\u6CA1\u6709\u53CD\u9988","fb.untitled":"\u672A\u547D\u540D\u53CD\u9988","fb.unread":"\u6709\u65B0\u56DE\u590D","fb.shown":"\u5DF2\u663E\u793A {n} \u6761","fb.submitted":"\u5DF2\u63D0\u4EA4\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D","fb.descLabel":"\u63CF\u8FF0\u95EE\u9898\u6216\u5EFA\u8BAE","fb.descPlaceholder":"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF0C\u4F60\u671F\u671B\u600E\u6837\u2026\u2026","fb.imagesHint":"\u6700\u591A\u9644 {n} \u5F20\u622A\u56FE\uFF08\u6BCF\u5F20\u4E0D\u8D85\u8FC7 5MB\uFF09\uFF0C\u53EF\u4EE5\u7C98\u8D34\u6216\u62D6\u8FDB\u6765\u3002","fb.addImages":"\u6DFB\u52A0\u622A\u56FE","fb.removeImage":"\u79FB\u9664\u8FD9\u5F20\u56FE","fb.submit":"\u63D0\u4EA4","fb.back":"\u8FD4\u56DE\u5217\u8868","fb.you":"\u4F60","fb.support":"Forsion \u56E2\u961F","fb.attachment":"\u9644\u4EF6","fb.imagePreview":"\u67E5\u770B\u5927\u56FE","fb.closedNote":"\u8FD9\u4E2A\u5DE5\u5355\u5DF2\u5173\u95ED\uFF0C\u4E0D\u80FD\u518D\u56DE\u590D\u3002\u6709\u65B0\u95EE\u9898\u8BF7\u65B0\u5EFA\u53CD\u9988\u3002","fb.replyPlaceholder":"\u56DE\u590D\u2026","fb.replySend":"\u53D1\u9001\u56DE\u590D","fb.replySent":"\u56DE\u590D\u5DF2\u53D1\u9001","fb.status.open":"\u5F85\u5904\u7406","fb.status.in_progress":"\u5904\u7406\u4E2D","fb.status.resolved":"\u5DF2\u89E3\u51B3","fb.status.closed":"\u5DF2\u5173\u95ED","err.accountGone":"\u8FD9\u4E2A\u8D26\u53F7\u5DF2\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.adminCannotDelete":"\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500","err.avatarInvalid":"\u8FD9\u5F20\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6362\u4E00\u5F20\u8BD5\u8BD5","err.avatarTooLarge":"\u56FE\u7247\u592A\u5927\u4E86\uFF0C\u6362\u4E00\u5F20\u5C0F\u4E00\u70B9\u7684","err.backgroundUnavailable":"\u540E\u53F0\u989D\u5EA6\u6682\u65F6\u4E0D\u53EF\u7528","err.captcha":"\u9700\u8981\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u4EBA\u673A\u9A8C\u8BC1","err.codeCooldown":"\u53D1\u9001\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.codeInvalid":"\u9A8C\u8BC1\u7801\u4E0D\u5BF9\u6216\u5DF2\u8FC7\u671F","err.codeRequired":"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801","err.codeSendFailed":"\u9A8C\u8BC1\u7801\u6CA1\u53D1\u51FA\u53BB\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.currentPasswordWrong":"\u5F53\u524D\u5BC6\u7801\u4E0D\u5BF9","err.deleteTargetInvalid":"\u9A8C\u8BC1\u7801\u53EA\u80FD\u53D1\u5230\u8D26\u53F7\u7ED1\u5B9A\u7684\u624B\u673A\u6216\u90AE\u7BB1","err.deleteVerifyFailed":"\u9A8C\u8BC1\u6CA1\u901A\u8FC7\uFF0C\u8D26\u53F7\u6CA1\u6709\u6CE8\u9500","err.emailInUse":"\u8FD9\u4E2A\u90AE\u7BB1\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.emailInvalid":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.featureDisabled":"\u8FD9\u9879\u529F\u80FD\u6682\u65F6\u5173\u95ED\u4E86","err.feedbackEmpty":"\u8BF7\u5199\u4E00\u4E0B\u95EE\u9898\u6216\u5EFA\u8BAE","err.feedbackTooLong":"\u63CF\u8FF0\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.generic":"\u64CD\u4F5C\u6CA1\u6709\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.imageRead":"\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765","err.imageTooLarge":"\u6BCF\u5F20\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5MB","err.imageType":"\u53EA\u80FD\u6DFB\u52A0\u56FE\u7247","err.insufficientMainQuota":"AI \u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6","err.insufficientPoints":"\u79EF\u5206\u4E0D\u591F","err.priceChanged":"\u91CD\u7F6E\u5361\u5355\u4EF7\u521A\u521A\u8C03\u6574\u8FC7\uFF0C\u8BF7\u770B\u4E00\u4E0B\u65B0\u4EF7\u683C\uFF0C\u518D\u786E\u8BA4\u5151\u6362\u3002","err.invalidCount":"\u5F20\u6570\u8981\u5728 1\u201350 \u4E4B\u95F4","err.invalidInviteCode":"\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548","err.inviteAlreadyUsed":"\u4F60\u5DF2\u7ECF\u7528\u8FC7\u9080\u8BF7\u7801\u4E86","err.inviteEmpty":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","err.inviteOwnCode":"\u4E0D\u80FD\u586B\u81EA\u5DF1\u7684\u9080\u8BF7\u7801","err.inviteWindowExpired":"\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F","err.loginCodeExpired":"\u767B\u5F55\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.loginInProgress":"\u6B63\u5728\u767B\u5F55\u4E2D","err.loginTimeout":"\u767B\u5F55\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5","err.loginUnsupported":"\u8FD9\u4E2A\u4E91\u7AEF\u4E0D\u652F\u6301\u684C\u9762\u7AEF\u767B\u5F55","err.network":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5","err.noCloudUrl":"\u8BF7\u5148\u5728\u300C\u8FDE\u63A5\u300D\u91CC\u586B\u5199\u4E91\u7AEF\u5730\u5740","err.noResetCard":"\u6CA1\u6709\u53EF\u7528\u7684\u989D\u5EA6\u91CD\u7F6E\u5361","err.openFailed":"\u6CA1\u80FD\u6253\u5F00\u6D4F\u89C8\u5668","err.passwordRequired":"\u8BF7\u586B\u5199\u5F53\u524D\u5BC6\u7801\u548C\u65B0\u5BC6\u7801","err.phoneInUse":"\u8FD9\u4E2A\u624B\u673A\u53F7\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.phoneInvalid":"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u5BF9\uFF08\u5176\u4ED6\u5730\u533A\u8BF7\u5E26 +\u533A\u53F7\uFF09","err.redeemEmpty":"\u8BF7\u8F93\u5165\u5151\u6362\u7801","err.redeemExpired":"\u5151\u6362\u7801\u5DF2\u8FC7\u671F","err.redeemInactive":"\u5151\u6362\u7801\u5DF2\u505C\u7528","err.redeemNotFound":"\u5151\u6362\u7801\u4E0D\u5B58\u5728","err.redeemUsedUp":"\u5151\u6362\u7801\u5DF2\u88AB\u7528\u5B8C","err.redeemUserLimit":"\u4F60\u5DF2\u7ECF\u5151\u6362\u8FC7\u8FD9\u4E2A\u7801\u4E86","err.replyEmpty":"\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9","err.replyTooLong":"\u56DE\u590D\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.server":"\u670D\u52A1\u5668\u51FA\u9519\u4E86\uFF08{status}\uFF09\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.session":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.signedOut":"\u8BF7\u5148\u767B\u5F55 Forsion","err.targetInvalid":"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.ticketNotFound":"\u8FD9\u6761\u53CD\u9988\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664","err.tooFrequent":"\u64CD\u4F5C\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.tooManyImages":"\u6700\u591A\u6DFB\u52A0 5 \u5F20\u56FE\u7247","err.unavailable":"\u8FD9\u4E2A\u7248\u672C\u7684\u684C\u9762\u7AEF\u8FD8\u4E0D\u652F\u6301\u8FD9\u4E2A\u64CD\u4F5C\uFF0C\u8BF7\u66F4\u65B0 Forsion"},io={"page.account":"Account","page.quota":"Quota & points","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","common.cancel":"Cancel","common.copied":"Copied","common.copyFailed":"Couldn't copy","common.done":"Done","common.loadFailed":"Couldn't load","common.loadMore":"Load more","common.loading":"Loading\u2026","common.openInBrowser":"Open in browser","common.retry":"Retry","common.save":"Save","common.thisWeek":"This week","common.today":"Today","common.unlimited":"Unlimited","signin.button":"Sign in to Forsion","signin.desc":"Sign in to your Forsion account to manage your account, quota, security and feedback here.","signin.pending":"Waiting for you to finish in your browser\u2026","signin.deviceHint":"Your browser opens the sign-in page on its own. If it doesn't, scan the code with your phone or open the link below, and check that the code matches.","signin.code":"Code","signin.openLink":"Open sign-in page","signin.copyLink":"Copy link","signin.qrLabel":"Sign-in QR code","account.profile.title":"Profile","account.profile.desc":"Your photo and nickname, plus the phone and email linked to your account","account.avatar.change":"Change photo","account.avatar.saved":"Photo updated","account.nickname.edit":"Edit nickname","account.nickname.label":"Nickname","account.nickname.saved":"Nickname updated","account.role.admin":"Admin","account.username":"Username {name}","account.contact.phone":"Phone","account.contact.email":"Email","account.contact.unbound":"Not linked","account.contact.manage":"Manage in Security","account.web.open":"Open the account center in your browser","account.web.desc":"Cloud storage, AI Brain, submissions and themes are managed in the web account center.","member.title":"Membership","member.desc":"Your tier, plan and expiry date","member.upgrade":"Upgrade membership","member.renew":"Renew","member.freeName":"Free plan","member.freeHint":"Upgrade to get more AI quota","member.expires":"Expires {date}","member.noExpiry":"No expiry","member.loadFailed":"Couldn't load your membership.","local.title":"Accounts on this computer","local.desc":"Switch between accounts you've signed in with","local.current":"Current","local.switch":"Switch","local.add":"Sign in to another account","local.signOut":"Sign out","local.empty":"No saved accounts yet","local.loadFailed":"Couldn't read the account list","quota.ai.title":"AI quota","quota.ai.desc":"What's left today and this week; a quota reset card restores it","quota.resetDaily":"Resets daily at 0:00 (Beijing time)","quota.resetWeekly":"Resets {date} at 0:00 (Beijing time)","card.title":"Quota reset card","card.desc":"Restores today's and this week's AI quota to 100%","card.owned":"You have {n}","card.use":"Use one","card.useConfirm":"Confirm","card.used":"Used 1 quota reset card","card.left":"{n} left","card.noneHint":"You have no quota reset cards left. You can exchange points for more.","card.exchange":"Exchange points","card.price":"{price} points each, 1\u201350 at a time","card.count":"Number of cards","card.cost":"Costs {cost} points","card.countHint":"Enter 1\u201350","card.exchangeButton":"Exchange","card.exchangeConfirm":"Spend {cost} points","card.exchanged":"Quota reset cards added: {n}","points.title":"Points","points.desc":"Exchange points for quota reset cards, or spend them automatically when your AI quota runs out","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy points","points.autoDeduct":"Pay with points automatically","points.autoDeductDesc":"When your AI quota runs out, keep going with points","bg.title":"Background quota","bg.desc":"Used by Muse and automations, counted separately from your AI quota","bg.autoMain":"Continue with AI quota when used up","bg.autoMainDesc":"When off, Muse and automations pause once the background quota runs out","bg.convert":"Move from AI quota","bg.convertDesc":"Moves a share of your AI quota limit, valid for the current period","bg.convertConfirm":"Move {pct}%","bg.converted":"Moved {pct}% from your AI quota","invite.title":"Invites & codes","invite.desc":"Invite friends to join, or redeem a code you received","invite.myCode":"My invite code","invite.count":"{n} invited","invite.copyCode":"Copy code","invite.copyLink":"Copy invite link","invite.loadFailed":"Couldn't load your invite code","invite.claim":"Enter an invite code","invite.claimDesc":"Within 7 days of signing up, you can enter a friend's invite code","invite.claimPlaceholder":"Friend's invite code","invite.claimSubmit":"Submit","invite.claimed":"Invite code applied","redeem.title":"Redemption code","redeem.desc":"Redeem points, membership or other rewards","redeem.placeholder":"Enter a code","redeem.submit":"Redeem","redeem.success":"Redeemed","redeem.successWith":"Redeemed: {what}","redeem.gotPoints":"{n} points","redeem.gotMembership":"membership","sec.methods.title":"Sign-in methods","sec.methods.desc":"Your phone and email can be used to sign in and reset your password","sec.bind":"Link","sec.change":"Change","sec.phone":"Phone number","sec.email":"Email address","sec.newPhone":"New phone number","sec.newEmail":"New email address","sec.phonePlaceholder":"Mainland China numbers as is; others with +country code","sec.emailPlaceholder":"name@example.com","sec.code":"Verification code","sec.codePlaceholder":"Enter the code","sec.sendCode":"Send code","sec.resendIn":"Resend in {s}s","sec.codeSent":"Code sent","sec.bindSubmit":"Link","sec.phoneBound":"Phone linked","sec.emailBound":"Email linked","sec.devices.title":"Signed-in devices","sec.devices.desc":"If you think someone else is using your account, sign out on every device","sec.logoutAll":"Sign out everywhere","sec.logoutAllDesc":"Including this computer: every device has to sign in again","sec.logoutAllConfirm":"Confirm sign out everywhere","sec.logoutAllDone":"Signed out everywhere","pw.title":"Password","pw.desc":"{min}\u2013{max} characters, with a lowercase letter, an uppercase letter and a special character, and no spaces","pw.change":"Change password","pw.modeLabel":"How to change it","pw.mode.current":"With current password","pw.mode.code":"With a verification code","pw.current":"Current password","pw.currentRequired":"Enter your current password","pw.new":"New password","pw.confirm":"Confirm new password","pw.mismatch":"The new passwords don't match","pw.submit":"Change password","pw.submitReset":"Set new password","pw.changed":"Password updated","pw.noPasswordYet":"This account doesn't have a password yet. Set one with a verification code instead.","pw.codeNeedsContact":"Link a phone or email first to set a password with a verification code.","pw.via":"Send the code to","pw.codeTo":"The code goes to {target}","pw.rulesLabel":"Password rules","pw.req.length":"{min}\u2013{max} characters","pw.req.lower":"A lowercase letter","pw.req.upper":"An uppercase letter","pw.req.special":"A special character","pw.req.space":"No spaces","pw.rule.format":"Invalid password","pw.rule.min":"Password must be at least 8 characters","pw.rule.max":"Password can't be longer than 64 characters","pw.rule.space":"Password can't contain spaces","pw.rule.lower":"Password needs a lowercase letter","pw.rule.upper":"Password needs an uppercase letter","pw.rule.special":"Password needs a special character","del.title":"Delete account","del.desc":"Permanently delete your account and all its data. This can't be undone","del.start":"Delete account","del.warn":"Deleting your account removes your account, points, membership, cloud storage and all other data for good.","del.methodLabel":"Verify with","del.byCode":"Verification code","del.byPassword":"Password","del.codeLabel":"Code sent to {target}","del.passwordLabel":"Account password","del.submit":"Delete account","del.confirm":"Delete permanently","del.done":"Account deleted","usage.overview.title":"Overview","usage.overview.desc":"Requests and AI quota used in the selected period","usage.range":"Time range","usage.days":"{n} days","usage.requests":"Requests","usage.successRate":"Success rate","usage.consumption":"AI quota used","usage.ofToday":"Of your daily limit","usage.unlimitedNote":"Your AI quota is unlimited, so usage isn't shown as a percentage.","usage.noLimitNote":"Your daily limit is 0 or unavailable right now, so usage isn't shown as a percentage.","usage.byModel.title":"By model","usage.byModel.desc":"Requests and quota used per model","usage.byApp.title":"By app","usage.byApp.desc":"Requests and quota used per app","usage.col.model":"Model","usage.col.app":"App","usage.col.requests":"Requests","usage.col.consumption":"Quota used","usage.empty":"No usage in this period","usage.appUnknown":"Other","usage.recent.title":"Recent usage","usage.recent.desc":"Each call as a share of your daily limit","usage.recentEmpty":"No usage yet","usage.failed":"Failed","usage.shown":"Showing {shown} of {total}","fb.list.title":"My feedback","fb.list.desc":"Issues and suggestions you've sent; replies show up here","fb.new":"New feedback","fb.empty":"No feedback yet","fb.untitled":"Untitled feedback","fb.unread":"New reply","fb.shown":"Showing {n}","fb.submitted":"Sent. We'll reply as soon as we can","fb.descLabel":"Describe the issue or suggestion","fb.descPlaceholder":"What happened, and what did you expect?","fb.imagesHint":"Attach up to {n} screenshots (5 MB each). You can paste or drop them here.","fb.addImages":"Add screenshots","fb.removeImage":"Remove this image","fb.submit":"Send","fb.back":"Back to list","fb.you":"You","fb.support":"Forsion team","fb.attachment":"Attachment","fb.imagePreview":"View image","fb.closedNote":"This ticket is closed and can't take replies. Send new feedback for a new issue.","fb.replyPlaceholder":"Reply\u2026","fb.replySend":"Send reply","fb.replySent":"Reply sent","fb.status.open":"Open","fb.status.in_progress":"In progress","fb.status.resolved":"Resolved","fb.status.closed":"Closed","err.accountGone":"This account is signed out. Sign in again","err.adminCannotDelete":"Admin accounts can't be deleted here","err.avatarInvalid":"Couldn't read this image. Try another one","err.avatarTooLarge":"This image is too large. Try a smaller one","err.backgroundUnavailable":"Background quota is unavailable right now","err.captcha":"You need to finish a verification check in your browser","err.codeCooldown":"Too many codes requested. Try again shortly","err.codeInvalid":"The code is wrong or has expired","err.codeRequired":"Enter the verification code","err.codeSendFailed":"Couldn't send the code. Try again later","err.currentPasswordWrong":"Your current password is incorrect","err.deleteTargetInvalid":"Codes can only go to the phone or email linked to your account","err.deleteVerifyFailed":"Verification failed, so your account wasn't deleted","err.emailInUse":"This email is already used by another account","err.emailInvalid":"Enter a valid email address","err.featureDisabled":"This feature is turned off for now","err.feedbackEmpty":"Describe the issue or suggestion first","err.feedbackTooLong":"The description is too long (10,000 characters max)","err.generic":"That didn't work. Try again later","err.imageRead":"Couldn't read the image","err.imageTooLarge":"Each image must be 5 MB or less","err.imageType":"Only images can be added","err.insufficientMainQuota":"Your AI quota is used up, so there's nothing to move","err.insufficientPoints":"Not enough points","err.priceChanged":"The reset card price just changed. Check the new price, then confirm the exchange again.","err.invalidCount":"Choose between 1 and 50 cards","err.invalidInviteCode":"This invite code is invalid or has expired","err.inviteAlreadyUsed":"You've already used an invite code","err.inviteEmpty":"Enter an invite code","err.inviteOwnCode":"You can't use your own invite code","err.inviteWindowExpired":"The 7-day window after sign-up has passed","err.loginCodeExpired":"The sign-in code expired. Sign in again","err.loginInProgress":"A sign-in is already in progress","err.loginTimeout":"Sign-in timed out. Try again","err.loginUnsupported":"This cloud doesn't support desktop sign-in","err.network":"Network error. Check your connection and try again","err.noCloudUrl":"Set the cloud address under Connection first","err.noResetCard":"You have no quota reset cards","err.openFailed":"Couldn't open the browser","err.passwordRequired":"Enter your current and new password","err.phoneInUse":"This phone number is already used by another account","err.phoneInvalid":"Enter a valid phone number (with +country code outside mainland China)","err.redeemEmpty":"Enter a code","err.redeemExpired":"This code has expired","err.redeemInactive":"This code is no longer active","err.redeemNotFound":"This code doesn't exist","err.redeemUsedUp":"This code has been used up","err.redeemUserLimit":"You've already redeemed this code","err.replyEmpty":"Write a reply first","err.replyTooLong":"The reply is too long (10,000 characters max)","err.server":"Server error ({status}). Try again later","err.session":"You've been signed out. Sign in again","err.signedOut":"Sign in to Forsion first","err.targetInvalid":"Enter a valid phone number or email","err.ticketNotFound":"This feedback doesn't exist or was deleted","err.tooFrequent":"Too many attempts. Try again shortly","err.tooManyImages":"You can add up to 5 images","err.unavailable":"This version of the desktop app can't do that yet. Update Forsion"},tn={zh:ao,en:io},we=t=>t==="en"?"en":"zh";function ut(t,e,n){let r=tn[t][e]??tn.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):r}var nn=t=>(e,n)=>ut(t,e,n),te=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var L=()=>typeof window<"u"&&window.tangu||{};function on(t){let e=typeof t?.status=="number"?t.status:0;if(e>=200&&e<300)return{ok:!0,status:e,data:t?.json??null};let n=t?.json&&typeof t.json=="object"?t.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,a=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:a,transport:typeof t?.error=="string"?t.error:null}}var dt=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function k(t,e={}){let n=L().cloudFetch;if(!n)return dt("no_bridge");try{return on(await n({path:t,...e}))}catch(r){return dt(String(r?.message||r))}}async function Ue(t,e){if(!t)return e();try{return on(await t())}catch(n){return dt(String(n?.message||n))}}var Oe=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function se(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function He(t){let e=L().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function $e(t){let e=L().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}function rn(t){return typeof t!="string"?{ok:!1,rule:"format"}:t.length<8?{ok:!1,rule:"min"}:t.length>64?{ok:!1,rule:"max"}:/\s/.test(t)?{ok:!1,rule:"space"}:/[a-z]/.test(t)?/[A-Z]/.test(t)?/[^A-Za-z0-9]/.test(t)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function an(t){return{length:t.length>=8&&t.length<=64,lower:/[a-z]/.test(t),upper:/[A-Z]/.test(t),special:/[^A-Za-z0-9]/.test(t),space:t.length>0&&!/\s/.test(t)}}var sn={\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E:"format","\u5BC6\u7801\u81F3\u5C11 8 \u4F4D":"min","\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D":"max",\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C:"space",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD:"lower",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD:"upper",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26:"special"};var cn={no_reset_card:"err.noResetCard",invalid_type:"err.generic",invalid_count:"err.invalidCount",insufficient_points:"err.insufficientPoints",price_changed:"err.priceChanged",insufficient_main_quota:"err.insufficientMainQuota",background_unavailable:"err.backgroundUnavailable",invalid_percent:"err.generic",invalid_request:"err.generic",invalid_invite_code:"err.invalidInviteCode",already_used:"err.inviteAlreadyUsed",window_expired:"err.inviteWindowExpired",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},ln={"Current password is incorrect":"err.currentPasswordWrong","Current and new password are required":"err.passwordRequired",\u9A8C\u8BC1\u7801\u65E0\u6548\u6216\u5DF2\u8FC7\u671F:"err.codeInvalid","Invalid or expired verification code":"err.codeInvalid",\u8D26\u53F7\u6216\u9A8C\u8BC1\u7801\u9519\u8BEF:"err.codeInvalid",\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801:"err.codeRequired","Email already in use":"err.emailInUse","Phone number already in use":"err.phoneInUse","Invalid email format":"err.emailInvalid","Email is required":"err.emailInvalid","Invalid phone number format":"err.phoneInvalid","Phone number is required":"err.phoneInvalid","Invalid phone number or email format":"err.targetInvalid","Please wait before requesting another code":"err.codeCooldown","Failed to send verification code":"err.codeSendFailed","Invalid target for account deletion":"err.deleteTargetInvalid","\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u6CE8\u9500\u8D26\u6237":"err.deleteVerifyFailed",\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500:"err.adminCannotDelete",\u79EF\u5206\u4F59\u989D\u4E0D\u8DB3:"err.insufficientPoints","\u5151\u6362\u5F20\u6570\u9700\u4E3A 1-50 \u7684\u6574\u6570":"err.invalidCount",\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361:"err.noResetCard","\u4E3B\u989D\u5EA6\u5DF2\u7528\u5B8C,\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6":"err.insufficientMainQuota",\u540E\u53F0\u989D\u5EA6\u6682\u4E0D\u53EF\u7528:"err.backgroundUnavailable",\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548:"err.invalidInviteCode","\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F":"err.inviteWindowExpired",\u4F60\u5DF2\u4F7F\u7528\u8FC7\u9080\u8BF7\u7801:"err.inviteAlreadyUsed","You have already used an invite code":"err.inviteAlreadyUsed","Cannot use your own invite code":"err.inviteOwnCode","Invite code is required":"err.inviteEmpty","code is required":"err.redeemEmpty","Redemption code not found":"err.redeemNotFound","Redemption code is not active":"err.redeemInactive","Redemption code has expired":"err.redeemExpired","Redemption code has reached maximum uses":"err.redeemUsedUp","You have already used this code the maximum number of times":"err.redeemUserLimit",avatar_too_large:"err.avatarTooLarge","description is required":"err.feedbackEmpty","description too long (max 10000 chars)":"err.feedbackTooLong","content is required":"err.replyEmpty","content too long (max 10000 chars)":"err.replyTooLong","Ticket not found":"err.ticketNotFound","Too many attachments (max 5)":"err.tooManyImages","Attachment type not allowed (image / json / text only)":"err.imageType","\u4EBA\u673A\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"err.captcha"},ft={format:"pw.rule.format",min:"pw.rule.min",max:"pw.rule.max",space:"pw.rule.space",lower:"pw.rule.lower",upper:"pw.rule.upper",special:"pw.rule.special"};function so(t){if(t.code&&cn[t.code])return cn[t.code];if(t.detail){if(ln[t.detail])return ln[t.detail];let e=sn[t.detail];if(e)return ft[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function K(t){let e=so(t);return e?{key:e}:Oe(t)?{key:"err.signedOut"}:t.status===0?{key:"err.network"}:t.status===401?{key:"err.session"}:t.status===429?{key:"err.tooFrequent"}:t.detail?{raw:t.detail}:t.status>=500?{key:"err.server",vars:{status:t.status}}:{key:"err.generic"}}function ke(t){let e=t.trim();return e?/cancelled\.?$/i.test(e)?null:e==="A sign-in is already in progress."?{key:"err.loginInProgress"}:e.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:e.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:e.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:e.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:e.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:e.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:e}:{key:"err.generic"}}var mt=Ht(null);function A(){let t=Gt(mt);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var ce=()=>A().t;function le(){let t=$(!0);return N(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var un={pending:!1,error:null,success:null,captcha:!1};function P(){let t=le(),[e,n]=v(un),r=$(!1),a=ie(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let c;try{c=await s()}catch(u){c={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:c?.error??null,success:c?.success??null,captcha:!!c?.captcha})},[]),i=ie(()=>{r.current||n(un)},[]);return{...e,run:a,clear:i}}var X=t=>({error:K(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function dn(){let[t,e]=v(0),n=$(null);N(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=ie((i=60)=>{n.current&&clearInterval(n.current),e(i),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),a=ie(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:a}}function Q(t){let[e,n]=v({state:"loading"}),r=$(0),a=$(t);a.current=t;let i=ie((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let m;try{m=await a.current()}catch(f){m={ok:!1,status:0,code:null,detail:null,transport:String(f?.message||f)}}d===r.current&&(m.ok?n({state:"ready",data:m.data,gen:d}):Oe(m)?n({state:"signedOut"}):(m.status===401&&L().authStatus?.().catch(()=>{}),n({state:"error",fail:m})))})()},[]);N(()=>{i();let u=L().onAuthChanged?.(()=>i());return()=>{r.current++,u?.()}},[i]);let s=ie(()=>i(),[i]),c=ie(()=>i(!0),[i]);switch(e.state){case"ready":{let u=e.gen,d=m=>n(f=>f.state==="ready"&&f.gen===u?{...f,data:m(f.data)}:f);return{state:"ready",data:e.data,reload:c,update:d}}case"error":return{state:"error",error:K(e.fail),retry:s};default:return e}}var fn=`
|
|
2
|
+
.fx-acct { color: var(--text); }
|
|
3
|
+
.fx-acct .fx-panel > .settings-panel-head:last-child { border-bottom-color: transparent; }
|
|
4
|
+
.fx-acct .fx-panel > .fx-block + .fx-block,
|
|
5
|
+
.fx-acct .fx-panel > .fx-sub + .fx-block { border-top: var(--border-width) solid var(--border); }
|
|
6
|
+
|
|
7
|
+
.fx-acct .fx-row-control { gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
8
|
+
.fx-acct .fx-row--wide .fx-row-control { flex: 0 1 460px; }
|
|
9
|
+
.fx-acct .fx-row-control > .fx-inline { flex: 1 1 auto; justify-content: flex-end; }
|
|
10
|
+
.fx-acct .fx-sub { padding: 12px 15px; }
|
|
11
|
+
.fx-acct .settings-control-row + .fx-sub,
|
|
12
|
+
.fx-acct .fx-sub--tight { padding-top: 0; }
|
|
13
|
+
.fx-acct .fx-sub > :first-child { margin-top: 0; }
|
|
14
|
+
|
|
15
|
+
.fx-acct .fx-muted { color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
16
|
+
.fx-acct .fx-value { color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); font-variant-numeric: tabular-nums; }
|
|
17
|
+
.fx-acct .fx-value.is-empty { color: var(--text-faint); }
|
|
18
|
+
.fx-acct .fx-big { color: var(--text); font-size: var(--ui-font-title); line-height: var(--ui-line-title); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
19
|
+
.fx-acct .fx-grow { flex: 1 1 auto; }
|
|
20
|
+
.fx-acct .fx-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
|
|
21
|
+
|
|
22
|
+
.fx-acct .fx-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: var(--accent-ink); font-size: inherit; line-height: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
|
|
23
|
+
.fx-acct .fx-link:disabled { opacity: 0.5; cursor: default; }
|
|
24
|
+
.fx-acct .fx-msg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
25
|
+
.fx-acct .fx-msg.is-error { color: var(--danger); }
|
|
26
|
+
.fx-acct .fx-msg.is-ok { color: var(--green); }
|
|
27
|
+
.fx-acct .fx-note { margin: 0; color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
28
|
+
.fx-acct .fx-note.is-warn { color: var(--warning); }
|
|
29
|
+
.fx-acct .fx-note.is-error { color: var(--danger); }
|
|
30
|
+
|
|
31
|
+
.fx-acct .fx-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border: var(--border-width) solid var(--overlay-strong); border-radius: var(--radius-pill); color: var(--text-muted); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 500; white-space: nowrap; vertical-align: middle; }
|
|
32
|
+
.fx-acct .fx-tag--accent { border-color: transparent; background: var(--accent-light); color: var(--accent-ink); }
|
|
33
|
+
.fx-acct .fx-tag--danger { margin-left: 6px; border-color: transparent; background: var(--danger-light); color: var(--danger); }
|
|
34
|
+
.fx-acct .fx-status--open,
|
|
35
|
+
.fx-acct .fx-status--in_progress { border-color: transparent; background: var(--accent-light); color: var(--accent-ink); }
|
|
36
|
+
.fx-acct .fx-status--resolved { border-color: var(--green); color: var(--green); }
|
|
37
|
+
|
|
38
|
+
.fx-acct .btn.fx-danger-solid,
|
|
39
|
+
.fx-acct .btn.fx-danger-solid:hover { border-color: var(--danger); background: var(--danger); color: var(--on-danger); }
|
|
40
|
+
.fx-acct .fx-panel--danger { border-color: var(--danger-light); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
|
|
41
|
+
.fx-acct .fx-panel--danger .settings-panel-icon { background: var(--danger-light); color: var(--danger); }
|
|
42
|
+
|
|
43
|
+
.fx-acct .fx-input { width: 100%; min-width: 0; font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
44
|
+
.fx-acct .fx-inline > .fx-input { flex: 1 1 160px; width: auto; }
|
|
45
|
+
.fx-acct .fx-input--name { max-width: 260px; }
|
|
46
|
+
.fx-acct .fx-input.fx-input--count { flex: 0 0 76px; width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
|
|
47
|
+
.fx-acct .fx-input.fx-input--code { flex: 0 1 180px; width: auto; }
|
|
48
|
+
.fx-acct .fx-textarea { resize: vertical; min-height: 64px; font-family: inherit; }
|
|
49
|
+
.fx-acct .fx-form { display: grid; gap: 12px; }
|
|
50
|
+
.fx-acct .fx-form > .fx-seg { justify-self: start; }
|
|
51
|
+
.fx-acct .fx-field { display: grid; gap: 5px; min-width: 0; }
|
|
52
|
+
.fx-acct .fx-field > span { color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
53
|
+
.fx-acct .fx-field > .fx-msg { margin-top: 0; }
|
|
54
|
+
.fx-acct .fx-cost { white-space: nowrap; }
|
|
55
|
+
.fx-acct .fx-code { padding: 3px 8px; border-radius: var(--radius-sm); background: var(--overlay-light); color: var(--text); font-family: var(--font-mono); font-size: var(--ui-font-body); line-height: var(--ui-line-body); letter-spacing: 0.06em; user-select: all; }
|
|
56
|
+
|
|
57
|
+
.fx-acct .fx-rules { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 0; padding: 0; list-style: none; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
|
|
58
|
+
.fx-acct .fx-rules li { display: inline-flex; align-items: center; gap: 5px; }
|
|
59
|
+
.fx-acct .fx-rules li.is-ok { color: var(--green); }
|
|
60
|
+
.fx-acct .fx-rules li.is-bad { color: var(--text-muted); }
|
|
61
|
+
.fx-acct .fx-rule-dot { width: 4px; height: 4px; margin: 0 3px; border-radius: 50%; background: currentColor; }
|
|
62
|
+
|
|
63
|
+
.fx-acct .fx-quota-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 28px; padding: 14px 15px 16px; }
|
|
64
|
+
.fx-acct .fx-quota-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
|
|
65
|
+
.fx-acct .fx-quota-label { color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
66
|
+
.fx-acct .fx-quota-value { color: var(--text); font-size: var(--ui-font-title); line-height: var(--ui-line-title); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
67
|
+
.fx-acct .fx-bar { height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--overlay-medium); }
|
|
68
|
+
.fx-acct .fx-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-ink); transition: width var(--duration-slow) var(--ease-out); }
|
|
69
|
+
.fx-acct .fx-quota.is-low .fx-bar > span { background: var(--warning); }
|
|
70
|
+
.fx-acct .fx-quota.is-low .fx-quota-value { color: var(--warning); }
|
|
71
|
+
.fx-acct .fx-quota-note { margin-top: 6px; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
|
|
72
|
+
.fx-acct .fx-ceremony { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; padding: 8px 11px; border-radius: var(--radius-sm); background: var(--accent-light); color: var(--text); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); font-variant-numeric: tabular-nums; }
|
|
73
|
+
.fx-acct .fx-ceremony b { color: var(--accent-ink); font-weight: 650; }
|
|
74
|
+
|
|
75
|
+
.fx-acct .fx-identity { display: flex; align-items: center; gap: 14px; padding: 14px 15px; }
|
|
76
|
+
.fx-acct .fx-avatar { position: relative; flex: 0 0 auto; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; padding: 0; border-radius: 50%; background: var(--accent-light); color: var(--accent-ink); cursor: pointer; }
|
|
77
|
+
.fx-acct .fx-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
78
|
+
.fx-acct .fx-avatar-initial { font-size: var(--ui-font-title); line-height: var(--ui-line-title); font-weight: 600; }
|
|
79
|
+
.fx-acct .fx-avatar-mask { position: absolute; inset: 0; display: grid; place-items: center; background: var(--overlay-scrim); color: #fff; opacity: 0; transition: opacity var(--duration-fast); }
|
|
80
|
+
.fx-acct .fx-avatar:hover .fx-avatar-mask,
|
|
81
|
+
.fx-acct .fx-avatar:focus-visible .fx-avatar-mask,
|
|
82
|
+
.fx-acct .fx-avatar:disabled .fx-avatar-mask { opacity: 1; }
|
|
83
|
+
.fx-acct .fx-avatar:focus-visible { outline: var(--focus-ring) solid var(--accent-ink); outline-offset: 2px; }
|
|
84
|
+
.fx-acct .fx-identity-main { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
|
|
85
|
+
.fx-acct .fx-identity-main > .fx-msg { margin-top: 4px; }
|
|
86
|
+
.fx-acct .fx-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
87
|
+
.fx-acct .fx-name { overflow: hidden; color: var(--text); font-size: var(--ui-font-title); line-height: var(--ui-line-title); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
|
|
88
|
+
.fx-acct .fx-icon-btn { flex: 0 0 auto; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-faint); }
|
|
89
|
+
.fx-acct .fx-icon-btn:hover { background: var(--overlay-light); color: var(--accent-ink); }
|
|
90
|
+
.fx-acct .fx-link-row { display: inline-flex; align-items: center; gap: 6px; margin-right: -6px; padding: 4px 6px; border-radius: var(--radius-sm); color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
91
|
+
.fx-acct .fx-link-row > svg { color: var(--text-faint); }
|
|
92
|
+
.fx-acct .fx-link-row:hover { background: var(--overlay-light); color: var(--accent-ink); }
|
|
93
|
+
.fx-acct .fx-link-row.is-empty { color: var(--text-faint); }
|
|
94
|
+
|
|
95
|
+
.fx-acct .fx-member { display: flex; align-items: center; gap: 12px; padding: 14px 15px; }
|
|
96
|
+
.fx-acct .fx-tier { flex: 0 0 auto; min-width: 52px; padding: 3px 10px; border: var(--border-width) solid var(--overlay-strong); border-radius: var(--radius-pill); color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); font-weight: 650; letter-spacing: 0.02em; text-align: center; }
|
|
97
|
+
.fx-acct .fx-tier--paid { border-color: transparent; background: var(--accent-light); color: var(--accent-ink); }
|
|
98
|
+
.fx-acct .fx-tier--pro { border-color: transparent; background: var(--action-fill); color: var(--on-action); }
|
|
99
|
+
.fx-acct .fx-member-copy { min-width: 0; display: grid; gap: 2px; }
|
|
100
|
+
.fx-acct .fx-member-copy strong { color: var(--text); font-size: var(--ui-font-heading); line-height: var(--ui-line-heading); font-weight: 600; }
|
|
101
|
+
|
|
102
|
+
.fx-acct .fx-list { display: flex; flex-direction: column; }
|
|
103
|
+
.fx-acct .fx-list-row { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 15px; color: var(--text); text-align: left; }
|
|
104
|
+
.fx-acct .fx-list-row + .fx-list-row { border-top: var(--border-width) solid var(--border); }
|
|
105
|
+
.fx-acct .fx-list-row--button { cursor: pointer; transition: background var(--duration-fast); }
|
|
106
|
+
.fx-acct .fx-list-row--button:hover { background: var(--overlay-light); }
|
|
107
|
+
.fx-acct .fx-list-row--button > svg { flex: 0 0 auto; color: var(--text-faint); }
|
|
108
|
+
.fx-acct .fx-list-icon { flex: 0 0 auto; display: inline-flex; color: var(--text-muted); }
|
|
109
|
+
.fx-acct .fx-list-main { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
|
|
110
|
+
.fx-acct .fx-list-main strong { display: block; overflow: hidden; color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
|
|
111
|
+
.fx-acct .fx-list-main small { display: block; overflow: hidden; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); text-overflow: ellipsis; white-space: nowrap; }
|
|
112
|
+
.fx-acct .fx-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
|
|
113
|
+
.fx-acct .fx-dot.is-on { background: var(--accent-ink); }
|
|
114
|
+
.fx-acct .fx-footer { flex-wrap: wrap; }
|
|
115
|
+
.fx-acct .fx-footer > .fx-muted { margin-right: auto; }
|
|
116
|
+
.fx-acct .fx-page-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 2px 4px 8px; color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
117
|
+
.fx-acct .fx-page-foot > .fx-msg { flex-basis: 100%; margin-top: 0; }
|
|
118
|
+
|
|
119
|
+
.fx-acct .fx-signin-body { min-height: 260px; }
|
|
120
|
+
.fx-acct .fx-signin-lead { max-width: 44ch; margin: 0; color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
121
|
+
.fx-acct .fx-device { max-width: 540px; display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 12px; border-radius: var(--radius-md); background: var(--overlay-subtle); text-align: left; }
|
|
122
|
+
.fx-acct .fx-sub > .fx-device { margin-top: 0; }
|
|
123
|
+
.fx-acct .fx-qr { flex: 0 0 auto; border-radius: var(--radius-sm); background: #fff; }
|
|
124
|
+
.fx-acct .fx-device-copy { min-width: 0; display: grid; gap: 8px; }
|
|
125
|
+
.fx-acct .fx-device-copy > p { max-width: none; margin: 0; color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
126
|
+
.fx-acct .fx-device-code { display: flex; align-items: baseline; gap: 8px; color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
127
|
+
.fx-acct .fx-device-code code { color: var(--text); font-family: var(--font-mono); font-size: var(--ui-font-title); line-height: var(--ui-line-title); letter-spacing: 0.12em; user-select: all; }
|
|
128
|
+
|
|
129
|
+
.fx-acct .fx-skel { display: block; border-radius: var(--radius-sm); background: var(--overlay-medium); animation: fx-acct-pulse 1.4s ease-in-out infinite; }
|
|
130
|
+
.fx-acct .fx-skel--icon { flex: 0 0 auto; width: 30px; height: 30px; }
|
|
131
|
+
.fx-acct .fx-skel--title { width: 120px; height: 12px; margin-bottom: 7px; }
|
|
132
|
+
.fx-acct .fx-skel--line { width: 220px; max-width: 70%; height: 9px; }
|
|
133
|
+
.fx-acct .fx-skel--row { width: 100%; height: 12px; }
|
|
134
|
+
.fx-acct .fx-skel--row + .fx-skel--row { margin-top: 10px; }
|
|
135
|
+
.fx-acct .fx-skel--stat { width: 64px; height: 20px; margin: 4px 0; }
|
|
136
|
+
@keyframes fx-acct-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
|
|
137
|
+
|
|
138
|
+
.fx-acct .fx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); transition: opacity var(--duration-fast); }
|
|
139
|
+
.fx-acct .fx-stats.is-refreshing { opacity: 0.55; }
|
|
140
|
+
.fx-acct .fx-stat { min-width: 0; display: grid; align-content: start; gap: 2px; padding: 14px 15px; }
|
|
141
|
+
.fx-acct .fx-stat + .fx-stat { border-left: var(--border-width) solid var(--border); }
|
|
142
|
+
.fx-acct .fx-stat-label { color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
143
|
+
.fx-acct .fx-stat-value { color: var(--text); font-size: var(--ui-font-display); line-height: var(--ui-line-display); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
144
|
+
.fx-acct .fx-stat-sub { color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
|
|
145
|
+
.fx-acct .fx-table-wrap { overflow-x: auto; }
|
|
146
|
+
.fx-acct .fx-table { width: 100%; border-collapse: collapse; font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
147
|
+
.fx-acct .fx-table th { padding: 8px 15px; border-bottom: var(--border-width) solid var(--border); color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); font-weight: 500; text-align: left; }
|
|
148
|
+
.fx-acct .fx-table td { padding: 8px 15px; border-bottom: var(--border-width) solid var(--border); color: var(--text); overflow-wrap: anywhere; }
|
|
149
|
+
.fx-acct .fx-table tr:last-child td { border-bottom-color: transparent; }
|
|
150
|
+
.fx-acct .fx-table .is-num { width: 1%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
151
|
+
|
|
152
|
+
.fx-acct .fx-composer { border-bottom: var(--border-width) solid var(--border); transition: background var(--duration-fast); }
|
|
153
|
+
.fx-acct .fx-composer.is-drag { background: var(--accent-light); }
|
|
154
|
+
.fx-acct .fx-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
155
|
+
.fx-acct .fx-thumb { position: relative; flex: 0 0 auto; width: 72px; height: 72px; overflow: hidden; padding: 0; border: var(--border-width) solid var(--overlay-medium); border-radius: var(--radius-sm); background: var(--overlay-subtle); }
|
|
156
|
+
.fx-acct .fx-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
157
|
+
.fx-acct button.fx-thumb { cursor: zoom-in; }
|
|
158
|
+
.fx-acct .fx-thumb > button { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--overlay-scrim); color: #fff; }
|
|
159
|
+
.fx-acct .fx-back { margin-bottom: 10px; }
|
|
160
|
+
.fx-acct .fx-thread { display: flex; flex-direction: column; gap: 10px; padding: 14px 15px; }
|
|
161
|
+
.fx-acct .fx-bubble { max-width: 86%; padding: 9px 12px; border-radius: var(--radius-md); background: var(--overlay-light); }
|
|
162
|
+
.fx-acct .fx-bubble--user { align-self: flex-end; }
|
|
163
|
+
.fx-acct .fx-bubble--admin { align-self: flex-start; background: var(--accent-light); }
|
|
164
|
+
.fx-acct .fx-bubble-meta { margin-bottom: 4px; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
|
|
165
|
+
.fx-acct .fx-bubble-text { color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
166
|
+
.fx-acct .fx-bubble .fx-thumbs { margin-top: 8px; }
|
|
167
|
+
.fx-acct .fx-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: var(--overlay-scrim); cursor: zoom-out; }
|
|
168
|
+
.fx-acct .fx-lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-md); }
|
|
169
|
+
|
|
170
|
+
@media (max-width: 560px) {
|
|
171
|
+
.fx-acct .fx-stats { grid-template-columns: minmax(0, 1fr); }
|
|
172
|
+
.fx-acct .fx-stat + .fx-stat { border-left-color: transparent; border-top: var(--border-width) solid var(--border); }
|
|
173
|
+
.fx-acct .fx-device { flex-direction: column; align-items: flex-start; }
|
|
174
|
+
}
|
|
175
|
+
@media (prefers-reduced-motion: reduce) {
|
|
176
|
+
.fx-acct .fx-skel { animation: none; }
|
|
177
|
+
.fx-acct .fx-bar > span { transition: none; }
|
|
178
|
+
}
|
|
179
|
+
`;function Xe(t){let e=String(t||"").trim();if(!e)return"";let n=e.startsWith("+")?4:3;return e.length<=n+4?`${e.slice(0,2)}***`:`${e.slice(0,n)}****${e.slice(-4)}`}function We(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let r=e.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${e.slice(n)}`}function mn(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var co=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pn(t,e){let n=String(t||"").trim(),r,a,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)r=Number(i[2]),a=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let c=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(c.find(u=>u.type==="month")?.value),a=Number(c.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:e==="zh"?`${r}\u6708${a}\u65E5`:`${co[r-1]} ${a}`}var pt=t=>t==="zh"?"zh-CN":"en-US";function gn(t){if(t==null||t==="")return null;let e=new Date(typeof t=="string"&&/^\d+$/.test(t)?Number(t):t);return Number.isNaN(e.getTime())?null:e}function hn(t,e){let n=gn(t);return n?new Intl.DateTimeFormat(pt(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function xe(t,e){let n=gn(t);return n?new Intl.DateTimeFormat(pt(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function W(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(pt(e),{maximumFractionDigits:2}).format(n):"\u2014"}var fe=class extends Error{};async function bn(t,e=256){if(t.size>20971520)throw new fe;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((m,f)=>{r.onload=()=>m(),r.onerror=()=>f(new Error("image decode failed")),r.src=n});let a=r.naturalWidth,i=r.naturalHeight;if(!a||!i)throw new Error("empty image");if(a*i>5e7)throw new fe;let s=Math.min(1,e/Math.max(a,i)),c=document.createElement("canvas");c.width=Math.max(1,Math.round(a*s)),c.height=Math.max(1,Math.round(i*s));let u=c.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height),u.drawImage(r,0,0,c.width,c.height);let d=c.toDataURL("image/jpeg",.85);if(d.length>262144)throw new fe;return d}finally{URL.revokeObjectURL(n)}}function vn(t){let e=String(t||"").trim();if(!e)return"?";let n=Array.from(e)[0];return/[㐀-鿿]/.test(n)?n:Array.from(e).slice(0,2).join("").toUpperCase()}var lo=0;function o(t,e,n,r,a,i){e||(e={});var s,c,u=e;if("ref"in u)for(c in u={},e)c=="ref"?s=e[c]:u[c]=e[c];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--lo,__i:-1,__u:0,__source:a,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(c in s)u[c]===void 0&&(u[c]=s[c]);return T.vnode&&T.vnode(d),d}var uo={user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 20c.8-3.5 4-5.5 8-5.5s7.2 2 8 5.5",gauge:"M4 16a8 8 0 1 1 16 0 M12 16l4-5 M12 16h.01",shield:"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3Z",chart:"M4 20V10 M10 20V4 M16 20v-7 M21 20H3",message:"M5 4h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-7l-5 4v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",card:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z M3 10h18 M7 15h4",coins:"M9 11a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z M15.5 9.2A5 5 0 1 1 9.8 16",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M12 7v5l3 2",gift:"M4 11h16v9H4z M3 7h18v4H3z M12 7v13 M12 7c-1.5-3-5-3-5-1s3 1 5 1c2 0 5 1 5-1s-3.5-2-5 1",key:"M8 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M11 11h10 M17 11v3 M20 11v2",laptop:"M5 5h14v10H5z M3 19h18",alert:"M12 4l9 16H3l9-16Z M12 10v4 M12 17h.01",external:"M14 4h6v6 M20 4l-9 9 M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",copy:"M9 9h11v11H9z M5 15H4V4h11v1",check:"M5 12.5l4.5 4.5L19 7.5",chevron:"M9 6l6 6-6 6",back:"M15 6l-6 6 6 6",pencil:"M4 20h4L19 9l-4-4L4 16v4Z M13.5 6.5l4 4",plus:"M12 5v14 M5 12h14",refresh:"M20 11a8 8 0 0 0-14.3-4.9L4 8 M4 4v4h4 M4 13a8 8 0 0 0 14.3 4.9L20 16 M20 20v-4h-4",phone:"M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M11 18h2",mail:"M4 6h16v12H4z M4 7l8 6 8-6",image:"M4 5h16v14H4z M4 16l5-5 4 4 3-3 4 4 M15.5 9.5h.01",x:"M6 6l12 12 M18 6L6 18",logout:"M15 4h4v16h-4 M10 8l-4 4 4 4 M6 12h10"};function I({name:t,size:e=14,class:n}){return o("svg",{class:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:uo[t]})})}function Ce({size:t=12}){return o("svg",{class:"spin",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var me=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(me||{}),fo=[0,1],yn=[1,0],_n=[2,3],wn=[3,2],mo={L:fo,M:yn,Q:_n,H:wn},po=/^\d*$/,go=/^[A-Z0-9 $%*+./:-]*$/,gt="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",xt=1,yt=40,xn=3,ho=3,Ve=40,bo=10,kn=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Cn=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],ht=class{constructor(e,n,r,a){if(this.version=e,this.ecc=n,e<xt||e>yt)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let c=0;c<this.size;c++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a===-1){let c=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<c&&(a=u,c=d),this.applyMask(u)}}this.mask=a,this.applyMask(a),this.drawFormatBits(a)}size;mask;modules=[];types=[];getModule(e,n){return e>=0&&e<this.size&&n>=0&&n<this.size&&this.modules[n][e]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,me.Timing),this.setFunctionModule(r,6,r%2===0,me.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),n=e.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let i=0;i<10;i++)r=r<<1^(r>>>9)*1335;let a=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,ne(a,i));this.setFunctionModule(8,7,ne(a,6)),this.setFunctionModule(8,8,ne(a,7)),this.setFunctionModule(7,8,ne(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,ne(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,ne(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,ne(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let r=0;r<18;r++){let a=ne(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,a),this.setFunctionModule(s,i,a)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let i=Math.max(Math.abs(a),Math.abs(r)),s=e+a,c=n+r;s>=0&&s<this.size&&c>=0&&c<this.size&&this.setFunctionModule(s,c,i!==2&&i!==4,me.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,n+r,Math.max(Math.abs(a),Math.abs(r))!==1,me.Alignment)}setFunctionModule(e,n,r,a=me.Function){this.modules[n][e]=r,this.types[n][e]=a}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Je(n,r))throw new RangeError("Invalid argument");let a=Cn[r[0]][n],i=kn[r[0]][n],s=Math.floor(bt(n)/8),c=a-s%a,u=Math.floor(s/a),d=[],m=Ao(i);for(let l=0,g=0;l<a;l++){let h=e.slice(g,g+u-i+(l<c?0:1));g+=h.length;let x=Po(h,m);l<c&&h.push(0),d.push(h.concat(x))}let f=[];for(let l=0;l<d[0].length;l++)d.forEach((g,h)=>{(l!==u-i||h>=c)&&f.push(g[l])});return f}drawCodewords(e){if(e.length!==Math.floor(bt(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let a=0;a<this.size;a++)for(let i=0;i<2;i++){let s=r-i,u=(r+1&2)===0?this.size-1-a:a;!this.types[u][s]&&n<e.length*8&&(this.modules[u][s]=ne(e[n>>>3],7-(n&7)),n++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+n)%2===0;break;case 1:a=n%2===0;break;case 2:a=r%3===0;break;case 3:a=(r+n)%3===0;break;case 4:a=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:a=r*n%2+r*n%3===0;break;case 6:a=(r*n%2+r*n%3)%2===0;break;case 7:a=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&a&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let i=0;i<this.size;i++){let s=!1,c=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(c++,c===5?e+=xn:c>5&&e++):(this.finderPenaltyAddHistory(c,u),s||(e+=this.finderPenaltyCountPatterns(u)*Ve),s=this.modules[i][d],c=1);e+=this.finderPenaltyTerminateAndCount(s,c,u)*Ve}for(let i=0;i<this.size;i++){let s=!1,c=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(c++,c===5?e+=xn:c>5&&e++):(this.finderPenaltyAddHistory(c,u),s||(e+=this.finderPenaltyCountPatterns(u)*Ve),s=this.modules[d][i],c=1);e+=this.finderPenaltyTerminateAndCount(s,c,u)*Ve}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let c=this.modules[i][s];c===this.modules[i][s+1]&&c===this.modules[i+1][s]&&c===this.modules[i+1][s+1]&&(e+=ho)}let n=0;for(let i of this.modules)n=i.reduce((s,c)=>s+(c?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=a*bo,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let a=this.size-7;r.length<e;a-=n)r.splice(1,0,a);return r}}finderPenaltyCountPatterns(e){let n=e[1],r=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(r&&e[0]>=n*4&&e[6]>=n?1:0)+(r&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,r){return e&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function oe(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)n.push(t>>>r&1)}function ne(t,e){return(t>>>e&1)!==0}var Se=class{constructor(e,n,r){if(this.mode=e,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},vo=[1,10,12,14],xo=[2,9,11,13],yo=[4,8,16,16];function Sn(t,e){return t[Math.floor((e+7)/17)+1]}function An(t){let e=[];for(let n of t)oe(n,8,e);return new Se(yo,t.length,e)}function _o(t){if(!Pn(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let r=Math.min(t.length-n,3);oe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Se(vo,t.length,e)}function wo(t){if(!Mn(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let r=gt.indexOf(t.charAt(n))*45;r+=gt.indexOf(t.charAt(n+1)),oe(r,11,e)}return n<t.length&&oe(gt.indexOf(t.charAt(n)),6,e),new Se(xo,t.length,e)}function ko(t){return t===""?[]:Pn(t)?[_o(t)]:Mn(t)?[wo(t)]:[An(So(t))]}function Pn(t){return po.test(t)}function Mn(t){return go.test(t)}function Co(t,e){let n=0;for(let r of t){let a=Sn(r.mode,e);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function So(t){t=encodeURI(t);let e=[];for(let n=0;n<t.length;n++)t.charAt(n)!=="%"?e.push(t.charCodeAt(n)):(e.push(Number.parseInt(t.substring(n+1,n+3),16)),n+=2);return e}function bt(t){if(t<xt||t>yt)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;e-=(25*n-10)*n-55,t>=7&&(e-=36)}return e}function Je(t,e){return Math.floor(bt(t)/8)-kn[e[0]][t]*Cn[e[0]][t]}function Ao(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let r=0;r<t-1;r++)e.push(0);e.push(1);let n=1;for(let r=0;r<t;r++){for(let a=0;a<e.length;a++)e[a]=vt(e[a],n),a+1<e.length&&(e[a]^=e[a+1]);n=vt(n,2)}return e}function Po(t,e){let n=e.map(r=>0);for(let r of t){let a=r^n.shift();n.push(0),e.forEach((i,s)=>n[s]^=vt(i,a))}return n}function vt(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(e>>>r&1)*t;return n}function Mo(t,e,n=1,r=40,a=-1,i=!0){if(!(xt<=n&&n<=r&&r<=yt)||a<-1||a>7)throw new RangeError("Invalid value");let s,c;for(s=n;;s++){let f=Je(s,e)*8,l=Co(t,s);if(l<=f){c=l;break}if(s>=r)throw new RangeError("Data too long")}for(let f of[yn,_n,wn])i&&c<=Je(s,f)*8&&(e=f);let u=[];for(let f of t){oe(f.mode[0],4,u),oe(f.numChars,Sn(f.mode,s),u);for(let l of f.getData())u.push(l)}let d=Je(s,e)*8;oe(0,Math.min(4,d-u.length),u),oe(0,(8-u.length%8)%8,u);for(let f=236;u.length<d;f^=253)oe(f,8,u);let m=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((f,l)=>m[l>>>3]|=f<<7-(l&7)),new ht(s,e,m,a)}function En(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:c=1}=e||{},u=typeof t=="string"?ko(t):Array.isArray(t)?[An(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Mo(u,mo[n],a,i,s,r),m=Eo({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},c);return e?.invert&&(m.data=m.data.map(f=>f.map(l=>!l))),e?.onEncoded?.(m),m}function Eo(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(i=>{for(let s=0;s<e;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<e;i++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let a=me.Border;t.types.forEach(i=>{for(let s=0;s<e;s++)i.unshift(a),i.push(a)});for(let i=0;i<e;i++)t.types.unshift(Array.from({length:r},s=>a)),t.types.push(Array.from({length:r},s=>a));return t}function B(t){return o("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[o("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&o("span",{class:"settings-panel-icon",children:o(I,{name:t.icon,size:16})}),o("div",{children:[o("strong",{children:t.title}),t.desc&&o("p",{children:t.desc})]}),t.actions&&o("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function V(t){return o("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[o("div",{class:"settings-control-copy",children:o("span",{children:[o("strong",{children:t.label}),t.desc&&o("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&o("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function U(t){return o("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function _t(t){return o("button",{type:"button",role:"switch","aria-checked":t.checked,"aria-label":t.label,class:`settings-switch${t.checked?" active":""}`,disabled:t.disabled,onClick:()=>t.onChange(!t.checked),children:o("span",{})})}function S(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return o("button",{type:t.submit?"submit":"button",class:n,disabled:t.disabled||t.pending,"aria-busy":t.pending||void 0,"aria-label":t.label,title:t.title,"data-armed":t.armed?"true":void 0,onClick:t.onClick,children:[t.pending&&o(Ce,{}),t.children]})}var To=5e3;function pe(t){let[e,n]=v(!1),r=$(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};N(()=>()=>{r.current&&clearTimeout(r.current)},[]),N(()=>{(t.pending||t.disabled)&&a()},[t.pending,t.disabled]);let i=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},To);return}a(),t.onConfirm()},s=t.variant??"ghost";return o(S,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:i,children:e?t.confirmLabel:t.label})}function M(t){let e=ce(),{a:n}=t;return n.error?o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(n.error,e)}),n.captcha&&o("button",{type:"button",class:"fx-link",onClick:()=>void $e(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",o(I,{name:"external",size:12})]})]}):n.success?o("div",{class:"fx-msg is-ok",role:"status",children:te(n.success,e)}):null}function J(t){return o("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function ue(t){return o("div",{class:"settings-empty-row fx-block",children:t.children})}function Ae(t){let e=ce(),n=t.display;return o("div",{class:`fx-quota${n.low?" is-low":""}`,children:[o("div",{class:"fx-quota-top",children:[o("span",{class:"fx-quota-label",children:t.label}),o("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),o("div",{class:"fx-bar",role:"progressbar","aria-label":t.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?e("common.unlimited"):n.text,children:o("span",{style:{width:`${n.pct}%`}})}),t.note&&o("div",{class:"fx-quota-note",children:t.note})]})}function ge(t){return o("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>o("button",{type:"button",role:"radio","aria-checked":e.value===t.value,class:e.value===t.value?"active":"",onClick:()=>{e.value!==t.value&&t.onChange(e.value)},children:e.label}))})}async function Io(t){try{return await navigator.clipboard.writeText(t),!0}catch{try{let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");return e.remove(),n}catch{return!1}}}function Ke(t){let e=ce(),[n,r]=v("idle"),a=$(null);N(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await Io(t.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return o(S,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[o(I,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function Ro(t){let e=ve(()=>{try{return En(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((a,i)=>a.forEach((s,c)=>{s&&(n+=`M${c} ${i}h1v1h-1z`)}));let r=t.size??148;return o("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[o("rect",{width:e.size,height:e.size,fill:"#fff"}),o("path",{d:n,fill:"#000"})]})}function wt(t){let e=ce(),{device:n}=t;return o("div",{class:"fx-device",children:[o(Ro,{value:n.url,label:e("signin.qrLabel")}),o("div",{class:"fx-device-copy",children:[o("p",{children:e("signin.deviceHint")}),n.userCode&&o("div",{class:"fx-device-code",children:[o("span",{children:e("signin.code")}),o("code",{children:n.userCode})]}),o("div",{class:"fx-inline",children:[o("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",o(I,{name:"external",size:12})]}),o(Ke,{text:n.url,label:e("signin.copyLink")})]})]})]})}function G(){let t=ce(),e=P(),[n,r]=v(null);N(()=>L().onAuthDevice?.(i=>r(i)),[]);let a=()=>void e.run(async()=>{let i=L().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let c=ke(se(s));return c?{error:c}:void 0}});return o("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:o("div",{class:"settings-state fx-signin-body",children:[o("span",{class:"settings-state-icon",children:o(I,{name:"user",size:18})}),o("p",{class:"fx-signin-lead",children:t("signin.desc")}),o("div",{class:"settings-state-actions",children:o(S,{variant:"primary",pending:e.pending,onClick:a,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&o(wt,{device:n}),o(M,{a:e})]})})}function j(t){let e=ce(),n=t.panels??2,r=t.rows??2;return o("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(a,i)=>o("section",{class:"settings-panel fx-panel",children:[o("div",{class:"settings-panel-head",children:[o("span",{class:"fx-skel fx-skel--icon"}),o("div",{children:[o("span",{class:"fx-skel fx-skel--title"}),o("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,c)=>o("div",{class:"settings-control-row",children:o("span",{class:"fx-skel fx-skel--row"})},c))]},i))})}function Y(t){let e=ce();return o("section",{class:"settings-panel fx-panel",children:o("div",{class:"settings-state fx-error-state",role:"alert",children:[o("span",{class:"settings-state-icon",children:o(I,{name:"alert",size:18})}),o("strong",{children:e("common.loadFailed")}),o("p",{children:te(t.error,e)}),o("div",{class:"settings-state-actions",children:o(S,{variant:"primary",onClick:t.onRetry,children:[o(I,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}function In(){let t=Q(async()=>{let[n,r,a]=await Promise.all([k("/auth/me"),k("/membership/my"),k("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:r.ok?r.data?.membership??null:null,membershipFailed:!r.ok,features:a.ok&&a.data&&typeof a.data=="object"?a.data:{}}}:n});if(t.state==="loading")return o(j,{panels:3});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let{data:e}=t;return o(R,{children:[o(Lo,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),o(Do,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),o(Fo,{}),o(No,{})]})}function Lo(t){let{t:e}=A(),{me:n}=t,r=P(),a=P(),[i,s]=v(!1),[c,u]=v(""),d=$(null),m=n.nickname||n.username,f=h=>{h&&r.run(async()=>{let x;try{x=await bn(h)}catch(_){return{error:{key:_ instanceof fe?"err.avatarTooLarge":"err.avatarInvalid"}}}let w=await k("/settings",{method:"PUT",body:{avatar:x}});return w.ok?(t.onPatch({avatar:x}),{success:{key:"account.avatar.saved"}}):{error:K(w)}})},l=()=>{a.clear(),u(m||""),s(!0)},g=()=>{let h=c.trim();if(!h||h===m){s(!1);return}a.run(async()=>{let x=await k("/settings",{method:"PUT",body:{nickname:h}});return x.ok?(t.onPatch({nickname:h}),s(!1),{success:{key:"account.nickname.saved"}}):{error:K(x)}})};return o(B,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[o("div",{class:"fx-identity fx-block",children:[o("button",{type:"button",class:"fx-avatar",disabled:r.pending,onClick:()=>d.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?o("img",{src:n.avatar,alt:""}):o("span",{class:"fx-avatar-initial",children:vn(m)}),o("span",{class:"fx-avatar-mask",children:r.pending?o(Ce,{size:14}):o(I,{name:"pencil",size:14})})]}),o("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:h=>{let x=h.currentTarget;f(x.files?.[0]),x.value=""}}),o("div",{class:"fx-identity-main",children:[i?o("form",{class:"fx-inline",onSubmit:h=>{h.preventDefault(),g()},children:[o("input",{class:"fx-input fx-input--name",value:c,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:h=>u(h.currentTarget.value),onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),s(!1))}}),o(S,{variant:"primary",submit:!0,pending:a.pending,children:e("common.save")}),o(S,{disabled:a.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):o("div",{class:"fx-name-row",children:[o("span",{class:"fx-name",children:m}),o("button",{type:"button",class:"fx-icon-btn",onClick:l,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:o(I,{name:"pencil",size:13})}),n.role==="ADMIN"&&o("span",{class:"fx-tag",children:e("account.role.admin")})]}),o("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),o(M,{a}),o(M,{a:r})]})]}),o(Tn,{kind:"phone",value:n.phone}),o(Tn,{kind:"email",value:n.email})]})}function Tn(t){let{t:e,goTo:n}=A(),r=!!t.value,a=r?t.kind==="phone"?Xe(t.value):We(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return o(V,{label:i,children:n?o("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[o("span",{children:a}),o(I,{name:"chevron",size:12})]}):o("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function Do(t){let{t:e,locale:n}=A(),r=P(),a=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=mn(a?.tier),s=i==="Free",c=s?"free":i.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await He("membership")?void 0:{error:{key:"err.openFailed"}});return o(B,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?o(S,{variant:"primary",pending:r.pending,onClick:u,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&o("div",{class:"fx-member fx-block",children:[o("span",{class:`fx-tier fx-tier--${c}`,children:i}),o("div",{class:"fx-member-copy",children:[o("strong",{children:s?e("member.freeName"):a?.plan?.name||i}),o("span",{class:"fx-muted",children:s?e("member.freeHint"):a?.expiresAt?e("member.expires",{date:hn(a.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&o("div",{class:"fx-sub",children:o(J,{tone:"warn",children:[e("member.loadFailed")," ",o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(M,{a:r})})]})}function Fo(){let{t}=A(),e=le(),[n,r]=v(null),[a,i]=v(!1),[s,c]=v(null),[u,d]=v(null),m=P(),f=P(),l=P(),g=!!L().authAccounts;N(()=>{let p=0,b=()=>{let E=L().authAccounts;if(!E)return;let F=++p;i(!1),E().then(O=>{F===p&&r(Array.isArray(O)?O:[])}).catch(()=>{F===p&&i(!0)})};b();let y=L().onAuthChanged?.(b),C=L().onAuthDevice?.(E=>d(E));return()=>{p++,y?.(),C?.()}},[]);let h=p=>{c(p),m.run(async()=>{let b=L().forsionSwitchAccount;if(!b)return{error:{key:"err.unavailable"}};try{await b(p)}catch(y){let C=ke(se(y));return C?{error:C}:void 0}finally{e.current&&c(null)}})},x=()=>void f.run(async()=>{let p=L().forsionLogin;if(!p)return{error:{key:"err.unavailable"}};d(null);try{await p()}catch(b){e.current&&d(null);let y=ke(se(b));return y?{error:y}:void 0}}),w=()=>void l.run(async()=>{let p=L().forsionLogout;if(!p)return{error:{key:"err.unavailable"}};try{await p()}catch(b){return{error:{raw:se(b)||t("err.generic")}}}}),_=m.pending||f.pending||l.pending;return o(B,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!a&&o(ue,{children:[o(Ce,{})," ",t("common.loading")]}),a&&o("div",{class:"fx-sub",children:o(J,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&o(ue,{children:t("local.empty")}),n&&n.length>0&&o("div",{class:"fx-list fx-block",role:"list",children:n.map(p=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-icon",children:o(I,{name:"user",size:14})}),o("span",{class:"fx-list-main",children:[o("strong",{children:p.nickname||p.username||"Forsion"}),o("small",{children:[p.username&&p.nickname?p.username:null,qo(p.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),p.active?o("span",{class:"fx-tag fx-tag--accent",children:[o(I,{name:"check",size:11})," ",t("local.current")]}):o(S,{pending:s===p.id,disabled:_&&s!==p.id,onClick:()=>h(p.id),children:t("local.switch")})]},p.id))}),f.pending&&u&&o("div",{class:"fx-sub",children:o(wt,{device:u})}),o("div",{class:"settings-panel-footer fx-footer",children:[o(S,{pending:f.pending,disabled:_&&!f.pending,onClick:x,children:[o(I,{name:"plus",size:12})," ",f.pending?t("signin.pending"):t("local.add")]}),o(S,{pending:l.pending,disabled:_&&!l.pending,onClick:w,children:[o(I,{name:"logout",size:12})," ",t("local.signOut")]})]}),(m.error||f.error||l.error)&&o("div",{class:"fx-sub fx-sub--tight",children:[o(M,{a:m}),o(M,{a:f}),o(M,{a:l})]})]})}function qo(t){try{return new URL(t).host}catch{return t}}function No(){let{t}=A(),e=P();return o("div",{class:"fx-page-foot",children:[o("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await $e()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",o(I,{name:"external",size:12})]}),o("span",{class:"fx-muted",children:t("account.web.desc")}),o(M,{a:e})]})}function D(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function Bo(t,e){let n=D(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,D(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var zo=15;function he(t,e){let n=Bo(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,D(t)??0),a=n===0&&r>0&&(D(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=zo}}function je(t,e){let n=D(e);if(n===null||n<=0)return null;let r=D(t);if(r===null)return null;let a=Math.max(0,r);if(a===0)return"0%";let i=a/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var Uo=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Rn(){let t=Q(async()=>{let[s,c,u,d]=await Promise.all([k("/token-quota/my"),k("/credits/balance"),k("/features"),k("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:c.ok?D(c.data?.balance):null,balanceFailed:!c.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:Uo(d)}}:s});if(t.state==="loading")return o(j,{panels:3,rows:2});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,a=e.features.redemption_codes!==!1,i=e.features.payment!==!1;return o(R,{children:[o(Oo,{data:e,update:n,onFailed:t.reload}),o(Ho,{data:e,update:n,payment:i,onRetry:t.reload}),r?.modelId?o(Xo,{bg:r,update:n}):null,(e.inviteState!=="hidden"||a)&&o(Wo,{data:e,update:n,redeemEnabled:a,onRedeemed:t.reload})]})}function Oo(t){let{t:e,locale:n}=A(),r=t.data.quota,a=he(r.dailyRemaining,r.dailyLimit),i=he(r.weeklyRemaining,r.weeklyLimit),s=pn(r.weeklyResetAt,n),c=Math.max(0,D(r.resetCards)??0),u=D(r.resetCardPricePoints)??100,d=P(),m=P(),[f,l]=v(null),[g,h]=v("1"),x=/^\d+$/.test(g.trim())?Number(g.trim()):NaN,w=Number.isInteger(x)&&x>=1&&x<=50,_=w?x*u:null,p=t.data.balance,b=_!==null&&p!==null&&p<_,y=()=>void d.run(async()=>{let F={daily:a,weekly:i};l(null);let O=L(),re=await Ue(O.accountUseResetCard?()=>O.accountUseResetCard("both"):null,()=>k("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!re.ok)return t.onFailed(),X(re);let H=re.data?.quota,Z=D(re.data?.resetCards);return t.update(Ge=>({...Ge,quota:{...Ge.quota,...H??{},resetCards:Z??Ge.quota.resetCards}})),H&&l({before:F,after:{daily:he(H.dailyRemaining,H.dailyLimit),weekly:he(H.weeklyRemaining,H.weeklyLimit)},cards:Z}),{success:{key:"card.used"}}}),C=()=>void m.run(async()=>{if(!w)return{error:{key:"err.invalidCount"}};let F=await k("/points/exchange-reset-cards",{method:"POST",body:{count:x,expectedPricePerCard:u}});return F.ok?(t.update(O=>({...O,quota:{...O.quota,resetCards:D(F.data?.resetCards)??O.quota.resetCards},balance:D(F.data?.newPointsBalance)??O.balance})),h("1"),{success:{key:"card.exchanged",vars:{n:D(F.data?.cardsGranted)??x}}}):(t.onFailed(),X(F))}),E=F=>F.unlimited?e("common.unlimited"):F.text;return o(B,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Ae,{label:e("common.today"),display:a,note:a.unlimited?null:e("quota.resetDaily")}),o(Ae,{label:e("common.thisWeek"),display:i,note:i.unlimited||!s?null:e("quota.resetWeekly",{date:s})})]}),o(V,{label:e("card.title"),desc:e("card.desc"),children:[o("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:c})}),o(pe,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:d.pending,disabled:c<=0,onConfirm:y})]}),c<=0&&!d.success&&o(U,{children:o(J,{children:e("card.noneHint")})}),(d.error||d.success)&&o(U,{children:[o(M,{a:d}),d.success&&f&&o("div",{class:"fx-ceremony",role:"status",children:[o("span",{children:[e("common.today")," ",o("b",{children:E(f.before.daily)})," \u2192 ",o("b",{children:E(f.after.daily)})]}),o("span",{children:[e("common.thisWeek")," ",o("b",{children:E(f.before.weekly)})," \u2192 ",o("b",{children:E(f.after.weekly)})]}),f.cards!==null&&o("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),o(V,{label:e("card.exchange"),desc:e("card.price",{price:W(u,n)}),class:"fx-row--wide",children:[o("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:g,"aria-label":e("card.count"),onInput:F=>{h(F.currentTarget.value),m.clear()}}),o("span",{class:"fx-muted fx-cost",children:_!==null?e("card.cost",{cost:W(_,n)}):e("card.countHint")}),o(pe,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:_!==null?W(_,n):"\u2014"}),pending:m.pending,disabled:!w||b,onConfirm:C})]}),(b||m.error||m.success)&&o(U,{children:[b&&!m.error&&o(J,{tone:"warn",children:e("err.insufficientPoints")}),o(M,{a:m})]})]})}function Ln(t,e,n){let r=P(),[a,i]=v(null);return{checked:a??t,toggle:c=>{i(c),r.run(async()=>{let u=await e(c);if(i(null),!u.ok)return X(u);n(c)})},action:r}}function Ho(t){let{t:e,locale:n}=A(),r=P(),a=Ln(!!t.data.quota.pointsAutoDeduct,s=>k("/token-quota/auto-deduct",{method:"POST",body:{enabled:s}}),s=>t.update(c=>({...c,quota:{...c.quota,pointsAutoDeduct:s}}))),i=()=>void r.run(async()=>await He("credits")?void 0:{error:{key:"err.openFailed"}});return o(B,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?o(S,{variant:"primary",pending:r.pending,onClick:i,children:e("points.recharge")}):void 0,children:[o(V,{label:e("points.balance"),children:t.data.balance!==null?o("span",{class:"fx-big","data-testid":"points-balance",children:W(t.data.balance,n)}):o("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),o(V,{label:e("points.autoDeduct"),desc:e("points.autoDeductDesc"),children:o(_t,{checked:a.checked,disabled:a.action.pending,label:e("points.autoDeduct"),onChange:a.toggle})}),(a.action.error||r.error)&&o(U,{children:[o(M,{a:a.action}),o(M,{a:r})]})]})}var $o=[5,10,20];function Xo(t){let{t:e}=A(),{bg:n}=t,r=he(n.dailyRemaining,n.dailyLimit),a=he(n.weeklyRemaining,n.weeklyLimit),i=P(),[s,c]=v(null),u=Ln(!!n.autoMain,m=>{let f=L();return Ue(f.accountBgAutoMain?()=>f.accountBgAutoMain(m):null,()=>k("/token-quota/background/auto-main",{method:"POST",body:{enabled:m}}))},m=>t.update(f=>({...f,quota:{...f.quota,background:{...f.quota.background??{},autoMain:m}}}))),d=m=>{c(m),i.run(async()=>{let f=L(),l=await Ue(f.accountBgConvert?()=>f.accountBgConvert(m):null,()=>k("/token-quota/background/convert",{method:"POST",body:{percent:m}}));if(c(null),!l.ok)return X(l);let g=l.data?.quota;return g&&t.update(x=>({...x,quota:{...x.quota,...g,resetCards:x.quota.resetCards,resetCardPricePoints:x.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:m}}}})};return o(B,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Ae,{label:e("common.today"),display:r}),o(Ae,{label:e("common.thisWeek"),display:a})]}),o(V,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:o(_t,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),o(V,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:$o.map(m=>o(pe,{label:`${m}%`,confirmLabel:e("bg.convertConfirm",{pct:m}),pending:i.pending&&s===m,disabled:i.pending&&s!==m,onConfirm:()=>d(m)},m))}),(i.error||i.success||u.action.error)&&o(U,{children:[o(M,{a:u.action}),o(M,{a:i})]})]})}function Wo(t){let{t:e,locale:n}=A(),{invite:r,inviteState:a}=t.data,[i,s]=v(null),[c,u]=v(""),[d,m]=v(""),f=P(),l=P(),g=P();N(()=>{let p=!0;return L().authStatus?.().then(b=>{p&&s(b?.cloudUrl?b.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{p=!1}},[]);let h=async()=>{let p=await k("/invite/my-code");return t.update(b=>({...b,invite:p.ok?p.data:b.invite,inviteState:p.ok?"ok":p.status===404?"hidden":b.inviteState})),p},x=()=>void f.run(async()=>{let p=c.trim();if(!p)return{error:{key:"err.inviteEmpty"}};let b=await k("/invite/claim",{method:"POST",body:{code:p}});return b.ok?(u(""),h(),{success:{key:"invite.claimed"}}):X(b)}),w=()=>void l.run(async()=>{let p=d.trim();if(!p)return{error:{key:"err.redeemEmpty"}};let b=await k("/redemption/redeem",{method:"POST",body:{code:p}});if(!b.ok)return X(b);m(""),t.onRedeemed();let y=[],C=D(b.data?.creditsAmount);C&&y.push(e("redeem.gotPoints",{n:W(C,n)})),b.data?.membershipPlanId&&y.push(e("redeem.gotMembership"));for(let E of Array.isArray(b.data?.items)?b.data.items:[]){let F=(n==="zh"?E?.label?.zh:E?.label?.en)||E?.label?.zh||E?.label?.en||E?.kind;F&&y.push(F)}return{success:y.length?{key:"redeem.successWith",vars:{what:y.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),_=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return o(B,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[a==="ok"&&r?.code&&o(V,{label:e("invite.myCode"),desc:e("invite.count",{n:W(D(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[o("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),o(Ke,{text:r.code,label:e("invite.copyCode")}),o(Ke,{text:_,label:e("invite.copyLink"),disabled:!_})]}),a==="failed"&&o(U,{children:o(J,{tone:"warn",children:[e("invite.loadFailed")," ",o("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await h()}),children:e("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&o(V,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:p=>{p.preventDefault(),x()},children:[o("input",{class:"fx-input",value:c,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:p=>u(p.currentTarget.value)}),o(S,{submit:!0,pending:f.pending,children:e("invite.claimSubmit")})]})}),(f.error||f.success)&&o(U,{children:o(M,{a:f})}),t.redeemEnabled&&o(V,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:p=>{p.preventDefault(),w()},children:[o("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:p=>m(p.currentTarget.value)}),o(S,{submit:!0,pending:l.pending,children:e("redeem.submit")})]})}),(l.error||l.success)&&o(U,{children:o(M,{a:l})})]})}var Vo=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Jo=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Dn=(t,e)=>t==="phone"?Vo.test(e):Jo.test(e),Pe=(t,e)=>t==="phone"?Xe(e):We(e);function qn(){let t=Q(()=>k("/auth/me"));if(t.state==="loading")return o(j,{panels:3,rows:2});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let e=t.data;return o(R,{children:[o(Ko,{me:e,onBound:(n,r)=>t.update(a=>({...a,[n]:r}))}),o(Qo,{me:e}),o(er,{}),o(tr,{me:e})]})}function Ct(){let t=dn(),e=P();return{cd:t,a:e,send:(a,i,s)=>e.run(async()=>{let c=await k("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return c.ok?(t.start(60),{success:{key:"sec.codeSent"}}):X(c)}),reset:()=>{t.stop(),e.clear()}}}function Ko(t){let{t:e}=A(),[n,r]=v(null),[a,i]=v(null);return o(B,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let c=t.me[s];return o(R,{children:[o(V,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:c?Pe(s,c):e("account.contact.unbound"),children:o(S,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":c?"sec.change":"sec.bind")})}),n===s&&o(jo,{kind:s,current:c??null,onDone:u=>{t.onBound(s,u),r(null),i(s)}}),a===s&&n!==s&&o(U,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function jo(t){let{t:e}=A(),{kind:n}=t,[r,a]=v(""),[i,s]=v(""),c=Ct(),u=P(),d=r.trim(),m=n==="phone"?"err.phoneInvalid":"err.emailInvalid",f=()=>{if(!Dn(n,d)){c.a.run(async()=>({error:{key:m}}));return}c.send(d,n,"bind")},l=()=>void u.run(async()=>{if(!Dn(n,d))return{error:{key:m}};if(!i.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},h=await k(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!h.ok)return X(h);t.onDone(d)});return o(U,{class:"fx-form",children:[o("label",{class:"fx-field",children:[o("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),o("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>a(g.currentTarget.value)})]}),o(St,{code:i,setCode:s,sender:c,onSend:f}),o("div",{class:"fx-inline",children:o(S,{variant:"primary",pending:u.pending,onClick:l,children:e("sec.bindSubmit")})}),o(M,{a:u})]})}function St(t){let{t:e}=A(),{cd:n,a:r}=t.sender;return o("div",{class:"fx-field",children:[o("span",{children:t.label??e("sec.code")}),o("div",{class:"fx-inline",children:[o("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:t.code,placeholder:e("sec.codePlaceholder"),"aria-label":t.label??e("sec.code"),onInput:a=>t.setCode(a.currentTarget.value)}),o(S,{pending:r.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),o(M,{a:r})]})}function Yo(t){let{t:e}=A(),n=an(t.value),r=t.value.length>0,a=[[n.length,e("pw.req.length",{min:8,max:64})],[n.lower,e("pw.req.lower")],[n.upper,e("pw.req.upper")],[n.special,e("pw.req.special")],[n.space,e("pw.req.space")]];return o("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:a.map(([i,s])=>o("li",{class:i?"is-ok":r?"is-bad":"",children:[i?o(I,{name:"check",size:11}):r?o(I,{name:"x",size:11}):o("span",{class:"fx-rule-dot","aria-hidden":"true"}),o("span",{children:s})]},s))})}function Nn(t,e){let n=rn(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:ft[n.rule]}}}function Qo(t){let{t:e}=A(),n=["phone","email"].filter(c=>!!t.me[c]),[r,a]=v("current"),[i,s]=v(!1);return o(B,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:o(S,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&o(U,{class:"fx-form",children:[o(ge,{label:e("pw.modeLabel"),value:r,onChange:a,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?o(Go,{onDone:()=>s(!1)}):n.length?o(Zo,{me:t.me,targets:n,onDone:()=>s(!1)}):o(J,{children:e("pw.codeNeedsContact")})]})})}function Bn(t){let{t:e}=A();return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:e("pw.new")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),o(Yo,{value:t.pw}),o("label",{class:"fx-field",children:[o("span",{children:e("pw.confirm")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function Go(t){let{t:e}=A(),[n,r]=v(""),[a,i]=v(""),[s,c]=v(""),u=P(),[d,m]=v(!1),f=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let l=Nn(a,s);if(l)return l;let g=await k("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return g.ok?(r(""),i(""),c(""),m(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:X(g)});return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:e("pw.current")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:l=>r(l.currentTarget.value)})]}),o(Bn,{pw:a,setPw:i,confirm:s,setConfirm:c}),o("div",{class:"fx-inline",children:[o(S,{variant:"primary",pending:u.pending,onClick:f,children:e("pw.submit")}),d&&o(S,{onClick:t.onDone,children:e("common.done")})]}),o(M,{a:u})]})}function Zo(t){let{t:e}=A(),[n,r]=v(t.targets[0]),[a,i]=v(""),[s,c]=v(""),[u,d]=v(""),m=Ct(),f=P(),[l,g]=v(!1),h=t.me[n]||"",x=()=>void f.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let w=Nn(s,u);if(w)return w;let _=n==="phone"?{phone:h,code:a.trim(),newPassword:s}:{email:h,code:a.trim(),newPassword:s},p=await k("/auth/reset-password",{method:"POST",body:_});return p.ok?(i(""),c(""),d(""),g(!0),{success:{key:"pw.changed"}}):X(p)});return o(R,{children:[t.targets.length>1?o(ge,{label:e("pw.via"),value:n,onChange:w=>{r(w),i(""),m.reset()},options:t.targets.map(w=>({value:w,label:Pe(w,t.me[w])}))}):o(J,{children:e("pw.codeTo",{target:Pe(n,h)})}),o(St,{code:a,setCode:i,sender:m,onSend:()=>void m.send(h,n,"reset_password")}),o(Bn,{pw:s,setPw:c,confirm:u,setConfirm:d}),o("div",{class:"fx-inline",children:[o(S,{variant:"primary",pending:f.pending,onClick:x,children:e("pw.submitReset")}),l&&o(S,{onClick:t.onDone,children:e("common.done")})]}),o(M,{a:f})]})}function er(){let{t}=A(),e=P(),n=()=>void e.run(async()=>{let r=await k("/auth/logout-all",{method:"POST"});if(!r.ok)return X(r);try{await L().forsionLogout?.()}catch(a){return{error:{raw:se(a)}}}return{success:{key:"sec.logoutAllDone"}}});return o(B,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[o(V,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:o(pe,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&o(U,{children:o(M,{a:e})})]})}function tr(t){let{t:e}=A(),n=["phone","email"].filter(_=>!!t.me[_]),[r,a]=v(!1),[i,s]=v(n.length?"code":"password"),[c,u]=v(n[0]??null),[d,m]=v(""),[f,l]=v(""),g=Ct(),h=P(),x=c&&t.me[c]||"",w=()=>void h.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!f)return{error:{key:"pw.currentRequired"}};let _=await k("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:f}});if(!_.ok)return X(_);try{await L().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return o(B,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:o(S,{variant:"danger",onClick:()=>{a(!r),h.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&o(U,{class:"fx-form",children:[o(J,{tone:"error",children:e("del.warn")}),n.length>0&&o(ge,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&c?o(R,{children:[n.length>1&&o(ge,{label:e("pw.via"),value:c,onChange:_=>{u(_),m(""),g.reset()},options:n.map(_=>({value:_,label:Pe(_,t.me[_])}))}),o(St,{code:d,setCode:m,sender:g,label:e("del.codeLabel",{target:Pe(c,x)}),onSend:()=>void g.send(x,c,"delete_account")})]}):o("label",{class:"fx-field",children:[o("span",{children:e("del.passwordLabel")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:f,onInput:_=>l(_.currentTarget.value)})]}),o("div",{class:"fx-inline",children:o(pe,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:h.pending,onConfirm:w})}),o(M,{a:h})]})})}var Un=20;function On(){let t=Q(async()=>{let[e,n]=await Promise.all([k("/token-quota/my"),k(`/token-quota/my/logs?limit=${Un}&offset=0`)]);if(!e.ok)return e;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:D(e.data?.dailyLimit),logs:r,total:n.ok?D(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?o(j,{panels:3,rows:2}):t.state==="signedOut"?o(G,{}):t.state==="error"?o(Y,{error:t.error,onRetry:t.retry}):o(R,{children:[o(nr,{dailyLimit:t.data.dailyLimit}),o(rr,{base:t.data,onRetry:t.reload})]})}function nr(t){let{t:e,locale:n}=A(),[r,a]=v(30),[i,s]=v({state:"loading"}),[c,u]=v(!1),[d,m]=v(0),f=$(0);N(()=>{let b=++f.current;return u(!0),k(`/usage/stats?days=${r}`).then(y=>{b===f.current&&(u(!1),s(y.ok?{state:"ready",data:y.data??{}}:{state:"error",fail:y}))}),()=>{f.current++}},[r,d]);let l=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":je(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=b=>je(b,t.dailyLimit)??"\u2014",h=o(ge,{label:e("usage.range"),value:r,onChange:a,options:[{value:7,label:e("usage.days",{n:7})},{value:30,label:e("usage.days",{n:30})},{value:90,label:e("usage.days",{n:90})}]}),x=i.state==="ready"?i.data:null,w=(x?.byModel??[]).filter(Boolean),_=(x?.byProject??[]).filter(Boolean),p=D(x?.successRate);return o(R,{children:[o(B,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:h,children:[i.state==="error"?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(K(i.fail),e)}),o("button",{type:"button",class:"fx-link",onClick:()=>m(b=>b+1),children:e("common.retry")})]})}):o("div",{class:`fx-stats fx-block${c&&x?" is-refreshing":""}`,"aria-busy":c||void 0,children:[o(At,{label:e("usage.requests"),value:x?W(D(x.totalRequests)??0,n):null,testId:"usage-requests"}),o(At,{label:e("usage.successRate"),value:x?p===null?"\u2014":`${p.toFixed(1)}%`:null}),o(At,{label:e("usage.consumption"),value:x?g(x.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),l&&o("div",{class:"fx-sub fx-sub--tight",children:o(J,{children:e(l)})})]}),i.state!=="error"&&o(R,{children:[o(B,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:o(zn,{loading:!x,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:w.map(b=>[b.modelName||b.modelId||"\u2014",W(D(b.count)??0,n),g(b.pointsCost)])})}),o(B,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:o(zn,{loading:!x,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:_.map(b=>[Hn(b.projectSource,e("usage.appUnknown")),W(D(b.count)??0,n),g(b.pointsCost)])})})]})]})}var or={tangu:"Tangu","ai-studio":"Forsion AI Studio",desktop:"Forsion Desktop",amadeus:"Amadeus",notebase:"Notebase",calendar:"Forsion Calendar",chat:"Forsion Chat",desk:"Forsion Desk","photo-studio":"Photo Studio",connect:"Forsion Connect"},Hn=(t,e)=>!t||t==="unknown"?e:or[t]??t;function At(t){return o("div",{class:"fx-stat",children:[o("span",{class:"fx-stat-label",children:t.label}),t.value===null?o("span",{class:"fx-skel fx-skel--stat"}):o("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&o("span",{class:"fx-stat-sub",children:t.sub})]})}function zn(t){return t.loading?o("div",{class:"fx-sub",children:[o("span",{class:"fx-skel fx-skel--row"}),o("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?o("div",{class:"fx-table-wrap fx-block",children:o("table",{class:"fx-table",children:[o("thead",{children:o("tr",{children:t.head.map((e,n)=>o("th",{class:n?"is-num":"",children:e},n))})}),o("tbody",{children:t.rows.map((e,n)=>o("tr",{children:e.map((r,a)=>o("td",{class:a?"is-num":"",children:r},a))},n))})]})}):o(ue,{children:t.empty})}function rr(t){let{t:e,locale:n}=A(),r=le(),[a,i]=v(t.base.logs??[]),[s,c]=v(t.base.total),u=P();N(()=>{i(t.base.logs??[]),c(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let f=await k(`/token-quota/my/logs?limit=${Un}&offset=${a.length}`);if(!f.ok)return{error:K(f)};let l=Array.isArray(f.data?.logs)?f.data.logs:[];r.current&&(i(g=>[...g,...l]),c(g=>l.length?D(f.data?.total)??g:a.length))}),m=t.base.dailyLimit;return o(B,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(K(t.base.logsFail),e)}),o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):a.length===0?o(ue,{children:e("usage.recentEmpty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map((f,l)=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-main",children:[o("strong",{children:[f.modelName||f.modelId||"\u2014",f.success===!1&&o("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),o("small",{children:[xe(f.createdAt,n),Hn(f.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),o("span",{class:"fx-value",children:je(f.pointsCost,m)??"\u2014"})]},f.id??l))}),a.length>0&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("usage.shown",{shown:W(a.length,n),total:W(Math.max(s,a.length),n)})}),a.length<s&&o(S,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(M,{a:u})})]})}var Me=20,Ye=5,ar=5*1024*1024,Qe=1e4,ir={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Xn(t){let{t:e}=A(),n=t.status||"open",r=ir[n];return o("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Wn(){let[t,e]=v(null),n=Q(async()=>{let r=await k(`/feedback?limit=${Me}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?o(j,{panels:1,rows:3}):n.state==="signedOut"?o(G,{}):n.state==="error"?o(Y,{error:n.error,onRetry:n.retry}):t?o(dr,{id:t,onBack:()=>{e(null),n.reload()}}):o(sr,{first:n.data,onOpen:e,onChanged:n.reload})}function sr(t){let{t:e,locale:n}=A(),r=le(),[a,i]=v(t.first),[s,c]=v(t.first.length===Me),[u,d]=v(!1),[m,f]=v(!1),l=P();N(()=>{i(t.first),c(t.first.length===Me)},[t.first]);let g=()=>void l.run(async()=>{let h=await k(`/feedback?limit=${Me}&offset=${a.length}`);if(!h.ok)return{error:K(h)};let x=Array.isArray(h.data?.tickets)?h.data.tickets:[];r.current&&(i(w=>{let _=new Set(w.map(p=>p.id));return[...w,...x.filter(p=>!_.has(p.id))]}),c(x.length===Me))});return o(B,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:o(S,{variant:"primary",onClick:()=>{f(!1),d(!0)},children:[o(I,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&o(ur,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),f(!0),t.onChanged()}}),m&&!u&&o(U,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),a.length===0?o(ue,{children:e("fb.empty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map(h=>o("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(h.id),children:[o("span",{class:`fx-dot${h.user_unread?" is-on":""}`,"aria-label":h.user_unread?e("fb.unread"):void 0}),o("span",{class:"fx-list-main",children:[o("strong",{children:h.title||(h.description||"").slice(0,60)||e("fb.untitled")}),o("small",{children:xe(h.updated_at||h.created_at,n)})]}),o(Xn,{status:h.status}),o(I,{name:"chevron",size:12})]},h.id))}),a.length>0&&(s||l.error)&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("fb.shown",{n:W(a.length,n)})}),s&&o(S,{pending:l.pending,onClick:g,children:e("common.loadMore")})]}),l.error&&o(U,{children:o(M,{a:l})})]})}function cr(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(t)})}var lr=0;function ur(t){let{t:e}=A(),n=le(),[r,a]=v(""),[i,s]=v([]),[c,u]=v(null),[d,m]=v(!1),f=$(null),l=P(),[g,h]=v(0),x=$(0);x.current=i.length;let w=async p=>{u(null);for(let b of Array.from(p||[])){if(!b.type||!b.type.startsWith("image/")){u({key:"err.imageType"});continue}if(b.size>ar){u({key:"err.imageTooLarge"});continue}if(x.current>=Ye){u({key:"err.tooManyImages"});break}x.current++,h(y=>y+1);try{let y=await cr(b);if(!n.current)return;let C={id:`img-${++lr}`,filename:b.name||"image",mime_type:b.type,size:b.size,data_base64:y.replace(/^data:[^;]+;base64,/,""),url:y};s(E=>E.length>=Ye?E:[...E,C])}catch{x.current--,u({key:"err.imageRead"})}finally{n.current&&h(y=>y-1)}}},_=()=>void l.run(async()=>{let p=r.trim();if(!p)return{error:{key:"err.feedbackEmpty"}};if(p.length>Qe)return{error:{key:"err.feedbackTooLong"}};let b=i.map(({filename:C,mime_type:E,size:F,data_base64:O})=>({filename:C,mime_type:E,size:F,data_base64:O})),y=await k("/feedback",{method:"POST",body:{description:p,attachments:b},timeoutMs:12e4});if(!y.ok)return X(y);t.onSubmitted()});return o("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:p=>{let b=Array.from(p.clipboardData?.items||[]).filter(y=>y.kind==="file").map(y=>y.getAsFile()).filter(Boolean);b.length&&(p.preventDefault(),w(b))},onDragOver:p=>{p.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:p=>{p.preventDefault(),m(!1),w(p.dataTransfer?.files)},children:[o("label",{class:"fx-field",children:[o("span",{children:e("fb.descLabel")}),o("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:Qe,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:p=>a(p.currentTarget.value)})]}),o("p",{class:"fx-note",children:e("fb.imagesHint",{n:Ye})}),i.length>0&&o("div",{class:"fx-thumbs",children:i.map(p=>o("span",{class:"fx-thumb",children:[o("img",{src:p.url,alt:p.filename}),o("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(b=>b.filter(y=>y.id!==p.id)),u(null)},children:o(I,{name:"x",size:11})})]},p.id))}),c&&o("div",{class:"fx-msg is-error",role:"alert",children:te(c,e)}),o("input",{ref:f,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:p=>{let b=p.currentTarget;w(b.files),b.value=""}}),o("div",{class:"fx-inline",children:[o(S,{disabled:i.length>=Ye||l.pending,onClick:()=>f.current?.click(),children:[o(I,{name:"image",size:12})," ",e("fb.addImages")]}),o("span",{class:"fx-grow"}),o(S,{disabled:l.pending,onClick:t.onCancel,children:e("common.cancel")}),o(S,{variant:"primary",pending:l.pending,disabled:g>0,onClick:_,children:e("fb.submit")})]}),o(M,{a:l})]})}function dr(t){let{t:e,locale:n}=A(),[r,a]=v({state:"loading"}),[i,s]=v(0),[c,u]=v(""),[d,m]=v(null),f=P(),l=$(0);N(()=>{let y=++l.current;return k(`/feedback/${encodeURIComponent(t.id)}`).then(C=>{if(y===l.current){if(!C.ok){a({state:"error",fail:C});return}a({state:"ready",data:{ticket:C.data.ticket,replies:C.data.replies??[],attachments:C.data.attachments??[]}}),k(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{l.current++}},[t.id,i]),N(()=>{if(!d)return;let y=C=>{C.key==="Escape"&&m(null)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[d]);let g=o("div",{class:"fx-back",children:o(S,{onClick:t.onBack,children:[o(I,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return o(R,{children:[g,o(j,{panels:1,rows:3})]});if(r.state==="error")return o(R,{children:[g,o(Y,{error:K(r.fail),onRetry:()=>{a({state:"loading"}),s(y=>y+1)}})]});let{ticket:h,replies:x,attachments:w}=r.data,_=h.status==="closed",p=y=>w.filter(C=>(C.reply_id??null)===y),b=()=>void f.run(async()=>{let y=c.trim();if(!y)return{error:{key:"err.replyEmpty"}};if(y.length>Qe)return{error:{key:"err.replyTooLong"}};let C=await k(`/feedback/${encodeURIComponent(h.id)}/replies`,{method:"POST",body:{content:y},timeoutMs:6e4});return C.ok?(u(""),s(E=>E+1),{success:{key:"fb.replySent"}}):X(C)});return o(R,{children:[g,o(B,{icon:"message",title:h.title||e("fb.untitled"),actions:o(Xn,{status:h.status}),desc:`#${String(h.id).slice(0,8)} \xB7 ${xe(h.created_at,n)}`,children:[o("div",{class:"fx-thread fx-block",children:[o($n,{who:"user",when:h.created_at,text:h.description||"",files:p(null),onZoom:m}),x.map((y,C)=>o($n,{who:y.author_role==="user"?"user":"admin",when:y.created_at,text:y.content||"",files:y.id?p(y.id):[],onZoom:m},y.id??C))]}),_?o(U,{children:o(J,{children:e("fb.closedNote")})}):o(U,{class:"fx-form",children:[o("textarea",{class:"fx-input fx-textarea",rows:3,value:c,maxLength:Qe,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:y=>{u(y.currentTarget.value),f.success&&f.clear()}}),o("div",{class:"fx-inline",children:[o("span",{class:"fx-grow"}),o(S,{variant:"primary",pending:f.pending,onClick:b,children:e("fb.replySend")})]}),o(M,{a:f})]})]}),d&&o("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>m(null),children:o("img",{src:d,alt:""})})]})}function $n(t){let{t:e,locale:n}=A();return o("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[o("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",xe(t.when,n)]}),o("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&o("div",{class:"fx-thumbs",children:t.files.map((r,a)=>{let i=r.mime_type||"";if(i.startsWith("image/")&&r.data_base64){let s=`data:${i};base64,${r.data_base64}`;return o("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:o("img",{src:s,alt:r.filename||""})},r.id??a)}return o("span",{class:"fx-tag",children:[o(I,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??a)})})]})}var fr="forsion-extend",Vn=[{id:"account",titleKey:"page.account",Component:In},{id:"quota",titleKey:"page.quota",Component:Rn},{id:"security",titleKey:"page.security",Component:qn},{id:"usage",titleKey:"page.usage",Component:On},{id:"feedback",titleKey:"page.feedback",Component:Wn}],mr=t=>`forsion/fx:${fr}:${t}`;function pr(t){let{ctx:e,page:n}=t,[r,a]=v(()=>we(e.getLocale?.()));N(()=>{a(we(e.getLocale?.()));let c=e.subscribeLocale?.(u=>a(we(u)));return()=>{typeof c=="function"&&c()}},[e]);let i=ve(()=>{let c=e.app?.openSettings;return{ctx:e,locale:r,t:nn(r),goTo:typeof c=="function"?u=>c.call(e.app,mr(u)):null}},[e,r]),s=n.Component;return o(mt.Provider,{value:i,children:o("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[o("style",{children:fn}),o(s,{})]})})}function Jn(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let r of Vn)t.registerSettingsView({id:r.id,category:"forsion",title:()=>ut(we(t.getLocale?.()),r.titleKey),mount(a){return st(o(pr,{ctx:t,page:r}),a),()=>{st(null,a)}}});return Vn.length}typeof ctx<"u"&&Jn(ctx);})();
|
package/manifest.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"id": "forsion-extend",
|
|
3
3
|
"name": "Forsion 扩展",
|
|
4
4
|
"nameEn": "Forsion Extend",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.5.1",
|
|
6
6
|
"apiVersion": 1,
|
|
7
7
|
"minAppVersion": "2.11.4",
|
|
8
8
|
"main": "dist/main.js",
|
|
9
|
-
"description": "Forsion
|
|
10
|
-
"descriptionEn": "
|
|
9
|
+
"description": "Forsion 云端账号在桌面端的功能:登录与切换账号,设置里的「Forsion 云端」(账号、额度与积分、安全、用量记录、反馈),笔记云同步与分享,以及 Forsion Connect 发布。随 Forsion 桌面端内置,自动更新。",
|
|
10
|
+
"descriptionEn": "Your Forsion cloud account on the desktop: signing in and switching accounts, the Forsion Cloud pages in Settings (account, quota & points, security, usage, feedback), note cloud sync and sharing, and Forsion Connect publishing. Built into Forsion Desktop and updated automatically.",
|
|
11
11
|
"author": "Forsion"
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsion/extend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Forsion Extend: the cloud-account half of Forsion Desktop plus Forsion Connect (Coding Space publishing and the preview-mode AI proxy), shipped as a built-in bundle (signed, updated through npm).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"manifest.json",
|
|
19
19
|
"dist/main.js",
|
|
20
20
|
"dist/desktop.mjs",
|
|
21
|
+
"dist/THIRD_PARTY_NOTICES.md",
|
|
21
22
|
"SIGNATURE",
|
|
22
23
|
"CHANGELOG.md",
|
|
23
24
|
"README.md",
|
|
@@ -28,13 +29,16 @@
|
|
|
28
29
|
"sign": "node scripts/sign.mjs",
|
|
29
30
|
"verify": "node scripts/verify-package.mjs",
|
|
30
31
|
"test": "node --test 'test/*.test.ts' && vitest run",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.renderer.json",
|
|
32
33
|
"test:vitest": "vitest run"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@types/node": "^22.10.0",
|
|
36
37
|
"esbuild": "^0.25.0",
|
|
38
|
+
"happy-dom": "^20.14.5",
|
|
39
|
+
"preact": "^10.29.8",
|
|
37
40
|
"typescript": "^5.6.0",
|
|
41
|
+
"uqr": "^0.1.3",
|
|
38
42
|
"vitest": "^3.2.7"
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|