@forsion/extend 0.8.2 → 0.8.3

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/dist/main.js CHANGED
@@ -1,72 +1,72 @@
1
- "use strict";var __fxExtend=(()=>{var br=Object.defineProperty;var ml=Object.getOwnPropertyDescriptor;var gl=Object.getOwnPropertyNames;var hl=Object.prototype.hasOwnProperty;var bl=(t,e)=>{for(var n in e)br(t,n,{get:e[n],enumerable:!0})},xl=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gl(e))!hl.call(t,i)&&i!==n&&br(t,i,{get:()=>e[i],enumerable:!(r=ml(e,i))||r.enumerable});return t};var vl=t=>xl(br({},"__esModule",{value:!0}),t);var ef={};bl(ef,{dispose:()=>Us});function yl(t,e){this.v=t,this.k=e}function ai(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 kl(t){if(Array.isArray(t))return t}function wl(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,l=[],c=!0,d=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(p){d=!0,i=p}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return l}}function _l(){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 Sl(t,e){return kl(t)||wl(t,e)||Al(t,e)||_l()}function Al(t,e){if(t){if(typeof t=="string")return ai(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)?ai(t,e):void 0}}function wn(t){var e,n;function r(o,s){try{var l=t[o](s),c=l.value,d=c instanceof yl;Promise.resolve(d?c.v:c).then(function(p){if(d){var m=o==="return"&&c.k?o:"next";if(!c.k||p.done)return r(m,p);p=t[m](p).value}i(!!l.done,p)},function(p){r("throw",p)})}catch(p){i(2,p)}}function i(o,s){o===2?e.reject(s):e.resolve({value:s,done:o}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(o,s){return new Promise(function(l,c){var d={key:o,arg:s,resolve:l,reject:c,next:null};n?n=n.next=d:(e=n=d,r(o,s))})},typeof t.return!="function"&&(this.return=void 0)}wn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},wn.prototype.next=function(t){return this._invoke("next",t)},wn.prototype.throw=function(t){return this._invoke("throw",t)},wn.prototype.return=function(t){return this._invoke("return",t)};var vi=Object.entries,ii=Object.setPrototypeOf,Cl=Object.isFrozen,Tl=Object.getPrototypeOf,El=Object.getOwnPropertyDescriptor,be=Object.freeze,ye=Object.seal,Nt=Object.create,yi=typeof Reflect<"u"&&Reflect,Sr=yi.apply,Ar=yi.construct;be||(be=function(e){return e});ye||(ye=function(e){return e});Sr||(Sr=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(n,i)});Ar||(Ar=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});var ht=ge(Array.prototype.forEach);Array.prototype.indexOf;var Pl=ge(Array.prototype.lastIndexOf),oi=ge(Array.prototype.pop),Wt=ge(Array.prototype.push);Array.prototype.slice;var Rl=ge(Array.prototype.splice),Ot=Array.isArray,Vt=ge(String.prototype.toLowerCase),xr=ge(String.prototype.toString),si=ge(String.prototype.match),Xt=ge(String.prototype.replace),li=ge(String.prototype.indexOf),Ml=ge(String.prototype.trim),Il=ge(Number.prototype.toString),Ll=ge(Boolean.prototype.toString),ci=typeof BigInt>"u"?null:ge(BigInt.prototype.toString),di=typeof Symbol>"u"?null:ge(Symbol.prototype.toString),Ee=ge(Object.prototype.hasOwnProperty),jt=ge(Object.prototype.toString),Ae=ge(RegExp.prototype.test),it=Dl(TypeError);function ge(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Sr(t,e,r)}}function Dl(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Ar(t,n)}}function j(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vt;if(ii&&ii(t,null),!Ot(e))return t;let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){let o=n(i);o!==i&&(Cl(e)||(e[r]=o),i=o)}t[i]=!0}return t}function zl(t){for(let e=0;e<t.length;e++)Ee(t,e)||(t[e]=null);return t}function Ie(t){let e=Nt(null);for(let r of vi(t)){var n=Sl(r,2);let i=n[0],o=n[1];Ee(t,i)&&(Ot(o)?e[i]=zl(o):o&&typeof o=="object"&&o.constructor===Object?e[i]=Ie(o):e[i]=o)}return e}function Nl(t){switch(typeof t){case"string":return t;case"number":return Il(t);case"boolean":return Ll(t);case"bigint":return ci?ci(t):"0";case"symbol":return di?di(t):"Symbol()";case"undefined":return jt(t);case"function":case"object":{if(t===null)return jt(t);let e=t,n=ze(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:jt(r)}return jt(t)}default:return jt(t)}}function ze(t,e){for(;t!==null;){let r=El(t,e);if(r){if(r.get)return ge(r.get);if(typeof r.value=="function")return ge(r.value)}t=Tl(t)}function n(){return null}return n}function Ol(t){try{return Ae(t,""),!0}catch{return!1}}var ui=be(["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"]),vr=be(["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"]),yr=be(["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"]),Bl=be(["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"]),kr=be(["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"]),Fl=be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fi=be(["#text"]),pi=be(["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"]),wr=be(["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"]),mi=be(["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"]),_n=be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$l=ye(/{{[\w\W]*|^[\w\W]*}}/g),Ul=ye(/<%[\w\W]*|^[\w\W]*%>/g),ql=ye(/\${[\w\W]*/g),Hl=ye(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wl=ye(/^aria-[\-\w]+$/),gi=ye(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xl=ye(/^(?:\w+script|data):/i),jl=ye(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vl=ye(/^html$/i),Kl=ye(/^[a-z][.\w]*(-[.\w]+)+$/i),hi=ye(/<[/\w!]/g),bi=ye(/<[/\w]/g),Jl=ye(/<\/no(script|embed|frames)/i),Yl=ye(/\/>/i),Me={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ki=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Gl=be(j({},ki)),Zl=(function(){let t={};return ht(ki,e=>{t[e]=ye(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),be(t)})(),Ql=function(){return typeof window>"u"?null:window},ec=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},xi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ot=function(e,n,r,i){return Ee(e,n)&&Ot(e[n])?j(i.base?Ie(i.base):{},e[n],i.transform):r},_r=function(e,n,r){let i=Ee(e,n)?e[n]:void 0;return i&&typeof i=="object"?Ie(i):r()};function wi(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ql(),e=S=>wi(S);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==Me.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,i=r.currentScript;t.DocumentFragment;let o=t.HTMLTemplateElement,s=t.Node,l=t.Element,c=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,p=t.trustedTypes,m=l.prototype,f=ze(m,"cloneNode"),g=ze(m,"remove"),h=ze(m,"removeAttributeNode"),v=ze(m,"nextSibling"),y=ze(m,"childNodes"),A=ze(m,"parentNode"),x=ze(m,"shadowRoot"),w=ze(m,"attributes"),T=s&&s.prototype?ze(s.prototype,"nodeType"):null,L=s&&s.prototype?ze(s.prototype,"nodeName"):null,$=s&&s.prototype?ze(s.prototype,"ownerDocument"):null,X=function(u){return T?T(u):u.nodeType},U=function(u){return L?L(u):u.nodeName};if(typeof o=="function"){let S=n.createElement("template");S.content&&S.content.ownerDocument&&(n=S.content.ownerDocument)}let H,ee="",z,G=!1,ie=0,Pe=function(){if(ie>0)throw it('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.')},R=function(u){Pe(),ie++;try{return H.createHTML(u)}finally{ie--}},fe=function(u){Pe(),ie++;try{return H.createScriptURL(u)}finally{ie--}},ft=function(){return G||(z=ec(p,i),G=!0),z},cn=n,tr=cn.implementation,Ea=cn.createNodeIterator,qs=cn.createDocumentFragment,Hs=cn.getElementsByTagName,Ws=r.importNode,oe=xi();e.isSupported=typeof vi=="function"&&typeof A=="function"&&tr&&tr.createHTMLDocument!==void 0;let Xs=$l,js=Ul,Vs=ql,Ks=Hl,Js=Wl,Ys=Xl,Pa=jl,Gs=Kl,Ra=gi,se=null,nr=j({},[...ui,...vr,...yr,...kr,...fi]),le=null,rr=j({},[...pi,...wr,...mi,..._n]),Ue=Object.seal(Nt(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}})),Ut=null,Ma=null,nt=Object.seal(Nt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ia=!0,ar=!0,La=!1,Da=!0,rt=!1,pt=!0,mt=!1,ir=!1,dn=null,un=null,or=!1,Et=!1,fn=!1,pn=!1,za=!0,Na=!1,Oa="user-content-",sr=!0,lr=!1,Pt={},Rt=null,Ba=j({},["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"]),Fa=null,$a=j({},["audio","video","img","source","image","track"]),Ua=null,qa=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml",Mt=qe,cr=!1,dr=null,Zs=j({},[mn,gn,qe],xr),Ha=be(["mi","mo","mn","ms","mtext"]),ur=j({},Ha),Wa=be(["annotation-xml"]),fr=j({},Wa),Qs=j({},["title","style","font","a","script"]),qt=null,el=["application/xhtml+xml","text/html"],tl="text/html",pe=null,It=null,nl=n.createElement("form"),Xa=function(u){return u instanceof RegExp||u instanceof Function},pr=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(It&&It===u)return;(!u||typeof u!="object")&&(u={}),u=Ie(u),qt=el.indexOf(u.PARSER_MEDIA_TYPE)===-1?tl:u.PARSER_MEDIA_TYPE,pe=qt==="application/xhtml+xml"?xr:Vt,se=ot(u,"ALLOWED_TAGS",nr,{transform:pe}),le=ot(u,"ALLOWED_ATTR",rr,{transform:pe}),dr=ot(u,"ALLOWED_NAMESPACES",Zs,{transform:xr}),Ua=ot(u,"ADD_URI_SAFE_ATTR",qa,{transform:pe,base:qa}),Fa=ot(u,"ADD_DATA_URI_TAGS",$a,{transform:pe,base:$a}),Rt=ot(u,"FORBID_CONTENTS",Ba,{transform:pe}),Ut=ot(u,"FORBID_TAGS",Ie({}),{transform:pe}),Ma=ot(u,"FORBID_ATTR",Ie({}),{transform:pe}),Pt=Ee(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?Ie(u.USE_PROFILES):u.USE_PROFILES:!1,Ia=u.ALLOW_ARIA_ATTR!==!1,ar=u.ALLOW_DATA_ATTR!==!1,La=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Da=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=u.SAFE_FOR_TEMPLATES||!1,pt=u.SAFE_FOR_XML!==!1,mt=u.WHOLE_DOCUMENT||!1,Et=u.RETURN_DOM||!1,fn=u.RETURN_DOM_FRAGMENT||!1,pn=u.RETURN_TRUSTED_TYPE||!1,or=u.FORCE_BODY||!1,za=u.SANITIZE_DOM!==!1,Na=u.SANITIZE_NAMED_PROPS||!1,sr=u.KEEP_CONTENT!==!1,lr=u.IN_PLACE||!1,Ra=Ol(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:gi,Mt=typeof u.NAMESPACE=="string"?u.NAMESPACE:qe,ur=_r(u,"MATHML_TEXT_INTEGRATION_POINTS",()=>j({},Ha)),fr=_r(u,"HTML_INTEGRATION_POINTS",()=>j({},Wa));let b=_r(u,"CUSTOM_ELEMENT_HANDLING",()=>Nt(null));if(Ue=Nt(null),Ee(b,"tagNameCheck")&&Xa(b.tagNameCheck)&&(Ue.tagNameCheck=b.tagNameCheck),Ee(b,"attributeNameCheck")&&Xa(b.attributeNameCheck)&&(Ue.attributeNameCheck=b.attributeNameCheck),Ee(b,"allowCustomizedBuiltInElements")&&typeof b.allowCustomizedBuiltInElements=="boolean"&&(Ue.allowCustomizedBuiltInElements=b.allowCustomizedBuiltInElements),ye(Ue),rt&&(ar=!1),fn&&(Et=!0),Pt&&(se=j({},fi),le=Nt(null),Pt.html===!0&&(j(se,ui),j(le,pi)),Pt.svg===!0&&(j(se,vr),j(le,wr),j(le,_n)),Pt.svgFilters===!0&&(j(se,yr),j(le,wr),j(le,_n)),Pt.mathMl===!0&&(j(se,kr),j(le,mi),j(le,_n))),nt.tagCheck=null,nt.attributeCheck=null,Ee(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?nt.tagCheck=u.ADD_TAGS:Ot(u.ADD_TAGS)&&(se===nr&&(se=Ie(se)),j(se,u.ADD_TAGS,pe))),Ee(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?nt.attributeCheck=u.ADD_ATTR:Ot(u.ADD_ATTR)&&(le===rr&&(le=Ie(le)),j(le,u.ADD_ATTR,pe))),Ee(u,"ADD_FORBID_CONTENTS")&&Ot(u.ADD_FORBID_CONTENTS)&&(Rt===Ba&&(Rt=Ie(Rt)),j(Rt,u.ADD_FORBID_CONTENTS,pe)),sr&&(se["#text"]=!0),mt&&j(se,["html","head","body"]),se.table&&(j(se,["tbody"]),delete Ut.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let k=H;H=u.TRUSTED_TYPES_POLICY;try{ee=R("")}catch(C){throw H=k,C}}else u.TRUSTED_TYPES_POLICY===null?(H=void 0,ee=""):(H===void 0&&(H=ft()),H&&typeof ee=="string"&&(ee=R("")));be&&be(u),It=u},ja=j({},[...vr,...yr,...Bl]),Va=j({},[...kr,...Fl]),rl=function(u,b,k){return b.namespaceURI===qe?u==="svg":b.namespaceURI===mn?u==="svg"&&(k==="annotation-xml"||ur[k]):!!ja[u]},al=function(u,b,k){return b.namespaceURI===qe?u==="math":b.namespaceURI===gn?u==="math"&&fr[k]:!!Va[u]},il=function(u,b,k){return b.namespaceURI===gn&&!fr[k]||b.namespaceURI===mn&&!ur[k]?!1:!Va[u]&&(Qs[u]||!ja[u])},ol=function(u){let b=A(u);(!b||!b.tagName)&&(b={namespaceURI:Mt,tagName:"template"});let k=Vt(u.tagName),C=Vt(b.tagName);return dr[u.namespaceURI]?u.namespaceURI===gn?rl(k,b,C):u.namespaceURI===mn?al(k,b,C):u.namespaceURI===qe?il(k,b,C):!!(qt==="application/xhtml+xml"&&dr[u.namespaceURI]):!1},at=function(u){Wt(e.removed,{element:u});try{A(u).removeChild(u)}catch{if(g(u),!A(u))throw it("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ka=function(u,b,k){try{h(u,b)}catch{try{u.removeAttribute(k)}catch{}}},hn=function(u){bn(u);let b=y(u);if(b){let C=[];ht(b,I=>{Wt(C,I)}),ht(C,I=>{try{g(I)}catch{}})}let k=w(u);if(k)for(let C=k.length-1;C>=0;--C){let I=k[C],q=I&&I.name;typeof q=="string"&&Ka(u,I,q)}},gt=function(u,b,k){if(!k)try{k=b.getAttributeNode(u)}catch{k=null}Wt(e.removed,{attribute:k||null,from:b});try{k?h(b,k):b.removeAttribute(u)}catch{try{b.removeAttribute(u)}catch{}}if(u==="is")if(Et||fn)try{at(b)}catch{}else try{b.setAttribute(u,"")}catch{}},sl=function(u){let b=w(u);if(b)for(let k=b.length-1;k>=0;--k){let C=b[k],I=C&&C.name;typeof I!="string"||le[pe(I)]||Ka(u,C,I)}},bn=function(u){let b=[u];for(;b.length>0;){let k=b.pop();X(k)===Me.element&&sl(k);let C=y(k);if(C)for(let I=C.length-1;I>=0;--I)b.push(C[I])}},Ja=function(u,b){return pt?u==="patchsrc"?!0:u==="for"&&b!=="label"&&b!=="output":!1},ll=function(u){if(!pt)return;let b=[u];for(;b.length>0;){let k=b.pop(),C=X(k);if(C===Me.processingInstruction||C===Me.comment&&Ae(bi,k.data)){try{g(k)}catch{}continue}if(C===Me.element){let q=k,W=pe(U(k));try{q.hasAttribute&&q.hasAttribute("patchsrc")&&q.removeAttribute("patchsrc"),q.hasAttribute&&q.hasAttribute("for")&&Ja("for",W)&&q.removeAttribute("for")}catch{}}let I=y(k);if(I)for(let q=I.length-1;q>=0;--q)b.push(I[q])}},Ya=function(u){let b=null,k=null;if(or)u="<remove></remove>"+u;else{let q=si(u,/^[\r\n\t ]+/);k=q&&q[0]}qt==="application/xhtml+xml"&&Mt===qe&&(u='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+u+"</body></html>");let C=H?R(u):u;if(Mt===qe)try{b=new d().parseFromString(C,qt)}catch{}if(!b||!b.documentElement){b=tr.createDocument(Mt,"template",null);try{b.documentElement.innerHTML=cr?ee:C}catch{}}let I=b.body||b.documentElement;return u&&k&&I.insertBefore(n.createTextNode(k),I.childNodes[0]||null),Mt===qe?Hs.call(b,mt?"html":"body")[0]:mt?b.documentElement:I},Ga=function(u){let b=$?$(u):u.ownerDocument;return Ea.call(b||u,u,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xn=function(u){return u=Xt(u,Xs," "),u=Xt(u,js," "),u=Xt(u,Vs," "),u},mr=function(u){var b;u.normalize();let k=$?$(u):u.ownerDocument,C=Ea.call(k||u,u,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),I=C.nextNode();for(;I;)I.data=xn(I.data),I=C.nextNode();let q=(b=u.querySelectorAll)===null||b===void 0?void 0:b.call(u,"template");q&&ht(q,W=>{Lt(W.content)&&mr(W.content)})},vn=function(u){let b=L?L(u):null;return typeof b!="string"||pe(b)!=="form"?!1:typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||u.attributes!==w(u)||typeof u.removeAttribute!="function"||typeof u.removeAttributeNode!="function"||typeof u.getAttributeNode!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function"||u.nodeType!==T(u)||u.childNodes!==y(u)},Lt=function(u){if(!T||typeof u!="object"||u===null)return!1;try{return T(u)===Me.documentFragment}catch{return!1}},Ht=function(u){if(!T||typeof u!="object"||u===null)return!1;try{return typeof T(u)=="number"}catch{return!1}};function He(S,u,b){S.length!==0&&ht(S,k=>{k.call(e,u,b,It)})}let cl=function(u,b){return!!(pt&&u.hasChildNodes()&&!Ht(u.firstElementChild)&&Ae(hi,u.textContent)&&Ae(hi,u.innerHTML)||pt&&u.namespaceURI===qe&&Gl[b]&&(Ht(u.firstElementChild)||typeof u.textContent=="string"&&Ae(Zl[b],u.textContent))||u.nodeType===Me.processingInstruction||pt&&u.nodeType===Me.comment&&Ae(bi,u.data))},yn=function(u,b){if(u instanceof RegExp)return Ae(u,b);if(u instanceof Function){for(var k=arguments.length,C=new Array(k>2?k-2:0),I=2;I<k;I++)C[I-2]=arguments[I];return!!u(b,...C)}return!1},dl=function(u,b,k){if(!Ut[b]&&ti(b)&&yn(Ue.tagNameCheck,b))return!1;if(sr&&!Rt[b]){let C=A(u),I=y(u);if(I&&C){let q=I.length;for(let W=q-1;W>=0;--W){let de=u===k?f(I[W],!0):I[W];C.insertBefore(de,v(u))}}}return at(u),!0},Za=function(u,b,k,C){return u.length===0?b:b===k||b===C?Ie(b):b},Dt=function(u,b){return u===b||A(u)!==null?!1:(lr&&bn(u),!0)},Qa=function(u,b){if(He(oe.beforeSanitizeElements,u,null),Dt(u,b))return!0;if(vn(u))return at(u),!0;let k=pe(U(u));if(se=Za(oe.uponSanitizeElement,se,nr,dn),He(oe.uponSanitizeElement,u,{tagName:k,allowedTags:se}),Dt(u,b))return!0;if(cl(u,k))return at(u),!0;if(Ut[k]||!(nt.tagCheck instanceof Function&&nt.tagCheck(k))&&!se[k]){let C=dl(u,k,b);return C===!1&&(He(oe.afterSanitizeElements,u,null),Dt(u,b))?!0:C}if(X(u)===Me.element&&!ol(u)||(k==="noscript"||k==="noembed"||k==="noframes")&&Ae(Jl,u.innerHTML))return at(u),!0;if(rt&&u.nodeType===Me.text){let C=xn(u.textContent);u.textContent!==C&&(Wt(e.removed,{element:u.cloneNode()}),u.textContent=C)}return He(oe.afterSanitizeElements,u,null),Dt(u,b)},ei=function(u,b,k){if(Ma[b]||Ja(b,u)||za&&(b==="id"||b==="name")&&(k in n||k in nl))return!1;let C=le[b]||nt.attributeCheck instanceof Function&&nt.attributeCheck(b,u);return ar&&Ae(Ks,b)||Ia&&Ae(Js,b)?!0:C?Ua[b]||Ae(Ra,Xt(k,Pa,""))||(b==="src"||b==="xlink:href"||b==="href")&&u!=="script"&&li(k,"data:")===0&&Fa[u]||La&&!Ae(Ys,Xt(k,Pa,""))?!0:!k:ti(u)&&yn(Ue.tagNameCheck,u)&&yn(Ue.attributeNameCheck,b,u)||b==="is"&&Ue.allowCustomizedBuiltInElements&&yn(Ue.tagNameCheck,k)},ul=j({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ti=function(u){return!ul[Vt(u)]&&Ae(Gs,u)},fl=function(u,b,k,C){if(H&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!k)switch(p.getAttributeType(u,b)){case"TrustedHTML":return R(C);case"TrustedScriptURL":return fe(C)}return C},pl=function(u,b,k,C){try{return k?u.setAttributeNS(k,b,C):u.setAttribute(b,C),vn(u)?(at(u),!1):!0}catch{return gt(b,u),!1}},ni=function(u,b){if(He(oe.beforeSanitizeAttributes,u,null),Dt(u,b))return;let k=u.attributes;if(!k||vn(u))return;le=Za(oe.uponSanitizeAttribute,le,rr,un);let C={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0},I=k.length,q=pe(u.nodeName);for(;I--;){let W=k[I],de=W.name,De=W.namespaceURI,Re=W.value,zt=pe(de),hr=Re,Te=de==="value"?hr:Ml(hr),ri=!1;if(C.attrName=zt,C.attrValue=Te,C.keepAttr=!0,C.forceKeepAttr=void 0,He(oe.uponSanitizeAttribute,u,C),Te=C.attrValue,Na&&(zt==="id"||zt==="name")&&li(Te,Oa)!==0&&(gt(de,u,W),Te=Oa+Te,ri=!0),pt&&Ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){gt(de,u,W);continue}if(zt==="attributename"&&si(Te,"href")){gt(de,u,W);continue}if(!C.forceKeepAttr){if(!C.keepAttr){gt(de,u,W);continue}if(!Da&&Ae(Yl,Te)){gt(de,u,W);continue}if(rt&&(Te=xn(Te)),!ei(q,zt,Te)){gt(de,u,W);continue}Te=fl(q,zt,De,Te),Te!==hr&&pl(u,de,De,Te)&&ri&&oi(e.removed)}}He(oe.afterSanitizeAttributes,u,null),Dt(u,b)},kn=function(u){let b=null,k=Ga(u);for(He(oe.beforeSanitizeShadowDOM,u,null);b=k.nextNode();)if(He(oe.uponSanitizeShadowNode,b,null),Qa(b,u),ni(b,u),Lt(b.content)&&kn(b.content),X(b)===Me.element){let C=x(b);Lt(C)&&(gr(C),kn(C))}He(oe.afterSanitizeShadowDOM,u,null)},gr=function(u){let b=[{node:u,shadow:null}];for(;b.length>0;){let k=b.pop();if(k.shadow){kn(k.shadow);continue}let C=k.node,I=X(C)===Me.element,q=y(C);if(q)for(let W=q.length-1;W>=0;--W)b.push({node:q[W],shadow:null});if(I){let W=L?L(C):null;if(typeof W=="string"&&pe(W)==="template"){let de=C.content;Lt(de)&&b.push({node:de,shadow:null})}}if(I){let W=x(C);Lt(W)&&b.push({node:null,shadow:W},{node:W,shadow:null})}}};return e.sanitize=function(S){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,k=null,C=null,I=null;if(cr=!S,cr&&(S="<!-->"),typeof S!="string"&&!Ht(S)&&(S=Nl(S),typeof S!="string"))throw it("dirty is not a string, aborting");if(!e.isSupported)return S;ir?(se=dn,le=un):pr(u),(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&(se=Ie(se)),oe.uponSanitizeAttribute.length>0&&(le=Ie(le)),e.removed=[];let q=lr&&typeof S!="string"&&Ht(S);if(q){ll(S);let De=U(S);if(typeof De=="string"){let Re=pe(De);if(!se[Re]||Ut[Re])throw hn(S),it("root node is forbidden and cannot be sanitized in-place")}if(vn(S))throw hn(S),it("root node is clobbered and cannot be sanitized in-place");try{gr(S)}catch(Re){throw hn(S),Re}}else if(Ht(S))b=Ya("<!---->"),k=b.ownerDocument.importNode(S,!0),k.nodeType===Me.element&&k.nodeName==="BODY"||k.nodeName==="HTML"?b=k:b.appendChild(k),gr(b);else{if(!Et&&!rt&&!mt&&S.indexOf("<")===-1)return H&&pn?R(S):S;if(b=Ya(S),!b)return Et?null:pn?ee:""}b&&or&&at(b.firstChild);let W=q?S:b;try{let De=Ga(W);for(;C=De.nextNode();)Qa(C,W),ni(C,W),Lt(C.content)&&kn(C.content)}catch(De){throw q&&(hn(S),ht(e.removed,Re=>{Re.element&&bn(Re.element)})),De}if(q){let De=!1;if(ht(e.removed,Re=>{Re.element&&(Re.element===S&&(De=!0),bn(Re.element))}),De)throw it("a node selected for removal could not be safely returned; refusing to sanitize in place");return rt&&mr(S),S}if(Et){if(rt&&mr(b),fn)for(I=qs.call(b.ownerDocument);b.firstChild;)I.appendChild(b.firstChild);else I=b;return(le.shadowroot||le.shadowrootmode)&&(I=Ws.call(r,I,!0)),I}let de=mt?b.outerHTML:b.innerHTML;return mt&&se["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&Ae(Vl,b.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
3
- `+de),rt&&(de=xn(de)),H&&pn?R(de):de},e.setConfig=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pr(S),ir=!0,dn=se,un=le},e.clearConfig=function(){It=null,ir=!1,dn=null,un=null,H=z,ee=""},e.isValidAttribute=function(S,u,b){It||pr({});let k=pe(S),C=pe(u);return ei(k,C,b)},e.addHook=function(S,u){typeof u=="function"&&Ee(oe,S)&&Wt(oe[S],u)},e.removeHook=function(S,u){if(Ee(oe,S)){if(u!==void 0){let b=Pl(oe[S],u);return b===-1?void 0:Rl(oe[S],b,1)[0]}return oi(oe[S])}},e.removeHooks=function(S){Ee(oe,S)&&(oe[S]=[])},e.removeAllHooks=function(){oe=xi()},e}var Cr=wi();function Rr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vt=Rr();function Li(t){vt=t}var bt={exec:()=>null};function Bt(t){let e=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=e[r];return i||(i=t(r),e[r]=i),i}}function N(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(_e.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var tc=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),_e={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:Bt(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Bt(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Gt})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}>`))},nc=/^(?:[ \t]*(?:\n|$))+/,rc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ac=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ic=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Di=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zi=N(Di).replace(/bull/g,Mr).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(),oc=N(Di).replace(/bull/g,Mr).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(),Ir=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,sc=/^[^\n]+/,Lr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lc=N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Lr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cc=N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Mr).getRegex(),Gt="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",Dr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dc=N("^ {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",Dr).replace("tag",Gt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ni=t=>N(Ir).replace("hr",Yt).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",Gt).getRegex(),uc=Ni(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),fc=Ni(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),pc=N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fc).getRegex(),zr={blockquote:pc,code:rc,def:lc,fences:ac,heading:ic,hr:Yt,html:dc,lheading:zi,list:cc,newline:nc,paragraph:uc,table:bt,text:sc},_i=N("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yt).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",Gt).getRegex(),mc={...zr,lheading:oc,table:_i,paragraph:N(Ir).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_i).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",Gt).getRegex()},gc={...zr,html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dr).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:bt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(Ir).replace("hr",Yt).replace("heading",` *#{1,6} *[^
4
- ]`).replace("lheading",zi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Oi=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,xc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ye=/[\p{P}\p{S}]/u,Ft=/[\s\p{P}\p{S}]/u,Zt=/[^\s\p{P}\p{S}]/u,vc=N(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ft).getRegex(),yc=/[\p{Pi}\p{Ps}"']/u,Bi=/(?!~)[\p{P}\p{S}]/u,kc=/(?!~)[\s\p{P}\p{S}]/u,wc=/(?:[^\s\p{P}\p{S}]|~)/u,_c=N(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Fi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Sc=N(Fi,"u").replace(/punct/g,Ye).getRegex(),Ac=N(Fi,"u").replace(/punct/g,Bi).getRegex(),Cc=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Tc=N(Cc,"u").replace(/openQuote/g,yc).replace(/punct/g,Ye).getRegex(),$i="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ec=N($i,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Ft).replace(/punct/g,Ye).getRegex(),Pc=N($i,"gu").replace(/notPunctSpace/g,wc).replace(/punctSpace/g,kc).replace(/punct/g,Bi).getRegex(),Rc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Mc=N(Rc,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Ft).replace(/punct/g,Ye).getRegex(),Ic=N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Ft).replace(/punct/g,Ye).getRegex(),Lc="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Dc=N(Lc,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Ft).replace(/punct/g,Ye).getRegex(),zc=N(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ye).getRegex(),Nc="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Oc=N(Nc,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Ft).replace(/punct/g,Ye).getRegex(),Bc=N(/\\(punct)/,"gu").replace(/punct/g,Ye).getRegex(),Fc=N(/^<(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(),$c=N(Dr).replace("(?:-->|$)","-->").getRegex(),Uc=N("^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",$c).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ui=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,An=N(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Ui).getRegex(),qc=N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",An).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hc=N(/^!?\[(label)\]\[(ref)\]/).replace("label",An).replace("ref",Lr).getRegex(),Wc=N(/^!?\[(ref)\](?:\[\])?/).replace("ref",Lr).getRegex(),Si=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Xc=N(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Ui).getRegex(),jc=N("reflink|nolink(?!\\()","g").replace("reflink",N(/^!?\[(label)\]\[(ref)\]/).replace("label",Xc).replace("ref",Si).getRegex()).replace("nolink",N(/^!?\[(ref)\](?:\[\])?/).replace("ref",Si).getRegex()).getRegex(),Ai=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Vc=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Kc=N(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Vc).getRegex(),Nr={_backpedal:bt,anyPunctuation:Bc,autolink:Fc,blockSkip:_c,br:Oi,code:bc,del:bt,delLDelim:bt,delRDelim:bt,emStrongLDelim:Sc,emStrongRDelimAst:Ec,emStrongRDelimUnd:Ic,escape:hc,link:qc,nolink:Wc,punctuation:vc,reflink:Hc,reflinkSearch:jc,tag:Uc,text:xc,url:bt},Jc={...Nr,emStrongLDelim:Tc,emStrongRDelimAst:Mc,emStrongRDelimUnd:Dc,link:N(/^!?\[(label)\]\((.*?)\)/).replace("label",An).getRegex(),reflink:N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",An).getRegex()},Tr={...Nr,emStrongRDelimAst:Pc,emStrongLDelim:Ac,delLDelim:zc,delRDelim:Oc,url:N(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Kc).replace("protocol",Ai).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:N(/^(?:[^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",Ai).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Yc={...Tr,br:N(Oi).replace("{2,}","*").getRegex(),text:N(Tr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sn={normal:zr,gfm:mc,pedantic:gc},Kt={normal:Nr,gfm:Tr,breaks:Yc,pedantic:Jc},Gc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ci=t=>Gc[t];function Le(t,e){if(e){if(_e.escapeTest.test(t))return t.replace(_e.escapeReplace,Ci)}else if(_e.escapeTestNoEncode.test(t))return t.replace(_e.escapeReplaceNoEncode,Ci);return t}function Zc(t){return t.replace(_e.numericCharacterReference,(e,n,r)=>{let i=n===void 0?Number.parseInt(r,16):Number.parseInt(n,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":String.fromCodePoint(i)})}function Ti(t){try{t=encodeURI(t).replace(_e.percentDecode,"%")}catch{return null}return t}function Ei(t,e){let n=t.replace(_e.findPipe,(o,s,l)=>{let c=!1,d=s;for(;--d>=0&&l[d]==="\\";)c=!c;return c?"|":" |"}),r=n.split(_e.splitPipe),i=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(;i<r.length;i++)r[i]=r[i].trim().replace(_e.slashPipe,"|");return r}function st(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r;){let o=t.charAt(r-i-1);if(o===e&&!n)i++;else if(o!==e&&n)i++;else break}return t.slice(0,r-i)}function Pi(t){let e=t.split(`
5
- `),n=e.length-1;for(;n>=0&&_e.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
6
- `)}function Cn(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Qc(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 Ri(t,e=0){let n=e,r="";for(let i of t)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function Mi(t,e,n,r,i){let o=e.href,s=e.title||null,l=t[1].replace(i.other.outputLinkReplace,"$1"),c=t[0].charAt(0)==="!";r.state.inLink=!0;let d=r.state.linkEmitted,p=r.state.inRawBlock;r.state.linkEmitted=!1;let m=r.inlineTokens(l),f=r.state.linkEmitted;if(r.state.linkEmitted=d,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=p;return}r.state.linkEmitted=!0}return{type:c?"image":"link",raw:n,href:o,title:s,text:l,tokens:m}}function ed(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
1
+ "use strict";var __fxExtend=(()=>{var xr=Object.defineProperty;var xl=Object.getOwnPropertyDescriptor;var vl=Object.getOwnPropertyNames;var yl=Object.prototype.hasOwnProperty;var kl=(t,e)=>{for(var n in e)xr(t,n,{get:e[n],enumerable:!0})},wl=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vl(e))!yl.call(t,i)&&i!==n&&xr(t,i,{get:()=>e[i],enumerable:!(a=xl(e,i))||a.enumerable});return t};var _l=t=>wl(xr({},"__esModule",{value:!0}),t);var cp={};kl(cp,{dispose:()=>js});function Sl(t,e){this.v=t,this.k=e}function oi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function Al(t){if(Array.isArray(t))return t}function Cl(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,i,o,s,l=[],c=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(l.push(a.value),l.length!==e);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Tl(){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 Pl(t,e){return Al(t)||Cl(t,e)||El(t,e)||Tl()}function El(t,e){if(t){if(typeof t=="string")return oi(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)?oi(t,e):void 0}}function wn(t){var e,n;function a(o,s){try{var l=t[o](s),c=l.value,u=c instanceof Sl;Promise.resolve(u?c.v:c).then(function(f){if(u){var m=o==="return"&&c.k?o:"next";if(!c.k||f.done)return a(m,f);f=t[m](f).value}i(!!l.done,f)},function(f){a("throw",f)})}catch(f){i(2,f)}}function i(o,s){o===2?e.reject(s):e.resolve({value:s,done:o}),(e=e.next)?a(e.key,e.arg):n=null}this._invoke=function(o,s){return new Promise(function(l,c){var u={key:o,arg:s,resolve:l,reject:c,next:null};n?n=n.next=u:(e=n=u,a(o,s))})},typeof t.return!="function"&&(this.return=void 0)}wn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},wn.prototype.next=function(t){return this._invoke("next",t)},wn.prototype.throw=function(t){return this._invoke("throw",t)},wn.prototype.return=function(t){return this._invoke("return",t)};var ki=Object.entries,si=Object.setPrototypeOf,Rl=Object.isFrozen,Ml=Object.getPrototypeOf,Il=Object.getOwnPropertyDescriptor,ke=Object.freeze,_e=Object.seal,Nt=Object.create,wi=typeof Reflect<"u"&&Reflect,Ar=wi.apply,Cr=wi.construct;ke||(ke=function(e){return e});_e||(_e=function(e){return e});Ar||(Ar=function(e,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];return e.apply(n,i)});Cr||(Cr=function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return new e(...a)});var bt=xe(Array.prototype.forEach);Array.prototype.indexOf;var Ll=xe(Array.prototype.lastIndexOf),li=xe(Array.prototype.pop),jt=xe(Array.prototype.push);Array.prototype.slice;var Dl=xe(Array.prototype.splice),Ot=Array.isArray,Kt=xe(String.prototype.toLowerCase),vr=xe(String.prototype.toString),ci=xe(String.prototype.match),Xt=xe(String.prototype.replace),ui=xe(String.prototype.indexOf),zl=xe(String.prototype.trim),Nl=xe(Number.prototype.toString),Ol=xe(Boolean.prototype.toString),di=typeof BigInt>"u"?null:xe(BigInt.prototype.toString),pi=typeof Symbol>"u"?null:xe(Symbol.prototype.toString),Pe=xe(Object.prototype.hasOwnProperty),Vt=xe(Object.prototype.toString),Ae=xe(RegExp.prototype.test),ot=Bl(TypeError);function xe(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return Ar(t,e,a)}}function Bl(t){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return Cr(t,n)}}function Y(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Kt;if(si&&si(t,null),!Ot(e))return t;let a=e.length;for(;a--;){let i=e[a];if(typeof i=="string"){let o=n(i);o!==i&&(Rl(e)||(e[a]=o),i=o)}t[i]=!0}return t}function Fl(t){for(let e=0;e<t.length;e++)Pe(t,e)||(t[e]=null);return t}function Ie(t){let e=Nt(null);for(let a of ki(t)){var n=Pl(a,2);let i=n[0],o=n[1];Pe(t,i)&&(Ot(o)?e[i]=Fl(o):o&&typeof o=="object"&&o.constructor===Object?e[i]=Ie(o):e[i]=o)}return e}function $l(t){switch(typeof t){case"string":return t;case"number":return Nl(t);case"boolean":return Ol(t);case"bigint":return di?di(t):"0";case"symbol":return pi?pi(t):"Symbol()";case"undefined":return Vt(t);case"function":case"object":{if(t===null)return Vt(t);let e=t,n=ze(e,"toString");if(typeof n=="function"){let a=n(e);return typeof a=="string"?a:Vt(a)}return Vt(t)}default:return Vt(t)}}function ze(t,e){for(;t!==null;){let a=Il(t,e);if(a){if(a.get)return xe(a.get);if(typeof a.value=="function")return xe(a.value)}t=Ml(t)}function n(){return null}return n}function Ul(t){try{return Ae(t,""),!0}catch{return!1}}var fi=ke(["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"]),yr=ke(["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"]),kr=ke(["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"]),Hl=ke(["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"]),wr=ke(["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"]),ql=ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mi=ke(["#text"]),gi=ke(["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"]),_r=ke(["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"]),hi=ke(["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"]),_n=ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wl=_e(/{{[\w\W]*|^[\w\W]*}}/g),jl=_e(/<%[\w\W]*|^[\w\W]*%>/g),Xl=_e(/\${[\w\W]*/g),Vl=_e(/^data-[\-\w.\u00B7-\uFFFF]+$/),Kl=_e(/^aria-[\-\w]+$/),bi=_e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Jl=_e(/^(?:\w+script|data):/i),Yl=_e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gl=_e(/^html$/i),Zl=_e(/^[a-z][.\w]*(-[.\w]+)+$/i),xi=_e(/<[/\w!]/g),vi=_e(/<[/\w]/g),Ql=_e(/<\/no(script|embed|frames)/i),ec=_e(/\/>/i),Me={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_i=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],tc=ke(Y({},_i)),nc=(function(){let t={};return bt(_i,e=>{t[e]=_e(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),ke(t)})(),rc=function(){return typeof window>"u"?null:window},ac=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(a=n.getAttribute(i));let o="dompurify"+(a?"#"+a:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},yi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},st=function(e,n,a,i){return Pe(e,n)&&Ot(e[n])?Y(i.base?Ie(i.base):{},e[n],i.transform):a},Sr=function(e,n,a){let i=Pe(e,n)?e[n]:void 0;return i&&typeof i=="object"?Ie(i):a()};function Si(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rc(),e=A=>Si(A);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==Me.document||!t.Element)return e.isSupported=!1,e;let n=t.document,a=n,i=a.currentScript;t.DocumentFragment;let o=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,f=t.trustedTypes,m=l.prototype,d=ze(m,"cloneNode"),g=ze(m,"remove"),h=ze(m,"removeAttributeNode"),v=ze(m,"nextSibling"),k=ze(m,"childNodes"),y=ze(m,"parentNode"),x=ze(m,"shadowRoot"),w=ze(m,"attributes"),C=s&&s.prototype?ze(s.prototype,"nodeType"):null,R=s&&s.prototype?ze(s.prototype,"nodeName"):null,U=s&&s.prototype?ze(s.prototype,"ownerDocument"):null,J=function(p){return C?C(p):p.nodeType},H=function(p){return R?R(p):p.nodeName};if(typeof o=="function"){let A=n.createElement("template");A.content&&A.content.ownerDocument&&(n=A.content.ownerDocument)}let V,ee="",z,Q=!1,oe=0,Ee=function(){if(oe>0)throw ot('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.')},I=function(p){Ee(),oe++;try{return V.createHTML(p)}finally{oe--}},pe=function(p){Ee(),oe++;try{return V.createScriptURL(p)}finally{oe--}},ft=function(){return Q||(z=ac(f,i),Q=!0),z},cn=n,nr=cn.implementation,Ra=cn.createNodeIterator,Xs=cn.createDocumentFragment,Vs=cn.getElementsByTagName,Ks=a.importNode,se=yi();e.isSupported=typeof ki=="function"&&typeof y=="function"&&nr&&nr.createHTMLDocument!==void 0;let Js=Wl,Ys=jl,Gs=Xl,Zs=Vl,Qs=Kl,el=Jl,Ma=Yl,tl=Zl,Ia=bi,le=null,rr=Y({},[...fi,...yr,...kr,...wr,...mi]),ce=null,ar=Y({},[...gi,..._r,...hi,..._n]),We=Object.seal(Nt(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}})),Ht=null,La=null,rt=Object.seal(Nt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Da=!0,ir=!0,za=!1,Na=!0,at=!1,mt=!0,gt=!1,or=!1,un=null,dn=null,sr=!1,Pt=!1,pn=!1,fn=!1,Oa=!0,Ba=!1,Fa="user-content-",lr=!0,cr=!1,Et={},Rt=null,$a=Y({},["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"]),Ua=null,Ha=Y({},["audio","video","img","source","image","track"]),qa=null,Wa=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",je="http://www.w3.org/1999/xhtml",Mt=je,ur=!1,dr=null,nl=Y({},[mn,gn,je],vr),ja=ke(["mi","mo","mn","ms","mtext"]),pr=Y({},ja),Xa=ke(["annotation-xml"]),fr=Y({},Xa),rl=Y({},["title","style","font","a","script"]),qt=null,al=["application/xhtml+xml","text/html"],il="text/html",fe=null,It=null,ol=n.createElement("form"),Va=function(p){return p instanceof RegExp||p instanceof Function},mr=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(It&&It===p)return;(!p||typeof p!="object")&&(p={}),p=Ie(p),qt=al.indexOf(p.PARSER_MEDIA_TYPE)===-1?il:p.PARSER_MEDIA_TYPE,fe=qt==="application/xhtml+xml"?vr:Kt,le=st(p,"ALLOWED_TAGS",rr,{transform:fe}),ce=st(p,"ALLOWED_ATTR",ar,{transform:fe}),dr=st(p,"ALLOWED_NAMESPACES",nl,{transform:vr}),qa=st(p,"ADD_URI_SAFE_ATTR",Wa,{transform:fe,base:Wa}),Ua=st(p,"ADD_DATA_URI_TAGS",Ha,{transform:fe,base:Ha}),Rt=st(p,"FORBID_CONTENTS",$a,{transform:fe}),Ht=st(p,"FORBID_TAGS",Ie({}),{transform:fe}),La=st(p,"FORBID_ATTR",Ie({}),{transform:fe}),Et=Pe(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?Ie(p.USE_PROFILES):p.USE_PROFILES:!1,Da=p.ALLOW_ARIA_ATTR!==!1,ir=p.ALLOW_DATA_ATTR!==!1,za=p.ALLOW_UNKNOWN_PROTOCOLS||!1,Na=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=p.SAFE_FOR_TEMPLATES||!1,mt=p.SAFE_FOR_XML!==!1,gt=p.WHOLE_DOCUMENT||!1,Pt=p.RETURN_DOM||!1,pn=p.RETURN_DOM_FRAGMENT||!1,fn=p.RETURN_TRUSTED_TYPE||!1,sr=p.FORCE_BODY||!1,Oa=p.SANITIZE_DOM!==!1,Ba=p.SANITIZE_NAMED_PROPS||!1,lr=p.KEEP_CONTENT!==!1,cr=p.IN_PLACE||!1,Ia=Ul(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:bi,Mt=typeof p.NAMESPACE=="string"?p.NAMESPACE:je,pr=Sr(p,"MATHML_TEXT_INTEGRATION_POINTS",()=>Y({},ja)),fr=Sr(p,"HTML_INTEGRATION_POINTS",()=>Y({},Xa));let b=Sr(p,"CUSTOM_ELEMENT_HANDLING",()=>Nt(null));if(We=Nt(null),Pe(b,"tagNameCheck")&&Va(b.tagNameCheck)&&(We.tagNameCheck=b.tagNameCheck),Pe(b,"attributeNameCheck")&&Va(b.attributeNameCheck)&&(We.attributeNameCheck=b.attributeNameCheck),Pe(b,"allowCustomizedBuiltInElements")&&typeof b.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=b.allowCustomizedBuiltInElements),_e(We),at&&(ir=!1),pn&&(Pt=!0),Et&&(le=Y({},mi),ce=Nt(null),Et.html===!0&&(Y(le,fi),Y(ce,gi)),Et.svg===!0&&(Y(le,yr),Y(ce,_r),Y(ce,_n)),Et.svgFilters===!0&&(Y(le,kr),Y(ce,_r),Y(ce,_n)),Et.mathMl===!0&&(Y(le,wr),Y(ce,hi),Y(ce,_n))),rt.tagCheck=null,rt.attributeCheck=null,Pe(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?rt.tagCheck=p.ADD_TAGS:Ot(p.ADD_TAGS)&&(le===rr&&(le=Ie(le)),Y(le,p.ADD_TAGS,fe))),Pe(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?rt.attributeCheck=p.ADD_ATTR:Ot(p.ADD_ATTR)&&(ce===ar&&(ce=Ie(ce)),Y(ce,p.ADD_ATTR,fe))),Pe(p,"ADD_FORBID_CONTENTS")&&Ot(p.ADD_FORBID_CONTENTS)&&(Rt===$a&&(Rt=Ie(Rt)),Y(Rt,p.ADD_FORBID_CONTENTS,fe)),lr&&(le["#text"]=!0),gt&&Y(le,["html","head","body"]),le.table&&(Y(le,["tbody"]),delete Ht.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let _=V;V=p.TRUSTED_TYPES_POLICY;try{ee=I("")}catch(T){throw V=_,T}}else p.TRUSTED_TYPES_POLICY===null?(V=void 0,ee=""):(V===void 0&&(V=ft()),V&&typeof ee=="string"&&(ee=I("")));ke&&ke(p),It=p},Ka=Y({},[...yr,...kr,...Hl]),Ja=Y({},[...wr,...ql]),sl=function(p,b,_){return b.namespaceURI===je?p==="svg":b.namespaceURI===mn?p==="svg"&&(_==="annotation-xml"||pr[_]):!!Ka[p]},ll=function(p,b,_){return b.namespaceURI===je?p==="math":b.namespaceURI===gn?p==="math"&&fr[_]:!!Ja[p]},cl=function(p,b,_){return b.namespaceURI===gn&&!fr[_]||b.namespaceURI===mn&&!pr[_]?!1:!Ja[p]&&(rl[p]||!Ka[p])},ul=function(p){let b=y(p);(!b||!b.tagName)&&(b={namespaceURI:Mt,tagName:"template"});let _=Kt(p.tagName),T=Kt(b.tagName);return dr[p.namespaceURI]?p.namespaceURI===gn?sl(_,b,T):p.namespaceURI===mn?ll(_,b,T):p.namespaceURI===je?cl(_,b,T):!!(qt==="application/xhtml+xml"&&dr[p.namespaceURI]):!1},it=function(p){jt(e.removed,{element:p});try{y(p).removeChild(p)}catch{if(g(p),!y(p))throw ot("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ya=function(p,b,_){try{h(p,b)}catch{try{p.removeAttribute(_)}catch{}}},hn=function(p){bn(p);let b=k(p);if(b){let T=[];bt(b,L=>{jt(T,L)}),bt(T,L=>{try{g(L)}catch{}})}let _=w(p);if(_)for(let T=_.length-1;T>=0;--T){let L=_[T],q=L&&L.name;typeof q=="string"&&Ya(p,L,q)}},ht=function(p,b,_){if(!_)try{_=b.getAttributeNode(p)}catch{_=null}jt(e.removed,{attribute:_||null,from:b});try{_?h(b,_):b.removeAttribute(p)}catch{try{b.removeAttribute(p)}catch{}}if(p==="is")if(Pt||pn)try{it(b)}catch{}else try{b.setAttribute(p,"")}catch{}},dl=function(p){let b=w(p);if(b)for(let _=b.length-1;_>=0;--_){let T=b[_],L=T&&T.name;typeof L!="string"||ce[fe(L)]||Ya(p,T,L)}},bn=function(p){let b=[p];for(;b.length>0;){let _=b.pop();J(_)===Me.element&&dl(_);let T=k(_);if(T)for(let L=T.length-1;L>=0;--L)b.push(T[L])}},Ga=function(p,b){return mt?p==="patchsrc"?!0:p==="for"&&b!=="label"&&b!=="output":!1},pl=function(p){if(!mt)return;let b=[p];for(;b.length>0;){let _=b.pop(),T=J(_);if(T===Me.processingInstruction||T===Me.comment&&Ae(vi,_.data)){try{g(_)}catch{}continue}if(T===Me.element){let q=_,K=fe(H(_));try{q.hasAttribute&&q.hasAttribute("patchsrc")&&q.removeAttribute("patchsrc"),q.hasAttribute&&q.hasAttribute("for")&&Ga("for",K)&&q.removeAttribute("for")}catch{}}let L=k(_);if(L)for(let q=L.length-1;q>=0;--q)b.push(L[q])}},Za=function(p){let b=null,_=null;if(sr)p="<remove></remove>"+p;else{let q=ci(p,/^[\r\n\t ]+/);_=q&&q[0]}qt==="application/xhtml+xml"&&Mt===je&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");let T=V?I(p):p;if(Mt===je)try{b=new u().parseFromString(T,qt)}catch{}if(!b||!b.documentElement){b=nr.createDocument(Mt,"template",null);try{b.documentElement.innerHTML=ur?ee:T}catch{}}let L=b.body||b.documentElement;return p&&_&&L.insertBefore(n.createTextNode(_),L.childNodes[0]||null),Mt===je?Vs.call(b,gt?"html":"body")[0]:gt?b.documentElement:L},Qa=function(p){let b=U?U(p):p.ownerDocument;return Ra.call(b||p,p,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xn=function(p){return p=Xt(p,Js," "),p=Xt(p,Ys," "),p=Xt(p,Gs," "),p},gr=function(p){var b;p.normalize();let _=U?U(p):p.ownerDocument,T=Ra.call(_||p,p,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),L=T.nextNode();for(;L;)L.data=xn(L.data),L=T.nextNode();let q=(b=p.querySelectorAll)===null||b===void 0?void 0:b.call(p,"template");q&&bt(q,K=>{Lt(K.content)&&gr(K.content)})},vn=function(p){let b=R?R(p):null;return typeof b!="string"||fe(b)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==w(p)||typeof p.removeAttribute!="function"||typeof p.removeAttributeNode!="function"||typeof p.getAttributeNode!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==C(p)||p.childNodes!==k(p)},Lt=function(p){if(!C||typeof p!="object"||p===null)return!1;try{return C(p)===Me.documentFragment}catch{return!1}},Wt=function(p){if(!C||typeof p!="object"||p===null)return!1;try{return typeof C(p)=="number"}catch{return!1}};function Xe(A,p,b){A.length!==0&&bt(A,_=>{_.call(e,p,b,It)})}let fl=function(p,b){return!!(mt&&p.hasChildNodes()&&!Wt(p.firstElementChild)&&Ae(xi,p.textContent)&&Ae(xi,p.innerHTML)||mt&&p.namespaceURI===je&&tc[b]&&(Wt(p.firstElementChild)||typeof p.textContent=="string"&&Ae(nc[b],p.textContent))||p.nodeType===Me.processingInstruction||mt&&p.nodeType===Me.comment&&Ae(vi,p.data))},yn=function(p,b){if(p instanceof RegExp)return Ae(p,b);if(p instanceof Function){for(var _=arguments.length,T=new Array(_>2?_-2:0),L=2;L<_;L++)T[L-2]=arguments[L];return!!p(b,...T)}return!1},ml=function(p,b,_){if(!Ht[b]&&ri(b)&&yn(We.tagNameCheck,b))return!1;if(lr&&!Rt[b]){let T=y(p),L=k(p);if(L&&T){let q=L.length;for(let K=q-1;K>=0;--K){let de=p===_?d(L[K],!0):L[K];T.insertBefore(de,v(p))}}}return it(p),!0},ei=function(p,b,_,T){return p.length===0?b:b===_||b===T?Ie(b):b},Dt=function(p,b){return p===b||y(p)!==null?!1:(cr&&bn(p),!0)},ti=function(p,b){if(Xe(se.beforeSanitizeElements,p,null),Dt(p,b))return!0;if(vn(p))return it(p),!0;let _=fe(H(p));if(le=ei(se.uponSanitizeElement,le,rr,un),Xe(se.uponSanitizeElement,p,{tagName:_,allowedTags:le}),Dt(p,b))return!0;if(fl(p,_))return it(p),!0;if(Ht[_]||!(rt.tagCheck instanceof Function&&rt.tagCheck(_))&&!le[_]){let T=ml(p,_,b);return T===!1&&(Xe(se.afterSanitizeElements,p,null),Dt(p,b))?!0:T}if(J(p)===Me.element&&!ul(p)||(_==="noscript"||_==="noembed"||_==="noframes")&&Ae(Ql,p.innerHTML))return it(p),!0;if(at&&p.nodeType===Me.text){let T=xn(p.textContent);p.textContent!==T&&(jt(e.removed,{element:p.cloneNode()}),p.textContent=T)}return Xe(se.afterSanitizeElements,p,null),Dt(p,b)},ni=function(p,b,_){if(La[b]||Ga(b,p)||Oa&&(b==="id"||b==="name")&&(_ in n||_ in ol))return!1;let T=ce[b]||rt.attributeCheck instanceof Function&&rt.attributeCheck(b,p);return ir&&Ae(Zs,b)||Da&&Ae(Qs,b)?!0:T?qa[b]||Ae(Ia,Xt(_,Ma,""))||(b==="src"||b==="xlink:href"||b==="href")&&p!=="script"&&ui(_,"data:")===0&&Ua[p]||za&&!Ae(el,Xt(_,Ma,""))?!0:!_:ri(p)&&yn(We.tagNameCheck,p)&&yn(We.attributeNameCheck,b,p)||b==="is"&&We.allowCustomizedBuiltInElements&&yn(We.tagNameCheck,_)},gl=Y({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ri=function(p){return!gl[Kt(p)]&&Ae(tl,p)},hl=function(p,b,_,T){if(V&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!_)switch(f.getAttributeType(p,b)){case"TrustedHTML":return I(T);case"TrustedScriptURL":return pe(T)}return T},bl=function(p,b,_,T){try{return _?p.setAttributeNS(_,b,T):p.setAttribute(b,T),vn(p)?(it(p),!1):!0}catch{return ht(b,p),!1}},ai=function(p,b){if(Xe(se.beforeSanitizeAttributes,p,null),Dt(p,b))return;let _=p.attributes;if(!_||vn(p))return;ce=ei(se.uponSanitizeAttribute,ce,ar,dn);let T={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0},L=_.length,q=fe(p.nodeName);for(;L--;){let K=_[L],de=K.name,De=K.namespaceURI,Re=K.value,zt=fe(de),br=Re,Te=de==="value"?br:zl(br),ii=!1;if(T.attrName=zt,T.attrValue=Te,T.keepAttr=!0,T.forceKeepAttr=void 0,Xe(se.uponSanitizeAttribute,p,T),Te=T.attrValue,Ba&&(zt==="id"||zt==="name")&&ui(Te,Fa)!==0&&(ht(de,p,K),Te=Fa+Te,ii=!0),mt&&Ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){ht(de,p,K);continue}if(zt==="attributename"&&ci(Te,"href")){ht(de,p,K);continue}if(!T.forceKeepAttr){if(!T.keepAttr){ht(de,p,K);continue}if(!Na&&Ae(ec,Te)){ht(de,p,K);continue}if(at&&(Te=xn(Te)),!ni(q,zt,Te)){ht(de,p,K);continue}Te=hl(q,zt,De,Te),Te!==br&&bl(p,de,De,Te)&&ii&&li(e.removed)}}Xe(se.afterSanitizeAttributes,p,null),Dt(p,b)},kn=function(p){let b=null,_=Qa(p);for(Xe(se.beforeSanitizeShadowDOM,p,null);b=_.nextNode();)if(Xe(se.uponSanitizeShadowNode,b,null),ti(b,p),ai(b,p),Lt(b.content)&&kn(b.content),J(b)===Me.element){let T=x(b);Lt(T)&&(hr(T),kn(T))}Xe(se.afterSanitizeShadowDOM,p,null)},hr=function(p){let b=[{node:p,shadow:null}];for(;b.length>0;){let _=b.pop();if(_.shadow){kn(_.shadow);continue}let T=_.node,L=J(T)===Me.element,q=k(T);if(q)for(let K=q.length-1;K>=0;--K)b.push({node:q[K],shadow:null});if(L){let K=R?R(T):null;if(typeof K=="string"&&fe(K)==="template"){let de=T.content;Lt(de)&&b.push({node:de,shadow:null})}}if(L){let K=x(T);Lt(K)&&b.push({node:null,shadow:K},{node:K,shadow:null})}}};return e.sanitize=function(A){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,_=null,T=null,L=null;if(ur=!A,ur&&(A="<!-->"),typeof A!="string"&&!Wt(A)&&(A=$l(A),typeof A!="string"))throw ot("dirty is not a string, aborting");if(!e.isSupported)return A;or?(le=un,ce=dn):mr(p),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(le=Ie(le)),se.uponSanitizeAttribute.length>0&&(ce=Ie(ce)),e.removed=[];let q=cr&&typeof A!="string"&&Wt(A);if(q){pl(A);let De=H(A);if(typeof De=="string"){let Re=fe(De);if(!le[Re]||Ht[Re])throw hn(A),ot("root node is forbidden and cannot be sanitized in-place")}if(vn(A))throw hn(A),ot("root node is clobbered and cannot be sanitized in-place");try{hr(A)}catch(Re){throw hn(A),Re}}else if(Wt(A))b=Za("<!---->"),_=b.ownerDocument.importNode(A,!0),_.nodeType===Me.element&&_.nodeName==="BODY"||_.nodeName==="HTML"?b=_:b.appendChild(_),hr(b);else{if(!Pt&&!at&&!gt&&A.indexOf("<")===-1)return V&&fn?I(A):A;if(b=Za(A),!b)return Pt?null:fn?ee:""}b&&sr&&it(b.firstChild);let K=q?A:b;try{let De=Qa(K);for(;T=De.nextNode();)ti(T,K),ai(T,K),Lt(T.content)&&kn(T.content)}catch(De){throw q&&(hn(A),bt(e.removed,Re=>{Re.element&&bn(Re.element)})),De}if(q){let De=!1;if(bt(e.removed,Re=>{Re.element&&(Re.element===A&&(De=!0),bn(Re.element))}),De)throw ot("a node selected for removal could not be safely returned; refusing to sanitize in place");return at&&gr(A),A}if(Pt){if(at&&gr(b),pn)for(L=Xs.call(b.ownerDocument);b.firstChild;)L.appendChild(b.firstChild);else L=b;return(ce.shadowroot||ce.shadowrootmode)&&(L=Ks.call(a,L,!0)),L}let de=gt?b.outerHTML:b.innerHTML;return gt&&le["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&Ae(Gl,b.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
3
+ `+de),at&&(de=xn(de)),V&&fn?I(de):de},e.setConfig=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mr(A),or=!0,un=le,dn=ce},e.clearConfig=function(){It=null,or=!1,un=null,dn=null,V=z,ee=""},e.isValidAttribute=function(A,p,b){It||mr({});let _=fe(A),T=fe(p);return ni(_,T,b)},e.addHook=function(A,p){typeof p=="function"&&Pe(se,A)&&jt(se[A],p)},e.removeHook=function(A,p){if(Pe(se,A)){if(p!==void 0){let b=Ll(se[A],p);return b===-1?void 0:Dl(se[A],b,1)[0]}return li(se[A])}},e.removeHooks=function(A){Pe(se,A)&&(se[A]=[])},e.removeAllHooks=function(){se=yi()},e}var Tr=Si();function Mr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=Mr();function zi(t){yt=t}var xt={exec:()=>null};function Bt(t){let e=[];return n=>{let a=Math.max(0,Math.min(3,n-1)),i=e[a];return i||(i=t(a),e[a]=i),i}}function F(t,e=""){let n=typeof t=="string"?t:t.source,a={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Se.caret,"$1"),n=n.replace(i,s),a},getRegex:()=>new RegExp(n,e)};return a}var ic=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Se={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:Bt(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Bt(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Zt})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Bt(t=>new RegExp(`^ {0,${t}}>`))},oc=/^(?:[ \t]*(?:\n|$))+/,sc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ir=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ni=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Oi=F(Ni).replace(/bull/g,Ir).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(),uc=F(Ni).replace(/bull/g,Ir).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(),Lr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,dc=/^[^\n]+/,Dr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,pc=F(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Dr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fc=F(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ir).getRegex(),Zt="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",zr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mc=F("^ {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",zr).replace("tag",Zt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bi=t=>F(Lr).replace("hr",Gt).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",Zt).getRegex(),gc=Bi(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),hc=Bi(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),bc=F(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hc).getRegex(),Nr={blockquote:bc,code:sc,def:pc,fences:lc,heading:cc,hr:Gt,html:mc,lheading:Oi,list:fc,newline:oc,paragraph:gc,table:xt,text:dc},Ai=F("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gt).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",Zt).getRegex(),xc={...Nr,lheading:uc,table:Ai,paragraph:F(Lr).replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ai).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",Zt).getRegex()},vc={...Nr,html:F(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",zr).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:xt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:F(Lr).replace("hr",Gt).replace("heading",` *#{1,6} *[^
4
+ ]`).replace("lheading",Oi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fi=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,wc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ge=/[\p{P}\p{S}]/u,Ft=/[\s\p{P}\p{S}]/u,Qt=/[^\s\p{P}\p{S}]/u,_c=F(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ft).getRegex(),Sc=/[\p{Pi}\p{Ps}"']/u,$i=/(?!~)[\p{P}\p{S}]/u,Ac=/(?!~)[\s\p{P}\p{S}]/u,Cc=/(?:[^\s\p{P}\p{S}]|~)/u,Tc=F(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ic?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ui=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Pc=F(Ui,"u").replace(/punct/g,Ge).getRegex(),Ec=F(Ui,"u").replace(/punct/g,$i).getRegex(),Rc=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Mc=F(Rc,"u").replace(/openQuote/g,Sc).replace(/punct/g,Ge).getRegex(),Hi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ic=F(Hi,"gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Ft).replace(/punct/g,Ge).getRegex(),Lc=F(Hi,"gu").replace(/notPunctSpace/g,Cc).replace(/punctSpace/g,Ac).replace(/punct/g,$i).getRegex(),Dc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",zc=F(Dc,"gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Ft).replace(/punct/g,Ge).getRegex(),Nc=F("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Ft).replace(/punct/g,Ge).getRegex(),Oc="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Bc=F(Oc,"gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Ft).replace(/punct/g,Ge).getRegex(),Fc=F(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ge).getRegex(),$c="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Uc=F($c,"gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Ft).replace(/punct/g,Ge).getRegex(),Hc=F(/\\(punct)/,"gu").replace(/punct/g,Ge).getRegex(),qc=F(/^<(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(),Wc=F(zr).replace("(?:-->|$)","-->").getRegex(),jc=F("^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",Wc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qi=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,An=F(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",qi).getRegex(),Xc=F(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",An).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vc=F(/^!?\[(label)\]\[(ref)\]/).replace("label",An).replace("ref",Dr).getRegex(),Kc=F(/^!?\[(ref)\](?:\[\])?/).replace("ref",Dr).getRegex(),Ci=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Jc=F(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",qi).getRegex(),Yc=F("reflink|nolink(?!\\()","g").replace("reflink",F(/^!?\[(label)\]\[(ref)\]/).replace("label",Jc).replace("ref",Ci).getRegex()).replace("nolink",F(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ci).getRegex()).getRegex(),Ti=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gc=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Zc=F(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Gc).getRegex(),Or={_backpedal:xt,anyPunctuation:Hc,autolink:qc,blockSkip:Tc,br:Fi,code:kc,del:xt,delLDelim:xt,delRDelim:xt,emStrongLDelim:Pc,emStrongRDelimAst:Ic,emStrongRDelimUnd:Nc,escape:yc,link:Xc,nolink:Kc,punctuation:_c,reflink:Vc,reflinkSearch:Yc,tag:jc,text:wc,url:xt},Qc={...Or,emStrongLDelim:Mc,emStrongRDelimAst:zc,emStrongRDelimUnd:Bc,link:F(/^!?\[(label)\]\((.*?)\)/).replace("label",An).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",An).getRegex()},Pr={...Or,emStrongRDelimAst:Lc,emStrongLDelim:Ec,delLDelim:Fc,delRDelim:Uc,url:F(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Zc).replace("protocol",Ti).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:F(/^(?:[^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",Ti).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},eu={...Pr,br:F(Fi).replace("{2,}","*").getRegex(),text:F(Pr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sn={normal:Nr,gfm:xc,pedantic:vc},Jt={normal:Or,gfm:Pr,breaks:eu,pedantic:Qc},tu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pi=t=>tu[t];function Le(t,e){if(e){if(Se.escapeTest.test(t))return t.replace(Se.escapeReplace,Pi)}else if(Se.escapeTestNoEncode.test(t))return t.replace(Se.escapeReplaceNoEncode,Pi);return t}function nu(t){return t.replace(Se.numericCharacterReference,(e,n,a)=>{let i=n===void 0?Number.parseInt(a,16):Number.parseInt(n,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":String.fromCodePoint(i)})}function Ei(t){try{t=encodeURI(t).replace(Se.percentDecode,"%")}catch{return null}return t}function Ri(t,e){let n=t.replace(Se.findPipe,(o,s,l)=>{let c=!1,u=s;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),a=n.split(Se.splitPipe),i=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;i<a.length;i++)a[i]=a[i].trim().replace(Se.slashPipe,"|");return a}function lt(t,e,n){let a=t.length;if(a===0)return"";let i=0;for(;i<a;){let o=t.charAt(a-i-1);if(o===e&&!n)i++;else if(o!==e&&n)i++;else break}return t.slice(0,a-i)}function Mi(t){let e=t.split(`
5
+ `),n=e.length-1;for(;n>=0&&Se.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
6
+ `)}function Cn(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function ru(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])n++;else if(t[a]===e[1]&&(n--,n<0))return a;return n>0?-2:-1}function Ii(t,e=0){let n=e,a="";for(let i of t)if(i===" "){let o=4-n%4;a+=" ".repeat(o),n+=o}else a+=i,n++;return a}function Li(t,e,n,a,i){let o=e.href,s=e.title||null,l=t[1].replace(i.other.outputLinkReplace,"$1"),c=t[0].charAt(0)==="!";a.state.inLink=!0;let u=a.state.linkEmitted,f=a.state.inRawBlock;a.state.linkEmitted=!1;let m=a.inlineTokens(l),d=a.state.linkEmitted;if(a.state.linkEmitted=u,a.state.inLink=!1,!c){if(d){a.state.inRawBlock=f;return}a.state.linkEmitted=!0}return{type:c?"image":"link",raw:n,href:o,title:s,text:l,tokens:m}}function au(t,e,n){let a=t.match(n.other.indentCodeCompensation);if(a===null)return e;let i=a[1];return e.split(`
7
7
  `).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[l]=s;return o.slice(Math.min(l.length,i.length))}).join(`
8
- `)}function Ii(t,e,n,r){if(!e.includes("<"))return!1;for(let i=0;i<e.length;i++){if(e[i]==="\\"){i++;continue}if(e[i]==="`"){let l=r.inline.code.exec(e.slice(i));if(l){i+=l[0].length-1;continue}}if(e[i]!=="<")continue;let o=t.slice(n+i),s=r.inline.tag.exec(o)||r.inline.autolink.exec(o);if(s){if(s[0].length>e.length-i)return!0;i+=s[0].length-1}}return!1}var Tn=class{options;rules;lexer;constructor(t){this.options=t||vt}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]:Pi(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=ed(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=st(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(n=r.trim())}return{type:"heading",raw:st(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:st(e[0],`
10
- `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=st(e[0],`
8
+ `)}function Di(t,e,n,a){if(!e.includes("<"))return!1;for(let i=0;i<e.length;i++){if(e[i]==="\\"){i++;continue}if(e[i]==="`"){let l=a.inline.code.exec(e.slice(i));if(l){i+=l[0].length-1;continue}}if(e[i]!=="<")continue;let o=t.slice(n+i),s=a.inline.tag.exec(o)||a.inline.autolink.exec(o);if(s){if(s[0].length>e.length-i)return!0;i+=s[0].length-1}}return!1}var Tn=class{options;rules;lexer;constructor(t){this.options=t||yt}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]:Mi(e[0]),a=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:a}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],a=au(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:a}}}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 a=lt(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceTabChar.test(a))&&(n=a.trim())}return{type:"heading",raw:lt(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:lt(e[0],`
10
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=lt(e[0],`
11
11
  `).split(`
12
- `),r="",i="",o=[];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 d=l.join(`
13
- `),p=d.replace(this.rules.other.blockquoteSetextReplace,`
14
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
15
- ${d}`:d,i=i?`${i}
16
- ${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=m,n.length===0)break;let f=o.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,h=n.join(`
12
+ `),a="",i="",o=[];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
+ `),f=u.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
15
+ ${u}`:u,i=i?`${i}
16
+ ${f}`:f;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=m,n.length===0)break;let d=o.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let g=d,h=n.join(`
17
17
  `),v=g.raw+`
18
- `+h.replace(this.rules.other.blockquoteSetextReplace2,""),y=this.blockquote(v);o[o.length-1]=y;let A=v.substring(y.raw.length).replace(/^\n/,""),x=A?A.split(`
19
- `).length:0,w=x?n.slice(0,-x):n;w.length>0&&(r=`${r}
18
+ `+h.replace(this.rules.other.blockquoteSetextReplace2,""),k=this.blockquote(v);o[o.length-1]=k;let y=v.substring(k.raw.length).replace(/^\n/,""),x=y?y.split(`
19
+ `).length:0,w=x?n.slice(0,-x):n;w.length>0&&(a=`${a}
20
20
  ${w.join(`
21
- `)}`),i=i.substring(0,i.length-g.text.length)+y.text;break}else if(f?.type==="list"){let g=f,h=g.raw+`
21
+ `)}`),i=i.substring(0,i.length-g.text.length)+k.text;break}else if(d?.type==="list"){let g=d,h=g.raw+`
22
22
  `+n.join(`
23
- `),v=this.list(h);o[o.length-1]=v,r=r.substring(0,r.length-f.raw.length)+v.raw,i=i.substring(0,i.length-g.raw.length)+v.raw,n=h.substring(o.at(-1).raw.length).split(`
24
- `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={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 o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let c=!1,d="",p="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let m=e[2].split(`
25
- `,1)[0],f=e[1].length,g=this.options.pedantic?Ri(m,f):m.replace(this.rules.other.leadingSpaceTab,A=>Ri(A,f)),h=t.split(`
26
- `,1)[0],v=!g.trim(),y=0;if(this.options.pedantic?(y=2,p=g.trimStart()):v?y=f+1:(y=g.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=g.slice(y),y+=f),v&&this.rules.other.blankLine.test(h)&&(d+=h+`
27
- `,t=t.substring(h.length+1),c=!0),!c){let A=this.rules.other.nextBulletRegex(y),x=this.rules.other.hrRegex(y),w=this.rules.other.fencesBeginRegex(y),T=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y),$=this.rules.other.blockquoteBeginRegex(y);for(;t;){let X=t.split(`
28
- `,1)[0],U;if(h=X,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),U=h):U=h.replace(this.rules.other.leadingSpaceTab,H=>H.replace(this.rules.other.tabCharGlobal," ")),w.test(h)||T.test(h)||L.test(h)||$.test(h)||A.test(h)||x.test(h))break;if(U.search(this.rules.other.nonSpaceChar)>=y||!h.trim())p+=`
29
- `+U.slice(y);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||T.test(g)||x.test(g))break;p+=`
30
- `+h}v=!h.trim(),d+=X+`
31
- `,t=t.substring(X.length+1),g=U.slice(y)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0)),i.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=d}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!i.loose){let d=c.tokens.filter(m=>m.type==="space"),p=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=p}for(let c of i.items){let d=c.tokens[0];if(c.task&&(d?.type==="text"||d?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=m.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=m.raw+c.tokens[0].raw,c.tokens[0].text=m.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(m)):c.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):c.tokens.unshift(m)}}else c.task&&(c.task=!1)}if(i.loose)for(let c of i.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Pi(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=Cn(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:st(e[0],`
32
- `),href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ei(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
33
- `):[],o={type:"table",raw:st(e[0],`
34
- `),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(let s of i)o.rows.push(Ei(s,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:st(e[0],`
23
+ `),v=this.list(h);o[o.length-1]=v,a=a.substring(0,a.length-d.raw.length)+v.raw,i=i.substring(0,i.length-g.raw.length)+v.raw,n=h.substring(o.at(-1).raw.length).split(`
24
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),a=n.length>1,i={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let c=!1,u="",f="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let m=e[2].split(`
25
+ `,1)[0],d=e[1].length,g=this.options.pedantic?Ii(m,d):m.replace(this.rules.other.leadingSpaceTab,y=>Ii(y,d)),h=t.split(`
26
+ `,1)[0],v=!g.trim(),k=0;if(this.options.pedantic?(k=2,f=g.trimStart()):v?k=d+1:(k=g.search(this.rules.other.nonSpaceChar),k=k>4?1:k,f=g.slice(k),k+=d),v&&this.rules.other.blankLine.test(h)&&(u+=h+`
27
+ `,t=t.substring(h.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(k),x=this.rules.other.hrRegex(k),w=this.rules.other.fencesBeginRegex(k),C=this.rules.other.headingBeginRegex(k),R=this.rules.other.htmlBeginRegex(k),U=this.rules.other.blockquoteBeginRegex(k);for(;t;){let J=t.split(`
28
+ `,1)[0],H;if(h=J,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),H=h):H=h.replace(this.rules.other.leadingSpaceTab,V=>V.replace(this.rules.other.tabCharGlobal," ")),w.test(h)||C.test(h)||R.test(h)||U.test(h)||y.test(h)||x.test(h))break;if(H.search(this.rules.other.nonSpaceChar)>=k||!h.trim())f+=`
29
+ `+H.slice(k);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||C.test(g)||x.test(g))break;f+=`
30
+ `+h}v=!h.trim(),u+=J+`
31
+ `,t=t.substring(J.length+1),g=H.slice(k)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!i.loose){let u=c.tokens.filter(m=>m.type==="space"),f=u.length>0&&u.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=f}for(let c of i.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 m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let f=this.rules.other.listTaskCheckbox.exec(c.raw);if(f){let m={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};c.checked=m.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=m.raw+c.tokens[0].raw,c.tokens[0].text=m.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(m)):c.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):c.tokens.unshift(m)}}else c.task&&(c.task=!1)}if(i.loose)for(let c of i.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Mi(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=Cn(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:lt(e[0],`
32
+ `),href:a,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ri(e[1]),a=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
33
+ `):[],o={type:"table",raw:lt(e[0],`
34
+ `),header:[],align:[],rows:[]};if(n.length===a.length){for(let s of a)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(let s of i)o.rows.push(Ri(s,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:lt(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&&Ii(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=st(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=Qc(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 i=e[2],o="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Mi(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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&&Ii(t,n[1],r,this.rules))return;let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[Cn(i)];if(!o){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Mi(n,o,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 i=[...r[0]].length-1,o,s,l=i,c=0,d=r[0][0],p=n===d,m=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*t.length+i);(r=m.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){l+=s;continue}else if(r[5]||r[6]){if(i%3&&!((i+s)%3)){c+=s;continue}if(p)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let f=[...r[0]][0].length,g=t.slice(0,i+r.index+f+s);if(Math.min(i,s)%2){let v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}let h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}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),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(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 i=[...r[0]].length-1,o,s,l=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(r=c.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(s=[...o].length,s!==i))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let d=[...r[0]][0].length,p=t.slice(0,i+r.index+d+s),m=p.slice(i,-i);return{type:"del",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}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 i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==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]:Zc(e[0]),escaped:n}}}},Oe=class Er{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||vt,this.options.tokenizer=this.options.tokenizer||new Tn,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:_e,block:Sn.normal,inline:Kt.normal};this.options.pedantic?(n.block=Sn.pedantic,n.inline=Kt.pedantic):this.options.gfm&&(n.block=Sn.gfm,this.options.breaks?n.inline=Kt.breaks:n.inline=Kt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sn,inline:Kt}}static lex(e,n){return new Er(n).lex(e)}static lexInline(e,n){return new Er(n).inlineTokens(e)}lex(e){e=e.replace(_e.carriageReturn,`
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(_e.tabCharGlobal," ").replace(_e.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(l=>(o=l.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
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&&Di(t,e[1],n,this.rules))return;let a=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let s=lt(a.slice(0,-1),"\\");if((a.length-s.length)%2===0)return}else{let s=ru(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 i=e[2],o="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?i=i.slice(1):i=i.slice(1,-1)),Li(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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 a=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Di(t,n[1],a,this.rules))return;let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[Cn(i)];if(!o){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Li(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...a[0]].length-1,o,s,l=i,c=0,u=a[0][0],f=n===u,m=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*t.length+i);(a=m.exec(e))!==null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(s=[...o].length,a[3]||a[4]){l+=s;continue}else if(a[5]||a[6]){if(i%3&&!((i+s)%3)){c+=s;continue}if(f)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let d=[...a[0]][0].length,g=t.slice(0,i+a.index+d+s);if(Math.min(i,s)%2){let v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}let h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&i&&(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 a=this.rules.inline.delLDelim.exec(t);if(a&&(!a[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...a[0]].length-1,o,s,l=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(a=c.exec(e))!==null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o||(s=[...o].length,s!==i))continue;if(a[3]||a[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let u=[...a[0]][0].length,f=t.slice(0,i+a.index+u+s),m=f.slice(i,-i);return{type:"del",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,a;return e[2]==="@"?(n=e[1],a="mailto:"+n):(n=e[1],a=n),{type:"link",raw:e[0],text:n,href:a,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,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]:nu(e[0]),escaped:n}}}},Be=class Er{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||yt,this.options.tokenizer=this.options.tokenizer||new Tn,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:Se,block:Sn.normal,inline:Jt.normal};this.options.pedantic?(n.block=Sn.pedantic,n.inline=Jt.pedantic):this.options.gfm&&(n.block=Sn.gfm,this.options.breaks?n.inline=Jt.breaks:n.inline=Jt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sn,inline:Jt}}static lex(e,n){return new Er(n).lex(e)}static lexInline(e,n){return new Er(n).inlineTokens(e)}lex(e){e=e.replace(Se.carriageReturn,`
37
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],a=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Se.tabCharGlobal," ").replace(Se.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(l=>(o=l.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
38
38
  `:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
39
39
  `)?"":`
40
40
  `)+o.raw,l.text+=`
41
41
  `+o.text,this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
42
42
  `)?"":`
43
43
  `)+o.raw,l.text+=`
44
- `+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,c=e.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(s=e.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
44
+ `+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,c=e.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.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&&(o=this.tokenizer.paragraph(s))){let l=n.at(-1);a&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
45
45
  `)?"":`
46
46
  `)+o.raw,l.text+=`
47
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),r=s.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
47
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),a=s.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
48
48
  `)?"":`
49
49
  `)+o.raw,l.text+=`
50
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);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 i=r[0],o=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Cn(i.slice(o+1,-1))))&&!(o>1&&this.linkInText(i.slice(1,o-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=d=>{let p=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Cn(d.slice(p+1,-1))))return d;if(p>1&&d.charAt(0)!=="!"){let m=d.slice(1,p-1);if(this.linkInText(m))return"["+m.replace(l,c)+"]["+"a".repeat(d.length-p-2)+"]"}return"["+"a".repeat(d.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,d)=>{let p=d?d.length:0;return l.slice(0,p)+"["+"a".repeat(l.length-p-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,o="",s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(o=""),i=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.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 d=n.at(-1);l.type==="text"&&d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(e,r,o)){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,o)){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 d=1/0,p=e.slice(1),m;this.options.extensions.startInline.forEach(f=>{m=f.call({lexer:this},p),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(c=e.substring(0,d+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),i=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=l.raw,d.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)}},En=class{options;parser;constructor(t){this.options=t||vt}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(_e.notSpaceStart)?.[0],i=t?t.replace(_e.endingNewline,"")+`
51
- `:"";return r?'<pre><code class="language-'+Le(r)+'">'+(n?i:Le(i,!0))+`</code></pre>
50
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);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 a of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(a[0])&&e.charAt(a.index-1)!=="!")return!0;for(let a of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=a[0],o=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Cn(i.slice(o+1,-1))))&&!(o>1&&this.linkInText(i.slice(1,o-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let a=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,c=u=>{let f=u.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Cn(u.slice(f+1,-1))))return u;if(f>1&&u.charAt(0)!=="!"){let m=u.slice(1,f-1);if(this.linkInText(m))return"["+m.replace(l,c)+"]["+"a".repeat(u.length-f-2)+"]"}return"["+"a".repeat(u.length-2)+"]"};a=a.replace(l,c)}a=a.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),a=a.replace(this.tokenizer.rules.inline.blockSkip,(l,c,u)=>{let f=u?u.length:0;return l.slice(0,f)+"["+"a".repeat(l.length-f-2)+"]"}),a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let i=!1,o="",s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(o=""),i=!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,a,o)){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,a,o)){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,f=e.slice(1),m;this.options.extensions.startInline.forEach(d=>{m=d.call({lexer:this},f),typeof m=="number"&&m>=0&&(u=Math.min(u,m))}),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)!=="_"&&(o=l.raw.slice(-1)),i=!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)}},Pn=class{options;parser;constructor(t){this.options=t||yt}space(t){return""}code({text:t,lang:e,escaped:n}){let a=(e||"").match(Se.notSpaceStart)?.[0],i=t?t.replace(Se.endingNewline,"")+`
51
+ `:"";return a?'<pre><code class="language-'+Le(a)+'">'+(n?i:Le(i,!0))+`</code></pre>
52
52
  `:"<pre><code>"+(n?i:Le(i,!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}>
56
56
  `}hr(t){return`<hr>
57
- `}list(t){let e=t.ordered,n=t.start,r="";for(let s=0;s<t.items.length;s++){let l=t.items[s];r+=this.listitem(l)}let i=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
58
- `+r+"</"+i+`>
57
+ `}list(t){let e=t.ordered,n=t.start,a="";for(let s=0;s<t.items.length;s++){let l=t.items[s];a+=this.listitem(l)}let i=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
58
+ `+a+"</"+i+`>
59
59
  `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
60
60
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
61
- `}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let r="";for(let i=0;i<t.rows.length;i++){let o=t.rows[i];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
61
+ `}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let a="";for(let i=0;i<t.rows.length;i++){let o=t.rows[i];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
62
62
  <thead>
63
63
  `+e+`</thead>
64
- `+r+`</table>
64
+ `+a+`</table>
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>${Le(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:i}){let o=i?Le(n,!0):this.parser.parseInline(r),s=Ti(t);if(s===null)return o;t=Le(s,i);let l='<a href="'+t+'"';return e&&(l+=' title="'+Le(e)+'"'),l+=">"+o+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ti(t);if(i===null)return Le(n);t=i;let o=`<img src="${Le(t)}" alt="${Le(n)}"`;return e&&(o+=` title="${Le(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Le(t.text)}},Or=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}},Be=class Pr{options;renderer;textRenderer;constructor(e){this.options=e||vt,this.options.renderer=this.options.renderer||new En,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Or}static parse(e,n){return new Pr(n).parse(e)}static parseInline(e,n){return new Pr(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,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 o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let s='Token with "'+o.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 i=0;i<e.length;i++){let o=e[i];if(this.options.extensions?.renderers?.[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let s=o;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}},Jt=class{options;block;constructor(t){this.options=t||vt}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?Oe.lex:Oe.lexInline}provideParser(t=this.block){return t?Be.parse:Be.parseInline}},Br=class{defaults=Rr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Be;Renderer=En;TextRenderer=Or;Lexer=Oe;Tokenizer=Tn;Hooks=Jt;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 i=r;for(let o of i.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of i.rows)for(let s of o)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let s=i[o].flat(1/0);n=n.concat(this.walkTokens(s,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.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(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=e.renderers[i.name];o?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[i.level];o?o.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){let i=this.defaults.renderer||new En(this.defaults);for(let o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=n.renderer[s],c=i[s];i[s]=(...d)=>{let p=l.apply(i,d);return p===!1&&(p=c.apply(i,d)),p||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Tn(this.defaults);for(let o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=n.tokenizer[s],c=i[s];i[s]=(...d)=>{let p=l.apply(i,d);return p===!1&&(p=c.apply(i,d)),p}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Jt;for(let o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=n.hooks[s],c=i[s];Jt.passThroughHooks.has(o)?i[s]=d=>{if(this.defaults.async&&Jt.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await l.call(i,d);return c.call(i,m)})();let p=l.call(i,d);return c.call(i,p)}:i[s]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await l.apply(i,d);return m===!1&&(m=await c.apply(i,d)),m})();let p=l.apply(i,d);return p===!1&&(p=c.apply(i,d)),p}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Oe.lex(t,e??this.defaults)}parser(t,e){return Be.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,l=await(i.hooks?await i.hooks.provideLexer(t):t?Oe.lex:Oe.lexInline)(s,i),c=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let d=await(i.hooks?await i.hooks.provideParser(t):t?Be.parse:Be.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(d):d})().catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(t):t?Oe.lex:Oe.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(t):t?Be.parse:Be.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return o(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>"+Le(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},xt=new Br;function ne(t,e){return xt.parse(t,e)}ne.options=ne.setOptions=function(t){return xt.setOptions(t),ne.defaults=xt.defaults,Li(ne.defaults),ne};ne.getDefaults=Rr;ne.defaults=vt;function td(...t){return xt.use(...t),ne.defaults=xt.defaults,Li(ne.defaults),ne}ne.use=td;ne.walkTokens=function(t,e){return xt.walkTokens(t,e)};ne.parseInline=xt.parseInline;ne.Parser=Be;ne.parser=Be.parse;ne.Renderer=En;ne.TextRenderer=Or;ne.Lexer=Oe;ne.lexer=Oe.lex;ne.Tokenizer=Tn;ne.Hooks=Jt;ne.parse=ne;var rf=ne.options,af=ne.setOptions,of=ne.walkTokens,sf=ne.parseInline;var lf=Be.parse,cf=Oe.lex;var Nn,te,Xi,nd,lt,qi,ji,Vi,Fr,Rn,Qt,Ki,Hr,$r,Ur,Ji,Ln={},Dn=[],rd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,On=Array.isArray;function Ge(t,e){for(var n in e)t[n]=e[n];return t}function Wr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ad(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Nn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Mn(t,s,r,i,null)}function Mn(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Xi,__i:-1,__u:0};return i==null&&te.vnode!=null&&te.vnode(o),o}function O(t){return t.children}function In(t,e){this.props=t,this.context=e}function yt(t,e){if(e==null)return t.__?yt(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"?yt(t):null}function id(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],i=[],o=Ge({},e);o.__v=e.__v+1,te.vnode&&te.vnode(o),Xr(t.__P,o,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??yt(e),!!(32&e.__u),i),o.__v=e.__v,o.__.__k[o.__i]=o,eo(r,o,i),e.__e=e.__=null,o.__e!=n&&Yi(o)}}function Yi(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}),Yi(t)}function qr(t){(!t.__d&&(t.__d=!0)&&lt.push(t)&&!zn.__r++||qi!=te.debounceRendering)&&((qi=te.debounceRendering)||ji)(zn)}function zn(){try{for(var t,e=1;lt.length;)lt.length>e&&lt.sort(Vi),t=lt.shift(),e=lt.length,id(t)}finally{lt.length=zn.__r=0}}function Gi(t,e,n,r,i,o,s,l,c,d,p){var m,f,g,h,v,y,A=r&&r.__k||Dn,x=e.length;for(c=od(n,e,A,c,x),m=0;m<x;m++)(g=n.__k[m])!=null&&(f=g.__i!=-1&&A[g.__i]||Ln,g.__i=m,y=Xr(t,g,f,i,o,s,l,c,d,p),h=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&jr(f.ref,null,g),p.push(g.ref,g.__c||h,g)),v==null&&h!=null&&(v=h),4&g.__u?(c=Zi(g,c,t),f.__e&&(f.__e=null)):typeof g.type=="function"&&y!==void 0?c=y:h&&(c=h.nextSibling),g.__u&=-7);return n.__e=v,c}function od(t,e,n,r,i){var o,s,l,c,d,p=n.length,m=p,f=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[o]=Mn(null,s,null,null,null):On(s)?s=t.__k[o]=Mn(O,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[o]=Mn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[o]=s,c=o+f,s.__=t,s.__b=t.__b+1,l=null,(d=s.__i=sd(s,n,c,m))!=-1&&(m--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(i>p?f--:i<p&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?f--:d==c+1?f++:(d>c?f--:f++,s.__u|=4))):t.__k[o]=null;if(m)for(o=0;o<p;o++)(l=n[o])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=yt(l)),no(l,l));return r}function Zi(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Zi(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=yt(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function sd(t,e,n,r){var i,o,s,l=t.key,c=t.type,d=e[n],p=d!=null&&(2&d.__u)==0;if(d===null&&l==null||p&&l==d.key&&c==d.type)return n;if(r>(p?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((d=e[s=i>=0?i--:o++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function Hi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||rd.test(e)?n:n+"px"}function Pn(t,e,n,r,i){var o,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||Hi(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Hi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ki,"$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+o]=n,n?r?n[Qt]=r[Qt]:(n[Qt]=Hr,t.addEventListener(e,o?Ur:$r,o)):t.removeEventListener(e,o?Ur:$r,o);else{if(i=="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 Wi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Rn]==null)e[Rn]=Hr++;else if(e[Rn]<n[Qt])return;return n(te.event?te.event(e):e)}}}function Xr(t,e,n,r,i,o,s,l,c,d){var p,m,f,g,h,v,y,A,x,w,T,L,$,X,U,H,ee=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=e.__e=n.__e]),(p=te.__b)&&p(e);e:if(typeof ee=="function"){m=s.length;try{if(x=e.props,w=ee.prototype&&ee.prototype.render,T=(p=ee.contextType)&&r[p.__c],L=p?T?T.props.value:p.__:r,n.__c?A=(f=e.__c=n.__c).__=f.__E:(w?e.__c=f=new ee(x,L):(e.__c=f=new In(x,L),f.constructor=ee,f.render=cd),T&&T.sub(f),f.state||(f.state={}),f.__n=r,g=f.__d=!0,f.__h=[],f._sb=[]),w&&f.__s==null&&(f.__s=f.state),w&&ee.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Ge({},f.__s)),Ge(f.__s,ee.getDerivedStateFromProps(x,f.__s))),h=f.props,v=f.state,f.__v=e,g)w&&ee.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),w&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(w&&ee.getDerivedStateFromProps==null&&x!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,L),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,L)===!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(z){z&&(z.__=e)}),Dn.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f),l=yt(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,L),w&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,v,y)})}if(f.context=L,f.props=x,f.__P=t,f.__e=!1,$=te.__r,X=0,w)f.state=f.__s,f.__d=!1,$&&$(e),p=f.render(f.props,f.state,f.context),Dn.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,$&&$(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++X<25);f.state=f.__s,f.getChildContext!=null&&(r=Ge(Ge({},r),f.getChildContext())),w&&!g&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(h,v)),U=p!=null&&p.type===O&&p.key==null?to(p.props.children):p,l=Gi(t,On(U)?U:[U],e,n,r,i,o,s,l,c,d),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),A&&(f.__E=f.__=null)}catch(z){if(s.length=m,e.__v=null,c||o!=null){if(z.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;o!=null&&(o[o.indexOf(l)]=null),e.__e=l}else if(o!=null)for(H=o.length;H--;)Wr(o[H])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),z.then||Qi(e),te.__e(z,e,n)}}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=ld(n.__e,e,n,r,i,o,s,c,d);return(p=te.diffed)&&p(e),128&e.__u?void 0:l}function Qi(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Qi))}function eo(t,e,n){for(var r=0;r<n.length;r++)jr(n[r],n[++r],n[++r]);te.__c&&te.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){te.__e(o,i.__v)}})}function to(t){return typeof t!="object"||t==null||t.__b>0?t:On(t)?t.map(to):t.constructor!==void 0?null:Ge({},t)}function ld(t,e,n,r,i,o,s,l,c){var d,p,m,f,g,h,v,y=n.props||Ln,A=e.props,x=e.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((g=o[d])&&"setAttribute"in g==!!x&&(x?g.localName==x:g.nodeType==3)){t=g,o[d]=null;break}}if(t==null){if(x==null)return document.createTextNode(A);t=document.createElementNS(i,x,A.is&&A),l&&(te.__m&&te.__m(e,o),l=!1),o=null}if(x==null)y===A||l&&t.data==A||(t.data=A);else{if(o=x=="textarea"&&A.defaultValue!=null?null:o&&Nn.call(t.childNodes),!l&&o!=null)for(y={},d=0;d<t.attributes.length;d++)y[(g=t.attributes[d]).name]=g.value;for(d in y)g=y[d],d=="dangerouslySetInnerHTML"?m=g:d=="children"||d in A||d=="value"&&"defaultValue"in A||d=="checked"&&"defaultChecked"in A||Pn(t,d,null,g,i);for(d in A)g=A[d],d=="children"?f=g:d=="dangerouslySetInnerHTML"?p=g:d=="value"?h=g:d=="checked"?v=g:l&&typeof g!="function"||y[d]===g||Pn(t,d,g,y[d],i);if(p)l||m&&(p.__html==m.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(m&&(t.innerHTML=""),Gi(e.type=="template"?t.content:t,On(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&yt(n,0),l,c),o!=null)for(d=o.length;d--;)Wr(o[d]);l&&x!="textarea"||(d="value",x=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[d]||x=="progress"&&!h||x=="option"&&h!=y[d])&&Pn(t,d,h,y[d],i),d="checked",v!=null&&v!=t[d]&&Pn(t,d,v,y[d],i))}return t}function jr(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(i){te.__e(i,n)}}function no(t,e,n){var r,i;if(te.unmount&&te.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||jr(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){te.__e(o,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&no(r[i],e,n||typeof t.type!="function");n||Wr(t.__e),t.__c=t.__=t.__e=void 0}function cd(t,e,n){return this.constructor(t,n)}function ct(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),te.__&&te.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],Xr(e,t=(!r&&n||e).__k=ad(O,null,[t]),i||Ln,Ln,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Nn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),eo(o,t,s),t.props.children=null}function ro(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,qr(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+Ji++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}Nn=Dn.slice,te={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(l){t=l}throw t}},Xi=0,nd=function(t){return t!=null&&t.constructor===void 0},In.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ge({},this.state),typeof t=="function"&&(t=t(Ge({},n),this.props)),t&&Ge(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),qr(this))},In.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),qr(this))},In.prototype.render=O,lt=[],ji=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vi=function(t,e){return t.__v.__b-e.__v.__b},zn.__r=0,Fr=Math.random().toString(8),Rn="__d"+Fr,Qt="__a"+Fr,Ki=/(PointerCapture)$|Capture$/i,Hr=0,$r=Wi(!1),Ur=Wi(!0),Ji=0;var kt,ce,Vr,ao,en=0,po=[],me=te,io=me.__b,oo=me.__r,so=me.diffed,lo=me.__c,co=me.unmount,uo=me.__;function tn(t,e){me.__h&&me.__h(ce,t,en||e),en=0;var n=ce.__H||(ce.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _(t){return en=1,dd(ho,t)}function dd(t,e,n){var r=tn(kt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):ho(void 0,e),function(l){var c=r.__N?r.__N[0]:r.__[0],d=r.t(c,l);c!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=ce,!ce.__f)){var i=function(l,c,d){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==l;if(r.__c.__H.__.some(function(g){if(g.__N){p=!0;var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(m=!0)}}),o){var f=o.call(this,l,c,d);return p?f||m:f}return!p||m};ce.__f=!0;var o=ce.shouldComponentUpdate,s=ce.componentWillUpdate;ce.componentWillUpdate=function(l,c,d){if(this.__e){var p=o;o=void 0,i(l,c,d),o=p}s&&s.call(this,l,c,d)},ce.shouldComponentUpdate=i}return r.__N||r.__}function V(t,e){var n=tn(kt++,3);!me.__s&&Jr(n.__H,e)&&(n.__=t,n.u=e,ce.__H.__h.push(n))}function mo(t,e){var n=tn(kt++,4);!me.__s&&Jr(n.__H,e)&&(n.__=t,n.u=e,ce.__h.push(n))}function K(t){return en=5,We(function(){return{current:t}},[])}function We(t,e){var n=tn(kt++,7);return Jr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function dt(t,e){return en=8,We(function(){return t},e)}function go(t){var e=ce.context[t.__c],n=tn(kt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(ce)),e.props.value):t.__}function ud(){for(var t;t=po.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Bn),e.__h.some(Kr),e.__h=[]}catch(n){e.__h=[],me.__e(n,t.__v)}}}me.__b=function(t){ce=null,io&&io(t)},me.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),uo&&uo(t,e)},me.__r=function(t){oo&&oo(t),kt=0;var e=(ce=t.__c).__H;e&&(Vr===ce?(e.__h=[],ce.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Bn),e.__h.some(Kr),e.__h=[],kt=0)),Vr=ce},me.diffed=function(t){so&&so(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(po.push(e)!==1&&ao===me.requestAnimationFrame||((ao=me.requestAnimationFrame)||fd)(ud)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Vr=ce=null},me.__c=function(t,e){e.some(function(n){try{n.__h.some(Bn),n.__h=n.__h.filter(function(r){return!r.__||Kr(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],me.__e(r,n.__v)}}),lo&&lo(t,e)},me.unmount=function(t){co&&co(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Bn(r)}catch(i){e=i}}),n.__H=void 0,e&&me.__e(e,n.__v))};var fo=typeof requestAnimationFrame=="function";function fd(t){var e,n=function(){clearTimeout(r),fo&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);fo&&(e=requestAnimationFrame(n))}function Bn(t){var e=ce,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),ce=e}function Kr(t){var e=ce;t.__c=t.__(),ce=e}function Jr(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function ho(t,e){return typeof e=="function"?e(t):e}var J=()=>typeof window<"u"&&window.tangu||{};function bo(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,i=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:i,transport:typeof t?.error=="string"?t.error:null}}var Yr=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function M(t,e={}){let n=J().cloudFetch;if(!n)return Yr("no_bridge");try{return bo(await n({path:t,...e}))}catch(r){return Yr(String(r?.message||r))}}async function Fn(t,e){if(!t)return e();try{return bo(await t())}catch(n){return Yr(String(n?.message||n))}}var wt=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Fe(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function $t(t,e,n){let r=J().cloudInvoke;if(!r)return!1;let i=t==="membership"&&e?n?[t,e,n]:[t,e]:[t];try{return!!(await r("auth:openPayCenter",...i))?.ok}catch{return!1}}async function _t(t){let e=J().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var pd=0;function a(t,e,n,r,i,o){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 d={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pd,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return te.vnode&&te.vnode(d),d}var md={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",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M3 12h18 M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z",lock:"M6 11h12v9H6z M8.5 11V8a3.5 3.5 0 0 1 7 0v3",palette:"M12 3a9 9 0 0 0 0 18c1.2 0 2-.8 2-1.9 0-.5-.2-.9-.5-1.3-.3-.4-.5-.8-.5-1.3 0-1 .8-1.8 1.8-1.8H17a4 4 0 0 0 4-4c0-4.3-4-7.7-9-7.7Z M7.5 12.5h.01 M9 8.5h.01 M14 7.5h.01",calendar:"M5 5h14v15H5z M5 10h14 M9 3v4 M15 3v4",link:"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1 M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1",flame:"M12 21a6 6 0 0 0 6-6c0-2.5-1.4-4.4-3-6-.3 1.5-1 2.5-2 3 .3-3-1-6-3.5-8 .2 3-1 4.8-2.2 6.3C6.4 11.5 6 13.2 6 15a6 6 0 0 0 6 6Z",trophy:"M8 4h8v6a4 4 0 0 1-8 0V4Z M8 6H5v1a3 3 0 0 0 3 3 M16 6h3v1a3 3 0 0 1-3 3 M12 14v4 M8.5 20h7",sprout:"M12 20v-8 M12 12c0-3-2-5-6-5 0 3.5 2 5 6 5Z M12 14c0-3 2-5 6-5 0 3.5-2 5-6 5Z",eye:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z M12 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",download:"M12 4v11 M7.5 11l4.5 4.5 4.5-4.5 M5 20h14",up:"M12 19V5 M6 11l6-6 6 6",down:"M12 5v14 M6 13l6 6 6-6",sparkles:"M12 4l1.8 4.7 4.7 1.8-4.7 1.8L12 17l-1.8-4.7-4.7-1.8 4.7-1.8L12 4Z M18.5 15.5v4 M16.5 17.5h4",bot:"M6 9h12v10H6z M12 9V5 M12 4.5h.01 M9.5 13.5h.01 M14.5 13.5h.01 M3.5 13v3 M20.5 13v3",box:"M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3Z M4 7.5l8 4.5 8-4.5 M12 12v9",grid:"M4 4h7v7H4z M13 4h7v7h-7z M4 13h7v7H4z M13 13h7v7h-7z",note:"M6 3h9l4 4v14H6z M15 3v4h4 M9 12h6 M9 16h4"};function P({name:t,size:e=14,class:n}){return a("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:a("path",{d:md[t]})})}function St({size:t=12}){return a("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:a("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var gd={"page.account":"\u8D26\u53F7","page.profile":"\u4E2A\u4EBA\u4E3B\u9875","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","profile.unsupported":"\u8FD9\u4E2A\u670D\u52A1\u7AEF\u8FD8\u6CA1\u6709\u4E2A\u4EBA\u4E3B\u9875\u529F\u80FD","profile.state.private":"\u4EC5\u81EA\u5DF1\u53EF\u89C1","profile.state.public":"\u5DF2\u516C\u5F00","profile.state.privateDesc":"\u516C\u5F00\u540E\uFF0C\u4EFB\u4F55\u4EBA\u6253\u5F00\u5730\u5740\u90FD\u80FD\u770B\u5230\u4F60\u7684\u4E3B\u9875\uFF0C\u4E0D\u9700\u8981\u767B\u5F55","profile.state.publicDesc":"\u4EFB\u4F55\u4EBA\u6253\u5F00\u516C\u5F00\u5730\u5740\u90FD\u80FD\u770B\u5230\uFF0C\u4E0D\u9700\u8981\u767B\u5F55","profile.decorate":"\u88C5\u9970","profile.publish":"\u516C\u5F00\u4E3B\u9875","profile.makePrivate":"\u8BBE\u4E3A\u79C1\u6709","profile.address":"\u516C\u5F00\u5730\u5740","profile.copyLink":"\u590D\u5236\u94FE\u63A5","profile.openPublic":"\u67E5\u770B\u516C\u5F00\u9875","profile.nowPublic":"\u4E3B\u9875\u5DF2\u516C\u5F00","profile.nowPrivate":"\u4E3B\u9875\u5DF2\u8BBE\u4E3A\u79C1\u6709\uFF0C\u516C\u5F00\u5730\u5740\u4E0D\u518D\u80FD\u6253\u5F00","profile.bio":"\u7B80\u4ECB","profile.bioPlaceholder":"\u5199\u4E00\u53E5\u7B80\u4ECB","profile.linkAdd":"\u6DFB\u52A0\u94FE\u63A5","profile.linkRemove":"\u79FB\u9664\u94FE\u63A5","profile.linkInvalid":"\u94FE\u63A5\u8981\u4EE5 http:// \u6216 https:// \u5F00\u5934\uFF0C\u6216\u76F4\u63A5\u5199\u57DF\u540D","profile.joined":"{date}\u52A0\u5165","profile.stat.tokens":"\u7D2F\u8BA1 Token","profile.stat.activeDays":"\u6D3B\u8DC3\u5929\u6570","profile.stat.longest":"\u6700\u957F\u8FDE\u7EED","profile.stat.current":"\u5F53\u524D\u8FDE\u7EED","profile.stat.installs":"\u4F5C\u54C1\u88AB\u5B89\u88C5","profile.unit.days":"\u5929","profile.works":"\u7CBE\u9009\u4F5C\u54C1","profile.worksPick":"\u9009\u62E9","profile.worksEmpty":"\u8FD8\u6CA1\u6709\u4E0A\u67B6\u7684\u4F5C\u54C1\u3002\u4E0A\u67B6\u5230\u5546\u5E97\u6216\u53D1\u5E03\u6210\u7F51\u9875\u5E94\u7528\u540E\uFF0C\u53EF\u4EE5\u653E\u5230\u8FD9\u91CC\u3002","profile.worksNone":"\u8FD8\u6CA1\u6709\u53EF\u4EE5\u653E\u4E0A\u4E3B\u9875\u7684\u4F5C\u54C1\u3002\u4F5C\u54C1\u4E0A\u67B6\u5230\u5546\u5E97\u3001\u6216\u53D1\u5E03\u6210\u7F51\u9875\u5E94\u7528\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002","profile.worksPicked":"\u5DF2\u9009 {n} / {max} \u4EF6","profile.worksAuto":"\u4E0D\u9009\u7684\u8BDD\uFF0C\u6309\u5B89\u88C5\u91CF\u81EA\u52A8\u53D6\u524D\u51E0\u4EF6","profile.goSubmit":"\u53BB\u6295\u7A3F","profile.workInstalls":"{n} \u6B21\u5B89\u88C5","profile.workVisits":"{n} \u6B21\u8BBF\u95EE","profile.work.skill":"\u6280\u80FD","profile.work.agent":"Agent","profile.work.plugin":"\u63D2\u4EF6","profile.work.space":"Space","profile.work.theme":"\u4E3B\u9898","profile.work.note":"\u7B14\u8BB0\u63D2\u4EF6","profile.work.webapp":"\u7F51\u9875\u5E94\u7528","profile.activity":"\u6D3B\u52A8","profile.activityDays":"\u8FC7\u53BB\u4E00\u5E74\u6709 {n} \u5929\u5728\u7528","profile.less":"\u5C11","profile.more":"\u591A","profile.badges":"\u5FBD\u7AE0","profile.badgesEmpty":"\u8FD8\u6CA1\u6709\u5FBD\u7AE0\u3002\u8FDE\u7EED\u4F7F\u7528\u3001\u4E0A\u67B6\u4F5C\u54C1\u3001\u9080\u8BF7\u670B\u53CB\u90FD\u4F1A\u70B9\u4EAE\u3002","profile.badge.early":"\u65E9\u671F\u7528\u6237","profile.badge.streak":"\u8FDE\u7EED 30 \u5929","profile.badge.author":"\u4F5C\u8005","profile.badge.inviter":"\u9080\u8BF7\u8FBE\u4EBA","profile.badge.event":"\u6D3B\u52A8\u7EAA\u5FF5","profile.badgeSub.early":"{value} \u5E74\u52A0\u5165","profile.badgeSub.streak":"\u6700\u957F\u8FDE\u7EED {value} \u5929","profile.badgeSub.author":"\u4E0A\u67B6\u4E86 {value} \u4EF6\u4F5C\u54C1","profile.badgeSub.inviter":"\u9080\u8BF7\u4E86 {value} \u4F4D\u670B\u53CB","profile.badgeSub.event":"\u53C2\u52A0\u8FC7 Forsion \u7684\u6D3B\u52A8{value}","profile.insights":"\u6D1E\u5BDF","profile.insightsEmpty":"\u7528\u5F97\u8FD8\u4E0D\u591F\u591A\uFF0C\u8FC7\u51E0\u5929\u518D\u6765\u770B\u3002","profile.insightModel":"\u6700\u5E38\u7528\u6A21\u578B","profile.insightHours":"\u6700\u6D3B\u8DC3\u65F6\u6BB5","profile.deco.skin":"\u516C\u5F00\u9875\u7684\u914D\u8272","profile.deco.mode":"\u516C\u5F00\u9875\u7684\u660E\u6697","profile.deco.publicHint":"\u8FD9\u4E24\u9879\u53EA\u7BA1\u8BBF\u5BA2\u5728\u516C\u5F00\u9875\u4E0A\u770B\u5230\u7684\u3002\u5728\u8FD9\u91CC\uFF0C\u4E3B\u9875\u8DDF Forsion \u5F53\u524D\u7684\u4E3B\u9898\u8D70\u3002","profile.deco.cover":"\u5C01\u9762","profile.deco.frame":"\u5934\u50CF\u6846","profile.deco.modules":"\u6A21\u5757","profile.skin.cream":"\u7ECF\u5178","profile.skin.coral":"\u73CA\u745A","profile.skin.teal":"\u67D4\u9752","profile.skin.lavender":"\u85B0\u8863\u8349","profile.mode.auto":"\u8DDF\u968F\u8BBF\u5BA2","profile.mode.light":"\u6D45\u8272","profile.mode.dark":"\u6DF1\u8272","profile.cover.none":"\u65E0","profile.cover.mist":"\u6668\u96FE","profile.cover.contour":"\u7B49\u9AD8\u7EBF","profile.cover.dots":"\u7F51\u70B9","profile.frame.none":"\u65E0","profile.frame.ring":"\u7EC6\u73AF","profile.frame.pro":"\u4F1A\u5458\u73AF","profile.frameProHint":"\u4F1A\u5458\u73AF\u662F\u4ED8\u8D39\u4F1A\u5458\u4E13\u5C5E\u3002","profile.col.show":"\u663E\u793A","profile.col.public":"\u516C\u5F00","profile.moveUp":"\u4E0A\u79FB","profile.moveDown":"\u4E0B\u79FB","profile.modulesHint":"\u300C\u663E\u793A\u300D\u51B3\u5B9A\u4E3B\u9875\u4E0A\u6709\u6CA1\u6709\u8FD9\u4E00\u5757\uFF1B\u300C\u516C\u5F00\u300D\u51B3\u5B9A\u8BBF\u5BA2\u80FD\u4E0D\u80FD\u770B\u5230\uFF0C\u4E3B\u9875\u516C\u5F00\u540E\u624D\u8D77\u4F5C\u7528\u3002","profile.mod.stats":"\u6570\u636E","profile.mod.works":"\u7CBE\u9009\u4F5C\u54C1","profile.mod.activity":"\u6D3B\u52A8","profile.mod.badges":"\u5FBD\u7AE0","profile.mod.insights":"\u6D1E\u5BDF","profile.modDesc.stats":"\u7D2F\u8BA1 Token\u3001\u6D3B\u8DC3\u5929\u6570\u3001\u8FDE\u7EED\u5929\u6570\u3001\u4F5C\u54C1\u5B89\u88C5\u91CF","profile.modDesc.works":"\u4F60\u4E0A\u67B6\u7684\u4F5C\u54C1\uFF0C\u6700\u591A 6 \u4EF6","profile.modDesc.activity":"\u8FC7\u53BB\u4E00\u5E74\u6BCF\u5929\u7528\u6CA1\u7528\u3001\u7528\u5F97\u591A\u4E0D\u591A\uFF08\u53EA\u6709\u6DF1\u6D45\uFF0C\u6CA1\u6709\u5177\u4F53\u6570\u5B57\uFF09","profile.modDesc.badges":"\u52A0\u5165\u5E74\u4EFD\u3001\u8FDE\u7EED\u5929\u6570\u3001\u4E0A\u67B6\u3001\u9080\u8BF7\u3001\u6D3B\u52A8","profile.modDesc.insights":"\u6700\u5E38\u7528\u7684\u6A21\u578B\u3001\u6700\u6D3B\u8DC3\u7684\u65F6\u6BB5","profile.publishDesc":"\u516C\u5F00\u540E\uFF0C\u4EFB\u4F55\u4EBA\u6253\u5F00\u8FD9\u4E2A\u5730\u5740\u90FD\u80FD\u770B\u5230\u4F60\u7684\u4E3B\u9875\uFF0C\u4E0D\u9700\u8981\u767B\u5F55\u3002\u4E0B\u9762\u6BCF\u4E00\u5757\u53EF\u4EE5\u5355\u72EC\u51B3\u5B9A\u7ED9\u4E0D\u7ED9\u8BBF\u5BA2\u770B\u3002","profile.publishNever":"\u5934\u50CF\u3001\u6635\u79F0\u3001\u7528\u6237\u540D\u3001\u7B80\u4ECB\u548C\u94FE\u63A5\u4F1A\u4E00\u8D77\u516C\u5F00\u3002\u90AE\u7BB1\u3001\u624B\u673A\u53F7\u3001\u4F1A\u5458\u5230\u671F\u65E5\u3001\u79EF\u5206\u548C\u989D\u5EA6\u4E0D\u4F1A\u51FA\u73B0\u5728\u4E3B\u9875\u4E0A\u3002","profile.publishConfirm":"\u516C\u5F00","profile.blocked.machineUsername":"\u4F60\u73B0\u5728\u7684\u7528\u6237\u540D\u662F\u7CFB\u7EDF\u751F\u6210\u7684\uFF0C\u91CC\u9762\u5E26\u7740\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u7684\u4E00\u90E8\u5206\uFF0C\u516C\u5F00\u4F1A\u628A\u5B83\u9732\u51FA\u53BB\u3002\u5148\u5230\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7684\u300C\u8D26\u53F7\u300D\u9875\u6539\u4E00\u4E2A\u7528\u6237\u540D\uFF08\u6BCF\u4E2A\u8D26\u53F7\u53EF\u4EE5\u6539\u4E00\u6B21\uFF09\uFF0C\u518D\u56DE\u6765\u516C\u5F00\u3002","profile.blocked.publishBlocked":"\u8FD9\u4E2A\u4E3B\u9875\u5DF2\u88AB\u7BA1\u7406\u5458\u505C\u6B62\u516C\u5F00\u3002\u6709\u7591\u95EE\u8BF7\u901A\u8FC7\u300C\u53CD\u9988\u300D\u8054\u7CFB\u6211\u4EEC\u3002","profile.goRename":"\u53BB\u6539\u7528\u6237\u540D","profile.invalid":"\u8FD9\u9879\u5185\u5BB9\u6CA1\u80FD\u4FDD\u5B58\uFF0C\u8BF7\u68C0\u67E5\u540E\u518D\u8BD5"},hd={"page.account":"Account","page.profile":"Profile","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","profile.unsupported":"This server doesn't have profiles yet","profile.state.private":"Only you can see this","profile.state.public":"Public","profile.state.privateDesc":"Once public, anyone with the address can see your profile without signing in","profile.state.publicDesc":"Anyone with the public address can see it without signing in","profile.decorate":"Decorate","profile.publish":"Make public","profile.makePrivate":"Make private","profile.address":"Public address","profile.copyLink":"Copy link","profile.openPublic":"View public page","profile.nowPublic":"Your profile is now public","profile.nowPrivate":"Your profile is private. The public address no longer opens","profile.bio":"Bio","profile.bioPlaceholder":"Add a short bio","profile.linkAdd":"Add a link","profile.linkRemove":"Remove link","profile.linkInvalid":"Links must start with http:// or https://, or be a plain domain","profile.joined":"Joined {date}","profile.stat.tokens":"Total tokens","profile.stat.activeDays":"Active days","profile.stat.longest":"Longest streak","profile.stat.current":"Current streak","profile.stat.installs":"Work installs","profile.unit.days":"d","profile.works":"Featured works","profile.worksPick":"Choose","profile.worksEmpty":"No published works yet. Publish to the store or as a web app, and they can go here.","profile.worksNone":"Nothing to feature yet. Works appear here once they are in the store or published as a web app.","profile.worksPicked":"{n} of {max} selected","profile.worksAuto":"With none selected, the most installed ones are shown","profile.goSubmit":"Submit a work","profile.workInstalls":"{n} installs","profile.workVisits":"{n} visits","profile.work.skill":"Skill","profile.work.agent":"Agent","profile.work.plugin":"Plugin","profile.work.space":"Space","profile.work.theme":"Theme","profile.work.note":"Notes plugin","profile.work.webapp":"Web app","profile.activity":"Activity","profile.activityDays":"Active on {n} days in the past year","profile.less":"Less","profile.more":"More","profile.badges":"Badges","profile.badgesEmpty":"No badges yet. Streaks, published works and invites all earn one.","profile.badge.early":"Early user","profile.badge.streak":"30-day streak","profile.badge.author":"Author","profile.badge.inviter":"Top inviter","profile.badge.event":"Event keepsake","profile.badgeSub.early":"Joined in {value}","profile.badgeSub.streak":"Longest streak: {value} days","profile.badgeSub.author":"{value} published works","profile.badgeSub.inviter":"Invited {value} friends","profile.badgeSub.event":"Took part in a Forsion event{value}","profile.insights":"Insights","profile.insightsEmpty":"Not enough usage yet. Check back in a few days.","profile.insightModel":"Most used model","profile.insightHours":"Most active hours","profile.deco.skin":"Public page color scheme","profile.deco.mode":"Public page appearance","profile.deco.publicHint":"These two only set what visitors see on the public page. Here the profile follows Forsion's current theme.","profile.deco.cover":"Cover","profile.deco.frame":"Avatar frame","profile.deco.modules":"Sections","profile.skin.cream":"Classic","profile.skin.coral":"Coral","profile.skin.teal":"Teal","profile.skin.lavender":"Lavender","profile.mode.auto":"Auto","profile.mode.light":"Light","profile.mode.dark":"Dark","profile.cover.none":"None","profile.cover.mist":"Mist","profile.cover.contour":"Contour","profile.cover.dots":"Dots","profile.frame.none":"None","profile.frame.ring":"Ring","profile.frame.pro":"Member ring","profile.frameProHint":"The member ring is for paid members.","profile.col.show":"Show","profile.col.public":"Public","profile.moveUp":"Move up","profile.moveDown":"Move down","profile.modulesHint":'"Show" decides whether a section is on your profile. "Public" decides whether visitors see it, once your profile is public.',"profile.mod.stats":"Stats","profile.mod.works":"Works","profile.mod.activity":"Activity","profile.mod.badges":"Badges","profile.mod.insights":"Insights","profile.modDesc.stats":"Total tokens, active days, streaks and installs of your works","profile.modDesc.works":"Works you have published, up to 6","profile.modDesc.activity":"Which days you were active in the past year (shades only, no numbers)","profile.modDesc.badges":"Join year, streaks, publishing, invites and events","profile.modDesc.insights":"Your most used model and most active hours","profile.publishDesc":"Once public, anyone with this address can see your profile without signing in. You decide section by section what visitors see.","profile.publishNever":"Your avatar, nickname, username, bio and links become public too. Your email, phone number, membership expiry, points and quota never appear on your profile.","profile.publishConfirm":"Make public","profile.blocked.machineUsername":"Your current username was generated by the system and contains part of your phone number or email, so making it public would expose that. Change your username on the Account page of the web account center first (each account can do this once), then come back.","profile.blocked.publishBlocked":"An administrator has stopped this profile from being public. Contact us through Feedback if you have questions.","profile.goRename":"Change username","profile.invalid":"This couldn't be saved. Check it and try again"},xo={zh:gd,en:hd},Xe=t=>t==="en"?"en":"zh";function $n(t,e,n){let r=xo[t][e]??xo.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(i,o)=>o in n?String(n[o]):i):r}var Un=t=>(e,n)=>$n(t,e,n),Ne=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var vo=`
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>${Le(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:a,autolink:i}){let o=i?Le(n,!0):this.parser.parseInline(a),s=Ei(t);if(s===null)return o;t=Le(s,i);let l='<a href="'+t+'"';return e&&(l+=' title="'+Le(e)+'"'),l+=">"+o+"</a>",l}image({href:t,title:e,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let i=Ei(t);if(i===null)return Le(n);t=i;let o=`<img src="${Le(t)}" alt="${Le(n)}"`;return e&&(o+=` title="${Le(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Le(t.text)}},Br=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}},Fe=class Rr{options;renderer;textRenderer;constructor(e){this.options=e||yt,this.options.renderer=this.options.renderer||new Pn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Br}static parse(e,n){return new Rr(n).parse(e)}static parseInline(e,n){return new Rr(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let a=0;a<e.length;a++){let i=e[a];if(this.options.extensions?.renderers?.[i.type]){let s=i,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 o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let s='Token with "'+o.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 a="";for(let i=0;i<e.length;i++){let o=e[i];if(this.options.extensions?.renderers?.[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){a+=l||"";continue}}let s=o;switch(s.type){case"escape":{a+=n.text(s);break}case"html":{a+=n.html(s);break}case"link":{a+=n.link(s);break}case"image":{a+=n.image(s);break}case"checkbox":{a+=n.checkbox(s);break}case"strong":{a+=n.strong(s);break}case"em":{a+=n.em(s);break}case"codespan":{a+=n.codespan(s);break}case"br":{a+=n.br(s);break}case"del":{a+=n.del(s);break}case"text":{a+=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 a}},Yt=class{options;block;constructor(t){this.options=t||yt}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?Be.lex:Be.lexInline}provideParser(t=this.block){return t?Fe.parse:Fe.parseInline}},Fr=class{defaults=Mr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Fe;Renderer=Pn;TextRenderer=Br;Lexer=Be;Tokenizer=Tn;Hooks=Yt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let a of t)switch(n=n.concat(e.call(this,a)),a.type){case"table":{let i=a;for(let o of i.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of i.rows)for(let s of o)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{let i=a;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=a;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let s=i[o].flat(1/0);n=n.concat(this.walkTokens(s,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=e.renderers[i.name];o?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[i.level];o?o.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),a.extensions=e),n.renderer){let i=this.defaults.renderer||new Pn(this.defaults);for(let o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=n.renderer[s],c=i[s];i[s]=(...u)=>{let f=l.apply(i,u);return f===!1&&(f=c.apply(i,u)),f||""}}a.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Tn(this.defaults);for(let o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=n.tokenizer[s],c=i[s];i[s]=(...u)=>{let f=l.apply(i,u);return f===!1&&(f=c.apply(i,u)),f}}a.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Yt;for(let o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=n.hooks[s],c=i[s];Yt.passThroughHooks.has(o)?i[s]=u=>{if(this.defaults.async&&Yt.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await l.call(i,u);return c.call(i,m)})();let f=l.call(i,u);return c.call(i,f)}:i[s]=(...u)=>{if(this.defaults.async)return(async()=>{let m=await l.apply(i,u);return m===!1&&(m=await c.apply(i,u)),m})();let f=l.apply(i,u);return f===!1&&(f=c.apply(i,u)),f}}a.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,o=n.walkTokens;a.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Be.lex(t,e??this.defaults)}parser(t,e){return Fe.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let a={...n},i={...this.defaults,...a},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,l=await(i.hooks?await i.hooks.provideLexer(t):t?Be.lex:Be.lexInline)(s,i),c=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(t):t?Fe.parse:Fe.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(t):t?Be.lex:Be.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(t):t?Fe.parse:Fe.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return o(s)}}}onError(t,e){return n=>{if(n.message+=`
69
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Le(n.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(n);throw n}}},vt=new Fr;function ne(t,e){return vt.parse(t,e)}ne.options=ne.setOptions=function(t){return vt.setOptions(t),ne.defaults=vt.defaults,zi(ne.defaults),ne};ne.getDefaults=Mr;ne.defaults=yt;function iu(...t){return vt.use(...t),ne.defaults=vt.defaults,zi(ne.defaults),ne}ne.use=iu;ne.walkTokens=function(t,e){return vt.walkTokens(t,e)};ne.parseInline=vt.parseInline;ne.Parser=Fe;ne.parser=Fe.parse;ne.Renderer=Pn;ne.TextRenderer=Br;ne.Lexer=Be;ne.lexer=Be.lex;ne.Tokenizer=Tn;ne.Hooks=Yt;ne.parse=ne;var pp=ne.options,fp=ne.setOptions,mp=ne.walkTokens,gp=ne.parseInline;var hp=Fe.parse,bp=Be.lex;var Nn,te,Vi,ou,ct,Wi,Ki,Ji,$r,Rn,en,Yi,Wr,Ur,Hr,Gi,Ln={},Dn=[],su=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,On=Array.isArray;function Ze(t,e){for(var n in e)t[n]=e[n];return t}function jr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function lu(t,e,n){var a,i,o,s={};for(o in e)o=="key"?a=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Nn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Mn(t,s,a,i,null)}function Mn(t,e,n,a,i){var o={type:t,props:e,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vi,__i:-1,__u:0};return i==null&&te.vnode!=null&&te.vnode(o),o}function N(t){return t.children}function In(t,e){this.props=t,this.context=e}function kt(t,e){if(e==null)return t.__?kt(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"?kt(t):null}function cu(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,a=[],i=[],o=Ze({},e);o.__v=e.__v+1,te.vnode&&te.vnode(o),Xr(t.__P,o,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,a,n??kt(e),!!(32&e.__u),i),o.__v=e.__v,o.__.__k[o.__i]=o,no(a,o,i),e.__e=e.__=null,o.__e!=n&&Zi(o)}}function Zi(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}),Zi(t)}function qr(t){(!t.__d&&(t.__d=!0)&&ct.push(t)&&!zn.__r++||Wi!=te.debounceRendering)&&((Wi=te.debounceRendering)||Ki)(zn)}function zn(){try{for(var t,e=1;ct.length;)ct.length>e&&ct.sort(Ji),t=ct.shift(),e=ct.length,cu(t)}finally{ct.length=zn.__r=0}}function Qi(t,e,n,a,i,o,s,l,c,u,f){var m,d,g,h,v,k,y=a&&a.__k||Dn,x=e.length;for(c=uu(n,e,y,c,x),m=0;m<x;m++)(g=n.__k[m])!=null&&(d=g.__i!=-1&&y[g.__i]||Ln,g.__i=m,k=Xr(t,g,d,i,o,s,l,c,u,f),h=g.__e,g.ref&&d.ref!=g.ref&&(d.ref&&Vr(d.ref,null,g),f.push(g.ref,g.__c||h,g)),v==null&&h!=null&&(v=h),4&g.__u?(c=eo(g,c,t),d.__e&&(d.__e=null)):typeof g.type=="function"&&k!==void 0?c=k:h&&(c=h.nextSibling),g.__u&=-7);return n.__e=v,c}function uu(t,e,n,a,i){var o,s,l,c,u,f=n.length,m=f,d=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[o]=Mn(null,s,null,null,null):On(s)?s=t.__k[o]=Mn(N,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[o]=Mn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[o]=s,c=o+d,s.__=t,s.__b=t.__b+1,l=null,(u=s.__i=du(s,n,c,m))!=-1&&(m--,(l=n[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>f?d--:i<f&&d++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?d--:u==c+1?d++:(u>c?d--:d++,s.__u|=4))):t.__k[o]=null;if(m)for(o=0;o<f;o++)(l=n[o])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=kt(l)),ao(l,l));return a}function eo(t,e,n){var a,i;if(typeof t.type=="function"){for(a=t.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=t,e=eo(a[i],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=kt(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function du(t,e,n,a){var i,o,s,l=t.key,c=t.type,u=e[n],f=u!=null&&(2&u.__u)==0;if(u===null&&l==null||f&&l==u.key&&c==u.type)return n;if(a>(f?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function ji(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||su.test(e)?n:n+"px"}function En(t,e,n,a,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)n&&e in n||ji(t.style,e,"");if(n)for(e in n)a&&n[e]==a[e]||ji(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Yi,"$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+o]=n,n?a?n[en]=a[en]:(n[en]=Wr,t.addEventListener(e,o?Hr:Ur,o)):t.removeEventListener(e,o?Hr:Ur,o);else{if(i=="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 Xi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Rn]==null)e[Rn]=Wr++;else if(e[Rn]<n[en])return;return n(te.event?te.event(e):e)}}}function Xr(t,e,n,a,i,o,s,l,c,u){var f,m,d,g,h,v,k,y,x,w,C,R,U,J,H,V,ee=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=e.__e=n.__e]),(f=te.__b)&&f(e);e:if(typeof ee=="function"){m=s.length;try{if(x=e.props,w=ee.prototype&&ee.prototype.render,C=(f=ee.contextType)&&a[f.__c],R=f?C?C.props.value:f.__:a,n.__c?y=(d=e.__c=n.__c).__=d.__E:(w?e.__c=d=new ee(x,R):(e.__c=d=new In(x,R),d.constructor=ee,d.render=fu),C&&C.sub(d),d.state||(d.state={}),d.__n=a,g=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&ee.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ze({},d.__s)),Ze(d.__s,ee.getDerivedStateFromProps(x,d.__s))),h=d.props,v=d.state,d.__v=e,g)w&&ee.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&ee.getDerivedStateFromProps==null&&x!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,R),e.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,R)===!1){e.__v!=n.__v&&(d.props=x,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(z){z&&(z.__=e)}),Dn.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d),l=kt(n);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,R),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,v,k)})}if(d.context=R,d.props=x,d.__P=t,d.__e=!1,U=te.__r,J=0,w)d.state=d.__s,d.__d=!1,U&&U(e),f=d.render(d.props,d.state,d.context),Dn.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,U&&U(e),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++J<25);d.state=d.__s,d.getChildContext!=null&&(a=Ze(Ze({},a),d.getChildContext())),w&&!g&&d.getSnapshotBeforeUpdate!=null&&(k=d.getSnapshotBeforeUpdate(h,v)),H=f!=null&&f.type===N&&f.key==null?ro(f.props.children):f,l=Qi(t,On(H)?H:[H],e,n,a,i,o,s,l,c,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),y&&(d.__E=d.__=null)}catch(z){if(s.length=m,e.__v=null,c||o!=null){if(z.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;o!=null&&(o[o.indexOf(l)]=null),e.__e=l}else if(o!=null)for(V=o.length;V--;)jr(o[V])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),z.then||to(e),te.__e(z,e,n)}}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=pu(n.__e,e,n,a,i,o,s,c,u);return(f=te.diffed)&&f(e),128&e.__u?void 0:l}function to(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(to))}function no(t,e,n){for(var a=0;a<n.length;a++)Vr(n[a],n[++a],n[++a]);te.__c&&te.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){te.__e(o,i.__v)}})}function ro(t){return typeof t!="object"||t==null||t.__b>0?t:On(t)?t.map(ro):t.constructor!==void 0?null:Ze({},t)}function pu(t,e,n,a,i,o,s,l,c){var u,f,m,d,g,h,v,k=n.props||Ln,y=e.props,x=e.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((g=o[u])&&"setAttribute"in g==!!x&&(x?g.localName==x:g.nodeType==3)){t=g,o[u]=null;break}}if(t==null){if(x==null)return document.createTextNode(y);t=document.createElementNS(i,x,y.is&&y),l&&(te.__m&&te.__m(e,o),l=!1),o=null}if(x==null)k===y||l&&t.data==y||(t.data=y);else{if(o=x=="textarea"&&y.defaultValue!=null?null:o&&Nn.call(t.childNodes),!l&&o!=null)for(k={},u=0;u<t.attributes.length;u++)k[(g=t.attributes[u]).name]=g.value;for(u in k)g=k[u],u=="dangerouslySetInnerHTML"?m=g:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||En(t,u,null,g,i);for(u in y)g=y[u],u=="children"?d=g:u=="dangerouslySetInnerHTML"?f=g:u=="value"?h=g:u=="checked"?v=g:l&&typeof g!="function"||k[u]===g||En(t,u,g,k[u],i);if(f)l||m&&(f.__html==m.__html||f.__html==t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(m&&(t.innerHTML=""),Qi(e.type=="template"?t.content:t,On(d)?d:[d],e,n,a,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&kt(n,0),l,c),o!=null)for(u=o.length;u--;)jr(o[u]);l&&x!="textarea"||(u="value",x=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[u]||x=="progress"&&!h||x=="option"&&h!=k[u])&&En(t,u,h,k[u],i),u="checked",v!=null&&v!=t[u]&&En(t,u,v,k[u],i))}return t}function Vr(t,e,n){try{if(typeof t=="function"){var a=typeof t.__u=="function";a&&t.__u(),a&&e==null||(t.__u=t(e))}else t.current=e}catch(i){te.__e(i,n)}}function ao(t,e,n){var a,i;if(te.unmount&&te.unmount(t),(a=t.ref)&&(a.current&&a.current!=t.__e||Vr(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(o){te.__e(o,e)}a.base=a.__P=a.__n=null}if(a=t.__k)for(i=0;i<a.length;i++)a[i]&&ao(a[i],e,n||typeof t.type!="function");n||jr(t.__e),t.__c=t.__=t.__e=void 0}function fu(t,e,n){return this.constructor(t,n)}function ut(t,e,n){var a,i,o,s;e==document&&(e=document.documentElement),te.__&&te.__(t,e),i=(a=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],Xr(e,t=(!a&&n||e).__k=lu(N,null,[t]),i||Ln,Ln,e.namespaceURI,!a&&n?[n]:i?null:e.firstChild?Nn.call(e.childNodes):null,o,!a&&n?n:i?i.__e:e.firstChild,a,s),no(o,t,s),t.props.children=null}function io(t){function e(n){var a,i;return this.getChildContext||(a=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){a=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&a.forEach(function(s){s.__e=!0,qr(s)})},this.sub=function(o){a.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a&&a.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+Gi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,a){return n.children(a)}).contextType=e,e}Nn=Dn.slice,te={__e:function(t,e,n,a){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,a||{}),s=i.__d),s)return i.__E=i}catch(l){t=l}throw t}},Vi=0,ou=function(t){return t!=null&&t.constructor===void 0},In.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ze({},this.state),typeof t=="function"&&(t=t(Ze({},n),this.props)),t&&Ze(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),qr(this))},In.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),qr(this))},In.prototype.render=N,ct=[],Ki=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ji=function(t,e){return t.__v.__b-e.__v.__b},zn.__r=0,$r=Math.random().toString(8),Rn="__d"+$r,en="__a"+$r,Yi=/(PointerCapture)$|Capture$/i,Wr=0,Ur=Xi(!1),Hr=Xi(!0),Gi=0;var dt,ie,Kr,oo,tn=0,go=[],me=te,so=me.__b,lo=me.__r,co=me.diffed,uo=me.__c,po=me.unmount,fo=me.__;function $t(t,e){me.__h&&me.__h(ie,t,tn||e),tn=0;var n=ie.__H||(ie.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function S(t){return tn=1,mu(xo,t)}function mu(t,e,n){var a=$t(dt++,2);if(a.t=t,!a.__c&&(a.__=[n?n(e):xo(void 0,e),function(l){var c=a.__N?a.__N[0]:a.__[0],u=a.t(c,l);c!==u&&(a.__N=[u,a.__[1]],a.__c.setState({}))}],a.__c=ie,!ie.__f)){var i=function(l,c,u){if(!a.__c.__H)return!0;var f=!1,m=a.__c.props!==l;if(a.__c.__H.__.some(function(g){if(g.__N){f=!0;var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(m=!0)}}),o){var d=o.call(this,l,c,u);return f?d||m:d}return!f||m};ie.__f=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(l,c,u){if(this.__e){var f=o;o=void 0,i(l,c,u),o=f}s&&s.call(this,l,c,u)},ie.shouldComponentUpdate=i}return a.__N||a.__}function X(t,e){var n=$t(dt++,3);!me.__s&&Gr(n.__H,e)&&(n.__=t,n.u=e,ie.__H.__h.push(n))}function ho(t,e){var n=$t(dt++,4);!me.__s&&Gr(n.__H,e)&&(n.__=t,n.u=e,ie.__h.push(n))}function W(t){return tn=5,Ve(function(){return{current:t}},[])}function Ve(t,e){var n=$t(dt++,7);return Gr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function pt(t,e){return tn=8,Ve(function(){return t},e)}function bo(t){var e=ie.context[t.__c],n=$t(dt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(ie)),e.props.value):t.__}function Yr(){var t=$t(dt++,11);if(!t.__){for(var e=ie.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function gu(){for(var t;t=go.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Bn),e.__h.some(Jr),e.__h=[]}catch(n){e.__h=[],me.__e(n,t.__v)}}}me.__b=function(t){ie=null,so&&so(t)},me.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),fo&&fo(t,e)},me.__r=function(t){lo&&lo(t),dt=0;var e=(ie=t.__c).__H;e&&(Kr===ie?(e.__h=[],ie.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Bn),e.__h.some(Jr),e.__h=[],dt=0)),Kr=ie},me.diffed=function(t){co&&co(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(go.push(e)!==1&&oo===me.requestAnimationFrame||((oo=me.requestAnimationFrame)||hu)(gu)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Kr=ie=null},me.__c=function(t,e){e.some(function(n){try{n.__h.some(Bn),n.__h=n.__h.filter(function(a){return!a.__||Jr(a)})}catch(a){e.some(function(i){i.__h&&(i.__h=[])}),e=[],me.__e(a,n.__v)}}),uo&&uo(t,e)},me.unmount=function(t){po&&po(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(a){try{Bn(a)}catch(i){e=i}}),n.__H=void 0,e&&me.__e(e,n.__v))};var mo=typeof requestAnimationFrame=="function";function hu(t){var e,n=function(){clearTimeout(a),mo&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(n,35);mo&&(e=requestAnimationFrame(n))}function Bn(t){var e=ie,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),ie=e}function Jr(t){var e=ie;t.__c=t.__(),ie=e}function Gr(t,e){return!t||t.length!==e.length||e.some(function(n,a){return n!==t[a]})}function xo(t,e){return typeof e=="function"?e(t):e}var j=()=>typeof window<"u"&&window.tangu||{};function Fn(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,a=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,i=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:a,detail:i,transport:typeof t?.error=="string"?t.error:null}}var Zr=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function M(t,e={}){let n=j().cloudFetch;if(!n)return Zr("no_bridge");try{return Fn(await n({path:t,...e}))}catch(a){return Zr(String(a?.message||a))}}async function $n(t,e){if(!t)return e();try{return Fn(await t())}catch(n){return Zr(String(n?.message||n))}}var wt=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function $e(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function Ut(t,e,n){let a=j().cloudInvoke;if(!a)return!1;let i=t==="membership"&&e?n?[t,e,n]:[t,e]:[t];try{return!!(await a("auth:openPayCenter",...i))?.ok}catch{return!1}}async function _t(t){let e=j().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var bu=0;function r(t,e,n,a,i,o){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:--bu,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return te.vnode&&te.vnode(u),u}var xu={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",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M3 12h18 M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z",lock:"M6 11h12v9H6z M8.5 11V8a3.5 3.5 0 0 1 7 0v3",palette:"M12 3a9 9 0 0 0 0 18c1.2 0 2-.8 2-1.9 0-.5-.2-.9-.5-1.3-.3-.4-.5-.8-.5-1.3 0-1 .8-1.8 1.8-1.8H17a4 4 0 0 0 4-4c0-4.3-4-7.7-9-7.7Z M7.5 12.5h.01 M9 8.5h.01 M14 7.5h.01",calendar:"M5 5h14v15H5z M5 10h14 M9 3v4 M15 3v4",link:"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1 M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1",flame:"M12 21a6 6 0 0 0 6-6c0-2.5-1.4-4.4-3-6-.3 1.5-1 2.5-2 3 .3-3-1-6-3.5-8 .2 3-1 4.8-2.2 6.3C6.4 11.5 6 13.2 6 15a6 6 0 0 0 6 6Z",trophy:"M8 4h8v6a4 4 0 0 1-8 0V4Z M8 6H5v1a3 3 0 0 0 3 3 M16 6h3v1a3 3 0 0 1-3 3 M12 14v4 M8.5 20h7",sprout:"M12 20v-8 M12 12c0-3-2-5-6-5 0 3.5 2 5 6 5Z M12 14c0-3 2-5 6-5 0 3.5-2 5-6 5Z",eye:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z M12 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",download:"M12 4v11 M7.5 11l4.5 4.5 4.5-4.5 M5 20h14",up:"M12 19V5 M6 11l6-6 6 6",down:"M12 5v14 M6 13l6 6 6-6",sparkles:"M12 4l1.8 4.7 4.7 1.8-4.7 1.8L12 17l-1.8-4.7-4.7-1.8 4.7-1.8L12 4Z M18.5 15.5v4 M16.5 17.5h4",bot:"M6 9h12v10H6z M12 9V5 M12 4.5h.01 M9.5 13.5h.01 M14.5 13.5h.01 M3.5 13v3 M20.5 13v3",box:"M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3Z M4 7.5l8 4.5 8-4.5 M12 12v9",grid:"M4 4h7v7H4z M13 4h7v7h-7z M4 13h7v7H4z M13 13h7v7h-7z",note:"M6 3h9l4 4v14H6z M15 3v4h4 M9 12h6 M9 16h4"};function E({name:t,size:e=14,class:n}){return r("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:r("path",{d:xu[t]})})}function St({size:t=12}){return r("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:r("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var vu={"sub.mine":"\u6211\u7684\u6295\u7A3F","page.submission":"\u63D2\u4EF6\u6295\u7A3F","sub.desc":"\u7BA1\u7406\u4F60\u6295\u7A3F\u7684\u5185\u5BB9\u3001\u5BA1\u6838\u7ED3\u679C\u548C\u7248\u672C\u66F4\u65B0\u3002","sub.new":"\u65B0\u6295\u7A3F","sub.refresh":"\u5237\u65B0","sub.empty":"\u8FD8\u6CA1\u6709\u6295\u7A3F","sub.emptyHint":"\u628A\u4F60\u7684\u63D2\u4EF6\u3001\u6280\u80FD\u3001Agent \u6216 Space \u5206\u4EAB\u5230\u5E94\u7528\u5E02\u573A\u3002","sub.name":"\u540D\u79F0","sub.summary":"\u7B80\u4ECB","sub.type":"\u5185\u5BB9\u7C7B\u578B","sub.source":"\u53D1\u5E03\u6E20\u9053","sub.type.skill":"\u6280\u80FD","sub.type.agent":"Agent","sub.type.plugin":"\u63D2\u4EF6","sub.type.space":"Space","sub.type.theme":"\u4E3B\u9898","sub.type.amadeus_plugin":"Amadeus \u63D2\u4EF6","sub.pending":"\u5F85\u5BA1\u6838","sub.approved":"\u5DF2\u4E0A\u67B6","sub.rejected":"\u5DF2\u9A73\u56DE","sub.pendingVersion":"v{version} \u66F4\u65B0\u5F85\u5BA1\u6838","sub.rejectedVersion":"v{version} \u66F4\u65B0\u5DF2\u9A73\u56DE","sub.update":"\u63D0\u4EA4\u65B0\u7248\u672C","sub.updateTitle":"\u66F4\u65B0 {name}","sub.submit":"\u63D0\u4EA4\u5BA1\u6838","sub.submitted":"\u6295\u7A3F\u5DF2\u63D0\u4EA4\uFF0C\u5BA1\u6838\u7ED3\u679C\u4F1A\u663E\u793A\u5728\u6211\u7684\u6295\u7A3F\u4E2D\u3002","sub.updated":"\u65B0\u7248\u5DF2\u63D0\u4EA4\u5BA1\u6838\uFF0C\u5DF2\u4E0A\u67B6\u7248\u672C\u4ECD\u53EF\u4E0B\u8F7D\u3002","sub.repo":"GitHub \u516C\u5F00\u4ED3\u5E93","sub.npm":"npm \u516C\u5F00\u5305","sub.repoHint":"\u4ECE\u4ED3\u5E93\u8BFB\u53D6 README \u548C Release\uFF1B\u4ED3\u5E93\u4F5C\u8005\u663E\u793A\u4E3A\u53D1\u5E03\u4EBA\u3002","sub.npmHint":"\u4ECE npm \u8BFB\u53D6\u5305\u4FE1\u606F\uFF1B\u5BF9\u5E94\u516C\u5F00\u4ED3\u5E93\u7684\u4F5C\u8005\u663E\u793A\u4E3A\u53D1\u5E03\u4EBA\u3002","sub.reviewHint":"\u65B0\u7248\u672C\u9700\u91CD\u65B0\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u540E\u624D\u5411\u7528\u6237\u63D0\u4F9B\u3002\u4F60\u7684 Forsion \u8D26\u53F7\u7528\u4E8E\u7BA1\u7406\u6295\u7A3F\u3002","sub.remoteUpdate":"\u5728\u539F\u6E20\u9053\u53D1\u5E03\u65B0\u7248\u672C\u540E\uFF0C\u7531\u7BA1\u7406\u5458\u91CD\u65B0\u5BA1\u6838\u3002","sub.zip":"ZIP \u5305","sub.zipHint":"\u6700\u5927 50 MB\uFF0C\u5305\u5185\u5305\u542B\u5BF9\u5E94\u7684 manifest \u4E0E\u5165\u53E3\u6587\u4EF6\u3002","sub.version":"\u7248\u672C\u53F7","sub.versionHint":"\u65B0\u7248\u987B\u9AD8\u4E8E\u5F53\u524D\u7248\u672C\uFF0C\u5E76\u4E0E manifest \u4E2D\u7684\u7248\u672C\u4E00\u81F4\u3002","sub.readme":"\u8BF4\u660E\u6587\u6863\uFF08Markdown\uFF09","sub.keep":"\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8","sub.filter":"\u6309\u72B6\u6001\u7B5B\u9009","sub.all":"\u5168\u90E8","sub.noResults":"\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u6295\u7A3F","sub.downloads":"{n} \u6B21\u4E0B\u8F7D","sub.errName":"\u8BF7\u586B\u5199\u540D\u79F0\u3002","sub.errSource":"\u8BF7\u586B\u5199\u516C\u5F00\u4ED3\u5E93\u5730\u5740\u6216 npm \u5305\u540D\u3002","sub.errZip":"\u8BF7\u9009\u62E9 ZIP \u5305\u3002","sub.errLarge":"ZIP \u5305\u4E0D\u80FD\u8D85\u8FC7 50 MB\u3002","sub.errVersion":"\u8BF7\u586B\u5199\u7248\u672C\u53F7\u3002","sub.err.market_npm_invalid":"npm \u5305\u4E0D\u5B58\u5728\u6216\u4E0D\u7B26\u5408\u63D2\u4EF6\u53D1\u5E03\u89C4\u8303\u3002","sub.err.market_npm_source":"\u8BF7\u901A\u8FC7 npm \u53D1\u5E03\u5E76\u91CD\u65B0\u5BA1\u6838\u65B0\u7248\u3002","sub.err.market_github_source":"\u8BF7\u5728 GitHub \u53D1\u5E03 Release \u5E76\u91CD\u65B0\u5BA1\u6838\u65B0\u7248\u3002","sub.err.market_not_found":"\u6295\u7A3F\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002","sub.err.market_zip_required":"\u8BF7\u9009\u62E9 ZIP \u5305\u3002","sub.err.market_zip_invalid":"ZIP \u5305\u7ED3\u6784\u4E0D\u7B26\u5408\u53D1\u5E03\u89C4\u8303\u3002","sub.err.market_zip_too_large":"ZIP \u5305\u4E0D\u80FD\u8D85\u8FC7 50 MB\u3002","sub.err.market_version_required":"\u8BF7\u586B\u5199\u7248\u672C\u53F7\u3002","sub.err.market_version_invalid":"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u7248\u672C\u53F7\u3002","sub.err.market_version_mismatch":"\u7248\u672C\u53F7\u4E0E\u5305\u5185 manifest \u4E0D\u4E00\u81F4\u3002","sub.err.market_version_not_newer":"\u65B0\u7248\u987B\u9AD8\u4E8E\u5F53\u524D\u5DF2\u4E0A\u67B6\u7248\u672C\u3002","sub.err.market_icon_invalid":"\u56FE\u6807\u5E94\u4E3A 64\u2013512 px \u7684\u6B63\u65B9\u5F62 PNG\u3002","sub.err.market_duplicate":"\u8BE5\u5185\u5BB9\u5DF2\u6709\u6295\u7A3F\uFF0C\u8BF7\u7BA1\u7406\u73B0\u6709\u6295\u7A3F\u3002","sub.err.market_update_pending":"\u5DF2\u6709\u65B0\u7248\u7B49\u5F85\u5BA1\u6838\uFF0C\u8BF7\u5148\u7B49\u5F85\u5BA1\u6838\u7ED3\u679C\u3002","sub.err.market_stale":"\u6295\u7A3F\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002","page.account":"\u8D26\u53F7","page.profile":"\u4E2A\u4EBA\u4E3B\u9875","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\u3001\u6295\u7A3F\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\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\u3001\u5185\u5B58\u4E0E\u78C1\u76D8\u4F59\u91CF","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\u540D\u5B57\u3001\u6A21\u578B\u8FD9\u7C7B\u9009\u9879\uFF1B\u63CF\u8FF0\u4E0E\u63D0\u793A\u8BCD\u53EA\u8BB0\u957F\u5EA6\uFF0C\u6B63\u6587\u5F52\u4E0B\u9762\u300C\u4EBA\u8BBE\u3001\u8BB0\u5FC6\u4E0E\u8FDB\u5316\u8BB0\u5F55\u300D\u90A3\u4E2A\u5F00\u5173\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.item.runs":"\u6700\u8FD1 7 \u5929\u7684\u8FD0\u884C\u8BB0\u5F55\uFF1A\u6BCF\u6B21\u8FD0\u884C\u7684\u72B6\u6001\u548C\u62A5\u9519\u539F\u56E0\uFF0C\u6A21\u578B\u8C03\u7528\u4E0E\u5DE5\u5177\u7684\u7528\u91CF\u3001\u8017\u65F6\uFF08\u4E0D\u5E26\u5BF9\u8BDD\u5185\u5BB9\u548C\u5DE5\u5177\u8BFB\u5199\u7684\u5185\u5BB9\uFF09\uFF0C\u4EE5\u53CA\u5F15\u64CE\u6700\u8FD1\u7684\u8FD0\u884C\u65E5\u5FD7","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\u8D44\u6599\u5E93\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.memory":"\u5305\u542B Agent \u7684\u4EBA\u8BBE\u3001\u8BB0\u5FC6\u4E0E\u8FDB\u5316\u8BB0\u5F55","diag.memoryDesc":"\u6BCF\u4E2A Agent \u7684\u4EBA\u8BBE\uFF08\u5305\u62EC\u914D\u7F6E\u91CC\u7684\u63CF\u8FF0\u548C\u5F00\u53D1\u8005\u6307\u4EE4\uFF09\uFF0C\u548C\u5B83\u81EA\u5DF1\u6512\u4E0B\u6765\u7684\u5185\u5BB9\uFF1A\u8BB0\u5FC6\u548C\u8FD8\u6CA1\u6574\u7406\u7684\u8BB0\u5FC6\u5019\u9009\u3001\u8FDB\u5316\u8BB0\u5F55\u3001\u5199\u7ED9\u4F60\u7684\u534F\u4F5C\u8BF4\u660E\u3001\u6700\u8FD1 7 \u5929\u7684\u65E5\u5FD7\u548C\u8BB0\u5FC6\u6574\u7406\u8BB0\u5F55\uFF0C\u4EE5\u53CA\u9879\u76EE\u8BB0\u5FC6\uFF1B\u8FD8\u6709\u56E2\u961F\u7684\u8BBE\u5B9A\u548C\u4F60\u7684\u7528\u6237\u753B\u50CF\u3002\u8FD9\u4E9B\u662F\u4F60\u7ED9 Agent \u548C\u56E2\u961F\u5199\u7684\u8BBE\u5B9A\uFF0C\u548C Agent \u4ECE\u5BF9\u8BDD\u91CC\u8BB0\u4E0B\u7684\u5173\u4E8E\u4F60\u548C\u4F60\u7684\u5DE5\u4F5C\u7684\u4E8B\u5B9E\uFF0C\u6BCF\u6B21\u4E0A\u4F20\u5B83\u4EEC\u5F53\u524D\u7684\u5185\u5BB9\uFF08\u5F88\u957F\u7684\u4F1A\u622A\u65AD\uFF09\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","profile.unsupported":"\u8FD9\u4E2A\u670D\u52A1\u7AEF\u8FD8\u6CA1\u6709\u4E2A\u4EBA\u4E3B\u9875\u529F\u80FD","profile.state.private":"\u4EC5\u81EA\u5DF1\u53EF\u89C1","profile.state.public":"\u5DF2\u516C\u5F00","profile.state.privateDesc":"\u516C\u5F00\u540E\uFF0C\u4EFB\u4F55\u4EBA\u6253\u5F00\u5730\u5740\u90FD\u80FD\u770B\u5230\u4F60\u7684\u4E3B\u9875\uFF0C\u4E0D\u9700\u8981\u767B\u5F55","profile.state.publicDesc":"\u4EFB\u4F55\u4EBA\u6253\u5F00\u516C\u5F00\u5730\u5740\u90FD\u80FD\u770B\u5230\uFF0C\u4E0D\u9700\u8981\u767B\u5F55","profile.decorate":"\u88C5\u9970","profile.publish":"\u516C\u5F00\u4E3B\u9875","profile.makePrivate":"\u8BBE\u4E3A\u79C1\u6709","profile.address":"\u516C\u5F00\u5730\u5740","profile.copyLink":"\u590D\u5236\u94FE\u63A5","profile.openPublic":"\u67E5\u770B\u516C\u5F00\u9875","profile.nowPublic":"\u4E3B\u9875\u5DF2\u516C\u5F00","profile.nowPrivate":"\u4E3B\u9875\u5DF2\u8BBE\u4E3A\u79C1\u6709\uFF0C\u516C\u5F00\u5730\u5740\u4E0D\u518D\u80FD\u6253\u5F00","profile.bio":"\u7B80\u4ECB","profile.bioPlaceholder":"\u5199\u4E00\u53E5\u7B80\u4ECB","profile.linkAdd":"\u6DFB\u52A0\u94FE\u63A5","profile.linkRemove":"\u79FB\u9664\u94FE\u63A5","profile.linkInvalid":"\u94FE\u63A5\u8981\u4EE5 http:// \u6216 https:// \u5F00\u5934\uFF0C\u6216\u76F4\u63A5\u5199\u57DF\u540D","profile.joined":"{date}\u52A0\u5165","profile.stat.tokens":"\u7D2F\u8BA1 Token","profile.stat.activeDays":"\u6D3B\u8DC3\u5929\u6570","profile.stat.longest":"\u6700\u957F\u8FDE\u7EED","profile.stat.current":"\u5F53\u524D\u8FDE\u7EED","profile.stat.installs":"\u4F5C\u54C1\u88AB\u5B89\u88C5","profile.unit.days":"\u5929","profile.works":"\u7CBE\u9009\u4F5C\u54C1","profile.worksPick":"\u9009\u62E9","profile.worksEmpty":"\u8FD8\u6CA1\u6709\u4E0A\u67B6\u7684\u4F5C\u54C1\u3002\u4E0A\u67B6\u5230\u5546\u5E97\u6216\u53D1\u5E03\u6210\u7F51\u9875\u5E94\u7528\u540E\uFF0C\u53EF\u4EE5\u653E\u5230\u8FD9\u91CC\u3002","profile.worksNone":"\u8FD8\u6CA1\u6709\u53EF\u4EE5\u653E\u4E0A\u4E3B\u9875\u7684\u4F5C\u54C1\u3002\u4F5C\u54C1\u4E0A\u67B6\u5230\u5546\u5E97\u3001\u6216\u53D1\u5E03\u6210\u7F51\u9875\u5E94\u7528\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002","profile.worksPicked":"\u5DF2\u9009 {n} / {max} \u4EF6","profile.worksAuto":"\u4E0D\u9009\u7684\u8BDD\uFF0C\u6309\u5B89\u88C5\u91CF\u81EA\u52A8\u53D6\u524D\u51E0\u4EF6","profile.goSubmit":"\u53BB\u6295\u7A3F","profile.workInstalls":"{n} \u6B21\u5B89\u88C5","profile.workVisits":"{n} \u6B21\u8BBF\u95EE","profile.work.skill":"\u6280\u80FD","profile.work.agent":"Agent","profile.work.plugin":"\u63D2\u4EF6","profile.work.space":"Space","profile.work.theme":"\u4E3B\u9898","profile.work.note":"\u7B14\u8BB0\u63D2\u4EF6","profile.work.webapp":"\u7F51\u9875\u5E94\u7528","profile.activity":"\u6D3B\u52A8","profile.activityDays":"\u8FC7\u53BB\u4E00\u5E74\u6709 {n} \u5929\u5728\u7528","profile.less":"\u5C11","profile.more":"\u591A","profile.badges":"\u5FBD\u7AE0","profile.badgesEmpty":"\u8FD8\u6CA1\u6709\u5FBD\u7AE0\u3002\u8FDE\u7EED\u4F7F\u7528\u3001\u4E0A\u67B6\u4F5C\u54C1\u3001\u9080\u8BF7\u670B\u53CB\u90FD\u4F1A\u70B9\u4EAE\u3002","profile.badge.early":"\u65E9\u671F\u7528\u6237","profile.badge.streak":"\u8FDE\u7EED 30 \u5929","profile.badge.author":"\u4F5C\u8005","profile.badge.inviter":"\u9080\u8BF7\u8FBE\u4EBA","profile.badge.event":"\u6D3B\u52A8\u7EAA\u5FF5","profile.badgeSub.early":"{value} \u5E74\u52A0\u5165","profile.badgeSub.streak":"\u6700\u957F\u8FDE\u7EED {value} \u5929","profile.badgeSub.author":"\u4E0A\u67B6\u4E86 {value} \u4EF6\u4F5C\u54C1","profile.badgeSub.inviter":"\u9080\u8BF7\u4E86 {value} \u4F4D\u670B\u53CB","profile.badgeSub.event":"\u53C2\u52A0\u8FC7 Forsion \u7684\u6D3B\u52A8{value}","profile.insights":"\u6D1E\u5BDF","profile.insightsEmpty":"\u7528\u5F97\u8FD8\u4E0D\u591F\u591A\uFF0C\u8FC7\u51E0\u5929\u518D\u6765\u770B\u3002","profile.insightModel":"\u6700\u5E38\u7528\u6A21\u578B","profile.insightHours":"\u6700\u6D3B\u8DC3\u65F6\u6BB5","profile.deco.skin":"\u516C\u5F00\u9875\u7684\u914D\u8272","profile.deco.mode":"\u516C\u5F00\u9875\u7684\u660E\u6697","profile.deco.publicHint":"\u8FD9\u4E24\u9879\u53EA\u7BA1\u8BBF\u5BA2\u5728\u516C\u5F00\u9875\u4E0A\u770B\u5230\u7684\u3002\u5728\u8FD9\u91CC\uFF0C\u4E3B\u9875\u8DDF Forsion \u5F53\u524D\u7684\u4E3B\u9898\u8D70\u3002","profile.deco.cover":"\u5C01\u9762","profile.deco.frame":"\u5934\u50CF\u6846","profile.deco.modules":"\u6A21\u5757","profile.skin.cream":"\u7ECF\u5178","profile.skin.coral":"\u73CA\u745A","profile.skin.teal":"\u67D4\u9752","profile.skin.lavender":"\u85B0\u8863\u8349","profile.mode.auto":"\u8DDF\u968F\u8BBF\u5BA2","profile.mode.light":"\u6D45\u8272","profile.mode.dark":"\u6DF1\u8272","profile.cover.none":"\u65E0","profile.cover.mist":"\u6668\u96FE","profile.cover.contour":"\u7B49\u9AD8\u7EBF","profile.cover.dots":"\u7F51\u70B9","profile.frame.none":"\u65E0","profile.frame.ring":"\u7EC6\u73AF","profile.frame.pro":"\u4F1A\u5458\u73AF","profile.frameProHint":"\u4F1A\u5458\u73AF\u662F\u4ED8\u8D39\u4F1A\u5458\u4E13\u5C5E\u3002","profile.col.show":"\u663E\u793A","profile.col.public":"\u516C\u5F00","profile.moveUp":"\u4E0A\u79FB","profile.moveDown":"\u4E0B\u79FB","profile.modulesHint":"\u300C\u663E\u793A\u300D\u51B3\u5B9A\u4E3B\u9875\u4E0A\u6709\u6CA1\u6709\u8FD9\u4E00\u5757\uFF1B\u300C\u516C\u5F00\u300D\u51B3\u5B9A\u8BBF\u5BA2\u80FD\u4E0D\u80FD\u770B\u5230\uFF0C\u4E3B\u9875\u516C\u5F00\u540E\u624D\u8D77\u4F5C\u7528\u3002","profile.mod.stats":"\u6570\u636E","profile.mod.works":"\u7CBE\u9009\u4F5C\u54C1","profile.mod.activity":"\u6D3B\u52A8","profile.mod.badges":"\u5FBD\u7AE0","profile.mod.insights":"\u6D1E\u5BDF","profile.modDesc.stats":"\u7D2F\u8BA1 Token\u3001\u6D3B\u8DC3\u5929\u6570\u3001\u8FDE\u7EED\u5929\u6570\u3001\u4F5C\u54C1\u5B89\u88C5\u91CF","profile.modDesc.works":"\u4F60\u4E0A\u67B6\u7684\u4F5C\u54C1\uFF0C\u6700\u591A 6 \u4EF6","profile.modDesc.activity":"\u8FC7\u53BB\u4E00\u5E74\u6BCF\u5929\u7528\u6CA1\u7528\u3001\u7528\u5F97\u591A\u4E0D\u591A\uFF08\u53EA\u6709\u6DF1\u6D45\uFF0C\u6CA1\u6709\u5177\u4F53\u6570\u5B57\uFF09","profile.modDesc.badges":"\u52A0\u5165\u5E74\u4EFD\u3001\u8FDE\u7EED\u5929\u6570\u3001\u4E0A\u67B6\u3001\u9080\u8BF7\u3001\u6D3B\u52A8","profile.modDesc.insights":"\u6700\u5E38\u7528\u7684\u6A21\u578B\u3001\u6700\u6D3B\u8DC3\u7684\u65F6\u6BB5","profile.publishDesc":"\u516C\u5F00\u540E\uFF0C\u4EFB\u4F55\u4EBA\u6253\u5F00\u8FD9\u4E2A\u5730\u5740\u90FD\u80FD\u770B\u5230\u4F60\u7684\u4E3B\u9875\uFF0C\u4E0D\u9700\u8981\u767B\u5F55\u3002\u4E0B\u9762\u6BCF\u4E00\u5757\u53EF\u4EE5\u5355\u72EC\u51B3\u5B9A\u7ED9\u4E0D\u7ED9\u8BBF\u5BA2\u770B\u3002","profile.publishNever":"\u5934\u50CF\u3001\u6635\u79F0\u3001\u7528\u6237\u540D\u3001\u7B80\u4ECB\u548C\u94FE\u63A5\u4F1A\u4E00\u8D77\u516C\u5F00\u3002\u90AE\u7BB1\u3001\u624B\u673A\u53F7\u3001\u4F1A\u5458\u5230\u671F\u65E5\u3001\u79EF\u5206\u548C\u989D\u5EA6\u4E0D\u4F1A\u51FA\u73B0\u5728\u4E3B\u9875\u4E0A\u3002","profile.publishConfirm":"\u516C\u5F00","profile.blocked.machineUsername":"\u4F60\u73B0\u5728\u7684\u7528\u6237\u540D\u662F\u7CFB\u7EDF\u751F\u6210\u7684\uFF0C\u91CC\u9762\u5E26\u7740\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u7684\u4E00\u90E8\u5206\uFF0C\u516C\u5F00\u4F1A\u628A\u5B83\u9732\u51FA\u53BB\u3002\u5148\u5230\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7684\u300C\u8D26\u53F7\u300D\u9875\u6539\u4E00\u4E2A\u7528\u6237\u540D\uFF08\u6BCF\u4E2A\u8D26\u53F7\u53EF\u4EE5\u6539\u4E00\u6B21\uFF09\uFF0C\u518D\u56DE\u6765\u516C\u5F00\u3002","profile.blocked.publishBlocked":"\u8FD9\u4E2A\u4E3B\u9875\u5DF2\u88AB\u7BA1\u7406\u5458\u505C\u6B62\u516C\u5F00\u3002\u6709\u7591\u95EE\u8BF7\u901A\u8FC7\u300C\u53CD\u9988\u300D\u8054\u7CFB\u6211\u4EEC\u3002","profile.goRename":"\u53BB\u6539\u7528\u6237\u540D","profile.invalid":"\u8FD9\u9879\u5185\u5BB9\u6CA1\u80FD\u4FDD\u5B58\uFF0C\u8BF7\u68C0\u67E5\u540E\u518D\u8BD5"},yu={"sub.mine":"My submissions","page.submission":"Submissions","sub.desc":"Manage your submissions, review results and version updates.","sub.new":"New submission","sub.refresh":"Refresh","sub.empty":"No submissions yet","sub.emptyHint":"Share your plugins, skills, Agents or Spaces in the marketplace.","sub.name":"Name","sub.summary":"Summary","sub.type":"Content type","sub.source":"Source","sub.type.skill":"Skill","sub.type.agent":"Agent","sub.type.plugin":"Plugin","sub.type.space":"Space","sub.type.theme":"Theme","sub.type.amadeus_plugin":"Amadeus plugin","sub.pending":"Pending review","sub.approved":"Published","sub.rejected":"Rejected","sub.pendingVersion":"v{version} update pending review","sub.rejectedVersion":"v{version} update rejected","sub.update":"Submit new version","sub.updateTitle":"Update {name}","sub.submit":"Submit for review","sub.submitted":"Submitted. Review results will appear in your submissions.","sub.updated":"Update submitted for review. The published version remains available.","sub.repo":"Public GitHub repository","sub.npm":"Public npm package","sub.repoHint":"README and Releases come from the repository; its owner is shown as the publisher.","sub.npmHint":"Package metadata comes from npm; the public repository owner is shown as the publisher.","sub.reviewHint":"New versions require review before distribution. Your Forsion account manages the submission.","sub.remoteUpdate":"Publish a new version at the source for an administrator to review.","sub.zip":"ZIP archive","sub.zipHint":"Up to 50 MB. Include the required manifest and entry files.","sub.version":"Version","sub.versionHint":"Use a version newer than the current one, matching the manifest.","sub.readme":"README (Markdown)","sub.keep":"Leave blank to keep unchanged","sub.filter":"Filter by status","sub.all":"All","sub.noResults":"No matching submissions","sub.downloads":"{n} downloads","sub.errName":"Enter a name.","sub.errSource":"Enter a public repository URL or npm package name.","sub.errZip":"Choose a ZIP archive.","sub.errLarge":"ZIP archives must not exceed 50 MB.","sub.errVersion":"Enter a version.","sub.err.market_npm_invalid":"The npm package is unavailable or does not meet the plugin requirements.","sub.err.market_npm_source":"Publish the new version on npm for review.","sub.err.market_github_source":"Publish a GitHub Release for review.","sub.err.market_not_found":"Submission unavailable. Refresh and retry.","sub.err.market_zip_required":"Choose a ZIP archive.","sub.err.market_zip_invalid":"The ZIP structure does not meet the publishing requirements.","sub.err.market_zip_too_large":"ZIP archives must not exceed 50 MB.","sub.err.market_version_required":"Enter a version.","sub.err.market_version_invalid":"Enter a valid version.","sub.err.market_version_mismatch":"The version does not match the manifest.","sub.err.market_version_not_newer":"The new version must be newer than the published version.","sub.err.market_icon_invalid":"Use a square PNG icon between 64 and 512 px.","sub.err.market_duplicate":"This content has already been submitted. Manage the existing submission.","sub.err.market_update_pending":"An update is already awaiting review.","sub.err.market_stale":"The submission has changed. Refresh and retry.","page.account":"Account","page.profile":"Profile","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, submissions 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 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, this computer's name, and its free memory and disk space","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 (options such as name and model; descriptions and prompts are recorded by length only, and their text falls under the personas, memory and evolution switch below)","diag.item.plugins":"Names and versions of installed plugins, skills, themes and Spaces","diag.item.runs":"Run records from the last 7 days: each run's status and error reason, usage and timing of model calls and tools (no conversation text, and nothing those tools read or wrote), and the engine's recent log output","diag.notCollected":"Never uploaded: the sign-in credentials and API keys saved on this computer, your note files, agent libraries, 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.memory":"Include agent personas, memory and evolution records","diag.memoryDesc":"Each agent's persona (including the description and developer instructions in its configuration), and what the agent has built up on its own: its memory and the memory candidates it hasn't consolidated yet, its evolution record, its collaboration notes for you, the last 7 days of its logs and memory-consolidation activity, and project memory; plus your teams' charters and your user profile. These are the instructions you wrote for your agents and teams, and the facts they noted about you and your work from conversations. Each upload carries their current content (very long ones are cut short). 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","profile.unsupported":"This server doesn't have profiles yet","profile.state.private":"Only you can see this","profile.state.public":"Public","profile.state.privateDesc":"Once public, anyone with the address can see your profile without signing in","profile.state.publicDesc":"Anyone with the public address can see it without signing in","profile.decorate":"Decorate","profile.publish":"Make public","profile.makePrivate":"Make private","profile.address":"Public address","profile.copyLink":"Copy link","profile.openPublic":"View public page","profile.nowPublic":"Your profile is now public","profile.nowPrivate":"Your profile is private. The public address no longer opens","profile.bio":"Bio","profile.bioPlaceholder":"Add a short bio","profile.linkAdd":"Add a link","profile.linkRemove":"Remove link","profile.linkInvalid":"Links must start with http:// or https://, or be a plain domain","profile.joined":"Joined {date}","profile.stat.tokens":"Total tokens","profile.stat.activeDays":"Active days","profile.stat.longest":"Longest streak","profile.stat.current":"Current streak","profile.stat.installs":"Work installs","profile.unit.days":"d","profile.works":"Featured works","profile.worksPick":"Choose","profile.worksEmpty":"No published works yet. Publish to the store or as a web app, and they can go here.","profile.worksNone":"Nothing to feature yet. Works appear here once they are in the store or published as a web app.","profile.worksPicked":"{n} of {max} selected","profile.worksAuto":"With none selected, the most installed ones are shown","profile.goSubmit":"Submit a work","profile.workInstalls":"{n} installs","profile.workVisits":"{n} visits","profile.work.skill":"Skill","profile.work.agent":"Agent","profile.work.plugin":"Plugin","profile.work.space":"Space","profile.work.theme":"Theme","profile.work.note":"Notes plugin","profile.work.webapp":"Web app","profile.activity":"Activity","profile.activityDays":"Active on {n} days in the past year","profile.less":"Less","profile.more":"More","profile.badges":"Badges","profile.badgesEmpty":"No badges yet. Streaks, published works and invites all earn one.","profile.badge.early":"Early user","profile.badge.streak":"30-day streak","profile.badge.author":"Author","profile.badge.inviter":"Top inviter","profile.badge.event":"Event keepsake","profile.badgeSub.early":"Joined in {value}","profile.badgeSub.streak":"Longest streak: {value} days","profile.badgeSub.author":"{value} published works","profile.badgeSub.inviter":"Invited {value} friends","profile.badgeSub.event":"Took part in a Forsion event{value}","profile.insights":"Insights","profile.insightsEmpty":"Not enough usage yet. Check back in a few days.","profile.insightModel":"Most used model","profile.insightHours":"Most active hours","profile.deco.skin":"Public page color scheme","profile.deco.mode":"Public page appearance","profile.deco.publicHint":"These two only set what visitors see on the public page. Here the profile follows Forsion's current theme.","profile.deco.cover":"Cover","profile.deco.frame":"Avatar frame","profile.deco.modules":"Sections","profile.skin.cream":"Classic","profile.skin.coral":"Coral","profile.skin.teal":"Teal","profile.skin.lavender":"Lavender","profile.mode.auto":"Auto","profile.mode.light":"Light","profile.mode.dark":"Dark","profile.cover.none":"None","profile.cover.mist":"Mist","profile.cover.contour":"Contour","profile.cover.dots":"Dots","profile.frame.none":"None","profile.frame.ring":"Ring","profile.frame.pro":"Member ring","profile.frameProHint":"The member ring is for paid members.","profile.col.show":"Show","profile.col.public":"Public","profile.moveUp":"Move up","profile.moveDown":"Move down","profile.modulesHint":'"Show" decides whether a section is on your profile. "Public" decides whether visitors see it, once your profile is public.',"profile.mod.stats":"Stats","profile.mod.works":"Works","profile.mod.activity":"Activity","profile.mod.badges":"Badges","profile.mod.insights":"Insights","profile.modDesc.stats":"Total tokens, active days, streaks and installs of your works","profile.modDesc.works":"Works you have published, up to 6","profile.modDesc.activity":"Which days you were active in the past year (shades only, no numbers)","profile.modDesc.badges":"Join year, streaks, publishing, invites and events","profile.modDesc.insights":"Your most used model and most active hours","profile.publishDesc":"Once public, anyone with this address can see your profile without signing in. You decide section by section what visitors see.","profile.publishNever":"Your avatar, nickname, username, bio and links become public too. Your email, phone number, membership expiry, points and quota never appear on your profile.","profile.publishConfirm":"Make public","profile.blocked.machineUsername":"Your current username was generated by the system and contains part of your phone number or email, so making it public would expose that. Change your username on the Account page of the web account center first (each account can do this once), then come back.","profile.blocked.publishBlocked":"An administrator has stopped this profile from being public. Contact us through Feedback if you have questions.","profile.goRename":"Change username","profile.invalid":"This couldn't be saved. Check it and try again"},vo={zh:vu,en:yu},Ke=t=>t==="en"?"en":"zh";function Un(t,e,n){let a=vo[t][e]??vo.zh[e]??e;return n?a.replace(/\{(\w+)\}/g,(i,o)=>o in n?String(n[o]):i):a}var Hn=t=>(e,n)=>Un(t,e,n),Ne=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var yo=`
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,
@@ -544,7 +544,27 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
544
544
  .fx-acct .fx-pf-hm i:nth-child(-n + 189) { display: none; }
545
545
  .fx-acct .fx-pf-hm-months span:nth-child(-n + 6) { display: none; }
546
546
  }
547
- `,yo=`
547
+ .fx-acct .fx-sub-form { padding: 14px 15px; }
548
+ .fx-acct .fx-sub-form fieldset { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
549
+ .fx-acct .fx-sub-field { display: grid; gap: 6px; min-width: 0; color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
550
+ .fx-acct .fx-sub-field input, .fx-acct .fx-sub-field select, .fx-acct .fx-sub-field textarea,
551
+ .fx-acct .fx-sub-filter select { box-sizing: border-box; min-width: 0; width: 100%; padding: 8px 10px; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-family: inherit; font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
552
+ .fx-acct .fx-sub-field textarea { resize: vertical; }
553
+ .fx-acct .fx-sub-field small { color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
554
+ .fx-acct .fx-sub-field :focus-visible, .fx-acct .fx-sub-filter select:focus-visible { outline: var(--focus-ring) solid var(--accent-ink); outline-offset: 2px; }
555
+ .fx-acct .fx-sub-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
556
+ .fx-acct .fx-sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
557
+ .fx-acct .fx-sub-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 15px; color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
558
+ .fx-acct .fx-sub-filter select { width: auto; max-width: 100%; }
559
+ .fx-acct .fx-sub-result { margin: 12px 15px; }
560
+ .fx-acct .fx-sub-item { display: grid; gap: 8px; padding: 14px 15px; border-top: var(--border-width) solid var(--border); }
561
+ .fx-acct .fx-sub-item-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; }
562
+ .fx-acct .fx-sub-item-head strong { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
563
+ .fx-acct .fx-sub-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-faint); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); }
564
+ .fx-acct .fx-sub-summary { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
565
+ .fx-acct .fx-sub-item > .btn { justify-self: start; }
566
+ .fx-acct .fx-sub-item > .fx-note { margin: 0; overflow-wrap: anywhere; }
567
+ `,ko=`
548
568
  .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; }
549
569
  .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; }
550
570
  .fx-ann:focus { outline: none; }
@@ -571,7 +591,7 @@ html[data-glass='off'] .fx-ann-backdrop { backdrop-filter: none; background: var
571
591
  @media (prefers-reduced-motion: reduce) {
572
592
  .fx-ann-backdrop, .fx-ann, .fx-ann-eyebrow, .fx-ann-title, .fx-ann-body, .fx-ann-ok { animation: none; }
573
593
  }
574
- `,ko=`
594
+ `,wo=`
575
595
  :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; }
576
596
  .doc > :first-child { margin-top: 0; }
577
597
  .doc > :last-child { margin-bottom: 0; }
@@ -595,5 +615,5 @@ img { border-radius: var(--radius-sm); }
595
615
  hr { margin: 16px 0; border: 0; border-top: var(--border-width) solid var(--border); }
596
616
  a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
597
617
  strong, b { font-weight: 650; }
598
- `;var At=t=>typeof t=="string"?t:"";function bd(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=At(e.titleZh),i=At(e.bodyZh);return!n||!r.trim()&&!i.trim()?null:{id:n,titleZh:r,titleEn:At(e.titleEn).trim()?At(e.titleEn):null,bodyZh:i,bodyEn:At(e.bodyEn).trim()?At(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:At(e.publishedAt)||null}}function xd(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 vd=new Br({gfm:!0,breaks:!0}),yd=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],kd=/^(?:https?:|mailto:|#)/i;function _o(t){return Cr.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:yd,ALLOWED_URI_REGEXP:kd})}function wd(t,e){let n=e==="markdown"?vd.parse(t,{async:!1}):t;return _o(n)}var qn=null;function _d(){if(qn===null)try{let t=_o('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');qn=Cr.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{qn=!1}return qn}function Sd(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Ad="http://www.w3.org/1999/xlink";function Hn(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=Sd(n.getAttribute("href")??n.getAttributeNS(Ad,"href"));if(r)try{J().openExternal?.(r)?.catch(()=>{})}catch{}}function wo(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Cd(t){let{ctx:e,ann:n}=t,[r,i]=_(()=>Xe(e.getLocale?.()));V(()=>{i(Xe(e.getLocale?.()));let f=e.subscribeLocale?.(g=>i(Xe(g)));return()=>{typeof f=="function"&&f()}},[e]);let o=We(()=>Un(r),[r]),s=xd(n,r),l=K(null),c=K(null),d=K(null),p=K(null),m=K(t.onClose);return m.current=t.onClose,V(()=>{let f=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let g=v=>{if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),m.current();return}if(v.key!=="Tab")return;let y=c.current,A=d.current,x=l.current;if(!y||!A||!x)return;let w=document.activeElement;if(!w||!x.contains(w)){v.preventDefault(),(v.shiftKey?A:y).focus();return}v.shiftKey&&(w===y||w===x)?(v.preventDefault(),A.focus()):!v.shiftKey&&w===A&&(v.preventDefault(),y.focus())},h=v=>{let y=l.current;y&&v.target instanceof Node&&!y.contains(v.target)&&y.focus()};return window.addEventListener("keydown",g,!0),document.addEventListener("focusin",h,!0),()=>{window.removeEventListener("keydown",g,!0),document.removeEventListener("focusin",h,!0),f?.isConnected&&f.focus()}},[]),V(()=>{let f=p.current;if(!f)return;let g=wo(f);return g.addEventListener("click",Hn),g.addEventListener("auxclick",Hn),()=>{g.removeEventListener("click",Hn),g.removeEventListener("auxclick",Hn)}},[]),V(()=>{let f=p.current;if(!f)return;let g=document.createElement("style");g.textContent=ko;let h=document.createElement("div");h.className="doc",h.appendChild(wd(s.body,n.format)),wo(f).replaceChildren(g,h)},[s.body,n.format]),a("div",{class:"fx-ann-backdrop",children:[a("style",{children:yo}),a("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:[a("button",{ref:c,type:"button",class:"fx-ann-close","aria-label":o("ann.close"),onClick:()=>m.current(),children:a(P,{name:"x",size:16})}),a("div",{class:"fx-ann-eyebrow",children:o("ann.eyebrow")}),a("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),a("div",{class:"fx-ann-body",children:a("div",{ref:p,id:"fx-ann-body",class:"fx-ann-doc"})}),a("div",{class:"fx-ann-footer",children:a("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:o("ann.ok")})})]})]})}function Td(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Ed(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let i=()=>{o.disconnect(),clearTimeout(s),r()},o=new MutationObserver(()=>{n.isConnected||i()});o.observe(n.parentNode,{childList:!0});let s=setTimeout(i,e)}):Promise.resolve()}function So(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Td(e.location?.search))return null;let r=0,i=!1,o=null,s=Promise.resolve(),l=p=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let f=!1,g=h=>{f||(f=!0,o?.id===p.id&&(o=null),ct(null,m),m.remove(),h&&(s=M(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};o={id:p.id,finish:g},ct(a(Cd,{ctx:t,ann:p,onClose:()=>g(!0)}),m)},c=async()=>{let p=++r;await s;let m=await M("/announcements/pending");if(i||p!==r||!m.ok)return;let f=bd(m.data?.announcement);!f||o||_d()&&(await Ed(),!(i||p!==r||o)&&l(f))},d=n.onAuthChanged?.(p=>{o?.finish(!1),p?.loggedIn?c():r++});return c(),{check:c,dispose(){i=!0,r++,typeof d=="function"&&d(),o?.finish(!1)}}}function Ao(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 Co(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 To={\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 Eo={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",machine_username:"profile.blocked.machineUsername",publish_blocked:"profile.blocked.publishBlocked",invalid_settings:"profile.invalid"},Po={"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"},Gr={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 Pd(t){if(t.code&&Eo[t.code])return Eo[t.code];if(t.detail){if(Po[t.detail])return Po[t.detail];let e=To[t.detail];if(e)return Gr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function Ce(t){let e=Pd(t);return e?{key:e}:wt(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 nn(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 Zr=ro(null);function D(){let t=go(Zr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var ut=()=>D().t;function Se(){let t=K(!0);return V(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var Ro={pending:!1,error:null,success:null,captcha:!1};function B(){let t=Se(),[e,n]=_(Ro),r=K(!1),i=dt(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})},[]),o=dt(()=>{r.current||n(Ro)},[]);return{...e,run:i,clear:o}}var ue=t=>({error:Ce(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function Mo(){let[t,e]=_(0),n=K(null);V(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=dt((o=60)=>{n.current&&clearInterval(n.current),e(o),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),i=dt(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:i}}function ke(t){let[e,n]=_({state:"loading"}),r=K(0),i=K(t);i.current=t;let o=dt((c=!1)=>{let d=++r.current;c||n({state:"loading"}),(async()=>{let p;try{p=await i.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}):wt(p)?n({state:"signedOut"}):(p.status===401&&J().authStatus?.().catch(()=>{}),n({state:"error",fail:p})))})()},[]);V(()=>{o();let c=J().onAuthChanged?.(()=>o());return()=>{r.current++,c?.()}},[o]);let s=dt(()=>o(),[o]),l=dt(()=>o(!0),[o]);switch(e.state){case"ready":{let c=e.gen,d=p=>n(m=>m.state==="ready"&&m.gen===c?{...m,data:p(m.data)}:m);return{state:"ready",data:e.data,reload:l,update:d}}case"error":return{state:"error",error:Ce(e.fail),retry:s};default:return e}}function Wn(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 Xn(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 rn(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Rd=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Io(t,e){let n=String(t||"").trim(),r,i,o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(o)r=Number(o[2]),i=Number(o[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),i=Number(l.find(c=>c.type==="day")?.value)}return!(r>=1&&r<=12)||!(i>=1&&i<=31)?null:e==="zh"?`${r}\u6708${i}\u65E5`:`${Rd[r-1]} ${i}`}var Qr=t=>t==="zh"?"zh-CN":"en-US";function Lo(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 jn(t,e){let n=Lo(t);return n?new Intl.DateTimeFormat(Qr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function je(t,e){let n=Lo(t);return n?new Intl.DateTimeFormat(Qr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function re(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Qr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var Ze=class extends Error{};async function Vn(t,e=256){if(t.size>20971520)throw new Ze;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 i=r.naturalWidth,o=r.naturalHeight;if(!i||!o)throw new Error("empty image");if(i*o>5e7)throw new Ze;let s=Math.min(1,e/Math.max(i,o)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(i*s)),l.height=Math.max(1,Math.round(o*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 d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new Ze;return d}finally{URL.revokeObjectURL(n)}}function Kn(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 Ct=(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))(Ct||{}),Md=[0,1],zo=[1,0],No=[2,3],Oo=[3,2],Id={L:Md,M:zo,Q:No,H:Oo},Ld=/^\d*$/,Dd=/^[A-Z0-9 $%*+./:-]*$/,ea="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",aa=1,ia=40,Do=3,zd=3,Jn=40,Nd=10,Bo=[[-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]],Fo=[[-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]],ta=class{constructor(e,n,r,i){if(this.version=e,this.ecc=n,e<aa||e>ia)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let o=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),i===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let d=this.getPenaltyScore();d<l&&(i=c,l=d),this.applyMask(c)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}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,Ct.Timing),this.setFunctionModule(r,6,r%2===0,Ct.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 i=0;i<n;i++)r===0&&i===0||r===0&&i===n-1||r===n-1&&i===0||this.drawAlignmentPattern(e[r],e[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let o=0;o<10;o++)r=r<<1^(r>>>9)*1335;let i=(n<<10|r)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,Qe(i,o));this.setFunctionModule(8,7,Qe(i,6)),this.setFunctionModule(8,8,Qe(i,7)),this.setFunctionModule(7,8,Qe(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Qe(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Qe(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Qe(i,o));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 i=Qe(n,r),o=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(o,s,i),this.setFunctionModule(s,o,i)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let i=-4;i<=4;i++){let o=Math.max(Math.abs(i),Math.abs(r)),s=e+i,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,o!==2&&o!==4,Ct.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let i=-2;i<=2;i++)this.setFunctionModule(e+i,n+r,Math.max(Math.abs(i),Math.abs(r))!==1,Ct.Alignment)}setFunctionModule(e,n,r,i=Ct.Function){this.modules[n][e]=r,this.types[n][e]=i}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Yn(n,r))throw new RangeError("Invalid argument");let i=Fo[r[0]][n],o=Bo[r[0]][n],s=Math.floor(na(n)/8),l=i-s%i,c=Math.floor(s/i),d=[],p=Xd(o);for(let f=0,g=0;f<i;f++){let h=e.slice(g,g+c-o+(f<l?0:1));g+=h.length;let v=jd(h,p);f<l&&h.push(0),d.push(h.concat(v))}let m=[];for(let f=0;f<d[0].length;f++)d.forEach((g,h)=>{(f!==c-o||h>=l)&&m.push(g[f])});return m}drawCodewords(e){if(e.length!==Math.floor(na(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 i=0;i<this.size;i++)for(let o=0;o<2;o++){let s=r-o,c=(r+1&2)===0?this.size-1-i:i;!this.types[c][s]&&n<e.length*8&&(this.modules[c][s]=Qe(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 i;switch(e){case 0:i=(r+n)%2===0;break;case 1:i=n%2===0;break;case 2:i=r%3===0;break;case 3:i=(r+n)%3===0;break;case 4:i=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:i=r*n%2+r*n%3===0;break;case 6:i=(r*n%2+r*n%3)%2===0;break;case 7:i=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&i&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[o][d]===s?(l++,l===5?e+=Do:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Jn),s=this.modules[o][d],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Jn}for(let o=0;o<this.size;o++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][o]===s?(l++,l===5?e+=Do:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Jn),s=this.modules[d][o],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Jn}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){let l=this.modules[o][s];l===this.modules[o][s+1]&&l===this.modules[o+1][s]&&l===this.modules[o+1][s+1]&&(e+=zd)}let n=0;for(let o of this.modules)n=o.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,i=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=i*Nd,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 i=this.size-7;r.length<e;i-=n)r.splice(1,0,i);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 et(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 Qe(t,e){return(t>>>e&1)!==0}var an=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()}},Od=[1,10,12,14],Bd=[2,9,11,13],Fd=[4,8,16,16];function $o(t,e){return t[Math.floor((e+7)/17)+1]}function Uo(t){let e=[];for(let n of t)et(n,8,e);return new an(Fd,t.length,e)}function $d(t){if(!qo(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);et(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new an(Od,t.length,e)}function Ud(t){if(!Ho(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=ea.indexOf(t.charAt(n))*45;r+=ea.indexOf(t.charAt(n+1)),et(r,11,e)}return n<t.length&&et(ea.indexOf(t.charAt(n)),6,e),new an(Bd,t.length,e)}function qd(t){return t===""?[]:qo(t)?[$d(t)]:Ho(t)?[Ud(t)]:[Uo(Wd(t))]}function qo(t){return Ld.test(t)}function Ho(t){return Dd.test(t)}function Hd(t,e){let n=0;for(let r of t){let i=$o(r.mode,e);if(r.numChars>=1<<i)return Number.POSITIVE_INFINITY;n+=4+i+r.bitData.length}return n}function Wd(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 na(t){if(t<aa||t>ia)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 Yn(t,e){return Math.floor(na(t)/8)-Bo[e[0]][t]*Fo[e[0]][t]}function Xd(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 i=0;i<e.length;i++)e[i]=ra(e[i],n),i+1<e.length&&(e[i]^=e[i+1]);n=ra(n,2)}return e}function jd(t,e){let n=e.map(r=>0);for(let r of t){let i=r^n.shift();n.push(0),e.forEach((o,s)=>n[s]^=ra(o,i))}return n}function ra(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 Vd(t,e,n=1,r=40,i=-1,o=!0){if(!(aa<=n&&n<=r&&r<=ia)||i<-1||i>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=Yn(s,e)*8,f=Hd(t,s);if(f<=m){l=f;break}if(s>=r)throw new RangeError("Data too long")}for(let m of[zo,No,Oo])o&&l<=Yn(s,m)*8&&(e=m);let c=[];for(let m of t){et(m.mode[0],4,c),et(m.numChars,$o(m.mode,s),c);for(let f of m.getData())c.push(f)}let d=Yn(s,e)*8;et(0,Math.min(4,d-c.length),c),et(0,(8-c.length%8)%8,c);for(let m=236;c.length<d;m^=253)et(m,8,c);let p=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new ta(s,e,p,i)}function Wo(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:i=1,maxVersion:o=40,maskPattern:s=-1,border:l=1}=e||{},c=typeof t=="string"?qd(t):Array.isArray(t)?[Uo(t)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Vd(c,Id[n],i,o,s,r),p=Kd({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 Kd(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(o=>{for(let s=0;s<e;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let i=Ct.Border;t.types.forEach(o=>{for(let s=0;s<e;s++)o.unshift(i),o.push(i)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:r},s=>i)),t.types.push(Array.from({length:r},s=>i));return t}function Q(t){return a("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[a("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&a("span",{class:"settings-panel-icon",children:a(P,{name:t.icon,size:16})}),a("div",{children:[a("strong",{children:t.title}),t.desc&&a("p",{children:t.desc})]}),t.actions&&a("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function he(t){return a("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[a("div",{class:"settings-control-copy",children:a("span",{children:[a("strong",{children:t.label}),t.desc&&a("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&a("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function ae(t){return a("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function Ve(t){return a("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:a("span",{})})}function E(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return a("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&&a(St,{}),t.children]})}var Jd=5e3;function tt(t){let[e,n]=_(!1),r=K(null),i=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};V(()=>()=>{r.current&&clearTimeout(r.current)},[]),V(()=>{(t.pending||t.disabled)&&i()},[t.pending,t.disabled]);let o=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},Jd);return}i(),t.onConfirm()},s=t.variant??"ghost";return a(E,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:o,children:e?t.confirmLabel:t.label})}function F(t){let e=ut(),{a:n}=t;return n.error?a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:Ne(n.error,e)}),n.captcha&&a("button",{type:"button",class:"fx-link",onClick:()=>void _t(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",a(P,{name:"external",size:12})]})]}):n.success?a("div",{class:"fx-msg is-ok",role:"status",children:Ne(n.success,e)}):null}function Z(t){return a("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function Ke(t){return a("div",{class:"settings-empty-row fx-block",children:t.children})}function on(t){let e=ut(),n=t.display;return a("div",{class:`fx-quota${n.low?" is-low":""}`,children:[a("div",{class:"fx-quota-top",children:[a("span",{class:"fx-quota-label",children:t.label}),a("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),a("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:a("span",{style:{width:`${n.pct}%`}})}),t.note&&a("div",{class:"fx-quota-note",children:t.note})]})}function $e(t){return a("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>a("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 Yd(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 Je(t){let e=ut(),[n,r]=_("idle"),i=K(null);V(()=>()=>{i.current&&clearTimeout(i.current)},[]);let o=async()=>{let s=await Yd(t.text);r(s?"copied":"failed"),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r("idle"),1800)};return a(E,{disabled:t.disabled||!t.text,onClick:()=>void o(),children:[a(P,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function Gd(t){let e=We(()=>{try{return Wo(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((i,o)=>i.forEach((s,l)=>{s&&(n+=`M${l} ${o}h1v1h-1z`)}));let r=t.size??148;return a("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:[a("rect",{width:e.size,height:e.size,fill:"#fff"}),a("path",{d:n,fill:"#000"})]})}function oa(t){let e=ut(),{device:n}=t;return a("div",{class:"fx-device",children:[a(Gd,{value:n.url,label:e("signin.qrLabel")}),a("div",{class:"fx-device-copy",children:[a("p",{children:e("signin.deviceHint")}),n.userCode&&a("div",{class:"fx-device-code",children:[a("span",{children:e("signin.code")}),a("code",{children:n.userCode})]}),a("div",{class:"fx-inline",children:[a("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",a(P,{name:"external",size:12})]}),a(Je,{text:n.url,label:e("signin.copyLink")})]})]})]})}function we(){let t=ut(),e=B(),[n,r]=_(null);V(()=>J().onAuthDevice?.(o=>r(o)),[]);let i=()=>void e.run(async()=>{let o=J().forsionLogin;if(!o)return{error:{key:"err.unavailable"}};try{await o()}catch(s){r(null);let l=nn(Fe(s));return l?{error:l}:void 0}});return a("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:a("div",{class:"settings-state fx-signin-body",children:[a("span",{class:"settings-state-icon",children:a(P,{name:"user",size:18})}),a("p",{class:"fx-signin-lead",children:t("signin.desc")}),a("div",{class:"settings-state-actions",children:a(E,{variant:"primary",pending:e.pending,onClick:i,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&a(oa,{device:n}),a(F,{a:e})]})})}function xe(t){let e=ut(),n=t.panels??2,r=t.rows??2;return a("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(i,o)=>a("section",{class:"settings-panel fx-panel",children:[a("div",{class:"settings-panel-head",children:[a("span",{class:"fx-skel fx-skel--icon"}),a("div",{children:[a("span",{class:"fx-skel fx-skel--title"}),a("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,l)=>a("div",{class:"settings-control-row",children:a("span",{class:"fx-skel fx-skel--row"})},l))]},o))})}function ve(t){let e=ut();return a("section",{class:"settings-panel fx-panel",children:a("div",{class:"settings-state fx-error-state",role:"alert",children:[a("span",{class:"settings-state-icon",children:a(P,{name:"alert",size:18})}),a("strong",{children:e("common.loadFailed")}),a("p",{children:Ne(t.error,e)}),a("div",{class:"settings-state-actions",children:a(E,{variant:"primary",onClick:t.onRetry,children:[a(P,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}var Zd=t=>!!t&&typeof t=="object"&&typeof t.enabled=="boolean";async function sa(t,e){let n=J().cloudInvoke;if(!n)throw new Error("no_bridge");let r=await n(t,e);if(!Zd(r))throw new Error(String(r?.error??"unavailable"));return r}var Qd=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins"];function Xo(){let{t,locale:e}=D(),n=Se(),[r,i]=_(null),o=B(),s=B();if(V(()=>{let f=!1,g=()=>{sa("diagnostics:get").then(v=>{f||i(v)},()=>{f||i(null)})};g();let h=J().onAuthChanged?.(g);return()=>{f=!0,h?.()}},[]),!r?.signedIn)return null;let l=()=>void s.run(async()=>{try{let f=await sa("diagnostics:uploadNow");return n.current&&i(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:Fe(f)||t("err.generic")}}}}),c=async f=>{let g=!1;await o.run(async()=>{s.clear();try{let h=await sa("diagnostics:set",f);n.current&&i(h),g=!0}catch(h){return{error:{raw:Fe(h)||t("err.generic")}}}}),g&&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:je(r.lastUploadAt,e)}):t("diag.noUpload")} \xB7 ${p}`;return a(Q,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[a(he,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:a(Ve,{checked:r.enabled,disabled:o.pending,label:t("diag.enable"),onChange:f=>void c({enabled:f})})}),a(ae,{class:"fx-diag",children:[a("strong",{children:t("diag.collected")}),a("ul",{children:Qd.map(f=>a("li",{children:t(f)},f))}),a(Z,{children:t("diag.notCollected")})]}),r.sessions!==void 0&&a(he,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:a(Ve,{checked:r.sessions,disabled:o.pending,label:t("diag.sessions"),onChange:f=>void c({sessions:f})})}),a(he,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:a(Ve,{checked:r.activity,disabled:o.pending,label:t("diag.activity"),onChange:f=>void c({activity:f})})}),r.enabled&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:m}),a(E,{pending:s.pending,disabled:o.pending,onClick:l,children:t("diag.uploadNow")})]}),a(ae,{class:"fx-sub--tight",children:[a(Z,{children:t("diag.retention",{n:r.retainDays})}),r.enabled&&r.lastError&&!s.error&&!s.success&&a("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:r.lastError})}),a(F,{a:o}),a(F,{a:s})]})]})}function Vo(){let t=ke(async()=>{let[n,r,i]=await Promise.all([M("/auth/me"),M("/membership/my"),M("/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:i.ok&&i.data&&typeof i.data=="object"?i.data:{}}}:n});if(t.state==="loading")return a(xe,{panels:3});if(t.state==="signedOut")return a(we,{});if(t.state==="error")return a(ve,{error:t.error,onRetry:t.retry});let{data:e}=t;return a(O,{children:[a(eu,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),a(tu,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),a(nu,{}),a(Xo,{}),a(au,{})]})}function eu(t){let{t:e}=D(),{me:n}=t,r=B(),i=B(),[o,s]=_(!1),[l,c]=_(""),d=K(null),p=n.nickname||n.username,m=h=>{h&&r.run(async()=>{let v;try{v=await Vn(h)}catch(A){return{error:{key:A instanceof Ze?"err.avatarTooLarge":"err.avatarInvalid"}}}let y=await M("/settings",{method:"PUT",body:{avatar:v}});return y.ok?(t.onPatch({avatar:v}),{success:{key:"account.avatar.saved"}}):{error:Ce(y)}})},f=()=>{i.clear(),c(p||""),s(!0)},g=()=>{let h=l.trim();if(!h||h===p){s(!1);return}i.run(async()=>{let v=await M("/settings",{method:"PUT",body:{nickname:h}});return v.ok?(t.onPatch({nickname:h}),s(!1),{success:{key:"account.nickname.saved"}}):{error:Ce(v)}})};return a(Q,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[a("div",{class:"fx-identity fx-block",children:[a("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?a("img",{src:n.avatar,alt:""}):a("span",{class:"fx-avatar-initial",children:Kn(p)}),a("span",{class:"fx-avatar-mask",children:r.pending?a(St,{size:14}):a(P,{name:"pencil",size:14})})]}),a("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:h=>{let v=h.currentTarget;m(v.files?.[0]),v.value=""}}),a("div",{class:"fx-identity-main",children:[o?a("form",{class:"fx-inline",onSubmit:h=>{h.preventDefault(),g()},children:[a("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:h=>c(h.currentTarget.value),onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),s(!1))}}),a(E,{variant:"primary",submit:!0,pending:i.pending,children:e("common.save")}),a(E,{disabled:i.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):a("div",{class:"fx-name-row",children:[a("span",{class:"fx-name",children:p}),a("button",{type:"button",class:"fx-icon-btn",onClick:f,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:a(P,{name:"pencil",size:13})}),n.role==="ADMIN"&&a("span",{class:"fx-tag",children:e("account.role.admin")})]}),a("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),a(F,{a:i}),a(F,{a:r})]})]}),a(jo,{kind:"phone",value:n.phone}),a(jo,{kind:"email",value:n.email})]})}function jo(t){let{t:e,goTo:n}=D(),r=!!t.value,i=r?t.kind==="phone"?Wn(t.value):Xn(t.value):e("account.contact.unbound"),o=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return a(he,{label:o,children:n?a("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[a("span",{children:i}),a(P,{name:"chevron",size:12})]}):a("span",{class:`fx-value${r?"":" is-empty"}`,children:i})})}function tu(t){let{t:e,locale:n}=D(),r=B(),i=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,o=rn(i?.tier),s=o==="Free",l=s?"free":o.toLowerCase()==="pro"?"pro":"paid",c=()=>void r.run(async()=>await $t("membership")?void 0:{error:{key:"err.openFailed"}});return a(Q,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?a(E,{variant:"primary",pending:r.pending,onClick:c,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&a("div",{class:"fx-member fx-block",children:[a("span",{class:`fx-tier fx-tier--${l}`,children:o}),a("div",{class:"fx-member-copy",children:[a("strong",{children:s?e("member.freeName"):i?.plan?.name||o}),a("span",{class:"fx-muted",children:s?e("member.freeHint"):i?.expiresAt?e("member.expires",{date:jn(i.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&a("div",{class:"fx-sub",children:a(Z,{tone:"warn",children:[e("member.loadFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a("div",{class:"fx-sub fx-sub--tight",children:a(F,{a:r})})]})}function nu(){let{t}=D(),e=Se(),[n,r]=_(null),[i,o]=_(!1),[s,l]=_(null),[c,d]=_(null),p=B(),m=B(),f=B(),g=!!J().authAccounts;V(()=>{let x=0,w=()=>{let $=J().authAccounts;if(!$)return;let X=++x;o(!1),$().then(U=>{X===x&&r(Array.isArray(U)?U:[])}).catch(()=>{X===x&&o(!0)})};w();let T=J().onAuthChanged?.(w),L=J().onAuthDevice?.($=>d($));return()=>{x++,T?.(),L?.()}},[]);let h=x=>{l(x),p.run(async()=>{let w=J().forsionSwitchAccount;if(!w)return{error:{key:"err.unavailable"}};try{await w(x)}catch(T){let L=nn(Fe(T));return L?{error:L}:void 0}finally{e.current&&l(null)}})},v=()=>void m.run(async()=>{let x=J().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(w){e.current&&d(null);let T=nn(Fe(w));return T?{error:T}:void 0}}),y=()=>void f.run(async()=>{let x=J().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(w){return{error:{raw:Fe(w)||t("err.generic")}}}}),A=p.pending||m.pending||f.pending;return a(Q,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!i&&a(Ke,{children:[a(St,{})," ",t("common.loading")]}),i&&a("div",{class:"fx-sub",children:a(Z,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&a(Ke,{children:t("local.empty")}),n&&n.length>0&&a("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-icon",children:a(P,{name:"user",size:14})}),a("span",{class:"fx-list-main",children:[a("strong",{children:x.nickname||x.username||"Forsion"}),a("small",{children:[x.username&&x.nickname?x.username:null,ru(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?a("span",{class:"fx-tag fx-tag--accent",children:[a(P,{name:"check",size:11})," ",t("local.current")]}):a(E,{pending:s===x.id,disabled:A&&s!==x.id,onClick:()=>h(x.id),children:t("local.switch")})]},x.id))}),m.pending&&c&&a("div",{class:"fx-sub",children:a(oa,{device:c})}),a("div",{class:"settings-panel-footer fx-footer",children:[a(E,{pending:m.pending,disabled:A&&!m.pending,onClick:v,children:[a(P,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),a(E,{pending:f.pending,disabled:A&&!f.pending,onClick:y,children:[a(P,{name:"logout",size:12})," ",t("local.signOut")]})]}),(p.error||m.error||f.error)&&a("div",{class:"fx-sub fx-sub--tight",children:[a(F,{a:p}),a(F,{a:m}),a(F,{a:f})]})]})}function ru(t){try{return new URL(t).host}catch{return t}}function au(){let{t}=D(),e=B();return a("div",{class:"fx-page-foot",children:[a("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await _t()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",a(P,{name:"external",size:12})]}),a("span",{class:"fx-muted",children:t("account.web.desc")}),a(F,{a:e})]})}var Ko=["cream","coral","teal","lavender"],Jo=["auto","light","dark"],Yo=["none","mist","contour","dots"],Go=["none","ring","pro"],Zo=["early","streak","author","inviter","event"];var Qo=t=>`/u/${encodeURIComponent(t)}`,la=t=>!!t&&t.toLowerCase()!=="free";function ca(t,e){let n={...t.settings,...e};return{...t,settings:n,bio:n.bio,links:n.links,skin:n.skin,mode:n.mode,cover:n.cover,frame:n.frame==="pro"&&!la(t.tier)?"none":n.frame,modules:n.modules.filter(r=>r.show).map(r=>({id:r.id}))}}function da(t,e,n){let r=t.findIndex(s=>s.id===e),i=r+n;if(r<0||i<0||i>=t.length)return t;let o=t.slice();return[o[r],o[i]]=[o[i],o[r]],o}function es(t){let e=t.trim();if(!e)return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(e)?e:`https://${e}`,r;try{r=new URL(n)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||!r.hostname.includes("."))return null;let i=r.toString();return i.length<=200?i:null}function ua(t){return t.replace(/^https?:\/\//i,"").replace(/^www\./i,"").replace(/\/$/,"")}function ts(t,e){let n=e==="zh"?[[1e8,"\u4EBF"],[1e4,"\u4E07"]]:[[1e9,"B"],[1e6,"M"],[1e3,"K"]];for(let[r,i]of n)if(t>=r){let o=t/r;return{value:o>=100?String(Math.round(o)):String(Math.round(o*10)/10),unit:i}}return{value:Math.round(t).toLocaleString("en-US"),unit:""}}var ns=t=>t==="zh"?"zh-CN":"en-US";function rs(t,e){let[n,r]=t.split("-").map(Number);if(!n||!r)return[];let i=new Intl.DateTimeFormat(ns(e),{month:"short",timeZone:"UTC"});return Array.from({length:12},(o,s)=>i.format(new Date(Date.UTC(n,r-12+s,1))))}function as(t,e){let[n,r]=t.split("-").map(Number);return!n||!r?"":new Intl.DateTimeFormat(ns(e),{year:"numeric",month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n,r-1,1)))}function is([t,e]){let n=r=>`${String((r%24+24)%24).padStart(2,"0")}:00`;return`${n(t)} \u2013 ${n(e)}`}function os(t){let e=0,n=Promise.resolve(),r=()=>{let i=e;return t.read().then(o=>{i===e&&t.apply(o)})};return{read:r,write(i){let o=++e,s=n.then(i).then(l=>{o===e&&t.apply(l)});return n=s.catch(()=>o===e?r().catch(()=>{}):void 0),s}}}var ds={skill:{key:"profile.work.skill",icon:"sparkles"},agent:{key:"profile.work.agent",icon:"bot"},plugin:{key:"profile.work.plugin",icon:"box"},space:{key:"profile.work.space",icon:"grid"},theme:{key:"profile.work.theme",icon:"palette"},"amadeus-plugin":{key:"profile.work.note",icon:"note"},webapp:{key:"profile.work.webapp",icon:"globe"}},ls={early:"sprout",streak:"flame",author:"box",inviter:"gift",event:"trophy"},cs={plus:"Plus",pro:"Pro"},pa=t=>!!t&&/^https?:\/\//i.test(t);function ma(t){if(!pa(t))return;let e=J().openExternal;e?e(t).catch(()=>{}):window.open(t,"_blank","noopener")}async function su(){let t=J().cloudInvoke;if(!t)return null;try{let e=await t("profile:publicOrigin");return e?.ok&&typeof e.origin=="string"&&/^https?:\/\/[^/]+$/i.test(e.origin)?e.origin:null}catch{return null}}async function lu(t,e,n){let r=await M(t,{method:e,body:n});if(!r.ok)throw r;if(!r.data?.profile)throw{ok:!1,status:r.status,code:null,detail:null,transport:"bad_response"};return r.data.profile}var us=t=>t&&typeof t=="object"&&t.ok===!1?Ce(t):{raw:String(t?.message||t)};function fs(){let{t}=D(),e=ke(async()=>{let[r,i,o]=await Promise.all([M("/profile/me"),M("/auth/me"),su()]);return i.ok?r.ok?r.data?.profile?{ok:!0,status:r.status,data:{profile:r.data.profile,me:i.data,origin:o}}:{ok:!0,status:404,data:null}:r.status===404?{ok:!0,status:404,data:null}:r:i});if(e.state==="loading")return a(xe,{panels:2,rows:3});if(e.state==="signedOut")return a(we,{});if(e.state==="error")return a(ve,{error:e.error,onRetry:e.retry});if(!e.data)return a(Q,{icon:"user",title:t("page.profile"),children:a(Ke,{children:t("profile.unsupported")})});let{update:n}=e;return a(cu,{data:e.data,update:r=>n(i=>i&&r(i))})}function cu(t){let{t:e}=D(),n=Se(),{profile:r,me:i,origin:o}=t.data,[s,l]=_(null),[c,d]=_(null),[p,m]=_(!1),f=K(t.update);f.current=t.update;let g=(z,G,ie)=>n.current?lu(z,G,ie):Promise.reject(new Error("unmounted")),h=We(()=>os({apply:z=>f.current(G=>({...G,profile:z})),read:()=>g("/profile/me")}),[]),v=i.username||r.username,y={...r,username:v,nickname:i.nickname||null},A=r.settings.isPublic,x=o?`${o}${Qo(v)}`:null,w=z=>{n.current&&d({tone:"error",m:us(z)})},T=z=>{d(null),t.update(G=>({...G,profile:ca(G.profile,z)})),h.write(()=>g("/profile/me","PUT",z)).catch(w)},L=async z=>{t.update(G=>({...G,profile:ca(G.profile,{modules:G.profile.settings.modules.map(ie=>({...ie,public:z.find(Pe=>Pe.id===ie.id)?.public??ie.public}))})})),await h.write(()=>g("/profile/me/visibility","POST",{public:!0,modules:z})),n.current&&(l(null),d({tone:"ok",m:{key:"profile.nowPublic"}}))},$=async()=>{m(!0),d(null);try{await h.write(()=>g("/profile/me/visibility","POST",{public:!1})),n.current&&d({tone:"ok",m:{key:"profile.nowPrivate"}})}catch(z){w(z)}finally{n.current&&m(!1)}},X=K(Promise.resolve()),U=(z,G)=>{let ie=X.current.then(async()=>{if(!n.current)return;let Pe=await M("/settings",{method:"PUT",body:z});if(n.current){if(!Pe.ok)return d({tone:"error",m:Ce(Pe)});f.current(R=>({...R,me:{...R.me,...z}})),d({tone:"ok",m:{key:G}})}});return X.current=ie,ie},H=async z=>{d(null);let G;try{G=await Vn(z)}catch(ie){return d({tone:"error",m:{key:ie instanceof Ze?"err.avatarTooLarge":"err.avatarInvalid"}})}await U({avatar:G},"account.avatar.saved")},ee=z=>{d(null),l(G=>G===z?null:z)};return a("div",{class:"fx-pf-page",children:[a(Q,{icon:A?"globe":"lock",title:e(A?"profile.state.public":"profile.state.private"),desc:e(A?"profile.state.publicDesc":"profile.state.privateDesc"),actions:a(O,{children:[a(E,{onClick:()=>ee("deco"),children:[a(P,{name:"palette",size:12})," ",e("profile.decorate")]}),A?a(E,{pending:p,onClick:()=>void $(),children:[a(P,{name:"lock",size:12})," ",e("profile.makePrivate")]}):a(E,{variant:"primary",onClick:()=>ee("publish"),children:[a(P,{name:"globe",size:12})," ",e("profile.publish")]})]}),children:[A&&x&&a(he,{label:e("profile.address"),desc:x.replace(/^https?:\/\//i,""),children:[a(Je,{text:x,label:e("profile.copyLink")}),a(E,{onClick:()=>ma(x),children:[a(P,{name:"external",size:12})," ",e("profile.openPublic")]})]}),s==="publish"&&!A&&a(du,{profile:r,url:x,submit:L,onClose:()=>l(null)}),c&&a(ae,{class:"fx-sub--tight",children:a("div",{class:`fx-msg ${c.tone==="ok"?"is-ok":"is-error"}`,role:c.tone==="ok"?"status":"alert",children:Ne(c.m,e)})})]}),a("div",{class:"fx-pf-home","data-deco":s==="deco"?"":void 0,children:[a("div",{class:"fx-pf-root",children:a(mu,{view:y,avatar:i.avatar||null,pinned:r.settings.pinned,owner:{onAvatar:z=>void H(z),onNickname:z=>{d(null),U({nickname:z},"account.nickname.saved")},onBio:z=>T({bio:z}),onLinks:z=>T({links:z}),onPinned:z=>T({pinned:z}),onInvalidLink:()=>d({tone:"error",m:{key:"profile.linkInvalid"}})}})}),s==="deco"&&a(uu,{profile:r,onChange:T,onClose:()=>l(null)})]})]})}function du(t){let{t:e}=D(),n=Se(),{profile:r}=t,[i,o]=_({}),s=r.settings.modules.filter(g=>g.show).map(g=>({...g,public:i[g.id]??g.public})),[l,c]=_(!1),[d,p]=_(null),m=r.canPublish?null:r.publishBlockedReason||"publish_blocked";if(m)return a(ae,{children:[a(Z,{children:e(m==="machine_username"?"profile.blocked.machineUsername":"profile.blocked.publishBlocked")}),a("div",{class:"fx-inline fx-pf-foot",children:[m==="machine_username"&&a(E,{variant:"primary",onClick:()=>void _t("profile"),children:[e("profile.goRename")," ",a(P,{name:"external",size:12})]}),a(E,{onClick:t.onClose,children:e("common.cancel")})]})]});let f=async()=>{c(!0),p(null);try{await t.submit(s.map(({id:g,public:h})=>({id:g,public:h})))}catch(g){if(!n.current)return;p(us(g)),c(!1)}};return a(ae,{children:[t.url&&a("div",{class:"fx-pf-url",children:[a(P,{name:"globe",size:14}),a("span",{children:t.url.replace(/^https?:\/\//i,"")})]}),a(Z,{children:e("profile.publishDesc")}),a("div",{class:"fx-pf-checks",children:s.map(g=>a("div",{class:"fx-pf-check",children:[a("div",{children:[e(`profile.mod.${g.id}`),a("small",{children:e(`profile.modDesc.${g.id}`)})]}),a(Ve,{checked:g.public,disabled:l,label:`${e(`profile.mod.${g.id}`)} \xB7 ${e("profile.col.public")}`,onChange:h=>o(v=>({...v,[g.id]:h}))})]},g.id))}),a(Z,{children:e("profile.publishNever")}),d&&a("div",{class:"fx-msg is-error",role:"alert",children:Ne(d,e)}),a("div",{class:"fx-inline fx-pf-foot",children:[a(E,{variant:"primary",pending:l,onClick:()=>void f(),children:e("profile.publishConfirm")}),a(E,{disabled:l,onClick:t.onClose,children:e("common.cancel")})]})]})}function uu(t){let{t:e}=D(),n=t.profile.settings,r=la(t.profile.tier),i=(s,l)=>t.onChange({modules:n.modules.map(c=>c.id===s?{...c,...l}:c)}),o=s=>a("span",{class:"fx-pf-thumb",children:s});return a("aside",{class:"fx-pf-deco","aria-label":e("profile.decorate"),children:a(Q,{icon:"palette",title:e("profile.decorate"),actions:a(E,{onClick:t.onClose,children:e("common.done")}),children:a("div",{class:"fx-pf-deco-body",children:[a("h4",{children:e("profile.deco.cover")}),a("div",{class:"fx-pf-opts",children:Yo.map(s=>a("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.cover===s,onClick:()=>t.onChange({cover:s}),children:[o(a("span",{class:`fx-pf-cv-thumb fx-pf-cv-${s}`})),e(`profile.cover.${s}`)]},s))}),a("h4",{children:e("profile.deco.frame")}),a("div",{class:"fx-pf-opts",children:Go.map(s=>a("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.frame===s,disabled:s==="pro"&&!r,title:s==="pro"&&!r?e("profile.frameProHint"):void 0,onClick:()=>t.onChange({frame:s}),children:[o(a("span",{class:`fx-pf-fr-demo fx-pf-fr-${s}`,children:a("span",{class:"fx-pf-av"})})),e(`profile.frame.${s}`)]},s))}),!r&&a(Z,{children:e("profile.frameProHint")}),a("h4",{children:e("profile.deco.modules")}),a("div",{class:"fx-pf-mod-head","aria-hidden":"true",children:[a("span",{children:e("profile.col.show")}),a("span",{children:e("profile.col.public")})]}),n.modules.map((s,l)=>a("div",{class:"fx-pf-mod",children:[a("span",{children:e(`profile.mod.${s.id}`)}),a("button",{type:"button",class:"fx-icon-btn",disabled:l===0,title:e("profile.moveUp"),"aria-label":`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.moveUp")}`,onClick:()=>t.onChange({modules:da(n.modules,s.id,-1)}),children:a(P,{name:"up",size:13})}),a("button",{type:"button",class:"fx-icon-btn",disabled:l===n.modules.length-1,title:e("profile.moveDown"),"aria-label":`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.moveDown")}`,onClick:()=>t.onChange({modules:da(n.modules,s.id,1)}),children:a(P,{name:"down",size:13})}),a(Ve,{checked:s.show,label:`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.col.show")}`,onChange:c=>i(s.id,{show:c})}),a(Ve,{checked:s.show&&s.public,disabled:!s.show,label:`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.col.public")}`,onChange:c=>i(s.id,{public:c})})]},s.id)),a(Z,{children:e("profile.modulesHint")}),a("h4",{children:e("profile.deco.skin")}),a("div",{class:"fx-pf-opts",children:Ko.map(s=>a("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.skin===s,onClick:()=>t.onChange({skin:s}),children:[o(a("span",{class:"fx-pf-swatch","data-skin":s})),e(`profile.skin.${s}`)]},s))}),a("h4",{children:e("profile.deco.mode")}),a($e,{value:n.mode,label:e("profile.deco.mode"),onChange:s=>t.onChange({mode:s}),options:Jo.map(s=>({value:s,label:e(`profile.mode.${s}`)}))}),a(Z,{children:e("profile.deco.publicHint")})]})})})}function fa(t){let[e,n]=_(null),r=K(!1),i=K(null),o=e!==null;mo(()=>{o&&i.current?.focus()},[o]);let s=t.class?` ${t.class}`:"";if(e===null)return a("button",{type:"button",class:`fx-pf-ed${s}${t.value?"":" is-empty"}`,title:t.label,"aria-label":t.label,onClick:()=>{r.current=!1,n(t.value)},children:[a("span",{children:t.value||t.placeholder}),a(P,{name:t.value?"pencil":"plus",size:12})]});let l=()=>{let c=e.trim();n(null),!r.current&&c!==t.value&&t.onSave(c)};return a("span",{class:`fx-pf-ed-on${s}`,children:[a("input",{ref:i,class:"fx-input",type:"text",value:e,maxLength:t.maxLength,placeholder:t.placeholder,"aria-label":t.label,onInput:c=>n(c.currentTarget.value),onBlur:l,onKeyDown:c=>{c.isComposing||(c.key==="Enter"?c.currentTarget.blur():c.key==="Escape"&&(c.preventDefault(),r.current=!0,c.currentTarget.blur()))}}),t.counter&&a("small",{children:[Array.from(e).length,"/",t.maxLength]})]})}function Gn(t){return a("section",{class:"fx-pf-sec",style:{order:t.order},children:[a("div",{class:"fx-pf-sec-h",children:[a("h3",{children:t.title}),t.action]}),t.children]})}function fu(t){let{t:e}=D(),{work:n}=t,r=ds[n.type],i=a(O,{children:[a("div",{class:"fx-pf-work-top",children:[a("span",{class:"fx-pf-work-ico",children:a(P,{name:r?.icon??"box",size:17})}),a("div",{children:[a("div",{class:"fx-pf-work-name",children:n.name}),a("div",{class:"fx-pf-work-type",children:r?e(r.key):n.type})]})]}),a("p",{children:n.summary}),(n.countKind!=="visits"||n.count>0)&&a("div",{class:"fx-pf-work-foot",children:[a(P,{name:n.countKind==="visits"?"eye":"download",size:12}),e(n.countKind==="visits"?"profile.workVisits":"profile.workInstalls",{n:n.count.toLocaleString("en-US")})]})]}),o=n.url;return pa(o)?a("a",{class:"fx-pf-work",href:o,onClick:s=>{s.preventDefault(),ma(o)},children:i}):a("article",{class:"fx-pf-work",children:i})}function pu(t){let{t:e}=D(),n=Se(),[r,i]=_(null),[o,s]=_(()=>t.pinned.map(p=>`${p.kind}:${p.id}`));V(()=>{M("/profile/me/works").then(p=>{n.current&&i(p.ok?p.data?.works??[]:"failed")})},[]);let l=p=>`${p.kind}:${p.id}`,c=p=>s(m=>m.includes(p)?m.filter(f=>f!==p):[...m,p]);if(r===null)return a("div",{class:"fx-pf-card fx-pf-empty",children:[a(St,{})," ",e("common.loading")]});if(r==="failed"||r.length===0)return a("div",{class:"fx-pf-card fx-pf-empty",children:[a("p",{children:e(r==="failed"?"common.loadFailed":"profile.worksNone")}),a("div",{class:"fx-inline fx-pf-foot",children:[r!=="failed"&&a(E,{variant:"primary",onClick:()=>void _t("submission"),children:[e("profile.goSubmit")," ",a(P,{name:"external",size:12})]}),a(E,{onClick:t.onClose,children:e("common.cancel")})]})]});let d=()=>{let p=new Map(r.map(m=>[l(m),m]));t.onSave(o.flatMap(m=>{let f=p.get(m);return f?[{kind:f.kind,id:f.id}]:[]})),t.onClose()};return a("div",{class:"fx-pf-card fx-pf-picker",children:[r.map(p=>{let m=l(p),f=o.includes(m),g=ds[p.type];return a("button",{type:"button",class:"fx-pf-pick","aria-pressed":f,disabled:!f&&o.length>=6,onClick:()=>c(m),children:[a("div",{children:[p.name,a("small",{children:[g?e(g.key):p.type," \xB7 ",p.summary]})]}),f&&a(P,{name:"check",size:15})]},m)}),a("div",{class:"fx-inline fx-pf-foot",children:[a("span",{class:"fx-grow",children:o.length?e("profile.worksPicked",{n:o.length,max:6}):e("profile.worksAuto")}),a(E,{variant:"primary",onClick:d,children:e("common.done")}),a(E,{onClick:t.onClose,children:e("common.cancel")})]})]})}function mu(t){let{t:e,locale:n}=D(),{view:r,owner:i}=t,o=K(null),[s,l]=_(!1),c=r.nickname||r.username,d=(r.tier||"free").toLowerCase(),p=r.modules.map(R=>R.id),m=R=>p.indexOf(R),f=R=>m(R)>=0,g=r.stats,h=g?ts(g.totalTokens,n):null,v=e("profile.unit.days"),y=g&&h?[[h.value,h.unit,e("profile.stat.tokens")],[String(g.activeDays),v,e("profile.stat.activeDays")],[String(g.longestStreak),v,e("profile.stat.longest")],[String(g.currentStreak),v,e("profile.stat.current")],[g.installs.toLocaleString("en-US"),"",e("profile.stat.installs")]]:[],A=g&&f("stats")&&a("div",{class:"fx-pf-stats",style:{order:m("stats")},children:y.map(([R,fe,ft])=>a("div",{class:"fx-pf-stat",children:[a("b",{children:[R,fe&&a("small",{children:fe})]}),a("span",{children:ft})]},ft))},"stats"),x=p[0]==="stats",w=r.works||[],T=f("works")&&a(Gn,{order:m("works"),title:e("profile.works"),action:!s&&a("button",{type:"button",class:"fx-link",onClick:()=>l(!0),children:e("profile.worksPick")}),children:s?a(pu,{pinned:t.pinned,onSave:i.onPinned,onClose:()=>l(!1)}):w.length?a("div",{class:"fx-pf-works",children:w.map(R=>a(fu,{work:R},`${R.kind}:${R.id}`))}):a("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.worksEmpty")})},"works"),L=r.activity,$=f("activity")&&L&&a(Gn,{order:m("activity"),title:e("profile.activity"),children:a("div",{class:"fx-pf-card",children:[a("div",{class:"fx-pf-hm",role:"img","aria-label":e("profile.activityDays",{n:L.activeDays}),children:L.levels.map((R,fe)=>a("i",{class:R?`l${R}`:void 0},fe))}),a("div",{class:"fx-pf-hm-months","aria-hidden":"true",children:rs(L.end,n).map((R,fe)=>a("span",{children:R},fe))}),a("div",{class:"fx-pf-hm-foot",children:[a("span",{children:e("profile.activityDays",{n:L.activeDays})}),a("span",{class:"fx-pf-hm-legend","aria-hidden":"true",children:[e("profile.less"),a("i",{}),a("i",{class:"l1"}),a("i",{class:"l2"}),a("i",{class:"l3"}),a("i",{class:"l4"}),e("profile.more")]})]})]})},"activity"),X=(r.badges||[]).filter(R=>Zo.includes(R.id)),U=f("badges")&&a(Gn,{order:m("badges"),title:e("profile.badges"),children:X.length?a("div",{class:"fx-pf-card fx-pf-rows",children:X.map(R=>a("div",{class:"fx-pf-brow",children:[a("span",{class:"fx-pf-badge",children:a(P,{name:ls[R.id],size:14})}),a("div",{children:[a("b",{children:e(`profile.badge.${R.id}`)}),a("span",{children:e(`profile.badgeSub.${R.id}`,{value:R.value??""})})]})]},R.id))}):a("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.badgesEmpty")})},"badges"),H=r.insights,ee=[];H?.topModel&&ee.push([e("profile.insightModel"),H.topModel]),H?.activeHours&&ee.push([e("profile.insightHours"),is(H.activeHours)]);let z=f("insights")&&a(Gn,{order:m("insights"),title:e("profile.insights"),children:ee.length?a("div",{class:"fx-pf-card fx-pf-rows",children:ee.map(([R,fe])=>a("div",{class:"fx-pf-row",children:[a("span",{children:R}),a("b",{children:fe})]},R))}):a("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.insightsEmpty")})},"insights"),G=[!x&&A,T,$].filter(Boolean),ie=[U,z].filter(Boolean),Pe=R=>{if(!R)return;let fe=es(R);if(!fe)return i.onInvalidLink();r.links.includes(fe)||i.onLinks([...r.links,fe])};return a("div",{class:"fx-pf","data-cover":r.cover,"data-frame":r.frame,children:[a("div",{class:"fx-pf-cover"}),a("div",{class:"fx-pf-id",children:[a("button",{type:"button",class:"fx-pf-avatar",title:e("account.avatar.change"),"aria-label":e("account.avatar.change"),onClick:()=>o.current?.click(),children:[a("span",{class:"fx-pf-av",children:t.avatar?a("img",{src:t.avatar,alt:""}):a("span",{class:"fx-pf-av-fallback",children:Kn(c)})}),a("span",{class:"fx-pf-av-mask",children:a(P,{name:"pencil",size:18})})]}),a("input",{ref:o,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:R=>{let fe=R.currentTarget,ft=fe.files?.[0];fe.value="",ft&&i.onAvatar(ft)}}),a("div",{class:"fx-pf-id-text",children:[a("div",{class:"fx-pf-name",children:[a(fa,{value:c,placeholder:r.username,maxLength:40,label:e("account.nickname.edit"),onSave:R=>{R&&i.onNickname(R)}}),cs[d]&&a("span",{class:`fx-tag${d==="pro"?" fx-pf-tier-pro":" fx-tag--accent"}`,children:cs[d]})]}),a("div",{class:"fx-pf-handle",children:["@",r.username]})]}),X.length>0&&f("badges")&&a("div",{class:"fx-pf-badges",children:X.map(R=>a("span",{class:"fx-pf-badge",title:e(`profile.badge.${R.id}`),children:a(P,{name:ls[R.id],size:14})},R.id))})]}),a("div",{class:"fx-pf-sub",children:[a(fa,{class:"fx-pf-bio",value:r.bio,placeholder:e("profile.bioPlaceholder"),maxLength:80,label:e("profile.bio"),counter:!0,onSave:i.onBio}),a("div",{class:"fx-pf-meta",children:[r.joinedMonth&&a("span",{children:[a(P,{name:"calendar",size:13}),e("profile.joined",{date:as(r.joinedMonth,n)})]}),r.links.map(R=>a("span",{children:[a(P,{name:"link",size:13}),pa(R)?a("a",{href:R,onClick:fe=>{fe.preventDefault(),ma(R)},children:ua(R)}):a("span",{children:ua(R)}),a("button",{type:"button",class:"fx-pf-x",title:e("profile.linkRemove"),"aria-label":e("profile.linkRemove"),onClick:()=>i.onLinks(r.links.filter(fe=>fe!==R)),children:a(P,{name:"x",size:11})})]},R)),r.links.length<2&&a(fa,{value:"",placeholder:e("profile.linkAdd"),maxLength:200,label:e("profile.linkAdd"),onSave:Pe},r.links.length)]})]}),x&&A,a("div",{class:"fx-pf-body","data-cols":G.length&&ie.length?2:1,children:[a("div",{class:"fx-pf-main",children:G}),ie.length>0&&a("div",{class:"fx-pf-side",children:ie})]})]})}function Y(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 gu(t,e){let n=Y(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,Y(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var hu=15;function Tt(t,e){let n=gu(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,Y(t)??0),i=n===0&&r>0&&(Y(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:i,low:n<=hu}}function Zn(t,e){let n=Y(e);if(n===null||n<=0)return null;let r=Y(t);if(r===null)return null;let i=Math.max(0,r);if(i===0)return"0%";let o=i/n*100;if(o<.1)return"<0.1%";let s=Math.round(o*10)/10;return s<10?`${s}%`:`${Math.round(o).toLocaleString("en-US")}%`}var bu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function ms(){let t=ke(async()=>{let[s,l,c,d]=await Promise.all([M("/token-quota/my"),M("/credits/balance"),M("/features"),M("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?Y(l.data?.balance):null,balanceFailed:!l.ok,features:c.ok&&c.data&&typeof c.data=="object"?c.data:{},invite:d.ok?d.data:null,inviteState:bu(d)}}:s});if(t.state==="loading")return a(xe,{panels:3,rows:2});if(t.state==="signedOut")return a(we,{});if(t.state==="error")return a(ve,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,i=e.features.redemption_codes!==!1,o=e.features.payment!==!1;return a(O,{children:[a(vu,{data:e,update:n,onFailed:t.reload}),a(ku,{data:e,payment:o,onRetry:t.reload}),r?.modelId?a(_u,{bg:r,update:n}):null,(e.inviteState!=="hidden"||i)&&a(Su,{data:e,update:n,redeemEnabled:i,onRedeemed:t.reload})]})}var ps=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function xu(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function vu(t){let{t:e,locale:n,ctx:r}=D(),i=t.data.quota,o=Tt(i.dailyRemaining,i.dailyLimit),s=Tt(i.weeklyRemaining,i.weeklyLimit),l=Io(i.weeklyResetAt,n),c=Math.max(0,Y(i.resetCards)??0),d=Y(i.resetCardPricePoints)??100,p=B(),m=B(),[f,g]=_(null),[h,v]=_("1"),y=/^\d+$/.test(h.trim())?Number(h.trim()):NaN,A=Number.isInteger(y)&&y>=1&&y<=50,x=A?y*d:null,w=t.data.balance,T=x!==null&&w!==null&&w<x,L=()=>void p.run(async()=>{let U={daily:o,weekly:s},H=ps(i);g(null);let ee=J(),z=await Fn(ee.accountUseResetCard?()=>ee.accountUseResetCard("both"):null,()=>M("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!z.ok)return t.onFailed(),ue(z);let G=z.data?.quota,ie=Y(z.data?.resetCards);return t.update(Pe=>({...Pe,quota:{...Pe.quota,...G??{},resetCards:ie??Pe.quota.resetCards}})),G&&!xu(r.app,{before:H,after:ps(G),remainingCards:ie??void 0})&&g({before:U,after:{daily:Tt(G.dailyRemaining,G.dailyLimit),weekly:Tt(G.weeklyRemaining,G.weeklyLimit)},cards:ie}),{success:{key:"card.used"}}}),$=()=>void m.run(async()=>{if(!A)return{error:{key:"err.invalidCount"}};let U=await M("/points/exchange-reset-cards",{method:"POST",body:{count:y,expectedPricePerCard:d}});return U.ok?(t.update(H=>({...H,quota:{...H.quota,resetCards:Y(U.data?.resetCards)??H.quota.resetCards},balance:Y(U.data?.newPointsBalance)??H.balance})),v("1"),{success:{key:"card.exchanged",vars:{n:Y(U.data?.cardsGranted)??y}}}):(t.onFailed(),ue(U))}),X=U=>U.unlimited?e("common.unlimited"):U.text;return a(Q,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(on,{label:e("common.today"),display:o,note:o.unlimited?null:e("quota.resetDaily")}),a(on,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),a(he,{label:e("card.title"),desc:e("card.desc"),children:[a("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:c})}),a(tt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:p.pending,disabled:c<=0,onConfirm:L})]}),c<=0&&!p.success&&a(ae,{children:a(Z,{children:e("card.noneHint")})}),(p.error||p.success)&&a(ae,{children:[a(F,{a:p}),p.success&&f&&a("div",{class:"fx-ceremony",role:"status",children:[a("span",{children:[e("common.today")," ",a("b",{children:X(f.before.daily)})," \u2192 ",a("b",{children:X(f.after.daily)})]}),a("span",{children:[e("common.thisWeek")," ",a("b",{children:X(f.before.weekly)})," \u2192 ",a("b",{children:X(f.after.weekly)})]}),f.cards!==null&&a("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),a(he,{label:e("card.exchange"),desc:e("card.price",{price:re(d,n)}),class:"fx-row--wide",children:[a("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:U=>{v(U.currentTarget.value),m.clear()}}),a("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:re(x,n)}):e("card.countHint")}),a(tt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?re(x,n):"\u2014"}),pending:m.pending,disabled:!A||T,onConfirm:$})]}),(T||m.error||m.success)&&a(ae,{children:[T&&!m.error&&a(Z,{tone:"warn",children:e("err.insufficientPoints")}),a(F,{a:m})]})]})}function yu(t,e,n){let r=B(),[i,o]=_(null);return{checked:i??t,toggle:l=>{o(l),r.run(async()=>{let c=await e(l);if(o(null),!c.ok)return ue(c);n(l)})},action:r}}function ku(t){let{t:e,locale:n}=D(),r=B(),i=()=>void r.run(async()=>await $t("credits")?void 0:{error:{key:"err.openFailed"}});return a(Q,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?a(E,{variant:"primary",pending:r.pending,onClick:i,children:e("points.recharge")}):void 0,children:[a(he,{label:e("points.balance"),children:t.data.balance!==null?a("span",{class:"fx-big","data-testid":"points-balance",children:re(t.data.balance,n)}):a("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a(ae,{children:a(F,{a:r})})]})}var wu=[5,10,20];function _u(t){let{t:e}=D(),{bg:n}=t,r=Tt(n.dailyRemaining,n.dailyLimit),i=Tt(n.weeklyRemaining,n.weeklyLimit),o=B(),[s,l]=_(null),c=yu(!!n.autoMain,p=>{let m=J();return Fn(m.accountBgAutoMain?()=>m.accountBgAutoMain(p):null,()=>M("/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),o.run(async()=>{let m=J(),f=await Fn(m.accountBgConvert?()=>m.accountBgConvert(p):null,()=>M("/token-quota/background/convert",{method:"POST",body:{percent:p}}));if(l(null),!f.ok)return ue(f);let g=f.data?.quota;return g&&t.update(v=>({...v,quota:{...v.quota,...g,resetCards:v.quota.resetCards,resetCardPricePoints:v.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:p}}}})};return a(Q,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(on,{label:e("common.today"),display:r}),a(on,{label:e("common.thisWeek"),display:i})]}),a(he,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:a(Ve,{checked:c.checked,disabled:c.action.pending,label:e("bg.autoMain"),onChange:c.toggle})}),a(he,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:wu.map(p=>a(tt,{label:`${p}%`,confirmLabel:e("bg.convertConfirm",{pct:p}),pending:o.pending&&s===p,disabled:o.pending&&s!==p,onConfirm:()=>d(p)},p))}),(o.error||o.success||c.action.error)&&a(ae,{children:[a(F,{a:c.action}),a(F,{a:o})]})]})}function Su(t){let{t:e,locale:n}=D(),{invite:r,inviteState:i}=t.data,[o,s]=_(null),[l,c]=_(""),[d,p]=_(""),m=B(),f=B(),g=B();V(()=>{let x=!0;return J().authStatus?.().then(w=>{x&&s(w?.cloudUrl?w.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let h=async()=>{let x=await M("/invite/my-code");return t.update(w=>({...w,invite:x.ok?x.data:w.invite,inviteState:x.ok?"ok":x.status===404?"hidden":w.inviteState})),x},v=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let w=await M("/invite/claim",{method:"POST",body:{code:x}});return w.ok?(c(""),h(),{success:{key:"invite.claimed"}}):ue(w)}),y=()=>void f.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let w=await M("/redemption/redeem",{method:"POST",body:{code:x}});if(!w.ok)return ue(w);p(""),t.onRedeemed();let T=[],L=Y(w.data?.creditsAmount);L&&T.push(e("redeem.gotPoints",{n:re(L,n)})),w.data?.membershipPlanId&&T.push(e("redeem.gotMembership"));for(let $ of Array.isArray(w.data?.items)?w.data.items:[]){let X=(n==="zh"?$?.label?.zh:$?.label?.en)||$?.label?.zh||$?.label?.en||$?.kind;X&&T.push(X)}return{success:T.length?{key:"redeem.successWith",vars:{what:T.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),A=r?.code&&o?`${o}/auth?invite=${encodeURIComponent(r.code)}`:"";return a(Q,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[i==="ok"&&r?.code&&a(he,{label:e("invite.myCode"),desc:e("invite.count",{n:re(Y(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[a("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),a(Je,{text:r.code,label:e("invite.copyCode")}),a(Je,{text:A,label:e("invite.copyLink"),disabled:!A})]}),i==="failed"&&a(ae,{children:a(Z,{tone:"warn",children:[e("invite.loadFailed")," ",a("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await h()}),children:e("common.retry")})]})}),i==="ok"&&r?.claim?.eligible&&a(he,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),v()},children:[a("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>c(x.currentTarget.value)}),a(E,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&a(ae,{children:a(F,{a:m})}),t.redeemEnabled&&a(he,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[a("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>p(x.currentTarget.value)}),a(E,{submit:!0,pending:f.pending,children:e("redeem.submit")})]})}),(f.error||f.success)&&a(ae,{children:a(F,{a:f})})]})}function Au(t){let e=[],n,r=new Map;for(let i of t)if(i.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},e.push(n)),n.items.push(i);else if(i.itemType==="custom_item"&&i.itemDefinition?.stackable){let o=`${i.productId||i.id}:${JSON.stringify(i.itemDefinition)}`,s=r.get(o);s||(s={id:`custom:${o}`,items:[],resetCard:!1},r.set(o,s),e.push(s)),s.items.push(i)}else e.push({id:i.id,items:[i],resetCard:!1});return e}function gs(){let t=ke(()=>M("/shop/inventory"));return t.state==="loading"?a(xe,{panels:1,rows:4}):t.state==="signedOut"?a(we,{}):t.state==="error"?a(ve,{error:t.error,onRetry:t.retry}):a(Cu,{items:t.data??[],onRefresh:t.reload,onUsed:e=>{t.update(n=>n.filter(r=>r.id!==e.itemId)),t.reload()}})}function Cu(t){let{t:e,locale:n,goTo:r}=D(),[i,o]=_(null),[s,l]=_(null),c=Se(),d=Au(t.items),p=d.find(h=>h.id===i),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"),g=h=>{c.current&&(l(h),t.onUsed(h))};return a(Q,{icon:"backpack",title:e("page.backpack"),desc:e("backpack.desc"),actions:a(E,{onClick:t.onRefresh,children:[a(P,{name:"refresh",size:13}),e("backpack.refresh")]}),children:a("div",{class:"fx-backpack fx-block",children:[a("div",{class:"fx-backpack-summary",children:[a("span",{children:e("backpack.total",{n:re(t.items.length,n)})}),r&&a("button",{class:"fx-link",type:"button",onClick:()=>r("quota"),children:e("backpack.getCards")})]}),s&&a("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[a(P,{name:"gift",size:20}),a("div",{children:[a("strong",{children:s.message[n]}),a("div",{children:s.effects.map(h=>hs(h,e,n)).join(" \xB7 ")})]})]},s.itemId),a("div",{class:"fx-backpack-layout",children:[a("div",{children:[a("div",{class:"fx-backpack-grid",role:"group","aria-label":e("backpack.grid"),children:[d.map(h=>{let v=f(h);return a("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:v,n:h.items.length}),title:v,onClick:()=>o(h.id),children:[a("span",{class:"fx-backpack-icon",children:h.items[0].itemDefinition?.icon?a("span",{class:"fx-backpack-emoji",children:h.items[0].itemDefinition.icon}):a(P,{name:h.resetCard?"card":"gift",size:30})}),a("span",{class:"fx-backpack-name",children:v}),(h.resetCard||h.items[0].itemDefinition?.stackable)&&a("span",{class:"fx-backpack-count",children:["\xD7",re(h.items.length,n)]})]},h.id)}),Array.from({length:m},(h,v)=>a("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${v}`))]}),!d.length&&a("p",{class:"fx-backpack-empty",children:e("backpack.empty")})]}),p?a(Tu,{slot:p,name:f(p),onUsed:g},`${p.id}:${p.items[0].id}`):a("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[a(P,{name:"backpack",size:30}),a(Z,{children:e(d.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function hs(t,e,n){return t.type==="points"?e("backpack.effect.points",{n:re(t.amount,n)}):t.type==="reset_card"?e("backpack.effect.cards",{n:re(t.count,n)}):e("backpack.effect.quota")}function Tu(t){let{t:e,locale:n,goTo:r}=D(),i=t.slot.items[0],[o,s]=_(null),l=B(),c=B(),[d,p]=_(!1),m=i.itemDefinition,f=Se(),g=i.source==="points"?e("backpack.source.points"):i.source==="admin"?e("backpack.source.admin"):i.source==="reward"?e("backpack.source.reward"):e("backpack.source.other"),h=()=>void l.run(async()=>{let y=await M(`/shop/inventory/${encodeURIComponent(i.id)}`);if(f.current){if(!y.ok)return ue(y);s(y.data)}}),v=()=>void c.run(async()=>{let y=await M(`/shop/inventory/${encodeURIComponent(i.id)}/use`,{method:"POST"});if(!y.ok)return ue(y);t.onUsed(y.data)});return a("section",{class:"fx-backpack-detail","aria-label":e("backpack.details"),children:[a("span",{class:`fx-backpack-detail-icon${t.slot.resetCard?" is-card":""}`,children:m?.icon?a("span",{class:"fx-backpack-emoji",children:m.icon}):a(P,{name:t.slot.resetCard?"card":"gift",size:32})}),a("h3",{children:t.name}),a("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}`)}`]}),a("dl",{class:"fx-backpack-facts",children:[a("div",{children:[a("dt",{children:e("backpack.quantity")}),a("dd",{children:re(t.slot.items.length,n)})]}),a("div",{children:[a("dt",{children:e("backpack.acquired")}),a("dd",{children:je(i.acquiredAt,n)})]}),!t.slot.resetCard&&a("div",{children:[a("dt",{children:e("backpack.source")}),a("dd",{children:g})]})]}),m?a(O,{children:[m.description&&a(Z,{children:m.description[n]}),m.use&&a(O,{children:[a("div",{class:"fx-backpack-effects",children:m.use.effects.map((y,A)=>a("div",{children:hs(y,e,n)},A))}),d?a(O,{children:[a(Z,{children:e("backpack.consumeConfirm")}),a("div",{class:"fx-backpack-use-actions",children:[a(E,{variant:"primary",pending:c.pending,onClick:v,children:e("backpack.confirmUse")}),a(E,{disabled:c.pending,onClick:()=>p(!1),children:e("common.cancel")})]})]}):a(E,{variant:"primary",onClick:()=>p(!0),children:m.use.label?.[n]||e("backpack.use")}),a(F,{a:c,captchaSection:"backpack"})]})]}):t.slot.resetCard?a(O,{children:[a(Z,{children:e("card.desc")}),r&&a(E,{variant:"primary",onClick:()=>r("quota"),children:e("backpack.manageCards")})]}):o?a("div",{class:"fx-backpack-reveal",children:[o.codeName&&a("div",{class:"fx-muted",children:o.codeName}),o.key?a(O,{children:[a("code",{children:o.key}),a(Je,{text:o.key,label:e("backpack.copyKey")})]}):a(Z,{children:e("backpack.noKey")})]}):a(E,{pending:l.pending,onClick:h,children:[a(P,{name:"key",size:14}),e("backpack.reveal")]}),a(F,{a:l,captchaSection:"backpack"})]})}var Eu=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Pu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,bs=(t,e)=>t==="phone"?Eu.test(e):Pu.test(e),sn=(t,e)=>t==="phone"?Wn(e):Xn(e);function vs(){let t=ke(()=>M("/auth/me"));if(t.state==="loading")return a(xe,{panels:3,rows:2});if(t.state==="signedOut")return a(we,{});if(t.state==="error")return a(ve,{error:t.error,onRetry:t.retry});let e=t.data;return a(O,{children:[a(Ru,{me:e,onBound:(n,r)=>t.update(i=>({...i,[n]:r}))}),a(Lu,{me:e}),a(Nu,{}),a(Ou,{me:e})]})}function ha(){let t=Mo(),e=B();return{cd:t,a:e,send:(i,o,s)=>e.run(async()=>{let l=await M("/auth/send-code",{method:"POST",body:{target:i,type:o,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):ue(l)}),reset:()=>{t.stop(),e.clear()}}}function Ru(t){let{t:e}=D(),[n,r]=_(null),[i,o]=_(null);return a(Q,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return a(O,{children:[a(he,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?sn(s,l):e("account.contact.unbound"),children:a(E,{onClick:()=>{o(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&a(Mu,{kind:s,current:l??null,onDone:c=>{t.onBound(s,c),r(null),o(s)}}),i===s&&n!==s&&a(ae,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Mu(t){let{t:e}=D(),{kind:n}=t,[r,i]=_(""),[o,s]=_(""),l=ha(),c=B(),d=r.trim(),p=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!bs(n,d)){l.a.run(async()=>({error:{key:p}}));return}l.send(d,n,"bind")},f=()=>void c.run(async()=>{if(!bs(n,d))return{error:{key:p}};if(!o.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:o.trim()}:{email:d,verification_code:o.trim()},h=await M(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!h.ok)return ue(h);t.onDone(d)});return a(ae,{class:"fx-form",children:[a("label",{class:"fx-field",children:[a("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),a("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>i(g.currentTarget.value)})]}),a(ba,{code:o,setCode:s,sender:l,onSend:m}),a("div",{class:"fx-inline",children:a(E,{variant:"primary",pending:c.pending,onClick:f,children:e("sec.bindSubmit")})}),a(F,{a:c})]})}function ba(t){let{t:e}=D(),{cd:n,a:r}=t.sender;return a("div",{class:"fx-field",children:[a("span",{children:t.label??e("sec.code")}),a("div",{class:"fx-inline",children:[a("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:i=>t.setCode(i.currentTarget.value)}),a(E,{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")})]}),a(F,{a:r})]})}function Iu(t){let{t:e}=D(),n=Co(t.value),r=t.value.length>0,i=[[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 a("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:i.map(([o,s])=>a("li",{class:o?"is-ok":r?"is-bad":"",children:[o?a(P,{name:"check",size:11}):r?a(P,{name:"x",size:11}):a("span",{class:"fx-rule-dot","aria-hidden":"true"}),a("span",{children:s})]},s))})}function ys(t,e){let n=Ao(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:Gr[n.rule]}}}function Lu(t){let{t:e}=D(),n=["phone","email"].filter(l=>!!t.me[l]),[r,i]=_("current"),[o,s]=_(!1);return a(Q,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:a(E,{onClick:()=>s(!o),children:e(o?"common.cancel":"pw.change")}),children:o&&a(ae,{class:"fx-form",children:[a($e,{label:e("pw.modeLabel"),value:r,onChange:i,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?a(Du,{onDone:()=>s(!1)}):n.length?a(zu,{me:t.me,targets:n,onDone:()=>s(!1)}):a(Z,{children:e("pw.codeNeedsContact")})]})})}function ks(t){let{t:e}=D();return a(O,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.new")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),a(Iu,{value:t.pw}),a("label",{class:"fx-field",children:[a("span",{children:e("pw.confirm")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function Du(t){let{t:e}=D(),[n,r]=_(""),[i,o]=_(""),[s,l]=_(""),c=B(),[d,p]=_(!1),m=()=>void c.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let f=ys(i,s);if(f)return f;let g=await M("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:i}});return g.ok?(r(""),o(""),l(""),p(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:ue(g)});return a(O,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.current")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:f=>r(f.currentTarget.value)})]}),a(ks,{pw:i,setPw:o,confirm:s,setConfirm:l}),a("div",{class:"fx-inline",children:[a(E,{variant:"primary",pending:c.pending,onClick:m,children:e("pw.submit")}),d&&a(E,{onClick:t.onDone,children:e("common.done")})]}),a(F,{a:c})]})}function zu(t){let{t:e}=D(),[n,r]=_(t.targets[0]),[i,o]=_(""),[s,l]=_(""),[c,d]=_(""),p=ha(),m=B(),[f,g]=_(!1),h=t.me[n]||"",v=()=>void m.run(async()=>{if(!i.trim())return{error:{key:"err.codeRequired"}};let y=ys(s,c);if(y)return y;let A=n==="phone"?{phone:h,code:i.trim(),newPassword:s}:{email:h,code:i.trim(),newPassword:s},x=await M("/auth/reset-password",{method:"POST",body:A});return x.ok?(o(""),l(""),d(""),g(!0),{success:{key:"pw.changed"}}):ue(x)});return a(O,{children:[t.targets.length>1?a($e,{label:e("pw.via"),value:n,onChange:y=>{r(y),o(""),p.reset()},options:t.targets.map(y=>({value:y,label:sn(y,t.me[y])}))}):a(Z,{children:e("pw.codeTo",{target:sn(n,h)})}),a(ba,{code:i,setCode:o,sender:p,onSend:()=>void p.send(h,n,"reset_password")}),a(ks,{pw:s,setPw:l,confirm:c,setConfirm:d}),a("div",{class:"fx-inline",children:[a(E,{variant:"primary",pending:m.pending,onClick:v,children:e("pw.submitReset")}),f&&a(E,{onClick:t.onDone,children:e("common.done")})]}),a(F,{a:m})]})}function Nu(){let{t}=D(),e=B(),n=()=>void e.run(async()=>{let r=await M("/auth/logout-all",{method:"POST"});if(!r.ok)return ue(r);try{await J().forsionLogout?.()}catch(i){return{error:{raw:Fe(i)}}}return{success:{key:"sec.logoutAllDone"}}});return a(Q,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[a(he,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:a(tt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&a(ae,{children:a(F,{a:e})})]})}function Ou(t){let{t:e}=D(),n=["phone","email"].filter(A=>!!t.me[A]),[r,i]=_(!1),[o,s]=_(n.length?"code":"password"),[l,c]=_(n[0]??null),[d,p]=_(""),[m,f]=_(""),g=ha(),h=B(),v=l&&t.me[l]||"",y=()=>void h.run(async()=>{if(o==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(o==="password"&&!m)return{error:{key:"pw.currentRequired"}};let A=await M("/auth/delete-account",{method:"POST",body:o==="code"?{verification_code:d.trim()}:{password:m}});if(!A.ok)return ue(A);try{await J().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return a(Q,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:a(E,{variant:"danger",onClick:()=>{i(!r),h.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&a(ae,{class:"fx-form",children:[a(Z,{tone:"error",children:e("del.warn")}),n.length>0&&a($e,{label:e("del.methodLabel"),value:o,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),o==="code"&&l?a(O,{children:[n.length>1&&a($e,{label:e("pw.via"),value:l,onChange:A=>{c(A),p(""),g.reset()},options:n.map(A=>({value:A,label:sn(A,t.me[A])}))}),a(ba,{code:d,setCode:p,sender:g,label:e("del.codeLabel",{target:sn(l,v)}),onSend:()=>void g.send(v,l,"delete_account")})]}):a("label",{class:"fx-field",children:[a("span",{children:e("del.passwordLabel")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:m,onInput:A=>f(A.currentTarget.value)})]}),a("div",{class:"fx-inline",children:a(tt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:h.pending,onConfirm:y})}),a(F,{a:h})]})})}var _s=20;function Ss(){let t=ke(async()=>{let[e,n]=await Promise.all([M("/token-quota/my"),M(`/token-quota/my/logs?limit=${_s}&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:Y(e.data?.dailyLimit),logs:r,total:n.ok?Y(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?a(xe,{panels:3,rows:2}):t.state==="signedOut"?a(we,{}):t.state==="error"?a(ve,{error:t.error,onRetry:t.retry}):a(O,{children:[a(Bu,{dailyLimit:t.data.dailyLimit}),a($u,{base:t.data,onRetry:t.reload})]})}function Bu(t){let{t:e,locale:n}=D(),[r,i]=_(30),[o,s]=_({state:"loading"}),[l,c]=_(!1),[d,p]=_(0),m=K(0);V(()=>{let w=++m.current;return c(!0),M(`/usage/stats?days=${r}`).then(T=>{w===m.current&&(c(!1),s(T.ok?{state:"ready",data:T.data??{}}:{state:"error",fail:T}))}),()=>{m.current++}},[r,d]);let f=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Zn(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=w=>Zn(w,t.dailyLimit)??"\u2014",h=a($e,{label:e("usage.range"),value:r,onChange:i,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})}]}),v=o.state==="ready"?o.data:null,y=(v?.byModel??[]).filter(Boolean),A=(v?.byProject??[]).filter(Boolean),x=Y(v?.successRate);return a(O,{children:[a(Q,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:h,children:[o.state==="error"?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:Ne(Ce(o.fail),e)}),a("button",{type:"button",class:"fx-link",onClick:()=>p(w=>w+1),children:e("common.retry")})]})}):a("div",{class:`fx-stats fx-block${l&&v?" is-refreshing":""}`,"aria-busy":l||void 0,children:[a(xa,{label:e("usage.requests"),value:v?re(Y(v.totalRequests)??0,n):null,testId:"usage-requests"}),a(xa,{label:e("usage.successRate"),value:v?x===null?"\u2014":`${x.toFixed(1)}%`:null}),a(xa,{label:e("usage.consumption"),value:v?g(v.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),f&&a("div",{class:"fx-sub fx-sub--tight",children:a(Z,{children:e(f)})})]}),o.state!=="error"&&a(O,{children:[a(Q,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:a(ws,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:y.map(w=>[w.modelName||w.modelId||"\u2014",re(Y(w.count)??0,n),g(w.pointsCost)])})}),a(Q,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:a(ws,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:A.map(w=>[As(w.projectSource,e("usage.appUnknown")),re(Y(w.count)??0,n),g(w.pointsCost)])})})]})]})}var Fu={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"},As=(t,e)=>!t||t==="unknown"?e:Fu[t]??t;function xa(t){return a("div",{class:"fx-stat",children:[a("span",{class:"fx-stat-label",children:t.label}),t.value===null?a("span",{class:"fx-skel fx-skel--stat"}):a("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&a("span",{class:"fx-stat-sub",children:t.sub})]})}function ws(t){return t.loading?a("div",{class:"fx-sub",children:[a("span",{class:"fx-skel fx-skel--row"}),a("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?a("div",{class:"fx-table-wrap fx-block",children:a("table",{class:"fx-table",children:[a("thead",{children:a("tr",{children:t.head.map((e,n)=>a("th",{class:n?"is-num":"",children:e},n))})}),a("tbody",{children:t.rows.map((e,n)=>a("tr",{children:e.map((r,i)=>a("td",{class:i?"is-num":"",children:r},i))},n))})]})}):a(Ke,{children:t.empty})}function $u(t){let{t:e,locale:n}=D(),r=Se(),[i,o]=_(t.base.logs??[]),[s,l]=_(t.base.total),c=B();V(()=>{o(t.base.logs??[]),l(t.base.total)},[t.base]);let d=()=>void c.run(async()=>{let m=await M(`/token-quota/my/logs?limit=${_s}&offset=${i.length}`);if(!m.ok)return{error:Ce(m)};let f=Array.isArray(m.data?.logs)?m.data.logs:[];r.current&&(o(g=>[...g,...f]),l(g=>f.length?Y(m.data?.total)??g:i.length))}),p=t.base.dailyLimit;return a(Q,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:Ne(Ce(t.base.logsFail),e)}),a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):i.length===0?a(Ke,{children:e("usage.recentEmpty")}):a("div",{class:"fx-list fx-block",role:"list",children:i.map((m,f)=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-main",children:[a("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&a("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),a("small",{children:[je(m.createdAt,n),As(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),a("span",{class:"fx-value",children:Zn(m.pointsCost,p)??"\u2014"})]},m.id??f))}),i.length>0&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("usage.shown",{shown:re(i.length,n),total:re(Math.max(s,i.length),n)})}),i.length<s&&a(E,{pending:c.pending,onClick:d,children:e("common.loadMore")})]}),c.error&&a("div",{class:"fx-sub fx-sub--tight",children:a(F,{a:c})})]})}var ln=20,Qn=5,Uu=5*1024*1024,er=1e4,qu={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Ts(t){let{t:e}=D(),n=t.status||"open",r=qu[n];return a("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Es(){let[t,e]=_(null),n=ke(async()=>{let r=await M(`/feedback?limit=${ln}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?a(xe,{panels:1,rows:3}):n.state==="signedOut"?a(we,{}):n.state==="error"?a(ve,{error:n.error,onRetry:n.retry}):t?a(Vu,{id:t,onBack:()=>{e(null),n.reload()}}):a(Hu,{first:n.data,onOpen:e,onChanged:n.reload})}function Hu(t){let{t:e,locale:n}=D(),r=Se(),[i,o]=_(t.first),[s,l]=_(t.first.length===ln),[c,d]=_(!1),[p,m]=_(!1),f=B();V(()=>{o(t.first),l(t.first.length===ln)},[t.first]);let g=()=>void f.run(async()=>{let h=await M(`/feedback?limit=${ln}&offset=${i.length}`);if(!h.ok)return{error:Ce(h)};let v=Array.isArray(h.data?.tickets)?h.data.tickets:[];r.current&&(o(y=>{let A=new Set(y.map(x=>x.id));return[...y,...v.filter(x=>!A.has(x.id))]}),l(v.length===ln))});return a(Q,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:c?void 0:a(E,{variant:"primary",onClick:()=>{m(!1),d(!0)},children:[a(P,{name:"plus",size:12})," ",e("fb.new")]}),children:[c&&a(ju,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),m(!0),t.onChanged()}}),p&&!c&&a(ae,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),i.length===0?a(Ke,{children:e("fb.empty")}):a("div",{class:"fx-list fx-block",role:"list",children:i.map(h=>a("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(h.id),children:[a("span",{class:`fx-dot${h.user_unread?" is-on":""}`,"aria-label":h.user_unread?e("fb.unread"):void 0}),a("span",{class:"fx-list-main",children:[a("strong",{children:h.title||(h.description||"").slice(0,60)||e("fb.untitled")}),a("small",{children:je(h.updated_at||h.created_at,n)})]}),a(Ts,{status:h.status}),a(P,{name:"chevron",size:12})]},h.id))}),i.length>0&&(s||f.error)&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("fb.shown",{n:re(i.length,n)})}),s&&a(E,{pending:f.pending,onClick:g,children:e("common.loadMore")})]}),f.error&&a(ae,{children:a(F,{a:f})})]})}function Wu(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 Xu=0;function ju(t){let{t:e}=D(),n=Se(),[r,i]=_(""),[o,s]=_([]),[l,c]=_(null),[d,p]=_(!1),m=K(null),f=B(),[g,h]=_(0),v=K(0);v.current=o.length;let y=async x=>{c(null);for(let w of Array.from(x||[])){if(!w.type||!w.type.startsWith("image/")){c({key:"err.imageType"});continue}if(w.size>Uu){c({key:"err.imageTooLarge"});continue}if(v.current>=Qn){c({key:"err.tooManyImages"});break}v.current++,h(T=>T+1);try{let T=await Wu(w);if(!n.current)return;let L={id:`img-${++Xu}`,filename:w.name||"image",mime_type:w.type,size:w.size,data_base64:T.replace(/^data:[^;]+;base64,/,""),url:T};s($=>$.length>=Qn?$:[...$,L])}catch{v.current--,c({key:"err.imageRead"})}finally{n.current&&h(T=>T-1)}}},A=()=>void f.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>er)return{error:{key:"err.feedbackTooLong"}};let w=o.map(({filename:L,mime_type:$,size:X,data_base64:U})=>({filename:L,mime_type:$,size:X,data_base64:U})),T=await M("/feedback",{method:"POST",body:{description:x,attachments:w},timeoutMs:12e4});if(!T.ok)return ue(T);t.onSubmitted()});return a("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let w=Array.from(x.clipboardData?.items||[]).filter(T=>T.kind==="file").map(T=>T.getAsFile()).filter(Boolean);w.length&&(x.preventDefault(),y(w))},onDragOver:x=>{x.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:x=>{x.preventDefault(),p(!1),y(x.dataTransfer?.files)},children:[a("label",{class:"fx-field",children:[a("span",{children:e("fb.descLabel")}),a("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:er,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>i(x.currentTarget.value)})]}),a("p",{class:"fx-note",children:e("fb.imagesHint",{n:Qn})}),o.length>0&&a("div",{class:"fx-thumbs",children:o.map(x=>a("span",{class:"fx-thumb",children:[a("img",{src:x.url,alt:x.filename}),a("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(w=>w.filter(T=>T.id!==x.id)),c(null)},children:a(P,{name:"x",size:11})})]},x.id))}),l&&a("div",{class:"fx-msg is-error",role:"alert",children:Ne(l,e)}),a("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let w=x.currentTarget;y(w.files),w.value=""}}),a("div",{class:"fx-inline",children:[a(E,{disabled:o.length>=Qn||f.pending,onClick:()=>m.current?.click(),children:[a(P,{name:"image",size:12})," ",e("fb.addImages")]}),a("span",{class:"fx-grow"}),a(E,{disabled:f.pending,onClick:t.onCancel,children:e("common.cancel")}),a(E,{variant:"primary",pending:f.pending,disabled:g>0,onClick:A,children:e("fb.submit")})]}),a(F,{a:f})]})}function Vu(t){let{t:e,locale:n}=D(),[r,i]=_({state:"loading"}),[o,s]=_(0),[l,c]=_(""),[d,p]=_(null),m=B(),f=K(0);V(()=>{let T=++f.current;return M(`/feedback/${encodeURIComponent(t.id)}`).then(L=>{if(T===f.current){if(!L.ok){i({state:"error",fail:L});return}i({state:"ready",data:{ticket:L.data.ticket,replies:L.data.replies??[],attachments:L.data.attachments??[]}}),M(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{f.current++}},[t.id,o]),V(()=>{if(!d)return;let T=L=>{L.key==="Escape"&&p(null)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[d]);let g=a("div",{class:"fx-back",children:a(E,{onClick:t.onBack,children:[a(P,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return a(O,{children:[g,a(xe,{panels:1,rows:3})]});if(r.state==="error")return a(O,{children:[g,a(ve,{error:Ce(r.fail),onRetry:()=>{i({state:"loading"}),s(T=>T+1)}})]});let{ticket:h,replies:v,attachments:y}=r.data,A=h.status==="closed",x=T=>y.filter(L=>(L.reply_id??null)===T),w=()=>void m.run(async()=>{let T=l.trim();if(!T)return{error:{key:"err.replyEmpty"}};if(T.length>er)return{error:{key:"err.replyTooLong"}};let L=await M(`/feedback/${encodeURIComponent(h.id)}/replies`,{method:"POST",body:{content:T},timeoutMs:6e4});return L.ok?(c(""),s($=>$+1),{success:{key:"fb.replySent"}}):ue(L)});return a(O,{children:[g,a(Q,{icon:"message",title:h.title||e("fb.untitled"),actions:a(Ts,{status:h.status}),desc:`#${String(h.id).slice(0,8)} \xB7 ${je(h.created_at,n)}`,children:[a("div",{class:"fx-thread fx-block",children:[a(Cs,{who:"user",when:h.created_at,text:h.description||"",files:x(null),onZoom:p}),v.map((T,L)=>a(Cs,{who:T.author_role==="user"?"user":"admin",when:T.created_at,text:T.content||"",files:T.id?x(T.id):[],onZoom:p},T.id??L))]}),A?a(ae,{children:a(Z,{children:e("fb.closedNote")})}):a(ae,{class:"fx-form",children:[a("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:er,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:T=>{c(T.currentTarget.value),m.success&&m.clear()}}),a("div",{class:"fx-inline",children:[a("span",{class:"fx-grow"}),a(E,{variant:"primary",pending:m.pending,onClick:w,children:e("fb.replySend")})]}),a(F,{a:m})]})]}),d&&a("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>p(null),children:a("img",{src:d,alt:""})})]})}function Cs(t){let{t:e,locale:n}=D();return a("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[a("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",je(t.when,n)]}),a("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&a("div",{class:"fx-thumbs",children:t.files.map((r,i)=>{let o=r.mime_type||"";if(o.startsWith("image/")&&r.data_base64){let s=`data:${o};base64,${r.data_base64}`;return a("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:a("img",{src:s,alt:r.filename||""})},r.id??i)}return a("span",{class:"fx-tag",children:[a(P,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??i)})})]})}var Rs=[{id:"monthly",field:"priceMonthly",discount:"recurringPriceMonthly"},{id:"quarterly",field:"priceQuarterly",discount:"recurringPriceQuarterly"},{id:"yearly",field:"priceYearly",discount:"recurringPriceYearly"}];function Ps(t,e){let n=Rs.find(s=>s.id===e),r=Y(t.priceMonthly)??0,i=(Y(t[n.field])??0)||(e==="quarterly"?Math.round(r*300)/100:0),o=Y(t[n.discount])??0;return o>0&&o<i?o:i}function va(t,e,n){let r=re(t,n),i=String(e||"CNY").toUpperCase();return i==="CNY"?`\xA5${r}`:i==="USD"?`$${r}`:`${r} ${i}`}async function Ku(){let[t,e,n]=await Promise.all([M("/membership/my"),M("/credits/balance"),M("/features")]);return!t.ok&&wt(t)?t:!e.ok&&wt(e)?e:{ok:!0,status:200,data:{membership:t.ok?t.data?.membership??null:null,membershipFailed:!t.ok,balance:e.ok?Y(e.data?.balance):null,balanceFailed:!e.ok,features:n.ok&&n.data&&typeof n.data=="object"?n.data:{}}}}async function ya(t,e){let[n,r]=await Promise.all([Ku(),M(t)]);return n.ok?r.ok?{ok:!0,status:r.status,data:{status:n.data,list:e(r.data)}}:r:n}var ka=t=>(Array.isArray(t)?t:[]).filter(e=>!!e&&typeof e=="object"&&e.isActive!==!1),Ju=15*6e4;function wa(t){let e=K(0),n=K(0),r=K(t);return r.current=t,V(()=>{let i=()=>{let o=Date.now();o>e.current||document.visibilityState==="hidden"||o-n.current<2e3||(n.current=o,r.current?.())};return window.addEventListener("focus",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",i)}},[]),()=>{e.current=Date.now()+Ju}}function Ms(t){let e=t.membership;return e&&(e.status===void 0||e.status==="active")?e:null}function _a(t){let{t:e,locale:n}=D(),r=t.status,i=Ms(r),o=rn(i?.tier),s=o==="Free";return a("section",{class:"fx-shop-strip","aria-label":e("store.status"),children:[a("div",{class:"fx-shop-stat",children:[a("small",{children:e("store.tier")}),r.membershipFailed?a("b",{class:"is-empty",children:"\u2014"}):a("b",{"data-testid":"shop-tier",children:[s?e("member.freeName"):i?.plan?.name||o,!s&&a("i",{children:i?.expiresAt?e("member.expires",{date:jn(i.expiresAt,n)}):e("member.noExpiry")})]})]}),a("div",{class:"fx-shop-stat",children:[a("small",{children:e("store.balance")}),a("b",{class:r.balance===null?"is-empty":"","data-testid":"shop-balance",children:r.balance===null?"\u2014":re(r.balance,n)})]}),(r.membershipFailed||r.balanceFailed)&&a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")}),a("span",{class:"fx-grow"}),t.children]})}function Sa(t){return a("section",{class:"fx-shop-section",children:[a("div",{class:"fx-shop-head",children:[a("div",{children:[a("h2",{children:t.title}),t.desc&&a("p",{children:t.desc})]}),t.right]}),t.children]})}function Aa(t){let e=B(),[n,r]=_(null),i=(o,s,l,c)=>{r(o),e.run(async()=>{if(!await $t(s,l,c))return{error:{key:"err.openFailed"}};t()})};return{a:e,payingId:e.pending?n:null,open:i}}function Ca(t){return a(E,{variant:"ghost",pending:t.pending,disabled:t.disabled,onClick:t.onClick,children:[t.label,a(P,{name:"external",size:12})]})}function Ta(t){return a("div",{class:"fx-shop-empty",children:t.children})}function Is(){let{t,locale:e}=D(),n=ke(()=>ya("/payment/offerings",g=>ka(g?.membershipPlans))),r=wa(n.state==="ready"?n.reload:null),i=Aa(r),[o,s]=_("monthly");if(n.state==="loading")return a(xe,{panels:2,rows:2});if(n.state==="signedOut")return a(we,{});if(n.state==="error")return a(ve,{error:n.error,onRetry:n.retry});let{status:l,list:c}=n.data,d=l.features.payment!==!1,p=Rs.filter(g=>c.some(h=>Ps(h,g.id)>0)),m=p.some(g=>g.id===o)?o:p[0]?.id??"monthly",f=Ms(l)?.tier?.toLowerCase()??null;return a(O,{children:[a(_a,{status:l,onRetry:n.reload}),a(Sa,{title:t("store.choosePlan"),desc:t(d?"store.payHint":"store.payOff"),right:p.length>1?a($e,{value:m,label:t("store.period"),onChange:s,options:p.map(g=>({value:g.id,label:t(`store.period.${g.id}`)}))}):void 0,children:[c.length===0?a(Ta,{children:t("store.noPlans")}):a("div",{class:"fx-shop-tiers",children:c.map(g=>{let h=Ps(g,m),v=!!f&&!l.membershipFailed&&g.tier?.toLowerCase()===f;return a("article",{class:"fx-shop-tier","data-tier":g.tier,children:[a("h3",{children:[g.name||rn(g.tier),v&&a("span",{class:"fx-shop-current",children:[a(P,{name:"check",size:12}),t("store.currentTier")]})]}),a("div",{class:"fx-shop-price",children:h>0?a(O,{children:[va(h,g.currency,e),a("small",{children:t(`store.per.${m}`)})]}):"\u2014"}),a("p",{children:g.description}),d&&h>0&&a(Ca,{label:t(v?"member.renew":"store.pay"),pending:i.payingId===g.id,disabled:i.a.pending,onClick:()=>i.open(g.id,"membership",g.id,m)})]},g.id)})}),a(F,{a:i.a})]})]})}function Ls(){let{t,locale:e}=D(),n=ke(()=>ya("/payment/offerings",c=>ka(c?.packages))),r=wa(n.state==="ready"?n.reload:null),i=Aa(r);if(n.state==="loading")return a(xe,{panels:2,rows:2});if(n.state==="signedOut")return a(we,{});if(n.state==="error")return a(ve,{error:n.error,onRetry:n.retry});let{status:o,list:s}=n.data,l=o.features.payment!==!1;return a(O,{children:[a(_a,{status:o,onRetry:n.reload}),a(Sa,{title:t("store.packs"),desc:t(l?"store.packsHint":"store.payOff"),children:[s.length===0?a(Ta,{children:t("store.noPacks")}):a("div",{class:"fx-shop-grid",children:s.map(c=>{let d=Y(c.price)??0;return a(Ds,{icon:"coins",kind:t("store.kind.pack"),name:`${c.name||""} \xB7 ${t("store.nPoints",{n:re(c.credits,e)})}`,desc:c.description,meta:t("store.instant"),children:l&&d>0&&a(Ca,{label:t("store.payPrice",{price:va(d,c.currency,e)}),pending:i.payingId===c.id,disabled:i.a.pending,onClick:()=>i.open(c.id,"credits")})},c.id)})}),a(F,{a:i.a})]})]})}function Ds(t){return a("article",{class:"fx-shop-card",children:[a("div",{class:"fx-shop-visual","aria-hidden":"true",children:t.emoji?a("span",{class:"fx-shop-emoji",children:t.emoji}):a(P,{name:t.icon,size:18})}),a("div",{class:"fx-shop-body",children:[a("span",{class:"fx-shop-kind",children:t.kind}),a("strong",{children:t.name}),t.desc&&a("p",{children:t.desc}),a("div",{class:"fx-shop-foot",children:[a("span",{class:"fx-shop-meta",children:t.meta}),a("span",{class:"fx-shop-acts",children:t.children})]}),t.below]})]})}var Yu={reset_card:"store.kind.card",api_quota_key:"store.kind.code"};function Gu(t){let{t:e,locale:n}=D(),{p:r}=t,i=B(),[o,s]=_(null),[l,c]=_(!1),d=Y(r.pricePoints)??0,p=Y(r.priceRmb)??0,m=typeof r.availableKeys=="number"&&r.availableKeys<=0,f=d>0&&t.balance!==null&&t.balance<d,g=()=>void i.run(async()=>{let v=await M("/shop/purchase",{method:"POST",body:{productId:r.id,payMethod:"points"},timeoutMs:3e4});return v.ok?(s(typeof v.data?.key=="string"&&v.data.key?v.data.key:null),t.onRedeemed(),{success:{key:"store.redeemed"}}):v.status===0?(c(!0),{error:{key:"store.uncertain"}}):ue(v)}),h=m?e("store.soldOut"):f?e("err.insufficientPoints"):typeof r.availableKeys=="number"?e("store.left",{n:r.availableKeys}):e("store.toBackpack");return a(Ds,{icon:r.type==="api_quota_key"?"key":"gift",emoji:r.icon,kind:e(Yu[r.type||""]??"store.kind.item"),name:r.name||"",desc:r.description,meta:h,below:a(O,{children:[a(F,{a:i}),o&&a("div",{class:"fx-shop-key",children:[a("code",{children:o}),a(Je,{text:o,label:e("backpack.copyKey")})]})]}),children:[d>0&&a(tt,{variant:"primary",pending:i.pending,disabled:m||f||l,label:e("store.redeem",{n:re(d,n)}),confirmLabel:e("store.redeemConfirm",{n:re(d,n)}),onConfirm:g}),t.payment&&p>0&&a(Ca,{label:va(p,r.currency,n),pending:t.paying,disabled:t.payBusy||m,onClick:t.onPay})]})}function zs(){let{t,goTo:e}=D(),n=ke(()=>ya("/shop/products",d=>ka(d))),r=wa(n.state==="ready"?n.reload:null),i=Aa(r);if(n.state==="loading")return a(xe,{panels:2,rows:2});if(n.state==="signedOut")return a(we,{});if(n.state==="error")return a(ve,{error:n.error,onRetry:n.retry});let{status:o,list:s}=n.data,l=o.features.payment!==!1,c=o.features.shop!==!1;return a(O,{children:[a(_a,{status:o,onRetry:n.reload,children:e&&a(E,{onClick:()=>e("backpack"),children:t("store.openBackpack")})}),a(Sa,{title:t("store.redeemTitle"),desc:t("store.redeemHint"),children:[!c||s.length===0?a(Ta,{children:t(c?"store.noItems":"store.itemsOff")}):a("div",{class:"fx-shop-grid",children:s.map(d=>a(Gu,{p:d,balance:o.balance,payment:l,paying:i.payingId===d.id,payBusy:i.a.pending,onPay:()=>i.open(d.id,"storefront"),onRedeemed:n.reload},d.id))}),a(F,{a:i.a})]})]})}var Zu="forsion-extend",Ns=[{id:"account",titleKey:"page.account",Component:Vo},{id:"profile",titleKey:"page.profile",Component:fs},{id:"quota",titleKey:"page.quota",Component:ms},{id:"backpack",titleKey:"page.backpack",Component:gs},{id:"security",titleKey:"page.security",Component:vs},{id:"usage",titleKey:"page.usage",Component:Ss},{id:"feedback",titleKey:"page.feedback",Component:Es}],Os=[{id:"membership",titleKey:"store.membership",descKey:"store.membership.desc",icon:"crown",Component:Is},{id:"points",titleKey:"store.points",descKey:"store.points.desc",icon:"coins",Component:Ls},{id:"items",titleKey:"store.items",descKey:"store.items.desc",icon:"package",Component:zs}],Qu=t=>`forsion/fx:${Zu}:${t}`;function Bs(t){let{ctx:e,page:n}=t,[r,i]=_(()=>Xe(e.getLocale?.()));V(()=>{i(Xe(e.getLocale?.()));let l=e.subscribeLocale?.(c=>i(Xe(c)));return()=>{typeof l=="function"&&l()}},[e]);let o=We(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:Un(r),goTo:typeof l=="function"?c=>l.call(e.app,Qu(c)):null}},[e,r]),s=n.Component;return a(Zr.Provider,{value:o,children:a("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[a("style",{children:vo}),a(s,{})]})})}function Fs(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerStoreView!="function")return 0;let r=i=>()=>$n(Xe(t.getLocale?.()),i);for(let i of Os)t.registerStoreView({id:i.id,title:r(i.titleKey),description:r(i.descKey),group:r("store.group"),icon:i.icon,mount(o){return ct(a(Bs,{ctx:t,page:i}),o),()=>{ct(null,o)}}});return Os.length}function $s(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 Ns)t.registerSettingsView({id:r.id,category:"forsion",title:()=>$n(Xe(t.getLocale?.()),r.titleKey),mount(i){return ct(a(Bs,{ctx:t,page:r}),i),()=>{ct(null,i)}}});return Ns.length}var Us;if(typeof ctx<"u"){$s(ctx),Fs(ctx);let t=So(ctx);t&&(Us=()=>t.dispose())}return vl(ef);})();
618
+ `;var At=t=>typeof t=="string"?t:"";function ku(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):"",a=At(e.titleZh),i=At(e.bodyZh);return!n||!a.trim()&&!i.trim()?null:{id:n,titleZh:a,titleEn:At(e.titleEn).trim()?At(e.titleEn):null,bodyZh:i,bodyEn:At(e.bodyEn).trim()?At(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:At(e.publishedAt)||null}}function wu(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 _u=new Fr({gfm:!0,breaks:!0}),Su=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Au=/^(?:https?:|mailto:|#)/i;function So(t){return Tr.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:Su,ALLOWED_URI_REGEXP:Au})}function Cu(t,e){let n=e==="markdown"?_u.parse(t,{async:!1}):t;return So(n)}var qn=null;function Tu(){if(qn===null)try{let t=So('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');qn=Tr.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{qn=!1}return qn}function Pu(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Eu="http://www.w3.org/1999/xlink";function Wn(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 a=Pu(n.getAttribute("href")??n.getAttributeNS(Eu,"href"));if(a)try{j().openExternal?.(a)?.catch(()=>{})}catch{}}function _o(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Ru(t){let{ctx:e,ann:n}=t,[a,i]=S(()=>Ke(e.getLocale?.()));X(()=>{i(Ke(e.getLocale?.()));let d=e.subscribeLocale?.(g=>i(Ke(g)));return()=>{typeof d=="function"&&d()}},[e]);let o=Ve(()=>Hn(a),[a]),s=wu(n,a),l=W(null),c=W(null),u=W(null),f=W(null),m=W(t.onClose);return m.current=t.onClose,X(()=>{let d=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let g=v=>{if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),m.current();return}if(v.key!=="Tab")return;let k=c.current,y=u.current,x=l.current;if(!k||!y||!x)return;let w=document.activeElement;if(!w||!x.contains(w)){v.preventDefault(),(v.shiftKey?y:k).focus();return}v.shiftKey&&(w===k||w===x)?(v.preventDefault(),y.focus()):!v.shiftKey&&w===y&&(v.preventDefault(),k.focus())},h=v=>{let k=l.current;k&&v.target instanceof Node&&!k.contains(v.target)&&k.focus()};return window.addEventListener("keydown",g,!0),document.addEventListener("focusin",h,!0),()=>{window.removeEventListener("keydown",g,!0),document.removeEventListener("focusin",h,!0),d?.isConnected&&d.focus()}},[]),X(()=>{let d=f.current;if(!d)return;let g=_o(d);return g.addEventListener("click",Wn),g.addEventListener("auxclick",Wn),()=>{g.removeEventListener("click",Wn),g.removeEventListener("auxclick",Wn)}},[]),X(()=>{let d=f.current;if(!d)return;let g=document.createElement("style");g.textContent=wo;let h=document.createElement("div");h.className="doc",h.appendChild(Cu(s.body,n.format)),_o(d).replaceChildren(g,h)},[s.body,n.format]),r("div",{class:"fx-ann-backdrop",children:[r("style",{children:ko}),r("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:[r("button",{ref:c,type:"button",class:"fx-ann-close","aria-label":o("ann.close"),onClick:()=>m.current(),children:r(E,{name:"x",size:16})}),r("div",{class:"fx-ann-eyebrow",children:o("ann.eyebrow")}),r("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),r("div",{class:"fx-ann-body",children:r("div",{ref:f,id:"fx-ann-body",class:"fx-ann-doc"})}),r("div",{class:"fx-ann-footer",children:r("button",{ref:u,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:o("ann.ok")})})]})]})}function Mu(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Iu(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(a=>{let i=()=>{o.disconnect(),clearTimeout(s),a()},o=new MutationObserver(()=>{n.isConnected||i()});o.observe(n.parentNode,{childList:!0});let s=setTimeout(i,e)}):Promise.resolve()}function Ao(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Mu(e.location?.search))return null;let a=0,i=!1,o=null,s=Promise.resolve(),l=f=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let d=!1,g=h=>{d||(d=!0,o?.id===f.id&&(o=null),ut(null,m),m.remove(),h&&(s=M(`/announcements/${encodeURIComponent(f.id)}/seen`,{method:"POST"})))};o={id:f.id,finish:g},ut(r(Ru,{ctx:t,ann:f,onClose:()=>g(!0)}),m)},c=async()=>{let f=++a;await s;let m=await M("/announcements/pending");if(i||f!==a||!m.ok)return;let d=ku(m.data?.announcement);!d||o||Tu()&&(await Iu(),!(i||f!==a||o)&&l(d))},u=n.onAuthChanged?.(f=>{o?.finish(!1),f?.loggedIn?c():a++});return c(),{check:c,dispose(){i=!0,a++,typeof u=="function"&&u(),o?.finish(!1)}}}function Co(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 To(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 Po={\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 Eo={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",machine_username:"profile.blocked.machineUsername",publish_blocked:"profile.blocked.publishBlocked",invalid_settings:"profile.invalid"},Ro={"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"},Qr={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 Lu(t){if(t.code&&Eo[t.code])return Eo[t.code];if(t.detail){if(Ro[t.detail])return Ro[t.detail];let e=Po[t.detail];if(e)return Qr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function Ce(t){let e=Lu(t);return e?{key:e}:wt(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 nn(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 ea=io(null);function D(){let t=bo(ea);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var Ue=()=>D().t;function we(){let t=W(!0);return X(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var Mo={pending:!1,error:null,success:null,captcha:!1};function O(){let t=we(),[e,n]=S(Mo),a=W(!1),i=pt(async s=>{if(a.current)return;a.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)}}}a.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),o=pt(()=>{a.current||n(Mo)},[]);return{...e,run:i,clear:o}}var ue=t=>({error:Ce(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function Io(){let[t,e]=S(0),n=W(null);X(()=>()=>{n.current&&clearInterval(n.current)},[]);let a=pt((o=60)=>{n.current&&clearInterval(n.current),e(o),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),i=pt(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:a,stop:i}}function ve(t){let[e,n]=S({state:"loading"}),a=W(0),i=W(t);i.current=t;let o=pt((c=!1)=>{let u=++a.current;c||n({state:"loading"}),(async()=>{let f;try{f=await i.current()}catch(m){f={ok:!1,status:0,code:null,detail:null,transport:String(m?.message||m)}}u===a.current&&(f.ok?n({state:"ready",data:f.data,gen:u}):wt(f)?n({state:"signedOut"}):(f.status===401&&j().authStatus?.().catch(()=>{}),n({state:"error",fail:f})))})()},[]);X(()=>{o();let c=j().onAuthChanged?.(()=>o());return()=>{a.current++,c?.()}},[o]);let s=pt(()=>o(),[o]),l=pt(()=>o(!0),[o]);switch(e.state){case"ready":{let c=e.gen,u=f=>n(m=>m.state==="ready"&&m.gen===c?{...m,data:f(m.data)}:m);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 jn(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 Xn(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let a=e.slice(0,n);return`${a.slice(0,a.length<=2?1:2)}***${e.slice(n)}`}function rn(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Du=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Lo(t,e){let n=String(t||"").trim(),a,i,o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(o)a=Number(o[2]),i=Number(o[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);a=Number(l.find(c=>c.type==="month")?.value),i=Number(l.find(c=>c.type==="day")?.value)}return!(a>=1&&a<=12)||!(i>=1&&i<=31)?null:e==="zh"?`${a}\u6708${i}\u65E5`:`${Du[a-1]} ${i}`}var ta=t=>t==="zh"?"zh-CN":"en-US";function Do(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 Vn(t,e){let n=Do(t);return n?new Intl.DateTimeFormat(ta(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Je(t,e){let n=Do(t);return n?new Intl.DateTimeFormat(ta(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function re(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(ta(e),{maximumFractionDigits:2}).format(n):"\u2014"}var Qe=class extends Error{};async function Kn(t,e=256){if(t.size>20971520)throw new Qe;let n=URL.createObjectURL(t);try{let a=new Image;await new Promise((f,m)=>{a.onload=()=>f(),a.onerror=()=>m(new Error("image decode failed")),a.src=n});let i=a.naturalWidth,o=a.naturalHeight;if(!i||!o)throw new Error("empty image");if(i*o>5e7)throw new Qe;let s=Math.min(1,e/Math.max(i,o)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(i*s)),l.height=Math.max(1,Math.round(o*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(a,0,0,l.width,l.height);let u=l.toDataURL("image/jpeg",.85);if(u.length>262144)throw new Qe;return u}finally{URL.revokeObjectURL(n)}}function Jn(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 Ct=(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))(Ct||{}),zu=[0,1],No=[1,0],Oo=[2,3],Bo=[3,2],Nu={L:zu,M:No,Q:Oo,H:Bo},Ou=/^\d*$/,Bu=/^[A-Z0-9 $%*+./:-]*$/,na="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",oa=1,sa=40,zo=3,Fu=3,Yn=40,$u=10,Fo=[[-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]],$o=[[-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]],ra=class{constructor(e,n,a,i){if(this.version=e,this.ecc=n,e<oa||e>sa)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let o=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(a);if(this.drawCodewords(s),i===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let u=this.getPenaltyScore();u<l&&(i=c,l=u),this.applyMask(c)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}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 a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2===0,Ct.Timing),this.setFunctionModule(a,6,a%2===0,Ct.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 a=0;a<n;a++)for(let i=0;i<n;i++)a===0&&i===0||a===0&&i===n-1||a===n-1&&i===0||this.drawAlignmentPattern(e[a],e[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,a=n;for(let o=0;o<10;o++)a=a<<1^(a>>>9)*1335;let i=(n<<10|a)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,et(i,o));this.setFunctionModule(8,7,et(i,6)),this.setFunctionModule(8,8,et(i,7)),this.setFunctionModule(7,8,et(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,et(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,et(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,et(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let a=0;a<12;a++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let a=0;a<18;a++){let i=et(n,a),o=this.size-11+a%3,s=Math.floor(a/3);this.setFunctionModule(o,s,i),this.setFunctionModule(s,o,i)}}drawFinderPattern(e,n){for(let a=-4;a<=4;a++)for(let i=-4;i<=4;i++){let o=Math.max(Math.abs(i),Math.abs(a)),s=e+i,l=n+a;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,o!==2&&o!==4,Ct.Position)}}drawAlignmentPattern(e,n){for(let a=-2;a<=2;a++)for(let i=-2;i<=2;i++)this.setFunctionModule(e+i,n+a,Math.max(Math.abs(i),Math.abs(a))!==1,Ct.Alignment)}setFunctionModule(e,n,a,i=Ct.Function){this.modules[n][e]=a,this.types[n][e]=i}addEccAndInterleave(e){let n=this.version,a=this.ecc;if(e.length!==Gn(n,a))throw new RangeError("Invalid argument");let i=$o[a[0]][n],o=Fo[a[0]][n],s=Math.floor(aa(n)/8),l=i-s%i,c=Math.floor(s/i),u=[],f=Ju(o);for(let d=0,g=0;d<i;d++){let h=e.slice(g,g+c-o+(d<l?0:1));g+=h.length;let v=Yu(h,f);d<l&&h.push(0),u.push(h.concat(v))}let m=[];for(let d=0;d<u[0].length;d++)u.forEach((g,h)=>{(d!==c-o||h>=l)&&m.push(g[d])});return m}drawCodewords(e){if(e.length!==Math.floor(aa(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let a=this.size-1;a>=1;a-=2){a===6&&(a=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){let s=a-o,c=(a+1&2)===0?this.size-1-i:i;!this.types[c][s]&&n<e.length*8&&(this.modules[c][s]=et(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 a=0;a<this.size;a++){let i;switch(e){case 0:i=(a+n)%2===0;break;case 1:i=n%2===0;break;case 2:i=a%3===0;break;case 3:i=(a+n)%3===0;break;case 4:i=(Math.floor(a/3)+Math.floor(n/2))%2===0;break;case 5:i=a*n%2+a*n%3===0;break;case 6:i=(a*n%2+a*n%3)%2===0;break;case 7:i=((a+n)%2+a*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][a]&&i&&(this.modules[n][a]=!this.modules[n][a])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===s?(l++,l===5?e+=zo:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Yn),s=this.modules[o][u],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Yn}for(let o=0;o<this.size;o++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===s?(l++,l===5?e+=zo:l>5&&e++):(this.finderPenaltyAddHistory(l,c),s||(e+=this.finderPenaltyCountPatterns(c)*Yn),s=this.modules[u][o],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,c)*Yn}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){let l=this.modules[o][s];l===this.modules[o][s+1]&&l===this.modules[o+1][s]&&l===this.modules[o+1][s+1]&&(e+=Fu)}let n=0;for(let o of this.modules)n=o.reduce((s,l)=>s+(l?1:0),n);let a=this.size*this.size,i=Math.ceil(Math.abs(n*20-a*10)/a)-1;return e+=i*$u,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,a=[6];for(let i=this.size-7;a.length<e;i-=n)a.splice(1,0,i);return a}}finderPenaltyCountPatterns(e){let n=e[1],a=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(a&&e[0]>=n*4&&e[6]>=n?1:0)+(a&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,a){return e&&(this.finderPenaltyAddHistory(n,a),n=0),n+=this.size,this.finderPenaltyAddHistory(n,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function tt(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let a=e-1;a>=0;a--)n.push(t>>>a&1)}function et(t,e){return(t>>>e&1)!==0}var an=class{constructor(e,n,a){if(this.mode=e,this.numChars=n,this.bitData=a,n<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}getData(){return this.bitData.slice()}},Uu=[1,10,12,14],Hu=[2,9,11,13],qu=[4,8,16,16];function Uo(t,e){return t[Math.floor((e+7)/17)+1]}function Ho(t){let e=[];for(let n of t)tt(n,8,e);return new an(qu,t.length,e)}function Wu(t){if(!qo(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let a=Math.min(t.length-n,3);tt(Number.parseInt(t.substring(n,n+a),10),a*3+1,e),n+=a}return new an(Uu,t.length,e)}function ju(t){if(!Wo(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let a=na.indexOf(t.charAt(n))*45;a+=na.indexOf(t.charAt(n+1)),tt(a,11,e)}return n<t.length&&tt(na.indexOf(t.charAt(n)),6,e),new an(Hu,t.length,e)}function Xu(t){return t===""?[]:qo(t)?[Wu(t)]:Wo(t)?[ju(t)]:[Ho(Ku(t))]}function qo(t){return Ou.test(t)}function Wo(t){return Bu.test(t)}function Vu(t,e){let n=0;for(let a of t){let i=Uo(a.mode,e);if(a.numChars>=1<<i)return Number.POSITIVE_INFINITY;n+=4+i+a.bitData.length}return n}function Ku(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 aa(t){if(t<oa||t>sa)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 Gn(t,e){return Math.floor(aa(t)/8)-Fo[e[0]][t]*$o[e[0]][t]}function Ju(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let a=0;a<t-1;a++)e.push(0);e.push(1);let n=1;for(let a=0;a<t;a++){for(let i=0;i<e.length;i++)e[i]=ia(e[i],n),i+1<e.length&&(e[i]^=e[i+1]);n=ia(n,2)}return e}function Yu(t,e){let n=e.map(a=>0);for(let a of t){let i=a^n.shift();n.push(0),e.forEach((o,s)=>n[s]^=ia(o,i))}return n}function ia(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let a=7;a>=0;a--)n=n<<1^(n>>>7)*285,n^=(e>>>a&1)*t;return n}function Gu(t,e,n=1,a=40,i=-1,o=!0){if(!(oa<=n&&n<=a&&a<=sa)||i<-1||i>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=Gn(s,e)*8,d=Vu(t,s);if(d<=m){l=d;break}if(s>=a)throw new RangeError("Data too long")}for(let m of[No,Oo,Bo])o&&l<=Gn(s,m)*8&&(e=m);let c=[];for(let m of t){tt(m.mode[0],4,c),tt(m.numChars,Uo(m.mode,s),c);for(let d of m.getData())c.push(d)}let u=Gn(s,e)*8;tt(0,Math.min(4,u-c.length),c),tt(0,(8-c.length%8)%8,c);for(let m=236;c.length<u;m^=253)tt(m,8,c);let f=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((m,d)=>f[d>>>3]|=m<<7-(d&7)),new ra(s,e,f,i)}function jo(t,e){let{ecc:n="L",boostEcc:a=!1,minVersion:i=1,maxVersion:o=40,maskPattern:s=-1,border:l=1}=e||{},c=typeof t=="string"?Xu(t):Array.isArray(t)?[Ho(t)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let u=Gu(c,Nu[n],i,o,s,a),f=Zu({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return e?.invert&&(f.data=f.data.map(m=>m.map(d=>!d))),e?.onEncoded?.(f),f}function Zu(t,e=1){if(!e)return t;let{size:n}=t,a=n+e*2;t.size=a,t.data.forEach(o=>{for(let s=0;s<e;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:a},s=>!1)),t.data.push(Array.from({length:a},s=>!1));let i=Ct.Border;t.types.forEach(o=>{for(let s=0;s<e;s++)o.unshift(i),o.push(i)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:a},s=>i)),t.types.push(Array.from({length:a},s=>i));return t}function G(t){return r("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[r("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&r("span",{class:"settings-panel-icon",children:r(E,{name:t.icon,size:16})}),r("div",{children:[r("strong",{children:t.title}),t.desc&&r("p",{children:t.desc})]}),t.actions&&r("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function ge(t){return r("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[r("div",{class:"settings-control-copy",children:r("span",{children:[r("strong",{children:t.label}),t.desc&&r("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&r("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function ae(t){return r("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function He(t){return r("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:r("span",{})})}function P(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return r("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&&r(St,{}),t.children]})}var Qu=5e3;function nt(t){let[e,n]=S(!1),a=W(null),i=()=>{a.current&&clearTimeout(a.current),a.current=null,n(!1)};X(()=>()=>{a.current&&clearTimeout(a.current)},[]),X(()=>{(t.pending||t.disabled)&&i()},[t.pending,t.disabled]);let o=()=>{if(!e){n(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,n(!1)},Qu);return}i(),t.onConfirm()},s=t.variant??"ghost";return r(P,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:o,children:e?t.confirmLabel:t.label})}function B(t){let e=Ue(),{a:n}=t;return n.error?r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:Ne(n.error,e)}),n.captcha&&r("button",{type:"button",class:"fx-link",onClick:()=>void _t(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",r(E,{name:"external",size:12})]})]}):n.success?r("div",{class:"fx-msg is-ok",role:"status",children:Ne(n.success,e)}):null}function $(t){return r("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function Oe(t){return r("div",{class:"settings-empty-row fx-block",children:t.children})}function on(t){let e=Ue(),n=t.display;return r("div",{class:`fx-quota${n.low?" is-low":""}`,children:[r("div",{class:"fx-quota-top",children:[r("span",{class:"fx-quota-label",children:t.label}),r("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),r("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:r("span",{style:{width:`${n.pct}%`}})}),t.note&&r("div",{class:"fx-quota-note",children:t.note})]})}function qe(t){return r("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>r("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 ed(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 Ye(t){let e=Ue(),[n,a]=S("idle"),i=W(null);X(()=>()=>{i.current&&clearTimeout(i.current)},[]);let o=async()=>{let s=await ed(t.text);a(s?"copied":"failed"),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a("idle"),1800)};return r(P,{disabled:t.disabled||!t.text,onClick:()=>void o(),children:[r(E,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function td(t){let e=Ve(()=>{try{return jo(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((i,o)=>i.forEach((s,l)=>{s&&(n+=`M${l} ${o}h1v1h-1z`)}));let a=t.size??148;return r("svg",{class:"fx-qr",width:a,height:a,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[r("rect",{width:e.size,height:e.size,fill:"#fff"}),r("path",{d:n,fill:"#000"})]})}function la(t){let e=Ue(),{device:n}=t;return r("div",{class:"fx-device",children:[r(td,{value:n.url,label:e("signin.qrLabel")}),r("div",{class:"fx-device-copy",children:[r("p",{children:e("signin.deviceHint")}),n.userCode&&r("div",{class:"fx-device-code",children:[r("span",{children:e("signin.code")}),r("code",{children:n.userCode})]}),r("div",{class:"fx-inline",children:[r("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",r(E,{name:"external",size:12})]}),r(Ye,{text:n.url,label:e("signin.copyLink")})]})]})]})}function ye(){let t=Ue(),e=O(),[n,a]=S(null);X(()=>j().onAuthDevice?.(o=>a(o)),[]);let i=()=>void e.run(async()=>{let o=j().forsionLogin;if(!o)return{error:{key:"err.unavailable"}};try{await o()}catch(s){a(null);let l=nn($e(s));return l?{error:l}:void 0}});return r("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:r("div",{class:"settings-state fx-signin-body",children:[r("span",{class:"settings-state-icon",children:r(E,{name:"user",size:18})}),r("p",{class:"fx-signin-lead",children:t("signin.desc")}),r("div",{class:"settings-state-actions",children:r(P,{variant:"primary",pending:e.pending,onClick:i,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&r(la,{device:n}),r(B,{a:e})]})})}function he(t){let e=Ue(),n=t.panels??2,a=t.rows??2;return r("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(i,o)=>r("section",{class:"settings-panel fx-panel",children:[r("div",{class:"settings-panel-head",children:[r("span",{class:"fx-skel fx-skel--icon"}),r("div",{children:[r("span",{class:"fx-skel fx-skel--title"}),r("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:a},(s,l)=>r("div",{class:"settings-control-row",children:r("span",{class:"fx-skel fx-skel--row"})},l))]},o))})}function be(t){let e=Ue();return r("section",{class:"settings-panel fx-panel",children:r("div",{class:"settings-state fx-error-state",role:"alert",children:[r("span",{class:"settings-state-icon",children:r(E,{name:"alert",size:18})}),r("strong",{children:e("common.loadFailed")}),r("p",{children:Ne(t.error,e)}),r("div",{class:"settings-state-actions",children:r(P,{variant:"primary",onClick:t.onRetry,children:[r(E,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}var nd=t=>!!t&&typeof t=="object"&&typeof t.enabled=="boolean";async function ca(t,e){let n=j().cloudInvoke;if(!n)throw new Error("no_bridge");let a=await n(t,e);if(!nd(a))throw new Error(String(a?.error??"unavailable"));return a}var rd=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins","diag.item.runs"];function Xo(){let{t,locale:e}=D(),n=we(),[a,i]=S(null),o=O(),s=O();if(X(()=>{let d=!1,g=()=>{ca("diagnostics:get").then(v=>{d||i(v)},()=>{d||i(null)})};g();let h=j().onAuthChanged?.(g);return()=>{d=!0,h?.()}},[]),!a?.signedIn)return null;let l=()=>void s.run(async()=>{try{let d=await ca("diagnostics:uploadNow");return n.current&&i(d),d.lastError?{error:{key:"diag.failed",vars:{reason:d.lastError}}}:d.enabled&&d.lastUploadAt?{success:{key:"diag.uploaded"}}:void 0}catch(d){return{error:{raw:$e(d)||t("err.generic")}}}}),c=async d=>{let g=!1;await o.run(async()=>{s.clear();try{let h=await ca("diagnostics:set",d);n.current&&i(h),g=!0}catch(h){return{error:{raw:$e(h)||t("err.generic")}}}}),g&&d.enabled&&n.current&&l()},u=a.intervalHours??24,f=a.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}),m=`${a.lastUploadAt?t("diag.last",{time:Je(a.lastUploadAt,e)}):t("diag.noUpload")} \xB7 ${f}`;return r(G,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[r(ge,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:r(He,{checked:a.enabled,disabled:o.pending,label:t("diag.enable"),onChange:d=>void c({enabled:d})})}),r(ae,{class:"fx-diag",children:[r("strong",{children:t("diag.collected")}),r("ul",{children:rd.map(d=>r("li",{children:t(d)},d))}),r($,{children:t("diag.notCollected")})]}),a.sessions!==void 0&&r(ge,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:r(He,{checked:a.sessions,disabled:o.pending,label:t("diag.sessions"),onChange:d=>void c({sessions:d})})}),a.memory!==void 0&&r(ge,{label:t("diag.memory"),desc:t("diag.memoryDesc"),children:r(He,{checked:a.memory,disabled:o.pending,label:t("diag.memory"),onChange:d=>void c({memory:d})})}),r(ge,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:r(He,{checked:a.activity,disabled:o.pending,label:t("diag.activity"),onChange:d=>void c({activity:d})})}),a.enabled&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:m}),r(P,{pending:s.pending,disabled:o.pending,onClick:l,children:t("diag.uploadNow")})]}),r(ae,{class:"fx-sub--tight",children:[r($,{children:t("diag.retention",{n:a.retainDays})}),a.enabled&&a.lastError&&!s.error&&!s.success&&r("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:a.lastError})}),r(B,{a:o}),r(B,{a:s})]})]})}function Ko(){let t=ve(async()=>{let[n,a,i]=await Promise.all([M("/auth/me"),M("/membership/my"),M("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:a.ok?a.data?.membership??null:null,membershipFailed:!a.ok,features:i.ok&&i.data&&typeof i.data=="object"?i.data:{}}}:n});if(t.state==="loading")return r(he,{panels:3});if(t.state==="signedOut")return r(ye,{});if(t.state==="error")return r(be,{error:t.error,onRetry:t.retry});let{data:e}=t;return r(N,{children:[r(ad,{me:e.me,onPatch:n=>t.update(a=>({...a,me:{...a.me,...n}}))}),r(id,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),r(od,{}),r(Xo,{}),r(ld,{})]})}function ad(t){let{t:e}=D(),{me:n}=t,a=O(),i=O(),[o,s]=S(!1),[l,c]=S(""),u=W(null),f=n.nickname||n.username,m=h=>{h&&a.run(async()=>{let v;try{v=await Kn(h)}catch(y){return{error:{key:y instanceof Qe?"err.avatarTooLarge":"err.avatarInvalid"}}}let k=await M("/settings",{method:"PUT",body:{avatar:v}});return k.ok?(t.onPatch({avatar:v}),{success:{key:"account.avatar.saved"}}):{error:Ce(k)}})},d=()=>{i.clear(),c(f||""),s(!0)},g=()=>{let h=l.trim();if(!h||h===f){s(!1);return}i.run(async()=>{let v=await M("/settings",{method:"PUT",body:{nickname:h}});return v.ok?(t.onPatch({nickname:h}),s(!1),{success:{key:"account.nickname.saved"}}):{error:Ce(v)}})};return r(G,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[r("div",{class:"fx-identity fx-block",children:[r("button",{type:"button",class:"fx-avatar",disabled:a.pending,onClick:()=>u.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?r("img",{src:n.avatar,alt:""}):r("span",{class:"fx-avatar-initial",children:Jn(f)}),r("span",{class:"fx-avatar-mask",children:a.pending?r(St,{size:14}):r(E,{name:"pencil",size:14})})]}),r("input",{ref:u,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:h=>{let v=h.currentTarget;m(v.files?.[0]),v.value=""}}),r("div",{class:"fx-identity-main",children:[o?r("form",{class:"fx-inline",onSubmit:h=>{h.preventDefault(),g()},children:[r("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:h=>c(h.currentTarget.value),onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),s(!1))}}),r(P,{variant:"primary",submit:!0,pending:i.pending,children:e("common.save")}),r(P,{disabled:i.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):r("div",{class:"fx-name-row",children:[r("span",{class:"fx-name",children:f}),r("button",{type:"button",class:"fx-icon-btn",onClick:d,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:r(E,{name:"pencil",size:13})}),n.role==="ADMIN"&&r("span",{class:"fx-tag",children:e("account.role.admin")})]}),r("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),r(B,{a:i}),r(B,{a})]})]}),r(Vo,{kind:"phone",value:n.phone}),r(Vo,{kind:"email",value:n.email})]})}function Vo(t){let{t:e,goTo:n}=D(),a=!!t.value,i=a?t.kind==="phone"?jn(t.value):Xn(t.value):e("account.contact.unbound"),o=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return r(ge,{label:o,children:n?r("button",{type:"button",class:`fx-link-row${a?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[r("span",{children:i}),r(E,{name:"chevron",size:12})]}):r("span",{class:`fx-value${a?"":" is-empty"}`,children:i})})}function id(t){let{t:e,locale:n}=D(),a=O(),i=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,o=rn(i?.tier),s=o==="Free",l=s?"free":o.toLowerCase()==="pro"?"pro":"paid",c=()=>void a.run(async()=>await Ut("membership")?void 0:{error:{key:"err.openFailed"}});return r(G,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?r(P,{variant:"primary",pending:a.pending,onClick:c,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&r("div",{class:"fx-member fx-block",children:[r("span",{class:`fx-tier fx-tier--${l}`,children:o}),r("div",{class:"fx-member-copy",children:[r("strong",{children:s?e("member.freeName"):i?.plan?.name||o}),r("span",{class:"fx-muted",children:s?e("member.freeHint"):i?.expiresAt?e("member.expires",{date:Vn(i.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&r("div",{class:"fx-sub",children:r($,{tone:"warn",children:[e("member.loadFailed")," ",r("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),a.error&&r("div",{class:"fx-sub fx-sub--tight",children:r(B,{a})})]})}function od(){let{t}=D(),e=we(),[n,a]=S(null),[i,o]=S(!1),[s,l]=S(null),[c,u]=S(null),f=O(),m=O(),d=O(),g=!!j().authAccounts;X(()=>{let x=0,w=()=>{let U=j().authAccounts;if(!U)return;let J=++x;o(!1),U().then(H=>{J===x&&a(Array.isArray(H)?H:[])}).catch(()=>{J===x&&o(!0)})};w();let C=j().onAuthChanged?.(w),R=j().onAuthDevice?.(U=>u(U));return()=>{x++,C?.(),R?.()}},[]);let h=x=>{l(x),f.run(async()=>{let w=j().forsionSwitchAccount;if(!w)return{error:{key:"err.unavailable"}};try{await w(x)}catch(C){let R=nn($e(C));return R?{error:R}:void 0}finally{e.current&&l(null)}})},v=()=>void m.run(async()=>{let x=j().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};u(null);try{await x()}catch(w){e.current&&u(null);let C=nn($e(w));return C?{error:C}:void 0}}),k=()=>void d.run(async()=>{let x=j().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(w){return{error:{raw:$e(w)||t("err.generic")}}}}),y=f.pending||m.pending||d.pending;return r(G,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!i&&r(Oe,{children:[r(St,{})," ",t("common.loading")]}),i&&r("div",{class:"fx-sub",children:r($,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&r(Oe,{children:t("local.empty")}),n&&n.length>0&&r("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>r("div",{class:"fx-list-row",role:"listitem",children:[r("span",{class:"fx-list-icon",children:r(E,{name:"user",size:14})}),r("span",{class:"fx-list-main",children:[r("strong",{children:x.nickname||x.username||"Forsion"}),r("small",{children:[x.username&&x.nickname?x.username:null,sd(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?r("span",{class:"fx-tag fx-tag--accent",children:[r(E,{name:"check",size:11})," ",t("local.current")]}):r(P,{pending:s===x.id,disabled:y&&s!==x.id,onClick:()=>h(x.id),children:t("local.switch")})]},x.id))}),m.pending&&c&&r("div",{class:"fx-sub",children:r(la,{device:c})}),r("div",{class:"settings-panel-footer fx-footer",children:[r(P,{pending:m.pending,disabled:y&&!m.pending,onClick:v,children:[r(E,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),r(P,{pending:d.pending,disabled:y&&!d.pending,onClick:k,children:[r(E,{name:"logout",size:12})," ",t("local.signOut")]})]}),(f.error||m.error||d.error)&&r("div",{class:"fx-sub fx-sub--tight",children:[r(B,{a:f}),r(B,{a:m}),r(B,{a:d})]})]})}function sd(t){try{return new URL(t).host}catch{return t}}function ld(){let{t}=D(),e=O();return r("div",{class:"fx-page-foot",children:[r("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await _t()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",r(E,{name:"external",size:12})]}),r("span",{class:"fx-muted",children:t("account.web.desc")}),r(B,{a:e})]})}var Jo=["cream","coral","teal","lavender"],Yo=["auto","light","dark"],Go=["none","mist","contour","dots"],Zo=["none","ring","pro"],Qo=["early","streak","author","inviter","event"];var es=t=>`/u/${encodeURIComponent(t)}`,ua=t=>!!t&&t.toLowerCase()!=="free";function da(t,e){let n={...t.settings,...e};return{...t,settings:n,bio:n.bio,links:n.links,skin:n.skin,mode:n.mode,cover:n.cover,frame:n.frame==="pro"&&!ua(t.tier)?"none":n.frame,modules:n.modules.filter(a=>a.show).map(a=>({id:a.id}))}}function pa(t,e,n){let a=t.findIndex(s=>s.id===e),i=a+n;if(a<0||i<0||i>=t.length)return t;let o=t.slice();return[o[a],o[i]]=[o[i],o[a]],o}function ts(t){let e=t.trim();if(!e)return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(e)?e:`https://${e}`,a;try{a=new URL(n)}catch{return null}if(a.protocol!=="http:"&&a.protocol!=="https:"||!a.hostname.includes("."))return null;let i=a.toString();return i.length<=200?i:null}function fa(t){return t.replace(/^https?:\/\//i,"").replace(/^www\./i,"").replace(/\/$/,"")}function ns(t,e){let n=e==="zh"?[[1e8,"\u4EBF"],[1e4,"\u4E07"]]:[[1e9,"B"],[1e6,"M"],[1e3,"K"]];for(let[a,i]of n)if(t>=a){let o=t/a;return{value:o>=100?String(Math.round(o)):String(Math.round(o*10)/10),unit:i}}return{value:Math.round(t).toLocaleString("en-US"),unit:""}}var rs=t=>t==="zh"?"zh-CN":"en-US";function as(t,e){let[n,a]=t.split("-").map(Number);if(!n||!a)return[];let i=new Intl.DateTimeFormat(rs(e),{month:"short",timeZone:"UTC"});return Array.from({length:12},(o,s)=>i.format(new Date(Date.UTC(n,a-12+s,1))))}function is(t,e){let[n,a]=t.split("-").map(Number);return!n||!a?"":new Intl.DateTimeFormat(rs(e),{year:"numeric",month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n,a-1,1)))}function os([t,e]){let n=a=>`${String((a%24+24)%24).padStart(2,"0")}:00`;return`${n(t)} \u2013 ${n(e)}`}function ss(t){let e=0,n=Promise.resolve(),a=()=>{let i=e;return t.read().then(o=>{i===e&&t.apply(o)})};return{read:a,write(i){let o=++e,s=n.then(i).then(l=>{o===e&&t.apply(l)});return n=s.catch(()=>o===e?a().catch(()=>{}):void 0),s}}}var ds={skill:{key:"profile.work.skill",icon:"sparkles"},agent:{key:"profile.work.agent",icon:"bot"},plugin:{key:"profile.work.plugin",icon:"box"},space:{key:"profile.work.space",icon:"grid"},theme:{key:"profile.work.theme",icon:"palette"},"amadeus-plugin":{key:"profile.work.note",icon:"note"},webapp:{key:"profile.work.webapp",icon:"globe"}},cs={early:"sprout",streak:"flame",author:"box",inviter:"gift",event:"trophy"},us={plus:"Plus",pro:"Pro"},ga=t=>!!t&&/^https?:\/\//i.test(t);function ha(t){if(!ga(t))return;let e=j().openExternal;e?e(t).catch(()=>{}):window.open(t,"_blank","noopener")}async function dd(){let t=j().cloudInvoke;if(!t)return null;try{let e=await t("profile:publicOrigin");return e?.ok&&typeof e.origin=="string"&&/^https?:\/\/[^/]+$/i.test(e.origin)?e.origin:null}catch{return null}}async function pd(t,e,n){let a=await M(t,{method:e,body:n});if(!a.ok)throw a;if(!a.data?.profile)throw{ok:!1,status:a.status,code:null,detail:null,transport:"bad_response"};return a.data.profile}var ps=t=>t&&typeof t=="object"&&t.ok===!1?Ce(t):{raw:String(t?.message||t)};function fs(){let{t}=D(),e=ve(async()=>{let[a,i,o]=await Promise.all([M("/profile/me"),M("/auth/me"),dd()]);return i.ok?a.ok?a.data?.profile?{ok:!0,status:a.status,data:{profile:a.data.profile,me:i.data,origin:o}}:{ok:!0,status:404,data:null}:a.status===404?{ok:!0,status:404,data:null}:a:i});if(e.state==="loading")return r(he,{panels:2,rows:3});if(e.state==="signedOut")return r(ye,{});if(e.state==="error")return r(be,{error:e.error,onRetry:e.retry});if(!e.data)return r(G,{icon:"user",title:t("page.profile"),children:r(Oe,{children:t("profile.unsupported")})});let{update:n}=e;return r(fd,{data:e.data,update:a=>n(i=>i&&a(i))})}function fd(t){let{t:e}=D(),n=we(),{profile:a,me:i,origin:o}=t.data,[s,l]=S(null),[c,u]=S(null),[f,m]=S(!1),d=W(t.update);d.current=t.update;let g=(z,Q,oe)=>n.current?pd(z,Q,oe):Promise.reject(new Error("unmounted")),h=Ve(()=>ss({apply:z=>d.current(Q=>({...Q,profile:z})),read:()=>g("/profile/me")}),[]),v=i.username||a.username,k={...a,username:v,nickname:i.nickname||null},y=a.settings.isPublic,x=o?`${o}${es(v)}`:null,w=z=>{n.current&&u({tone:"error",m:ps(z)})},C=z=>{u(null),t.update(Q=>({...Q,profile:da(Q.profile,z)})),h.write(()=>g("/profile/me","PUT",z)).catch(w)},R=async z=>{t.update(Q=>({...Q,profile:da(Q.profile,{modules:Q.profile.settings.modules.map(oe=>({...oe,public:z.find(Ee=>Ee.id===oe.id)?.public??oe.public}))})})),await h.write(()=>g("/profile/me/visibility","POST",{public:!0,modules:z})),n.current&&(l(null),u({tone:"ok",m:{key:"profile.nowPublic"}}))},U=async()=>{m(!0),u(null);try{await h.write(()=>g("/profile/me/visibility","POST",{public:!1})),n.current&&u({tone:"ok",m:{key:"profile.nowPrivate"}})}catch(z){w(z)}finally{n.current&&m(!1)}},J=W(Promise.resolve()),H=(z,Q)=>{let oe=J.current.then(async()=>{if(!n.current)return;let Ee=await M("/settings",{method:"PUT",body:z});if(n.current){if(!Ee.ok)return u({tone:"error",m:Ce(Ee)});d.current(I=>({...I,me:{...I.me,...z}})),u({tone:"ok",m:{key:Q}})}});return J.current=oe,oe},V=async z=>{u(null);let Q;try{Q=await Kn(z)}catch(oe){return u({tone:"error",m:{key:oe instanceof Qe?"err.avatarTooLarge":"err.avatarInvalid"}})}await H({avatar:Q},"account.avatar.saved")},ee=z=>{u(null),l(Q=>Q===z?null:z)};return r("div",{class:"fx-pf-page",children:[r(G,{icon:y?"globe":"lock",title:e(y?"profile.state.public":"profile.state.private"),desc:e(y?"profile.state.publicDesc":"profile.state.privateDesc"),actions:r(N,{children:[r(P,{onClick:()=>ee("deco"),children:[r(E,{name:"palette",size:12})," ",e("profile.decorate")]}),y?r(P,{pending:f,onClick:()=>void U(),children:[r(E,{name:"lock",size:12})," ",e("profile.makePrivate")]}):r(P,{variant:"primary",onClick:()=>ee("publish"),children:[r(E,{name:"globe",size:12})," ",e("profile.publish")]})]}),children:[y&&x&&r(ge,{label:e("profile.address"),desc:x.replace(/^https?:\/\//i,""),children:[r(Ye,{text:x,label:e("profile.copyLink")}),r(P,{onClick:()=>ha(x),children:[r(E,{name:"external",size:12})," ",e("profile.openPublic")]})]}),s==="publish"&&!y&&r(md,{profile:a,url:x,submit:R,onClose:()=>l(null)}),c&&r(ae,{class:"fx-sub--tight",children:r("div",{class:`fx-msg ${c.tone==="ok"?"is-ok":"is-error"}`,role:c.tone==="ok"?"status":"alert",children:Ne(c.m,e)})})]}),r("div",{class:"fx-pf-home","data-deco":s==="deco"?"":void 0,children:[r("div",{class:"fx-pf-root",children:r(xd,{view:k,avatar:i.avatar||null,pinned:a.settings.pinned,owner:{onAvatar:z=>void V(z),onNickname:z=>{u(null),H({nickname:z},"account.nickname.saved")},onBio:z=>C({bio:z}),onLinks:z=>C({links:z}),onPinned:z=>C({pinned:z}),onInvalidLink:()=>u({tone:"error",m:{key:"profile.linkInvalid"}})}})}),s==="deco"&&r(gd,{profile:a,onChange:C,onClose:()=>l(null)})]})]})}function md(t){let{t:e}=D(),n=we(),{profile:a}=t,[i,o]=S({}),s=a.settings.modules.filter(g=>g.show).map(g=>({...g,public:i[g.id]??g.public})),[l,c]=S(!1),[u,f]=S(null),m=a.canPublish?null:a.publishBlockedReason||"publish_blocked";if(m)return r(ae,{children:[r($,{children:e(m==="machine_username"?"profile.blocked.machineUsername":"profile.blocked.publishBlocked")}),r("div",{class:"fx-inline fx-pf-foot",children:[m==="machine_username"&&r(P,{variant:"primary",onClick:()=>void _t("profile"),children:[e("profile.goRename")," ",r(E,{name:"external",size:12})]}),r(P,{onClick:t.onClose,children:e("common.cancel")})]})]});let d=async()=>{c(!0),f(null);try{await t.submit(s.map(({id:g,public:h})=>({id:g,public:h})))}catch(g){if(!n.current)return;f(ps(g)),c(!1)}};return r(ae,{children:[t.url&&r("div",{class:"fx-pf-url",children:[r(E,{name:"globe",size:14}),r("span",{children:t.url.replace(/^https?:\/\//i,"")})]}),r($,{children:e("profile.publishDesc")}),r("div",{class:"fx-pf-checks",children:s.map(g=>r("div",{class:"fx-pf-check",children:[r("div",{children:[e(`profile.mod.${g.id}`),r("small",{children:e(`profile.modDesc.${g.id}`)})]}),r(He,{checked:g.public,disabled:l,label:`${e(`profile.mod.${g.id}`)} \xB7 ${e("profile.col.public")}`,onChange:h=>o(v=>({...v,[g.id]:h}))})]},g.id))}),r($,{children:e("profile.publishNever")}),u&&r("div",{class:"fx-msg is-error",role:"alert",children:Ne(u,e)}),r("div",{class:"fx-inline fx-pf-foot",children:[r(P,{variant:"primary",pending:l,onClick:()=>void d(),children:e("profile.publishConfirm")}),r(P,{disabled:l,onClick:t.onClose,children:e("common.cancel")})]})]})}function gd(t){let{t:e}=D(),n=t.profile.settings,a=ua(t.profile.tier),i=(s,l)=>t.onChange({modules:n.modules.map(c=>c.id===s?{...c,...l}:c)}),o=s=>r("span",{class:"fx-pf-thumb",children:s});return r("aside",{class:"fx-pf-deco","aria-label":e("profile.decorate"),children:r(G,{icon:"palette",title:e("profile.decorate"),actions:r(P,{onClick:t.onClose,children:e("common.done")}),children:r("div",{class:"fx-pf-deco-body",children:[r("h4",{children:e("profile.deco.cover")}),r("div",{class:"fx-pf-opts",children:Go.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.cover===s,onClick:()=>t.onChange({cover:s}),children:[o(r("span",{class:`fx-pf-cv-thumb fx-pf-cv-${s}`})),e(`profile.cover.${s}`)]},s))}),r("h4",{children:e("profile.deco.frame")}),r("div",{class:"fx-pf-opts",children:Zo.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.frame===s,disabled:s==="pro"&&!a,title:s==="pro"&&!a?e("profile.frameProHint"):void 0,onClick:()=>t.onChange({frame:s}),children:[o(r("span",{class:`fx-pf-fr-demo fx-pf-fr-${s}`,children:r("span",{class:"fx-pf-av"})})),e(`profile.frame.${s}`)]},s))}),!a&&r($,{children:e("profile.frameProHint")}),r("h4",{children:e("profile.deco.modules")}),r("div",{class:"fx-pf-mod-head","aria-hidden":"true",children:[r("span",{children:e("profile.col.show")}),r("span",{children:e("profile.col.public")})]}),n.modules.map((s,l)=>r("div",{class:"fx-pf-mod",children:[r("span",{children:e(`profile.mod.${s.id}`)}),r("button",{type:"button",class:"fx-icon-btn",disabled:l===0,title:e("profile.moveUp"),"aria-label":`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.moveUp")}`,onClick:()=>t.onChange({modules:pa(n.modules,s.id,-1)}),children:r(E,{name:"up",size:13})}),r("button",{type:"button",class:"fx-icon-btn",disabled:l===n.modules.length-1,title:e("profile.moveDown"),"aria-label":`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.moveDown")}`,onClick:()=>t.onChange({modules:pa(n.modules,s.id,1)}),children:r(E,{name:"down",size:13})}),r(He,{checked:s.show,label:`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.col.show")}`,onChange:c=>i(s.id,{show:c})}),r(He,{checked:s.show&&s.public,disabled:!s.show,label:`${e(`profile.mod.${s.id}`)} \xB7 ${e("profile.col.public")}`,onChange:c=>i(s.id,{public:c})})]},s.id)),r($,{children:e("profile.modulesHint")}),r("h4",{children:e("profile.deco.skin")}),r("div",{class:"fx-pf-opts",children:Jo.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.skin===s,onClick:()=>t.onChange({skin:s}),children:[o(r("span",{class:"fx-pf-swatch","data-skin":s})),e(`profile.skin.${s}`)]},s))}),r("h4",{children:e("profile.deco.mode")}),r(qe,{value:n.mode,label:e("profile.deco.mode"),onChange:s=>t.onChange({mode:s}),options:Yo.map(s=>({value:s,label:e(`profile.mode.${s}`)}))}),r($,{children:e("profile.deco.publicHint")})]})})})}function ma(t){let[e,n]=S(null),a=W(!1),i=W(null),o=e!==null;ho(()=>{o&&i.current?.focus()},[o]);let s=t.class?` ${t.class}`:"";if(e===null)return r("button",{type:"button",class:`fx-pf-ed${s}${t.value?"":" is-empty"}`,title:t.label,"aria-label":t.label,onClick:()=>{a.current=!1,n(t.value)},children:[r("span",{children:t.value||t.placeholder}),r(E,{name:t.value?"pencil":"plus",size:12})]});let l=()=>{let c=e.trim();n(null),!a.current&&c!==t.value&&t.onSave(c)};return r("span",{class:`fx-pf-ed-on${s}`,children:[r("input",{ref:i,class:"fx-input",type:"text",value:e,maxLength:t.maxLength,placeholder:t.placeholder,"aria-label":t.label,onInput:c=>n(c.currentTarget.value),onBlur:l,onKeyDown:c=>{c.isComposing||(c.key==="Enter"?c.currentTarget.blur():c.key==="Escape"&&(c.preventDefault(),a.current=!0,c.currentTarget.blur()))}}),t.counter&&r("small",{children:[Array.from(e).length,"/",t.maxLength]})]})}function Zn(t){return r("section",{class:"fx-pf-sec",style:{order:t.order},children:[r("div",{class:"fx-pf-sec-h",children:[r("h3",{children:t.title}),t.action]}),t.children]})}function hd(t){let{t:e}=D(),{work:n}=t,a=ds[n.type],i=r(N,{children:[r("div",{class:"fx-pf-work-top",children:[r("span",{class:"fx-pf-work-ico",children:r(E,{name:a?.icon??"box",size:17})}),r("div",{children:[r("div",{class:"fx-pf-work-name",children:n.name}),r("div",{class:"fx-pf-work-type",children:a?e(a.key):n.type})]})]}),r("p",{children:n.summary}),(n.countKind!=="visits"||n.count>0)&&r("div",{class:"fx-pf-work-foot",children:[r(E,{name:n.countKind==="visits"?"eye":"download",size:12}),e(n.countKind==="visits"?"profile.workVisits":"profile.workInstalls",{n:n.count.toLocaleString("en-US")})]})]}),o=n.url;return ga(o)?r("a",{class:"fx-pf-work",href:o,onClick:s=>{s.preventDefault(),ha(o)},children:i}):r("article",{class:"fx-pf-work",children:i})}function bd(t){let{t:e}=D(),n=we(),[a,i]=S(null),[o,s]=S(()=>t.pinned.map(f=>`${f.kind}:${f.id}`));X(()=>{M("/profile/me/works").then(f=>{n.current&&i(f.ok?f.data?.works??[]:"failed")})},[]);let l=f=>`${f.kind}:${f.id}`,c=f=>s(m=>m.includes(f)?m.filter(d=>d!==f):[...m,f]);if(a===null)return r("div",{class:"fx-pf-card fx-pf-empty",children:[r(St,{})," ",e("common.loading")]});if(a==="failed"||a.length===0)return r("div",{class:"fx-pf-card fx-pf-empty",children:[r("p",{children:e(a==="failed"?"common.loadFailed":"profile.worksNone")}),r("div",{class:"fx-inline fx-pf-foot",children:[a!=="failed"&&r(P,{variant:"primary",onClick:()=>void _t("submission"),children:[e("profile.goSubmit")," ",r(E,{name:"external",size:12})]}),r(P,{onClick:t.onClose,children:e("common.cancel")})]})]});let u=()=>{let f=new Map(a.map(m=>[l(m),m]));t.onSave(o.flatMap(m=>{let d=f.get(m);return d?[{kind:d.kind,id:d.id}]:[]})),t.onClose()};return r("div",{class:"fx-pf-card fx-pf-picker",children:[a.map(f=>{let m=l(f),d=o.includes(m),g=ds[f.type];return r("button",{type:"button",class:"fx-pf-pick","aria-pressed":d,disabled:!d&&o.length>=6,onClick:()=>c(m),children:[r("div",{children:[f.name,r("small",{children:[g?e(g.key):f.type," \xB7 ",f.summary]})]}),d&&r(E,{name:"check",size:15})]},m)}),r("div",{class:"fx-inline fx-pf-foot",children:[r("span",{class:"fx-grow",children:o.length?e("profile.worksPicked",{n:o.length,max:6}):e("profile.worksAuto")}),r(P,{variant:"primary",onClick:u,children:e("common.done")}),r(P,{onClick:t.onClose,children:e("common.cancel")})]})]})}function xd(t){let{t:e,locale:n}=D(),{view:a,owner:i}=t,o=W(null),[s,l]=S(!1),c=a.nickname||a.username,u=(a.tier||"free").toLowerCase(),f=a.modules.map(I=>I.id),m=I=>f.indexOf(I),d=I=>m(I)>=0,g=a.stats,h=g?ns(g.totalTokens,n):null,v=e("profile.unit.days"),k=g&&h?[[h.value,h.unit,e("profile.stat.tokens")],[String(g.activeDays),v,e("profile.stat.activeDays")],[String(g.longestStreak),v,e("profile.stat.longest")],[String(g.currentStreak),v,e("profile.stat.current")],[g.installs.toLocaleString("en-US"),"",e("profile.stat.installs")]]:[],y=g&&d("stats")&&r("div",{class:"fx-pf-stats",style:{order:m("stats")},children:k.map(([I,pe,ft])=>r("div",{class:"fx-pf-stat",children:[r("b",{children:[I,pe&&r("small",{children:pe})]}),r("span",{children:ft})]},ft))},"stats"),x=f[0]==="stats",w=a.works||[],C=d("works")&&r(Zn,{order:m("works"),title:e("profile.works"),action:!s&&r("button",{type:"button",class:"fx-link",onClick:()=>l(!0),children:e("profile.worksPick")}),children:s?r(bd,{pinned:t.pinned,onSave:i.onPinned,onClose:()=>l(!1)}):w.length?r("div",{class:"fx-pf-works",children:w.map(I=>r(hd,{work:I},`${I.kind}:${I.id}`))}):r("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.worksEmpty")})},"works"),R=a.activity,U=d("activity")&&R&&r(Zn,{order:m("activity"),title:e("profile.activity"),children:r("div",{class:"fx-pf-card",children:[r("div",{class:"fx-pf-hm",role:"img","aria-label":e("profile.activityDays",{n:R.activeDays}),children:R.levels.map((I,pe)=>r("i",{class:I?`l${I}`:void 0},pe))}),r("div",{class:"fx-pf-hm-months","aria-hidden":"true",children:as(R.end,n).map((I,pe)=>r("span",{children:I},pe))}),r("div",{class:"fx-pf-hm-foot",children:[r("span",{children:e("profile.activityDays",{n:R.activeDays})}),r("span",{class:"fx-pf-hm-legend","aria-hidden":"true",children:[e("profile.less"),r("i",{}),r("i",{class:"l1"}),r("i",{class:"l2"}),r("i",{class:"l3"}),r("i",{class:"l4"}),e("profile.more")]})]})]})},"activity"),J=(a.badges||[]).filter(I=>Qo.includes(I.id)),H=d("badges")&&r(Zn,{order:m("badges"),title:e("profile.badges"),children:J.length?r("div",{class:"fx-pf-card fx-pf-rows",children:J.map(I=>r("div",{class:"fx-pf-brow",children:[r("span",{class:"fx-pf-badge",children:r(E,{name:cs[I.id],size:14})}),r("div",{children:[r("b",{children:e(`profile.badge.${I.id}`)}),r("span",{children:e(`profile.badgeSub.${I.id}`,{value:I.value??""})})]})]},I.id))}):r("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.badgesEmpty")})},"badges"),V=a.insights,ee=[];V?.topModel&&ee.push([e("profile.insightModel"),V.topModel]),V?.activeHours&&ee.push([e("profile.insightHours"),os(V.activeHours)]);let z=d("insights")&&r(Zn,{order:m("insights"),title:e("profile.insights"),children:ee.length?r("div",{class:"fx-pf-card fx-pf-rows",children:ee.map(([I,pe])=>r("div",{class:"fx-pf-row",children:[r("span",{children:I}),r("b",{children:pe})]},I))}):r("div",{class:"fx-pf-card fx-pf-empty",children:e("profile.insightsEmpty")})},"insights"),Q=[!x&&y,C,U].filter(Boolean),oe=[H,z].filter(Boolean),Ee=I=>{if(!I)return;let pe=ts(I);if(!pe)return i.onInvalidLink();a.links.includes(pe)||i.onLinks([...a.links,pe])};return r("div",{class:"fx-pf","data-cover":a.cover,"data-frame":a.frame,children:[r("div",{class:"fx-pf-cover"}),r("div",{class:"fx-pf-id",children:[r("button",{type:"button",class:"fx-pf-avatar",title:e("account.avatar.change"),"aria-label":e("account.avatar.change"),onClick:()=>o.current?.click(),children:[r("span",{class:"fx-pf-av",children:t.avatar?r("img",{src:t.avatar,alt:""}):r("span",{class:"fx-pf-av-fallback",children:Jn(c)})}),r("span",{class:"fx-pf-av-mask",children:r(E,{name:"pencil",size:18})})]}),r("input",{ref:o,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:I=>{let pe=I.currentTarget,ft=pe.files?.[0];pe.value="",ft&&i.onAvatar(ft)}}),r("div",{class:"fx-pf-id-text",children:[r("div",{class:"fx-pf-name",children:[r(ma,{value:c,placeholder:a.username,maxLength:40,label:e("account.nickname.edit"),onSave:I=>{I&&i.onNickname(I)}}),us[u]&&r("span",{class:`fx-tag${u==="pro"?" fx-pf-tier-pro":" fx-tag--accent"}`,children:us[u]})]}),r("div",{class:"fx-pf-handle",children:["@",a.username]})]}),J.length>0&&d("badges")&&r("div",{class:"fx-pf-badges",children:J.map(I=>r("span",{class:"fx-pf-badge",title:e(`profile.badge.${I.id}`),children:r(E,{name:cs[I.id],size:14})},I.id))})]}),r("div",{class:"fx-pf-sub",children:[r(ma,{class:"fx-pf-bio",value:a.bio,placeholder:e("profile.bioPlaceholder"),maxLength:80,label:e("profile.bio"),counter:!0,onSave:i.onBio}),r("div",{class:"fx-pf-meta",children:[a.joinedMonth&&r("span",{children:[r(E,{name:"calendar",size:13}),e("profile.joined",{date:is(a.joinedMonth,n)})]}),a.links.map(I=>r("span",{children:[r(E,{name:"link",size:13}),ga(I)?r("a",{href:I,onClick:pe=>{pe.preventDefault(),ha(I)},children:fa(I)}):r("span",{children:fa(I)}),r("button",{type:"button",class:"fx-pf-x",title:e("profile.linkRemove"),"aria-label":e("profile.linkRemove"),onClick:()=>i.onLinks(a.links.filter(pe=>pe!==I)),children:r(E,{name:"x",size:11})})]},I)),a.links.length<2&&r(ma,{value:"",placeholder:e("profile.linkAdd"),maxLength:200,label:e("profile.linkAdd"),onSave:Ee},a.links.length)]})]}),x&&y,r("div",{class:"fx-pf-body","data-cols":Q.length&&oe.length?2:1,children:[r("div",{class:"fx-pf-main",children:Q}),oe.length>0&&r("div",{class:"fx-pf-side",children:oe})]})]})}function Z(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 vd(t,e){let n=Z(e);if(n===null||n<0)return null;if(n===0)return 0;let a=Math.max(0,Z(t)??0);return Math.min(100,Math.max(0,Math.floor(a/n*100)))}var yd=15;function Tt(t,e){let n=vd(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let a=Math.max(0,Z(t)??0),i=n===0&&a>0&&(Z(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:i,low:n<=yd}}function Qn(t,e){let n=Z(e);if(n===null||n<=0)return null;let a=Z(t);if(a===null)return null;let i=Math.max(0,a);if(i===0)return"0%";let o=i/n*100;if(o<.1)return"<0.1%";let s=Math.round(o*10)/10;return s<10?`${s}%`:`${Math.round(o).toLocaleString("en-US")}%`}var kd=t=>t.ok?"ok":t.status===404?"hidden":"failed";function gs(){let t=ve(async()=>{let[s,l,c,u]=await Promise.all([M("/token-quota/my"),M("/credits/balance"),M("/features"),M("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?Z(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:kd(u)}}:s});if(t.state==="loading")return r(he,{panels:3,rows:2});if(t.state==="signedOut")return r(ye,{});if(t.state==="error")return r(be,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,a=e.quota.background,i=e.features.redemption_codes!==!1,o=e.features.payment!==!1;return r(N,{children:[r(_d,{data:e,update:n,onFailed:t.reload}),r(Ad,{data:e,payment:o,onRetry:t.reload}),a?.modelId?r(Td,{bg:a,update:n}):null,(e.inviteState!=="hidden"||i)&&r(Pd,{data:e,update:n,redeemEnabled:i,onRedeemed:t.reload})]})}var ms=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function wd(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function _d(t){let{t:e,locale:n,ctx:a}=D(),i=t.data.quota,o=Tt(i.dailyRemaining,i.dailyLimit),s=Tt(i.weeklyRemaining,i.weeklyLimit),l=Lo(i.weeklyResetAt,n),c=Math.max(0,Z(i.resetCards)??0),u=Z(i.resetCardPricePoints)??100,f=O(),m=O(),[d,g]=S(null),[h,v]=S("1"),k=/^\d+$/.test(h.trim())?Number(h.trim()):NaN,y=Number.isInteger(k)&&k>=1&&k<=50,x=y?k*u:null,w=t.data.balance,C=x!==null&&w!==null&&w<x,R=()=>void f.run(async()=>{let H={daily:o,weekly:s},V=ms(i);g(null);let ee=j(),z=await $n(ee.accountUseResetCard?()=>ee.accountUseResetCard("both"):null,()=>M("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!z.ok)return t.onFailed(),ue(z);let Q=z.data?.quota,oe=Z(z.data?.resetCards);return t.update(Ee=>({...Ee,quota:{...Ee.quota,...Q??{},resetCards:oe??Ee.quota.resetCards}})),Q&&!wd(a.app,{before:V,after:ms(Q),remainingCards:oe??void 0})&&g({before:H,after:{daily:Tt(Q.dailyRemaining,Q.dailyLimit),weekly:Tt(Q.weeklyRemaining,Q.weeklyLimit)},cards:oe}),{success:{key:"card.used"}}}),U=()=>void m.run(async()=>{if(!y)return{error:{key:"err.invalidCount"}};let H=await M("/points/exchange-reset-cards",{method:"POST",body:{count:k,expectedPricePerCard:u}});return H.ok?(t.update(V=>({...V,quota:{...V.quota,resetCards:Z(H.data?.resetCards)??V.quota.resetCards},balance:Z(H.data?.newPointsBalance)??V.balance})),v("1"),{success:{key:"card.exchanged",vars:{n:Z(H.data?.cardsGranted)??k}}}):(t.onFailed(),ue(H))}),J=H=>H.unlimited?e("common.unlimited"):H.text;return r(G,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[r("div",{class:"fx-quota-list fx-block",children:[r(on,{label:e("common.today"),display:o,note:o.unlimited?null:e("quota.resetDaily")}),r(on,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),r(ge,{label:e("card.title"),desc:e("card.desc"),children:[r("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:c})}),r(nt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:f.pending,disabled:c<=0,onConfirm:R})]}),c<=0&&!f.success&&r(ae,{children:r($,{children:e("card.noneHint")})}),(f.error||f.success)&&r(ae,{children:[r(B,{a:f}),f.success&&d&&r("div",{class:"fx-ceremony",role:"status",children:[r("span",{children:[e("common.today")," ",r("b",{children:J(d.before.daily)})," \u2192 ",r("b",{children:J(d.after.daily)})]}),r("span",{children:[e("common.thisWeek")," ",r("b",{children:J(d.before.weekly)})," \u2192 ",r("b",{children:J(d.after.weekly)})]}),d.cards!==null&&r("span",{class:"fx-muted",children:e("card.left",{n:d.cards})})]})]}),r(ge,{label:e("card.exchange"),desc:e("card.price",{price:re(u,n)}),class:"fx-row--wide",children:[r("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:H=>{v(H.currentTarget.value),m.clear()}}),r("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:re(x,n)}):e("card.countHint")}),r(nt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?re(x,n):"\u2014"}),pending:m.pending,disabled:!y||C,onConfirm:U})]}),(C||m.error||m.success)&&r(ae,{children:[C&&!m.error&&r($,{tone:"warn",children:e("err.insufficientPoints")}),r(B,{a:m})]})]})}function Sd(t,e,n){let a=O(),[i,o]=S(null);return{checked:i??t,toggle:l=>{o(l),a.run(async()=>{let c=await e(l);if(o(null),!c.ok)return ue(c);n(l)})},action:a}}function Ad(t){let{t:e,locale:n}=D(),a=O(),i=()=>void a.run(async()=>await Ut("credits")?void 0:{error:{key:"err.openFailed"}});return r(G,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?r(P,{variant:"primary",pending:a.pending,onClick:i,children:e("points.recharge")}):void 0,children:[r(ge,{label:e("points.balance"),children:t.data.balance!==null?r("span",{class:"fx-big","data-testid":"points-balance",children:re(t.data.balance,n)}):r("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",r("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),a.error&&r(ae,{children:r(B,{a})})]})}var Cd=[5,10,20];function Td(t){let{t:e}=D(),{bg:n}=t,a=Tt(n.dailyRemaining,n.dailyLimit),i=Tt(n.weeklyRemaining,n.weeklyLimit),o=O(),[s,l]=S(null),c=Sd(!!n.autoMain,f=>{let m=j();return $n(m.accountBgAutoMain?()=>m.accountBgAutoMain(f):null,()=>M("/token-quota/background/auto-main",{method:"POST",body:{enabled:f}}))},f=>t.update(m=>({...m,quota:{...m.quota,background:{...m.quota.background??{},autoMain:f}}}))),u=f=>{l(f),o.run(async()=>{let m=j(),d=await $n(m.accountBgConvert?()=>m.accountBgConvert(f):null,()=>M("/token-quota/background/convert",{method:"POST",body:{percent:f}}));if(l(null),!d.ok)return ue(d);let g=d.data?.quota;return g&&t.update(v=>({...v,quota:{...v.quota,...g,resetCards:v.quota.resetCards,resetCardPricePoints:v.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:f}}}})};return r(G,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[r("div",{class:"fx-quota-list fx-block",children:[r(on,{label:e("common.today"),display:a}),r(on,{label:e("common.thisWeek"),display:i})]}),r(ge,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:r(He,{checked:c.checked,disabled:c.action.pending,label:e("bg.autoMain"),onChange:c.toggle})}),r(ge,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:Cd.map(f=>r(nt,{label:`${f}%`,confirmLabel:e("bg.convertConfirm",{pct:f}),pending:o.pending&&s===f,disabled:o.pending&&s!==f,onConfirm:()=>u(f)},f))}),(o.error||o.success||c.action.error)&&r(ae,{children:[r(B,{a:c.action}),r(B,{a:o})]})]})}function Pd(t){let{t:e,locale:n}=D(),{invite:a,inviteState:i}=t.data,[o,s]=S(null),[l,c]=S(""),[u,f]=S(""),m=O(),d=O(),g=O();X(()=>{let x=!0;return j().authStatus?.().then(w=>{x&&s(w?.cloudUrl?w.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let h=async()=>{let x=await M("/invite/my-code");return t.update(w=>({...w,invite:x.ok?x.data:w.invite,inviteState:x.ok?"ok":x.status===404?"hidden":w.inviteState})),x},v=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let w=await M("/invite/claim",{method:"POST",body:{code:x}});return w.ok?(c(""),h(),{success:{key:"invite.claimed"}}):ue(w)}),k=()=>void d.run(async()=>{let x=u.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let w=await M("/redemption/redeem",{method:"POST",body:{code:x}});if(!w.ok)return ue(w);f(""),t.onRedeemed();let C=[],R=Z(w.data?.creditsAmount);R&&C.push(e("redeem.gotPoints",{n:re(R,n)})),w.data?.membershipPlanId&&C.push(e("redeem.gotMembership"));for(let U of Array.isArray(w.data?.items)?w.data.items:[]){let J=(n==="zh"?U?.label?.zh:U?.label?.en)||U?.label?.zh||U?.label?.en||U?.kind;J&&C.push(J)}return{success:C.length?{key:"redeem.successWith",vars:{what:C.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),y=a?.code&&o?`${o}/auth?invite=${encodeURIComponent(a.code)}`:"";return r(G,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[i==="ok"&&a?.code&&r(ge,{label:e("invite.myCode"),desc:e("invite.count",{n:re(Z(a.invitedCount)??0,n)}),class:"fx-row--wide",children:[r("code",{class:"fx-code","data-testid":"invite-code",children:a.code}),r(Ye,{text:a.code,label:e("invite.copyCode")}),r(Ye,{text:y,label:e("invite.copyLink"),disabled:!y})]}),i==="failed"&&r(ae,{children:r($,{tone:"warn",children:[e("invite.loadFailed")," ",r("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await h()}),children:e("common.retry")})]})}),i==="ok"&&a?.claim?.eligible&&r(ge,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:r("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),v()},children:[r("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>c(x.currentTarget.value)}),r(P,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&r(ae,{children:r(B,{a:m})}),t.redeemEnabled&&r(ge,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:r("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),k()},children:[r("input",{class:"fx-input",value:u,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>f(x.currentTarget.value)}),r(P,{submit:!0,pending:d.pending,children:e("redeem.submit")})]})}),(d.error||d.success)&&r(ae,{children:r(B,{a:d})})]})}function Ed(t){let e=[],n,a=new Map;for(let i of t)if(i.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},e.push(n)),n.items.push(i);else if(i.itemType==="custom_item"&&i.itemDefinition?.stackable){let o=`${i.productId||i.id}:${JSON.stringify(i.itemDefinition)}`,s=a.get(o);s||(s={id:`custom:${o}`,items:[],resetCard:!1},a.set(o,s),e.push(s)),s.items.push(i)}else e.push({id:i.id,items:[i],resetCard:!1});return e}function hs(){let t=ve(()=>M("/shop/inventory"));return t.state==="loading"?r(he,{panels:1,rows:4}):t.state==="signedOut"?r(ye,{}):t.state==="error"?r(be,{error:t.error,onRetry:t.retry}):r(Rd,{items:t.data??[],onRefresh:t.reload,onUsed:e=>{t.update(n=>n.filter(a=>a.id!==e.itemId)),t.reload()}})}function Rd(t){let{t:e,locale:n,goTo:a}=D(),[i,o]=S(null),[s,l]=S(null),c=we(),u=Ed(t.items),f=u.find(h=>h.id===i),m=Math.max(24,Math.ceil(u.length/6)*6)-u.length,d=h=>h.resetCard?e("card.title"):h.items[0].itemDefinition?.name[n]||h.items[0].displayName||e("backpack.item"),g=h=>{c.current&&(l(h),t.onUsed(h))};return r(G,{icon:"backpack",title:e("page.backpack"),desc:e("backpack.desc"),actions:r(P,{onClick:t.onRefresh,children:[r(E,{name:"refresh",size:13}),e("backpack.refresh")]}),children:r("div",{class:"fx-backpack fx-block",children:[r("div",{class:"fx-backpack-summary",children:[r("span",{children:e("backpack.total",{n:re(t.items.length,n)})}),a&&r("button",{class:"fx-link",type:"button",onClick:()=>a("quota"),children:e("backpack.getCards")})]}),s&&r("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[r(E,{name:"gift",size:20}),r("div",{children:[r("strong",{children:s.message[n]}),r("div",{children:s.effects.map(h=>bs(h,e,n)).join(" \xB7 ")})]})]},s.itemId),r("div",{class:"fx-backpack-layout",children:[r("div",{children:[r("div",{class:"fx-backpack-grid",role:"group","aria-label":e("backpack.grid"),children:[u.map(h=>{let v=d(h);return r("button",{type:"button",class:`fx-backpack-slot${h.resetCard?" is-card":""}`,"data-rarity":h.items[0].itemDefinition?.rarity,"aria-pressed":f?.id===h.id,"aria-label":e("backpack.slot",{name:v,n:h.items.length}),title:v,onClick:()=>o(h.id),children:[r("span",{class:"fx-backpack-icon",children:h.items[0].itemDefinition?.icon?r("span",{class:"fx-backpack-emoji",children:h.items[0].itemDefinition.icon}):r(E,{name:h.resetCard?"card":"gift",size:30})}),r("span",{class:"fx-backpack-name",children:v}),(h.resetCard||h.items[0].itemDefinition?.stackable)&&r("span",{class:"fx-backpack-count",children:["\xD7",re(h.items.length,n)]})]},h.id)}),Array.from({length:m},(h,v)=>r("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${v}`))]}),!u.length&&r("p",{class:"fx-backpack-empty",children:e("backpack.empty")})]}),f?r(Md,{slot:f,name:d(f),onUsed:g},`${f.id}:${f.items[0].id}`):r("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[r(E,{name:"backpack",size:30}),r($,{children:e(u.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function bs(t,e,n){return t.type==="points"?e("backpack.effect.points",{n:re(t.amount,n)}):t.type==="reset_card"?e("backpack.effect.cards",{n:re(t.count,n)}):e("backpack.effect.quota")}function Md(t){let{t:e,locale:n,goTo:a}=D(),i=t.slot.items[0],[o,s]=S(null),l=O(),c=O(),[u,f]=S(!1),m=i.itemDefinition,d=we(),g=i.source==="points"?e("backpack.source.points"):i.source==="admin"?e("backpack.source.admin"):i.source==="reward"?e("backpack.source.reward"):e("backpack.source.other"),h=()=>void l.run(async()=>{let k=await M(`/shop/inventory/${encodeURIComponent(i.id)}`);if(d.current){if(!k.ok)return ue(k);s(k.data)}}),v=()=>void c.run(async()=>{let k=await M(`/shop/inventory/${encodeURIComponent(i.id)}/use`,{method:"POST"});if(!k.ok)return ue(k);t.onUsed(k.data)});return r("section",{class:"fx-backpack-detail","aria-label":e("backpack.details"),children:[r("span",{class:`fx-backpack-detail-icon${t.slot.resetCard?" is-card":""}`,children:m?.icon?r("span",{class:"fx-backpack-emoji",children:m.icon}):r(E,{name:t.slot.resetCard?"card":"gift",size:32})}),r("h3",{children:t.name}),r("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}`)}`]}),r("dl",{class:"fx-backpack-facts",children:[r("div",{children:[r("dt",{children:e("backpack.quantity")}),r("dd",{children:re(t.slot.items.length,n)})]}),r("div",{children:[r("dt",{children:e("backpack.acquired")}),r("dd",{children:Je(i.acquiredAt,n)})]}),!t.slot.resetCard&&r("div",{children:[r("dt",{children:e("backpack.source")}),r("dd",{children:g})]})]}),m?r(N,{children:[m.description&&r($,{children:m.description[n]}),m.use&&r(N,{children:[r("div",{class:"fx-backpack-effects",children:m.use.effects.map((k,y)=>r("div",{children:bs(k,e,n)},y))}),u?r(N,{children:[r($,{children:e("backpack.consumeConfirm")}),r("div",{class:"fx-backpack-use-actions",children:[r(P,{variant:"primary",pending:c.pending,onClick:v,children:e("backpack.confirmUse")}),r(P,{disabled:c.pending,onClick:()=>f(!1),children:e("common.cancel")})]})]}):r(P,{variant:"primary",onClick:()=>f(!0),children:m.use.label?.[n]||e("backpack.use")}),r(B,{a:c,captchaSection:"backpack"})]})]}):t.slot.resetCard?r(N,{children:[r($,{children:e("card.desc")}),a&&r(P,{variant:"primary",onClick:()=>a("quota"),children:e("backpack.manageCards")})]}):o?r("div",{class:"fx-backpack-reveal",children:[o.codeName&&r("div",{class:"fx-muted",children:o.codeName}),o.key?r(N,{children:[r("code",{children:o.key}),r(Ye,{text:o.key,label:e("backpack.copyKey")})]}):r($,{children:e("backpack.noKey")})]}):r(P,{pending:l.pending,onClick:h,children:[r(E,{name:"key",size:14}),e("backpack.reveal")]}),r(B,{a:l,captchaSection:"backpack"})]})}var Id=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Ld=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,xs=(t,e)=>t==="phone"?Id.test(e):Ld.test(e),sn=(t,e)=>t==="phone"?jn(e):Xn(e);function ys(){let t=ve(()=>M("/auth/me"));if(t.state==="loading")return r(he,{panels:3,rows:2});if(t.state==="signedOut")return r(ye,{});if(t.state==="error")return r(be,{error:t.error,onRetry:t.retry});let e=t.data;return r(N,{children:[r(Dd,{me:e,onBound:(n,a)=>t.update(i=>({...i,[n]:a}))}),r(Od,{me:e}),r($d,{}),r(Ud,{me:e})]})}function xa(){let t=Io(),e=O();return{cd:t,a:e,send:(i,o,s)=>e.run(async()=>{let l=await M("/auth/send-code",{method:"POST",body:{target:i,type:o,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):ue(l)}),reset:()=>{t.stop(),e.clear()}}}function Dd(t){let{t:e}=D(),[n,a]=S(null),[i,o]=S(null);return r(G,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return r(N,{children:[r(ge,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?sn(s,l):e("account.contact.unbound"),children:r(P,{onClick:()=>{o(null),a(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&r(zd,{kind:s,current:l??null,onDone:c=>{t.onBound(s,c),a(null),o(s)}}),i===s&&n!==s&&r(ae,{children:r("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function zd(t){let{t:e}=D(),{kind:n}=t,[a,i]=S(""),[o,s]=S(""),l=xa(),c=O(),u=a.trim(),f=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!xs(n,u)){l.a.run(async()=>({error:{key:f}}));return}l.send(u,n,"bind")},d=()=>void c.run(async()=>{if(!xs(n,u))return{error:{key:f}};if(!o.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:u,verification_code:o.trim()}:{email:u,verification_code:o.trim()},h=await M(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!h.ok)return ue(h);t.onDone(u)});return r(ae,{class:"fx-form",children:[r("label",{class:"fx-field",children:[r("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),r("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:a,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>i(g.currentTarget.value)})]}),r(va,{code:o,setCode:s,sender:l,onSend:m}),r("div",{class:"fx-inline",children:r(P,{variant:"primary",pending:c.pending,onClick:d,children:e("sec.bindSubmit")})}),r(B,{a:c})]})}function va(t){let{t:e}=D(),{cd:n,a}=t.sender;return r("div",{class:"fx-field",children:[r("span",{children:t.label??e("sec.code")}),r("div",{class:"fx-inline",children:[r("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:i=>t.setCode(i.currentTarget.value)}),r(P,{pending:a.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),r(B,{a})]})}function Nd(t){let{t:e}=D(),n=To(t.value),a=t.value.length>0,i=[[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 r("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:i.map(([o,s])=>r("li",{class:o?"is-ok":a?"is-bad":"",children:[o?r(E,{name:"check",size:11}):a?r(E,{name:"x",size:11}):r("span",{class:"fx-rule-dot","aria-hidden":"true"}),r("span",{children:s})]},s))})}function ks(t,e){let n=Co(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:Qr[n.rule]}}}function Od(t){let{t:e}=D(),n=["phone","email"].filter(l=>!!t.me[l]),[a,i]=S("current"),[o,s]=S(!1);return r(G,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:r(P,{onClick:()=>s(!o),children:e(o?"common.cancel":"pw.change")}),children:o&&r(ae,{class:"fx-form",children:[r(qe,{label:e("pw.modeLabel"),value:a,onChange:i,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),a==="current"?r(Bd,{onDone:()=>s(!1)}):n.length?r(Fd,{me:t.me,targets:n,onDone:()=>s(!1)}):r($,{children:e("pw.codeNeedsContact")})]})})}function ws(t){let{t:e}=D();return r(N,{children:[r("label",{class:"fx-field",children:[r("span",{children:e("pw.new")}),r("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),r(Nd,{value:t.pw}),r("label",{class:"fx-field",children:[r("span",{children:e("pw.confirm")}),r("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function Bd(t){let{t:e}=D(),[n,a]=S(""),[i,o]=S(""),[s,l]=S(""),c=O(),[u,f]=S(!1),m=()=>void c.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let d=ks(i,s);if(d)return d;let g=await M("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:i}});return g.ok?(a(""),o(""),l(""),f(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:ue(g)});return r(N,{children:[r("label",{class:"fx-field",children:[r("span",{children:e("pw.current")}),r("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:d=>a(d.currentTarget.value)})]}),r(ws,{pw:i,setPw:o,confirm:s,setConfirm:l}),r("div",{class:"fx-inline",children:[r(P,{variant:"primary",pending:c.pending,onClick:m,children:e("pw.submit")}),u&&r(P,{onClick:t.onDone,children:e("common.done")})]}),r(B,{a:c})]})}function Fd(t){let{t:e}=D(),[n,a]=S(t.targets[0]),[i,o]=S(""),[s,l]=S(""),[c,u]=S(""),f=xa(),m=O(),[d,g]=S(!1),h=t.me[n]||"",v=()=>void m.run(async()=>{if(!i.trim())return{error:{key:"err.codeRequired"}};let k=ks(s,c);if(k)return k;let y=n==="phone"?{phone:h,code:i.trim(),newPassword:s}:{email:h,code:i.trim(),newPassword:s},x=await M("/auth/reset-password",{method:"POST",body:y});return x.ok?(o(""),l(""),u(""),g(!0),{success:{key:"pw.changed"}}):ue(x)});return r(N,{children:[t.targets.length>1?r(qe,{label:e("pw.via"),value:n,onChange:k=>{a(k),o(""),f.reset()},options:t.targets.map(k=>({value:k,label:sn(k,t.me[k])}))}):r($,{children:e("pw.codeTo",{target:sn(n,h)})}),r(va,{code:i,setCode:o,sender:f,onSend:()=>void f.send(h,n,"reset_password")}),r(ws,{pw:s,setPw:l,confirm:c,setConfirm:u}),r("div",{class:"fx-inline",children:[r(P,{variant:"primary",pending:m.pending,onClick:v,children:e("pw.submitReset")}),d&&r(P,{onClick:t.onDone,children:e("common.done")})]}),r(B,{a:m})]})}function $d(){let{t}=D(),e=O(),n=()=>void e.run(async()=>{let a=await M("/auth/logout-all",{method:"POST"});if(!a.ok)return ue(a);try{await j().forsionLogout?.()}catch(i){return{error:{raw:$e(i)}}}return{success:{key:"sec.logoutAllDone"}}});return r(G,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[r(ge,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:r(nt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&r(ae,{children:r(B,{a:e})})]})}function Ud(t){let{t:e}=D(),n=["phone","email"].filter(y=>!!t.me[y]),[a,i]=S(!1),[o,s]=S(n.length?"code":"password"),[l,c]=S(n[0]??null),[u,f]=S(""),[m,d]=S(""),g=xa(),h=O(),v=l&&t.me[l]||"",k=()=>void h.run(async()=>{if(o==="code"&&!u.trim())return{error:{key:"err.codeRequired"}};if(o==="password"&&!m)return{error:{key:"pw.currentRequired"}};let y=await M("/auth/delete-account",{method:"POST",body:o==="code"?{verification_code:u.trim()}:{password:m}});if(!y.ok)return ue(y);try{await j().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return r(G,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:r(P,{variant:"danger",onClick:()=>{i(!a),h.clear()},children:e(a?"common.cancel":"del.start")}),children:a&&r(ae,{class:"fx-form",children:[r($,{tone:"error",children:e("del.warn")}),n.length>0&&r(qe,{label:e("del.methodLabel"),value:o,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),o==="code"&&l?r(N,{children:[n.length>1&&r(qe,{label:e("pw.via"),value:l,onChange:y=>{c(y),f(""),g.reset()},options:n.map(y=>({value:y,label:sn(y,t.me[y])}))}),r(va,{code:u,setCode:f,sender:g,label:e("del.codeLabel",{target:sn(l,v)}),onSend:()=>void g.send(v,l,"delete_account")})]}):r("label",{class:"fx-field",children:[r("span",{children:e("del.passwordLabel")}),r("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:m,onInput:y=>d(y.currentTarget.value)})]}),r("div",{class:"fx-inline",children:r(nt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:h.pending,onConfirm:k})}),r(B,{a:h})]})})}var Ss=20;function As(){let t=ve(async()=>{let[e,n]=await Promise.all([M("/token-quota/my"),M(`/token-quota/my/logs?limit=${Ss}&offset=0`)]);if(!e.ok)return e;let a=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:Z(e.data?.dailyLimit),logs:a,total:n.ok?Z(n.data?.total)??a?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?r(he,{panels:3,rows:2}):t.state==="signedOut"?r(ye,{}):t.state==="error"?r(be,{error:t.error,onRetry:t.retry}):r(N,{children:[r(Hd,{dailyLimit:t.data.dailyLimit}),r(Wd,{base:t.data,onRetry:t.reload})]})}function Hd(t){let{t:e,locale:n}=D(),[a,i]=S(30),[o,s]=S({state:"loading"}),[l,c]=S(!1),[u,f]=S(0),m=W(0);X(()=>{let w=++m.current;return c(!0),M(`/usage/stats?days=${a}`).then(C=>{w===m.current&&(c(!1),s(C.ok?{state:"ready",data:C.data??{}}:{state:"error",fail:C}))}),()=>{m.current++}},[a,u]);let d=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Qn(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=w=>Qn(w,t.dailyLimit)??"\u2014",h=r(qe,{label:e("usage.range"),value:a,onChange:i,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})}]}),v=o.state==="ready"?o.data:null,k=(v?.byModel??[]).filter(Boolean),y=(v?.byProject??[]).filter(Boolean),x=Z(v?.successRate);return r(N,{children:[r(G,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:h,children:[o.state==="error"?r("div",{class:"fx-sub",children:r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:Ne(Ce(o.fail),e)}),r("button",{type:"button",class:"fx-link",onClick:()=>f(w=>w+1),children:e("common.retry")})]})}):r("div",{class:`fx-stats fx-block${l&&v?" is-refreshing":""}`,"aria-busy":l||void 0,children:[r(ya,{label:e("usage.requests"),value:v?re(Z(v.totalRequests)??0,n):null,testId:"usage-requests"}),r(ya,{label:e("usage.successRate"),value:v?x===null?"\u2014":`${x.toFixed(1)}%`:null}),r(ya,{label:e("usage.consumption"),value:v?g(v.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),d&&r("div",{class:"fx-sub fx-sub--tight",children:r($,{children:e(d)})})]}),o.state!=="error"&&r(N,{children:[r(G,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:r(_s,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:k.map(w=>[w.modelName||w.modelId||"\u2014",re(Z(w.count)??0,n),g(w.pointsCost)])})}),r(G,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:r(_s,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:y.map(w=>[Cs(w.projectSource,e("usage.appUnknown")),re(Z(w.count)??0,n),g(w.pointsCost)])})})]})]})}var qd={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"},Cs=(t,e)=>!t||t==="unknown"?e:qd[t]??t;function ya(t){return r("div",{class:"fx-stat",children:[r("span",{class:"fx-stat-label",children:t.label}),t.value===null?r("span",{class:"fx-skel fx-skel--stat"}):r("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&r("span",{class:"fx-stat-sub",children:t.sub})]})}function _s(t){return t.loading?r("div",{class:"fx-sub",children:[r("span",{class:"fx-skel fx-skel--row"}),r("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?r("div",{class:"fx-table-wrap fx-block",children:r("table",{class:"fx-table",children:[r("thead",{children:r("tr",{children:t.head.map((e,n)=>r("th",{class:n?"is-num":"",children:e},n))})}),r("tbody",{children:t.rows.map((e,n)=>r("tr",{children:e.map((a,i)=>r("td",{class:i?"is-num":"",children:a},i))},n))})]})}):r(Oe,{children:t.empty})}function Wd(t){let{t:e,locale:n}=D(),a=we(),[i,o]=S(t.base.logs??[]),[s,l]=S(t.base.total),c=O();X(()=>{o(t.base.logs??[]),l(t.base.total)},[t.base]);let u=()=>void c.run(async()=>{let m=await M(`/token-quota/my/logs?limit=${Ss}&offset=${i.length}`);if(!m.ok)return{error:Ce(m)};let d=Array.isArray(m.data?.logs)?m.data.logs:[];a.current&&(o(g=>[...g,...d]),l(g=>d.length?Z(m.data?.total)??g:i.length))}),f=t.base.dailyLimit;return r(G,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?r("div",{class:"fx-sub",children:r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:Ne(Ce(t.base.logsFail),e)}),r("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):i.length===0?r(Oe,{children:e("usage.recentEmpty")}):r("div",{class:"fx-list fx-block",role:"list",children:i.map((m,d)=>r("div",{class:"fx-list-row",role:"listitem",children:[r("span",{class:"fx-list-main",children:[r("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&r("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),r("small",{children:[Je(m.createdAt,n),Cs(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),r("span",{class:"fx-value",children:Qn(m.pointsCost,f)??"\u2014"})]},m.id??d))}),i.length>0&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:e("usage.shown",{shown:re(i.length,n),total:re(Math.max(s,i.length),n)})}),i.length<s&&r(P,{pending:c.pending,onClick:u,children:e("common.loadMore")})]}),c.error&&r("div",{class:"fx-sub fx-sub--tight",children:r(B,{a:c})})]})}var jd=["plugin","amadeus-plugin","skill","agent","space","theme"],Xd=["github","npm","zip"],Vd=new Set(["market_npm_invalid","market_npm_source","market_github_source","market_not_found","market_zip_required","market_zip_invalid","market_zip_too_large","market_version_required","market_version_invalid","market_version_mismatch","market_version_not_newer","market_icon_invalid","market_duplicate","market_update_pending","market_stale"]),Ps=t=>`sub.type.${t.replace("-","_")}`,Ts=t=>t==="approved"?"sub.approved":t==="rejected"?"sub.rejected":"sub.pending";function Kd({target:t,onDone:e,onCancel:n}){let a=Ue(),i=Yr(),o=we(),s=O(),[l,c]=S("github"),[u,f]=S({type:"plugin",name:"",summary:"",githubRepoUrl:"",npmPackage:"",version:"",readme:""}),m=W(null),d=W(null);X(()=>{d.current?.scrollIntoView({block:"start"}),d.current?.querySelector("input")?.focus({preventScroll:!0})},[]);let g=!!t||l==="zip",h=(y,x)=>{f(w=>({...w,[y]:x})),s.clear()},v=()=>void s.run(async()=>{if(!t&&!u.name.trim())return{error:{key:"sub.errName"}};if(!g&&!(l==="github"?u.githubRepoUrl:u.npmPackage).trim())return{error:{key:"sub.errSource"}};let y=m.current?.files?.[0];if(g&&!y)return{error:{key:"sub.errZip"}};if(y&&y.size>50*1024*1024)return{error:{key:"sub.errLarge"}};if(g&&!u.version.trim())return{error:{key:"sub.errVersion"}};let x=j().cloudInvoke;if(!x)return{error:{key:"err.unavailable"}};let w=t?{summary:u.summary.trim(),version:u.version.trim(),readme:u.readme}:{type:u.type,source:l,name:u.name.trim(),summary:u.summary.trim(),...l==="github"?{githubRepoUrl:u.githubRepoUrl.trim()}:l==="npm"?{npmPackage:u.npmPackage.trim()}:{version:u.version.trim(),readme:u.readme}},C=g&&y?new Uint8Array(await y.arrayBuffer()):null;if(!o.current)return;let R=Fn(await x("cloud:marketSubmit",{...t?{id:t.id}:{},fields:w,...C&&y?{zip:{name:y.name,data:C}}:{}}));if(o.current){if(!R.ok)return R.status===401&&j().authStatus?.().catch(()=>{}),Vd.has(R.code||"")?{error:{key:`sub.err.${R.code}`}}:ue(R);e()}}),k=(y,x,w="")=>r("label",{class:"fx-sub-field",for:`${i}-${y}`,children:[r("span",{children:x}),r("input",{id:`${i}-${y}`,value:u[y],placeholder:w,maxLength:y==="summary"?2e3:500,onInput:C=>h(y,C.currentTarget.value)})]});return r(G,{title:t?a("sub.updateTitle",{name:t.name}):a("sub.new"),children:r("form",{ref:d,class:"fx-sub-form",onSubmit:y=>{y.preventDefault(),v()},children:[r("fieldset",{disabled:s.pending,children:[!t&&r(N,{children:[r("div",{class:"fx-sub-columns",children:[r("label",{class:"fx-sub-field",for:`${i}-type`,children:[r("span",{id:`${i}-type-label`,children:a("sub.type")}),r("select",{"aria-labelledby":`${i}-type-label`,id:`${i}-type`,value:u.type,onChange:y=>h("type",y.currentTarget.value),children:jd.map(y=>r("option",{value:y,children:a(Ps(y))},y))})]}),r("label",{class:"fx-sub-field",for:`${i}-source`,children:[r("span",{id:`${i}-source-label`,children:a("sub.source")}),r("select",{"aria-labelledby":`${i}-source-label`,id:`${i}-source`,value:l,onChange:y=>{c(y.currentTarget.value),s.clear()},children:Xd.map(y=>r("option",{value:y,children:y==="github"?"GitHub":y==="npm"?"npm":"ZIP"},y))})]})]}),k("name",a("sub.name"))]}),k("summary",a("sub.summary"),t?a("sub.keep"):""),g?r(N,{children:[r("label",{class:"fx-sub-field",for:`${i}-zip`,children:[r("span",{id:`${i}-zip-label`,children:a("sub.zip")}),r("input",{"aria-labelledby":`${i}-zip-label`,id:`${i}-zip`,type:"file",accept:".zip,application/zip",ref:m}),r("small",{children:a("sub.zipHint")})]}),k("version",a("sub.version"),t?.version?`> ${t.version}`:"1.0.0"),t&&r($,{children:a("sub.versionHint")}),r("label",{class:"fx-sub-field",for:`${i}-readme`,children:[r("span",{children:a("sub.readme")}),r("textarea",{id:`${i}-readme`,value:u.readme,rows:5,maxLength:2e5,placeholder:t?a("sub.keep"):"",onInput:y=>h("readme",y.currentTarget.value)})]})]}):r(N,{children:[l==="github"?k("githubRepoUrl",a("sub.repo"),"https://github.com/owner/repo"):k("npmPackage",a("sub.npm"),"@scope/plugin-name"),r($,{children:a(l==="github"?"sub.repoHint":"sub.npmHint")})]}),r($,{children:a("sub.reviewHint")})]}),r("div",{class:"fx-sub-actions",children:[r(P,{variant:"primary",pending:s.pending,submit:!0,children:a("sub.submit")}),r(P,{disabled:s.pending,onClick:n,children:a("common.cancel")})]}),r(B,{a:s,captchaSection:"submission"})]})})}function Jd({items:t,reload:e}){let n=Ue(),a=Yr(),[i,o]=S("all"),[s,l]=S(null),[c,u]=S(null),f=d=>{u(null),l(d)},m=t.filter(d=>i==="all"||(i==="pending"?d.status==="pending"||!!d.pendingUpdate:d.status===i));return r(N,{children:[s&&r(Kd,{target:s==="new"?null:s,onCancel:()=>l(null),onDone:()=>{u(s==="new"?"sub.submitted":"sub.updated"),l(null),e()}},s==="new"?"new":s.id),r(G,{title:n("sub.mine"),desc:n("sub.desc"),actions:r(N,{children:[r(P,{variant:"primary",disabled:!!s,onClick:()=>f("new"),children:n("sub.new")}),r(P,{disabled:!!s,onClick:e,children:n("sub.refresh")})]}),children:[c&&r("p",{class:"fx-msg is-ok fx-sub-result",role:"status",children:n(c)}),!!t.length&&r("div",{class:"fx-sub-filter",children:[r("label",{for:a,children:n("sub.filter")}),r("select",{id:a,value:i,onChange:d=>o(d.currentTarget.value),children:[r("option",{value:"all",children:n("sub.all")}),["pending","approved","rejected"].map(d=>r("option",{value:d,children:n(Ts(d))},d))]})]}),m.length?m.map(d=>r("article",{class:"fx-sub-item","data-submission-id":d.id,children:[r("div",{class:"fx-sub-item-head",children:[r("strong",{children:d.name}),r("span",{class:`fx-tag ${d.status==="approved"?"fx-status--resolved":d.status==="rejected"?"fx-tag--danger":"fx-tag--accent"}`,children:n(Ts(d.status))})]}),r("div",{class:"fx-sub-meta",children:[r("span",{children:n(Ps(d.type))}),r("span",{children:d.source==="github"?"GitHub":d.source==="npm"?"npm":"ZIP"}),d.version&&r("span",{children:["v",d.version]}),r("span",{children:n("sub.downloads",{n:d.downloads||0})})]}),d.summary&&r("p",{class:"fx-sub-summary",children:d.summary}),d.status==="rejected"&&d.reviewNote&&r($,{tone:"error",children:d.reviewNote}),d.rejectedUpdate&&r($,{tone:"error",children:[n("sub.rejectedVersion",{version:d.rejectedUpdate.version}),d.rejectedUpdate.note?`: ${d.rejectedUpdate.note}`:""]}),d.pendingUpdate?r($,{children:n("sub.pendingVersion",{version:d.pendingUpdate.version})}):d.source==="zip"?r(P,{disabled:!!s,onClick:()=>f(d),children:n("sub.update")}):r($,{children:n("sub.remoteUpdate")})]},d.id)):r(Oe,{children:t.length?n("sub.noResults"):r(N,{children:[r("strong",{children:n("sub.empty")}),r("p",{children:n("sub.emptyHint")})]})})]})]})}function Es(){let t=ve(()=>M("/market/mine"));switch(t.state){case"loading":return r(he,{});case"signedOut":return r(ye,{});case"error":return r(be,{error:t.error,onRetry:t.retry});case"ready":return r(Jd,{items:t.data?.items||[],reload:t.reload})}}var ln=20,er=5,Yd=5*1024*1024,tr=1e4,Gd={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Ms(t){let{t:e}=D(),n=t.status||"open",a=Gd[n];return r("span",{class:`fx-tag fx-status fx-status--${n}`,children:a?e(a):n})}function Is(){let[t,e]=S(null),n=ve(async()=>{let a=await M(`/feedback?limit=${ln}&offset=0`);return a.ok?{ok:!0,status:a.status,data:Array.isArray(a.data?.tickets)?a.data.tickets:[]}:a});return n.state==="loading"?r(he,{panels:1,rows:3}):n.state==="signedOut"?r(ye,{}):n.state==="error"?r(be,{error:n.error,onRetry:n.retry}):t?r(np,{id:t,onBack:()=>{e(null),n.reload()}}):r(Zd,{first:n.data,onOpen:e,onChanged:n.reload})}function Zd(t){let{t:e,locale:n}=D(),a=we(),[i,o]=S(t.first),[s,l]=S(t.first.length===ln),[c,u]=S(!1),[f,m]=S(!1),d=O();X(()=>{o(t.first),l(t.first.length===ln)},[t.first]);let g=()=>void d.run(async()=>{let h=await M(`/feedback?limit=${ln}&offset=${i.length}`);if(!h.ok)return{error:Ce(h)};let v=Array.isArray(h.data?.tickets)?h.data.tickets:[];a.current&&(o(k=>{let y=new Set(k.map(x=>x.id));return[...k,...v.filter(x=>!y.has(x.id))]}),l(v.length===ln))});return r(G,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:c?void 0:r(P,{variant:"primary",onClick:()=>{m(!1),u(!0)},children:[r(E,{name:"plus",size:12})," ",e("fb.new")]}),children:[c&&r(tp,{onCancel:()=>u(!1),onSubmitted:()=>{u(!1),m(!0),t.onChanged()}}),f&&!c&&r(ae,{children:r("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),i.length===0?r(Oe,{children:e("fb.empty")}):r("div",{class:"fx-list fx-block",role:"list",children:i.map(h=>r("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(h.id),children:[r("span",{class:`fx-dot${h.user_unread?" is-on":""}`,"aria-label":h.user_unread?e("fb.unread"):void 0}),r("span",{class:"fx-list-main",children:[r("strong",{children:h.title||(h.description||"").slice(0,60)||e("fb.untitled")}),r("small",{children:Je(h.updated_at||h.created_at,n)})]}),r(Ms,{status:h.status}),r(E,{name:"chevron",size:12})]},h.id))}),i.length>0&&(s||d.error)&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:e("fb.shown",{n:re(i.length,n)})}),s&&r(P,{pending:d.pending,onClick:g,children:e("common.loadMore")})]}),d.error&&r(ae,{children:r(B,{a:d})})]})}function Qd(t){return new Promise((e,n)=>{let a=new FileReader;a.onload=()=>e(String(a.result||"")),a.onerror=()=>n(a.error||new Error("read failed")),a.readAsDataURL(t)})}var ep=0;function tp(t){let{t:e}=D(),n=we(),[a,i]=S(""),[o,s]=S([]),[l,c]=S(null),[u,f]=S(!1),m=W(null),d=O(),[g,h]=S(0),v=W(0);v.current=o.length;let k=async x=>{c(null);for(let w of Array.from(x||[])){if(!w.type||!w.type.startsWith("image/")){c({key:"err.imageType"});continue}if(w.size>Yd){c({key:"err.imageTooLarge"});continue}if(v.current>=er){c({key:"err.tooManyImages"});break}v.current++,h(C=>C+1);try{let C=await Qd(w);if(!n.current)return;let R={id:`img-${++ep}`,filename:w.name||"image",mime_type:w.type,size:w.size,data_base64:C.replace(/^data:[^;]+;base64,/,""),url:C};s(U=>U.length>=er?U:[...U,R])}catch{v.current--,c({key:"err.imageRead"})}finally{n.current&&h(C=>C-1)}}},y=()=>void d.run(async()=>{let x=a.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>tr)return{error:{key:"err.feedbackTooLong"}};let w=o.map(({filename:R,mime_type:U,size:J,data_base64:H})=>({filename:R,mime_type:U,size:J,data_base64:H})),C=await M("/feedback",{method:"POST",body:{description:x,attachments:w},timeoutMs:12e4});if(!C.ok)return ue(C);t.onSubmitted()});return r("div",{class:`fx-sub fx-form fx-composer${u?" is-drag":""}`,onPaste:x=>{let w=Array.from(x.clipboardData?.items||[]).filter(C=>C.kind==="file").map(C=>C.getAsFile()).filter(Boolean);w.length&&(x.preventDefault(),k(w))},onDragOver:x=>{x.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:x=>{x.preventDefault(),f(!1),k(x.dataTransfer?.files)},children:[r("label",{class:"fx-field",children:[r("span",{children:e("fb.descLabel")}),r("textarea",{class:"fx-input fx-textarea",rows:5,value:a,maxLength:tr,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>i(x.currentTarget.value)})]}),r("p",{class:"fx-note",children:e("fb.imagesHint",{n:er})}),o.length>0&&r("div",{class:"fx-thumbs",children:o.map(x=>r("span",{class:"fx-thumb",children:[r("img",{src:x.url,alt:x.filename}),r("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(w=>w.filter(C=>C.id!==x.id)),c(null)},children:r(E,{name:"x",size:11})})]},x.id))}),l&&r("div",{class:"fx-msg is-error",role:"alert",children:Ne(l,e)}),r("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let w=x.currentTarget;k(w.files),w.value=""}}),r("div",{class:"fx-inline",children:[r(P,{disabled:o.length>=er||d.pending,onClick:()=>m.current?.click(),children:[r(E,{name:"image",size:12})," ",e("fb.addImages")]}),r("span",{class:"fx-grow"}),r(P,{disabled:d.pending,onClick:t.onCancel,children:e("common.cancel")}),r(P,{variant:"primary",pending:d.pending,disabled:g>0,onClick:y,children:e("fb.submit")})]}),r(B,{a:d})]})}function np(t){let{t:e,locale:n}=D(),[a,i]=S({state:"loading"}),[o,s]=S(0),[l,c]=S(""),[u,f]=S(null),m=O(),d=W(0);X(()=>{let C=++d.current;return M(`/feedback/${encodeURIComponent(t.id)}`).then(R=>{if(C===d.current){if(!R.ok){i({state:"error",fail:R});return}i({state:"ready",data:{ticket:R.data.ticket,replies:R.data.replies??[],attachments:R.data.attachments??[]}}),M(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{d.current++}},[t.id,o]),X(()=>{if(!u)return;let C=R=>{R.key==="Escape"&&f(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[u]);let g=r("div",{class:"fx-back",children:r(P,{onClick:t.onBack,children:[r(E,{name:"back",size:12})," ",e("fb.back")]})});if(a.state==="loading")return r(N,{children:[g,r(he,{panels:1,rows:3})]});if(a.state==="error")return r(N,{children:[g,r(be,{error:Ce(a.fail),onRetry:()=>{i({state:"loading"}),s(C=>C+1)}})]});let{ticket:h,replies:v,attachments:k}=a.data,y=h.status==="closed",x=C=>k.filter(R=>(R.reply_id??null)===C),w=()=>void m.run(async()=>{let C=l.trim();if(!C)return{error:{key:"err.replyEmpty"}};if(C.length>tr)return{error:{key:"err.replyTooLong"}};let R=await M(`/feedback/${encodeURIComponent(h.id)}/replies`,{method:"POST",body:{content:C},timeoutMs:6e4});return R.ok?(c(""),s(U=>U+1),{success:{key:"fb.replySent"}}):ue(R)});return r(N,{children:[g,r(G,{icon:"message",title:h.title||e("fb.untitled"),actions:r(Ms,{status:h.status}),desc:`#${String(h.id).slice(0,8)} \xB7 ${Je(h.created_at,n)}`,children:[r("div",{class:"fx-thread fx-block",children:[r(Rs,{who:"user",when:h.created_at,text:h.description||"",files:x(null),onZoom:f}),v.map((C,R)=>r(Rs,{who:C.author_role==="user"?"user":"admin",when:C.created_at,text:C.content||"",files:C.id?x(C.id):[],onZoom:f},C.id??R))]}),y?r(ae,{children:r($,{children:e("fb.closedNote")})}):r(ae,{class:"fx-form",children:[r("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:tr,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:C=>{c(C.currentTarget.value),m.success&&m.clear()}}),r("div",{class:"fx-inline",children:[r("span",{class:"fx-grow"}),r(P,{variant:"primary",pending:m.pending,onClick:w,children:e("fb.replySend")})]}),r(B,{a:m})]})]}),u&&r("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>f(null),children:r("img",{src:u,alt:""})})]})}function Rs(t){let{t:e,locale:n}=D();return r("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[r("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",Je(t.when,n)]}),r("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&r("div",{class:"fx-thumbs",children:t.files.map((a,i)=>{let o=a.mime_type||"";if(o.startsWith("image/")&&a.data_base64){let s=`data:${o};base64,${a.data_base64}`;return r("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:r("img",{src:s,alt:a.filename||""})},a.id??i)}return r("span",{class:"fx-tag",children:[r(E,{name:"card",size:11})," ",a.filename||e("fb.attachment")]},a.id??i)})})]})}var Ds=[{id:"monthly",field:"priceMonthly",discount:"recurringPriceMonthly"},{id:"quarterly",field:"priceQuarterly",discount:"recurringPriceQuarterly"},{id:"yearly",field:"priceYearly",discount:"recurringPriceYearly"}];function Ls(t,e){let n=Ds.find(s=>s.id===e),a=Z(t.priceMonthly)??0,i=(Z(t[n.field])??0)||(e==="quarterly"?Math.round(a*300)/100:0),o=Z(t[n.discount])??0;return o>0&&o<i?o:i}function ka(t,e,n){let a=re(t,n),i=String(e||"CNY").toUpperCase();return i==="CNY"?`\xA5${a}`:i==="USD"?`$${a}`:`${a} ${i}`}async function rp(){let[t,e,n]=await Promise.all([M("/membership/my"),M("/credits/balance"),M("/features")]);return!t.ok&&wt(t)?t:!e.ok&&wt(e)?e:{ok:!0,status:200,data:{membership:t.ok?t.data?.membership??null:null,membershipFailed:!t.ok,balance:e.ok?Z(e.data?.balance):null,balanceFailed:!e.ok,features:n.ok&&n.data&&typeof n.data=="object"?n.data:{}}}}async function wa(t,e){let[n,a]=await Promise.all([rp(),M(t)]);return n.ok?a.ok?{ok:!0,status:a.status,data:{status:n.data,list:e(a.data)}}:a:n}var _a=t=>(Array.isArray(t)?t:[]).filter(e=>!!e&&typeof e=="object"&&e.isActive!==!1),ap=15*6e4;function Sa(t){let e=W(0),n=W(0),a=W(t);return a.current=t,X(()=>{let i=()=>{let o=Date.now();o>e.current||document.visibilityState==="hidden"||o-n.current<2e3||(n.current=o,a.current?.())};return window.addEventListener("focus",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",i)}},[]),()=>{e.current=Date.now()+ap}}function zs(t){let e=t.membership;return e&&(e.status===void 0||e.status==="active")?e:null}function Aa(t){let{t:e,locale:n}=D(),a=t.status,i=zs(a),o=rn(i?.tier),s=o==="Free";return r("section",{class:"fx-shop-strip","aria-label":e("store.status"),children:[r("div",{class:"fx-shop-stat",children:[r("small",{children:e("store.tier")}),a.membershipFailed?r("b",{class:"is-empty",children:"\u2014"}):r("b",{"data-testid":"shop-tier",children:[s?e("member.freeName"):i?.plan?.name||o,!s&&r("i",{children:i?.expiresAt?e("member.expires",{date:Vn(i.expiresAt,n)}):e("member.noExpiry")})]})]}),r("div",{class:"fx-shop-stat",children:[r("small",{children:e("store.balance")}),r("b",{class:a.balance===null?"is-empty":"","data-testid":"shop-balance",children:a.balance===null?"\u2014":re(a.balance,n)})]}),(a.membershipFailed||a.balanceFailed)&&r("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")}),r("span",{class:"fx-grow"}),t.children]})}function Ca(t){return r("section",{class:"fx-shop-section",children:[r("div",{class:"fx-shop-head",children:[r("div",{children:[r("h2",{children:t.title}),t.desc&&r("p",{children:t.desc})]}),t.right]}),t.children]})}function Ta(t){let e=O(),[n,a]=S(null),i=(o,s,l,c)=>{a(o),e.run(async()=>{if(!await Ut(s,l,c))return{error:{key:"err.openFailed"}};t()})};return{a:e,payingId:e.pending?n:null,open:i}}function Pa(t){return r(P,{variant:"ghost",pending:t.pending,disabled:t.disabled,onClick:t.onClick,children:[t.label,r(E,{name:"external",size:12})]})}function Ea(t){return r("div",{class:"fx-shop-empty",children:t.children})}function Ns(){let{t,locale:e}=D(),n=ve(()=>wa("/payment/offerings",g=>_a(g?.membershipPlans))),a=Sa(n.state==="ready"?n.reload:null),i=Ta(a),[o,s]=S("monthly");if(n.state==="loading")return r(he,{panels:2,rows:2});if(n.state==="signedOut")return r(ye,{});if(n.state==="error")return r(be,{error:n.error,onRetry:n.retry});let{status:l,list:c}=n.data,u=l.features.payment!==!1,f=Ds.filter(g=>c.some(h=>Ls(h,g.id)>0)),m=f.some(g=>g.id===o)?o:f[0]?.id??"monthly",d=zs(l)?.tier?.toLowerCase()??null;return r(N,{children:[r(Aa,{status:l,onRetry:n.reload}),r(Ca,{title:t("store.choosePlan"),desc:t(u?"store.payHint":"store.payOff"),right:f.length>1?r(qe,{value:m,label:t("store.period"),onChange:s,options:f.map(g=>({value:g.id,label:t(`store.period.${g.id}`)}))}):void 0,children:[c.length===0?r(Ea,{children:t("store.noPlans")}):r("div",{class:"fx-shop-tiers",children:c.map(g=>{let h=Ls(g,m),v=!!d&&!l.membershipFailed&&g.tier?.toLowerCase()===d;return r("article",{class:"fx-shop-tier","data-tier":g.tier,children:[r("h3",{children:[g.name||rn(g.tier),v&&r("span",{class:"fx-shop-current",children:[r(E,{name:"check",size:12}),t("store.currentTier")]})]}),r("div",{class:"fx-shop-price",children:h>0?r(N,{children:[ka(h,g.currency,e),r("small",{children:t(`store.per.${m}`)})]}):"\u2014"}),r("p",{children:g.description}),u&&h>0&&r(Pa,{label:t(v?"member.renew":"store.pay"),pending:i.payingId===g.id,disabled:i.a.pending,onClick:()=>i.open(g.id,"membership",g.id,m)})]},g.id)})}),r(B,{a:i.a})]})]})}function Os(){let{t,locale:e}=D(),n=ve(()=>wa("/payment/offerings",c=>_a(c?.packages))),a=Sa(n.state==="ready"?n.reload:null),i=Ta(a);if(n.state==="loading")return r(he,{panels:2,rows:2});if(n.state==="signedOut")return r(ye,{});if(n.state==="error")return r(be,{error:n.error,onRetry:n.retry});let{status:o,list:s}=n.data,l=o.features.payment!==!1;return r(N,{children:[r(Aa,{status:o,onRetry:n.reload}),r(Ca,{title:t("store.packs"),desc:t(l?"store.packsHint":"store.payOff"),children:[s.length===0?r(Ea,{children:t("store.noPacks")}):r("div",{class:"fx-shop-grid",children:s.map(c=>{let u=Z(c.price)??0;return r(Bs,{icon:"coins",kind:t("store.kind.pack"),name:`${c.name||""} \xB7 ${t("store.nPoints",{n:re(c.credits,e)})}`,desc:c.description,meta:t("store.instant"),children:l&&u>0&&r(Pa,{label:t("store.payPrice",{price:ka(u,c.currency,e)}),pending:i.payingId===c.id,disabled:i.a.pending,onClick:()=>i.open(c.id,"credits")})},c.id)})}),r(B,{a:i.a})]})]})}function Bs(t){return r("article",{class:"fx-shop-card",children:[r("div",{class:"fx-shop-visual","aria-hidden":"true",children:t.emoji?r("span",{class:"fx-shop-emoji",children:t.emoji}):r(E,{name:t.icon,size:18})}),r("div",{class:"fx-shop-body",children:[r("span",{class:"fx-shop-kind",children:t.kind}),r("strong",{children:t.name}),t.desc&&r("p",{children:t.desc}),r("div",{class:"fx-shop-foot",children:[r("span",{class:"fx-shop-meta",children:t.meta}),r("span",{class:"fx-shop-acts",children:t.children})]}),t.below]})]})}var ip={reset_card:"store.kind.card",api_quota_key:"store.kind.code"};function op(t){let{t:e,locale:n}=D(),{p:a}=t,i=O(),[o,s]=S(null),[l,c]=S(!1),u=Z(a.pricePoints)??0,f=Z(a.priceRmb)??0,m=typeof a.availableKeys=="number"&&a.availableKeys<=0,d=u>0&&t.balance!==null&&t.balance<u,g=()=>void i.run(async()=>{let v=await M("/shop/purchase",{method:"POST",body:{productId:a.id,payMethod:"points"},timeoutMs:3e4});return v.ok?(s(typeof v.data?.key=="string"&&v.data.key?v.data.key:null),t.onRedeemed(),{success:{key:"store.redeemed"}}):v.status===0?(c(!0),{error:{key:"store.uncertain"}}):ue(v)}),h=m?e("store.soldOut"):d?e("err.insufficientPoints"):typeof a.availableKeys=="number"?e("store.left",{n:a.availableKeys}):e("store.toBackpack");return r(Bs,{icon:a.type==="api_quota_key"?"key":"gift",emoji:a.icon,kind:e(ip[a.type||""]??"store.kind.item"),name:a.name||"",desc:a.description,meta:h,below:r(N,{children:[r(B,{a:i}),o&&r("div",{class:"fx-shop-key",children:[r("code",{children:o}),r(Ye,{text:o,label:e("backpack.copyKey")})]})]}),children:[u>0&&r(nt,{variant:"primary",pending:i.pending,disabled:m||d||l,label:e("store.redeem",{n:re(u,n)}),confirmLabel:e("store.redeemConfirm",{n:re(u,n)}),onConfirm:g}),t.payment&&f>0&&r(Pa,{label:ka(f,a.currency,n),pending:t.paying,disabled:t.payBusy||m,onClick:t.onPay})]})}function Fs(){let{t,goTo:e}=D(),n=ve(()=>wa("/shop/products",u=>_a(u))),a=Sa(n.state==="ready"?n.reload:null),i=Ta(a);if(n.state==="loading")return r(he,{panels:2,rows:2});if(n.state==="signedOut")return r(ye,{});if(n.state==="error")return r(be,{error:n.error,onRetry:n.retry});let{status:o,list:s}=n.data,l=o.features.payment!==!1,c=o.features.shop!==!1;return r(N,{children:[r(Aa,{status:o,onRetry:n.reload,children:e&&r(P,{onClick:()=>e("backpack"),children:t("store.openBackpack")})}),r(Ca,{title:t("store.redeemTitle"),desc:t("store.redeemHint"),children:[!c||s.length===0?r(Ea,{children:t(c?"store.noItems":"store.itemsOff")}):r("div",{class:"fx-shop-grid",children:s.map(u=>r(op,{p:u,balance:o.balance,payment:l,paying:i.payingId===u.id,payBusy:i.a.pending,onPay:()=>i.open(u.id,"storefront"),onRedeemed:n.reload},u.id))}),r(B,{a:i.a})]})]})}var sp="forsion-extend",$s=[{id:"account",titleKey:"page.account",Component:Ko},{id:"profile",titleKey:"page.profile",Component:fs},{id:"quota",titleKey:"page.quota",Component:gs},{id:"backpack",titleKey:"page.backpack",Component:hs},{id:"submission",titleKey:"page.submission",Component:Es},{id:"security",titleKey:"page.security",Component:ys},{id:"usage",titleKey:"page.usage",Component:As},{id:"feedback",titleKey:"page.feedback",Component:Is}],Us=[{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:Os},{id:"items",titleKey:"store.items",descKey:"store.items.desc",icon:"package",Component:Fs}],lp=t=>`forsion/fx:${sp}:${t}`;function Hs(t){let{ctx:e,page:n}=t,[a,i]=S(()=>Ke(e.getLocale?.()));X(()=>{i(Ke(e.getLocale?.()));let l=e.subscribeLocale?.(c=>i(Ke(c)));return()=>{typeof l=="function"&&l()}},[e]);let o=Ve(()=>{let l=e.app?.openSettings;return{ctx:e,locale:a,t:Hn(a),goTo:typeof l=="function"?c=>l.call(e.app,lp(c)):null}},[e,a]),s=n.Component;return r(ea.Provider,{value:o,children:r("div",{class:"fx-acct","data-fx-page":n.id,lang:a==="zh"?"zh-CN":"en",children:[r("style",{children:yo}),r(s,{})]})})}function qs(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerStoreView!="function")return 0;let a=i=>()=>Un(Ke(t.getLocale?.()),i);for(let i of Us)t.registerStoreView({id:i.id,title:a(i.titleKey),description:a(i.descKey),group:a("store.group"),icon:i.icon,mount(o){return ut(r(Hs,{ctx:t,page:i}),o),()=>{ut(null,o)}}});return Us.length}function Ws(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let a of $s)t.registerSettingsView({id:a.id,category:"forsion",title:()=>Un(Ke(t.getLocale?.()),a.titleKey),mount(i){return ut(r(Hs,{ctx:t,page:a}),i),()=>{ut(null,i)}}});return $s.length}var js;if(typeof ctx<"u"){Ws(ctx),qs(ctx);let t=Ao(ctx);t&&(js=()=>t.dispose())}return _l(cp);})();
599
619
  return __fxExtend.dispose;