@forsion/extend 0.8.0 → 0.8.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 +10 -0
- package/README.md +4 -2
- package/SIGNATURE +7 -7
- package/dist/desktop.mjs +16 -16
- package/dist/main.js +73 -36
- package/manifest.json +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";var __fxExtend=(()=>{var
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Is(t,e){return Cs(t)||Rs(t,e)||Ms(t,e)||Ps()}function Ms(t,e){if(t){if(typeof t=="string")return Da(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Da(t,e):void 0}}function gn(t){var e,n;function r(i,s){try{var l=t[i](s),u=l.value,d=u instanceof Es;Promise.resolve(d?u.v:u).then(function(p){if(d){var m=i==="return"&&u.k?i:"next";if(!u.k||p.done)return r(m,p);p=t[m](p).value}a(!!l.done,p)},function(p){r("throw",p)})}catch(p){a(2,p)}}function a(i,s){i===2?e.reject(s):e.resolve({value:s,done:i}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,u){var d={key:i,arg:s,resolve:l,reject:u,next:null};n?n=n.next=d:(e=n=d,r(i,s))})},typeof t.return!="function"&&(this.return=void 0)}gn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},gn.prototype.next=function(t){return this._invoke("next",t)},gn.prototype.throw=function(t){return this._invoke("throw",t)},gn.prototype.return=function(t){return this._invoke("return",t)};var Ya=Object.entries,Na=Object.setPrototypeOf,Ls=Object.isFrozen,Ds=Object.getPrototypeOf,Ns=Object.getOwnPropertyDescriptor,de=Object.freeze,fe=Object.seal,Et=Object.create,Ja=typeof Reflect<"u"&&Reflect,hr=Ja.apply,br=Ja.construct;de||(de=function(e){return e});fe||(fe=function(e){return e});hr||(hr=function(e,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];return e.apply(n,a)});br||(br=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new e(...r)});var it=le(Array.prototype.forEach);Array.prototype.indexOf;var zs=le(Array.prototype.lastIndexOf),za=le(Array.prototype.pop),Ft=le(Array.prototype.push);Array.prototype.slice;var Os=le(Array.prototype.splice),Ct=Array.isArray,$t=le(String.prototype.toLowerCase),ur=le(String.prototype.toString),Oa=le(String.prototype.match),Bt=le(String.prototype.replace),Fa=le(String.prototype.indexOf),Fs=le(String.prototype.trim),Bs=le(Number.prototype.toString),Us=le(Boolean.prototype.toString),Ba=typeof BigInt>"u"?null:le(BigInt.prototype.toString),Ua=typeof Symbol>"u"?null:le(Symbol.prototype.toString),xe=le(Object.prototype.hasOwnProperty),Ut=le(Object.prototype.toString),ge=le(RegExp.prototype.test),Ye=$s(TypeError);function le(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return hr(t,e,r)}}function $s(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return br(t,n)}}function U(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;if(Na&&Na(t,null),!Ct(e))return t;let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){let i=n(a);i!==a&&(Ls(e)||(e[r]=i),a=i)}t[a]=!0}return t}function qs(t){for(let e=0;e<t.length;e++)xe(t,e)||(t[e]=null);return t}function ve(t){let e=Et(null);for(let r of Ya(t)){var n=Is(r,2);let a=n[0],i=n[1];xe(t,a)&&(Ct(i)?e[a]=qs(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=ve(i):e[a]=i)}return e}function Hs(t){switch(typeof t){case"string":return t;case"number":return Bs(t);case"boolean":return Us(t);case"bigint":return Ba?Ba(t):"0";case"symbol":return Ua?Ua(t):"Symbol()";case"undefined":return Ut(t);case"function":case"object":{if(t===null)return Ut(t);let e=t,n=Ce(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:Ut(r)}return Ut(t)}default:return Ut(t)}}function Ce(t,e){for(;t!==null;){let r=Ns(t,e);if(r){if(r.get)return le(r.get);if(typeof r.value=="function")return le(r.value)}t=Ds(t)}function n(){return null}return n}function Ws(t){try{return ge(t,""),!0}catch{return!1}}var $a=de(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dr=de(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fr=de(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Xs=de(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pr=de(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Vs=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qa=de(["#text"]),Ha=de(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),mr=de(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wa=de(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hn=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),js=fe(/{{[\w\W]*|^[\w\W]*}}/g),Gs=fe(/<%[\w\W]*|^[\w\W]*%>/g),Ys=fe(/\${[\w\W]*/g),Js=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ks=fe(/^aria-[\-\w]+$/),Xa=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zs=fe(/^(?:\w+script|data):/i),Qs=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),el=fe(/^html$/i),tl=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),Va=fe(/<[/\w!]/g),ja=fe(/<[/\w]/g),nl=fe(/<\/no(script|embed|frames)/i),rl=fe(/\/>/i),ke={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ka=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],al=de(U({},Ka)),ol=(function(){let t={};return it(Ka,e=>{t[e]=fe(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),de(t)})(),il=function(){return typeof window>"u"?null:window},sl=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));let i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Ga=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Je=function(e,n,r,a){return xe(e,n)&&Ct(e[n])?U(a.base?ve(a.base):{},e[n],a.transform):r},gr=function(e,n,r){let a=xe(e,n)?e[n]:void 0;return a&&typeof a=="object"?ve(a):r()};function Za(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:il(),e=w=>Za(w);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==ke.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,a=r.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,p=t.trustedTypes,m=l.prototype,f=Ce(m,"cloneNode"),b=Ce(m,"remove"),h=Ce(m,"removeAttributeNode"),y=Ce(m,"nextSibling"),k=Ce(m,"childNodes"),T=Ce(m,"parentNode"),x=Ce(m,"shadowRoot"),_=Ce(m,"attributes"),E=s&&s.prototype?Ce(s.prototype,"nodeType"):null,R=s&&s.prototype?Ce(s.prototype,"nodeName"):null,B=s&&s.prototype?Ce(s.prototype,"ownerDocument"):null,Y=function(c){return E?E(c):c.nodeType},$=function(c){return R?R(c):c.nodeName};if(typeof i=="function"){let w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let V,oe="",he,De=!1,Be=0,bt=function(){if(Be>0)throw Ye('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},xt=function(c){bt(),Be++;try{return V.createHTML(c)}finally{Be--}},ji=function(c){bt(),Be++;try{return V.createScriptURL(c)}finally{Be--}},Gi=function(){return De||(he=sl(p,a),De=!0),he},tn=n,jn=tn.implementation,aa=tn.createNodeIterator,Yi=tn.createDocumentFragment,Ji=tn.getElementsByTagName,Ki=r.importNode,J=Ga();e.isSupported=typeof Ya=="function"&&typeof T=="function"&&jn&&jn.createHTMLDocument!==void 0;let Zi=js,Qi=Gs,es=Ys,ts=Js,ns=Ks,rs=Zs,oa=Qs,as=tl,ia=Xa,K=null,Gn=U({},[...$a,...dr,...fr,...pr,...qa]),Z=null,Yn=U({},[...Ha,...mr,...Wa,...hn]),Ne=Object.seal(Et(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Nt=null,sa=null,Ve=Object.seal(Et(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),la=!0,Jn=!0,ca=!1,ua=!0,je=!1,rt=!0,at=!1,Kn=!1,nn=null,rn=null,Zn=!1,yt=!1,an=!1,on=!1,da=!0,fa=!1,pa="user-content-",Qn=!0,er=!1,kt={},vt=null,ma=U({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ga=null,ha=U({},["audio","video","img","source","image","track"]),ba=null,xa=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",ln="http://www.w3.org/2000/svg",ze="http://www.w3.org/1999/xhtml",wt=ze,tr=!1,nr=null,os=U({},[sn,ln,ze],ur),ya=de(["mi","mo","mn","ms","mtext"]),rr=U({},ya),ka=de(["annotation-xml"]),ar=U({},ka),is=U({},["title","style","font","a","script"]),zt=null,ss=["application/xhtml+xml","text/html"],ls="text/html",ie=null,_t=null,cs=n.createElement("form"),va=function(c){return c instanceof RegExp||c instanceof Function},or=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t&&_t===c)return;(!c||typeof c!="object")&&(c={}),c=ve(c),zt=ss.indexOf(c.PARSER_MEDIA_TYPE)===-1?ls:c.PARSER_MEDIA_TYPE,ie=zt==="application/xhtml+xml"?ur:$t,K=Je(c,"ALLOWED_TAGS",Gn,{transform:ie}),Z=Je(c,"ALLOWED_ATTR",Yn,{transform:ie}),nr=Je(c,"ALLOWED_NAMESPACES",os,{transform:ur}),ba=Je(c,"ADD_URI_SAFE_ATTR",xa,{transform:ie,base:xa}),ga=Je(c,"ADD_DATA_URI_TAGS",ha,{transform:ie,base:ha}),vt=Je(c,"FORBID_CONTENTS",ma,{transform:ie}),Nt=Je(c,"FORBID_TAGS",ve({}),{transform:ie}),sa=Je(c,"FORBID_ATTR",ve({}),{transform:ie}),kt=xe(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?ve(c.USE_PROFILES):c.USE_PROFILES:!1,la=c.ALLOW_ARIA_ATTR!==!1,Jn=c.ALLOW_DATA_ATTR!==!1,ca=c.ALLOW_UNKNOWN_PROTOCOLS||!1,ua=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,je=c.SAFE_FOR_TEMPLATES||!1,rt=c.SAFE_FOR_XML!==!1,at=c.WHOLE_DOCUMENT||!1,yt=c.RETURN_DOM||!1,an=c.RETURN_DOM_FRAGMENT||!1,on=c.RETURN_TRUSTED_TYPE||!1,Zn=c.FORCE_BODY||!1,da=c.SANITIZE_DOM!==!1,fa=c.SANITIZE_NAMED_PROPS||!1,Qn=c.KEEP_CONTENT!==!1,er=c.IN_PLACE||!1,ia=Ws(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:Xa,wt=typeof c.NAMESPACE=="string"?c.NAMESPACE:ze,rr=gr(c,"MATHML_TEXT_INTEGRATION_POINTS",()=>U({},ya)),ar=gr(c,"HTML_INTEGRATION_POINTS",()=>U({},ka));let g=gr(c,"CUSTOM_ELEMENT_HANDLING",()=>Et(null));if(Ne=Et(null),xe(g,"tagNameCheck")&&va(g.tagNameCheck)&&(Ne.tagNameCheck=g.tagNameCheck),xe(g,"attributeNameCheck")&&va(g.attributeNameCheck)&&(Ne.attributeNameCheck=g.attributeNameCheck),xe(g,"allowCustomizedBuiltInElements")&&typeof g.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=g.allowCustomizedBuiltInElements),fe(Ne),je&&(Jn=!1),an&&(yt=!0),kt&&(K=U({},qa),Z=Et(null),kt.html===!0&&(U(K,$a),U(Z,Ha)),kt.svg===!0&&(U(K,dr),U(Z,mr),U(Z,hn)),kt.svgFilters===!0&&(U(K,fr),U(Z,mr),U(Z,hn)),kt.mathMl===!0&&(U(K,pr),U(Z,Wa),U(Z,hn))),Ve.tagCheck=null,Ve.attributeCheck=null,xe(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?Ve.tagCheck=c.ADD_TAGS:Ct(c.ADD_TAGS)&&(K===Gn&&(K=ve(K)),U(K,c.ADD_TAGS,ie))),xe(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?Ve.attributeCheck=c.ADD_ATTR:Ct(c.ADD_ATTR)&&(Z===Yn&&(Z=ve(Z)),U(Z,c.ADD_ATTR,ie))),xe(c,"ADD_FORBID_CONTENTS")&&Ct(c.ADD_FORBID_CONTENTS)&&(vt===ma&&(vt=ve(vt)),U(vt,c.ADD_FORBID_CONTENTS,ie)),Qn&&(K["#text"]=!0),at&&U(K,["html","head","body"]),K.table&&(U(K,["tbody"]),delete Nt.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let v=V;V=c.TRUSTED_TYPES_POLICY;try{oe=xt("")}catch(S){throw V=v,S}}else c.TRUSTED_TYPES_POLICY===null?(V=void 0,oe=""):(V===void 0&&(V=Gi()),V&&typeof oe=="string"&&(oe=xt("")));de&&de(c),_t=c},wa=U({},[...dr,...fr,...Xs]),_a=U({},[...pr,...Vs]),us=function(c,g,v){return g.namespaceURI===ze?c==="svg":g.namespaceURI===sn?c==="svg"&&(v==="annotation-xml"||rr[v]):!!wa[c]},ds=function(c,g,v){return g.namespaceURI===ze?c==="math":g.namespaceURI===ln?c==="math"&&ar[v]:!!_a[c]},fs=function(c,g,v){return g.namespaceURI===ln&&!ar[v]||g.namespaceURI===sn&&!rr[v]?!1:!_a[c]&&(is[c]||!wa[c])},ps=function(c){let g=T(c);(!g||!g.tagName)&&(g={namespaceURI:wt,tagName:"template"});let v=$t(c.tagName),S=$t(g.tagName);return nr[c.namespaceURI]?c.namespaceURI===ln?us(v,g,S):c.namespaceURI===sn?ds(v,g,S):c.namespaceURI===ze?fs(v,g,S):!!(zt==="application/xhtml+xml"&&nr[c.namespaceURI]):!1},Ge=function(c){Ft(e.removed,{element:c});try{T(c).removeChild(c)}catch{if(b(c),!T(c))throw Ye("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Sa=function(c,g,v){try{h(c,g)}catch{try{c.removeAttribute(v)}catch{}}},cn=function(c){un(c);let g=k(c);if(g){let S=[];it(g,C=>{Ft(S,C)}),it(S,C=>{try{b(C)}catch{}})}let v=_(c);if(v)for(let S=v.length-1;S>=0;--S){let C=v[S],D=C&&C.name;typeof D=="string"&&Sa(c,C,D)}},ot=function(c,g,v){if(!v)try{v=g.getAttributeNode(c)}catch{v=null}Ft(e.removed,{attribute:v||null,from:g});try{v?h(g,v):g.removeAttribute(c)}catch{try{g.removeAttribute(c)}catch{}}if(c==="is")if(yt||an)try{Ge(g)}catch{}else try{g.setAttribute(c,"")}catch{}},ms=function(c){let g=_(c);if(g)for(let v=g.length-1;v>=0;--v){let S=g[v],C=S&&S.name;typeof C!="string"||Z[ie(C)]||Sa(c,S,C)}},un=function(c){let g=[c];for(;g.length>0;){let v=g.pop();Y(v)===ke.element&&ms(v);let S=k(v);if(S)for(let C=S.length-1;C>=0;--C)g.push(S[C])}},Aa=function(c,g){return rt?c==="patchsrc"?!0:c==="for"&&g!=="label"&&g!=="output":!1},gs=function(c){if(!rt)return;let g=[c];for(;g.length>0;){let v=g.pop(),S=Y(v);if(S===ke.processingInstruction||S===ke.comment&&ge(ja,v.data)){try{b(v)}catch{}continue}if(S===ke.element){let D=v,F=ie($(v));try{D.hasAttribute&&D.hasAttribute("patchsrc")&&D.removeAttribute("patchsrc"),D.hasAttribute&&D.hasAttribute("for")&&Aa("for",F)&&D.removeAttribute("for")}catch{}}let C=k(v);if(C)for(let D=C.length-1;D>=0;--D)g.push(C[D])}},Ta=function(c){let g=null,v=null;if(Zn)c="<remove></remove>"+c;else{let D=Oa(c,/^[\r\n\t ]+/);v=D&&D[0]}zt==="application/xhtml+xml"&&wt===ze&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let S=V?xt(c):c;if(wt===ze)try{g=new d().parseFromString(S,zt)}catch{}if(!g||!g.documentElement){g=jn.createDocument(wt,"template",null);try{g.documentElement.innerHTML=tr?oe:S}catch{}}let C=g.body||g.documentElement;return c&&v&&C.insertBefore(n.createTextNode(v),C.childNodes[0]||null),wt===ze?Ji.call(g,at?"html":"body")[0]:at?g.documentElement:C},Ea=function(c){let g=B?B(c):c.ownerDocument;return aa.call(g||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},dn=function(c){return c=Bt(c,Zi," "),c=Bt(c,Qi," "),c=Bt(c,es," "),c},ir=function(c){var g;c.normalize();let v=B?B(c):c.ownerDocument,S=aa.call(v||c,c,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),C=S.nextNode();for(;C;)C.data=dn(C.data),C=S.nextNode();let D=(g=c.querySelectorAll)===null||g===void 0?void 0:g.call(c,"template");D&&it(D,F=>{St(F.content)&&ir(F.content)})},fn=function(c){let g=R?R(c):null;return typeof g!="string"||ie(g)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==_(c)||typeof c.removeAttribute!="function"||typeof c.removeAttributeNode!="function"||typeof c.getAttributeNode!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==E(c)||c.childNodes!==k(c)},St=function(c){if(!E||typeof c!="object"||c===null)return!1;try{return E(c)===ke.documentFragment}catch{return!1}},Ot=function(c){if(!E||typeof c!="object"||c===null)return!1;try{return typeof E(c)=="number"}catch{return!1}};function Oe(w,c,g){w.length!==0&&it(w,v=>{v.call(e,c,g,_t)})}let hs=function(c,g){return!!(rt&&c.hasChildNodes()&&!Ot(c.firstElementChild)&&ge(Va,c.textContent)&&ge(Va,c.innerHTML)||rt&&c.namespaceURI===ze&&al[g]&&(Ot(c.firstElementChild)||typeof c.textContent=="string"&&ge(ol[g],c.textContent))||c.nodeType===ke.processingInstruction||rt&&c.nodeType===ke.comment&&ge(ja,c.data))},pn=function(c,g){if(c instanceof RegExp)return ge(c,g);if(c instanceof Function){for(var v=arguments.length,S=new Array(v>2?v-2:0),C=2;C<v;C++)S[C-2]=arguments[C];return!!c(g,...S)}return!1},bs=function(c,g,v){if(!Nt[g]&&Ia(g)&&pn(Ne.tagNameCheck,g))return!1;if(Qn&&!vt[g]){let S=T(c),C=k(c);if(C&&S){let D=C.length;for(let F=D-1;F>=0;--F){let ae=c===v?f(C[F],!0):C[F];S.insertBefore(ae,y(c))}}}return Ge(c),!0},Ca=function(c,g,v,S){return c.length===0?g:g===v||g===S?ve(g):g},At=function(c,g){return c===g||T(c)!==null?!1:(er&&un(c),!0)},Ra=function(c,g){if(Oe(J.beforeSanitizeElements,c,null),At(c,g))return!0;if(fn(c))return Ge(c),!0;let v=ie($(c));if(K=Ca(J.uponSanitizeElement,K,Gn,nn),Oe(J.uponSanitizeElement,c,{tagName:v,allowedTags:K}),At(c,g))return!0;if(hs(c,v))return Ge(c),!0;if(Nt[v]||!(Ve.tagCheck instanceof Function&&Ve.tagCheck(v))&&!K[v]){let S=bs(c,v,g);return S===!1&&(Oe(J.afterSanitizeElements,c,null),At(c,g))?!0:S}if(Y(c)===ke.element&&!ps(c)||(v==="noscript"||v==="noembed"||v==="noframes")&&ge(nl,c.innerHTML))return Ge(c),!0;if(je&&c.nodeType===ke.text){let S=dn(c.textContent);c.textContent!==S&&(Ft(e.removed,{element:c.cloneNode()}),c.textContent=S)}return Oe(J.afterSanitizeElements,c,null),At(c,g)},Pa=function(c,g,v){if(sa[g]||Aa(g,c)||da&&(g==="id"||g==="name")&&(v in n||v in cs))return!1;let S=Z[g]||Ve.attributeCheck instanceof Function&&Ve.attributeCheck(g,c);return Jn&&ge(ts,g)||la&&ge(ns,g)?!0:S?ba[g]||ge(ia,Bt(v,oa,""))||(g==="src"||g==="xlink:href"||g==="href")&&c!=="script"&&Fa(v,"data:")===0&&ga[c]||ca&&!ge(rs,Bt(v,oa,""))?!0:!v:Ia(c)&&pn(Ne.tagNameCheck,c)&&pn(Ne.attributeNameCheck,g,c)||g==="is"&&Ne.allowCustomizedBuiltInElements&&pn(Ne.tagNameCheck,v)},xs=U({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ia=function(c){return!xs[$t(c)]&&ge(as,c)},ys=function(c,g,v,S){if(V&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!v)switch(p.getAttributeType(c,g)){case"TrustedHTML":return xt(S);case"TrustedScriptURL":return ji(S)}return S},ks=function(c,g,v,S){try{return v?c.setAttributeNS(v,g,S):c.setAttribute(g,S),fn(c)?(Ge(c),!1):!0}catch{return ot(g,c),!1}},Ma=function(c,g){if(Oe(J.beforeSanitizeAttributes,c,null),At(c,g))return;let v=c.attributes;if(!v||fn(c))return;Z=Ca(J.uponSanitizeAttribute,Z,Yn,rn);let S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},C=v.length,D=ie(c.nodeName);for(;C--;){let F=v[C],ae=F.name,Ee=F.namespaceURI,ye=F.value,Tt=ie(ae),lr=ye,be=ae==="value"?lr:Fs(lr),La=!1;if(S.attrName=Tt,S.attrValue=be,S.keepAttr=!0,S.forceKeepAttr=void 0,Oe(J.uponSanitizeAttribute,c,S),be=S.attrValue,fa&&(Tt==="id"||Tt==="name")&&Fa(be,pa)!==0&&(ot(ae,c,F),be=pa+be,La=!0),rt&&ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,be)){ot(ae,c,F);continue}if(Tt==="attributename"&&Oa(be,"href")){ot(ae,c,F);continue}if(!S.forceKeepAttr){if(!S.keepAttr){ot(ae,c,F);continue}if(!ua&&ge(rl,be)){ot(ae,c,F);continue}if(je&&(be=dn(be)),!Pa(D,Tt,be)){ot(ae,c,F);continue}be=ys(D,Tt,Ee,be),be!==lr&&ks(c,ae,Ee,be)&&La&&za(e.removed)}}Oe(J.afterSanitizeAttributes,c,null),At(c,g)},mn=function(c){let g=null,v=Ea(c);for(Oe(J.beforeSanitizeShadowDOM,c,null);g=v.nextNode();)if(Oe(J.uponSanitizeShadowNode,g,null),Ra(g,c),Ma(g,c),St(g.content)&&mn(g.content),Y(g)===ke.element){let S=x(g);St(S)&&(sr(S),mn(S))}Oe(J.afterSanitizeShadowDOM,c,null)},sr=function(c){let g=[{node:c,shadow:null}];for(;g.length>0;){let v=g.pop();if(v.shadow){mn(v.shadow);continue}let S=v.node,C=Y(S)===ke.element,D=k(S);if(D)for(let F=D.length-1;F>=0;--F)g.push({node:D[F],shadow:null});if(C){let F=R?R(S):null;if(typeof F=="string"&&ie(F)==="template"){let ae=S.content;St(ae)&&g.push({node:ae,shadow:null})}}if(C){let F=x(S);St(F)&&g.push({node:null,shadow:F},{node:F,shadow:null})}}};return e.sanitize=function(w){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,v=null,S=null,C=null;if(tr=!w,tr&&(w="<!-->"),typeof w!="string"&&!Ot(w)&&(w=Hs(w),typeof w!="string"))throw Ye("dirty is not a string, aborting");if(!e.isSupported)return w;Kn?(K=nn,Z=rn):or(c),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(K=ve(K)),J.uponSanitizeAttribute.length>0&&(Z=ve(Z)),e.removed=[];let D=er&&typeof w!="string"&&Ot(w);if(D){gs(w);let Ee=$(w);if(typeof Ee=="string"){let ye=ie(Ee);if(!K[ye]||Nt[ye])throw cn(w),Ye("root node is forbidden and cannot be sanitized in-place")}if(fn(w))throw cn(w),Ye("root node is clobbered and cannot be sanitized in-place");try{sr(w)}catch(ye){throw cn(w),ye}}else if(Ot(w))g=Ta("<!---->"),v=g.ownerDocument.importNode(w,!0),v.nodeType===ke.element&&v.nodeName==="BODY"||v.nodeName==="HTML"?g=v:g.appendChild(v),sr(g);else{if(!yt&&!je&&!at&&w.indexOf("<")===-1)return V&&on?xt(w):w;if(g=Ta(w),!g)return yt?null:on?oe:""}g&&Zn&&Ge(g.firstChild);let F=D?w:g;try{let Ee=Ea(F);for(;S=Ee.nextNode();)Ra(S,F),Ma(S,F),St(S.content)&&mn(S.content)}catch(Ee){throw D&&(cn(w),it(e.removed,ye=>{ye.element&&un(ye.element)})),Ee}if(D){let Ee=!1;if(it(e.removed,ye=>{ye.element&&(ye.element===w&&(Ee=!0),un(ye.element))}),Ee)throw Ye("a node selected for removal could not be safely returned; refusing to sanitize in place");return je&&ir(w),w}if(yt){if(je&&ir(g),an)for(C=Yi.call(g.ownerDocument);g.firstChild;)C.appendChild(g.firstChild);else C=g;return(Z.shadowroot||Z.shadowrootmode)&&(C=Ki.call(r,C,!0)),C}let ae=at?g.outerHTML:g.innerHTML;return at&&K["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&ge(el,g.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
3
|
-
`+
|
|
4
|
-
]`).replace("lheading",
|
|
1
|
+
"use strict";var __fxExtend=(()=>{var pr=Object.defineProperty;var Us=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var qs=Object.prototype.hasOwnProperty;var Hs=(t,e)=>{for(var n in e)pr(t,n,{get:e[n],enumerable:!0})},Ws=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of $s(e))!qs.call(t,a)&&a!==n&&pr(t,a,{get:()=>e[a],enumerable:!(r=Us(e,a))||r.enumerable});return t};var Xs=t=>Ws(pr({},"__esModule",{value:!0}),t);var hd={};Hs(hd,{dispose:()=>ds});function js(t,e){this.v=t,this.k=e}function Xa(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vs(t){if(Array.isArray(t))return t}function Ks(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,a,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Ys(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gs(t,e){return Vs(t)||Ks(t,e)||Js(t,e)||Ys()}function Js(t,e){if(t){if(typeof t=="string")return Xa(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xa(t,e):void 0}}function xn(t){var e,n;function r(i,s){try{var l=t[i](s),c=l.value,u=c instanceof js;Promise.resolve(u?c.v:c).then(function(m){if(u){var f=i==="return"&&c.k?i:"next";if(!c.k||m.done)return r(f,m);m=t[f](m).value}a(!!l.done,m)},function(m){r("throw",m)})}catch(m){a(2,m)}}function a(i,s){i===2?e.reject(s):e.resolve({value:s,done:i}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,c){var u={key:i,arg:s,resolve:l,reject:c,next:null};n?n=n.next=u:(e=n=u,r(i,s))})},typeof t.return!="function"&&(this.return=void 0)}xn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},xn.prototype.next=function(t){return this._invoke("next",t)},xn.prototype.throw=function(t){return this._invoke("throw",t)},xn.prototype.return=function(t){return this._invoke("return",t)};var io=Object.entries,ja=Object.setPrototypeOf,Zs=Object.isFrozen,Qs=Object.getPrototypeOf,el=Object.getOwnPropertyDescriptor,de=Object.freeze,pe=Object.seal,Rt=Object.create,so=typeof Reflect<"u"&&Reflect,yr=so.apply,vr=so.construct;de||(de=function(e){return e});pe||(pe=function(e){return e});yr||(yr=function(e,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];return e.apply(n,a)});vr||(vr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new e(...r)});var ut=ce(Array.prototype.forEach);Array.prototype.indexOf;var tl=ce(Array.prototype.lastIndexOf),Va=ce(Array.prototype.pop),Ut=ce(Array.prototype.push);Array.prototype.slice;var nl=ce(Array.prototype.splice),It=Array.isArray,Ht=ce(String.prototype.toLowerCase),fr=ce(String.prototype.toString),Ka=ce(String.prototype.match),$t=ce(String.prototype.replace),Ya=ce(String.prototype.indexOf),rl=ce(String.prototype.trim),al=ce(Number.prototype.toString),ol=ce(Boolean.prototype.toString),Ga=typeof BigInt>"u"?null:ce(BigInt.prototype.toString),Ja=typeof Symbol>"u"?null:ce(Symbol.prototype.toString),we=ce(Object.prototype.hasOwnProperty),qt=ce(Object.prototype.toString),be=ce(RegExp.prototype.test),Je=il(TypeError);function ce(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return yr(t,e,r)}}function il(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return vr(t,n)}}function $(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ht;if(ja&&ja(t,null),!It(e))return t;let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){let i=n(a);i!==a&&(Zs(e)||(e[r]=i),a=i)}t[a]=!0}return t}function sl(t){for(let e=0;e<t.length;e++)we(t,e)||(t[e]=null);return t}function Ae(t){let e=Rt(null);for(let r of io(t)){var n=Gs(r,2);let a=n[0],i=n[1];we(t,a)&&(It(i)?e[a]=sl(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=Ae(i):e[a]=i)}return e}function ll(t){switch(typeof t){case"string":return t;case"number":return al(t);case"boolean":return ol(t);case"bigint":return Ga?Ga(t):"0";case"symbol":return Ja?Ja(t):"Symbol()";case"undefined":return qt(t);case"function":case"object":{if(t===null)return qt(t);let e=t,n=Re(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:qt(r)}return qt(t)}default:return qt(t)}}function Re(t,e){for(;t!==null;){let r=el(t,e);if(r){if(r.get)return ce(r.get);if(typeof r.value=="function")return ce(r.value)}t=Qs(t)}function n(){return null}return n}function cl(t){try{return be(t,""),!0}catch{return!1}}var Za=de(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mr=de(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gr=de(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ul=de(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hr=de(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dl=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qa=de(["#text"]),eo=de(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),br=de(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),to=de(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yn=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pl=pe(/{{[\w\W]*|^[\w\W]*}}/g),fl=pe(/<%[\w\W]*|^[\w\W]*%>/g),ml=pe(/\${[\w\W]*/g),gl=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),hl=pe(/^aria-[\-\w]+$/),no=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bl=pe(/^(?:\w+script|data):/i),xl=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yl=pe(/^html$/i),vl=pe(/^[a-z][.\w]*(-[.\w]+)+$/i),ro=pe(/<[/\w!]/g),ao=pe(/<[/\w]/g),kl=pe(/<\/no(script|embed|frames)/i),wl=pe(/\/>/i),Se={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lo=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],_l=de($({},lo)),Sl=(function(){let t={};return ut(lo,e=>{t[e]=pe(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),de(t)})(),Al=function(){return typeof window>"u"?null:window},Tl=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));let i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},oo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ze=function(e,n,r,a){return we(e,n)&&It(e[n])?$(a.base?Ae(a.base):{},e[n],a.transform):r},xr=function(e,n,r){let a=we(e,n)?e[n]:void 0;return a&&typeof a=="object"?Ae(a):r()};function co(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Al(),e=w=>co(w);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==Se.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,a=r.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,s=t.Node,l=t.Element,c=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let u=t.DOMParser,m=t.trustedTypes,f=l.prototype,p=Re(f,"cloneNode"),b=Re(f,"remove"),g=Re(f,"removeAttributeNode"),y=Re(f,"nextSibling"),v=Re(f,"childNodes"),T=Re(f,"parentNode"),x=Re(f,"shadowRoot"),_=Re(f,"attributes"),C=s&&s.prototype?Re(s.prototype,"nodeType"):null,I=s&&s.prototype?Re(s.prototype,"nodeName"):null,U=s&&s.prototype?Re(s.prototype,"ownerDocument"):null,Z=function(d){return C?C(d):d.nodeType},q=function(d){return I?I(d):d.nodeName};if(typeof i=="function"){let w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let V,se="",ve,De=!1,Ue=0,vt=function(){if(Ue>0)throw Je('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},kt=function(d){vt(),Ue++;try{return V.createHTML(d)}finally{Ue--}},ps=function(d){vt(),Ue++;try{return V.createScriptURL(d)}finally{Ue--}},fs=function(){return De||(ve=Tl(m,a),De=!0),ve},an=n,Gn=an.implementation,ga=an.createNodeIterator,ms=an.createDocumentFragment,gs=an.getElementsByTagName,hs=r.importNode,Q=oo();e.isSupported=typeof io=="function"&&typeof T=="function"&&Gn&&Gn.createHTMLDocument!==void 0;let bs=pl,xs=fl,ys=ml,vs=gl,ks=hl,ws=bl,ha=xl,_s=vl,ba=no,ee=null,Jn=$({},[...Za,...mr,...gr,...hr,...Qa]),te=null,Zn=$({},[...eo,...br,...to,...yn]),Ne=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),zt=null,xa=null,Ke=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ya=!0,Qn=!0,va=!1,ka=!0,Ye=!1,st=!0,lt=!1,er=!1,on=null,sn=null,tr=!1,wt=!1,ln=!1,cn=!1,wa=!0,_a=!1,Sa="user-content-",nr=!0,rr=!1,_t={},St=null,Aa=$({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Ta=null,Ca=$({},["audio","video","img","source","image","track"]),Ea=null,Pa=$({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),un="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",Oe="http://www.w3.org/1999/xhtml",At=Oe,ar=!1,or=null,Ss=$({},[un,dn,Oe],fr),Ra=de(["mi","mo","mn","ms","mtext"]),ir=$({},Ra),Ia=de(["annotation-xml"]),sr=$({},Ia),As=$({},["title","style","font","a","script"]),Ft=null,Ts=["application/xhtml+xml","text/html"],Cs="text/html",le=null,Tt=null,Es=n.createElement("form"),Ma=function(d){return d instanceof RegExp||d instanceof Function},lr=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tt&&Tt===d)return;(!d||typeof d!="object")&&(d={}),d=Ae(d),Ft=Ts.indexOf(d.PARSER_MEDIA_TYPE)===-1?Cs:d.PARSER_MEDIA_TYPE,le=Ft==="application/xhtml+xml"?fr:Ht,ee=Ze(d,"ALLOWED_TAGS",Jn,{transform:le}),te=Ze(d,"ALLOWED_ATTR",Zn,{transform:le}),or=Ze(d,"ALLOWED_NAMESPACES",Ss,{transform:fr}),Ea=Ze(d,"ADD_URI_SAFE_ATTR",Pa,{transform:le,base:Pa}),Ta=Ze(d,"ADD_DATA_URI_TAGS",Ca,{transform:le,base:Ca}),St=Ze(d,"FORBID_CONTENTS",Aa,{transform:le}),zt=Ze(d,"FORBID_TAGS",Ae({}),{transform:le}),xa=Ze(d,"FORBID_ATTR",Ae({}),{transform:le}),_t=we(d,"USE_PROFILES")?d.USE_PROFILES&&typeof d.USE_PROFILES=="object"?Ae(d.USE_PROFILES):d.USE_PROFILES:!1,ya=d.ALLOW_ARIA_ATTR!==!1,Qn=d.ALLOW_DATA_ATTR!==!1,va=d.ALLOW_UNKNOWN_PROTOCOLS||!1,ka=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ye=d.SAFE_FOR_TEMPLATES||!1,st=d.SAFE_FOR_XML!==!1,lt=d.WHOLE_DOCUMENT||!1,wt=d.RETURN_DOM||!1,ln=d.RETURN_DOM_FRAGMENT||!1,cn=d.RETURN_TRUSTED_TYPE||!1,tr=d.FORCE_BODY||!1,wa=d.SANITIZE_DOM!==!1,_a=d.SANITIZE_NAMED_PROPS||!1,nr=d.KEEP_CONTENT!==!1,rr=d.IN_PLACE||!1,ba=cl(d.ALLOWED_URI_REGEXP)?d.ALLOWED_URI_REGEXP:no,At=typeof d.NAMESPACE=="string"?d.NAMESPACE:Oe,ir=xr(d,"MATHML_TEXT_INTEGRATION_POINTS",()=>$({},Ra)),sr=xr(d,"HTML_INTEGRATION_POINTS",()=>$({},Ia));let h=xr(d,"CUSTOM_ELEMENT_HANDLING",()=>Rt(null));if(Ne=Rt(null),we(h,"tagNameCheck")&&Ma(h.tagNameCheck)&&(Ne.tagNameCheck=h.tagNameCheck),we(h,"attributeNameCheck")&&Ma(h.attributeNameCheck)&&(Ne.attributeNameCheck=h.attributeNameCheck),we(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),pe(Ne),Ye&&(Qn=!1),ln&&(wt=!0),_t&&(ee=$({},Qa),te=Rt(null),_t.html===!0&&($(ee,Za),$(te,eo)),_t.svg===!0&&($(ee,mr),$(te,br),$(te,yn)),_t.svgFilters===!0&&($(ee,gr),$(te,br),$(te,yn)),_t.mathMl===!0&&($(ee,hr),$(te,to),$(te,yn))),Ke.tagCheck=null,Ke.attributeCheck=null,we(d,"ADD_TAGS")&&(typeof d.ADD_TAGS=="function"?Ke.tagCheck=d.ADD_TAGS:It(d.ADD_TAGS)&&(ee===Jn&&(ee=Ae(ee)),$(ee,d.ADD_TAGS,le))),we(d,"ADD_ATTR")&&(typeof d.ADD_ATTR=="function"?Ke.attributeCheck=d.ADD_ATTR:It(d.ADD_ATTR)&&(te===Zn&&(te=Ae(te)),$(te,d.ADD_ATTR,le))),we(d,"ADD_FORBID_CONTENTS")&&It(d.ADD_FORBID_CONTENTS)&&(St===Aa&&(St=Ae(St)),$(St,d.ADD_FORBID_CONTENTS,le)),nr&&(ee["#text"]=!0),lt&&$(ee,["html","head","body"]),ee.table&&($(ee,["tbody"]),delete zt.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let k=V;V=d.TRUSTED_TYPES_POLICY;try{se=kt("")}catch(S){throw V=k,S}}else d.TRUSTED_TYPES_POLICY===null?(V=void 0,se=""):(V===void 0&&(V=fs()),V&&typeof se=="string"&&(se=kt("")));de&&de(d),Tt=d},La=$({},[...mr,...gr,...ul]),Da=$({},[...hr,...dl]),Ps=function(d,h,k){return h.namespaceURI===Oe?d==="svg":h.namespaceURI===un?d==="svg"&&(k==="annotation-xml"||ir[k]):!!La[d]},Rs=function(d,h,k){return h.namespaceURI===Oe?d==="math":h.namespaceURI===dn?d==="math"&&sr[k]:!!Da[d]},Is=function(d,h,k){return h.namespaceURI===dn&&!sr[k]||h.namespaceURI===un&&!ir[k]?!1:!Da[d]&&(As[d]||!La[d])},Ms=function(d){let h=T(d);(!h||!h.tagName)&&(h={namespaceURI:At,tagName:"template"});let k=Ht(d.tagName),S=Ht(h.tagName);return or[d.namespaceURI]?d.namespaceURI===dn?Ps(k,h,S):d.namespaceURI===un?Rs(k,h,S):d.namespaceURI===Oe?Is(k,h,S):!!(Ft==="application/xhtml+xml"&&or[d.namespaceURI]):!1},Ge=function(d){Ut(e.removed,{element:d});try{T(d).removeChild(d)}catch{if(b(d),!T(d))throw Je("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Na=function(d,h,k){try{g(d,h)}catch{try{d.removeAttribute(k)}catch{}}},pn=function(d){fn(d);let h=v(d);if(h){let S=[];ut(h,E=>{Ut(S,E)}),ut(S,E=>{try{b(E)}catch{}})}let k=_(d);if(k)for(let S=k.length-1;S>=0;--S){let E=k[S],F=E&&E.name;typeof F=="string"&&Na(d,E,F)}},ct=function(d,h,k){if(!k)try{k=h.getAttributeNode(d)}catch{k=null}Ut(e.removed,{attribute:k||null,from:h});try{k?g(h,k):h.removeAttribute(d)}catch{try{h.removeAttribute(d)}catch{}}if(d==="is")if(wt||ln)try{Ge(h)}catch{}else try{h.setAttribute(d,"")}catch{}},Ls=function(d){let h=_(d);if(h)for(let k=h.length-1;k>=0;--k){let S=h[k],E=S&&S.name;typeof E!="string"||te[le(E)]||Na(d,S,E)}},fn=function(d){let h=[d];for(;h.length>0;){let k=h.pop();Z(k)===Se.element&&Ls(k);let S=v(k);if(S)for(let E=S.length-1;E>=0;--E)h.push(S[E])}},Oa=function(d,h){return st?d==="patchsrc"?!0:d==="for"&&h!=="label"&&h!=="output":!1},Ds=function(d){if(!st)return;let h=[d];for(;h.length>0;){let k=h.pop(),S=Z(k);if(S===Se.processingInstruction||S===Se.comment&&be(ao,k.data)){try{b(k)}catch{}continue}if(S===Se.element){let F=k,B=le(q(k));try{F.hasAttribute&&F.hasAttribute("patchsrc")&&F.removeAttribute("patchsrc"),F.hasAttribute&&F.hasAttribute("for")&&Oa("for",B)&&F.removeAttribute("for")}catch{}}let E=v(k);if(E)for(let F=E.length-1;F>=0;--F)h.push(E[F])}},za=function(d){let h=null,k=null;if(tr)d="<remove></remove>"+d;else{let F=Ka(d,/^[\r\n\t ]+/);k=F&&F[0]}Ft==="application/xhtml+xml"&&At===Oe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");let S=V?kt(d):d;if(At===Oe)try{h=new u().parseFromString(S,Ft)}catch{}if(!h||!h.documentElement){h=Gn.createDocument(At,"template",null);try{h.documentElement.innerHTML=ar?se:S}catch{}}let E=h.body||h.documentElement;return d&&k&&E.insertBefore(n.createTextNode(k),E.childNodes[0]||null),At===Oe?gs.call(h,lt?"html":"body")[0]:lt?h.documentElement:E},Fa=function(d){let h=U?U(d):d.ownerDocument;return ga.call(h||d,d,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mn=function(d){return d=$t(d,bs," "),d=$t(d,xs," "),d=$t(d,ys," "),d},cr=function(d){var h;d.normalize();let k=U?U(d):d.ownerDocument,S=ga.call(k||d,d,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),E=S.nextNode();for(;E;)E.data=mn(E.data),E=S.nextNode();let F=(h=d.querySelectorAll)===null||h===void 0?void 0:h.call(d,"template");F&&ut(F,B=>{Ct(B.content)&&cr(B.content)})},gn=function(d){let h=I?I(d):null;return typeof h!="string"||le(h)!=="form"?!1:typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||d.attributes!==_(d)||typeof d.removeAttribute!="function"||typeof d.removeAttributeNode!="function"||typeof d.getAttributeNode!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function"||d.nodeType!==C(d)||d.childNodes!==v(d)},Ct=function(d){if(!C||typeof d!="object"||d===null)return!1;try{return C(d)===Se.documentFragment}catch{return!1}},Bt=function(d){if(!C||typeof d!="object"||d===null)return!1;try{return typeof C(d)=="number"}catch{return!1}};function ze(w,d,h){w.length!==0&&ut(w,k=>{k.call(e,d,h,Tt)})}let Ns=function(d,h){return!!(st&&d.hasChildNodes()&&!Bt(d.firstElementChild)&&be(ro,d.textContent)&&be(ro,d.innerHTML)||st&&d.namespaceURI===Oe&&_l[h]&&(Bt(d.firstElementChild)||typeof d.textContent=="string"&&be(Sl[h],d.textContent))||d.nodeType===Se.processingInstruction||st&&d.nodeType===Se.comment&&be(ao,d.data))},hn=function(d,h){if(d instanceof RegExp)return be(d,h);if(d instanceof Function){for(var k=arguments.length,S=new Array(k>2?k-2:0),E=2;E<k;E++)S[E-2]=arguments[E];return!!d(h,...S)}return!1},Os=function(d,h,k){if(!zt[h]&&qa(h)&&hn(Ne.tagNameCheck,h))return!1;if(nr&&!St[h]){let S=T(d),E=v(d);if(E&&S){let F=E.length;for(let B=F-1;B>=0;--B){let oe=d===k?p(E[B],!0):E[B];S.insertBefore(oe,y(d))}}}return Ge(d),!0},Ba=function(d,h,k,S){return d.length===0?h:h===k||h===S?Ae(h):h},Et=function(d,h){return d===h||T(d)!==null?!1:(rr&&fn(d),!0)},Ua=function(d,h){if(ze(Q.beforeSanitizeElements,d,null),Et(d,h))return!0;if(gn(d))return Ge(d),!0;let k=le(q(d));if(ee=Ba(Q.uponSanitizeElement,ee,Jn,on),ze(Q.uponSanitizeElement,d,{tagName:k,allowedTags:ee}),Et(d,h))return!0;if(Ns(d,k))return Ge(d),!0;if(zt[k]||!(Ke.tagCheck instanceof Function&&Ke.tagCheck(k))&&!ee[k]){let S=Os(d,k,h);return S===!1&&(ze(Q.afterSanitizeElements,d,null),Et(d,h))?!0:S}if(Z(d)===Se.element&&!Ms(d)||(k==="noscript"||k==="noembed"||k==="noframes")&&be(kl,d.innerHTML))return Ge(d),!0;if(Ye&&d.nodeType===Se.text){let S=mn(d.textContent);d.textContent!==S&&(Ut(e.removed,{element:d.cloneNode()}),d.textContent=S)}return ze(Q.afterSanitizeElements,d,null),Et(d,h)},$a=function(d,h,k){if(xa[h]||Oa(h,d)||wa&&(h==="id"||h==="name")&&(k in n||k in Es))return!1;let S=te[h]||Ke.attributeCheck instanceof Function&&Ke.attributeCheck(h,d);return Qn&&be(vs,h)||ya&&be(ks,h)?!0:S?Ea[h]||be(ba,$t(k,ha,""))||(h==="src"||h==="xlink:href"||h==="href")&&d!=="script"&&Ya(k,"data:")===0&&Ta[d]||va&&!be(ws,$t(k,ha,""))?!0:!k:qa(d)&&hn(Ne.tagNameCheck,d)&&hn(Ne.attributeNameCheck,h,d)||h==="is"&&Ne.allowCustomizedBuiltInElements&&hn(Ne.tagNameCheck,k)},zs=$({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),qa=function(d){return!zs[Ht(d)]&&be(_s,d)},Fs=function(d,h,k,S){if(V&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!k)switch(m.getAttributeType(d,h)){case"TrustedHTML":return kt(S);case"TrustedScriptURL":return ps(S)}return S},Bs=function(d,h,k,S){try{return k?d.setAttributeNS(k,h,S):d.setAttribute(h,S),gn(d)?(Ge(d),!1):!0}catch{return ct(h,d),!1}},Ha=function(d,h){if(ze(Q.beforeSanitizeAttributes,d,null),Et(d,h))return;let k=d.attributes;if(!k||gn(d))return;te=Ba(Q.uponSanitizeAttribute,te,Zn,sn);let S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0},E=k.length,F=le(d.nodeName);for(;E--;){let B=k[E],oe=B.name,Pe=B.namespaceURI,_e=B.value,Pt=le(oe),dr=_e,ke=oe==="value"?dr:rl(dr),Wa=!1;if(S.attrName=Pt,S.attrValue=ke,S.keepAttr=!0,S.forceKeepAttr=void 0,ze(Q.uponSanitizeAttribute,d,S),ke=S.attrValue,_a&&(Pt==="id"||Pt==="name")&&Ya(ke,Sa)!==0&&(ct(oe,d,B),ke=Sa+ke,Wa=!0),st&&be(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ke)){ct(oe,d,B);continue}if(Pt==="attributename"&&Ka(ke,"href")){ct(oe,d,B);continue}if(!S.forceKeepAttr){if(!S.keepAttr){ct(oe,d,B);continue}if(!ka&&be(wl,ke)){ct(oe,d,B);continue}if(Ye&&(ke=mn(ke)),!$a(F,Pt,ke)){ct(oe,d,B);continue}ke=Fs(F,Pt,Pe,ke),ke!==dr&&Bs(d,oe,Pe,ke)&&Wa&&Va(e.removed)}}ze(Q.afterSanitizeAttributes,d,null),Et(d,h)},bn=function(d){let h=null,k=Fa(d);for(ze(Q.beforeSanitizeShadowDOM,d,null);h=k.nextNode();)if(ze(Q.uponSanitizeShadowNode,h,null),Ua(h,d),Ha(h,d),Ct(h.content)&&bn(h.content),Z(h)===Se.element){let S=x(h);Ct(S)&&(ur(S),bn(S))}ze(Q.afterSanitizeShadowDOM,d,null)},ur=function(d){let h=[{node:d,shadow:null}];for(;h.length>0;){let k=h.pop();if(k.shadow){bn(k.shadow);continue}let S=k.node,E=Z(S)===Se.element,F=v(S);if(F)for(let B=F.length-1;B>=0;--B)h.push({node:F[B],shadow:null});if(E){let B=I?I(S):null;if(typeof B=="string"&&le(B)==="template"){let oe=S.content;Ct(oe)&&h.push({node:oe,shadow:null})}}if(E){let B=x(S);Ct(B)&&h.push({node:null,shadow:B},{node:B,shadow:null})}}};return e.sanitize=function(w){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,k=null,S=null,E=null;if(ar=!w,ar&&(w="<!-->"),typeof w!="string"&&!Bt(w)&&(w=ll(w),typeof w!="string"))throw Je("dirty is not a string, aborting");if(!e.isSupported)return w;er?(ee=on,te=sn):lr(d),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(ee=Ae(ee)),Q.uponSanitizeAttribute.length>0&&(te=Ae(te)),e.removed=[];let F=rr&&typeof w!="string"&&Bt(w);if(F){Ds(w);let Pe=q(w);if(typeof Pe=="string"){let _e=le(Pe);if(!ee[_e]||zt[_e])throw pn(w),Je("root node is forbidden and cannot be sanitized in-place")}if(gn(w))throw pn(w),Je("root node is clobbered and cannot be sanitized in-place");try{ur(w)}catch(_e){throw pn(w),_e}}else if(Bt(w))h=za("<!---->"),k=h.ownerDocument.importNode(w,!0),k.nodeType===Se.element&&k.nodeName==="BODY"||k.nodeName==="HTML"?h=k:h.appendChild(k),ur(h);else{if(!wt&&!Ye&&!lt&&w.indexOf("<")===-1)return V&&cn?kt(w):w;if(h=za(w),!h)return wt?null:cn?se:""}h&&tr&&Ge(h.firstChild);let B=F?w:h;try{let Pe=Fa(B);for(;S=Pe.nextNode();)Ua(S,B),Ha(S,B),Ct(S.content)&&bn(S.content)}catch(Pe){throw F&&(pn(w),ut(e.removed,_e=>{_e.element&&fn(_e.element)})),Pe}if(F){let Pe=!1;if(ut(e.removed,_e=>{_e.element&&(_e.element===w&&(Pe=!0),fn(_e.element))}),Pe)throw Je("a node selected for removal could not be safely returned; refusing to sanitize in place");return Ye&&cr(w),w}if(wt){if(Ye&&cr(h),ln)for(E=ms.call(h.ownerDocument);h.firstChild;)E.appendChild(h.firstChild);else E=h;return(te.shadowroot||te.shadowrootmode)&&(E=hs.call(r,E,!0)),E}let oe=lt?h.outerHTML:h.innerHTML;return lt&&ee["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&be(yl,h.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
|
|
3
|
+
`+oe),Ye&&(oe=mn(oe)),V&&cn?kt(oe):oe},e.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lr(w),er=!0,on=ee,sn=te},e.clearConfig=function(){Tt=null,er=!1,on=null,sn=null,V=ve,se=""},e.isValidAttribute=function(w,d,h){Tt||lr({});let k=le(w),S=le(d);return $a(k,S,h)},e.addHook=function(w,d){typeof d=="function"&&we(Q,w)&&Ut(Q[w],d)},e.removeHook=function(w,d){if(we(Q,w)){if(d!==void 0){let h=tl(Q[w],d);return h===-1?void 0:nl(Q[w],h,1)[0]}return Va(Q[w])}},e.removeHooks=function(w){we(Q,w)&&(Q[w]=[])},e.removeAllHooks=function(){Q=oo()},e}var kr=co();function Ar(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ft=Ar();function ko(t){ft=t}var dt={exec:()=>null};function Mt(t){let e=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),a=e[r];return a||(a=t(r),e[r]=a),a}}function L(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(me.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var Cl=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),me={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Mt(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Mt(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Mt(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Mt(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Mt(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Vt})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Mt(t=>new RegExp(`^ {0,${t}}>`))},El=/^(?:[ \t]*(?:\n|$))+/,Pl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Il=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Tr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,wo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_o=L(wo).replace(/bull/g,Tr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ml=L(wo).replace(/bull/g,Tr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Cr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ll=/^[^\n]+/,Er=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Dl=L(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Er).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Nl=L(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Tr).getRegex(),Vt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Pr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ol=L("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Pr).replace("tag",Vt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),So=t=>L(Cr).replace("hr",jt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vt).getRegex(),zl=So(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Fl=So(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Bl=L(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fl).getRegex(),Rr={blockquote:Bl,code:Pl,def:Dl,fences:Rl,heading:Il,hr:jt,html:Ol,lheading:_o,list:Nl,newline:El,paragraph:zl,table:dt,text:Ll},uo=L("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vt).getRegex(),Ul={...Rr,lheading:Ml,table:uo,paragraph:L(Cr).replace("hr",jt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",uo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vt).getRegex()},$l={...Rr,html:L(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Pr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:dt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:L(Cr).replace("hr",jt).replace("heading",` *#{1,6} *[^
|
|
4
|
+
]`).replace("lheading",_o).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ql=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ao=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Wl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$e=/[\p{P}\p{S}]/u,Lt=/[\s\p{P}\p{S}]/u,Kt=/[^\s\p{P}\p{S}]/u,Xl=L(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lt).getRegex(),jl=/[\p{Pi}\p{Ps}"']/u,To=/(?!~)[\p{P}\p{S}]/u,Vl=/(?!~)[\s\p{P}\p{S}]/u,Kl=/(?:[^\s\p{P}\p{S}]|~)/u,Yl=L(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Co=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Gl=L(Co,"u").replace(/punct/g,$e).getRegex(),Jl=L(Co,"u").replace(/punct/g,To).getRegex(),Zl=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ql=L(Zl,"u").replace(/openQuote/g,jl).replace(/punct/g,$e).getRegex(),Eo="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ec=L(Eo,"gu").replace(/notPunctSpace/g,Kt).replace(/punctSpace/g,Lt).replace(/punct/g,$e).getRegex(),tc=L(Eo,"gu").replace(/notPunctSpace/g,Kl).replace(/punctSpace/g,Vl).replace(/punct/g,To).getRegex(),nc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",rc=L(nc,"gu").replace(/notPunctSpace/g,Kt).replace(/punctSpace/g,Lt).replace(/punct/g,$e).getRegex(),ac=L("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Kt).replace(/punctSpace/g,Lt).replace(/punct/g,$e).getRegex(),oc="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",ic=L(oc,"gu").replace(/notPunctSpace/g,Kt).replace(/punctSpace/g,Lt).replace(/punct/g,$e).getRegex(),sc=L(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$e).getRegex(),lc="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",cc=L(lc,"gu").replace(/notPunctSpace/g,Kt).replace(/punctSpace/g,Lt).replace(/punct/g,$e).getRegex(),uc=L(/\\(punct)/,"gu").replace(/punct/g,$e).getRegex(),dc=L(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pc=L(Pr).replace("(?:-->|$)","-->").getRegex(),fc=L("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Po=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,kn=L(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Po).getRegex(),mc=L(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",kn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gc=L(/^!?\[(label)\]\[(ref)\]/).replace("label",kn).replace("ref",Er).getRegex(),hc=L(/^!?\[(ref)\](?:\[\])?/).replace("ref",Er).getRegex(),po=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,bc=L(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Po).getRegex(),xc=L("reflink|nolink(?!\\()","g").replace("reflink",L(/^!?\[(label)\]\[(ref)\]/).replace("label",bc).replace("ref",po).getRegex()).replace("nolink",L(/^!?\[(ref)\](?:\[\])?/).replace("ref",po).getRegex()).getRegex(),fo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yc=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,vc=L(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,yc).getRegex(),Ir={_backpedal:dt,anyPunctuation:uc,autolink:dc,blockSkip:Yl,br:Ao,code:Hl,del:dt,delLDelim:dt,delRDelim:dt,emStrongLDelim:Gl,emStrongRDelimAst:ec,emStrongRDelimUnd:ac,escape:ql,link:mc,nolink:hc,punctuation:Xl,reflink:gc,reflinkSearch:xc,tag:fc,text:Wl,url:dt},kc={...Ir,emStrongLDelim:Ql,emStrongRDelimAst:rc,emStrongRDelimUnd:ic,link:L(/^!?\[(label)\]\((.*?)\)/).replace("label",kn).getRegex(),reflink:L(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kn).getRegex()},wr={...Ir,emStrongRDelimAst:tc,emStrongLDelim:Jl,delLDelim:sc,delRDelim:cc,url:L(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",vc).replace("protocol",fo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:L(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",fo).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},wc={...wr,br:L(Ao).replace("{2,}","*").getRegex(),text:L(wr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vn={normal:Rr,gfm:Ul,pedantic:$l},Wt={normal:Ir,gfm:wr,breaks:wc,pedantic:kc},_c={"&":"&","<":"<",">":">",'"':""","'":"'"},mo=t=>_c[t];function Te(t,e){if(e){if(me.escapeTest.test(t))return t.replace(me.escapeReplace,mo)}else if(me.escapeTestNoEncode.test(t))return t.replace(me.escapeReplaceNoEncode,mo);return t}function Sc(t){return t.replace(me.numericCharacterReference,(e,n,r)=>{let a=n===void 0?Number.parseInt(r,16):Number.parseInt(n,10);return a===0||a>1114111||a>=55296&&a<=57343?"\uFFFD":String.fromCodePoint(a)})}function go(t){try{t=encodeURI(t).replace(me.percentDecode,"%")}catch{return null}return t}function ho(t,e){let n=t.replace(me.findPipe,(i,s,l)=>{let c=!1,u=s;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(me.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(me.slashPipe,"|");return r}function Qe(t,e,n){let r=t.length;if(r===0)return"";let a=0;for(;a<r;){let i=t.charAt(r-a-1);if(i===e&&!n)a++;else if(i!==e&&n)a++;else break}return t.slice(0,r-a)}function bo(t){let e=t.split(`
|
|
5
5
|
`),n=e.length-1;for(;n>=0&&me.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
|
|
6
|
-
`)}function
|
|
6
|
+
`)}function wn(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Ac(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function xo(t,e=0){let n=e,r="";for(let a of t)if(a===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=a,n++;return r}function yo(t,e,n,r,a){let i=e.href,s=e.title||null,l=t[1].replace(a.other.outputLinkReplace,"$1"),c=t[0].charAt(0)==="!";r.state.inLink=!0;let u=r.state.linkEmitted,m=r.state.inRawBlock;r.state.linkEmitted=!1;let f=r.inlineTokens(l),p=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=!1,!c){if(p){r.state.inRawBlock=m;return}r.state.linkEmitted=!0}return{type:c?"image":"link",raw:n,href:i,title:s,text:l,tokens:f}}function Tc(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=r[1];return e.split(`
|
|
7
7
|
`).map(i=>{let s=i.match(n.other.beginningSpace);if(s===null)return i;let[l]=s;return i.slice(Math.min(l.length,a.length))}).join(`
|
|
8
|
-
`)}function
|
|
9
|
-
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:
|
|
10
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=
|
|
8
|
+
`)}function vo(t,e,n,r){if(!e.includes("<"))return!1;for(let a=0;a<e.length;a++){if(e[a]==="\\"){a++;continue}if(e[a]==="`"){let l=r.inline.code.exec(e.slice(a));if(l){a+=l[0].length-1;continue}}if(e[a]!=="<")continue;let i=t.slice(n+a),s=r.inline.tag.exec(i)||r.inline.autolink.exec(i);if(s){if(s[0].length>e.length-a)return!0;a+=s[0].length-1}}return!1}var _n=class{options;rules;lexer;constructor(t){this.options=t||ft}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:bo(e[0]),r=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:r}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=Tc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=Qe(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(n=r.trim())}return{type:"heading",raw:Qe(e[0],`
|
|
9
|
+
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Qe(e[0],`
|
|
10
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Qe(e[0],`
|
|
11
11
|
`).split(`
|
|
12
|
-
`),r="",a="",i=[];for(;n.length>0;){let s=!1,l=[],
|
|
13
|
-
`),
|
|
12
|
+
`),r="",a="",i=[];for(;n.length>0;){let s=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),s=!0;else if(!s)l.push(n[c]);else break;n=n.slice(c);let u=l.join(`
|
|
13
|
+
`),m=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
14
14
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
15
|
-
${
|
|
16
|
-
${
|
|
15
|
+
${u}`:u,a=a?`${a}
|
|
16
|
+
${m}`:m;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,i,!0),this.lexer.state.top=f,n.length===0)break;let p=i.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let b=p,g=n.join(`
|
|
17
17
|
`),y=b.raw+`
|
|
18
|
-
`+
|
|
18
|
+
`+g.replace(this.rules.other.blockquoteSetextReplace2,""),v=this.blockquote(y);i[i.length-1]=v;let T=y.substring(v.raw.length).replace(/^\n/,""),x=T?T.split(`
|
|
19
19
|
`).length:0,_=x?n.slice(0,-x):n;_.length>0&&(r=`${r}
|
|
20
20
|
${_.join(`
|
|
21
|
-
`)}`),a=a.substring(0,a.length-b.text.length)+
|
|
21
|
+
`)}`),a=a.substring(0,a.length-b.text.length)+v.text;break}else if(p?.type==="list"){let b=p,g=b.raw+`
|
|
22
22
|
`+n.join(`
|
|
23
|
-
`),y=this.list(
|
|
24
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:i,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),s=!1;for(;t;){let
|
|
25
|
-
`,1)[0],
|
|
26
|
-
`,1)[0],y=!b.trim(),
|
|
27
|
-
`,t=t.substring(
|
|
28
|
-
`,1)[0]
|
|
29
|
-
|
|
30
|
-
`+
|
|
31
|
-
`,t=t.substring(
|
|
32
|
-
`),href:r,title:a}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=
|
|
33
|
-
`):[],i={type:"table",raw:
|
|
34
|
-
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<n.length;s++)i.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:i.align[s]});for(let s of a)i.rows.push(
|
|
23
|
+
`),y=this.list(g);i[i.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,a=a.substring(0,a.length-b.raw.length)+y.raw,n=g.substring(i.at(-1).raw.length).split(`
|
|
24
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:i,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),s=!1;for(;t;){let c=!1,u="",m="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let f=e[2].split(`
|
|
25
|
+
`,1)[0],p=e[1].length,b=this.options.pedantic?xo(f,p):f.replace(this.rules.other.leadingSpaceTab,T=>xo(T,p)),g=t.split(`
|
|
26
|
+
`,1)[0],y=!b.trim(),v=0;if(this.options.pedantic?(v=2,m=b.trimStart()):y?v=p+1:(v=b.search(this.rules.other.nonSpaceChar),v=v>4?1:v,m=b.slice(v),v+=p),y&&this.rules.other.blankLine.test(g)&&(u+=g+`
|
|
27
|
+
`,t=t.substring(g.length+1),c=!0),!c){let T=this.rules.other.nextBulletRegex(v),x=this.rules.other.hrRegex(v),_=this.rules.other.fencesBeginRegex(v),C=this.rules.other.headingBeginRegex(v),I=this.rules.other.htmlBeginRegex(v),U=this.rules.other.blockquoteBeginRegex(v);for(;t;){let Z=t.split(`
|
|
28
|
+
`,1)[0],q;if(g=Z,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),q=g):q=g.replace(this.rules.other.leadingSpaceTab,V=>V.replace(this.rules.other.tabCharGlobal," ")),_.test(g)||C.test(g)||I.test(g)||U.test(g)||T.test(g)||x.test(g))break;if(q.search(this.rules.other.nonSpaceChar)>=v||!g.trim())m+=`
|
|
29
|
+
`+q.slice(v);else{if(y||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(b)||C.test(b)||x.test(b))break;m+=`
|
|
30
|
+
`+g}y=!g.trim(),u+=Z+`
|
|
31
|
+
`,t=t.substring(Z.length+1),b=q.slice(v)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0)),a.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),a.raw+=u}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let u=c.tokens.filter(f=>f.type==="space"),m=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=m}for(let c of a.items){let u=c.tokens[0];if(c.task&&(u?.type==="text"||u?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}let m=this.rules.other.listTaskCheckbox.exec(c.raw);if(m){let f={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};c.checked=f.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=f.raw+c.tokens[0].raw,c.tokens[0].text=f.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(f)):c.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):c.tokens.unshift(f)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return a}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=bo(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=wn(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:Qe(e[0],`
|
|
32
|
+
`),href:r,title:a}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=ho(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
33
|
+
`):[],i={type:"table",raw:Qe(e[0],`
|
|
34
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<n.length;s++)i.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:i.align[s]});for(let s of a)i.rows.push(ho(s,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:Qe(e[0],`
|
|
35
35
|
`),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
36
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&
|
|
36
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&vo(t,e[1],n,this.rules))return;let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Qe(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=Ac(e[2],"()");if(s===-2)return;if(s>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let a=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a=a.slice(1):a=a.slice(1,-1)),yo(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&vo(t,n[1],r,this.rules))return;let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[wn(a)];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return yo(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,i,s,l=a,c=0,u=r[0][0],m=n===u,f=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+a);(r=f.exec(e))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=[...i].length,r[3]||r[4]){l+=s;continue}else if(r[5]||r[6]){if(a%3&&!((a+s)%3)){c+=s;continue}if(m)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let p=[...r[0]][0].length,b=t.slice(0,a+r.index+p+s);if(Math.min(a,s)%2){let y=b.slice(1,-1);return{type:"em",raw:b,text:y,tokens:this.lexer.inlineTokens(y)}}let g=b.slice(2,-2);return{type:"strong",raw:b,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,i,s,l=a,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+a);(r=c.exec(e))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(s=[...i].length,s!==a))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let u=[...r[0]][0].length,m=t.slice(0,a+r.index+u+s),f=m.slice(a,-a);return{type:"del",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let a;do a=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(a!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:Sc(e[0]),escaped:n}}}},Ie=class _r{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ft,this.options.tokenizer=this.options.tokenizer||new _n,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let n={other:me,block:vn.normal,inline:Wt.normal};this.options.pedantic?(n.block=vn.pedantic,n.inline=Wt.pedantic):this.options.gfm&&(n.block=vn.gfm,this.options.breaks?n.inline=Wt.breaks:n.inline=Wt.gfm),this.tokenizer.rules=n}static get rules(){return{block:vn,inline:Wt}}static lex(e,n){return new _r(n).lex(e)}static lexInline(e,n){return new _r(n).inlineTokens(e)}lex(e){e=e.replace(me.carriageReturn,`
|
|
37
37
|
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(me.tabCharGlobal," ").replace(me.spaceLine,""));let a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
|
|
38
38
|
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
39
39
|
`)?"":`
|
|
@@ -41,15 +41,15 @@ ${_.join(`
|
|
|
41
41
|
`+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
42
42
|
`)?"":`
|
|
43
43
|
`)+i.raw,l.text+=`
|
|
44
|
-
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,
|
|
44
|
+
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,c=e.slice(1),u;this.options.extensions.startBlock.forEach(m=>{u=m.call({lexer:this},c),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(s=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
45
45
|
`)?"":`
|
|
46
46
|
`)+i.raw,l.text+=`
|
|
47
47
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
48
48
|
`)?"":`
|
|
49
49
|
`)+i.raw,l.text+=`
|
|
50
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let r of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(r[0])&&e.charAt(r.index-1)!=="!")return!0;for(let r of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let a=r[0],i=a.lastIndexOf("[");if(!(a.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,
|
|
51
|
-
`:"";return r?'<pre><code class="language-'+
|
|
52
|
-
`:"<pre><code>"+(n?a:
|
|
50
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let r of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(r[0])&&e.charAt(r.index-1)!=="!")return!0;for(let r of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let a=r[0],i=a.lastIndexOf("[");if(!(a.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,wn(a.slice(i+1,-1))))&&!(i>1&&this.linkInText(a.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let r=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,c=u=>{let m=u.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,wn(u.slice(m+1,-1))))return u;if(m>1&&u.charAt(0)!=="!"){let f=u.slice(1,m-1);if(this.linkInText(f))return"["+f.replace(l,c)+"]["+"a".repeat(u.length-m-2)+"]"}return"["+"a".repeat(u.length-2)+"]"};r=r.replace(l,c)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(l,c,u)=>{let m=u?u.length:0;return l.slice(0,m)+"["+"a".repeat(l.length-m-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,i="",s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(i=""),a=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},e,n))?(e=e.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let u=n.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(e,r,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(e,r,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),n.push(l);continue}let c=e;if(this.options.extensions?.startInline){let u=1/0,m=e.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},m),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),a=!0;let u=n.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},Sn=class{options;parser;constructor(t){this.options=t||ft}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(me.notSpaceStart)?.[0],a=t?t.replace(me.endingNewline,"")+`
|
|
51
|
+
`:"";return r?'<pre><code class="language-'+Te(r)+'">'+(n?a:Te(a,!0))+`</code></pre>
|
|
52
|
+
`:"<pre><code>"+(n?a:Te(a,!0))+`</code></pre>
|
|
53
53
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
54
54
|
${this.parser.parse(t)}</blockquote>
|
|
55
55
|
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
@@ -65,8 +65,8 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
65
65
|
`}tablerow({text:t}){return`<tr>
|
|
66
66
|
${t}</tr>
|
|
67
67
|
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
68
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${
|
|
69
|
-
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+we(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},lt=new Pr;function j(t,e){return lt.parse(t,e)}j.options=j.setOptions=function(t){return lt.setOptions(t),j.defaults=lt.defaults,co(j.defaults),j};j.getDefaults=wr;j.defaults=ct;function lc(...t){return lt.use(...t),j.defaults=lt.defaults,co(j.defaults),j}j.use=lc;j.walkTokens=function(t,e){return lt.walkTokens(t,e)};j.parseInline=lt.parseInline;j.Parser=Me;j.parser=Me.parse;j.Renderer=vn;j.TextRenderer=Rr;j.Lexer=Ie;j.lexer=Ie.lex;j.Tokenizer=kn;j.Hooks=Ht;j.parse=j;var Ku=j.options,Zu=j.setOptions,Qu=j.walkTokens,ed=j.parseInline;var td=Me.parse,nd=Ie.lex;var Rn,W,wo,cc,Ze,yo,_o,So,Ir,_n,jt,Ao,Nr,Mr,Lr,To,Tn={},En=[],uc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pn=Array.isArray;function $e(t,e){for(var n in e)t[n]=e[n];return t}function zr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function dc(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?Rn.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 Sn(t,s,r,a,null)}function Sn(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??++wo,__i:-1,__u:0};return a==null&&W.vnode!=null&&W.vnode(i),i}function q(t){return t.children}function An(t,e){this.props=t,this.context=e}function ut(t,e){if(e==null)return t.__?ut(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"?ut(t):null}function fc(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],a=[],i=$e({},e);i.__v=e.__v+1,W.vnode&&W.vnode(i),Or(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??ut(e),!!(32&e.__u),a),i.__v=e.__v,i.__.__k[i.__i]=i,Io(r,i,a),e.__e=e.__=null,i.__e!=n&&Eo(i)}}function Eo(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}),Eo(t)}function Dr(t){(!t.__d&&(t.__d=!0)&&Ze.push(t)&&!Cn.__r++||yo!=W.debounceRendering)&&((yo=W.debounceRendering)||_o)(Cn)}function Cn(){try{for(var t,e=1;Ze.length;)Ze.length>e&&Ze.sort(So),t=Ze.shift(),e=Ze.length,fc(t)}finally{Ze.length=Cn.__r=0}}function Co(t,e,n,r,a,i,s,l,u,d,p){var m,f,b,h,y,k,T=r&&r.__k||En,x=e.length;for(u=pc(n,e,T,u,x),m=0;m<x;m++)(b=n.__k[m])!=null&&(f=b.__i!=-1&&T[b.__i]||Tn,b.__i=m,k=Or(t,b,f,a,i,s,l,u,d,p),h=b.__e,b.ref&&f.ref!=b.ref&&(f.ref&&Fr(f.ref,null,b),p.push(b.ref,b.__c||h,b)),y==null&&h!=null&&(y=h),4&b.__u?(u=Ro(b,u,t),f.__e&&(f.__e=null)):typeof b.type=="function"&&k!==void 0?u=k:h&&(u=h.nextSibling),b.__u&=-7);return n.__e=y,u}function pc(t,e,n,r,a){var i,s,l,u,d,p=n.length,m=p,f=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]=Sn(null,s,null,null,null):Pn(s)?s=t.__k[i]=Sn(q,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=Sn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,u=i+f,s.__=t,s.__b=t.__b+1,l=null,(d=s.__i=mc(s,n,u,m))!=-1&&(m--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(a>p?f--:a<p&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?f--:d==u+1?f++:(d>u?f--:f++,s.__u|=4))):t.__k[i]=null;if(m)for(i=0;i<p;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=ut(l)),Lo(l,l));return r}function Ro(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=Ro(r[a],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=ut(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function mc(t,e,n,r){var a,i,s,l=t.key,u=t.type,d=e[n],p=d!=null&&(2&d.__u)==0;if(d===null&&l==null||p&&l==d.key&&u==d.type)return n;if(r>(p?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&&l==d.key&&u==d.type)return s}return-1}function ko(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||uc.test(e)?n:n+"px"}function wn(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||ko(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ko(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(Ao,"$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[jt]=r[jt]:(n[jt]=Nr,t.addEventListener(e,i?Lr:Mr,i)):t.removeEventListener(e,i?Lr:Mr,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 vo(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[_n]==null)e[_n]=Nr++;else if(e[_n]<n[jt])return;return n(W.event?W.event(e):e)}}}function Or(t,e,n,r,a,i,s,l,u,d){var p,m,f,b,h,y,k,T,x,_,E,R,B,Y,$,V,oe=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[l=e.__e=n.__e]),(p=W.__b)&&p(e);e:if(typeof oe=="function"){m=s.length;try{if(x=e.props,_=oe.prototype&&oe.prototype.render,E=(p=oe.contextType)&&r[p.__c],R=p?E?E.props.value:p.__:r,n.__c?T=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new oe(x,R):(e.__c=f=new An(x,R),f.constructor=oe,f.render=hc),E&&E.sub(f),f.state||(f.state={}),f.__n=r,b=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&oe.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=$e({},f.__s)),$e(f.__s,oe.getDerivedStateFromProps(x,f.__s))),h=f.props,y=f.state,f.__v=e,b)_&&oe.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&oe.getDerivedStateFromProps==null&&x!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,R),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,R)===!1){e.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(he){he&&(he.__=e)}),En.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f),l=ut(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,R),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,y,k)})}if(f.context=R,f.props=x,f.__P=t,f.__e=!1,B=W.__r,Y=0,_)f.state=f.__s,f.__d=!1,B&&B(e),p=f.render(f.props,f.state,f.context),En.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,B&&B(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++Y<25);f.state=f.__s,f.getChildContext!=null&&(r=$e($e({},r),f.getChildContext())),_&&!b&&f.getSnapshotBeforeUpdate!=null&&(k=f.getSnapshotBeforeUpdate(h,y)),$=p!=null&&p.type===q&&p.key==null?Mo(p.props.children):p,l=Co(t,Pn($)?$:[$],e,n,r,a,i,s,l,u,d),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),T&&(f.__E=f.__=null)}catch(he){if(s.length=m,e.__v=null,u||i!=null){if(he.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),e.__e=l}else if(i!=null)for(V=i.length;V--;)zr(i[V])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),he.then||Po(e),W.__e(he,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=gc(n.__e,e,n,r,a,i,s,u,d);return(p=W.diffed)&&p(e),128&e.__u?void 0:l}function Po(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Po))}function Io(t,e,n){for(var r=0;r<n.length;r++)Fr(n[r],n[++r],n[++r]);W.__c&&W.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){W.__e(i,a.__v)}})}function Mo(t){return typeof t!="object"||t==null||t.__b>0?t:Pn(t)?t.map(Mo):t.constructor!==void 0?null:$e({},t)}function gc(t,e,n,r,a,i,s,l,u){var d,p,m,f,b,h,y,k=n.props||Tn,T=e.props,x=e.type;if(x=="svg"?a="http://www.w3.org/2000/svg":x=="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((b=i[d])&&"setAttribute"in b==!!x&&(x?b.localName==x:b.nodeType==3)){t=b,i[d]=null;break}}if(t==null){if(x==null)return document.createTextNode(T);t=document.createElementNS(a,x,T.is&&T),l&&(W.__m&&W.__m(e,i),l=!1),i=null}if(x==null)k===T||l&&t.data==T||(t.data=T);else{if(i=x=="textarea"&&T.defaultValue!=null?null:i&&Rn.call(t.childNodes),!l&&i!=null)for(k={},d=0;d<t.attributes.length;d++)k[(b=t.attributes[d]).name]=b.value;for(d in k)b=k[d],d=="dangerouslySetInnerHTML"?m=b:d=="children"||d in T||d=="value"&&"defaultValue"in T||d=="checked"&&"defaultChecked"in T||wn(t,d,null,b,a);for(d in T)b=T[d],d=="children"?f=b:d=="dangerouslySetInnerHTML"?p=b:d=="value"?h=b:d=="checked"?y=b:l&&typeof b!="function"||k[d]===b||wn(t,d,b,k[d],a);if(p)l||m&&(p.__html==m.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(m&&(t.innerHTML=""),Co(e.type=="template"?t.content:t,Pn(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&ut(n,0),l,u),i!=null)for(d=i.length;d--;)zr(i[d]);l&&x!="textarea"||(d="value",x=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[d]||x=="progress"&&!h||x=="option"&&h!=k[d])&&wn(t,d,h,k[d],a),d="checked",y!=null&&y!=t[d]&&wn(t,d,y,k[d],a))}return t}function Fr(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){W.__e(a,n)}}function Lo(t,e,n){var r,a;if(W.unmount&&W.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Fr(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){W.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(a=0;a<r.length;a++)r[a]&&Lo(r[a],e,n||typeof t.type!="function");n||zr(t.__e),t.__c=t.__=t.__e=void 0}function hc(t,e,n){return this.constructor(t,n)}function It(t,e,n){var r,a,i,s;e==document&&(e=document.documentElement),W.__&&W.__(t,e),a=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],Or(e,t=(!r&&n||e).__k=dc(q,null,[t]),a||Tn,Tn,e.namespaceURI,!r&&n?[n]:a?null:e.firstChild?Rn.call(e.childNodes):null,i,!r&&n?n:a?a.__e:e.firstChild,r,s),Io(i,t,s),t.props.children=null}function Do(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,Dr(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"+To++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}Rn=En.slice,W={__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(l){t=l}throw t}},wo=0,cc=function(t){return t!=null&&t.constructor===void 0},An.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$e({},this.state),typeof t=="function"&&(t=t($e({},n),this.props)),t&&$e(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Dr(this))},An.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Dr(this))},An.prototype.render=q,Ze=[],_o=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,So=function(t,e){return t.__v.__b-e.__v.__b},Cn.__r=0,Ir=Math.random().toString(8),_n="__d"+Ir,jt="__a"+Ir,Ao=/(PointerCapture)$|Capture$/i,Nr=0,Mr=vo(!1),Lr=vo(!0),To=0;var Mt,te,Br,No,Gt=0,Ho=[],ce=W,zo=ce.__b,Oo=ce.__r,Fo=ce.diffed,Bo=ce.__c,Uo=ce.unmount,$o=ce.__;function Mn(t,e){ce.__h&&ce.__h(te,t,Gt||e),Gt=0;var n=te.__H||(te.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function A(t){return Gt=1,bc(Vo,t)}function bc(t,e,n){var r=Mn(Mt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Vo(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,l);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=te,!te.__f)){var a=function(l,u,d){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==l;if(r.__c.__H.__.some(function(b){if(b.__N){p=!0;var h=b.__[0];b.__=b.__N,b.__N=void 0,h!==b.__[0]&&(m=!0)}}),i){var f=i.call(this,l,u,d);return p?f||m:f}return!p||m};te.__f=!0;var i=te.shouldComponentUpdate,s=te.componentWillUpdate;te.componentWillUpdate=function(l,u,d){if(this.__e){var p=i;i=void 0,a(l,u,d),i=p}s&&s.call(this,l,u,d)},te.shouldComponentUpdate=a}return r.__N||r.__}function X(t,e){var n=Mn(Mt++,3);!ce.__s&&Xo(n.__H,e)&&(n.__=t,n.u=e,te.__H.__h.push(n))}function ne(t){return Gt=5,Qe(function(){return{current:t}},[])}function Qe(t,e){var n=Mn(Mt++,7);return Xo(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function et(t,e){return Gt=8,Qe(function(){return t},e)}function Wo(t){var e=te.context[t.__c],n=Mn(Mt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(te)),e.props.value):t.__}function xc(){for(var t;t=Ho.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(In),e.__h.some(Ur),e.__h=[]}catch(n){e.__h=[],ce.__e(n,t.__v)}}}ce.__b=function(t){te=null,zo&&zo(t)},ce.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),$o&&$o(t,e)},ce.__r=function(t){Oo&&Oo(t),Mt=0;var e=(te=t.__c).__H;e&&(Br===te?(e.__h=[],te.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(In),e.__h.some(Ur),e.__h=[],Mt=0)),Br=te},ce.diffed=function(t){Fo&&Fo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ho.push(e)!==1&&No===ce.requestAnimationFrame||((No=ce.requestAnimationFrame)||yc)(xc)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Br=te=null},ce.__c=function(t,e){e.some(function(n){try{n.__h.some(In),n.__h=n.__h.filter(function(r){return!r.__||Ur(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],ce.__e(r,n.__v)}}),Bo&&Bo(t,e)},ce.unmount=function(t){Uo&&Uo(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{In(r)}catch(a){e=a}}),n.__H=void 0,e&&ce.__e(e,n.__v))};var qo=typeof requestAnimationFrame=="function";function yc(t){var e,n=function(){clearTimeout(r),qo&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);qo&&(e=requestAnimationFrame(n))}function In(t){var e=te,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),te=e}function Ur(t){var e=te;t.__c=t.__(),te=e}function Xo(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Vo(t,e){return typeof e=="function"?e(t):e}var H=()=>typeof window<"u"&&window.tangu||{};function jo(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 $r=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function P(t,e={}){let n=H().cloudFetch;if(!n)return $r("no_bridge");try{return jo(await n({path:t,...e}))}catch(r){return $r(String(r?.message||r))}}async function Ln(t,e){if(!t)return e();try{return jo(await t())}catch(n){return $r(String(n?.message||n))}}var Dn=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Le(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function Nn(t){let e=H().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function zn(t){let e=H().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var kc=0;function o(t,e,n,r,a,i){e||(e={});var s,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?s=e[l]:u[l]=e[l];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--kc,__i:-1,__u:0,__source:a,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return W.vnode&&W.vnode(d),d}var vc={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",backpack:"M9 5V3h6v2 M6 8a6 6 0 0 1 12 0v12H6V8Z M9 13h6v5H9z M3 11h3v7H3z M18 11h3v7h-3 M10 8h4",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 z({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:vc[t]})})}function Yt({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 wc={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.backpack":"\u80CC\u5305","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","backpack.desc":"\u5728\u8FD9\u91CC\u67E5\u770B\u4F60\u83B7\u5F97\u7684\u7269\u54C1\uFF0C\u70B9\u51FB\u683C\u5B50\u67E5\u770B\u8BE6\u60C5\u3002","backpack.refresh":"\u5237\u65B0","backpack.total":"\u5171 {n} \u4EF6\u7269\u54C1","backpack.grid":"\u80CC\u5305\u7269\u54C1","backpack.slot":"{name}\uFF0C\u6570\u91CF {n}","backpack.item":"\u7269\u54C1","backpack.empty":"\u80CC\u5305\u8FD8\u662F\u7A7A\u7684","backpack.emptyHint":"\u5151\u6362\u6216\u83B7\u8D60\u7684\u7269\u54C1\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002","backpack.select":"\u70B9\u51FB\u7269\u54C1\u67E5\u770B\u8BE6\u60C5","backpack.details":"\u7269\u54C1\u8BE6\u60C5","backpack.quantity":"\u6301\u6709\u6570\u91CF","backpack.acquired":"\u83B7\u5F97\u65F6\u95F4","backpack.source":"\u83B7\u5F97\u65B9\u5F0F","backpack.source.points":"\u79EF\u5206\u5151\u6362","backpack.source.admin":"\u8D60\u9001","backpack.source.reward":"\u5956\u52B1","backpack.source.other":"\u4E91\u7AEF\u53D1\u653E","backpack.consumable":"\u6D88\u8017\u54C1","backpack.voucher":"\u5361\u5238","backpack.getCards":"\u5151\u6362\u91CD\u7F6E\u5361","backpack.manageCards":"\u4F7F\u7528\u6216\u5151\u6362","backpack.reveal":"\u67E5\u770B\u5361\u5BC6","backpack.copyKey":"\u590D\u5236\u5361\u5BC6","backpack.noKey":"\u8FD9\u4EF6\u7269\u54C1\u6CA1\u6709\u5361\u5BC6\u3002","backpack.use":"\u4F7F\u7528","backpack.confirmUse":"\u786E\u8BA4\u4F7F\u7528","backpack.consumeConfirm":"\u4F7F\u7528\u540E\u6D88\u8017 1 \u4EF6\u7269\u54C1\u3002","backpack.collectible":"\u7EAA\u5FF5\u54C1","backpack.effect.points":"+{n} \u79EF\u5206","backpack.effect.cards":"+{n} \u5F20\u91CD\u7F6E\u5361","backpack.effect.quota":"\u91CD\u7F6E\u4ECA\u65E5\u4E0E\u672C\u5468\u989D\u5EA6","backpack.rarity.common":"\u666E\u901A","backpack.rarity.rare":"\u7A00\u6709","backpack.rarity.epic":"\u53F2\u8BD7","backpack.rarity.legendary":"\u4F20\u8BF4","backpack.unavailable":"\u8FD9\u4EF6\u7269\u54C1\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u80CC\u5305\u3002","backpack.notUsable":"\u8FD9\u4EF6\u7269\u54C1\u4E0D\u80FD\u4F7F\u7528\u3002","backpack.quotaUnavailable":"\u8BF7\u5148\u4F7F\u7528\u4E91\u7AEF AI \u521D\u59CB\u5316\u989D\u5EA6\uFF0C\u518D\u4F7F\u7528\u8FD9\u4EF6\u7269\u54C1\u3002","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","ann.eyebrow":"FORSION \xB7 \u516C\u544A","ann.close":"\u5173\u95ED","ann.ok":"\u77E5\u9053\u4E86","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","diag.title":"\u8BCA\u65AD\u6570\u636E","diag.desc":"\u5E2E\u52A9\u6211\u4EEC\u6392\u67E5\u95EE\u9898\u3001\u6539\u8FDB Forsion\u3002\u9ED8\u8BA4\u5173\u95ED\u3002","diag.enable":"\u4E0A\u4F20\u8BCA\u65AD\u6570\u636E","diag.enableDesc":"\u6253\u5F00\u540E\uFF0C\u8FD9\u53F0\u7535\u8111\u4F1A\u5B9A\u671F\u4E0A\u4F20\u4E00\u4EFD Forsion \u4FE1\u606F\u5FEB\u7167\u5230\u4F60\u7684 Forsion \u8D26\u53F7\uFF0CForsion \u56E2\u961F\u53EF\u4EE5\u67E5\u770B\u3002\u591A\u4E45\u4E0A\u4F20\u4E00\u6B21\u7531 Forsion \u56E2\u961F\u8BBE\u5B9A\uFF0C\u9ED8\u8BA4\u6BCF\u5929\u4E00\u6B21\u3002\u968F\u65F6\u53EF\u4EE5\u5173\u95ED\u3002","diag.collected":"\u4F1A\u4E0A\u4F20","diag.item.app":"\u5E94\u7528\u4E0E\u7CFB\u7EDF\u7684\u7248\u672C\uFF0C\u8FD9\u53F0\u7535\u8111\u7684\u540D\u5B57","diag.item.settings":"\u6A21\u578B\u4E0E\u8BED\u97F3\u7684\u9009\u62E9\uFF0C\u540E\u53F0 Agent \u4E0E\u63D2\u4EF6\u8BBE\u7F6E\u91CC\u7684\u5F00\u5173\u548C\u6570\u503C\uFF0CMCP \u670D\u52A1\u4E0E\u6D88\u606F\u901A\u9053\u7684\u540D\u5B57\u548C\u5F00\u5173","diag.item.agents":"Agent \u4E0E\u56E2\u961F\u7684\u914D\u7F6E\uFF08\u63D0\u793A\u8BCD\u53EA\u8BB0\u957F\u5EA6\uFF0C\u4E0D\u5E26\u5185\u5BB9\uFF09","diag.item.plugins":"\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6\u3001\u6280\u80FD\u3001\u4E3B\u9898\u548C Space \u7684\u540D\u5B57\u4E0E\u7248\u672C","diag.notCollected":"\u4E0D\u4F1A\u4E0A\u4F20\uFF1A\u4FDD\u5B58\u5728\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u767B\u5F55\u51ED\u636E\u4E0E API \u5BC6\u94A5\u3001\u7B14\u8BB0\u6587\u4EF6\u3001Agent \u7684\u8BB0\u5FC6\u4E0E\u4EBA\u8BBE\u3001\u63D2\u4EF6\u6570\u636E\u3002","diag.sessions":"\u5305\u542B\u4F1A\u8BDD\u5185\u5BB9","diag.sessionsDesc":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u5BF9\u8BDD\uFF1A\u4F60\u548C Agent \u7684\u6D88\u606F\u6587\u5B57\u3001Agent \u7684\u601D\u8003\u8FC7\u7A0B\u548C\u7528\u5230\u7684\u5DE5\u5177\u540D\uFF0C\u5305\u62EC\u56E2\u961F\u6210\u5458\u3001\u8BA8\u8BBA\u3001\u59D4\u6D3E\u5728\u540E\u53F0\u505A\u7684\u90A3\u90E8\u5206\u3002\u6BCF\u6B21\u53EA\u4E0A\u4F20\u8FD8\u6CA1\u4E0A\u4F20\u8FC7\u7684\u90E8\u5206\uFF0C\u6700\u591A\u5F80\u524D 7 \u5929\u3002\u5DE5\u5177\u8BFB\u5199\u7684\u5185\u5BB9\u548C\u9644\u4EF6\u672C\u8EAB\u4E0D\u5E26\uFF1B\u6D88\u606F\u91CC\u51FA\u73B0\u7684\u6587\u4EF6\u540D\u3001Agent \u5728\u56DE\u590D\u91CC\u590D\u8FF0\u7684\u7B14\u8BB0\u6216\u6587\u4EF6\u5185\u5BB9\u4F1A\u5728\u5176\u4E2D\u3002\u5E38\u89C1\u683C\u5F0F\u7684\u5BC6\u94A5\u4F1A\u906E\u6389\uFF0C\u5176\u4F59\u539F\u6837\u4E0A\u4F20\u3002\u4E0D\u60F3\u63D0\u4F9B\u53EF\u4EE5\u5148\u5173\u6389\u518D\u6253\u5F00\u4E0A\u4F20\u3002","diag.activity":"\u5305\u542B\u6D3B\u52A8\u65E5\u5FD7","diag.activityDesc":"\u6D3B\u52A8\u8BB0\u5F55\u91CC\u6709\u5BF9\u8BDD\u5F00\u5934\u7684\u51E0\u5341\u4E2A\u5B57\u548C\u7B14\u8BB0\u6587\u4EF6\u540D\u3002\u6BCF\u6B21\u53EA\u4E0A\u4F20\u8FD8\u6CA1\u4E0A\u4F20\u8FC7\u7684\u90E8\u5206\uFF0C\u6700\u591A\u5F80\u524D 7 \u5929\u3002\u4E0D\u60F3\u63D0\u4F9B\u53EF\u4EE5\u5148\u5173\u6389\u518D\u6253\u5F00\u4E0A\u4F20\u3002","diag.last":"\u4E0A\u6B21\u4E0A\u4F20\uFF1A{time}","diag.noUpload":"\u8FD8\u6CA1\u6709\u4E0A\u4F20\u8FC7","diag.freq.hour":"\u6BCF\u5C0F\u65F6\u4E00\u6B21","diag.freq.hours":"\u6BCF {n} \u5C0F\u65F6\u4E00\u6B21","diag.freq.day":"\u6BCF\u5929\u4E00\u6B21","diag.freq.days":"\u6BCF {n} \u5929\u4E00\u6B21","diag.freq.manual":"Forsion \u56E2\u961F\u9700\u8981\u65F6\u624D\u91C7\u96C6","diag.retention":"\u4E91\u7AEF\u4FDD\u7559\u8FD9\u53F0\u7535\u8111\u6700\u8FD1 {n} \u5929\u7684\u5FEB\u7167\u3002\u5173\u95ED\u540E\u4E0D\u518D\u4E0A\u4F20\uFF1B\u5DF2\u4E0A\u4F20\u7684\u5FEB\u7167\u4ECD\u7559\u5728\u4E91\u7AEF\uFF0C\u9700\u8981\u5220\u9664\u53EF\u4EE5\u5728\u300C\u53CD\u9988\u300D\u91CC\u544A\u8BC9\u6211\u4EEC\u3002","diag.uploadNow":"\u7ACB\u5373\u4E0A\u4F20","diag.uploaded":"\u5DF2\u4E0A\u4F20","diag.failed":"\u4E0A\u4F20\u5931\u8D25\uFF1A{reason}","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","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","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"},_c={"page.account":"Account","page.quota":"Quota & points","page.backpack":"Backpack","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","backpack.desc":"View the items you have collected. Select a slot for details.","backpack.refresh":"Refresh","backpack.total":"{n} items","backpack.grid":"Backpack items","backpack.slot":"{name}, quantity {n}","backpack.item":"Item","backpack.empty":"Your backpack is empty","backpack.emptyHint":"Items you redeem or receive will appear here.","backpack.select":"Select an item to view details","backpack.details":"Item details","backpack.quantity":"Quantity","backpack.acquired":"Acquired","backpack.source":"Received through","backpack.source.points":"Points exchange","backpack.source.admin":"Gift","backpack.source.reward":"Reward","backpack.source.other":"Cloud account","backpack.consumable":"Consumable","backpack.voucher":"Voucher","backpack.getCards":"Redeem reset cards","backpack.manageCards":"Use or redeem","backpack.reveal":"Reveal key","backpack.copyKey":"Copy key","backpack.noKey":"This item has no key.","backpack.use":"Use","backpack.confirmUse":"Confirm use","backpack.consumeConfirm":"Using this item consumes one copy.","backpack.collectible":"Collectible","backpack.effect.points":"+{n} points","backpack.effect.cards":"+{n} reset cards","backpack.effect.quota":"Reset daily and weekly quota","backpack.rarity.common":"Common","backpack.rarity.rare":"Rare","backpack.rarity.epic":"Epic","backpack.rarity.legendary":"Legendary","backpack.unavailable":"This item is no longer available. Refresh your backpack.","backpack.notUsable":"This item cannot be used.","backpack.quotaUnavailable":"Use cloud AI to initialize your quota before using this item.","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","ann.eyebrow":"FORSION \xB7 Announcement","ann.close":"Close","ann.ok":"Got it","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","diag.title":"Diagnostic data","diag.desc":"Helps us troubleshoot problems and improve Forsion. Off by default.","diag.enable":"Upload diagnostic data","diag.enableDesc":"When this is on, this computer periodically uploads a snapshot of its Forsion setup to your Forsion account, where the Forsion team can view it. The Forsion team sets how often, once a day by default. You can turn it off at any time.","diag.collected":"What's uploaded","diag.item.app":"App and system versions, and this computer's name","diag.item.settings":"Your model and voice choices, the switches and numeric values in background agent and plugin settings, and the names and on/off state of MCP servers and message channels","diag.item.agents":"Agent and team configuration (prompts are recorded by length only, never their text)","diag.item.plugins":"Names and versions of installed plugins, skills, themes and Spaces","diag.notCollected":"Never uploaded: the sign-in credentials and API keys saved on this computer, your note files, agent memory and personas, or plugin data.","diag.sessions":"Include conversations","diag.sessionsDesc":"Conversations on this computer: the text of your messages and the agent's replies, the agent's reasoning and the names of the tools it used, including the background work of team members, discussions and delegated tasks. Each upload only includes what hasn't been uploaded yet, going back at most 7 days. What those tools read or wrote and the attachments themselves are left out; file names that appear in messages, and anything the agent repeated from your notes or files in its replies, are included. Keys in common formats are masked; everything else is uploaded as is. If you'd rather not share them, turn this off before you turn uploads on.","diag.activity":"Include activity log","diag.activityDesc":"Your activity records, which include the first few dozen characters of conversations and the names of note files. Each upload only includes what hasn't been uploaded yet, going back at most 7 days. If you'd rather not share them, turn this off before you turn uploads on.","diag.last":"Last upload: {time}","diag.noUpload":"Nothing uploaded yet","diag.freq.hour":"every hour","diag.freq.hours":"every {n} hours","diag.freq.day":"once a day","diag.freq.days":"every {n} days","diag.freq.manual":"only when the Forsion team requests it","diag.retention":"The cloud keeps this computer's snapshots from the last {n} days. Turning this off stops uploads; snapshots already uploaded stay in the cloud. To have them deleted, let us know under Feedback.","diag.uploadNow":"Upload now","diag.uploaded":"Uploaded","diag.failed":"Upload failed: {reason}","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":"Use points to get quota reset cards","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy 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"},Go={zh:wc,en:_c},qe=t=>t==="en"?"en":"zh";function qr(t,e,n){let r=Go[t][e]??Go.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):r}var On=t=>(e,n)=>qr(t,e,n),He=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var Yo=`
|
|
68
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Te(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:r,autolink:a}){let i=a?Te(n,!0):this.parser.parseInline(r),s=go(t);if(s===null)return i;t=Te(s,a);let l='<a href="'+t+'"';return e&&(l+=' title="'+Te(e)+'"'),l+=">"+i+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=go(t);if(a===null)return Te(n);t=a;let i=`<img src="${Te(t)}" alt="${Te(n)}"`;return e&&(i+=` title="${Te(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Te(t.text)}},Mr=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Me=class Sr{options;renderer;textRenderer;constructor(e){this.options=e||ft,this.options.renderer=this.options.renderer||new Sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mr}static parse(e,n){return new Sr(n).parse(e)}static parseInline(e,n){return new Sr(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let a=e[r];if(this.options.extensions?.renderers?.[a.type]){let s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){n+=l||"";continue}}let i=a;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let i=e[a];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}let s=i;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Xt=class{options;block;constructor(t){this.options=t||ft}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Ie.lex:Ie.lexInline}provideParser(t=this.block){return t?Me.parse:Me.parseInline}},Lr=class{defaults=Ar();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Me;Renderer=Sn;TextRenderer=Mr;Lexer=Ie;Tokenizer=_n;Hooks=Xt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let a=r;for(let i of a.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of a.rows)for(let s of i)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{let a=r;n=n.concat(this.walkTokens(a.items,e));break}default:{let a=r;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(i=>{let s=a[i].flat(1/0);n=n.concat(this.walkTokens(s,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=e.renderers[a.name];i?e.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[a.level];i?i.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),n.renderer){let a=this.defaults.renderer||new Sn(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,l=n.renderer[s],c=a[s];a[s]=(...u)=>{let m=l.apply(a,u);return m===!1&&(m=c.apply(a,u)),m||""}}r.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new _n(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,l=n.tokenizer[s],c=a[s];a[s]=(...u)=>{let m=l.apply(a,u);return m===!1&&(m=c.apply(a,u)),m}}r.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Xt;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,l=n.hooks[s],c=a[s];Xt.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async&&Xt.passThroughHooksRespectAsync.has(i))return(async()=>{let f=await l.call(a,u);return c.call(a,f)})();let m=l.call(a,u);return c.call(a,m)}:a[s]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,u);return f===!1&&(f=await c.apply(a,u)),f})();let m=l.apply(a,u);return m===!1&&(m=c.apply(a,u)),m}}r.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(i.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ie.lex(t,e??this.defaults)}parser(t,e){return Me.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},a={...this.defaults,...r},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(e):e,l=await(a.hooks?await a.hooks.provideLexer(t):t?Ie.lex:Ie.lexInline)(s,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let u=await(a.hooks?await a.hooks.provideParser(t):t?Me.parse:Me.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(u):u})().catch(i);try{a.hooks&&(e=a.hooks.preprocess(e));let s=(a.hooks?a.hooks.provideLexer(t):t?Ie.lex:Ie.lexInline)(e,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(t):t?Me.parse:Me.parseInline)(s,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(s){return i(s)}}}onError(t,e){return n=>{if(n.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Te(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},pt=new Lr;function K(t,e){return pt.parse(t,e)}K.options=K.setOptions=function(t){return pt.setOptions(t),K.defaults=pt.defaults,ko(K.defaults),K};K.getDefaults=Ar;K.defaults=ft;function Cc(...t){return pt.use(...t),K.defaults=pt.defaults,ko(K.defaults),K}K.use=Cc;K.walkTokens=function(t,e){return pt.walkTokens(t,e)};K.parseInline=pt.parseInline;K.Parser=Me;K.parser=Me.parse;K.Renderer=Sn;K.TextRenderer=Mr;K.Lexer=Ie;K.lexer=Ie.lex;K.Tokenizer=_n;K.Hooks=Xt;K.parse=K;var yd=K.options,vd=K.setOptions,kd=K.walkTokens,wd=K.parseInline;var _d=Me.parse,Sd=Ie.lex;var Mn,j,Lo,Ec,et,Ro,Do,No,Dr,Tn,Yt,Oo,Fr,Nr,Or,zo,Pn={},Rn=[],Pc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ln=Array.isArray;function qe(t,e){for(var n in e)t[n]=e[n];return t}function Br(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Rc(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?Mn.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 Cn(t,s,r,a,null)}function Cn(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??++Lo,__i:-1,__u:0};return a==null&&j.vnode!=null&&j.vnode(i),i}function z(t){return t.children}function En(t,e){this.props=t,this.context=e}function mt(t,e){if(e==null)return t.__?mt(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"?mt(t):null}function Ic(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],a=[],i=qe({},e);i.__v=e.__v+1,j.vnode&&j.vnode(i),Ur(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??mt(e),!!(32&e.__u),a),i.__v=e.__v,i.__.__k[i.__i]=i,qo(r,i,a),e.__e=e.__=null,i.__e!=n&&Fo(i)}}function Fo(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}),Fo(t)}function zr(t){(!t.__d&&(t.__d=!0)&&et.push(t)&&!In.__r++||Ro!=j.debounceRendering)&&((Ro=j.debounceRendering)||Do)(In)}function In(){try{for(var t,e=1;et.length;)et.length>e&&et.sort(No),t=et.shift(),e=et.length,Ic(t)}finally{et.length=In.__r=0}}function Bo(t,e,n,r,a,i,s,l,c,u,m){var f,p,b,g,y,v,T=r&&r.__k||Rn,x=e.length;for(c=Mc(n,e,T,c,x),f=0;f<x;f++)(b=n.__k[f])!=null&&(p=b.__i!=-1&&T[b.__i]||Pn,b.__i=f,v=Ur(t,b,p,a,i,s,l,c,u,m),g=b.__e,b.ref&&p.ref!=b.ref&&(p.ref&&$r(p.ref,null,b),m.push(b.ref,b.__c||g,b)),y==null&&g!=null&&(y=g),4&b.__u?(c=Uo(b,c,t),p.__e&&(p.__e=null)):typeof b.type=="function"&&v!==void 0?c=v:g&&(c=g.nextSibling),b.__u&=-7);return n.__e=y,c}function Mc(t,e,n,r,a){var i,s,l,c,u,m=n.length,f=m,p=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]=Cn(null,s,null,null,null):Ln(s)?s=t.__k[i]=Cn(z,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=Cn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,c=i+p,s.__=t,s.__b=t.__b+1,l=null,(u=s.__i=Lc(s,n,c,f))!=-1&&(f--,(l=n[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(a>m?p--:a<m&&p++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?p--:u==c+1?p++:(u>c?p--:p++,s.__u|=4))):t.__k[i]=null;if(f)for(i=0;i<m;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=mt(l)),Wo(l,l));return r}function Uo(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=Uo(r[a],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=mt(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Lc(t,e,n,r){var a,i,s,l=t.key,c=t.type,u=e[n],m=u!=null&&(2&u.__u)==0;if(u===null&&l==null||m&&l==u.key&&c==u.type)return n;if(r>(m?1:0)){for(a=n-1,i=n+1;a>=0||i<e.length;)if((u=e[s=a>=0?a--:i++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function Io(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Pc.test(e)?n:n+"px"}function An(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||Io(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Io(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(Oo,"$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[Yt]=r[Yt]:(n[Yt]=Fr,t.addEventListener(e,i?Or:Nr,i)):t.removeEventListener(e,i?Or:Nr,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 Mo(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Tn]==null)e[Tn]=Fr++;else if(e[Tn]<n[Yt])return;return n(j.event?j.event(e):e)}}}function Ur(t,e,n,r,a,i,s,l,c,u){var m,f,p,b,g,y,v,T,x,_,C,I,U,Z,q,V,se=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=e.__e=n.__e]),(m=j.__b)&&m(e);e:if(typeof se=="function"){f=s.length;try{if(x=e.props,_=se.prototype&&se.prototype.render,C=(m=se.contextType)&&r[m.__c],I=m?C?C.props.value:m.__:r,n.__c?T=(p=e.__c=n.__c).__=p.__E:(_?e.__c=p=new se(x,I):(e.__c=p=new En(x,I),p.constructor=se,p.render=Nc),C&&C.sub(p),p.state||(p.state={}),p.__n=r,b=p.__d=!0,p.__h=[],p._sb=[]),_&&p.__s==null&&(p.__s=p.state),_&&se.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=qe({},p.__s)),qe(p.__s,se.getDerivedStateFromProps(x,p.__s))),g=p.props,y=p.state,p.__v=e,b)_&&se.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),_&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(_&&se.getDerivedStateFromProps==null&&x!==g&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(x,I),e.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(x,p.__s,I)===!1){e.__v!=n.__v&&(p.props=x,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(ve){ve&&(ve.__=e)}),Rn.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),l=mt(n);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(x,p.__s,I),_&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(g,y,v)})}if(p.context=I,p.props=x,p.__P=t,p.__e=!1,U=j.__r,Z=0,_)p.state=p.__s,p.__d=!1,U&&U(e),m=p.render(p.props,p.state,p.context),Rn.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,U&&U(e),m=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++Z<25);p.state=p.__s,p.getChildContext!=null&&(r=qe(qe({},r),p.getChildContext())),_&&!b&&p.getSnapshotBeforeUpdate!=null&&(v=p.getSnapshotBeforeUpdate(g,y)),q=m!=null&&m.type===z&&m.key==null?Ho(m.props.children):m,l=Bo(t,Ln(q)?q:[q],e,n,r,a,i,s,l,c,u),p.base=e.__e,e.__u&=-161,p.__h.length&&s.push(p),T&&(p.__E=p.__=null)}catch(ve){if(s.length=f,e.__v=null,c||i!=null){if(ve.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),e.__e=l}else if(i!=null)for(V=i.length;V--;)Br(i[V])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),ve.then||$o(e),j.__e(ve,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=Dc(n.__e,e,n,r,a,i,s,c,u);return(m=j.diffed)&&m(e),128&e.__u?void 0:l}function $o(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some($o))}function qo(t,e,n){for(var r=0;r<n.length;r++)$r(n[r],n[++r],n[++r]);j.__c&&j.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){j.__e(i,a.__v)}})}function Ho(t){return typeof t!="object"||t==null||t.__b>0?t:Ln(t)?t.map(Ho):t.constructor!==void 0?null:qe({},t)}function Dc(t,e,n,r,a,i,s,l,c){var u,m,f,p,b,g,y,v=n.props||Pn,T=e.props,x=e.type;if(x=="svg"?a="http://www.w3.org/2000/svg":x=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((b=i[u])&&"setAttribute"in b==!!x&&(x?b.localName==x:b.nodeType==3)){t=b,i[u]=null;break}}if(t==null){if(x==null)return document.createTextNode(T);t=document.createElementNS(a,x,T.is&&T),l&&(j.__m&&j.__m(e,i),l=!1),i=null}if(x==null)v===T||l&&t.data==T||(t.data=T);else{if(i=x=="textarea"&&T.defaultValue!=null?null:i&&Mn.call(t.childNodes),!l&&i!=null)for(v={},u=0;u<t.attributes.length;u++)v[(b=t.attributes[u]).name]=b.value;for(u in v)b=v[u],u=="dangerouslySetInnerHTML"?f=b:u=="children"||u in T||u=="value"&&"defaultValue"in T||u=="checked"&&"defaultChecked"in T||An(t,u,null,b,a);for(u in T)b=T[u],u=="children"?p=b:u=="dangerouslySetInnerHTML"?m=b:u=="value"?g=b:u=="checked"?y=b:l&&typeof b!="function"||v[u]===b||An(t,u,b,v[u],a);if(m)l||f&&(m.__html==f.__html||m.__html==t.innerHTML)||(t.innerHTML=m.__html),e.__k=[];else if(f&&(t.innerHTML=""),Bo(e.type=="template"?t.content:t,Ln(p)?p:[p],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&mt(n,0),l,c),i!=null)for(u=i.length;u--;)Br(i[u]);l&&x!="textarea"||(u="value",x=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[u]||x=="progress"&&!g||x=="option"&&g!=v[u])&&An(t,u,g,v[u],a),u="checked",y!=null&&y!=t[u]&&An(t,u,y,v[u],a))}return t}function $r(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){j.__e(a,n)}}function Wo(t,e,n){var r,a;if(j.unmount&&j.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||$r(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){j.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(a=0;a<r.length;a++)r[a]&&Wo(r[a],e,n||typeof t.type!="function");n||Br(t.__e),t.__c=t.__=t.__e=void 0}function Nc(t,e,n){return this.constructor(t,n)}function tt(t,e,n){var r,a,i,s;e==document&&(e=document.documentElement),j.__&&j.__(t,e),a=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],Ur(e,t=(!r&&n||e).__k=Rc(z,null,[t]),a||Pn,Pn,e.namespaceURI,!r&&n?[n]:a?null:e.firstChild?Mn.call(e.childNodes):null,i,!r&&n?n:a?a.__e:e.firstChild,r,s),qo(i,t,s),t.props.children=null}function Xo(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,zr(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"+zo++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}Mn=Rn.slice,j={__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(l){t=l}throw t}},Lo=0,Ec=function(t){return t!=null&&t.constructor===void 0},En.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=qe({},this.state),typeof t=="function"&&(t=t(qe({},n),this.props)),t&&qe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),zr(this))},En.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),zr(this))},En.prototype.render=z,et=[],Do=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(t,e){return t.__v.__b-e.__v.__b},In.__r=0,Dr=Math.random().toString(8),Tn="__d"+Dr,Yt="__a"+Dr,Oo=/(PointerCapture)$|Capture$/i,Fr=0,Nr=Mo(!1),Or=Mo(!0),zo=0;var Dt,re,qr,jo,Gt=0,ei=[],ue=j,Vo=ue.__b,Ko=ue.__r,Yo=ue.diffed,Go=ue.__c,Jo=ue.unmount,Zo=ue.__;function Nn(t,e){ue.__h&&ue.__h(re,t,Gt||e),Gt=0;var n=re.__H||(re.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function A(t){return Gt=1,Oc(ri,t)}function Oc(t,e,n){var r=Nn(Dt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):ri(void 0,e),function(l){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,l);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=re,!re.__f)){var a=function(l,c,u){if(!r.__c.__H)return!0;var m=!1,f=r.__c.props!==l;if(r.__c.__H.__.some(function(b){if(b.__N){m=!0;var g=b.__[0];b.__=b.__N,b.__N=void 0,g!==b.__[0]&&(f=!0)}}),i){var p=i.call(this,l,c,u);return m?p||f:p}return!m||f};re.__f=!0;var i=re.shouldComponentUpdate,s=re.componentWillUpdate;re.componentWillUpdate=function(l,c,u){if(this.__e){var m=i;i=void 0,a(l,c,u),i=m}s&&s.call(this,l,c,u)},re.shouldComponentUpdate=a}return r.__N||r.__}function W(t,e){var n=Nn(Dt++,3);!ue.__s&&ni(n.__H,e)&&(n.__=t,n.u=e,re.__H.__h.push(n))}function Y(t){return Gt=5,nt(function(){return{current:t}},[])}function nt(t,e){var n=Nn(Dt++,7);return ni(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function rt(t,e){return Gt=8,nt(function(){return t},e)}function ti(t){var e=re.context[t.__c],n=Nn(Dt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(re)),e.props.value):t.__}function zc(){for(var t;t=ei.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Dn),e.__h.some(Hr),e.__h=[]}catch(n){e.__h=[],ue.__e(n,t.__v)}}}ue.__b=function(t){re=null,Vo&&Vo(t)},ue.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Zo&&Zo(t,e)},ue.__r=function(t){Ko&&Ko(t),Dt=0;var e=(re=t.__c).__H;e&&(qr===re?(e.__h=[],re.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Dn),e.__h.some(Hr),e.__h=[],Dt=0)),qr=re},ue.diffed=function(t){Yo&&Yo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ei.push(e)!==1&&jo===ue.requestAnimationFrame||((jo=ue.requestAnimationFrame)||Fc)(zc)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),qr=re=null},ue.__c=function(t,e){e.some(function(n){try{n.__h.some(Dn),n.__h=n.__h.filter(function(r){return!r.__||Hr(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],ue.__e(r,n.__v)}}),Go&&Go(t,e)},ue.unmount=function(t){Jo&&Jo(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Dn(r)}catch(a){e=a}}),n.__H=void 0,e&&ue.__e(e,n.__v))};var Qo=typeof requestAnimationFrame=="function";function Fc(t){var e,n=function(){clearTimeout(r),Qo&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Qo&&(e=requestAnimationFrame(n))}function Dn(t){var e=re,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),re=e}function Hr(t){var e=re;t.__c=t.__(),re=e}function ni(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function ri(t,e){return typeof e=="function"?e(t):e}var X=()=>typeof window<"u"&&window.tangu||{};function ai(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 Wr=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function P(t,e={}){let n=X().cloudFetch;if(!n)return Wr("no_bridge");try{return ai(await n({path:t,...e}))}catch(r){return Wr(String(r?.message||r))}}async function On(t,e){if(!t)return e();try{return ai(await t())}catch(n){return Wr(String(n?.message||n))}}var gt=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Le(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function Nt(t,e,n){let r=X().cloudInvoke;if(!r)return!1;let a=t==="membership"&&e?n?[t,e,n]:[t,e]:[t];try{return!!(await r("auth:openPayCenter",...a))?.ok}catch{return!1}}async function zn(t){let e=X().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var Bc=0;function o(t,e,n,r,a,i){e||(e={});var s,l,c=e;if("ref"in c)for(l in c={},e)l=="ref"?s=e[l]:c[l]=e[l];var u={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Bc,__i:-1,__u:0,__source:a,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return j.vnode&&j.vnode(u),u}var Uc={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",backpack:"M9 5V3h6v2 M6 8a6 6 0 0 1 12 0v12H6V8Z M9 13h6v5H9z M3 11h3v7H3z M18 11h3v7h-3 M10 8h4",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 O({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:Uc[t]})})}function Jt({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 $c={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.backpack":"\u80CC\u5305","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","store.group":"\u4F1A\u5458\u4E0E\u79EF\u5206","store.membership":"\u4F1A\u5458","store.membership.desc":"\u5347\u7EA7\u6863\u4F4D\uFF0C\u83B7\u5F97\u66F4\u591A\u6BCF\u65E5\u4E0E\u6BCF\u5468\u989D\u5EA6","store.points":"\u79EF\u5206","store.points.desc":"\u5145\u503C\u79EF\u5206\uFF0C\u7528\u6765\u5151\u6362\u7269\u54C1","store.items":"\u7269\u54C1","store.items.desc":"\u7528\u79EF\u5206\u5151\u6362\u7684\u7269\u54C1\uFF0C\u5151\u6362\u540E\u8FDB\u80CC\u5305","store.status":"\u6863\u4F4D\u4E0E\u79EF\u5206","store.tier":"\u5F53\u524D\u6863\u4F4D","store.balance":"\u79EF\u5206\u4F59\u989D","store.choosePlan":"\u9009\u62E9\u6863\u4F4D","store.payHint":"\u4ED8\u6B3E\u5728\u6D4F\u89C8\u5668\u7684\u652F\u4ED8\u9875\u5B8C\u6210\uFF0C\u56DE\u5230\u5E94\u7528\u540E\u81EA\u52A8\u5237\u65B0","store.payOff":"\u6682\u65F6\u4E0D\u80FD\u8D2D\u4E70","store.period":"\u4ED8\u8D39\u5468\u671F","store.period.monthly":"\u6708\u4ED8","store.period.quarterly":"\u5B63\u4ED8","store.period.yearly":"\u5E74\u4ED8","store.per.monthly":"/ \u6708","store.per.quarterly":"/ \u5B63","store.per.yearly":"/ \u5E74","store.currentTier":"\u5F53\u524D\u6863\u4F4D","store.pay":"\u53BB\u652F\u4ED8","store.payPrice":"{price} \u53BB\u652F\u4ED8","store.noPlans":"\u6682\u65F6\u6CA1\u6709\u53EF\u9009\u7684\u6863\u4F4D","store.packs":"\u79EF\u5206\u5305","store.packsHint":"\u4ED8\u6B3E\u5728\u6D4F\u89C8\u5668\u7684\u652F\u4ED8\u9875\u5B8C\u6210\uFF0C\u4ED8\u6B3E\u540E\u79EF\u5206\u5373\u65F6\u5230\u8D26","store.noPacks":"\u6682\u65F6\u6CA1\u6709\u79EF\u5206\u5305","store.kind.pack":"\u79EF\u5206\u5305","store.kind.card":"\u9053\u5177","store.kind.code":"\u5151\u6362\u7801","store.kind.item":"\u7269\u54C1","store.nPoints":"{n} \u79EF\u5206","store.instant":"\u4ED8\u6B3E\u540E\u5373\u65F6\u5230\u8D26","store.redeemTitle":"\u79EF\u5206\u5151\u6362","store.redeemHint":"\u7528\u79EF\u5206\u5151\u6362\u5728\u5E94\u7528\u5185\u76F4\u63A5\u5B8C\u6210\uFF0C\u5151\u6362\u540E\u7269\u54C1\u8FDB\u80CC\u5305","store.redeem":"{n} \u79EF\u5206\u5151\u6362","store.redeemConfirm":"\u786E\u8BA4\u82B1 {n} \u79EF\u5206","store.redeemed":"\u5DF2\u5151\u6362\uFF0C\u7269\u54C1\u5728\u80CC\u5305\u91CC","store.uncertain":"\u6CA1\u6536\u5230\u7ED3\u679C\u3002\u5148\u5230\u80CC\u5305\u770B\u4E00\u4E0B\u6709\u6CA1\u6709\u5230\u8D26\uFF0C\u518D\u51B3\u5B9A\u8981\u4E0D\u8981\u91CD\u8BD5\u3002","store.soldOut":"\u5DF2\u552E\u7F44","store.left":"\u4F59 {n}","store.toBackpack":"\u5151\u6362\u540E\u8FDB\u80CC\u5305","store.limitReached":"\u5DF2\u8FBE\u8D2D\u4E70\u4E0A\u9650","store.unavailable":"\u8FD9\u4EF6\u7269\u54C1\u6682\u65F6\u4E0D\u80FD\u5151\u6362","store.noItems":"\u6682\u65F6\u6CA1\u6709\u53EF\u5151\u6362\u7684\u7269\u54C1","store.itemsOff":"\u7269\u54C1\u5151\u6362\u6682\u672A\u5F00\u653E","store.openBackpack":"\u6253\u5F00\u80CC\u5305","backpack.desc":"\u5728\u8FD9\u91CC\u67E5\u770B\u4F60\u83B7\u5F97\u7684\u7269\u54C1\uFF0C\u70B9\u51FB\u683C\u5B50\u67E5\u770B\u8BE6\u60C5\u3002","backpack.refresh":"\u5237\u65B0","backpack.total":"\u5171 {n} \u4EF6\u7269\u54C1","backpack.grid":"\u80CC\u5305\u7269\u54C1","backpack.slot":"{name}\uFF0C\u6570\u91CF {n}","backpack.item":"\u7269\u54C1","backpack.empty":"\u80CC\u5305\u8FD8\u662F\u7A7A\u7684","backpack.emptyHint":"\u5151\u6362\u6216\u83B7\u8D60\u7684\u7269\u54C1\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002","backpack.select":"\u70B9\u51FB\u7269\u54C1\u67E5\u770B\u8BE6\u60C5","backpack.details":"\u7269\u54C1\u8BE6\u60C5","backpack.quantity":"\u6301\u6709\u6570\u91CF","backpack.acquired":"\u83B7\u5F97\u65F6\u95F4","backpack.source":"\u83B7\u5F97\u65B9\u5F0F","backpack.source.points":"\u79EF\u5206\u5151\u6362","backpack.source.admin":"\u8D60\u9001","backpack.source.reward":"\u5956\u52B1","backpack.source.other":"\u4E91\u7AEF\u53D1\u653E","backpack.consumable":"\u6D88\u8017\u54C1","backpack.voucher":"\u5361\u5238","backpack.getCards":"\u5151\u6362\u91CD\u7F6E\u5361","backpack.manageCards":"\u4F7F\u7528\u6216\u5151\u6362","backpack.reveal":"\u67E5\u770B\u5361\u5BC6","backpack.copyKey":"\u590D\u5236\u5361\u5BC6","backpack.noKey":"\u8FD9\u4EF6\u7269\u54C1\u6CA1\u6709\u5361\u5BC6\u3002","backpack.use":"\u4F7F\u7528","backpack.confirmUse":"\u786E\u8BA4\u4F7F\u7528","backpack.consumeConfirm":"\u4F7F\u7528\u540E\u6D88\u8017 1 \u4EF6\u7269\u54C1\u3002","backpack.collectible":"\u7EAA\u5FF5\u54C1","backpack.effect.points":"+{n} \u79EF\u5206","backpack.effect.cards":"+{n} \u5F20\u91CD\u7F6E\u5361","backpack.effect.quota":"\u91CD\u7F6E\u4ECA\u65E5\u4E0E\u672C\u5468\u989D\u5EA6","backpack.rarity.common":"\u666E\u901A","backpack.rarity.rare":"\u7A00\u6709","backpack.rarity.epic":"\u53F2\u8BD7","backpack.rarity.legendary":"\u4F20\u8BF4","backpack.unavailable":"\u8FD9\u4EF6\u7269\u54C1\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u80CC\u5305\u3002","backpack.notUsable":"\u8FD9\u4EF6\u7269\u54C1\u4E0D\u80FD\u4F7F\u7528\u3002","backpack.quotaUnavailable":"\u8BF7\u5148\u4F7F\u7528\u4E91\u7AEF AI \u521D\u59CB\u5316\u989D\u5EA6\uFF0C\u518D\u4F7F\u7528\u8FD9\u4EF6\u7269\u54C1\u3002","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","ann.eyebrow":"FORSION \xB7 \u516C\u544A","ann.close":"\u5173\u95ED","ann.ok":"\u77E5\u9053\u4E86","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","diag.title":"\u8BCA\u65AD\u6570\u636E","diag.desc":"\u5E2E\u52A9\u6211\u4EEC\u6392\u67E5\u95EE\u9898\u3001\u6539\u8FDB Forsion\u3002\u9ED8\u8BA4\u5173\u95ED\u3002","diag.enable":"\u4E0A\u4F20\u8BCA\u65AD\u6570\u636E","diag.enableDesc":"\u6253\u5F00\u540E\uFF0C\u8FD9\u53F0\u7535\u8111\u4F1A\u5B9A\u671F\u4E0A\u4F20\u4E00\u4EFD Forsion \u4FE1\u606F\u5FEB\u7167\u5230\u4F60\u7684 Forsion \u8D26\u53F7\uFF0CForsion \u56E2\u961F\u53EF\u4EE5\u67E5\u770B\u3002\u591A\u4E45\u4E0A\u4F20\u4E00\u6B21\u7531 Forsion \u56E2\u961F\u8BBE\u5B9A\uFF0C\u9ED8\u8BA4\u6BCF\u5929\u4E00\u6B21\u3002\u968F\u65F6\u53EF\u4EE5\u5173\u95ED\u3002","diag.collected":"\u4F1A\u4E0A\u4F20","diag.item.app":"\u5E94\u7528\u4E0E\u7CFB\u7EDF\u7684\u7248\u672C\uFF0C\u8FD9\u53F0\u7535\u8111\u7684\u540D\u5B57","diag.item.settings":"\u6A21\u578B\u4E0E\u8BED\u97F3\u7684\u9009\u62E9\uFF0C\u540E\u53F0 Agent \u4E0E\u63D2\u4EF6\u8BBE\u7F6E\u91CC\u7684\u5F00\u5173\u548C\u6570\u503C\uFF0CMCP \u670D\u52A1\u4E0E\u6D88\u606F\u901A\u9053\u7684\u540D\u5B57\u548C\u5F00\u5173","diag.item.agents":"Agent \u4E0E\u56E2\u961F\u7684\u914D\u7F6E\uFF08\u63D0\u793A\u8BCD\u53EA\u8BB0\u957F\u5EA6\uFF0C\u4E0D\u5E26\u5185\u5BB9\uFF09","diag.item.plugins":"\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6\u3001\u6280\u80FD\u3001\u4E3B\u9898\u548C Space \u7684\u540D\u5B57\u4E0E\u7248\u672C","diag.notCollected":"\u4E0D\u4F1A\u4E0A\u4F20\uFF1A\u4FDD\u5B58\u5728\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u767B\u5F55\u51ED\u636E\u4E0E API \u5BC6\u94A5\u3001\u7B14\u8BB0\u6587\u4EF6\u3001Agent \u7684\u8BB0\u5FC6\u4E0E\u4EBA\u8BBE\u3001\u63D2\u4EF6\u6570\u636E\u3002","diag.sessions":"\u5305\u542B\u4F1A\u8BDD\u5185\u5BB9","diag.sessionsDesc":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u5BF9\u8BDD\uFF1A\u4F60\u548C Agent \u7684\u6D88\u606F\u6587\u5B57\u3001Agent \u7684\u601D\u8003\u8FC7\u7A0B\u548C\u7528\u5230\u7684\u5DE5\u5177\u540D\uFF0C\u5305\u62EC\u56E2\u961F\u6210\u5458\u3001\u8BA8\u8BBA\u3001\u59D4\u6D3E\u5728\u540E\u53F0\u505A\u7684\u90A3\u90E8\u5206\u3002\u6BCF\u6B21\u53EA\u4E0A\u4F20\u8FD8\u6CA1\u4E0A\u4F20\u8FC7\u7684\u90E8\u5206\uFF0C\u6700\u591A\u5F80\u524D 7 \u5929\u3002\u5DE5\u5177\u8BFB\u5199\u7684\u5185\u5BB9\u548C\u9644\u4EF6\u672C\u8EAB\u4E0D\u5E26\uFF1B\u6D88\u606F\u91CC\u51FA\u73B0\u7684\u6587\u4EF6\u540D\u3001Agent \u5728\u56DE\u590D\u91CC\u590D\u8FF0\u7684\u7B14\u8BB0\u6216\u6587\u4EF6\u5185\u5BB9\u4F1A\u5728\u5176\u4E2D\u3002\u5E38\u89C1\u683C\u5F0F\u7684\u5BC6\u94A5\u4F1A\u906E\u6389\uFF0C\u5176\u4F59\u539F\u6837\u4E0A\u4F20\u3002\u4E0D\u60F3\u63D0\u4F9B\u53EF\u4EE5\u5148\u5173\u6389\u518D\u6253\u5F00\u4E0A\u4F20\u3002","diag.activity":"\u5305\u542B\u6D3B\u52A8\u65E5\u5FD7","diag.activityDesc":"\u6D3B\u52A8\u8BB0\u5F55\u91CC\u6709\u5BF9\u8BDD\u5F00\u5934\u7684\u51E0\u5341\u4E2A\u5B57\u548C\u7B14\u8BB0\u6587\u4EF6\u540D\u3002\u6BCF\u6B21\u53EA\u4E0A\u4F20\u8FD8\u6CA1\u4E0A\u4F20\u8FC7\u7684\u90E8\u5206\uFF0C\u6700\u591A\u5F80\u524D 7 \u5929\u3002\u4E0D\u60F3\u63D0\u4F9B\u53EF\u4EE5\u5148\u5173\u6389\u518D\u6253\u5F00\u4E0A\u4F20\u3002","diag.last":"\u4E0A\u6B21\u4E0A\u4F20\uFF1A{time}","diag.noUpload":"\u8FD8\u6CA1\u6709\u4E0A\u4F20\u8FC7","diag.freq.hour":"\u6BCF\u5C0F\u65F6\u4E00\u6B21","diag.freq.hours":"\u6BCF {n} \u5C0F\u65F6\u4E00\u6B21","diag.freq.day":"\u6BCF\u5929\u4E00\u6B21","diag.freq.days":"\u6BCF {n} \u5929\u4E00\u6B21","diag.freq.manual":"Forsion \u56E2\u961F\u9700\u8981\u65F6\u624D\u91C7\u96C6","diag.retention":"\u4E91\u7AEF\u4FDD\u7559\u8FD9\u53F0\u7535\u8111\u6700\u8FD1 {n} \u5929\u7684\u5FEB\u7167\u3002\u5173\u95ED\u540E\u4E0D\u518D\u4E0A\u4F20\uFF1B\u5DF2\u4E0A\u4F20\u7684\u5FEB\u7167\u4ECD\u7559\u5728\u4E91\u7AEF\uFF0C\u9700\u8981\u5220\u9664\u53EF\u4EE5\u5728\u300C\u53CD\u9988\u300D\u91CC\u544A\u8BC9\u6211\u4EEC\u3002","diag.uploadNow":"\u7ACB\u5373\u4E0A\u4F20","diag.uploaded":"\u5DF2\u4E0A\u4F20","diag.failed":"\u4E0A\u4F20\u5931\u8D25\uFF1A{reason}","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","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","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"},qc={"page.account":"Account","page.quota":"Quota & points","page.backpack":"Backpack","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","store.group":"Membership & points","store.membership":"Membership","store.membership.desc":"Upgrade your plan for more daily and weekly quota","store.points":"Points","store.points.desc":"Buy points and use them to redeem items","store.items":"Items","store.items.desc":"Items you can redeem with points. Redeemed items go to your backpack","store.status":"Plan and points","store.tier":"Current plan","store.balance":"Points balance","store.choosePlan":"Choose a plan","store.payHint":"You pay on the payment page in your browser. This page refreshes when you come back","store.payOff":"Purchases are unavailable right now","store.period":"Billing period","store.period.monthly":"Monthly","store.period.quarterly":"Quarterly","store.period.yearly":"Yearly","store.per.monthly":"/ month","store.per.quarterly":"/ quarter","store.per.yearly":"/ year","store.currentTier":"Current plan","store.pay":"Pay","store.payPrice":"Pay {price}","store.noPlans":"No plans are available right now","store.packs":"Point packs","store.packsHint":"You pay on the payment page in your browser. Points arrive right after payment","store.noPacks":"No point packs are available right now","store.kind.pack":"Point pack","store.kind.card":"Consumable","store.kind.code":"Redeem code","store.kind.item":"Item","store.nPoints":"{n} points","store.instant":"Arrives right after payment","store.redeemTitle":"Redeem with points","store.redeemHint":"Redeeming with points completes right here. Items go to your backpack","store.redeem":"Redeem for {n} points","store.redeemConfirm":"Confirm: spend {n} points","store.redeemed":"Redeemed. The item is in your backpack","store.uncertain":"No response came back. Check your backpack before you try again","store.soldOut":"Sold out","store.left":"{n} left","store.toBackpack":"Goes to your backpack","store.limitReached":"You've reached the purchase limit","store.unavailable":"This item can't be redeemed right now","store.noItems":"Nothing to redeem right now","store.itemsOff":"Item redemption isn't available yet","store.openBackpack":"Open backpack","backpack.desc":"View the items you have collected. Select a slot for details.","backpack.refresh":"Refresh","backpack.total":"{n} items","backpack.grid":"Backpack items","backpack.slot":"{name}, quantity {n}","backpack.item":"Item","backpack.empty":"Your backpack is empty","backpack.emptyHint":"Items you redeem or receive will appear here.","backpack.select":"Select an item to view details","backpack.details":"Item details","backpack.quantity":"Quantity","backpack.acquired":"Acquired","backpack.source":"Received through","backpack.source.points":"Points exchange","backpack.source.admin":"Gift","backpack.source.reward":"Reward","backpack.source.other":"Cloud account","backpack.consumable":"Consumable","backpack.voucher":"Voucher","backpack.getCards":"Redeem reset cards","backpack.manageCards":"Use or redeem","backpack.reveal":"Reveal key","backpack.copyKey":"Copy key","backpack.noKey":"This item has no key.","backpack.use":"Use","backpack.confirmUse":"Confirm use","backpack.consumeConfirm":"Using this item consumes one copy.","backpack.collectible":"Collectible","backpack.effect.points":"+{n} points","backpack.effect.cards":"+{n} reset cards","backpack.effect.quota":"Reset daily and weekly quota","backpack.rarity.common":"Common","backpack.rarity.rare":"Rare","backpack.rarity.epic":"Epic","backpack.rarity.legendary":"Legendary","backpack.unavailable":"This item is no longer available. Refresh your backpack.","backpack.notUsable":"This item cannot be used.","backpack.quotaUnavailable":"Use cloud AI to initialize your quota before using this item.","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","ann.eyebrow":"FORSION \xB7 Announcement","ann.close":"Close","ann.ok":"Got it","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","diag.title":"Diagnostic data","diag.desc":"Helps us troubleshoot problems and improve Forsion. Off by default.","diag.enable":"Upload diagnostic data","diag.enableDesc":"When this is on, this computer periodically uploads a snapshot of its Forsion setup to your Forsion account, where the Forsion team can view it. The Forsion team sets how often, once a day by default. You can turn it off at any time.","diag.collected":"What's uploaded","diag.item.app":"App and system versions, and this computer's name","diag.item.settings":"Your model and voice choices, the switches and numeric values in background agent and plugin settings, and the names and on/off state of MCP servers and message channels","diag.item.agents":"Agent and team configuration (prompts are recorded by length only, never their text)","diag.item.plugins":"Names and versions of installed plugins, skills, themes and Spaces","diag.notCollected":"Never uploaded: the sign-in credentials and API keys saved on this computer, your note files, agent memory and personas, or plugin data.","diag.sessions":"Include conversations","diag.sessionsDesc":"Conversations on this computer: the text of your messages and the agent's replies, the agent's reasoning and the names of the tools it used, including the background work of team members, discussions and delegated tasks. Each upload only includes what hasn't been uploaded yet, going back at most 7 days. What those tools read or wrote and the attachments themselves are left out; file names that appear in messages, and anything the agent repeated from your notes or files in its replies, are included. Keys in common formats are masked; everything else is uploaded as is. If you'd rather not share them, turn this off before you turn uploads on.","diag.activity":"Include activity log","diag.activityDesc":"Your activity records, which include the first few dozen characters of conversations and the names of note files. Each upload only includes what hasn't been uploaded yet, going back at most 7 days. If you'd rather not share them, turn this off before you turn uploads on.","diag.last":"Last upload: {time}","diag.noUpload":"Nothing uploaded yet","diag.freq.hour":"every hour","diag.freq.hours":"every {n} hours","diag.freq.day":"once a day","diag.freq.days":"every {n} days","diag.freq.manual":"only when the Forsion team requests it","diag.retention":"The cloud keeps this computer's snapshots from the last {n} days. Turning this off stops uploads; snapshots already uploaded stay in the cloud. To have them deleted, let us know under Feedback.","diag.uploadNow":"Upload now","diag.uploaded":"Uploaded","diag.failed":"Upload failed: {reason}","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":"Use points to get quota reset cards","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy 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"},oi={zh:$c,en:qc},Fe=t=>t==="en"?"en":"zh";function Fn(t,e,n){let r=oi[t][e]??oi.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):r}var Bn=t=>(e,n)=>Fn(t,e,n),He=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var ii=`
|
|
70
70
|
.fx-acct { color: var(--text); }
|
|
71
71
|
.fx-acct .fx-panel > .settings-panel-head:last-child { border-bottom-color: transparent; }
|
|
72
72
|
.fx-acct .fx-panel > .fx-block + .fx-block,
|
|
@@ -297,7 +297,44 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
|
|
|
297
297
|
.fx-acct .fx-skel { animation: none; }
|
|
298
298
|
.fx-acct .fx-bar > span { transition: none; }
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
|
|
301
|
+
/* \u5546\u5E97\u91CC\u7684\u300C\u4F1A\u5458\u4E0E\u79EF\u5206\u300D\u4E09\u9875(pages/shop.tsx):\u72B6\u6001\u6761\u3001\u6863\u4F4D\u5361\u3001\u79EF\u5206\u5305 / \u7269\u54C1\u5361\u3002\u5361\u7247\u4E0E\u5546\u5E97\u81EA\u5DF1\u7684\u5546\u54C1\u5361\u540C\u4E00\u5957\u8868\u9762(--bg-card / --radius-lg)\u3002 */
|
|
302
|
+
.fx-acct .fx-shop-strip { display: flex; align-items: center; gap: 36px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); }
|
|
303
|
+
.fx-acct .fx-shop-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
304
|
+
.fx-acct .fx-shop-stat > small { color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 620; }
|
|
305
|
+
.fx-acct .fx-shop-stat > b { color: var(--text); font-size: var(--ui-font-title); line-height: var(--ui-line-title); font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
306
|
+
.fx-acct .fx-shop-stat > b.is-empty { color: var(--text-faint); }
|
|
307
|
+
.fx-acct .fx-shop-stat > b > i { margin-left: 7px; color: var(--text-faint); font-size: var(--ui-font-caption); font-style: normal; font-weight: 500; }
|
|
308
|
+
.fx-acct .fx-shop-section { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
|
|
309
|
+
.fx-acct .fx-shop-section .btn { display: inline-flex; align-items: center; gap: 5px; }
|
|
310
|
+
.fx-acct .fx-shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
|
|
311
|
+
.fx-acct .fx-shop-head > div:first-child { flex: 1 1 200px; min-width: 0; }
|
|
312
|
+
.fx-acct .fx-shop-head > .fx-seg { flex: 0 0 auto; }
|
|
313
|
+
.fx-acct .fx-shop-head h2 { margin: 0; color: var(--text); font-size: var(--ui-font-heading); line-height: var(--ui-line-heading); font-weight: 680; }
|
|
314
|
+
.fx-acct .fx-shop-head p { margin: 4px 0 0; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
|
|
315
|
+
.fx-acct .fx-shop-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
|
|
316
|
+
.fx-acct .fx-shop-tier { display: flex; flex-direction: column; min-width: 0; min-height: 204px; padding: 16px; border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); }
|
|
317
|
+
.fx-acct .fx-shop-tier > h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; color: var(--text); font-size: var(--ui-font-heading); line-height: var(--ui-line-heading); font-weight: 680; }
|
|
318
|
+
.fx-acct .fx-shop-current { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-ink); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 620; white-space: nowrap; }
|
|
319
|
+
.fx-acct .fx-shop-price { margin-top: 12px; color: var(--text); font-size: var(--ui-font-display); line-height: var(--ui-line-display); font-weight: 700; font-variant-numeric: tabular-nums; }
|
|
320
|
+
.fx-acct .fx-shop-price > small { margin-left: 5px; color: var(--text-faint); font-size: var(--ui-font-meta); font-weight: 500; }
|
|
321
|
+
.fx-acct .fx-shop-tier > p { flex: 1 1 auto; margin: 8px 0 0; color: var(--text-light); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
322
|
+
.fx-acct .fx-shop-tier > .btn { justify-content: center; margin-top: 14px; }
|
|
323
|
+
.fx-acct .fx-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 14px; }
|
|
324
|
+
.fx-acct .fx-shop-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 14px; border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); }
|
|
325
|
+
.fx-acct .fx-shop-visual { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--accent-light); color: var(--accent-ink); }
|
|
326
|
+
.fx-acct .fx-shop-emoji { font-size: var(--ui-font-title); line-height: 1; }
|
|
327
|
+
.fx-acct .fx-shop-body { display: flex; flex-direction: column; min-width: 0; }
|
|
328
|
+
.fx-acct .fx-shop-kind { color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 620; }
|
|
329
|
+
.fx-acct .fx-shop-body > strong { margin-top: 1px; overflow: hidden; color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
|
|
330
|
+
.fx-acct .fx-shop-body > p { margin: 6px 0 0; color: var(--text-light); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
331
|
+
.fx-acct .fx-shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 12px; }
|
|
332
|
+
.fx-acct .fx-shop-meta { min-width: 0; overflow: hidden; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); text-overflow: ellipsis; white-space: nowrap; }
|
|
333
|
+
.fx-acct .fx-shop-acts { display: flex; flex: 0 0 auto; gap: 6px; }
|
|
334
|
+
.fx-acct .fx-shop-key { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
|
|
335
|
+
.fx-acct .fx-shop-key > code { min-width: 0; padding: 3px 7px; overflow-wrap: anywhere; border-radius: var(--radius-sm); background: var(--overlay-light); color: var(--text); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); user-select: all; }
|
|
336
|
+
.fx-acct .fx-shop-empty { padding: 28px 18px; border-radius: var(--radius-lg); background: var(--bg-card); color: var(--text-faint); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); text-align: center; }
|
|
337
|
+
`,si=`
|
|
301
338
|
.fx-ann-backdrop { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); animation: fx-ann-fade 300ms ease-out both; }
|
|
302
339
|
.fx-ann { position: relative; display: flex; flex-direction: column; width: min(100%, 560px); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px 28px 22px; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); color: var(--text); font-family: var(--font-ui); text-align: left; animation: fx-ann-enter 480ms cubic-bezier(.2,.75,.15,1) both; }
|
|
303
340
|
.fx-ann:focus { outline: none; }
|
|
@@ -324,7 +361,7 @@ html[data-glass='off'] .fx-ann-backdrop { backdrop-filter: none; background: var
|
|
|
324
361
|
@media (prefers-reduced-motion: reduce) {
|
|
325
362
|
.fx-ann-backdrop, .fx-ann, .fx-ann-eyebrow, .fx-ann-title, .fx-ann-body, .fx-ann-ok { animation: none; }
|
|
326
363
|
}
|
|
327
|
-
`,
|
|
364
|
+
`,li=`
|
|
328
365
|
:host { display: block; color: var(--text); font-family: var(--font-body, var(--font-ui)); font-size: var(--ui-font-body); line-height: 1.65; overflow-wrap: anywhere; }
|
|
329
366
|
.doc > :first-child { margin-top: 0; }
|
|
330
367
|
.doc > :last-child { margin-bottom: 0; }
|
|
@@ -348,5 +385,5 @@ img { border-radius: var(--radius-sm); }
|
|
|
348
385
|
hr { margin: 16px 0; border: 0; border-top: var(--border-width) solid var(--border); }
|
|
349
386
|
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
|
|
350
387
|
strong, b { font-weight: 650; }
|
|
351
|
-
`;var dt=t=>typeof t=="string"?t:"";function Sc(t){if(!t||typeof t!="object")return null;let e=t,n=typeof e.id=="string"?e.id.trim():typeof e.id=="number"&&Number.isFinite(e.id)?String(e.id):"",r=dt(e.titleZh),a=dt(e.bodyZh);return!n||!r.trim()&&!a.trim()?null:{id:n,titleZh:r,titleEn:dt(e.titleEn).trim()?dt(e.titleEn):null,bodyZh:a,bodyEn:dt(e.bodyEn).trim()?dt(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:dt(e.publishedAt)||null}}function Ac(t,e){return e==="en"&&t.bodyEn?{lang:"en",title:t.titleEn??t.titleZh,body:t.bodyEn}:{lang:"zh",title:t.titleZh,body:t.bodyZh}}var Tc=new Pr({gfm:!0,breaks:!0}),Ec=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Cc=/^(?:https?:|mailto:|#)/i;function Qo(t){return xr.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:Ec,ALLOWED_URI_REGEXP:Cc})}function Rc(t,e){let n=e==="markdown"?Tc.parse(t,{async:!1}):t;return Qo(n)}var Fn=null;function Pc(){if(Fn===null)try{let t=Qo('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');Fn=xr.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{Fn=!1}return Fn}function Ic(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Mc="http://www.w3.org/1999/xlink";function Bn(t){let e=t.target,n=e&&typeof e.closest=="function"?e.closest("a, area"):null;if(!n||(t.preventDefault(),t.type!=="click"))return;let r=Ic(n.getAttribute("href")??n.getAttributeNS(Mc,"href"));if(r)try{H().openExternal?.(r)?.catch(()=>{})}catch{}}function Zo(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Lc(t){let{ctx:e,ann:n}=t,[r,a]=A(()=>qe(e.getLocale?.()));X(()=>{a(qe(e.getLocale?.()));let f=e.subscribeLocale?.(b=>a(qe(b)));return()=>{typeof f=="function"&&f()}},[e]);let i=Qe(()=>On(r),[r]),s=Ac(n,r),l=ne(null),u=ne(null),d=ne(null),p=ne(null),m=ne(t.onClose);return m.current=t.onClose,X(()=>{let f=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let b=y=>{if(y.key==="Escape"){y.preventDefault(),y.stopPropagation(),m.current();return}if(y.key!=="Tab")return;let k=u.current,T=d.current,x=l.current;if(!k||!T||!x)return;let _=document.activeElement;if(!_||!x.contains(_)){y.preventDefault(),(y.shiftKey?T:k).focus();return}y.shiftKey&&(_===k||_===x)?(y.preventDefault(),T.focus()):!y.shiftKey&&_===T&&(y.preventDefault(),k.focus())},h=y=>{let k=l.current;k&&y.target instanceof Node&&!k.contains(y.target)&&k.focus()};return window.addEventListener("keydown",b,!0),document.addEventListener("focusin",h,!0),()=>{window.removeEventListener("keydown",b,!0),document.removeEventListener("focusin",h,!0),f?.isConnected&&f.focus()}},[]),X(()=>{let f=p.current;if(!f)return;let b=Zo(f);return b.addEventListener("click",Bn),b.addEventListener("auxclick",Bn),()=>{b.removeEventListener("click",Bn),b.removeEventListener("auxclick",Bn)}},[]),X(()=>{let f=p.current;if(!f)return;let b=document.createElement("style");b.textContent=Ko;let h=document.createElement("div");h.className="doc",h.appendChild(Rc(s.body,n.format)),Zo(f).replaceChildren(b,h)},[s.body,n.format]),o("div",{class:"fx-ann-backdrop",children:[o("style",{children:Jo}),o("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[o("button",{ref:u,type:"button",class:"fx-ann-close","aria-label":i("ann.close"),onClick:()=>m.current(),children:o(z,{name:"x",size:16})}),o("div",{class:"fx-ann-eyebrow",children:i("ann.eyebrow")}),o("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),o("div",{class:"fx-ann-body",children:o("div",{ref:p,id:"fx-ann-body",class:"fx-ann-doc"})}),o("div",{class:"fx-ann-footer",children:o("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:i("ann.ok")})})]})]})}function Dc(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Nc(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let a=()=>{i.disconnect(),clearTimeout(s),r()},i=new MutationObserver(()=>{n.isConnected||a()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(a,e)}):Promise.resolve()}function ei(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Dc(e.location?.search))return null;let r=0,a=!1,i=null,s=Promise.resolve(),l=p=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let f=!1,b=h=>{f||(f=!0,i?.id===p.id&&(i=null),It(null,m),m.remove(),h&&(s=P(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};i={id:p.id,finish:b},It(o(Lc,{ctx:t,ann:p,onClose:()=>b(!0)}),m)},u=async()=>{let p=++r;await s;let m=await P("/announcements/pending");if(a||p!==r||!m.ok)return;let f=Sc(m.data?.announcement);!f||i||Pc()&&(await Nc(),!(a||p!==r||i)&&l(f))},d=n.onAuthChanged?.(p=>{i?.finish(!1),p?.loggedIn?u():r++});return u(),{check:u,dispose(){a=!0,r++,typeof d=="function"&&d(),i?.finish(!1)}}}function ti(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 ni(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 ri={\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 ai={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",ITEM_NOT_FOUND:"backpack.unavailable",ITEM_NOT_ACTIVE:"backpack.unavailable",ITEM_NOT_USABLE:"backpack.notUsable",ITEM_EFFECT_UNAVAILABLE:"backpack.quotaUnavailable",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},oi={"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"},Hr={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 zc(t){if(t.code&&ai[t.code])return ai[t.code];if(t.detail){if(oi[t.detail])return oi[t.detail];let e=ri[t.detail];if(e)return Hr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function _e(t){let e=zc(t);return e?{key:e}:Dn(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 Jt(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 Wr=Do(null);function N(){let t=Wo(Wr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var tt=()=>N().t;function Se(){let t=ne(!0);return X(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var ii={pending:!1,error:null,success:null,captcha:!1};function L(){let t=Se(),[e,n]=A(ii),r=ne(!1),a=et(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let l;try{l=await s()}catch(u){l={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=et(()=>{r.current||n(ii)},[]);return{...e,run:a,clear:i}}var ue=t=>({error:_e(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function si(){let[t,e]=A(0),n=ne(null);X(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=et((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=et(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:a}}function Re(t){let[e,n]=A({state:"loading"}),r=ne(0),a=ne(t);a.current=t;let i=et((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let p;try{p=await a.current()}catch(m){p={ok:!1,status:0,code:null,detail:null,transport:String(m?.message||m)}}d===r.current&&(p.ok?n({state:"ready",data:p.data,gen:d}):Dn(p)?n({state:"signedOut"}):(p.status===401&&H().authStatus?.().catch(()=>{}),n({state:"error",fail:p})))})()},[]);X(()=>{i();let u=H().onAuthChanged?.(()=>i());return()=>{r.current++,u?.()}},[i]);let s=et(()=>i(),[i]),l=et(()=>i(!0),[i]);switch(e.state){case"ready":{let u=e.gen,d=p=>n(m=>m.state==="ready"&&m.gen===u?{...m,data:p(m.data)}:m);return{state:"ready",data:e.data,reload:l,update:d}}case"error":return{state:"error",error:_e(e.fail),retry:s};default:return e}}function Un(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 $n(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 li(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Oc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ci(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 l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(u=>u.type==="month")?.value),a=Number(l.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:e==="zh"?`${r}\u6708${a}\u65E5`:`${Oc[r-1]} ${a}`}var Xr=t=>t==="zh"?"zh-CN":"en-US";function ui(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 di(t,e){let n=ui(t);return n?new Intl.DateTimeFormat(Xr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Fe(t,e){let n=ui(t);return n?new Intl.DateTimeFormat(Xr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function se(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Xr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var ft=class extends Error{};async function fi(t,e=256){if(t.size>20971520)throw new ft;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((p,m)=>{r.onload=()=>p(),r.onerror=()=>m(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 ft;let s=Math.min(1,e/Math.max(a,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*s)),l.height=Math.max(1,Math.round(i*s));let u=l.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height),u.drawImage(r,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new ft;return d}finally{URL.revokeObjectURL(n)}}function pi(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 pt=(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))(pt||{}),Fc=[0,1],gi=[1,0],hi=[2,3],bi=[3,2],Bc={L:Fc,M:gi,Q:hi,H:bi},Uc=/^\d*$/,$c=/^[A-Z0-9 $%*+./:-]*$/,Vr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Jr=1,Kr=40,mi=3,qc=3,qn=40,Hc=10,xi=[[-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]],yi=[[-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]],jr=class{constructor(e,n,r,a){if(this.version=e,this.ecc=n,e<Jr||e>Kr)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 l=0;l<this.size;l++)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 l=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<l&&(a=u,l=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,pt.Timing),this.setFunctionModule(r,6,r%2===0,pt.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,We(a,i));this.setFunctionModule(8,7,We(a,6)),this.setFunctionModule(8,8,We(a,7)),this.setFunctionModule(7,8,We(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,We(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,We(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,We(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=We(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,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,pt.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,pt.Alignment)}setFunctionModule(e,n,r,a=pt.Function){this.modules[n][e]=r,this.types[n][e]=a}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Hn(n,r))throw new RangeError("Invalid argument");let a=yi[r[0]][n],i=xi[r[0]][n],s=Math.floor(Gr(n)/8),l=a-s%a,u=Math.floor(s/a),d=[],p=Zc(i);for(let f=0,b=0;f<a;f++){let h=e.slice(b,b+u-i+(f<l?0:1));b+=h.length;let y=Qc(h,p);f<l&&h.push(0),d.push(h.concat(y))}let m=[];for(let f=0;f<d[0].length;f++)d.forEach((b,h)=>{(f!==u-i||h>=l)&&m.push(b[f])});return m}drawCodewords(e){if(e.length!==Math.floor(Gr(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]=We(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,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(l++,l===5?e+=mi:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*qn),s=this.modules[i][d],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*qn}for(let i=0;i<this.size;i++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(l++,l===5?e+=mi:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*qn),s=this.modules[d][i],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*qn}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(e+=qc)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=a*Hc,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 Xe(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 We(t,e){return(t>>>e&1)!==0}var Kt=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()}},Wc=[1,10,12,14],Xc=[2,9,11,13],Vc=[4,8,16,16];function ki(t,e){return t[Math.floor((e+7)/17)+1]}function vi(t){let e=[];for(let n of t)Xe(n,8,e);return new Kt(Vc,t.length,e)}function jc(t){if(!wi(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);Xe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Kt(Wc,t.length,e)}function Gc(t){if(!_i(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=Vr.indexOf(t.charAt(n))*45;r+=Vr.indexOf(t.charAt(n+1)),Xe(r,11,e)}return n<t.length&&Xe(Vr.indexOf(t.charAt(n)),6,e),new Kt(Xc,t.length,e)}function Yc(t){return t===""?[]:wi(t)?[jc(t)]:_i(t)?[Gc(t)]:[vi(Kc(t))]}function wi(t){return Uc.test(t)}function _i(t){return $c.test(t)}function Jc(t,e){let n=0;for(let r of t){let a=ki(r.mode,e);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function Kc(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 Gr(t){if(t<Jr||t>Kr)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 Hn(t,e){return Math.floor(Gr(t)/8)-xi[e[0]][t]*yi[e[0]][t]}function Zc(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]=Yr(e[a],n),a+1<e.length&&(e[a]^=e[a+1]);n=Yr(n,2)}return e}function Qc(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]^=Yr(i,a))}return n}function Yr(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 eu(t,e,n=1,r=40,a=-1,i=!0){if(!(Jr<=n&&n<=r&&r<=Kr)||a<-1||a>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=Hn(s,e)*8,f=Jc(t,s);if(f<=m){l=f;break}if(s>=r)throw new RangeError("Data too long")}for(let m of[gi,hi,bi])i&&l<=Hn(s,m)*8&&(e=m);let u=[];for(let m of t){Xe(m.mode[0],4,u),Xe(m.numChars,ki(m.mode,s),u);for(let f of m.getData())u.push(f)}let d=Hn(s,e)*8;Xe(0,Math.min(4,d-u.length),u),Xe(0,(8-u.length%8)%8,u);for(let m=236;u.length<d;m^=253)Xe(m,8,u);let p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new jr(s,e,p,a)}function Si(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=e||{},u=typeof t=="string"?Yc(t):Array.isArray(t)?[vi(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=eu(u,Bc[n],a,i,s,r),p=tu({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function tu(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=pt.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 G(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(z,{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 pe(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 re(t){return o("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function Lt(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 I(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(Yt,{}),t.children]})}var nu=5e3;function mt(t){let[e,n]=A(!1),r=ne(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};X(()=>()=>{r.current&&clearTimeout(r.current)},[]),X(()=>{(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)},nu);return}a(),t.onConfirm()},s=t.variant??"ghost";return o(I,{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 O(t){let e=tt(),{a:n}=t;return n.error?o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:He(n.error,e)}),n.captcha&&o("button",{type:"button",class:"fx-link",onClick:()=>void zn(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",o(z,{name:"external",size:12})]})]}):n.success?o("div",{class:"fx-msg is-ok",role:"status",children:He(n.success,e)}):null}function Q(t){return o("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function nt(t){return o("div",{class:"settings-empty-row fx-block",children:t.children})}function Zt(t){let e=tt(),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 gt(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 ru(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 Dt(t){let e=tt(),[n,r]=A("idle"),a=ne(null);X(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await ru(t.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return o(I,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[o(z,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function au(t){let e=Qe(()=>{try{return Si(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,l)=>{s&&(n+=`M${l} ${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 Zr(t){let e=tt(),{device:n}=t;return o("div",{class:"fx-device",children:[o(au,{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(z,{name:"external",size:12})]}),o(Dt,{text:n.url,label:e("signin.copyLink")})]})]})]})}function Pe(){let t=tt(),e=L(),[n,r]=A(null);X(()=>H().onAuthDevice?.(i=>r(i)),[]);let a=()=>void e.run(async()=>{let i=H().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let l=Jt(Le(s));return l?{error:l}: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(z,{name:"user",size:18})}),o("p",{class:"fx-signin-lead",children:t("signin.desc")}),o("div",{class:"settings-state-actions",children:o(I,{variant:"primary",pending:e.pending,onClick:a,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&o(Zr,{device:n}),o(O,{a:e})]})})}function Ae(t){let e=tt(),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,l)=>o("div",{class:"settings-control-row",children:o("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function Te(t){let e=tt();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(z,{name:"alert",size:18})}),o("strong",{children:e("common.loadFailed")}),o("p",{children:He(t.error,e)}),o("div",{class:"settings-state-actions",children:o(I,{variant:"primary",onClick:t.onRetry,children:[o(z,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}var ou=t=>!!t&&typeof t=="object"&&typeof t.enabled=="boolean";async function Qr(t,e){let n=H().cloudInvoke;if(!n)throw new Error("no_bridge");let r=await n(t,e);if(!ou(r))throw new Error(String(r?.error??"unavailable"));return r}var iu=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins"];function Ai(){let{t,locale:e}=N(),n=Se(),[r,a]=A(null),i=L(),s=L();if(X(()=>{let f=!1,b=()=>{Qr("diagnostics:get").then(y=>{f||a(y)},()=>{f||a(null)})};b();let h=H().onAuthChanged?.(b);return()=>{f=!0,h?.()}},[]),!r?.signedIn)return null;let l=()=>void s.run(async()=>{try{let f=await Qr("diagnostics:uploadNow");return n.current&&a(f),f.lastError?{error:{key:"diag.failed",vars:{reason:f.lastError}}}:f.enabled&&f.lastUploadAt?{success:{key:"diag.uploaded"}}:void 0}catch(f){return{error:{raw:Le(f)||t("err.generic")}}}}),u=async f=>{let b=!1;await i.run(async()=>{s.clear();try{let h=await Qr("diagnostics:set",f);n.current&&a(h),b=!0}catch(h){return{error:{raw:Le(h)||t("err.generic")}}}}),b&&f.enabled&&n.current&&l()},d=r.intervalHours??24,p=r.mode==="manual"?t("diag.freq.manual"):d===1?t("diag.freq.hour"):d%24===0?d===24?t("diag.freq.day"):t("diag.freq.days",{n:d/24}):t("diag.freq.hours",{n:d}),m=`${r.lastUploadAt?t("diag.last",{time:Fe(r.lastUploadAt,e)}):t("diag.noUpload")} \xB7 ${p}`;return o(G,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[o(pe,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:o(Lt,{checked:r.enabled,disabled:i.pending,label:t("diag.enable"),onChange:f=>void u({enabled:f})})}),o(re,{class:"fx-diag",children:[o("strong",{children:t("diag.collected")}),o("ul",{children:iu.map(f=>o("li",{children:t(f)},f))}),o(Q,{children:t("diag.notCollected")})]}),r.sessions!==void 0&&o(pe,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:o(Lt,{checked:r.sessions,disabled:i.pending,label:t("diag.sessions"),onChange:f=>void u({sessions:f})})}),o(pe,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:o(Lt,{checked:r.activity,disabled:i.pending,label:t("diag.activity"),onChange:f=>void u({activity:f})})}),r.enabled&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:m}),o(I,{pending:s.pending,disabled:i.pending,onClick:l,children:t("diag.uploadNow")})]}),o(re,{class:"fx-sub--tight",children:[o(Q,{children:t("diag.retention",{n:r.retainDays})}),r.enabled&&r.lastError&&!s.error&&!s.success&&o("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:r.lastError})}),o(O,{a:i}),o(O,{a:s})]})]})}function Ei(){let t=Re(async()=>{let[n,r,a]=await Promise.all([P("/auth/me"),P("/membership/my"),P("/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(Ae,{panels:3});if(t.state==="signedOut")return o(Pe,{});if(t.state==="error")return o(Te,{error:t.error,onRetry:t.retry});let{data:e}=t;return o(q,{children:[o(su,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),o(lu,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),o(cu,{}),o(Ai,{}),o(du,{})]})}function su(t){let{t:e}=N(),{me:n}=t,r=L(),a=L(),[i,s]=A(!1),[l,u]=A(""),d=ne(null),p=n.nickname||n.username,m=h=>{h&&r.run(async()=>{let y;try{y=await fi(h)}catch(T){return{error:{key:T instanceof ft?"err.avatarTooLarge":"err.avatarInvalid"}}}let k=await P("/settings",{method:"PUT",body:{avatar:y}});return k.ok?(t.onPatch({avatar:y}),{success:{key:"account.avatar.saved"}}):{error:_e(k)}})},f=()=>{a.clear(),u(p||""),s(!0)},b=()=>{let h=l.trim();if(!h||h===p){s(!1);return}a.run(async()=>{let y=await P("/settings",{method:"PUT",body:{nickname:h}});return y.ok?(t.onPatch({nickname:h}),s(!1),{success:{key:"account.nickname.saved"}}):{error:_e(y)}})};return o(G,{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:pi(p)}),o("span",{class:"fx-avatar-mask",children:r.pending?o(Yt,{size:14}):o(z,{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 y=h.currentTarget;m(y.files?.[0]),y.value=""}}),o("div",{class:"fx-identity-main",children:[i?o("form",{class:"fx-inline",onSubmit:h=>{h.preventDefault(),b()},children:[o("input",{class:"fx-input fx-input--name",value:l,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(I,{variant:"primary",submit:!0,pending:a.pending,children:e("common.save")}),o(I,{disabled:a.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):o("div",{class:"fx-name-row",children:[o("span",{class:"fx-name",children:p}),o("button",{type:"button",class:"fx-icon-btn",onClick:f,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:o(z,{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(O,{a}),o(O,{a:r})]})]}),o(Ti,{kind:"phone",value:n.phone}),o(Ti,{kind:"email",value:n.email})]})}function Ti(t){let{t:e,goTo:n}=N(),r=!!t.value,a=r?t.kind==="phone"?Un(t.value):$n(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return o(pe,{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(z,{name:"chevron",size:12})]}):o("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function lu(t){let{t:e,locale:n}=N(),r=L(),a=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=li(a?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await Nn("membership")?void 0:{error:{key:"err.openFailed"}});return o(G,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?o(I,{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--${l}`,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:di(a.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&o("div",{class:"fx-sub",children:o(Q,{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(O,{a:r})})]})}function cu(){let{t}=N(),e=Se(),[n,r]=A(null),[a,i]=A(!1),[s,l]=A(null),[u,d]=A(null),p=L(),m=L(),f=L(),b=!!H().authAccounts;X(()=>{let x=0,_=()=>{let B=H().authAccounts;if(!B)return;let Y=++x;i(!1),B().then($=>{Y===x&&r(Array.isArray($)?$:[])}).catch(()=>{Y===x&&i(!0)})};_();let E=H().onAuthChanged?.(_),R=H().onAuthDevice?.(B=>d(B));return()=>{x++,E?.(),R?.()}},[]);let h=x=>{l(x),p.run(async()=>{let _=H().forsionSwitchAccount;if(!_)return{error:{key:"err.unavailable"}};try{await _(x)}catch(E){let R=Jt(Le(E));return R?{error:R}:void 0}finally{e.current&&l(null)}})},y=()=>void m.run(async()=>{let x=H().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(_){e.current&&d(null);let E=Jt(Le(_));return E?{error:E}:void 0}}),k=()=>void f.run(async()=>{let x=H().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(_){return{error:{raw:Le(_)||t("err.generic")}}}}),T=p.pending||m.pending||f.pending;return o(G,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[b&&n===null&&!a&&o(nt,{children:[o(Yt,{})," ",t("common.loading")]}),a&&o("div",{class:"fx-sub",children:o(Q,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&o(nt,{children:t("local.empty")}),n&&n.length>0&&o("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-icon",children:o(z,{name:"user",size:14})}),o("span",{class:"fx-list-main",children:[o("strong",{children:x.nickname||x.username||"Forsion"}),o("small",{children:[x.username&&x.nickname?x.username:null,uu(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?o("span",{class:"fx-tag fx-tag--accent",children:[o(z,{name:"check",size:11})," ",t("local.current")]}):o(I,{pending:s===x.id,disabled:T&&s!==x.id,onClick:()=>h(x.id),children:t("local.switch")})]},x.id))}),m.pending&&u&&o("div",{class:"fx-sub",children:o(Zr,{device:u})}),o("div",{class:"settings-panel-footer fx-footer",children:[o(I,{pending:m.pending,disabled:T&&!m.pending,onClick:y,children:[o(z,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),o(I,{pending:f.pending,disabled:T&&!f.pending,onClick:k,children:[o(z,{name:"logout",size:12})," ",t("local.signOut")]})]}),(p.error||m.error||f.error)&&o("div",{class:"fx-sub fx-sub--tight",children:[o(O,{a:p}),o(O,{a:m}),o(O,{a:f})]})]})}function uu(t){try{return new URL(t).host}catch{return t}}function du(){let{t}=N(),e=L();return o("div",{class:"fx-page-foot",children:[o("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await zn()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",o(z,{name:"external",size:12})]}),o("span",{class:"fx-muted",children:t("account.web.desc")}),o(O,{a:e})]})}function ee(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 fu(t,e){let n=ee(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,ee(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var pu=15;function ht(t,e){let n=fu(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,ee(t)??0),a=n===0&&r>0&&(ee(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=pu}}function Wn(t,e){let n=ee(e);if(n===null||n<=0)return null;let r=ee(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 mu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Ri(){let t=Re(async()=>{let[s,l,u,d]=await Promise.all([P("/token-quota/my"),P("/credits/balance"),P("/features"),P("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?ee(l.data?.balance):null,balanceFailed:!l.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:mu(d)}}:s});if(t.state==="loading")return o(Ae,{panels:3,rows:2});if(t.state==="signedOut")return o(Pe,{});if(t.state==="error")return o(Te,{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(q,{children:[o(hu,{data:e,update:n,onFailed:t.reload}),o(xu,{data:e,payment:i,onRetry:t.reload}),r?.modelId?o(ku,{bg:r,update:n}):null,(e.inviteState!=="hidden"||a)&&o(vu,{data:e,update:n,redeemEnabled:a,onRedeemed:t.reload})]})}var Ci=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function gu(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function hu(t){let{t:e,locale:n,ctx:r}=N(),a=t.data.quota,i=ht(a.dailyRemaining,a.dailyLimit),s=ht(a.weeklyRemaining,a.weeklyLimit),l=ci(a.weeklyResetAt,n),u=Math.max(0,ee(a.resetCards)??0),d=ee(a.resetCardPricePoints)??100,p=L(),m=L(),[f,b]=A(null),[h,y]=A("1"),k=/^\d+$/.test(h.trim())?Number(h.trim()):NaN,T=Number.isInteger(k)&&k>=1&&k<=50,x=T?k*d:null,_=t.data.balance,E=x!==null&&_!==null&&_<x,R=()=>void p.run(async()=>{let $={daily:i,weekly:s},V=Ci(a);b(null);let oe=H(),he=await Ln(oe.accountUseResetCard?()=>oe.accountUseResetCard("both"):null,()=>P("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!he.ok)return t.onFailed(),ue(he);let De=he.data?.quota,Be=ee(he.data?.resetCards);return t.update(bt=>({...bt,quota:{...bt.quota,...De??{},resetCards:Be??bt.quota.resetCards}})),De&&!gu(r.app,{before:V,after:Ci(De),remainingCards:Be??void 0})&&b({before:$,after:{daily:ht(De.dailyRemaining,De.dailyLimit),weekly:ht(De.weeklyRemaining,De.weeklyLimit)},cards:Be}),{success:{key:"card.used"}}}),B=()=>void m.run(async()=>{if(!T)return{error:{key:"err.invalidCount"}};let $=await P("/points/exchange-reset-cards",{method:"POST",body:{count:k,expectedPricePerCard:d}});return $.ok?(t.update(V=>({...V,quota:{...V.quota,resetCards:ee($.data?.resetCards)??V.quota.resetCards},balance:ee($.data?.newPointsBalance)??V.balance})),y("1"),{success:{key:"card.exchanged",vars:{n:ee($.data?.cardsGranted)??k}}}):(t.onFailed(),ue($))}),Y=$=>$.unlimited?e("common.unlimited"):$.text;return o(G,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Zt,{label:e("common.today"),display:i,note:i.unlimited?null:e("quota.resetDaily")}),o(Zt,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),o(pe,{label:e("card.title"),desc:e("card.desc"),children:[o("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:u})}),o(mt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:p.pending,disabled:u<=0,onConfirm:R})]}),u<=0&&!p.success&&o(re,{children:o(Q,{children:e("card.noneHint")})}),(p.error||p.success)&&o(re,{children:[o(O,{a:p}),p.success&&f&&o("div",{class:"fx-ceremony",role:"status",children:[o("span",{children:[e("common.today")," ",o("b",{children:Y(f.before.daily)})," \u2192 ",o("b",{children:Y(f.after.daily)})]}),o("span",{children:[e("common.thisWeek")," ",o("b",{children:Y(f.before.weekly)})," \u2192 ",o("b",{children:Y(f.after.weekly)})]}),f.cards!==null&&o("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),o(pe,{label:e("card.exchange"),desc:e("card.price",{price:se(d,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:h,"aria-label":e("card.count"),onInput:$=>{y($.currentTarget.value),m.clear()}}),o("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:se(x,n)}):e("card.countHint")}),o(mt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?se(x,n):"\u2014"}),pending:m.pending,disabled:!T||E,onConfirm:B})]}),(E||m.error||m.success)&&o(re,{children:[E&&!m.error&&o(Q,{tone:"warn",children:e("err.insufficientPoints")}),o(O,{a:m})]})]})}function bu(t,e,n){let r=L(),[a,i]=A(null);return{checked:a??t,toggle:l=>{i(l),r.run(async()=>{let u=await e(l);if(i(null),!u.ok)return ue(u);n(l)})},action:r}}function xu(t){let{t:e,locale:n}=N(),r=L(),a=()=>void r.run(async()=>await Nn("credits")?void 0:{error:{key:"err.openFailed"}});return o(G,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?o(I,{variant:"primary",pending:r.pending,onClick:a,children:e("points.recharge")}):void 0,children:[o(pe,{label:e("points.balance"),children:t.data.balance!==null?o("span",{class:"fx-big","data-testid":"points-balance",children:se(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")})]})}),r.error&&o(re,{children:o(O,{a:r})})]})}var yu=[5,10,20];function ku(t){let{t:e}=N(),{bg:n}=t,r=ht(n.dailyRemaining,n.dailyLimit),a=ht(n.weeklyRemaining,n.weeklyLimit),i=L(),[s,l]=A(null),u=bu(!!n.autoMain,p=>{let m=H();return Ln(m.accountBgAutoMain?()=>m.accountBgAutoMain(p):null,()=>P("/token-quota/background/auto-main",{method:"POST",body:{enabled:p}}))},p=>t.update(m=>({...m,quota:{...m.quota,background:{...m.quota.background??{},autoMain:p}}}))),d=p=>{l(p),i.run(async()=>{let m=H(),f=await Ln(m.accountBgConvert?()=>m.accountBgConvert(p):null,()=>P("/token-quota/background/convert",{method:"POST",body:{percent:p}}));if(l(null),!f.ok)return ue(f);let b=f.data?.quota;return b&&t.update(y=>({...y,quota:{...y.quota,...b,resetCards:y.quota.resetCards,resetCardPricePoints:y.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:p}}}})};return o(G,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Zt,{label:e("common.today"),display:r}),o(Zt,{label:e("common.thisWeek"),display:a})]}),o(pe,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:o(Lt,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),o(pe,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:yu.map(p=>o(mt,{label:`${p}%`,confirmLabel:e("bg.convertConfirm",{pct:p}),pending:i.pending&&s===p,disabled:i.pending&&s!==p,onConfirm:()=>d(p)},p))}),(i.error||i.success||u.action.error)&&o(re,{children:[o(O,{a:u.action}),o(O,{a:i})]})]})}function vu(t){let{t:e,locale:n}=N(),{invite:r,inviteState:a}=t.data,[i,s]=A(null),[l,u]=A(""),[d,p]=A(""),m=L(),f=L(),b=L();X(()=>{let x=!0;return H().authStatus?.().then(_=>{x&&s(_?.cloudUrl?_.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let h=async()=>{let x=await P("/invite/my-code");return t.update(_=>({..._,invite:x.ok?x.data:_.invite,inviteState:x.ok?"ok":x.status===404?"hidden":_.inviteState})),x},y=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let _=await P("/invite/claim",{method:"POST",body:{code:x}});return _.ok?(u(""),h(),{success:{key:"invite.claimed"}}):ue(_)}),k=()=>void f.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let _=await P("/redemption/redeem",{method:"POST",body:{code:x}});if(!_.ok)return ue(_);p(""),t.onRedeemed();let E=[],R=ee(_.data?.creditsAmount);R&&E.push(e("redeem.gotPoints",{n:se(R,n)})),_.data?.membershipPlanId&&E.push(e("redeem.gotMembership"));for(let B of Array.isArray(_.data?.items)?_.data.items:[]){let Y=(n==="zh"?B?.label?.zh:B?.label?.en)||B?.label?.zh||B?.label?.en||B?.kind;Y&&E.push(Y)}return{success:E.length?{key:"redeem.successWith",vars:{what:E.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),T=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return o(G,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[a==="ok"&&r?.code&&o(pe,{label:e("invite.myCode"),desc:e("invite.count",{n:se(ee(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[o("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),o(Dt,{text:r.code,label:e("invite.copyCode")}),o(Dt,{text:T,label:e("invite.copyLink"),disabled:!T})]}),a==="failed"&&o(re,{children:o(Q,{tone:"warn",children:[e("invite.loadFailed")," ",o("button",{type:"button",class:"fx-link",disabled:b.pending,onClick:()=>void b.run(async()=>{await h()}),children:e("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&o(pe,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[o("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>u(x.currentTarget.value)}),o(I,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&o(re,{children:o(O,{a:m})}),t.redeemEnabled&&o(pe,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),k()},children:[o("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>p(x.currentTarget.value)}),o(I,{submit:!0,pending:f.pending,children:e("redeem.submit")})]})}),(f.error||f.success)&&o(re,{children:o(O,{a:f})})]})}function wu(t){let e=[],n,r=new Map;for(let a of t)if(a.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},e.push(n)),n.items.push(a);else if(a.itemType==="custom_item"&&a.itemDefinition?.stackable){let i=`${a.productId||a.id}:${JSON.stringify(a.itemDefinition)}`,s=r.get(i);s||(s={id:`custom:${i}`,items:[],resetCard:!1},r.set(i,s),e.push(s)),s.items.push(a)}else e.push({id:a.id,items:[a],resetCard:!1});return e}function Pi(){let t=Re(()=>P("/shop/inventory"));return t.state==="loading"?o(Ae,{panels:1,rows:4}):t.state==="signedOut"?o(Pe,{}):t.state==="error"?o(Te,{error:t.error,onRetry:t.retry}):o(_u,{items:t.data??[],onRefresh:t.reload,onUsed:e=>{t.update(n=>n.filter(r=>r.id!==e.itemId)),t.reload()}})}function _u(t){let{t:e,locale:n,goTo:r}=N(),[a,i]=A(null),[s,l]=A(null),u=Se(),d=wu(t.items),p=d.find(h=>h.id===a),m=Math.max(24,Math.ceil(d.length/6)*6)-d.length,f=h=>h.resetCard?e("card.title"):h.items[0].itemDefinition?.name[n]||h.items[0].displayName||e("backpack.item"),b=h=>{u.current&&(l(h),t.onUsed(h))};return o(G,{icon:"backpack",title:e("page.backpack"),desc:e("backpack.desc"),actions:o(I,{onClick:t.onRefresh,children:[o(z,{name:"refresh",size:13}),e("backpack.refresh")]}),children:o("div",{class:"fx-backpack fx-block",children:[o("div",{class:"fx-backpack-summary",children:[o("span",{children:e("backpack.total",{n:se(t.items.length,n)})}),r&&o("button",{class:"fx-link",type:"button",onClick:()=>r("quota"),children:e("backpack.getCards")})]}),s&&o("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[o(z,{name:"gift",size:20}),o("div",{children:[o("strong",{children:s.message[n]}),o("div",{children:s.effects.map(h=>Ii(h,e,n)).join(" \xB7 ")})]})]},s.itemId),o("div",{class:"fx-backpack-layout",children:[o("div",{children:[o("div",{class:"fx-backpack-grid",role:"group","aria-label":e("backpack.grid"),children:[d.map(h=>{let y=f(h);return o("button",{type:"button",class:`fx-backpack-slot${h.resetCard?" is-card":""}`,"data-rarity":h.items[0].itemDefinition?.rarity,"aria-pressed":p?.id===h.id,"aria-label":e("backpack.slot",{name:y,n:h.items.length}),title:y,onClick:()=>i(h.id),children:[o("span",{class:"fx-backpack-icon",children:h.items[0].itemDefinition?.icon?o("span",{class:"fx-backpack-emoji",children:h.items[0].itemDefinition.icon}):o(z,{name:h.resetCard?"card":"gift",size:30})}),o("span",{class:"fx-backpack-name",children:y}),(h.resetCard||h.items[0].itemDefinition?.stackable)&&o("span",{class:"fx-backpack-count",children:["\xD7",se(h.items.length,n)]})]},h.id)}),Array.from({length:m},(h,y)=>o("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${y}`))]}),!d.length&&o("p",{class:"fx-backpack-empty",children:e("backpack.empty")})]}),p?o(Su,{slot:p,name:f(p),onUsed:b},`${p.id}:${p.items[0].id}`):o("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[o(z,{name:"backpack",size:30}),o(Q,{children:e(d.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function Ii(t,e,n){return t.type==="points"?e("backpack.effect.points",{n:se(t.amount,n)}):t.type==="reset_card"?e("backpack.effect.cards",{n:se(t.count,n)}):e("backpack.effect.quota")}function Su(t){let{t:e,locale:n,goTo:r}=N(),a=t.slot.items[0],[i,s]=A(null),l=L(),u=L(),[d,p]=A(!1),m=a.itemDefinition,f=Se(),b=a.source==="points"?e("backpack.source.points"):a.source==="admin"?e("backpack.source.admin"):a.source==="reward"?e("backpack.source.reward"):e("backpack.source.other"),h=()=>void l.run(async()=>{let k=await P(`/shop/inventory/${encodeURIComponent(a.id)}`);if(f.current){if(!k.ok)return ue(k);s(k.data)}}),y=()=>void u.run(async()=>{let k=await P(`/shop/inventory/${encodeURIComponent(a.id)}/use`,{method:"POST"});if(!k.ok)return ue(k);t.onUsed(k.data)});return o("section",{class:"fx-backpack-detail","aria-label":e("backpack.details"),children:[o("span",{class:`fx-backpack-detail-icon${t.slot.resetCard?" is-card":""}`,children:m?.icon?o("span",{class:"fx-backpack-emoji",children:m.icon}):o(z,{name:t.slot.resetCard?"card":"gift",size:32})}),o("h3",{children:t.name}),o("span",{class:"fx-tag",children:[e(t.slot.resetCard||m?.use?"backpack.consumable":m?"backpack.collectible":"backpack.voucher"),m&&` \xB7 ${e(`backpack.rarity.${m.rarity}`)}`]}),o("dl",{class:"fx-backpack-facts",children:[o("div",{children:[o("dt",{children:e("backpack.quantity")}),o("dd",{children:se(t.slot.items.length,n)})]}),o("div",{children:[o("dt",{children:e("backpack.acquired")}),o("dd",{children:Fe(a.acquiredAt,n)})]}),!t.slot.resetCard&&o("div",{children:[o("dt",{children:e("backpack.source")}),o("dd",{children:b})]})]}),m?o(q,{children:[m.description&&o(Q,{children:m.description[n]}),m.use&&o(q,{children:[o("div",{class:"fx-backpack-effects",children:m.use.effects.map((k,T)=>o("div",{children:Ii(k,e,n)},T))}),d?o(q,{children:[o(Q,{children:e("backpack.consumeConfirm")}),o("div",{class:"fx-backpack-use-actions",children:[o(I,{variant:"primary",pending:u.pending,onClick:y,children:e("backpack.confirmUse")}),o(I,{disabled:u.pending,onClick:()=>p(!1),children:e("common.cancel")})]})]}):o(I,{variant:"primary",onClick:()=>p(!0),children:m.use.label?.[n]||e("backpack.use")}),o(O,{a:u,captchaSection:"backpack"})]})]}):t.slot.resetCard?o(q,{children:[o(Q,{children:e("card.desc")}),r&&o(I,{variant:"primary",onClick:()=>r("quota"),children:e("backpack.manageCards")})]}):i?o("div",{class:"fx-backpack-reveal",children:[i.codeName&&o("div",{class:"fx-muted",children:i.codeName}),i.key?o(q,{children:[o("code",{children:i.key}),o(Dt,{text:i.key,label:e("backpack.copyKey")})]}):o(Q,{children:e("backpack.noKey")})]}):o(I,{pending:l.pending,onClick:h,children:[o(z,{name:"key",size:14}),e("backpack.reveal")]}),o(O,{a:l,captchaSection:"backpack"})]})}var Au=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Tu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Mi=(t,e)=>t==="phone"?Au.test(e):Tu.test(e),Qt=(t,e)=>t==="phone"?Un(e):$n(e);function Di(){let t=Re(()=>P("/auth/me"));if(t.state==="loading")return o(Ae,{panels:3,rows:2});if(t.state==="signedOut")return o(Pe,{});if(t.state==="error")return o(Te,{error:t.error,onRetry:t.retry});let e=t.data;return o(q,{children:[o(Eu,{me:e,onBound:(n,r)=>t.update(a=>({...a,[n]:r}))}),o(Pu,{me:e}),o(Lu,{}),o(Du,{me:e})]})}function ta(){let t=si(),e=L();return{cd:t,a:e,send:(a,i,s)=>e.run(async()=>{let l=await P("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):ue(l)}),reset:()=>{t.stop(),e.clear()}}}function Eu(t){let{t:e}=N(),[n,r]=A(null),[a,i]=A(null);return o(G,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return o(q,{children:[o(pe,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Qt(s,l):e("account.contact.unbound"),children:o(I,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&o(Cu,{kind:s,current:l??null,onDone:u=>{t.onBound(s,u),r(null),i(s)}}),a===s&&n!==s&&o(re,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Cu(t){let{t:e}=N(),{kind:n}=t,[r,a]=A(""),[i,s]=A(""),l=ta(),u=L(),d=r.trim(),p=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!Mi(n,d)){l.a.run(async()=>({error:{key:p}}));return}l.send(d,n,"bind")},f=()=>void u.run(async()=>{if(!Mi(n,d))return{error:{key:p}};if(!i.trim())return{error:{key:"err.codeRequired"}};let b=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},h=await P(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:b});if(!h.ok)return ue(h);t.onDone(d)});return o(re,{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:b=>a(b.currentTarget.value)})]}),o(na,{code:i,setCode:s,sender:l,onSend:m}),o("div",{class:"fx-inline",children:o(I,{variant:"primary",pending:u.pending,onClick:f,children:e("sec.bindSubmit")})}),o(O,{a:u})]})}function na(t){let{t:e}=N(),{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(I,{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(O,{a:r})]})}function Ru(t){let{t:e}=N(),n=ni(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(z,{name:"check",size:11}):r?o(z,{name:"x",size:11}):o("span",{class:"fx-rule-dot","aria-hidden":"true"}),o("span",{children:s})]},s))})}function Ni(t,e){let n=ti(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:Hr[n.rule]}}}function Pu(t){let{t:e}=N(),n=["phone","email"].filter(l=>!!t.me[l]),[r,a]=A("current"),[i,s]=A(!1);return o(G,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:o(I,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&o(re,{class:"fx-form",children:[o(gt,{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(Iu,{onDone:()=>s(!1)}):n.length?o(Mu,{me:t.me,targets:n,onDone:()=>s(!1)}):o(Q,{children:e("pw.codeNeedsContact")})]})})}function zi(t){let{t:e}=N();return o(q,{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(Ru,{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 Iu(t){let{t:e}=N(),[n,r]=A(""),[a,i]=A(""),[s,l]=A(""),u=L(),[d,p]=A(!1),m=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let f=Ni(a,s);if(f)return f;let b=await P("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return b.ok?(r(""),i(""),l(""),p(!0),{success:{key:"pw.changed"}}):b.status===404?{error:{key:"pw.noPasswordYet"}}:ue(b)});return o(q,{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:f=>r(f.currentTarget.value)})]}),o(zi,{pw:a,setPw:i,confirm:s,setConfirm:l}),o("div",{class:"fx-inline",children:[o(I,{variant:"primary",pending:u.pending,onClick:m,children:e("pw.submit")}),d&&o(I,{onClick:t.onDone,children:e("common.done")})]}),o(O,{a:u})]})}function Mu(t){let{t:e}=N(),[n,r]=A(t.targets[0]),[a,i]=A(""),[s,l]=A(""),[u,d]=A(""),p=ta(),m=L(),[f,b]=A(!1),h=t.me[n]||"",y=()=>void m.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let k=Ni(s,u);if(k)return k;let T=n==="phone"?{phone:h,code:a.trim(),newPassword:s}:{email:h,code:a.trim(),newPassword:s},x=await P("/auth/reset-password",{method:"POST",body:T});return x.ok?(i(""),l(""),d(""),b(!0),{success:{key:"pw.changed"}}):ue(x)});return o(q,{children:[t.targets.length>1?o(gt,{label:e("pw.via"),value:n,onChange:k=>{r(k),i(""),p.reset()},options:t.targets.map(k=>({value:k,label:Qt(k,t.me[k])}))}):o(Q,{children:e("pw.codeTo",{target:Qt(n,h)})}),o(na,{code:a,setCode:i,sender:p,onSend:()=>void p.send(h,n,"reset_password")}),o(zi,{pw:s,setPw:l,confirm:u,setConfirm:d}),o("div",{class:"fx-inline",children:[o(I,{variant:"primary",pending:m.pending,onClick:y,children:e("pw.submitReset")}),f&&o(I,{onClick:t.onDone,children:e("common.done")})]}),o(O,{a:m})]})}function Lu(){let{t}=N(),e=L(),n=()=>void e.run(async()=>{let r=await P("/auth/logout-all",{method:"POST"});if(!r.ok)return ue(r);try{await H().forsionLogout?.()}catch(a){return{error:{raw:Le(a)}}}return{success:{key:"sec.logoutAllDone"}}});return o(G,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[o(pe,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:o(mt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&o(re,{children:o(O,{a:e})})]})}function Du(t){let{t:e}=N(),n=["phone","email"].filter(T=>!!t.me[T]),[r,a]=A(!1),[i,s]=A(n.length?"code":"password"),[l,u]=A(n[0]??null),[d,p]=A(""),[m,f]=A(""),b=ta(),h=L(),y=l&&t.me[l]||"",k=()=>void h.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!m)return{error:{key:"pw.currentRequired"}};let T=await P("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:m}});if(!T.ok)return ue(T);try{await H().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return o(G,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:o(I,{variant:"danger",onClick:()=>{a(!r),h.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&o(re,{class:"fx-form",children:[o(Q,{tone:"error",children:e("del.warn")}),n.length>0&&o(gt,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&l?o(q,{children:[n.length>1&&o(gt,{label:e("pw.via"),value:l,onChange:T=>{u(T),p(""),b.reset()},options:n.map(T=>({value:T,label:Qt(T,t.me[T])}))}),o(na,{code:d,setCode:p,sender:b,label:e("del.codeLabel",{target:Qt(l,y)}),onSend:()=>void b.send(y,l,"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:m,onInput:T=>f(T.currentTarget.value)})]}),o("div",{class:"fx-inline",children:o(mt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:h.pending,onConfirm:k})}),o(O,{a:h})]})})}var Fi=20;function Bi(){let t=Re(async()=>{let[e,n]=await Promise.all([P("/token-quota/my"),P(`/token-quota/my/logs?limit=${Fi}&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:ee(e.data?.dailyLimit),logs:r,total:n.ok?ee(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?o(Ae,{panels:3,rows:2}):t.state==="signedOut"?o(Pe,{}):t.state==="error"?o(Te,{error:t.error,onRetry:t.retry}):o(q,{children:[o(Nu,{dailyLimit:t.data.dailyLimit}),o(Ou,{base:t.data,onRetry:t.reload})]})}function Nu(t){let{t:e,locale:n}=N(),[r,a]=A(30),[i,s]=A({state:"loading"}),[l,u]=A(!1),[d,p]=A(0),m=ne(0);X(()=>{let _=++m.current;return u(!0),P(`/usage/stats?days=${r}`).then(E=>{_===m.current&&(u(!1),s(E.ok?{state:"ready",data:E.data??{}}:{state:"error",fail:E}))}),()=>{m.current++}},[r,d]);let f=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Wn(1,t.dailyLimit)===null?"usage.noLimitNote":null,b=_=>Wn(_,t.dailyLimit)??"\u2014",h=o(gt,{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})}]}),y=i.state==="ready"?i.data:null,k=(y?.byModel??[]).filter(Boolean),T=(y?.byProject??[]).filter(Boolean),x=ee(y?.successRate);return o(q,{children:[o(G,{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:He(_e(i.fail),e)}),o("button",{type:"button",class:"fx-link",onClick:()=>p(_=>_+1),children:e("common.retry")})]})}):o("div",{class:`fx-stats fx-block${l&&y?" is-refreshing":""}`,"aria-busy":l||void 0,children:[o(ra,{label:e("usage.requests"),value:y?se(ee(y.totalRequests)??0,n):null,testId:"usage-requests"}),o(ra,{label:e("usage.successRate"),value:y?x===null?"\u2014":`${x.toFixed(1)}%`:null}),o(ra,{label:e("usage.consumption"),value:y?b(y.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),f&&o("div",{class:"fx-sub fx-sub--tight",children:o(Q,{children:e(f)})})]}),i.state!=="error"&&o(q,{children:[o(G,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:o(Oi,{loading:!y,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:k.map(_=>[_.modelName||_.modelId||"\u2014",se(ee(_.count)??0,n),b(_.pointsCost)])})}),o(G,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:o(Oi,{loading:!y,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:T.map(_=>[Ui(_.projectSource,e("usage.appUnknown")),se(ee(_.count)??0,n),b(_.pointsCost)])})})]})]})}var zu={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"},Ui=(t,e)=>!t||t==="unknown"?e:zu[t]??t;function ra(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 Oi(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(nt,{children:t.empty})}function Ou(t){let{t:e,locale:n}=N(),r=Se(),[a,i]=A(t.base.logs??[]),[s,l]=A(t.base.total),u=L();X(()=>{i(t.base.logs??[]),l(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let m=await P(`/token-quota/my/logs?limit=${Fi}&offset=${a.length}`);if(!m.ok)return{error:_e(m)};let f=Array.isArray(m.data?.logs)?m.data.logs:[];r.current&&(i(b=>[...b,...f]),l(b=>f.length?ee(m.data?.total)??b:a.length))}),p=t.base.dailyLimit;return o(G,{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:He(_e(t.base.logsFail),e)}),o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):a.length===0?o(nt,{children:e("usage.recentEmpty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map((m,f)=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-main",children:[o("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&o("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),o("small",{children:[Fe(m.createdAt,n),Ui(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),o("span",{class:"fx-value",children:Wn(m.pointsCost,p)??"\u2014"})]},m.id??f))}),a.length>0&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("usage.shown",{shown:se(a.length,n),total:se(Math.max(s,a.length),n)})}),a.length<s&&o(I,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(O,{a:u})})]})}var en=20,Xn=5,Fu=5*1024*1024,Vn=1e4,Bu={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function qi(t){let{t:e}=N(),n=t.status||"open",r=Bu[n];return o("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Hi(){let[t,e]=A(null),n=Re(async()=>{let r=await P(`/feedback?limit=${en}&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(Ae,{panels:1,rows:3}):n.state==="signedOut"?o(Pe,{}):n.state==="error"?o(Te,{error:n.error,onRetry:n.retry}):t?o(Wu,{id:t,onBack:()=>{e(null),n.reload()}}):o(Uu,{first:n.data,onOpen:e,onChanged:n.reload})}function Uu(t){let{t:e,locale:n}=N(),r=Se(),[a,i]=A(t.first),[s,l]=A(t.first.length===en),[u,d]=A(!1),[p,m]=A(!1),f=L();X(()=>{i(t.first),l(t.first.length===en)},[t.first]);let b=()=>void f.run(async()=>{let h=await P(`/feedback?limit=${en}&offset=${a.length}`);if(!h.ok)return{error:_e(h)};let y=Array.isArray(h.data?.tickets)?h.data.tickets:[];r.current&&(i(k=>{let T=new Set(k.map(x=>x.id));return[...k,...y.filter(x=>!T.has(x.id))]}),l(y.length===en))});return o(G,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:o(I,{variant:"primary",onClick:()=>{m(!1),d(!0)},children:[o(z,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&o(Hu,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),m(!0),t.onChanged()}}),p&&!u&&o(re,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),a.length===0?o(nt,{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:Fe(h.updated_at||h.created_at,n)})]}),o(qi,{status:h.status}),o(z,{name:"chevron",size:12})]},h.id))}),a.length>0&&(s||f.error)&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("fb.shown",{n:se(a.length,n)})}),s&&o(I,{pending:f.pending,onClick:b,children:e("common.loadMore")})]}),f.error&&o(re,{children:o(O,{a:f})})]})}function $u(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 qu=0;function Hu(t){let{t:e}=N(),n=Se(),[r,a]=A(""),[i,s]=A([]),[l,u]=A(null),[d,p]=A(!1),m=ne(null),f=L(),[b,h]=A(0),y=ne(0);y.current=i.length;let k=async x=>{u(null);for(let _ of Array.from(x||[])){if(!_.type||!_.type.startsWith("image/")){u({key:"err.imageType"});continue}if(_.size>Fu){u({key:"err.imageTooLarge"});continue}if(y.current>=Xn){u({key:"err.tooManyImages"});break}y.current++,h(E=>E+1);try{let E=await $u(_);if(!n.current)return;let R={id:`img-${++qu}`,filename:_.name||"image",mime_type:_.type,size:_.size,data_base64:E.replace(/^data:[^;]+;base64,/,""),url:E};s(B=>B.length>=Xn?B:[...B,R])}catch{y.current--,u({key:"err.imageRead"})}finally{n.current&&h(E=>E-1)}}},T=()=>void f.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>Vn)return{error:{key:"err.feedbackTooLong"}};let _=i.map(({filename:R,mime_type:B,size:Y,data_base64:$})=>({filename:R,mime_type:B,size:Y,data_base64:$})),E=await P("/feedback",{method:"POST",body:{description:x,attachments:_},timeoutMs:12e4});if(!E.ok)return ue(E);t.onSubmitted()});return o("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let _=Array.from(x.clipboardData?.items||[]).filter(E=>E.kind==="file").map(E=>E.getAsFile()).filter(Boolean);_.length&&(x.preventDefault(),k(_))},onDragOver:x=>{x.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:x=>{x.preventDefault(),p(!1),k(x.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:Vn,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>a(x.currentTarget.value)})]}),o("p",{class:"fx-note",children:e("fb.imagesHint",{n:Xn})}),i.length>0&&o("div",{class:"fx-thumbs",children:i.map(x=>o("span",{class:"fx-thumb",children:[o("img",{src:x.url,alt:x.filename}),o("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(_=>_.filter(E=>E.id!==x.id)),u(null)},children:o(z,{name:"x",size:11})})]},x.id))}),l&&o("div",{class:"fx-msg is-error",role:"alert",children:He(l,e)}),o("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let _=x.currentTarget;k(_.files),_.value=""}}),o("div",{class:"fx-inline",children:[o(I,{disabled:i.length>=Xn||f.pending,onClick:()=>m.current?.click(),children:[o(z,{name:"image",size:12})," ",e("fb.addImages")]}),o("span",{class:"fx-grow"}),o(I,{disabled:f.pending,onClick:t.onCancel,children:e("common.cancel")}),o(I,{variant:"primary",pending:f.pending,disabled:b>0,onClick:T,children:e("fb.submit")})]}),o(O,{a:f})]})}function Wu(t){let{t:e,locale:n}=N(),[r,a]=A({state:"loading"}),[i,s]=A(0),[l,u]=A(""),[d,p]=A(null),m=L(),f=ne(0);X(()=>{let E=++f.current;return P(`/feedback/${encodeURIComponent(t.id)}`).then(R=>{if(E===f.current){if(!R.ok){a({state:"error",fail:R});return}a({state:"ready",data:{ticket:R.data.ticket,replies:R.data.replies??[],attachments:R.data.attachments??[]}}),P(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{f.current++}},[t.id,i]),X(()=>{if(!d)return;let E=R=>{R.key==="Escape"&&p(null)};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[d]);let b=o("div",{class:"fx-back",children:o(I,{onClick:t.onBack,children:[o(z,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return o(q,{children:[b,o(Ae,{panels:1,rows:3})]});if(r.state==="error")return o(q,{children:[b,o(Te,{error:_e(r.fail),onRetry:()=>{a({state:"loading"}),s(E=>E+1)}})]});let{ticket:h,replies:y,attachments:k}=r.data,T=h.status==="closed",x=E=>k.filter(R=>(R.reply_id??null)===E),_=()=>void m.run(async()=>{let E=l.trim();if(!E)return{error:{key:"err.replyEmpty"}};if(E.length>Vn)return{error:{key:"err.replyTooLong"}};let R=await P(`/feedback/${encodeURIComponent(h.id)}/replies`,{method:"POST",body:{content:E},timeoutMs:6e4});return R.ok?(u(""),s(B=>B+1),{success:{key:"fb.replySent"}}):ue(R)});return o(q,{children:[b,o(G,{icon:"message",title:h.title||e("fb.untitled"),actions:o(qi,{status:h.status}),desc:`#${String(h.id).slice(0,8)} \xB7 ${Fe(h.created_at,n)}`,children:[o("div",{class:"fx-thread fx-block",children:[o($i,{who:"user",when:h.created_at,text:h.description||"",files:x(null),onZoom:p}),y.map((E,R)=>o($i,{who:E.author_role==="user"?"user":"admin",when:E.created_at,text:E.content||"",files:E.id?x(E.id):[],onZoom:p},E.id??R))]}),T?o(re,{children:o(Q,{children:e("fb.closedNote")})}):o(re,{class:"fx-form",children:[o("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:Vn,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:E=>{u(E.currentTarget.value),m.success&&m.clear()}}),o("div",{class:"fx-inline",children:[o("span",{class:"fx-grow"}),o(I,{variant:"primary",pending:m.pending,onClick:_,children:e("fb.replySend")})]}),o(O,{a:m})]})]}),d&&o("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>p(null),children:o("img",{src:d,alt:""})})]})}function $i(t){let{t:e,locale:n}=N();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 ",Fe(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(z,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??a)})})]})}var Xu="forsion-extend",Wi=[{id:"account",titleKey:"page.account",Component:Ei},{id:"quota",titleKey:"page.quota",Component:Ri},{id:"backpack",titleKey:"page.backpack",Component:Pi},{id:"security",titleKey:"page.security",Component:Di},{id:"usage",titleKey:"page.usage",Component:Bi},{id:"feedback",titleKey:"page.feedback",Component:Hi}],Vu=t=>`forsion/fx:${Xu}:${t}`;function ju(t){let{ctx:e,page:n}=t,[r,a]=A(()=>qe(e.getLocale?.()));X(()=>{a(qe(e.getLocale?.()));let l=e.subscribeLocale?.(u=>a(qe(u)));return()=>{typeof l=="function"&&l()}},[e]);let i=Qe(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:On(r),goTo:typeof l=="function"?u=>l.call(e.app,Vu(u)):null}},[e,r]),s=n.Component;return o(Wr.Provider,{value:i,children:o("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[o("style",{children:Yo}),o(s,{})]})})}function Xi(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 Wi)t.registerSettingsView({id:r.id,category:"forsion",title:()=>qr(qe(t.getLocale?.()),r.titleKey),mount(a){return It(o(ju,{ctx:t,page:r}),a),()=>{It(null,a)}}});return Wi.length}var Vi;if(typeof ctx<"u"){Xi(ctx);let t=ei(ctx);t&&(Vi=()=>t.dispose())}return Ts(Gu);})();
|
|
388
|
+
`;var ht=t=>typeof t=="string"?t:"";function Hc(t){if(!t||typeof t!="object")return null;let e=t,n=typeof e.id=="string"?e.id.trim():typeof e.id=="number"&&Number.isFinite(e.id)?String(e.id):"",r=ht(e.titleZh),a=ht(e.bodyZh);return!n||!r.trim()&&!a.trim()?null:{id:n,titleZh:r,titleEn:ht(e.titleEn).trim()?ht(e.titleEn):null,bodyZh:a,bodyEn:ht(e.bodyEn).trim()?ht(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:ht(e.publishedAt)||null}}function Wc(t,e){return e==="en"&&t.bodyEn?{lang:"en",title:t.titleEn??t.titleZh,body:t.bodyEn}:{lang:"zh",title:t.titleZh,body:t.bodyZh}}var Xc=new Lr({gfm:!0,breaks:!0}),jc=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Vc=/^(?:https?:|mailto:|#)/i;function ui(t){return kr.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:jc,ALLOWED_URI_REGEXP:Vc})}function Kc(t,e){let n=e==="markdown"?Xc.parse(t,{async:!1}):t;return ui(n)}var Un=null;function Yc(){if(Un===null)try{let t=ui('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');Un=kr.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{Un=!1}return Un}function Gc(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Jc="http://www.w3.org/1999/xlink";function $n(t){let e=t.target,n=e&&typeof e.closest=="function"?e.closest("a, area"):null;if(!n||(t.preventDefault(),t.type!=="click"))return;let r=Gc(n.getAttribute("href")??n.getAttributeNS(Jc,"href"));if(r)try{X().openExternal?.(r)?.catch(()=>{})}catch{}}function ci(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Zc(t){let{ctx:e,ann:n}=t,[r,a]=A(()=>Fe(e.getLocale?.()));W(()=>{a(Fe(e.getLocale?.()));let p=e.subscribeLocale?.(b=>a(Fe(b)));return()=>{typeof p=="function"&&p()}},[e]);let i=nt(()=>Bn(r),[r]),s=Wc(n,r),l=Y(null),c=Y(null),u=Y(null),m=Y(null),f=Y(t.onClose);return f.current=t.onClose,W(()=>{let p=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let b=y=>{if(y.key==="Escape"){y.preventDefault(),y.stopPropagation(),f.current();return}if(y.key!=="Tab")return;let v=c.current,T=u.current,x=l.current;if(!v||!T||!x)return;let _=document.activeElement;if(!_||!x.contains(_)){y.preventDefault(),(y.shiftKey?T:v).focus();return}y.shiftKey&&(_===v||_===x)?(y.preventDefault(),T.focus()):!y.shiftKey&&_===T&&(y.preventDefault(),v.focus())},g=y=>{let v=l.current;v&&y.target instanceof Node&&!v.contains(y.target)&&v.focus()};return window.addEventListener("keydown",b,!0),document.addEventListener("focusin",g,!0),()=>{window.removeEventListener("keydown",b,!0),document.removeEventListener("focusin",g,!0),p?.isConnected&&p.focus()}},[]),W(()=>{let p=m.current;if(!p)return;let b=ci(p);return b.addEventListener("click",$n),b.addEventListener("auxclick",$n),()=>{b.removeEventListener("click",$n),b.removeEventListener("auxclick",$n)}},[]),W(()=>{let p=m.current;if(!p)return;let b=document.createElement("style");b.textContent=li;let g=document.createElement("div");g.className="doc",g.appendChild(Kc(s.body,n.format)),ci(p).replaceChildren(b,g)},[s.body,n.format]),o("div",{class:"fx-ann-backdrop",children:[o("style",{children:si}),o("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[o("button",{ref:c,type:"button",class:"fx-ann-close","aria-label":i("ann.close"),onClick:()=>f.current(),children:o(O,{name:"x",size:16})}),o("div",{class:"fx-ann-eyebrow",children:i("ann.eyebrow")}),o("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),o("div",{class:"fx-ann-body",children:o("div",{ref:m,id:"fx-ann-body",class:"fx-ann-doc"})}),o("div",{class:"fx-ann-footer",children:o("button",{ref:u,type:"button",class:"fx-ann-ok",onClick:()=>f.current(),children:i("ann.ok")})})]})]})}function Qc(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function eu(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let a=()=>{i.disconnect(),clearTimeout(s),r()},i=new MutationObserver(()=>{n.isConnected||a()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(a,e)}):Promise.resolve()}function di(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Qc(e.location?.search))return null;let r=0,a=!1,i=null,s=Promise.resolve(),l=m=>{let f=document.createElement("div");f.className="fx-ann-root",document.body.appendChild(f);let p=!1,b=g=>{p||(p=!0,i?.id===m.id&&(i=null),tt(null,f),f.remove(),g&&(s=P(`/announcements/${encodeURIComponent(m.id)}/seen`,{method:"POST"})))};i={id:m.id,finish:b},tt(o(Zc,{ctx:t,ann:m,onClose:()=>b(!0)}),f)},c=async()=>{let m=++r;await s;let f=await P("/announcements/pending");if(a||m!==r||!f.ok)return;let p=Hc(f.data?.announcement);!p||i||Yc()&&(await eu(),!(a||m!==r||i)&&l(p))},u=n.onAuthChanged?.(m=>{i?.finish(!1),m?.loggedIn?c():r++});return c(),{check:c,dispose(){a=!0,r++,typeof u=="function"&&u(),i?.finish(!1)}}}function pi(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 fi(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 mi={\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 gi={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",ITEM_NOT_FOUND:"backpack.unavailable",ITEM_NOT_ACTIVE:"backpack.unavailable",ITEM_NOT_USABLE:"backpack.notUsable",ITEM_EFFECT_UNAVAILABLE:"backpack.quotaUnavailable",FEATURE_DISABLED:"err.featureDisabled",INSUFFICIENT_POINTS:"err.insufficientPoints",OUT_OF_STOCK:"store.soldOut",LIMIT_REACHED:"store.limitReached",NOT_AVAILABLE:"store.unavailable",NOT_POINTS_PURCHASABLE:"store.unavailable",CAPTCHA_FAILED:"err.captcha"},hi={"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"},Xr={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 tu(t){if(t.code&&gi[t.code])return gi[t.code];if(t.detail){if(hi[t.detail])return hi[t.detail];let e=mi[t.detail];if(e)return Xr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function Ce(t){let e=tu(t);return e?{key:e}:gt(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 Zt(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 jr=Xo(null);function M(){let t=ti(jr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var at=()=>M().t;function Ee(){let t=Y(!0);return W(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var bi={pending:!1,error:null,success:null,captcha:!1};function D(){let t=Ee(),[e,n]=A(bi),r=Y(!1),a=rt(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let l;try{l=await s()}catch(c){l={error:{raw:String(c?.message||c)}}}r.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=rt(()=>{r.current||n(bi)},[]);return{...e,run:a,clear:i}}var ie=t=>({error:Ce(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function xi(){let[t,e]=A(0),n=Y(null);W(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=rt((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=rt(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:a}}function xe(t){let[e,n]=A({state:"loading"}),r=Y(0),a=Y(t);a.current=t;let i=rt((c=!1)=>{let u=++r.current;c||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)}}u===r.current&&(m.ok?n({state:"ready",data:m.data,gen:u}):gt(m)?n({state:"signedOut"}):(m.status===401&&X().authStatus?.().catch(()=>{}),n({state:"error",fail:m})))})()},[]);W(()=>{i();let c=X().onAuthChanged?.(()=>i());return()=>{r.current++,c?.()}},[i]);let s=rt(()=>i(),[i]),l=rt(()=>i(!0),[i]);switch(e.state){case"ready":{let c=e.gen,u=m=>n(f=>f.state==="ready"&&f.gen===c?{...f,data:m(f.data)}:f);return{state:"ready",data:e.data,reload:l,update:u}}case"error":return{state:"error",error:Ce(e.fail),retry:s};default:return e}}function qn(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 Hn(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 Qt(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var nu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yi(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 l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(c=>c.type==="month")?.value),a=Number(l.find(c=>c.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:e==="zh"?`${r}\u6708${a}\u65E5`:`${nu[r-1]} ${a}`}var Vr=t=>t==="zh"?"zh-CN":"en-US";function vi(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 Wn(t,e){let n=vi(t);return n?new Intl.DateTimeFormat(Vr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Be(t,e){let n=vi(t);return n?new Intl.DateTimeFormat(Vr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function G(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Vr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var bt=class extends Error{};async function ki(t,e=256){if(t.size>20971520)throw new bt;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 bt;let s=Math.min(1,e/Math.max(a,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*s)),l.height=Math.max(1,Math.round(i*s));let c=l.getContext("2d");if(!c)throw new Error("canvas unavailable");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height),c.drawImage(r,0,0,l.width,l.height);let u=l.toDataURL("image/jpeg",.85);if(u.length>262144)throw new bt;return u}finally{URL.revokeObjectURL(n)}}function wi(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 xt=(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))(xt||{}),ru=[0,1],Si=[1,0],Ai=[2,3],Ti=[3,2],au={L:ru,M:Si,Q:Ai,H:Ti},ou=/^\d*$/,iu=/^[A-Z0-9 $%*+./:-]*$/,Kr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Zr=1,Qr=40,_i=3,su=3,Xn=40,lu=10,Ci=[[-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]],Ei=[[-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]],Yr=class{constructor(e,n,r,a){if(this.version=e,this.ecc=n,e<Zr||e>Qr)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 l=0;l<this.size;l++)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 l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let u=this.getPenaltyScore();u<l&&(a=c,l=u),this.applyMask(c)}}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,xt.Timing),this.setFunctionModule(r,6,r%2===0,xt.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,We(a,i));this.setFunctionModule(8,7,We(a,6)),this.setFunctionModule(8,8,We(a,7)),this.setFunctionModule(7,8,We(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,We(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,We(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,We(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=We(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,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,xt.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,xt.Alignment)}setFunctionModule(e,n,r,a=xt.Function){this.modules[n][e]=r,this.types[n][e]=a}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==jn(n,r))throw new RangeError("Invalid argument");let a=Ei[r[0]][n],i=Ci[r[0]][n],s=Math.floor(Gr(n)/8),l=a-s%a,c=Math.floor(s/a),u=[],m=bu(i);for(let p=0,b=0;p<a;p++){let g=e.slice(b,b+c-i+(p<l?0:1));b+=g.length;let y=xu(g,m);p<l&&g.push(0),u.push(g.concat(y))}let f=[];for(let p=0;p<u[0].length;p++)u.forEach((b,g)=>{(p!==c-i||g>=l)&&f.push(b[p])});return f}drawCodewords(e){if(e.length!==Math.floor(Gr(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,c=(r+1&2)===0?this.size-1-a:a;!this.types[c][s]&&n<e.length*8&&(this.modules[c][s]=We(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,l=0,c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[i][u]===s?(l++,l===5?e+=_i:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Xn),s=this.modules[i][u],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Xn}for(let i=0;i<this.size;i++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][i]===s?(l++,l===5?e+=_i:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Xn),s=this.modules[u][i],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Xn}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(e+=su)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=a*lu,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 Xe(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 We(t,e){return(t>>>e&1)!==0}var en=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()}},cu=[1,10,12,14],uu=[2,9,11,13],du=[4,8,16,16];function Pi(t,e){return t[Math.floor((e+7)/17)+1]}function Ri(t){let e=[];for(let n of t)Xe(n,8,e);return new en(du,t.length,e)}function pu(t){if(!Ii(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);Xe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new en(cu,t.length,e)}function fu(t){if(!Mi(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=Kr.indexOf(t.charAt(n))*45;r+=Kr.indexOf(t.charAt(n+1)),Xe(r,11,e)}return n<t.length&&Xe(Kr.indexOf(t.charAt(n)),6,e),new en(uu,t.length,e)}function mu(t){return t===""?[]:Ii(t)?[pu(t)]:Mi(t)?[fu(t)]:[Ri(hu(t))]}function Ii(t){return ou.test(t)}function Mi(t){return iu.test(t)}function gu(t,e){let n=0;for(let r of t){let a=Pi(r.mode,e);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function hu(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 Gr(t){if(t<Zr||t>Qr)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 jn(t,e){return Math.floor(Gr(t)/8)-Ci[e[0]][t]*Ei[e[0]][t]}function bu(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]=Jr(e[a],n),a+1<e.length&&(e[a]^=e[a+1]);n=Jr(n,2)}return e}function xu(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]^=Jr(i,a))}return n}function Jr(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 yu(t,e,n=1,r=40,a=-1,i=!0){if(!(Zr<=n&&n<=r&&r<=Qr)||a<-1||a>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let f=jn(s,e)*8,p=gu(t,s);if(p<=f){l=p;break}if(s>=r)throw new RangeError("Data too long")}for(let f of[Si,Ai,Ti])i&&l<=jn(s,f)*8&&(e=f);let c=[];for(let f of t){Xe(f.mode[0],4,c),Xe(f.numChars,Pi(f.mode,s),c);for(let p of f.getData())c.push(p)}let u=jn(s,e)*8;Xe(0,Math.min(4,u-c.length),c),Xe(0,(8-c.length%8)%8,c);for(let f=236;c.length<u;f^=253)Xe(f,8,c);let m=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((f,p)=>m[p>>>3]|=f<<7-(p&7)),new Yr(s,e,m,a)}function Li(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=e||{},c=typeof t=="string"?mu(t):Array.isArray(t)?[Ri(t)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let u=yu(c,au[n],a,i,s,r),m=vu({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return e?.invert&&(m.data=m.data.map(f=>f.map(p=>!p))),e?.onEncoded?.(m),m}function vu(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=xt.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 J(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(O,{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 fe(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 ae(t){return o("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function Ot(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 R(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(Jt,{}),t.children]})}var ku=5e3;function je(t){let[e,n]=A(!1),r=Y(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};W(()=>()=>{r.current&&clearTimeout(r.current)},[]),W(()=>{(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)},ku);return}a(),t.onConfirm()},s=t.variant??"ghost";return o(R,{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 N(t){let e=at(),{a:n}=t;return n.error?o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:He(n.error,e)}),n.captcha&&o("button",{type:"button",class:"fx-link",onClick:()=>void zn(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",o(O,{name:"external",size:12})]})]}):n.success?o("div",{class:"fx-msg is-ok",role:"status",children:He(n.success,e)}):null}function ne(t){return o("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function ot(t){return o("div",{class:"settings-empty-row fx-block",children:t.children})}function tn(t){let e=at(),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 Ve(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 wu(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 it(t){let e=at(),[n,r]=A("idle"),a=Y(null);W(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await wu(t.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return o(R,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[o(O,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function _u(t){let e=nt(()=>{try{return Li(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,l)=>{s&&(n+=`M${l} ${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 ea(t){let e=at(),{device:n}=t;return o("div",{class:"fx-device",children:[o(_u,{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(O,{name:"external",size:12})]}),o(it,{text:n.url,label:e("signin.copyLink")})]})]})]})}function ye(){let t=at(),e=D(),[n,r]=A(null);W(()=>X().onAuthDevice?.(i=>r(i)),[]);let a=()=>void e.run(async()=>{let i=X().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let l=Zt(Le(s));return l?{error:l}: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(O,{name:"user",size:18})}),o("p",{class:"fx-signin-lead",children:t("signin.desc")}),o("div",{class:"settings-state-actions",children:o(R,{variant:"primary",pending:e.pending,onClick:a,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&o(ea,{device:n}),o(N,{a:e})]})})}function ge(t){let e=at(),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,l)=>o("div",{class:"settings-control-row",children:o("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function he(t){let e=at();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(O,{name:"alert",size:18})}),o("strong",{children:e("common.loadFailed")}),o("p",{children:He(t.error,e)}),o("div",{class:"settings-state-actions",children:o(R,{variant:"primary",onClick:t.onRetry,children:[o(O,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}var Su=t=>!!t&&typeof t=="object"&&typeof t.enabled=="boolean";async function ta(t,e){let n=X().cloudInvoke;if(!n)throw new Error("no_bridge");let r=await n(t,e);if(!Su(r))throw new Error(String(r?.error??"unavailable"));return r}var Au=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins"];function Di(){let{t,locale:e}=M(),n=Ee(),[r,a]=A(null),i=D(),s=D();if(W(()=>{let p=!1,b=()=>{ta("diagnostics:get").then(y=>{p||a(y)},()=>{p||a(null)})};b();let g=X().onAuthChanged?.(b);return()=>{p=!0,g?.()}},[]),!r?.signedIn)return null;let l=()=>void s.run(async()=>{try{let p=await ta("diagnostics:uploadNow");return n.current&&a(p),p.lastError?{error:{key:"diag.failed",vars:{reason:p.lastError}}}:p.enabled&&p.lastUploadAt?{success:{key:"diag.uploaded"}}:void 0}catch(p){return{error:{raw:Le(p)||t("err.generic")}}}}),c=async p=>{let b=!1;await i.run(async()=>{s.clear();try{let g=await ta("diagnostics:set",p);n.current&&a(g),b=!0}catch(g){return{error:{raw:Le(g)||t("err.generic")}}}}),b&&p.enabled&&n.current&&l()},u=r.intervalHours??24,m=r.mode==="manual"?t("diag.freq.manual"):u===1?t("diag.freq.hour"):u%24===0?u===24?t("diag.freq.day"):t("diag.freq.days",{n:u/24}):t("diag.freq.hours",{n:u}),f=`${r.lastUploadAt?t("diag.last",{time:Be(r.lastUploadAt,e)}):t("diag.noUpload")} \xB7 ${m}`;return o(J,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[o(fe,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:o(Ot,{checked:r.enabled,disabled:i.pending,label:t("diag.enable"),onChange:p=>void c({enabled:p})})}),o(ae,{class:"fx-diag",children:[o("strong",{children:t("diag.collected")}),o("ul",{children:Au.map(p=>o("li",{children:t(p)},p))}),o(ne,{children:t("diag.notCollected")})]}),r.sessions!==void 0&&o(fe,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:o(Ot,{checked:r.sessions,disabled:i.pending,label:t("diag.sessions"),onChange:p=>void c({sessions:p})})}),o(fe,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:o(Ot,{checked:r.activity,disabled:i.pending,label:t("diag.activity"),onChange:p=>void c({activity:p})})}),r.enabled&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:f}),o(R,{pending:s.pending,disabled:i.pending,onClick:l,children:t("diag.uploadNow")})]}),o(ae,{class:"fx-sub--tight",children:[o(ne,{children:t("diag.retention",{n:r.retainDays})}),r.enabled&&r.lastError&&!s.error&&!s.success&&o("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:r.lastError})}),o(N,{a:i}),o(N,{a:s})]})]})}function Oi(){let t=xe(async()=>{let[n,r,a]=await Promise.all([P("/auth/me"),P("/membership/my"),P("/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(ge,{panels:3});if(t.state==="signedOut")return o(ye,{});if(t.state==="error")return o(he,{error:t.error,onRetry:t.retry});let{data:e}=t;return o(z,{children:[o(Tu,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),o(Cu,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),o(Eu,{}),o(Di,{}),o(Ru,{})]})}function Tu(t){let{t:e}=M(),{me:n}=t,r=D(),a=D(),[i,s]=A(!1),[l,c]=A(""),u=Y(null),m=n.nickname||n.username,f=g=>{g&&r.run(async()=>{let y;try{y=await ki(g)}catch(T){return{error:{key:T instanceof bt?"err.avatarTooLarge":"err.avatarInvalid"}}}let v=await P("/settings",{method:"PUT",body:{avatar:y}});return v.ok?(t.onPatch({avatar:y}),{success:{key:"account.avatar.saved"}}):{error:Ce(v)}})},p=()=>{a.clear(),c(m||""),s(!0)},b=()=>{let g=l.trim();if(!g||g===m){s(!1);return}a.run(async()=>{let y=await P("/settings",{method:"PUT",body:{nickname:g}});return y.ok?(t.onPatch({nickname:g}),s(!1),{success:{key:"account.nickname.saved"}}):{error:Ce(y)}})};return o(J,{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:()=>u.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:wi(m)}),o("span",{class:"fx-avatar-mask",children:r.pending?o(Jt,{size:14}):o(O,{name:"pencil",size:14})})]}),o("input",{ref:u,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:g=>{let y=g.currentTarget;f(y.files?.[0]),y.value=""}}),o("div",{class:"fx-identity-main",children:[i?o("form",{class:"fx-inline",onSubmit:g=>{g.preventDefault(),b()},children:[o("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:g=>c(g.currentTarget.value),onKeyDown:g=>{g.key==="Escape"&&(g.preventDefault(),s(!1))}}),o(R,{variant:"primary",submit:!0,pending:a.pending,children:e("common.save")}),o(R,{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:p,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:o(O,{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(N,{a}),o(N,{a:r})]})]}),o(Ni,{kind:"phone",value:n.phone}),o(Ni,{kind:"email",value:n.email})]})}function Ni(t){let{t:e,goTo:n}=M(),r=!!t.value,a=r?t.kind==="phone"?qn(t.value):Hn(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return o(fe,{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(O,{name:"chevron",size:12})]}):o("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function Cu(t){let{t:e,locale:n}=M(),r=D(),a=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=Qt(a?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",c=()=>void r.run(async()=>await Nt("membership")?void 0:{error:{key:"err.openFailed"}});return o(J,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?o(R,{variant:"primary",pending:r.pending,onClick:c,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--${l}`,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:Wn(a.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&o("div",{class:"fx-sub",children:o(ne,{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(N,{a:r})})]})}function Eu(){let{t}=M(),e=Ee(),[n,r]=A(null),[a,i]=A(!1),[s,l]=A(null),[c,u]=A(null),m=D(),f=D(),p=D(),b=!!X().authAccounts;W(()=>{let x=0,_=()=>{let U=X().authAccounts;if(!U)return;let Z=++x;i(!1),U().then(q=>{Z===x&&r(Array.isArray(q)?q:[])}).catch(()=>{Z===x&&i(!0)})};_();let C=X().onAuthChanged?.(_),I=X().onAuthDevice?.(U=>u(U));return()=>{x++,C?.(),I?.()}},[]);let g=x=>{l(x),m.run(async()=>{let _=X().forsionSwitchAccount;if(!_)return{error:{key:"err.unavailable"}};try{await _(x)}catch(C){let I=Zt(Le(C));return I?{error:I}:void 0}finally{e.current&&l(null)}})},y=()=>void f.run(async()=>{let x=X().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};u(null);try{await x()}catch(_){e.current&&u(null);let C=Zt(Le(_));return C?{error:C}:void 0}}),v=()=>void p.run(async()=>{let x=X().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(_){return{error:{raw:Le(_)||t("err.generic")}}}}),T=m.pending||f.pending||p.pending;return o(J,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[b&&n===null&&!a&&o(ot,{children:[o(Jt,{})," ",t("common.loading")]}),a&&o("div",{class:"fx-sub",children:o(ne,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&o(ot,{children:t("local.empty")}),n&&n.length>0&&o("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-icon",children:o(O,{name:"user",size:14})}),o("span",{class:"fx-list-main",children:[o("strong",{children:x.nickname||x.username||"Forsion"}),o("small",{children:[x.username&&x.nickname?x.username:null,Pu(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?o("span",{class:"fx-tag fx-tag--accent",children:[o(O,{name:"check",size:11})," ",t("local.current")]}):o(R,{pending:s===x.id,disabled:T&&s!==x.id,onClick:()=>g(x.id),children:t("local.switch")})]},x.id))}),f.pending&&c&&o("div",{class:"fx-sub",children:o(ea,{device:c})}),o("div",{class:"settings-panel-footer fx-footer",children:[o(R,{pending:f.pending,disabled:T&&!f.pending,onClick:y,children:[o(O,{name:"plus",size:12})," ",f.pending?t("signin.pending"):t("local.add")]}),o(R,{pending:p.pending,disabled:T&&!p.pending,onClick:v,children:[o(O,{name:"logout",size:12})," ",t("local.signOut")]})]}),(m.error||f.error||p.error)&&o("div",{class:"fx-sub fx-sub--tight",children:[o(N,{a:m}),o(N,{a:f}),o(N,{a:p})]})]})}function Pu(t){try{return new URL(t).host}catch{return t}}function Ru(){let{t}=M(),e=D();return o("div",{class:"fx-page-foot",children:[o("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await zn()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",o(O,{name:"external",size:12})]}),o("span",{class:"fx-muted",children:t("account.web.desc")}),o(N,{a:e})]})}function H(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 Iu(t,e){let n=H(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,H(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var Mu=15;function yt(t,e){let n=Iu(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,H(t)??0),a=n===0&&r>0&&(H(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=Mu}}function Vn(t,e){let n=H(e);if(n===null||n<=0)return null;let r=H(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 Lu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Fi(){let t=xe(async()=>{let[s,l,c,u]=await Promise.all([P("/token-quota/my"),P("/credits/balance"),P("/features"),P("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?H(l.data?.balance):null,balanceFailed:!l.ok,features:c.ok&&c.data&&typeof c.data=="object"?c.data:{},invite:u.ok?u.data:null,inviteState:Lu(u)}}:s});if(t.state==="loading")return o(ge,{panels:3,rows:2});if(t.state==="signedOut")return o(ye,{});if(t.state==="error")return o(he,{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(z,{children:[o(Nu,{data:e,update:n,onFailed:t.reload}),o(zu,{data:e,payment:i,onRetry:t.reload}),r?.modelId?o(Bu,{bg:r,update:n}):null,(e.inviteState!=="hidden"||a)&&o(Uu,{data:e,update:n,redeemEnabled:a,onRedeemed:t.reload})]})}var zi=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function Du(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function Nu(t){let{t:e,locale:n,ctx:r}=M(),a=t.data.quota,i=yt(a.dailyRemaining,a.dailyLimit),s=yt(a.weeklyRemaining,a.weeklyLimit),l=yi(a.weeklyResetAt,n),c=Math.max(0,H(a.resetCards)??0),u=H(a.resetCardPricePoints)??100,m=D(),f=D(),[p,b]=A(null),[g,y]=A("1"),v=/^\d+$/.test(g.trim())?Number(g.trim()):NaN,T=Number.isInteger(v)&&v>=1&&v<=50,x=T?v*u:null,_=t.data.balance,C=x!==null&&_!==null&&_<x,I=()=>void m.run(async()=>{let q={daily:i,weekly:s},V=zi(a);b(null);let se=X(),ve=await On(se.accountUseResetCard?()=>se.accountUseResetCard("both"):null,()=>P("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!ve.ok)return t.onFailed(),ie(ve);let De=ve.data?.quota,Ue=H(ve.data?.resetCards);return t.update(vt=>({...vt,quota:{...vt.quota,...De??{},resetCards:Ue??vt.quota.resetCards}})),De&&!Du(r.app,{before:V,after:zi(De),remainingCards:Ue??void 0})&&b({before:q,after:{daily:yt(De.dailyRemaining,De.dailyLimit),weekly:yt(De.weeklyRemaining,De.weeklyLimit)},cards:Ue}),{success:{key:"card.used"}}}),U=()=>void f.run(async()=>{if(!T)return{error:{key:"err.invalidCount"}};let q=await P("/points/exchange-reset-cards",{method:"POST",body:{count:v,expectedPricePerCard:u}});return q.ok?(t.update(V=>({...V,quota:{...V.quota,resetCards:H(q.data?.resetCards)??V.quota.resetCards},balance:H(q.data?.newPointsBalance)??V.balance})),y("1"),{success:{key:"card.exchanged",vars:{n:H(q.data?.cardsGranted)??v}}}):(t.onFailed(),ie(q))}),Z=q=>q.unlimited?e("common.unlimited"):q.text;return o(J,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(tn,{label:e("common.today"),display:i,note:i.unlimited?null:e("quota.resetDaily")}),o(tn,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),o(fe,{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(je,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:m.pending,disabled:c<=0,onConfirm:I})]}),c<=0&&!m.success&&o(ae,{children:o(ne,{children:e("card.noneHint")})}),(m.error||m.success)&&o(ae,{children:[o(N,{a:m}),m.success&&p&&o("div",{class:"fx-ceremony",role:"status",children:[o("span",{children:[e("common.today")," ",o("b",{children:Z(p.before.daily)})," \u2192 ",o("b",{children:Z(p.after.daily)})]}),o("span",{children:[e("common.thisWeek")," ",o("b",{children:Z(p.before.weekly)})," \u2192 ",o("b",{children:Z(p.after.weekly)})]}),p.cards!==null&&o("span",{class:"fx-muted",children:e("card.left",{n:p.cards})})]})]}),o(fe,{label:e("card.exchange"),desc:e("card.price",{price:G(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:q=>{y(q.currentTarget.value),f.clear()}}),o("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:G(x,n)}):e("card.countHint")}),o(je,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?G(x,n):"\u2014"}),pending:f.pending,disabled:!T||C,onConfirm:U})]}),(C||f.error||f.success)&&o(ae,{children:[C&&!f.error&&o(ne,{tone:"warn",children:e("err.insufficientPoints")}),o(N,{a:f})]})]})}function Ou(t,e,n){let r=D(),[a,i]=A(null);return{checked:a??t,toggle:l=>{i(l),r.run(async()=>{let c=await e(l);if(i(null),!c.ok)return ie(c);n(l)})},action:r}}function zu(t){let{t:e,locale:n}=M(),r=D(),a=()=>void r.run(async()=>await Nt("credits")?void 0:{error:{key:"err.openFailed"}});return o(J,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?o(R,{variant:"primary",pending:r.pending,onClick:a,children:e("points.recharge")}):void 0,children:[o(fe,{label:e("points.balance"),children:t.data.balance!==null?o("span",{class:"fx-big","data-testid":"points-balance",children:G(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")})]})}),r.error&&o(ae,{children:o(N,{a:r})})]})}var Fu=[5,10,20];function Bu(t){let{t:e}=M(),{bg:n}=t,r=yt(n.dailyRemaining,n.dailyLimit),a=yt(n.weeklyRemaining,n.weeklyLimit),i=D(),[s,l]=A(null),c=Ou(!!n.autoMain,m=>{let f=X();return On(f.accountBgAutoMain?()=>f.accountBgAutoMain(m):null,()=>P("/token-quota/background/auto-main",{method:"POST",body:{enabled:m}}))},m=>t.update(f=>({...f,quota:{...f.quota,background:{...f.quota.background??{},autoMain:m}}}))),u=m=>{l(m),i.run(async()=>{let f=X(),p=await On(f.accountBgConvert?()=>f.accountBgConvert(m):null,()=>P("/token-quota/background/convert",{method:"POST",body:{percent:m}}));if(l(null),!p.ok)return ie(p);let b=p.data?.quota;return b&&t.update(y=>({...y,quota:{...y.quota,...b,resetCards:y.quota.resetCards,resetCardPricePoints:y.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:m}}}})};return o(J,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(tn,{label:e("common.today"),display:r}),o(tn,{label:e("common.thisWeek"),display:a})]}),o(fe,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:o(Ot,{checked:c.checked,disabled:c.action.pending,label:e("bg.autoMain"),onChange:c.toggle})}),o(fe,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:Fu.map(m=>o(je,{label:`${m}%`,confirmLabel:e("bg.convertConfirm",{pct:m}),pending:i.pending&&s===m,disabled:i.pending&&s!==m,onConfirm:()=>u(m)},m))}),(i.error||i.success||c.action.error)&&o(ae,{children:[o(N,{a:c.action}),o(N,{a:i})]})]})}function Uu(t){let{t:e,locale:n}=M(),{invite:r,inviteState:a}=t.data,[i,s]=A(null),[l,c]=A(""),[u,m]=A(""),f=D(),p=D(),b=D();W(()=>{let x=!0;return X().authStatus?.().then(_=>{x&&s(_?.cloudUrl?_.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let g=async()=>{let x=await P("/invite/my-code");return t.update(_=>({..._,invite:x.ok?x.data:_.invite,inviteState:x.ok?"ok":x.status===404?"hidden":_.inviteState})),x},y=()=>void f.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let _=await P("/invite/claim",{method:"POST",body:{code:x}});return _.ok?(c(""),g(),{success:{key:"invite.claimed"}}):ie(_)}),v=()=>void p.run(async()=>{let x=u.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let _=await P("/redemption/redeem",{method:"POST",body:{code:x}});if(!_.ok)return ie(_);m(""),t.onRedeemed();let C=[],I=H(_.data?.creditsAmount);I&&C.push(e("redeem.gotPoints",{n:G(I,n)})),_.data?.membershipPlanId&&C.push(e("redeem.gotMembership"));for(let U of Array.isArray(_.data?.items)?_.data.items:[]){let Z=(n==="zh"?U?.label?.zh:U?.label?.en)||U?.label?.zh||U?.label?.en||U?.kind;Z&&C.push(Z)}return{success:C.length?{key:"redeem.successWith",vars:{what:C.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),T=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return o(J,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[a==="ok"&&r?.code&&o(fe,{label:e("invite.myCode"),desc:e("invite.count",{n:G(H(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[o("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),o(it,{text:r.code,label:e("invite.copyCode")}),o(it,{text:T,label:e("invite.copyLink"),disabled:!T})]}),a==="failed"&&o(ae,{children:o(ne,{tone:"warn",children:[e("invite.loadFailed")," ",o("button",{type:"button",class:"fx-link",disabled:b.pending,onClick:()=>void b.run(async()=>{await g()}),children:e("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&o(fe,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[o("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>c(x.currentTarget.value)}),o(R,{submit:!0,pending:f.pending,children:e("invite.claimSubmit")})]})}),(f.error||f.success)&&o(ae,{children:o(N,{a:f})}),t.redeemEnabled&&o(fe,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),v()},children:[o("input",{class:"fx-input",value:u,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>m(x.currentTarget.value)}),o(R,{submit:!0,pending:p.pending,children:e("redeem.submit")})]})}),(p.error||p.success)&&o(ae,{children:o(N,{a:p})})]})}function $u(t){let e=[],n,r=new Map;for(let a of t)if(a.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},e.push(n)),n.items.push(a);else if(a.itemType==="custom_item"&&a.itemDefinition?.stackable){let i=`${a.productId||a.id}:${JSON.stringify(a.itemDefinition)}`,s=r.get(i);s||(s={id:`custom:${i}`,items:[],resetCard:!1},r.set(i,s),e.push(s)),s.items.push(a)}else e.push({id:a.id,items:[a],resetCard:!1});return e}function Bi(){let t=xe(()=>P("/shop/inventory"));return t.state==="loading"?o(ge,{panels:1,rows:4}):t.state==="signedOut"?o(ye,{}):t.state==="error"?o(he,{error:t.error,onRetry:t.retry}):o(qu,{items:t.data??[],onRefresh:t.reload,onUsed:e=>{t.update(n=>n.filter(r=>r.id!==e.itemId)),t.reload()}})}function qu(t){let{t:e,locale:n,goTo:r}=M(),[a,i]=A(null),[s,l]=A(null),c=Ee(),u=$u(t.items),m=u.find(g=>g.id===a),f=Math.max(24,Math.ceil(u.length/6)*6)-u.length,p=g=>g.resetCard?e("card.title"):g.items[0].itemDefinition?.name[n]||g.items[0].displayName||e("backpack.item"),b=g=>{c.current&&(l(g),t.onUsed(g))};return o(J,{icon:"backpack",title:e("page.backpack"),desc:e("backpack.desc"),actions:o(R,{onClick:t.onRefresh,children:[o(O,{name:"refresh",size:13}),e("backpack.refresh")]}),children:o("div",{class:"fx-backpack fx-block",children:[o("div",{class:"fx-backpack-summary",children:[o("span",{children:e("backpack.total",{n:G(t.items.length,n)})}),r&&o("button",{class:"fx-link",type:"button",onClick:()=>r("quota"),children:e("backpack.getCards")})]}),s&&o("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[o(O,{name:"gift",size:20}),o("div",{children:[o("strong",{children:s.message[n]}),o("div",{children:s.effects.map(g=>Ui(g,e,n)).join(" \xB7 ")})]})]},s.itemId),o("div",{class:"fx-backpack-layout",children:[o("div",{children:[o("div",{class:"fx-backpack-grid",role:"group","aria-label":e("backpack.grid"),children:[u.map(g=>{let y=p(g);return o("button",{type:"button",class:`fx-backpack-slot${g.resetCard?" is-card":""}`,"data-rarity":g.items[0].itemDefinition?.rarity,"aria-pressed":m?.id===g.id,"aria-label":e("backpack.slot",{name:y,n:g.items.length}),title:y,onClick:()=>i(g.id),children:[o("span",{class:"fx-backpack-icon",children:g.items[0].itemDefinition?.icon?o("span",{class:"fx-backpack-emoji",children:g.items[0].itemDefinition.icon}):o(O,{name:g.resetCard?"card":"gift",size:30})}),o("span",{class:"fx-backpack-name",children:y}),(g.resetCard||g.items[0].itemDefinition?.stackable)&&o("span",{class:"fx-backpack-count",children:["\xD7",G(g.items.length,n)]})]},g.id)}),Array.from({length:f},(g,y)=>o("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${y}`))]}),!u.length&&o("p",{class:"fx-backpack-empty",children:e("backpack.empty")})]}),m?o(Hu,{slot:m,name:p(m),onUsed:b},`${m.id}:${m.items[0].id}`):o("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[o(O,{name:"backpack",size:30}),o(ne,{children:e(u.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function Ui(t,e,n){return t.type==="points"?e("backpack.effect.points",{n:G(t.amount,n)}):t.type==="reset_card"?e("backpack.effect.cards",{n:G(t.count,n)}):e("backpack.effect.quota")}function Hu(t){let{t:e,locale:n,goTo:r}=M(),a=t.slot.items[0],[i,s]=A(null),l=D(),c=D(),[u,m]=A(!1),f=a.itemDefinition,p=Ee(),b=a.source==="points"?e("backpack.source.points"):a.source==="admin"?e("backpack.source.admin"):a.source==="reward"?e("backpack.source.reward"):e("backpack.source.other"),g=()=>void l.run(async()=>{let v=await P(`/shop/inventory/${encodeURIComponent(a.id)}`);if(p.current){if(!v.ok)return ie(v);s(v.data)}}),y=()=>void c.run(async()=>{let v=await P(`/shop/inventory/${encodeURIComponent(a.id)}/use`,{method:"POST"});if(!v.ok)return ie(v);t.onUsed(v.data)});return o("section",{class:"fx-backpack-detail","aria-label":e("backpack.details"),children:[o("span",{class:`fx-backpack-detail-icon${t.slot.resetCard?" is-card":""}`,children:f?.icon?o("span",{class:"fx-backpack-emoji",children:f.icon}):o(O,{name:t.slot.resetCard?"card":"gift",size:32})}),o("h3",{children:t.name}),o("span",{class:"fx-tag",children:[e(t.slot.resetCard||f?.use?"backpack.consumable":f?"backpack.collectible":"backpack.voucher"),f&&` \xB7 ${e(`backpack.rarity.${f.rarity}`)}`]}),o("dl",{class:"fx-backpack-facts",children:[o("div",{children:[o("dt",{children:e("backpack.quantity")}),o("dd",{children:G(t.slot.items.length,n)})]}),o("div",{children:[o("dt",{children:e("backpack.acquired")}),o("dd",{children:Be(a.acquiredAt,n)})]}),!t.slot.resetCard&&o("div",{children:[o("dt",{children:e("backpack.source")}),o("dd",{children:b})]})]}),f?o(z,{children:[f.description&&o(ne,{children:f.description[n]}),f.use&&o(z,{children:[o("div",{class:"fx-backpack-effects",children:f.use.effects.map((v,T)=>o("div",{children:Ui(v,e,n)},T))}),u?o(z,{children:[o(ne,{children:e("backpack.consumeConfirm")}),o("div",{class:"fx-backpack-use-actions",children:[o(R,{variant:"primary",pending:c.pending,onClick:y,children:e("backpack.confirmUse")}),o(R,{disabled:c.pending,onClick:()=>m(!1),children:e("common.cancel")})]})]}):o(R,{variant:"primary",onClick:()=>m(!0),children:f.use.label?.[n]||e("backpack.use")}),o(N,{a:c,captchaSection:"backpack"})]})]}):t.slot.resetCard?o(z,{children:[o(ne,{children:e("card.desc")}),r&&o(R,{variant:"primary",onClick:()=>r("quota"),children:e("backpack.manageCards")})]}):i?o("div",{class:"fx-backpack-reveal",children:[i.codeName&&o("div",{class:"fx-muted",children:i.codeName}),i.key?o(z,{children:[o("code",{children:i.key}),o(it,{text:i.key,label:e("backpack.copyKey")})]}):o(ne,{children:e("backpack.noKey")})]}):o(R,{pending:l.pending,onClick:g,children:[o(O,{name:"key",size:14}),e("backpack.reveal")]}),o(N,{a:l,captchaSection:"backpack"})]})}var Wu=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Xu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,$i=(t,e)=>t==="phone"?Wu.test(e):Xu.test(e),nn=(t,e)=>t==="phone"?qn(e):Hn(e);function Hi(){let t=xe(()=>P("/auth/me"));if(t.state==="loading")return o(ge,{panels:3,rows:2});if(t.state==="signedOut")return o(ye,{});if(t.state==="error")return o(he,{error:t.error,onRetry:t.retry});let e=t.data;return o(z,{children:[o(ju,{me:e,onBound:(n,r)=>t.update(a=>({...a,[n]:r}))}),o(Yu,{me:e}),o(Zu,{}),o(Qu,{me:e})]})}function ra(){let t=xi(),e=D();return{cd:t,a:e,send:(a,i,s)=>e.run(async()=>{let l=await P("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):ie(l)}),reset:()=>{t.stop(),e.clear()}}}function ju(t){let{t:e}=M(),[n,r]=A(null),[a,i]=A(null);return o(J,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return o(z,{children:[o(fe,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?nn(s,l):e("account.contact.unbound"),children:o(R,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&o(Vu,{kind:s,current:l??null,onDone:c=>{t.onBound(s,c),r(null),i(s)}}),a===s&&n!==s&&o(ae,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Vu(t){let{t:e}=M(),{kind:n}=t,[r,a]=A(""),[i,s]=A(""),l=ra(),c=D(),u=r.trim(),m=n==="phone"?"err.phoneInvalid":"err.emailInvalid",f=()=>{if(!$i(n,u)){l.a.run(async()=>({error:{key:m}}));return}l.send(u,n,"bind")},p=()=>void c.run(async()=>{if(!$i(n,u))return{error:{key:m}};if(!i.trim())return{error:{key:"err.codeRequired"}};let b=n==="phone"?{phone:u,verification_code:i.trim()}:{email:u,verification_code:i.trim()},g=await P(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:b});if(!g.ok)return ie(g);t.onDone(u)});return o(ae,{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:b=>a(b.currentTarget.value)})]}),o(aa,{code:i,setCode:s,sender:l,onSend:f}),o("div",{class:"fx-inline",children:o(R,{variant:"primary",pending:c.pending,onClick:p,children:e("sec.bindSubmit")})}),o(N,{a:c})]})}function aa(t){let{t:e}=M(),{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(R,{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(N,{a:r})]})}function Ku(t){let{t:e}=M(),n=fi(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(O,{name:"check",size:11}):r?o(O,{name:"x",size:11}):o("span",{class:"fx-rule-dot","aria-hidden":"true"}),o("span",{children:s})]},s))})}function Wi(t,e){let n=pi(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:Xr[n.rule]}}}function Yu(t){let{t:e}=M(),n=["phone","email"].filter(l=>!!t.me[l]),[r,a]=A("current"),[i,s]=A(!1);return o(J,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:o(R,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&o(ae,{class:"fx-form",children:[o(Ve,{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(Gu,{onDone:()=>s(!1)}):n.length?o(Ju,{me:t.me,targets:n,onDone:()=>s(!1)}):o(ne,{children:e("pw.codeNeedsContact")})]})})}function Xi(t){let{t:e}=M();return o(z,{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(Ku,{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 Gu(t){let{t:e}=M(),[n,r]=A(""),[a,i]=A(""),[s,l]=A(""),c=D(),[u,m]=A(!1),f=()=>void c.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let p=Wi(a,s);if(p)return p;let b=await P("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return b.ok?(r(""),i(""),l(""),m(!0),{success:{key:"pw.changed"}}):b.status===404?{error:{key:"pw.noPasswordYet"}}:ie(b)});return o(z,{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:p=>r(p.currentTarget.value)})]}),o(Xi,{pw:a,setPw:i,confirm:s,setConfirm:l}),o("div",{class:"fx-inline",children:[o(R,{variant:"primary",pending:c.pending,onClick:f,children:e("pw.submit")}),u&&o(R,{onClick:t.onDone,children:e("common.done")})]}),o(N,{a:c})]})}function Ju(t){let{t:e}=M(),[n,r]=A(t.targets[0]),[a,i]=A(""),[s,l]=A(""),[c,u]=A(""),m=ra(),f=D(),[p,b]=A(!1),g=t.me[n]||"",y=()=>void f.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let v=Wi(s,c);if(v)return v;let T=n==="phone"?{phone:g,code:a.trim(),newPassword:s}:{email:g,code:a.trim(),newPassword:s},x=await P("/auth/reset-password",{method:"POST",body:T});return x.ok?(i(""),l(""),u(""),b(!0),{success:{key:"pw.changed"}}):ie(x)});return o(z,{children:[t.targets.length>1?o(Ve,{label:e("pw.via"),value:n,onChange:v=>{r(v),i(""),m.reset()},options:t.targets.map(v=>({value:v,label:nn(v,t.me[v])}))}):o(ne,{children:e("pw.codeTo",{target:nn(n,g)})}),o(aa,{code:a,setCode:i,sender:m,onSend:()=>void m.send(g,n,"reset_password")}),o(Xi,{pw:s,setPw:l,confirm:c,setConfirm:u}),o("div",{class:"fx-inline",children:[o(R,{variant:"primary",pending:f.pending,onClick:y,children:e("pw.submitReset")}),p&&o(R,{onClick:t.onDone,children:e("common.done")})]}),o(N,{a:f})]})}function Zu(){let{t}=M(),e=D(),n=()=>void e.run(async()=>{let r=await P("/auth/logout-all",{method:"POST"});if(!r.ok)return ie(r);try{await X().forsionLogout?.()}catch(a){return{error:{raw:Le(a)}}}return{success:{key:"sec.logoutAllDone"}}});return o(J,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[o(fe,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:o(je,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&o(ae,{children:o(N,{a:e})})]})}function Qu(t){let{t:e}=M(),n=["phone","email"].filter(T=>!!t.me[T]),[r,a]=A(!1),[i,s]=A(n.length?"code":"password"),[l,c]=A(n[0]??null),[u,m]=A(""),[f,p]=A(""),b=ra(),g=D(),y=l&&t.me[l]||"",v=()=>void g.run(async()=>{if(i==="code"&&!u.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!f)return{error:{key:"pw.currentRequired"}};let T=await P("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:u.trim()}:{password:f}});if(!T.ok)return ie(T);try{await X().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return o(J,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:o(R,{variant:"danger",onClick:()=>{a(!r),g.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&o(ae,{class:"fx-form",children:[o(ne,{tone:"error",children:e("del.warn")}),n.length>0&&o(Ve,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&l?o(z,{children:[n.length>1&&o(Ve,{label:e("pw.via"),value:l,onChange:T=>{c(T),m(""),b.reset()},options:n.map(T=>({value:T,label:nn(T,t.me[T])}))}),o(aa,{code:u,setCode:m,sender:b,label:e("del.codeLabel",{target:nn(l,y)}),onSend:()=>void b.send(y,l,"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:T=>p(T.currentTarget.value)})]}),o("div",{class:"fx-inline",children:o(je,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:g.pending,onConfirm:v})}),o(N,{a:g})]})})}var Vi=20;function Ki(){let t=xe(async()=>{let[e,n]=await Promise.all([P("/token-quota/my"),P(`/token-quota/my/logs?limit=${Vi}&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:H(e.data?.dailyLimit),logs:r,total:n.ok?H(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?o(ge,{panels:3,rows:2}):t.state==="signedOut"?o(ye,{}):t.state==="error"?o(he,{error:t.error,onRetry:t.retry}):o(z,{children:[o(ed,{dailyLimit:t.data.dailyLimit}),o(nd,{base:t.data,onRetry:t.reload})]})}function ed(t){let{t:e,locale:n}=M(),[r,a]=A(30),[i,s]=A({state:"loading"}),[l,c]=A(!1),[u,m]=A(0),f=Y(0);W(()=>{let _=++f.current;return c(!0),P(`/usage/stats?days=${r}`).then(C=>{_===f.current&&(c(!1),s(C.ok?{state:"ready",data:C.data??{}}:{state:"error",fail:C}))}),()=>{f.current++}},[r,u]);let p=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Vn(1,t.dailyLimit)===null?"usage.noLimitNote":null,b=_=>Vn(_,t.dailyLimit)??"\u2014",g=o(Ve,{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})}]}),y=i.state==="ready"?i.data:null,v=(y?.byModel??[]).filter(Boolean),T=(y?.byProject??[]).filter(Boolean),x=H(y?.successRate);return o(z,{children:[o(J,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:g,children:[i.state==="error"?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:He(Ce(i.fail),e)}),o("button",{type:"button",class:"fx-link",onClick:()=>m(_=>_+1),children:e("common.retry")})]})}):o("div",{class:`fx-stats fx-block${l&&y?" is-refreshing":""}`,"aria-busy":l||void 0,children:[o(oa,{label:e("usage.requests"),value:y?G(H(y.totalRequests)??0,n):null,testId:"usage-requests"}),o(oa,{label:e("usage.successRate"),value:y?x===null?"\u2014":`${x.toFixed(1)}%`:null}),o(oa,{label:e("usage.consumption"),value:y?b(y.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),p&&o("div",{class:"fx-sub fx-sub--tight",children:o(ne,{children:e(p)})})]}),i.state!=="error"&&o(z,{children:[o(J,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:o(ji,{loading:!y,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:v.map(_=>[_.modelName||_.modelId||"\u2014",G(H(_.count)??0,n),b(_.pointsCost)])})}),o(J,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:o(ji,{loading:!y,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:T.map(_=>[Yi(_.projectSource,e("usage.appUnknown")),G(H(_.count)??0,n),b(_.pointsCost)])})})]})]})}var td={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"},Yi=(t,e)=>!t||t==="unknown"?e:td[t]??t;function oa(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 ji(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(ot,{children:t.empty})}function nd(t){let{t:e,locale:n}=M(),r=Ee(),[a,i]=A(t.base.logs??[]),[s,l]=A(t.base.total),c=D();W(()=>{i(t.base.logs??[]),l(t.base.total)},[t.base]);let u=()=>void c.run(async()=>{let f=await P(`/token-quota/my/logs?limit=${Vi}&offset=${a.length}`);if(!f.ok)return{error:Ce(f)};let p=Array.isArray(f.data?.logs)?f.data.logs:[];r.current&&(i(b=>[...b,...p]),l(b=>p.length?H(f.data?.total)??b:a.length))}),m=t.base.dailyLimit;return o(J,{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:He(Ce(t.base.logsFail),e)}),o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):a.length===0?o(ot,{children:e("usage.recentEmpty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map((f,p)=>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:[Be(f.createdAt,n),Yi(f.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),o("span",{class:"fx-value",children:Vn(f.pointsCost,m)??"\u2014"})]},f.id??p))}),a.length>0&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("usage.shown",{shown:G(a.length,n),total:G(Math.max(s,a.length),n)})}),a.length<s&&o(R,{pending:c.pending,onClick:u,children:e("common.loadMore")})]}),c.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(N,{a:c})})]})}var rn=20,Kn=5,rd=5*1024*1024,Yn=1e4,ad={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Ji(t){let{t:e}=M(),n=t.status||"open",r=ad[n];return o("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Zi(){let[t,e]=A(null),n=xe(async()=>{let r=await P(`/feedback?limit=${rn}&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(ge,{panels:1,rows:3}):n.state==="signedOut"?o(ye,{}):n.state==="error"?o(he,{error:n.error,onRetry:n.retry}):t?o(cd,{id:t,onBack:()=>{e(null),n.reload()}}):o(od,{first:n.data,onOpen:e,onChanged:n.reload})}function od(t){let{t:e,locale:n}=M(),r=Ee(),[a,i]=A(t.first),[s,l]=A(t.first.length===rn),[c,u]=A(!1),[m,f]=A(!1),p=D();W(()=>{i(t.first),l(t.first.length===rn)},[t.first]);let b=()=>void p.run(async()=>{let g=await P(`/feedback?limit=${rn}&offset=${a.length}`);if(!g.ok)return{error:Ce(g)};let y=Array.isArray(g.data?.tickets)?g.data.tickets:[];r.current&&(i(v=>{let T=new Set(v.map(x=>x.id));return[...v,...y.filter(x=>!T.has(x.id))]}),l(y.length===rn))});return o(J,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:c?void 0:o(R,{variant:"primary",onClick:()=>{f(!1),u(!0)},children:[o(O,{name:"plus",size:12})," ",e("fb.new")]}),children:[c&&o(ld,{onCancel:()=>u(!1),onSubmitted:()=>{u(!1),f(!0),t.onChanged()}}),m&&!c&&o(ae,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),a.length===0?o(ot,{children:e("fb.empty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map(g=>o("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(g.id),children:[o("span",{class:`fx-dot${g.user_unread?" is-on":""}`,"aria-label":g.user_unread?e("fb.unread"):void 0}),o("span",{class:"fx-list-main",children:[o("strong",{children:g.title||(g.description||"").slice(0,60)||e("fb.untitled")}),o("small",{children:Be(g.updated_at||g.created_at,n)})]}),o(Ji,{status:g.status}),o(O,{name:"chevron",size:12})]},g.id))}),a.length>0&&(s||p.error)&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("fb.shown",{n:G(a.length,n)})}),s&&o(R,{pending:p.pending,onClick:b,children:e("common.loadMore")})]}),p.error&&o(ae,{children:o(N,{a:p})})]})}function id(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 sd=0;function ld(t){let{t:e}=M(),n=Ee(),[r,a]=A(""),[i,s]=A([]),[l,c]=A(null),[u,m]=A(!1),f=Y(null),p=D(),[b,g]=A(0),y=Y(0);y.current=i.length;let v=async x=>{c(null);for(let _ of Array.from(x||[])){if(!_.type||!_.type.startsWith("image/")){c({key:"err.imageType"});continue}if(_.size>rd){c({key:"err.imageTooLarge"});continue}if(y.current>=Kn){c({key:"err.tooManyImages"});break}y.current++,g(C=>C+1);try{let C=await id(_);if(!n.current)return;let I={id:`img-${++sd}`,filename:_.name||"image",mime_type:_.type,size:_.size,data_base64:C.replace(/^data:[^;]+;base64,/,""),url:C};s(U=>U.length>=Kn?U:[...U,I])}catch{y.current--,c({key:"err.imageRead"})}finally{n.current&&g(C=>C-1)}}},T=()=>void p.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>Yn)return{error:{key:"err.feedbackTooLong"}};let _=i.map(({filename:I,mime_type:U,size:Z,data_base64:q})=>({filename:I,mime_type:U,size:Z,data_base64:q})),C=await P("/feedback",{method:"POST",body:{description:x,attachments:_},timeoutMs:12e4});if(!C.ok)return ie(C);t.onSubmitted()});return o("div",{class:`fx-sub fx-form fx-composer${u?" is-drag":""}`,onPaste:x=>{let _=Array.from(x.clipboardData?.items||[]).filter(C=>C.kind==="file").map(C=>C.getAsFile()).filter(Boolean);_.length&&(x.preventDefault(),v(_))},onDragOver:x=>{x.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:x=>{x.preventDefault(),m(!1),v(x.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:Yn,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>a(x.currentTarget.value)})]}),o("p",{class:"fx-note",children:e("fb.imagesHint",{n:Kn})}),i.length>0&&o("div",{class:"fx-thumbs",children:i.map(x=>o("span",{class:"fx-thumb",children:[o("img",{src:x.url,alt:x.filename}),o("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(_=>_.filter(C=>C.id!==x.id)),c(null)},children:o(O,{name:"x",size:11})})]},x.id))}),l&&o("div",{class:"fx-msg is-error",role:"alert",children:He(l,e)}),o("input",{ref:f,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let _=x.currentTarget;v(_.files),_.value=""}}),o("div",{class:"fx-inline",children:[o(R,{disabled:i.length>=Kn||p.pending,onClick:()=>f.current?.click(),children:[o(O,{name:"image",size:12})," ",e("fb.addImages")]}),o("span",{class:"fx-grow"}),o(R,{disabled:p.pending,onClick:t.onCancel,children:e("common.cancel")}),o(R,{variant:"primary",pending:p.pending,disabled:b>0,onClick:T,children:e("fb.submit")})]}),o(N,{a:p})]})}function cd(t){let{t:e,locale:n}=M(),[r,a]=A({state:"loading"}),[i,s]=A(0),[l,c]=A(""),[u,m]=A(null),f=D(),p=Y(0);W(()=>{let C=++p.current;return P(`/feedback/${encodeURIComponent(t.id)}`).then(I=>{if(C===p.current){if(!I.ok){a({state:"error",fail:I});return}a({state:"ready",data:{ticket:I.data.ticket,replies:I.data.replies??[],attachments:I.data.attachments??[]}}),P(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{p.current++}},[t.id,i]),W(()=>{if(!u)return;let C=I=>{I.key==="Escape"&&m(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[u]);let b=o("div",{class:"fx-back",children:o(R,{onClick:t.onBack,children:[o(O,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return o(z,{children:[b,o(ge,{panels:1,rows:3})]});if(r.state==="error")return o(z,{children:[b,o(he,{error:Ce(r.fail),onRetry:()=>{a({state:"loading"}),s(C=>C+1)}})]});let{ticket:g,replies:y,attachments:v}=r.data,T=g.status==="closed",x=C=>v.filter(I=>(I.reply_id??null)===C),_=()=>void f.run(async()=>{let C=l.trim();if(!C)return{error:{key:"err.replyEmpty"}};if(C.length>Yn)return{error:{key:"err.replyTooLong"}};let I=await P(`/feedback/${encodeURIComponent(g.id)}/replies`,{method:"POST",body:{content:C},timeoutMs:6e4});return I.ok?(c(""),s(U=>U+1),{success:{key:"fb.replySent"}}):ie(I)});return o(z,{children:[b,o(J,{icon:"message",title:g.title||e("fb.untitled"),actions:o(Ji,{status:g.status}),desc:`#${String(g.id).slice(0,8)} \xB7 ${Be(g.created_at,n)}`,children:[o("div",{class:"fx-thread fx-block",children:[o(Gi,{who:"user",when:g.created_at,text:g.description||"",files:x(null),onZoom:m}),y.map((C,I)=>o(Gi,{who:C.author_role==="user"?"user":"admin",when:C.created_at,text:C.content||"",files:C.id?x(C.id):[],onZoom:m},C.id??I))]}),T?o(ae,{children:o(ne,{children:e("fb.closedNote")})}):o(ae,{class:"fx-form",children:[o("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:Yn,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:C=>{c(C.currentTarget.value),f.success&&f.clear()}}),o("div",{class:"fx-inline",children:[o("span",{class:"fx-grow"}),o(R,{variant:"primary",pending:f.pending,onClick:_,children:e("fb.replySend")})]}),o(N,{a:f})]})]}),u&&o("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>m(null),children:o("img",{src:u,alt:""})})]})}function Gi(t){let{t:e,locale:n}=M();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 ",Be(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(O,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??a)})})]})}var es=[{id:"monthly",field:"priceMonthly",discount:"recurringPriceMonthly"},{id:"quarterly",field:"priceQuarterly",discount:"recurringPriceQuarterly"},{id:"yearly",field:"priceYearly",discount:"recurringPriceYearly"}];function Qi(t,e){let n=es.find(s=>s.id===e),r=H(t.priceMonthly)??0,a=(H(t[n.field])??0)||(e==="quarterly"?Math.round(r*300)/100:0),i=H(t[n.discount])??0;return i>0&&i<a?i:a}function ia(t,e,n){let r=G(t,n),a=String(e||"CNY").toUpperCase();return a==="CNY"?`\xA5${r}`:a==="USD"?`$${r}`:`${r} ${a}`}async function ud(){let[t,e,n]=await Promise.all([P("/membership/my"),P("/credits/balance"),P("/features")]);return!t.ok&>(t)?t:!e.ok&>(e)?e:{ok:!0,status:200,data:{membership:t.ok?t.data?.membership??null:null,membershipFailed:!t.ok,balance:e.ok?H(e.data?.balance):null,balanceFailed:!e.ok,features:n.ok&&n.data&&typeof n.data=="object"?n.data:{}}}}async function sa(t,e){let[n,r]=await Promise.all([ud(),P(t)]);return n.ok?r.ok?{ok:!0,status:r.status,data:{status:n.data,list:e(r.data)}}:r:n}var la=t=>(Array.isArray(t)?t:[]).filter(e=>!!e&&typeof e=="object"&&e.isActive!==!1),dd=15*6e4;function ca(t){let e=Y(0),n=Y(0),r=Y(t);return r.current=t,W(()=>{let a=()=>{let i=Date.now();i>e.current||document.visibilityState==="hidden"||i-n.current<2e3||(n.current=i,r.current?.())};return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[]),()=>{e.current=Date.now()+dd}}function ts(t){let e=t.membership;return e&&(e.status===void 0||e.status==="active")?e:null}function ua(t){let{t:e,locale:n}=M(),r=t.status,a=ts(r),i=Qt(a?.tier),s=i==="Free";return o("section",{class:"fx-shop-strip","aria-label":e("store.status"),children:[o("div",{class:"fx-shop-stat",children:[o("small",{children:e("store.tier")}),r.membershipFailed?o("b",{class:"is-empty",children:"\u2014"}):o("b",{"data-testid":"shop-tier",children:[s?e("member.freeName"):a?.plan?.name||i,!s&&o("i",{children:a?.expiresAt?e("member.expires",{date:Wn(a.expiresAt,n)}):e("member.noExpiry")})]})]}),o("div",{class:"fx-shop-stat",children:[o("small",{children:e("store.balance")}),o("b",{class:r.balance===null?"is-empty":"","data-testid":"shop-balance",children:r.balance===null?"\u2014":G(r.balance,n)})]}),(r.membershipFailed||r.balanceFailed)&&o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")}),o("span",{class:"fx-grow"}),t.children]})}function da(t){return o("section",{class:"fx-shop-section",children:[o("div",{class:"fx-shop-head",children:[o("div",{children:[o("h2",{children:t.title}),t.desc&&o("p",{children:t.desc})]}),t.right]}),t.children]})}function pa(t){let e=D(),[n,r]=A(null),a=(i,s,l,c)=>{r(i),e.run(async()=>{if(!await Nt(s,l,c))return{error:{key:"err.openFailed"}};t()})};return{a:e,payingId:e.pending?n:null,open:a}}function fa(t){return o(R,{variant:"ghost",pending:t.pending,disabled:t.disabled,onClick:t.onClick,children:[t.label,o(O,{name:"external",size:12})]})}function ma(t){return o("div",{class:"fx-shop-empty",children:t.children})}function ns(){let{t,locale:e}=M(),n=xe(()=>sa("/payment/offerings",b=>la(b?.membershipPlans))),r=ca(n.state==="ready"?n.reload:null),a=pa(r),[i,s]=A("monthly");if(n.state==="loading")return o(ge,{panels:2,rows:2});if(n.state==="signedOut")return o(ye,{});if(n.state==="error")return o(he,{error:n.error,onRetry:n.retry});let{status:l,list:c}=n.data,u=l.features.payment!==!1,m=es.filter(b=>c.some(g=>Qi(g,b.id)>0)),f=m.some(b=>b.id===i)?i:m[0]?.id??"monthly",p=ts(l)?.tier?.toLowerCase()??null;return o(z,{children:[o(ua,{status:l,onRetry:n.reload}),o(da,{title:t("store.choosePlan"),desc:t(u?"store.payHint":"store.payOff"),right:m.length>1?o(Ve,{value:f,label:t("store.period"),onChange:s,options:m.map(b=>({value:b.id,label:t(`store.period.${b.id}`)}))}):void 0,children:[c.length===0?o(ma,{children:t("store.noPlans")}):o("div",{class:"fx-shop-tiers",children:c.map(b=>{let g=Qi(b,f),y=!!p&&!l.membershipFailed&&b.tier?.toLowerCase()===p;return o("article",{class:"fx-shop-tier","data-tier":b.tier,children:[o("h3",{children:[b.name||Qt(b.tier),y&&o("span",{class:"fx-shop-current",children:[o(O,{name:"check",size:12}),t("store.currentTier")]})]}),o("div",{class:"fx-shop-price",children:g>0?o(z,{children:[ia(g,b.currency,e),o("small",{children:t(`store.per.${f}`)})]}):"\u2014"}),o("p",{children:b.description}),u&&g>0&&o(fa,{label:t(y?"member.renew":"store.pay"),pending:a.payingId===b.id,disabled:a.a.pending,onClick:()=>a.open(b.id,"membership",b.id,f)})]},b.id)})}),o(N,{a:a.a})]})]})}function rs(){let{t,locale:e}=M(),n=xe(()=>sa("/payment/offerings",c=>la(c?.packages))),r=ca(n.state==="ready"?n.reload:null),a=pa(r);if(n.state==="loading")return o(ge,{panels:2,rows:2});if(n.state==="signedOut")return o(ye,{});if(n.state==="error")return o(he,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1;return o(z,{children:[o(ua,{status:i,onRetry:n.reload}),o(da,{title:t("store.packs"),desc:t(l?"store.packsHint":"store.payOff"),children:[s.length===0?o(ma,{children:t("store.noPacks")}):o("div",{class:"fx-shop-grid",children:s.map(c=>{let u=H(c.price)??0;return o(as,{icon:"coins",kind:t("store.kind.pack"),name:`${c.name||""} \xB7 ${t("store.nPoints",{n:G(c.credits,e)})}`,desc:c.description,meta:t("store.instant"),children:l&&u>0&&o(fa,{label:t("store.payPrice",{price:ia(u,c.currency,e)}),pending:a.payingId===c.id,disabled:a.a.pending,onClick:()=>a.open(c.id,"credits")})},c.id)})}),o(N,{a:a.a})]})]})}function as(t){return o("article",{class:"fx-shop-card",children:[o("div",{class:"fx-shop-visual","aria-hidden":"true",children:t.emoji?o("span",{class:"fx-shop-emoji",children:t.emoji}):o(O,{name:t.icon,size:18})}),o("div",{class:"fx-shop-body",children:[o("span",{class:"fx-shop-kind",children:t.kind}),o("strong",{children:t.name}),t.desc&&o("p",{children:t.desc}),o("div",{class:"fx-shop-foot",children:[o("span",{class:"fx-shop-meta",children:t.meta}),o("span",{class:"fx-shop-acts",children:t.children})]}),t.below]})]})}var pd={reset_card:"store.kind.card",api_quota_key:"store.kind.code"};function fd(t){let{t:e,locale:n}=M(),{p:r}=t,a=D(),[i,s]=A(null),[l,c]=A(!1),u=H(r.pricePoints)??0,m=H(r.priceRmb)??0,f=typeof r.availableKeys=="number"&&r.availableKeys<=0,p=u>0&&t.balance!==null&&t.balance<u,b=()=>void a.run(async()=>{let y=await P("/shop/purchase",{method:"POST",body:{productId:r.id,payMethod:"points"},timeoutMs:3e4});return y.ok?(s(typeof y.data?.key=="string"&&y.data.key?y.data.key:null),t.onRedeemed(),{success:{key:"store.redeemed"}}):y.status===0?(c(!0),{error:{key:"store.uncertain"}}):ie(y)}),g=f?e("store.soldOut"):p?e("err.insufficientPoints"):typeof r.availableKeys=="number"?e("store.left",{n:r.availableKeys}):e("store.toBackpack");return o(as,{icon:r.type==="api_quota_key"?"key":"gift",emoji:r.icon,kind:e(pd[r.type||""]??"store.kind.item"),name:r.name||"",desc:r.description,meta:g,below:o(z,{children:[o(N,{a}),i&&o("div",{class:"fx-shop-key",children:[o("code",{children:i}),o(it,{text:i,label:e("backpack.copyKey")})]})]}),children:[u>0&&o(je,{variant:"primary",pending:a.pending,disabled:f||p||l,label:e("store.redeem",{n:G(u,n)}),confirmLabel:e("store.redeemConfirm",{n:G(u,n)}),onConfirm:b}),t.payment&&m>0&&o(fa,{label:ia(m,r.currency,n),pending:t.paying,disabled:t.payBusy||f,onClick:t.onPay})]})}function os(){let{t,goTo:e}=M(),n=xe(()=>sa("/shop/products",u=>la(u))),r=ca(n.state==="ready"?n.reload:null),a=pa(r);if(n.state==="loading")return o(ge,{panels:2,rows:2});if(n.state==="signedOut")return o(ye,{});if(n.state==="error")return o(he,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1,c=i.features.shop!==!1;return o(z,{children:[o(ua,{status:i,onRetry:n.reload,children:e&&o(R,{onClick:()=>e("backpack"),children:t("store.openBackpack")})}),o(da,{title:t("store.redeemTitle"),desc:t("store.redeemHint"),children:[!c||s.length===0?o(ma,{children:t(c?"store.noItems":"store.itemsOff")}):o("div",{class:"fx-shop-grid",children:s.map(u=>o(fd,{p:u,balance:i.balance,payment:l,paying:a.payingId===u.id,payBusy:a.a.pending,onPay:()=>a.open(u.id,"storefront"),onRedeemed:n.reload},u.id))}),o(N,{a:a.a})]})]})}var md="forsion-extend",is=[{id:"account",titleKey:"page.account",Component:Oi},{id:"quota",titleKey:"page.quota",Component:Fi},{id:"backpack",titleKey:"page.backpack",Component:Bi},{id:"security",titleKey:"page.security",Component:Hi},{id:"usage",titleKey:"page.usage",Component:Ki},{id:"feedback",titleKey:"page.feedback",Component:Zi}],ss=[{id:"membership",titleKey:"store.membership",descKey:"store.membership.desc",icon:"crown",Component:ns},{id:"points",titleKey:"store.points",descKey:"store.points.desc",icon:"coins",Component:rs},{id:"items",titleKey:"store.items",descKey:"store.items.desc",icon:"package",Component:os}],gd=t=>`forsion/fx:${md}:${t}`;function ls(t){let{ctx:e,page:n}=t,[r,a]=A(()=>Fe(e.getLocale?.()));W(()=>{a(Fe(e.getLocale?.()));let l=e.subscribeLocale?.(c=>a(Fe(c)));return()=>{typeof l=="function"&&l()}},[e]);let i=nt(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:Bn(r),goTo:typeof l=="function"?c=>l.call(e.app,gd(c)):null}},[e,r]),s=n.Component;return o(jr.Provider,{value:i,children:o("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[o("style",{children:ii}),o(s,{})]})})}function cs(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerStoreView!="function")return 0;let r=a=>()=>Fn(Fe(t.getLocale?.()),a);for(let a of ss)t.registerStoreView({id:a.id,title:r(a.titleKey),description:r(a.descKey),group:r("store.group"),icon:a.icon,mount(i){return tt(o(ls,{ctx:t,page:a}),i),()=>{tt(null,i)}}});return ss.length}function us(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 is)t.registerSettingsView({id:r.id,category:"forsion",title:()=>Fn(Fe(t.getLocale?.()),r.titleKey),mount(a){return tt(o(ls,{ctx:t,page:r}),a),()=>{tt(null,a)}}});return is.length}var ds;if(typeof ctx<"u"){us(ctx),cs(ctx);let t=di(ctx);t&&(ds=()=>t.dispose())}return Xs(hd);})();
|
|
352
389
|
return __fxExtend.dispose;
|