@forsion/extend 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/SIGNATURE +6 -6
- package/dist/desktop.mjs +35 -35
- package/dist/main.js +61 -51
- package/manifest.json +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";var __fxExtend=(()=>{var
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kd(e,t){return jd(e)||Gd(e,t)||Jd(e,t)||Xd()}function Jd(e,t){if(e){if(typeof e=="string")return Ei(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ei(e,t):void 0}}function jo(e){var t,n;function r(i,s){try{var l=e[i](s),c=l.value,d=c instanceof Wd;Promise.resolve(d?c.v:c).then(function(f){if(d){var p=i==="return"&&c.k?i:"next";if(!c.k||f.done)return r(p,f);f=e[p](f).value}a(!!l.done,f)},function(f){r("throw",f)})}catch(f){a(2,f)}}function a(i,s){i===2?t.reject(s):t.resolve({value:s,done:i}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,c){var d={key:i,arg:s,resolve:l,reject:c,next:null};n?n=n.next=d:(t=n=d,r(i,s))})},typeof e.return!="function"&&(this.return=void 0)}jo.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},jo.prototype.next=function(e){return this._invoke("next",e)},jo.prototype.throw=function(e){return this._invoke("throw",e)},jo.prototype.return=function(e){return this._invoke("return",e)};var Vi=Object.entries,Pi=Object.setPrototypeOf,Yd=Object.isFrozen,Zd=Object.getPrototypeOf,Qd=Object.getOwnPropertyDescriptor,$e=Object.freeze,Ve=Object.seal,jn=Object.create,Wi=typeof Reflect<"u"&&Reflect,Xr=Wi.apply,Kr=Wi.construct;$e||($e=function(t){return t});Ve||(Ve=function(t){return t});Xr||(Xr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];return t.apply(n,a)});Kr||(Kr=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new t(...r)});var Sn=Fe(Array.prototype.forEach);Array.prototype.indexOf;var ep=Fe(Array.prototype.lastIndexOf),Mi=Fe(Array.prototype.pop),uo=Fe(Array.prototype.push);Array.prototype.slice;var tp=Fe(Array.prototype.splice),Gn=Array.isArray,go=Fe(String.prototype.toLowerCase),qr=Fe(String.prototype.toString),Ii=Fe(String.prototype.match),fo=Fe(String.prototype.replace),Ri=Fe(String.prototype.indexOf),np=Fe(String.prototype.trim),op=Fe(Number.prototype.toString),rp=Fe(Boolean.prototype.toString),Li=typeof BigInt>"u"?null:Fe(BigInt.prototype.toString),Di=typeof Symbol>"u"?null:Fe(Symbol.prototype.toString),ot=Fe(Object.prototype.hasOwnProperty),mo=Fe(Object.prototype.toString),Ke=Fe(RegExp.prototype.test),cn=ap(TypeError);function Fe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return Xr(e,t,r)}}function ap(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kr(e,n)}}function me(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:go;if(Pi&&Pi(e,null),!Gn(t))return e;let r=t.length;for(;r--;){let a=t[r];if(typeof a=="string"){let i=n(a);i!==a&&(Yd(t)||(t[r]=i),a=i)}e[a]=!0}return e}function ip(e){for(let t=0;t<e.length;t++)ot(e,t)||(e[t]=null);return e}function lt(e){let t=jn(null);for(let r of Vi(e)){var n=Kd(r,2);let a=n[0],i=n[1];ot(e,a)&&(Gn(i)?t[a]=ip(i):i&&typeof i=="object"&&i.constructor===Object?t[a]=lt(i):t[a]=i)}return t}function sp(e){switch(typeof e){case"string":return e;case"number":return op(e);case"boolean":return rp(e);case"bigint":return Li?Li(e):"0";case"symbol":return Di?Di(e):"Symbol()";case"undefined":return mo(e);case"function":case"object":{if(e===null)return mo(e);let t=e,n=ht(t,"toString");if(typeof n=="function"){let r=n(t);return typeof r=="string"?r:mo(r)}return mo(e)}default:return mo(e)}}function ht(e,t){for(;e!==null;){let r=Qd(e,t);if(r){if(r.get)return Fe(r.get);if(typeof r.value=="function")return Fe(r.value)}e=Zd(e)}function n(){return null}return n}function lp(e){try{return Ke(e,""),!0}catch{return!1}}var Ni=$e(["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"]),Hr=$e(["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"]),Vr=$e(["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"]),cp=$e(["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=$e(["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"]),dp=$e(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Oi=$e(["#text"]),Fi=$e(["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"]),jr=$e(["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"]),$i=$e(["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"]),Go=$e(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pp=Ve(/{{[\w\W]*|^[\w\W]*}}/g),up=Ve(/<%[\w\W]*|^[\w\W]*%>/g),fp=Ve(/\${[\w\W]*/g),mp=Ve(/^data-[\-\w.\u00B7-\uFFFF]+$/),gp=Ve(/^aria-[\-\w]+$/),Bi=Ve(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hp=Ve(/^(?:\w+script|data):/i),bp=Ve(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vp=Ve(/^html$/i),yp=Ve(/^[a-z][.\w]*(-[.\w]+)+$/i),Ui=Ve(/<[/\w!]/g),qi=Ve(/<[/\w]/g),xp=Ve(/<\/no(script|embed|frames)/i),kp=Ve(/\/>/i),st={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ji=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],wp=$e(me({},ji)),zp=(function(){let e={};return Sn(ji,t=>{e[t]=Ve(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),$e(e)})(),_p=function(){return typeof window>"u"?null:window},Sp=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Hi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},dn=function(t,n,r,a){return ot(t,n)&&Gn(t[n])?me(a.base?lt(a.base):{},t[n],a.transform):r},Gr=function(t,n,r){let a=ot(t,n)?t[n]:void 0;return a&&typeof a=="object"?lt(a):r()};function Gi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_p(),t=M=>Gi(M);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==st.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,a=r.currentScript;e.DocumentFragment;let i=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let d=e.DOMParser,f=e.trustedTypes,p=l.prototype,u=ht(p,"cloneNode"),h=ht(p,"remove"),m=ht(p,"removeAttributeNode"),y=ht(p,"nextSibling"),_=ht(p,"childNodes"),C=ht(p,"parentNode"),x=ht(p,"shadowRoot"),k=ht(p,"attributes"),A=s&&s.prototype?ht(s.prototype,"nodeType"):null,O=s&&s.prototype?ht(s.prototype,"nodeName"):null,q=s&&s.prototype?ht(s.prototype,"ownerDocument"):null,N=function(g){return A?A(g):g.nodeType},B=function(g){return O?O(g):g.nodeName};if(typeof i=="function"){let M=n.createElement("template");M.content&&M.content.ownerDocument&&(n=M.content.ownerDocument)}let Y,se="",V,ne=!1,pe=0,Ee=function(){if(pe>0)throw cn('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.')},v=function(g){Ee(),pe++;try{return Y.createHTML(g)}finally{pe--}},E=function(g){Ee(),pe++;try{return Y.createScriptURL(g)}finally{pe--}},I=function(){return ne||(V=Sp(f,a),ne=!0),V},Z=n,le=Z.implementation,de=Z.createNodeIterator,He=Z.createDocumentFragment,Pe=Z.getElementsByTagName,yt=r.importNode,be=Hi();t.isSupported=typeof Vi=="function"&&typeof C=="function"&&le&&le.createHTMLDocument!==void 0;let et=pp,Wt=up,vn=fp,yn=mp,xn=gp,oo=hp,jt=bp,Ye=yp,Gt=Bi,ge=null,Xt=me({},[...Ni,...Hr,...Vr,...Wr,...Oi]),ve=null,Kt=me({},[...Fi,...jr,...$i,...Go]),tt=Object.seal(jn(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}})),kn=null,No=null,Dt=Object.seal(jn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Oo=!0,Nt=!0,Fo=!1,xt=!0,at=!1,nt=!0,ut=!1,Ot=!1,$n=null,kt=null,Jt=!1,ft=!1,Bn=!1,wn=!1,ro=!0,ao=!1,Un="user-content-",io=!0,qn=!1,Ft={},wt=null,so=me({},["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"]),$t=null,je=me({},["audio","video","img","source","image","track"]),$o=null,lo=me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),zn="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml",an=mt,co=!1,b=null,z=me({},[zn,zt,mt],qr),S=$e(["mi","mo","mn","ms","mtext"]),L=me({},S),$=$e(["annotation-xml"]),j=me({},$),ye=me({},["title","style","font","a","script"]),xe=null,Nr=["application/xhtml+xml","text/html"],_t="text/html",Me=null,sn=null,Td=n.createElement("form"),hi=function(g){return g instanceof RegExp||g instanceof Function},Or=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sn&&sn===g)return;(!g||typeof g!="object")&&(g={}),g=lt(g),xe=Nr.indexOf(g.PARSER_MEDIA_TYPE)===-1?_t:g.PARSER_MEDIA_TYPE,Me=xe==="application/xhtml+xml"?qr:go,ge=dn(g,"ALLOWED_TAGS",Xt,{transform:Me}),ve=dn(g,"ALLOWED_ATTR",Kt,{transform:Me}),b=dn(g,"ALLOWED_NAMESPACES",z,{transform:qr}),$o=dn(g,"ADD_URI_SAFE_ATTR",lo,{transform:Me,base:lo}),$t=dn(g,"ADD_DATA_URI_TAGS",je,{transform:Me,base:je}),wt=dn(g,"FORBID_CONTENTS",so,{transform:Me}),kn=dn(g,"FORBID_TAGS",lt({}),{transform:Me}),No=dn(g,"FORBID_ATTR",lt({}),{transform:Me}),Ft=ot(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?lt(g.USE_PROFILES):g.USE_PROFILES:!1,Oo=g.ALLOW_ARIA_ATTR!==!1,Nt=g.ALLOW_DATA_ATTR!==!1,Fo=g.ALLOW_UNKNOWN_PROTOCOLS||!1,xt=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=g.SAFE_FOR_TEMPLATES||!1,nt=g.SAFE_FOR_XML!==!1,ut=g.WHOLE_DOCUMENT||!1,ft=g.RETURN_DOM||!1,Bn=g.RETURN_DOM_FRAGMENT||!1,wn=g.RETURN_TRUSTED_TYPE||!1,Jt=g.FORCE_BODY||!1,ro=g.SANITIZE_DOM!==!1,ao=g.SANITIZE_NAMED_PROPS||!1,io=g.KEEP_CONTENT!==!1,qn=g.IN_PLACE||!1,Gt=lp(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Bi,an=typeof g.NAMESPACE=="string"?g.NAMESPACE:mt,L=Gr(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>me({},S)),j=Gr(g,"HTML_INTEGRATION_POINTS",()=>me({},$));let w=Gr(g,"CUSTOM_ELEMENT_HANDLING",()=>jn(null));if(tt=jn(null),ot(w,"tagNameCheck")&&hi(w.tagNameCheck)&&(tt.tagNameCheck=w.tagNameCheck),ot(w,"attributeNameCheck")&&hi(w.attributeNameCheck)&&(tt.attributeNameCheck=w.attributeNameCheck),ot(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(tt.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),Ve(tt),at&&(Nt=!1),Bn&&(ft=!0),Ft&&(ge=me({},Oi),ve=jn(null),Ft.html===!0&&(me(ge,Ni),me(ve,Fi)),Ft.svg===!0&&(me(ge,Hr),me(ve,jr),me(ve,Go)),Ft.svgFilters===!0&&(me(ge,Vr),me(ve,jr),me(ve,Go)),Ft.mathMl===!0&&(me(ge,Wr),me(ve,$i),me(ve,Go))),Dt.tagCheck=null,Dt.attributeCheck=null,ot(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?Dt.tagCheck=g.ADD_TAGS:Gn(g.ADD_TAGS)&&(ge===Xt&&(ge=lt(ge)),me(ge,g.ADD_TAGS,Me))),ot(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?Dt.attributeCheck=g.ADD_ATTR:Gn(g.ADD_ATTR)&&(ve===Kt&&(ve=lt(ve)),me(ve,g.ADD_ATTR,Me))),ot(g,"ADD_FORBID_CONTENTS")&&Gn(g.ADD_FORBID_CONTENTS)&&(wt===so&&(wt=lt(wt)),me(wt,g.ADD_FORBID_CONTENTS,Me)),io&&(ge["#text"]=!0),ut&&me(ge,["html","head","body"]),ge.table&&(me(ge,["tbody"]),delete kn.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let P=Y;Y=g.TRUSTED_TYPES_POLICY;try{se=v("")}catch(D){throw Y=P,D}}else g.TRUSTED_TYPES_POLICY===null?(Y=void 0,se=""):(Y===void 0&&(Y=I()),Y&&typeof se=="string"&&(se=v("")));$e&&$e(g),sn=g},bi=me({},[...Hr,...Vr,...cp]),vi=me({},[...Wr,...dp]),Ad=function(g,w,P){return w.namespaceURI===mt?g==="svg":w.namespaceURI===zn?g==="svg"&&(P==="annotation-xml"||L[P]):!!bi[g]},Ed=function(g,w,P){return w.namespaceURI===mt?g==="math":w.namespaceURI===zt?g==="math"&&j[P]:!!vi[g]},Pd=function(g,w,P){return w.namespaceURI===zt&&!j[P]||w.namespaceURI===zn&&!L[P]?!1:!vi[g]&&(ye[g]||!bi[g])},Md=function(g){let w=C(g);(!w||!w.tagName)&&(w={namespaceURI:an,tagName:"template"});let P=go(g.tagName),D=go(w.tagName);return b[g.namespaceURI]?g.namespaceURI===zt?Ad(P,w,D):g.namespaceURI===zn?Ed(P,w,D):g.namespaceURI===mt?Pd(P,w,D):!!(xe==="application/xhtml+xml"&&b[g.namespaceURI]):!1},ln=function(g){uo(t.removed,{element:g});try{C(g).removeChild(g)}catch{if(h(g),!C(g))throw cn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},yi=function(g,w,P){try{m(g,w)}catch{try{g.removeAttribute(P)}catch{}}},Bo=function(g){Uo(g);let w=_(g);if(w){let D=[];Sn(w,G=>{uo(D,G)}),Sn(D,G=>{try{h(G)}catch{}})}let P=k(g);if(P)for(let D=P.length-1;D>=0;--D){let G=P[D],ce=G&&G.name;typeof ce=="string"&&yi(g,G,ce)}},_n=function(g,w,P){if(!P)try{P=w.getAttributeNode(g)}catch{P=null}uo(t.removed,{attribute:P||null,from:w});try{P?m(w,P):w.removeAttribute(g)}catch{try{w.removeAttribute(g)}catch{}}if(g==="is")if(ft||Bn)try{ln(w)}catch{}else try{w.setAttribute(g,"")}catch{}},Id=function(g){let w=k(g);if(w)for(let P=w.length-1;P>=0;--P){let D=w[P],G=D&&D.name;typeof G!="string"||ve[Me(G)]||yi(g,D,G)}},Uo=function(g){let w=[g];for(;w.length>0;){let P=w.pop();N(P)===st.element&&Id(P);let D=_(P);if(D)for(let G=D.length-1;G>=0;--G)w.push(D[G])}},xi=function(g,w){return nt?g==="patchsrc"?!0:g==="for"&&w!=="label"&&w!=="output":!1},Rd=function(g){if(!nt)return;let w=[g];for(;w.length>0;){let P=w.pop(),D=N(P);if(D===st.processingInstruction||D===st.comment&&Ke(qi,P.data)){try{h(P)}catch{}continue}if(D===st.element){let ce=P,ue=Me(B(P));try{ce.hasAttribute&&ce.hasAttribute("patchsrc")&&ce.removeAttribute("patchsrc"),ce.hasAttribute&&ce.hasAttribute("for")&&xi("for",ue)&&ce.removeAttribute("for")}catch{}}let G=_(P);if(G)for(let ce=G.length-1;ce>=0;--ce)w.push(G[ce])}},ki=function(g){let w=null,P=null;if(Jt)g="<remove></remove>"+g;else{let ce=Ii(g,/^[\r\n\t ]+/);P=ce&&ce[0]}xe==="application/xhtml+xml"&&an===mt&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let D=Y?v(g):g;if(an===mt)try{w=new d().parseFromString(D,xe)}catch{}if(!w||!w.documentElement){w=le.createDocument(an,"template",null);try{w.documentElement.innerHTML=co?se:D}catch{}}let G=w.body||w.documentElement;return g&&P&&G.insertBefore(n.createTextNode(P),G.childNodes[0]||null),an===mt?Pe.call(w,ut?"html":"body")[0]:ut?w.documentElement:G},wi=function(g){let w=q?q(g):g.ownerDocument;return de.call(w||g,g,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},qo=function(g){return g=fo(g,et," "),g=fo(g,Wt," "),g=fo(g,vn," "),g},Fr=function(g){var w;g.normalize();let P=q?q(g):g.ownerDocument,D=de.call(P||g,g,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),G=D.nextNode();for(;G;)G.data=qo(G.data),G=D.nextNode();let ce=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");ce&&Sn(ce,ue=>{Hn(ue.content)&&Fr(ue.content)})},Ho=function(g){let w=O?O(g):null;return typeof w!="string"||Me(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==k(g)||typeof g.removeAttribute!="function"||typeof g.removeAttributeNode!="function"||typeof g.getAttributeNode!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==A(g)||g.childNodes!==_(g)},Hn=function(g){if(!A||typeof g!="object"||g===null)return!1;try{return A(g)===st.documentFragment}catch{return!1}},po=function(g){if(!A||typeof g!="object"||g===null)return!1;try{return typeof A(g)=="number"}catch{return!1}};function Bt(M,g,w){M.length!==0&&Sn(M,P=>{P.call(t,g,w,sn)})}let Ld=function(g,w){return!!(nt&&g.hasChildNodes()&&!po(g.firstElementChild)&&Ke(Ui,g.textContent)&&Ke(Ui,g.innerHTML)||nt&&g.namespaceURI===mt&&wp[w]&&(po(g.firstElementChild)||typeof g.textContent=="string"&&Ke(zp[w],g.textContent))||g.nodeType===st.processingInstruction||nt&&g.nodeType===st.comment&&Ke(qi,g.data))},Vo=function(g,w){if(g instanceof RegExp)return Ke(g,w);if(g instanceof Function){for(var P=arguments.length,D=new Array(P>2?P-2:0),G=2;G<P;G++)D[G-2]=arguments[G];return!!g(w,...D)}return!1},Dd=function(g,w,P){if(!kn[w]&&Ci(w)&&Vo(tt.tagNameCheck,w))return!1;if(io&&!wt[w]){let D=C(g),G=_(g);if(G&&D){let ce=G.length;for(let ue=ce-1;ue>=0;--ue){let Ie=g===P?u(G[ue],!0):G[ue];D.insertBefore(Ie,y(g))}}}return ln(g),!0},zi=function(g,w,P,D){return g.length===0?w:w===P||w===D?lt(w):w},Vn=function(g,w){return g===w||C(g)!==null?!1:(qn&&Uo(g),!0)},_i=function(g,w){if(Bt(be.beforeSanitizeElements,g,null),Vn(g,w))return!0;if(Ho(g))return ln(g),!0;let P=Me(B(g));if(ge=zi(be.uponSanitizeElement,ge,Xt,$n),Bt(be.uponSanitizeElement,g,{tagName:P,allowedTags:ge}),Vn(g,w))return!0;if(Ld(g,P))return ln(g),!0;if(kn[P]||!(Dt.tagCheck instanceof Function&&Dt.tagCheck(P))&&!ge[P]){let D=Dd(g,P,w);return D===!1&&(Bt(be.afterSanitizeElements,g,null),Vn(g,w))?!0:D}if(N(g)===st.element&&!Md(g)||(P==="noscript"||P==="noembed"||P==="noframes")&&Ke(xp,g.innerHTML))return ln(g),!0;if(at&&g.nodeType===st.text){let D=qo(g.textContent);g.textContent!==D&&(uo(t.removed,{element:g.cloneNode()}),g.textContent=D)}return Bt(be.afterSanitizeElements,g,null),Vn(g,w)},Si=function(g,w,P){if(No[w]||xi(w,g)||ro&&(w==="id"||w==="name")&&(P in n||P in Td))return!1;let D=ve[w]||Dt.attributeCheck instanceof Function&&Dt.attributeCheck(w,g);return Nt&&Ke(yn,w)||Oo&&Ke(xn,w)?!0:D?$o[w]||Ke(Gt,fo(P,jt,""))||(w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Ri(P,"data:")===0&&$t[g]||Fo&&!Ke(oo,fo(P,jt,""))?!0:!P:Ci(g)&&Vo(tt.tagNameCheck,g)&&Vo(tt.attributeNameCheck,w,g)||w==="is"&&tt.allowCustomizedBuiltInElements&&Vo(tt.tagNameCheck,P)},Nd=me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ci=function(g){return!Nd[go(g)]&&Ke(Ye,g)},Od=function(g,w,P,D){if(Y&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!P)switch(f.getAttributeType(g,w)){case"TrustedHTML":return v(D);case"TrustedScriptURL":return E(D)}return D},Fd=function(g,w,P,D){try{return P?g.setAttributeNS(P,w,D):g.setAttribute(w,D),Ho(g)?(ln(g),!1):!0}catch{return _n(w,g),!1}},Ti=function(g,w){if(Bt(be.beforeSanitizeAttributes,g,null),Vn(g,w))return;let P=g.attributes;if(!P||Ho(g))return;ve=zi(be.uponSanitizeAttribute,ve,Kt,kt);let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0},G=P.length,ce=Me(g.nodeName);for(;G--;){let ue=P[G],Ie=ue.name,gt=ue.namespaceURI,it=ue.value,Wn=Me(Ie),Br=it,Ze=Ie==="value"?Br:np(Br),Ai=!1;if(D.attrName=Wn,D.attrValue=Ze,D.keepAttr=!0,D.forceKeepAttr=void 0,Bt(be.uponSanitizeAttribute,g,D),Ze=D.attrValue,ao&&(Wn==="id"||Wn==="name")&&Ri(Ze,Un)!==0&&(_n(Ie,g,ue),Ze=Un+Ze,Ai=!0),nt&&Ke(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ze)){_n(Ie,g,ue);continue}if(Wn==="attributename"&&Ii(Ze,"href")){_n(Ie,g,ue);continue}if(!D.forceKeepAttr){if(!D.keepAttr){_n(Ie,g,ue);continue}if(!xt&&Ke(kp,Ze)){_n(Ie,g,ue);continue}if(at&&(Ze=qo(Ze)),!Si(ce,Wn,Ze)){_n(Ie,g,ue);continue}Ze=Od(ce,Wn,gt,Ze),Ze!==Br&&Fd(g,Ie,gt,Ze)&&Ai&&Mi(t.removed)}}Bt(be.afterSanitizeAttributes,g,null),Vn(g,w)},Wo=function(g){let w=null,P=wi(g);for(Bt(be.beforeSanitizeShadowDOM,g,null);w=P.nextNode();)if(Bt(be.uponSanitizeShadowNode,w,null),_i(w,g),Ti(w,g),Hn(w.content)&&Wo(w.content),N(w)===st.element){let D=x(w);Hn(D)&&($r(D),Wo(D))}Bt(be.afterSanitizeShadowDOM,g,null)},$r=function(g){let w=[{node:g,shadow:null}];for(;w.length>0;){let P=w.pop();if(P.shadow){Wo(P.shadow);continue}let D=P.node,G=N(D)===st.element,ce=_(D);if(ce)for(let ue=ce.length-1;ue>=0;--ue)w.push({node:ce[ue],shadow:null});if(G){let ue=O?O(D):null;if(typeof ue=="string"&&Me(ue)==="template"){let Ie=D.content;Hn(Ie)&&w.push({node:Ie,shadow:null})}}if(G){let ue=x(D);Hn(ue)&&w.push({node:null,shadow:ue},{node:ue,shadow:null})}}};return t.sanitize=function(M){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,P=null,D=null,G=null;if(co=!M,co&&(M="<!-->"),typeof M!="string"&&!po(M)&&(M=sp(M),typeof M!="string"))throw cn("dirty is not a string, aborting");if(!t.isSupported)return M;Ot?(ge=$n,ve=kt):Or(g),(be.uponSanitizeElement.length>0||be.uponSanitizeAttribute.length>0)&&(ge=lt(ge)),be.uponSanitizeAttribute.length>0&&(ve=lt(ve)),t.removed=[];let ce=qn&&typeof M!="string"&&po(M);if(ce){Rd(M);let gt=B(M);if(typeof gt=="string"){let it=Me(gt);if(!ge[it]||kn[it])throw Bo(M),cn("root node is forbidden and cannot be sanitized in-place")}if(Ho(M))throw Bo(M),cn("root node is clobbered and cannot be sanitized in-place");try{$r(M)}catch(it){throw Bo(M),it}}else if(po(M))w=ki("<!---->"),P=w.ownerDocument.importNode(M,!0),P.nodeType===st.element&&P.nodeName==="BODY"||P.nodeName==="HTML"?w=P:w.appendChild(P),$r(w);else{if(!ft&&!at&&!ut&&M.indexOf("<")===-1)return Y&&wn?v(M):M;if(w=ki(M),!w)return ft?null:wn?se:""}w&&Jt&&ln(w.firstChild);let ue=ce?M:w;try{let gt=wi(ue);for(;D=gt.nextNode();)_i(D,ue),Ti(D,ue),Hn(D.content)&&Wo(D.content)}catch(gt){throw ce&&(Bo(M),Sn(t.removed,it=>{it.element&&Uo(it.element)})),gt}if(ce){let gt=!1;if(Sn(t.removed,it=>{it.element&&(it.element===M&&(gt=!0),Uo(it.element))}),gt)throw cn("a node selected for removal could not be safely returned; refusing to sanitize in place");return at&&Fr(M),M}if(ft){if(at&&Fr(w),Bn)for(G=He.call(w.ownerDocument);w.firstChild;)G.appendChild(w.firstChild);else G=w;return(ve.shadowroot||ve.shadowrootmode)&&(G=yt.call(r,G,!0)),G}let Ie=ut?w.outerHTML:w.innerHTML;return ut&&ge["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&Ke(vp,w.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
|
|
3
|
-
`+Ie),at&&(Ie=
|
|
4
|
-
]`).replace("lheading",
|
|
1
|
+
"use strict";var __fxExtend=(()=>{var Wo=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var gu=Object.getOwnPropertyNames;var hu=Object.prototype.hasOwnProperty;var bu=(e,t)=>{for(var n in t)Wo(e,n,{get:t[n],enumerable:!0})},vu=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of gu(t))!hu.call(e,a)&&a!==n&&Wo(e,a,{get:()=>t[a],enumerable:!(o=mu(t,a))||o.enumerable});return e};var yu=e=>vu(Wo({},"__esModule",{value:!0}),e);var ih={};bu(ih,{dispose:()=>tu});function xu(e,t){this.v=e,this.k=t}function $i(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ku(e){if(Array.isArray(e))return e}function wu(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,l=[],c=!0,d=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(f){d=!0,a=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}function zu(){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 _u(e,t){return ku(e)||wu(e,t)||Su(e,t)||zu()}function Su(e,t){if(e){if(typeof e=="string")return $i(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$i(e,t):void 0}}function Jr(e){var t,n;function o(i,s){try{var l=e[i](s),c=l.value,d=c instanceof xu;Promise.resolve(d?c.v:c).then(function(f){if(d){var u=i==="return"&&c.k?i:"next";if(!c.k||f.done)return o(u,f);f=e[u](f).value}a(!!l.done,f)},function(f){o("throw",f)})}catch(f){a(2,f)}}function a(i,s){i===2?t.reject(s):t.resolve({value:s,done:i}),(t=t.next)?o(t.key,t.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,c){var d={key:i,arg:s,resolve:l,reject:c,next:null};n?n=n.next=d:(t=n=d,o(i,s))})},typeof e.return!="function"&&(this.return=void 0)}Jr.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Jr.prototype.next=function(e){return this._invoke("next",e)},Jr.prototype.throw=function(e){return this._invoke("throw",e)},Jr.prototype.return=function(e){return this._invoke("return",e)};var es=Object.entries,Bi=Object.setPrototypeOf,Cu=Object.isFrozen,Tu=Object.getPrototypeOf,Au=Object.getOwnPropertyDescriptor,$e=Object.freeze,Ve=Object.seal,Jn=Object.create,ts=typeof Reflect<"u"&&Reflect,Qo=ts.apply,ea=ts.construct;$e||($e=function(t){return t});Ve||(Ve=function(t){return t});Qo||(Qo=function(t,n){for(var o=arguments.length,a=new Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];return t.apply(n,a)});ea||(ea=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return new t(...o)});var An=Fe(Array.prototype.forEach);Array.prototype.indexOf;var Eu=Fe(Array.prototype.lastIndexOf),Ui=Fe(Array.prototype.pop),hr=Fe(Array.prototype.push);Array.prototype.slice;var Pu=Fe(Array.prototype.splice),Yn=Array.isArray,yr=Fe(String.prototype.toLowerCase),Go=Fe(String.prototype.toString),qi=Fe(String.prototype.match),br=Fe(String.prototype.replace),Hi=Fe(String.prototype.indexOf),Mu=Fe(String.prototype.trim),Iu=Fe(Number.prototype.toString),Ru=Fe(Boolean.prototype.toString),Vi=typeof BigInt>"u"?null:Fe(BigInt.prototype.toString),ji=typeof Symbol>"u"?null:Fe(Symbol.prototype.toString),rt=Fe(Object.prototype.hasOwnProperty),vr=Fe(Object.prototype.toString),Ke=Fe(RegExp.prototype.test),pn=Lu(TypeError);function Fe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return Qo(e,t,o)}}function Lu(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ea(e,n)}}function ge(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yr;if(Bi&&Bi(e,null),!Yn(t))return e;let o=t.length;for(;o--;){let a=t[o];if(typeof a=="string"){let i=n(a);i!==a&&(Cu(t)||(t[o]=i),a=i)}e[a]=!0}return e}function Du(e){for(let t=0;t<e.length;t++)rt(e,t)||(e[t]=null);return e}function lt(e){let t=Jn(null);for(let o of es(e)){var n=_u(o,2);let a=n[0],i=n[1];rt(e,a)&&(Yn(i)?t[a]=Du(i):i&&typeof i=="object"&&i.constructor===Object?t[a]=lt(i):t[a]=i)}return t}function Nu(e){switch(typeof e){case"string":return e;case"number":return Iu(e);case"boolean":return Ru(e);case"bigint":return Vi?Vi(e):"0";case"symbol":return ji?ji(e):"Symbol()";case"undefined":return vr(e);case"function":case"object":{if(e===null)return vr(e);let t=e,n=ht(t,"toString");if(typeof n=="function"){let o=n(t);return typeof o=="string"?o:vr(o)}return vr(e)}default:return vr(e)}}function ht(e,t){for(;e!==null;){let o=Au(e,t);if(o){if(o.get)return Fe(o.get);if(typeof o.value=="function")return Fe(o.value)}e=Tu(e)}function n(){return null}return n}function Ou(e){try{return Ke(e,""),!0}catch{return!1}}var Wi=$e(["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"]),Xo=$e(["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"]),Ko=$e(["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"]),Fu=$e(["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"]),Jo=$e(["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"]),$u=$e(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gi=$e(["#text"]),Xi=$e(["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"]),Yo=$e(["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"]),Ki=$e(["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"]),Yr=$e(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Bu=Ve(/{{[\w\W]*|^[\w\W]*}}/g),Uu=Ve(/<%[\w\W]*|^[\w\W]*%>/g),qu=Ve(/\${[\w\W]*/g),Hu=Ve(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vu=Ve(/^aria-[\-\w]+$/),Ji=Ve(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ju=Ve(/^(?:\w+script|data):/i),Wu=Ve(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gu=Ve(/^html$/i),Xu=Ve(/^[a-z][.\w]*(-[.\w]+)+$/i),Yi=Ve(/<[/\w!]/g),Zi=Ve(/<[/\w]/g),Ku=Ve(/<\/no(script|embed|frames)/i),Ju=Ve(/\/>/i),st={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ns=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Yu=$e(ge({},ns)),Zu=(function(){let e={};return An(ns,t=>{e[t]=Ve(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),$e(e)})(),Qu=function(){return typeof window>"u"?null:window},ep=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(o=n.getAttribute(a));let i="dompurify"+(o?"#"+o:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Qi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},fn=function(t,n,o,a){return rt(t,n)&&Yn(t[n])?ge(a.base?lt(a.base):{},t[n],a.transform):o},Zo=function(t,n,o){let a=rt(t,n)?t[n]:void 0;return a&&typeof a=="object"?lt(a):o()};function rs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qu(),t=O=>rs(O);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==st.document||!e.Element)return t.isSupported=!1,t;let n=e.document,o=n,a=o.currentScript;e.DocumentFragment;let i=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let d=e.DOMParser,f=e.trustedTypes,u=l.prototype,p=ht(u,"cloneNode"),g=ht(u,"remove"),m=ht(u,"removeAttributeNode"),y=ht(u,"nextSibling"),_=ht(u,"childNodes"),E=ht(u,"parentNode"),x=ht(u,"shadowRoot"),k=ht(u,"attributes"),R=s&&s.prototype?ht(s.prototype,"nodeType"):null,B=s&&s.prototype?ht(s.prototype,"nodeName"):null,j=s&&s.prototype?ht(s.prototype,"ownerDocument"):null,w=function(h){return R?R(h):h.nodeType},A=function(h){return B?B(h):h.nodeName};if(typeof i=="function"){let O=n.createElement("template");O.content&&O.content.ownerDocument&&(n=O.content.ownerDocument)}let P,I="",N,V=!1,X=0,oe=function(){if(X>0)throw pn('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.')},b=function(h){oe(),X++;try{return P.createHTML(h)}finally{X--}},C=function(h){oe(),X++;try{return P.createScriptURL(h)}finally{X--}},L=function(){return V||(N=ep(f,a),V=!0),N},K=n,ie=K.implementation,pe=K.createNodeIterator,He=K.createDocumentFragment,Pe=K.getElementsByTagName,yt=o.importNode,ve=Qi();t.isSupported=typeof es=="function"&&typeof E=="function"&&ie&&ie.createHTMLDocument!==void 0;let et=Bu,jt=Uu,kn=qu,wn=Hu,zn=Vu,lr=ju,Wt=Wu,Ye=Xu,Gt=Ji,he=null,Xt=ge({},[...Wi,...Xo,...Ko,...Jo,...Gi]),ye=null,Kt=ge({},[...Xi,...Yo,...Ki,...Yr]),tt=Object.seal(Jn(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}})),_n=null,Br=null,Dt=Object.seal(Jn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ur=!0,Nt=!0,qr=!1,xt=!0,at=!1,nt=!0,pt=!1,Ot=!1,Hn=null,kt=null,Jt=!1,ft=!1,Vn=!1,Sn=!1,cr=!0,dr=!1,jn="user-content-",ur=!0,Wn=!1,Ft={},wt=null,pr=ge({},["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"]),$t=null,We=ge({},["audio","video","img","source","image","track"]),Hr=null,fr=ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cn="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml",cn=mt,mr=!1,v=null,S=ge({},[Cn,zt,mt],Go),T=$e(["mi","mo","mn","ms","mtext"]),U=ge({},T),H=$e(["annotation-xml"]),W=ge({},H),xe=ge({},["title","style","font","a","script"]),ke=null,Uo=["application/xhtml+xml","text/html"],_t="text/html",Me=null,dn=null,nu=n.createElement("form"),Ci=function(h){return h instanceof RegExp||h instanceof Function},qo=function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dn&&dn===h)return;(!h||typeof h!="object")&&(h={}),h=lt(h),ke=Uo.indexOf(h.PARSER_MEDIA_TYPE)===-1?_t:h.PARSER_MEDIA_TYPE,Me=ke==="application/xhtml+xml"?Go:yr,he=fn(h,"ALLOWED_TAGS",Xt,{transform:Me}),ye=fn(h,"ALLOWED_ATTR",Kt,{transform:Me}),v=fn(h,"ALLOWED_NAMESPACES",S,{transform:Go}),Hr=fn(h,"ADD_URI_SAFE_ATTR",fr,{transform:Me,base:fr}),$t=fn(h,"ADD_DATA_URI_TAGS",We,{transform:Me,base:We}),wt=fn(h,"FORBID_CONTENTS",pr,{transform:Me}),_n=fn(h,"FORBID_TAGS",lt({}),{transform:Me}),Br=fn(h,"FORBID_ATTR",lt({}),{transform:Me}),Ft=rt(h,"USE_PROFILES")?h.USE_PROFILES&&typeof h.USE_PROFILES=="object"?lt(h.USE_PROFILES):h.USE_PROFILES:!1,Ur=h.ALLOW_ARIA_ATTR!==!1,Nt=h.ALLOW_DATA_ATTR!==!1,qr=h.ALLOW_UNKNOWN_PROTOCOLS||!1,xt=h.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=h.SAFE_FOR_TEMPLATES||!1,nt=h.SAFE_FOR_XML!==!1,pt=h.WHOLE_DOCUMENT||!1,ft=h.RETURN_DOM||!1,Vn=h.RETURN_DOM_FRAGMENT||!1,Sn=h.RETURN_TRUSTED_TYPE||!1,Jt=h.FORCE_BODY||!1,cr=h.SANITIZE_DOM!==!1,dr=h.SANITIZE_NAMED_PROPS||!1,ur=h.KEEP_CONTENT!==!1,Wn=h.IN_PLACE||!1,Gt=Ou(h.ALLOWED_URI_REGEXP)?h.ALLOWED_URI_REGEXP:Ji,cn=typeof h.NAMESPACE=="string"?h.NAMESPACE:mt,U=Zo(h,"MATHML_TEXT_INTEGRATION_POINTS",()=>ge({},T)),W=Zo(h,"HTML_INTEGRATION_POINTS",()=>ge({},H));let z=Zo(h,"CUSTOM_ELEMENT_HANDLING",()=>Jn(null));if(tt=Jn(null),rt(z,"tagNameCheck")&&Ci(z.tagNameCheck)&&(tt.tagNameCheck=z.tagNameCheck),rt(z,"attributeNameCheck")&&Ci(z.attributeNameCheck)&&(tt.attributeNameCheck=z.attributeNameCheck),rt(z,"allowCustomizedBuiltInElements")&&typeof z.allowCustomizedBuiltInElements=="boolean"&&(tt.allowCustomizedBuiltInElements=z.allowCustomizedBuiltInElements),Ve(tt),at&&(Nt=!1),Vn&&(ft=!0),Ft&&(he=ge({},Gi),ye=Jn(null),Ft.html===!0&&(ge(he,Wi),ge(ye,Xi)),Ft.svg===!0&&(ge(he,Xo),ge(ye,Yo),ge(ye,Yr)),Ft.svgFilters===!0&&(ge(he,Ko),ge(ye,Yo),ge(ye,Yr)),Ft.mathMl===!0&&(ge(he,Jo),ge(ye,Ki),ge(ye,Yr))),Dt.tagCheck=null,Dt.attributeCheck=null,rt(h,"ADD_TAGS")&&(typeof h.ADD_TAGS=="function"?Dt.tagCheck=h.ADD_TAGS:Yn(h.ADD_TAGS)&&(he===Xt&&(he=lt(he)),ge(he,h.ADD_TAGS,Me))),rt(h,"ADD_ATTR")&&(typeof h.ADD_ATTR=="function"?Dt.attributeCheck=h.ADD_ATTR:Yn(h.ADD_ATTR)&&(ye===Kt&&(ye=lt(ye)),ge(ye,h.ADD_ATTR,Me))),rt(h,"ADD_FORBID_CONTENTS")&&Yn(h.ADD_FORBID_CONTENTS)&&(wt===pr&&(wt=lt(wt)),ge(wt,h.ADD_FORBID_CONTENTS,Me)),ur&&(he["#text"]=!0),pt&&ge(he,["html","head","body"]),he.table&&(ge(he,["tbody"]),delete _n.tbody),h.TRUSTED_TYPES_POLICY){if(typeof h.TRUSTED_TYPES_POLICY.createHTML!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof h.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let D=P;P=h.TRUSTED_TYPES_POLICY;try{I=b("")}catch($){throw P=D,$}}else h.TRUSTED_TYPES_POLICY===null?(P=void 0,I=""):(P===void 0&&(P=L()),P&&typeof I=="string"&&(I=b("")));$e&&$e(h),dn=h},Ti=ge({},[...Xo,...Ko,...Fu]),Ai=ge({},[...Jo,...$u]),ru=function(h,z,D){return z.namespaceURI===mt?h==="svg":z.namespaceURI===Cn?h==="svg"&&(D==="annotation-xml"||U[D]):!!Ti[h]},ou=function(h,z,D){return z.namespaceURI===mt?h==="math":z.namespaceURI===zt?h==="math"&&W[D]:!!Ai[h]},au=function(h,z,D){return z.namespaceURI===zt&&!W[D]||z.namespaceURI===Cn&&!U[D]?!1:!Ai[h]&&(xe[h]||!Ti[h])},iu=function(h){let z=E(h);(!z||!z.tagName)&&(z={namespaceURI:cn,tagName:"template"});let D=yr(h.tagName),$=yr(z.tagName);return v[h.namespaceURI]?h.namespaceURI===zt?ru(D,z,$):h.namespaceURI===Cn?ou(D,z,$):h.namespaceURI===mt?au(D,z,$):!!(ke==="application/xhtml+xml"&&v[h.namespaceURI]):!1},un=function(h){hr(t.removed,{element:h});try{E(h).removeChild(h)}catch{if(g(h),!E(h))throw pn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ei=function(h,z,D){try{m(h,z)}catch{try{h.removeAttribute(D)}catch{}}},Vr=function(h){jr(h);let z=_(h);if(z){let $=[];An(z,Z=>{hr($,Z)}),An($,Z=>{try{g(Z)}catch{}})}let D=k(h);if(D)for(let $=D.length-1;$>=0;--$){let Z=D[$],ue=Z&&Z.name;typeof ue=="string"&&Ei(h,Z,ue)}},Tn=function(h,z,D){if(!D)try{D=z.getAttributeNode(h)}catch{D=null}hr(t.removed,{attribute:D||null,from:z});try{D?m(z,D):z.removeAttribute(h)}catch{try{z.removeAttribute(h)}catch{}}if(h==="is")if(ft||Vn)try{un(z)}catch{}else try{z.setAttribute(h,"")}catch{}},su=function(h){let z=k(h);if(z)for(let D=z.length-1;D>=0;--D){let $=z[D],Z=$&&$.name;typeof Z!="string"||ye[Me(Z)]||Ei(h,$,Z)}},jr=function(h){let z=[h];for(;z.length>0;){let D=z.pop();w(D)===st.element&&su(D);let $=_(D);if($)for(let Z=$.length-1;Z>=0;--Z)z.push($[Z])}},Pi=function(h,z){return nt?h==="patchsrc"?!0:h==="for"&&z!=="label"&&z!=="output":!1},lu=function(h){if(!nt)return;let z=[h];for(;z.length>0;){let D=z.pop(),$=w(D);if($===st.processingInstruction||$===st.comment&&Ke(Zi,D.data)){try{g(D)}catch{}continue}if($===st.element){let ue=D,fe=Me(A(D));try{ue.hasAttribute&&ue.hasAttribute("patchsrc")&&ue.removeAttribute("patchsrc"),ue.hasAttribute&&ue.hasAttribute("for")&&Pi("for",fe)&&ue.removeAttribute("for")}catch{}}let Z=_(D);if(Z)for(let ue=Z.length-1;ue>=0;--ue)z.push(Z[ue])}},Mi=function(h){let z=null,D=null;if(Jt)h="<remove></remove>"+h;else{let ue=qi(h,/^[\r\n\t ]+/);D=ue&&ue[0]}ke==="application/xhtml+xml"&&cn===mt&&(h='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+h+"</body></html>");let $=P?b(h):h;if(cn===mt)try{z=new d().parseFromString($,ke)}catch{}if(!z||!z.documentElement){z=ie.createDocument(cn,"template",null);try{z.documentElement.innerHTML=mr?I:$}catch{}}let Z=z.body||z.documentElement;return h&&D&&Z.insertBefore(n.createTextNode(D),Z.childNodes[0]||null),cn===mt?Pe.call(z,pt?"html":"body")[0]:pt?z.documentElement:Z},Ii=function(h){let z=j?j(h):h.ownerDocument;return pe.call(z||h,h,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Wr=function(h){return h=br(h,et," "),h=br(h,jt," "),h=br(h,kn," "),h},Ho=function(h){var z;h.normalize();let D=j?j(h):h.ownerDocument,$=pe.call(D||h,h,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),Z=$.nextNode();for(;Z;)Z.data=Wr(Z.data),Z=$.nextNode();let ue=(z=h.querySelectorAll)===null||z===void 0?void 0:z.call(h,"template");ue&&An(ue,fe=>{Gn(fe.content)&&Ho(fe.content)})},Gr=function(h){let z=B?B(h):null;return typeof z!="string"||Me(z)!=="form"?!1:typeof h.nodeName!="string"||typeof h.textContent!="string"||typeof h.removeChild!="function"||h.attributes!==k(h)||typeof h.removeAttribute!="function"||typeof h.removeAttributeNode!="function"||typeof h.getAttributeNode!="function"||typeof h.setAttribute!="function"||typeof h.namespaceURI!="string"||typeof h.insertBefore!="function"||typeof h.hasChildNodes!="function"||h.nodeType!==R(h)||h.childNodes!==_(h)},Gn=function(h){if(!R||typeof h!="object"||h===null)return!1;try{return R(h)===st.documentFragment}catch{return!1}},gr=function(h){if(!R||typeof h!="object"||h===null)return!1;try{return typeof R(h)=="number"}catch{return!1}};function Bt(O,h,z){O.length!==0&&An(O,D=>{D.call(t,h,z,dn)})}let cu=function(h,z){return!!(nt&&h.hasChildNodes()&&!gr(h.firstElementChild)&&Ke(Yi,h.textContent)&&Ke(Yi,h.innerHTML)||nt&&h.namespaceURI===mt&&Yu[z]&&(gr(h.firstElementChild)||typeof h.textContent=="string"&&Ke(Zu[z],h.textContent))||h.nodeType===st.processingInstruction||nt&&h.nodeType===st.comment&&Ke(Zi,h.data))},Xr=function(h,z){if(h instanceof RegExp)return Ke(h,z);if(h instanceof Function){for(var D=arguments.length,$=new Array(D>2?D-2:0),Z=2;Z<D;Z++)$[Z-2]=arguments[Z];return!!h(z,...$)}return!1},du=function(h,z,D){if(!_n[z]&&Ni(z)&&Xr(tt.tagNameCheck,z))return!1;if(ur&&!wt[z]){let $=E(h),Z=_(h);if(Z&&$){let ue=Z.length;for(let fe=ue-1;fe>=0;--fe){let Ie=h===D?p(Z[fe],!0):Z[fe];$.insertBefore(Ie,y(h))}}}return un(h),!0},Ri=function(h,z,D,$){return h.length===0?z:z===D||z===$?lt(z):z},Xn=function(h,z){return h===z||E(h)!==null?!1:(Wn&&jr(h),!0)},Li=function(h,z){if(Bt(ve.beforeSanitizeElements,h,null),Xn(h,z))return!0;if(Gr(h))return un(h),!0;let D=Me(A(h));if(he=Ri(ve.uponSanitizeElement,he,Xt,Hn),Bt(ve.uponSanitizeElement,h,{tagName:D,allowedTags:he}),Xn(h,z))return!0;if(cu(h,D))return un(h),!0;if(_n[D]||!(Dt.tagCheck instanceof Function&&Dt.tagCheck(D))&&!he[D]){let $=du(h,D,z);return $===!1&&(Bt(ve.afterSanitizeElements,h,null),Xn(h,z))?!0:$}if(w(h)===st.element&&!iu(h)||(D==="noscript"||D==="noembed"||D==="noframes")&&Ke(Ku,h.innerHTML))return un(h),!0;if(at&&h.nodeType===st.text){let $=Wr(h.textContent);h.textContent!==$&&(hr(t.removed,{element:h.cloneNode()}),h.textContent=$)}return Bt(ve.afterSanitizeElements,h,null),Xn(h,z)},Di=function(h,z,D){if(Br[z]||Pi(z,h)||cr&&(z==="id"||z==="name")&&(D in n||D in nu))return!1;let $=ye[z]||Dt.attributeCheck instanceof Function&&Dt.attributeCheck(z,h);return Nt&&Ke(wn,z)||Ur&&Ke(zn,z)?!0:$?Hr[z]||Ke(Gt,br(D,Wt,""))||(z==="src"||z==="xlink:href"||z==="href")&&h!=="script"&&Hi(D,"data:")===0&&$t[h]||qr&&!Ke(lr,br(D,Wt,""))?!0:!D:Ni(h)&&Xr(tt.tagNameCheck,h)&&Xr(tt.attributeNameCheck,z,h)||z==="is"&&tt.allowCustomizedBuiltInElements&&Xr(tt.tagNameCheck,D)},uu=ge({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ni=function(h){return!uu[yr(h)]&&Ke(Ye,h)},pu=function(h,z,D,$){if(P&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!D)switch(f.getAttributeType(h,z)){case"TrustedHTML":return b($);case"TrustedScriptURL":return C($)}return $},fu=function(h,z,D,$){try{return D?h.setAttributeNS(D,z,$):h.setAttribute(z,$),Gr(h)?(un(h),!1):!0}catch{return Tn(z,h),!1}},Oi=function(h,z){if(Bt(ve.beforeSanitizeAttributes,h,null),Xn(h,z))return;let D=h.attributes;if(!D||Gr(h))return;ye=Ri(ve.uponSanitizeAttribute,ye,Kt,kt);let $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye,forceKeepAttr:void 0},Z=D.length,ue=Me(h.nodeName);for(;Z--;){let fe=D[Z],Ie=fe.name,gt=fe.namespaceURI,it=fe.value,Kn=Me(Ie),jo=it,Ze=Ie==="value"?jo:Mu(jo),Fi=!1;if($.attrName=Kn,$.attrValue=Ze,$.keepAttr=!0,$.forceKeepAttr=void 0,Bt(ve.uponSanitizeAttribute,h,$),Ze=$.attrValue,dr&&(Kn==="id"||Kn==="name")&&Hi(Ze,jn)!==0&&(Tn(Ie,h,fe),Ze=jn+Ze,Fi=!0),nt&&Ke(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ze)){Tn(Ie,h,fe);continue}if(Kn==="attributename"&&qi(Ze,"href")){Tn(Ie,h,fe);continue}if(!$.forceKeepAttr){if(!$.keepAttr){Tn(Ie,h,fe);continue}if(!xt&&Ke(Ju,Ze)){Tn(Ie,h,fe);continue}if(at&&(Ze=Wr(Ze)),!Di(ue,Kn,Ze)){Tn(Ie,h,fe);continue}Ze=pu(ue,Kn,gt,Ze),Ze!==jo&&fu(h,Ie,gt,Ze)&&Fi&&Ui(t.removed)}}Bt(ve.afterSanitizeAttributes,h,null),Xn(h,z)},Kr=function(h){let z=null,D=Ii(h);for(Bt(ve.beforeSanitizeShadowDOM,h,null);z=D.nextNode();)if(Bt(ve.uponSanitizeShadowNode,z,null),Li(z,h),Oi(z,h),Gn(z.content)&&Kr(z.content),w(z)===st.element){let $=x(z);Gn($)&&(Vo($),Kr($))}Bt(ve.afterSanitizeShadowDOM,h,null)},Vo=function(h){let z=[{node:h,shadow:null}];for(;z.length>0;){let D=z.pop();if(D.shadow){Kr(D.shadow);continue}let $=D.node,Z=w($)===st.element,ue=_($);if(ue)for(let fe=ue.length-1;fe>=0;--fe)z.push({node:ue[fe],shadow:null});if(Z){let fe=B?B($):null;if(typeof fe=="string"&&Me(fe)==="template"){let Ie=$.content;Gn(Ie)&&z.push({node:Ie,shadow:null})}}if(Z){let fe=x($);Gn(fe)&&z.push({node:null,shadow:fe},{node:fe,shadow:null})}}};return t.sanitize=function(O){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,D=null,$=null,Z=null;if(mr=!O,mr&&(O="<!-->"),typeof O!="string"&&!gr(O)&&(O=Nu(O),typeof O!="string"))throw pn("dirty is not a string, aborting");if(!t.isSupported)return O;Ot?(he=Hn,ye=kt):qo(h),(ve.uponSanitizeElement.length>0||ve.uponSanitizeAttribute.length>0)&&(he=lt(he)),ve.uponSanitizeAttribute.length>0&&(ye=lt(ye)),t.removed=[];let ue=Wn&&typeof O!="string"&&gr(O);if(ue){lu(O);let gt=A(O);if(typeof gt=="string"){let it=Me(gt);if(!he[it]||_n[it])throw Vr(O),pn("root node is forbidden and cannot be sanitized in-place")}if(Gr(O))throw Vr(O),pn("root node is clobbered and cannot be sanitized in-place");try{Vo(O)}catch(it){throw Vr(O),it}}else if(gr(O))z=Mi("<!---->"),D=z.ownerDocument.importNode(O,!0),D.nodeType===st.element&&D.nodeName==="BODY"||D.nodeName==="HTML"?z=D:z.appendChild(D),Vo(z);else{if(!ft&&!at&&!pt&&O.indexOf("<")===-1)return P&&Sn?b(O):O;if(z=Mi(O),!z)return ft?null:Sn?I:""}z&&Jt&&un(z.firstChild);let fe=ue?O:z;try{let gt=Ii(fe);for(;$=gt.nextNode();)Li($,fe),Oi($,fe),Gn($.content)&&Kr($.content)}catch(gt){throw ue&&(Vr(O),An(t.removed,it=>{it.element&&jr(it.element)})),gt}if(ue){let gt=!1;if(An(t.removed,it=>{it.element&&(it.element===O&&(gt=!0),jr(it.element))}),gt)throw pn("a node selected for removal could not be safely returned; refusing to sanitize in place");return at&&Ho(O),O}if(ft){if(at&&Ho(z),Vn)for(Z=He.call(z.ownerDocument);z.firstChild;)Z.appendChild(z.firstChild);else Z=z;return(ye.shadowroot||ye.shadowrootmode)&&(Z=yt.call(o,Z,!0)),Z}let Ie=pt?z.outerHTML:z.innerHTML;return pt&&he["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&Ke(Gu,z.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Ie),at&&(Ie=Wr(Ie)),P&&Sn?b(Ie):Ie},t.setConfig=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qo(O),Ot=!0,Hn=he,kt=ye},t.clearConfig=function(){dn=null,Ot=!1,Hn=null,kt=null,P=N,I=""},t.isValidAttribute=function(O,h,z){dn||qo({});let D=Me(O),$=Me(h);return Di(D,$,z)},t.addHook=function(O,h){typeof h=="function"&&rt(ve,O)&&hr(ve[O],h)},t.removeHook=function(O,h){if(rt(ve,O)){if(h!==void 0){let z=Eu(ve[O],h);return z===-1?void 0:Pu(ve[O],z,1)[0]}return Ui(ve[O])}},t.removeHooks=function(O){rt(ve,O)&&(ve[O]=[])},t.removeAllHooks=function(){ve=Qi()},t}var ta=rs();function aa(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mn=aa();function ms(e){Mn=e}var En={exec:()=>null};function Zn(e){let t=[];return n=>{let o=Math.max(0,Math.min(3,n-1)),a=t[o];return a||(a=e(o),t[o]=a),a}}function se(e,t=""){let n=typeof e=="string"?e:e.source,o={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ge.caret,"$1"),n=n.replace(a,s),o},getRegex:()=>new RegExp(n,t)};return o}var tp=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Ge={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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Zn(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Zn(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Zn(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Zn(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Zn(e=>new RegExp(`^ {0,${e}}(?:</?(?:${zr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Zn(e=>new RegExp(`^ {0,${e}}>`))},np=/^(?:[ \t]*(?:\n|$))+/,rp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,op=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,wr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ap=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ia=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hs=se(gs).replace(/bull/g,ia).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(),ip=se(gs).replace(/bull/g,ia).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(),sa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,sp=/^[^\n]+/,la=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lp=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",la).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cp=se(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ia).getRegex(),zr="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",ca=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dp=se("^ {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",ca).replace("tag",zr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bs=e=>se(sa).replace("hr",wr).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",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zr).getRegex(),up=bs(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),pp=bs(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),fp=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pp).getRegex(),da={blockquote:fp,code:rp,def:lp,fences:op,heading:ap,hr:wr,html:dp,lheading:hs,list:cp,newline:np,paragraph:up,table:En,text:sp},os=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",wr).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",zr).getRegex(),mp={...da,lheading:ip,table:os,paragraph:se(sa).replace("hr",wr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",os).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",zr).getRegex()},gp={...da,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ca).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:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(sa).replace("hr",wr).replace("heading",` *#{1,6} *[^
|
|
4
|
+
]`).replace("lheading",hs).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vs=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,vp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Yt=/[\p{P}\p{S}]/u,Qn=/[\s\p{P}\p{S}]/u,_r=/[^\s\p{P}\p{S}]/u,yp=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qn).getRegex(),xp=/[\p{Pi}\p{Ps}"']/u,ys=/(?!~)[\p{P}\p{S}]/u,kp=/(?!~)[\s\p{P}\p{S}]/u,wp=/(?:[^\s\p{P}\p{S}]|~)/u,zp=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xs=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,_p=se(xs,"u").replace(/punct/g,Yt).getRegex(),Sp=se(xs,"u").replace(/punct/g,ys).getRegex(),Cp=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Tp=se(Cp,"u").replace(/openQuote/g,xp).replace(/punct/g,Yt).getRegex(),ks="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ap=se(ks,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,Qn).replace(/punct/g,Yt).getRegex(),Ep=se(ks,"gu").replace(/notPunctSpace/g,wp).replace(/punctSpace/g,kp).replace(/punct/g,ys).getRegex(),Pp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Mp=se(Pp,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,Qn).replace(/punct/g,Yt).getRegex(),Ip=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,Qn).replace(/punct/g,Yt).getRegex(),Rp="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Lp=se(Rp,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,Qn).replace(/punct/g,Yt).getRegex(),Dp=se(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Yt).getRegex(),Np="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Op=se(Np,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,Qn).replace(/punct/g,Yt).getRegex(),Fp=se(/\\(punct)/,"gu").replace(/punct/g,Yt).getRegex(),$p=se(/^<(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(),Bp=se(ca).replace("(?:-->|$)","-->").getRegex(),Up=se("^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",Bp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ws=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Qr=se(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",ws).getRegex(),qp=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Qr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hp=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Qr).replace("ref",la).getRegex(),Vp=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",la).getRegex(),as=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,jp=se(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",ws).getRegex(),Wp=se("reflink|nolink(?!\\()","g").replace("reflink",se(/^!?\[(label)\]\[(ref)\]/).replace("label",jp).replace("ref",as).getRegex()).replace("nolink",se(/^!?\[(ref)\](?:\[\])?/).replace("ref",as).getRegex()).getRegex(),is=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gp=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Xp=se(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Gp).getRegex(),ua={_backpedal:En,anyPunctuation:Fp,autolink:$p,blockSkip:zp,br:vs,code:bp,del:En,delLDelim:En,delRDelim:En,emStrongLDelim:_p,emStrongRDelimAst:Ap,emStrongRDelimUnd:Ip,escape:hp,link:qp,nolink:Vp,punctuation:yp,reflink:Hp,reflinkSearch:Wp,tag:Up,text:vp,url:En},Kp={...ua,emStrongLDelim:Tp,emStrongRDelimAst:Mp,emStrongRDelimUnd:Lp,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Qr).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qr).getRegex()},na={...ua,emStrongRDelimAst:Ep,emStrongLDelim:Sp,delLDelim:Dp,delRDelim:Op,url:se(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Xp).replace("protocol",is).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:se(/^(?:[^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",is).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Jp={...na,br:se(vs).replace("{2,}","*").getRegex(),text:se(na.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zr={normal:da,gfm:mp,pedantic:gp},xr={normal:ua,gfm:na,breaks:Jp,pedantic:Kp},Yp={"&":"&","<":"<",">":">",'"':""","'":"'"},ss=e=>Yp[e];function ct(e,t){if(t){if(Ge.escapeTest.test(e))return e.replace(Ge.escapeReplace,ss)}else if(Ge.escapeTestNoEncode.test(e))return e.replace(Ge.escapeReplaceNoEncode,ss);return e}function Zp(e){return e.replace(Ge.numericCharacterReference,(t,n,o)=>{let a=n===void 0?Number.parseInt(o,16):Number.parseInt(n,10);return a===0||a>1114111||a>=55296&&a<=57343?"\uFFFD":String.fromCodePoint(a)})}function ls(e){try{e=encodeURI(e).replace(Ge.percentDecode,"%")}catch{return null}return e}function cs(e,t){let n=e.replace(Ge.findPipe,(i,s,l)=>{let c=!1,d=s;for(;--d>=0&&l[d]==="\\";)c=!c;return c?"|":" |"}),o=n.split(Ge.splitPipe),a=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;a<o.length;a++)o[a]=o[a].trim().replace(Ge.slashPipe,"|");return o}function mn(e,t,n){let o=e.length;if(o===0)return"";let a=0;for(;a<o;){let i=e.charAt(o-a-1);if(i===t&&!n)a++;else if(i!==t&&n)a++;else break}return e.slice(0,o-a)}function ds(e){let t=e.split(`
|
|
5
5
|
`),n=t.length-1;for(;n>=0&&Ge.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
6
|
-
`)}function
|
|
6
|
+
`)}function eo(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function Qp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return n>0?-2:-1}function us(e,t=0){let n=t,o="";for(let a of e)if(a===" "){let i=4-n%4;o+=" ".repeat(i),n+=i}else o+=a,n++;return o}function ps(e,t,n,o,a){let i=t.href,s=t.title||null,l=e[1].replace(a.other.outputLinkReplace,"$1"),c=e[0].charAt(0)==="!";o.state.inLink=!0;let d=o.state.linkEmitted,f=o.state.inRawBlock;o.state.linkEmitted=!1;let u=o.inlineTokens(l),p=o.state.linkEmitted;if(o.state.linkEmitted=d,o.state.inLink=!1,!c){if(p){o.state.inRawBlock=f;return}o.state.linkEmitted=!0}return{type:c?"image":"link",raw:n,href:i,title:s,text:l,tokens:u}}function ef(e,t,n){let o=e.match(n.other.indentCodeCompensation);if(o===null)return t;let a=o[1];return t.split(`
|
|
7
7
|
`).map(i=>{let s=i.match(n.other.beginningSpace);if(s===null)return i;let[l]=s;return i.slice(Math.min(l.length,a.length))}).join(`
|
|
8
|
-
`)}function
|
|
9
|
-
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:
|
|
10
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=
|
|
8
|
+
`)}function fs(e,t,n,o){if(!t.includes("<"))return!1;for(let a=0;a<t.length;a++){if(t[a]==="\\"){a++;continue}if(t[a]==="`"){let l=o.inline.code.exec(t.slice(a));if(l){a+=l[0].length-1;continue}}if(t[a]!=="<")continue;let i=e.slice(n+a),s=o.inline.tag.exec(i)||o.inline.autolink.exec(i);if(s){if(s[0].length>t.length-a)return!0;a+=s[0].length-1}}return!1}var to=class{options;rules;lexer;constructor(e){this.options=e||Mn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:ds(t[0]),o=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:o}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],o=ef(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:o}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let o=mn(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceTabChar.test(o))&&(n=o.trim())}return{type:"heading",raw:mn(t[0],`
|
|
9
|
+
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mn(t[0],`
|
|
10
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=mn(t[0],`
|
|
11
11
|
`).split(`
|
|
12
|
-
`),
|
|
12
|
+
`),o="",a="",i=[];for(;n.length>0;){let s=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),s=!0;else if(!s)l.push(n[c]);else break;n=n.slice(c);let d=l.join(`
|
|
13
13
|
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
14
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");
|
|
14
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
15
15
|
${d}`:d,a=a?`${a}
|
|
16
|
-
${f}`:f;let
|
|
17
|
-
`),y=
|
|
18
|
-
`+m.replace(this.rules.other.blockquoteSetextReplace2,""),_=this.blockquote(y);i[i.length-1]=_;let
|
|
19
|
-
`).length:0,k=x?n.slice(0,-x):n;k.length>0&&(
|
|
16
|
+
${f}`:f;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,i,!0),this.lexer.state.top=u,n.length===0)break;let p=i.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=n.join(`
|
|
17
|
+
`),y=g.raw+`
|
|
18
|
+
`+m.replace(this.rules.other.blockquoteSetextReplace2,""),_=this.blockquote(y);i[i.length-1]=_;let E=y.substring(_.raw.length).replace(/^\n/,""),x=E?E.split(`
|
|
19
|
+
`).length:0,k=x?n.slice(0,-x):n;k.length>0&&(o=`${o}
|
|
20
20
|
${k.join(`
|
|
21
|
-
`)}`),a=a.substring(0,a.length-
|
|
21
|
+
`)}`),a=a.substring(0,a.length-g.text.length)+_.text;break}else if(p?.type==="list"){let g=p,m=g.raw+`
|
|
22
22
|
`+n.join(`
|
|
23
|
-
`),y=this.list(m);i[i.length-1]=y,
|
|
24
|
-
`);continue}}return{type:"blockquote",raw:
|
|
25
|
-
`,1)[0],
|
|
26
|
-
`,1)[0],y=!
|
|
27
|
-
`,e=e.substring(m.length+1),c=!0),!c){let
|
|
28
|
-
`,1)[0],
|
|
29
|
-
`+
|
|
30
|
-
`+m}y=!m.trim(),d+=
|
|
31
|
-
`,e=e.substring(
|
|
32
|
-
`),href:
|
|
33
|
-
`):[],i={type:"table",raw:
|
|
34
|
-
`),header:[],align:[],rows:[]};if(n.length===
|
|
23
|
+
`),y=this.list(m);i[i.length-1]=y,o=o.substring(0,o.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,n=m.substring(i.at(-1).raw.length).split(`
|
|
24
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:i,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),o=n.length>1,a={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let i=this.rules.other.listItemRegex(n),s=!1;for(;e;){let c=!1,d="",f="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let u=t[2].split(`
|
|
25
|
+
`,1)[0],p=t[1].length,g=this.options.pedantic?us(u,p):u.replace(this.rules.other.leadingSpaceTab,E=>us(E,p)),m=e.split(`
|
|
26
|
+
`,1)[0],y=!g.trim(),_=0;if(this.options.pedantic?(_=2,f=g.trimStart()):y?_=p+1:(_=g.search(this.rules.other.nonSpaceChar),_=_>4?1:_,f=g.slice(_),_+=p),y&&this.rules.other.blankLine.test(m)&&(d+=m+`
|
|
27
|
+
`,e=e.substring(m.length+1),c=!0),!c){let E=this.rules.other.nextBulletRegex(_),x=this.rules.other.hrRegex(_),k=this.rules.other.fencesBeginRegex(_),R=this.rules.other.headingBeginRegex(_),B=this.rules.other.htmlBeginRegex(_),j=this.rules.other.blockquoteBeginRegex(_);for(;e;){let w=e.split(`
|
|
28
|
+
`,1)[0],A;if(m=w,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),A=m):A=m.replace(this.rules.other.leadingSpaceTab,P=>P.replace(this.rules.other.tabCharGlobal," ")),k.test(m)||R.test(m)||B.test(m)||j.test(m)||E.test(m)||x.test(m))break;if(A.search(this.rules.other.nonSpaceChar)>=_||!m.trim())f+=`
|
|
29
|
+
`+A.slice(_);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||R.test(g)||x.test(g))break;f+=`
|
|
30
|
+
`+m}y=!m.trim(),d+=w+`
|
|
31
|
+
`,e=e.substring(w.length+1),g=A.slice(_)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0)),a.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),a.raw+=d}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let d=c.tokens.filter(u=>u.type==="space"),f=d.length>0&&d.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=f}for(let c of a.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 u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let f=this.rules.other.listTaskCheckbox.exec(c.raw);if(f){let u={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=ds(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=eo(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:mn(t[0],`
|
|
32
|
+
`),href:o,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=cs(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
33
|
+
`):[],i={type:"table",raw:mn(t[0],`
|
|
34
|
+
`),header:[],align:[],rows:[]};if(n.length===o.length){for(let s of o)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<n.length;s++)i.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:i.align[s]});for(let s of a)i.rows.push(cs(s,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:mn(t[0],`
|
|
35
35
|
`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
36
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&
|
|
37
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let
|
|
36
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&fs(e,t[1],n,this.rules))return;let o=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let s=mn(o.slice(0,-1),"\\");if((o.length-s.length)%2===0)return}else{let s=Qp(t[2],"()");if(s===-2)return;if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let a=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?a=a.slice(1):a=a.slice(1,-1)),ps(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let o=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&fs(e,n[1],o,this.rules))return;let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[eo(a)];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ps(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||!o[1]&&!o[2]&&!o[3]&&!o[4]||o[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...o[0]].length-1,i,s,l=a,c=0,d=o[0][0],f=n===d,u=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);(o=u.exec(t))!==null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i)continue;if(s=[...i].length,o[3]||o[4]){l+=s;continue}else if(o[5]||o[6]){if(a%3&&!((a+s)%3)){c+=s;continue}if(f)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let p=[...o[0]][0].length,g=e.slice(0,a+o.index+p+s);if(Math.min(a,s)%2){let y=g.slice(1,-1);return{type:"em",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let o=this.rules.inline.delLDelim.exec(e);if(o&&(!o[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...o[0]].length-1,i,s,l=a,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+a);(o=c.exec(t))!==null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i||(s=[...i].length,s!==a))continue;if(o[3]||o[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let d=[...o[0]][0].length,f=e.slice(0,a+o.index+d+s),u=f.slice(a,-a);return{type:"del",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,o;return t[2]==="@"?(n=t[1],o="mailto:"+n):(n=t[1],o=n),{type:"link",raw:t[0],text:n,href:o,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:n?t[0]:Zp(t[0]),escaped:n}}}},St=class ra{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mn,this.options.tokenizer=this.options.tokenizer||new to,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:Ge,block:Zr.normal,inline:xr.normal};this.options.pedantic?(n.block=Zr.pedantic,n.inline=xr.pedantic):this.options.gfm&&(n.block=Zr.gfm,this.options.breaks?n.inline=xr.breaks:n.inline=xr.gfm),this.tokenizer.rules=n}static get rules(){return{block:Zr,inline:xr}}static lex(t,n){return new ra(n).lex(t)}static lexInline(t,n){return new ra(n).inlineTokens(t)}lex(t){t=t.replace(Ge.carriageReturn,`
|
|
37
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],o=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ge.tabCharGlobal," ").replace(Ge.spaceLine,""));let a=1/0;for(;t;){if(t.length<a)a=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
|
|
38
38
|
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
39
39
|
`)?"":`
|
|
40
40
|
`)+i.raw,l.text+=`
|
|
41
41
|
`+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
42
42
|
`)?"":`
|
|
43
43
|
`)+i.raw,l.text+=`
|
|
44
|
-
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let l=n.at(-1);
|
|
44
|
+
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let l=n.at(-1);o&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
45
45
|
`)?"":`
|
|
46
46
|
`)+i.raw,l.text+=`
|
|
47
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),
|
|
47
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),o=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
48
48
|
`)?"":`
|
|
49
49
|
`)+i.raw,l.text+=`
|
|
50
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}linkInText(t){if(!t.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let
|
|
51
|
-
`:"";return
|
|
50
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}linkInText(t){if(!t.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let o of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(o[0])&&t.charAt(o.index-1)!=="!")return!0;for(let o of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let a=o[0],i=a.lastIndexOf("[");if(!(a.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,eo(a.slice(i+1,-1))))&&!(i>1&&this.linkInText(a.slice(1,i-1))))return!0}return!1}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let o=t;if(this.tokens.links&&t.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,c=d=>{let f=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,eo(d.slice(f+1,-1))))return d;if(f>1&&d.charAt(0)!=="!"){let u=d.slice(1,f-1);if(this.linkInText(u))return"["+u.replace(l,c)+"]["+"a".repeat(d.length-f-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};o=o.replace(l,c)}o=o.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),o=o.replace(this.tokenizer.rules.inline.blockSkip,(l,c,d)=>{let f=d?d.length:0;return l.slice(0,f)+"["+"a".repeat(l.length-f-2)+"]"}),o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let a=!1,i="",s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}a||(i=""),a=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.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(t,o,i)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,o,i)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if(this.options.extensions?.startInline){let d=1/0,f=t.slice(1),u;this.options.extensions.startInline.forEach(p=>{u=p.call({lexer:this},f),typeof u=="number"&&u>=0&&(d=Math.min(d,u))}),d<1/0&&d>=0&&(c=t.substring(0,d+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),a=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},no=class{options;parser;constructor(e){this.options=e||Mn}space(e){return""}code({text:e,lang:t,escaped:n}){let o=(t||"").match(Ge.notSpaceStart)?.[0],a=e?e.replace(Ge.endingNewline,"")+`
|
|
51
|
+
`:"";return o?'<pre><code class="language-'+ct(o)+'">'+(n?a:ct(a,!0))+`</code></pre>
|
|
52
52
|
`:"<pre><code>"+(n?a:ct(a,!0))+`</code></pre>
|
|
53
53
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
54
54
|
${this.parser.parse(e)}</blockquote>
|
|
55
55
|
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
56
56
|
`}hr(e){return`<hr>
|
|
57
|
-
`}list(e){let t=e.ordered,n=e.start,
|
|
58
|
-
`+
|
|
57
|
+
`}list(e){let t=e.ordered,n=e.start,o="";for(let s=0;s<e.items.length;s++){let l=e.items[s];o+=this.listitem(l)}let a=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return"<"+a+i+`>
|
|
58
|
+
`+o+"</"+a+`>
|
|
59
59
|
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
60
60
|
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
61
|
-
`}table(e){let t="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);t+=this.tablerow({text:n});let
|
|
61
|
+
`}table(e){let t="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);t+=this.tablerow({text:n});let o="";for(let a=0;a<e.rows.length;a++){let i=e.rows[a];n="";for(let s=0;s<i.length;s++)n+=this.tablecell(i[s]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
62
62
|
<thead>
|
|
63
63
|
`+t+`</thead>
|
|
64
|
-
`+
|
|
64
|
+
`+o+`</table>
|
|
65
65
|
`}tablerow({text:e}){return`<tr>
|
|
66
66
|
${e}</tr>
|
|
67
67
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
68
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ct(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:
|
|
69
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+ct(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Tn=new la;function ke(e,t){return Tn.parse(e,t)}ke.options=ke.setOptions=function(e){return Tn.setOptions(e),ke.defaults=Tn.defaults,rs(ke.defaults),ke};ke.getDefaults=ea;ke.defaults=An;function Cu(...e){return Tn.use(...e),ke.defaults=Tn.defaults,rs(ke.defaults),ke}ke.use=Cu;ke.walkTokens=function(e,t){return Tn.walkTokens(e,t)};ke.parseInline=Tn.parseInline;ke.Parser=Ct;ke.parser=Ct.parse;ke.Renderer=Zo;ke.TextRenderer=sa;ke.Lexer=St;ke.lexer=St.lex;ke.Tokenizer=Yo;ke.Hooks=bo;ke.parse=ke;var kg=ke.options,wg=ke.setOptions,zg=ke.walkTokens,_g=ke.parseInline;var Sg=Ct.parse,Cg=St.lex;var ar,te,hs,Tu,un,fs,bs,vs,ca,er,ko,ys,fa,da,pa,xs,nr={},or=[],Au=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,wo=Array.isArray;function Zt(e,t){for(var n in t)e[n]=t[n];return e}function ma(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t,n){var r,a,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ar.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return tr(e,s,r,a,null)}function tr(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++hs,__i:-1,__u:0};return a==null&&te.vnode!=null&&te.vnode(i),i}function R(e){return e.children}function Tt(e,t){this.props=e,this.context=t}function En(e,t){if(t==null)return e.__?En(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?En(e):null}function Eu(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],i=Zt({},t);i.__v=t.__v+1,te.vnode&&te.vnode(i),ga(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??En(t),!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,Ss(r,i,a),t.__e=t.__=null,i.__e!=n&&ks(i)}}function ks(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ks(e)}function ua(e){(!e.__d&&(e.__d=!0)&&un.push(e)&&!rr.__r++||fs!=te.debounceRendering)&&((fs=te.debounceRendering)||bs)(rr)}function rr(){try{for(var e,t=1;un.length;)un.length>t&&un.sort(vs),e=un.shift(),t=un.length,Eu(e)}finally{un.length=rr.__r=0}}function ws(e,t,n,r,a,i,s,l,c,d,f){var p,u,h,m,y,_,C=r&&r.__k||or,x=t.length;for(c=Pu(n,t,C,c,x),p=0;p<x;p++)(h=n.__k[p])!=null&&(u=h.__i!=-1&&C[h.__i]||nr,h.__i=p,_=ga(e,h,u,a,i,s,l,c,d,f),m=h.__e,h.ref&&u.ref!=h.ref&&(u.ref&&ha(u.ref,null,h),f.push(h.ref,h.__c||m,h)),y==null&&m!=null&&(y=m),4&h.__u?(c=zs(h,c,e),u.__e&&(u.__e=null)):typeof h.type=="function"&&_!==void 0?c=_:m&&(c=m.nextSibling),h.__u&=-7);return n.__e=y,c}function Pu(e,t,n,r,a){var i,s,l,c,d,f=n.length,p=f,u=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=tr(null,s,null,null,null):wo(s)?s=e.__k[i]=tr(R,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=tr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+u,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=Mu(s,n,c,p))!=-1&&(p--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(a>f?u--:a<f&&u++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?u--:d==c+1?u++:(d>c?u--:u++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<f;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=En(l)),Ts(l,l));return r}function zs(e,t,n){var r,a;if(typeof e.type=="function"){for(r=e.__k,a=0;r&&a<r.length;a++)r[a]&&(r[a].__=e,t=zs(r[a],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=En(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function zo(e,t){return t=t||[],e==null||typeof e=="boolean"||(wo(e)?e.some(function(n){zo(n,t)}):t.push(e)),t}function Mu(e,t,n,r){var a,i,s,l=e.key,c=e.type,d=t[n],f=d!=null&&(2&d.__u)==0;if(d===null&&l==null||f&&l==d.key&&c==d.type)return n;if(r>(f?1:0)){for(a=n-1,i=n+1;a>=0||i<t.length;)if((d=t[s=a>=0?a--:i++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function ms(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Au.test(t)?n:n+"px"}function Qo(e,t,n,r,a){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ms(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ms(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ys,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[ko]=r[ko]:(n[ko]=fa,e.addEventListener(t,i?pa:da,i)):e.removeEventListener(t,i?pa:da,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function gs(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[er]==null)t[er]=fa++;else if(t[er]<n[ko])return;return n(te.event?te.event(t):t)}}}function ga(e,t,n,r,a,i,s,l,c,d){var f,p,u,h,m,y,_,C,x,k,A,O,q,N,B,Y,se=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=t.__e=n.__e]),(f=te.__b)&&f(t);e:if(typeof se=="function"){p=s.length;try{if(x=t.props,k=se.prototype&&se.prototype.render,A=(f=se.contextType)&&r[f.__c],O=f?A?A.props.value:f.__:r,n.__c?C=(u=t.__c=n.__c).__=u.__E:(k?t.__c=u=new se(x,O):(t.__c=u=new Tt(x,O),u.constructor=se,u.render=Ru),A&&A.sub(u),u.state||(u.state={}),u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),k&&u.__s==null&&(u.__s=u.state),k&&se.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Zt({},u.__s)),Zt(u.__s,se.getDerivedStateFromProps(x,u.__s))),m=u.props,y=u.state,u.__v=t,h)k&&se.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),k&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k&&se.getDerivedStateFromProps==null&&x!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(x,O),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(x,u.__s,O)===!1){t.__v!=n.__v&&(u.props=x,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(V){V&&(V.__=t)}),or.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&s.push(u),l=En(n);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(x,u.__s,O),k&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,y,_)})}if(u.context=O,u.props=x,u.__P=e,u.__e=!1,q=te.__r,N=0,k)u.state=u.__s,u.__d=!1,q&&q(t),f=u.render(u.props,u.state,u.context),or.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,q&&q(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++N<25);u.state=u.__s,u.getChildContext!=null&&(r=Zt(Zt({},r),u.getChildContext())),k&&!h&&u.getSnapshotBeforeUpdate!=null&&(_=u.getSnapshotBeforeUpdate(m,y)),B=f!=null&&f.type===R&&f.key==null?Cs(f.props.children):f,l=ws(e,wo(B)?B:[B],t,n,r,a,i,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),C&&(u.__E=u.__=null)}catch(V){if(s.length=p,t.__v=null,c||i!=null){if(V.then){for(t.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),t.__e=l}else if(i!=null)for(Y=i.length;Y--;)ma(i[Y])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),V.then||_s(t),te.__e(V,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=Iu(n.__e,t,n,r,a,i,s,c,d);return(f=te.diffed)&&f(t),128&t.__u?void 0:l}function _s(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(_s))}function Ss(e,t,n){for(var r=0;r<n.length;r++)ha(n[r],n[++r],n[++r]);te.__c&&te.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){te.__e(i,a.__v)}})}function Cs(e){return typeof e!="object"||e==null||e.__b>0?e:wo(e)?e.map(Cs):e.constructor!==void 0?null:Zt({},e)}function Iu(e,t,n,r,a,i,s,l,c){var d,f,p,u,h,m,y,_=n.props||nr,C=t.props,x=t.type;if(x=="svg"?a="http://www.w3.org/2000/svg":x=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((h=i[d])&&"setAttribute"in h==!!x&&(x?h.localName==x:h.nodeType==3)){e=h,i[d]=null;break}}if(e==null){if(x==null)return document.createTextNode(C);e=document.createElementNS(a,x,C.is&&C),l&&(te.__m&&te.__m(t,i),l=!1),i=null}if(x==null)_===C||l&&e.data==C||(e.data=C);else{if(i=x=="textarea"&&C.defaultValue!=null?null:i&&ar.call(e.childNodes),!l&&i!=null)for(_={},d=0;d<e.attributes.length;d++)_[(h=e.attributes[d]).name]=h.value;for(d in _)h=_[d],d=="dangerouslySetInnerHTML"?p=h:d=="children"||d in C||d=="value"&&"defaultValue"in C||d=="checked"&&"defaultChecked"in C||Qo(e,d,null,h,a);for(d in C)h=C[d],d=="children"?u=h:d=="dangerouslySetInnerHTML"?f=h:d=="value"?m=h:d=="checked"?y=h:l&&typeof h!="function"||_[d]===h||Qo(e,d,h,_[d],a);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),ws(t.type=="template"?e.content:e,wo(u)?u:[u],t,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&En(n,0),l,c),i!=null)for(d=i.length;d--;)ma(i[d]);l&&x!="textarea"||(d="value",x=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[d]||x=="progress"&&!m||x=="option"&&m!=_[d])&&Qo(e,d,m,_[d],a),d="checked",y!=null&&y!=e[d]&&Qo(e,d,y,_[d],a))}return e}function ha(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(a){te.__e(a,n)}}function Ts(e,t,n){var r,a;if(te.unmount&&te.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ha(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){te.__e(i,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&Ts(r[a],t,n||typeof e.type!="function");n||ma(e.__e),e.__c=e.__=e.__e=void 0}function Ru(e,t,n){return this.constructor(e,n)}function Be(e,t,n){var r,a,i,s;t==document&&(t=document.documentElement),te.__&&te.__(e,t),a=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],ga(t,e=(!r&&n||t).__k=Pn(R,null,[e]),a||nr,nr,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?ar.call(t.childNodes):null,i,!r&&n?n:a?a.__e:t.firstChild,r,s),Ss(i,e,s),e.props.children=null}function ir(e){function t(n){var r,a;return this.getChildContext||(r=new Set,(a={})[t.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,ua(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return t.__c="__cC"+xs++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}ar=or.slice,te={__e:function(e,t,n,r){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,r||{}),s=a.__d),s)return a.__E=a}catch(l){e=l}throw e}},hs=0,Tu=function(e){return e!=null&&e.constructor===void 0},Tt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Zt({},this.state),typeof e=="function"&&(e=e(Zt({},n),this.props)),e&&Zt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ua(this))},Tt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ua(this))},Tt.prototype.render=R,un=[],bs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vs=function(e,t){return e.__v.__b-t.__v.__b},rr.__r=0,ca=Math.random().toString(8),er="__d"+ca,ko="__a"+ca,ys=/(PointerCapture)$|Capture$/i,fa=0,da=gs(!1),pa=gs(!0),xs=0;var fn,Se,ba,As,_o=0,Ns=[],Ne=te,Es=Ne.__b,Ps=Ne.__r,Ms=Ne.diffed,Is=Ne.__c,Rs=Ne.unmount,Ls=Ne.__;function Jn(e,t){Ne.__h&&Ne.__h(Se,e,_o||t),_o=0;var n=Se.__H||(Se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function T(e){return _o=1,Os(Fs,e)}function Os(e,t,n){var r=Jn(fn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Fs(void 0,t),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=Se,!Se.__f)){var a=function(l,c,d){if(!r.__c.__H)return!0;var f=!1,p=r.__c.props!==l;if(r.__c.__H.__.some(function(h){if(h.__N){f=!0;var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(p=!0)}}),i){var u=i.call(this,l,c,d);return f?u||p:u}return!f||p};Se.__f=!0;var i=Se.shouldComponentUpdate,s=Se.componentWillUpdate;Se.componentWillUpdate=function(l,c,d){if(this.__e){var f=i;i=void 0,a(l,c,d),i=f}s&&s.call(this,l,c,d)},Se.shouldComponentUpdate=a}return r.__N||r.__}function X(e,t){var n=Jn(fn++,3);!Ne.__s&&xa(n.__H,t)&&(n.__=e,n.u=t,Se.__H.__h.push(n))}function So(e,t){var n=Jn(fn++,4);!Ne.__s&&xa(n.__H,t)&&(n.__=e,n.u=t,Se.__h.push(n))}function J(e){return _o=5,At(function(){return{current:e}},[])}function At(e,t){var n=Jn(fn++,7);return xa(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Qt(e,t){return _o=8,At(function(){return e},t)}function ya(e){var t=Se.context[e.__c],n=Jn(fn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Se)),t.props.value):e.__}function lr(){var e=Jn(fn++,11);if(!e.__){for(var t=Se.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Lu(){for(var e;e=Ns.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(sr),t.__h.some(va),t.__h=[]}catch(n){t.__h=[],Ne.__e(n,e.__v)}}}Ne.__b=function(e){Se=null,Es&&Es(e)},Ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ls&&Ls(e,t)},Ne.__r=function(e){Ps&&Ps(e),fn=0;var t=(Se=e.__c).__H;t&&(ba===Se?(t.__h=[],Se.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(sr),t.__h.some(va),t.__h=[],fn=0)),ba=Se},Ne.diffed=function(e){Ms&&Ms(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ns.push(t)!==1&&As===Ne.requestAnimationFrame||((As=Ne.requestAnimationFrame)||Du)(Lu)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),ba=Se=null},Ne.__c=function(e,t){t.some(function(n){try{n.__h.some(sr),n.__h=n.__h.filter(function(r){return!r.__||va(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Ne.__e(r,n.__v)}}),Is&&Is(e,t)},Ne.unmount=function(e){Rs&&Rs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{sr(r)}catch(a){t=a}}),n.__H=void 0,t&&Ne.__e(t,n.__v))};var Ds=typeof requestAnimationFrame=="function";function Du(e){var t,n=function(){clearTimeout(r),Ds&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ds&&(t=requestAnimationFrame(n))}function sr(e){var t=Se,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Se=t}function va(e){var t=Se;e.__c=e.__(),Se=t}function xa(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Fs(e,t){return typeof t=="function"?t(e):t}var ee=()=>typeof window<"u"&&window.tangu||{};function cr(e){let t=typeof e?.status=="number"?e.status:0;if(t>=200&&t<300)return{ok:!0,status:t,data:e?.json??null};let n=e?.json&&typeof e.json=="object"?e.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,a=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:t,code:r,detail:a,transport:typeof e?.error=="string"?e.error:null}}var ka=e=>({ok:!1,status:0,code:null,detail:null,transport:e});async function H(e,t={}){let n=ee().cloudFetch;if(!n)return ka("no_bridge");try{return cr(await n({path:e,...t}))}catch(r){return ka(String(r?.message||r))}}async function dr(e,t){if(!e)return t();try{return cr(await e())}catch(n){return ka(String(n?.message||n))}}var Mn=e=>e.status===401&&(e.transport==="not_signed_in"||e.code===null&&e.detail===null&&e.transport===null);function Et(e){return String(e?.message??e??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function mn(e,t,n){let r=ee().cloudInvoke;if(!r)return!1;let a=e==="membership"&&t?n?[e,t,n]:[e,t]:[e];try{return!!(await r("auth:openPayCenter",...a))?.ok}catch{return!1}}async function In(e){let t=ee().openAccountCenter;if(!t)return!1;try{return!!(await t(e)).ok}catch{return!1}}var Nu=0;function o(e,t,n,r,a,i){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Nu,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return te.vnode&&te.vnode(d),d}var Ou={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 W({name:e,size:t=14,class:n}){return o("svg",{class:n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:Ou[e]})})}function Yn({size:e=12}){return o("svg",{class:"spin",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var Fu={"sub.identity":"\u63D2\u4EF6 ID","sub.identityHint":"\u63D0\u4EA4\u540E\u81EA\u52A8\u5206\u914D\u552F\u4E00 ID\u3002\u540D\u79F0\u53EF\u4EE5\u91CD\u590D\uFF0C\u66F4\u65B0\u6CBF\u7528\u540C\u4E00\u4E2A ID\u3002","sub.description":"\u8BE6\u7EC6\u63CF\u8FF0","sub.tags":"\u6807\u7B7E","sub.tagsHint":"\u4EE5\u9017\u53F7\u5206\u9694\uFF0C\u6700\u591A 8 \u4E2A","sub.minAppVersion":"\u6700\u4F4E Forsion \u7248\u672C","sub.maxAppVersion":"\u6700\u9AD8\u7248\u672C\uFF08\u4E0D\u542B\uFF09","sub.optional":"\u9009\u586B","sub.platforms":"\u652F\u6301\u7684\u7AEF","sub.requirementsHint":"\u652F\u6301 desktop\u3001macos\u3001windows\u3001linux\u3001android\u3001ios\u3001web\u3002\u7559\u7A7A\u8868\u793A\u672A\u58F0\u660E\u3002ZIP \u6E05\u5355\u4E2D\u7684\u8981\u6C42\u4F1A\u81EA\u52A8\u8BFB\u53D6\uFF0C\u624B\u586B\u503C\u987B\u4E0E\u6E05\u5355\u4E00\u81F4\u3002","sub.err.market_requirements_invalid":"\u7248\u672C\u8981\u6C42\u6216\u5E73\u53F0\u65E0\u6548\u3002","sub.err.market_requirements_mismatch":"\u624B\u586B\u7248\u672C\u8981\u6C42\u4E0E ZIP \u6E05\u5355\u4E0D\u4E00\u81F4\u3002","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.membershipUsage":"\u4F1A\u5458\u4E0E\u7528\u91CF","page.membershipQuota":"\u4F1A\u5458\u4E0E\u989D\u5EA6","page.pointsInvite":"\u79EF\u5206\u4E0E\u9080\u8BF7","page.helpDiagnostics":"\u5E2E\u52A9\u4E0E\u8BCA\u65AD","account.details.title":"\u767B\u5F55\u4E0E\u8D44\u6599","account.details.desc":"\u5934\u50CF\u3001\u6635\u79F0\u4E0E\u7B80\u4ECB\u5728\u300C\u4E2A\u4EBA\u4E3B\u9875\u300D\u4E2D\u7F16\u8F91\u3002","account.details.username":"\u7528\u6237\u540D","diag.unavailable":"\u5F53\u524D\u5BBF\u4E3B\u4E0D\u652F\u6301\u8BCA\u65AD\u6570\u636E\uFF0C\u8BF7\u66F4\u65B0 Forsion \u540E\u91CD\u8BD5\u3002","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","guide.title":"\u4F7F\u7528\u6307\u5357","guide.readOnly":"\u53EA\u8BFB","guide.more":"\u66F4\u591A","guide.unlockAll":"\u5168\u90E8\u89E3\u9501","guide.relock":"\u6539\u56DE\u6309\u7B49\u7EA7\u89E3\u9501","guide.reminders":"\u4F7F\u7528\u6307\u5357\u63D0\u9192","guide.spotlight":"\u73B0\u573A\u6307\u5F15","guide.spotStep":"\u7B2C {n} \u6B65\uFF0C\u5171 {total} \u6B65","guide.figure":"\u793A\u610F\u56FE","guide.openAchievements":"\u6253\u5F00\u6210\u5C31","guide.tasks":"\u672C\u7AE0\u4EFB\u52A1","guide.go":"\u5E26\u6211\u53BB","guide.desktopOnly":"\u5728\u7535\u8111\u4E0A\u505A","guide.taskDone":"\u5DF2\u5B8C\u6210","guide.askTangu":"\u95EE Tangu","guide.progress":"\u8FDB\u5EA6","guide.justUnlocked":"\u521A\u89E3\u9501","guide.lockedHint":"\u672A\u89E3\u9501","guide.whatsNew":"\u65B0\u7248\u672C \xB7 {version}","guide.level.lv1":"Lv.1 \u521D\u6765\u4E4D\u5230","guide.level.lv2":"Lv.2 \u719F\u95E8\u719F\u8DEF","guide.level.lv3":"Lv.3 \u5F97\u5FC3\u5E94\u624B","guide.level.lv4":"Lv.4 \u878D\u4F1A\u8D2F\u901A","guide.locked.title":"\u8FD9\u4E00\u7AE0\u8FD8\u6CA1\u89E3\u9501","guide.locked.body":"\u505A\u5B8C\u300C{level}\u300D\u7684\u4EFB\u52A1\u5C31\u80FD\u8BFB\u5168\u6587\u3002","guide.locked.left":"\u8FD8\u5DEE\u8FD9\u51E0\u9879\uFF1A","guide.locked.hint":"\u7528\u8FC7\u4E00\u9635\u4E86\uFF1F\u53F3\u4E0A\u89D2\u300C\xB7\xB7\xB7\u300D\u91CC\u53EF\u4EE5\u5168\u90E8\u89E3\u9501\u3002","guide.levelProgress":"\u672C\u7EA7\u8FDB\u5EA6 {done}/{total}","guide.next":"\u4E0B\u4E00\u7EA7","guide.allDone":"\u5168\u90E8\u5B8C\u6210","guide.allDoneBody":"\u6307\u5357\u91CC\u7684\u4EFB\u52A1\u90FD\u505A\u5B8C\u4E86\uFF0C\u968F\u65F6\u56DE\u6765\u7FFB\u770B\u3002","guide.review":"\u56DE\u770B","guide.ask.hint":"\u5BF9\u300C{chapter}\u300D\u6709\u7591\u95EE\uFF1F\u95EE Tangu \u4F1A\u5F00\u4E00\u4E2A\u5E26\u4E0A\u672C\u7AE0\u5185\u5BB9\u7684\u65B0\u5BF9\u8BDD\u3002","guide.ask.placeholder":"\u60F3\u95EE\u4EC0\u4E48\uFF1F","guide.ask.send":"\u5F00\u59CB\u5BF9\u8BDD","guide.ask.prompt":"\u6211\u6B63\u5728\u8BFB Forsion \u4F7F\u7528\u6307\u5357\u91CC\u300C{chapter}\u300D\u8FD9\u4E00\u7AE0\uFF0C\u5185\u5BB9\u9644\u5728\u4E0B\u9762\u3002{question}","guide.ask.unavailable":"\u8FD9\u91CC\u5F00\u4E0D\u4E86\u5BF9\u8BDD","guide.ask.chatTitle":"\u4F7F\u7528\u6307\u5357\u95EE\u7B54","guide.companion.back":"\u56DE\u5230\u6307\u5357","guide.companion.close":"\u6536\u8D77","guide.toast.taskDone":"\u5B8C\u6210\uFF1A{task}","guide.letter.levelTitle":"{level} \u5DF2\u89E3\u9501\uFF1A\u63A5\u4E0B\u6765\u8BD5\u8BD5\u8FD9\u51E0\u4EF6\u4E8B","guide.letter.levelBody":"\u4E0A\u4E00\u7EA7\u7684\u4EFB\u52A1\u90FD\u505A\u5B8C\u4E86\uFF0C\u4E0B\u9762\u8FD9\u51E0\u7AE0\u73B0\u5728\u53EF\u4EE5\u8BFB\u4E86\u3002\u6BCF\u9879\u4EFB\u52A1\u90FD\u80FD\u300C\u5E26\u6211\u53BB\u300D\u3002","guide.letter.versionTitle":"{version} \u6709 {n} \u4EF6\u65B0\u4E1C\u897F\u53EF\u4EE5\u4F53\u9A8C","guide.letter.versionBody":"\u8FD9\u4E2A\u7248\u672C\u65B0\u52A0\u7684\uFF0C\u53EF\u4EE5\u76F4\u63A5\u4E0A\u624B\uFF1A","guide.letter.open":"\u6253\u5F00\u6307\u5357","guide.status.done":"\u5DF2\u5B8C\u6210","guide.cmd.open":"\u6253\u5F00\u4F7F\u7528\u6307\u5357","penzor.title":"\u84EC\u6D32\u4E91","penzor.kicker":"\u84EC\u6D32\u4E91 \xB7 Penzor Cloud","penzor.overview":"\u6982\u89C8","penzor.places":"\u4F4D\u7F6E","penzor.details":"\u8BE6\u60C5","penzor.ledger.sync":"\u667A\u5E93\u540C\u6B65","penzor.ledger.ama":"Amadeus Cloud","penzor.ledger.apps":"\u5E94\u7528\u6587\u4EF6","penzor.ledger.exports":"\u5BFC\u51FA","penzor.trash":"\u56DE\u6536\u7AD9","penzor.items":"{n} \u9879","penzor.total.sub":"\u5B58\u5728 Forsion \u4E91\u7AEF \xB7 {time}\u66F4\u65B0","penzor.justNow":"\u521A\u521A","penzor.ofMax":"/ {max}","penzor.card.syncSub":"{n} \u4E2A\u5E93 \xB7 \u4E0A\u6B21\u5199\u5165 {time}","penzor.card.syncSubNone":"{n} \u4E2A\u5E93","penzor.card.syncFoot":"\u5355\u4E2A\u6587\u4EF6\u8D85\u8FC7 {size} \u4E0D\u4E0A\u4F20","penzor.card.syncWarn":"\u5FEB\u6EE1\u4E86\uFF1A\u6EE1 {max} \u540E\u65B0\u6587\u4EF6\u4E0D\u518D\u4E0A\u4F20\uFF0C\u5DF2\u5728\u4E91\u7AEF\u7684\u7167\u5E38\u540C\u6B65","penzor.card.amaSmall":"\u4E0D\u7B97\u5728\u989D\u5EA6\u91CC","penzor.card.amaSub":"{n} \u4E2A\u4E91\u7AEF\u667A\u5E93","penzor.card.amaFoot":"\u7B14\u8BB0\u548C\u9644\u4EF6\u5728 Amadeus \u7684 Cloud \u4FA7","penzor.card.appsFoot":"\u56DE\u6536\u7AD9 {n} \u9879 \xB7 {size}","penzor.card.appsWarn":"\u5FEB\u6EE1\u4E86\uFF1A\u6EE1 {max} \u540E\u5E94\u7528\u4E0D\u80FD\u518D\u5B58\u65B0\u6587\u4EF6\uFF1B\u56DE\u6536\u7AD9\u91CC\u7684\u4E5F\u7B97\uFF0C\u6E05\u7A7A\u80FD\u817E\u51FA\u7A7A\u95F4","penzor.card.expSmall":"{n} \u4E2A\u6587\u4EF6","penzor.card.expSub":"\u6700\u8FD1\uFF1A{name} \xB7 {time}","penzor.card.expFoot":"\u5404\u5E94\u7528\u5BFC\u51FA\u7684\u6587\u4EF6","penzor.card.none":"\u8FD8\u6CA1\u6709\u4E1C\u897F","penzor.largest":"\u5360\u7528\u6700\u591A","penzor.col.name":"\u540D\u79F0","penzor.col.size":"\u5927\u5C0F","penzor.col.mtime":"\u4FEE\u6539\u65F6\u95F4","penzor.col.device":"\u5199\u5165\u8BBE\u5907","penzor.col.deleted":"\u5220\u9664\u4E8E","penzor.col.origin":"\u539F\u4F4D\u7F6E","penzor.col.app":"\u6765\u6E90","penzor.sort.mtime":"\u6309\u4FEE\u6539\u65F6\u95F4","penzor.sort.size":"\u6309\u5927\u5C0F","penzor.sort.name":"\u6309\u540D\u79F0","penzor.search":"\u641C\u7D22\u8FD9\u91CC\u7684\u6587\u4EF6\u540D","penzor.sync.thisDevice":"\u672C\u673A\u5728\u540C\u6B65","penzor.meta.files":"{size} \xB7 {n} \u4E2A\u6587\u4EF6","penzor.sync.last":"\u4E0A\u6B21\u5199\u5165 {time} \xB7 {device}","penzor.sync.lastNoDevice":"\u4E0A\u6B21\u5199\u5165 {time}","penzor.sync.devices":"{n} \u53F0\u8BBE\u5907\u540C\u6B65\u8FD9\u4E2A\u5E93","penzor.sync.meter":"\u667A\u5E93\u540C\u6B65\u5171\u7528 {max}\uFF0C\u5DF2\u7528 {used}","penzor.apps.meter":"\u5E94\u7528\u6587\u4EF6\u5171\u7528 {max}\uFF0C\u5DF2\u7528 {used}\uFF08\u56DE\u6536\u7AD9\u91CC\u7684\u4E5F\u7B97\uFF09","penzor.apps.by":"\u7531 {app} \u5199\u5165","penzor.ama.notCounted":"\u4E0D\u7B97\u5728\u989D\u5EA6\u91CC","penzor.ama.open":"\u5728 Amadeus \u4E2D\u6253\u5F00","penzor.trash.meta":"{n} \u9879 \xB7 {size}","penzor.trash.note":"\u4ECD\u7B97\u5728\u5E94\u7528\u6587\u4EF6\u7684 {max} \u91CC\uFF0C\u6C38\u4E45\u5220\u9664\u540E\u624D\u817E\u51FA\u7A7A\u95F4","penzor.trash.emptyBtn":"\u6E05\u7A7A\u56DE\u6536\u7AD9","penzor.act.download":"\u4E0B\u8F7D","penzor.act.rename":"\u91CD\u547D\u540D","penzor.act.move":"\u79FB\u52A8\u5230\u2026","penzor.act.trash":"\u79FB\u5230\u56DE\u6536\u7AD9","penzor.act.delete":"\u5220\u9664","penzor.act.restore":"\u6062\u590D","penzor.act.purge":"\u6C38\u4E45\u5220\u9664","penzor.act.copyName":"\u590D\u5236\u5E93\u540D","penzor.act.openSync":"\u5728\u8BBE\u7F6E\u4E2D\u6253\u5F00\u540C\u6B65","penzor.act.refresh":"\u5237\u65B0","penzor.act.up":"\u4E0A\u4E00\u7EA7","penzor.toast.trashed":"\u5DF2\u628A\u300C{name}\u300D\u79FB\u5230\u56DE\u6536\u7AD9","penzor.toast.restored":"\u5DF2\u6062\u590D\u300C{name}\u300D","penzor.toast.purged":"\u5DF2\u6C38\u4E45\u5220\u9664\u300C{name}\u300D","penzor.toast.emptied":"\u5DF2\u6E05\u7A7A\u56DE\u6536\u7AD9","penzor.toast.downloaded":"\u5DF2\u5B58\u5230\u300C\u4E0B\u8F7D\u300D\uFF1A{name}","penzor.toast.renamed":"\u5DF2\u6539\u540D\u4E3A\u300C{name}\u300D","penzor.toast.moved":"\u5DF2\u79FB\u5230\u300C{name}\u300D","penzor.toast.versionRestored":"\u5DF2\u6062\u590D\u5230\u7B2C {n} \u7248","penzor.toast.copied":"\u5DF2\u590D\u5236\u5E93\u540D","penzor.toast.failed":"\u6CA1\u6210\u529F\uFF1A{reason}","penzor.confirm.purge":"\u6C38\u4E45\u5220\u9664\u300C{name}\u300D\uFF1F\u5220\u4E86\u5C31\u627E\u4E0D\u56DE\u6765\u4E86\u3002","penzor.confirm.empty":"\u6E05\u7A7A\u56DE\u6536\u7AD9\uFF1F{n} \u9879\u4F1A\u88AB\u6C38\u4E45\u5220\u9664\uFF0C\u627E\u4E0D\u56DE\u6765\u3002","penzor.confirm.deleteExport":"\u5220\u9664\u300C{name}\u300D\uFF1F\u5BFC\u51FA\u7684\u6587\u4EF6\u6CA1\u6709\u56DE\u6536\u7AD9\uFF0C\u5220\u4E86\u5C31\u627E\u4E0D\u56DE\u6765\u4E86\u3002","penzor.cancel":"\u53D6\u6D88","penzor.side.where":"\u4F4D\u7F6E","penzor.side.mtime":"\u4FEE\u6539","penzor.side.device":"\u5199\u5165\u8BBE\u5907","penzor.side.thisDevice":"{name}\uFF08\u672C\u673A\uFF09","penzor.side.from":"\u6765\u6E90","penzor.side.versions":"\u5386\u53F2\u7248\u672C","penzor.side.versionsNone":"\u6CA1\u6709","penzor.side.versionRow":"\u7B2C {n} \u7248 \xB7 {time} \xB7 {size}","penzor.side.restoreVersion":"\u6062\u590D\u8FD9\u4E00\u7248","penzor.side.deletedAt":"\u5220\u9664\u4E8E","penzor.side.origin":"\u539F\u4F4D\u7F6E","penzor.side.inner":"\u91CC\u9762\u8FD8\u6709 {n} \u9879\uFF0C\u6062\u590D\u65F6\u4E00\u8D77\u56DE\u6765","penzor.side.inTrash":"\u5728\u56DE\u6536\u7AD9 \xB7 {size}","penzor.side.readonlySync":"\u540C\u6B65\u5E93\u91CC\u7684\u6587\u4EF6\u53EA\u5728\u8BBE\u5907\u4E0A\u5220\u6539\u3002\u5728\u8FD9\u91CC\u5220\u6389\u4E00\u4E2A\u6587\u4EF6\uFF0C\u6BCF\u53F0\u540C\u6B65 {vault} \u7684\u8BBE\u5907\u4E0B\u6B21\u540C\u6B65\u65F6\u90FD\u4F1A\u8DDF\u7740\u5220\u6389\uFF0C\u6240\u4EE5\u8FD9\u91CC\u53EA\u80FD\u770B\u548C\u4E0B\u8F7D\u3002","penzor.side.readonlyAma":"\u7B14\u8BB0\u548C\u9644\u4EF6\u5728 Amadeus \u91CC\u6539\u3002\u5728\u8FD9\u91CC\u5220\u6389\u4E00\u4E2A\u9644\u4EF6\uFF0C\u5F15\u7528\u5B83\u7684\u7B14\u8BB0\u4F1A\u7F3A\u56FE\uFF0C\u6240\u4EE5\u8FD9\u91CC\u53EA\u80FD\u770B\u548C\u4E0B\u8F7D\u3002","penzor.side.exportNote":"\u5BFC\u51FA\u7684\u6587\u4EF6\u6CA1\u6709\u56DE\u6536\u7AD9\uFF1A\u5220\u9664\u5C31\u662F\u6C38\u4E45\u5220\u9664\u3002","penzor.side.none":"\u9009\u4E00\u4E2A\u6587\u4EF6\u770B\u8BE6\u60C5","penzor.side.folder":"\u6587\u4EF6\u5939 \xB7 {n} \u9879","penzor.side.folderPlain":"\u6587\u4EF6\u5939","penzor.move.title":"\u79FB\u5230\u54EA\u91CC","penzor.move.root":"{app} \u6700\u4E0A\u5C42","penzor.move.here":"\u79FB\u5230\u8FD9\u91CC","penzor.move.noFolders":"\u8FD9\u4E00\u5C42\u6CA1\u6709\u6587\u4EF6\u5939","penzor.rename.save":"\u4FDD\u5B58","penzor.empty.title":"\u84EC\u6D32\u4E91\u91CC\u8FD8\u6CA1\u6709\u4E1C\u897F","penzor.empty.lead":"\u8FD9\u4E9B\u4E1C\u897F\u5B58\u8FDB\u4E91\u7AEF\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\uFF1A","penzor.empty.sync":"\u5728\u300C\u8BBE\u7F6E \u203A \u540C\u6B65\u300D\u91CC\u628A\u8FDC\u7A0B\u670D\u52A1\u9009\u6210\u300C\u84EC\u6D32\u4E91\u300D\uFF0C\u672C\u5730\u667A\u5E93\u5C31\u540C\u6B65\u5230\u8FD9\u91CC","penzor.empty.ama":"Amadeus \u5207\u5230 Cloud \u4FA7\u5199\u7684\u7B14\u8BB0","penzor.empty.apps":"\u5404\u5E94\u7528\u5B58\u5230\u4E91\u7AEF\u6216\u5BFC\u51FA\u7684\u6587\u4EF6","penzor.empty.openSync":"\u6253\u5F00\u540C\u6B65\u8BBE\u7F6E","penzor.out.title":"\u767B\u5F55\u540E\u67E5\u770B\u4F60\u7684\u84EC\u6D32\u4E91","penzor.out.lead":"\u84EC\u6D32\u4E91\u653E\u7740\u4F60\u540C\u6B65\u5230 Forsion \u4E91\u7AEF\u7684\u5E93\u3001Amadeus Cloud \u7684\u7B14\u8BB0\uFF0C\u548C\u5404\u5E94\u7528\u5B58\u5728\u4E91\u7AEF\u7684\u6587\u4EF6\u3002","penzor.out.signIn":"\u767B\u5F55 Forsion \u8D26\u53F7","penzor.loading":"\u6B63\u5728\u8BFB\u53D6\u2026","penzor.err":"\u6CA1\u8BFB\u5230\uFF1A{reason}","penzor.folderEmpty":"\u8FD9\u91CC\u6CA1\u6709\u6587\u4EF6","penzor.noMatch":"\u6CA1\u6709\u540D\u5B57\u91CC\u5E26\u300C{q}\u300D\u7684\u6587\u4EF6","penzor.cmd.open":"\u6253\u5F00\u84EC\u6D32\u4E91","penzor.unreachable":"\u8FDE\u4E0D\u4E0A Forsion \u4E91\u7AEF\uFF0C\u7A0D\u540E\u518D\u8BD5","penzor.toast.emptyPartial":"\u56DE\u6536\u7AD9\u91CC\u8FD8\u6709 {n} \u9879\u6CA1\u5220\u6389","penzor.sort.deleted":"\u6309\u5220\u9664\u65F6\u95F4","penzor.side.versionsN":"{n} \u4E2A","penzor.drive":"\u6211\u7684\u4E91\u76D8","penzor.drive.meta":"\u7B97\u5728\u5E94\u7528\u6587\u4EF6\u7684 {max} \u91CC","penzor.drive.empty":"\u8FD9\u91CC\u8FD8\u7A7A\u7740\u3002\u628A\u6587\u4EF6\u62D6\u8FDB\u6765\uFF0C\u6216\u8005\u70B9\u300C\u4E0A\u4F20\u300D\u3002","penzor.act.upload":"\u4E0A\u4F20","penzor.act.uploadMore":"\u66F4\u591A\u4E0A\u4F20\u65B9\u5F0F","penzor.act.uploadFiles":"\u4E0A\u4F20\u6587\u4EF6\u2026","penzor.act.uploadFolder":"\u4E0A\u4F20\u6587\u4EF6\u5939\u2026","penzor.act.uploadHere":"\u4E0A\u4F20\u5230\u8FD9\u91CC\u2026","penzor.act.newFolder":"\u65B0\u5EFA\u6587\u4EF6\u5939","penzor.act.clearSel":"\u53D6\u6D88\u9009\u62E9","penzor.newFolder.default":"\u65B0\u5EFA\u6587\u4EF6\u5939","penzor.sel.bar":"\u5DF2\u9009 {n} \u9879 \xB7 {size}","penzor.sel.title":"\u5DF2\u9009 {n} \u9879","penzor.sel.sub":"{size} \xB7 {files} \u4E2A\u6587\u4EF6","penzor.sel.subDirs":"{size} \xB7 {files} \u4E2A\u6587\u4EF6\u3001{dirs} \u4E2A\u6587\u4EF6\u5939","penzor.sel.download":"\u4E0B\u8F7D {n} \u9879","penzor.sel.saveTo":"\u4E0B\u8F7D\u5230","penzor.sel.saveToValue":"\u4E0B\u8F7D / {folder}","penzor.sel.noDirs":"\u6587\u4EF6\u5939\u8FD9\u4E00\u7248\u8FD8\u4E0D\u80FD\u4E0B\u8F7D\uFF0C\u53EA\u4E0B\u8F7D\u9009\u4E2D\u7684\u6587\u4EF6\u3002","penzor.download.folder":"\u84EC\u6D32\u4E91 {date}","penzor.drop.to":"\u677E\u624B\u4E0A\u4F20\u5230\u300C{place}\u300D","penzor.tx.busy":"\u6B63\u5728\u4F20\u8F93 {n} \u9879","penzor.tx.allDone":"\u5168\u90E8\u4F20\u5B8C","penzor.tx.failedN":"{n} \u9879\u6CA1\u4F20\u5B8C","penzor.tx.counts":"\u4E0A\u4F20 {up} \xB7 \u4E0B\u8F7D {down}","penzor.tx.eta":"\u5269\u7EA6 {eta}","penzor.tx.doneN":"{n} \u9879\u5DF2\u4F20\u5B8C","penzor.tx.restDone":"\u5176\u4F59 {n} \u9879\u5DF2\u4F20\u5B8C","penzor.tx.pill":"{counts} \xB7 {pct}%","penzor.tx.queued":"\u6392\u961F\u4E2D","penzor.tx.paused":"\u5DF2\u6682\u505C \xB7 \u7EE7\u7EED\u4F1A\u4ECE\u5934\u4F20","penzor.tx.uploaded":"\u5DF2\u4E0A\u4F20 \xB7 {time}","penzor.tx.downloaded":"\u5DF2\u4E0B\u8F7D \xB7 {time}","penzor.tx.canceled":"\u5DF2\u53D6\u6D88","penzor.tx.left":"\u5269 {eta}","penzor.tx.sec":"{n} \u79D2","penzor.tx.min":"{n} \u5206\u949F","penzor.tx.pause":"\u6682\u505C","penzor.tx.resume":"\u7EE7\u7EED","penzor.tx.cancel":"\u53D6\u6D88","penzor.tx.retry":"\u91CD\u8BD5","penzor.tx.remove":"\u79FB\u9664","penzor.tx.locate":"\u5B9A\u4F4D","penzor.tx.reveal":"\u5728\u6587\u4EF6\u5939\u4E2D\u663E\u793A","penzor.tx.pauseAll":"\u5168\u90E8\u6682\u505C","penzor.tx.resumeAll":"\u5168\u90E8\u7EE7\u7EED","penzor.tx.retryAll":"\u5168\u90E8\u91CD\u8BD5","penzor.tx.clearDone":"\u6E05\u9664\u5DF2\u5B8C\u6210","penzor.tx.clear":"\u6E05\u9664","penzor.tx.collapse":"\u6536\u8D77","penzor.tx.expand":"\u5C55\u5F00\u4F20\u8F93\u5217\u8868","penzor.tx.quota":"\u7A7A\u95F4\u4E0D\u591F\uFF0C\u8FD8\u5DEE {size}","penzor.tx.quotaSub":"\u8FD9\u4E00\u6279\u4E00\u4E2A\u90FD\u6CA1\u5F00\u59CB\u4F20","penzor.tx.freeSpace":"\u53BB\u56DE\u6536\u7AD9\u817E\u5730\u65B9","penzor.err.too_large":"\u5355\u4E2A\u6587\u4EF6\u8D85\u8FC7 50 MB\uFF08\u8FD9\u4E2A {size}\uFF09\uFF0C\u8FD9\u4E00\u7248\u4F20\u4E0D\u4E86","penzor.err.quota":"\u4E91\u7AEF\u7A7A\u95F4\u4E0D\u591F","penzor.err.network":"\u7F51\u7EDC\u65AD\u4E86\uFF0C\u4F20\u5230 {pct}% \u505C\u4E0B","penzor.err.account_changed":"\u6362\u4E86\u8D26\u53F7\uFF0C\u8FD9\u4E00\u9879\u6CA1\u6709\u63A5\u7740\u4F20","penzor.err.not_signed_in":"\u6CA1\u767B\u5F55","penzor.err.gone":"\u672C\u673A\u4E0A\u627E\u4E0D\u5230\u8FD9\u4E2A\u6587\u4EF6\u4E86","penzor.err.changed":"\u4F20\u7684\u65F6\u5019\u6587\u4EF6\u6539\u52A8\u4E86\uFF0C\u91CD\u8BD5\u4E00\u6B21","penzor.err.storage_unavailable":"\u4E91\u7AEF\u5B58\u50A8\u6682\u65F6\u4E0D\u53EF\u7528","penzor.err.other":"\u6CA1\u4F20\u5B8C\uFF08{code}\uFF09","penzor.err.too_many":"\u4E00\u6B21\u6700\u591A {n} \u4E2A\u6587\u4EF6\uFF0C\u5206\u51E0\u6B21\u62D6\u8FDB\u6765","penzor.toast.upDoneOne":"\u5DF2\u4E0A\u4F20\u300C{name}\u300D","penzor.toast.upDoneMany":"\u5DF2\u4E0A\u4F20 {n} \u4E2A\u6587\u4EF6","penzor.toast.downDoneMany":"\u5DF2\u4E0B\u8F7D {n} \u4E2A\u6587\u4EF6\u5230\u300C\u4E0B\u8F7D\u300D","penzor.toast.txFailed":"{n} \u9879\u6CA1\u4F20\u5B8C\uFF0C\u56DE\u84EC\u6D32\u4E91\u770B\u770B","penzor.toast.folderExists":"\u5DF2\u7ECF\u6709\u53EB\u300C{name}\u300D\u7684\u6587\u4EF6\u5939\u4E86","penzor.toast.trashedN":"\u5DF2\u628A {n} \u9879\u79FB\u5230\u56DE\u6536\u7AD9","penzor.toast.movedN":"\u5DF2\u628A {n} \u9879\u79FB\u5230\u300C{name}\u300D","penzor.toast.batchPartial":"\u6709 {n} \u9879\u6CA1\u6210\u529F","penzor.sync.title":"\u540C\u6B65","penzor.sync.onN":"{n} \u9879\u5DF2\u5F00","penzor.sync.allOff":"\u90FD\u6CA1\u5F00","penzor.sync.waiting":"\u7B49\u4F60\u51B3\u5B9A","penzor.sync.badgeWaiting":"{n} \u9879\u5DF2\u5F00 \xB7 1 \u9879\u7B49\u4F60\u51B3\u5B9A","penzor.sync.running":"\u540C\u6B65\u4E2D {pct}%","penzor.sync.runningPlain":"\u540C\u6B65\u4E2D","penzor.sync.metaDevice":"\u8FD9\u53F0 {name}","penzor.sync.metaLast":"\u4E0A\u6B21\u540C\u6B65 {time}","penzor.sync.metaNever":"\u8FD8\u6CA1\u540C\u6B65\u8FC7","penzor.sync.every":"\u6BCF {n} \u5206\u949F","penzor.sync.everyHours":"\u6BCF {n} \u5C0F\u65F6","penzor.sync.manual":"\u624B\u52A8","penzor.sync.onStart":"\u5F00\u673A\u65F6\u4E00\u6B21","penzor.sync.minAgo":"{n} \u5206\u949F\u524D","penzor.sync.hoursAgo":"{n} \u5C0F\u65F6\u524D","penzor.sync.notesNamed":"\u667A\u5E93\u300C{name}\u300D","penzor.sync.notesPlain":"\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93","penzor.sync.notesDesc":"\u6574\u4E2A\u672C\u673A\u667A\u5E93\uFF0C\u548C\u4F60\u7684\u5176\u4ED6\u7535\u8111\u4FDD\u6301\u4E00\u81F4","penzor.sync.agents":"Agents \u4E0E\u8BB0\u5FC6","penzor.sync.agentsDesc":"Agents \u7684\u8BB0\u5FC6\u3001\u65E5\u5FD7\u3001\u6280\u80FD\u548C\u534F\u4F5C\u8BF4\u660E","penzor.sync.agentsN":"{n} \u4E2A Agent","penzor.sync.plugins":"\u63D2\u4EF6\u6570\u636E","penzor.sync.pluginsDesc":"\u63D2\u4EF6\u81EA\u5DF1\u5B58\u7684\u8BBE\u7F6E\u548C\u6570\u636E","penzor.sync.pluginsN":"{n} \u4E2A\u63D2\u4EF6","penzor.sync.off":"\u6CA1\u5F00","penzor.sync.done":"\u5DF2\u540C\u6B65","penzor.sync.doneSize":"\u5DF2\u540C\u6B65 \xB7 {size}","penzor.sync.firstPending":"\u7B49\u7B2C\u4E00\u6B21\u540C\u6B65","penzor.sync.failed":"\u4E0A\u6B21\u6CA1\u540C\u6B65\u6210\u529F","penzor.sync.overQuota":"\u8D85\u51FA\u989D\u5EA6\uFF0C\u6709\u7684\u6CA1\u4F20","penzor.sync.to":"\u540C\u6B65\u5230 {name}","penzor.sync.toFolder":"\u540C\u6B65\u5230\u672C\u673A\u6587\u4EF6\u5939","penzor.sync.decideAbove":"\u5728\u4E0A\u9762\u90A3\u5F20\u5361\u91CC\u9009","penzor.sync.kvSchedule":"\u540C\u6B65\u8BA1\u5212","penzor.sync.kvDirection":"\u65B9\u5411","penzor.sync.kvSkipped":"\u6CA1\u4F20\u7684","penzor.sync.kvWhere":"\u4E91\u7AEF\u4F4D\u7F6E","penzor.sync.change":"\u6539","penzor.sync.open":"\u6253\u5F00","penzor.sync.dir.both":"\u53CC\u5411","penzor.sync.dir.push":"\u4EC5\u4E0A\u4F20","penzor.sync.dir.pull":"\u4EC5\u4E0B\u8F7D","penzor.sync.skippedN":"{n} \u4E2A\u8D85\u8FC7 {size} \u7684\u6587\u4EF6","penzor.sync.where":"{ledger} \u203A {vault}","penzor.sync.whereUsed":"{ledger} \u203A {vault} \xB7 {used} / {max}","penzor.sync.devicesTitle":"\u5728\u540C\u6B65\u7684\u8BBE\u5907","penzor.sync.thisOne":"\u8FD9\u53F0","penzor.sync.lastWrite":"\u4E0A\u6B21\u5199\u5165 {time}","penzor.sync.noDevices":"\u8FD8\u6CA1\u6709\u8BBE\u5907\u5728\u540C\u6B65","penzor.sync.phoneTitle":"\u624B\u673A\u548C\u7F51\u9875\u770B\u5230\u7684\u90A3\u4E00\u4EFD","penzor.sync.phoneTip":"\u624B\u673A\u548C\u7F51\u9875\u76F4\u63A5\u8BFB\u300C\u4E91\u7AEF\u667A\u5E93\u300D\uFF08Amadeus \u7684\u4E91\u7AEF\u4FA7\uFF0C{size}\uFF09\uFF0C\u5B83\u4E00\u76F4\u5728\u540C\u6B65\uFF0C\u548C\u4E0A\u9762\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93\u662F\u4E24\u4EFD\u3002\u60F3\u5728\u624B\u673A\u4E0A\u770B\u8FD9\u53F0\u7684\u67D0\u4E2A\u6587\u4EF6\u5939\uFF1A\u5728\u7B14\u8BB0\u91CC\u53F3\u952E\u90A3\u4E2A\u6587\u4EF6\u5939\uFF0C\u628A\u5B83\u540C\u6B65\u5230\u4E91\u7AEF\u667A\u5E93\u3002","penzor.sync.phoneTipPlain":"\u624B\u673A\u548C\u7F51\u9875\u76F4\u63A5\u8BFB\u300C\u4E91\u7AEF\u667A\u5E93\u300D\uFF08Amadeus \u7684\u4E91\u7AEF\u4FA7\uFF09\uFF0C\u5B83\u4E00\u76F4\u5728\u540C\u6B65\uFF0C\u548C\u4E0A\u9762\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93\u662F\u4E24\u4EFD\u3002\u60F3\u5728\u624B\u673A\u4E0A\u770B\u8FD9\u53F0\u7684\u67D0\u4E2A\u6587\u4EF6\u5939\uFF1A\u5728\u7B14\u8BB0\u91CC\u53F3\u952E\u90A3\u4E2A\u6587\u4EF6\u5939\uFF0C\u628A\u5B83\u540C\u6B65\u5230\u4E91\u7AEF\u667A\u5E93\u3002","penzor.sync.foot":"\u540C\u6B65\u8BA1\u5212\u3001\u65B9\u5411\u548C\u5176\u4ED6\u5B58\u50A8\uFF08Dropbox / S3 / WebDAV\uFF09\u5728","penzor.sync.footLink":"\u8BBE\u7F6E \u203A \u540C\u6B65","penzor.sync.askTitle":"\u4E91\u7AEF\u5DF2\u7ECF\u6709\u4E00\u4EFD\u667A\u5E93","penzor.sync.askCloud":"\u4E91\u7AEF\u90A3\u4EFD\u6765\u81EA {device}\uFF1A{files} \u4E2A\u6587\u4EF6 \xB7 {size}\u3002","penzor.sync.askCloudNoDevice":"\u4E91\u7AEF\u90A3\u4EFD\uFF1A{files} \u4E2A\u6587\u4EF6 \xB7 {size}\u3002","penzor.sync.askLocal":"\u8FD9\u53F0\u6709 {local} \u4E2A\u6587\u4EF6\u4E91\u7AEF\u6CA1\u6709\uFF0C{conflicts} \u4E2A\u4E24\u8FB9\u5185\u5BB9\u4E0D\u540C\u3002","penzor.sync.askMerge":"\u5408\u5E76\u4E24\u8FB9","penzor.sync.askCloudBtn":"\u7528\u4E91\u7AEF\u90A3\u4EFD","penzor.sync.askSkip":"\u8FD9\u53F0\u5148\u4E0D\u540C\u6B65\u667A\u5E93","penzor.sync.askExplain":"\u5408\u5E76\uFF1A\u4E24\u8FB9\u90FD\u7559\u7740\uFF0C\u5185\u5BB9\u4E0D\u540C\u7684\u53E6\u5B58\u4E00\u4EFD\u300C\uFF08\u51B2\u7A81\uFF09\u300D\u3002\u7528\u4E91\u7AEF\u90A3\u4EFD\uFF1A\u8FD9\u53F0\u548C\u4E91\u7AEF\u4E0D\u4E00\u6837\u7684\u6587\u4EF6\u5148\u632A\u8FDB\u65C1\u8FB9\u7684\u300C{backup}\u300D\u6587\u4EF6\u5939\uFF0C\u518D\u4E0B\u8F7D\u4E91\u7AEF\u90A3\u4EFD\u3002","penzor.sync.askConfirm":"\u8FD9\u53F0\u548C\u4E91\u7AEF\u4E0D\u4E00\u6837\u7684\u6587\u4EF6\u4F1A\u5148\u632A\u8FDB\u300C{backup}\u300D\uFF0C\u518D\u6362\u6210\u4E91\u7AEF\u90A3\u4EFD\u3002","penzor.sync.askConfirmGo":"\u632A\u8D70\u5E76\u7528\u4E91\u7AEF\u90A3\u4EFD","penzor.sync.backupName":"{name} \u540C\u6B65\u524D\u5907\u4EFD {date}","penzor.sync.quotaTitle":"\u667A\u5E93 {size}\uFF0C\u8D85\u8FC7\u4E86\u300C{ledger}\u300D\u7684 {max} \u4E0A\u9650","penzor.sync.quotaTitlePlain":"\u667A\u5E93\u8D85\u8FC7\u4E86\u300C{ledger}\u300D\u7684\u4E0A\u9650","penzor.sync.quotaBody":"\u653E\u4E0D\u4E0B\u7684\u6587\u4EF6\u7559\u5728\u8FD9\u53F0\u7535\u8111\u4E0A\uFF0C\u6CA1\u6709\u5220\uFF0C\u4E5F\u6CA1\u6709\u4F20\uFF1B\u5176\u4F59\u51E0\u9879\u7167\u5E38\u540C\u6B65\u3002","penzor.sync.quotaLarge":"\u8D85\u8FC7 {size} \u7684\u5355\u4E2A\u6587\u4EF6\u4E00\u76F4\u4E0D\u4F20\uFF08{n} \u4E2A\uFF09\u3002","penzor.sync.quotaSee":"\u770B\u770B\u6CA1\u4F20\u7684\u6587\u4EF6"},$u={"sub.identity":"Plugin ID","sub.identityHint":"A unique ID is assigned after submission. Names may repeat; updates keep the same ID.","sub.description":"Detailed description","sub.tags":"Tags","sub.tagsHint":"Comma separated, up to 8","sub.minAppVersion":"Minimum Forsion version","sub.maxAppVersion":"Maximum version (exclusive)","sub.optional":"Optional","sub.platforms":"Supported platforms","sub.requirementsHint":"Supported: desktop, macos, windows, linux, android, ios, web. Leave blank if unspecified. ZIP requirements are read from the manifest; supplied values must match it.","sub.err.market_requirements_invalid":"Invalid version requirements or platforms.","sub.err.market_requirements_mismatch":"Supplied requirements differ from the ZIP manifest.","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.membershipUsage":"Membership & usage","page.membershipQuota":"Membership & quota","page.pointsInvite":"Points & invites","page.helpDiagnostics":"Help & diagnostics","account.details.title":"Sign-in & details","account.details.desc":"Edit your photo, nickname and bio under Profile.","account.details.username":"Username","diag.unavailable":"This host does not support diagnostic data. Update Forsion and try again.","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","guide.title":"Guide","guide.readOnly":"Read-only","guide.more":"More","guide.unlockAll":"Unlock all","guide.relock":"Unlock level by level","guide.reminders":"Guide reminders","guide.spotlight":"On-screen hints","guide.spotStep":"Step {n} of {total}","guide.figure":"Diagram","guide.openAchievements":"Open achievements","guide.tasks":"Tasks in this chapter","guide.go":"Take me there","guide.desktopOnly":"Do it on your computer","guide.taskDone":"Done","guide.askTangu":"Ask Tangu","guide.progress":"Progress","guide.justUnlocked":"Just unlocked","guide.lockedHint":"Locked","guide.whatsNew":"What's new in {version}","guide.level.lv1":"Lv.1 Getting started","guide.level.lv2":"Lv.2 Finding your way","guide.level.lv3":"Lv.3 Making it yours","guide.level.lv4":"Lv.4 Going further","guide.locked.title":"This chapter is still locked","guide.locked.body":"Finish the tasks in {level} to read the rest.","guide.locked.left":"Still to do:","guide.locked.hint":"Been around a while? Unlock everything from the \xB7\xB7\xB7 menu.","guide.levelProgress":"This level: {done}/{total}","guide.next":"Next level","guide.allDone":"All done","guide.allDoneBody":"You've done every task in the guide. Come back any time.","guide.review":"Look back","guide.ask.hint":'Questions about "{chapter}"? Ask Tangu opens a new chat with this chapter attached.',"guide.ask.placeholder":"What would you like to know?","guide.ask.send":"Start a chat","guide.ask.prompt":`I'm reading the "{chapter}" chapter of the Forsion guide; it's attached below. {question}`,"guide.ask.unavailable":"Chat isn't available here","guide.ask.chatTitle":"Guide Q&A","guide.companion.back":"Back to the guide","guide.companion.close":"Close","guide.toast.taskDone":"Done: {task}","guide.letter.levelTitle":"{level} unlocked: try these next","guide.letter.levelBody":'You finished the previous level, so these chapters are open now. Every task has a "Take me there" button.',"guide.letter.versionTitle":"{n} new things to try in {version}","guide.letter.versionBody":"New in this version, ready to try:","guide.letter.open":"Open the guide","guide.status.done":"Done","guide.cmd.open":"Open the guide","penzor.title":"Penzor Cloud","penzor.kicker":"Penzor Cloud","penzor.overview":"Overview","penzor.places":"Places","penzor.details":"Details","penzor.ledger.sync":"Vault sync","penzor.ledger.ama":"Amadeus Cloud","penzor.ledger.apps":"App files","penzor.ledger.exports":"Exports","penzor.trash":"Trash","penzor.items":"{n} items","penzor.total.sub":"Stored in Forsion Cloud \xB7 updated {time}","penzor.justNow":"just now","penzor.ofMax":"/ {max}","penzor.card.syncSub":"{n} vaults \xB7 last write {time}","penzor.card.syncSubNone":"{n} vaults","penzor.card.syncFoot":"Files over {size} are not uploaded","penzor.card.syncWarn":"Almost full: after {max}, new files stop uploading; files already in the cloud keep syncing","penzor.card.amaSmall":"Not counted in your quota","penzor.card.amaSub":"{n} cloud vaults","penzor.card.amaFoot":"Notes and attachments on the Cloud side of Amadeus","penzor.card.appsFoot":"Trash: {n} items \xB7 {size}","penzor.card.appsWarn":"Almost full: after {max}, apps can't save new files. Trash counts too, so emptying it frees space","penzor.card.expSmall":"{n} files","penzor.card.expSub":"Latest: {name} \xB7 {time}","penzor.card.expFoot":"Files exported from apps","penzor.card.none":"Nothing yet","penzor.largest":"Largest files","penzor.col.name":"Name","penzor.col.size":"Size","penzor.col.mtime":"Modified","penzor.col.device":"Written by","penzor.col.deleted":"Deleted","penzor.col.origin":"Original location","penzor.col.app":"From","penzor.sort.mtime":"By modified","penzor.sort.size":"By size","penzor.sort.name":"By name","penzor.search":"Search file names here","penzor.sync.thisDevice":"Syncing on this device","penzor.meta.files":"{size} \xB7 {n} files","penzor.sync.last":"Last write {time} \xB7 {device}","penzor.sync.lastNoDevice":"Last write {time}","penzor.sync.devices":"{n} devices sync this vault","penzor.sync.meter":"Vault sync shares {max}; {used} used","penzor.apps.meter":"App files share {max}; {used} used (trash included)","penzor.apps.by":"Written by {app}","penzor.ama.notCounted":"Not counted in your quota","penzor.ama.open":"Open in Amadeus","penzor.trash.meta":"{n} items \xB7 {size}","penzor.trash.note":"Still counts toward the {max} for app files; space frees up once deleted permanently","penzor.trash.emptyBtn":"Empty trash","penzor.act.download":"Download","penzor.act.rename":"Rename","penzor.act.move":"Move to\u2026","penzor.act.trash":"Move to trash","penzor.act.delete":"Delete","penzor.act.restore":"Restore","penzor.act.purge":"Delete permanently","penzor.act.copyName":"Copy vault name","penzor.act.openSync":"Open sync settings","penzor.act.refresh":"Refresh","penzor.act.up":"Up one level","penzor.toast.trashed":"Moved \u201C{name}\u201D to trash","penzor.toast.restored":"Restored \u201C{name}\u201D","penzor.toast.purged":"Deleted \u201C{name}\u201D permanently","penzor.toast.emptied":"Trash emptied","penzor.toast.downloaded":"Saved to Downloads: {name}","penzor.toast.renamed":"Renamed to \u201C{name}\u201D","penzor.toast.moved":"Moved to \u201C{name}\u201D","penzor.toast.versionRestored":"Restored version {n}","penzor.toast.copied":"Vault name copied","penzor.toast.failed":"That didn't work: {reason}","penzor.confirm.purge":"Delete \u201C{name}\u201D permanently? This can't be undone.","penzor.confirm.empty":"Empty the trash? {n} items will be deleted permanently.","penzor.confirm.deleteExport":"Delete \u201C{name}\u201D? Exports have no trash, so this can't be undone.","penzor.cancel":"Cancel","penzor.side.where":"Location","penzor.side.mtime":"Modified","penzor.side.device":"Written by","penzor.side.thisDevice":"{name} (this device)","penzor.side.from":"From","penzor.side.versions":"Versions","penzor.side.versionsNone":"None","penzor.side.versionRow":"Version {n} \xB7 {time} \xB7 {size}","penzor.side.restoreVersion":"Restore this version","penzor.side.deletedAt":"Deleted","penzor.side.origin":"Original location","penzor.side.inner":"{n} more items inside come back with it","penzor.side.inTrash":"In trash \xB7 {size}","penzor.side.readonlySync":"Files in a synced vault are changed on your devices. Deleting one here would delete it on every device that syncs {vault}, so here you can only view and download.","penzor.side.readonlyAma":"Notes and attachments are changed in Amadeus. Deleting an attachment here would leave the notes that use it with missing images, so here you can only view and download.","penzor.side.exportNote":"Exports have no trash: deleting is permanent.","penzor.side.none":"Select a file to see its details","penzor.side.folder":"Folder \xB7 {n} items","penzor.side.folderPlain":"Folder","penzor.move.title":"Move to","penzor.move.root":"Top of {app}","penzor.move.here":"Move here","penzor.move.noFolders":"No folders at this level","penzor.rename.save":"Save","penzor.empty.title":"Nothing in Penzor Cloud yet","penzor.empty.lead":"These show up here once they're in the cloud:","penzor.empty.sync":"Pick Penzor Cloud as the remote service in Settings \u203A Sync, and your local vault syncs here","penzor.empty.ama":"Notes you write on the Cloud side of Amadeus","penzor.empty.apps":"Files apps save to the cloud or export","penzor.empty.openSync":"Open sync settings","penzor.out.title":"Sign in to see your Penzor Cloud","penzor.out.lead":"Penzor Cloud holds the vaults you sync to Forsion Cloud, your Amadeus Cloud notes and the files apps keep in the cloud.","penzor.out.signIn":"Sign in to Forsion","penzor.loading":"Loading\u2026","penzor.err":"Couldn't load: {reason}","penzor.folderEmpty":"No files here","penzor.noMatch":"No file names contain \u201C{q}\u201D","penzor.cmd.open":"Open Penzor Cloud","penzor.unreachable":"Can\u2019t reach Forsion Cloud. Try again later","penzor.toast.emptyPartial":"{n} items in the trash couldn\u2019t be deleted","penzor.sort.deleted":"By deleted","penzor.side.versionsN":"{n}","penzor.drive":"My drive","penzor.drive.meta":"Counts toward the {max} for app files","penzor.drive.empty":"Nothing here yet. Drag files in, or click Upload.","penzor.act.upload":"Upload","penzor.act.uploadMore":"More upload options","penzor.act.uploadFiles":"Upload files\u2026","penzor.act.uploadFolder":"Upload folder\u2026","penzor.act.uploadHere":"Upload here\u2026","penzor.act.newFolder":"New folder","penzor.act.clearSel":"Clear selection","penzor.newFolder.default":"New folder","penzor.sel.bar":"{n} selected \xB7 {size}","penzor.sel.title":"{n} selected","penzor.sel.sub":"{size} \xB7 {files} files","penzor.sel.subDirs":"{size} \xB7 {files} files, {dirs} folders","penzor.sel.download":"Download {n}","penzor.sel.saveTo":"Saves to","penzor.sel.saveToValue":"Downloads / {folder}","penzor.sel.noDirs":"Folders can\u2019t be downloaded yet; only the selected files will be.","penzor.download.folder":"Penzor Cloud {date}","penzor.drop.to":"Drop to upload to \u201C{place}\u201D","penzor.tx.busy":"Transferring {n}","penzor.tx.allDone":"All done","penzor.tx.failedN":"{n} didn\u2019t finish","penzor.tx.counts":"{up} up \xB7 {down} down","penzor.tx.eta":"about {eta} left","penzor.tx.doneN":"{n} finished","penzor.tx.restDone":"The other {n} finished","penzor.tx.pill":"{counts} \xB7 {pct}%","penzor.tx.queued":"Queued","penzor.tx.paused":"Paused \xB7 resumes from the start","penzor.tx.uploaded":"Uploaded \xB7 {time}","penzor.tx.downloaded":"Downloaded \xB7 {time}","penzor.tx.canceled":"Canceled","penzor.tx.left":"{eta} left","penzor.tx.sec":"{n}s","penzor.tx.min":"{n} min","penzor.tx.pause":"Pause","penzor.tx.resume":"Resume","penzor.tx.cancel":"Cancel","penzor.tx.retry":"Retry","penzor.tx.remove":"Remove","penzor.tx.locate":"Show","penzor.tx.reveal":"Show in folder","penzor.tx.pauseAll":"Pause all","penzor.tx.resumeAll":"Resume all","penzor.tx.retryAll":"Retry all","penzor.tx.clearDone":"Clear finished","penzor.tx.clear":"Clear","penzor.tx.collapse":"Collapse","penzor.tx.expand":"Show transfers","penzor.tx.quota":"Not enough space: {size} short","penzor.tx.quotaSub":"Nothing in this batch was started","penzor.tx.freeSpace":"Free up space in Trash","penzor.err.too_large":"Over the 50 MB per-file limit ({size}); can\u2019t upload it yet","penzor.err.quota":"Not enough cloud space","penzor.err.network":"Connection lost at {pct}%","penzor.err.account_changed":"You switched accounts, so this one stopped","penzor.err.not_signed_in":"Not signed in","penzor.err.gone":"The file is no longer on this device","penzor.err.changed":"The file changed while uploading. Try again","penzor.err.storage_unavailable":"Cloud storage is unavailable right now","penzor.err.other":"Didn\u2019t finish ({code})","penzor.err.too_many":"Up to {n} files at a time. Add them in smaller batches","penzor.toast.upDoneOne":"Uploaded \u201C{name}\u201D","penzor.toast.upDoneMany":"Uploaded {n} files","penzor.toast.downDoneMany":"Downloaded {n} files to Downloads","penzor.toast.txFailed":"{n} transfers didn\u2019t finish. Open Penzor Cloud to check","penzor.toast.folderExists":"There\u2019s already a folder called \u201C{name}\u201D","penzor.toast.trashedN":"Moved {n} items to the trash","penzor.toast.movedN":"Moved {n} items to \u201C{name}\u201D","penzor.toast.batchPartial":"{n} items didn\u2019t go through","penzor.sync.title":"Sync","penzor.sync.onN":"{n} on","penzor.sync.allOff":"All off","penzor.sync.waiting":"Waiting for you","penzor.sync.badgeWaiting":"{n} on \xB7 1 waiting for you","penzor.sync.running":"Syncing {pct}%","penzor.sync.runningPlain":"Syncing","penzor.sync.metaDevice":"This computer: {name}","penzor.sync.metaLast":"Last synced {time}","penzor.sync.metaNever":"Not synced yet","penzor.sync.every":"Every {n} min","penzor.sync.everyHours":"Every {n} h","penzor.sync.manual":"Manual","penzor.sync.onStart":"once at startup","penzor.sync.minAgo":"{n} min ago","penzor.sync.hoursAgo":"{n} h ago","penzor.sync.notesNamed":"Notes vault \u201C{name}\u201D","penzor.sync.notesPlain":"This computer\u2019s notes vault","penzor.sync.notesDesc":"The whole local vault, kept the same on your other computers","penzor.sync.agents":"Agents & memory","penzor.sync.agentsDesc":"Your agents\u2019 memory, logs, skills and working notes","penzor.sync.agentsN":"Agents: {n}","penzor.sync.plugins":"Plugin data","penzor.sync.pluginsDesc":"Settings and data your plugins keep","penzor.sync.pluginsN":"Plugins: {n}","penzor.sync.off":"Off","penzor.sync.done":"Synced","penzor.sync.doneSize":"Synced \xB7 {size}","penzor.sync.firstPending":"Waiting for the first sync","penzor.sync.failed":"Last sync failed","penzor.sync.overQuota":"Over the limit, some files not uploaded","penzor.sync.to":"Syncing to {name}","penzor.sync.toFolder":"Syncing to a local folder","penzor.sync.decideAbove":"Choose in the card above","penzor.sync.kvSchedule":"Schedule","penzor.sync.kvDirection":"Direction","penzor.sync.kvSkipped":"Not uploaded","penzor.sync.kvWhere":"In the cloud","penzor.sync.change":"Change","penzor.sync.open":"Open","penzor.sync.dir.both":"Both ways","penzor.sync.dir.push":"Upload only","penzor.sync.dir.pull":"Download only","penzor.sync.skippedN":"{n} files over {size}","penzor.sync.where":"{ledger} \u203A {vault}","penzor.sync.whereUsed":"{ledger} \u203A {vault} \xB7 {used} / {max}","penzor.sync.devicesTitle":"Devices syncing","penzor.sync.thisOne":"This computer","penzor.sync.lastWrite":"Last write {time}","penzor.sync.noDevices":"No devices are syncing yet","penzor.sync.phoneTitle":"What your phone and the web see","penzor.sync.phoneTip":"Your phone and the web read the cloud vault (the cloud side of Amadeus, {size}) directly. It always syncs, and it\u2019s a separate copy from this computer\u2019s notes vault above. To see a folder from this computer on your phone, right-click it in your notes and sync it to the cloud vault.","penzor.sync.phoneTipPlain":"Your phone and the web read the cloud vault (the cloud side of Amadeus) directly. It always syncs, and it\u2019s a separate copy from this computer\u2019s notes vault above. To see a folder from this computer on your phone, right-click it in your notes and sync it to the cloud vault.","penzor.sync.foot":"Schedule, direction and other storage (Dropbox / S3 / WebDAV) are in","penzor.sync.footLink":"Settings \u203A Sync","penzor.sync.askTitle":"There\u2019s already a notes vault in the cloud","penzor.sync.askCloud":"The cloud copy is from {device}: {files} files \xB7 {size}.","penzor.sync.askCloudNoDevice":"The cloud copy: {files} files \xB7 {size}.","penzor.sync.askLocal":"This computer has {local} files the cloud copy doesn\u2019t, and {conflicts} that differ.","penzor.sync.askMerge":"Merge both","penzor.sync.askCloudBtn":"Use the cloud copy","penzor.sync.askSkip":"Don\u2019t sync notes on this computer yet","penzor.sync.askExplain":"Merge keeps both sides; files that differ are saved again as a \u201C(conflict)\u201D copy. Use the cloud copy first moves this computer\u2019s differing files into a \u201C{backup}\u201D folder next to the vault, then downloads the cloud copy.","penzor.sync.askConfirm":"This computer\u2019s differing files move to \u201C{backup}\u201D first, then the cloud copy replaces them.","penzor.sync.askConfirmGo":"Move them and use the cloud copy","penzor.sync.backupName":"{name} backup before sync {date}","penzor.sync.quotaTitle":"Your notes vault is {size}, over the {max} limit of {ledger}","penzor.sync.quotaTitlePlain":"Your notes vault is over the {ledger} limit","penzor.sync.quotaBody":"Files that don\u2019t fit stay on this computer. Nothing is deleted, they just aren\u2019t uploaded, and everything else keeps syncing.","penzor.sync.quotaLarge":"Single files over {size} are never uploaded ({n}).","penzor.sync.quotaSee":"See what\u2019s not uploaded"},$s={zh:Fu,en:$u},Qe=e=>e==="en"?"en":"zh";function Ce(e,t,n){let r=$s[e][t]??$s.zh[t]??t;return n?r.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):r}var pr=e=>(t,n)=>Ce(e,t,n),bt=(e,t)=>"raw"in e?e.raw:t(e.key,e.vars);var Bs=`
|
|
68
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ct(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:o,autolink:a}){let i=a?ct(n,!0):this.parser.parseInline(o),s=ls(e);if(s===null)return i;e=ct(s,a);let l='<a href="'+e+'"';return t&&(l+=' title="'+ct(t)+'"'),l+=">"+i+"</a>",l}image({href:e,title:t,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));let a=ls(e);if(a===null)return ct(n);e=a;let i=`<img src="${ct(e)}" alt="${ct(n)}"`;return t&&(i+=` title="${ct(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ct(e.text)}},pa=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ct=class oa{options;renderer;textRenderer;constructor(t){this.options=t||Mn,this.options.renderer=this.options.renderer||new no,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pa}static parse(t,n){return new oa(n).parse(t)}static parseInline(t,n){return new oa(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let o=0;o<t.length;o++){let a=t[o];if(this.options.extensions?.renderers?.[a.type]){let s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){n+=l||"";continue}}let i=a;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let o="";for(let a=0;a<t.length;a++){let i=t[a];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){o+=l||"";continue}}let s=i;switch(s.type){case"escape":{o+=n.text(s);break}case"html":{o+=n.html(s);break}case"link":{o+=n.link(s);break}case"image":{o+=n.image(s);break}case"checkbox":{o+=n.checkbox(s);break}case"strong":{o+=n.strong(s);break}case"em":{o+=n.em(s);break}case"codespan":{o+=n.codespan(s);break}case"br":{o+=n.br(s);break}case"del":{o+=n.del(s);break}case"text":{o+=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 o}},kr=class{options;block;constructor(e){this.options=e||Mn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?St.lex:St.lexInline}provideParser(e=this.block){return e?Ct.parse:Ct.parseInline}},fa=class{defaults=aa();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ct;Renderer=no;TextRenderer=pa;Lexer=St;Tokenizer=to;Hooks=kr;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{let a=o;for(let i of a.header)n=n.concat(this.walkTokens(i.tokens,t));for(let i of a.rows)for(let s of i)n=n.concat(this.walkTokens(s.tokens,t));break}case"list":{let a=o;n=n.concat(this.walkTokens(a.items,t));break}default:{let a=o;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(i=>{let s=a[i].flat(1/0);n=n.concat(this.walkTokens(s,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=t.renderers[a.name];i?t.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),o.extensions=t),n.renderer){let a=this.defaults.renderer||new no(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,l=n.renderer[s],c=a[s];a[s]=(...d)=>{let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f||""}}o.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new to(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,l=n.tokenizer[s],c=a[s];a[s]=(...d)=>{let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f}}o.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new kr;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,l=n.hooks[s],c=a[s];kr.passThroughHooks.has(i)?a[s]=d=>{if(this.defaults.async&&kr.passThroughHooksRespectAsync.has(i))return(async()=>{let u=await l.call(a,d);return c.call(a,u)})();let f=l.call(a,d);return c.call(a,f)}:a[s]=(...d)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(a,d);return u===!1&&(u=await c.apply(a,d)),u})();let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f}}o.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(s){let l=[];return l.push(i.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return St.lex(e,t??this.defaults)}parser(e,t){return Ct.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let o={...n},a={...this.defaults,...o},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&o.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(t):t,l=await(a.hooks?await a.hooks.provideLexer(e):e?St.lex:St.lexInline)(s,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser(e):e?Ct.parse:Ct.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let s=(a.hooks?a.hooks.provideLexer(e):e?St.lex:St.lexInline)(t,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(e):e?Ct.parse:Ct.parseInline)(s,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(s){return i(s)}}}onError(e,t){return n=>{if(n.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,e){let o="<p>An error occurred:</p><pre>"+ct(n.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(n);throw n}}},Pn=new fa;function we(e,t){return Pn.parse(e,t)}we.options=we.setOptions=function(e){return Pn.setOptions(e),we.defaults=Pn.defaults,ms(we.defaults),we};we.getDefaults=aa;we.defaults=Mn;function tf(...e){return Pn.use(...e),we.defaults=Pn.defaults,ms(we.defaults),we}we.use=tf;we.walkTokens=function(e,t){return Pn.walkTokens(e,t)};we.parseInline=Pn.parseInline;we.Parser=Ct;we.parser=Ct.parse;we.Renderer=no;we.TextRenderer=pa;we.Lexer=St;we.lexer=St.lex;we.Tokenizer=to;we.Hooks=kr;we.parse=we;var ch=we.options,dh=we.setOptions,uh=we.walkTokens,ph=we.parseInline;var fh=Ct.parse,mh=St.lex;var co,ae,Cs,nf,gn,zs,Ts,As,ma,oo,Sr,Es,va,ga,ha,Ps,io={},so=[],rf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cr=Array.isArray;function Zt(e,t){for(var n in t)e[n]=t[n];return e}function ya(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Rn(e,t,n){var o,a,i,s={};for(i in t)i=="key"?o=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?co.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ao(e,s,o,a,null)}function ao(e,t,n,o,a){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Cs,__i:-1,__u:0};return a==null&&ae.vnode!=null&&ae.vnode(i),i}function F(e){return e.children}function Tt(e,t){this.props=e,this.context=t}function In(e,t){if(t==null)return e.__?In(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?In(e):null}function of(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],a=[],i=Zt({},t);i.__v=t.__v+1,ae.vnode&&ae.vnode(i),xa(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??In(t),!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,Ds(o,i,a),t.__e=t.__=null,i.__e!=n&&Ms(i)}}function Ms(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Ms(e)}function ba(e){(!e.__d&&(e.__d=!0)&&gn.push(e)&&!lo.__r++||zs!=ae.debounceRendering)&&((zs=ae.debounceRendering)||Ts)(lo)}function lo(){try{for(var e,t=1;gn.length;)gn.length>t&&gn.sort(As),e=gn.shift(),t=gn.length,of(e)}finally{gn.length=lo.__r=0}}function Is(e,t,n,o,a,i,s,l,c,d,f){var u,p,g,m,y,_,E=o&&o.__k||so,x=t.length;for(c=af(n,t,E,c,x),u=0;u<x;u++)(g=n.__k[u])!=null&&(p=g.__i!=-1&&E[g.__i]||io,g.__i=u,_=xa(e,g,p,a,i,s,l,c,d,f),m=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&ka(p.ref,null,g),f.push(g.ref,g.__c||m,g)),y==null&&m!=null&&(y=m),4&g.__u?(c=Rs(g,c,e),p.__e&&(p.__e=null)):typeof g.type=="function"&&_!==void 0?c=_:m&&(c=m.nextSibling),g.__u&=-7);return n.__e=y,c}function af(e,t,n,o,a){var i,s,l,c,d,f=n.length,u=f,p=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=ao(null,s,null,null,null):Cr(s)?s=e.__k[i]=ao(F,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ao(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+p,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=sf(s,n,c,u))!=-1&&(u--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(a>f?p--:a<f&&p++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?p--:d==c+1?p++:(d>c?p--:p++,s.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<f;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==o&&(o=In(l)),Os(l,l));return o}function Rs(e,t,n){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,t=Rs(o[a],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=In(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Tr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Cr(e)?e.some(function(n){Tr(n,t)}):t.push(e)),t}function sf(e,t,n,o){var a,i,s,l=e.key,c=e.type,d=t[n],f=d!=null&&(2&d.__u)==0;if(d===null&&l==null||f&&l==d.key&&c==d.type)return n;if(o>(f?1:0)){for(a=n-1,i=n+1;a>=0||i<t.length;)if((d=t[s=a>=0?a--:i++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function _s(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rf.test(t)?n:n+"px"}function ro(e,t,n,o,a){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||_s(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||_s(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Es,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n[Sr]=o[Sr]:(n[Sr]=va,e.addEventListener(t,i?ha:ga,i)):e.removeEventListener(t,i?ha:ga,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ss(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[oo]==null)t[oo]=va++;else if(t[oo]<n[Sr])return;return n(ae.event?ae.event(t):t)}}}function xa(e,t,n,o,a,i,s,l,c,d){var f,u,p,g,m,y,_,E,x,k,R,B,j,w,A,P,I=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=t.__e=n.__e]),(f=ae.__b)&&f(t);e:if(typeof I=="function"){u=s.length;try{if(x=t.props,k=I.prototype&&I.prototype.render,R=(f=I.contextType)&&o[f.__c],B=f?R?R.props.value:f.__:o,n.__c?E=(p=t.__c=n.__c).__=p.__E:(k?t.__c=p=new I(x,B):(t.__c=p=new Tt(x,B),p.constructor=I,p.render=cf),R&&R.sub(p),p.state||(p.state={}),p.__n=o,g=p.__d=!0,p.__h=[],p._sb=[]),k&&p.__s==null&&(p.__s=p.state),k&&I.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Zt({},p.__s)),Zt(p.__s,I.getDerivedStateFromProps(x,p.__s))),m=p.props,y=p.state,p.__v=t,g)k&&I.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),k&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(k&&I.getDerivedStateFromProps==null&&x!==m&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(x,B),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(x,p.__s,B)===!1){t.__v!=n.__v&&(p.props=x,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(N){N&&(N.__=t)}),so.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),l=In(n);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(x,p.__s,B),k&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(m,y,_)})}if(p.context=B,p.props=x,p.__P=e,p.__e=!1,j=ae.__r,w=0,k)p.state=p.__s,p.__d=!1,j&&j(t),f=p.render(p.props,p.state,p.context),so.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,j&&j(t),f=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++w<25);p.state=p.__s,p.getChildContext!=null&&(o=Zt(Zt({},o),p.getChildContext())),k&&!g&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(m,y)),A=f!=null&&f.type===F&&f.key==null?Ns(f.props.children):f,l=Is(e,Cr(A)?A:[A],t,n,o,a,i,s,l,c,d),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),E&&(p.__E=p.__=null)}catch(N){if(s.length=u,t.__v=null,c||i!=null){if(N.then){for(t.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),t.__e=l}else if(i!=null)for(P=i.length;P--;)ya(i[P])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),N.then||Ls(t),ae.__e(N,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=lf(n.__e,t,n,o,a,i,s,c,d);return(f=ae.diffed)&&f(t),128&t.__u?void 0:l}function Ls(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ls))}function Ds(e,t,n){for(var o=0;o<n.length;o++)ka(n[o],n[++o],n[++o]);ae.__c&&ae.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){ae.__e(i,a.__v)}})}function Ns(e){return typeof e!="object"||e==null||e.__b>0?e:Cr(e)?e.map(Ns):e.constructor!==void 0?null:Zt({},e)}function lf(e,t,n,o,a,i,s,l,c){var d,f,u,p,g,m,y,_=n.props||io,E=t.props,x=t.type;if(x=="svg"?a="http://www.w3.org/2000/svg":x=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!x&&(x?g.localName==x:g.nodeType==3)){e=g,i[d]=null;break}}if(e==null){if(x==null)return document.createTextNode(E);e=document.createElementNS(a,x,E.is&&E),l&&(ae.__m&&ae.__m(t,i),l=!1),i=null}if(x==null)_===E||l&&e.data==E||(e.data=E);else{if(i=x=="textarea"&&E.defaultValue!=null?null:i&&co.call(e.childNodes),!l&&i!=null)for(_={},d=0;d<e.attributes.length;d++)_[(g=e.attributes[d]).name]=g.value;for(d in _)g=_[d],d=="dangerouslySetInnerHTML"?u=g:d=="children"||d in E||d=="value"&&"defaultValue"in E||d=="checked"&&"defaultChecked"in E||ro(e,d,null,g,a);for(d in E)g=E[d],d=="children"?p=g:d=="dangerouslySetInnerHTML"?f=g:d=="value"?m=g:d=="checked"?y=g:l&&typeof g!="function"||_[d]===g||ro(e,d,g,_[d],a);if(f)l||u&&(f.__html==u.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),Is(t.type=="template"?e.content:e,Cr(p)?p:[p],t,n,o,x=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&In(n,0),l,c),i!=null)for(d=i.length;d--;)ya(i[d]);l&&x!="textarea"||(d="value",x=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[d]||x=="progress"&&!m||x=="option"&&m!=_[d])&&ro(e,d,m,_[d],a),d="checked",y!=null&&y!=e[d]&&ro(e,d,y,_[d],a))}return e}function ka(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(a){ae.__e(a,n)}}function Os(e,t,n){var o,a;if(ae.unmount&&ae.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||ka(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){ae.__e(i,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(a=0;a<o.length;a++)o[a]&&Os(o[a],t,n||typeof e.type!="function");n||ya(e.__e),e.__c=e.__=e.__e=void 0}function cf(e,t,n){return this.constructor(e,n)}function Be(e,t,n){var o,a,i,s;t==document&&(t=document.documentElement),ae.__&&ae.__(e,t),a=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],xa(t,e=(!o&&n||t).__k=Rn(F,null,[e]),a||io,io,t.namespaceURI,!o&&n?[n]:a?null:t.firstChild?co.call(t.childNodes):null,i,!o&&n?n:a?a.__e:t.firstChild,o,s),Ds(i,e,s),e.props.children=null}function uo(e){function t(n){var o,a;return this.getChildContext||(o=new Set,(a={})[t.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&o.forEach(function(s){s.__e=!0,ba(s)})},this.sub=function(i){o.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){o&&o.delete(i),s&&s.call(i)}}),n.children}return t.__c="__cC"+Ps++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,o){return n.children(o)}).contextType=t,t}co=so.slice,ae={__e:function(e,t,n,o){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,o||{}),s=a.__d),s)return a.__E=a}catch(l){e=l}throw e}},Cs=0,nf=function(e){return e!=null&&e.constructor===void 0},Tt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Zt({},this.state),typeof e=="function"&&(e=e(Zt({},n),this.props)),e&&Zt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ba(this))},Tt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ba(this))},Tt.prototype.render=F,gn=[],Ts=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,As=function(e,t){return e.__v.__b-t.__v.__b},lo.__r=0,ma=Math.random().toString(8),oo="__d"+ma,Sr="__a"+ma,Es=/(PointerCapture)$|Capture$/i,va=0,ga=Ss(!1),ha=Ss(!0),Ps=0;var hn,Ce,wa,Fs,Ar=0,Ws=[],Ne=ae,$s=Ne.__b,Bs=Ne.__r,Us=Ne.diffed,qs=Ne.__c,Hs=Ne.unmount,Vs=Ne.__;function er(e,t){Ne.__h&&Ne.__h(Ce,e,Ar||t),Ar=0;var n=Ce.__H||(Ce.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function M(e){return Ar=1,Gs(Xs,e)}function Gs(e,t,n){var o=er(hn++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Xs(void 0,t),function(l){var c=o.__N?o.__N[0]:o.__[0],d=o.t(c,l);c!==d&&(o.__N=[d,o.__[1]],o.__c.setState({}))}],o.__c=Ce,!Ce.__f)){var a=function(l,c,d){if(!o.__c.__H)return!0;var f=!1,u=o.__c.props!==l;if(o.__c.__H.__.some(function(g){if(g.__N){f=!0;var m=g.__[0];g.__=g.__N,g.__N=void 0,m!==g.__[0]&&(u=!0)}}),i){var p=i.call(this,l,c,d);return f?p||u:p}return!f||u};Ce.__f=!0;var i=Ce.shouldComponentUpdate,s=Ce.componentWillUpdate;Ce.componentWillUpdate=function(l,c,d){if(this.__e){var f=i;i=void 0,a(l,c,d),i=f}s&&s.call(this,l,c,d)},Ce.shouldComponentUpdate=a}return o.__N||o.__}function Q(e,t){var n=er(hn++,3);!Ne.__s&&Sa(n.__H,t)&&(n.__=e,n.u=t,Ce.__H.__h.push(n))}function Er(e,t){var n=er(hn++,4);!Ne.__s&&Sa(n.__H,t)&&(n.__=e,n.u=t,Ce.__h.push(n))}function te(e){return Ar=5,At(function(){return{current:e}},[])}function At(e,t){var n=er(hn++,7);return Sa(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Qt(e,t){return Ar=8,At(function(){return e},t)}function _a(e){var t=Ce.context[e.__c],n=er(hn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ce)),t.props.value):e.__}function fo(){var e=er(hn++,11);if(!e.__){for(var t=Ce.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function df(){for(var e;e=Ws.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(po),t.__h.some(za),t.__h=[]}catch(n){t.__h=[],Ne.__e(n,e.__v)}}}Ne.__b=function(e){Ce=null,$s&&$s(e)},Ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Vs&&Vs(e,t)},Ne.__r=function(e){Bs&&Bs(e),hn=0;var t=(Ce=e.__c).__H;t&&(wa===Ce?(t.__h=[],Ce.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(po),t.__h.some(za),t.__h=[],hn=0)),wa=Ce},Ne.diffed=function(e){Us&&Us(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ws.push(t)!==1&&Fs===Ne.requestAnimationFrame||((Fs=Ne.requestAnimationFrame)||uf)(df)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),wa=Ce=null},Ne.__c=function(e,t){t.some(function(n){try{n.__h.some(po),n.__h=n.__h.filter(function(o){return!o.__||za(o)})}catch(o){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Ne.__e(o,n.__v)}}),qs&&qs(e,t)},Ne.unmount=function(e){Hs&&Hs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{po(o)}catch(a){t=a}}),n.__H=void 0,t&&Ne.__e(t,n.__v))};var js=typeof requestAnimationFrame=="function";function uf(e){var t,n=function(){clearTimeout(o),js&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);js&&(t=requestAnimationFrame(n))}function po(e){var t=Ce,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ce=t}function za(e){var t=Ce;e.__c=e.__(),Ce=t}function Sa(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Xs(e,t){return typeof t=="function"?t(e):t}var Ca=null;function Ks(e){Ca=e}function en(e){return Ca&&e&&typeof window<"u"&&e===window.tangu?{...e,...Ca}:e}var Ln=e=>!!e&&(!e.unitPage||!!e.unitPublicEntry),re=()=>en(typeof window<"u"?window.tangu:void 0)||{};function mo(e){let t=typeof e?.status=="number"?e.status:0;if(t>=200&&t<300)return{ok:!0,status:t,data:e?.json??null};let n=e?.json&&typeof e.json=="object"?e.json:null,o=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,a=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:t,code:o,detail:a,transport:typeof e?.error=="string"?e.error:null}}var Ta=e=>({ok:!1,status:0,code:null,detail:null,transport:e});async function J(e,t={}){let n=re().cloudFetch;if(!n)return Ta("no_bridge");try{return mo(await n({path:e,...t}))}catch(o){return Ta(String(o?.message||o))}}async function go(e,t){if(!e)return t();try{return mo(await e())}catch(n){return Ta(String(n?.message||n))}}var Dn=e=>e.status===401&&(e.transport==="not_signed_in"||e.code===null&&e.detail===null&&e.transport===null);function Et(e){return String(e?.message??e??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function bn(e,t,n){let o=re().cloudInvoke;if(!o)return!1;let a=e==="membership"&&t?n?[e,t,n]:[e,t]:[e];try{return!!(await o("auth:openPayCenter",...a))?.ok}catch{return!1}}async function Nn(e){let t=re().openAccountCenter;if(!t)return!1;try{return!!(await t(e)).ok}catch{return!1}}var pf=0;function r(e,t,n,o,a,i){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pf,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return ae.vnode&&ae.vnode(d),d}var ff={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 Y({name:e,size:t=14,class:n}){return r("svg",{class:n,width:t,height:t,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:ff[e]})})}function tr({size:e=12}){return r("svg",{class:"spin",width:e,height:e,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 mf={"sub.identity":"\u63D2\u4EF6 ID","sub.identityHint":"\u63D0\u4EA4\u540E\u81EA\u52A8\u5206\u914D\u552F\u4E00 ID\u3002\u540D\u79F0\u53EF\u4EE5\u91CD\u590D\uFF0C\u66F4\u65B0\u6CBF\u7528\u540C\u4E00\u4E2A ID\u3002","sub.description":"\u8BE6\u7EC6\u63CF\u8FF0","sub.tags":"\u6807\u7B7E","sub.tagsHint":"\u4EE5\u9017\u53F7\u5206\u9694\uFF0C\u6700\u591A 8 \u4E2A","sub.minAppVersion":"\u6700\u4F4E Forsion \u7248\u672C","sub.maxAppVersion":"\u6700\u9AD8\u7248\u672C\uFF08\u4E0D\u542B\uFF09","sub.optional":"\u9009\u586B","sub.platforms":"\u652F\u6301\u7684\u7AEF","sub.requirementsHint":"\u652F\u6301 desktop\u3001macos\u3001windows\u3001linux\u3001android\u3001ios\u3001web\u3002\u7559\u7A7A\u8868\u793A\u672A\u58F0\u660E\u3002ZIP \u6E05\u5355\u4E2D\u7684\u8981\u6C42\u4F1A\u81EA\u52A8\u8BFB\u53D6\uFF0C\u624B\u586B\u503C\u987B\u4E0E\u6E05\u5355\u4E00\u81F4\u3002","sub.err.market_requirements_invalid":"\u7248\u672C\u8981\u6C42\u6216\u5E73\u53F0\u65E0\u6548\u3002","sub.err.market_requirements_mismatch":"\u624B\u586B\u7248\u672C\u8981\u6C42\u4E0E ZIP \u6E05\u5355\u4E0D\u4E00\u81F4\u3002","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.membershipUsage":"\u4F1A\u5458\u4E0E\u7528\u91CF","page.membershipQuota":"\u4F1A\u5458\u4E0E\u989D\u5EA6","page.pointsInvite":"\u79EF\u5206\u4E0E\u9080\u8BF7","page.helpDiagnostics":"\u5E2E\u52A9\u4E0E\u8BCA\u65AD","account.details.title":"\u767B\u5F55\u4E0E\u8D44\u6599","account.details.desc":"\u5934\u50CF\u3001\u6635\u79F0\u4E0E\u7B80\u4ECB\u5728\u300C\u4E2A\u4EBA\u4E3B\u9875\u300D\u4E2D\u7F16\u8F91\u3002","account.details.username":"\u7528\u6237\u540D","diag.unavailable":"\u5F53\u524D\u5BBF\u4E3B\u4E0D\u652F\u6301\u8BCA\u65AD\u6570\u636E\uFF0C\u8BF7\u66F4\u65B0 Forsion \u540E\u91CD\u8BD5\u3002","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","guide.title":"\u4F7F\u7528\u6307\u5357","guide.readOnly":"\u53EA\u8BFB","guide.more":"\u66F4\u591A","guide.unlockAll":"\u5168\u90E8\u89E3\u9501","guide.relock":"\u6539\u56DE\u6309\u7B49\u7EA7\u89E3\u9501","guide.reminders":"\u4F7F\u7528\u6307\u5357\u63D0\u9192","guide.spotlight":"\u73B0\u573A\u6307\u5F15","guide.spotStep":"\u7B2C {n} \u6B65\uFF0C\u5171 {total} \u6B65","guide.figure":"\u793A\u610F\u56FE","guide.openAchievements":"\u6253\u5F00\u6210\u5C31","guide.tasks":"\u672C\u7AE0\u4EFB\u52A1","guide.go":"\u5E26\u6211\u53BB","guide.desktopOnly":"\u5728\u7535\u8111\u4E0A\u505A","guide.taskDone":"\u5DF2\u5B8C\u6210","guide.askTangu":"\u95EE Tangu","guide.progress":"\u8FDB\u5EA6","guide.justUnlocked":"\u521A\u89E3\u9501","guide.lockedHint":"\u672A\u89E3\u9501","guide.whatsNew":"\u65B0\u7248\u672C \xB7 {version}","guide.level.lv1":"Lv.1 \u521D\u6765\u4E4D\u5230","guide.level.lv2":"Lv.2 \u719F\u95E8\u719F\u8DEF","guide.level.lv3":"Lv.3 \u5F97\u5FC3\u5E94\u624B","guide.level.lv4":"Lv.4 \u878D\u4F1A\u8D2F\u901A","guide.locked.title":"\u8FD9\u4E00\u7AE0\u8FD8\u6CA1\u89E3\u9501","guide.locked.body":"\u505A\u5B8C\u300C{level}\u300D\u7684\u4EFB\u52A1\u5C31\u80FD\u8BFB\u5168\u6587\u3002","guide.locked.left":"\u8FD8\u5DEE\u8FD9\u51E0\u9879\uFF1A","guide.locked.hint":"\u7528\u8FC7\u4E00\u9635\u4E86\uFF1F\u53F3\u4E0A\u89D2\u300C\xB7\xB7\xB7\u300D\u91CC\u53EF\u4EE5\u5168\u90E8\u89E3\u9501\u3002","guide.levelProgress":"\u672C\u7EA7\u8FDB\u5EA6 {done}/{total}","guide.next":"\u4E0B\u4E00\u7EA7","guide.allDone":"\u5168\u90E8\u5B8C\u6210","guide.allDoneBody":"\u6307\u5357\u91CC\u7684\u4EFB\u52A1\u90FD\u505A\u5B8C\u4E86\uFF0C\u968F\u65F6\u56DE\u6765\u7FFB\u770B\u3002","guide.review":"\u56DE\u770B","guide.ask.hint":"\u5BF9\u300C{chapter}\u300D\u6709\u7591\u95EE\uFF1F\u95EE Tangu \u4F1A\u5F00\u4E00\u4E2A\u5E26\u4E0A\u672C\u7AE0\u5185\u5BB9\u7684\u65B0\u5BF9\u8BDD\u3002","guide.ask.placeholder":"\u60F3\u95EE\u4EC0\u4E48\uFF1F","guide.ask.send":"\u5F00\u59CB\u5BF9\u8BDD","guide.ask.prompt":"\u6211\u6B63\u5728\u8BFB Forsion \u4F7F\u7528\u6307\u5357\u91CC\u300C{chapter}\u300D\u8FD9\u4E00\u7AE0\uFF0C\u5185\u5BB9\u9644\u5728\u4E0B\u9762\u3002{question}","guide.ask.unavailable":"\u8FD9\u91CC\u5F00\u4E0D\u4E86\u5BF9\u8BDD","guide.ask.chatTitle":"\u4F7F\u7528\u6307\u5357\u95EE\u7B54","guide.companion.back":"\u56DE\u5230\u6307\u5357","guide.companion.close":"\u6536\u8D77","guide.toast.taskDone":"\u5B8C\u6210\uFF1A{task}","guide.letter.levelTitle":"{level} \u5DF2\u89E3\u9501\uFF1A\u63A5\u4E0B\u6765\u8BD5\u8BD5\u8FD9\u51E0\u4EF6\u4E8B","guide.letter.levelBody":"\u4E0A\u4E00\u7EA7\u7684\u4EFB\u52A1\u90FD\u505A\u5B8C\u4E86\uFF0C\u4E0B\u9762\u8FD9\u51E0\u7AE0\u73B0\u5728\u53EF\u4EE5\u8BFB\u4E86\u3002\u6BCF\u9879\u4EFB\u52A1\u90FD\u80FD\u300C\u5E26\u6211\u53BB\u300D\u3002","guide.letter.versionTitle":"{version} \u6709 {n} \u4EF6\u65B0\u4E1C\u897F\u53EF\u4EE5\u4F53\u9A8C","guide.letter.versionBody":"\u8FD9\u4E2A\u7248\u672C\u65B0\u52A0\u7684\uFF0C\u53EF\u4EE5\u76F4\u63A5\u4E0A\u624B\uFF1A","guide.letter.open":"\u6253\u5F00\u6307\u5357","guide.status.done":"\u5DF2\u5B8C\u6210","guide.cmd.open":"\u6253\u5F00\u4F7F\u7528\u6307\u5357","penzor.title":"\u84EC\u6D32\u4E91","penzor.kicker":"\u84EC\u6D32\u4E91 \xB7 Penzor Cloud","penzor.overview":"\u6982\u89C8","penzor.places":"\u4F4D\u7F6E","penzor.details":"\u8BE6\u60C5","penzor.ledger.sync":"\u667A\u5E93\u540C\u6B65","penzor.ledger.ama":"Amadeus Cloud","penzor.ledger.apps":"\u5E94\u7528\u6587\u4EF6","penzor.ledger.exports":"\u5BFC\u51FA","penzor.trash":"\u56DE\u6536\u7AD9","penzor.items":"{n} \u9879","penzor.total.sub":"\u5B58\u5728 Forsion \u4E91\u7AEF \xB7 {time}\u66F4\u65B0","penzor.justNow":"\u521A\u521A","penzor.ofMax":"/ {max}","penzor.card.syncSub":"{n} \u4E2A\u5E93 \xB7 \u4E0A\u6B21\u5199\u5165 {time}","penzor.card.syncSubNone":"{n} \u4E2A\u5E93","penzor.card.syncFoot":"\u5355\u4E2A\u6587\u4EF6\u8D85\u8FC7 {size} \u4E0D\u4E0A\u4F20","penzor.card.syncWarn":"\u5FEB\u6EE1\u4E86\uFF1A\u6EE1 {max} \u540E\u65B0\u6587\u4EF6\u4E0D\u518D\u4E0A\u4F20\uFF0C\u5DF2\u5728\u4E91\u7AEF\u7684\u7167\u5E38\u540C\u6B65","penzor.card.amaSmall":"\u4E0D\u7B97\u5728\u989D\u5EA6\u91CC","penzor.card.amaSub":"{n} \u4E2A\u4E91\u7AEF\u667A\u5E93","penzor.card.amaFoot":"\u7B14\u8BB0\u548C\u9644\u4EF6\u5728 Amadeus \u7684 Cloud \u4FA7","penzor.card.appsFoot":"\u56DE\u6536\u7AD9 {n} \u9879 \xB7 {size}","penzor.card.appsWarn":"\u5FEB\u6EE1\u4E86\uFF1A\u6EE1 {max} \u540E\u5E94\u7528\u4E0D\u80FD\u518D\u5B58\u65B0\u6587\u4EF6\uFF1B\u56DE\u6536\u7AD9\u91CC\u7684\u4E5F\u7B97\uFF0C\u6E05\u7A7A\u80FD\u817E\u51FA\u7A7A\u95F4","penzor.card.expSmall":"{n} \u4E2A\u6587\u4EF6","penzor.card.expSub":"\u6700\u8FD1\uFF1A{name} \xB7 {time}","penzor.card.expFoot":"\u5404\u5E94\u7528\u5BFC\u51FA\u7684\u6587\u4EF6","penzor.card.none":"\u8FD8\u6CA1\u6709\u4E1C\u897F","penzor.largest":"\u5360\u7528\u6700\u591A","penzor.col.name":"\u540D\u79F0","penzor.col.size":"\u5927\u5C0F","penzor.col.mtime":"\u4FEE\u6539\u65F6\u95F4","penzor.col.device":"\u5199\u5165\u8BBE\u5907","penzor.col.deleted":"\u5220\u9664\u4E8E","penzor.col.origin":"\u539F\u4F4D\u7F6E","penzor.col.app":"\u6765\u6E90","penzor.sort.mtime":"\u6309\u4FEE\u6539\u65F6\u95F4","penzor.sort.size":"\u6309\u5927\u5C0F","penzor.sort.name":"\u6309\u540D\u79F0","penzor.search":"\u641C\u7D22\u8FD9\u91CC\u7684\u6587\u4EF6\u540D","penzor.sync.thisDevice":"\u672C\u673A\u5728\u540C\u6B65","penzor.meta.files":"{size} \xB7 {n} \u4E2A\u6587\u4EF6","penzor.sync.last":"\u4E0A\u6B21\u5199\u5165 {time} \xB7 {device}","penzor.sync.lastNoDevice":"\u4E0A\u6B21\u5199\u5165 {time}","penzor.sync.devices":"{n} \u53F0\u8BBE\u5907\u540C\u6B65\u8FD9\u4E2A\u5E93","penzor.sync.meter":"\u667A\u5E93\u540C\u6B65\u5171\u7528 {max}\uFF0C\u5DF2\u7528 {used}","penzor.apps.meter":"\u5E94\u7528\u6587\u4EF6\u5171\u7528 {max}\uFF0C\u5DF2\u7528 {used}\uFF08\u56DE\u6536\u7AD9\u91CC\u7684\u4E5F\u7B97\uFF09","penzor.apps.by":"\u7531 {app} \u5199\u5165","penzor.ama.notCounted":"\u4E0D\u7B97\u5728\u989D\u5EA6\u91CC","penzor.ama.open":"\u5728 Amadeus \u4E2D\u6253\u5F00","penzor.trash.meta":"{n} \u9879 \xB7 {size}","penzor.trash.note":"\u4ECD\u7B97\u5728\u5E94\u7528\u6587\u4EF6\u7684 {max} \u91CC\uFF0C\u6C38\u4E45\u5220\u9664\u540E\u624D\u817E\u51FA\u7A7A\u95F4","penzor.trash.emptyBtn":"\u6E05\u7A7A\u56DE\u6536\u7AD9","penzor.act.download":"\u4E0B\u8F7D","penzor.act.rename":"\u91CD\u547D\u540D","penzor.act.move":"\u79FB\u52A8\u5230\u2026","penzor.act.trash":"\u79FB\u5230\u56DE\u6536\u7AD9","penzor.act.delete":"\u5220\u9664","penzor.act.restore":"\u6062\u590D","penzor.act.purge":"\u6C38\u4E45\u5220\u9664","penzor.act.copyName":"\u590D\u5236\u5E93\u540D","penzor.act.openSync":"\u5728\u8BBE\u7F6E\u4E2D\u6253\u5F00\u540C\u6B65","penzor.act.refresh":"\u5237\u65B0","penzor.act.up":"\u4E0A\u4E00\u7EA7","penzor.toast.trashed":"\u5DF2\u628A\u300C{name}\u300D\u79FB\u5230\u56DE\u6536\u7AD9","penzor.toast.restored":"\u5DF2\u6062\u590D\u300C{name}\u300D","penzor.toast.purged":"\u5DF2\u6C38\u4E45\u5220\u9664\u300C{name}\u300D","penzor.toast.emptied":"\u5DF2\u6E05\u7A7A\u56DE\u6536\u7AD9","penzor.toast.downloaded":"\u5DF2\u5B58\u5230\u300C\u4E0B\u8F7D\u300D\uFF1A{name}","penzor.toast.renamed":"\u5DF2\u6539\u540D\u4E3A\u300C{name}\u300D","penzor.toast.moved":"\u5DF2\u79FB\u5230\u300C{name}\u300D","penzor.toast.versionRestored":"\u5DF2\u6062\u590D\u5230\u7B2C {n} \u7248","penzor.toast.copied":"\u5DF2\u590D\u5236\u5E93\u540D","penzor.toast.failed":"\u6CA1\u6210\u529F\uFF1A{reason}","penzor.confirm.purge":"\u6C38\u4E45\u5220\u9664\u300C{name}\u300D\uFF1F\u5220\u4E86\u5C31\u627E\u4E0D\u56DE\u6765\u4E86\u3002","penzor.confirm.empty":"\u6E05\u7A7A\u56DE\u6536\u7AD9\uFF1F{n} \u9879\u4F1A\u88AB\u6C38\u4E45\u5220\u9664\uFF0C\u627E\u4E0D\u56DE\u6765\u3002","penzor.confirm.deleteExport":"\u5220\u9664\u300C{name}\u300D\uFF1F\u5BFC\u51FA\u7684\u6587\u4EF6\u6CA1\u6709\u56DE\u6536\u7AD9\uFF0C\u5220\u4E86\u5C31\u627E\u4E0D\u56DE\u6765\u4E86\u3002","penzor.cancel":"\u53D6\u6D88","penzor.side.where":"\u4F4D\u7F6E","penzor.side.mtime":"\u4FEE\u6539","penzor.side.device":"\u5199\u5165\u8BBE\u5907","penzor.side.thisDevice":"{name}\uFF08\u672C\u673A\uFF09","penzor.side.from":"\u6765\u6E90","penzor.side.versions":"\u5386\u53F2\u7248\u672C","penzor.side.versionsNone":"\u6CA1\u6709","penzor.side.versionRow":"\u7B2C {n} \u7248 \xB7 {time} \xB7 {size}","penzor.side.restoreVersion":"\u6062\u590D\u8FD9\u4E00\u7248","penzor.side.deletedAt":"\u5220\u9664\u4E8E","penzor.side.origin":"\u539F\u4F4D\u7F6E","penzor.side.inner":"\u91CC\u9762\u8FD8\u6709 {n} \u9879\uFF0C\u6062\u590D\u65F6\u4E00\u8D77\u56DE\u6765","penzor.side.inTrash":"\u5728\u56DE\u6536\u7AD9 \xB7 {size}","penzor.side.readonlySync":"\u540C\u6B65\u5E93\u91CC\u7684\u6587\u4EF6\u53EA\u5728\u8BBE\u5907\u4E0A\u5220\u6539\u3002\u5728\u8FD9\u91CC\u5220\u6389\u4E00\u4E2A\u6587\u4EF6\uFF0C\u6BCF\u53F0\u540C\u6B65 {vault} \u7684\u8BBE\u5907\u4E0B\u6B21\u540C\u6B65\u65F6\u90FD\u4F1A\u8DDF\u7740\u5220\u6389\uFF0C\u6240\u4EE5\u8FD9\u91CC\u53EA\u80FD\u770B\u548C\u4E0B\u8F7D\u3002","penzor.side.readonlyAma":"\u7B14\u8BB0\u548C\u9644\u4EF6\u5728 Amadeus \u91CC\u6539\u3002\u5728\u8FD9\u91CC\u5220\u6389\u4E00\u4E2A\u9644\u4EF6\uFF0C\u5F15\u7528\u5B83\u7684\u7B14\u8BB0\u4F1A\u7F3A\u56FE\uFF0C\u6240\u4EE5\u8FD9\u91CC\u53EA\u80FD\u770B\u548C\u4E0B\u8F7D\u3002","penzor.side.exportNote":"\u5BFC\u51FA\u7684\u6587\u4EF6\u6CA1\u6709\u56DE\u6536\u7AD9\uFF1A\u5220\u9664\u5C31\u662F\u6C38\u4E45\u5220\u9664\u3002","penzor.side.none":"\u9009\u4E00\u4E2A\u6587\u4EF6\u770B\u8BE6\u60C5","penzor.side.folder":"\u6587\u4EF6\u5939 \xB7 {n} \u9879","penzor.side.folderPlain":"\u6587\u4EF6\u5939","penzor.move.title":"\u79FB\u5230\u54EA\u91CC","penzor.move.root":"{app} \u6700\u4E0A\u5C42","penzor.move.here":"\u79FB\u5230\u8FD9\u91CC","penzor.move.noFolders":"\u8FD9\u4E00\u5C42\u6CA1\u6709\u6587\u4EF6\u5939","penzor.rename.save":"\u4FDD\u5B58","penzor.empty.title":"\u84EC\u6D32\u4E91\u91CC\u8FD8\u6CA1\u6709\u4E1C\u897F","penzor.empty.lead":"\u8FD9\u4E9B\u4E1C\u897F\u5B58\u8FDB\u4E91\u7AEF\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\uFF1A","penzor.empty.sync":"\u5728\u300C\u8BBE\u7F6E \u203A \u540C\u6B65\u300D\u91CC\u628A\u8FDC\u7A0B\u670D\u52A1\u9009\u6210\u300C\u84EC\u6D32\u4E91\u300D\uFF0C\u672C\u5730\u667A\u5E93\u5C31\u540C\u6B65\u5230\u8FD9\u91CC","penzor.empty.ama":"Amadeus \u5207\u5230 Cloud \u4FA7\u5199\u7684\u7B14\u8BB0","penzor.empty.apps":"\u5404\u5E94\u7528\u5B58\u5230\u4E91\u7AEF\u6216\u5BFC\u51FA\u7684\u6587\u4EF6","penzor.empty.openSync":"\u6253\u5F00\u540C\u6B65\u8BBE\u7F6E","penzor.out.title":"\u767B\u5F55\u540E\u67E5\u770B\u4F60\u7684\u84EC\u6D32\u4E91","penzor.out.lead":"\u84EC\u6D32\u4E91\u653E\u7740\u4F60\u540C\u6B65\u5230 Forsion \u4E91\u7AEF\u7684\u5E93\u3001Amadeus Cloud \u7684\u7B14\u8BB0\uFF0C\u548C\u5404\u5E94\u7528\u5B58\u5728\u4E91\u7AEF\u7684\u6587\u4EF6\u3002","penzor.out.signIn":"\u767B\u5F55 Forsion \u8D26\u53F7","penzor.loading":"\u6B63\u5728\u8BFB\u53D6\u2026","penzor.err":"\u6CA1\u8BFB\u5230\uFF1A{reason}","penzor.folderEmpty":"\u8FD9\u91CC\u6CA1\u6709\u6587\u4EF6","penzor.noMatch":"\u6CA1\u6709\u540D\u5B57\u91CC\u5E26\u300C{q}\u300D\u7684\u6587\u4EF6","penzor.cmd.open":"\u6253\u5F00\u84EC\u6D32\u4E91","penzor.unreachable":"\u8FDE\u4E0D\u4E0A Forsion \u4E91\u7AEF\uFF0C\u7A0D\u540E\u518D\u8BD5","penzor.toast.emptyPartial":"\u56DE\u6536\u7AD9\u91CC\u8FD8\u6709 {n} \u9879\u6CA1\u5220\u6389","penzor.sort.deleted":"\u6309\u5220\u9664\u65F6\u95F4","penzor.side.versionsN":"{n} \u4E2A","penzor.drive":"\u6211\u7684\u4E91\u76D8","penzor.drive.meta":"\u7B97\u5728\u5E94\u7528\u6587\u4EF6\u7684 {max} \u91CC","penzor.drive.empty":"\u8FD9\u91CC\u8FD8\u7A7A\u7740\u3002\u628A\u6587\u4EF6\u62D6\u8FDB\u6765\uFF0C\u6216\u8005\u70B9\u300C\u4E0A\u4F20\u300D\u3002","penzor.act.upload":"\u4E0A\u4F20","penzor.act.uploadMore":"\u66F4\u591A\u4E0A\u4F20\u65B9\u5F0F","penzor.act.uploadFiles":"\u4E0A\u4F20\u6587\u4EF6\u2026","penzor.act.uploadFolder":"\u4E0A\u4F20\u6587\u4EF6\u5939\u2026","penzor.act.uploadHere":"\u4E0A\u4F20\u5230\u8FD9\u91CC\u2026","penzor.act.newFolder":"\u65B0\u5EFA\u6587\u4EF6\u5939","penzor.act.clearSel":"\u53D6\u6D88\u9009\u62E9","penzor.newFolder.default":"\u65B0\u5EFA\u6587\u4EF6\u5939","penzor.sel.bar":"\u5DF2\u9009 {n} \u9879 \xB7 {size}","penzor.sel.title":"\u5DF2\u9009 {n} \u9879","penzor.sel.sub":"{size} \xB7 {files} \u4E2A\u6587\u4EF6","penzor.sel.subDirs":"{size} \xB7 {files} \u4E2A\u6587\u4EF6\u3001{dirs} \u4E2A\u6587\u4EF6\u5939","penzor.sel.download":"\u4E0B\u8F7D {n} \u9879","penzor.sel.saveTo":"\u4E0B\u8F7D\u5230","penzor.sel.saveToValue":"\u4E0B\u8F7D / {folder}","penzor.sel.noDirs":"\u6587\u4EF6\u5939\u8FD9\u4E00\u7248\u8FD8\u4E0D\u80FD\u4E0B\u8F7D\uFF0C\u53EA\u4E0B\u8F7D\u9009\u4E2D\u7684\u6587\u4EF6\u3002","penzor.download.folder":"\u84EC\u6D32\u4E91 {date}","penzor.drop.to":"\u677E\u624B\u4E0A\u4F20\u5230\u300C{place}\u300D","penzor.tx.busy":"\u6B63\u5728\u4F20\u8F93 {n} \u9879","penzor.tx.allDone":"\u5168\u90E8\u4F20\u5B8C","penzor.tx.failedN":"{n} \u9879\u6CA1\u4F20\u5B8C","penzor.tx.counts":"\u4E0A\u4F20 {up} \xB7 \u4E0B\u8F7D {down}","penzor.tx.eta":"\u5269\u7EA6 {eta}","penzor.tx.doneN":"{n} \u9879\u5DF2\u4F20\u5B8C","penzor.tx.restDone":"\u5176\u4F59 {n} \u9879\u5DF2\u4F20\u5B8C","penzor.tx.pill":"{counts} \xB7 {pct}%","penzor.tx.queued":"\u6392\u961F\u4E2D","penzor.tx.paused":"\u5DF2\u6682\u505C \xB7 \u7EE7\u7EED\u4F1A\u4ECE\u5934\u4F20","penzor.tx.uploaded":"\u5DF2\u4E0A\u4F20 \xB7 {time}","penzor.tx.downloaded":"\u5DF2\u4E0B\u8F7D \xB7 {time}","penzor.tx.canceled":"\u5DF2\u53D6\u6D88","penzor.tx.left":"\u5269 {eta}","penzor.tx.sec":"{n} \u79D2","penzor.tx.min":"{n} \u5206\u949F","penzor.tx.pause":"\u6682\u505C","penzor.tx.resume":"\u7EE7\u7EED","penzor.tx.cancel":"\u53D6\u6D88","penzor.tx.retry":"\u91CD\u8BD5","penzor.tx.remove":"\u79FB\u9664","penzor.tx.locate":"\u5B9A\u4F4D","penzor.tx.reveal":"\u5728\u6587\u4EF6\u5939\u4E2D\u663E\u793A","penzor.tx.pauseAll":"\u5168\u90E8\u6682\u505C","penzor.tx.resumeAll":"\u5168\u90E8\u7EE7\u7EED","penzor.tx.retryAll":"\u5168\u90E8\u91CD\u8BD5","penzor.tx.clearDone":"\u6E05\u9664\u5DF2\u5B8C\u6210","penzor.tx.clear":"\u6E05\u9664","penzor.tx.collapse":"\u6536\u8D77","penzor.tx.expand":"\u5C55\u5F00\u4F20\u8F93\u5217\u8868","penzor.tx.quota":"\u7A7A\u95F4\u4E0D\u591F\uFF0C\u8FD8\u5DEE {size}","penzor.tx.quotaSub":"\u8FD9\u4E00\u6279\u4E00\u4E2A\u90FD\u6CA1\u5F00\u59CB\u4F20","penzor.tx.freeSpace":"\u53BB\u56DE\u6536\u7AD9\u817E\u5730\u65B9","penzor.err.too_large":"\u5355\u4E2A\u6587\u4EF6\u8D85\u8FC7 50 MB\uFF08\u8FD9\u4E2A {size}\uFF09\uFF0C\u8FD9\u4E00\u7248\u4F20\u4E0D\u4E86","penzor.err.quota":"\u4E91\u7AEF\u7A7A\u95F4\u4E0D\u591F","penzor.err.network":"\u7F51\u7EDC\u65AD\u4E86\uFF0C\u4F20\u5230 {pct}% \u505C\u4E0B","penzor.err.account_changed":"\u6362\u4E86\u8D26\u53F7\uFF0C\u8FD9\u4E00\u9879\u6CA1\u6709\u63A5\u7740\u4F20","penzor.err.not_signed_in":"\u6CA1\u767B\u5F55","penzor.err.gone":"\u672C\u673A\u4E0A\u627E\u4E0D\u5230\u8FD9\u4E2A\u6587\u4EF6\u4E86","penzor.err.popup_blocked":"\u6D4F\u89C8\u5668\u62E6\u4E0B\u4E86\u65B0\u6807\u7B7E\u9875\uFF0C\u5141\u8BB8\u672C\u7AD9\u5F39\u51FA\u7A97\u53E3\u540E\u518D\u8BD5\u4E00\u6B21","penzor.err.changed":"\u4F20\u7684\u65F6\u5019\u6587\u4EF6\u6539\u52A8\u4E86\uFF0C\u91CD\u8BD5\u4E00\u6B21","penzor.err.storage_unavailable":"\u4E91\u7AEF\u5B58\u50A8\u6682\u65F6\u4E0D\u53EF\u7528","penzor.err.other":"\u6CA1\u4F20\u5B8C\uFF08{code}\uFF09","penzor.err.too_many":"\u4E00\u6B21\u6700\u591A {n} \u4E2A\u6587\u4EF6\uFF0C\u5206\u51E0\u6B21\u62D6\u8FDB\u6765","penzor.toast.upDoneOne":"\u5DF2\u4E0A\u4F20\u300C{name}\u300D","penzor.toast.upDoneMany":"\u5DF2\u4E0A\u4F20 {n} \u4E2A\u6587\u4EF6","penzor.toast.downDoneMany":"\u5DF2\u4E0B\u8F7D {n} \u4E2A\u6587\u4EF6\u5230\u300C\u4E0B\u8F7D\u300D","penzor.toast.txFailed":"{n} \u9879\u6CA1\u4F20\u5B8C\uFF0C\u56DE\u84EC\u6D32\u4E91\u770B\u770B","penzor.toast.folderExists":"\u5DF2\u7ECF\u6709\u53EB\u300C{name}\u300D\u7684\u6587\u4EF6\u5939\u4E86","penzor.toast.trashedN":"\u5DF2\u628A {n} \u9879\u79FB\u5230\u56DE\u6536\u7AD9","penzor.toast.movedN":"\u5DF2\u628A {n} \u9879\u79FB\u5230\u300C{name}\u300D","penzor.toast.batchPartial":"\u6709 {n} \u9879\u6CA1\u6210\u529F","penzor.sync.title":"\u540C\u6B65","penzor.sync.onN":"{n} \u9879\u5DF2\u5F00","penzor.sync.allOff":"\u90FD\u6CA1\u5F00","penzor.sync.waiting":"\u7B49\u4F60\u51B3\u5B9A","penzor.sync.badgeWaiting":"{n} \u9879\u5DF2\u5F00 \xB7 1 \u9879\u7B49\u4F60\u51B3\u5B9A","penzor.sync.running":"\u540C\u6B65\u4E2D {pct}%","penzor.sync.runningPlain":"\u540C\u6B65\u4E2D","penzor.sync.metaDevice":"\u8FD9\u53F0 {name}","penzor.sync.metaLast":"\u4E0A\u6B21\u540C\u6B65 {time}","penzor.sync.metaNever":"\u8FD8\u6CA1\u540C\u6B65\u8FC7","penzor.sync.every":"\u6BCF {n} \u5206\u949F","penzor.sync.everyHours":"\u6BCF {n} \u5C0F\u65F6","penzor.sync.manual":"\u624B\u52A8","penzor.sync.onStart":"\u5F00\u673A\u65F6\u4E00\u6B21","penzor.sync.minAgo":"{n} \u5206\u949F\u524D","penzor.sync.hoursAgo":"{n} \u5C0F\u65F6\u524D","penzor.sync.notesNamed":"\u667A\u5E93\u300C{name}\u300D","penzor.sync.notesPlain":"\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93","penzor.sync.notesDesc":"\u6574\u4E2A\u672C\u673A\u667A\u5E93\uFF0C\u548C\u4F60\u7684\u5176\u4ED6\u7535\u8111\u4FDD\u6301\u4E00\u81F4","penzor.sync.agents":"Agents \u4E0E\u8BB0\u5FC6","penzor.sync.agentsDesc":"Agents \u7684\u8BB0\u5FC6\u3001\u65E5\u5FD7\u3001\u6280\u80FD\u548C\u534F\u4F5C\u8BF4\u660E","penzor.sync.agentsN":"{n} \u4E2A Agent","penzor.sync.plugins":"\u63D2\u4EF6\u6570\u636E","penzor.sync.pluginsDesc":"\u63D2\u4EF6\u81EA\u5DF1\u5B58\u7684\u8BBE\u7F6E\u548C\u6570\u636E","penzor.sync.pluginsN":"{n} \u4E2A\u63D2\u4EF6","penzor.sync.off":"\u6CA1\u5F00","penzor.sync.done":"\u5DF2\u540C\u6B65","penzor.sync.doneSize":"\u5DF2\u540C\u6B65 \xB7 {size}","penzor.sync.firstPending":"\u7B49\u7B2C\u4E00\u6B21\u540C\u6B65","penzor.sync.failed":"\u4E0A\u6B21\u6CA1\u540C\u6B65\u6210\u529F","penzor.sync.overQuota":"\u8D85\u51FA\u989D\u5EA6\uFF0C\u6709\u7684\u6CA1\u4F20","penzor.sync.to":"\u540C\u6B65\u5230 {name}","penzor.sync.toFolder":"\u540C\u6B65\u5230\u672C\u673A\u6587\u4EF6\u5939","penzor.sync.decideAbove":"\u5728\u4E0A\u9762\u90A3\u5F20\u5361\u91CC\u9009","penzor.sync.kvSchedule":"\u540C\u6B65\u8BA1\u5212","penzor.sync.kvDirection":"\u65B9\u5411","penzor.sync.kvSkipped":"\u6CA1\u4F20\u7684","penzor.sync.kvWhere":"\u4E91\u7AEF\u4F4D\u7F6E","penzor.sync.change":"\u6539","penzor.sync.open":"\u6253\u5F00","penzor.sync.dir.both":"\u53CC\u5411","penzor.sync.dir.push":"\u4EC5\u4E0A\u4F20","penzor.sync.dir.pull":"\u4EC5\u4E0B\u8F7D","penzor.sync.skippedN":"{n} \u4E2A\u8D85\u8FC7 {size} \u7684\u6587\u4EF6","penzor.sync.where":"{ledger} \u203A {vault}","penzor.sync.whereUsed":"{ledger} \u203A {vault} \xB7 {used} / {max}","penzor.sync.devicesTitle":"\u5728\u540C\u6B65\u7684\u8BBE\u5907","penzor.sync.thisOne":"\u8FD9\u53F0","penzor.sync.lastWrite":"\u4E0A\u6B21\u5199\u5165 {time}","penzor.sync.noDevices":"\u8FD8\u6CA1\u6709\u8BBE\u5907\u5728\u540C\u6B65","penzor.sync.phoneTitle":"\u624B\u673A\u548C\u7F51\u9875\u770B\u5230\u7684\u90A3\u4E00\u4EFD","penzor.sync.phoneTip":"\u624B\u673A\u548C\u7F51\u9875\u76F4\u63A5\u8BFB\u300C\u4E91\u7AEF\u667A\u5E93\u300D\uFF08Amadeus \u7684\u4E91\u7AEF\u4FA7\uFF0C{size}\uFF09\uFF0C\u5B83\u4E00\u76F4\u5728\u540C\u6B65\uFF0C\u548C\u4E0A\u9762\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93\u662F\u4E24\u4EFD\u3002\u60F3\u5728\u624B\u673A\u4E0A\u770B\u8FD9\u53F0\u7684\u67D0\u4E2A\u6587\u4EF6\u5939\uFF1A\u5728\u7B14\u8BB0\u91CC\u53F3\u952E\u90A3\u4E2A\u6587\u4EF6\u5939\uFF0C\u628A\u5B83\u540C\u6B65\u5230\u4E91\u7AEF\u667A\u5E93\u3002","penzor.sync.phoneTipPlain":"\u624B\u673A\u548C\u7F51\u9875\u76F4\u63A5\u8BFB\u300C\u4E91\u7AEF\u667A\u5E93\u300D\uFF08Amadeus \u7684\u4E91\u7AEF\u4FA7\uFF09\uFF0C\u5B83\u4E00\u76F4\u5728\u540C\u6B65\uFF0C\u548C\u4E0A\u9762\u8FD9\u53F0\u7535\u8111\u7684\u667A\u5E93\u662F\u4E24\u4EFD\u3002\u60F3\u5728\u624B\u673A\u4E0A\u770B\u8FD9\u53F0\u7684\u67D0\u4E2A\u6587\u4EF6\u5939\uFF1A\u5728\u7B14\u8BB0\u91CC\u53F3\u952E\u90A3\u4E2A\u6587\u4EF6\u5939\uFF0C\u628A\u5B83\u540C\u6B65\u5230\u4E91\u7AEF\u667A\u5E93\u3002","penzor.sync.foot":"\u540C\u6B65\u8BA1\u5212\u3001\u65B9\u5411\u548C\u5176\u4ED6\u5B58\u50A8\uFF08Dropbox / S3 / WebDAV\uFF09\u5728","penzor.sync.footLink":"\u8BBE\u7F6E \u203A \u540C\u6B65","penzor.sync.askTitle":"\u4E91\u7AEF\u5DF2\u7ECF\u6709\u4E00\u4EFD\u667A\u5E93","penzor.sync.askCloud":"\u4E91\u7AEF\u90A3\u4EFD\u6765\u81EA {device}\uFF1A{files} \u4E2A\u6587\u4EF6 \xB7 {size}\u3002","penzor.sync.askCloudNoDevice":"\u4E91\u7AEF\u90A3\u4EFD\uFF1A{files} \u4E2A\u6587\u4EF6 \xB7 {size}\u3002","penzor.sync.askLocal":"\u8FD9\u53F0\u6709 {local} \u4E2A\u6587\u4EF6\u4E91\u7AEF\u6CA1\u6709\uFF0C{conflicts} \u4E2A\u4E24\u8FB9\u5185\u5BB9\u4E0D\u540C\u3002","penzor.sync.askMerge":"\u5408\u5E76\u4E24\u8FB9","penzor.sync.askCloudBtn":"\u7528\u4E91\u7AEF\u90A3\u4EFD","penzor.sync.askSkip":"\u8FD9\u53F0\u5148\u4E0D\u540C\u6B65\u667A\u5E93","penzor.sync.askExplain":"\u5408\u5E76\uFF1A\u4E24\u8FB9\u90FD\u7559\u7740\uFF0C\u5185\u5BB9\u4E0D\u540C\u7684\u53E6\u5B58\u4E00\u4EFD\u300C\uFF08\u51B2\u7A81\uFF09\u300D\u3002\u7528\u4E91\u7AEF\u90A3\u4EFD\uFF1A\u8FD9\u53F0\u548C\u4E91\u7AEF\u4E0D\u4E00\u6837\u7684\u6587\u4EF6\u5148\u632A\u8FDB\u65C1\u8FB9\u7684\u300C{backup}\u300D\u6587\u4EF6\u5939\uFF0C\u518D\u4E0B\u8F7D\u4E91\u7AEF\u90A3\u4EFD\u3002","penzor.sync.askConfirm":"\u8FD9\u53F0\u548C\u4E91\u7AEF\u4E0D\u4E00\u6837\u7684\u6587\u4EF6\u4F1A\u5148\u632A\u8FDB\u300C{backup}\u300D\uFF0C\u518D\u6362\u6210\u4E91\u7AEF\u90A3\u4EFD\u3002","penzor.sync.askConfirmGo":"\u632A\u8D70\u5E76\u7528\u4E91\u7AEF\u90A3\u4EFD","penzor.sync.backupName":"{name} \u540C\u6B65\u524D\u5907\u4EFD {date}","penzor.sync.quotaTitle":"\u667A\u5E93 {size}\uFF0C\u8D85\u8FC7\u4E86\u300C{ledger}\u300D\u7684 {max} \u4E0A\u9650","penzor.sync.quotaTitlePlain":"\u667A\u5E93\u8D85\u8FC7\u4E86\u300C{ledger}\u300D\u7684\u4E0A\u9650","penzor.sync.quotaBody":"\u653E\u4E0D\u4E0B\u7684\u6587\u4EF6\u7559\u5728\u8FD9\u53F0\u7535\u8111\u4E0A\uFF0C\u6CA1\u6709\u5220\uFF0C\u4E5F\u6CA1\u6709\u4F20\uFF1B\u5176\u4F59\u51E0\u9879\u7167\u5E38\u540C\u6B65\u3002","penzor.sync.quotaLarge":"\u8D85\u8FC7 {size} \u7684\u5355\u4E2A\u6587\u4EF6\u4E00\u76F4\u4E0D\u4F20\uFF08{n} \u4E2A\uFF09\u3002","penzor.sync.quotaSee":"\u770B\u770B\u6CA1\u4F20\u7684\u6587\u4EF6"},gf={"sub.identity":"Plugin ID","sub.identityHint":"A unique ID is assigned after submission. Names may repeat; updates keep the same ID.","sub.description":"Detailed description","sub.tags":"Tags","sub.tagsHint":"Comma separated, up to 8","sub.minAppVersion":"Minimum Forsion version","sub.maxAppVersion":"Maximum version (exclusive)","sub.optional":"Optional","sub.platforms":"Supported platforms","sub.requirementsHint":"Supported: desktop, macos, windows, linux, android, ios, web. Leave blank if unspecified. ZIP requirements are read from the manifest; supplied values must match it.","sub.err.market_requirements_invalid":"Invalid version requirements or platforms.","sub.err.market_requirements_mismatch":"Supplied requirements differ from the ZIP manifest.","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.membershipUsage":"Membership & usage","page.membershipQuota":"Membership & quota","page.pointsInvite":"Points & invites","page.helpDiagnostics":"Help & diagnostics","account.details.title":"Sign-in & details","account.details.desc":"Edit your photo, nickname and bio under Profile.","account.details.username":"Username","diag.unavailable":"This host does not support diagnostic data. Update Forsion and try again.","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","guide.title":"Guide","guide.readOnly":"Read-only","guide.more":"More","guide.unlockAll":"Unlock all","guide.relock":"Unlock level by level","guide.reminders":"Guide reminders","guide.spotlight":"On-screen hints","guide.spotStep":"Step {n} of {total}","guide.figure":"Diagram","guide.openAchievements":"Open achievements","guide.tasks":"Tasks in this chapter","guide.go":"Take me there","guide.desktopOnly":"Do it on your computer","guide.taskDone":"Done","guide.askTangu":"Ask Tangu","guide.progress":"Progress","guide.justUnlocked":"Just unlocked","guide.lockedHint":"Locked","guide.whatsNew":"What's new in {version}","guide.level.lv1":"Lv.1 Getting started","guide.level.lv2":"Lv.2 Finding your way","guide.level.lv3":"Lv.3 Making it yours","guide.level.lv4":"Lv.4 Going further","guide.locked.title":"This chapter is still locked","guide.locked.body":"Finish the tasks in {level} to read the rest.","guide.locked.left":"Still to do:","guide.locked.hint":"Been around a while? Unlock everything from the \xB7\xB7\xB7 menu.","guide.levelProgress":"This level: {done}/{total}","guide.next":"Next level","guide.allDone":"All done","guide.allDoneBody":"You've done every task in the guide. Come back any time.","guide.review":"Look back","guide.ask.hint":'Questions about "{chapter}"? Ask Tangu opens a new chat with this chapter attached.',"guide.ask.placeholder":"What would you like to know?","guide.ask.send":"Start a chat","guide.ask.prompt":`I'm reading the "{chapter}" chapter of the Forsion guide; it's attached below. {question}`,"guide.ask.unavailable":"Chat isn't available here","guide.ask.chatTitle":"Guide Q&A","guide.companion.back":"Back to the guide","guide.companion.close":"Close","guide.toast.taskDone":"Done: {task}","guide.letter.levelTitle":"{level} unlocked: try these next","guide.letter.levelBody":'You finished the previous level, so these chapters are open now. Every task has a "Take me there" button.',"guide.letter.versionTitle":"{n} new things to try in {version}","guide.letter.versionBody":"New in this version, ready to try:","guide.letter.open":"Open the guide","guide.status.done":"Done","guide.cmd.open":"Open the guide","penzor.title":"Penzor Cloud","penzor.kicker":"Penzor Cloud","penzor.overview":"Overview","penzor.places":"Places","penzor.details":"Details","penzor.ledger.sync":"Vault sync","penzor.ledger.ama":"Amadeus Cloud","penzor.ledger.apps":"App files","penzor.ledger.exports":"Exports","penzor.trash":"Trash","penzor.items":"{n} items","penzor.total.sub":"Stored in Forsion Cloud \xB7 updated {time}","penzor.justNow":"just now","penzor.ofMax":"/ {max}","penzor.card.syncSub":"{n} vaults \xB7 last write {time}","penzor.card.syncSubNone":"{n} vaults","penzor.card.syncFoot":"Files over {size} are not uploaded","penzor.card.syncWarn":"Almost full: after {max}, new files stop uploading; files already in the cloud keep syncing","penzor.card.amaSmall":"Not counted in your quota","penzor.card.amaSub":"{n} cloud vaults","penzor.card.amaFoot":"Notes and attachments on the Cloud side of Amadeus","penzor.card.appsFoot":"Trash: {n} items \xB7 {size}","penzor.card.appsWarn":"Almost full: after {max}, apps can't save new files. Trash counts too, so emptying it frees space","penzor.card.expSmall":"{n} files","penzor.card.expSub":"Latest: {name} \xB7 {time}","penzor.card.expFoot":"Files exported from apps","penzor.card.none":"Nothing yet","penzor.largest":"Largest files","penzor.col.name":"Name","penzor.col.size":"Size","penzor.col.mtime":"Modified","penzor.col.device":"Written by","penzor.col.deleted":"Deleted","penzor.col.origin":"Original location","penzor.col.app":"From","penzor.sort.mtime":"By modified","penzor.sort.size":"By size","penzor.sort.name":"By name","penzor.search":"Search file names here","penzor.sync.thisDevice":"Syncing on this device","penzor.meta.files":"{size} \xB7 {n} files","penzor.sync.last":"Last write {time} \xB7 {device}","penzor.sync.lastNoDevice":"Last write {time}","penzor.sync.devices":"{n} devices sync this vault","penzor.sync.meter":"Vault sync shares {max}; {used} used","penzor.apps.meter":"App files share {max}; {used} used (trash included)","penzor.apps.by":"Written by {app}","penzor.ama.notCounted":"Not counted in your quota","penzor.ama.open":"Open in Amadeus","penzor.trash.meta":"{n} items \xB7 {size}","penzor.trash.note":"Still counts toward the {max} for app files; space frees up once deleted permanently","penzor.trash.emptyBtn":"Empty trash","penzor.act.download":"Download","penzor.act.rename":"Rename","penzor.act.move":"Move to\u2026","penzor.act.trash":"Move to trash","penzor.act.delete":"Delete","penzor.act.restore":"Restore","penzor.act.purge":"Delete permanently","penzor.act.copyName":"Copy vault name","penzor.act.openSync":"Open sync settings","penzor.act.refresh":"Refresh","penzor.act.up":"Up one level","penzor.toast.trashed":"Moved \u201C{name}\u201D to trash","penzor.toast.restored":"Restored \u201C{name}\u201D","penzor.toast.purged":"Deleted \u201C{name}\u201D permanently","penzor.toast.emptied":"Trash emptied","penzor.toast.downloaded":"Saved to Downloads: {name}","penzor.toast.renamed":"Renamed to \u201C{name}\u201D","penzor.toast.moved":"Moved to \u201C{name}\u201D","penzor.toast.versionRestored":"Restored version {n}","penzor.toast.copied":"Vault name copied","penzor.toast.failed":"That didn't work: {reason}","penzor.confirm.purge":"Delete \u201C{name}\u201D permanently? This can't be undone.","penzor.confirm.empty":"Empty the trash? {n} items will be deleted permanently.","penzor.confirm.deleteExport":"Delete \u201C{name}\u201D? Exports have no trash, so this can't be undone.","penzor.cancel":"Cancel","penzor.side.where":"Location","penzor.side.mtime":"Modified","penzor.side.device":"Written by","penzor.side.thisDevice":"{name} (this device)","penzor.side.from":"From","penzor.side.versions":"Versions","penzor.side.versionsNone":"None","penzor.side.versionRow":"Version {n} \xB7 {time} \xB7 {size}","penzor.side.restoreVersion":"Restore this version","penzor.side.deletedAt":"Deleted","penzor.side.origin":"Original location","penzor.side.inner":"{n} more items inside come back with it","penzor.side.inTrash":"In trash \xB7 {size}","penzor.side.readonlySync":"Files in a synced vault are changed on your devices. Deleting one here would delete it on every device that syncs {vault}, so here you can only view and download.","penzor.side.readonlyAma":"Notes and attachments are changed in Amadeus. Deleting an attachment here would leave the notes that use it with missing images, so here you can only view and download.","penzor.side.exportNote":"Exports have no trash: deleting is permanent.","penzor.side.none":"Select a file to see its details","penzor.side.folder":"Folder \xB7 {n} items","penzor.side.folderPlain":"Folder","penzor.move.title":"Move to","penzor.move.root":"Top of {app}","penzor.move.here":"Move here","penzor.move.noFolders":"No folders at this level","penzor.rename.save":"Save","penzor.empty.title":"Nothing in Penzor Cloud yet","penzor.empty.lead":"These show up here once they're in the cloud:","penzor.empty.sync":"Pick Penzor Cloud as the remote service in Settings \u203A Sync, and your local vault syncs here","penzor.empty.ama":"Notes you write on the Cloud side of Amadeus","penzor.empty.apps":"Files apps save to the cloud or export","penzor.empty.openSync":"Open sync settings","penzor.out.title":"Sign in to see your Penzor Cloud","penzor.out.lead":"Penzor Cloud holds the vaults you sync to Forsion Cloud, your Amadeus Cloud notes and the files apps keep in the cloud.","penzor.out.signIn":"Sign in to Forsion","penzor.loading":"Loading\u2026","penzor.err":"Couldn't load: {reason}","penzor.folderEmpty":"No files here","penzor.noMatch":"No file names contain \u201C{q}\u201D","penzor.cmd.open":"Open Penzor Cloud","penzor.unreachable":"Can\u2019t reach Forsion Cloud. Try again later","penzor.toast.emptyPartial":"{n} items in the trash couldn\u2019t be deleted","penzor.sort.deleted":"By deleted","penzor.side.versionsN":"{n}","penzor.drive":"My drive","penzor.drive.meta":"Counts toward the {max} for app files","penzor.drive.empty":"Nothing here yet. Drag files in, or click Upload.","penzor.act.upload":"Upload","penzor.act.uploadMore":"More upload options","penzor.act.uploadFiles":"Upload files\u2026","penzor.act.uploadFolder":"Upload folder\u2026","penzor.act.uploadHere":"Upload here\u2026","penzor.act.newFolder":"New folder","penzor.act.clearSel":"Clear selection","penzor.newFolder.default":"New folder","penzor.sel.bar":"{n} selected \xB7 {size}","penzor.sel.title":"{n} selected","penzor.sel.sub":"{size} \xB7 {files} files","penzor.sel.subDirs":"{size} \xB7 {files} files, {dirs} folders","penzor.sel.download":"Download {n}","penzor.sel.saveTo":"Saves to","penzor.sel.saveToValue":"Downloads / {folder}","penzor.sel.noDirs":"Folders can\u2019t be downloaded yet; only the selected files will be.","penzor.download.folder":"Penzor Cloud {date}","penzor.drop.to":"Drop to upload to \u201C{place}\u201D","penzor.tx.busy":"Transferring {n}","penzor.tx.allDone":"All done","penzor.tx.failedN":"{n} didn\u2019t finish","penzor.tx.counts":"{up} up \xB7 {down} down","penzor.tx.eta":"about {eta} left","penzor.tx.doneN":"{n} finished","penzor.tx.restDone":"The other {n} finished","penzor.tx.pill":"{counts} \xB7 {pct}%","penzor.tx.queued":"Queued","penzor.tx.paused":"Paused \xB7 resumes from the start","penzor.tx.uploaded":"Uploaded \xB7 {time}","penzor.tx.downloaded":"Downloaded \xB7 {time}","penzor.tx.canceled":"Canceled","penzor.tx.left":"{eta} left","penzor.tx.sec":"{n}s","penzor.tx.min":"{n} min","penzor.tx.pause":"Pause","penzor.tx.resume":"Resume","penzor.tx.cancel":"Cancel","penzor.tx.retry":"Retry","penzor.tx.remove":"Remove","penzor.tx.locate":"Show","penzor.tx.reveal":"Show in folder","penzor.tx.pauseAll":"Pause all","penzor.tx.resumeAll":"Resume all","penzor.tx.retryAll":"Retry all","penzor.tx.clearDone":"Clear finished","penzor.tx.clear":"Clear","penzor.tx.collapse":"Collapse","penzor.tx.expand":"Show transfers","penzor.tx.quota":"Not enough space: {size} short","penzor.tx.quotaSub":"Nothing in this batch was started","penzor.tx.freeSpace":"Free up space in Trash","penzor.err.too_large":"Over the 50 MB per-file limit ({size}); can\u2019t upload it yet","penzor.err.quota":"Not enough cloud space","penzor.err.network":"Connection lost at {pct}%","penzor.err.account_changed":"You switched accounts, so this one stopped","penzor.err.not_signed_in":"Not signed in","penzor.err.gone":"The file is no longer on this device","penzor.err.popup_blocked":"Your browser blocked the new tab. Allow pop-ups for this site and try again","penzor.err.changed":"The file changed while uploading. Try again","penzor.err.storage_unavailable":"Cloud storage is unavailable right now","penzor.err.other":"Didn\u2019t finish ({code})","penzor.err.too_many":"Up to {n} files at a time. Add them in smaller batches","penzor.toast.upDoneOne":"Uploaded \u201C{name}\u201D","penzor.toast.upDoneMany":"Uploaded {n} files","penzor.toast.downDoneMany":"Downloaded {n} files to Downloads","penzor.toast.txFailed":"{n} transfers didn\u2019t finish. Open Penzor Cloud to check","penzor.toast.folderExists":"There\u2019s already a folder called \u201C{name}\u201D","penzor.toast.trashedN":"Moved {n} items to the trash","penzor.toast.movedN":"Moved {n} items to \u201C{name}\u201D","penzor.toast.batchPartial":"{n} items didn\u2019t go through","penzor.sync.title":"Sync","penzor.sync.onN":"{n} on","penzor.sync.allOff":"All off","penzor.sync.waiting":"Waiting for you","penzor.sync.badgeWaiting":"{n} on \xB7 1 waiting for you","penzor.sync.running":"Syncing {pct}%","penzor.sync.runningPlain":"Syncing","penzor.sync.metaDevice":"This computer: {name}","penzor.sync.metaLast":"Last synced {time}","penzor.sync.metaNever":"Not synced yet","penzor.sync.every":"Every {n} min","penzor.sync.everyHours":"Every {n} h","penzor.sync.manual":"Manual","penzor.sync.onStart":"once at startup","penzor.sync.minAgo":"{n} min ago","penzor.sync.hoursAgo":"{n} h ago","penzor.sync.notesNamed":"Notes vault \u201C{name}\u201D","penzor.sync.notesPlain":"This computer\u2019s notes vault","penzor.sync.notesDesc":"The whole local vault, kept the same on your other computers","penzor.sync.agents":"Agents & memory","penzor.sync.agentsDesc":"Your agents\u2019 memory, logs, skills and working notes","penzor.sync.agentsN":"Agents: {n}","penzor.sync.plugins":"Plugin data","penzor.sync.pluginsDesc":"Settings and data your plugins keep","penzor.sync.pluginsN":"Plugins: {n}","penzor.sync.off":"Off","penzor.sync.done":"Synced","penzor.sync.doneSize":"Synced \xB7 {size}","penzor.sync.firstPending":"Waiting for the first sync","penzor.sync.failed":"Last sync failed","penzor.sync.overQuota":"Over the limit, some files not uploaded","penzor.sync.to":"Syncing to {name}","penzor.sync.toFolder":"Syncing to a local folder","penzor.sync.decideAbove":"Choose in the card above","penzor.sync.kvSchedule":"Schedule","penzor.sync.kvDirection":"Direction","penzor.sync.kvSkipped":"Not uploaded","penzor.sync.kvWhere":"In the cloud","penzor.sync.change":"Change","penzor.sync.open":"Open","penzor.sync.dir.both":"Both ways","penzor.sync.dir.push":"Upload only","penzor.sync.dir.pull":"Download only","penzor.sync.skippedN":"{n} files over {size}","penzor.sync.where":"{ledger} \u203A {vault}","penzor.sync.whereUsed":"{ledger} \u203A {vault} \xB7 {used} / {max}","penzor.sync.devicesTitle":"Devices syncing","penzor.sync.thisOne":"This computer","penzor.sync.lastWrite":"Last write {time}","penzor.sync.noDevices":"No devices are syncing yet","penzor.sync.phoneTitle":"What your phone and the web see","penzor.sync.phoneTip":"Your phone and the web read the cloud vault (the cloud side of Amadeus, {size}) directly. It always syncs, and it\u2019s a separate copy from this computer\u2019s notes vault above. To see a folder from this computer on your phone, right-click it in your notes and sync it to the cloud vault.","penzor.sync.phoneTipPlain":"Your phone and the web read the cloud vault (the cloud side of Amadeus) directly. It always syncs, and it\u2019s a separate copy from this computer\u2019s notes vault above. To see a folder from this computer on your phone, right-click it in your notes and sync it to the cloud vault.","penzor.sync.foot":"Schedule, direction and other storage (Dropbox / S3 / WebDAV) are in","penzor.sync.footLink":"Settings \u203A Sync","penzor.sync.askTitle":"There\u2019s already a notes vault in the cloud","penzor.sync.askCloud":"The cloud copy is from {device}: {files} files \xB7 {size}.","penzor.sync.askCloudNoDevice":"The cloud copy: {files} files \xB7 {size}.","penzor.sync.askLocal":"This computer has {local} files the cloud copy doesn\u2019t, and {conflicts} that differ.","penzor.sync.askMerge":"Merge both","penzor.sync.askCloudBtn":"Use the cloud copy","penzor.sync.askSkip":"Don\u2019t sync notes on this computer yet","penzor.sync.askExplain":"Merge keeps both sides; files that differ are saved again as a \u201C(conflict)\u201D copy. Use the cloud copy first moves this computer\u2019s differing files into a \u201C{backup}\u201D folder next to the vault, then downloads the cloud copy.","penzor.sync.askConfirm":"This computer\u2019s differing files move to \u201C{backup}\u201D first, then the cloud copy replaces them.","penzor.sync.askConfirmGo":"Move them and use the cloud copy","penzor.sync.backupName":"{name} backup before sync {date}","penzor.sync.quotaTitle":"Your notes vault is {size}, over the {max} limit of {ledger}","penzor.sync.quotaTitlePlain":"Your notes vault is over the {ledger} limit","penzor.sync.quotaBody":"Files that don\u2019t fit stay on this computer. Nothing is deleted, they just aren\u2019t uploaded, and everything else keeps syncing.","penzor.sync.quotaLarge":"Single files over {size} are never uploaded ({n}).","penzor.sync.quotaSee":"See what\u2019s not uploaded"},Js={zh:mf,en:gf},Qe=e=>e==="en"?"en":"zh";function Te(e,t,n){let o=Js[e][t]??Js.zh[t]??t;return n?o.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):o}var ho=e=>(t,n)=>Te(e,t,n),bt=(e,t)=>"raw"in e?e.raw:t(e.key,e.vars);var Ys=`
|
|
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,
|
|
@@ -564,7 +564,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
|
|
|
564
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
565
|
.fx-acct .fx-sub-item > .btn { justify-self: start; }
|
|
566
566
|
.fx-acct .fx-sub-item > .fx-note { margin: 0; overflow-wrap: anywhere; }
|
|
567
|
-
`,
|
|
567
|
+
`,Zs=`
|
|
568
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; }
|
|
569
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; }
|
|
570
570
|
.fx-ann:focus { outline: none; }
|
|
@@ -591,7 +591,7 @@ html[data-glass='off'] .fx-ann-backdrop { backdrop-filter: none; background: var
|
|
|
591
591
|
@media (prefers-reduced-motion: reduce) {
|
|
592
592
|
.fx-ann-backdrop, .fx-ann, .fx-ann-eyebrow, .fx-ann-title, .fx-ann-body, .fx-ann-ok { animation: none; }
|
|
593
593
|
}
|
|
594
|
-
`,
|
|
594
|
+
`,Qs=`
|
|
595
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; }
|
|
596
596
|
.doc > :first-child { margin-top: 0; }
|
|
597
597
|
.doc > :last-child { margin-bottom: 0; }
|
|
@@ -615,7 +615,7 @@ img { border-radius: var(--radius-sm); }
|
|
|
615
615
|
hr { margin: 16px 0; border: 0; border-top: var(--border-width) solid var(--border); }
|
|
616
616
|
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
|
|
617
617
|
strong, b { font-weight: 650; }
|
|
618
|
-
`;var Rn=e=>typeof e=="string"?e:"";function Bu(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id.trim():typeof t.id=="number"&&Number.isFinite(t.id)?String(t.id):"",r=Rn(t.titleZh),a=Rn(t.bodyZh);return!n||!r.trim()&&!a.trim()?null:{id:n,titleZh:r,titleEn:Rn(t.titleEn).trim()?Rn(t.titleEn):null,bodyZh:a,bodyEn:Rn(t.bodyEn).trim()?Rn(t.bodyEn):null,format:t.format==="html"?"html":"markdown",publishedAt:Rn(t.publishedAt)||null}}function Uu(e,t){return t==="en"&&e.bodyEn?{lang:"en",title:e.titleEn??e.titleZh,body:e.bodyEn}:{lang:"zh",title:e.titleZh,body:e.bodyZh}}var qu=new la({gfm:!0,breaks:!0}),Hu=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Vu=/^(?:https?:|mailto:|#)/i;function Vs(e){return Jr.sanitize(e,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:Hu,ALLOWED_URI_REGEXP:Vu})}function Wu(e,t){let n=t==="markdown"?qu.parse(e,{async:!1}):e;return Vs(n)}var ur=null;function ju(){if(ur===null)try{let e=Vs('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');ur=Jr.isSupported&&!e.querySelector("script, iframe, [onclick], a[href]")}catch{ur=!1}return ur}function Gu(e){try{let t=new URL(String(e??"").trim());return t.protocol==="http:"||t.protocol==="https:"?t.href:null}catch{return null}}var Xu="http://www.w3.org/1999/xlink";function fr(e){let t=e.target,n=t&&typeof t.closest=="function"?t.closest("a, area"):null;if(!n||(e.preventDefault(),e.type!=="click"))return;let r=Gu(n.getAttribute("href")??n.getAttributeNS(Xu,"href"));if(r)try{ee().openExternal?.(r)?.catch(()=>{})}catch{}}function Hs(e){return e.shadowRoot??e.attachShadow({mode:"open"})}function Ku(e){let{ctx:t,ann:n}=e,[r,a]=T(()=>Qe(t.getLocale?.()));X(()=>{a(Qe(t.getLocale?.()));let u=t.subscribeLocale?.(h=>a(Qe(h)));return()=>{typeof u=="function"&&u()}},[t]);let i=At(()=>pr(r),[r]),s=Uu(n,r),l=J(null),c=J(null),d=J(null),f=J(null),p=J(e.onClose);return p.current=e.onClose,X(()=>{let u=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let h=y=>{if(y.key==="Escape"){y.preventDefault(),y.stopPropagation(),p.current();return}if(y.key!=="Tab")return;let _=c.current,C=d.current,x=l.current;if(!_||!C||!x)return;let k=document.activeElement;if(!k||!x.contains(k)){y.preventDefault(),(y.shiftKey?C:_).focus();return}y.shiftKey&&(k===_||k===x)?(y.preventDefault(),C.focus()):!y.shiftKey&&k===C&&(y.preventDefault(),_.focus())},m=y=>{let _=l.current;_&&y.target instanceof Node&&!_.contains(y.target)&&_.focus()};return window.addEventListener("keydown",h,!0),document.addEventListener("focusin",m,!0),()=>{window.removeEventListener("keydown",h,!0),document.removeEventListener("focusin",m,!0),u?.isConnected&&u.focus()}},[]),X(()=>{let u=f.current;if(!u)return;let h=Hs(u);return h.addEventListener("click",fr),h.addEventListener("auxclick",fr),()=>{h.removeEventListener("click",fr),h.removeEventListener("auxclick",fr)}},[]),X(()=>{let u=f.current;if(!u)return;let h=document.createElement("style");h.textContent=qs;let m=document.createElement("div");m.className="doc",m.appendChild(Wu(s.body,n.format)),Hs(u).replaceChildren(h,m)},[s.body,n.format]),o("div",{class:"fx-ann-backdrop",children:[o("style",{children:Us}),o("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[o("button",{ref:c,type:"button",class:"fx-ann-close","aria-label":i("ann.close"),onClick:()=>p.current(),children:o(W,{name:"x",size:16})}),o("div",{class:"fx-ann-eyebrow",children:i("ann.eyebrow")}),o("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),o("div",{class:"fx-ann-body",children:o("div",{ref:f,id:"fx-ann-body",class:"fx-ann-doc"})}),o("div",{class:"fx-ann-footer",children:o("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>p.current(),children:i("ann.ok")})})]})]})}function Ju(e){try{return new URLSearchParams(e||"").has("window")}catch{return!1}}function Yu(e=document,t=12e3){let n=e.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let a=()=>{i.disconnect(),clearTimeout(s),r()},i=new MutationObserver(()=>{n.isConnected||a()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(a,t)}):Promise.resolve()}function Ws(e,t=window){let n=t?.tangu;if(!e||!n?.cloudFetch||n.unitPage||Ju(t.location?.search))return null;let r=0,a=!1,i=null,s=null,l=()=>{s?.done(),s=null},c=Promise.resolve(),d=(u,h)=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let y=!1,_=C=>{y||(y=!0,i?.id===u.id&&(i=null),Be(null,m),m.remove(),h?.done(),C&&(c=H(`/announcements/${encodeURIComponent(u.id)}/seen`,{method:"POST"})))};i={id:u.id,finish:_},Be(o(Ku,{ctx:e,ann:u,onClose:()=>_(!0)}),m)},f=async()=>{let u=++r;await c;let h=await H("/announcements/pending");if(a||u!==r||!h.ok)return;let m=Bu(h.data?.announcement);if(!m||i||!ju()||(await Yu(),a||u!==r||i))return;let y=e.app?.queuePopup?.();if(y&&(l(),s=y,await y.ready,s===y&&(s=null),a||u!==r||i)){y.done();return}d(m,y)},p=n.onAuthChanged?.(u=>{i?.finish(!1),l(),u?.loggedIn?f():r++});return f(),{check:f,dispose(){a=!0,r++,typeof p=="function"&&p(),i?.finish(!1),l()}}}function js(e){return typeof e!="string"?{ok:!1,rule:"format"}:e.length<8?{ok:!1,rule:"min"}:e.length>64?{ok:!1,rule:"max"}:/\s/.test(e)?{ok:!1,rule:"space"}:/[a-z]/.test(e)?/[A-Z]/.test(e)?/[^A-Za-z0-9]/.test(e)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function Gs(e){return{length:e.length>=8&&e.length<=64,lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),special:/[^A-Za-z0-9]/.test(e),space:e.length>0&&!/\s/.test(e)}}var Xs={\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 Ks={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"},Js={"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"},wa={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 Zu(e){if(e.code&&Ks[e.code])return Ks[e.code];if(e.detail){if(Js[e.detail])return Js[e.detail];let t=Xs[e.detail];if(t)return wa[t];if(e.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function dt(e){let t=Zu(e);return t?{key:t}:Mn(e)?{key:"err.signedOut"}:e.status===0?{key:"err.network"}:e.status===401?{key:"err.session"}:e.status===429?{key:"err.tooFrequent"}:e.detail?{raw:e.detail}:e.status>=500?{key:"err.server",vars:{status:e.status}}:{key:"err.generic"}}function Co(e){let t=e.trim();return t?/cancelled\.?$/i.test(t)?null:t==="A sign-in is already in progress."?{key:"err.loginInProgress"}:t.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:t.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:t.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:t.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:t.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:t.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:t}:{key:"err.generic"}}var za=ir(null);function K(){let e=ya(za);if(!e)throw new Error("forsion-extend: page rendered outside its host root");return e}var Pt=()=>K().t;function Ue(){let e=J(!0);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var Ys={pending:!1,error:null,success:null,captcha:!1};function re(){let e=Ue(),[t,n]=T(Ys),r=J(!1),a=Qt(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,e.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=Qt(()=>{r.current||n(Ys)},[]);return{...t,run:a,clear:i}}var Ae=e=>({error:dt(e),captcha:e.status===403&&e.code==="CAPTCHA_FAILED"});function Zs(){let[e,t]=T(0),n=J(null);X(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=Qt((i=60)=>{n.current&&clearInterval(n.current),t(i),n.current=setInterval(()=>{t(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),a=Qt(()=>{n.current&&clearInterval(n.current),n.current=null,t(0)},[]);return{left:e,start:r,stop:a}}function Re(e){let[t,n]=T({state:"loading"}),r=J(0),a=J(e);a.current=e;let i=Qt((c=!1)=>{let d=++r.current;c||n({state:"loading"}),(async()=>{let f;try{f=await a.current()}catch(p){f={ok:!1,status:0,code:null,detail:null,transport:String(p?.message||p)}}d===r.current&&(f.ok?n({state:"ready",data:f.data,gen:d}):Mn(f)?n({state:"signedOut"}):(f.status===401&&ee().authStatus?.().catch(()=>{}),n({state:"error",fail:f})))})()},[]);X(()=>{i();let c=ee().onAuthChanged?.(()=>i());return()=>{r.current++,c?.()}},[i]);let s=Qt(()=>i(),[i]),l=Qt(()=>i(!0),[i]);switch(t.state){case"ready":{let c=t.gen,d=f=>n(p=>p.state==="ready"&&p.gen===c?{...p,data:f(p.data)}:p);return{state:"ready",data:t.data,reload:l,update:d}}case"error":return{state:"error",error:dt(t.fail),retry:s};default:return t}}function mr(e){let t=String(e||"").trim();if(!t)return"";let n=t.startsWith("+")?4:3;return t.length<=n+4?`${t.slice(0,2)}***`:`${t.slice(0,n)}****${t.slice(-4)}`}function gr(e){let t=String(e||"").trim(),n=t.lastIndexOf("@");if(n<=0)return t?`${t.slice(0,1)}***`:"";let r=t.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${t.slice(n)}`}function To(e){let t=String(e||"").trim().toLowerCase()||"free";return t.charAt(0).toUpperCase()+t.slice(1)}var Qu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Qs(e,t){let n=String(e||"").trim(),r,a,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)r=Number(i[2]),a=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(c=>c.type==="month")?.value),a=Number(l.find(c=>c.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:t==="zh"?`${r}\u6708${a}\u65E5`:`${Qu[r-1]} ${a}`}var _a=e=>e==="zh"?"zh-CN":"en-US";function el(e){if(e==null||e==="")return null;let t=new Date(typeof e=="string"&&/^\d+$/.test(e)?Number(e):e);return Number.isNaN(t.getTime())?null:t}function hr(e,t){let n=el(e);return n?new Intl.DateTimeFormat(_a(t),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Ut(e,t){let n=el(e);return n?new Intl.DateTimeFormat(_a(t),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function we(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?new Intl.NumberFormat(_a(t),{maximumFractionDigits:2}).format(n):"\u2014"}var Ln=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Ln||{}),ef=[0,1],nl=[1,0],ol=[2,3],rl=[3,2],tf={L:ef,M:nl,Q:ol,H:rl},nf=/^\d*$/,of=/^[A-Z0-9 $%*+./:-]*$/,Sa="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Ea=1,Pa=40,tl=3,rf=3,br=40,af=10,al=[[-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]],il=[[-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]],Ca=class{constructor(t,n,r,a){if(this.version=t,this.ecc=n,t<Ea||t>Pa)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let d=this.getPenaltyScore();d<l&&(a=c,l=d),this.applyMask(c)}}this.mask=a,this.applyMask(a),this.drawFormatBits(a)}size;mask;modules=[];types=[];getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,Ln.Timing),this.setFunctionModule(r,6,r%2===0,Ln.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),n=t.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||this.drawAlignmentPattern(t[r],t[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let n=this.ecc[1]<<3|t,r=n;for(let i=0;i<10;i++)r=r<<1^(r>>>9)*1335;let a=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,en(a,i));this.setFunctionModule(8,7,en(a,6)),this.setFunctionModule(8,8,en(a,7)),this.setFunctionModule(7,8,en(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,en(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,en(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,en(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;let n=this.version<<12|t;for(let r=0;r<18;r++){let a=en(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,a),this.setFunctionModule(s,i,a)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let i=Math.max(Math.abs(a),Math.abs(r)),s=t+a,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,Ln.Position)}}drawAlignmentPattern(t,n){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(t+a,n+r,Math.max(Math.abs(a),Math.abs(r))!==1,Ln.Alignment)}setFunctionModule(t,n,r,a=Ln.Function){this.modules[n][t]=r,this.types[n][t]=a}addEccAndInterleave(t){let n=this.version,r=this.ecc;if(t.length!==vr(n,r))throw new RangeError("Invalid argument");let a=il[r[0]][n],i=al[r[0]][n],s=Math.floor(Ta(n)/8),l=a-s%a,c=Math.floor(s/a),d=[],f=gf(i);for(let u=0,h=0;u<a;u++){let m=t.slice(h,h+c-i+(u<l?0:1));h+=m.length;let y=hf(m,f);u<l&&m.push(0),d.push(m.concat(y))}let p=[];for(let u=0;u<d[0].length;u++)d.forEach((h,m)=>{(u!==c-i||m>=l)&&p.push(h[u])});return p}drawCodewords(t){if(t.length!==Math.floor(Ta(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let a=0;a<this.size;a++)for(let i=0;i<2;i++){let s=r-i,c=(r+1&2)===0?this.size-1-a:a;!this.types[c][s]&&n<t.length*8&&(this.modules[c][s]=en(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let a;switch(t){case 0:a=(r+n)%2===0;break;case 1:a=n%2===0;break;case 2:a=r%3===0;break;case 3:a=(r+n)%3===0;break;case 4:a=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:a=r*n%2+r*n%3===0;break;case 6:a=(r*n%2+r*n%3)%2===0;break;case 7:a=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&a&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(l++,l===5?t+=tl:l>5&&t++):(this.finderPenaltyAddHistory(l,c),s||(t+=this.finderPenaltyCountPatterns(c)*br),s=this.modules[i][d],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,c)*br}for(let i=0;i<this.size;i++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(l++,l===5?t+=tl:l>5&&t++):(this.finderPenaltyAddHistory(l,c),s||(t+=this.finderPenaltyCountPatterns(c)*br),s=this.modules[d][i],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,c)*br}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(t+=rf)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return t+=a*af,t}getAlignmentPatternPositions(){if(this.version===1)return[];{let t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,r=[6];for(let a=this.size-7;r.length<t;a-=n)r.splice(1,0,a);return r}}finderPenaltyCountPatterns(t){let n=t[1],r=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}};function tn(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function en(e,t){return(e>>>t&1)!==0}var Ao=class{constructor(t,n,r){if(this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},sf=[1,10,12,14],lf=[2,9,11,13],cf=[4,8,16,16];function sl(e,t){return e[Math.floor((t+7)/17)+1]}function ll(e){let t=[];for(let n of e)tn(n,8,t);return new Ao(cf,e.length,t)}function df(e){if(!cl(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length-n,3);tn(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new Ao(sf,e.length,t)}function pf(e){if(!dl(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t=[],n;for(n=0;n+2<=e.length;n+=2){let r=Sa.indexOf(e.charAt(n))*45;r+=Sa.indexOf(e.charAt(n+1)),tn(r,11,t)}return n<e.length&&tn(Sa.indexOf(e.charAt(n)),6,t),new Ao(lf,e.length,t)}function uf(e){return e===""?[]:cl(e)?[df(e)]:dl(e)?[pf(e)]:[ll(mf(e))]}function cl(e){return nf.test(e)}function dl(e){return of.test(e)}function ff(e,t){let n=0;for(let r of e){let a=sl(r.mode,t);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function mf(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function Ta(e){if(e<Ea||e>Pa)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function vr(e,t){return Math.floor(Ta(e)/8)-al[t[0]][e]*il[t[0]][e]}function gf(e){if(e<1||e>255)throw new RangeError("Degree out of range");let t=[];for(let r=0;r<e-1;r++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let a=0;a<t.length;a++)t[a]=Aa(t[a],n),a+1<t.length&&(t[a]^=t[a+1]);n=Aa(n,2)}return t}function hf(e,t){let n=t.map(r=>0);for(let r of e){let a=r^n.shift();n.push(0),t.forEach((i,s)=>n[s]^=Aa(i,a))}return n}function Aa(e,t){if(e>>>8||t>>>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^=(t>>>r&1)*e;return n}function bf(e,t,n=1,r=40,a=-1,i=!0){if(!(Ea<=n&&n<=r&&r<=Pa)||a<-1||a>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let p=vr(s,t)*8,u=ff(e,s);if(u<=p){l=u;break}if(s>=r)throw new RangeError("Data too long")}for(let p of[nl,ol,rl])i&&l<=vr(s,p)*8&&(t=p);let c=[];for(let p of e){tn(p.mode[0],4,c),tn(p.numChars,sl(p.mode,s),c);for(let u of p.getData())c.push(u)}let d=vr(s,t)*8;tn(0,Math.min(4,d-c.length),c),tn(0,(8-c.length%8)%8,c);for(let p=236;c.length<d;p^=253)tn(p,8,c);let f=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((p,u)=>f[u>>>3]|=p<<7-(u&7)),new Ca(s,t,f,a)}function pl(e,t){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=t||{},c=typeof e=="string"?uf(e):Array.isArray(e)?[ll(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let d=bf(c,tf[n],a,i,s,r),f=vf({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return t?.invert&&(f.data=f.data.map(p=>p.map(u=>!u))),t?.onEncoded?.(f),f}function vf(e,t=1){if(!t)return e;let{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(i=>{for(let s=0;s<t;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:r},s=>!1)),e.data.push(Array.from({length:r},s=>!1));let a=Ln.Border;e.types.forEach(i=>{for(let s=0;s<t;s++)i.unshift(a),i.push(a)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:r},s=>a)),e.types.push(Array.from({length:r},s=>a));return e}function fe(e){return o("section",{class:`settings-panel fx-panel${e.danger?" fx-panel--danger":""}`,"aria-label":e.label,children:[o("div",{class:`settings-panel-head${e.actions?" settings-panel-head--actions":""}`,children:[e.icon&&o("span",{class:"settings-panel-icon",children:o(W,{name:e.icon,size:16})}),o("div",{children:[o("strong",{children:e.title}),e.desc&&o("p",{children:e.desc})]}),e.actions&&o("div",{class:"settings-panel-actions settings-panel-actions--wide",children:e.actions})]}),e.children]})}function Le(e){return o("div",{class:`settings-control-row settings-setting-row fx-row fx-block${e.class?` ${e.class}`:""}`,children:[o("div",{class:"settings-control-copy",children:o("span",{children:[o("strong",{children:e.label}),e.desc&&o("small",{children:e.desc})]})}),e.children!==void 0&&e.children!==null&&o("div",{class:"settings-row-control fx-row-control",children:e.children})]})}function ze(e){return o("div",{class:`fx-sub${e.class?` ${e.class}`:""}`,children:e.children})}function Mt(e){return o("button",{type:"button",role:"switch","aria-checked":e.checked,"aria-label":e.label,class:`settings-switch${e.checked?" active":""}`,disabled:e.disabled,onClick:()=>e.onChange(!e.checked),children:o("span",{})})}function U(e){let t=e.variant??"ghost",n=t==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${t}`;return o("button",{type:e.submit?"submit":"button",class:n,disabled:e.disabled||e.pending,"aria-busy":e.pending||void 0,"aria-label":e.label,title:e.title,"data-armed":e.armed?"true":void 0,onClick:e.onClick,children:[e.pending&&o(Yn,{}),e.children]})}var yf=5e3;function nn(e){let[t,n]=T(!1),r=J(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};X(()=>()=>{r.current&&clearTimeout(r.current)},[]),X(()=>{(e.pending||e.disabled)&&a()},[e.pending,e.disabled]);let i=()=>{if(!t){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},yf);return}a(),e.onConfirm()},s=e.variant??"ghost";return o(U,{variant:t?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:t,pending:e.pending,disabled:e.disabled,onClick:i,children:t?e.confirmLabel:e.label})}function ae(e){let t=Pt(),{a:n}=e;return n.error?o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:bt(n.error,t)}),n.captcha&&o("button",{type:"button",class:"fx-link",onClick:()=>void In(e.captchaSection??"security"),children:[t("common.openInBrowser")," ",o(W,{name:"external",size:12})]})]}):n.success?o("div",{class:"fx-msg is-ok",role:"status",children:bt(n.success,t)}):null}function ie(e){return o("p",{class:`fx-note${e.tone?` is-${e.tone}`:""}`,children:e.children})}function rt(e){return o("div",{class:"settings-empty-row fx-block",children:e.children})}function Eo(e){let t=Pt(),n=e.display;return o("div",{class:`fx-quota${n.low?" is-low":""}`,children:[o("div",{class:"fx-quota-top",children:[o("span",{class:"fx-quota-label",children:e.label}),o("span",{class:"fx-quota-value",children:n.unlimited?t("common.unlimited"):n.text})]}),o("div",{class:"fx-bar",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?t("common.unlimited"):n.text,children:o("span",{style:{width:`${n.pct}%`}})}),e.note&&o("div",{class:"fx-quota-note",children:e.note})]})}function It(e){return o("div",{class:"seg fx-seg",role:"radiogroup","aria-label":e.label,children:e.options.map(t=>o("button",{type:"button",role:"radio","aria-checked":t.value===e.value,class:t.value===e.value?"active":"",onClick:()=>{t.value!==e.value&&e.onChange(t.value)},children:t.label}))})}async function xf(e){try{return await navigator.clipboard.writeText(e),!0}catch{try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let n=document.execCommand("copy");return t.remove(),n}catch{return!1}}}function qt(e){let t=Pt(),[n,r]=T("idle"),a=J(null);X(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await xf(e.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return o(U,{disabled:e.disabled||!e.text,onClick:()=>void i(),children:[o(W,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?t("common.copied"):n==="failed"?t("common.copyFailed"):e.label]})}function kf(e){let t=At(()=>{try{return pl(e.value,{ecc:"M",border:2})}catch{return null}},[e.value]);if(!t)return null;let n="";t.data.forEach((a,i)=>a.forEach((s,l)=>{s&&(n+=`M${l} ${i}h1v1h-1z`)}));let r=e.size??148;return o("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${t.size} ${t.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":e.label,children:[o("rect",{width:t.size,height:t.size,fill:"#fff"}),o("path",{d:n,fill:"#000"})]})}function Ma(e){let t=Pt(),{device:n}=e;return o("div",{class:"fx-device",children:[o(kf,{value:n.url,label:t("signin.qrLabel")}),o("div",{class:"fx-device-copy",children:[o("p",{children:t("signin.deviceHint")}),n.userCode&&o("div",{class:"fx-device-code",children:[o("span",{children:t("signin.code")}),o("code",{children:n.userCode})]}),o("div",{class:"fx-inline",children:[o("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[t("signin.openLink")," ",o(W,{name:"external",size:12})]}),o(qt,{text:n.url,label:t("signin.copyLink")})]})]})]})}function De(){let e=Pt(),t=re(),[n,r]=T(null);X(()=>ee().onAuthDevice?.(i=>r(i)),[]);let a=()=>void t.run(async()=>{let i=ee().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let l=Co(Et(s));return l?{error:l}:void 0}});return o("section",{class:"settings-panel fx-panel fx-signin","aria-label":e("signin.button"),children:o("div",{class:"settings-state fx-signin-body",children:[o("span",{class:"settings-state-icon",children:o(W,{name:"user",size:18})}),o("p",{class:"fx-signin-lead",children:e("signin.desc")}),o("div",{class:"settings-state-actions",children:o(U,{variant:"primary",pending:t.pending,onClick:a,children:t.pending?e("signin.pending"):e("signin.button")})}),n&&o(Ma,{device:n}),o(ae,{a:t})]})})}function Te(e){let t=Pt(),n=e.panels??2,r=e.rows??2;return o("div",{class:"fx-skeleton","aria-busy":"true","aria-label":t("common.loading"),children:Array.from({length:n},(a,i)=>o("section",{class:"settings-panel fx-panel",children:[o("div",{class:"settings-panel-head",children:[o("span",{class:"fx-skel fx-skel--icon"}),o("div",{children:[o("span",{class:"fx-skel fx-skel--title"}),o("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,l)=>o("div",{class:"settings-control-row",children:o("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function Oe(e){let t=Pt();return o("section",{class:"settings-panel fx-panel",children:o("div",{class:"settings-state fx-error-state",role:"alert",children:[o("span",{class:"settings-state-icon",children:o(W,{name:"alert",size:18})}),o("strong",{children:t("common.loadFailed")}),o("p",{children:bt(e.error,t)}),o("div",{class:"settings-state-actions",children:o(U,{variant:"primary",onClick:e.onRetry,children:[o(W,{name:"refresh",size:12})," ",t("common.retry")]})})]})})}function fl(){let{t:e}=K(),t=Re(()=>H("/auth/me"));if(t.state==="loading")return o(Te,{panels:2});if(t.state==="signedOut")return o(De,{});if(t.state==="error")return o(Oe,{error:t.error,onRetry:t.retry});let n=t.data;return o(R,{children:[o(fe,{icon:"user",title:e("account.details.title"),desc:e("account.details.desc"),children:[o(Le,{label:e("account.details.username"),children:[o("span",{class:"fx-value",children:n.username}),n.role==="ADMIN"&&o("span",{class:"fx-tag",children:e("account.role.admin")})]}),o(ul,{kind:"phone",value:n.phone}),o(ul,{kind:"email",value:n.email})]}),o(wf,{}),o(_f,{})]})}function ul(e){let{t,goTo:n}=K(),r=!!e.value,a=r?e.kind==="phone"?mr(e.value):gr(e.value):t("account.contact.unbound"),i=e.kind==="phone"?t("account.contact.phone"):t("account.contact.email");return o(Le,{label:i,children:n?o("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:t("account.contact.manage"),children:[o("span",{children:a}),o(W,{name:"chevron",size:12})]}):o("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function wf(){let{t:e}=K(),t=Ue(),[n,r]=T(null),[a,i]=T(!1),[s,l]=T(null),[c,d]=T(null),f=re(),p=re(),u=re(),h=!!ee().authAccounts;X(()=>{let x=0,k=()=>{let q=ee().authAccounts;if(!q)return;let N=++x;i(!1),q().then(B=>{N===x&&r(Array.isArray(B)?B:[])}).catch(()=>{N===x&&i(!0)})};k();let A=ee().onAuthChanged?.(k),O=ee().onAuthDevice?.(q=>d(q));return()=>{x++,A?.(),O?.()}},[]);let m=x=>{l(x),f.run(async()=>{let k=ee().forsionSwitchAccount;if(!k)return{error:{key:"err.unavailable"}};try{await k(x)}catch(A){let O=Co(Et(A));return O?{error:O}:void 0}finally{t.current&&l(null)}})},y=()=>void p.run(async()=>{let x=ee().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(k){t.current&&d(null);let A=Co(Et(k));return A?{error:A}:void 0}}),_=()=>void u.run(async()=>{let x=ee().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(k){return{error:{raw:Et(k)||e("err.generic")}}}}),C=f.pending||p.pending||u.pending;return o(fe,{icon:"laptop",title:e("local.title"),desc:e("local.desc"),children:[h&&n===null&&!a&&o(rt,{children:[o(Yn,{})," ",e("common.loading")]}),a&&o("div",{class:"fx-sub",children:o(ie,{tone:"warn",children:e("local.loadFailed")})}),n&&n.length===0&&o(rt,{children:e("local.empty")}),n&&n.length>0&&o("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-icon",children:o(W,{name:"user",size:14})}),o("span",{class:"fx-list-main",children:[o("strong",{children:x.nickname||x.username||"Forsion"}),o("small",{children:[x.username&&x.nickname?x.username:null,zf(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?o("span",{class:"fx-tag fx-tag--accent",children:[o(W,{name:"check",size:11})," ",e("local.current")]}):o(U,{pending:s===x.id,disabled:C&&s!==x.id,onClick:()=>m(x.id),children:e("local.switch")})]},x.id))}),p.pending&&c&&o("div",{class:"fx-sub",children:o(Ma,{device:c})}),o("div",{class:"settings-panel-footer fx-footer",children:[o(U,{pending:p.pending,disabled:C&&!p.pending,onClick:y,children:[o(W,{name:"plus",size:12})," ",p.pending?e("signin.pending"):e("local.add")]}),o(U,{pending:u.pending,disabled:C&&!u.pending,onClick:_,children:[o(W,{name:"logout",size:12})," ",e("local.signOut")]})]}),(f.error||p.error||u.error)&&o("div",{class:"fx-sub fx-sub--tight",children:[o(ae,{a:f}),o(ae,{a:p}),o(ae,{a:u})]})]})}function zf(e){try{return new URL(e).host}catch{return e}}function _f(){let{t:e}=K(),t=re();return o("div",{class:"fx-page-foot",children:[o("button",{type:"button",class:"fx-link",disabled:t.pending,onClick:()=>void t.run(async()=>await In()?void 0:{error:{key:"err.openFailed"}}),children:[e("account.web.open")," ",o(W,{name:"external",size:12})]}),o("span",{class:"fx-muted",children:e("account.web.desc")}),o(ae,{a:t})]})}var Dn=class extends Error{};async function ml(e,t=256){if(e.size>20971520)throw new Dn;let n=URL.createObjectURL(e);try{let r=new Image;await new Promise((f,p)=>{r.onload=()=>f(),r.onerror=()=>p(new Error("image decode failed")),r.src=n});let a=r.naturalWidth,i=r.naturalHeight;if(!a||!i)throw new Error("empty image");if(a*i>5e7)throw new Dn;let s=Math.min(1,t/Math.max(a,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*s)),l.height=Math.max(1,Math.round(i*s));let c=l.getContext("2d");if(!c)throw new Error("canvas unavailable");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height),c.drawImage(r,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new Dn;return d}finally{URL.revokeObjectURL(n)}}function gl(e){let t=String(e||"").trim();if(!t)return"?";let n=Array.from(t)[0];return/[㐀-鿿]/.test(n)?n:Array.from(t).slice(0,2).join("").toUpperCase()}var hl=["cream","coral","teal","lavender"],bl=["auto","light","dark"],vl=["none","mist","contour","dots"],yl=["none","ring","pro"],xl=["early","streak","author","inviter","event"];var kl=e=>`/u/${encodeURIComponent(e)}`,Ia=e=>!!e&&e.toLowerCase()!=="free";function Ra(e,t){let n={...e.settings,...t};return{...e,settings:n,bio:n.bio,links:n.links,skin:n.skin,mode:n.mode,cover:n.cover,frame:n.frame==="pro"&&!Ia(e.tier)?"none":n.frame,modules:n.modules.filter(r=>r.show).map(r=>({id:r.id}))}}function La(e,t,n){let r=e.findIndex(s=>s.id===t),a=r+n;if(r<0||a<0||a>=e.length)return e;let i=e.slice();return[i[r],i[a]]=[i[a],i[r]],i}function wl(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`,r;try{r=new URL(n)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||!r.hostname.includes("."))return null;let a=r.toString();return a.length<=200?a:null}function Da(e){return e.replace(/^https?:\/\//i,"").replace(/^www\./i,"").replace(/\/$/,"")}function zl(e,t){let n=t==="zh"?[[1e8,"\u4EBF"],[1e4,"\u4E07"]]:[[1e9,"B"],[1e6,"M"],[1e3,"K"]];for(let[r,a]of n)if(e>=r){let i=e/r;return{value:i>=100?String(Math.round(i)):String(Math.round(i*10)/10),unit:a}}return{value:Math.round(e).toLocaleString("en-US"),unit:""}}var _l=e=>e==="zh"?"zh-CN":"en-US";function Sl(e,t){let[n,r]=e.split("-").map(Number);if(!n||!r)return[];let a=new Intl.DateTimeFormat(_l(t),{month:"short",timeZone:"UTC"});return Array.from({length:12},(i,s)=>a.format(new Date(Date.UTC(n,r-12+s,1))))}function Cl(e,t){let[n,r]=e.split("-").map(Number);return!n||!r?"":new Intl.DateTimeFormat(_l(t),{year:"numeric",month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n,r-1,1)))}function Tl([e,t]){let n=r=>`${String((r%24+24)%24).padStart(2,"0")}:00`;return`${n(e)} \u2013 ${n(t)}`}function Al(e){let t=0,n=Promise.resolve(),r=()=>{let a=t;return e.read().then(i=>{a===t&&e.apply(i)})};return{read:r,write(a){let i=++t,s=n.then(a).then(l=>{i===t&&e.apply(l)});return n=s.catch(()=>i===t?r().catch(()=>{}):void 0),s}}}var Il={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"}},Pl={early:"sprout",streak:"flame",author:"box",inviter:"gift",event:"trophy"},Ml={plus:"Plus",pro:"Pro"},Oa=e=>!!e&&/^https?:\/\//i.test(e);function Fa(e){if(!Oa(e))return;let t=ee().openExternal;t?t(e).catch(()=>{}):window.open(e,"_blank","noopener")}async function Tf(){let e=ee().cloudInvoke;if(!e)return null;try{let t=await e("profile:publicOrigin");return t?.ok&&typeof t.origin=="string"&&/^https?:\/\/[^/]+$/i.test(t.origin)?t.origin:null}catch{return null}}async function Af(e,t,n){let r=await H(e,{method:t,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 Rl=e=>e&&typeof e=="object"&&e.ok===!1?dt(e):{raw:String(e?.message||e)};function Ll(){let{t:e}=K(),t=Re(async()=>{let[r,a,i]=await Promise.all([H("/profile/me"),H("/auth/me"),Tf()]);return a.ok?r.ok?r.data?.profile?{ok:!0,status:r.status,data:{profile:r.data.profile,me:a.data,origin:i}}:{ok:!0,status:404,data:null}:r.status===404?{ok:!0,status:404,data:null}:r:a});if(t.state==="loading")return o(Te,{panels:2,rows:3});if(t.state==="signedOut")return o(De,{});if(t.state==="error")return o(Oe,{error:t.error,onRetry:t.retry});if(!t.data)return o(fe,{icon:"user",title:e("page.profile"),children:o(rt,{children:e("profile.unsupported")})});let{update:n}=t;return o(Ef,{data:t.data,update:r=>n(a=>a&&r(a))})}function Ef(e){let{t}=K(),n=Ue(),{profile:r,me:a,origin:i}=e.data,[s,l]=T(null),[c,d]=T(null),[f,p]=T(!1),u=J(e.update);u.current=e.update;let h=(V,ne,pe)=>n.current?Af(V,ne,pe):Promise.reject(new Error("unmounted")),m=At(()=>Al({apply:V=>u.current(ne=>({...ne,profile:V})),read:()=>h("/profile/me")}),[]),y=a.username||r.username,_={...r,username:y,nickname:a.nickname||null},C=r.settings.isPublic,x=i?`${i}${kl(y)}`:null,k=V=>{n.current&&d({tone:"error",m:Rl(V)})},A=V=>{d(null),e.update(ne=>({...ne,profile:Ra(ne.profile,V)})),m.write(()=>h("/profile/me","PUT",V)).catch(k)},O=async V=>{e.update(ne=>({...ne,profile:Ra(ne.profile,{modules:ne.profile.settings.modules.map(pe=>({...pe,public:V.find(Ee=>Ee.id===pe.id)?.public??pe.public}))})})),await m.write(()=>h("/profile/me/visibility","POST",{public:!0,modules:V})),n.current&&(l(null),d({tone:"ok",m:{key:"profile.nowPublic"}}))},q=async()=>{p(!0),d(null);try{await m.write(()=>h("/profile/me/visibility","POST",{public:!1})),n.current&&d({tone:"ok",m:{key:"profile.nowPrivate"}})}catch(V){k(V)}finally{n.current&&p(!1)}},N=J(Promise.resolve()),B=(V,ne)=>{let pe=N.current.then(async()=>{if(!n.current)return;let Ee=await H("/settings",{method:"PUT",body:V});if(n.current){if(!Ee.ok)return d({tone:"error",m:dt(Ee)});u.current(v=>({...v,me:{...v.me,...V}})),d({tone:"ok",m:{key:ne}})}});return N.current=pe,pe},Y=async V=>{d(null);let ne;try{ne=await ml(V)}catch(pe){return d({tone:"error",m:{key:pe instanceof Dn?"err.avatarTooLarge":"err.avatarInvalid"}})}await B({avatar:ne},"account.avatar.saved")},se=V=>{d(null),l(ne=>ne===V?null:V)};return o("div",{class:"fx-pf-page",children:[o(fe,{icon:C?"globe":"lock",title:t(C?"profile.state.public":"profile.state.private"),desc:t(C?"profile.state.publicDesc":"profile.state.privateDesc"),actions:o(R,{children:[o(U,{onClick:()=>se("deco"),children:[o(W,{name:"palette",size:12})," ",t("profile.decorate")]}),C?o(U,{pending:f,onClick:()=>void q(),children:[o(W,{name:"lock",size:12})," ",t("profile.makePrivate")]}):o(U,{variant:"primary",onClick:()=>se("publish"),children:[o(W,{name:"globe",size:12})," ",t("profile.publish")]})]}),children:[C&&x&&o(Le,{label:t("profile.address"),desc:x.replace(/^https?:\/\//i,""),children:[o(qt,{text:x,label:t("profile.copyLink")}),o(U,{onClick:()=>Fa(x),children:[o(W,{name:"external",size:12})," ",t("profile.openPublic")]})]}),s==="publish"&&!C&&o(Pf,{profile:r,url:x,submit:O,onClose:()=>l(null)}),c&&o(ze,{class:"fx-sub--tight",children:o("div",{class:`fx-msg ${c.tone==="ok"?"is-ok":"is-error"}`,role:c.tone==="ok"?"status":"alert",children:bt(c.m,t)})})]}),o("div",{class:"fx-pf-home","data-deco":s==="deco"?"":void 0,children:[o("div",{class:"fx-pf-root",children:o(Lf,{view:_,avatar:a.avatar||null,pinned:r.settings.pinned,owner:{onAvatar:V=>void Y(V),onNickname:V=>{d(null),B({nickname:V},"account.nickname.saved")},onBio:V=>A({bio:V}),onLinks:V=>A({links:V}),onPinned:V=>A({pinned:V}),onInvalidLink:()=>d({tone:"error",m:{key:"profile.linkInvalid"}})}})}),s==="deco"&&o(Mf,{profile:r,onChange:A,onClose:()=>l(null)})]})]})}function Pf(e){let{t}=K(),n=Ue(),{profile:r}=e,[a,i]=T({}),s=r.settings.modules.filter(h=>h.show).map(h=>({...h,public:a[h.id]??h.public})),[l,c]=T(!1),[d,f]=T(null),p=r.canPublish?null:r.publishBlockedReason||"publish_blocked";if(p)return o(ze,{children:[o(ie,{children:t(p==="machine_username"?"profile.blocked.machineUsername":"profile.blocked.publishBlocked")}),o("div",{class:"fx-inline fx-pf-foot",children:[p==="machine_username"&&o(U,{variant:"primary",onClick:()=>void In("profile"),children:[t("profile.goRename")," ",o(W,{name:"external",size:12})]}),o(U,{onClick:e.onClose,children:t("common.cancel")})]})]});let u=async()=>{c(!0),f(null);try{await e.submit(s.map(({id:h,public:m})=>({id:h,public:m})))}catch(h){if(!n.current)return;f(Rl(h)),c(!1)}};return o(ze,{children:[e.url&&o("div",{class:"fx-pf-url",children:[o(W,{name:"globe",size:14}),o("span",{children:e.url.replace(/^https?:\/\//i,"")})]}),o(ie,{children:t("profile.publishDesc")}),o("div",{class:"fx-pf-checks",children:s.map(h=>o("div",{class:"fx-pf-check",children:[o("div",{children:[t(`profile.mod.${h.id}`),o("small",{children:t(`profile.modDesc.${h.id}`)})]}),o(Mt,{checked:h.public,disabled:l,label:`${t(`profile.mod.${h.id}`)} \xB7 ${t("profile.col.public")}`,onChange:m=>i(y=>({...y,[h.id]:m}))})]},h.id))}),o(ie,{children:t("profile.publishNever")}),d&&o("div",{class:"fx-msg is-error",role:"alert",children:bt(d,t)}),o("div",{class:"fx-inline fx-pf-foot",children:[o(U,{variant:"primary",pending:l,onClick:()=>void u(),children:t("profile.publishConfirm")}),o(U,{disabled:l,onClick:e.onClose,children:t("common.cancel")})]})]})}function Mf(e){let{t}=K(),n=e.profile.settings,r=Ia(e.profile.tier),a=(s,l)=>e.onChange({modules:n.modules.map(c=>c.id===s?{...c,...l}:c)}),i=s=>o("span",{class:"fx-pf-thumb",children:s});return o("aside",{class:"fx-pf-deco","aria-label":t("profile.decorate"),children:o(fe,{icon:"palette",title:t("profile.decorate"),actions:o(U,{onClick:e.onClose,children:t("common.done")}),children:o("div",{class:"fx-pf-deco-body",children:[o("h4",{children:t("profile.deco.cover")}),o("div",{class:"fx-pf-opts",children:vl.map(s=>o("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.cover===s,onClick:()=>e.onChange({cover:s}),children:[i(o("span",{class:`fx-pf-cv-thumb fx-pf-cv-${s}`})),t(`profile.cover.${s}`)]},s))}),o("h4",{children:t("profile.deco.frame")}),o("div",{class:"fx-pf-opts",children:yl.map(s=>o("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.frame===s,disabled:s==="pro"&&!r,title:s==="pro"&&!r?t("profile.frameProHint"):void 0,onClick:()=>e.onChange({frame:s}),children:[i(o("span",{class:`fx-pf-fr-demo fx-pf-fr-${s}`,children:o("span",{class:"fx-pf-av"})})),t(`profile.frame.${s}`)]},s))}),!r&&o(ie,{children:t("profile.frameProHint")}),o("h4",{children:t("profile.deco.modules")}),o("div",{class:"fx-pf-mod-head","aria-hidden":"true",children:[o("span",{children:t("profile.col.show")}),o("span",{children:t("profile.col.public")})]}),n.modules.map((s,l)=>o("div",{class:"fx-pf-mod",children:[o("span",{children:t(`profile.mod.${s.id}`)}),o("button",{type:"button",class:"fx-icon-btn",disabled:l===0,title:t("profile.moveUp"),"aria-label":`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.moveUp")}`,onClick:()=>e.onChange({modules:La(n.modules,s.id,-1)}),children:o(W,{name:"up",size:13})}),o("button",{type:"button",class:"fx-icon-btn",disabled:l===n.modules.length-1,title:t("profile.moveDown"),"aria-label":`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.moveDown")}`,onClick:()=>e.onChange({modules:La(n.modules,s.id,1)}),children:o(W,{name:"down",size:13})}),o(Mt,{checked:s.show,label:`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.col.show")}`,onChange:c=>a(s.id,{show:c})}),o(Mt,{checked:s.show&&s.public,disabled:!s.show,label:`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.col.public")}`,onChange:c=>a(s.id,{public:c})})]},s.id)),o(ie,{children:t("profile.modulesHint")}),o("h4",{children:t("profile.deco.skin")}),o("div",{class:"fx-pf-opts",children:hl.map(s=>o("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.skin===s,onClick:()=>e.onChange({skin:s}),children:[i(o("span",{class:"fx-pf-swatch","data-skin":s})),t(`profile.skin.${s}`)]},s))}),o("h4",{children:t("profile.deco.mode")}),o(It,{value:n.mode,label:t("profile.deco.mode"),onChange:s=>e.onChange({mode:s}),options:bl.map(s=>({value:s,label:t(`profile.mode.${s}`)}))}),o(ie,{children:t("profile.deco.publicHint")})]})})})}function Na(e){let[t,n]=T(null),r=J(!1),a=J(null),i=t!==null;So(()=>{i&&a.current?.focus()},[i]);let s=e.class?` ${e.class}`:"";if(t===null)return o("button",{type:"button",class:`fx-pf-ed${s}${e.value?"":" is-empty"}`,title:e.label,"aria-label":e.label,onClick:()=>{r.current=!1,n(e.value)},children:[o("span",{children:e.value||e.placeholder}),o(W,{name:e.value?"pencil":"plus",size:12})]});let l=()=>{let c=t.trim();n(null),!r.current&&c!==e.value&&e.onSave(c)};return o("span",{class:`fx-pf-ed-on${s}`,children:[o("input",{ref:a,class:"fx-input",type:"text",value:t,maxLength:e.maxLength,placeholder:e.placeholder,"aria-label":e.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()))}}),e.counter&&o("small",{children:[Array.from(t).length,"/",e.maxLength]})]})}function yr(e){return o("section",{class:"fx-pf-sec",style:{order:e.order},children:[o("div",{class:"fx-pf-sec-h",children:[o("h3",{children:e.title}),e.action]}),e.children]})}function If(e){let{t}=K(),{work:n}=e,r=Il[n.type],a=o(R,{children:[o("div",{class:"fx-pf-work-top",children:[o("span",{class:"fx-pf-work-ico",children:o(W,{name:r?.icon??"box",size:17})}),o("div",{children:[o("div",{class:"fx-pf-work-name",children:n.name}),o("div",{class:"fx-pf-work-type",children:r?t(r.key):n.type})]})]}),o("p",{children:n.summary}),(n.countKind!=="visits"||n.count>0)&&o("div",{class:"fx-pf-work-foot",children:[o(W,{name:n.countKind==="visits"?"eye":"download",size:12}),t(n.countKind==="visits"?"profile.workVisits":"profile.workInstalls",{n:n.count.toLocaleString("en-US")})]})]}),i=n.url;return Oa(i)?o("a",{class:"fx-pf-work",href:i,onClick:s=>{s.preventDefault(),Fa(i)},children:a}):o("article",{class:"fx-pf-work",children:a})}function Rf(e){let{t}=K(),n=Ue(),[r,a]=T(null),[i,s]=T(()=>e.pinned.map(f=>`${f.kind}:${f.id}`));X(()=>{H("/profile/me/works").then(f=>{n.current&&a(f.ok?f.data?.works??[]:"failed")})},[]);let l=f=>`${f.kind}:${f.id}`,c=f=>s(p=>p.includes(f)?p.filter(u=>u!==f):[...p,f]);if(r===null)return o("div",{class:"fx-pf-card fx-pf-empty",children:[o(Yn,{})," ",t("common.loading")]});if(r==="failed"||r.length===0)return o("div",{class:"fx-pf-card fx-pf-empty",children:[o("p",{children:t(r==="failed"?"common.loadFailed":"profile.worksNone")}),o("div",{class:"fx-inline fx-pf-foot",children:[r!=="failed"&&o(U,{variant:"primary",onClick:()=>void In("submission"),children:[t("profile.goSubmit")," ",o(W,{name:"external",size:12})]}),o(U,{onClick:e.onClose,children:t("common.cancel")})]})]});let d=()=>{let f=new Map(r.map(p=>[l(p),p]));e.onSave(i.flatMap(p=>{let u=f.get(p);return u?[{kind:u.kind,id:u.id}]:[]})),e.onClose()};return o("div",{class:"fx-pf-card fx-pf-picker",children:[r.map(f=>{let p=l(f),u=i.includes(p),h=Il[f.type];return o("button",{type:"button",class:"fx-pf-pick","aria-pressed":u,disabled:!u&&i.length>=6,onClick:()=>c(p),children:[o("div",{children:[f.name,o("small",{children:[h?t(h.key):f.type," \xB7 ",f.summary]})]}),u&&o(W,{name:"check",size:15})]},p)}),o("div",{class:"fx-inline fx-pf-foot",children:[o("span",{class:"fx-grow",children:i.length?t("profile.worksPicked",{n:i.length,max:6}):t("profile.worksAuto")}),o(U,{variant:"primary",onClick:d,children:t("common.done")}),o(U,{onClick:e.onClose,children:t("common.cancel")})]})]})}function Lf(e){let{t,locale:n}=K(),{view:r,owner:a}=e,i=J(null),[s,l]=T(!1),c=r.nickname||r.username,d=(r.tier||"free").toLowerCase(),f=r.modules.map(v=>v.id),p=v=>f.indexOf(v),u=v=>p(v)>=0,h=r.stats,m=h?zl(h.totalTokens,n):null,y=t("profile.unit.days"),_=h&&m?[[m.value,m.unit,t("profile.stat.tokens")],[String(h.activeDays),y,t("profile.stat.activeDays")],[String(h.longestStreak),y,t("profile.stat.longest")],[String(h.currentStreak),y,t("profile.stat.current")],[h.installs.toLocaleString("en-US"),"",t("profile.stat.installs")]]:[],C=h&&u("stats")&&o("div",{class:"fx-pf-stats",style:{order:p("stats")},children:_.map(([v,E,I])=>o("div",{class:"fx-pf-stat",children:[o("b",{children:[v,E&&o("small",{children:E})]}),o("span",{children:I})]},I))},"stats"),x=f[0]==="stats",k=r.works||[],A=u("works")&&o(yr,{order:p("works"),title:t("profile.works"),action:!s&&o("button",{type:"button",class:"fx-link",onClick:()=>l(!0),children:t("profile.worksPick")}),children:s?o(Rf,{pinned:e.pinned,onSave:a.onPinned,onClose:()=>l(!1)}):k.length?o("div",{class:"fx-pf-works",children:k.map(v=>o(If,{work:v},`${v.kind}:${v.id}`))}):o("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.worksEmpty")})},"works"),O=r.activity,q=u("activity")&&O&&o(yr,{order:p("activity"),title:t("profile.activity"),children:o("div",{class:"fx-pf-card",children:[o("div",{class:"fx-pf-hm",role:"img","aria-label":t("profile.activityDays",{n:O.activeDays}),children:O.levels.map((v,E)=>o("i",{class:v?`l${v}`:void 0},E))}),o("div",{class:"fx-pf-hm-months","aria-hidden":"true",children:Sl(O.end,n).map((v,E)=>o("span",{children:v},E))}),o("div",{class:"fx-pf-hm-foot",children:[o("span",{children:t("profile.activityDays",{n:O.activeDays})}),o("span",{class:"fx-pf-hm-legend","aria-hidden":"true",children:[t("profile.less"),o("i",{}),o("i",{class:"l1"}),o("i",{class:"l2"}),o("i",{class:"l3"}),o("i",{class:"l4"}),t("profile.more")]})]})]})},"activity"),N=(r.badges||[]).filter(v=>xl.includes(v.id)),B=u("badges")&&o(yr,{order:p("badges"),title:t("profile.badges"),children:N.length?o("div",{class:"fx-pf-card fx-pf-rows",children:N.map(v=>o("div",{class:"fx-pf-brow",children:[o("span",{class:"fx-pf-badge",children:o(W,{name:Pl[v.id],size:14})}),o("div",{children:[o("b",{children:t(`profile.badge.${v.id}`)}),o("span",{children:t(`profile.badgeSub.${v.id}`,{value:v.value??""})})]})]},v.id))}):o("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.badgesEmpty")})},"badges"),Y=r.insights,se=[];Y?.topModel&&se.push([t("profile.insightModel"),Y.topModel]),Y?.activeHours&&se.push([t("profile.insightHours"),Tl(Y.activeHours)]);let V=u("insights")&&o(yr,{order:p("insights"),title:t("profile.insights"),children:se.length?o("div",{class:"fx-pf-card fx-pf-rows",children:se.map(([v,E])=>o("div",{class:"fx-pf-row",children:[o("span",{children:v}),o("b",{children:E})]},v))}):o("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.insightsEmpty")})},"insights"),ne=[!x&&C,A,q].filter(Boolean),pe=[B,V].filter(Boolean),Ee=v=>{if(!v)return;let E=wl(v);if(!E)return a.onInvalidLink();r.links.includes(E)||a.onLinks([...r.links,E])};return o("div",{class:"fx-pf","data-cover":r.cover,"data-frame":r.frame,children:[o("div",{class:"fx-pf-cover"}),o("div",{class:"fx-pf-id",children:[o("button",{type:"button",class:"fx-pf-avatar",title:t("account.avatar.change"),"aria-label":t("account.avatar.change"),onClick:()=>i.current?.click(),children:[o("span",{class:"fx-pf-av",children:e.avatar?o("img",{src:e.avatar,alt:""}):o("span",{class:"fx-pf-av-fallback",children:gl(c)})}),o("span",{class:"fx-pf-av-mask",children:o(W,{name:"pencil",size:18})})]}),o("input",{ref:i,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:v=>{let E=v.currentTarget,I=E.files?.[0];E.value="",I&&a.onAvatar(I)}}),o("div",{class:"fx-pf-id-text",children:[o("div",{class:"fx-pf-name",children:[o(Na,{value:c,placeholder:r.username,maxLength:40,label:t("account.nickname.edit"),onSave:v=>{v&&a.onNickname(v)}}),Ml[d]&&o("span",{class:`fx-tag${d==="pro"?" fx-pf-tier-pro":" fx-tag--accent"}`,children:Ml[d]})]}),o("div",{class:"fx-pf-handle",children:["@",r.username]})]}),N.length>0&&u("badges")&&o("div",{class:"fx-pf-badges",children:N.map(v=>o("span",{class:"fx-pf-badge",title:t(`profile.badge.${v.id}`),children:o(W,{name:Pl[v.id],size:14})},v.id))})]}),o("div",{class:"fx-pf-sub",children:[o(Na,{class:"fx-pf-bio",value:r.bio,placeholder:t("profile.bioPlaceholder"),maxLength:80,label:t("profile.bio"),counter:!0,onSave:a.onBio}),o("div",{class:"fx-pf-meta",children:[r.joinedMonth&&o("span",{children:[o(W,{name:"calendar",size:13}),t("profile.joined",{date:Cl(r.joinedMonth,n)})]}),r.links.map(v=>o("span",{children:[o(W,{name:"link",size:13}),Oa(v)?o("a",{href:v,onClick:E=>{E.preventDefault(),Fa(v)},children:Da(v)}):o("span",{children:Da(v)}),o("button",{type:"button",class:"fx-pf-x",title:t("profile.linkRemove"),"aria-label":t("profile.linkRemove"),onClick:()=>a.onLinks(r.links.filter(E=>E!==v)),children:o(W,{name:"x",size:11})})]},v)),r.links.length<2&&o(Na,{value:"",placeholder:t("profile.linkAdd"),maxLength:200,label:t("profile.linkAdd"),onSave:Ee},r.links.length)]})]}),x&&C,o("div",{class:"fx-pf-body","data-cols":ne.length&&pe.length?2:1,children:[o("div",{class:"fx-pf-main",children:ne}),pe.length>0&&o("div",{class:"fx-pf-side",children:pe})]})]})}function Dl(){let e=Re(async()=>{let[t,n]=await Promise.all([H("/membership/my"),H("/features")]);return t.ok?{ok:!0,status:t.status,data:{membership:t.data?.membership??null,payment:!n.ok||n.data?.payment!==!1}}:t});return e.state==="loading"?o(Te,{panels:1}):e.state==="signedOut"?null:o(Df,{membership:e.state==="ready"?e.data.membership:null,failed:e.state==="error",payment:e.state==="ready"&&e.data.payment,onRetry:e.state==="ready"?e.reload:e.retry})}function Df(e){let{t,locale:n}=K(),r=re(),a=e.membership&&(e.membership.status===void 0||e.membership.status==="active")?e.membership:null,i=To(a?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",c=()=>void r.run(async()=>await mn("membership")?void 0:{error:{key:"err.openFailed"}});return o(fe,{icon:"card",title:t("member.title"),desc:t("member.desc"),actions:e.payment&&!e.failed?o(U,{variant:"primary",pending:r.pending,onClick:c,children:t(s?"member.upgrade":"member.renew")}):void 0,children:[!e.failed&&o("div",{class:"fx-member fx-block",children:[o("span",{class:`fx-tier fx-tier--${l}`,children:i}),o("div",{class:"fx-member-copy",children:[o("strong",{children:s?t("member.freeName"):a?.plan?.name||i}),o("span",{class:"fx-muted",children:s?t("member.freeHint"):a?.expiresAt?t("member.expires",{date:hr(a.expiresAt,n)}):t("member.noExpiry")})]})]}),e.failed&&o("div",{class:"fx-sub",children:o(ie,{tone:"warn",children:[t("member.loadFailed")," ",o("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}),r.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(ae,{a:r})})]})}function he(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null}function Nf(e,t){let n=he(t);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,he(e)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var Of=15;function Nn(e,t){let n=Nf(e,t);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,he(e)??0),a=n===0&&r>0&&(he(t)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=Of}}function xr(e,t){let n=he(t);if(n===null||n<=0)return null;let r=he(e);if(r===null)return null;let a=Math.max(0,r);if(a===0)return"0%";let i=a/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var Ff=e=>e.ok?"ok":e.status===404?"hidden":"failed";function Ol(){return o($l,{section:"points"})}function Fl(){return o(R,{children:[o(Dl,{}),o($l,{section:"quota"})]})}function $l({section:e}){let t=Re(async()=>{let[l,c,d,f]=await Promise.all([H("/token-quota/my"),H("/credits/balance"),H("/features"),H("/invite/my-code")]);return l.ok?{ok:!0,status:l.status,data:{quota:l.data??{},balance:c.ok?he(c.data?.balance):null,balanceFailed:!c.ok,features:d.ok&&d.data&&typeof d.data=="object"?d.data:{},invite:f.ok?f.data:null,inviteState:Ff(f)}}:l});if(t.state==="loading")return o(Te,{panels:3,rows:2});if(t.state==="signedOut")return o(De,{});if(t.state==="error")return o(Oe,{error:t.error,onRetry:t.retry});let{data:n,update:r}=t,a=n.quota.background,i=n.features.redemption_codes!==!1,s=n.features.payment!==!1;return o(R,{children:[e==="quota"&&o(R,{children:[o(Bf,{data:n,update:r,onFailed:t.reload}),a?.modelId?o(Vf,{bg:a,update:r}):null]}),e==="points"&&o(qf,{data:n,payment:s,onRetry:t.reload}),e==="points"&&(n.inviteState!=="hidden"||i)&&o(Wf,{data:n,update:r,redeemEnabled:i,onRedeemed:t.reload})]})}var Nl=e=>({dailyLimit:e.dailyLimit,dailyRemaining:e.dailyRemaining,weeklyLimit:e.weeklyLimit,weeklyRemaining:e.weeklyRemaining});function $f(e,t){if(typeof e?.showResetCardCeremony!="function")return!1;try{return e.showResetCardCeremony(t),!0}catch{return!1}}function Bf(e){let{t,locale:n,ctx:r}=K(),a=e.data.quota,i=Nn(a.dailyRemaining,a.dailyLimit),s=Nn(a.weeklyRemaining,a.weeklyLimit),l=Qs(a.weeklyResetAt,n),c=Math.max(0,he(a.resetCards)??0),d=he(a.resetCardPricePoints)??100,f=re(),p=re(),[u,h]=T(null),[m,y]=T("1"),_=/^\d+$/.test(m.trim())?Number(m.trim()):NaN,C=Number.isInteger(_)&&_>=1&&_<=50,x=C?_*d:null,k=e.data.balance,A=x!==null&&k!==null&&k<x,O=()=>void f.run(async()=>{let B={daily:i,weekly:s},Y=Nl(a);h(null);let se=ee(),V=await dr(se.accountUseResetCard?()=>se.accountUseResetCard("both"):null,()=>H("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!V.ok)return e.onFailed(),Ae(V);let ne=V.data?.quota,pe=he(V.data?.resetCards);return e.update(Ee=>({...Ee,quota:{...Ee.quota,...ne??{},resetCards:pe??Ee.quota.resetCards}})),ne&&!$f(r.app,{before:Y,after:Nl(ne),remainingCards:pe??void 0})&&h({before:B,after:{daily:Nn(ne.dailyRemaining,ne.dailyLimit),weekly:Nn(ne.weeklyRemaining,ne.weeklyLimit)},cards:pe}),{success:{key:"card.used"}}}),q=()=>void p.run(async()=>{if(!C)return{error:{key:"err.invalidCount"}};let B=await H("/points/exchange-reset-cards",{method:"POST",body:{count:_,expectedPricePerCard:d}});return B.ok?(e.update(Y=>({...Y,quota:{...Y.quota,resetCards:he(B.data?.resetCards)??Y.quota.resetCards},balance:he(B.data?.newPointsBalance)??Y.balance})),y("1"),{success:{key:"card.exchanged",vars:{n:he(B.data?.cardsGranted)??_}}}):(e.onFailed(),Ae(B))}),N=B=>B.unlimited?t("common.unlimited"):B.text;return o(fe,{icon:"gauge",title:t("quota.ai.title"),desc:t("quota.ai.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Eo,{label:t("common.today"),display:i,note:i.unlimited?null:t("quota.resetDaily")}),o(Eo,{label:t("common.thisWeek"),display:s,note:s.unlimited||!l?null:t("quota.resetWeekly",{date:l})})]}),o(Le,{label:t("card.title"),desc:t("card.desc"),children:[o("span",{class:"fx-value","data-testid":"reset-card-count",children:t("card.owned",{n:c})}),o(nn,{label:t("card.use"),confirmLabel:t("card.useConfirm"),pending:f.pending,disabled:c<=0,onConfirm:O})]}),c<=0&&!f.success&&o(ze,{children:o(ie,{children:t("card.noneHint")})}),(f.error||f.success)&&o(ze,{children:[o(ae,{a:f}),f.success&&u&&o("div",{class:"fx-ceremony",role:"status",children:[o("span",{children:[t("common.today")," ",o("b",{children:N(u.before.daily)})," \u2192 ",o("b",{children:N(u.after.daily)})]}),o("span",{children:[t("common.thisWeek")," ",o("b",{children:N(u.before.weekly)})," \u2192 ",o("b",{children:N(u.after.weekly)})]}),u.cards!==null&&o("span",{class:"fx-muted",children:t("card.left",{n:u.cards})})]})]}),o(Le,{label:t("card.exchange"),desc:t("card.price",{price:we(d,n)}),class:"fx-row--wide",children:[o("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:m,"aria-label":t("card.count"),onInput:B=>{y(B.currentTarget.value),p.clear()}}),o("span",{class:"fx-muted fx-cost",children:x!==null?t("card.cost",{cost:we(x,n)}):t("card.countHint")}),o(nn,{label:t("card.exchangeButton"),confirmLabel:t("card.exchangeConfirm",{cost:x!==null?we(x,n):"\u2014"}),pending:p.pending,disabled:!C||A,onConfirm:q})]}),(A||p.error||p.success)&&o(ze,{children:[A&&!p.error&&o(ie,{tone:"warn",children:t("err.insufficientPoints")}),o(ae,{a:p})]})]})}function Uf(e,t,n){let r=re(),[a,i]=T(null);return{checked:a??e,toggle:l=>{i(l),r.run(async()=>{let c=await t(l);if(i(null),!c.ok)return Ae(c);n(l)})},action:r}}function qf(e){let{t,locale:n}=K(),r=re(),a=()=>void r.run(async()=>await mn("credits")?void 0:{error:{key:"err.openFailed"}});return o(fe,{icon:"coins",title:t("points.title"),desc:t("points.desc"),actions:e.payment?o(U,{variant:"primary",pending:r.pending,onClick:a,children:t("points.recharge")}):void 0,children:[o(Le,{label:t("points.balance"),children:e.data.balance!==null?o("span",{class:"fx-big","data-testid":"points-balance",children:we(e.data.balance,n)}):o("span",{class:"fx-value is-empty",children:[t("points.balanceFailed")," ",o("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}),r.error&&o(ze,{children:o(ae,{a:r})})]})}var Hf=[5,10,20];function Vf(e){let{t}=K(),{bg:n}=e,r=Nn(n.dailyRemaining,n.dailyLimit),a=Nn(n.weeklyRemaining,n.weeklyLimit),i=re(),[s,l]=T(null),c=Uf(!!n.autoMain,f=>{let p=ee();return dr(p.accountBgAutoMain?()=>p.accountBgAutoMain(f):null,()=>H("/token-quota/background/auto-main",{method:"POST",body:{enabled:f}}))},f=>e.update(p=>({...p,quota:{...p.quota,background:{...p.quota.background??{},autoMain:f}}}))),d=f=>{l(f),i.run(async()=>{let p=ee(),u=await dr(p.accountBgConvert?()=>p.accountBgConvert(f):null,()=>H("/token-quota/background/convert",{method:"POST",body:{percent:f}}));if(l(null),!u.ok)return Ae(u);let h=u.data?.quota;return h&&e.update(y=>({...y,quota:{...y.quota,...h,resetCards:y.quota.resetCards,resetCardPricePoints:y.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:f}}}})};return o(fe,{icon:"clock",title:t("bg.title"),desc:t("bg.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Eo,{label:t("common.today"),display:r}),o(Eo,{label:t("common.thisWeek"),display:a})]}),o(Le,{label:t("bg.autoMain"),desc:t("bg.autoMainDesc"),children:o(Mt,{checked:c.checked,disabled:c.action.pending,label:t("bg.autoMain"),onChange:c.toggle})}),o(Le,{label:t("bg.convert"),desc:t("bg.convertDesc"),class:"fx-row--wide",children:Hf.map(f=>o(nn,{label:`${f}%`,confirmLabel:t("bg.convertConfirm",{pct:f}),pending:i.pending&&s===f,disabled:i.pending&&s!==f,onConfirm:()=>d(f)},f))}),(i.error||i.success||c.action.error)&&o(ze,{children:[o(ae,{a:c.action}),o(ae,{a:i})]})]})}function Wf(e){let{t,locale:n}=K(),{invite:r,inviteState:a}=e.data,[i,s]=T(null),[l,c]=T(""),[d,f]=T(""),p=re(),u=re(),h=re();X(()=>{let x=!0;return ee().authStatus?.().then(k=>{x&&s(k?.cloudUrl?k.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let m=async()=>{let x=await H("/invite/my-code");return e.update(k=>({...k,invite:x.ok?x.data:k.invite,inviteState:x.ok?"ok":x.status===404?"hidden":k.inviteState})),x},y=()=>void p.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let k=await H("/invite/claim",{method:"POST",body:{code:x}});return k.ok?(c(""),m(),{success:{key:"invite.claimed"}}):Ae(k)}),_=()=>void u.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let k=await H("/redemption/redeem",{method:"POST",body:{code:x}});if(!k.ok)return Ae(k);f(""),e.onRedeemed();let A=[],O=he(k.data?.creditsAmount);O&&A.push(t("redeem.gotPoints",{n:we(O,n)})),k.data?.membershipPlanId&&A.push(t("redeem.gotMembership"));for(let q of Array.isArray(k.data?.items)?k.data.items:[]){let N=(n==="zh"?q?.label?.zh:q?.label?.en)||q?.label?.zh||q?.label?.en||q?.kind;N&&A.push(N)}return{success:A.length?{key:"redeem.successWith",vars:{what:A.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),C=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return o(fe,{icon:"gift",title:t("invite.title"),desc:t("invite.desc"),children:[a==="ok"&&r?.code&&o(Le,{label:t("invite.myCode"),desc:t("invite.count",{n:we(he(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[o("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),o(qt,{text:r.code,label:t("invite.copyCode")}),o(qt,{text:C,label:t("invite.copyLink"),disabled:!C})]}),a==="failed"&&o(ze,{children:o(ie,{tone:"warn",children:[t("invite.loadFailed")," ",o("button",{type:"button",class:"fx-link",disabled:h.pending,onClick:()=>void h.run(async()=>{await m()}),children:t("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&o(Le,{label:t("invite.claim"),desc:t("invite.claimDesc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[o("input",{class:"fx-input",value:l,placeholder:t("invite.claimPlaceholder"),"aria-label":t("invite.claim"),onInput:x=>c(x.currentTarget.value)}),o(U,{submit:!0,pending:p.pending,children:t("invite.claimSubmit")})]})}),(p.error||p.success)&&o(ze,{children:o(ae,{a:p})}),e.redeemEnabled&&o(Le,{label:t("redeem.title"),desc:t("redeem.desc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),_()},children:[o("input",{class:"fx-input",value:d,placeholder:t("redeem.placeholder"),"aria-label":t("redeem.title"),onInput:x=>f(x.currentTarget.value)}),o(U,{submit:!0,pending:u.pending,children:t("redeem.submit")})]})}),(u.error||u.success)&&o(ze,{children:o(ae,{a:u})})]})}function jf(e){let t=[],n,r=new Map;for(let a of e)if(a.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},t.push(n)),n.items.push(a);else if(a.itemType==="custom_item"&&a.itemDefinition?.stackable){let i=`${a.productId||a.id}:${JSON.stringify(a.itemDefinition)}`,s=r.get(i);s||(s={id:`custom:${i}`,items:[],resetCard:!1},r.set(i,s),t.push(s)),s.items.push(a)}else t.push({id:a.id,items:[a],resetCard:!1});return t}function Bl(){let e=Re(()=>H("/shop/inventory"));return e.state==="loading"?o(Te,{panels:1,rows:4}):e.state==="signedOut"?o(De,{}):e.state==="error"?o(Oe,{error:e.error,onRetry:e.retry}):o(Gf,{items:e.data??[],onRefresh:e.reload,onUsed:t=>{e.update(n=>n.filter(r=>r.id!==t.itemId)),e.reload()}})}function Gf(e){let{t,locale:n,goTo:r}=K(),[a,i]=T(null),[s,l]=T(null),c=Ue(),d=jf(e.items),f=d.find(m=>m.id===a),p=Math.max(24,Math.ceil(d.length/6)*6)-d.length,u=m=>m.resetCard?t("card.title"):m.items[0].itemDefinition?.name[n]||m.items[0].displayName||t("backpack.item"),h=m=>{c.current&&(l(m),e.onUsed(m))};return o(fe,{icon:"backpack",title:t("page.backpack"),desc:t("backpack.desc"),actions:o(U,{onClick:e.onRefresh,children:[o(W,{name:"refresh",size:13}),t("backpack.refresh")]}),children:o("div",{class:"fx-backpack fx-block",children:[o("div",{class:"fx-backpack-summary",children:[o("span",{children:t("backpack.total",{n:we(e.items.length,n)})}),r&&o("button",{class:"fx-link",type:"button",onClick:()=>r("quota"),children:t("backpack.getCards")})]}),s&&o("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[o(W,{name:"gift",size:20}),o("div",{children:[o("strong",{children:s.message[n]}),o("div",{children:s.effects.map(m=>Ul(m,t,n)).join(" \xB7 ")})]})]},s.itemId),o("div",{class:"fx-backpack-layout",children:[o("div",{children:[o("div",{class:"fx-backpack-grid",role:"group","aria-label":t("backpack.grid"),children:[d.map(m=>{let y=u(m);return o("button",{type:"button",class:`fx-backpack-slot${m.resetCard?" is-card":""}`,"data-rarity":m.items[0].itemDefinition?.rarity,"aria-pressed":f?.id===m.id,"aria-label":t("backpack.slot",{name:y,n:m.items.length}),title:y,onClick:()=>i(m.id),children:[o("span",{class:"fx-backpack-icon",children:m.items[0].itemDefinition?.icon?o("span",{class:"fx-backpack-emoji",children:m.items[0].itemDefinition.icon}):o(W,{name:m.resetCard?"card":"gift",size:30})}),o("span",{class:"fx-backpack-name",children:y}),(m.resetCard||m.items[0].itemDefinition?.stackable)&&o("span",{class:"fx-backpack-count",children:["\xD7",we(m.items.length,n)]})]},m.id)}),Array.from({length:p},(m,y)=>o("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${y}`))]}),!d.length&&o("p",{class:"fx-backpack-empty",children:t("backpack.empty")})]}),f?o(Xf,{slot:f,name:u(f),onUsed:h},`${f.id}:${f.items[0].id}`):o("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[o(W,{name:"backpack",size:30}),o(ie,{children:t(d.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function Ul(e,t,n){return e.type==="points"?t("backpack.effect.points",{n:we(e.amount,n)}):e.type==="reset_card"?t("backpack.effect.cards",{n:we(e.count,n)}):t("backpack.effect.quota")}function Xf(e){let{t,locale:n,goTo:r}=K(),a=e.slot.items[0],[i,s]=T(null),l=re(),c=re(),[d,f]=T(!1),p=a.itemDefinition,u=Ue(),h=a.source==="points"?t("backpack.source.points"):a.source==="admin"?t("backpack.source.admin"):a.source==="reward"?t("backpack.source.reward"):t("backpack.source.other"),m=()=>void l.run(async()=>{let _=await H(`/shop/inventory/${encodeURIComponent(a.id)}`);if(u.current){if(!_.ok)return Ae(_);s(_.data)}}),y=()=>void c.run(async()=>{let _=await H(`/shop/inventory/${encodeURIComponent(a.id)}/use`,{method:"POST"});if(!_.ok)return Ae(_);e.onUsed(_.data)});return o("section",{class:"fx-backpack-detail","aria-label":t("backpack.details"),children:[o("span",{class:`fx-backpack-detail-icon${e.slot.resetCard?" is-card":""}`,children:p?.icon?o("span",{class:"fx-backpack-emoji",children:p.icon}):o(W,{name:e.slot.resetCard?"card":"gift",size:32})}),o("h3",{children:e.name}),o("span",{class:"fx-tag",children:[t(e.slot.resetCard||p?.use?"backpack.consumable":p?"backpack.collectible":"backpack.voucher"),p&&` \xB7 ${t(`backpack.rarity.${p.rarity}`)}`]}),o("dl",{class:"fx-backpack-facts",children:[o("div",{children:[o("dt",{children:t("backpack.quantity")}),o("dd",{children:we(e.slot.items.length,n)})]}),o("div",{children:[o("dt",{children:t("backpack.acquired")}),o("dd",{children:Ut(a.acquiredAt,n)})]}),!e.slot.resetCard&&o("div",{children:[o("dt",{children:t("backpack.source")}),o("dd",{children:h})]})]}),p?o(R,{children:[p.description&&o(ie,{children:p.description[n]}),p.use&&o(R,{children:[o("div",{class:"fx-backpack-effects",children:p.use.effects.map((_,C)=>o("div",{children:Ul(_,t,n)},C))}),d?o(R,{children:[o(ie,{children:t("backpack.consumeConfirm")}),o("div",{class:"fx-backpack-use-actions",children:[o(U,{variant:"primary",pending:c.pending,onClick:y,children:t("backpack.confirmUse")}),o(U,{disabled:c.pending,onClick:()=>f(!1),children:t("common.cancel")})]})]}):o(U,{variant:"primary",onClick:()=>f(!0),children:p.use.label?.[n]||t("backpack.use")}),o(ae,{a:c,captchaSection:"backpack"})]})]}):e.slot.resetCard?o(R,{children:[o(ie,{children:t("card.desc")}),r&&o(U,{variant:"primary",onClick:()=>r("quota"),children:t("backpack.manageCards")})]}):i?o("div",{class:"fx-backpack-reveal",children:[i.codeName&&o("div",{class:"fx-muted",children:i.codeName}),i.key?o(R,{children:[o("code",{children:i.key}),o(qt,{text:i.key,label:t("backpack.copyKey")})]}):o(ie,{children:t("backpack.noKey")})]}):o(U,{pending:l.pending,onClick:m,children:[o(W,{name:"key",size:14}),t("backpack.reveal")]}),o(ae,{a:l,captchaSection:"backpack"})]})}var Kf=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Jf=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,ql=(e,t)=>e==="phone"?Kf.test(t):Jf.test(t),Po=(e,t)=>e==="phone"?mr(t):gr(t);function Vl(){let e=Re(()=>H("/auth/me"));if(e.state==="loading")return o(Te,{panels:3,rows:2});if(e.state==="signedOut")return o(De,{});if(e.state==="error")return o(Oe,{error:e.error,onRetry:e.retry});let t=e.data;return o(R,{children:[o(Yf,{me:t,onBound:(n,r)=>e.update(a=>({...a,[n]:r}))}),o(em,{me:t}),o(om,{}),o(rm,{me:t})]})}function Ba(){let e=Zs(),t=re();return{cd:e,a:t,send:(a,i,s)=>t.run(async()=>{let l=await H("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return l.ok?(e.start(60),{success:{key:"sec.codeSent"}}):Ae(l)}),reset:()=>{e.stop(),t.clear()}}}function Yf(e){let{t}=K(),[n,r]=T(null),[a,i]=T(null);return o(fe,{icon:"key",title:t("sec.methods.title"),desc:t("sec.methods.desc"),children:["phone","email"].map(s=>{let l=e.me[s];return o(R,{children:[o(Le,{label:t(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Po(s,l):t("account.contact.unbound"),children:o(U,{onClick:()=>{i(null),r(n===s?null:s)},children:t(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&o(Zf,{kind:s,current:l??null,onDone:c=>{e.onBound(s,c),r(null),i(s)}}),a===s&&n!==s&&o(ze,{children:o("div",{class:"fx-msg is-ok",role:"status",children:t(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Zf(e){let{t}=K(),{kind:n}=e,[r,a]=T(""),[i,s]=T(""),l=Ba(),c=re(),d=r.trim(),f=n==="phone"?"err.phoneInvalid":"err.emailInvalid",p=()=>{if(!ql(n,d)){l.a.run(async()=>({error:{key:f}}));return}l.send(d,n,"bind")},u=()=>void c.run(async()=>{if(!ql(n,d))return{error:{key:f}};if(!i.trim())return{error:{key:"err.codeRequired"}};let h=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},m=await H(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:h});if(!m.ok)return Ae(m);e.onDone(d)});return o(ze,{class:"fx-form",children:[o("label",{class:"fx-field",children:[o("span",{children:e.current?t(n==="phone"?"sec.newPhone":"sec.newEmail"):t(n==="phone"?"sec.phone":"sec.email")}),o("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:t(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:h=>a(h.currentTarget.value)})]}),o(Ua,{code:i,setCode:s,sender:l,onSend:p}),o("div",{class:"fx-inline",children:o(U,{variant:"primary",pending:c.pending,onClick:u,children:t("sec.bindSubmit")})}),o(ae,{a:c})]})}function Ua(e){let{t}=K(),{cd:n,a:r}=e.sender;return o("div",{class:"fx-field",children:[o("span",{children:e.label??t("sec.code")}),o("div",{class:"fx-inline",children:[o("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:e.code,placeholder:t("sec.codePlaceholder"),"aria-label":e.label??t("sec.code"),onInput:a=>e.setCode(a.currentTarget.value)}),o(U,{pending:r.pending,disabled:n.left>0||e.disabled,onClick:e.onSend,children:n.left>0?t("sec.resendIn",{s:n.left}):t("sec.sendCode")})]}),o(ae,{a:r})]})}function Qf(e){let{t}=K(),n=Gs(e.value),r=e.value.length>0,a=[[n.length,t("pw.req.length",{min:8,max:64})],[n.lower,t("pw.req.lower")],[n.upper,t("pw.req.upper")],[n.special,t("pw.req.special")],[n.space,t("pw.req.space")]];return o("ul",{class:"fx-rules","aria-label":t("pw.rulesLabel"),children:a.map(([i,s])=>o("li",{class:i?"is-ok":r?"is-bad":"",children:[i?o(W,{name:"check",size:11}):r?o(W,{name:"x",size:11}):o("span",{class:"fx-rule-dot","aria-hidden":"true"}),o("span",{children:s})]},s))})}function Wl(e,t){let n=js(e);return n.ok?e!==t?{error:{key:"pw.mismatch"}}:null:{error:{key:wa[n.rule]}}}function em(e){let{t}=K(),n=["phone","email"].filter(l=>!!e.me[l]),[r,a]=T("current"),[i,s]=T(!1);return o(fe,{icon:"shield",title:t("pw.title"),desc:t("pw.desc",{min:8,max:64}),actions:o(U,{onClick:()=>s(!i),children:t(i?"common.cancel":"pw.change")}),children:i&&o(ze,{class:"fx-form",children:[o(It,{label:t("pw.modeLabel"),value:r,onChange:a,options:[{value:"current",label:t("pw.mode.current")},{value:"code",label:t("pw.mode.code")}]}),r==="current"?o(tm,{onDone:()=>s(!1)}):n.length?o(nm,{me:e.me,targets:n,onDone:()=>s(!1)}):o(ie,{children:t("pw.codeNeedsContact")})]})})}function jl(e){let{t}=K();return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:t("pw.new")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:e.pw,maxLength:72,onInput:n=>e.setPw(n.currentTarget.value)})]}),o(Qf,{value:e.pw}),o("label",{class:"fx-field",children:[o("span",{children:t("pw.confirm")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:e.confirm,onInput:n=>e.setConfirm(n.currentTarget.value)})]})]})}function tm(e){let{t}=K(),[n,r]=T(""),[a,i]=T(""),[s,l]=T(""),c=re(),[d,f]=T(!1),p=()=>void c.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let u=Wl(a,s);if(u)return u;let h=await H("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return h.ok?(r(""),i(""),l(""),f(!0),{success:{key:"pw.changed"}}):h.status===404?{error:{key:"pw.noPasswordYet"}}:Ae(h)});return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:t("pw.current")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:u=>r(u.currentTarget.value)})]}),o(jl,{pw:a,setPw:i,confirm:s,setConfirm:l}),o("div",{class:"fx-inline",children:[o(U,{variant:"primary",pending:c.pending,onClick:p,children:t("pw.submit")}),d&&o(U,{onClick:e.onDone,children:t("common.done")})]}),o(ae,{a:c})]})}function nm(e){let{t}=K(),[n,r]=T(e.targets[0]),[a,i]=T(""),[s,l]=T(""),[c,d]=T(""),f=Ba(),p=re(),[u,h]=T(!1),m=e.me[n]||"",y=()=>void p.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let _=Wl(s,c);if(_)return _;let C=n==="phone"?{phone:m,code:a.trim(),newPassword:s}:{email:m,code:a.trim(),newPassword:s},x=await H("/auth/reset-password",{method:"POST",body:C});return x.ok?(i(""),l(""),d(""),h(!0),{success:{key:"pw.changed"}}):Ae(x)});return o(R,{children:[e.targets.length>1?o(It,{label:t("pw.via"),value:n,onChange:_=>{r(_),i(""),f.reset()},options:e.targets.map(_=>({value:_,label:Po(_,e.me[_])}))}):o(ie,{children:t("pw.codeTo",{target:Po(n,m)})}),o(Ua,{code:a,setCode:i,sender:f,onSend:()=>void f.send(m,n,"reset_password")}),o(jl,{pw:s,setPw:l,confirm:c,setConfirm:d}),o("div",{class:"fx-inline",children:[o(U,{variant:"primary",pending:p.pending,onClick:y,children:t("pw.submitReset")}),u&&o(U,{onClick:e.onDone,children:t("common.done")})]}),o(ae,{a:p})]})}function om(){let{t:e}=K(),t=re(),n=()=>void t.run(async()=>{let r=await H("/auth/logout-all",{method:"POST"});if(!r.ok)return Ae(r);try{await ee().forsionLogout?.()}catch(a){return{error:{raw:Et(a)}}}return{success:{key:"sec.logoutAllDone"}}});return o(fe,{icon:"laptop",title:e("sec.devices.title"),desc:e("sec.devices.desc"),children:[o(Le,{label:e("sec.logoutAll"),desc:e("sec.logoutAllDesc"),children:o(nn,{label:e("sec.logoutAll"),confirmLabel:e("sec.logoutAllConfirm"),pending:t.pending,onConfirm:n})}),(t.error||t.success)&&o(ze,{children:o(ae,{a:t})})]})}function rm(e){let{t}=K(),n=["phone","email"].filter(C=>!!e.me[C]),[r,a]=T(!1),[i,s]=T(n.length?"code":"password"),[l,c]=T(n[0]??null),[d,f]=T(""),[p,u]=T(""),h=Ba(),m=re(),y=l&&e.me[l]||"",_=()=>void m.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!p)return{error:{key:"pw.currentRequired"}};let C=await H("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:p}});if(!C.ok)return Ae(C);try{await ee().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return o(fe,{icon:"alert",danger:!0,title:t("del.title"),desc:t("del.desc"),actions:o(U,{variant:"danger",onClick:()=>{a(!r),m.clear()},children:t(r?"common.cancel":"del.start")}),children:r&&o(ze,{class:"fx-form",children:[o(ie,{tone:"error",children:t("del.warn")}),n.length>0&&o(It,{label:t("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:t("del.byCode")},{value:"password",label:t("del.byPassword")}]}),i==="code"&&l?o(R,{children:[n.length>1&&o(It,{label:t("pw.via"),value:l,onChange:C=>{c(C),f(""),h.reset()},options:n.map(C=>({value:C,label:Po(C,e.me[C])}))}),o(Ua,{code:d,setCode:f,sender:h,label:t("del.codeLabel",{target:Po(l,y)}),onSend:()=>void h.send(y,l,"delete_account")})]}):o("label",{class:"fx-field",children:[o("span",{children:t("del.passwordLabel")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:p,onInput:C=>u(C.currentTarget.value)})]}),o("div",{class:"fx-inline",children:o(nn,{variant:"danger",label:t("del.submit"),confirmLabel:t("del.confirm"),pending:m.pending,onConfirm:_})}),o(ae,{a:m})]})})}var Xl=20;function Kl(){let e=Re(async()=>{let[t,n]=await Promise.all([H("/token-quota/my"),H(`/token-quota/my/logs?limit=${Xl}&offset=0`)]);if(!t.ok)return t;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:t.status,data:{dailyLimit:he(t.data?.dailyLimit),logs:r,total:n.ok?he(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return e.state==="loading"?o(Te,{panels:3,rows:2}):e.state==="signedOut"?o(De,{}):e.state==="error"?o(Oe,{error:e.error,onRetry:e.retry}):o(R,{children:[o(am,{dailyLimit:e.data.dailyLimit}),o(sm,{base:e.data,onRetry:e.reload})]})}function am(e){let{t,locale:n}=K(),[r,a]=T(30),[i,s]=T({state:"loading"}),[l,c]=T(!1),[d,f]=T(0),p=J(0);X(()=>{let k=++p.current;return c(!0),H(`/usage/stats?days=${r}`).then(A=>{k===p.current&&(c(!1),s(A.ok?{state:"ready",data:A.data??{}}:{state:"error",fail:A}))}),()=>{p.current++}},[r,d]);let u=e.dailyLimit!==null&&e.dailyLimit<0?"usage.unlimitedNote":xr(1,e.dailyLimit)===null?"usage.noLimitNote":null,h=k=>xr(k,e.dailyLimit)??"\u2014",m=o(It,{label:t("usage.range"),value:r,onChange:a,options:[{value:7,label:t("usage.days",{n:7})},{value:30,label:t("usage.days",{n:30})},{value:90,label:t("usage.days",{n:90})}]}),y=i.state==="ready"?i.data:null,_=(y?.byModel??[]).filter(Boolean),C=(y?.byProject??[]).filter(Boolean),x=he(y?.successRate);return o(R,{children:[o(fe,{icon:"chart",title:t("usage.overview.title"),desc:t("usage.overview.desc"),actions:m,children:[i.state==="error"?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:bt(dt(i.fail),t)}),o("button",{type:"button",class:"fx-link",onClick:()=>f(k=>k+1),children:t("common.retry")})]})}):o("div",{class:`fx-stats fx-block${l&&y?" is-refreshing":""}`,"aria-busy":l||void 0,children:[o(qa,{label:t("usage.requests"),value:y?we(he(y.totalRequests)??0,n):null,testId:"usage-requests"}),o(qa,{label:t("usage.successRate"),value:y?x===null?"\u2014":`${x.toFixed(1)}%`:null}),o(qa,{label:t("usage.consumption"),value:y?h(y.totalPointsCost):null,sub:t("usage.ofToday"),testId:"usage-consumption"})]}),u&&o("div",{class:"fx-sub fx-sub--tight",children:o(ie,{children:t(u)})})]}),i.state!=="error"&&o(R,{children:[o(fe,{icon:"gauge",title:t("usage.byModel.title"),desc:t("usage.byModel.desc"),children:o(Gl,{loading:!y,empty:t("usage.empty"),head:[t("usage.col.model"),t("usage.col.requests"),t("usage.col.consumption")],rows:_.map(k=>[k.modelName||k.modelId||"\u2014",we(he(k.count)??0,n),h(k.pointsCost)])})}),o(fe,{icon:"laptop",title:t("usage.byApp.title"),desc:t("usage.byApp.desc"),children:o(Gl,{loading:!y,empty:t("usage.empty"),head:[t("usage.col.app"),t("usage.col.requests"),t("usage.col.consumption")],rows:C.map(k=>[Jl(k.projectSource,t("usage.appUnknown")),we(he(k.count)??0,n),h(k.pointsCost)])})})]})]})}var im={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"},Jl=(e,t)=>!e||e==="unknown"?t:im[e]??e;function qa(e){return o("div",{class:"fx-stat",children:[o("span",{class:"fx-stat-label",children:e.label}),e.value===null?o("span",{class:"fx-skel fx-skel--stat"}):o("strong",{class:"fx-stat-value","data-testid":e.testId,children:e.value}),e.sub&&o("span",{class:"fx-stat-sub",children:e.sub})]})}function Gl(e){return e.loading?o("div",{class:"fx-sub",children:[o("span",{class:"fx-skel fx-skel--row"}),o("span",{class:"fx-skel fx-skel--row"})]}):e.rows.length?o("div",{class:"fx-table-wrap fx-block",children:o("table",{class:"fx-table",children:[o("thead",{children:o("tr",{children:e.head.map((t,n)=>o("th",{class:n?"is-num":"",children:t},n))})}),o("tbody",{children:e.rows.map((t,n)=>o("tr",{children:t.map((r,a)=>o("td",{class:a?"is-num":"",children:r},a))},n))})]})}):o(rt,{children:e.empty})}function sm(e){let{t,locale:n}=K(),r=Ue(),[a,i]=T(e.base.logs??[]),[s,l]=T(e.base.total),c=re();X(()=>{i(e.base.logs??[]),l(e.base.total)},[e.base]);let d=()=>void c.run(async()=>{let p=await H(`/token-quota/my/logs?limit=${Xl}&offset=${a.length}`);if(!p.ok)return{error:dt(p)};let u=Array.isArray(p.data?.logs)?p.data.logs:[];r.current&&(i(h=>[...h,...u]),l(h=>u.length?he(p.data?.total)??h:a.length))}),f=e.base.dailyLimit;return o(fe,{icon:"clock",title:t("usage.recent.title"),desc:t("usage.recent.desc"),children:[e.base.logsFail?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:bt(dt(e.base.logsFail),t)}),o("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}):a.length===0?o(rt,{children:t("usage.recentEmpty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map((p,u)=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-main",children:[o("strong",{children:[p.modelName||p.modelId||"\u2014",p.success===!1&&o("span",{class:"fx-tag fx-tag--danger",children:t("usage.failed")})]}),o("small",{children:[Ut(p.createdAt,n),Jl(p.projectSource,t("usage.appUnknown"))].join(" \xB7 ")})]}),o("span",{class:"fx-value",children:xr(p.pointsCost,f)??"\u2014"})]},p.id??u))}),a.length>0&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:t("usage.shown",{shown:we(a.length,n),total:we(Math.max(s,a.length),n)})}),a.length<s&&o(U,{pending:c.pending,onClick:d,children:t("common.loadMore")})]}),c.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(ae,{a:c})})]})}var lm=["plugin","amadeus-plugin","skill","agent","space","theme"],cm=["github","npm","zip"],dm=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","market_requirements_invalid","market_requirements_mismatch"]),Zl=e=>`sub.type.${e.replace("-","_")}`,Yl=e=>e==="approved"?"sub.approved":e==="rejected"?"sub.rejected":"sub.pending";function pm({target:e,onDone:t,onCancel:n}){let r=Pt(),a=lr(),i=Ue(),s=re(),[l,c]=T("github"),[d,f]=T({type:"plugin",name:"",summary:"",githubRepoUrl:"",npmPackage:"",version:"",readme:"",description:e?.description||"",tags:(e?.tags||[]).join(", "),minAppVersion:e?.minAppVersion||"",maxAppVersion:e?.maxAppVersion||"",platforms:(e?.platforms||[]).join(", ")}),[p,u]=T(new Set),h=J(null),m=J(null);X(()=>{m.current?.scrollIntoView({block:"start"}),m.current?.querySelector("input")?.focus({preventScroll:!0})},[]);let y=!!e||l==="zip",_=(k,A)=>{f(O=>({...O,[k]:A})),u(O=>new Set([...O,k])),s.clear()},C=()=>void s.run(async()=>{if(!e&&!d.name.trim())return{error:{key:"sub.errName"}};if(!y&&!(l==="github"?d.githubRepoUrl:d.npmPackage).trim())return{error:{key:"sub.errSource"}};let k=h.current?.files?.[0];if(y&&!k)return{error:{key:"sub.errZip"}};if(k&&k.size>50*1024*1024)return{error:{key:"sub.errLarge"}};if(y&&!d.version.trim())return{error:{key:"sub.errVersion"}};let A=ee().cloudInvoke;if(!A)return{error:{key:"err.unavailable"}};let O=e?{summary:d.summary.trim(),version:d.version.trim(),readme:d.readme}:{type:d.type,source:l,name:d.name.trim(),summary:d.summary.trim(),...l==="github"?{githubRepoUrl:d.githubRepoUrl.trim()}:l==="npm"?{npmPackage:d.npmPackage.trim()}:{version:d.version.trim(),readme:d.readme}},q=Object.fromEntries(["description","tags","minAppVersion","maxAppVersion","platforms"].filter(Y=>!e||p.has(Y)).map(Y=>[Y,d[Y].trim()])),N=y&&k?new Uint8Array(await k.arrayBuffer()):null;if(!i.current)return;let B=cr(await A("cloud:marketSubmit",{...e?{id:e.id}:{},fields:{...O,...q},...N&&k?{zip:{name:k.name,data:N}}:{}}));if(i.current){if(!B.ok)return B.status===401&&ee().authStatus?.().catch(()=>{}),dm.has(B.code||"")?{error:{key:`sub.err.${B.code}`}}:Ae(B);t()}}),x=(k,A,O="")=>o("label",{class:"fx-sub-field",for:`${a}-${k}`,children:[o("span",{children:A}),o("input",{id:`${a}-${k}`,value:d[k],placeholder:O,maxLength:k==="summary"?2e3:500,onInput:q=>_(k,q.currentTarget.value)})]});return o(fe,{title:e?r("sub.updateTitle",{name:e.name}):r("sub.new"),children:o("form",{ref:m,class:"fx-sub-form",onSubmit:k=>{k.preventDefault(),C()},children:[o("fieldset",{disabled:s.pending,children:[!e&&o(R,{children:[o("div",{class:"fx-sub-columns",children:[o("label",{class:"fx-sub-field",for:`${a}-type`,children:[o("span",{id:`${a}-type-label`,children:r("sub.type")}),o("select",{"aria-labelledby":`${a}-type-label`,id:`${a}-type`,value:d.type,onChange:k=>_("type",k.currentTarget.value),children:lm.map(k=>o("option",{value:k,children:r(Zl(k))},k))})]}),o("label",{class:"fx-sub-field",for:`${a}-source`,children:[o("span",{id:`${a}-source-label`,children:r("sub.source")}),o("select",{"aria-labelledby":`${a}-source-label`,id:`${a}-source`,value:l,onChange:k=>{c(k.currentTarget.value),s.clear()},children:cm.map(k=>o("option",{value:k,children:k==="github"?"GitHub":k==="npm"?"npm":"ZIP"},k))})]})]}),x("name",r("sub.name"))]}),o(ie,{children:e?`${r("sub.identity")}: ${e.id}`:r("sub.identityHint")}),x("summary",r("sub.summary"),e?r("sub.keep"):""),o("label",{class:"fx-sub-field",for:`${a}-description`,children:[o("span",{children:r("sub.description")}),o("textarea",{id:`${a}-description`,value:d.description,rows:3,maxLength:2e5,onInput:k=>_("description",k.currentTarget.value)})]}),x("tags",r("sub.tags"),r("sub.tagsHint")),o("div",{class:"fx-sub-columns",children:[x("minAppVersion",r("sub.minAppVersion"),"2.13.0"),x("maxAppVersion",r("sub.maxAppVersion"),r("sub.optional"))]}),x("platforms",r("sub.platforms"),"desktop, android, ios, web"),o(ie,{children:r("sub.requirementsHint")}),y?o(R,{children:[o("label",{class:"fx-sub-field",for:`${a}-zip`,children:[o("span",{id:`${a}-zip-label`,children:r("sub.zip")}),o("input",{"aria-labelledby":`${a}-zip-label`,id:`${a}-zip`,type:"file",accept:".zip,application/zip",ref:h}),o("small",{children:r("sub.zipHint")})]}),x("version",r("sub.version"),e?.version?`> ${e.version}`:"1.0.0"),e&&o(ie,{children:r("sub.versionHint")}),o("label",{class:"fx-sub-field",for:`${a}-readme`,children:[o("span",{children:r("sub.readme")}),o("textarea",{id:`${a}-readme`,value:d.readme,rows:5,maxLength:2e5,placeholder:e?r("sub.keep"):"",onInput:k=>_("readme",k.currentTarget.value)})]})]}):o(R,{children:[l==="github"?x("githubRepoUrl",r("sub.repo"),"https://github.com/owner/repo"):x("npmPackage",r("sub.npm"),"@scope/plugin-name"),o(ie,{children:r(l==="github"?"sub.repoHint":"sub.npmHint")})]}),o(ie,{children:r("sub.reviewHint")})]}),o("div",{class:"fx-sub-actions",children:[o(U,{variant:"primary",pending:s.pending,submit:!0,children:r("sub.submit")}),o(U,{disabled:s.pending,onClick:n,children:r("common.cancel")})]}),o(ae,{a:s,captchaSection:"submission"})]})})}function um({items:e,reload:t}){let n=Pt(),r=lr(),[a,i]=T("all"),[s,l]=T(null),[c,d]=T(null),f=u=>{d(null),l(u)},p=e.filter(u=>a==="all"||(a==="pending"?u.status==="pending"||!!u.pendingUpdate:u.status===a));return o(R,{children:[s&&o(pm,{target:s==="new"?null:s,onCancel:()=>l(null),onDone:()=>{d(s==="new"?"sub.submitted":"sub.updated"),l(null),t()}},s==="new"?"new":s.id),o(fe,{title:n("sub.mine"),desc:n("sub.desc"),actions:o(R,{children:[o(U,{variant:"primary",disabled:!!s,onClick:()=>f("new"),children:n("sub.new")}),o(U,{disabled:!!s,onClick:t,children:n("sub.refresh")})]}),children:[c&&o("p",{class:"fx-msg is-ok fx-sub-result",role:"status",children:n(c)}),!!e.length&&o("div",{class:"fx-sub-filter",children:[o("label",{for:r,children:n("sub.filter")}),o("select",{id:r,value:a,onChange:u=>i(u.currentTarget.value),children:[o("option",{value:"all",children:n("sub.all")}),["pending","approved","rejected"].map(u=>o("option",{value:u,children:n(Yl(u))},u))]})]}),p.length?p.map(u=>o("article",{class:"fx-sub-item","data-submission-id":u.id,children:[o("div",{class:"fx-sub-item-head",children:[o("strong",{children:u.name}),o("span",{class:`fx-tag ${u.status==="approved"?"fx-status--resolved":u.status==="rejected"?"fx-tag--danger":"fx-tag--accent"}`,children:n(Yl(u.status))})]}),o("div",{class:"fx-sub-meta",children:[o("span",{children:u.id}),o("span",{children:n(Zl(u.type))}),o("span",{children:u.source==="github"?"GitHub":u.source==="npm"?"npm":"ZIP"}),u.version&&o("span",{children:["v",u.version]}),o("span",{children:n("sub.downloads",{n:u.downloads||0})})]}),u.summary&&o("p",{class:"fx-sub-summary",children:u.summary}),u.status==="rejected"&&u.reviewNote&&o(ie,{tone:"error",children:u.reviewNote}),u.rejectedUpdate&&o(ie,{tone:"error",children:[n("sub.rejectedVersion",{version:u.rejectedUpdate.version}),u.rejectedUpdate.note?`: ${u.rejectedUpdate.note}`:""]}),u.pendingUpdate?o(ie,{children:n("sub.pendingVersion",{version:u.pendingUpdate.version})}):u.source==="zip"?o(U,{disabled:!!s,onClick:()=>f(u),children:n("sub.update")}):o(ie,{children:n("sub.remoteUpdate")})]},u.id)):o(rt,{children:e.length?n("sub.noResults"):o(R,{children:[o("strong",{children:n("sub.empty")}),o("p",{children:n("sub.emptyHint")})]})})]})]})}function Ql(){let e=Re(()=>H("/market/mine"));switch(e.state){case"loading":return o(Te,{});case"signedOut":return o(De,{});case"error":return o(Oe,{error:e.error,onRetry:e.retry});case"ready":return o(um,{items:e.data?.items||[],reload:e.reload})}}var fm=e=>!!e&&typeof e=="object"&&typeof e.enabled=="boolean";async function Ha(e,t){let n=ee().cloudInvoke;if(!n)throw new Error("no_bridge");let r=await n(e,t);if(!fm(r))throw new Error(String(r?.error??"unavailable"));return r}var mm=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins","diag.item.runs"];function ec(){let[e,t]=T(0);return X(()=>ee().onAuthChanged?.(()=>t(n=>n+1)),[]),o(gm,{standalone:!0},e)}function gm({standalone:e=!1}={}){let{t,locale:n}=K(),r=Ue(),[a,i]=T(null),[s,l]=T(!1),c=re(),d=re();if(X(()=>{let y=!1,_=0,C=()=>{let k=++_;Ha("diagnostics:get").then(A=>{!y&&k===_&&(i(A),l(!0))},()=>{!y&&k===_&&(i(null),l(!0))})};C();let x=ee().onAuthChanged?.(C);return()=>{y=!0,x?.()}},[]),!a?.signedIn)return e?s?a?o(De,{}):o(rt,{children:t("diag.unavailable")}):o(Te,{panels:1}):null;let f=()=>void d.run(async()=>{try{let y=await Ha("diagnostics:uploadNow");return r.current&&i(y),y.lastError?{error:{key:"diag.failed",vars:{reason:y.lastError}}}:y.enabled&&y.lastUploadAt?{success:{key:"diag.uploaded"}}:void 0}catch(y){return{error:{raw:Et(y)||t("err.generic")}}}}),p=async y=>{let _=!1;await c.run(async()=>{d.clear();try{let C=await Ha("diagnostics:set",y);r.current&&i(C),_=!0}catch(C){return{error:{raw:Et(C)||t("err.generic")}}}}),_&&y.enabled&&r.current&&f()},u=a.intervalHours??24,h=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:Ut(a.lastUploadAt,n)}):t("diag.noUpload")} \xB7 ${h}`;return o(fe,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[o(Le,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:o(Mt,{checked:a.enabled,disabled:c.pending,label:t("diag.enable"),onChange:y=>void p({enabled:y})})}),o(ze,{class:"fx-diag",children:[o("strong",{children:t("diag.collected")}),o("ul",{children:mm.map(y=>o("li",{children:t(y)},y))}),o(ie,{children:t("diag.notCollected")})]}),a.sessions!==void 0&&o(Le,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:o(Mt,{checked:a.sessions,disabled:c.pending,label:t("diag.sessions"),onChange:y=>void p({sessions:y})})}),a.memory!==void 0&&o(Le,{label:t("diag.memory"),desc:t("diag.memoryDesc"),children:o(Mt,{checked:a.memory,disabled:c.pending,label:t("diag.memory"),onChange:y=>void p({memory:y})})}),o(Le,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:o(Mt,{checked:a.activity,disabled:c.pending,label:t("diag.activity"),onChange:y=>void p({activity:y})})}),a.enabled&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:m}),o(U,{pending:d.pending,disabled:c.pending,onClick:f,children:t("diag.uploadNow")})]}),o(ze,{class:"fx-sub--tight",children:[o(ie,{children:t("diag.retention",{n:a.retainDays})}),a.enabled&&a.lastError&&!d.error&&!d.success&&o("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:a.lastError})}),o(ae,{a:c}),o(ae,{a:d})]})]})}var Mo=20,kr=5,hm=5*1024*1024,wr=1e4,bm={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function nc(e){let{t}=K(),n=e.status||"open",r=bm[n];return o("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?t(r):n})}function oc(){let[e,t]=T(null),n=Re(async()=>{let r=await H(`/feedback?limit=${Mo}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?o(Te,{panels:1,rows:3}):n.state==="signedOut"?o(De,{}):n.state==="error"?o(Oe,{error:n.error,onRetry:n.retry}):e?o(wm,{id:e,onBack:()=>{t(null),n.reload()}}):o(vm,{first:n.data,onOpen:t,onChanged:n.reload})}function vm(e){let{t,locale:n}=K(),r=Ue(),[a,i]=T(e.first),[s,l]=T(e.first.length===Mo),[c,d]=T(!1),[f,p]=T(!1),u=re();X(()=>{i(e.first),l(e.first.length===Mo)},[e.first]);let h=()=>void u.run(async()=>{let m=await H(`/feedback?limit=${Mo}&offset=${a.length}`);if(!m.ok)return{error:dt(m)};let y=Array.isArray(m.data?.tickets)?m.data.tickets:[];r.current&&(i(_=>{let C=new Set(_.map(x=>x.id));return[..._,...y.filter(x=>!C.has(x.id))]}),l(y.length===Mo))});return o(fe,{icon:"message",title:t("fb.list.title"),desc:t("fb.list.desc"),actions:c?void 0:o(U,{variant:"primary",onClick:()=>{p(!1),d(!0)},children:[o(W,{name:"plus",size:12})," ",t("fb.new")]}),children:[c&&o(km,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),p(!0),e.onChanged()}}),f&&!c&&o(ze,{children:o("div",{class:"fx-msg is-ok",role:"status",children:t("fb.submitted")})}),a.length===0?o(rt,{children:t("fb.empty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map(m=>o("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>e.onOpen(m.id),children:[o("span",{class:`fx-dot${m.user_unread?" is-on":""}`,"aria-label":m.user_unread?t("fb.unread"):void 0}),o("span",{class:"fx-list-main",children:[o("strong",{children:m.title||(m.description||"").slice(0,60)||t("fb.untitled")}),o("small",{children:Ut(m.updated_at||m.created_at,n)})]}),o(nc,{status:m.status}),o(W,{name:"chevron",size:12})]},m.id))}),a.length>0&&(s||u.error)&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:t("fb.shown",{n:we(a.length,n)})}),s&&o(U,{pending:u.pending,onClick:h,children:t("common.loadMore")})]}),u.error&&o(ze,{children:o(ae,{a:u})})]})}function ym(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(e)})}var xm=0;function km(e){let{t}=K(),n=Ue(),[r,a]=T(""),[i,s]=T([]),[l,c]=T(null),[d,f]=T(!1),p=J(null),u=re(),[h,m]=T(0),y=J(0);y.current=i.length;let _=async x=>{c(null);for(let k of Array.from(x||[])){if(!k.type||!k.type.startsWith("image/")){c({key:"err.imageType"});continue}if(k.size>hm){c({key:"err.imageTooLarge"});continue}if(y.current>=kr){c({key:"err.tooManyImages"});break}y.current++,m(A=>A+1);try{let A=await ym(k);if(!n.current)return;let O={id:`img-${++xm}`,filename:k.name||"image",mime_type:k.type,size:k.size,data_base64:A.replace(/^data:[^;]+;base64,/,""),url:A};s(q=>q.length>=kr?q:[...q,O])}catch{y.current--,c({key:"err.imageRead"})}finally{n.current&&m(A=>A-1)}}},C=()=>void u.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>wr)return{error:{key:"err.feedbackTooLong"}};let k=i.map(({filename:O,mime_type:q,size:N,data_base64:B})=>({filename:O,mime_type:q,size:N,data_base64:B})),A=await H("/feedback",{method:"POST",body:{description:x,attachments:k},timeoutMs:12e4});if(!A.ok)return Ae(A);e.onSubmitted()});return o("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let k=Array.from(x.clipboardData?.items||[]).filter(A=>A.kind==="file").map(A=>A.getAsFile()).filter(Boolean);k.length&&(x.preventDefault(),_(k))},onDragOver:x=>{x.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:x=>{x.preventDefault(),f(!1),_(x.dataTransfer?.files)},children:[o("label",{class:"fx-field",children:[o("span",{children:t("fb.descLabel")}),o("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:wr,autoFocus:!0,placeholder:t("fb.descPlaceholder"),onInput:x=>a(x.currentTarget.value)})]}),o("p",{class:"fx-note",children:t("fb.imagesHint",{n:kr})}),i.length>0&&o("div",{class:"fx-thumbs",children:i.map(x=>o("span",{class:"fx-thumb",children:[o("img",{src:x.url,alt:x.filename}),o("button",{type:"button","aria-label":t("fb.removeImage"),title:t("fb.removeImage"),onClick:()=>{s(k=>k.filter(A=>A.id!==x.id)),c(null)},children:o(W,{name:"x",size:11})})]},x.id))}),l&&o("div",{class:"fx-msg is-error",role:"alert",children:bt(l,t)}),o("input",{ref:p,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let k=x.currentTarget;_(k.files),k.value=""}}),o("div",{class:"fx-inline",children:[o(U,{disabled:i.length>=kr||u.pending,onClick:()=>p.current?.click(),children:[o(W,{name:"image",size:12})," ",t("fb.addImages")]}),o("span",{class:"fx-grow"}),o(U,{disabled:u.pending,onClick:e.onCancel,children:t("common.cancel")}),o(U,{variant:"primary",pending:u.pending,disabled:h>0,onClick:C,children:t("fb.submit")})]}),o(ae,{a:u})]})}function wm(e){let{t,locale:n}=K(),[r,a]=T({state:"loading"}),[i,s]=T(0),[l,c]=T(""),[d,f]=T(null),p=re(),u=J(0);X(()=>{let A=++u.current;return H(`/feedback/${encodeURIComponent(e.id)}`).then(O=>{if(A===u.current){if(!O.ok){a({state:"error",fail:O});return}a({state:"ready",data:{ticket:O.data.ticket,replies:O.data.replies??[],attachments:O.data.attachments??[]}}),H(`/feedback/${encodeURIComponent(e.id)}/read`,{method:"POST"})}}),()=>{u.current++}},[e.id,i]),X(()=>{if(!d)return;let A=O=>{O.key==="Escape"&&f(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[d]);let h=o("div",{class:"fx-back",children:o(U,{onClick:e.onBack,children:[o(W,{name:"back",size:12})," ",t("fb.back")]})});if(r.state==="loading")return o(R,{children:[h,o(Te,{panels:1,rows:3})]});if(r.state==="error")return o(R,{children:[h,o(Oe,{error:dt(r.fail),onRetry:()=>{a({state:"loading"}),s(A=>A+1)}})]});let{ticket:m,replies:y,attachments:_}=r.data,C=m.status==="closed",x=A=>_.filter(O=>(O.reply_id??null)===A),k=()=>void p.run(async()=>{let A=l.trim();if(!A)return{error:{key:"err.replyEmpty"}};if(A.length>wr)return{error:{key:"err.replyTooLong"}};let O=await H(`/feedback/${encodeURIComponent(m.id)}/replies`,{method:"POST",body:{content:A},timeoutMs:6e4});return O.ok?(c(""),s(q=>q+1),{success:{key:"fb.replySent"}}):Ae(O)});return o(R,{children:[h,o(fe,{icon:"message",title:m.title||t("fb.untitled"),actions:o(nc,{status:m.status}),desc:`#${String(m.id).slice(0,8)} \xB7 ${Ut(m.created_at,n)}`,children:[o("div",{class:"fx-thread fx-block",children:[o(tc,{who:"user",when:m.created_at,text:m.description||"",files:x(null),onZoom:f}),y.map((A,O)=>o(tc,{who:A.author_role==="user"?"user":"admin",when:A.created_at,text:A.content||"",files:A.id?x(A.id):[],onZoom:f},A.id??O))]}),C?o(ze,{children:o(ie,{children:t("fb.closedNote")})}):o(ze,{class:"fx-form",children:[o("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:wr,placeholder:t("fb.replyPlaceholder"),"aria-label":t("fb.replyPlaceholder"),onInput:A=>{c(A.currentTarget.value),p.success&&p.clear()}}),o("div",{class:"fx-inline",children:[o("span",{class:"fx-grow"}),o(U,{variant:"primary",pending:p.pending,onClick:k,children:t("fb.replySend")})]}),o(ae,{a:p})]})]}),d&&o("div",{class:"fx-lightbox",role:"dialog","aria-label":t("fb.imagePreview"),onClick:()=>f(null),children:o("img",{src:d,alt:""})})]})}function tc(e){let{t,locale:n}=K();return o("div",{class:`fx-bubble fx-bubble--${e.who}`,children:[o("div",{class:"fx-bubble-meta",children:[e.who==="user"?t("fb.you"):t("fb.support")," \xB7 ",Ut(e.when,n)]}),o("div",{class:"fx-bubble-text",children:e.text}),e.files.length>0&&o("div",{class:"fx-thumbs",children:e.files.map((r,a)=>{let i=r.mime_type||"";if(i.startsWith("image/")&&r.data_base64){let s=`data:${i};base64,${r.data_base64}`;return o("button",{type:"button",class:"fx-thumb",onClick:()=>e.onZoom(s),"aria-label":t("fb.imagePreview"),children:o("img",{src:s,alt:r.filename||""})},r.id??a)}return o("span",{class:"fx-tag",children:[o(W,{name:"card",size:11})," ",r.filename||t("fb.attachment")]},r.id??a)})})]})}var ac=[{id:"monthly",field:"priceMonthly",discount:"recurringPriceMonthly"},{id:"quarterly",field:"priceQuarterly",discount:"recurringPriceQuarterly"},{id:"yearly",field:"priceYearly",discount:"recurringPriceYearly"}];function rc(e,t){let n=ac.find(s=>s.id===t),r=he(e.priceMonthly)??0,a=(he(e[n.field])??0)||(t==="quarterly"?Math.round(r*300)/100:0),i=he(e[n.discount])??0;return i>0&&i<a?i:a}function Va(e,t,n){let r=we(e,n),a=String(t||"CNY").toUpperCase();return a==="CNY"?`\xA5${r}`:a==="USD"?`$${r}`:`${r} ${a}`}async function zm(){let[e,t,n]=await Promise.all([H("/membership/my"),H("/credits/balance"),H("/features")]);return!e.ok&&Mn(e)?e:!t.ok&&Mn(t)?t:{ok:!0,status:200,data:{membership:e.ok?e.data?.membership??null:null,membershipFailed:!e.ok,balance:t.ok?he(t.data?.balance):null,balanceFailed:!t.ok,features:n.ok&&n.data&&typeof n.data=="object"?n.data:{}}}}async function Wa(e,t){let[n,r]=await Promise.all([zm(),H(e)]);return n.ok?r.ok?{ok:!0,status:r.status,data:{status:n.data,list:t(r.data)}}:r:n}var ja=e=>(Array.isArray(e)?e:[]).filter(t=>!!t&&typeof t=="object"&&t.isActive!==!1),_m=15*6e4;function Ga(e){let t=J(0),n=J(0),r=J(e);return r.current=e,X(()=>{let a=()=>{let i=Date.now();i>t.current||document.visibilityState==="hidden"||i-n.current<2e3||(n.current=i,r.current?.())};return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[]),()=>{t.current=Date.now()+_m}}function ic(e){let t=e.membership;return t&&(t.status===void 0||t.status==="active")?t:null}function Xa(e){let{t,locale:n}=K(),r=e.status,a=ic(r),i=To(a?.tier),s=i==="Free";return o("section",{class:"fx-shop-strip","aria-label":t("store.status"),children:[o("div",{class:"fx-shop-stat",children:[o("small",{children:t("store.tier")}),r.membershipFailed?o("b",{class:"is-empty",children:"\u2014"}):o("b",{"data-testid":"shop-tier",children:[s?t("member.freeName"):a?.plan?.name||i,!s&&o("i",{children:a?.expiresAt?t("member.expires",{date:hr(a.expiresAt,n)}):t("member.noExpiry")})]})]}),o("div",{class:"fx-shop-stat",children:[o("small",{children:t("store.balance")}),o("b",{class:r.balance===null?"is-empty":"","data-testid":"shop-balance",children:r.balance===null?"\u2014":we(r.balance,n)})]}),(r.membershipFailed||r.balanceFailed)&&o("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")}),o("span",{class:"fx-grow"}),e.children]})}function Ka(e){return o("section",{class:"fx-shop-section",children:[o("div",{class:"fx-shop-head",children:[o("div",{children:[o("h2",{children:e.title}),e.desc&&o("p",{children:e.desc})]}),e.right]}),e.children]})}function Ja(e){let t=re(),[n,r]=T(null),a=(i,s,l,c)=>{r(i),t.run(async()=>{if(!await mn(s,l,c))return{error:{key:"err.openFailed"}};e()})};return{a:t,payingId:t.pending?n:null,open:a}}function Ya(e){return o(U,{variant:"ghost",pending:e.pending,disabled:e.disabled,onClick:e.onClick,children:[e.label,o(W,{name:"external",size:12})]})}function Za(e){return o("div",{class:"fx-shop-empty",children:e.children})}function sc(){let{t:e,locale:t}=K(),n=Re(()=>Wa("/payment/offerings",h=>ja(h?.membershipPlans))),r=Ga(n.state==="ready"?n.reload:null),a=Ja(r),[i,s]=T("monthly");if(n.state==="loading")return o(Te,{panels:2,rows:2});if(n.state==="signedOut")return o(De,{});if(n.state==="error")return o(Oe,{error:n.error,onRetry:n.retry});let{status:l,list:c}=n.data,d=l.features.payment!==!1,f=ac.filter(h=>c.some(m=>rc(m,h.id)>0)),p=f.some(h=>h.id===i)?i:f[0]?.id??"monthly",u=ic(l)?.tier?.toLowerCase()??null;return o(R,{children:[o(Xa,{status:l,onRetry:n.reload}),o(Ka,{title:e("store.choosePlan"),desc:e(d?"store.payHint":"store.payOff"),right:f.length>1?o(It,{value:p,label:e("store.period"),onChange:s,options:f.map(h=>({value:h.id,label:e(`store.period.${h.id}`)}))}):void 0,children:[c.length===0?o(Za,{children:e("store.noPlans")}):o("div",{class:"fx-shop-tiers",children:c.map(h=>{let m=rc(h,p),y=!!u&&!l.membershipFailed&&h.tier?.toLowerCase()===u;return o("article",{class:"fx-shop-tier","data-tier":h.tier,children:[o("h3",{children:[h.name||To(h.tier),y&&o("span",{class:"fx-shop-current",children:[o(W,{name:"check",size:12}),e("store.currentTier")]})]}),o("div",{class:"fx-shop-price",children:m>0?o(R,{children:[Va(m,h.currency,t),o("small",{children:e(`store.per.${p}`)})]}):"\u2014"}),o("p",{children:h.description}),d&&m>0&&o(Ya,{label:e(y?"member.renew":"store.pay"),pending:a.payingId===h.id,disabled:a.a.pending,onClick:()=>a.open(h.id,"membership",h.id,p)})]},h.id)})}),o(ae,{a:a.a})]})]})}function lc(){let{t:e,locale:t}=K(),n=Re(()=>Wa("/payment/offerings",c=>ja(c?.packages))),r=Ga(n.state==="ready"?n.reload:null),a=Ja(r);if(n.state==="loading")return o(Te,{panels:2,rows:2});if(n.state==="signedOut")return o(De,{});if(n.state==="error")return o(Oe,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1;return o(R,{children:[o(Xa,{status:i,onRetry:n.reload}),o(Ka,{title:e("store.packs"),desc:e(l?"store.packsHint":"store.payOff"),children:[s.length===0?o(Za,{children:e("store.noPacks")}):o("div",{class:"fx-shop-grid",children:s.map(c=>{let d=he(c.price)??0;return o(cc,{icon:"coins",kind:e("store.kind.pack"),name:`${c.name||""} \xB7 ${e("store.nPoints",{n:we(c.credits,t)})}`,desc:c.description,meta:e("store.instant"),children:l&&d>0&&o(Ya,{label:e("store.payPrice",{price:Va(d,c.currency,t)}),pending:a.payingId===c.id,disabled:a.a.pending,onClick:()=>a.open(c.id,"credits")})},c.id)})}),o(ae,{a:a.a})]})]})}function cc(e){return o("article",{class:"fx-shop-card",children:[o("div",{class:"fx-shop-visual","aria-hidden":"true",children:e.emoji?o("span",{class:"fx-shop-emoji",children:e.emoji}):o(W,{name:e.icon,size:18})}),o("div",{class:"fx-shop-body",children:[o("span",{class:"fx-shop-kind",children:e.kind}),o("strong",{children:e.name}),e.desc&&o("p",{children:e.desc}),o("div",{class:"fx-shop-foot",children:[o("span",{class:"fx-shop-meta",children:e.meta}),o("span",{class:"fx-shop-acts",children:e.children})]}),e.below]})]})}var Sm={reset_card:"store.kind.card",api_quota_key:"store.kind.code"};function Cm(e){let{t,locale:n}=K(),{p:r}=e,a=re(),[i,s]=T(null),[l,c]=T(!1),d=he(r.pricePoints)??0,f=he(r.priceRmb)??0,p=typeof r.availableKeys=="number"&&r.availableKeys<=0,u=d>0&&e.balance!==null&&e.balance<d,h=()=>void a.run(async()=>{let y=await H("/shop/purchase",{method:"POST",body:{productId:r.id,payMethod:"points"},timeoutMs:3e4});return y.ok?(s(typeof y.data?.key=="string"&&y.data.key?y.data.key:null),e.onRedeemed(),{success:{key:"store.redeemed"}}):y.status===0?(c(!0),{error:{key:"store.uncertain"}}):Ae(y)}),m=p?t("store.soldOut"):u?t("err.insufficientPoints"):typeof r.availableKeys=="number"?t("store.left",{n:r.availableKeys}):t("store.toBackpack");return o(cc,{icon:r.type==="api_quota_key"?"key":"gift",emoji:r.icon,kind:t(Sm[r.type||""]??"store.kind.item"),name:r.name||"",desc:r.description,meta:m,below:o(R,{children:[o(ae,{a}),i&&o("div",{class:"fx-shop-key",children:[o("code",{children:i}),o(qt,{text:i,label:t("backpack.copyKey")})]})]}),children:[d>0&&o(nn,{variant:"primary",pending:a.pending,disabled:p||u||l,label:t("store.redeem",{n:we(d,n)}),confirmLabel:t("store.redeemConfirm",{n:we(d,n)}),onConfirm:h}),e.payment&&f>0&&o(Ya,{label:Va(f,r.currency,n),pending:e.paying,disabled:e.payBusy||p,onClick:e.onPay})]})}function dc(){let{t:e,goTo:t}=K(),n=Re(()=>Wa("/shop/products",d=>ja(d))),r=Ga(n.state==="ready"?n.reload:null),a=Ja(r);if(n.state==="loading")return o(Te,{panels:2,rows:2});if(n.state==="signedOut")return o(De,{});if(n.state==="error")return o(Oe,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1,c=i.features.shop!==!1;return o(R,{children:[o(Xa,{status:i,onRetry:n.reload,children:t&&o(U,{onClick:()=>t("backpack"),children:e("store.openBackpack")})}),o(Ka,{title:e("store.redeemTitle"),desc:e("store.redeemHint"),children:[!c||s.length===0?o(Za,{children:e(c?"store.noItems":"store.itemsOff")}):o("div",{class:"fx-shop-grid",children:s.map(d=>o(Cm,{p:d,balance:i.balance,payment:l,paying:a.payingId===d.id,payBusy:a.a.pending,onPay:()=>a.open(d.id,"storefront"),onRedeemed:n.reload},d.id))}),o(ae,{a:a.a})]})]})}var Tm="forsion-extend",pc=[{id:"account",titleKey:"page.account",tabTitleKey:"page.profile",aliases:["profile"],keywords:"\u4E2A\u4EBA\u4E3B\u9875 profile avatar nickname \u5934\u50CF \u6635\u79F0",Component:Ll},{id:"account-details",parent:"account",titleKey:"account.details.title",keywords:"\u767B\u5F55 \u8D44\u6599 \u624B\u673A \u90AE\u7BB1 \u5207\u6362 \u9000\u51FA login sign-in email phone account switch logout",Component:fl},{id:"security",parent:"account",titleKey:"page.security",keywords:"\u5B89\u5168 \u5BC6\u7801 \u8BBE\u5907 \u7ED1\u5B9A security password devices",Component:Vl},{id:"quota",titleKey:"page.membershipUsage",tabTitleKey:"page.membershipQuota",aliases:["membership"],keywords:"\u4F1A\u5458 \u989D\u5EA6 \u540E\u53F0 quota membership background",Component:Fl},{id:"points",parent:"quota",titleKey:"page.pointsInvite",keywords:"\u79EF\u5206 \u9080\u8BF7 \u5151\u6362 \u5145\u503C points invite redeem credits",Component:Ol},{id:"usage",parent:"quota",titleKey:"page.usage",keywords:"\u7528\u91CF \u8BB0\u5F55 \u6D88\u8017 usage history tokens",Component:Kl},{id:"backpack",titleKey:"page.backpack",keywords:"\u80CC\u5305 \u5361\u5238 backpack inventory",Component:Bl},{id:"submission",titleKey:"page.submission",Component:Ql},{id:"feedback",titleKey:"page.helpDiagnostics",tabTitleKey:"page.feedback",keywords:"\u5E2E\u52A9 \u53CD\u9988 help feedback",Component:oc},{id:"diagnostics",parent:"feedback",titleKey:"diag.title",keywords:"\u8BCA\u65AD \u4E0A\u4F20 \u65E5\u5FD7 diagnostic upload logs",Component:ec}],uc=[{id:"membership",titleKey:"store.membership",descKey:"store.membership.desc",icon:"crown",Component:sc},{id:"points",titleKey:"store.points",descKey:"store.points.desc",icon:"coins",Component:lc},{id:"items",titleKey:"store.items",descKey:"store.items.desc",icon:"package",Component:dc}],Am=e=>`forsion/fx:${Tm}:${e}`;function fc(e){let{ctx:t,page:n}=e,[r,a]=T(()=>Qe(t.getLocale?.()));X(()=>{a(Qe(t.getLocale?.()));let l=t.subscribeLocale?.(c=>a(Qe(c)));return()=>{typeof l=="function"&&l()}},[t]);let i=At(()=>{let l=t.app?.openSettings;return{ctx:t,locale:r,t:pr(r),goTo:typeof l=="function"?c=>l.call(t.app,Am(c)):null}},[t,r]),s=n.Component;return o(za.Provider,{value:i,children:o("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[o("style",{children:Bs}),o(s,{})]})})}function mc(e,t=window){let n=t?.tangu;if(!e||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof e.registerStoreView!="function")return 0;let r=a=>()=>Ce(Qe(e.getLocale?.()),a);for(let a of uc)e.registerStoreView({id:a.id,title:r(a.titleKey),description:r(a.descKey),group:r("store.group"),icon:a.icon,mount(i){return Be(o(fc,{ctx:e,page:a}),i),()=>{Be(null,i)}}});return uc.length}function gc(e,t=window){let n=t?.tangu;if(!e||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof e.registerSettingsView!="function")return 0;for(let r of pc)e.registerSettingsView({id:r.id,category:"forsion",parent:r.parent,tabTitle:r.tabTitleKey?()=>Ce(Qe(e.getLocale?.()),r.tabTitleKey):void 0,aliases:r.aliases,keywords:r.keywords,title:()=>Ce(Qe(e.getLocale?.()),r.titleKey),mount(a){return Be(o(fc,{ctx:e,page:r}),a),()=>{Be(null,a)}}});return pc.length}var Zn=[{id:"lv1"},{id:"lv2"},{id:"lv3"},{id:"lv4"},{id:"new",version:"2.14"}],F=(e,t)=>({zh:e,en:t}),gn=[{id:"welcome",level:"lv1",icon:"compass",title:F("\u8BA4\u8BC6 Forsion","Meet Forsion"),tasks:[{id:"guide-open",event:"own:guide.open",goal:1,title:F("\u6253\u5F00\u4F7F\u7528\u6307\u5357","Open the guide")},{id:"space-switch",event:"space.switch",goal:1,title:F("\u5728 Ribbon \u4E0A\u6362\u4E00\u4E2A Space","Switch to another Space from the ribbon"),go:{space:"amadeus"},spot:{anchor:"ribbon-spaces",here:!0,title:F("\u70B9 Ribbon \u4E0A\u4EFB\u610F\u4E00\u4E2A\u56FE\u6807","Click any icon on the ribbon"),body:F("\u6BCF\u4E2A\u56FE\u6807\u662F\u4E00\u4E2A Space\uFF0C\u70B9\u4E00\u4E0B\u5C31\u5207\u8FC7\u53BB\u3002","Each icon is a Space. One click switches to it.")}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon",label:F("Ribbon\uFF1A\u6BCF\u4E2A\u56FE\u6807\u662F\u4E00\u4E2A Space","Ribbon: each icon is a Space")},{slot:"main-tabs",label:F("\u4E3B\u533A\u7684\u6807\u7B7E\u9875","Tabs in the main area"),text:F("\u6807\u7B7E\u9875","Tab")},{slot:["left-list","right"],label:F("\u5DE6\u53F3\u4FA7\u680F","Left and right sidebars")}]}},{id:"chat",level:"lv1",icon:"message-circle",title:F("\u548C Tangu \u8BF4\u7B2C\u4E00\u53E5\u8BDD","Say hello to Tangu"),tasks:[{id:"chat-first",event:"chat.send",goal:1,title:F("\u53D1\u51FA\u7B2C\u4E00\u6761\u6D88\u606F","Send your first message"),go:{space:"tangu",command:"new-chat"},spot:{anchor:"chat-composer",title:F("\u5728\u8FD9\u91CC\u6253\u4E2A\u62DB\u547C","Say hello here"),body:F("\u6253\u5B57\uFF0C\u6309 Enter \u53D1\u9001\uFF1BShift+Enter \u6362\u884C\u3002","Type, then press Enter to send. Shift+Enter starts a new line.")}},{id:"chat-five",event:"chat.send",goal:5,title:F("\u518D\u804A\u51E0\u53E5\uFF08\u7D2F\u8BA1 5 \u6761\uFF09","Keep talking (5 messages in all)"),go:{space:"tangu"},spot:{anchor:"chat-composer",title:F("\u63A5\u7740\u804A\u51E0\u53E5","Keep the conversation going"),body:F("\u7D2F\u8BA1\u53D1\u51FA 5 \u6761\u5C31\u7B97\u5B8C\u6210\u3002","Five messages in all and this one is done.")}}],figure:{layout:"space",main:"chat",marks:[{slot:"left-top",label:F("\u5DE6\u680F\u9876\u90E8\u300C\u65B0\u4F1A\u8BDD\u300D",'"New chat" at the top of the left sidebar'),text:F("\u65B0\u4F1A\u8BDD","New chat")},{slot:"main-bottom",label:F("\u8F93\u5165\u6846","Message box")}]}},{id:"note",level:"lv1",icon:"file-text",title:F("\u5199\u4E0B\u7B2C\u4E00\u7BC7\u7B14\u8BB0","Write your first note"),tasks:[{id:"note-create",event:"note.create",goal:1,title:F("\u65B0\u5EFA\u4E00\u7BC7\u7B14\u8BB0","Create a note"),go:{space:"amadeus",command:"amadeus-new-note"},spot:{anchor:"note-new",title:F("\u70B9\u300C\u65B0\u5EFA\u7B14\u8BB0\u300D",'Click "New note"'),body:F("\u4E5F\u53EF\u4EE5\u6309 \u2318/Ctrl+N\u3002\u6BCF\u7BC7\u7B14\u8BB0\u90FD\u662F\u667A\u5E93\u91CC\u7684\u4E00\u4E2A .md \u6587\u4EF6\u3002","Or press \u2318/Ctrl+N. Every note is a .md file in your vault.")}},{id:"note-link",event:"note.wikilink",goal:1,title:F("\u7528 [[ \u94FE\u63A5\u53E6\u4E00\u7BC7\u7B14\u8BB0","Link another note with [["),go:{space:"amadeus"},spot:{anchor:"note-body",title:F("\u5728\u6B63\u6587\u91CC\u8F93\u5165 [[","Type [[ in the note"),body:F("\u4ECE\u5F39\u51FA\u7684\u5019\u9009\u91CC\u9009\u4E00\u7BC7\u7B14\u8BB0\uFF0C\u6309 Enter\uFF0C\u4E24\u7BC7\u5C31\u8FDE\u4E0A\u4E86\u3002","Pick a note from the suggestions and press Enter to link the two.")}},{id:"note-canvas",event:"note.canvas",goal:1,title:F("\u628A\u7B14\u8BB0\u5207\u5230\u753B\u5E03","Switch a note to the canvas"),go:{space:"amadeus",command:"amadeus-toggle-canvas"},spot:{anchor:"note-canvas",title:F("\u70B9\u300C\u753B\u5E03\u300D",'Click "Canvas"'),body:F("\u540C\u4E00\u7BC7\u7B14\u8BB0\u644A\u6210\u767D\u677F\uFF0C\u968F\u624B\u6446\uFF1B\u70B9\u300C\u6587\u6863\u300D\u5207\u56DE\u6765\uFF0C\u4E00\u4E2A\u5B57\u90FD\u4E0D\u53D8\u3002",'The same note opens as a whiteboard. Click "Document" to switch back; nothing changes.')}}],figure:{layout:"space",main:"doc",marks:[{slot:"left-top",label:F("\u5DE6\u680F\u300C\u65B0\u5EFA\u7B14\u8BB0\u300D",'"New note" in the left sidebar'),text:F("\u65B0\u5EFA\u7B14\u8BB0","New note")},{slot:"main-top",label:F("\u300C\u6587\u6863 / \u753B\u5E03\u300D\u80F6\u56CA","The Document / Canvas switch")},{slot:"right",label:F("\u53F3\u680F\u91CC\u7684\u300C\u53CD\u94FE\u300D","Backlinks in the right sidebar"),text:F("\u53CD\u94FE","Backlinks")}]}},{id:"theme",level:"lv1",icon:"sparkles",title:F("\u6362\u4E00\u8EAB\u4E3B\u9898","Make it look like yours"),tasks:[{id:"theme-change",event:"theme.change",goal:1,title:F("\u6362\u4E00\u4E2A\u4E3B\u9898","Pick another theme"),go:{settings:"theme"}}],figure:{layout:"settings",marks:[{slot:"nav",label:F("\u8BBE\u7F6E\u91CC\u7684\u300C\u5916\u89C2\u300D",'"Appearance" in Settings'),text:F("\u5916\u89C2","Appearance")},{slot:"section-1",label:F("\u8BBE\u8BA1\u8BED\u8A00","Design language"),text:F("\u8BBE\u8BA1\u8BED\u8A00","Design language")},{slot:"section-2",label:F("\u4E3B\u9898\u8272\u548C\u80CC\u666F\u8272","Theme and background colors"),text:F("\u914D\u8272","Colors")}]}},{id:"database",level:"lv2",icon:"database",title:F("\u6570\u636E\u5E93\uFF1A\u628A\u7B14\u8BB0\u53D8\u6210\u8868","Databases: turn notes into a table"),tasks:[{id:"base-create",event:"base.create",goal:1,title:F("\u65B0\u5EFA\u4E00\u4E2A\u6570\u636E\u5E93","Create a database"),go:{space:"amadeus"}}],figure:{layout:"space",main:"doc",marks:[{slot:"left-list",label:F("\u7B14\u8BB0\u6811\uFF1A\u53F3\u952E \u2192\u300C\u65B0\u5EFA Base\u300D",'Note tree: right-click \u2192 "New Base"')},{slot:"main-body",label:F("\u6B63\u6587\u91CC\u8F93\u5165 /\uFF0C\u9009\u300C\u591A\u7EF4\u8868\u300D",'Type / in a note and pick "Database"')}]}},{id:"market",level:"lv2",icon:"store",title:F("\u4ECE\u5546\u5E97\u88C5\u4E00\u4E2A\u63D2\u4EF6","Install a plugin from the store"),tasks:[{id:"market-install",event:"market.install",goal:1,title:F("\u88C5\u4E00\u4E2A\u63D2\u4EF6","Install a plugin"),go:{command:"open-market"}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon-bottom",label:F("Ribbon \u5E95\u90E8\u7684\u300C\u5546\u5E97\u300D",'"Store" at the bottom of the ribbon')}]}},{id:"space",level:"lv2",icon:"layout-grid",title:F("\u5B58\u4E0B\u81EA\u5DF1\u7684 Space","Save a Space of your own"),tasks:[{id:"space-save",event:"space.save",goal:1,title:F("\u628A\u5F53\u524D\u5E03\u5C40\u5B58\u6210 Space","Save the current layout as a Space"),go:{command:"save-as-space"}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon-plus",label:F("Space \u533A\u7684 \uFF0B","The + under the Spaces")},{slot:"main-top-right",label:F("\u53F3\u4E0A\u89D2\u7684\u6D6E\u52A8\u6309\u94AE","Floating buttons at the top right")}]}},{id:"calendar",level:"lv2",icon:"calendar-days",title:F("\u65E5\u5386\u548C\u5F85\u529E","Calendar and to-dos"),tasks:[{id:"calendar-event",event:"calendar.event",goal:1,title:F("\u5728\u65E5\u5386\u4E0A\u5EFA\u4E00\u4E2A\u65E5\u7A0B","Add an event to the calendar"),go:{space:"calendar"}},{id:"todo-done",event:"todo.done",goal:1,title:F("\u52FE\u6389\u4E00\u6761\u5F85\u529E","Tick off a to-do"),go:{space:"calendar"}}],figure:{layout:"space",main:"grid",marks:[{slot:"left-plus",label:F("\u5DE6\u680F\u300C\u65E5\u5386\u300D\u65C1\u7684 +",'The + next to "Calendars" in the left sidebar')},{slot:"main-body",label:F("\u65F6\u95F4\u683C\uFF1A\u5355\u51FB\u5EFA\u65E5\u7A0B","Time grid: click to add an event")},{slot:"right",label:F("\u53F3\u680F\u7684\u5F85\u529E","To-dos in the right sidebar"),text:F("\u5F85\u529E","To-dos")}]}},{id:"agent",level:"lv3",icon:"bot",title:F("\u521B\u5EFA\u4F60\u7684 Agent","Create your own agent"),tasks:[{id:"agent-create",event:"agent.create",goal:1,title:F("\u65B0\u5EFA\u4E00\u4E2A Agent","Create an agent"),go:{space:"agents"},spot:{anchor:"agent-new",title:F("\u70B9\u300C\u521B\u5EFA Agent\u300D",'Click "Create agent"'),body:F("\u8D77\u4E2A\u540D\u5B57\uFF0C\u5199\u51E0\u53E5\u5B83\u8BE5\u600E\u4E48\u505A\u4E8B\u3002","Give it a name and a few lines on how it should work.")}}]},{id:"muse",level:"lv3",icon:"sparkles",title:F("Muse\uFF1A\u8BA9\u7075\u611F\u81EA\u5DF1\u957F","Muse: ideas that grow on their own"),tasks:[{id:"muse-open",event:"muse.open",goal:1,title:F("\u53BB Muse \u770B\u4E00\u773C","Take a look at Muse"),go:{space:"muse"}}]},{id:"automation",level:"lv3",icon:"zap",title:F("\u81EA\u52A8\u5316\uFF1A\u5230\u70B9\u5C31\u505A","Automations: done on schedule"),tasks:[{id:"automation-create",event:"automation.create",goal:1,title:F("\u5EFA\u4E00\u6761\u81EA\u52A8\u5316","Create an automation"),go:{space:"automation"}}]},{id:"computer",level:"lv4",icon:"terminal",title:F("\u8BA9 Tangu \u64CD\u4F5C\u7535\u8111","Let Tangu use your computer"),tasks:[{id:"cu-use",event:"computer.use",goal:1,title:F("\u8BA9 Tangu \u7528\u4E00\u6B21\u7535\u8111","Have Tangu use your computer once"),go:{settings:"computer-use"},desktopOnly:!0}]},{id:"plugin",level:"lv4",icon:"code",title:F("\u5199\u4E00\u4E2A\u81EA\u5DF1\u7684\u63D2\u4EF6","Write a plugin of your own"),tasks:[{id:"plugin-dev",event:"plugin.local",goal:1,title:F("\u4ECE\u672C\u673A\u6587\u4EF6\u5939\u8F7D\u5165\u4E00\u4E2A\u63D2\u4EF6","Load a plugin from a local folder"),go:{settings:"amadeus-plugins"},desktopOnly:!0}]},{id:"mini-capsules",level:"new",icon:"layout-grid",title:F("Mini \u9876\u680F\u4E24\u9897\u80F6\u56CA","Two capsules on the Mini bar"),tasks:[{id:"mini-open",event:"mini.open",goal:1,title:F("\u6253\u5F00\u4E00\u6B21 Mini \u7A97\u53E3","Open the Mini window"),go:{command:"open-mini"},desktopOnly:!0}]},{id:"todo-standalone",level:"new",icon:"list-tree",title:F("\u5F85\u529E\u89C6\u56FE\u5355\u72EC\u6253\u5F00","Open the to-do view on its own"),tasks:[{id:"todo-open",event:"todo.open",goal:1,title:F("\u5355\u72EC\u6253\u5F00\u4E00\u6B21\u5F85\u529E\u89C6\u56FE","Open the to-do view by itself"),go:{space:"calendar"}}]}],Rt=e=>gn.filter(t=>t.level===e),hn=e=>gn.find(t=>t.id===e);var pt=Zn.filter(e=>!e.version);function Ht(e,t){let n=e.event.startsWith("own:");return t.count(n?e.event.slice(4):e.event,n)>=e.goal}var Io=(e,t)=>e.filter(n=>t.desktop||!n.desktopOnly);function hc(e,t){return Rt(e).every(n=>Io(n.tasks,t).every(r=>Ht(r,t)))}function zr(e,t){let n=pt.findIndex(r=>r.id===e);return n<=0||t.unlockAll?!0:pt.slice(0,n).every(r=>hc(r.id,t))}function Qn(e,t){return zr(e.level,t)?Io(e.tasks,t).every(n=>Ht(n,t))?"done":"active":"locked"}function Qa(e){return pt.find(t=>!hc(t.id,e))?.id??null}function bc(e){let t={...e,unlockAll:!1},n=pt[0].id;for(let r of pt)zr(r.id,t)&&(n=r.id);return n}function Em(e,t){let n=e.split(/[.+-]/).map(a=>Number.parseInt(a,10)||0),r=t.split(/[.+-]/).map(a=>Number.parseInt(a,10)||0);for(let a=0;a<Math.max(n.length,r.length);a++){let i=(n[a]??0)-(r[a]??0);if(i)return i<0?-1:1}return 0}function ei(e){let t=Zn.find(n=>n.version);return t?.version&&e.appVersion&&Em(e.appVersion,t.version)>=0?t.version:null}var vc=e=>gn.filter(t=>t.level!=="new"||!!ei(e));function yc(e,t){let n=Io(Rt(e).flatMap(r=>r.tasks),t);return{done:n.filter(r=>Ht(r,t)).length,total:n.length}}var ti={zh:{agent:`\u9664\u4E86\u9ED8\u8BA4\u7684 Tangu\uFF0C\u4F60\u53EF\u4EE5\u6309\u7528\u9014\u5EFA\u81EA\u5DF1\u7684 Agent\uFF1A\u7ED9\u5B83\u540D\u5B57\u3001\u5DE5\u4F5C\u6307\u4EE4\u548C\u81EA\u5DF1\u7684\u8BB0\u5FC6\uFF0C\u8BA9\u5B83\u4E13\u95E8\u505A\u4E00\u7C7B\u4E8B\u3002
|
|
618
|
+
`;var On=e=>typeof e=="string"?e:"";function hf(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id.trim():typeof t.id=="number"&&Number.isFinite(t.id)?String(t.id):"",o=On(t.titleZh),a=On(t.bodyZh);return!n||!o.trim()&&!a.trim()?null:{id:n,titleZh:o,titleEn:On(t.titleEn).trim()?On(t.titleEn):null,bodyZh:a,bodyEn:On(t.bodyEn).trim()?On(t.bodyEn):null,format:t.format==="html"?"html":"markdown",publishedAt:On(t.publishedAt)||null}}function bf(e,t){return t==="en"&&e.bodyEn?{lang:"en",title:e.titleEn??e.titleZh,body:e.bodyEn}:{lang:"zh",title:e.titleZh,body:e.bodyZh}}var vf=new fa({gfm:!0,breaks:!0}),yf=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],xf=/^(?:https?:|mailto:|#)/i;function tl(e){return ta.sanitize(e,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:yf,ALLOWED_URI_REGEXP:xf})}function kf(e,t){let n=t==="markdown"?vf.parse(e,{async:!1}):e;return tl(n)}var bo=null;function wf(){if(bo===null)try{let e=tl('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');bo=ta.isSupported&&!e.querySelector("script, iframe, [onclick], a[href]")}catch{bo=!1}return bo}function zf(e){try{let t=new URL(String(e??"").trim());return t.protocol==="http:"||t.protocol==="https:"?t.href:null}catch{return null}}var _f="http://www.w3.org/1999/xlink";function vo(e){let t=e.target,n=t&&typeof t.closest=="function"?t.closest("a, area"):null;if(!n||(e.preventDefault(),e.type!=="click"))return;let o=zf(n.getAttribute("href")??n.getAttributeNS(_f,"href"));if(o)try{re().openExternal?.(o)?.catch(()=>{})}catch{}}function el(e){return e.shadowRoot??e.attachShadow({mode:"open"})}function Sf(e){let{ctx:t,ann:n}=e,[o,a]=M(()=>Qe(t.getLocale?.()));Q(()=>{a(Qe(t.getLocale?.()));let p=t.subscribeLocale?.(g=>a(Qe(g)));return()=>{typeof p=="function"&&p()}},[t]);let i=At(()=>ho(o),[o]),s=bf(n,o),l=te(null),c=te(null),d=te(null),f=te(null),u=te(e.onClose);return u.current=e.onClose,Q(()=>{let p=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let g=y=>{if(y.key==="Escape"){y.preventDefault(),y.stopPropagation(),u.current();return}if(y.key!=="Tab")return;let _=c.current,E=d.current,x=l.current;if(!_||!E||!x)return;let k=document.activeElement;if(!k||!x.contains(k)){y.preventDefault(),(y.shiftKey?E:_).focus();return}y.shiftKey&&(k===_||k===x)?(y.preventDefault(),E.focus()):!y.shiftKey&&k===E&&(y.preventDefault(),_.focus())},m=y=>{let _=l.current;_&&y.target instanceof Node&&!_.contains(y.target)&&_.focus()};return window.addEventListener("keydown",g,!0),document.addEventListener("focusin",m,!0),()=>{window.removeEventListener("keydown",g,!0),document.removeEventListener("focusin",m,!0),p?.isConnected&&p.focus()}},[]),Q(()=>{let p=f.current;if(!p)return;let g=el(p);return g.addEventListener("click",vo),g.addEventListener("auxclick",vo),()=>{g.removeEventListener("click",vo),g.removeEventListener("auxclick",vo)}},[]),Q(()=>{let p=f.current;if(!p)return;let g=document.createElement("style");g.textContent=Qs;let m=document.createElement("div");m.className="doc",m.appendChild(kf(s.body,n.format)),el(p).replaceChildren(g,m)},[s.body,n.format]),r("div",{class:"fx-ann-backdrop",children:[r("style",{children:Zs}),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":i("ann.close"),onClick:()=>u.current(),children:r(Y,{name:"x",size:16})}),r("div",{class:"fx-ann-eyebrow",children:i("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:d,type:"button",class:"fx-ann-ok",onClick:()=>u.current(),children:i("ann.ok")})})]})]})}function Cf(e){try{return new URLSearchParams(e||"").has("window")}catch{return!1}}function Tf(e=document,t=12e3){let n=e.getElementById("tangu-splash");return n?.parentNode?new Promise(o=>{let a=()=>{i.disconnect(),clearTimeout(s),o()},i=new MutationObserver(()=>{n.isConnected||a()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(a,t)}):Promise.resolve()}function nl(e,t=window){let n=en(t?.tangu);if(!e||!n?.cloudFetch||!Ln(n)||Cf(t.location?.search))return null;let o=0,a=!1,i=null,s=null,l=()=>{s?.done(),s=null},c=Promise.resolve(),d=(p,g)=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let y=!1,_=E=>{y||(y=!0,i?.id===p.id&&(i=null),Be(null,m),m.remove(),g?.done(),E&&(c=J(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};i={id:p.id,finish:_},Be(r(Sf,{ctx:e,ann:p,onClose:()=>_(!0)}),m)},f=async()=>{let p=++o;await c;let g=await J("/announcements/pending");if(a||p!==o||!g.ok)return;let m=hf(g.data?.announcement);if(!m||i||!wf()||(await Tf(),a||p!==o||i))return;let y=e.app?.queuePopup?.();if(y&&(l(),s=y,await y.ready,s===y&&(s=null),a||p!==o||i)){y.done();return}d(m,y)},u=n.onAuthChanged?.(p=>{i?.finish(!1),l(),p?.loggedIn?f():o++});return f(),{check:f,dispose(){a=!0,o++,typeof u=="function"&&u(),i?.finish(!1),l()}}}function rl(e){return typeof e!="string"?{ok:!1,rule:"format"}:e.length<8?{ok:!1,rule:"min"}:e.length>64?{ok:!1,rule:"max"}:/\s/.test(e)?{ok:!1,rule:"space"}:/[a-z]/.test(e)?/[A-Z]/.test(e)?/[^A-Za-z0-9]/.test(e)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function ol(e){return{length:e.length>=8&&e.length<=64,lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),special:/[^A-Za-z0-9]/.test(e),space:e.length>0&&!/\s/.test(e)}}var al={\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 il={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"},sl={"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"},Aa={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 Af(e){if(e.code&&il[e.code])return il[e.code];if(e.detail){if(sl[e.detail])return sl[e.detail];let t=al[e.detail];if(t)return Aa[t];if(e.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function dt(e){let t=Af(e);return t?{key:t}:Dn(e)?{key:"err.signedOut"}:e.status===0?{key:"err.network"}:e.status===401?{key:"err.session"}:e.status===429?{key:"err.tooFrequent"}:e.detail?{raw:e.detail}:e.status>=500?{key:"err.server",vars:{status:e.status}}:{key:"err.generic"}}function Pr(e){let t=e.trim();return t?/cancelled\.?$/i.test(t)?null:t==="A sign-in is already in progress."?{key:"err.loginInProgress"}:t.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:t.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:t.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:t.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:t.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:t.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:t}:{key:"err.generic"}}var Ea=uo(null);function ee(){let e=_a(Ea);if(!e)throw new Error("forsion-extend: page rendered outside its host root");return e}var Pt=()=>ee().t;function Ue(){let e=te(!0);return Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var ll={pending:!1,error:null,success:null,captcha:!1};function le(){let e=Ue(),[t,n]=M(ll),o=te(!1),a=Qt(async s=>{if(o.current)return;o.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)}}}o.current=!1,e.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=Qt(()=>{o.current||n(ll)},[]);return{...t,run:a,clear:i}}var Ee=e=>({error:dt(e),captcha:e.status===403&&e.code==="CAPTCHA_FAILED"});function cl(){let[e,t]=M(0),n=te(null);Q(()=>()=>{n.current&&clearInterval(n.current)},[]);let o=Qt((i=60)=>{n.current&&clearInterval(n.current),t(i),n.current=setInterval(()=>{t(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),a=Qt(()=>{n.current&&clearInterval(n.current),n.current=null,t(0)},[]);return{left:e,start:o,stop:a}}function Re(e){let[t,n]=M({state:"loading"}),o=te(0),a=te(e);a.current=e;let i=Qt((c=!1)=>{let d=++o.current;c||n({state:"loading"}),(async()=>{let f;try{f=await a.current()}catch(u){f={ok:!1,status:0,code:null,detail:null,transport:String(u?.message||u)}}d===o.current&&(f.ok?n({state:"ready",data:f.data,gen:d}):Dn(f)?n({state:"signedOut"}):(f.status===401&&re().authStatus?.().catch(()=>{}),n({state:"error",fail:f})))})()},[]);Q(()=>{i();let c=re().onAuthChanged?.(()=>i());return()=>{o.current++,c?.()}},[i]);let s=Qt(()=>i(),[i]),l=Qt(()=>i(!0),[i]);switch(t.state){case"ready":{let c=t.gen,d=f=>n(u=>u.state==="ready"&&u.gen===c?{...u,data:f(u.data)}:u);return{state:"ready",data:t.data,reload:l,update:d}}case"error":return{state:"error",error:dt(t.fail),retry:s};default:return t}}function yo(e){let t=String(e||"").trim();if(!t)return"";let n=t.startsWith("+")?4:3;return t.length<=n+4?`${t.slice(0,2)}***`:`${t.slice(0,n)}****${t.slice(-4)}`}function xo(e){let t=String(e||"").trim(),n=t.lastIndexOf("@");if(n<=0)return t?`${t.slice(0,1)}***`:"";let o=t.slice(0,n);return`${o.slice(0,o.length<=2?1:2)}***${t.slice(n)}`}function Mr(e){let t=String(e||"").trim().toLowerCase()||"free";return t.charAt(0).toUpperCase()+t.slice(1)}var Ef=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dl(e,t){let n=String(e||"").trim(),o,a,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)o=Number(i[2]),a=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);o=Number(l.find(c=>c.type==="month")?.value),a=Number(l.find(c=>c.type==="day")?.value)}return!(o>=1&&o<=12)||!(a>=1&&a<=31)?null:t==="zh"?`${o}\u6708${a}\u65E5`:`${Ef[o-1]} ${a}`}var Pa=e=>e==="zh"?"zh-CN":"en-US";function ul(e){if(e==null||e==="")return null;let t=new Date(typeof e=="string"&&/^\d+$/.test(e)?Number(e):e);return Number.isNaN(t.getTime())?null:t}function ko(e,t){let n=ul(e);return n?new Intl.DateTimeFormat(Pa(t),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Ut(e,t){let n=ul(e);return n?new Intl.DateTimeFormat(Pa(t),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function ze(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?new Intl.NumberFormat(Pa(t),{maximumFractionDigits:2}).format(n):"\u2014"}var Fn=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Fn||{}),Pf=[0,1],fl=[1,0],ml=[2,3],gl=[3,2],Mf={L:Pf,M:fl,Q:ml,H:gl},If=/^\d*$/,Rf=/^[A-Z0-9 $%*+./:-]*$/,Ma="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Da=1,Na=40,pl=3,Lf=3,wo=40,Df=10,hl=[[-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]],bl=[[-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]],Ia=class{constructor(t,n,o,a){if(this.version=t,this.ecc=n,t<Da||t>Na)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(o);if(this.drawCodewords(s),a===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let d=this.getPenaltyScore();d<l&&(a=c,l=d),this.applyMask(c)}}this.mask=a,this.applyMask(a),this.drawFormatBits(a)}size;mask;modules=[];types=[];getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2===0,Fn.Timing),this.setFunctionModule(o,6,o%2===0,Fn.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),n=t.length;for(let o=0;o<n;o++)for(let a=0;a<n;a++)o===0&&a===0||o===0&&a===n-1||o===n-1&&a===0||this.drawAlignmentPattern(t[o],t[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let n=this.ecc[1]<<3|t,o=n;for(let i=0;i<10;i++)o=o<<1^(o>>>9)*1335;let a=(n<<10|o)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,tn(a,i));this.setFunctionModule(8,7,tn(a,6)),this.setFunctionModule(8,8,tn(a,7)),this.setFunctionModule(7,8,tn(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,tn(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,tn(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,tn(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let o=0;o<12;o++)t=t<<1^(t>>>11)*7973;let n=this.version<<12|t;for(let o=0;o<18;o++){let a=tn(n,o),i=this.size-11+o%3,s=Math.floor(o/3);this.setFunctionModule(i,s,a),this.setFunctionModule(s,i,a)}}drawFinderPattern(t,n){for(let o=-4;o<=4;o++)for(let a=-4;a<=4;a++){let i=Math.max(Math.abs(a),Math.abs(o)),s=t+a,l=n+o;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,Fn.Position)}}drawAlignmentPattern(t,n){for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)this.setFunctionModule(t+a,n+o,Math.max(Math.abs(a),Math.abs(o))!==1,Fn.Alignment)}setFunctionModule(t,n,o,a=Fn.Function){this.modules[n][t]=o,this.types[n][t]=a}addEccAndInterleave(t){let n=this.version,o=this.ecc;if(t.length!==zo(n,o))throw new RangeError("Invalid argument");let a=bl[o[0]][n],i=hl[o[0]][n],s=Math.floor(Ra(n)/8),l=a-s%a,c=Math.floor(s/a),d=[],f=Vf(i);for(let p=0,g=0;p<a;p++){let m=t.slice(g,g+c-i+(p<l?0:1));g+=m.length;let y=jf(m,f);p<l&&m.push(0),d.push(m.concat(y))}let u=[];for(let p=0;p<d[0].length;p++)d.forEach((g,m)=>{(p!==c-i||m>=l)&&u.push(g[p])});return u}drawCodewords(t){if(t.length!==Math.floor(Ra(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let o=this.size-1;o>=1;o-=2){o===6&&(o=5);for(let a=0;a<this.size;a++)for(let i=0;i<2;i++){let s=o-i,c=(o+1&2)===0?this.size-1-a:a;!this.types[c][s]&&n<t.length*8&&(this.modules[c][s]=tn(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let o=0;o<this.size;o++){let a;switch(t){case 0:a=(o+n)%2===0;break;case 1:a=n%2===0;break;case 2:a=o%3===0;break;case 3:a=(o+n)%3===0;break;case 4:a=(Math.floor(o/3)+Math.floor(n/2))%2===0;break;case 5:a=o*n%2+o*n%3===0;break;case 6:a=(o*n%2+o*n%3)%2===0;break;case 7:a=((o+n)%2+o*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][o]&&a&&(this.modules[n][o]=!this.modules[n][o])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(l++,l===5?t+=pl:l>5&&t++):(this.finderPenaltyAddHistory(l,c),s||(t+=this.finderPenaltyCountPatterns(c)*wo),s=this.modules[i][d],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,c)*wo}for(let i=0;i<this.size;i++){let s=!1,l=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(l++,l===5?t+=pl:l>5&&t++):(this.finderPenaltyAddHistory(l,c),s||(t+=this.finderPenaltyCountPatterns(c)*wo),s=this.modules[d][i],l=1);t+=this.finderPenaltyTerminateAndCount(s,l,c)*wo}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(t+=Lf)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let o=this.size*this.size,a=Math.ceil(Math.abs(n*20-o*10)/o)-1;return t+=a*Df,t}getAlignmentPatternPositions(){if(this.version===1)return[];{let t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,o=[6];for(let a=this.size-7;o.length<t;a-=n)o.splice(1,0,a);return o}}finderPenaltyCountPatterns(t){let n=t[1],o=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(o&&t[0]>=n*4&&t[6]>=n?1:0)+(o&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,o){return t&&(this.finderPenaltyAddHistory(n,o),n=0),n+=this.size,this.finderPenaltyAddHistory(n,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}};function nn(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let o=t-1;o>=0;o--)n.push(e>>>o&1)}function tn(e,t){return(e>>>t&1)!==0}var Ir=class{constructor(t,n,o){if(this.mode=t,this.numChars=n,this.bitData=o,n<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}getData(){return this.bitData.slice()}},Nf=[1,10,12,14],Of=[2,9,11,13],Ff=[4,8,16,16];function vl(e,t){return e[Math.floor((t+7)/17)+1]}function yl(e){let t=[];for(let n of e)nn(n,8,t);return new Ir(Ff,e.length,t)}function $f(e){if(!xl(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){let o=Math.min(e.length-n,3);nn(Number.parseInt(e.substring(n,n+o),10),o*3+1,t),n+=o}return new Ir(Nf,e.length,t)}function Bf(e){if(!kl(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t=[],n;for(n=0;n+2<=e.length;n+=2){let o=Ma.indexOf(e.charAt(n))*45;o+=Ma.indexOf(e.charAt(n+1)),nn(o,11,t)}return n<e.length&&nn(Ma.indexOf(e.charAt(n)),6,t),new Ir(Of,e.length,t)}function Uf(e){return e===""?[]:xl(e)?[$f(e)]:kl(e)?[Bf(e)]:[yl(Hf(e))]}function xl(e){return If.test(e)}function kl(e){return Rf.test(e)}function qf(e,t){let n=0;for(let o of e){let a=vl(o.mode,t);if(o.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+o.bitData.length}return n}function Hf(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function Ra(e){if(e<Da||e>Na)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function zo(e,t){return Math.floor(Ra(e)/8)-hl[t[0]][e]*bl[t[0]][e]}function Vf(e){if(e<1||e>255)throw new RangeError("Degree out of range");let t=[];for(let o=0;o<e-1;o++)t.push(0);t.push(1);let n=1;for(let o=0;o<e;o++){for(let a=0;a<t.length;a++)t[a]=La(t[a],n),a+1<t.length&&(t[a]^=t[a+1]);n=La(n,2)}return t}function jf(e,t){let n=t.map(o=>0);for(let o of e){let a=o^n.shift();n.push(0),t.forEach((i,s)=>n[s]^=La(i,a))}return n}function La(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let o=7;o>=0;o--)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return n}function Wf(e,t,n=1,o=40,a=-1,i=!0){if(!(Da<=n&&n<=o&&o<=Na)||a<-1||a>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let u=zo(s,t)*8,p=qf(e,s);if(p<=u){l=p;break}if(s>=o)throw new RangeError("Data too long")}for(let u of[fl,ml,gl])i&&l<=zo(s,u)*8&&(t=u);let c=[];for(let u of e){nn(u.mode[0],4,c),nn(u.numChars,vl(u.mode,s),c);for(let p of u.getData())c.push(p)}let d=zo(s,t)*8;nn(0,Math.min(4,d-c.length),c),nn(0,(8-c.length%8)%8,c);for(let u=236;c.length<d;u^=253)nn(u,8,c);let f=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((u,p)=>f[p>>>3]|=u<<7-(p&7)),new Ia(s,t,f,a)}function wl(e,t){let{ecc:n="L",boostEcc:o=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=t||{},c=typeof e=="string"?Uf(e):Array.isArray(e)?[yl(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let d=Wf(c,Mf[n],a,i,s,o),f=Gf({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return t?.invert&&(f.data=f.data.map(u=>u.map(p=>!p))),t?.onEncoded?.(f),f}function Gf(e,t=1){if(!t)return e;let{size:n}=e,o=n+t*2;e.size=o,e.data.forEach(i=>{for(let s=0;s<t;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:o},s=>!1)),e.data.push(Array.from({length:o},s=>!1));let a=Fn.Border;e.types.forEach(i=>{for(let s=0;s<t;s++)i.unshift(a),i.push(a)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:o},s=>a)),e.types.push(Array.from({length:o},s=>a));return e}function me(e){return r("section",{class:`settings-panel fx-panel${e.danger?" fx-panel--danger":""}`,"aria-label":e.label,children:[r("div",{class:`settings-panel-head${e.actions?" settings-panel-head--actions":""}`,children:[e.icon&&r("span",{class:"settings-panel-icon",children:r(Y,{name:e.icon,size:16})}),r("div",{children:[r("strong",{children:e.title}),e.desc&&r("p",{children:e.desc})]}),e.actions&&r("div",{class:"settings-panel-actions settings-panel-actions--wide",children:e.actions})]}),e.children]})}function Le(e){return r("div",{class:`settings-control-row settings-setting-row fx-row fx-block${e.class?` ${e.class}`:""}`,children:[r("div",{class:"settings-control-copy",children:r("span",{children:[r("strong",{children:e.label}),e.desc&&r("small",{children:e.desc})]})}),e.children!==void 0&&e.children!==null&&r("div",{class:"settings-row-control fx-row-control",children:e.children})]})}function _e(e){return r("div",{class:`fx-sub${e.class?` ${e.class}`:""}`,children:e.children})}function Mt(e){return r("button",{type:"button",role:"switch","aria-checked":e.checked,"aria-label":e.label,class:`settings-switch${e.checked?" active":""}`,disabled:e.disabled,onClick:()=>e.onChange(!e.checked),children:r("span",{})})}function G(e){let t=e.variant??"ghost",n=t==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${t}`;return r("button",{type:e.submit?"submit":"button",class:n,disabled:e.disabled||e.pending,"aria-busy":e.pending||void 0,"aria-label":e.label,title:e.title,"data-armed":e.armed?"true":void 0,onClick:e.onClick,children:[e.pending&&r(tr,{}),e.children]})}var Xf=5e3;function rn(e){let[t,n]=M(!1),o=te(null),a=()=>{o.current&&clearTimeout(o.current),o.current=null,n(!1)};Q(()=>()=>{o.current&&clearTimeout(o.current)},[]),Q(()=>{(e.pending||e.disabled)&&a()},[e.pending,e.disabled]);let i=()=>{if(!t){n(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,n(!1)},Xf);return}a(),e.onConfirm()},s=e.variant??"ghost";return r(G,{variant:t?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:t,pending:e.pending,disabled:e.disabled,onClick:i,children:t?e.confirmLabel:e.label})}function ce(e){let t=Pt(),{a:n}=e;return n.error?r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:bt(n.error,t)}),n.captcha&&r("button",{type:"button",class:"fx-link",onClick:()=>void Nn(e.captchaSection??"security"),children:[t("common.openInBrowser")," ",r(Y,{name:"external",size:12})]})]}):n.success?r("div",{class:"fx-msg is-ok",role:"status",children:bt(n.success,t)}):null}function de(e){return r("p",{class:`fx-note${e.tone?` is-${e.tone}`:""}`,children:e.children})}function ot(e){return r("div",{class:"settings-empty-row fx-block",children:e.children})}function Rr(e){let t=Pt(),n=e.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:e.label}),r("span",{class:"fx-quota-value",children:n.unlimited?t("common.unlimited"):n.text})]}),r("div",{class:"fx-bar",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?t("common.unlimited"):n.text,children:r("span",{style:{width:`${n.pct}%`}})}),e.note&&r("div",{class:"fx-quota-note",children:e.note})]})}function It(e){return r("div",{class:"seg fx-seg",role:"radiogroup","aria-label":e.label,children:e.options.map(t=>r("button",{type:"button",role:"radio","aria-checked":t.value===e.value,class:t.value===e.value?"active":"",onClick:()=>{t.value!==e.value&&e.onChange(t.value)},children:t.label}))})}async function Kf(e){try{return await navigator.clipboard.writeText(e),!0}catch{try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let n=document.execCommand("copy");return t.remove(),n}catch{return!1}}}function qt(e){let t=Pt(),[n,o]=M("idle"),a=te(null);Q(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await Kf(e.text);o(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>o("idle"),1800)};return r(G,{disabled:e.disabled||!e.text,onClick:()=>void i(),children:[r(Y,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?t("common.copied"):n==="failed"?t("common.copyFailed"):e.label]})}function Jf(e){let t=At(()=>{try{return wl(e.value,{ecc:"M",border:2})}catch{return null}},[e.value]);if(!t)return null;let n="";t.data.forEach((a,i)=>a.forEach((s,l)=>{s&&(n+=`M${l} ${i}h1v1h-1z`)}));let o=e.size??148;return r("svg",{class:"fx-qr",width:o,height:o,viewBox:`0 0 ${t.size} ${t.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":e.label,children:[r("rect",{width:t.size,height:t.size,fill:"#fff"}),r("path",{d:n,fill:"#000"})]})}function Oa(e){let t=Pt(),{device:n}=e;return r("div",{class:"fx-device",children:[r(Jf,{value:n.url,label:t("signin.qrLabel")}),r("div",{class:"fx-device-copy",children:[r("p",{children:t("signin.deviceHint")}),n.userCode&&r("div",{class:"fx-device-code",children:[r("span",{children:t("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:[t("signin.openLink")," ",r(Y,{name:"external",size:12})]}),r(qt,{text:n.url,label:t("signin.copyLink")})]})]})]})}function De(){let e=Pt(),t=le(),[n,o]=M(null);Q(()=>re().onAuthDevice?.(i=>o(i)),[]);let a=()=>void t.run(async()=>{let i=re().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){o(null);let l=Pr(Et(s));return l?{error:l}:void 0}});return r("section",{class:"settings-panel fx-panel fx-signin","aria-label":e("signin.button"),children:r("div",{class:"settings-state fx-signin-body",children:[r("span",{class:"settings-state-icon",children:r(Y,{name:"user",size:18})}),r("p",{class:"fx-signin-lead",children:e("signin.desc")}),r("div",{class:"settings-state-actions",children:r(G,{variant:"primary",pending:t.pending,onClick:a,children:t.pending?e("signin.pending"):e("signin.button")})}),n&&r(Oa,{device:n}),r(ce,{a:t})]})})}function Ae(e){let t=Pt(),n=e.panels??2,o=e.rows??2;return r("div",{class:"fx-skeleton","aria-busy":"true","aria-label":t("common.loading"),children:Array.from({length:n},(a,i)=>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:o},(s,l)=>r("div",{class:"settings-control-row",children:r("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function Oe(e){let t=Pt();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(Y,{name:"alert",size:18})}),r("strong",{children:t("common.loadFailed")}),r("p",{children:bt(e.error,t)}),r("div",{class:"settings-state-actions",children:r(G,{variant:"primary",onClick:e.onRetry,children:[r(Y,{name:"refresh",size:12})," ",t("common.retry")]})})]})})}function _l(){let{t:e}=ee(),t=Re(()=>J("/auth/me"));if(t.state==="loading")return r(Ae,{panels:2});if(t.state==="signedOut")return r(De,{});if(t.state==="error")return r(Oe,{error:t.error,onRetry:t.retry});let n=t.data;return r(F,{children:[r(me,{icon:"user",title:e("account.details.title"),desc:e("account.details.desc"),children:[r(Le,{label:e("account.details.username"),children:[r("span",{class:"fx-value",children:n.username}),n.role==="ADMIN"&&r("span",{class:"fx-tag",children:e("account.role.admin")})]}),r(zl,{kind:"phone",value:n.phone}),r(zl,{kind:"email",value:n.email})]}),r(Yf,{}),r(Qf,{})]})}function zl(e){let{t,goTo:n}=ee(),o=!!e.value,a=o?e.kind==="phone"?yo(e.value):xo(e.value):t("account.contact.unbound"),i=e.kind==="phone"?t("account.contact.phone"):t("account.contact.email");return r(Le,{label:i,children:n?r("button",{type:"button",class:`fx-link-row${o?"":" is-empty"}`,onClick:()=>n("security"),title:t("account.contact.manage"),children:[r("span",{children:a}),r(Y,{name:"chevron",size:12})]}):r("span",{class:`fx-value${o?"":" is-empty"}`,children:a})})}function Yf(){let{t:e}=ee(),t=Ue(),[n,o]=M(null),[a,i]=M(!1),[s,l]=M(null),[c,d]=M(null),f=le(),u=le(),p=le(),g=!!re().authAccounts;Q(()=>{let x=0,k=()=>{let j=re().authAccounts;if(!j)return;let w=++x;i(!1),j().then(A=>{w===x&&o(Array.isArray(A)?A:[])}).catch(()=>{w===x&&i(!0)})};k();let R=re().onAuthChanged?.(k),B=re().onAuthDevice?.(j=>d(j));return()=>{x++,R?.(),B?.()}},[]);let m=x=>{l(x),f.run(async()=>{let k=re().forsionSwitchAccount;if(!k)return{error:{key:"err.unavailable"}};try{await k(x)}catch(R){let B=Pr(Et(R));return B?{error:B}:void 0}finally{t.current&&l(null)}})},y=()=>void u.run(async()=>{let x=re().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(k){t.current&&d(null);let R=Pr(Et(k));return R?{error:R}:void 0}}),_=()=>void p.run(async()=>{let x=re().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(k){return{error:{raw:Et(k)||e("err.generic")}}}}),E=f.pending||u.pending||p.pending;return r(me,{icon:"laptop",title:e("local.title"),desc:e("local.desc"),children:[g&&n===null&&!a&&r(ot,{children:[r(tr,{})," ",e("common.loading")]}),a&&r("div",{class:"fx-sub",children:r(de,{tone:"warn",children:e("local.loadFailed")})}),n&&n.length===0&&r(ot,{children:e("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(Y,{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,Zf(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?r("span",{class:"fx-tag fx-tag--accent",children:[r(Y,{name:"check",size:11})," ",e("local.current")]}):r(G,{pending:s===x.id,disabled:E&&s!==x.id,onClick:()=>m(x.id),children:e("local.switch")})]},x.id))}),u.pending&&c&&r("div",{class:"fx-sub",children:r(Oa,{device:c})}),r("div",{class:"settings-panel-footer fx-footer",children:[r(G,{pending:u.pending,disabled:E&&!u.pending,onClick:y,children:[r(Y,{name:"plus",size:12})," ",u.pending?e("signin.pending"):e("local.add")]}),r(G,{pending:p.pending,disabled:E&&!p.pending,onClick:_,children:[r(Y,{name:"logout",size:12})," ",e("local.signOut")]})]}),(f.error||u.error||p.error)&&r("div",{class:"fx-sub fx-sub--tight",children:[r(ce,{a:f}),r(ce,{a:u}),r(ce,{a:p})]})]})}function Zf(e){try{return new URL(e).host}catch{return e}}function Qf(){let{t:e}=ee(),t=le();return r("div",{class:"fx-page-foot",children:[r("button",{type:"button",class:"fx-link",disabled:t.pending,onClick:()=>void t.run(async()=>await Nn()?void 0:{error:{key:"err.openFailed"}}),children:[e("account.web.open")," ",r(Y,{name:"external",size:12})]}),r("span",{class:"fx-muted",children:e("account.web.desc")}),r(ce,{a:t})]})}var $n=class extends Error{};async function Sl(e,t=256){if(e.size>20971520)throw new $n;let n=URL.createObjectURL(e);try{let o=new Image;await new Promise((f,u)=>{o.onload=()=>f(),o.onerror=()=>u(new Error("image decode failed")),o.src=n});let a=o.naturalWidth,i=o.naturalHeight;if(!a||!i)throw new Error("empty image");if(a*i>5e7)throw new $n;let s=Math.min(1,t/Math.max(a,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*s)),l.height=Math.max(1,Math.round(i*s));let c=l.getContext("2d");if(!c)throw new Error("canvas unavailable");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height),c.drawImage(o,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new $n;return d}finally{URL.revokeObjectURL(n)}}function Cl(e){let t=String(e||"").trim();if(!t)return"?";let n=Array.from(t)[0];return/[㐀-鿿]/.test(n)?n:Array.from(t).slice(0,2).join("").toUpperCase()}var Tl=["cream","coral","teal","lavender"],Al=["auto","light","dark"],El=["none","mist","contour","dots"],Pl=["none","ring","pro"],Ml=["early","streak","author","inviter","event"];var Il=e=>`/u/${encodeURIComponent(e)}`,Fa=e=>!!e&&e.toLowerCase()!=="free";function $a(e,t){let n={...e.settings,...t};return{...e,settings:n,bio:n.bio,links:n.links,skin:n.skin,mode:n.mode,cover:n.cover,frame:n.frame==="pro"&&!Fa(e.tier)?"none":n.frame,modules:n.modules.filter(o=>o.show).map(o=>({id:o.id}))}}function Ba(e,t,n){let o=e.findIndex(s=>s.id===t),a=o+n;if(o<0||a<0||a>=e.length)return e;let i=e.slice();return[i[o],i[a]]=[i[a],i[o]],i}function Rl(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`,o;try{o=new URL(n)}catch{return null}if(o.protocol!=="http:"&&o.protocol!=="https:"||!o.hostname.includes("."))return null;let a=o.toString();return a.length<=200?a:null}function Ua(e){return e.replace(/^https?:\/\//i,"").replace(/^www\./i,"").replace(/\/$/,"")}function Ll(e,t){let n=t==="zh"?[[1e8,"\u4EBF"],[1e4,"\u4E07"]]:[[1e9,"B"],[1e6,"M"],[1e3,"K"]];for(let[o,a]of n)if(e>=o){let i=e/o;return{value:i>=100?String(Math.round(i)):String(Math.round(i*10)/10),unit:a}}return{value:Math.round(e).toLocaleString("en-US"),unit:""}}var Dl=e=>e==="zh"?"zh-CN":"en-US";function Nl(e,t){let[n,o]=e.split("-").map(Number);if(!n||!o)return[];let a=new Intl.DateTimeFormat(Dl(t),{month:"short",timeZone:"UTC"});return Array.from({length:12},(i,s)=>a.format(new Date(Date.UTC(n,o-12+s,1))))}function Ol(e,t){let[n,o]=e.split("-").map(Number);return!n||!o?"":new Intl.DateTimeFormat(Dl(t),{year:"numeric",month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n,o-1,1)))}function Fl([e,t]){let n=o=>`${String((o%24+24)%24).padStart(2,"0")}:00`;return`${n(e)} \u2013 ${n(t)}`}function $l(e){let t=0,n=Promise.resolve(),o=()=>{let a=t;return e.read().then(i=>{a===t&&e.apply(i)})};return{read:o,write(a){let i=++t,s=n.then(a).then(l=>{i===t&&e.apply(l)});return n=s.catch(()=>i===t?o().catch(()=>{}):void 0),s}}}var Hl={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"}},Ul={early:"sprout",streak:"flame",author:"box",inviter:"gift",event:"trophy"},ql={plus:"Plus",pro:"Pro"},Ha=e=>!!e&&/^https?:\/\//i.test(e);function Va(e){if(!Ha(e))return;let t=re().openExternal;t?t(e).catch(()=>{}):window.open(e,"_blank","noopener")}async function nm(){let e=re().cloudInvoke;if(!e)return null;try{let t=await e("profile:publicOrigin");return t?.ok&&typeof t.origin=="string"&&/^https?:\/\/[^/]+$/i.test(t.origin)?t.origin:null}catch{return null}}async function rm(e,t,n){let o=await J(e,{method:t,body:n});if(!o.ok)throw o;if(!o.data?.profile)throw{ok:!1,status:o.status,code:null,detail:null,transport:"bad_response"};return o.data.profile}var Vl=e=>e&&typeof e=="object"&&e.ok===!1?dt(e):{raw:String(e?.message||e)};function jl(){let{t:e}=ee(),t=Re(async()=>{let[o,a,i]=await Promise.all([J("/profile/me"),J("/auth/me"),nm()]);return a.ok?o.ok?o.data?.profile?{ok:!0,status:o.status,data:{profile:o.data.profile,me:a.data,origin:i}}:{ok:!0,status:404,data:null}:o.status===404?{ok:!0,status:404,data:null}:o:a});if(t.state==="loading")return r(Ae,{panels:2,rows:3});if(t.state==="signedOut")return r(De,{});if(t.state==="error")return r(Oe,{error:t.error,onRetry:t.retry});if(!t.data)return r(me,{icon:"user",title:e("page.profile"),children:r(ot,{children:e("profile.unsupported")})});let{update:n}=t;return r(om,{data:t.data,update:o=>n(a=>a&&o(a))})}function om(e){let{t}=ee(),n=Ue(),{profile:o,me:a,origin:i}=e.data,[s,l]=M(null),[c,d]=M(null),[f,u]=M(!1),p=te(e.update);p.current=e.update;let g=(N,V,X)=>n.current?rm(N,V,X):Promise.reject(new Error("unmounted")),m=At(()=>$l({apply:N=>p.current(V=>({...V,profile:N})),read:()=>g("/profile/me")}),[]),y=a.username||o.username,_={...o,username:y,nickname:a.nickname||null},E=o.settings.isPublic,x=i?`${i}${Il(y)}`:null,k=N=>{n.current&&d({tone:"error",m:Vl(N)})},R=N=>{d(null),e.update(V=>({...V,profile:$a(V.profile,N)})),m.write(()=>g("/profile/me","PUT",N)).catch(k)},B=async N=>{e.update(V=>({...V,profile:$a(V.profile,{modules:V.profile.settings.modules.map(X=>({...X,public:N.find(oe=>oe.id===X.id)?.public??X.public}))})})),await m.write(()=>g("/profile/me/visibility","POST",{public:!0,modules:N})),n.current&&(l(null),d({tone:"ok",m:{key:"profile.nowPublic"}}))},j=async()=>{u(!0),d(null);try{await m.write(()=>g("/profile/me/visibility","POST",{public:!1})),n.current&&d({tone:"ok",m:{key:"profile.nowPrivate"}})}catch(N){k(N)}finally{n.current&&u(!1)}},w=te(Promise.resolve()),A=(N,V)=>{let X=w.current.then(async()=>{if(!n.current)return;let oe=await J("/settings",{method:"PUT",body:N});if(n.current){if(!oe.ok)return d({tone:"error",m:dt(oe)});p.current(b=>({...b,me:{...b.me,...N}})),d({tone:"ok",m:{key:V}})}});return w.current=X,X},P=async N=>{d(null);let V;try{V=await Sl(N)}catch(X){return d({tone:"error",m:{key:X instanceof $n?"err.avatarTooLarge":"err.avatarInvalid"}})}await A({avatar:V},"account.avatar.saved")},I=N=>{d(null),l(V=>V===N?null:N)};return r("div",{class:"fx-pf-page",children:[r(me,{icon:E?"globe":"lock",title:t(E?"profile.state.public":"profile.state.private"),desc:t(E?"profile.state.publicDesc":"profile.state.privateDesc"),actions:r(F,{children:[r(G,{onClick:()=>I("deco"),children:[r(Y,{name:"palette",size:12})," ",t("profile.decorate")]}),E?r(G,{pending:f,onClick:()=>void j(),children:[r(Y,{name:"lock",size:12})," ",t("profile.makePrivate")]}):r(G,{variant:"primary",onClick:()=>I("publish"),children:[r(Y,{name:"globe",size:12})," ",t("profile.publish")]})]}),children:[E&&x&&r(Le,{label:t("profile.address"),desc:x.replace(/^https?:\/\//i,""),children:[r(qt,{text:x,label:t("profile.copyLink")}),r(G,{onClick:()=>Va(x),children:[r(Y,{name:"external",size:12})," ",t("profile.openPublic")]})]}),s==="publish"&&!E&&r(am,{profile:o,url:x,submit:B,onClose:()=>l(null)}),c&&r(_e,{class:"fx-sub--tight",children:r("div",{class:`fx-msg ${c.tone==="ok"?"is-ok":"is-error"}`,role:c.tone==="ok"?"status":"alert",children:bt(c.m,t)})})]}),r("div",{class:"fx-pf-home","data-deco":s==="deco"?"":void 0,children:[r("div",{class:"fx-pf-root",children:r(cm,{view:_,avatar:a.avatar||null,pinned:o.settings.pinned,owner:{onAvatar:N=>void P(N),onNickname:N=>{d(null),A({nickname:N},"account.nickname.saved")},onBio:N=>R({bio:N}),onLinks:N=>R({links:N}),onPinned:N=>R({pinned:N}),onInvalidLink:()=>d({tone:"error",m:{key:"profile.linkInvalid"}})}})}),s==="deco"&&r(im,{profile:o,onChange:R,onClose:()=>l(null)})]})]})}function am(e){let{t}=ee(),n=Ue(),{profile:o}=e,[a,i]=M({}),s=o.settings.modules.filter(g=>g.show).map(g=>({...g,public:a[g.id]??g.public})),[l,c]=M(!1),[d,f]=M(null),u=o.canPublish?null:o.publishBlockedReason||"publish_blocked";if(u)return r(_e,{children:[r(de,{children:t(u==="machine_username"?"profile.blocked.machineUsername":"profile.blocked.publishBlocked")}),r("div",{class:"fx-inline fx-pf-foot",children:[u==="machine_username"&&r(G,{variant:"primary",onClick:()=>void Nn("profile"),children:[t("profile.goRename")," ",r(Y,{name:"external",size:12})]}),r(G,{onClick:e.onClose,children:t("common.cancel")})]})]});let p=async()=>{c(!0),f(null);try{await e.submit(s.map(({id:g,public:m})=>({id:g,public:m})))}catch(g){if(!n.current)return;f(Vl(g)),c(!1)}};return r(_e,{children:[e.url&&r("div",{class:"fx-pf-url",children:[r(Y,{name:"globe",size:14}),r("span",{children:e.url.replace(/^https?:\/\//i,"")})]}),r(de,{children:t("profile.publishDesc")}),r("div",{class:"fx-pf-checks",children:s.map(g=>r("div",{class:"fx-pf-check",children:[r("div",{children:[t(`profile.mod.${g.id}`),r("small",{children:t(`profile.modDesc.${g.id}`)})]}),r(Mt,{checked:g.public,disabled:l,label:`${t(`profile.mod.${g.id}`)} \xB7 ${t("profile.col.public")}`,onChange:m=>i(y=>({...y,[g.id]:m}))})]},g.id))}),r(de,{children:t("profile.publishNever")}),d&&r("div",{class:"fx-msg is-error",role:"alert",children:bt(d,t)}),r("div",{class:"fx-inline fx-pf-foot",children:[r(G,{variant:"primary",pending:l,onClick:()=>void p(),children:t("profile.publishConfirm")}),r(G,{disabled:l,onClick:e.onClose,children:t("common.cancel")})]})]})}function im(e){let{t}=ee(),n=e.profile.settings,o=Fa(e.profile.tier),a=(s,l)=>e.onChange({modules:n.modules.map(c=>c.id===s?{...c,...l}:c)}),i=s=>r("span",{class:"fx-pf-thumb",children:s});return r("aside",{class:"fx-pf-deco","aria-label":t("profile.decorate"),children:r(me,{icon:"palette",title:t("profile.decorate"),actions:r(G,{onClick:e.onClose,children:t("common.done")}),children:r("div",{class:"fx-pf-deco-body",children:[r("h4",{children:t("profile.deco.cover")}),r("div",{class:"fx-pf-opts",children:El.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.cover===s,onClick:()=>e.onChange({cover:s}),children:[i(r("span",{class:`fx-pf-cv-thumb fx-pf-cv-${s}`})),t(`profile.cover.${s}`)]},s))}),r("h4",{children:t("profile.deco.frame")}),r("div",{class:"fx-pf-opts",children:Pl.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.frame===s,disabled:s==="pro"&&!o,title:s==="pro"&&!o?t("profile.frameProHint"):void 0,onClick:()=>e.onChange({frame:s}),children:[i(r("span",{class:`fx-pf-fr-demo fx-pf-fr-${s}`,children:r("span",{class:"fx-pf-av"})})),t(`profile.frame.${s}`)]},s))}),!o&&r(de,{children:t("profile.frameProHint")}),r("h4",{children:t("profile.deco.modules")}),r("div",{class:"fx-pf-mod-head","aria-hidden":"true",children:[r("span",{children:t("profile.col.show")}),r("span",{children:t("profile.col.public")})]}),n.modules.map((s,l)=>r("div",{class:"fx-pf-mod",children:[r("span",{children:t(`profile.mod.${s.id}`)}),r("button",{type:"button",class:"fx-icon-btn",disabled:l===0,title:t("profile.moveUp"),"aria-label":`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.moveUp")}`,onClick:()=>e.onChange({modules:Ba(n.modules,s.id,-1)}),children:r(Y,{name:"up",size:13})}),r("button",{type:"button",class:"fx-icon-btn",disabled:l===n.modules.length-1,title:t("profile.moveDown"),"aria-label":`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.moveDown")}`,onClick:()=>e.onChange({modules:Ba(n.modules,s.id,1)}),children:r(Y,{name:"down",size:13})}),r(Mt,{checked:s.show,label:`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.col.show")}`,onChange:c=>a(s.id,{show:c})}),r(Mt,{checked:s.show&&s.public,disabled:!s.show,label:`${t(`profile.mod.${s.id}`)} \xB7 ${t("profile.col.public")}`,onChange:c=>a(s.id,{public:c})})]},s.id)),r(de,{children:t("profile.modulesHint")}),r("h4",{children:t("profile.deco.skin")}),r("div",{class:"fx-pf-opts",children:Tl.map(s=>r("button",{type:"button",class:"fx-pf-opt","aria-pressed":n.skin===s,onClick:()=>e.onChange({skin:s}),children:[i(r("span",{class:"fx-pf-swatch","data-skin":s})),t(`profile.skin.${s}`)]},s))}),r("h4",{children:t("profile.deco.mode")}),r(It,{value:n.mode,label:t("profile.deco.mode"),onChange:s=>e.onChange({mode:s}),options:Al.map(s=>({value:s,label:t(`profile.mode.${s}`)}))}),r(de,{children:t("profile.deco.publicHint")})]})})})}function qa(e){let[t,n]=M(null),o=te(!1),a=te(null),i=t!==null;Er(()=>{i&&a.current?.focus()},[i]);let s=e.class?` ${e.class}`:"";if(t===null)return r("button",{type:"button",class:`fx-pf-ed${s}${e.value?"":" is-empty"}`,title:e.label,"aria-label":e.label,onClick:()=>{o.current=!1,n(e.value)},children:[r("span",{children:e.value||e.placeholder}),r(Y,{name:e.value?"pencil":"plus",size:12})]});let l=()=>{let c=t.trim();n(null),!o.current&&c!==e.value&&e.onSave(c)};return r("span",{class:`fx-pf-ed-on${s}`,children:[r("input",{ref:a,class:"fx-input",type:"text",value:t,maxLength:e.maxLength,placeholder:e.placeholder,"aria-label":e.label,onInput:c=>n(c.currentTarget.value),onBlur:l,onKeyDown:c=>{c.isComposing||(c.key==="Enter"?c.currentTarget.blur():c.key==="Escape"&&(c.preventDefault(),o.current=!0,c.currentTarget.blur()))}}),e.counter&&r("small",{children:[Array.from(t).length,"/",e.maxLength]})]})}function _o(e){return r("section",{class:"fx-pf-sec",style:{order:e.order},children:[r("div",{class:"fx-pf-sec-h",children:[r("h3",{children:e.title}),e.action]}),e.children]})}function sm(e){let{t}=ee(),{work:n}=e,o=Hl[n.type],a=r(F,{children:[r("div",{class:"fx-pf-work-top",children:[r("span",{class:"fx-pf-work-ico",children:r(Y,{name:o?.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:o?t(o.key):n.type})]})]}),r("p",{children:n.summary}),(n.countKind!=="visits"||n.count>0)&&r("div",{class:"fx-pf-work-foot",children:[r(Y,{name:n.countKind==="visits"?"eye":"download",size:12}),t(n.countKind==="visits"?"profile.workVisits":"profile.workInstalls",{n:n.count.toLocaleString("en-US")})]})]}),i=n.url;return Ha(i)?r("a",{class:"fx-pf-work",href:i,onClick:s=>{s.preventDefault(),Va(i)},children:a}):r("article",{class:"fx-pf-work",children:a})}function lm(e){let{t}=ee(),n=Ue(),[o,a]=M(null),[i,s]=M(()=>e.pinned.map(f=>`${f.kind}:${f.id}`));Q(()=>{J("/profile/me/works").then(f=>{n.current&&a(f.ok?f.data?.works??[]:"failed")})},[]);let l=f=>`${f.kind}:${f.id}`,c=f=>s(u=>u.includes(f)?u.filter(p=>p!==f):[...u,f]);if(o===null)return r("div",{class:"fx-pf-card fx-pf-empty",children:[r(tr,{})," ",t("common.loading")]});if(o==="failed"||o.length===0)return r("div",{class:"fx-pf-card fx-pf-empty",children:[r("p",{children:t(o==="failed"?"common.loadFailed":"profile.worksNone")}),r("div",{class:"fx-inline fx-pf-foot",children:[o!=="failed"&&r(G,{variant:"primary",onClick:()=>void Nn("submission"),children:[t("profile.goSubmit")," ",r(Y,{name:"external",size:12})]}),r(G,{onClick:e.onClose,children:t("common.cancel")})]})]});let d=()=>{let f=new Map(o.map(u=>[l(u),u]));e.onSave(i.flatMap(u=>{let p=f.get(u);return p?[{kind:p.kind,id:p.id}]:[]})),e.onClose()};return r("div",{class:"fx-pf-card fx-pf-picker",children:[o.map(f=>{let u=l(f),p=i.includes(u),g=Hl[f.type];return r("button",{type:"button",class:"fx-pf-pick","aria-pressed":p,disabled:!p&&i.length>=6,onClick:()=>c(u),children:[r("div",{children:[f.name,r("small",{children:[g?t(g.key):f.type," \xB7 ",f.summary]})]}),p&&r(Y,{name:"check",size:15})]},u)}),r("div",{class:"fx-inline fx-pf-foot",children:[r("span",{class:"fx-grow",children:i.length?t("profile.worksPicked",{n:i.length,max:6}):t("profile.worksAuto")}),r(G,{variant:"primary",onClick:d,children:t("common.done")}),r(G,{onClick:e.onClose,children:t("common.cancel")})]})]})}function cm(e){let{t,locale:n}=ee(),{view:o,owner:a}=e,i=te(null),[s,l]=M(!1),c=o.nickname||o.username,d=(o.tier||"free").toLowerCase(),f=o.modules.map(b=>b.id),u=b=>f.indexOf(b),p=b=>u(b)>=0,g=o.stats,m=g?Ll(g.totalTokens,n):null,y=t("profile.unit.days"),_=g&&m?[[m.value,m.unit,t("profile.stat.tokens")],[String(g.activeDays),y,t("profile.stat.activeDays")],[String(g.longestStreak),y,t("profile.stat.longest")],[String(g.currentStreak),y,t("profile.stat.current")],[g.installs.toLocaleString("en-US"),"",t("profile.stat.installs")]]:[],E=g&&p("stats")&&r("div",{class:"fx-pf-stats",style:{order:u("stats")},children:_.map(([b,C,L])=>r("div",{class:"fx-pf-stat",children:[r("b",{children:[b,C&&r("small",{children:C})]}),r("span",{children:L})]},L))},"stats"),x=f[0]==="stats",k=o.works||[],R=p("works")&&r(_o,{order:u("works"),title:t("profile.works"),action:!s&&r("button",{type:"button",class:"fx-link",onClick:()=>l(!0),children:t("profile.worksPick")}),children:s?r(lm,{pinned:e.pinned,onSave:a.onPinned,onClose:()=>l(!1)}):k.length?r("div",{class:"fx-pf-works",children:k.map(b=>r(sm,{work:b},`${b.kind}:${b.id}`))}):r("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.worksEmpty")})},"works"),B=o.activity,j=p("activity")&&B&&r(_o,{order:u("activity"),title:t("profile.activity"),children:r("div",{class:"fx-pf-card",children:[r("div",{class:"fx-pf-hm",role:"img","aria-label":t("profile.activityDays",{n:B.activeDays}),children:B.levels.map((b,C)=>r("i",{class:b?`l${b}`:void 0},C))}),r("div",{class:"fx-pf-hm-months","aria-hidden":"true",children:Nl(B.end,n).map((b,C)=>r("span",{children:b},C))}),r("div",{class:"fx-pf-hm-foot",children:[r("span",{children:t("profile.activityDays",{n:B.activeDays})}),r("span",{class:"fx-pf-hm-legend","aria-hidden":"true",children:[t("profile.less"),r("i",{}),r("i",{class:"l1"}),r("i",{class:"l2"}),r("i",{class:"l3"}),r("i",{class:"l4"}),t("profile.more")]})]})]})},"activity"),w=(o.badges||[]).filter(b=>Ml.includes(b.id)),A=p("badges")&&r(_o,{order:u("badges"),title:t("profile.badges"),children:w.length?r("div",{class:"fx-pf-card fx-pf-rows",children:w.map(b=>r("div",{class:"fx-pf-brow",children:[r("span",{class:"fx-pf-badge",children:r(Y,{name:Ul[b.id],size:14})}),r("div",{children:[r("b",{children:t(`profile.badge.${b.id}`)}),r("span",{children:t(`profile.badgeSub.${b.id}`,{value:b.value??""})})]})]},b.id))}):r("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.badgesEmpty")})},"badges"),P=o.insights,I=[];P?.topModel&&I.push([t("profile.insightModel"),P.topModel]),P?.activeHours&&I.push([t("profile.insightHours"),Fl(P.activeHours)]);let N=p("insights")&&r(_o,{order:u("insights"),title:t("profile.insights"),children:I.length?r("div",{class:"fx-pf-card fx-pf-rows",children:I.map(([b,C])=>r("div",{class:"fx-pf-row",children:[r("span",{children:b}),r("b",{children:C})]},b))}):r("div",{class:"fx-pf-card fx-pf-empty",children:t("profile.insightsEmpty")})},"insights"),V=[!x&&E,R,j].filter(Boolean),X=[A,N].filter(Boolean),oe=b=>{if(!b)return;let C=Rl(b);if(!C)return a.onInvalidLink();o.links.includes(C)||a.onLinks([...o.links,C])};return r("div",{class:"fx-pf","data-cover":o.cover,"data-frame":o.frame,children:[r("div",{class:"fx-pf-cover"}),r("div",{class:"fx-pf-id",children:[r("button",{type:"button",class:"fx-pf-avatar",title:t("account.avatar.change"),"aria-label":t("account.avatar.change"),onClick:()=>i.current?.click(),children:[r("span",{class:"fx-pf-av",children:e.avatar?r("img",{src:e.avatar,alt:""}):r("span",{class:"fx-pf-av-fallback",children:Cl(c)})}),r("span",{class:"fx-pf-av-mask",children:r(Y,{name:"pencil",size:18})})]}),r("input",{ref:i,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:b=>{let C=b.currentTarget,L=C.files?.[0];C.value="",L&&a.onAvatar(L)}}),r("div",{class:"fx-pf-id-text",children:[r("div",{class:"fx-pf-name",children:[r(qa,{value:c,placeholder:o.username,maxLength:40,label:t("account.nickname.edit"),onSave:b=>{b&&a.onNickname(b)}}),ql[d]&&r("span",{class:`fx-tag${d==="pro"?" fx-pf-tier-pro":" fx-tag--accent"}`,children:ql[d]})]}),r("div",{class:"fx-pf-handle",children:["@",o.username]})]}),w.length>0&&p("badges")&&r("div",{class:"fx-pf-badges",children:w.map(b=>r("span",{class:"fx-pf-badge",title:t(`profile.badge.${b.id}`),children:r(Y,{name:Ul[b.id],size:14})},b.id))})]}),r("div",{class:"fx-pf-sub",children:[r(qa,{class:"fx-pf-bio",value:o.bio,placeholder:t("profile.bioPlaceholder"),maxLength:80,label:t("profile.bio"),counter:!0,onSave:a.onBio}),r("div",{class:"fx-pf-meta",children:[o.joinedMonth&&r("span",{children:[r(Y,{name:"calendar",size:13}),t("profile.joined",{date:Ol(o.joinedMonth,n)})]}),o.links.map(b=>r("span",{children:[r(Y,{name:"link",size:13}),Ha(b)?r("a",{href:b,onClick:C=>{C.preventDefault(),Va(b)},children:Ua(b)}):r("span",{children:Ua(b)}),r("button",{type:"button",class:"fx-pf-x",title:t("profile.linkRemove"),"aria-label":t("profile.linkRemove"),onClick:()=>a.onLinks(o.links.filter(C=>C!==b)),children:r(Y,{name:"x",size:11})})]},b)),o.links.length<2&&r(qa,{value:"",placeholder:t("profile.linkAdd"),maxLength:200,label:t("profile.linkAdd"),onSave:oe},o.links.length)]})]}),x&&E,r("div",{class:"fx-pf-body","data-cols":V.length&&X.length?2:1,children:[r("div",{class:"fx-pf-main",children:V}),X.length>0&&r("div",{class:"fx-pf-side",children:X})]})]})}function Wl(){let e=Re(async()=>{let[t,n]=await Promise.all([J("/membership/my"),J("/features")]);return t.ok?{ok:!0,status:t.status,data:{membership:t.data?.membership??null,payment:!n.ok||n.data?.payment!==!1}}:t});return e.state==="loading"?r(Ae,{panels:1}):e.state==="signedOut"?null:r(dm,{membership:e.state==="ready"?e.data.membership:null,failed:e.state==="error",payment:e.state==="ready"&&e.data.payment,onRetry:e.state==="ready"?e.reload:e.retry})}function dm(e){let{t,locale:n}=ee(),o=le(),a=e.membership&&(e.membership.status===void 0||e.membership.status==="active")?e.membership:null,i=Mr(a?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",c=()=>void o.run(async()=>await bn("membership")?void 0:{error:{key:"err.openFailed"}});return r(me,{icon:"card",title:t("member.title"),desc:t("member.desc"),actions:e.payment&&!e.failed?r(G,{variant:"primary",pending:o.pending,onClick:c,children:t(s?"member.upgrade":"member.renew")}):void 0,children:[!e.failed&&r("div",{class:"fx-member fx-block",children:[r("span",{class:`fx-tier fx-tier--${l}`,children:i}),r("div",{class:"fx-member-copy",children:[r("strong",{children:s?t("member.freeName"):a?.plan?.name||i}),r("span",{class:"fx-muted",children:s?t("member.freeHint"):a?.expiresAt?t("member.expires",{date:ko(a.expiresAt,n)}):t("member.noExpiry")})]})]}),e.failed&&r("div",{class:"fx-sub",children:r(de,{tone:"warn",children:[t("member.loadFailed")," ",r("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}),o.error&&r("div",{class:"fx-sub fx-sub--tight",children:r(ce,{a:o})})]})}function be(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null}function um(e,t){let n=be(t);if(n===null||n<0)return null;if(n===0)return 0;let o=Math.max(0,be(e)??0);return Math.min(100,Math.max(0,Math.floor(o/n*100)))}var pm=15;function Bn(e,t){let n=um(e,t);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let o=Math.max(0,be(e)??0),a=n===0&&o>0&&(be(t)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=pm}}function So(e,t){let n=be(t);if(n===null||n<=0)return null;let o=be(e);if(o===null)return null;let a=Math.max(0,o);if(a===0)return"0%";let i=a/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var fm=e=>e.ok?"ok":e.status===404?"hidden":"failed";function Xl(){return r(Jl,{section:"points"})}function Kl(){return r(F,{children:[r(Wl,{}),r(Jl,{section:"quota"})]})}function Jl({section:e}){let t=Re(async()=>{let[l,c,d,f]=await Promise.all([J("/token-quota/my"),J("/credits/balance"),J("/features"),J("/invite/my-code")]);return l.ok?{ok:!0,status:l.status,data:{quota:l.data??{},balance:c.ok?be(c.data?.balance):null,balanceFailed:!c.ok,features:d.ok&&d.data&&typeof d.data=="object"?d.data:{},invite:f.ok?f.data:null,inviteState:fm(f)}}:l});if(t.state==="loading")return r(Ae,{panels:3,rows:2});if(t.state==="signedOut")return r(De,{});if(t.state==="error")return r(Oe,{error:t.error,onRetry:t.retry});let{data:n,update:o}=t,a=n.quota.background,i=n.features.redemption_codes!==!1,s=n.features.payment!==!1;return r(F,{children:[e==="quota"&&r(F,{children:[r(gm,{data:n,update:o,onFailed:t.reload}),a?.modelId?r(ym,{bg:a,update:o}):null]}),e==="points"&&r(bm,{data:n,payment:s,onRetry:t.reload}),e==="points"&&(n.inviteState!=="hidden"||i)&&r(xm,{data:n,update:o,redeemEnabled:i,onRedeemed:t.reload})]})}var Gl=e=>({dailyLimit:e.dailyLimit,dailyRemaining:e.dailyRemaining,weeklyLimit:e.weeklyLimit,weeklyRemaining:e.weeklyRemaining});function mm(e,t){if(typeof e?.showResetCardCeremony!="function")return!1;try{return e.showResetCardCeremony(t),!0}catch{return!1}}function gm(e){let{t,locale:n,ctx:o}=ee(),a=e.data.quota,i=Bn(a.dailyRemaining,a.dailyLimit),s=Bn(a.weeklyRemaining,a.weeklyLimit),l=dl(a.weeklyResetAt,n),c=Math.max(0,be(a.resetCards)??0),d=be(a.resetCardPricePoints)??100,f=le(),u=le(),[p,g]=M(null),[m,y]=M("1"),_=/^\d+$/.test(m.trim())?Number(m.trim()):NaN,E=Number.isInteger(_)&&_>=1&&_<=50,x=E?_*d:null,k=e.data.balance,R=x!==null&&k!==null&&k<x,B=()=>void f.run(async()=>{let A={daily:i,weekly:s},P=Gl(a);g(null);let I=re(),N=await go(I.accountUseResetCard?()=>I.accountUseResetCard("both"):null,()=>J("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!N.ok)return e.onFailed(),Ee(N);let V=N.data?.quota,X=be(N.data?.resetCards);return e.update(oe=>({...oe,quota:{...oe.quota,...V??{},resetCards:X??oe.quota.resetCards}})),V&&!mm(o.app,{before:P,after:Gl(V),remainingCards:X??void 0})&&g({before:A,after:{daily:Bn(V.dailyRemaining,V.dailyLimit),weekly:Bn(V.weeklyRemaining,V.weeklyLimit)},cards:X}),{success:{key:"card.used"}}}),j=()=>void u.run(async()=>{if(!E)return{error:{key:"err.invalidCount"}};let A=await J("/points/exchange-reset-cards",{method:"POST",body:{count:_,expectedPricePerCard:d}});return A.ok?(e.update(P=>({...P,quota:{...P.quota,resetCards:be(A.data?.resetCards)??P.quota.resetCards},balance:be(A.data?.newPointsBalance)??P.balance})),y("1"),{success:{key:"card.exchanged",vars:{n:be(A.data?.cardsGranted)??_}}}):(e.onFailed(),Ee(A))}),w=A=>A.unlimited?t("common.unlimited"):A.text;return r(me,{icon:"gauge",title:t("quota.ai.title"),desc:t("quota.ai.desc"),children:[r("div",{class:"fx-quota-list fx-block",children:[r(Rr,{label:t("common.today"),display:i,note:i.unlimited?null:t("quota.resetDaily")}),r(Rr,{label:t("common.thisWeek"),display:s,note:s.unlimited||!l?null:t("quota.resetWeekly",{date:l})})]}),r(Le,{label:t("card.title"),desc:t("card.desc"),children:[r("span",{class:"fx-value","data-testid":"reset-card-count",children:t("card.owned",{n:c})}),r(rn,{label:t("card.use"),confirmLabel:t("card.useConfirm"),pending:f.pending,disabled:c<=0,onConfirm:B})]}),c<=0&&!f.success&&r(_e,{children:r(de,{children:t("card.noneHint")})}),(f.error||f.success)&&r(_e,{children:[r(ce,{a:f}),f.success&&p&&r("div",{class:"fx-ceremony",role:"status",children:[r("span",{children:[t("common.today")," ",r("b",{children:w(p.before.daily)})," \u2192 ",r("b",{children:w(p.after.daily)})]}),r("span",{children:[t("common.thisWeek")," ",r("b",{children:w(p.before.weekly)})," \u2192 ",r("b",{children:w(p.after.weekly)})]}),p.cards!==null&&r("span",{class:"fx-muted",children:t("card.left",{n:p.cards})})]})]}),r(Le,{label:t("card.exchange"),desc:t("card.price",{price:ze(d,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:m,"aria-label":t("card.count"),onInput:A=>{y(A.currentTarget.value),u.clear()}}),r("span",{class:"fx-muted fx-cost",children:x!==null?t("card.cost",{cost:ze(x,n)}):t("card.countHint")}),r(rn,{label:t("card.exchangeButton"),confirmLabel:t("card.exchangeConfirm",{cost:x!==null?ze(x,n):"\u2014"}),pending:u.pending,disabled:!E||R,onConfirm:j})]}),(R||u.error||u.success)&&r(_e,{children:[R&&!u.error&&r(de,{tone:"warn",children:t("err.insufficientPoints")}),r(ce,{a:u})]})]})}function hm(e,t,n){let o=le(),[a,i]=M(null);return{checked:a??e,toggle:l=>{i(l),o.run(async()=>{let c=await t(l);if(i(null),!c.ok)return Ee(c);n(l)})},action:o}}function bm(e){let{t,locale:n}=ee(),o=le(),a=()=>void o.run(async()=>await bn("credits")?void 0:{error:{key:"err.openFailed"}});return r(me,{icon:"coins",title:t("points.title"),desc:t("points.desc"),actions:e.payment?r(G,{variant:"primary",pending:o.pending,onClick:a,children:t("points.recharge")}):void 0,children:[r(Le,{label:t("points.balance"),children:e.data.balance!==null?r("span",{class:"fx-big","data-testid":"points-balance",children:ze(e.data.balance,n)}):r("span",{class:"fx-value is-empty",children:[t("points.balanceFailed")," ",r("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}),o.error&&r(_e,{children:r(ce,{a:o})})]})}var vm=[5,10,20];function ym(e){let{t}=ee(),{bg:n}=e,o=Bn(n.dailyRemaining,n.dailyLimit),a=Bn(n.weeklyRemaining,n.weeklyLimit),i=le(),[s,l]=M(null),c=hm(!!n.autoMain,f=>{let u=re();return go(u.accountBgAutoMain?()=>u.accountBgAutoMain(f):null,()=>J("/token-quota/background/auto-main",{method:"POST",body:{enabled:f}}))},f=>e.update(u=>({...u,quota:{...u.quota,background:{...u.quota.background??{},autoMain:f}}}))),d=f=>{l(f),i.run(async()=>{let u=re(),p=await go(u.accountBgConvert?()=>u.accountBgConvert(f):null,()=>J("/token-quota/background/convert",{method:"POST",body:{percent:f}}));if(l(null),!p.ok)return Ee(p);let g=p.data?.quota;return g&&e.update(y=>({...y,quota:{...y.quota,...g,resetCards:y.quota.resetCards,resetCardPricePoints:y.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:f}}}})};return r(me,{icon:"clock",title:t("bg.title"),desc:t("bg.desc"),children:[r("div",{class:"fx-quota-list fx-block",children:[r(Rr,{label:t("common.today"),display:o}),r(Rr,{label:t("common.thisWeek"),display:a})]}),r(Le,{label:t("bg.autoMain"),desc:t("bg.autoMainDesc"),children:r(Mt,{checked:c.checked,disabled:c.action.pending,label:t("bg.autoMain"),onChange:c.toggle})}),r(Le,{label:t("bg.convert"),desc:t("bg.convertDesc"),class:"fx-row--wide",children:vm.map(f=>r(rn,{label:`${f}%`,confirmLabel:t("bg.convertConfirm",{pct:f}),pending:i.pending&&s===f,disabled:i.pending&&s!==f,onConfirm:()=>d(f)},f))}),(i.error||i.success||c.action.error)&&r(_e,{children:[r(ce,{a:c.action}),r(ce,{a:i})]})]})}function xm(e){let{t,locale:n}=ee(),{invite:o,inviteState:a}=e.data,[i,s]=M(null),[l,c]=M(""),[d,f]=M(""),u=le(),p=le(),g=le();Q(()=>{let x=!0;return re().authStatus?.().then(k=>{x&&s(k?.cloudUrl?k.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let m=async()=>{let x=await J("/invite/my-code");return e.update(k=>({...k,invite:x.ok?x.data:k.invite,inviteState:x.ok?"ok":x.status===404?"hidden":k.inviteState})),x},y=()=>void u.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let k=await J("/invite/claim",{method:"POST",body:{code:x}});return k.ok?(c(""),m(),{success:{key:"invite.claimed"}}):Ee(k)}),_=()=>void p.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let k=await J("/redemption/redeem",{method:"POST",body:{code:x}});if(!k.ok)return Ee(k);f(""),e.onRedeemed();let R=[],B=be(k.data?.creditsAmount);B&&R.push(t("redeem.gotPoints",{n:ze(B,n)})),k.data?.membershipPlanId&&R.push(t("redeem.gotMembership"));for(let j of Array.isArray(k.data?.items)?k.data.items:[]){let w=(n==="zh"?j?.label?.zh:j?.label?.en)||j?.label?.zh||j?.label?.en||j?.kind;w&&R.push(w)}return{success:R.length?{key:"redeem.successWith",vars:{what:R.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),E=o?.code&&i?`${i}/auth?invite=${encodeURIComponent(o.code)}`:"";return r(me,{icon:"gift",title:t("invite.title"),desc:t("invite.desc"),children:[a==="ok"&&o?.code&&r(Le,{label:t("invite.myCode"),desc:t("invite.count",{n:ze(be(o.invitedCount)??0,n)}),class:"fx-row--wide",children:[r("code",{class:"fx-code","data-testid":"invite-code",children:o.code}),r(qt,{text:o.code,label:t("invite.copyCode")}),r(qt,{text:E,label:t("invite.copyLink"),disabled:!E})]}),a==="failed"&&r(_e,{children:r(de,{tone:"warn",children:[t("invite.loadFailed")," ",r("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await m()}),children:t("common.retry")})]})}),a==="ok"&&o?.claim?.eligible&&r(Le,{label:t("invite.claim"),desc:t("invite.claimDesc"),class:"fx-row--wide",children:r("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[r("input",{class:"fx-input",value:l,placeholder:t("invite.claimPlaceholder"),"aria-label":t("invite.claim"),onInput:x=>c(x.currentTarget.value)}),r(G,{submit:!0,pending:u.pending,children:t("invite.claimSubmit")})]})}),(u.error||u.success)&&r(_e,{children:r(ce,{a:u})}),e.redeemEnabled&&r(Le,{label:t("redeem.title"),desc:t("redeem.desc"),class:"fx-row--wide",children:r("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),_()},children:[r("input",{class:"fx-input",value:d,placeholder:t("redeem.placeholder"),"aria-label":t("redeem.title"),onInput:x=>f(x.currentTarget.value)}),r(G,{submit:!0,pending:p.pending,children:t("redeem.submit")})]})}),(p.error||p.success)&&r(_e,{children:r(ce,{a:p})})]})}function km(e){let t=[],n,o=new Map;for(let a of e)if(a.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},t.push(n)),n.items.push(a);else if(a.itemType==="custom_item"&&a.itemDefinition?.stackable){let i=`${a.productId||a.id}:${JSON.stringify(a.itemDefinition)}`,s=o.get(i);s||(s={id:`custom:${i}`,items:[],resetCard:!1},o.set(i,s),t.push(s)),s.items.push(a)}else t.push({id:a.id,items:[a],resetCard:!1});return t}function Yl(){let e=Re(()=>J("/shop/inventory"));return e.state==="loading"?r(Ae,{panels:1,rows:4}):e.state==="signedOut"?r(De,{}):e.state==="error"?r(Oe,{error:e.error,onRetry:e.retry}):r(wm,{items:e.data??[],onRefresh:e.reload,onUsed:t=>{e.update(n=>n.filter(o=>o.id!==t.itemId)),e.reload()}})}function wm(e){let{t,locale:n,goTo:o}=ee(),[a,i]=M(null),[s,l]=M(null),c=Ue(),d=km(e.items),f=d.find(m=>m.id===a),u=Math.max(24,Math.ceil(d.length/6)*6)-d.length,p=m=>m.resetCard?t("card.title"):m.items[0].itemDefinition?.name[n]||m.items[0].displayName||t("backpack.item"),g=m=>{c.current&&(l(m),e.onUsed(m))};return r(me,{icon:"backpack",title:t("page.backpack"),desc:t("backpack.desc"),actions:r(G,{onClick:e.onRefresh,children:[r(Y,{name:"refresh",size:13}),t("backpack.refresh")]}),children:r("div",{class:"fx-backpack fx-block",children:[r("div",{class:"fx-backpack-summary",children:[r("span",{children:t("backpack.total",{n:ze(e.items.length,n)})}),o&&r("button",{class:"fx-link",type:"button",onClick:()=>o("quota"),children:t("backpack.getCards")})]}),s&&r("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[r(Y,{name:"gift",size:20}),r("div",{children:[r("strong",{children:s.message[n]}),r("div",{children:s.effects.map(m=>Zl(m,t,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":t("backpack.grid"),children:[d.map(m=>{let y=p(m);return r("button",{type:"button",class:`fx-backpack-slot${m.resetCard?" is-card":""}`,"data-rarity":m.items[0].itemDefinition?.rarity,"aria-pressed":f?.id===m.id,"aria-label":t("backpack.slot",{name:y,n:m.items.length}),title:y,onClick:()=>i(m.id),children:[r("span",{class:"fx-backpack-icon",children:m.items[0].itemDefinition?.icon?r("span",{class:"fx-backpack-emoji",children:m.items[0].itemDefinition.icon}):r(Y,{name:m.resetCard?"card":"gift",size:30})}),r("span",{class:"fx-backpack-name",children:y}),(m.resetCard||m.items[0].itemDefinition?.stackable)&&r("span",{class:"fx-backpack-count",children:["\xD7",ze(m.items.length,n)]})]},m.id)}),Array.from({length:u},(m,y)=>r("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${y}`))]}),!d.length&&r("p",{class:"fx-backpack-empty",children:t("backpack.empty")})]}),f?r(zm,{slot:f,name:p(f),onUsed:g},`${f.id}:${f.items[0].id}`):r("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[r(Y,{name:"backpack",size:30}),r(de,{children:t(d.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function Zl(e,t,n){return e.type==="points"?t("backpack.effect.points",{n:ze(e.amount,n)}):e.type==="reset_card"?t("backpack.effect.cards",{n:ze(e.count,n)}):t("backpack.effect.quota")}function zm(e){let{t,locale:n,goTo:o}=ee(),a=e.slot.items[0],[i,s]=M(null),l=le(),c=le(),[d,f]=M(!1),u=a.itemDefinition,p=Ue(),g=a.source==="points"?t("backpack.source.points"):a.source==="admin"?t("backpack.source.admin"):a.source==="reward"?t("backpack.source.reward"):t("backpack.source.other"),m=()=>void l.run(async()=>{let _=await J(`/shop/inventory/${encodeURIComponent(a.id)}`);if(p.current){if(!_.ok)return Ee(_);s(_.data)}}),y=()=>void c.run(async()=>{let _=await J(`/shop/inventory/${encodeURIComponent(a.id)}/use`,{method:"POST"});if(!_.ok)return Ee(_);e.onUsed(_.data)});return r("section",{class:"fx-backpack-detail","aria-label":t("backpack.details"),children:[r("span",{class:`fx-backpack-detail-icon${e.slot.resetCard?" is-card":""}`,children:u?.icon?r("span",{class:"fx-backpack-emoji",children:u.icon}):r(Y,{name:e.slot.resetCard?"card":"gift",size:32})}),r("h3",{children:e.name}),r("span",{class:"fx-tag",children:[t(e.slot.resetCard||u?.use?"backpack.consumable":u?"backpack.collectible":"backpack.voucher"),u&&` \xB7 ${t(`backpack.rarity.${u.rarity}`)}`]}),r("dl",{class:"fx-backpack-facts",children:[r("div",{children:[r("dt",{children:t("backpack.quantity")}),r("dd",{children:ze(e.slot.items.length,n)})]}),r("div",{children:[r("dt",{children:t("backpack.acquired")}),r("dd",{children:Ut(a.acquiredAt,n)})]}),!e.slot.resetCard&&r("div",{children:[r("dt",{children:t("backpack.source")}),r("dd",{children:g})]})]}),u?r(F,{children:[u.description&&r(de,{children:u.description[n]}),u.use&&r(F,{children:[r("div",{class:"fx-backpack-effects",children:u.use.effects.map((_,E)=>r("div",{children:Zl(_,t,n)},E))}),d?r(F,{children:[r(de,{children:t("backpack.consumeConfirm")}),r("div",{class:"fx-backpack-use-actions",children:[r(G,{variant:"primary",pending:c.pending,onClick:y,children:t("backpack.confirmUse")}),r(G,{disabled:c.pending,onClick:()=>f(!1),children:t("common.cancel")})]})]}):r(G,{variant:"primary",onClick:()=>f(!0),children:u.use.label?.[n]||t("backpack.use")}),r(ce,{a:c,captchaSection:"backpack"})]})]}):e.slot.resetCard?r(F,{children:[r(de,{children:t("card.desc")}),o&&r(G,{variant:"primary",onClick:()=>o("quota"),children:t("backpack.manageCards")})]}):i?r("div",{class:"fx-backpack-reveal",children:[i.codeName&&r("div",{class:"fx-muted",children:i.codeName}),i.key?r(F,{children:[r("code",{children:i.key}),r(qt,{text:i.key,label:t("backpack.copyKey")})]}):r(de,{children:t("backpack.noKey")})]}):r(G,{pending:l.pending,onClick:m,children:[r(Y,{name:"key",size:14}),t("backpack.reveal")]}),r(ce,{a:l,captchaSection:"backpack"})]})}var _m=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Sm=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ql=(e,t)=>e==="phone"?_m.test(t):Sm.test(t),Lr=(e,t)=>e==="phone"?yo(t):xo(t);function tc(){let e=Re(()=>J("/auth/me"));if(e.state==="loading")return r(Ae,{panels:3,rows:2});if(e.state==="signedOut")return r(De,{});if(e.state==="error")return r(Oe,{error:e.error,onRetry:e.retry});let t=e.data;return r(F,{children:[r(Cm,{me:t,onBound:(n,o)=>e.update(a=>({...a,[n]:o}))}),r(Em,{me:t}),r(Im,{}),r(Rm,{me:t})]})}function Wa(){let e=cl(),t=le();return{cd:e,a:t,send:(a,i,s)=>t.run(async()=>{let l=await J("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return l.ok?(e.start(60),{success:{key:"sec.codeSent"}}):Ee(l)}),reset:()=>{e.stop(),t.clear()}}}function Cm(e){let{t}=ee(),[n,o]=M(null),[a,i]=M(null);return r(me,{icon:"key",title:t("sec.methods.title"),desc:t("sec.methods.desc"),children:["phone","email"].map(s=>{let l=e.me[s];return r(F,{children:[r(Le,{label:t(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Lr(s,l):t("account.contact.unbound"),children:r(G,{onClick:()=>{i(null),o(n===s?null:s)},children:t(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&r(Tm,{kind:s,current:l??null,onDone:c=>{e.onBound(s,c),o(null),i(s)}}),a===s&&n!==s&&r(_e,{children:r("div",{class:"fx-msg is-ok",role:"status",children:t(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Tm(e){let{t}=ee(),{kind:n}=e,[o,a]=M(""),[i,s]=M(""),l=Wa(),c=le(),d=o.trim(),f=n==="phone"?"err.phoneInvalid":"err.emailInvalid",u=()=>{if(!Ql(n,d)){l.a.run(async()=>({error:{key:f}}));return}l.send(d,n,"bind")},p=()=>void c.run(async()=>{if(!Ql(n,d))return{error:{key:f}};if(!i.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},m=await J(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!m.ok)return Ee(m);e.onDone(d)});return r(_e,{class:"fx-form",children:[r("label",{class:"fx-field",children:[r("span",{children:e.current?t(n==="phone"?"sec.newPhone":"sec.newEmail"):t(n==="phone"?"sec.phone":"sec.email")}),r("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:o,autoComplete:"off",placeholder:t(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>a(g.currentTarget.value)})]}),r(Ga,{code:i,setCode:s,sender:l,onSend:u}),r("div",{class:"fx-inline",children:r(G,{variant:"primary",pending:c.pending,onClick:p,children:t("sec.bindSubmit")})}),r(ce,{a:c})]})}function Ga(e){let{t}=ee(),{cd:n,a:o}=e.sender;return r("div",{class:"fx-field",children:[r("span",{children:e.label??t("sec.code")}),r("div",{class:"fx-inline",children:[r("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:e.code,placeholder:t("sec.codePlaceholder"),"aria-label":e.label??t("sec.code"),onInput:a=>e.setCode(a.currentTarget.value)}),r(G,{pending:o.pending,disabled:n.left>0||e.disabled,onClick:e.onSend,children:n.left>0?t("sec.resendIn",{s:n.left}):t("sec.sendCode")})]}),r(ce,{a:o})]})}function Am(e){let{t}=ee(),n=ol(e.value),o=e.value.length>0,a=[[n.length,t("pw.req.length",{min:8,max:64})],[n.lower,t("pw.req.lower")],[n.upper,t("pw.req.upper")],[n.special,t("pw.req.special")],[n.space,t("pw.req.space")]];return r("ul",{class:"fx-rules","aria-label":t("pw.rulesLabel"),children:a.map(([i,s])=>r("li",{class:i?"is-ok":o?"is-bad":"",children:[i?r(Y,{name:"check",size:11}):o?r(Y,{name:"x",size:11}):r("span",{class:"fx-rule-dot","aria-hidden":"true"}),r("span",{children:s})]},s))})}function nc(e,t){let n=rl(e);return n.ok?e!==t?{error:{key:"pw.mismatch"}}:null:{error:{key:Aa[n.rule]}}}function Em(e){let{t}=ee(),n=["phone","email"].filter(l=>!!e.me[l]),[o,a]=M("current"),[i,s]=M(!1);return r(me,{icon:"shield",title:t("pw.title"),desc:t("pw.desc",{min:8,max:64}),actions:r(G,{onClick:()=>s(!i),children:t(i?"common.cancel":"pw.change")}),children:i&&r(_e,{class:"fx-form",children:[r(It,{label:t("pw.modeLabel"),value:o,onChange:a,options:[{value:"current",label:t("pw.mode.current")},{value:"code",label:t("pw.mode.code")}]}),o==="current"?r(Pm,{onDone:()=>s(!1)}):n.length?r(Mm,{me:e.me,targets:n,onDone:()=>s(!1)}):r(de,{children:t("pw.codeNeedsContact")})]})})}function rc(e){let{t}=ee();return r(F,{children:[r("label",{class:"fx-field",children:[r("span",{children:t("pw.new")}),r("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:e.pw,maxLength:72,onInput:n=>e.setPw(n.currentTarget.value)})]}),r(Am,{value:e.pw}),r("label",{class:"fx-field",children:[r("span",{children:t("pw.confirm")}),r("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:e.confirm,onInput:n=>e.setConfirm(n.currentTarget.value)})]})]})}function Pm(e){let{t}=ee(),[n,o]=M(""),[a,i]=M(""),[s,l]=M(""),c=le(),[d,f]=M(!1),u=()=>void c.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let p=nc(a,s);if(p)return p;let g=await J("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return g.ok?(o(""),i(""),l(""),f(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:Ee(g)});return r(F,{children:[r("label",{class:"fx-field",children:[r("span",{children:t("pw.current")}),r("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:p=>o(p.currentTarget.value)})]}),r(rc,{pw:a,setPw:i,confirm:s,setConfirm:l}),r("div",{class:"fx-inline",children:[r(G,{variant:"primary",pending:c.pending,onClick:u,children:t("pw.submit")}),d&&r(G,{onClick:e.onDone,children:t("common.done")})]}),r(ce,{a:c})]})}function Mm(e){let{t}=ee(),[n,o]=M(e.targets[0]),[a,i]=M(""),[s,l]=M(""),[c,d]=M(""),f=Wa(),u=le(),[p,g]=M(!1),m=e.me[n]||"",y=()=>void u.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let _=nc(s,c);if(_)return _;let E=n==="phone"?{phone:m,code:a.trim(),newPassword:s}:{email:m,code:a.trim(),newPassword:s},x=await J("/auth/reset-password",{method:"POST",body:E});return x.ok?(i(""),l(""),d(""),g(!0),{success:{key:"pw.changed"}}):Ee(x)});return r(F,{children:[e.targets.length>1?r(It,{label:t("pw.via"),value:n,onChange:_=>{o(_),i(""),f.reset()},options:e.targets.map(_=>({value:_,label:Lr(_,e.me[_])}))}):r(de,{children:t("pw.codeTo",{target:Lr(n,m)})}),r(Ga,{code:a,setCode:i,sender:f,onSend:()=>void f.send(m,n,"reset_password")}),r(rc,{pw:s,setPw:l,confirm:c,setConfirm:d}),r("div",{class:"fx-inline",children:[r(G,{variant:"primary",pending:u.pending,onClick:y,children:t("pw.submitReset")}),p&&r(G,{onClick:e.onDone,children:t("common.done")})]}),r(ce,{a:u})]})}function Im(){let{t:e}=ee(),t=le(),n=()=>void t.run(async()=>{let o=await J("/auth/logout-all",{method:"POST"});if(!o.ok)return Ee(o);try{await re().forsionLogout?.()}catch(a){return{error:{raw:Et(a)}}}return{success:{key:"sec.logoutAllDone"}}});return r(me,{icon:"laptop",title:e("sec.devices.title"),desc:e("sec.devices.desc"),children:[r(Le,{label:e("sec.logoutAll"),desc:e("sec.logoutAllDesc"),children:r(rn,{label:e("sec.logoutAll"),confirmLabel:e("sec.logoutAllConfirm"),pending:t.pending,onConfirm:n})}),(t.error||t.success)&&r(_e,{children:r(ce,{a:t})})]})}function Rm(e){let{t}=ee(),n=["phone","email"].filter(E=>!!e.me[E]),[o,a]=M(!1),[i,s]=M(n.length?"code":"password"),[l,c]=M(n[0]??null),[d,f]=M(""),[u,p]=M(""),g=Wa(),m=le(),y=l&&e.me[l]||"",_=()=>void m.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!u)return{error:{key:"pw.currentRequired"}};let E=await J("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:u}});if(!E.ok)return Ee(E);try{await re().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return r(me,{icon:"alert",danger:!0,title:t("del.title"),desc:t("del.desc"),actions:r(G,{variant:"danger",onClick:()=>{a(!o),m.clear()},children:t(o?"common.cancel":"del.start")}),children:o&&r(_e,{class:"fx-form",children:[r(de,{tone:"error",children:t("del.warn")}),n.length>0&&r(It,{label:t("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:t("del.byCode")},{value:"password",label:t("del.byPassword")}]}),i==="code"&&l?r(F,{children:[n.length>1&&r(It,{label:t("pw.via"),value:l,onChange:E=>{c(E),f(""),g.reset()},options:n.map(E=>({value:E,label:Lr(E,e.me[E])}))}),r(Ga,{code:d,setCode:f,sender:g,label:t("del.codeLabel",{target:Lr(l,y)}),onSend:()=>void g.send(y,l,"delete_account")})]}):r("label",{class:"fx-field",children:[r("span",{children:t("del.passwordLabel")}),r("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:u,onInput:E=>p(E.currentTarget.value)})]}),r("div",{class:"fx-inline",children:r(rn,{variant:"danger",label:t("del.submit"),confirmLabel:t("del.confirm"),pending:m.pending,onConfirm:_})}),r(ce,{a:m})]})})}var ac=20;function ic(){let e=Re(async()=>{let[t,n]=await Promise.all([J("/token-quota/my"),J(`/token-quota/my/logs?limit=${ac}&offset=0`)]);if(!t.ok)return t;let o=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:t.status,data:{dailyLimit:be(t.data?.dailyLimit),logs:o,total:n.ok?be(n.data?.total)??o?.length??0:0,logsFail:n.ok?null:n}}});return e.state==="loading"?r(Ae,{panels:3,rows:2}):e.state==="signedOut"?r(De,{}):e.state==="error"?r(Oe,{error:e.error,onRetry:e.retry}):r(F,{children:[r(Lm,{dailyLimit:e.data.dailyLimit}),r(Nm,{base:e.data,onRetry:e.reload})]})}function Lm(e){let{t,locale:n}=ee(),[o,a]=M(30),[i,s]=M({state:"loading"}),[l,c]=M(!1),[d,f]=M(0),u=te(0);Q(()=>{let k=++u.current;return c(!0),J(`/usage/stats?days=${o}`).then(R=>{k===u.current&&(c(!1),s(R.ok?{state:"ready",data:R.data??{}}:{state:"error",fail:R}))}),()=>{u.current++}},[o,d]);let p=e.dailyLimit!==null&&e.dailyLimit<0?"usage.unlimitedNote":So(1,e.dailyLimit)===null?"usage.noLimitNote":null,g=k=>So(k,e.dailyLimit)??"\u2014",m=r(It,{label:t("usage.range"),value:o,onChange:a,options:[{value:7,label:t("usage.days",{n:7})},{value:30,label:t("usage.days",{n:30})},{value:90,label:t("usage.days",{n:90})}]}),y=i.state==="ready"?i.data:null,_=(y?.byModel??[]).filter(Boolean),E=(y?.byProject??[]).filter(Boolean),x=be(y?.successRate);return r(F,{children:[r(me,{icon:"chart",title:t("usage.overview.title"),desc:t("usage.overview.desc"),actions:m,children:[i.state==="error"?r("div",{class:"fx-sub",children:r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:bt(dt(i.fail),t)}),r("button",{type:"button",class:"fx-link",onClick:()=>f(k=>k+1),children:t("common.retry")})]})}):r("div",{class:`fx-stats fx-block${l&&y?" is-refreshing":""}`,"aria-busy":l||void 0,children:[r(Xa,{label:t("usage.requests"),value:y?ze(be(y.totalRequests)??0,n):null,testId:"usage-requests"}),r(Xa,{label:t("usage.successRate"),value:y?x===null?"\u2014":`${x.toFixed(1)}%`:null}),r(Xa,{label:t("usage.consumption"),value:y?g(y.totalPointsCost):null,sub:t("usage.ofToday"),testId:"usage-consumption"})]}),p&&r("div",{class:"fx-sub fx-sub--tight",children:r(de,{children:t(p)})})]}),i.state!=="error"&&r(F,{children:[r(me,{icon:"gauge",title:t("usage.byModel.title"),desc:t("usage.byModel.desc"),children:r(oc,{loading:!y,empty:t("usage.empty"),head:[t("usage.col.model"),t("usage.col.requests"),t("usage.col.consumption")],rows:_.map(k=>[k.modelName||k.modelId||"\u2014",ze(be(k.count)??0,n),g(k.pointsCost)])})}),r(me,{icon:"laptop",title:t("usage.byApp.title"),desc:t("usage.byApp.desc"),children:r(oc,{loading:!y,empty:t("usage.empty"),head:[t("usage.col.app"),t("usage.col.requests"),t("usage.col.consumption")],rows:E.map(k=>[sc(k.projectSource,t("usage.appUnknown")),ze(be(k.count)??0,n),g(k.pointsCost)])})})]})]})}var Dm={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"},sc=(e,t)=>!e||e==="unknown"?t:Dm[e]??e;function Xa(e){return r("div",{class:"fx-stat",children:[r("span",{class:"fx-stat-label",children:e.label}),e.value===null?r("span",{class:"fx-skel fx-skel--stat"}):r("strong",{class:"fx-stat-value","data-testid":e.testId,children:e.value}),e.sub&&r("span",{class:"fx-stat-sub",children:e.sub})]})}function oc(e){return e.loading?r("div",{class:"fx-sub",children:[r("span",{class:"fx-skel fx-skel--row"}),r("span",{class:"fx-skel fx-skel--row"})]}):e.rows.length?r("div",{class:"fx-table-wrap fx-block",children:r("table",{class:"fx-table",children:[r("thead",{children:r("tr",{children:e.head.map((t,n)=>r("th",{class:n?"is-num":"",children:t},n))})}),r("tbody",{children:e.rows.map((t,n)=>r("tr",{children:t.map((o,a)=>r("td",{class:a?"is-num":"",children:o},a))},n))})]})}):r(ot,{children:e.empty})}function Nm(e){let{t,locale:n}=ee(),o=Ue(),[a,i]=M(e.base.logs??[]),[s,l]=M(e.base.total),c=le();Q(()=>{i(e.base.logs??[]),l(e.base.total)},[e.base]);let d=()=>void c.run(async()=>{let u=await J(`/token-quota/my/logs?limit=${ac}&offset=${a.length}`);if(!u.ok)return{error:dt(u)};let p=Array.isArray(u.data?.logs)?u.data.logs:[];o.current&&(i(g=>[...g,...p]),l(g=>p.length?be(u.data?.total)??g:a.length))}),f=e.base.dailyLimit;return r(me,{icon:"clock",title:t("usage.recent.title"),desc:t("usage.recent.desc"),children:[e.base.logsFail?r("div",{class:"fx-sub",children:r("div",{class:"fx-msg is-error",role:"alert",children:[r("span",{children:bt(dt(e.base.logsFail),t)}),r("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")})]})}):a.length===0?r(ot,{children:t("usage.recentEmpty")}):r("div",{class:"fx-list fx-block",role:"list",children:a.map((u,p)=>r("div",{class:"fx-list-row",role:"listitem",children:[r("span",{class:"fx-list-main",children:[r("strong",{children:[u.modelName||u.modelId||"\u2014",u.success===!1&&r("span",{class:"fx-tag fx-tag--danger",children:t("usage.failed")})]}),r("small",{children:[Ut(u.createdAt,n),sc(u.projectSource,t("usage.appUnknown"))].join(" \xB7 ")})]}),r("span",{class:"fx-value",children:So(u.pointsCost,f)??"\u2014"})]},u.id??p))}),a.length>0&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:t("usage.shown",{shown:ze(a.length,n),total:ze(Math.max(s,a.length),n)})}),a.length<s&&r(G,{pending:c.pending,onClick:d,children:t("common.loadMore")})]}),c.error&&r("div",{class:"fx-sub fx-sub--tight",children:r(ce,{a:c})})]})}var Om=["plugin","amadeus-plugin","skill","agent","space","theme"],Fm=["github","npm","zip"],$m=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","market_requirements_invalid","market_requirements_mismatch"]),cc=e=>`sub.type.${e.replace("-","_")}`,lc=e=>e==="approved"?"sub.approved":e==="rejected"?"sub.rejected":"sub.pending";function Bm({target:e,onDone:t,onCancel:n}){let o=Pt(),a=fo(),i=Ue(),s=le(),[l,c]=M("github"),[d,f]=M({type:"plugin",name:"",summary:"",githubRepoUrl:"",npmPackage:"",version:"",readme:"",description:e?.description||"",tags:(e?.tags||[]).join(", "),minAppVersion:e?.minAppVersion||"",maxAppVersion:e?.maxAppVersion||"",platforms:(e?.platforms||[]).join(", ")}),[u,p]=M(new Set),g=te(null),m=te(null);Q(()=>{m.current?.scrollIntoView({block:"start"}),m.current?.querySelector("input")?.focus({preventScroll:!0})},[]);let y=!!e||l==="zip",_=(k,R)=>{f(B=>({...B,[k]:R})),p(B=>new Set([...B,k])),s.clear()},E=()=>void s.run(async()=>{if(!e&&!d.name.trim())return{error:{key:"sub.errName"}};if(!y&&!(l==="github"?d.githubRepoUrl:d.npmPackage).trim())return{error:{key:"sub.errSource"}};let k=g.current?.files?.[0];if(y&&!k)return{error:{key:"sub.errZip"}};if(k&&k.size>50*1024*1024)return{error:{key:"sub.errLarge"}};if(y&&!d.version.trim())return{error:{key:"sub.errVersion"}};let R=re().cloudInvoke;if(!R)return{error:{key:"err.unavailable"}};let B=e?{summary:d.summary.trim(),version:d.version.trim(),readme:d.readme}:{type:d.type,source:l,name:d.name.trim(),summary:d.summary.trim(),...l==="github"?{githubRepoUrl:d.githubRepoUrl.trim()}:l==="npm"?{npmPackage:d.npmPackage.trim()}:{version:d.version.trim(),readme:d.readme}},j=Object.fromEntries(["description","tags","minAppVersion","maxAppVersion","platforms"].filter(P=>!e||u.has(P)).map(P=>[P,d[P].trim()])),w=y&&k?new Uint8Array(await k.arrayBuffer()):null;if(!i.current)return;let A=mo(await R("cloud:marketSubmit",{...e?{id:e.id}:{},fields:{...B,...j},...w&&k?{zip:{name:k.name,data:w}}:{}}));if(i.current){if(!A.ok)return A.status===401&&re().authStatus?.().catch(()=>{}),$m.has(A.code||"")?{error:{key:`sub.err.${A.code}`}}:Ee(A);t()}}),x=(k,R,B="")=>r("label",{class:"fx-sub-field",for:`${a}-${k}`,children:[r("span",{children:R}),r("input",{id:`${a}-${k}`,value:d[k],placeholder:B,maxLength:k==="summary"?2e3:500,onInput:j=>_(k,j.currentTarget.value)})]});return r(me,{title:e?o("sub.updateTitle",{name:e.name}):o("sub.new"),children:r("form",{ref:m,class:"fx-sub-form",onSubmit:k=>{k.preventDefault(),E()},children:[r("fieldset",{disabled:s.pending,children:[!e&&r(F,{children:[r("div",{class:"fx-sub-columns",children:[r("label",{class:"fx-sub-field",for:`${a}-type`,children:[r("span",{id:`${a}-type-label`,children:o("sub.type")}),r("select",{"aria-labelledby":`${a}-type-label`,id:`${a}-type`,value:d.type,onChange:k=>_("type",k.currentTarget.value),children:Om.map(k=>r("option",{value:k,children:o(cc(k))},k))})]}),r("label",{class:"fx-sub-field",for:`${a}-source`,children:[r("span",{id:`${a}-source-label`,children:o("sub.source")}),r("select",{"aria-labelledby":`${a}-source-label`,id:`${a}-source`,value:l,onChange:k=>{c(k.currentTarget.value),s.clear()},children:Fm.map(k=>r("option",{value:k,children:k==="github"?"GitHub":k==="npm"?"npm":"ZIP"},k))})]})]}),x("name",o("sub.name"))]}),r(de,{children:e?`${o("sub.identity")}: ${e.id}`:o("sub.identityHint")}),x("summary",o("sub.summary"),e?o("sub.keep"):""),r("label",{class:"fx-sub-field",for:`${a}-description`,children:[r("span",{children:o("sub.description")}),r("textarea",{id:`${a}-description`,value:d.description,rows:3,maxLength:2e5,onInput:k=>_("description",k.currentTarget.value)})]}),x("tags",o("sub.tags"),o("sub.tagsHint")),r("div",{class:"fx-sub-columns",children:[x("minAppVersion",o("sub.minAppVersion"),"2.13.0"),x("maxAppVersion",o("sub.maxAppVersion"),o("sub.optional"))]}),x("platforms",o("sub.platforms"),"desktop, android, ios, web"),r(de,{children:o("sub.requirementsHint")}),y?r(F,{children:[r("label",{class:"fx-sub-field",for:`${a}-zip`,children:[r("span",{id:`${a}-zip-label`,children:o("sub.zip")}),r("input",{"aria-labelledby":`${a}-zip-label`,id:`${a}-zip`,type:"file",accept:".zip,application/zip",ref:g}),r("small",{children:o("sub.zipHint")})]}),x("version",o("sub.version"),e?.version?`> ${e.version}`:"1.0.0"),e&&r(de,{children:o("sub.versionHint")}),r("label",{class:"fx-sub-field",for:`${a}-readme`,children:[r("span",{children:o("sub.readme")}),r("textarea",{id:`${a}-readme`,value:d.readme,rows:5,maxLength:2e5,placeholder:e?o("sub.keep"):"",onInput:k=>_("readme",k.currentTarget.value)})]})]}):r(F,{children:[l==="github"?x("githubRepoUrl",o("sub.repo"),"https://github.com/owner/repo"):x("npmPackage",o("sub.npm"),"@scope/plugin-name"),r(de,{children:o(l==="github"?"sub.repoHint":"sub.npmHint")})]}),r(de,{children:o("sub.reviewHint")})]}),r("div",{class:"fx-sub-actions",children:[r(G,{variant:"primary",pending:s.pending,submit:!0,children:o("sub.submit")}),r(G,{disabled:s.pending,onClick:n,children:o("common.cancel")})]}),r(ce,{a:s,captchaSection:"submission"})]})})}function Um({items:e,reload:t}){let n=Pt(),o=fo(),[a,i]=M("all"),[s,l]=M(null),[c,d]=M(null),f=p=>{d(null),l(p)},u=e.filter(p=>a==="all"||(a==="pending"?p.status==="pending"||!!p.pendingUpdate:p.status===a));return r(F,{children:[s&&r(Bm,{target:s==="new"?null:s,onCancel:()=>l(null),onDone:()=>{d(s==="new"?"sub.submitted":"sub.updated"),l(null),t()}},s==="new"?"new":s.id),r(me,{title:n("sub.mine"),desc:n("sub.desc"),actions:r(F,{children:[r(G,{variant:"primary",disabled:!!s,onClick:()=>f("new"),children:n("sub.new")}),r(G,{disabled:!!s,onClick:t,children:n("sub.refresh")})]}),children:[c&&r("p",{class:"fx-msg is-ok fx-sub-result",role:"status",children:n(c)}),!!e.length&&r("div",{class:"fx-sub-filter",children:[r("label",{for:o,children:n("sub.filter")}),r("select",{id:o,value:a,onChange:p=>i(p.currentTarget.value),children:[r("option",{value:"all",children:n("sub.all")}),["pending","approved","rejected"].map(p=>r("option",{value:p,children:n(lc(p))},p))]})]}),u.length?u.map(p=>r("article",{class:"fx-sub-item","data-submission-id":p.id,children:[r("div",{class:"fx-sub-item-head",children:[r("strong",{children:p.name}),r("span",{class:`fx-tag ${p.status==="approved"?"fx-status--resolved":p.status==="rejected"?"fx-tag--danger":"fx-tag--accent"}`,children:n(lc(p.status))})]}),r("div",{class:"fx-sub-meta",children:[r("span",{children:p.id}),r("span",{children:n(cc(p.type))}),r("span",{children:p.source==="github"?"GitHub":p.source==="npm"?"npm":"ZIP"}),p.version&&r("span",{children:["v",p.version]}),r("span",{children:n("sub.downloads",{n:p.downloads||0})})]}),p.summary&&r("p",{class:"fx-sub-summary",children:p.summary}),p.status==="rejected"&&p.reviewNote&&r(de,{tone:"error",children:p.reviewNote}),p.rejectedUpdate&&r(de,{tone:"error",children:[n("sub.rejectedVersion",{version:p.rejectedUpdate.version}),p.rejectedUpdate.note?`: ${p.rejectedUpdate.note}`:""]}),p.pendingUpdate?r(de,{children:n("sub.pendingVersion",{version:p.pendingUpdate.version})}):p.source==="zip"?r(G,{disabled:!!s,onClick:()=>f(p),children:n("sub.update")}):r(de,{children:n("sub.remoteUpdate")})]},p.id)):r(ot,{children:e.length?n("sub.noResults"):r(F,{children:[r("strong",{children:n("sub.empty")}),r("p",{children:n("sub.emptyHint")})]})})]})]})}function dc(){let e=Re(()=>J("/market/mine"));switch(e.state){case"loading":return r(Ae,{});case"signedOut":return r(De,{});case"error":return r(Oe,{error:e.error,onRetry:e.retry});case"ready":return r(Um,{items:e.data?.items||[],reload:e.reload})}}var qm=e=>!!e&&typeof e=="object"&&typeof e.enabled=="boolean";async function Ka(e,t){let n=re().cloudInvoke;if(!n)throw new Error("no_bridge");let o=await n(e,t);if(!qm(o))throw new Error(String(o?.error??"unavailable"));return o}var Hm=["diag.item.app","diag.item.settings","diag.item.agents","diag.item.plugins","diag.item.runs"];function uc(){let[e,t]=M(0);return Q(()=>re().onAuthChanged?.(()=>t(n=>n+1)),[]),r(Vm,{standalone:!0},e)}function Vm({standalone:e=!1}={}){let{t,locale:n}=ee(),o=Ue(),[a,i]=M(null),[s,l]=M(!1),c=le(),d=le();if(Q(()=>{let y=!1,_=0,E=()=>{let k=++_;Ka("diagnostics:get").then(R=>{!y&&k===_&&(i(R),l(!0))},()=>{!y&&k===_&&(i(null),l(!0))})};E();let x=re().onAuthChanged?.(E);return()=>{y=!0,x?.()}},[]),!a?.signedIn)return e?s?a?r(De,{}):r(ot,{children:t("diag.unavailable")}):r(Ae,{panels:1}):null;let f=()=>void d.run(async()=>{try{let y=await Ka("diagnostics:uploadNow");return o.current&&i(y),y.lastError?{error:{key:"diag.failed",vars:{reason:y.lastError}}}:y.enabled&&y.lastUploadAt?{success:{key:"diag.uploaded"}}:void 0}catch(y){return{error:{raw:Et(y)||t("err.generic")}}}}),u=async y=>{let _=!1;await c.run(async()=>{d.clear();try{let E=await Ka("diagnostics:set",y);o.current&&i(E),_=!0}catch(E){return{error:{raw:Et(E)||t("err.generic")}}}}),_&&y.enabled&&o.current&&f()},p=a.intervalHours??24,g=a.mode==="manual"?t("diag.freq.manual"):p===1?t("diag.freq.hour"):p%24===0?p===24?t("diag.freq.day"):t("diag.freq.days",{n:p/24}):t("diag.freq.hours",{n:p}),m=`${a.lastUploadAt?t("diag.last",{time:Ut(a.lastUploadAt,n)}):t("diag.noUpload")} \xB7 ${g}`;return r(me,{icon:"chart",title:t("diag.title"),desc:t("diag.desc"),children:[r(Le,{label:t("diag.enable"),desc:t("diag.enableDesc"),children:r(Mt,{checked:a.enabled,disabled:c.pending,label:t("diag.enable"),onChange:y=>void u({enabled:y})})}),r(_e,{class:"fx-diag",children:[r("strong",{children:t("diag.collected")}),r("ul",{children:Hm.map(y=>r("li",{children:t(y)},y))}),r(de,{children:t("diag.notCollected")})]}),a.sessions!==void 0&&r(Le,{label:t("diag.sessions"),desc:t("diag.sessionsDesc"),children:r(Mt,{checked:a.sessions,disabled:c.pending,label:t("diag.sessions"),onChange:y=>void u({sessions:y})})}),a.memory!==void 0&&r(Le,{label:t("diag.memory"),desc:t("diag.memoryDesc"),children:r(Mt,{checked:a.memory,disabled:c.pending,label:t("diag.memory"),onChange:y=>void u({memory:y})})}),r(Le,{label:t("diag.activity"),desc:t("diag.activityDesc"),children:r(Mt,{checked:a.activity,disabled:c.pending,label:t("diag.activity"),onChange:y=>void u({activity:y})})}),a.enabled&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:m}),r(G,{pending:d.pending,disabled:c.pending,onClick:f,children:t("diag.uploadNow")})]}),r(_e,{class:"fx-sub--tight",children:[r(de,{children:t("diag.retention",{n:a.retainDays})}),a.enabled&&a.lastError&&!d.error&&!d.success&&r("div",{class:"fx-msg is-error",role:"alert",children:t("diag.failed",{reason:a.lastError})}),r(ce,{a:c}),r(ce,{a:d})]})]})}var Dr=20,Co=5,jm=5*1024*1024,To=1e4,Wm={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function fc(e){let{t}=ee(),n=e.status||"open",o=Wm[n];return r("span",{class:`fx-tag fx-status fx-status--${n}`,children:o?t(o):n})}function mc(){let[e,t]=M(null),n=Re(async()=>{let o=await J(`/feedback?limit=${Dr}&offset=0`);return o.ok?{ok:!0,status:o.status,data:Array.isArray(o.data?.tickets)?o.data.tickets:[]}:o});return n.state==="loading"?r(Ae,{panels:1,rows:3}):n.state==="signedOut"?r(De,{}):n.state==="error"?r(Oe,{error:n.error,onRetry:n.retry}):e?r(Ym,{id:e,onBack:()=>{t(null),n.reload()}}):r(Gm,{first:n.data,onOpen:t,onChanged:n.reload})}function Gm(e){let{t,locale:n}=ee(),o=Ue(),[a,i]=M(e.first),[s,l]=M(e.first.length===Dr),[c,d]=M(!1),[f,u]=M(!1),p=le();Q(()=>{i(e.first),l(e.first.length===Dr)},[e.first]);let g=()=>void p.run(async()=>{let m=await J(`/feedback?limit=${Dr}&offset=${a.length}`);if(!m.ok)return{error:dt(m)};let y=Array.isArray(m.data?.tickets)?m.data.tickets:[];o.current&&(i(_=>{let E=new Set(_.map(x=>x.id));return[..._,...y.filter(x=>!E.has(x.id))]}),l(y.length===Dr))});return r(me,{icon:"message",title:t("fb.list.title"),desc:t("fb.list.desc"),actions:c?void 0:r(G,{variant:"primary",onClick:()=>{u(!1),d(!0)},children:[r(Y,{name:"plus",size:12})," ",t("fb.new")]}),children:[c&&r(Jm,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),u(!0),e.onChanged()}}),f&&!c&&r(_e,{children:r("div",{class:"fx-msg is-ok",role:"status",children:t("fb.submitted")})}),a.length===0?r(ot,{children:t("fb.empty")}):r("div",{class:"fx-list fx-block",role:"list",children:a.map(m=>r("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>e.onOpen(m.id),children:[r("span",{class:`fx-dot${m.user_unread?" is-on":""}`,"aria-label":m.user_unread?t("fb.unread"):void 0}),r("span",{class:"fx-list-main",children:[r("strong",{children:m.title||(m.description||"").slice(0,60)||t("fb.untitled")}),r("small",{children:Ut(m.updated_at||m.created_at,n)})]}),r(fc,{status:m.status}),r(Y,{name:"chevron",size:12})]},m.id))}),a.length>0&&(s||p.error)&&r("div",{class:"settings-panel-footer fx-footer",children:[r("span",{class:"fx-muted",children:t("fb.shown",{n:ze(a.length,n)})}),s&&r(G,{pending:p.pending,onClick:g,children:t("common.loadMore")})]}),p.error&&r(_e,{children:r(ce,{a:p})})]})}function Xm(e){return new Promise((t,n)=>{let o=new FileReader;o.onload=()=>t(String(o.result||"")),o.onerror=()=>n(o.error||new Error("read failed")),o.readAsDataURL(e)})}var Km=0;function Jm(e){let{t}=ee(),n=Ue(),[o,a]=M(""),[i,s]=M([]),[l,c]=M(null),[d,f]=M(!1),u=te(null),p=le(),[g,m]=M(0),y=te(0);y.current=i.length;let _=async x=>{c(null);for(let k of Array.from(x||[])){if(!k.type||!k.type.startsWith("image/")){c({key:"err.imageType"});continue}if(k.size>jm){c({key:"err.imageTooLarge"});continue}if(y.current>=Co){c({key:"err.tooManyImages"});break}y.current++,m(R=>R+1);try{let R=await Xm(k);if(!n.current)return;let B={id:`img-${++Km}`,filename:k.name||"image",mime_type:k.type,size:k.size,data_base64:R.replace(/^data:[^;]+;base64,/,""),url:R};s(j=>j.length>=Co?j:[...j,B])}catch{y.current--,c({key:"err.imageRead"})}finally{n.current&&m(R=>R-1)}}},E=()=>void p.run(async()=>{let x=o.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>To)return{error:{key:"err.feedbackTooLong"}};let k=i.map(({filename:B,mime_type:j,size:w,data_base64:A})=>({filename:B,mime_type:j,size:w,data_base64:A})),R=await J("/feedback",{method:"POST",body:{description:x,attachments:k},timeoutMs:12e4});if(!R.ok)return Ee(R);e.onSubmitted()});return r("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let k=Array.from(x.clipboardData?.items||[]).filter(R=>R.kind==="file").map(R=>R.getAsFile()).filter(Boolean);k.length&&(x.preventDefault(),_(k))},onDragOver:x=>{x.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:x=>{x.preventDefault(),f(!1),_(x.dataTransfer?.files)},children:[r("label",{class:"fx-field",children:[r("span",{children:t("fb.descLabel")}),r("textarea",{class:"fx-input fx-textarea",rows:5,value:o,maxLength:To,autoFocus:!0,placeholder:t("fb.descPlaceholder"),onInput:x=>a(x.currentTarget.value)})]}),r("p",{class:"fx-note",children:t("fb.imagesHint",{n:Co})}),i.length>0&&r("div",{class:"fx-thumbs",children:i.map(x=>r("span",{class:"fx-thumb",children:[r("img",{src:x.url,alt:x.filename}),r("button",{type:"button","aria-label":t("fb.removeImage"),title:t("fb.removeImage"),onClick:()=>{s(k=>k.filter(R=>R.id!==x.id)),c(null)},children:r(Y,{name:"x",size:11})})]},x.id))}),l&&r("div",{class:"fx-msg is-error",role:"alert",children:bt(l,t)}),r("input",{ref:u,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let k=x.currentTarget;_(k.files),k.value=""}}),r("div",{class:"fx-inline",children:[r(G,{disabled:i.length>=Co||p.pending,onClick:()=>u.current?.click(),children:[r(Y,{name:"image",size:12})," ",t("fb.addImages")]}),r("span",{class:"fx-grow"}),r(G,{disabled:p.pending,onClick:e.onCancel,children:t("common.cancel")}),r(G,{variant:"primary",pending:p.pending,disabled:g>0,onClick:E,children:t("fb.submit")})]}),r(ce,{a:p})]})}function Ym(e){let{t,locale:n}=ee(),[o,a]=M({state:"loading"}),[i,s]=M(0),[l,c]=M(""),[d,f]=M(null),u=le(),p=te(0);Q(()=>{let R=++p.current;return J(`/feedback/${encodeURIComponent(e.id)}`).then(B=>{if(R===p.current){if(!B.ok){a({state:"error",fail:B});return}a({state:"ready",data:{ticket:B.data.ticket,replies:B.data.replies??[],attachments:B.data.attachments??[]}}),J(`/feedback/${encodeURIComponent(e.id)}/read`,{method:"POST"})}}),()=>{p.current++}},[e.id,i]),Q(()=>{if(!d)return;let R=B=>{B.key==="Escape"&&f(null)};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[d]);let g=r("div",{class:"fx-back",children:r(G,{onClick:e.onBack,children:[r(Y,{name:"back",size:12})," ",t("fb.back")]})});if(o.state==="loading")return r(F,{children:[g,r(Ae,{panels:1,rows:3})]});if(o.state==="error")return r(F,{children:[g,r(Oe,{error:dt(o.fail),onRetry:()=>{a({state:"loading"}),s(R=>R+1)}})]});let{ticket:m,replies:y,attachments:_}=o.data,E=m.status==="closed",x=R=>_.filter(B=>(B.reply_id??null)===R),k=()=>void u.run(async()=>{let R=l.trim();if(!R)return{error:{key:"err.replyEmpty"}};if(R.length>To)return{error:{key:"err.replyTooLong"}};let B=await J(`/feedback/${encodeURIComponent(m.id)}/replies`,{method:"POST",body:{content:R},timeoutMs:6e4});return B.ok?(c(""),s(j=>j+1),{success:{key:"fb.replySent"}}):Ee(B)});return r(F,{children:[g,r(me,{icon:"message",title:m.title||t("fb.untitled"),actions:r(fc,{status:m.status}),desc:`#${String(m.id).slice(0,8)} \xB7 ${Ut(m.created_at,n)}`,children:[r("div",{class:"fx-thread fx-block",children:[r(pc,{who:"user",when:m.created_at,text:m.description||"",files:x(null),onZoom:f}),y.map((R,B)=>r(pc,{who:R.author_role==="user"?"user":"admin",when:R.created_at,text:R.content||"",files:R.id?x(R.id):[],onZoom:f},R.id??B))]}),E?r(_e,{children:r(de,{children:t("fb.closedNote")})}):r(_e,{class:"fx-form",children:[r("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:To,placeholder:t("fb.replyPlaceholder"),"aria-label":t("fb.replyPlaceholder"),onInput:R=>{c(R.currentTarget.value),u.success&&u.clear()}}),r("div",{class:"fx-inline",children:[r("span",{class:"fx-grow"}),r(G,{variant:"primary",pending:u.pending,onClick:k,children:t("fb.replySend")})]}),r(ce,{a:u})]})]}),d&&r("div",{class:"fx-lightbox",role:"dialog","aria-label":t("fb.imagePreview"),onClick:()=>f(null),children:r("img",{src:d,alt:""})})]})}function pc(e){let{t,locale:n}=ee();return r("div",{class:`fx-bubble fx-bubble--${e.who}`,children:[r("div",{class:"fx-bubble-meta",children:[e.who==="user"?t("fb.you"):t("fb.support")," \xB7 ",Ut(e.when,n)]}),r("div",{class:"fx-bubble-text",children:e.text}),e.files.length>0&&r("div",{class:"fx-thumbs",children:e.files.map((o,a)=>{let i=o.mime_type||"";if(i.startsWith("image/")&&o.data_base64){let s=`data:${i};base64,${o.data_base64}`;return r("button",{type:"button",class:"fx-thumb",onClick:()=>e.onZoom(s),"aria-label":t("fb.imagePreview"),children:r("img",{src:s,alt:o.filename||""})},o.id??a)}return r("span",{class:"fx-tag",children:[r(Y,{name:"card",size:11})," ",o.filename||t("fb.attachment")]},o.id??a)})})]})}var hc=[{id:"monthly",field:"priceMonthly",discount:"recurringPriceMonthly"},{id:"quarterly",field:"priceQuarterly",discount:"recurringPriceQuarterly"},{id:"yearly",field:"priceYearly",discount:"recurringPriceYearly"}];function gc(e,t){let n=hc.find(s=>s.id===t),o=be(e.priceMonthly)??0,a=(be(e[n.field])??0)||(t==="quarterly"?Math.round(o*300)/100:0),i=be(e[n.discount])??0;return i>0&&i<a?i:a}function Ja(e,t,n){let o=ze(e,n),a=String(t||"CNY").toUpperCase();return a==="CNY"?`\xA5${o}`:a==="USD"?`$${o}`:`${o} ${a}`}async function Zm(){let[e,t,n]=await Promise.all([J("/membership/my"),J("/credits/balance"),J("/features")]);return!e.ok&&Dn(e)?e:!t.ok&&Dn(t)?t:{ok:!0,status:200,data:{membership:e.ok?e.data?.membership??null:null,membershipFailed:!e.ok,balance:t.ok?be(t.data?.balance):null,balanceFailed:!t.ok,features:n.ok&&n.data&&typeof n.data=="object"?n.data:{}}}}async function Ya(e,t){let[n,o]=await Promise.all([Zm(),J(e)]);return n.ok?o.ok?{ok:!0,status:o.status,data:{status:n.data,list:t(o.data)}}:o:n}var Za=e=>(Array.isArray(e)?e:[]).filter(t=>!!t&&typeof t=="object"&&t.isActive!==!1),Qm=15*6e4;function Qa(e){let t=te(0),n=te(0),o=te(e);return o.current=e,Q(()=>{let a=()=>{let i=Date.now();i>t.current||document.visibilityState==="hidden"||i-n.current<2e3||(n.current=i,o.current?.())};return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[]),()=>{t.current=Date.now()+Qm}}function bc(e){let t=e.membership;return t&&(t.status===void 0||t.status==="active")?t:null}function ei(e){let{t,locale:n}=ee(),o=e.status,a=bc(o),i=Mr(a?.tier),s=i==="Free";return r("section",{class:"fx-shop-strip","aria-label":t("store.status"),children:[r("div",{class:"fx-shop-stat",children:[r("small",{children:t("store.tier")}),o.membershipFailed?r("b",{class:"is-empty",children:"\u2014"}):r("b",{"data-testid":"shop-tier",children:[s?t("member.freeName"):a?.plan?.name||i,!s&&r("i",{children:a?.expiresAt?t("member.expires",{date:ko(a.expiresAt,n)}):t("member.noExpiry")})]})]}),r("div",{class:"fx-shop-stat",children:[r("small",{children:t("store.balance")}),r("b",{class:o.balance===null?"is-empty":"","data-testid":"shop-balance",children:o.balance===null?"\u2014":ze(o.balance,n)})]}),(o.membershipFailed||o.balanceFailed)&&r("button",{type:"button",class:"fx-link",onClick:e.onRetry,children:t("common.retry")}),r("span",{class:"fx-grow"}),e.children]})}function ti(e){return r("section",{class:"fx-shop-section",children:[r("div",{class:"fx-shop-head",children:[r("div",{children:[r("h2",{children:e.title}),e.desc&&r("p",{children:e.desc})]}),e.right]}),e.children]})}function ni(e){let t=le(),[n,o]=M(null),a=(i,s,l,c)=>{o(i),t.run(async()=>{if(!await bn(s,l,c))return{error:{key:"err.openFailed"}};e()})};return{a:t,payingId:t.pending?n:null,open:a}}function ri(e){return r(G,{variant:"ghost",pending:e.pending,disabled:e.disabled,onClick:e.onClick,children:[e.label,r(Y,{name:"external",size:12})]})}function oi(e){return r("div",{class:"fx-shop-empty",children:e.children})}function vc(){let{t:e,locale:t}=ee(),n=Re(()=>Ya("/payment/offerings",g=>Za(g?.membershipPlans))),o=Qa(n.state==="ready"?n.reload:null),a=ni(o),[i,s]=M("monthly");if(n.state==="loading")return r(Ae,{panels:2,rows:2});if(n.state==="signedOut")return r(De,{});if(n.state==="error")return r(Oe,{error:n.error,onRetry:n.retry});let{status:l,list:c}=n.data,d=l.features.payment!==!1,f=hc.filter(g=>c.some(m=>gc(m,g.id)>0)),u=f.some(g=>g.id===i)?i:f[0]?.id??"monthly",p=bc(l)?.tier?.toLowerCase()??null;return r(F,{children:[r(ei,{status:l,onRetry:n.reload}),r(ti,{title:e("store.choosePlan"),desc:e(d?"store.payHint":"store.payOff"),right:f.length>1?r(It,{value:u,label:e("store.period"),onChange:s,options:f.map(g=>({value:g.id,label:e(`store.period.${g.id}`)}))}):void 0,children:[c.length===0?r(oi,{children:e("store.noPlans")}):r("div",{class:"fx-shop-tiers",children:c.map(g=>{let m=gc(g,u),y=!!p&&!l.membershipFailed&&g.tier?.toLowerCase()===p;return r("article",{class:"fx-shop-tier","data-tier":g.tier,children:[r("h3",{children:[g.name||Mr(g.tier),y&&r("span",{class:"fx-shop-current",children:[r(Y,{name:"check",size:12}),e("store.currentTier")]})]}),r("div",{class:"fx-shop-price",children:m>0?r(F,{children:[Ja(m,g.currency,t),r("small",{children:e(`store.per.${u}`)})]}):"\u2014"}),r("p",{children:g.description}),d&&m>0&&r(ri,{label:e(y?"member.renew":"store.pay"),pending:a.payingId===g.id,disabled:a.a.pending,onClick:()=>a.open(g.id,"membership",g.id,u)})]},g.id)})}),r(ce,{a:a.a})]})]})}function yc(){let{t:e,locale:t}=ee(),n=Re(()=>Ya("/payment/offerings",c=>Za(c?.packages))),o=Qa(n.state==="ready"?n.reload:null),a=ni(o);if(n.state==="loading")return r(Ae,{panels:2,rows:2});if(n.state==="signedOut")return r(De,{});if(n.state==="error")return r(Oe,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1;return r(F,{children:[r(ei,{status:i,onRetry:n.reload}),r(ti,{title:e("store.packs"),desc:e(l?"store.packsHint":"store.payOff"),children:[s.length===0?r(oi,{children:e("store.noPacks")}):r("div",{class:"fx-shop-grid",children:s.map(c=>{let d=be(c.price)??0;return r(xc,{icon:"coins",kind:e("store.kind.pack"),name:`${c.name||""} \xB7 ${e("store.nPoints",{n:ze(c.credits,t)})}`,desc:c.description,meta:e("store.instant"),children:l&&d>0&&r(ri,{label:e("store.payPrice",{price:Ja(d,c.currency,t)}),pending:a.payingId===c.id,disabled:a.a.pending,onClick:()=>a.open(c.id,"credits")})},c.id)})}),r(ce,{a:a.a})]})]})}function xc(e){return r("article",{class:"fx-shop-card",children:[r("div",{class:"fx-shop-visual","aria-hidden":"true",children:e.emoji?r("span",{class:"fx-shop-emoji",children:e.emoji}):r(Y,{name:e.icon,size:18})}),r("div",{class:"fx-shop-body",children:[r("span",{class:"fx-shop-kind",children:e.kind}),r("strong",{children:e.name}),e.desc&&r("p",{children:e.desc}),r("div",{class:"fx-shop-foot",children:[r("span",{class:"fx-shop-meta",children:e.meta}),r("span",{class:"fx-shop-acts",children:e.children})]}),e.below]})]})}var eg={reset_card:"store.kind.card",api_quota_key:"store.kind.code"};function tg(e){let{t,locale:n}=ee(),{p:o}=e,a=le(),[i,s]=M(null),[l,c]=M(!1),d=be(o.pricePoints)??0,f=be(o.priceRmb)??0,u=typeof o.availableKeys=="number"&&o.availableKeys<=0,p=d>0&&e.balance!==null&&e.balance<d,g=()=>void a.run(async()=>{let y=await J("/shop/purchase",{method:"POST",body:{productId:o.id,payMethod:"points"},timeoutMs:3e4});return y.ok?(s(typeof y.data?.key=="string"&&y.data.key?y.data.key:null),e.onRedeemed(),{success:{key:"store.redeemed"}}):y.status===0?(c(!0),{error:{key:"store.uncertain"}}):Ee(y)}),m=u?t("store.soldOut"):p?t("err.insufficientPoints"):typeof o.availableKeys=="number"?t("store.left",{n:o.availableKeys}):t("store.toBackpack");return r(xc,{icon:o.type==="api_quota_key"?"key":"gift",emoji:o.icon,kind:t(eg[o.type||""]??"store.kind.item"),name:o.name||"",desc:o.description,meta:m,below:r(F,{children:[r(ce,{a}),i&&r("div",{class:"fx-shop-key",children:[r("code",{children:i}),r(qt,{text:i,label:t("backpack.copyKey")})]})]}),children:[d>0&&r(rn,{variant:"primary",pending:a.pending,disabled:u||p||l,label:t("store.redeem",{n:ze(d,n)}),confirmLabel:t("store.redeemConfirm",{n:ze(d,n)}),onConfirm:g}),e.payment&&f>0&&r(ri,{label:Ja(f,o.currency,n),pending:e.paying,disabled:e.payBusy||u,onClick:e.onPay})]})}function kc(){let{t:e,goTo:t}=ee(),n=Re(()=>Ya("/shop/products",d=>Za(d))),o=Qa(n.state==="ready"?n.reload:null),a=ni(o);if(n.state==="loading")return r(Ae,{panels:2,rows:2});if(n.state==="signedOut")return r(De,{});if(n.state==="error")return r(Oe,{error:n.error,onRetry:n.retry});let{status:i,list:s}=n.data,l=i.features.payment!==!1,c=i.features.shop!==!1;return r(F,{children:[r(ei,{status:i,onRetry:n.reload,children:t&&r(G,{onClick:()=>t("backpack"),children:e("store.openBackpack")})}),r(ti,{title:e("store.redeemTitle"),desc:e("store.redeemHint"),children:[!c||s.length===0?r(oi,{children:e(c?"store.noItems":"store.itemsOff")}):r("div",{class:"fx-shop-grid",children:s.map(d=>r(tg,{p:d,balance:i.balance,payment:l,paying:a.payingId===d.id,payBusy:a.a.pending,onPay:()=>a.open(d.id,"storefront"),onRedeemed:n.reload},d.id))}),r(ce,{a:a.a})]})]})}var ng="forsion-extend",wc=[{id:"account",titleKey:"page.account",tabTitleKey:"page.profile",aliases:["profile"],keywords:"\u4E2A\u4EBA\u4E3B\u9875 profile avatar nickname \u5934\u50CF \u6635\u79F0",Component:jl},{id:"account-details",parent:"account",titleKey:"account.details.title",keywords:"\u767B\u5F55 \u8D44\u6599 \u624B\u673A \u90AE\u7BB1 \u5207\u6362 \u9000\u51FA login sign-in email phone account switch logout",Component:_l},{id:"security",parent:"account",titleKey:"page.security",keywords:"\u5B89\u5168 \u5BC6\u7801 \u8BBE\u5907 \u7ED1\u5B9A security password devices",Component:tc},{id:"quota",titleKey:"page.membershipUsage",tabTitleKey:"page.membershipQuota",aliases:["membership"],keywords:"\u4F1A\u5458 \u989D\u5EA6 \u540E\u53F0 quota membership background",Component:Kl},{id:"points",parent:"quota",titleKey:"page.pointsInvite",keywords:"\u79EF\u5206 \u9080\u8BF7 \u5151\u6362 \u5145\u503C points invite redeem credits",Component:Xl},{id:"usage",parent:"quota",titleKey:"page.usage",keywords:"\u7528\u91CF \u8BB0\u5F55 \u6D88\u8017 usage history tokens",Component:ic},{id:"backpack",titleKey:"page.backpack",keywords:"\u80CC\u5305 \u5361\u5238 backpack inventory",Component:Yl},{id:"submission",titleKey:"page.submission",Component:dc},{id:"feedback",titleKey:"page.helpDiagnostics",tabTitleKey:"page.feedback",webTitleKey:"page.feedback",keywords:"\u5E2E\u52A9 \u53CD\u9988 help feedback",Component:mc},{id:"diagnostics",parent:"feedback",titleKey:"diag.title",keywords:"\u8BCA\u65AD \u4E0A\u4F20 \u65E5\u5FD7 diagnostic upload logs",Component:uc,desktopOnly:!0}],zc=[{id:"membership",titleKey:"store.membership",descKey:"store.membership.desc",icon:"crown",Component:vc},{id:"points",titleKey:"store.points",descKey:"store.points.desc",icon:"coins",Component:yc},{id:"items",titleKey:"store.items",descKey:"store.items.desc",icon:"package",Component:kc}],rg=e=>`forsion/fx:${ng}:${e}`;function _c(e){let{ctx:t,page:n}=e,[o,a]=M(()=>Qe(t.getLocale?.()));Q(()=>{a(Qe(t.getLocale?.()));let l=t.subscribeLocale?.(c=>a(Qe(c)));return()=>{typeof l=="function"&&l()}},[t]);let i=At(()=>{let l=t.app?.openSettings;return{ctx:t,locale:o,t:ho(o),goTo:typeof l=="function"?c=>l.call(t.app,rg(c)):null}},[t,o]),s=n.Component;return r(Ea.Provider,{value:i,children:r("div",{class:"fx-acct","data-fx-page":n.id,lang:o==="zh"?"zh-CN":"en",children:[r("style",{children:Ys}),r(s,{})]})})}function Sc(e,t=window){let n=en(t?.tangu);if(!e||!n?.cloudFetch||!n.cloudInvoke||!Ln(n)||typeof e.registerStoreView!="function")return 0;let o=a=>()=>Te(Qe(e.getLocale?.()),a);for(let a of zc)e.registerStoreView({id:a.id,title:o(a.titleKey),description:o(a.descKey),group:o("store.group"),icon:a.icon,mount(i){return Be(r(_c,{ctx:e,page:a}),i),()=>{Be(null,i)}}});return zc.length}function Cc(e,t=window){let n=en(t?.tangu);if(!e||!n?.cloudFetch||!n.cloudInvoke||!Ln(n)||typeof e.registerSettingsView!="function")return 0;let o=n.unitPublicEntry?wc.filter(a=>!a.desktopOnly):wc;for(let a of o)e.registerSettingsView({id:a.id,category:"forsion",parent:a.parent,tabTitle:a.tabTitleKey?()=>Te(Qe(e.getLocale?.()),a.tabTitleKey):void 0,aliases:a.aliases,keywords:a.keywords,title:()=>Te(Qe(e.getLocale?.()),n.unitPublicEntry&&a.webTitleKey||a.titleKey),mount(i){return Be(r(_c,{ctx:e,page:a}),i),()=>{Be(null,i)}}});return o.length}var nr=[{id:"lv1"},{id:"lv2"},{id:"lv3"},{id:"lv4"},{id:"new",version:"2.14"}],q=(e,t)=>({zh:e,en:t}),vn=[{id:"welcome",level:"lv1",icon:"compass",title:q("\u8BA4\u8BC6 Forsion","Meet Forsion"),tasks:[{id:"guide-open",event:"own:guide.open",goal:1,title:q("\u6253\u5F00\u4F7F\u7528\u6307\u5357","Open the guide")},{id:"space-switch",event:"space.switch",goal:1,title:q("\u5728 Ribbon \u4E0A\u6362\u4E00\u4E2A Space","Switch to another Space from the ribbon"),go:{space:"amadeus"},spot:{anchor:"ribbon-spaces",here:!0,title:q("\u70B9 Ribbon \u4E0A\u4EFB\u610F\u4E00\u4E2A\u56FE\u6807","Click any icon on the ribbon"),body:q("\u6BCF\u4E2A\u56FE\u6807\u662F\u4E00\u4E2A Space\uFF0C\u70B9\u4E00\u4E0B\u5C31\u5207\u8FC7\u53BB\u3002","Each icon is a Space. One click switches to it.")}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon",label:q("Ribbon\uFF1A\u6BCF\u4E2A\u56FE\u6807\u662F\u4E00\u4E2A Space","Ribbon: each icon is a Space")},{slot:"main-tabs",label:q("\u4E3B\u533A\u7684\u6807\u7B7E\u9875","Tabs in the main area"),text:q("\u6807\u7B7E\u9875","Tab")},{slot:["left-list","right"],label:q("\u5DE6\u53F3\u4FA7\u680F","Left and right sidebars")}]}},{id:"chat",level:"lv1",icon:"message-circle",title:q("\u548C Tangu \u8BF4\u7B2C\u4E00\u53E5\u8BDD","Say hello to Tangu"),tasks:[{id:"chat-first",event:"chat.send",goal:1,title:q("\u53D1\u51FA\u7B2C\u4E00\u6761\u6D88\u606F","Send your first message"),go:{space:"tangu",command:"new-chat"},spot:{anchor:"chat-composer",title:q("\u5728\u8FD9\u91CC\u6253\u4E2A\u62DB\u547C","Say hello here"),body:q("\u6253\u5B57\uFF0C\u6309 Enter \u53D1\u9001\uFF1BShift+Enter \u6362\u884C\u3002","Type, then press Enter to send. Shift+Enter starts a new line.")}},{id:"chat-five",event:"chat.send",goal:5,title:q("\u518D\u804A\u51E0\u53E5\uFF08\u7D2F\u8BA1 5 \u6761\uFF09","Keep talking (5 messages in all)"),go:{space:"tangu"},spot:{anchor:"chat-composer",title:q("\u63A5\u7740\u804A\u51E0\u53E5","Keep the conversation going"),body:q("\u7D2F\u8BA1\u53D1\u51FA 5 \u6761\u5C31\u7B97\u5B8C\u6210\u3002","Five messages in all and this one is done.")}}],figure:{layout:"space",main:"chat",marks:[{slot:"left-top",label:q("\u5DE6\u680F\u9876\u90E8\u300C\u65B0\u4F1A\u8BDD\u300D",'"New chat" at the top of the left sidebar'),text:q("\u65B0\u4F1A\u8BDD","New chat")},{slot:"main-bottom",label:q("\u8F93\u5165\u6846","Message box")}]}},{id:"note",level:"lv1",icon:"file-text",title:q("\u5199\u4E0B\u7B2C\u4E00\u7BC7\u7B14\u8BB0","Write your first note"),tasks:[{id:"note-create",event:"note.create",goal:1,title:q("\u65B0\u5EFA\u4E00\u7BC7\u7B14\u8BB0","Create a note"),go:{space:"amadeus",command:"amadeus-new-note"},spot:{anchor:"note-new",title:q("\u70B9\u300C\u65B0\u5EFA\u7B14\u8BB0\u300D",'Click "New note"'),body:q("\u4E5F\u53EF\u4EE5\u6309 \u2318/Ctrl+N\u3002\u6BCF\u7BC7\u7B14\u8BB0\u90FD\u662F\u667A\u5E93\u91CC\u7684\u4E00\u4E2A .md \u6587\u4EF6\u3002","Or press \u2318/Ctrl+N. Every note is a .md file in your vault.")}},{id:"note-link",event:"note.wikilink",goal:1,title:q("\u7528 [[ \u94FE\u63A5\u53E6\u4E00\u7BC7\u7B14\u8BB0","Link another note with [["),go:{space:"amadeus"},spot:{anchor:"note-body",title:q("\u5728\u6B63\u6587\u91CC\u8F93\u5165 [[","Type [[ in the note"),body:q("\u4ECE\u5F39\u51FA\u7684\u5019\u9009\u91CC\u9009\u4E00\u7BC7\u7B14\u8BB0\uFF0C\u6309 Enter\uFF0C\u4E24\u7BC7\u5C31\u8FDE\u4E0A\u4E86\u3002","Pick a note from the suggestions and press Enter to link the two.")}},{id:"note-canvas",event:"note.canvas",goal:1,title:q("\u628A\u7B14\u8BB0\u5207\u5230\u753B\u5E03","Switch a note to the canvas"),go:{space:"amadeus",command:"amadeus-toggle-canvas"},spot:{anchor:"note-canvas",title:q("\u70B9\u300C\u753B\u5E03\u300D",'Click "Canvas"'),body:q("\u540C\u4E00\u7BC7\u7B14\u8BB0\u644A\u6210\u767D\u677F\uFF0C\u968F\u624B\u6446\uFF1B\u70B9\u300C\u6587\u6863\u300D\u5207\u56DE\u6765\uFF0C\u4E00\u4E2A\u5B57\u90FD\u4E0D\u53D8\u3002",'The same note opens as a whiteboard. Click "Document" to switch back; nothing changes.')}}],figure:{layout:"space",main:"doc",marks:[{slot:"left-top",label:q("\u5DE6\u680F\u300C\u65B0\u5EFA\u7B14\u8BB0\u300D",'"New note" in the left sidebar'),text:q("\u65B0\u5EFA\u7B14\u8BB0","New note")},{slot:"main-top",label:q("\u300C\u6587\u6863 / \u753B\u5E03\u300D\u80F6\u56CA","The Document / Canvas switch")},{slot:"right",label:q("\u53F3\u680F\u91CC\u7684\u300C\u53CD\u94FE\u300D","Backlinks in the right sidebar"),text:q("\u53CD\u94FE","Backlinks")}]}},{id:"theme",level:"lv1",icon:"sparkles",title:q("\u6362\u4E00\u8EAB\u4E3B\u9898","Make it look like yours"),tasks:[{id:"theme-change",event:"theme.change",goal:1,title:q("\u6362\u4E00\u4E2A\u4E3B\u9898","Pick another theme"),go:{settings:"theme"}}],figure:{layout:"settings",marks:[{slot:"nav",label:q("\u8BBE\u7F6E\u91CC\u7684\u300C\u5916\u89C2\u300D",'"Appearance" in Settings'),text:q("\u5916\u89C2","Appearance")},{slot:"section-1",label:q("\u8BBE\u8BA1\u8BED\u8A00","Design language"),text:q("\u8BBE\u8BA1\u8BED\u8A00","Design language")},{slot:"section-2",label:q("\u4E3B\u9898\u8272\u548C\u80CC\u666F\u8272","Theme and background colors"),text:q("\u914D\u8272","Colors")}]}},{id:"database",level:"lv2",icon:"database",title:q("\u6570\u636E\u5E93\uFF1A\u628A\u7B14\u8BB0\u53D8\u6210\u8868","Databases: turn notes into a table"),tasks:[{id:"base-create",event:"base.create",goal:1,title:q("\u65B0\u5EFA\u4E00\u4E2A\u6570\u636E\u5E93","Create a database"),go:{space:"amadeus"}}],figure:{layout:"space",main:"doc",marks:[{slot:"left-list",label:q("\u7B14\u8BB0\u6811\uFF1A\u53F3\u952E \u2192\u300C\u65B0\u5EFA Base\u300D",'Note tree: right-click \u2192 "New Base"')},{slot:"main-body",label:q("\u6B63\u6587\u91CC\u8F93\u5165 /\uFF0C\u9009\u300C\u591A\u7EF4\u8868\u300D",'Type / in a note and pick "Database"')}]}},{id:"market",level:"lv2",icon:"store",title:q("\u4ECE\u5546\u5E97\u88C5\u4E00\u4E2A\u63D2\u4EF6","Install a plugin from the store"),tasks:[{id:"market-install",event:"market.install",goal:1,title:q("\u88C5\u4E00\u4E2A\u63D2\u4EF6","Install a plugin"),go:{command:"open-market"}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon-bottom",label:q("Ribbon \u5E95\u90E8\u7684\u300C\u5546\u5E97\u300D",'"Store" at the bottom of the ribbon')}]}},{id:"space",level:"lv2",icon:"layout-grid",title:q("\u5B58\u4E0B\u81EA\u5DF1\u7684 Space","Save a Space of your own"),tasks:[{id:"space-save",event:"space.save",goal:1,title:q("\u628A\u5F53\u524D\u5E03\u5C40\u5B58\u6210 Space","Save the current layout as a Space"),go:{command:"save-as-space"}}],figure:{layout:"space",main:"doc",marks:[{slot:"ribbon-plus",label:q("Space \u533A\u7684 \uFF0B","The + under the Spaces")},{slot:"main-top-right",label:q("\u53F3\u4E0A\u89D2\u7684\u6D6E\u52A8\u6309\u94AE","Floating buttons at the top right")}]}},{id:"calendar",level:"lv2",icon:"calendar-days",title:q("\u65E5\u5386\u548C\u5F85\u529E","Calendar and to-dos"),tasks:[{id:"calendar-event",event:"calendar.event",goal:1,title:q("\u5728\u65E5\u5386\u4E0A\u5EFA\u4E00\u4E2A\u65E5\u7A0B","Add an event to the calendar"),go:{space:"calendar"}},{id:"todo-done",event:"todo.done",goal:1,title:q("\u52FE\u6389\u4E00\u6761\u5F85\u529E","Tick off a to-do"),go:{space:"calendar"}}],figure:{layout:"space",main:"grid",marks:[{slot:"left-plus",label:q("\u5DE6\u680F\u300C\u65E5\u5386\u300D\u65C1\u7684 +",'The + next to "Calendars" in the left sidebar')},{slot:"main-body",label:q("\u65F6\u95F4\u683C\uFF1A\u5355\u51FB\u5EFA\u65E5\u7A0B","Time grid: click to add an event")},{slot:"right",label:q("\u53F3\u680F\u7684\u5F85\u529E","To-dos in the right sidebar"),text:q("\u5F85\u529E","To-dos")}]}},{id:"agent",level:"lv3",icon:"bot",title:q("\u521B\u5EFA\u4F60\u7684 Agent","Create your own agent"),tasks:[{id:"agent-create",event:"agent.create",goal:1,title:q("\u65B0\u5EFA\u4E00\u4E2A Agent","Create an agent"),go:{space:"agents"},spot:{anchor:"agent-new",title:q("\u70B9\u300C\u521B\u5EFA Agent\u300D",'Click "Create agent"'),body:q("\u8D77\u4E2A\u540D\u5B57\uFF0C\u5199\u51E0\u53E5\u5B83\u8BE5\u600E\u4E48\u505A\u4E8B\u3002","Give it a name and a few lines on how it should work.")}}]},{id:"muse",level:"lv3",icon:"sparkles",title:q("Muse\uFF1A\u8BA9\u7075\u611F\u81EA\u5DF1\u957F","Muse: ideas that grow on their own"),tasks:[{id:"muse-open",event:"muse.open",goal:1,title:q("\u53BB Muse \u770B\u4E00\u773C","Take a look at Muse"),go:{space:"muse"}}]},{id:"automation",level:"lv3",icon:"zap",title:q("\u81EA\u52A8\u5316\uFF1A\u5230\u70B9\u5C31\u505A","Automations: done on schedule"),tasks:[{id:"automation-create",event:"automation.create",goal:1,title:q("\u5EFA\u4E00\u6761\u81EA\u52A8\u5316","Create an automation"),go:{space:"automation"}}]},{id:"computer",level:"lv4",icon:"terminal",title:q("\u8BA9 Tangu \u64CD\u4F5C\u7535\u8111","Let Tangu use your computer"),tasks:[{id:"cu-use",event:"computer.use",goal:1,title:q("\u8BA9 Tangu \u7528\u4E00\u6B21\u7535\u8111","Have Tangu use your computer once"),go:{settings:"computer-use"},desktopOnly:!0}]},{id:"plugin",level:"lv4",icon:"code",title:q("\u5199\u4E00\u4E2A\u81EA\u5DF1\u7684\u63D2\u4EF6","Write a plugin of your own"),tasks:[{id:"plugin-dev",event:"plugin.local",goal:1,title:q("\u4ECE\u672C\u673A\u6587\u4EF6\u5939\u8F7D\u5165\u4E00\u4E2A\u63D2\u4EF6","Load a plugin from a local folder"),go:{settings:"amadeus-plugins"},desktopOnly:!0}]},{id:"mini-capsules",level:"new",icon:"layout-grid",title:q("Mini \u9876\u680F\u4E24\u9897\u80F6\u56CA","Two capsules on the Mini bar"),tasks:[{id:"mini-open",event:"mini.open",goal:1,title:q("\u6253\u5F00\u4E00\u6B21 Mini \u7A97\u53E3","Open the Mini window"),go:{command:"open-mini"},desktopOnly:!0}]},{id:"todo-standalone",level:"new",icon:"list-tree",title:q("\u5F85\u529E\u89C6\u56FE\u5355\u72EC\u6253\u5F00","Open the to-do view on its own"),tasks:[{id:"todo-open",event:"todo.open",goal:1,title:q("\u5355\u72EC\u6253\u5F00\u4E00\u6B21\u5F85\u529E\u89C6\u56FE","Open the to-do view by itself"),go:{space:"calendar"}}]}],Rt=e=>vn.filter(t=>t.level===e),yn=e=>vn.find(t=>t.id===e);var ut=nr.filter(e=>!e.version);function Ht(e,t){let n=e.event.startsWith("own:");return t.count(n?e.event.slice(4):e.event,n)>=e.goal}var Nr=(e,t)=>e.filter(n=>t.desktop||!n.desktopOnly);function Tc(e,t){return Rt(e).every(n=>Nr(n.tasks,t).every(o=>Ht(o,t)))}function Ao(e,t){let n=ut.findIndex(o=>o.id===e);return n<=0||t.unlockAll?!0:ut.slice(0,n).every(o=>Tc(o.id,t))}function rr(e,t){return Ao(e.level,t)?Nr(e.tasks,t).every(n=>Ht(n,t))?"done":"active":"locked"}function ai(e){return ut.find(t=>!Tc(t.id,e))?.id??null}function Ac(e){let t={...e,unlockAll:!1},n=ut[0].id;for(let o of ut)Ao(o.id,t)&&(n=o.id);return n}function og(e,t){let n=e.split(/[.+-]/).map(a=>Number.parseInt(a,10)||0),o=t.split(/[.+-]/).map(a=>Number.parseInt(a,10)||0);for(let a=0;a<Math.max(n.length,o.length);a++){let i=(n[a]??0)-(o[a]??0);if(i)return i<0?-1:1}return 0}function ii(e){let t=nr.find(n=>n.version);return t?.version&&e.appVersion&&og(e.appVersion,t.version)>=0?t.version:null}var Ec=e=>vn.filter(t=>t.level!=="new"||!!ii(e));function Pc(e,t){let n=Nr(Rt(e).flatMap(o=>o.tasks),t);return{done:n.filter(o=>Ht(o,t)).length,total:n.length}}var si={zh:{agent:`\u9664\u4E86\u9ED8\u8BA4\u7684 Tangu\uFF0C\u4F60\u53EF\u4EE5\u6309\u7528\u9014\u5EFA\u81EA\u5DF1\u7684 Agent\uFF1A\u7ED9\u5B83\u540D\u5B57\u3001\u5DE5\u4F5C\u6307\u4EE4\u548C\u81EA\u5DF1\u7684\u8BB0\u5FC6\uFF0C\u8BA9\u5B83\u4E13\u95E8\u505A\u4E00\u7C7B\u4E8B\u3002
|
|
619
619
|
|
|
620
620
|
## \u521B\u5EFA
|
|
621
621
|
|
|
@@ -1025,12 +1025,12 @@ In the Calendar's right panel or the Mini window, the filters and the list choic
|
|
|
1025
1025
|
- Things you have already done count right away, and progress is kept on this device. Been around a while? Unlock everything from the \xB7\xB7\xB7 menu at the top right.
|
|
1026
1026
|
|
|
1027
1027
|
> [!tip]
|
|
1028
|
-
> Can't find something? Press \`\u2318/Ctrl+K\` to open the command palette and search for it by name.`}};var
|
|
1029
|
-
`),
|
|
1028
|
+
> Can't find something? Press \`\u2318/Ctrl+K\` to open the command palette and search for it by name.`}};var Mc="forsion-guide",Lt={reader:"guide",side:"guide-side",companion:"guide-companion"},li="guide-chapters",Ic=e=>`forsion-extend.guide.${e}`;function je(e,t){try{let n=localStorage.getItem(Ic(e));return n===null?t:JSON.parse(n)}catch{return t}}function Je(e,t){try{localStorage.setItem(Ic(e),JSON.stringify(t))}catch{}}function Rc(e,t){let n=new Set,o=je("unlockAll",!1),a=null,i=je("chapter","welcome"),s=je("companion","welcome"),l=null,c=null,d=!1,f,u=[],p=()=>Qe(e.getLocale?.()),g=(b,C)=>Te(p(),b,C),m=(b,C)=>e.achievements?.count?.(b,C?{own:!0}:void 0)??0,y=()=>({count:m,unlockAll:o,desktop:t.desktop,appVersion:a}),_=b=>b.title[p()]||b.title.zh,E=b=>b==="new"?g("guide.whatsNew",{version:nr.find(C=>C.version)?.version??""}):g(`guide.level.${b}`),x=()=>{for(let b of[...n])try{b()}catch(C){console.error("[guide] listener failed",C)}},k=()=>{let b=y(),C=new Set(vn.flatMap(ie=>ie.tasks.filter(pe=>Ht(pe,b)).map(pe=>pe.id)));if(l)for(let ie of vn)for(let pe of ie.tasks)C.has(pe.id)&&!l.has(pe.id)&&e.app?.notify?.(g("guide.toast.taskDone",{task:_(pe)}));l=C,j(b);let L=Ac(b),K=je("reached",null);K===null?Je("reached",L):ut.findIndex(ie=>ie.id===L)>ut.findIndex(ie=>ie.id===K)&&(Je("reached",L),Je("justUnlocked",L),A({kind:"level",level:L})),je("pendingLetter",null)&&P()},R=b=>!!b.spot&&!!e.app?.spotlight&&je("spotlight",!0)&&(t.desktop||!b.desktopOnly),B=(b,C,L)=>{let K=b.spot;c={chapter:C.id,task:b.id},x();let ie=C.tasks.length>1?g("guide.spotStep",{n:C.tasks.indexOf(b)+1,total:C.tasks.length}):void 0;e.app.spotlight({anchor:K.anchor,title:_(K),body:K.body[p()]||K.body.zh,step:ie}).then(async pe=>{d||(c?.task===b.id&&pe!=="replaced"&&(c=null,x()),pe==="mute"&&V.setSpotlight(!1),pe==="missing"&&L&&(K.here&&b.go?.space&&await e.app?.openSpace?.(b.go.space),b.go?.command&&e.app?.runCommand?.(b.go.command)))})},j=b=>{let C=c&&yn(c.chapter),L=C&&C.tasks.find(ie=>ie.id===c.task);if(!C||!L||!Ht(L,b))return;let K=C.tasks.find(ie=>!Ht(ie,b)&&R(ie)&&!ie.spot.here&&(ie.go?.space??"")===(L.go?.space??""));K?B(K,C,!1):(c=null,e.app?.spotlight?.(null))},w=Promise.resolve(),A=b=>{!e.inbox||!je("reminders",!0)||(Je("pendingLetter",b),P())},P=()=>{w=w.then(I,I)},I=async()=>{let b=je("pendingLetter",null);if(d||!b||!e.inbox)return;let C=b.kind==="level"?Rt(b.level):Rt("new"),L=C.map(He=>`- ${_(He)}`).join(`
|
|
1029
|
+
`),K=b.kind==="level"?{title:g("guide.letter.levelTitle",{level:E(b.level)}),body:`${g("guide.letter.levelBody")}
|
|
1030
1030
|
|
|
1031
|
-
${
|
|
1031
|
+
${L}`}:{title:g("guide.letter.versionTitle",{version:b.version,n:C.length}),body:`${g("guide.letter.versionBody")}
|
|
1032
1032
|
|
|
1033
|
-
${
|
|
1033
|
+
${L}`},ie=await e.inbox.post(K);if(!ie||d)return;let pe=je("lastLetter",null);Je("lastLetter",ie),Je("letters",{...je("letters",{}),[ie]:b}),JSON.stringify(je("pendingLetter",null))===JSON.stringify(b)&&Je("pendingLetter",null),pe&&pe!==ie&&await e.inbox.archive(pe)},N=()=>{let b=ii(y());if(!b||je("seenVersion",null)===b)return;if(!(je("seenVersion",null)!==null||m("chat.send",!1)+m("note.create",!1)>0)){Je("seenVersion",b);return}let L=Date.now(),K=()=>{if(!d){if(document.querySelector(".ob-rail")&&Date.now()-L<6e5){f=window.setTimeout(K,3e3);return}Je("seenVersion",b),A({kind:"version",version:b})}};f=window.setTimeout(K,3e3)},V={ctx:e,locale:p,t:g,env:y,title:_,levelName:E,subscribe(b){return n.add(b),()=>{n.delete(b)}},selected:()=>yn(i)??vn[0],select(b){!yn(b)||b===i||(i=b,Je("chapter",b),yn(b).level===je("justUnlocked",null)&&Je("justUnlocked",null),x())},companionChapter:()=>yn(s)??V.selected(),async go(b,C){let L=b.go;if(!L||b.desktopOnly&&!t.desktop)return;s=C.id,Je("companion",C.id);let K=R(b);c&&(c=null,K||e.app?.spotlight?.(null)),L.space&&!(K&&b.spot.here)&&await e.app?.openSpace?.(L.space)&&L.space!==Mc&&e.openView?.(Lt.companion,{location:"right"}),K?B(b,C,!0):L.command&&e.app?.runCommand?.(L.command),L.settings&&e.app?.openSettings?.(L.settings),x()},markdown(b){let C=si[p()]?.[b.id]||si.zh[b.id]||"",L=C.search(/\n\s*\n/);return L<0?{intro:C.trim(),body:""}:{intro:C.slice(0,L).trim(),body:C.slice(L).trim()}},justUnlocked:()=>je("justUnlocked",null),setUnlockAll(b){o=b,Je("unlockAll",b),x()},reminders:()=>je("reminders",!0),setReminders(b){Je("reminders",b),x()},spotlightOn:()=>!!e.app?.spotlight&&je("spotlight",!0),setSpotlight(b){Je("spotlight",b),!b&&c&&(c=null,e.app?.spotlight?.(null)),x()},spotTask:()=>c?.task??null,letter:b=>je("letters",{})[b]??null,async openGuide(b){b&&V.select(b),Je("justUnlocked",null),await e.app?.openSpace?.(Mc),x()},dispose(){c&&e.app?.spotlight?.(null),d=!0,window.clearTimeout(f);for(let b of u.splice(0))b();n.clear()}},X=e.achievements?.subscribe?.(()=>{k(),x()});X&&u.push(X);let oe=e.subscribeLocale?.(()=>x());return typeof oe=="function"&&u.push(oe),k(),t.appVersion.then(b=>{d||(a=b,N(),x())}),V}function Eo(e){let t=Ec(e.env());return nr.map(n=>({level:n.id,chapters:t.filter(o=>o.level===n.id)})).filter(n=>n.chapters.length)}function Lc(e,t){switch(e){case"ribbon":return{x:5,y:10,w:28,h:168};case"ribbon-plus":return{x:5,y:180,w:28,h:26};case"ribbon-bottom":return{x:5,y:208,w:28,h:26};case"left-top":return{x:48,y:14,w:128,h:28};case"left-plus":return{x:180,y:16,w:22,h:24};case"left-list":return{x:48,y:54,w:154,h:122};case"main-tabs":return{x:224,y:14,w:96,h:22};case"main-top":return{x:226,y:44,w:104,h:24};case"main-top-right":return{x:498,y:44,w:60,h:24};case"main-body":return t.main==="grid"?{x:232,y:78,w:328,h:170}:{x:244,y:80,w:304,h:112};case"main-bottom":return{x:236,y:208,w:312,h:42};case"right":return{x:588,y:16,w:116,h:76};case"nav":return{x:14,y:92,w:172,h:28};case"section-1":return{x:224,y:60,w:476,h:86};case"section-2":return{x:224,y:160,w:476,h:90}}}var Se=e=>({style:e}),qe=(e,t,n,o=7)=>r("rect",{x:e,y:t,width:n,height:o,rx:o/2,...Se("fill:var(--overlay-medium)")}),or=(e,t,n=12,o=!1)=>r("rect",{x:e,y:t,width:n,height:n,rx:3,...Se(o?"fill:var(--text-muted)":"fill:var(--overlay-strong)")}),ar=(e,t,n,o="")=>r("text",{x:e,y:t,...Se(`fill:var(--text);font:500 12px var(--font-ui);${o}`),children:n});function Dc({g:e,figure:t}){let n=e.locale(),o=new Map;for(let u of t.marks)if(u.text)for(let p of[].concat(u.slot))o.set(p,u.text[n]||u.text.zh);let a=new Set(t.marks.flatMap(u=>[].concat(u.slot))),i=t.marks.flatMap(u=>[].concat(u.slot).map(p=>Lc(p,t))),s=t.marks.map((u,p)=>{let g=Lc([].concat(u.slot)[0],t);return{n:p+1,x:Math.min(g.x+g.w+4,712),y:Math.max(g.y-4,12)}}),l=t.marks.map(u=>u.label[n]||u.label.zh),c=()=>r(F,{children:[[16,44,72,100,128,156].map((u,p)=>r("g",{children:or(11,u,16,p===2)},u)),r("path",{d:"M19 186v14M12 193h14",...Se("stroke:var(--text-faint);stroke-width:2;stroke-linecap:round")}),or(11,213,16,a.has("ribbon-bottom")),or(11,240,16),r("rect",{x:38,y:1,width:1,height:266,...Se("fill:var(--border)")}),or(56,22,12,a.has("left-top")),o.has("left-top")?ar(76,32,o.get("left-top")):qe(76,25,70),a.has("left-plus")&&r("path",{d:"M191 21v14M184 28h14",...Se("stroke:var(--text-muted);stroke-width:2;stroke-linecap:round")}),[62,86,110,134,158].map((u,p)=>r("g",{children:[or(58,u,10),qe(76,u+1.5,[74,56,88,48,66][p])]},u)),o.has("right")?ar(598,38,o.get("right")):qe(598,30,52),qe(598,52,84),qe(598,68,62),qe(598,116,92),qe(598,132,70)]}),d=()=>r(F,{children:[r("rect",{x:228,y:16,width:88,height:18,rx:6,...Se("fill:var(--bg-card)")}),o.has("main-tabs")?ar(240,29,o.get("main-tabs"),"font-size:11px"):qe(238,22,52,6),r("rect",{x:230,y:47,width:48,height:18,rx:9,...Se("fill:var(--bg-card)")}),qe(242,53,24,6),qe(290,53,26,6),[506,524,542].map(u=>r("rect",{x:u,y:50,width:12,height:12,rx:3,...Se("fill:var(--overlay-strong)")},u)),t.main==="grid"?r(F,{children:[[0,1,2,3,4,5,6].map(u=>r("g",{children:qe(244+u*46,86,22,6)},u)),[104,140,176,212].map(u=>r("rect",{x:238,y:u,width:316,height:1,...Se("fill:var(--border)")},u)),[1,2,3,4,5,6].map(u=>r("rect",{x:238+u*45,y:98,width:1,height:146,...Se("fill:var(--border)")},u)),r("rect",{x:286,y:146,width:40,height:24,rx:4,...Se("fill:var(--overlay-medium)")}),r("rect",{x:376,y:182,width:40,height:18,rx:4,...Se("fill:var(--overlay-medium)")})]}):t.main==="chat"?r(F,{children:[r("rect",{x:412,y:84,width:132,height:26,rx:10,...Se("fill:var(--overlay-light)")}),qe(252,128,260),qe(252,144,230),qe(252,160,150),r("rect",{x:240,y:212,width:304,height:34,rx:10,...Se("fill:var(--bg-card);stroke:var(--border)")}),qe(254,226,120),r("circle",{cx:528,cy:229,r:8,...Se("fill:var(--overlay-strong)")})]}):r(F,{children:[r("rect",{x:252,y:86,width:120,height:12,rx:4,...Se("fill:var(--overlay-strong)")}),[110,126,142,166,182,206,222].map((u,p)=>r("g",{children:qe(252,u,[292,270,200,286,240,280,150][p])},u))]})]}),f=()=>r(F,{children:[[36,64,92,120,148,176].map((u,p)=>r("g",{children:[or(24,u+8,12,p===2&&a.has("nav")),p===2&&o.has("nav")?ar(44,u+18,o.get("nav")):qe(44,u+11,[64,52,58,70,46,60][p])]},u)),r("rect",{x:232,y:28,width:110,height:12,rx:4,...Se("fill:var(--overlay-strong)")}),o.has("section-1")?ar(234,82,o.get("section-1")):qe(234,74,70),[0,1,2].map(u=>r("rect",{x:234+u*150,y:94,width:136,height:42,rx:8,...Se(u===0?"fill:var(--bg-card);stroke:var(--accent)":"fill:var(--bg-card);stroke:var(--border)")},u)),o.has("section-2")?ar(234,182,o.get("section-2")):qe(234,174,70),[0,1,2,3,4,5,6].map(u=>r("circle",{cx:246+u*30,cy:210,r:10,...Se(u===0?"fill:var(--accent)":"fill:var(--overlay-strong)")},u)),[0,1,2,3,4,5,6].map(u=>r("circle",{cx:246+u*30,cy:236,r:8,...Se("fill:var(--overlay-medium)")},`b${u}`))]});return r("figure",{class:"fxg-figure",children:[r("svg",{class:"fxg-figure-svg",viewBox:"0 0 724 268",role:"img","aria-label":`${e.t("guide.figure")}: ${l.map((u,p)=>`${p+1} ${u}`).join("; ")}`,children:[r("rect",{x:.5,y:.5,width:723,height:267,rx:10,...Se("fill:var(--sidebar-bg, var(--bg));stroke:var(--border)")}),t.layout==="settings"?r("rect",{x:200,y:1,width:523,height:266,...Se("fill:var(--bg)")}):r("rect",{x:216,y:8,width:352,height:252,rx:8,...Se("fill:var(--bg)")}),i.map((u,p)=>r("rect",{x:u.x-4,y:u.y-4,width:u.w+8,height:u.h+8,rx:7,...Se("fill:var(--accent-wash);stroke:var(--accent);stroke-width:2")},`r${p}`)),t.layout==="settings"?f():r(F,{children:[c(),d()]}),s.map(u=>r("g",{children:[r("circle",{cx:u.x,cy:u.y,r:10,...Se("fill:var(--accent)")}),r("text",{x:u.x,y:u.y+4,"text-anchor":"middle",...Se("fill:var(--on-accent);font:600 12px var(--font-ui)"),children:u.n})]},u.n))]}),r("figcaption",{class:"fxg-figure-cap",children:l.map((u,p)=>r("span",{children:[r("b",{children:p+1}),u]},p))})]})}var Nc=`
|
|
1034
1034
|
.fxg { color: var(--text); font-size: var(--ui-font-body); line-height: var(--ui-line-body); height: 100%; min-height: 0; display: flex; flex-direction: column; }
|
|
1035
1035
|
.fxg button { font: inherit; }
|
|
1036
1036
|
.fxg .fx-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
|
|
@@ -1097,16 +1097,16 @@ ${I}`},le=await e.inbox.post(Z);if(!le||d)return;let de=We("lastLetter",null);Je
|
|
|
1097
1097
|
.fxg-letter .fxg-letter-chapter { display: grid; gap: 4px; }
|
|
1098
1098
|
.fxg-letter .fxg-letter-title { padding: 0; border: 0; background: transparent; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
|
|
1099
1099
|
.fxg-letter > .btn { align-self: flex-start; }
|
|
1100
|
-
`;function
|
|
1100
|
+
`;function Po(e){let[,t]=M(0);Q(()=>{let n=e.subscribe(()=>t(o=>o+1));return t(o=>o+1),n},[e])}function Mo(e){return r("div",{class:`fxg fxg-${e.kind}`,lang:e.g.locale()==="zh"?"zh-CN":"en",children:[r("style",{children:Nc}),e.children]})}var Io=({on:e})=>r("span",{class:`fxg-check${e?" is-on":""}`,"aria-hidden":"true",children:e&&r("svg",{viewBox:"0 0 16 16",width:"10",height:"10",children:r("path",{d:"M3.5 8.5l3 3 6-7",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})});function $c({g:e,task:t,chapter:n}){let o=e.env(),a=Ht(t,o),i=!!t.desktopOnly&&!o.desktop;return r("li",{class:`fxg-task${a?" is-done":""}${!a&&e.spotTask()===t.id?" is-current":""}`,"data-task":t.id,children:[r(Io,{on:a}),r("span",{class:"fxg-task-title",children:e.title(t)}),a?r("span",{class:"fxg-task-state",children:e.t("guide.taskDone")}):i?r("span",{class:"fxg-task-state",children:e.t("guide.desktopOnly")}):t.go?r("button",{type:"button",class:"btn ghost sm fxg-go",onClick:()=>void e.go(t,n),children:e.t("guide.go")}):null]})}function ci({g:e,chapter:t}){return r("ul",{class:"fxg-tasks",children:t.tasks.map(n=>r($c,{g:e,task:n,chapter:t},n.id))})}function Oc({g:e,value:t,label:n}){let o=te(null),a=te(null);return Q(()=>{if(!(!o.current||!e.ctx.ui?.mountMarkdownEditor))return a.current=e.ctx.ui.mountMarkdownEditor(o.current,{value:t,label:n,readOnly:!0,modes:!1}),()=>{a.current?.dispose(),a.current=null}},[e]),Q(()=>{a.current?.update({value:t})},[t]),r("div",{class:"fxg-doc",ref:o})}function ig({g:e}){let[t,n]=M(!1),o=te(null);Q(()=>{if(!t)return;let s=c=>{o.current?.contains(c.target)||n(!1)},l=c=>{c.key==="Escape"&&n(!1)};return document.addEventListener("pointerdown",s,!0),document.addEventListener("keydown",l),()=>{document.removeEventListener("pointerdown",s,!0),document.removeEventListener("keydown",l)}},[t]);let a=e.env(),i=(s,l,c)=>r("button",{type:"button",role:c===void 0?"menuitem":"menuitemcheckbox","aria-checked":c,class:"fxg-menu-item",onClick:()=>{n(!1),l()},children:[r("span",{children:s}),c&&r(Io,{on:!0})]});return r("div",{class:"fxg-more",ref:o,children:[r("button",{type:"button",class:"fxg-icon-btn","aria-label":e.t("guide.more"),"aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(!t),children:"\xB7\xB7\xB7"}),t&&r("div",{class:"fxg-menu",role:"menu",children:[i(a.unlockAll?e.t("guide.relock"):e.t("guide.unlockAll"),()=>e.setUnlockAll(!a.unlockAll)),i(e.t("guide.reminders"),()=>e.setReminders(!e.reminders()),e.reminders()),e.ctx.app?.spotlight&&i(e.t("guide.spotlight"),()=>e.setSpotlight(!e.spotlightOn()),e.spotlightOn()),e.ctx.app?.runCommand&&i(e.t("guide.openAchievements"),()=>{e.ctx.app?.runCommand?.("open-achievements")})]})]})}function Bc({g:e}){Po(e),Q(()=>{e.ctx.achievements?.track("guide.open")},[e]);let t=e.selected(),n=e.env(),o=rr(t,n),{intro:a,body:i}=e.markdown(t),s=o!=="locked",l=ut[ut.findIndex(c=>c.id===t.level)-1];return r(Mo,{g:e,kind:"reader",children:[r("div",{class:"fxg-bar",children:[r("span",{class:"fx-tag fxg-ro",children:e.t("guide.readOnly")}),r(ig,{g:e})]}),r("div",{class:"fxg-scroll",children:r("div",{class:"fxg-col",children:[r(Oc,{g:e,value:`# ${e.title(t)}
|
|
1101
1101
|
|
|
1102
|
-
${a}`,label:e.title(t)}),s&&t.figure&&
|
|
1102
|
+
${a}`,label:e.title(t)}),s&&t.figure&&r(Dc,{g:e,figure:t.figure}),s&&i&&r(Oc,{g:e,value:i,label:e.title(t)}),o==="locked"&&l?r("div",{class:"fxg-lock","data-locked":!0,children:[r("div",{class:"fxg-lock-title",children:e.t("guide.locked.title")}),r("p",{children:e.t("guide.locked.body",{level:e.levelName(l.id)})}),r("p",{class:"fxg-muted",children:e.t("guide.locked.left")}),r("ul",{class:"fxg-tasks",children:Rt(l.id).flatMap(c=>Nr(c.tasks,n).filter(d=>!Ht(d,n)).map(d=>r($c,{g:e,task:d,chapter:c},d.id)))}),r("p",{class:"fxg-muted",children:e.t("guide.locked.hint")})]}):r("section",{class:"fxg-section","data-guide-tasks":!0,children:[r("h2",{children:e.t("guide.tasks")}),r(ci,{g:e,chapter:t})]})]})})]})}function sg({done:e,total:t}){return r("div",{class:"fxg-bar-track",role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,children:r("i",{style:{width:`${t?Math.round(e/t*100):0}%`}})})}function Fc({g:e,c:t}){let n=rr(t,e.env());return r("button",{type:"button",class:`fxg-line is-${n}${e.selected().id===t.id?" is-active":""}`,onClick:()=>{e.select(t.id),e.ctx.openView?.(Lt.reader)},children:[r(Io,{on:n==="done"}),r("span",{children:e.title(t)}),n==="locked"&&r("span",{class:"fxg-task-state",children:e.t("guide.lockedHint")})]})}function lg({g:e}){let t=e.env(),n=ai(t);if(!n)return r("div",{class:"fxg-pane",children:[r("div",{class:"fxg-h",children:e.t("guide.allDone")}),r("p",{class:"fxg-muted",children:e.t("guide.allDoneBody")}),r("div",{class:"fxg-sub",children:e.t("guide.review")}),Eo(e).map(({level:s,chapters:l})=>r("button",{type:"button",class:"fxg-line",onClick:()=>{e.select(l[0].id),e.ctx.openView?.(Lt.reader)},children:[r(Io,{on:!0}),r("span",{children:e.levelName(s)})]},s))]});let{done:o,total:a}=Pc(n,t),i=ut[ut.findIndex(s=>s.id===n)+1];return r("div",{class:"fxg-pane",children:[r("div",{class:"fxg-h",children:e.levelName(n)}),r("div",{class:"fxg-muted",children:e.t("guide.levelProgress",{done:o,total:a})}),r(sg,{done:o,total:a}),r("div",{class:"fxg-lines",children:Rt(n).map(s=>r(Fc,{g:e,c:s},s.id))}),i&&r(F,{children:[r("div",{class:"fxg-sub",children:e.t("guide.next")}),r("div",{class:"fxg-lines",children:Rt(i.id).map(s=>r(Fc,{g:e,c:s},s.id))})]})]})}function Uc(e,t){let{intro:n,body:o}=e.markdown(t);return`# ${e.title(t)}
|
|
1103
1103
|
|
|
1104
1104
|
${n}
|
|
1105
1105
|
|
|
1106
|
-
${
|
|
1106
|
+
${o}`.trim()}function cg({g:e}){let t=e.selected(),n=e.ctx.tangu?.mountChat;return n?r(dg,{g:e,c:t,mount:n},`${t.id}:${e.locale()}`):r(ug,{g:e,c:t})}function dg({g:e,c:t,mount:n}){let o=te(null);return Q(()=>{let a=n(o.current,{title:e.t("guide.ask.chatTitle")});return a.quote(Uc(e,t)),()=>a.dispose()},[]),r("div",{class:"fxg-chat",ref:o})}function ug({g:e,c:t}){let[n,o]=M(""),[a,i]=M(""),s=e.ctx.tangu?.startChat,l=async()=>{if(!s)return;let c=`${e.t("guide.ask.prompt",{chapter:e.title(t),question:n.trim()})}
|
|
1107
1107
|
|
|
1108
1108
|
---
|
|
1109
|
-
${Pc(e,t)}`,d=await s({prompt:c,send:!1});d?.ok?r(""):i(d?.error||e.t("guide.ask.unavailable"))};return o("div",{class:"fxg-pane",children:[o("p",{class:"fxg-muted",children:e.t("guide.ask.hint",{chapter:e.title(t)})}),o("textarea",{class:"fxg-input",rows:4,value:n,placeholder:e.t("guide.ask.placeholder"),onInput:c=>r(c.target.value)}),o("button",{type:"button",class:"btn sm",disabled:!s,onClick:()=>void l(),children:e.t("guide.ask.send")}),(!s||a)&&o("p",{class:"fxg-muted",children:a||e.t("guide.ask.unavailable")})]})}function Mc({g:e}){Sr(e);let[t,n]=T("progress");return o(Cr,{g:e,kind:"side",children:[o("div",{class:"fxg-tabs",role:"tablist",children:["progress","ask"].map(r=>o("button",{type:"button",role:"tab","aria-selected":t===r,class:t===r?"is-on":"",onClick:()=>n(r),children:e.t(r==="progress"?"guide.progress":"guide.askTangu")},r))}),t==="progress"?o(Rm,{g:e}):o(Lm,{g:e})]})}function Ic({g:e}){Sr(e);let t=e.companionChapter(),n=Qn(t,e.env())==="done",r=J(n);return X(()=>{if(n&&!r.current){let a=window.setTimeout(()=>e.ctx.closeView?.(Lt.companion),1500);return()=>window.clearTimeout(a)}r.current=n},[n]),o(Cr,{g:e,kind:"companion",children:o("div",{class:"fxg-pane",children:[o("div",{class:"fxg-companion-head",children:[o("span",{class:"fxg-sub",children:e.t("guide.title")}),e.ctx.closeView&&o("button",{type:"button",class:"fxg-icon-btn","aria-label":e.t("guide.companion.close"),onClick:()=>e.ctx.closeView?.(Lt.companion),children:"\xD7"})]}),o("div",{class:"fxg-h",children:e.title(t)}),o("div",{class:"fxg-sub",children:e.t("guide.tasks")}),o(oi,{g:e,chapter:t}),o("button",{type:"button",class:"fx-link fxg-back",onClick:()=>void e.openGuide(t.id),children:e.t("guide.companion.back")})]})})}function Rc({g:e,letter:t}){Sr(e);let n=t?t.kind==="level"?t.level:"new":null,r=n&&(n==="new"||zr(n,e.env()))?Rt(n):[];return o(Cr,{g:e,kind:"letter",children:[r.map(a=>o("div",{class:"fxg-letter-chapter",children:[o("button",{type:"button",class:"fxg-letter-title",onClick:()=>void e.openGuide(a.id),children:e.title(a)}),o(oi,{g:e,chapter:a})]},a.id)),o("button",{type:"button",class:"btn sm",onClick:()=>void e.openGuide(r[0]?.id??hn("welcome")?.id),children:e.t("guide.letter.open")})]})}function Om(e){return!!e&&typeof e.registerView=="function"&&typeof e.registerListSource=="function"&&typeof e.openView=="function"&&typeof e.achievements?.count=="function"&&typeof e.achievements.subscribe=="function"&&typeof e.app?.openSpace=="function"&&typeof e.ui?.mountMarkdownEditor=="function"}function Lc(e,t=window){if(!Om(e)||t.tangu?.unitPage)return null;let n=t.tangu,r=wc(e,{desktop:typeof n?.appVersion=="function"&&!n.mobile,appVersion:typeof n?.appVersion=="function"?n.appVersion().catch(()=>null):Promise.resolve(null)}),a=i=>s=>(Be(o(i,{g:r}),s),()=>{Be(null,s)});return e.registerView({id:Lt.reader,title:r.t("guide.title"),icon:"page",workspaceSource:ni,mount:a(Ec)}),e.registerView({id:Lt.side,title:r.t("guide.progress"),icon:"list-view",mount:a(Mc)}),e.registerView({id:Lt.companion,title:r.t("guide.title"),icon:"todo",mount:a(Ic)}),e.registerListSource({id:ni,title:r.t("guide.title"),search:!0,items:i=>{let s=r.env(),l=i?.query?.trim().toLowerCase()??"",c=r.justUnlocked();return _r(r).flatMap(({level:d,chapters:f})=>f.map(p=>{let u=Qn(p,s);return{key:p.id,title:r.title(p),group:r.levelName(d),icon:u==="done"?"circle-check":u==="locked"?"lock":"circle",hint:d===c&&u!=="locked"?r.t("guide.justUnlocked"):void 0}})).filter(d=>!l||d.title.toLowerCase().includes(l))},subscribe:i=>r.subscribe(i),activeKey:()=>r.selected().id,open:i=>{r.select(i.key),e.openView(Lt.reader)}}),e.registerCommand?.({id:"open-guide",title:()=>r.t("guide.cmd.open"),keywords:"guide manual help tutorial levels \u4F7F\u7528\u6307\u5357 \u8BF4\u660E\u4E66 \u6559\u7A0B \u5E2E\u52A9 \u7B49\u7EA7 \u4EFB\u52A1",run:()=>{r.openGuide()}}),e.inbox?.registerCard({sender:()=>r.t("guide.title"),mount(i,s){return Be(o(Rc,{g:r,letter:r.letter(s.id)}),i),()=>{Be(null,i)}}}),r}var Xe=e=>Number.isFinite(Number(e))?Number(e):0,vt="penzor",Ar=e=>e?.apps?.apps.find(t=>t.appId===vt)?.bytes??0,Oc=500;async function Fm(e,t){let n=Math.min(20,Xe(t.totalPages));if(n<=1)return t.files;let r=await Promise.all(Array.from({length:n-1},(a,i)=>e(`/exports/list?pageSize=${Oc}&sortBy=date&sortOrder=desc&page=${i+2}`)));return[...t.files,...r.flatMap(a=>a.ok&&Array.isArray(a.data?.files)?a.data.files:[])]}async function Fc(e){let[t,n,r,a,i,s]=await Promise.all([e("/remotesync/vaults"),e("/amadeus/vaults"),e("/storage/quota"),e("/storage/files-by-app"),e(`/exports/list?pageSize=${Oc}&sortBy=date&sortOrder=desc`),e("/trash?all=1")]),c=[t,n,r,a,i,s].every(f=>!f.ok&&f.status===401);return{snap:{sync:t.ok&&Array.isArray(t.data?.vaults)?t.data:null,ama:n.ok&&Array.isArray(n.data?.vaults)?n.data.vaults.filter(f=>(f.role??"owner")==="owner").map(f=>({id:f.id,name:f.name,sizeBytes:Xe(f.sizeBytes)})):null,apps:r.ok&&a.ok&&Array.isArray(a.data?.apps)?{used:Xe(r.data?.used),quota:Xe(r.data?.quota),apps:a.data.apps,largest:a.data.largest??[]}:null,exports:i.ok&&Array.isArray(i.data?.files)?{files:await Fm(e,i.data),total:Xe(i.data.total),totalBytes:Xe(i.data.totalBytes)}:null,trash:s.ok&&Array.isArray(s.data)?s.data:null,at:Date.now()},signedOut:c}}var Dc=(e,t)=>t>0?{used:e,max:t,pct:Math.min(100,e/t*100),warn:e/t>=.9}:null;function ri(e){let t=e.sync?Xe(e.sync.usedBytes):0,n=e.ama?e.ama.reduce((d,f)=>d+f.sizeBytes,0):0,r=e.apps?Xe(e.apps.used):0,a=e.exports?Xe(e.exports.totalBytes):0,i=[["sync",t],["ama",n],["apps",r],["exports",a]].filter(([,d])=>d>0).map(([d,f])=>({ledger:d,bytes:f})),s=e.sync?.vaults.map(d=>d.updatedAt).filter(d=>!!d).sort().pop()??null,l=e.trash??[],c=!e.sync?.vaults.length&&!e.ama?.length&&!e.apps?.apps.length&&!e.exports?.files.length&&!l.length;return{total:t+n+r+a,segments:i,sync:e.sync?{bytes:t,vaults:e.sync.vaults.length,meter:Dc(t,Xe(e.sync.maxBytes)),updatedAt:s,maxFileBytes:Xe(e.sync.maxFileBytes)}:null,ama:e.ama?{bytes:n,vaults:e.ama.length}:null,apps:e.apps?{bytes:r,apps:e.apps.apps.filter(d=>d.files>0&&d.appId!==vt).map(d=>d.appId),meter:Dc(r,Xe(e.apps.quota)),trashCount:Pr(l).length,trashBytes:l.reduce((d,f)=>d+Xe(f.fileSize),0)}:null,exports:e.exports?{bytes:a,count:e.exports.total,latest:e.exports.files[0]??null}:null,empty:c}}var $m={"ai-studio":"AI Studio","photo-studio":"Photo Studio",notebase:"Notebase",chat:"Forsion Chat",connect:"Forsion Connect","video-studio":"Video Studio",bluebird:"Bluebird",cnti:"CNTI"},ai=e=>e?$m[e]??e.split(/[-_]/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" "):"\u2014",no=e=>e.kind==="sync"?`sync:${e.vault}`:e.kind==="ama"?`ama:${e.vaultId}`:e.kind==="app"?`app:${e.appId}`:e.kind==="overview"?"ov":e.kind,On=e=>e.kind==="overview"||e.kind==="sync-home";function $c(e){if(e==="ov")return{kind:"overview"};if(e==="sync-home"||e==="exports"||e==="trash")return{kind:e};let t=e.indexOf(":"),n=t<0?e:e.slice(0,t),r=t<0?"":e.slice(t+1);return r?n==="sync"?{kind:"sync",vault:r}:n==="ama"?{kind:"ama",vaultId:r}:n==="app"?{kind:"app",appId:r}:null:null}function Bc(e,t,n){let r=[{key:"ov",title:t.overview,icon:"layout"}];if(!e)return r;let a=i=>Ro(i,n);if(e.apps&&r.push({key:`app:${vt}`,title:t.drive,icon:t.driveIcon,hint:a(Ar(e))}),e.sync){r.push({key:"sync",title:t.sync,kind:"folder",icon:"refresh",hint:a(Xe(e.sync.usedBytes))});for(let i of e.sync.vaults)r.push({key:`sync:${i.vault}`,parent:"sync",title:i.vault,icon:"database",hint:a(i.bytes)})}if(e.ama){r.push({key:"ama",title:t.ama,kind:"folder",icon:"cloud",hint:a(e.ama.reduce((i,s)=>i+s.sizeBytes,0))});for(let i of e.ama)r.push({key:`ama:${i.id}`,parent:"ama",title:i.name,icon:"page",hint:a(i.sizeBytes)})}if(e.apps){r.push({key:"apps",title:t.apps,kind:"folder",icon:"archive",hint:a(Math.max(0,Xe(e.apps.used)-Ar(e)))});for(let i of e.apps.apps.filter(s=>s.files>0&&s.appId!==vt))r.push({key:`app:${i.appId}`,parent:"apps",title:ai(i.appId),icon:"image",hint:a(i.bytes)})}return e.exports&&r.push({key:"exports",title:t.exports,icon:"attachment",hint:a(e.exports.totalBytes)}),e.trash&&r.push({key:"trash",title:t.trash,icon:"trash",hint:t.items(Pr(e.trash).length)}),r}function Pr(e){let t=new Map(e.map(a=>[a.id,a])),n=a=>{let i=a;for(let s=0;s<64&&i.parentId&&t.has(i.parentId);s++)i=t.get(i.parentId);return i},r=new Map;for(let a of e){let i=n(a),s=r.get(i.id)??{inner:0,innerBytes:0};i.id!==a.id&&s.inner++,s.innerBytes+=Xe(a.fileSize),r.set(i.id,s)}return e.filter(a=>!(a.parentId&&t.has(a.parentId))).map(a=>({...a,...r.get(a.id)}))}function Uc(e,t){let n=t?`${t}/`:"",r=new Map,a=[];for(let i of e){if(n&&!i.path.startsWith(n))continue;let s=i.path.slice(n.length),l=s.indexOf("/");if(l<0){a.push({key:i.path,name:s,dir:!1,size:i.size,mtime:i.mtime,col4:i.who??null,ref:i.ref});continue}let c=s.slice(0,l),d=n+c,f=r.get(d)??{key:d,name:c,dir:!0,size:0,mtime:null,count:0};f.size+=i.size,f.count=(f.count??0)+1,i.mtime!=null&&(f.mtime==null||i.mtime>f.mtime)&&(f.mtime=i.mtime),r.set(d,f)}return[...Er([...r.values()]),...Er(a)]}var Er=e=>e.sort((t,n)=>(n.mtime??-1)-(t.mtime??-1)||t.name.localeCompare(n.name)),qc=e=>[...Er(e.filter(t=>t.dir)),...Er(e.filter(t=>!t.dir))];function Ro(e,t){let n=Math.max(0,Xe(e));if(n<1024)return`${n} B`;if(n<1024*1024)return`${Math.round(n/1024)} KB`;if(n<1024**3){let r=n/1048576;return`${r<100?Number(r.toFixed(1)):Math.round(r)} MB`}return`${Number((n/1024**3).toFixed(2))} GB`}function ii(e,t,n){let r=Ro(e,n),a=Ro(t,n),i=a.slice(a.indexOf(" "));return`${r.endsWith(i)?r.slice(0,-i.length):r} / ${a}`}var Bm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Nc=e=>String(e).padStart(2,"0");function Vt(e,t,n=Date.now()){if(e==null||!Number.isFinite(e))return"\u2014";let r=new Date(e),a=new Date(n);a.setHours(0,0,0,0);let i=new Date(r);i.setHours(0,0,0,0);let s=Math.round((a.getTime()-i.getTime())/864e5),l=`${Nc(r.getHours())}:${Nc(r.getMinutes())}`;if(s===0)return t==="zh"?`\u4ECA\u5929 ${l}`:`Today ${l}`;if(s===1)return t==="zh"?`\u6628\u5929 ${l}`:`Yesterday ${l}`;let c=r.getFullYear()===a.getFullYear();return t==="zh"?`${c?"":`${r.getFullYear()} \u5E74 `}${r.getMonth()+1} \u6708 ${r.getDate()} \u65E5`:`${Bm[r.getMonth()]} ${r.getDate()}${c?"":`, ${r.getFullYear()}`}`}function bn(e){if(e==null||e==="")return null;if(typeof e=="number")return e<1e12?e*1e3:e;let t=Number(e);if(Number.isFinite(t))return t<1e12?t*1e3:t;let n=Date.parse(String(e));return Number.isNaN(n)?null:n}var Hc=e=>[e.notes.on&&!e.notes.pending,e.agents.on,e.plugins.on].filter(Boolean).length,Vc=e=>!e.decided||!!e.notes.pending||!e.notes.on&&!e.agents.on&&!e.plugins.on;function si(e){let t=e.notes.last;return!!t&&t.ok===!1&&!(t.errors.length>0&&t.errors.every(n=>n.includes("already-running")))}var Mr=e=>!!e&&e.signedIn&&(!!e.notes.pending||e.notes.on&&si(e)),Um=e=>/"code"\s*:\s*"QUOTA"/.test(e),Wc=(e,t)=>e.notes.on&&!e.notes.pending&&e.notes.backend==="penzor"&&(t>0&&(e.notes.localBytes??0)>t||!!e.notes.last?.errors.some(Um));function Lo(e){if(!e?.notes.running)return null;let t=e.notes.progress;return t&&t.total>0?Math.min(1,Math.max(0,t.done/t.total)):0}function jc(e,t){if(!e||!e.signedIn)return;let n=Lo(e);if(n!=null)return n>0?Ce(t,"penzor.sync.running",{pct:Math.round(n*100)}):Ce(t,"penzor.sync.runningPlain");if(e.notes.pending)return Ce(t,"penzor.sync.waiting");let r=Hc(e);return r?Ce(t,"penzor.sync.onN",{n:r}):Ce(t,"penzor.sync.allOff")}function Gc(e,t){let n=Hc(e);return e.notes.pending?Ce(t,"penzor.sync.badgeWaiting",{n}):n?Ce(t,"penzor.sync.onN",{n}):Ce(t,"penzor.sync.allOff")}function li(e,t){let n=Math.max(0,Math.round(e.intervalMin)),r=n?n%60===0?Ce(t,"penzor.sync.everyHours",{n:n/60}):Ce(t,"penzor.sync.every",{n}):Ce(t,"penzor.sync.manual");return e.syncOnStart?`${r} \xB7 ${Ce(t,"penzor.sync.onStart")}`:r}function ci(e,t,n=Date.now()){if(e==null||!Number.isFinite(e))return"\u2014";let r=Math.max(0,n-e);return r<6e4?Ce(t,"penzor.justNow"):r<36e5?Ce(t,"penzor.sync.minAgo",{n:Math.floor(r/6e4)}):r<6*36e5?Ce(t,"penzor.sync.hoursAgo",{n:Math.floor(r/36e5)}):Vt(e,t,n)}function Do(e,t=!1){return t?"folder":/\.(png|jpe?g|gif|webp|heic|dng|svg|bmp|tiff?)$/i.test(e)?"image":/\.(md|txt|pdf|docx?|rtf)$/i.test(e)?"page":/\.db$/i.test(e)?"database":"attachment"}var on="forsion-penzor",rn={main:"penzor",info:"penzor-info"},pi="penzor-places",ui="forsion-extend.penzor.ready",Xc="forsion-extend.penzor.focus",Ir=e=>e.state==="active"||e.state==="queued",Rr=e=>e.ok?"":e.detail||e.code||e.transport||(e.status?`HTTP ${e.status}`:"offline"),di=e=>e.slice(e.lastIndexOf("/")+1);function Kc(e,t={}){let n=t.api??H,r=new Set,a=()=>{for(let b of[...r])try{b()}catch(z){console.error("[penzor] listener failed",z)}},i=()=>Qe(e.getLocale?.()),s=(b,z)=>Ce(i(),b,z),l=b=>Ro(b,i()),c=b=>e.app?.notify?.(b),d=b=>c(s("penzor.toast.failed",{reason:typeof b=="string"?b:Rr(b)})),f="unknown",p=!1,u=null,h=null,m={kind:"overview"},y="",_=[],C=null,x=null,k=null,A="mtime",O="",q=null,N={kind:"view"},B=!1,Y=null,se=null,V=0,ne=0,pe=0,Ee=t.device??null,v=[],E=new Map,I=new Set,Z=null,le=null,de=[],He=[],Pe="hidden",yt=0,be=!1,et=0,Wt=!1,vn=null,yn=!1,xn=null,oo=new Map,jt=null,Ye=typeof e.app?.sync?.get=="function"?e.app.sync:null,Gt=new Map,ge=new Set,Xt=!1,ve=!1,Kt=!1,tt=!1,kn=1e4,No=4e3,Dt=b=>{let z=A==="size"?(S,L)=>L.size-S.size:A==="name"?(S,L)=>S.name.localeCompare(L.name):null;return z?[...b.filter(S=>S.dir).sort(z),...b.filter(S=>!S.dir).sort(z)]:qc([...b])};async function Oo(){let b=++V,z=m;if(x=null,z.kind==="overview"||z.kind==="sync-home"){C=null;return}if(z.kind==="exports"){C=(h?.exports?.files??[]).map($=>({key:$.fileId,name:$.fileName,dir:!1,size:$.size,mtime:bn($.createdAt),col4:at($.appId),ref:$}));return}if(z.kind==="trash"){C=Pr(h?.trash??[]).map($=>({key:$.id,name:$.name,dir:$.fileType==="directory",size:$.fileType==="directory"?$.innerBytes:$.fileSize,mtime:bn($.deletedAt),col4:$.parentName?`${at($.appId)} / ${$.parentName}`:at($.appId),count:$.fileType==="directory"?$.inner:void 0,ref:$}));return}if(C=null,a(),z.kind==="sync"||z.kind==="ama"){let $=no(z),j=E.get($);if(!j){if(z.kind==="sync"){let ye=await n(`/remotesync/vaults/${encodeURIComponent(z.vault)}/manifest`);if(b!==V)return;if(!ye.ok){x=Rr(ye),a();return}j=ye.data.files.map(xe=>({path:xe.path,size:xe.size,mtime:bn(xe.mtimeMs),who:xe.device??null,ref:xe}))}else{let ye=await n(`/amadeus/vaults/${encodeURIComponent(z.vaultId)}/tree`);if(b!==V)return;if(!ye.ok){x=Rr(ye),a();return}j=(ye.data.entries??[]).map(xe=>({path:xe.path,size:xe.size,mtime:bn(xe.updatedAt),ref:xe}))}E.set($,j)}C=Uc(j,y);return}let S=_[_.length-1]?.id,L=await n(`/files${S?`?parentId=${encodeURIComponent(S)}`:""}`,{projectSource:z.appId});if(b===V){if(!L.ok){x=Rr(L),a();return}C=L.data.map($=>({key:$.id,name:$.name,dir:$.fileType==="directory",size:Number($.fileSize)||0,mtime:bn($.updatedAt),ref:$}))}}let Nt=()=>{if(!C)return null;let b=O.trim().toLowerCase(),z=b?C.filter(S=>S.name.toLowerCase().includes(b)):C;return Dt(z)},Fo=()=>{let b=Nt()??[],z=new Set(b.map(S=>S.key));if(I=new Set([...I].filter(S=>z.has(S))),k&&z.has(k)){I.add(k);return}k=(b.find(S=>!S.dir)??b[0])?.key??null,I=new Set(k?[k]:[]),Z=k,wt()},xt=()=>{k=null,I=new Set,Z=null,le=null},at=b=>b===vt?s("penzor.drive"):ai(b),nt=()=>m.kind==="app"&&m.appId===vt,ut=()=>m.kind==="app"||m.kind==="sync"||m.kind==="ama",Ot=()=>m.kind==="app"?_[_.length-1]?.id??"ROOT":"ROOT",$n=()=>(Nt()??[]).filter(b=>I.has(b.key)),kt=(b,z)=>{let S=ee().cloudInvoke;return S?S(b,z).catch(L=>({ok:!1,error:String(L?.message||L)})):Promise.resolve({ok:!1,error:"no_bridge"})};function Jt(b=500){vn||yn||(vn=setTimeout(()=>{vn=null,ft()},b))}async function ft(){let b=await kt("penzor:transfers");if(yn)return;let z=new Map(de.map(ye=>[ye.id,ye.state]));b?.ok&&Array.isArray(b.items)&&(de=b.items);let S=Date.now(),L=de.some(Ir);de.some(ye=>ye.kind==="up"&&ye.state==="done"&&z.get(ye.id)&&z.get(ye.id)!=="done"&&nt()&&(ye.parentId===Ot()||ye.targetId===Ot()))&&(jt&&clearTimeout(jt),jt=setTimeout(()=>{jt=null,$t()},300)),L?(xn==null&&(xn=S),et=0,Pe==="hidden"&&(Pe="open",yt=S),Pe==="open"&&!be&&S-yt>kn&&(Pe="pill")):xn!=null&&(Bn(xn),xn=null);let $=de.some(ye=>ye.state==="failed")||He.length>0,j=de.some(ye=>ye.state==="paused");!L&&!j&&de.length&&!$&&Pe!=="hidden"&&(et?S-et>No&&!be&&(Pe="hidden",et=0,zt.txClear("finished")):(et=S,Pe==="pill"&&(Pe="open"))),!L&&$&&Pe==="pill"&&(Pe="open"),!de.length&&!He.length&&(Pe="hidden"),wn(),a(),(L||Pe!=="hidden"&&et)&&Jt()}function Bn(b){let z=de.filter(j=>(j.finishedAt??0)>=b),S=z.filter(j=>j.kind==="up"&&j.state==="done"),L=z.filter(j=>j.kind==="down"&&j.state==="done"),$=z.filter(j=>j.state==="failed");S.length&&je(),!Wt&&($.length?c(s("penzor.toast.txFailed",{n:$.length})):S.length?c(S.length===1?s("penzor.toast.upDoneOne",{name:S[0].name}):s("penzor.toast.upDoneMany",{n:S.length})):L.length&&c(L.length===1?s("penzor.toast.downloaded",{name:L[0].name}):s("penzor.toast.downDoneMany",{n:L.length})))}function wn(){let b=de.filter(Ir),z=b.reduce((L,$)=>L+Math.max($.size,$.done),0),S=b.length?z>0?Math.min(1,b.reduce((L,$)=>L+$.done,0)/z):0:null;e.app?.setSpaceProgress?.(on,S??Lo(Ye?.get()??null))}function ro(){if(!Ye)return;let b=Mr(Ye.get());b!==tt&&(tt=b,e.app?.setSpaceDot?.(on,b))}function ao(){if(!ve||!Ye)return;let b=Ye.get();if(!b)return;ve=!1;let z=Vc(b);m.kind==="overview"&&z?(m={kind:"sync-home"},Kt=!0,a()):m.kind==="sync-home"&&Kt&&!z&&(m={kind:"overview"},Kt=!1,a())}function Un(){Ye?.get()?.notes.pending||(Xt=!1),ao(),wn(),ro(),a()}let io=()=>{let b=Ye?.get()??null;if(!b||!Gt.size)return b;let z=(S,L)=>Gt.has(S)?{...L,on:Gt.get(S)}:L;return{...b,notes:z("notes",b.notes),agents:z("agents",b.agents),plugins:z("plugins",b.plugins)}},qn=async b=>{try{return await b()??{ok:!1}}catch(z){return{ok:!1,error:String(z?.message||z)}}},Ft=()=>{Pe="open",yt=Date.now(),et=0};async function wt(){Y=null;let b=so();if(m.kind!=="app"||!b||b.dir){a();return}let z=b.key,S=await n(`/files/${encodeURIComponent(z)}/versions`);k===z&&(Y=S.ok&&Array.isArray(S.data)?S.data.map(L=>({versionNumber:L.versionNumber,fileSize:Number(L.fileSize)||0,createdAt:bn(L.createdAt)})):[],a())}let so=()=>k?(C??[]).find(b=>b.key===k)??null:null;async function $t(){await Oo(),Fo(),a()}async function je(){let b=++pe;p=!0,u=null,a();let z=await ee().authStatus?.().catch(()=>null);if(b!==pe)return;if(z&&!z.loggedIn){f="out",h=null,p=!1,a();return}let{snap:S,signedOut:L}=await Fc(n);if(b===pe){if(p=!1,L){f="out",h=null,a();return}f="in",h=S,E.clear(),u=!S.sync&&!S.ama&&!S.apps&&!S.exports&&!S.trash?s("penzor.unreachable"):null,!On(m)&&m.kind!=="exports"&&m.kind!=="trash"&&((m.kind==="sync"?S.sync?.vaults.some(j=>j.vault===m.vault):m.kind==="ama"?S.ama?.some(j=>j.id===m.vaultId):m.appId===vt?S.apps:S.apps?.apps.some(j=>j.appId===m.appId&&j.files>0))||(m={kind:"overview"},y="",_=[],xt())),await $t(),$o(S)}}async function $o(b){let z=[],S=(b.sync?.vaults??[]).slice(0,8),[L,$]=await Promise.all([Promise.all(S.map(j=>n(`/remotesync/vaults/${encodeURIComponent(j.vault)}/manifest`))),b.ama?n("/amadeus/attachments"):Promise.resolve(null)]);if(h===b){if(L.forEach((j,ye)=>{let xe=S[ye];if(!j.ok)return;let Nr=j.data.files.map(_t=>({path:_t.path,size:_t.size,mtime:bn(_t.mtimeMs),who:_t.device??null,ref:_t}));E.set(`sync:${xe.vault}`,Nr);for(let _t of[...j.data.files].sort((Me,sn)=>sn.size-Me.size).slice(0,6))z.push({key:`s:${xe.vault}:${_t.path}`,name:di(_t.path),where:`${s("penzor.ledger.sync")} \xB7 ${xe.vault}`,size:_t.size,go:`sync:${xe.vault}`})}),$?.ok)for(let j of[...$.data.attachments??[]].sort((ye,xe)=>xe.size-ye.size).slice(0,6))z.push({key:`m:${j.vaultId}:${j.path}`,name:di(j.path),where:`${s("penzor.ledger.ama")} \xB7 ${j.vaultName}`,size:j.size,go:`ama:${j.vaultId}`});v=z,a()}}async function lo(b,z={},S=m){let L=S.kind==="sync"?{path:`/remotesync/vaults/${encodeURIComponent(S.vault)}/file?path=${encodeURIComponent(b.key)}`,mode:"signed"}:S.kind==="ama"?b.ref.kind==="binary"?{path:`/amadeus/vaults/${encodeURIComponent(S.vaultId)}/asset?ref=${encodeURIComponent(b.key)}`,mode:"bytes"}:{path:`/amadeus/vaults/${encodeURIComponent(S.vaultId)}/file?path=${encodeURIComponent(b.key)}`,mode:"text"}:S.kind==="app"?{path:`/files/${encodeURIComponent(b.key)}/content`,mode:"bytes"}:S.kind==="exports"?{path:`/exports/${encodeURIComponent(b.key)}/url`,mode:"signed"}:null;if(!L)return;let $=await kt("penzor:download",{...L,name:di(b.name),size:b.size,...z});if(!$?.ok){d($?.error||"download");return}Ft(),Jt(0),a()}let zn=()=>{On(m)?e.closeView?.(rn.info,{collapse:!0}):e.openView?.(rn.info,{location:"right"})},zt={ctx:e,locale:i,t:s,b:l,subscribe(b){return r.add(b),()=>{r.delete(b)}},auth:()=>f,loading:()=>p,error:()=>u,snap:()=>h,loc:()=>m,path:()=>y,appStack:()=>_,rows:Nt,rowsError:()=>x,selected:so,sort:()=>A,query:()=>O,menu:()=>q,side:()=>N,confirmEmpty:()=>B,versions:()=>Y,moveFolders:()=>se,thisDevice:()=>Ee,setDevice(b){Ee=b,a()},largest:()=>v,appLabel:at,canWrite:nt,canMulti:ut,folderId:Ot,selection:$n,isSelected:b=>I.has(b),selectAll(){if(!ut())return;let b=Nt()??[];I=new Set(b.map(z=>z.key)),!k&&b[0]&&(k=b[0].key),q=null,a()},newFolder:()=>le,startNewFolder(){if(!nt())return;let b=s("penzor.newFolder.default"),z=new Set((C??[]).filter(L=>L.dir).map(L=>L.name)),S=b;for(let L=1;z.has(S)&&L<1e3;L++)S=`${b} (${L})`;le=S,q=null,a()},cancelNewFolder(){le!=null&&(le=null,a())},async createFolder(b){let z=b.trim();if(le=null,!z||!nt()){a();return}a();let S=await n("/files",{method:"POST",body:{type:"directory",parentId:Ot(),name:z},projectSource:vt});if(!S.ok){S.status===409?c(s("penzor.toast.folderExists",{name:z})):d(S);return}S.data?.id&&(k=S.data.id,I=new Set([S.data.id]),Z=S.data.id),await $t()},transfers:()=>de,notices:()=>He,txRows(){if(!nt())return[];let b=Ot();return de.filter(z=>z.kind==="up"&&z.projectSource===vt&&z.parentId===b&&(Ir(z)||z.state==="paused")).map(z=>({key:`tx:${z.id}`,id:z.id,name:z.name,size:z.size,done:z.done,state:z.state}))},card:()=>Pe,setCard(b){Pe=b,yt=Date.now(),b!=="hidden"&&Jt(0),a()},holdCard(b){be=b,yt=Date.now(),b||Jt()},async upload(b,z){if(!nt()||!b.length)return;let S=z?.id??Ot();oo.set(S,z?[..._,z]:[..._]);let L=await kt("penzor:upload",{paths:b,parentId:S,projectSource:vt});if(L?.ok){Ft(),Jt(0),a();return}if(L?.error==="quota"){He=[...He,{id:String(Date.now()),kind:"quota",short:Number(L.short)||0}],Ft(),a();return}if(L?.error==="too_many"){c(s("penzor.err.too_many",{n:Number(L.max)||2e3}));return}L?.error!=="no_files"&&d(L?.error==="account_changed"?s("penzor.err.account_changed"):L?.error==="not_signed_in"?s("penzor.err.not_signed_in"):L?.error||"upload")},async txOp(b,z){await kt("penzor:transfer",{id:b,op:z}),yt=Date.now(),await ft()},async txAll(b){let z=b==="pause"?S=>Ir(S):b==="resume"?S=>S.state==="paused":S=>S.state==="failed"||S.state==="canceled";for(let S of de.filter(z))await kt("penzor:transfer",{id:S.id,op:b});b==="retry"&&(He=[]),yt=Date.now(),await ft()},async txClear(b){await kt("penzor:transfers:clear",{which:b}),b==="all"&&(He=[]),await ft()},dismissNotice(b){He=He.filter(z=>z.id!==b),!de.length&&!He.length&&(Pe="hidden"),a()},locate(b){if(b.kind==="down"){b.localPath&&ee().revealHostPath?.(b.localPath);return}let z=oo.get(b.targetId??"")??[];m={kind:"app",appId:vt},_=z,y="",O="",N={kind:"view"},q=null,xt(),b.fileId&&b.parentId===b.targetId&&(k=b.fileId,I=new Set([b.fileId])),a(),e.app?.openSpace?.(on).then(()=>{e.openView?.(rn.main),zn()}),$t()},async downloadMany(b){let z=b.filter(xe=>!xe.dir);if(z.length<=1){z[0]&&await zt.download(z[0]);return}let S=new Date,L=s("penzor.download.folder",{date:`${S.getFullYear()}-${String(S.getMonth()+1).padStart(2,"0")}-${String(S.getDate()).padStart(2,"0")}`}),$=`${Date.now()}`,j=m,ye=ne;for(let xe of z){if(ne!==ye)break;await lo(xe,{subdir:L,batch:$},j)}},async trashMany(b){if(m.kind!=="app"||!b.length)return;if(b.length===1){await zt.trash(b[0]);return}let z=await n("/files/batch/delete",{method:"POST",body:{ids:b.map(L=>L.key)},projectSource:m.appId});if(!z.ok){d(z);return}let S=(z.data?.results??[]).filter(L=>L.success===!1).length;c(S?s("penzor.toast.batchPartial",{n:S}):s("penzor.toast.trashedN",{n:b.length})),xt(),await je()},async moveMany(b,z){if(m.kind!=="app"||!b.length)return;N={kind:"view"};let S=b.map(j=>j.key).filter(j=>j!==z.id),L=await n("/files/batch/move",{method:"POST",body:{ids:S,parentId:z.id},projectSource:m.appId});if(!L.ok){d(L),a();return}let $=(L.data?.results??[]).filter(j=>j.success===!1).length;c($?s("penzor.toast.batchPartial",{n:$}):s("penzor.toast.movedN",{n:S.length,name:z.name})),xt(),await je()},setVisible(b){Wt=b},picker:{},refresh:je,go(b){let z=$c(b);if(!z)return;let S=no(z)===no(m);m=z,ve=!1,Kt=!1,S||(y="",_=[],xt(),O="",N={kind:"view"},B=!1),q=null,a(),e.openView?.(rn.main),zn(),$t()},openDir(b){!b.dir||m.kind==="exports"||m.kind==="trash"||(m.kind==="app"?_=[..._,{id:b.key,name:b.name}]:y=b.key,xt(),O="",N={kind:"view"},$t())},up(b){if(m.kind==="app")_=_.slice(0,b??Math.max(0,_.length-1));else{let z=y?y.split("/"):[];y=z.slice(0,b??Math.max(0,z.length-1)).join("/")}xt(),N={kind:"view"},$t()},select(b,z){let S=Nt()??[];if(b&&z?.range&&ut()&&Z&&S.some(L=>L.key===Z)){let L=S.findIndex(j=>j.key===Z),$=S.findIndex(j=>j.key===b.key);I=new Set(S.slice(Math.min(L,$),Math.max(L,$)+1).map(j=>j.key)),k=b.key}else b&&z?.toggle&&ut()?(I.has(b.key)&&I.size>1?(I.delete(b.key),k===b.key&&(k=[...I].pop()??null)):(I.add(b.key),k=b.key),Z=b.key):(k=b?.key??null,I=new Set(k?[k]:[]),Z=k);le=null,N={kind:"view"},q=null,b&&!On(m)&&e.openView?.(rn.info,{location:"right"}),wt(),a()},setSort(b){A=b,a()},setQuery(b){O=b,a()},openMenu(b,z,S){S&&!I.has(S.key)&&(k=S.key,I=new Set([S.key]),Z=S.key,wt()),q={x:b,y:z,row:S},N={kind:"view"},a()},closeMenu(){q&&(q=null,a())},setSide(b){N=b,q=null,b.kind==="move"&&(se=null,zt.moveBrowse(b.at)),e.openView?.(rn.info,{location:"right"}),a()},setConfirmEmpty(b){B=b,a()},async download(b){b.dir||(q=null,await lo(b))},async trash(b){if(m.kind!=="app")return;let z=Nt()??[],S=z.findIndex(j=>j.key===b.key),L=await n(`/files/${encodeURIComponent(b.key)}`,{method:"DELETE",projectSource:m.appId});if(!L.ok){d(L);return}c(s("penzor.toast.trashed",{name:b.name}));let $=z[S+1]??z[S-1];k=$&&$.key!==b.key?$.key:null,q=null,await je()},async restore(b){if(!h)return;let z=await n(`/trash/${encodeURIComponent(b.key)}/restore`,{method:"POST",body:{}});if(!z.ok){d(z);return}c(s("penzor.toast.restored",{name:b.name})),k=null,await je()},async purge(b){if(!h)return;let z=await n(`/trash/${encodeURIComponent(b.key)}`,{method:"DELETE"});if(N={kind:"view"},!z.ok){d(z),a();return}c(s("penzor.toast.purged",{name:b.name})),k=null,await je()},async emptyTrash(){if(!h)return;let b=await n("/trash?all=1",{method:"DELETE"});if(B=!1,!b.ok){d(b),a();return}let z=(b.data?.results??[]).filter(S=>S.success===!1).length;c(z?s("penzor.toast.emptyPartial",{n:z}):s("penzor.toast.emptied")),k=null,await je()},async rename(b,z){let S=z.trim();if(N={kind:"view"},!S||S===b.name){a();return}let L=m.kind==="exports"?await n(`/exports/${encodeURIComponent(b.key)}/rename`,{method:"PUT",body:{newFileName:S}}):m.kind==="app"?await n(`/files/${encodeURIComponent(b.key)}/rename`,{method:"PATCH",body:{name:S},projectSource:m.appId}):null;if(L){if(!L.ok){d(L),a();return}c(s("penzor.toast.renamed",{name:S})),await je()}},moveBrowse(b){if(m.kind!=="app")return;N={kind:"move",at:b},se=null,a();let z=b[b.length-1]?.id,S=m.appId;n(`/files${z?`?parentId=${encodeURIComponent(z)}`:""}`,{projectSource:S}).then(L=>{N.kind!=="move"||N.at!==b||(se=L.ok?L.data.filter($=>$.fileType==="directory").map($=>({id:$.id,name:$.name})):[],a())})},async moveTo(b,z){if(m.kind!=="app")return;if(N={kind:"view"},z.id===b.key){a();return}let S=await n(`/files/${encodeURIComponent(b.key)}/move`,{method:"PATCH",body:{parentId:z.id},projectSource:m.appId});if(!S.ok){d(S),a();return}c(s("penzor.toast.moved",{name:z.name})),k=null,await je()},async restoreVersion(b,z){let S=await n(`/files/${encodeURIComponent(b.key)}/restore/${z.versionNumber}`,{method:"POST",body:{}});if(!S.ok){d(S);return}c(s("penzor.toast.versionRestored",{n:z.versionNumber})),await je(),wt()},async deleteExport(b){if(!h)return;let z=await n(`/exports/${encodeURIComponent(b.key)}`,{method:"DELETE"});if(N={kind:"view"},!z.ok){d(z),a();return}c(s("penzor.toast.purged",{name:b.name})),k=null,await je()},signIn(){ee().forsionLogin?.()},openSync(){e.app?.openSettings?.("sync/s-remote")},async focusVault(b){await e.app?.openSpace?.(on),h||await je(),zt.go(`sync:${b}`)},hasSync:()=>!!Ye,syncState:io,syncBusy:b=>ge.has(b),async setSync(b,z){if(!Ye||ge.has(b))return;ge.add(b),Gt.set(b,z),a();let S=await qn(()=>Ye.set(b,z));ge.delete(b),Gt.delete(b),!yn&&(S.ok||d(S.error||"sync"),Un())},async resolveNotes(b){if(!Ye||ge.has("resolve"))return;ge.add("resolve"),a();let z=await qn(()=>Ye.resolveNotes(b));ge.delete("resolve"),Xt=!1,!yn&&(z.ok||d(z.error||"sync"),Un())},confirmCloud:()=>Xt,setConfirmCloud(b){Xt=b,a()},enter(){ve=!0,ao()},dispose(){yn=!0,vn&&clearTimeout(vn),jt&&clearTimeout(jt),e.app?.setSpaceProgress?.(on,null),tt&&e.app?.setSpaceDot?.(on,!1),r.clear(),mt?.(),co?.(),an?.()}},mt=e.subscribeLocale?.(()=>a()),an=Ye?.subscribe(Un);ro(),ft();let co=ee().onAuthChanged?.(()=>{++V,++pe,++ne,h=null,C=null,x=null,v=[],E.clear(),xt(),q=null,N={kind:"view"},B=!1,Y=null,se=null,m={kind:"overview"},y="",_=[],O="",oo.clear(),He=[],Xt=!1,Gt.clear(),Kt=!1,ve=!0,a(),je()});return zt}var Jc=e=>e.kind==="sync"?"penzor.side.readonlySync":e.kind==="ama"?"penzor.side.readonlyAma":null;function Hm(e,t){for(var n in t)e[n]=t[n];return e}function Yc(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Zc(e,t){this.props=e,this.context=t}(Zc.prototype=new Tt).isPureReactComponent=!0,Zc.prototype.shouldComponentUpdate=function(e,t){return Yc(this.props,e)||Yc(this.state,t)};var Qc=te.__b;te.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Qc&&Qc(e)};var my=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Vm=te.__e;te.__e=function(e,t,n,r){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k||[]),a.__c(e,t)}Vm(e,t,n,r)};var ed=te.unmount;function id(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Hm({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return id(r,t,n)})),e}function sd(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return sd(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function fi(){this.__u=0,this.o=null,this.__b=null}function ld(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Lr(){this.i=null,this.l=null}te.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ed&&ed(e)},(fi.prototype=new Tt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var a=ld(r.__v),i=!1,s=function(){i||r.__z||(i=!0,n.__R=null,a?a(c):c())};n.__R=s;var l=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var d=r.state.__a;r.__v.__k[0]=sd(d,d.__c.__P,d.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.o.pop();)f.__P=l,f.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},fi.prototype.componentWillUnmount=function(){this.o=[]},fi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=id(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&Pn(R,null,e.fallback);return a&&(a.__u&=-33),[Pn(R,null,t.__a?null:e.children),a]};var td=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Wm(e){return this.getChildContext=function(){return e.context},e.children}function jm(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Be(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(a,i){this.childNodes.push(a),t.h.insertBefore(a,i)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),t.h.removeChild(a)}}}Be(Pn(Wm,{context:t.context},e.__v),t.v)}function cd(e,t){var n=Pn(jm,{__v:e,h:t});return n.containerInfo=t,n}(Lr.prototype=new Tt).__a=function(e){var t=this,n=ld(t.__v),r=t.l.get(e);return r[0]++,function(a){var i=function(){t.props.revealOrder?(r.push(a),td(t,e,r)):a()};n?n(i):i()}},Lr.prototype.render=function(e){this.i=null,this.l=new Map;var t=zo(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Lr.prototype.componentDidUpdate=Lr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){td(e,n,t)})};var Gm=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Xm=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Km=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Jm=/[A-Z0-9]/g,Ym=typeof document<"u",Zm=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Tt.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var nd=te.event;te.event=function(e){return nd&&(e=nd(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var dd,Qm={configurable:!0,get:function(){return this.class}},od=te.vnode;te.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,a={},i=r.indexOf("-")==-1;for(var s in n){var l=n[s];if(!(s==="value"&&"defaultValue"in n&&l==null||Ym&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Zm(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":Km.test(s)&&(s=c):c=s="oninput":i&&Xm.test(s)?s=s.replace(Jm,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&a[s=c]&&(s="oninputCapture"),a[s]=l}}r=="select"&&(a.multiple&&Array.isArray(a.value)&&(a.value=zo(n.children).forEach(function(d){d.props.selected=a.value.indexOf(d.props.value)!=-1})),a.defaultValue!=null&&(a.value=zo(n.children).forEach(function(d){d.props.selected=a.multiple?a.defaultValue.indexOf(d.props.value)!=-1:a.defaultValue==d.props.value}))),n.class&&!n.className?(a.class=n.class,Object.defineProperty(a,"className",Qm)):n.className&&(a.class=a.className=n.className),t.props=a})(e),e.$$typeof=Gm,od&&od(e)};var rd=te.__r;te.__r=function(e){rd&&rd(e),dd=e.__c};var ad=te.diffed;te.diffed=function(e){ad&&ad(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),dd=null};var pd=`
|
|
1109
|
+
${Uc(e,t)}`,d=await s({prompt:c,send:!1});d?.ok?o(""):i(d?.error||e.t("guide.ask.unavailable"))};return r("div",{class:"fxg-pane",children:[r("p",{class:"fxg-muted",children:e.t("guide.ask.hint",{chapter:e.title(t)})}),r("textarea",{class:"fxg-input",rows:4,value:n,placeholder:e.t("guide.ask.placeholder"),onInput:c=>o(c.target.value)}),r("button",{type:"button",class:"btn sm",disabled:!s,onClick:()=>void l(),children:e.t("guide.ask.send")}),(!s||a)&&r("p",{class:"fxg-muted",children:a||e.t("guide.ask.unavailable")})]})}function qc({g:e}){Po(e);let[t,n]=M("progress");return r(Mo,{g:e,kind:"side",children:[r("div",{class:"fxg-tabs",role:"tablist",children:["progress","ask"].map(o=>r("button",{type:"button",role:"tab","aria-selected":t===o,class:t===o?"is-on":"",onClick:()=>n(o),children:e.t(o==="progress"?"guide.progress":"guide.askTangu")},o))}),t==="progress"?r(lg,{g:e}):r(cg,{g:e})]})}function Hc({g:e}){Po(e);let t=e.companionChapter(),n=rr(t,e.env())==="done",o=te(n);return Q(()=>{if(n&&!o.current){let a=window.setTimeout(()=>e.ctx.closeView?.(Lt.companion),1500);return()=>window.clearTimeout(a)}o.current=n},[n]),r(Mo,{g:e,kind:"companion",children:r("div",{class:"fxg-pane",children:[r("div",{class:"fxg-companion-head",children:[r("span",{class:"fxg-sub",children:e.t("guide.title")}),e.ctx.closeView&&r("button",{type:"button",class:"fxg-icon-btn","aria-label":e.t("guide.companion.close"),onClick:()=>e.ctx.closeView?.(Lt.companion),children:"\xD7"})]}),r("div",{class:"fxg-h",children:e.title(t)}),r("div",{class:"fxg-sub",children:e.t("guide.tasks")}),r(ci,{g:e,chapter:t}),r("button",{type:"button",class:"fx-link fxg-back",onClick:()=>void e.openGuide(t.id),children:e.t("guide.companion.back")})]})})}function Vc({g:e,letter:t}){Po(e);let n=t?t.kind==="level"?t.level:"new":null,o=n&&(n==="new"||Ao(n,e.env()))?Rt(n):[];return r(Mo,{g:e,kind:"letter",children:[o.map(a=>r("div",{class:"fxg-letter-chapter",children:[r("button",{type:"button",class:"fxg-letter-title",onClick:()=>void e.openGuide(a.id),children:e.title(a)}),r(ci,{g:e,chapter:a})]},a.id)),r("button",{type:"button",class:"btn sm",onClick:()=>void e.openGuide(o[0]?.id??yn("welcome")?.id),children:e.t("guide.letter.open")})]})}function pg(e){return!!e&&typeof e.registerView=="function"&&typeof e.registerListSource=="function"&&typeof e.openView=="function"&&typeof e.achievements?.count=="function"&&typeof e.achievements.subscribe=="function"&&typeof e.app?.openSpace=="function"&&typeof e.ui?.mountMarkdownEditor=="function"}function jc(e,t=window){if(!pg(e)||t.tangu?.unitPage)return null;let n=t.tangu,o=Rc(e,{desktop:typeof n?.appVersion=="function"&&!n.mobile,appVersion:typeof n?.appVersion=="function"?n.appVersion().catch(()=>null):Promise.resolve(null)}),a=i=>s=>(Be(r(i,{g:o}),s),()=>{Be(null,s)});return e.registerView({id:Lt.reader,title:o.t("guide.title"),icon:"page",workspaceSource:li,mount:a(Bc)}),e.registerView({id:Lt.side,title:o.t("guide.progress"),icon:"list-view",mount:a(qc)}),e.registerView({id:Lt.companion,title:o.t("guide.title"),icon:"todo",mount:a(Hc)}),e.registerListSource({id:li,title:o.t("guide.title"),search:!0,items:i=>{let s=o.env(),l=i?.query?.trim().toLowerCase()??"",c=o.justUnlocked();return Eo(o).flatMap(({level:d,chapters:f})=>f.map(u=>{let p=rr(u,s);return{key:u.id,title:o.title(u),group:o.levelName(d),icon:p==="done"?"circle-check":p==="locked"?"lock":"circle",hint:d===c&&p!=="locked"?o.t("guide.justUnlocked"):void 0}})).filter(d=>!l||d.title.toLowerCase().includes(l))},subscribe:i=>o.subscribe(i),activeKey:()=>o.selected().id,open:i=>{o.select(i.key),e.openView(Lt.reader)}}),e.registerCommand?.({id:"open-guide",title:()=>o.t("guide.cmd.open"),keywords:"guide manual help tutorial levels \u4F7F\u7528\u6307\u5357 \u8BF4\u660E\u4E66 \u6559\u7A0B \u5E2E\u52A9 \u7B49\u7EA7 \u4EFB\u52A1",run:()=>{o.openGuide()}}),e.inbox?.registerCard({sender:()=>o.t("guide.title"),mount(i,s){return Be(r(Vc,{g:o,letter:o.letter(s.id)}),i),()=>{Be(null,i)}}}),o}var Xe=e=>Number.isFinite(Number(e))?Number(e):0,vt="penzor",Ro=e=>e?.apps?.apps.find(t=>t.appId===vt)?.bytes??0,Xc=500;async function fg(e,t){let n=Math.min(20,Xe(t.totalPages));if(n<=1)return t.files;let o=await Promise.all(Array.from({length:n-1},(a,i)=>e(`/exports/list?pageSize=${Xc}&sortBy=date&sortOrder=desc&page=${i+2}`)));return[...t.files,...o.flatMap(a=>a.ok&&Array.isArray(a.data?.files)?a.data.files:[])]}async function Kc(e){let[t,n,o,a,i,s]=await Promise.all([e("/remotesync/vaults"),e("/amadeus/vaults"),e("/storage/quota"),e("/storage/files-by-app"),e(`/exports/list?pageSize=${Xc}&sortBy=date&sortOrder=desc`),e("/trash?all=1")]),c=[t,n,o,a,i,s].every(f=>!f.ok&&f.status===401);return{snap:{sync:t.ok&&Array.isArray(t.data?.vaults)?t.data:null,ama:n.ok&&Array.isArray(n.data?.vaults)?n.data.vaults.filter(f=>(f.role??"owner")==="owner").map(f=>({id:f.id,name:f.name,sizeBytes:Xe(f.sizeBytes)})):null,apps:o.ok&&a.ok&&Array.isArray(a.data?.apps)?{used:Xe(o.data?.used),quota:Xe(o.data?.quota),apps:a.data.apps,largest:a.data.largest??[]}:null,exports:i.ok&&Array.isArray(i.data?.files)?{files:await fg(e,i.data),total:Xe(i.data.total),totalBytes:Xe(i.data.totalBytes)}:null,trash:s.ok&&Array.isArray(s.data)?s.data:null,at:Date.now()},signedOut:c}}var Wc=(e,t)=>t>0?{used:e,max:t,pct:Math.min(100,e/t*100),warn:e/t>=.9}:null;function di(e){let t=e.sync?Xe(e.sync.usedBytes):0,n=e.ama?e.ama.reduce((d,f)=>d+f.sizeBytes,0):0,o=e.apps?Xe(e.apps.used):0,a=e.exports?Xe(e.exports.totalBytes):0,i=[["sync",t],["ama",n],["apps",o],["exports",a]].filter(([,d])=>d>0).map(([d,f])=>({ledger:d,bytes:f})),s=e.sync?.vaults.map(d=>d.updatedAt).filter(d=>!!d).sort().pop()??null,l=e.trash??[],c=!e.sync?.vaults.length&&!e.ama?.length&&!e.apps?.apps.length&&!e.exports?.files.length&&!l.length;return{total:t+n+o+a,segments:i,sync:e.sync?{bytes:t,vaults:e.sync.vaults.length,meter:Wc(t,Xe(e.sync.maxBytes)),updatedAt:s,maxFileBytes:Xe(e.sync.maxFileBytes)}:null,ama:e.ama?{bytes:n,vaults:e.ama.length}:null,apps:e.apps?{bytes:o,apps:e.apps.apps.filter(d=>d.files>0&&d.appId!==vt).map(d=>d.appId),meter:Wc(o,Xe(e.apps.quota)),trashCount:Do(l).length,trashBytes:l.reduce((d,f)=>d+Xe(f.fileSize),0)}:null,exports:e.exports?{bytes:a,count:e.exports.total,latest:e.exports.files[0]??null}:null,empty:c}}var mg={"ai-studio":"AI Studio","photo-studio":"Photo Studio",notebase:"Notebase",chat:"Forsion Chat",connect:"Forsion Connect","video-studio":"Video Studio",bluebird:"Bluebird",cnti:"CNTI"},ui=e=>e?mg[e]??e.split(/[-_]/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" "):"\u2014",ir=e=>e.kind==="sync"?`sync:${e.vault}`:e.kind==="ama"?`ama:${e.vaultId}`:e.kind==="app"?`app:${e.appId}`:e.kind==="overview"?"ov":e.kind,Un=e=>e.kind==="overview"||e.kind==="sync-home";function Jc(e){if(e==="ov")return{kind:"overview"};if(e==="sync-home"||e==="exports"||e==="trash")return{kind:e};let t=e.indexOf(":"),n=t<0?e:e.slice(0,t),o=t<0?"":e.slice(t+1);return o?n==="sync"?{kind:"sync",vault:o}:n==="ama"?{kind:"ama",vaultId:o}:n==="app"?{kind:"app",appId:o}:null:null}function Yc(e,t,n){let o=[{key:"ov",title:t.overview,icon:"layout"}];if(!e)return o;let a=i=>Or(i,n);if(e.apps&&o.push({key:`app:${vt}`,title:t.drive,icon:t.driveIcon,hint:a(Ro(e))}),e.sync){o.push({key:"sync",title:t.sync,kind:"folder",icon:"refresh",hint:a(Xe(e.sync.usedBytes))});for(let i of e.sync.vaults)o.push({key:`sync:${i.vault}`,parent:"sync",title:i.vault,icon:"database",hint:a(i.bytes)})}if(e.ama){o.push({key:"ama",title:t.ama,kind:"folder",icon:"cloud",hint:a(e.ama.reduce((i,s)=>i+s.sizeBytes,0))});for(let i of e.ama)o.push({key:`ama:${i.id}`,parent:"ama",title:i.name,icon:"page",hint:a(i.sizeBytes)})}if(e.apps){o.push({key:"apps",title:t.apps,kind:"folder",icon:"archive",hint:a(Math.max(0,Xe(e.apps.used)-Ro(e)))});for(let i of e.apps.apps.filter(s=>s.files>0&&s.appId!==vt))o.push({key:`app:${i.appId}`,parent:"apps",title:ui(i.appId),icon:"image",hint:a(i.bytes)})}return e.exports&&o.push({key:"exports",title:t.exports,icon:"attachment",hint:a(e.exports.totalBytes)}),e.trash&&o.push({key:"trash",title:t.trash,icon:"trash",hint:t.items(Do(e.trash).length)}),o}function Do(e){let t=new Map(e.map(a=>[a.id,a])),n=a=>{let i=a;for(let s=0;s<64&&i.parentId&&t.has(i.parentId);s++)i=t.get(i.parentId);return i},o=new Map;for(let a of e){let i=n(a),s=o.get(i.id)??{inner:0,innerBytes:0};i.id!==a.id&&s.inner++,s.innerBytes+=Xe(a.fileSize),o.set(i.id,s)}return e.filter(a=>!(a.parentId&&t.has(a.parentId))).map(a=>({...a,...o.get(a.id)}))}function Zc(e,t){let n=t?`${t}/`:"",o=new Map,a=[];for(let i of e){if(n&&!i.path.startsWith(n))continue;let s=i.path.slice(n.length),l=s.indexOf("/");if(l<0){a.push({key:i.path,name:s,dir:!1,size:i.size,mtime:i.mtime,col4:i.who??null,ref:i.ref});continue}let c=s.slice(0,l),d=n+c,f=o.get(d)??{key:d,name:c,dir:!0,size:0,mtime:null,count:0};f.size+=i.size,f.count=(f.count??0)+1,i.mtime!=null&&(f.mtime==null||i.mtime>f.mtime)&&(f.mtime=i.mtime),o.set(d,f)}return[...Lo([...o.values()]),...Lo(a)]}var Lo=e=>e.sort((t,n)=>(n.mtime??-1)-(t.mtime??-1)||t.name.localeCompare(n.name)),Qc=e=>[...Lo(e.filter(t=>t.dir)),...Lo(e.filter(t=>!t.dir))];function Or(e,t){let n=Math.max(0,Xe(e));if(n<1024)return`${n} B`;if(n<1024*1024)return`${Math.round(n/1024)} KB`;if(n<1024**3){let o=n/1048576;return`${o<100?Number(o.toFixed(1)):Math.round(o)} MB`}return`${Number((n/1024**3).toFixed(2))} GB`}function pi(e,t,n){let o=Or(e,n),a=Or(t,n),i=a.slice(a.indexOf(" "));return`${o.endsWith(i)?o.slice(0,-i.length):o} / ${a}`}var gg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Gc=e=>String(e).padStart(2,"0");function Vt(e,t,n=Date.now()){if(e==null||!Number.isFinite(e))return"\u2014";let o=new Date(e),a=new Date(n);a.setHours(0,0,0,0);let i=new Date(o);i.setHours(0,0,0,0);let s=Math.round((a.getTime()-i.getTime())/864e5),l=`${Gc(o.getHours())}:${Gc(o.getMinutes())}`;if(s===0)return t==="zh"?`\u4ECA\u5929 ${l}`:`Today ${l}`;if(s===1)return t==="zh"?`\u6628\u5929 ${l}`:`Yesterday ${l}`;let c=o.getFullYear()===a.getFullYear();return t==="zh"?`${c?"":`${o.getFullYear()} \u5E74 `}${o.getMonth()+1} \u6708 ${o.getDate()} \u65E5`:`${gg[o.getMonth()]} ${o.getDate()}${c?"":`, ${o.getFullYear()}`}`}function xn(e){if(e==null||e==="")return null;if(typeof e=="number")return e<1e12?e*1e3:e;let t=Number(e);if(Number.isFinite(t))return t<1e12?t*1e3:t;let n=Date.parse(String(e));return Number.isNaN(n)?null:n}var ed=e=>[e.notes.on&&!e.notes.pending,e.agents.on,e.plugins.on].filter(Boolean).length,td=e=>!e.decided||!!e.notes.pending||!e.notes.on&&!e.agents.on&&!e.plugins.on;function fi(e){let t=e.notes.last;return!!t&&t.ok===!1&&!(t.errors.length>0&&t.errors.every(n=>n.includes("already-running")))}var No=e=>!!e&&e.signedIn&&(!!e.notes.pending||e.notes.on&&fi(e)),hg=e=>/"code"\s*:\s*"QUOTA"/.test(e),nd=(e,t)=>e.notes.on&&!e.notes.pending&&e.notes.backend==="penzor"&&(t>0&&(e.notes.localBytes??0)>t||!!e.notes.last?.errors.some(hg));function Fr(e){if(!e?.notes.running)return null;let t=e.notes.progress;return t&&t.total>0?Math.min(1,Math.max(0,t.done/t.total)):0}function rd(e,t){if(!e||!e.signedIn)return;let n=Fr(e);if(n!=null)return n>0?Te(t,"penzor.sync.running",{pct:Math.round(n*100)}):Te(t,"penzor.sync.runningPlain");if(e.notes.pending)return Te(t,"penzor.sync.waiting");let o=ed(e);return o?Te(t,"penzor.sync.onN",{n:o}):Te(t,"penzor.sync.allOff")}function od(e,t){let n=ed(e);return e.notes.pending?Te(t,"penzor.sync.badgeWaiting",{n}):n?Te(t,"penzor.sync.onN",{n}):Te(t,"penzor.sync.allOff")}function mi(e,t){let n=Math.max(0,Math.round(e.intervalMin)),o=n?n%60===0?Te(t,"penzor.sync.everyHours",{n:n/60}):Te(t,"penzor.sync.every",{n}):Te(t,"penzor.sync.manual");return e.syncOnStart?`${o} \xB7 ${Te(t,"penzor.sync.onStart")}`:o}function gi(e,t,n=Date.now()){if(e==null||!Number.isFinite(e))return"\u2014";let o=Math.max(0,n-e);return o<6e4?Te(t,"penzor.justNow"):o<36e5?Te(t,"penzor.sync.minAgo",{n:Math.floor(o/6e4)}):o<6*36e5?Te(t,"penzor.sync.hoursAgo",{n:Math.floor(o/36e5)}):Vt(e,t,n)}function $r(e,t=!1){return t?"folder":/\.(png|jpe?g|gif|webp|heic|dng|svg|bmp|tiff?)$/i.test(e)?"image":/\.(md|txt|pdf|docx?|rtf)$/i.test(e)?"page":/\.db$/i.test(e)?"database":"attachment"}var on="forsion-penzor",an={main:"penzor",info:"penzor-info"},bi="penzor-places",vi="forsion-extend.penzor.ready",ad="forsion-extend.penzor.focus",Oo=e=>e.state==="active"||e.state==="queued",Fo=e=>e.ok?"":e.detail||e.code||e.transport||(e.status?`HTTP ${e.status}`:"offline"),hi=e=>e.slice(e.lastIndexOf("/")+1);function id(e,t={}){let n=t.api??J,o=new Set,a=()=>{for(let v of[...o])try{v()}catch(S){console.error("[penzor] listener failed",S)}},i=()=>Qe(e.getLocale?.()),s=(v,S)=>Te(i(),v,S),l=v=>Or(v,i()),c=v=>e.app?.notify?.(v),d=v=>c(s("penzor.toast.failed",{reason:typeof v=="string"?v:Fo(v)})),f="unknown",u=!1,p=null,g=null,m={kind:"overview"},y="",_=[],E=null,x=null,k=null,R="mtime",B="",j=null,w={kind:"view"},A=!1,P=null,I=null,N=0,V=0,X=0,oe=t.device??null,b=[],C=new Map,L=new Set,K=null,ie=null,pe=[],He=[],Pe="hidden",yt=0,ve=!1,et=0,jt=!1,kn=null,wn=!1,zn=null,lr=new Map,Wt=null,Ye=typeof e.app?.sync?.get=="function"?e.app.sync:null,Gt=new Map,he=new Set,Xt=!1,ye=!1,Kt=!1,tt=!1,_n=1e4,Br=4e3,Dt=v=>{let S=R==="size"?(T,U)=>U.size-T.size:R==="name"?(T,U)=>T.name.localeCompare(U.name):null;return S?[...v.filter(T=>T.dir).sort(S),...v.filter(T=>!T.dir).sort(S)]:Qc([...v])};async function Ur(){let v=++N,S=m;if(x=null,S.kind==="overview"||S.kind==="sync-home"){E=null;return}if(S.kind==="exports"){E=(g?.exports?.files??[]).map(H=>({key:H.fileId,name:H.fileName,dir:!1,size:H.size,mtime:xn(H.createdAt),col4:at(H.appId),ref:H}));return}if(S.kind==="trash"){E=Do(g?.trash??[]).map(H=>({key:H.id,name:H.name,dir:H.fileType==="directory",size:H.fileType==="directory"?H.innerBytes:H.fileSize,mtime:xn(H.deletedAt),col4:H.parentName?`${at(H.appId)} / ${H.parentName}`:at(H.appId),count:H.fileType==="directory"?H.inner:void 0,ref:H}));return}if(E=null,a(),S.kind==="sync"||S.kind==="ama"){let H=ir(S),W=C.get(H);if(!W){if(S.kind==="sync"){let xe=await n(`/remotesync/vaults/${encodeURIComponent(S.vault)}/manifest`);if(v!==N)return;if(!xe.ok){x=Fo(xe),a();return}W=xe.data.files.map(ke=>({path:ke.path,size:ke.size,mtime:xn(ke.mtimeMs),who:ke.device??null,ref:ke}))}else{let xe=await n(`/amadeus/vaults/${encodeURIComponent(S.vaultId)}/tree`);if(v!==N)return;if(!xe.ok){x=Fo(xe),a();return}W=(xe.data.entries??[]).map(ke=>({path:ke.path,size:ke.size,mtime:xn(ke.updatedAt),ref:ke}))}C.set(H,W)}E=Zc(W,y);return}let T=_[_.length-1]?.id,U=await n(`/files${T?`?parentId=${encodeURIComponent(T)}`:""}`,{projectSource:S.appId});if(v===N){if(!U.ok){x=Fo(U),a();return}E=U.data.map(H=>({key:H.id,name:H.name,dir:H.fileType==="directory",size:Number(H.fileSize)||0,mtime:xn(H.updatedAt),ref:H}))}}let Nt=()=>{if(!E)return null;let v=B.trim().toLowerCase(),S=v?E.filter(T=>T.name.toLowerCase().includes(v)):E;return Dt(S)},qr=()=>{let v=Nt()??[],S=new Set(v.map(T=>T.key));if(L=new Set([...L].filter(T=>S.has(T))),k&&S.has(k)){L.add(k);return}k=(v.find(T=>!T.dir)??v[0])?.key??null,L=new Set(k?[k]:[]),K=k,wt()},xt=()=>{k=null,L=new Set,K=null,ie=null},at=v=>v===vt?s("penzor.drive"):ui(v),nt=()=>m.kind==="app"&&m.appId===vt,pt=()=>m.kind==="app"||m.kind==="sync"||m.kind==="ama",Ot=()=>m.kind==="app"?_[_.length-1]?.id??"ROOT":"ROOT",Hn=()=>(Nt()??[]).filter(v=>L.has(v.key)),kt=(v,S)=>{let T=re().cloudInvoke;return T?T(v,S).catch(U=>({ok:!1,error:String(U?.message||U)})):Promise.resolve({ok:!1,error:"no_bridge"})};function Jt(v=500){kn||wn||(kn=setTimeout(()=>{kn=null,ft()},v))}async function ft(){let v=await kt("penzor:transfers");if(wn)return;let S=new Map(pe.map(xe=>[xe.id,xe.state]));v?.ok&&Array.isArray(v.items)&&(pe=v.items);let T=Date.now(),U=pe.some(Oo);pe.some(xe=>xe.kind==="up"&&xe.state==="done"&&S.get(xe.id)&&S.get(xe.id)!=="done"&&nt()&&(xe.parentId===Ot()||xe.targetId===Ot()))&&(Wt&&clearTimeout(Wt),Wt=setTimeout(()=>{Wt=null,$t()},300)),U?(zn==null&&(zn=T),et=0,Pe==="hidden"&&(Pe="open",yt=T),Pe==="open"&&!ve&&T-yt>_n&&(Pe="pill")):zn!=null&&(Vn(zn),zn=null);let H=pe.some(xe=>xe.state==="failed")||He.length>0,W=pe.some(xe=>xe.state==="paused");!U&&!W&&pe.length&&!H&&Pe!=="hidden"&&(et?T-et>Br&&!ve&&(Pe="hidden",et=0,zt.txClear("finished")):(et=T,Pe==="pill"&&(Pe="open"))),!U&&H&&Pe==="pill"&&(Pe="open"),!pe.length&&!He.length&&(Pe="hidden"),Sn(),a(),(U||Pe!=="hidden"&&et)&&Jt()}function Vn(v){let S=pe.filter(W=>(W.finishedAt??0)>=v),T=S.filter(W=>W.kind==="up"&&W.state==="done"),U=S.filter(W=>W.kind==="down"&&W.state==="done"),H=S.filter(W=>W.state==="failed");T.length&&We(),!jt&&(H.length?c(s("penzor.toast.txFailed",{n:H.length})):T.length?c(T.length===1?s("penzor.toast.upDoneOne",{name:T[0].name}):s("penzor.toast.upDoneMany",{n:T.length})):U.length&&c(U.length===1?s("penzor.toast.downloaded",{name:U[0].name}):s("penzor.toast.downDoneMany",{n:U.length})))}function Sn(){let v=pe.filter(Oo),S=v.reduce((U,H)=>U+Math.max(H.size,H.done),0),T=v.length?S>0?Math.min(1,v.reduce((U,H)=>U+H.done,0)/S):0:null;e.app?.setSpaceProgress?.(on,T??Fr(Ye?.get()??null))}function cr(){if(!Ye)return;let v=No(Ye.get());v!==tt&&(tt=v,e.app?.setSpaceDot?.(on,v))}function dr(){if(!ye||!Ye)return;let v=Ye.get();if(!v)return;ye=!1;let S=td(v);m.kind==="overview"&&S?(m={kind:"sync-home"},Kt=!0,a()):m.kind==="sync-home"&&Kt&&!S&&(m={kind:"overview"},Kt=!1,a())}function jn(){Ye?.get()?.notes.pending||(Xt=!1),dr(),Sn(),cr(),a()}let ur=()=>{let v=Ye?.get()??null;if(!v||!Gt.size)return v;let S=(T,U)=>Gt.has(T)?{...U,on:Gt.get(T)}:U;return{...v,notes:S("notes",v.notes),agents:S("agents",v.agents),plugins:S("plugins",v.plugins)}},Wn=async v=>{try{return await v()??{ok:!1}}catch(S){return{ok:!1,error:String(S?.message||S)}}},Ft=()=>{Pe="open",yt=Date.now(),et=0};async function wt(){P=null;let v=pr();if(m.kind!=="app"||!v||v.dir){a();return}let S=v.key,T=await n(`/files/${encodeURIComponent(S)}/versions`);k===S&&(P=T.ok&&Array.isArray(T.data)?T.data.map(U=>({versionNumber:U.versionNumber,fileSize:Number(U.fileSize)||0,createdAt:xn(U.createdAt)})):[],a())}let pr=()=>k?(E??[]).find(v=>v.key===k)??null:null;async function $t(){await Ur(),qr(),a()}async function We(){let v=++X;u=!0,p=null,a();let S=await re().authStatus?.().catch(()=>null);if(v!==X)return;if(S&&!S.loggedIn){f="out",g=null,u=!1,a();return}let{snap:T,signedOut:U}=await Kc(n);if(v===X){if(u=!1,U){f="out",g=null,a();return}f="in",g=T,C.clear(),p=!T.sync&&!T.ama&&!T.apps&&!T.exports&&!T.trash?s("penzor.unreachable"):null,!Un(m)&&m.kind!=="exports"&&m.kind!=="trash"&&((m.kind==="sync"?T.sync?.vaults.some(W=>W.vault===m.vault):m.kind==="ama"?T.ama?.some(W=>W.id===m.vaultId):m.appId===vt?T.apps:T.apps?.apps.some(W=>W.appId===m.appId&&W.files>0))||(m={kind:"overview"},y="",_=[],xt())),await $t(),Hr(T)}}async function Hr(v){let S=[],T=(v.sync?.vaults??[]).slice(0,8),[U,H]=await Promise.all([Promise.all(T.map(W=>n(`/remotesync/vaults/${encodeURIComponent(W.vault)}/manifest`))),v.ama?n("/amadeus/attachments"):Promise.resolve(null)]);if(g===v){if(U.forEach((W,xe)=>{let ke=T[xe];if(!W.ok)return;let Uo=W.data.files.map(_t=>({path:_t.path,size:_t.size,mtime:xn(_t.mtimeMs),who:_t.device??null,ref:_t}));C.set(`sync:${ke.vault}`,Uo);for(let _t of[...W.data.files].sort((Me,dn)=>dn.size-Me.size).slice(0,6))S.push({key:`s:${ke.vault}:${_t.path}`,name:hi(_t.path),where:`${s("penzor.ledger.sync")} \xB7 ${ke.vault}`,size:_t.size,go:`sync:${ke.vault}`})}),H?.ok)for(let W of[...H.data.attachments??[]].sort((xe,ke)=>ke.size-xe.size).slice(0,6))S.push({key:`m:${W.vaultId}:${W.path}`,name:hi(W.path),where:`${s("penzor.ledger.ama")} \xB7 ${W.vaultName}`,size:W.size,go:`ama:${W.vaultId}`});b=S,a()}}async function fr(v,S={},T=m){let U=T.kind==="sync"?{path:`/remotesync/vaults/${encodeURIComponent(T.vault)}/file?path=${encodeURIComponent(v.key)}`,mode:"signed"}:T.kind==="ama"?v.ref.kind==="binary"?{path:`/amadeus/vaults/${encodeURIComponent(T.vaultId)}/asset?ref=${encodeURIComponent(v.key)}`,mode:"bytes"}:{path:`/amadeus/vaults/${encodeURIComponent(T.vaultId)}/file?path=${encodeURIComponent(v.key)}`,mode:"text"}:T.kind==="app"?{path:`/files/${encodeURIComponent(v.key)}/content`,mode:"bytes"}:T.kind==="exports"?{path:`/exports/${encodeURIComponent(v.key)}/url`,mode:"signed"}:null;if(!U)return;let H=await kt("penzor:download",{...U,name:hi(v.name),size:v.size,...S});if(!H?.ok){d(H?.error||"download");return}Ft(),Jt(0),a()}let Cn=()=>{Un(m)?e.closeView?.(an.info,{collapse:!0}):e.openView?.(an.info,{location:"right"})},zt={ctx:e,locale:i,t:s,b:l,subscribe(v){return o.add(v),()=>{o.delete(v)}},auth:()=>f,loading:()=>u,error:()=>p,snap:()=>g,loc:()=>m,path:()=>y,appStack:()=>_,rows:Nt,rowsError:()=>x,selected:pr,sort:()=>R,query:()=>B,menu:()=>j,side:()=>w,confirmEmpty:()=>A,versions:()=>P,moveFolders:()=>I,thisDevice:()=>oe,setDevice(v){oe=v,a()},largest:()=>b,appLabel:at,canWrite:nt,canMulti:pt,folderId:Ot,selection:Hn,isSelected:v=>L.has(v),selectAll(){if(!pt())return;let v=Nt()??[];L=new Set(v.map(S=>S.key)),!k&&v[0]&&(k=v[0].key),j=null,a()},newFolder:()=>ie,startNewFolder(){if(!nt())return;let v=s("penzor.newFolder.default"),S=new Set((E??[]).filter(U=>U.dir).map(U=>U.name)),T=v;for(let U=1;S.has(T)&&U<1e3;U++)T=`${v} (${U})`;ie=T,j=null,a()},cancelNewFolder(){ie!=null&&(ie=null,a())},async createFolder(v){let S=v.trim();if(ie=null,!S||!nt()){a();return}a();let T=await n("/files",{method:"POST",body:{type:"directory",parentId:Ot(),name:S},projectSource:vt});if(!T.ok){T.status===409?c(s("penzor.toast.folderExists",{name:S})):d(T);return}T.data?.id&&(k=T.data.id,L=new Set([T.data.id]),K=T.data.id),await $t()},transfers:()=>pe,notices:()=>He,txRows(){if(!nt())return[];let v=Ot();return pe.filter(S=>S.kind==="up"&&S.projectSource===vt&&S.parentId===v&&(Oo(S)||S.state==="paused")).map(S=>({key:`tx:${S.id}`,id:S.id,name:S.name,size:S.size,done:S.done,state:S.state}))},card:()=>Pe,setCard(v){Pe=v,yt=Date.now(),v!=="hidden"&&Jt(0),a()},holdCard(v){ve=v,yt=Date.now(),v||Jt()},async upload(v,S){if(!nt())return;let T=S?.id??Ot(),U=S?[..._,S]:[..._],H=await v;if(!H.length)return;lr.set(T,U);let W=await kt("penzor:upload",{...typeof H[0]=="string"?{paths:H}:{files:H},parentId:T,projectSource:vt});if(W?.ok){Ft(),Jt(0),a();return}if(W?.error==="quota"){He=[...He,{id:String(Date.now()),kind:"quota",short:Number(W.short)||0}],Ft(),a();return}if(W?.error==="too_many"){c(s("penzor.err.too_many",{n:Number(W.max)||2e3}));return}W?.error!=="no_files"&&d(W?.error==="account_changed"?s("penzor.err.account_changed"):W?.error==="not_signed_in"?s("penzor.err.not_signed_in"):W?.error||"upload")},async txOp(v,S){await kt("penzor:transfer",{id:v,op:S}),yt=Date.now(),await ft()},async txAll(v){let S=v==="pause"?T=>Oo(T):v==="resume"?T=>T.state==="paused":T=>T.state==="failed"||T.state==="canceled";for(let T of pe.filter(S))await kt("penzor:transfer",{id:T.id,op:v});v==="retry"&&(He=[]),yt=Date.now(),await ft()},async txClear(v){await kt("penzor:transfers:clear",{which:v}),v==="all"&&(He=[]),await ft()},dismissNotice(v){He=He.filter(S=>S.id!==v),!pe.length&&!He.length&&(Pe="hidden"),a()},locate(v){if(v.kind==="down"){v.localPath&&re().revealHostPath?.(v.localPath);return}let S=lr.get(v.targetId??"")??[];m={kind:"app",appId:vt},_=S,y="",B="",w={kind:"view"},j=null,xt(),v.fileId&&v.parentId===v.targetId&&(k=v.fileId,L=new Set([v.fileId])),a(),e.app?.openSpace?.(on).then(()=>{e.openView?.(an.main),Cn()}),$t()},async downloadMany(v){let S=v.filter(ke=>!ke.dir);if(S.length<=1){S[0]&&await zt.download(S[0]);return}let T=new Date,U=s("penzor.download.folder",{date:`${T.getFullYear()}-${String(T.getMonth()+1).padStart(2,"0")}-${String(T.getDate()).padStart(2,"0")}`}),H=`${Date.now()}`,W=m,xe=V;for(let ke of S){if(V!==xe)break;await fr(ke,{subdir:U,batch:H},W)}},async trashMany(v){if(m.kind!=="app"||!v.length)return;if(v.length===1){await zt.trash(v[0]);return}let S=await n("/files/batch/delete",{method:"POST",body:{ids:v.map(U=>U.key)},projectSource:m.appId});if(!S.ok){d(S);return}let T=(S.data?.results??[]).filter(U=>U.success===!1).length;c(T?s("penzor.toast.batchPartial",{n:T}):s("penzor.toast.trashedN",{n:v.length})),xt(),await We()},async moveMany(v,S){if(m.kind!=="app"||!v.length)return;w={kind:"view"};let T=v.map(W=>W.key).filter(W=>W!==S.id),U=await n("/files/batch/move",{method:"POST",body:{ids:T,parentId:S.id},projectSource:m.appId});if(!U.ok){d(U),a();return}let H=(U.data?.results??[]).filter(W=>W.success===!1).length;c(H?s("penzor.toast.batchPartial",{n:H}):s("penzor.toast.movedN",{n:T.length,name:S.name})),xt(),await We()},setVisible(v){jt=v},picker:{},refresh:We,go(v){let S=Jc(v);if(!S)return;let T=ir(S)===ir(m);m=S,ye=!1,Kt=!1,T||(y="",_=[],xt(),B="",w={kind:"view"},A=!1),j=null,a(),e.openView?.(an.main),Cn(),$t()},openDir(v){!v.dir||m.kind==="exports"||m.kind==="trash"||(m.kind==="app"?_=[..._,{id:v.key,name:v.name}]:y=v.key,xt(),B="",w={kind:"view"},$t())},up(v){if(m.kind==="app")_=_.slice(0,v??Math.max(0,_.length-1));else{let S=y?y.split("/"):[];y=S.slice(0,v??Math.max(0,S.length-1)).join("/")}xt(),w={kind:"view"},$t()},select(v,S){let T=Nt()??[];if(v&&S?.range&&pt()&&K&&T.some(U=>U.key===K)){let U=T.findIndex(W=>W.key===K),H=T.findIndex(W=>W.key===v.key);L=new Set(T.slice(Math.min(U,H),Math.max(U,H)+1).map(W=>W.key)),k=v.key}else v&&S?.toggle&&pt()?(L.has(v.key)&&L.size>1?(L.delete(v.key),k===v.key&&(k=[...L].pop()??null)):(L.add(v.key),k=v.key),K=v.key):(k=v?.key??null,L=new Set(k?[k]:[]),K=k);ie=null,w={kind:"view"},j=null,v&&!Un(m)&&e.openView?.(an.info,{location:"right"}),wt(),a()},setSort(v){R=v,a()},setQuery(v){B=v,a()},openMenu(v,S,T){T&&!L.has(T.key)&&(k=T.key,L=new Set([T.key]),K=T.key,wt()),j={x:v,y:S,row:T},w={kind:"view"},a()},closeMenu(){j&&(j=null,a())},setSide(v){w=v,j=null,v.kind==="move"&&(I=null,zt.moveBrowse(v.at)),e.openView?.(an.info,{location:"right"}),a()},setConfirmEmpty(v){A=v,a()},async download(v){v.dir||(j=null,await fr(v))},async trash(v){if(m.kind!=="app")return;let S=Nt()??[],T=S.findIndex(W=>W.key===v.key),U=await n(`/files/${encodeURIComponent(v.key)}`,{method:"DELETE",projectSource:m.appId});if(!U.ok){d(U);return}c(s("penzor.toast.trashed",{name:v.name}));let H=S[T+1]??S[T-1];k=H&&H.key!==v.key?H.key:null,j=null,await We()},async restore(v){if(!g)return;let S=await n(`/trash/${encodeURIComponent(v.key)}/restore`,{method:"POST",body:{}});if(!S.ok){d(S);return}c(s("penzor.toast.restored",{name:v.name})),k=null,await We()},async purge(v){if(!g)return;let S=await n(`/trash/${encodeURIComponent(v.key)}`,{method:"DELETE"});if(w={kind:"view"},!S.ok){d(S),a();return}c(s("penzor.toast.purged",{name:v.name})),k=null,await We()},async emptyTrash(){if(!g)return;let v=await n("/trash?all=1",{method:"DELETE"});if(A=!1,!v.ok){d(v),a();return}let S=(v.data?.results??[]).filter(T=>T.success===!1).length;c(S?s("penzor.toast.emptyPartial",{n:S}):s("penzor.toast.emptied")),k=null,await We()},async rename(v,S){let T=S.trim();if(w={kind:"view"},!T||T===v.name){a();return}let U=m.kind==="exports"?await n(`/exports/${encodeURIComponent(v.key)}/rename`,{method:"PUT",body:{newFileName:T}}):m.kind==="app"?await n(`/files/${encodeURIComponent(v.key)}/rename`,{method:"PATCH",body:{name:T},projectSource:m.appId}):null;if(U){if(!U.ok){d(U),a();return}c(s("penzor.toast.renamed",{name:T})),await We()}},moveBrowse(v){if(m.kind!=="app")return;w={kind:"move",at:v},I=null,a();let S=v[v.length-1]?.id,T=m.appId;n(`/files${S?`?parentId=${encodeURIComponent(S)}`:""}`,{projectSource:T}).then(U=>{w.kind!=="move"||w.at!==v||(I=U.ok?U.data.filter(H=>H.fileType==="directory").map(H=>({id:H.id,name:H.name})):[],a())})},async moveTo(v,S){if(m.kind!=="app")return;if(w={kind:"view"},S.id===v.key){a();return}let T=await n(`/files/${encodeURIComponent(v.key)}/move`,{method:"PATCH",body:{parentId:S.id},projectSource:m.appId});if(!T.ok){d(T),a();return}c(s("penzor.toast.moved",{name:S.name})),k=null,await We()},async restoreVersion(v,S){let T=await n(`/files/${encodeURIComponent(v.key)}/restore/${S.versionNumber}`,{method:"POST",body:{}});if(!T.ok){d(T);return}c(s("penzor.toast.versionRestored",{n:S.versionNumber})),await We(),wt()},async deleteExport(v){if(!g)return;let S=await n(`/exports/${encodeURIComponent(v.key)}`,{method:"DELETE"});if(w={kind:"view"},!S.ok){d(S),a();return}c(s("penzor.toast.purged",{name:v.name})),k=null,await We()},signIn(){re().forsionLogin?.()},openSync(){e.app?.openSettings?.("sync/s-remote")},async focusVault(v){await e.app?.openSpace?.(on),g||await We(),zt.go(`sync:${v}`)},hasSync:()=>!!Ye,syncState:ur,syncBusy:v=>he.has(v),async setSync(v,S){if(!Ye||he.has(v))return;he.add(v),Gt.set(v,S),a();let T=await Wn(()=>Ye.set(v,S));he.delete(v),Gt.delete(v),!wn&&(T.ok||d(T.error||"sync"),jn())},async resolveNotes(v){if(!Ye||he.has("resolve"))return;he.add("resolve"),a();let S=await Wn(()=>Ye.resolveNotes(v));he.delete("resolve"),Xt=!1,!wn&&(S.ok||d(S.error||"sync"),jn())},confirmCloud:()=>Xt,setConfirmCloud(v){Xt=v,a()},enter(){ye=!0,dr()},dispose(){wn=!0,kn&&clearTimeout(kn),Wt&&clearTimeout(Wt),e.app?.setSpaceProgress?.(on,null),tt&&e.app?.setSpaceDot?.(on,!1),o.clear(),mt?.(),mr?.(),cn?.()}},mt=e.subscribeLocale?.(()=>a()),cn=Ye?.subscribe(jn);cr(),ft();let mr=re().onAuthChanged?.(()=>{++N,++X,++V,g=null,E=null,x=null,b=[],C.clear(),xt(),j=null,w={kind:"view"},A=!1,P=null,I=null,m={kind:"overview"},y="",_=[],B="",lr.clear(),He=[],Xt=!1,Gt.clear(),Kt=!1,ye=!0,a(),We()});return zt}var sd=e=>e.kind==="sync"?"penzor.side.readonlySync":e.kind==="ama"?"penzor.side.readonlyAma":null;function vg(e,t){for(var n in t)e[n]=t[n];return e}function ld(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function cd(e,t){this.props=e,this.context=t}(cd.prototype=new Tt).isPureReactComponent=!0,cd.prototype.shouldComponentUpdate=function(e,t){return ld(this.props,e)||ld(this.state,t)};var dd=ae.__b;ae.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),dd&&dd(e)};var rx=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var yg=ae.__e;ae.__e=function(e,t,n,o){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k||[]),a.__c(e,t)}yg(e,t,n,o)};var ud=ae.unmount;function bd(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=vg({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return bd(o,t,n)})),e}function vd(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return vd(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function yi(){this.__u=0,this.o=null,this.__b=null}function yd(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function $o(){this.i=null,this.l=null}ae.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ud&&ud(e)},(yi.prototype=new Tt).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var a=yd(o.__v),i=!1,s=function(){i||o.__z||(i=!0,n.__R=null,a?a(c):c())};n.__R=s;var l=n.__P;n.__P=null;var c=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=vd(d,d.__c.__P,d.__c.__O)}var f;for(o.setState({__a:o.__b=null});f=o.o.pop();)f.__P=l,f.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},yi.prototype.componentWillUnmount=function(){this.o=[]},yi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=bd(this.__b,n,o.__O=o.__P)}this.__b=null}var a=t.__a&&Rn(F,null,e.fallback);return a&&(a.__u&=-33),[Rn(F,null,t.__a?null:e.children),a]};var pd=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function xg(e){return this.getChildContext=function(){return e.context},e.children}function kg(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Be(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(a,i){this.childNodes.push(a),t.h.insertBefore(a,i)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),t.h.removeChild(a)}}}Be(Rn(xg,{context:t.context},e.__v),t.v)}function xd(e,t){var n=Rn(kg,{__v:e,h:t});return n.containerInfo=t,n}($o.prototype=new Tt).__a=function(e){var t=this,n=yd(t.__v),o=t.l.get(e);return o[0]++,function(a){var i=function(){t.props.revealOrder?(o.push(a),pd(t,e,o)):a()};n?n(i):i()}},$o.prototype.render=function(e){this.i=null,this.l=new Map;var t=Tr(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},$o.prototype.componentDidUpdate=$o.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){pd(e,n,t)})};var wg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,zg=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,_g=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Sg=/[A-Z0-9]/g,Cg=typeof document<"u",Tg=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Tt.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var fd=ae.event;ae.event=function(e){return fd&&(e=fd(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var kd,Ag={configurable:!0,get:function(){return this.class}},md=ae.vnode;ae.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,o=t.type,a={},i=o.indexOf("-")==-1;for(var s in n){var l=n[s];if(!(s==="value"&&"defaultValue"in n&&l==null||Cg&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||Tg(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":_g.test(s)&&(s=c):c=s="oninput":i&&zg.test(s)?s=s.replace(Sg,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&a[s=c]&&(s="oninputCapture"),a[s]=l}}o=="select"&&(a.multiple&&Array.isArray(a.value)&&(a.value=Tr(n.children).forEach(function(d){d.props.selected=a.value.indexOf(d.props.value)!=-1})),a.defaultValue!=null&&(a.value=Tr(n.children).forEach(function(d){d.props.selected=a.multiple?a.defaultValue.indexOf(d.props.value)!=-1:a.defaultValue==d.props.value}))),n.class&&!n.className?(a.class=n.class,Object.defineProperty(a,"className",Ag)):n.className&&(a.class=a.className=n.className),t.props=a})(e),e.$$typeof=wg,md&&md(e)};var gd=ae.__r;ae.__r=function(e){gd&&gd(e),kd=e.__c};var hd=ae.diffed;ae.diffed=function(e){hd&&hd(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),kd=null};var wd=`
|
|
1110
1110
|
.pz, .pz-side { color: var(--text); font-family: var(--font-ui); font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
1111
1111
|
.pz { height: 100%; min-height: 0; display: flex; flex-direction: column; }
|
|
1112
1112
|
.pz-side { height: 100%; min-height: 0; overflow: auto; box-sizing: border-box; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
|
|
@@ -1299,5 +1299,15 @@ ${Pc(e,t)}`,d=await s({prompt:c,send:!1});d?.ok?r(""):i(d?.error||e.t("guide.ask
|
|
|
1299
1299
|
.pz-sync-none { margin: 8px 0 0; color: var(--text-faint); font-size: var(--ui-font-meta); }
|
|
1300
1300
|
@media (max-width: 720px) { .pz-sync-sub { padding-left: 16px; } .pz .pz-sync-main { grid-template-columns: 26px minmax(0, 1fr); } .pz-sync-main .pz-sync-state { grid-column: 2; } }
|
|
1301
1301
|
.pz-ring { width: 18px; height: 18px; flex: none; border-radius: 50%; background: conic-gradient(var(--signal-mark, var(--accent-ink)) calc(var(--p) * 1%), var(--overlay-medium) 0); -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px); mask: radial-gradient(circle, transparent 5.5px, #000 6px); }
|
|
1302
|
-
`;var ud={search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',down:'<path d="m6 9 6 6 6-6"/>',right:'<path d="m9 18 6-6-6-6"/>',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',page:'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5V19A9 3 0 0 0 21 19V5"/><path d="M3 12A9 3 0 0 0 21 12"/>',attachment:'<path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/>',trash:'<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/>',refresh:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/>',archive:'<rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/>',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',undo:'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/>',pen:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>',move:'<path d="M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1"/><path d="M2 13h10"/><path d="m9 16 3-3-3-3"/>',book:'<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/>',login:'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/>',gear:'<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>',up:'<path d="m18 15-6-6-6 6"/>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>',"folder-plus":'<path d="M12 10v6"/><path d="M9 13h6"/><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>',pause:'<rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/>',play:'<polygon points="6 3 20 12 6 21 6 3"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',check:'<path d="M20 6 9 17l-5-5"/>',alert:'<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',"tx-up":'<path d="m18 9-6-6-6 6"/><path d="M12 3v14"/><path d="M5 21h14"/>',"tx-down":'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',files:'<path d="M20 7h-3a2 2 0 0 1-2-2V2"/><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"/><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"/>',notebook:'<path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"/><path d="M2 6h4"/><path d="M2 10h4"/><path d="M2 14h4"/><path d="M2 18h4"/><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/>',bot:'<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>',puzzle:'<path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"/>',laptop:'<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"/><path d="M20.054 15.987H3.946"/>',info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>'},Q=({n:e})=>o("svg",{viewBox:"0 0 24 24","aria-hidden":"true",dangerouslySetInnerHTML:{__html:ud[e]??ud.attachment}});function hd(e){let[,t]=T(0);X(()=>{let n=e.subscribe(()=>t(r=>r+1));return t(r=>r+1),n},[e])}function Dr(e){return o("div",{ref:e.rootRef,class:`${e.side?"pz-side":"pz"}${e.extra?` ${e.extra}`:""}`,lang:e.p.locale()==="zh"?"zh-CN":"en",...e.on,children:[o("style",{children:pd}),e.children]})}var Fn=({pct:e,warn:t})=>o("div",{class:`pz-bar${t?" is-low":""}`,children:o("span",{style:{width:`${Math.max(0,Math.min(100,e)).toFixed(1)}%`}})}),fd={sync:1,ama:.62,apps:.38,exports:.2},md={sync:"penzor.ledger.sync",ama:"penzor.ledger.ama",apps:"penzor.ledger.apps",exports:"penzor.ledger.exports"};function bd({p:e}){hd(e);let t=J(null);X(()=>{e.enter(),e.refresh(),On(e.loc())&&e.ctx.closeView?.("penzor-info",{collapse:!0});let p=t.current;if(!p||typeof IntersectionObserver>"u")return;let u=!0;e.setVisible(!0);let h=new IntersectionObserver(m=>{let y=m.some(_=>_.isIntersecting);y&&!u&&(e.enter(),e.refresh()),u=y,e.setVisible(y)});return h.observe(p),()=>{h.disconnect(),e.setVisible(!1)}},[e]);let[n,r]=T(null),a=p=>Array.from(p.dataTransfer?.types??[]).includes("Files"),i=p=>{let u=p.target?.closest?.("tr[data-dir-id]");return u?{id:u.dataset.dirId,name:u.dataset.dirName??""}:null},s=()=>e.appStack()[e.appStack().length-1]?.name??e.t("penzor.drive"),l=e.canWrite()&&e.auth()==="in"?{onDragOver:p=>{if(!a(p))return;p.preventDefault(),p.stopPropagation(),p.dataTransfer&&(p.dataTransfer.dropEffect="copy");let u=i(p),h=u?.name||s();(n?.place!==h||n?.target?.id!==u?.id)&&r({place:h,target:u})},onDragLeave:p=>{t.current?.contains(p.relatedTarget)||r(null)},onDrop:p=>{if(!a(p))return;p.preventDefault(),p.stopPropagation();let u=i(p);r(null);let h=ee().getPathForFile,m=Array.from(p.dataTransfer?.files??[]).map(y=>{try{return h?.(y)??""}catch{return""}}).filter(Boolean);e.upload(m,u)}}:{};X(()=>{e.canWrite()||r(null)},[e.canWrite()]);let c=e.t,d=e.auth(),f;return d==="out"?f=o(vd,{p:e}):e.loc().kind==="sync-home"?f=o(tg,{p:e}):e.snap()?e.error()?f=o("div",{class:"pz-scroll",children:o("p",{class:"pz-note",children:e.error()})}):e.loc().kind==="overview"?f=ri(e.snap()).empty?o(og,{p:e}):o(rg,{p:e}):f=o(ig,{p:e,dropDir:n?.target?.id??null}):f=o("div",{class:"pz-scroll",children:o("p",{class:"pz-note",children:e.error()??c("penzor.loading")})}),o(Dr,{p:e,rootRef:t,extra:n?"pz-drop":"",on:l,children:[f,n&&o("div",{class:"pz-dropbar",children:o("span",{children:[o(Q,{n:"upload"}),c("penzor.drop.to",{place:n.place})]})}),e.menu()&&o(cg,{p:e}),o(gg,{p:e})]})}var eg={dropbox:"Dropbox",s3:"S3",webdav:"WebDAV"};function mi({on:e,disabled:t,label:n,title:r,onToggle:a}){return o("button",{type:"button",role:"switch",class:`settings-switch${e?" active":""}`,"aria-checked":e,"aria-label":n,title:r,disabled:t,onClick:i=>{i.stopPropagation(),a(!e)},children:o("span",{})})}var gi=({tone:e,text:t})=>o("span",{class:`pz-sync-state is-${e}`,children:[e!=="off"&&o("i",{}),t]});function tg({p:e}){let t=e.t,n=e.syncState(),[r,a]=T(!1);if(!n)return o("div",{class:"pz-scroll",children:o("p",{class:"pz-note",children:t("penzor.loading")})});if(!n.signedIn)return o(vd,{p:e});let i=e.snap(),s=n.notes,l=t("penzor.ledger.sync"),c=s.maxBytes??i?.sync?.maxBytes??0,d=i?.sync?.maxFileBytes||50*1024*1024,f=s.vault?i?.sync?.vaults.find(N=>N.vault===s.vault)??null:null,p=Wc(n,c),u=s.on?s.last?.skippedLarge??0:0,h=s.rootName?t("penzor.sync.notesNamed",{name:s.rootName}):t("penzor.sync.notesPlain"),m=()=>e.openSync(),y=()=>{if(s.pending)return{tone:"wait",text:t("penzor.sync.waiting")};if(!s.on)return{tone:"off",text:t("penzor.sync.off")};let N=Lo(n);if(N!=null)return{tone:"ok",text:N>0?t("penzor.sync.running",{pct:Math.round(N*100)}):t("penzor.sync.runningPlain")};if(p)return{tone:"warn",text:t("penzor.sync.overQuota")};if(si(n))return{tone:"warn",text:t("penzor.sync.failed")};if(s.backend==="folder")return{tone:"ok",text:t("penzor.sync.toFolder")};let B=eg[s.backend];return B?{tone:"ok",text:t("penzor.sync.to",{name:B})}:s.last?{tone:"ok",text:s.localBytes!=null?t("penzor.sync.doneSize",{size:e.b(s.localBytes)}):t("penzor.sync.done")}:{tone:"ok",text:t("penzor.sync.firstPending")}},_=(N,B)=>N?{tone:"ok",text:B}:{tone:"off",text:t("penzor.sync.off")},C=N=>B=>{e.setSync(N,B)},x=s.available===!1&&!s.on&&(s.backend==="off"||s.backend==="penzor"),k=[e.thisDevice()?t("penzor.sync.metaDevice",{name:e.thisDevice()}):null,s.on?s.last?t("penzor.sync.metaLast",{time:ci(s.last.at,e.locale())}):t("penzor.sync.metaNever"):null,s.on&&s.backend!=="off"?li(s,e.locale()):null].filter(N=>!!N),A=y(),O=f?[...new Set([...f.devices,...f.device?[f.device]:[]])]:[],q=i?.ama?i.ama.reduce((N,B)=>N+B.sizeBytes,0):null;return o("div",{class:"pz-scroll",children:o("div",{class:"pz-col",children:[o("div",{class:"pz-ov-kick",children:t("penzor.kicker")}),o("div",{class:"pz-title pz-sync-head",children:[o("h1",{class:"pz-h1",children:t("penzor.sync.title")}),o("span",{class:"pz-badge",children:[o(Q,{n:"check"}),Gc(n,e.locale())]})]}),k.length>0&&o("div",{class:"pz-meta",children:k.map(N=>o("span",{children:N},N))}),s.pending&&o(ng,{p:e,s:n}),p&&o("div",{class:"pz-sync-ask is-warn",role:"region",children:[o("h4",{children:s.localBytes!=null&&c>0?t("penzor.sync.quotaTitle",{size:e.b(s.localBytes),ledger:l,max:e.b(c)}):t("penzor.sync.quotaTitlePlain",{ledger:l})}),o("p",{children:[t("penzor.sync.quotaBody"),u>0&&` ${t("penzor.sync.quotaLarge",{size:e.b(d),n:u})}`]}),o("div",{class:"pz-acts",children:[o("button",{class:"pz-btn pri",onClick:()=>void mn("membership").then(N=>{N||e.ctx.app?.notify?.(t("err.openFailed"))}),children:t("member.upgrade")}),f&&o("button",{class:"pz-btn",onClick:()=>e.go(`sync:${f.vault}`),children:t("penzor.sync.quotaSee")})]})]}),o("div",{class:"pz-sync-card",children:[o("div",{class:`pz-sync-row is-click${r?" is-open":""}`,children:[o("button",{type:"button",class:"pz-sync-main","aria-expanded":r,onClick:()=>a(!r),children:[o("span",{class:"pz-tile",children:o(Q,{n:"notebook"})}),o("span",{class:"pz-sync-txt",children:[o("b",{children:h}),o("small",{children:t("penzor.sync.notesDesc")})]}),o(gi,{...A})]}),o(mi,{on:s.on&&!s.pending,label:h,disabled:!!s.pending||x||e.syncBusy("notes"),title:s.pending?t("penzor.sync.decideAbove"):void 0,onToggle:C("notes")})]}),r&&o("div",{class:"pz-sync-sub",children:[o("div",{class:"kv",children:[o("span",{children:t("penzor.sync.kvSchedule")}),o("span",{children:li(s,e.locale())}),o("button",{class:"pz-link",onClick:m,children:t("penzor.sync.change")})]}),o("div",{class:"kv",children:[o("span",{children:t("penzor.sync.kvDirection")}),o("span",{children:t(`penzor.sync.dir.${s.direction}`)}),o("button",{class:"pz-link",onClick:m,children:t("penzor.sync.change")})]}),u>0&&o("div",{class:"kv",children:[o("span",{children:t("penzor.sync.kvSkipped")}),o("span",{children:t("penzor.sync.skippedN",{n:u,size:e.b(d)})}),o("span",{})]}),s.backend==="penzor"&&s.vault&&o("div",{class:"kv",children:[o("span",{children:t("penzor.sync.kvWhere")}),o("span",{children:i?.sync&&c>0?t("penzor.sync.whereUsed",{ledger:l,vault:s.vault,used:e.b(i.sync.usedBytes),max:e.b(c)}):t("penzor.sync.where",{ledger:l,vault:s.vault})}),f?o("button",{class:"pz-link",onClick:()=>e.go(`sync:${f.vault}`),children:t("penzor.sync.open")}):o("span",{})]})]}),o("div",{class:"pz-sync-row",children:[o("div",{class:"pz-sync-main",children:[o("span",{class:"pz-tile",children:o(Q,{n:"bot"})}),o("span",{class:"pz-sync-txt",children:[o("b",{children:t("penzor.sync.agents")}),o("small",{children:t("penzor.sync.agentsDesc")})]}),o(gi,{..._(n.agents.on,t("penzor.sync.agentsN",{n:n.agents.count}))})]}),o(mi,{on:n.agents.on,label:t("penzor.sync.agents"),disabled:e.syncBusy("agents"),onToggle:C("agents")})]}),o("div",{class:"pz-sync-row",children:[o("div",{class:"pz-sync-main",children:[o("span",{class:"pz-tile",children:o(Q,{n:"puzzle"})}),o("span",{class:"pz-sync-txt",children:[o("b",{children:t("penzor.sync.plugins")}),o("small",{children:t("penzor.sync.pluginsDesc")})]}),o(gi,{..._(n.plugins.on,t("penzor.sync.pluginsN",{n:n.plugins.count}))})]}),o(mi,{on:n.plugins.on,label:t("penzor.sync.plugins"),disabled:e.syncBusy("plugins"),onToggle:C("plugins")})]})]}),o("div",{class:"pz-h3",children:t("penzor.sync.devicesTitle")}),i?O.length===0?o("p",{class:"pz-sync-none",children:t("penzor.sync.noDevices")}):o("div",{class:"pz-rows pz-sync-dev",children:O.map(N=>o("div",{class:"row",children:[o(Q,{n:"laptop"}),o("span",{class:"t",children:[N,N===e.thisDevice()&&o("em",{children:t("penzor.sync.thisOne")})]}),o("span",{class:"s",children:f?.device===N&&f.updatedAt?t("penzor.sync.lastWrite",{time:ci(Date.parse(f.updatedAt),e.locale())}):""})]},N))}):o("p",{class:"pz-sync-none",children:t("penzor.loading")}),o("div",{class:"pz-h3",children:t("penzor.sync.phoneTitle")}),o("div",{class:"pz-tip",children:[o(Q,{n:"info"}),o("span",{children:q!=null?t("penzor.sync.phoneTip",{size:e.b(q)}):t("penzor.sync.phoneTipPlain")})]}),o("p",{class:"pz-note",children:[t("penzor.sync.foot"),o("button",{class:"pz-link",onClick:m,children:t("penzor.sync.footLink")})]})]})})}function ng({p:e,s:t}){let n=e.t,r=t.notes.pending,a=e.syncBusy("resolve"),i=new Date,s=n("penzor.sync.backupName",{name:t.notes.rootName??n("penzor.sync.notesPlain"),date:`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`}),l=r.cloudDevice?n("penzor.sync.askCloud",{device:r.cloudDevice,files:r.cloudFiles.toLocaleString(),size:e.b(r.cloudBytes)}):n("penzor.sync.askCloudNoDevice",{files:r.cloudFiles.toLocaleString(),size:e.b(r.cloudBytes)});return o("div",{class:"pz-sync-ask",role:"region","aria-label":n("penzor.sync.askTitle"),children:[o("h4",{children:n("penzor.sync.askTitle")}),o("p",{children:[l," ",n("penzor.sync.askLocal",{local:r.localOnly.toLocaleString(),conflicts:r.conflicts.toLocaleString()})]}),e.confirmCloud()?o("div",{class:"pz-confirm",children:[o("span",{children:n("penzor.sync.askConfirm",{backup:s})}),o("button",{class:"pz-btn pri",disabled:a,onClick:()=>void e.resolveNotes("cloud"),children:n("penzor.sync.askConfirmGo")}),o("button",{class:"pz-btn",disabled:a,onClick:()=>e.setConfirmCloud(!1),children:n("penzor.cancel")})]}):o("div",{class:"pz-acts",children:[o("button",{class:"pz-btn pri",disabled:a,onClick:()=>void e.resolveNotes("merge"),children:n("penzor.sync.askMerge")}),o("button",{class:"pz-btn",disabled:a,onClick:()=>e.setConfirmCloud(!0),children:n("penzor.sync.askCloudBtn")}),o("button",{class:"pz-btn",disabled:a,onClick:()=>void e.resolveNotes("skip"),children:n("penzor.sync.askSkip")})]}),o("p",{class:"pz-sync-explain",children:n("penzor.sync.askExplain",{backup:s})})]})}function vd({p:e}){let t=e.t;return o("div",{class:"pz-scroll",children:o("div",{class:"pz-empty",children:[o("span",{class:"ic",children:o(Q,{n:"cloud"})}),o("h2",{children:t("penzor.out.title")}),o("p",{children:t("penzor.out.lead")}),o("button",{class:"pz-btn pri",onClick:()=>e.signIn(),children:[o(Q,{n:"login"}),t("penzor.out.signIn")]})]})})}function og({p:e}){let t=e.t;return o("div",{class:"pz-scroll",children:o("div",{class:"pz-empty",children:[o("span",{class:"ic",children:o(Q,{n:"cloud"})}),o("h2",{children:t("penzor.empty.title")}),o("p",{children:t("penzor.empty.lead")}),o("ul",{children:[o("li",{children:t("penzor.empty.sync")}),o("li",{children:t("penzor.empty.ama")}),o("li",{children:t("penzor.empty.apps")})]}),o("button",{class:"pz-btn",onClick:()=>e.openSync(),children:[o(Q,{n:"gear"}),t("penzor.empty.openSync")]})]})})}function rg({p:e}){let t=e.t,n=e.snap(),r=ri(n),a=d=>Vt(d,e.locale()),i=d=>d==="sync"?n.sync?.vaults[0]?`sync:${n.sync.vaults[0].vault}`:"ov":d==="ama"?n.ama?.[0]?`ama:${n.ama[0].id}`:"ov":d==="apps"?r.apps?.apps[0]?`app:${r.apps.apps[0]}`:"trash":"exports",s=(d,f,p,u,h,m,y)=>o("button",{class:`pz-card${y?.warn?" warn":""}`,onClick:()=>e.go(i(d)),children:[o("div",{class:"pz-card-h",children:[o("span",{class:"pz-tile",children:o(Q,{n:f})}),t(md[d]),o("span",{class:"go",children:o(Q,{n:"right"})})]}),o("div",{class:"pz-big",children:[p,o("small",{children:u})]}),y&&o(Fn,{pct:y.pct,warn:y.warn}),o("div",{class:"pz-sub",children:h}),o("div",{class:`pz-foot${y?.warn?" warn":""}`,children:m})]}),l=ag(e),c=Math.max(1,...l.map(d=>d.size));return o("div",{class:"pz-scroll",children:o("div",{class:"pz-col",children:[o("div",{class:"pz-ov-kick",children:t("penzor.kicker")}),o("div",{class:"pz-total",children:[o("b",{children:e.b(r.total)}),o("span",{children:t("penzor.total.sub",{time:t("penzor.justNow")})})]}),o("div",{class:"pz-seg",children:r.segments.map(d=>o("i",{style:{width:`${r.total?d.bytes/r.total*100:0}%`,opacity:fd[d.ledger]}},d.ledger))}),o("div",{class:"pz-legend",children:r.segments.map(d=>o("span",{children:[o("i",{style:{opacity:fd[d.ledger]}}),t(md[d.ledger])," ",e.b(d.bytes)]},d.ledger))}),o("div",{class:"pz-cards",children:[r.sync&&s("sync","refresh",e.b(r.sync.bytes),r.sync.meter?t("penzor.ofMax",{max:e.b(r.sync.meter.max)}):"",r.sync.updatedAt?t("penzor.card.syncSub",{n:r.sync.vaults,time:a(Date.parse(r.sync.updatedAt))}):t("penzor.card.syncSubNone",{n:r.sync.vaults}),r.sync.meter?.warn?t("penzor.card.syncWarn",{max:e.b(r.sync.meter.max)}):t("penzor.card.syncFoot",{size:e.b(r.sync.maxFileBytes)}),r.sync.meter),r.ama&&s("ama","cloud",e.b(r.ama.bytes),t("penzor.card.amaSmall"),t("penzor.card.amaSub",{n:r.ama.vaults}),t("penzor.card.amaFoot")),r.apps&&s("apps","archive",e.b(r.apps.bytes),r.apps.meter?t("penzor.ofMax",{max:e.b(r.apps.meter.max)}):"",[...Ar(n)>0?[t("penzor.drive")]:[],...r.apps.apps.map(d=>e.appLabel(d))].join(" \xB7 ")||t("penzor.card.none"),r.apps.meter?.warn?t("penzor.card.appsWarn",{max:e.b(r.apps.meter.max)}):t("penzor.card.appsFoot",{n:r.apps.trashCount,size:e.b(r.apps.trashBytes)}),r.apps.meter),r.exports&&s("exports","attachment",e.b(r.exports.bytes),t("penzor.card.expSmall",{n:r.exports.count}),r.exports.latest?t("penzor.card.expSub",{name:r.exports.latest.fileName,time:a(Date.parse(r.exports.latest.createdAt))}):t("penzor.card.none"),t("penzor.card.expFoot"))]}),l.length>0&&o(R,{children:[o("div",{class:"pz-h3",children:t("penzor.largest")}),o("div",{class:"pz-rows",children:l.map(d=>o("button",{class:"row",onClick:()=>e.go(d.go),children:[o(Q,{n:Do(d.name)}),o("span",{class:"t",children:[d.name,o("em",{children:d.where})]}),o(Fn,{pct:d.size/c*100}),o("span",{class:"s",children:e.b(d.size)})]},d.key))})]})]})})}function ag(e){let t=e.snap(),n=e.t,r=[...e.largest()];for(let a of t.apps?.largest??[])r.push({key:`a:${a.id}`,name:a.name,where:`${n("penzor.ledger.apps")} \xB7 ${e.appLabel(a.appId)}`,size:a.size,go:`app:${a.appId}`});for(let a of t.exports?.files??[])r.push({key:`e:${a.fileId}`,name:a.fileName,where:`${n("penzor.ledger.exports")} \xB7 ${e.appLabel(a.appId)}`,size:a.size,go:"exports"});return r.sort((a,i)=>i.size-a.size).slice(0,6)}function ig({p:e,dropDir:t}){let n=e.t,r=e.loc(),a=e.snap(),i=e.rows(),[s,l]=T(!1),[c,d]=T(null),f=J(null),p=J(null),u=J(null),h=e.canWrite(),m=e.selection();X(()=>(e.picker.files=()=>f.current?.click(),e.picker.folder=()=>p.current?.click(),()=>{e.picker.files=void 0,e.picker.folder=void 0}),[e]);let y=(v,E)=>{let I=v.currentTarget,Z=ee().getPathForFile,le=Array.from(I.files??[]),de=le.map(Pe=>{try{return Z?.(Pe)??""}catch{return""}}),He=de.filter(Boolean);if(E){let Pe=new Set;le.forEach((yt,be)=>{let et=yt.webkitRelativePath??"",Wt=de[be];!et||!Wt||Wt.length<et.length||Pe.add(Wt.slice(0,Wt.length-et.length)+et.split("/")[0])}),He=[...Pe]}I.value="",e.upload(He)},_=(v,E)=>{e.select(E,{toggle:v.metaKey||v.ctrlKey,range:v.shiftKey}),u.current?.focus({preventScroll:!0})},C=v=>{if(v.target?.tagName!=="INPUT"){if((v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="a"&&e.canMulti())v.preventDefault(),e.selectAll();else if(v.key==="Escape"&&m.length>1){v.preventDefault();let E=e.selected();e.select(E)}}},x=r.kind==="sync"?n("penzor.ledger.sync"):r.kind==="ama"?n("penzor.ledger.ama"):r.kind==="app"&&!e.canWrite()?n("penzor.ledger.apps"):null,k=r.kind==="sync"?r.vault:r.kind==="ama"?a.ama?.find(v=>v.id===r.vaultId)?.name??"":r.kind==="app"?e.appLabel(r.appId):r.kind==="exports"?n("penzor.ledger.exports"):n("penzor.trash"),A=r.kind==="app"?e.appStack().map(v=>v.name):e.path()?e.path().split("/"):[],O=[...x?[{label:x,depth:null}]:[],{label:k,depth:0},...A.map((v,E)=>({label:v,depth:E+1}))],q=["mtime","size","name"],N=()=>e.setSort(q[(q.indexOf(e.sort())+1)%q.length]),B=r.kind==="sync"?n("penzor.col.device"):r.kind==="trash"?n("penzor.col.origin"):r.kind==="exports"?n("penzor.col.app"):null,Y=r.kind==="trash"?n("penzor.col.deleted"):n("penzor.col.mtime"),se=()=>{if(r.kind==="sync"){let E=a.sync?.vaults.find(le=>le.vault===r.vault);if(!E)return null;let I=!!e.thisDevice()&&E.devices.includes(e.thisDevice()),Z=a.sync;return o(R,{children:[o("div",{class:"pz-title",children:[o("h1",{class:"pz-h1",children:E.vault}),I&&o("span",{class:"pz-badge",children:[o(Q,{n:"refresh"}),n("penzor.sync.thisDevice")]})]}),o("div",{class:"pz-meta",children:[o("span",{children:n("penzor.meta.files",{size:e.b(E.bytes),n:E.files.toLocaleString()})}),E.updatedAt&&o("span",{children:E.device?n("penzor.sync.last",{time:Vt(Date.parse(E.updatedAt),e.locale()),device:E.device}):n("penzor.sync.lastNoDevice",{time:Vt(Date.parse(E.updatedAt),e.locale())})}),E.devices.length>0&&o("span",{children:n("penzor.sync.devices",{n:E.devices.length})})]}),Z.maxBytes>0&&o("div",{class:"pz-meter",children:[o(Fn,{pct:Z.usedBytes/Z.maxBytes*100,warn:Z.usedBytes/Z.maxBytes>=.9}),o("span",{children:n("penzor.sync.meter",{max:e.b(Z.maxBytes),used:e.b(Z.usedBytes)})})]})]})}if(r.kind==="ama"){let E=a.ama?.find(I=>I.id===r.vaultId);return o(R,{children:[o("div",{class:"pz-title",children:[o("h1",{class:"pz-h1",children:E?.name}),o("span",{class:"pz-badge",children:[o(Q,{n:"cloud"}),"Amadeus Cloud"]})]}),o("div",{class:"pz-meta",children:[o("span",{children:e.b(E?.sizeBytes??0)}),o("span",{children:n("penzor.ama.notCounted")})]})]})}if(r.kind==="app"){let E=a.apps?.apps.find(Z=>Z.appId===r.appId),I=a.apps;return o(R,{children:[o("div",{class:"pz-title",children:o("h1",{class:"pz-h1",children:e.appLabel(r.appId)})}),o("div",{class:"pz-meta",children:[o("span",{children:n("penzor.meta.files",{size:e.b(E?.bytes??0),n:(E?.files??0).toLocaleString()})}),o("span",{children:e.canWrite()?n("penzor.drive.meta",{max:e.b(I.quota)}):n("penzor.apps.by",{app:e.appLabel(r.appId)})})]}),I.quota>0&&o("div",{class:"pz-meter",children:[o(Fn,{pct:I.used/I.quota*100,warn:I.used/I.quota>=.9}),o("span",{children:n("penzor.apps.meter",{max:e.b(I.quota),used:e.b(I.used)})})]})]})}if(r.kind==="exports")return o(R,{children:[o("div",{class:"pz-title",children:o("h1",{class:"pz-h1",children:n("penzor.ledger.exports")})}),o("div",{class:"pz-meta",children:[o("span",{children:n("penzor.meta.files",{size:e.b(a.exports?.totalBytes??0),n:(a.exports?.total??0).toLocaleString()})}),o("span",{children:n("penzor.card.expFoot")})]})]});let v=i??[];return o(R,{children:[o("div",{class:"pz-title",children:o("h1",{class:"pz-h1",children:n("penzor.trash")})}),o("div",{class:"pz-meta",children:[o("span",{children:n("penzor.trash.meta",{n:v.length,size:e.b((a.trash??[]).reduce((E,I)=>E+(Number(I.fileSize)||0),0))})}),a.apps&&a.apps.quota>0&&o("span",{children:n("penzor.trash.note",{max:e.b(a.apps.quota)})})]}),e.confirmEmpty()&&o("div",{class:"pz-confirm",children:[o("span",{children:n("penzor.confirm.empty",{n:v.length})}),o("button",{class:"pz-btn danger solid",onClick:()=>void e.emptyTrash(),children:n("penzor.trash.emptyBtn")}),o("button",{class:"pz-btn",onClick:()=>e.setConfirmEmpty(!1),children:n("penzor.cancel")})]})]})},V=e.selected(),ne=m.length>1,pe=m.reduce((v,E)=>v+(E.dir?0:E.size),0),Ee=e.txRows();return o(R,{children:[o("div",{class:"pz-top",children:[o("nav",{class:"pz-crumb",children:O.map((v,E)=>{let I=E===O.length-1,Z=I?o("b",{children:v.label}):v.depth==null?o("span",{children:v.label}):o("button",{onClick:()=>e.up(v.depth),children:v.label});return o("span",{style:{display:"contents"},children:[Z,!I&&o("i",{children:"\u203A"})]},E)})}),o("span",{class:"pz-sp"}),ne?o(R,{children:[o("span",{class:"pz-selbar",children:n("penzor.sel.bar",{n:m.length,size:e.b(pe)})}),m.some(v=>!v.dir)&&o("button",{class:"pz-btn",onClick:()=>void e.downloadMany(m),children:[o(Q,{n:"download"}),n("penzor.act.download")]}),r.kind==="app"&&o("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"move",at:[]}),children:[o(Q,{n:"move"}),n("penzor.act.move")]}),r.kind==="app"&&o("button",{class:"pz-btn danger",onClick:()=>void e.trashMany(m),children:[o(Q,{n:"trash"}),n("penzor.act.trash")]}),o("button",{class:"pz-ibtn",title:n("penzor.act.clearSel"),onClick:()=>e.select(V),children:o(Q,{n:"x"})})]}):o(R,{children:[A.length>0&&o("button",{class:"pz-ibtn",title:n("penzor.act.up"),onClick:()=>e.up(),children:o(Q,{n:"up"})}),r.kind==="ama"&&o("button",{class:"pz-chip",onClick:()=>void e.ctx.app?.openSpace?.("amadeus"),children:[o(Q,{n:"book"}),n("penzor.ama.open")]}),r.kind==="trash"&&(i?.length??0)>0&&o("button",{class:"pz-btn danger",onClick:()=>e.setConfirmEmpty(!0),children:[o(Q,{n:"trash"}),n("penzor.trash.emptyBtn")]}),h&&o("span",{class:"pz-split",children:[o("button",{class:"pz-btn pri",onClick:()=>e.picker.files?.(),children:[o(Q,{n:"upload"}),n("penzor.act.upload")]}),o("button",{class:"pz-btn pri more",title:n("penzor.act.uploadMore"),"aria-label":n("penzor.act.uploadMore"),onClick:v=>{let E=v.currentTarget.getBoundingClientRect();d({x:E.right,y:E.bottom+4})},children:o(Q,{n:"down"})})]}),h&&o("button",{class:"pz-ibtn",title:n("penzor.act.newFolder"),onClick:()=>e.startNewFolder(),children:o(Q,{n:"folder-plus"})}),s||e.query()?o("input",{class:"pz-find",placeholder:n("penzor.search"),value:e.query(),autoFocus:!0,onInput:v=>e.setQuery(v.currentTarget.value),onKeyDown:v=>{v.key==="Escape"&&(e.setQuery(""),l(!1))},onBlur:()=>{e.query()||l(!1)}}):o("button",{class:"pz-ibtn",title:n("penzor.search"),onClick:()=>l(!0),children:o(Q,{n:"search"})}),o("button",{class:"pz-chip",onClick:N,children:[r.kind==="trash"&&e.sort()==="mtime"?n("penzor.sort.deleted"):n(`penzor.sort.${e.sort()}`),o(Q,{n:"down"})]})]})]}),h&&o(R,{children:[o("input",{ref:f,type:"file",multiple:!0,hidden:!0,onChange:v=>y(v,!1)}),o("input",{ref:p,type:"file",hidden:!0,webkitdirectory:!0,onChange:v=>y(v,!0)})]}),c&&o(kd,{x:c.x,y:c.y,alignRight:!0,onClose:()=>d(null),items:[{id:"files",label:n("penzor.act.uploadFiles"),icon:"upload",run:()=>e.picker.files?.()},{id:"folder",label:n("penzor.act.uploadFolder"),icon:"folder",run:()=>e.picker.folder?.()}]}),o("div",{class:"pz-scroll",ref:u,tabIndex:-1,onKeyDown:C,onContextMenu:v=>{!h||v.target.closest("tr")||(v.preventDefault(),e.openMenu(v.clientX,v.clientY,null))},children:o("div",{class:"pz-col",children:[se(),e.rowsError()?o("p",{class:"pz-note",children:n("penzor.err",{reason:e.rowsError()})}):i?i.length===0&&!Ee.length&&e.newFolder()==null?o("p",{class:"pz-note",children:e.query()?n("penzor.noMatch",{q:e.query()}):h&&!A.length?n("penzor.drive.empty"):n("penzor.folderEmpty")}):o("table",{class:"pz-table",children:[o("thead",{children:o("tr",{children:[o("th",{children:n("penzor.col.name")}),o("th",{class:"r",children:n("penzor.col.size")}),o("th",{children:Y}),B&&o("th",{children:B})]})}),o("tbody",{children:[e.newFolder()!=null&&o(sg,{p:e,cols:B?4:3}),i.map((v,E)=>o(R,{children:[!v.dir&&(E===0||i[E-1].dir)&&Ee.map(I=>o(gd,{p:e,x:I},I.key)),o("tr",{class:`${e.isSelected(v.key)?"sel":""}${t&&t===v.key?" drop":""}`,"data-dir-id":h&&v.dir?v.key:void 0,"data-dir-name":h&&v.dir?v.name:void 0,onMouseDown:I=>{I.shiftKey&&I.preventDefault()},onClick:I=>_(I,v),onDblClick:()=>{v.dir?e.openDir(v):e.download(v)},onContextMenu:I=>{I.preventDefault(),e.openMenu(I.clientX,I.clientY,v)},children:[o("td",{class:"n",children:o("span",{children:[o(Q,{n:Do(v.name,v.dir)}),o("b",{children:v.name}),v.count!=null&&v.count>0&&o("em",{class:"cnt",children:v.count.toLocaleString()})]})}),o("td",{class:"r",children:v.dir&&r.kind==="app"?"\u2014":e.b(v.size)}),o("td",{children:Vt(v.mtime,e.locale())}),B&&o("td",{class:v.col4?"":"dim",children:v.col4?v.col4===e.thisDevice()?n("penzor.side.thisDevice",{name:v.col4}):v.col4:"\u2014"})]})]},v.key)),(i.length===0||i[i.length-1].dir)&&Ee.map(v=>o(gd,{p:e,x:v},v.key))]})]}):o("p",{class:"pz-note",children:n("penzor.loading")})]})})]})}function sg({p:e,cols:t}){let[n,r]=T(e.newFolder()??""),a=J(null),i=J(!1);So(()=>{a.current?.focus(),a.current?.select()},[]);let s=()=>{i.current||(i.current=!0,e.createFolder(n))};return o("tr",{class:"sel",children:[o("td",{class:"n",children:o("span",{children:[o(Q,{n:"folder-open"}),o("input",{ref:a,class:"pz-newname",value:n,onInput:l=>r(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"?s():l.key==="Escape"&&(i.current=!0,e.cancelNewFolder())},onBlur:s})]})}),o("td",{class:"r",children:"\u2014"}),o("td",{children:e.t("penzor.justNow")}),t>3&&o("td",{})]})}function gd({p:e,x:t}){let n=t.size>0?Math.min(100,Math.round(t.done/t.size*100)):0;return o("tr",{class:`pz-txrow ${t.state}`,title:t.state==="paused"?e.t("penzor.tx.paused"):void 0,children:[o("td",{class:"n",children:o("span",{children:[o(Q,{n:Do(t.name)}),o("b",{children:t.name})]})}),o("td",{class:"r",children:t.state==="active"?ii(t.done,t.size,e.locale()):e.b(t.size)}),o("td",{children:t.state==="queued"?o("span",{class:"pz-inl",children:e.t("penzor.tx.queued")}):o("span",{class:"pz-inl",children:[o(Fn,{pct:n}),t.state==="paused"?e.t("penzor.tx.pause"):`${n}%`]})})]})}function yd(e,t){let n=e.t,r=e.loc().kind,a={id:"download",label:n("penzor.act.download"),icon:"download",run:()=>void e.download(t)};return r==="sync"||r==="ama"?t.dir?[]:[a]:r==="app"?[...t.dir?[]:[a],{id:"rename",label:n("penzor.act.rename"),icon:"pen",run:()=>{e.select(t),e.setSide({kind:"rename"})}},{id:"move",label:n("penzor.act.move"),icon:"move",run:()=>{e.select(t),e.setSide({kind:"move",at:[]})}},{id:"trash",label:n("penzor.act.trash"),icon:"trash",danger:!0,run:()=>void e.trash(t)}]:r==="exports"?[a,{id:"rename",label:n("penzor.act.rename"),icon:"pen",run:()=>{e.select(t),e.setSide({kind:"rename"})}},{id:"delete",label:n("penzor.act.delete"),icon:"trash",danger:!0,run:()=>{e.select(t),e.setSide({kind:"confirm",what:"deleteExport"})}}]:r==="trash"?[{id:"restore",label:n("penzor.act.restore"),icon:"undo",run:()=>void e.restore(t)},{id:"purge",label:n("penzor.act.purge"),icon:"trash",danger:!0,run:()=>{e.select(t),e.setSide({kind:"confirm",what:"purge"})}}]:[]}function lg(e,t){let n=e.t;if(!t)return e.canWrite()?[{id:"upload",label:n("penzor.act.uploadHere"),icon:"upload",run:()=>e.picker.files?.()},{id:"new-folder",label:n("penzor.act.newFolder"),icon:"folder-plus",run:()=>e.startNewFolder()}]:[];let r=e.selection();return r.length>1&&r.some(a=>a.key===t.key)?xd(e,r):yd(e,t)}function xd(e,t){let n=e.t,r=e.loc().kind,a=t.filter(i=>!i.dir).length;return[...a?[{id:"download",label:n("penzor.sel.download",{n:a}),icon:"download",run:()=>void e.downloadMany(t)}]:[],...r==="app"?[{id:"move",label:n("penzor.act.move"),icon:"move",run:()=>e.setSide({kind:"move",at:[]})},{id:"trash",label:n("penzor.act.trash"),icon:"trash",danger:!0,run:()=>void e.trashMany(t)}]:[]]}function kd({x:e,y:t,items:n,onClose:r,alignRight:a}){let i=J(null),[s,l]=T({x:e,y:t});return X(()=>{let c=i.current;if(c){let p=c.getBoundingClientRect(),u=a?e-p.width:e;l({x:Math.max(8,Math.min(u,window.innerWidth-p.width-8)),y:t+p.height>window.innerHeight-8?Math.max(8,t-p.height):t})}let d=p=>{p.target instanceof Node&&c?.contains(p.target)||r()},f=p=>{p.key==="Escape"&&r()};return window.addEventListener("pointerdown",d,!0),window.addEventListener("keydown",f,!0),window.addEventListener("blur",r),window.addEventListener("wheel",r,{passive:!0}),()=>{window.removeEventListener("pointerdown",d,!0),window.removeEventListener("keydown",f,!0),window.removeEventListener("blur",r),window.removeEventListener("wheel",r)}},[e,t]),n.length?cd(o("div",{ref:i,class:"ctx-menu pz-menu",role:"menu",style:{left:`${s.x}px`,top:`${s.y}px`},children:n.map((c,d)=>o(R,{children:[c.danger&&d>0&&o("div",{class:"ctx-separator"}),o("button",{role:"menuitem",class:c.danger?"danger":"",onClick:()=>{r(),c.run()},children:[o(Q,{n:c.icon}),c.label]})]},c.id))}),document.body):(queueMicrotask(r),null)}function cg({p:e}){let t=e.menu();return o(kd,{x:t.x,y:t.y,items:lg(e,t.row),onClose:e.closeMenu})}function wd({p:e}){hd(e);let t=e.t,n=e.loc(),r=e.selected();if(On(n)||!r)return o(Dr,{p:e,side:!0,children:o("p",{class:"pz-side-none",children:t("penzor.side.none")})});let a=e.snap(),i=e.side(),s=e.selection();if(s.length>1)return o(pg,{p:e,sel:s});let l=n.kind==="sync"?`${n.vault} / ${r.key}`:n.kind==="ama"?`${a?.ama?.find(m=>m.id===n.vaultId)?.name??""} / ${r.key}`:n.kind==="app"?[e.appLabel(n.appId),...e.appStack().map(m=>m.name),r.name].join(" / "):n.kind==="exports"?`${t("penzor.ledger.exports")} / ${r.name}`:r.col4??"",c=r.dir?"":(r.name.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??"").toUpperCase(),d=n.kind==="trash"?t("penzor.side.inTrash",{size:e.b(r.size)}):r.dir?r.count!=null?t("penzor.side.folder",{n:r.count.toLocaleString()}):t("penzor.side.folderPlain"):[c,e.b(r.size)].filter(Boolean).join(" \xB7 "),f=n.kind==="trash"?[[t("penzor.side.origin"),l],[t("penzor.side.deletedAt"),Vt(r.mtime,e.locale())]]:[[t("penzor.side.where"),l],[t("penzor.side.mtime"),Vt(r.mtime,e.locale())]];n.kind==="sync"&&!r.dir&&f.push([t("penzor.side.device"),r.col4?r.col4===e.thisDevice()?t("penzor.side.thisDevice",{name:r.col4}):r.col4:"\u2014"]),n.kind==="app"&&!r.dir&&!e.canWrite()&&f.push([t("penzor.side.from"),e.appLabel(n.appId)]),n.kind==="exports"&&f.push([t("penzor.side.from"),r.col4??"\u2014"]);let p=Jc(n),u=yd(e,r),h=e.versions();return o(Dr,{p:e,side:!0,children:[o("div",{class:"pz-thumb",children:o(Q,{n:Do(r.name,r.dir)})}),i.kind==="rename"?o(dg,{p:e,row:r}):o("div",{class:"pz-fname",children:r.name}),o("div",{class:"pz-fsub",children:d}),i.kind==="confirm"?o("div",{class:"pz-confirm",style:{margin:0},children:[o("span",{children:t(i.what==="purge"?"penzor.confirm.purge":"penzor.confirm.deleteExport",{name:r.name})}),o("button",{class:"pz-btn danger solid",onClick:()=>void(i.what==="purge"?e.purge(r):e.deleteExport(r)),children:t(i.what==="purge"?"penzor.act.purge":"penzor.act.delete")}),o("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"view"}),children:t("penzor.cancel")})]}):u.length>0&&o("div",{class:"pz-acts",children:u.filter(m=>m.id!=="move").map(m=>o("button",{class:`pz-btn${m.danger?" danger":""}${m.id==="restore"?" pri":""}`,onClick:()=>m.run(),children:[o(Q,{n:m.icon}),m.id==="trash"?t("penzor.act.delete"):m.label]},m.id))}),i.kind==="move"&&o(zd,{p:e,row:r,at:i.at}),o("dl",{class:"pz-dl",children:[f.map(([m,y])=>o(R,{children:[o("dt",{children:m}),o("dd",{children:y})]},m)),n.kind==="app"&&!r.dir&&o(R,{children:[o("dt",{children:t("penzor.side.versions")}),o("dd",{children:h==null?"\u2026":h.length?t("penzor.side.versionsN",{n:h.length}):t("penzor.side.versionsNone")})]})]}),n.kind==="app"&&!r.dir&&h&&h.length>0&&o("div",{class:"pz-vers",children:h.map(m=>o("div",{children:[o("span",{children:t("penzor.side.versionRow",{n:m.versionNumber,time:Vt(m.createdAt,e.locale()),size:e.b(m.fileSize)})}),o("button",{class:"pz-link",onClick:()=>void e.restoreVersion(r,m),children:t("penzor.side.restoreVersion")})]},m.versionNumber))}),n.kind==="trash"&&r.dir&&(r.count??0)>0&&o("div",{class:"pz-tip",children:[o(Q,{n:"undo"}),o("span",{children:t("penzor.side.inner",{n:r.count})})]}),n.kind==="exports"&&o("div",{class:"pz-tip",children:[o(Q,{n:"trash"}),o("span",{children:t("penzor.side.exportNote")})]}),p&&o("div",{class:"pz-tip",children:[o(Q,{n:"lock"}),o("span",{children:t(p,{vault:n.kind==="sync"?n.vault:""})})]})]})}function dg({p:e,row:t}){let[n,r]=T(t.name),a=J(null),i=J(!1),s=()=>{i.current||(i.current=!0,e.rename(t,n))};return X(()=>{let l=a.current;if(!l)return;l.focus();let c=t.dir?-1:t.name.lastIndexOf(".");l.setSelectionRange(0,c>0?c:t.name.length)},[t.key]),o("input",{ref:a,class:"pz-input",value:n,onInput:l=>r(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"?s():l.key==="Escape"&&(i.current=!0,e.setSide({kind:"view"}))},onBlur:s})}function zd({p:e,row:t,at:n}){let r=e.t,a=e.loc(),i=a.kind==="app"?e.appLabel(a.appId):"",s=e.selection(),l=s.length>1,c=new Set(l?s.map(p=>p.key):[t.key]),d=(e.moveFolders()??[]).filter(p=>!c.has(p.id)),f=n[n.length-1]??{id:"ROOT",name:r("penzor.move.root",{app:i})};return o("div",{class:"pz-tip",style:{flexDirection:"column"},children:[o("div",{class:"pz-sh",style:{margin:0},children:r("penzor.move.title")}),o("div",{class:"pz-pick",children:[n.length>0&&o("button",{onClick:()=>e.moveBrowse(n.slice(0,-1)),children:[o(Q,{n:"up"}),n.length>1?n[n.length-2].name:r("penzor.move.root",{app:i})]}),e.moveFolders()==null?o("span",{children:"\u2026"}):d.length===0?o("span",{children:r("penzor.move.noFolders")}):d.map(p=>o("button",{onClick:()=>e.moveBrowse([...n,p]),children:[o(Q,{n:"folder"}),p.name]},p.id))]}),o("div",{class:"pz-acts",children:[o("button",{class:"pz-btn pri",onClick:()=>void(l?e.moveMany(s,f):e.moveTo(t,f)),children:r("penzor.move.here")}),o("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"view"}),children:r("penzor.cancel")})]})]})}function pg({p:e,sel:t}){let n=e.t,r=e.loc(),a=t.filter(p=>!p.dir),i=t.length-a.length,s=a.reduce((p,u)=>p+u.size,0),l=new Date,c=n("penzor.download.folder",{date:`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`}),d=r.kind==="app"?[e.appLabel(r.appId),...e.appStack().map(p=>p.name)].join(" / "):r.kind==="sync"?[r.vault,...e.path()?e.path().split("/"):[]].join(" / "):r.kind==="ama"?[e.snap()?.ama?.find(p=>p.id===r.vaultId)?.name??"",...e.path()?e.path().split("/"):[]].join(" / "):"",f=e.side();return o(Dr,{p:e,side:!0,children:[o("div",{class:"pz-thumb",children:o(Q,{n:"files"})}),o("div",{class:"pz-fname",children:n("penzor.sel.title",{n:t.length})}),o("div",{class:"pz-fsub",children:i?n("penzor.sel.subDirs",{size:e.b(s),files:a.length,dirs:i}):n("penzor.sel.sub",{size:e.b(s),files:a.length})}),o("div",{class:"pz-acts",children:xd(e,t).map(p=>o("button",{class:`pz-btn${p.danger?" danger":""}`,onClick:()=>p.run(),children:[o(Q,{n:p.icon}),p.id==="trash"?n("penzor.act.delete"):p.label]},p.id))}),f.kind==="move"&&o(zd,{p:e,row:t[0],at:f.at}),o("dl",{class:"pz-dl",children:[o("dt",{children:n("penzor.side.where")}),o("dd",{children:d}),a.length>1&&o(R,{children:[o("dt",{children:n("penzor.sel.saveTo")}),o("dd",{children:n("penzor.sel.saveToValue",{folder:c})})]})]}),i>0&&a.length>0&&o("div",{class:"pz-tip",children:[o(Q,{n:"folder"}),o("span",{children:n("penzor.sel.noDirs")})]})]})}var _d=(e,t)=>t<60?e.t("penzor.tx.sec",{n:Math.max(1,Math.round(t))}):e.t("penzor.tx.min",{n:Math.ceil(t/60)}),ug=(e,t)=>t!=null&&Date.now()-t<6e4?e.t("penzor.justNow"):Vt(t,e.locale()),fg=(e,t)=>{let n=t.error??"";return n==="too_large"?e.t("penzor.err.too_large",{size:e.b(t.size)}):n==="network"?e.t("penzor.err.network",{pct:t.size?Math.round(t.done/t.size*100):0}):n==="quota"||n==="account_changed"||n==="not_signed_in"||n==="gone"||n==="changed"||n==="storage_unavailable"?e.t(`penzor.err.${n}`):e.t("penzor.err.other",{code:n||"?"})};function mg(e){let t=e.filter(l=>l.state==="active"||l.state==="queued"||l.state==="paused"),n=t.filter(l=>l.state!=="paused"),r=n.reduce((l,c)=>l+Math.max(c.size,c.done),0),a=n.reduce((l,c)=>l+c.done,0),i=n.reduce((l,c)=>l+c.speed,0),s=i>0?(r-a)/i:null;return{live:t,failed:e.filter(l=>l.state==="failed"),done:e.filter(l=>l.state==="done"),up:t.filter(l=>l.kind==="up").length,down:t.filter(l=>l.kind==="down").length,pct:r>0?Math.min(100,Math.round(a/r*100)):0,eta:s!=null&&s>=5?s:null}}function gg({p:e}){let t=e.t,n=e.card(),r=e.transfers(),a=e.notices();if(n==="hidden"||!r.length&&!a.length)return null;let i=mg(r),s=i.failed.length+a.length,l=t("penzor.tx.counts",{up:i.up,down:i.down}),c=i.live.length?t("penzor.tx.busy",{n:i.live.length}):s?t("penzor.tx.failedN",{n:s}):t("penzor.tx.allDone"),d=i.live.length?[l,i.eta!=null?t("penzor.tx.eta",{eta:_d(e,i.eta)}):""].filter(Boolean).join(" \xB7 "):s?i.done.length?t("penzor.tx.restDone",{n:i.done.length}):"":t("penzor.tx.doneN",{n:i.done.length}),f={onMouseEnter:()=>e.holdCard(!0),onMouseLeave:()=>e.holdCard(!1)};if(n==="pill")return o("button",{class:"ui-popover pz-txpill",...f,onClick:()=>e.setCard("open"),title:t("penzor.tx.expand"),"aria-label":t("penzor.tx.expand"),children:[i.live.length?o("span",{class:"pz-ring",style:{"--p":i.pct}}):o(Q,{n:s?"alert":"check"}),o("span",{children:i.live.length?t("penzor.tx.pill",{counts:l,pct:i.pct}):c}),o(Q,{n:"up"})]});let p=m=>m.state==="failed"?0:m.state==="active"?1:m.state==="queued"||m.state==="paused"?2:3,u=[...r].filter(m=>m.state!=="canceled").sort((m,y)=>p(m)-p(y)||(p(m)===3?(y.finishedAt??0)-(m.finishedAt??0):0)),h=i.live.length>0&&i.live.every(m=>m.state==="paused");return o("div",{class:"ui-popover pz-txcard",role:"region","aria-label":c,...f,children:[o("div",{class:"pz-txhead",children:[o("b",{children:c}),o("span",{children:d}),o("i",{class:"sp"}),o("button",{class:"pz-ib",title:t("penzor.tx.collapse"),"aria-label":t("penzor.tx.collapse"),onClick:()=>e.setCard(i.live.length||s?"pill":"hidden"),children:o(Q,{n:"down"})})]}),i.live.length>0&&o("div",{class:"pz-txall",children:o(Fn,{pct:i.pct})}),o("div",{class:"pz-txlist",children:[a.map(m=>o("div",{class:"pz-txrow2 is-fail",children:[o(Q,{n:"alert"}),o("span",{class:"nm",children:t("penzor.tx.quota",{size:e.b(m.short)})}),o("span",{class:"acts",children:o("button",{class:"pz-ib",title:t("penzor.tx.remove"),onClick:()=>e.dismissNotice(m.id),children:o(Q,{n:"x"})})}),o("span",{class:"sub",children:[o("span",{class:"err",children:t("penzor.tx.quotaSub")}),o("button",{class:"pz-link",onClick:()=>{e.dismissNotice(m.id),e.go("trash")},children:t("penzor.tx.freeSpace")})]})]},m.id)),u.map(m=>o(hg,{p:e,x:m},m.id))]}),o("div",{class:"pz-txfoot",children:[i.live.length>0&&o("button",{onClick:()=>void e.txAll(h?"resume":"pause"),children:t(h?"penzor.tx.resumeAll":"penzor.tx.pauseAll")}),i.failed.length>0&&!i.live.length&&o("button",{onClick:()=>void e.txAll("retry"),children:t("penzor.tx.retryAll")}),i.done.length>0&&i.live.length>0&&o("button",{onClick:()=>void e.txClear("finished"),children:t("penzor.tx.clearDone")}),!i.live.length&&o("button",{onClick:()=>void e.txClear(s?"all":"finished"),children:t(s?"penzor.tx.clear":"penzor.tx.clearDone")})]})]})}function hg({p:e,x:t}){let n=e.t,r=t.size>0?Math.min(100,t.done/t.size*100):0,a=t.state==="done"?"check":t.state==="failed"?"alert":t.kind==="up"?"tx-up":"tx-down",i=(l,c,d)=>o("button",{class:"pz-ib",title:c,"aria-label":c,onClick:d,children:o(Q,{n:l})}),s;if(t.state==="failed")s=o("span",{class:"err",children:fg(e,t)});else if(t.state==="done")s=o(R,{children:[o("span",{children:e.b(t.size)}),o("span",{children:n(t.kind==="up"?"penzor.tx.uploaded":"penzor.tx.downloaded",{time:ug(e,t.finishedAt)})})]});else if(t.state==="queued")s=o(R,{children:[o("span",{children:e.b(t.size)}),o("span",{children:n("penzor.tx.queued")})]});else if(t.state==="paused")s=o(R,{children:[o("span",{children:e.b(t.size)}),o("span",{children:n("penzor.tx.paused")})]});else{let l=t.speed>0?(t.size-t.done)/t.speed:null;s=o(R,{children:[o("span",{children:ii(t.done,t.size,e.locale())}),t.speed>0&&o("span",{children:[e.b(t.speed),"/s"]}),l!=null&&l>=5&&o("span",{children:n("penzor.tx.left",{eta:_d(e,l)})})]})}return o("div",{class:`pz-txrow2${t.state==="done"?" is-done":t.state==="failed"?" is-fail":""}`,children:[o(Q,{n:a}),o("span",{class:"nm",title:t.name,children:t.name}),o("span",{class:"acts",children:[(t.state==="active"||t.state==="queued")&&i("pause",n("penzor.tx.pause"),()=>void e.txOp(t.id,"pause")),t.state==="paused"&&i("play",n("penzor.tx.resume"),()=>void e.txOp(t.id,"resume")),(t.state==="active"||t.state==="queued"||t.state==="paused")&&i("x",n("penzor.tx.cancel"),()=>void e.txOp(t.id,"cancel")),t.state==="failed"&&t.error!=="too_large"&&o("button",{class:"pz-link",onClick:()=>void e.txOp(t.id,"retry"),children:n("penzor.tx.retry")}),t.state==="failed"&&i("x",n("penzor.tx.remove"),()=>void e.txOp(t.id,"dismiss")),t.state==="done"&&o("button",{class:"pz-link",onClick:()=>e.locate(t),children:n(t.kind==="down"?"penzor.tx.reveal":"penzor.tx.locate")})]}),(t.state==="active"||t.state==="paused"||t.state==="queued")&&o(Fn,{pct:r}),o("span",{class:"sub",children:s})]})}function bg(e,t){return!!e&&typeof e.registerView=="function"&&typeof e.registerListSource=="function"&&typeof e.openView=="function"&&typeof e.app?.openSpace=="function"&&typeof t.tangu?.cloudInvoke=="function"&&!t.tangu.mobile&&!t.tangu.unitPage}function Sd(e,t=window){if(!bg(e,t))return null;let n=Kc(e);t.tangu.cloudInvoke("penzor:device").then(p=>{let u=p?.name;typeof u=="string"&&u&&n.setDevice(u)}).catch(()=>{});let r=p=>u=>(Be(o(p,{p:n}),u),()=>{Be(null,u)});e.registerView({id:rn.main,title:n.t("penzor.title"),icon:"cloud",workspaceSource:pi,mount:r(bd)}),e.registerView({id:rn.info,title:n.t("penzor.details"),icon:"page",mount:r(wd)});let a=e.listCapabilities?.includes("tree")??!1,i=typeof e.app?.setSpaceProgress=="function"?"hard-drive":"archive",s=()=>({overview:n.t("penzor.overview"),drive:n.t("penzor.drive"),driveIcon:i,sync:n.t("penzor.ledger.sync"),ama:n.t("penzor.ledger.ama"),apps:n.t("penzor.ledger.apps"),exports:n.t("penzor.ledger.exports"),trash:n.t("penzor.trash"),items:p=>n.t("penzor.items",{n:p})}),l=()=>{if(!n.hasSync())return[];let p=n.syncState();return[{key:"sync-home",title:n.t("penzor.sync.title"),icon:"refresh",hint:jc(p,n.locale()),...Mr(p)?{unread:!0}:{}}]};e.registerListSource({id:pi,title:n.t("penzor.title"),search:!0,items:p=>{let u=[...l(),...Bc(n.snap(),s(),n.locale())],h=p?.query?.trim().toLowerCase()??"";if(h)return u.filter(y=>y.kind!=="folder"&&y.title.toLowerCase().includes(h)).map(({parent:y,..._})=>_);if(a)return u;let m=new Map(u.filter(y=>y.kind==="folder").map(y=>[y.key,y.title]));return u.filter(y=>y.kind!=="folder").map(({parent:y,..._})=>({..._,group:y?m.get(y):void 0}))},subscribe:p=>n.subscribe(p),activeKey:()=>no(n.loc()),open:p=>n.go(p.key),actions:[{id:"refresh",label:n.t("penzor.act.refresh"),icon:"refresh",primary:!0,run:()=>{n.refresh(),e.app?.sync?.refresh?.().catch(()=>{})}}],itemMenu:p=>{if(p.key.startsWith("sync:")){let u=p.key.slice(5);return[{id:"open-sync",label:n.t("penzor.act.openSync"),icon:"gear",run:()=>n.openSync()},{id:"copy-name",label:n.t("penzor.act.copyName"),icon:"copy",run:()=>{navigator.clipboard?.writeText(u).then(()=>e.app?.notify?.(n.t("penzor.toast.copied")))}}]}return p.key==="trash"&&(n.snap()?.trash?.length??0)>0?[{id:"empty-trash",label:n.t("penzor.trash.emptyBtn"),icon:"trash",danger:!0,run:()=>{n.go("trash"),n.setConfirmEmpty(!0)}}]:[]}}),e.registerCommand?.({id:"open-penzor",title:()=>n.t("penzor.cmd.open"),keywords:"penzor cloud storage quota sync files trash drive upload \u84EC\u6D32\u4E91 \u4E91\u7A7A\u95F4 \u4E91\u76D8 \u7F51\u76D8 \u4E0A\u4F20 \u989D\u5EA6 \u540C\u6B65 \u56DE\u6536\u7AD9",run:()=>{e.app?.openSpace?.(on)}});let c=p=>{if(!(p.key!==Xc||!p.newValue))try{let u=JSON.parse(p.newValue);u.page==="sync"&&n.hasSync()?e.app?.openSpace?.(on).then(()=>n.go("sync-home")):typeof u.vault=="string"&&u.vault&&n.focusVault(u.vault)}catch{}},d=(()=>{try{return!new URLSearchParams(t.location.search).get("window")}catch{return!1}})();if(d){t.addEventListener("storage",c);try{t.localStorage.setItem(ui,"1")}catch{}}let f=n.dispose;return n.dispose=()=>{if(d){t.removeEventListener("storage",c);try{t.localStorage.removeItem(ui)}catch{}}f()},n}var Cd;if(typeof ctx<"u"){gc(ctx),mc(ctx);let e=Ws(ctx),t=Lc(ctx),n=Sd(ctx);(e||t||n)&&(Cd=()=>{e?.dispose(),t?.dispose(),n?.dispose()})}return Vd(vg);})();
|
|
1302
|
+
`;function sn(e,t,n){return e.fetch?e.fetch(t,n):fetch(t,{...n,headers:{Authorization:`Bearer ${e.token}`,...n.headers}})}async function sr(e,t,n,o,a=6e4){let i=await(e.fetch??fetch)(e.base+n,{method:t,headers:{"Content-Type":"application/json","X-Project-Source":"connect",...e.token&&!e.fetch?{Authorization:`Bearer ${e.token}`}:{}},body:o===void 0?void 0:JSON.stringify(o),signal:AbortSignal.timeout(a)}),s=await i.json().catch(()=>({}));return{status:i.status,json:s}}function ln(e,t){if(typeof t!="string"||!t.startsWith("/"))return null;let n=String(e||"").replace(/\/+$/,"").replace(/\/api$/,"");if(!n)return null;let o,a;try{o=new URL(n),a=new URL(n+"/api"+t)}catch{return null}return o.protocol!=="http:"&&o.protocol!=="https:"||a.origin!==o.origin||!a.pathname.startsWith("/api/")?null:a.toString()}var zd=["bytes","signed","text"],_d=/^[A-Za-z0-9_-]{1,64}$/,Sd=/^[a-z0-9][a-z0-9-]{0,63}$/;function Cd(e){if(typeof e!="string")return null;let n=(e.split(/[\\/]/).pop()??"").replace(/[\u0000-\u001f<>:"|?*]/g,"").trim().slice(0,200);return n&&n!=="."&&n!==".."?n:null}var Eg={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".heic":"image/heic",".svg":"image/svg+xml",".pdf":"application/pdf",".txt":"text/plain",".md":"text/markdown",".json":"application/json",".csv":"text/csv",".mp4":"video/mp4",".mov":"video/quicktime",".mp3":"audio/mpeg",".zip":"application/zip",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function xi(e){let t=e.lastIndexOf(".");return Eg[t>0?e.slice(t).toLowerCase():""]??"application/octet-stream"}function Td(e,t,n,o){let a=n.replace(/[^\x20-\x7e]/g,"_").replace(/["\\]/g,"_")||"file",i=encodeURIComponent(n).replace(/['()*]/g,l=>`%${l.charCodeAt(0).toString(16).toUpperCase()}`),s="";for(let[l,c]of Object.entries(t))s+=`--${e}\r
|
|
1303
|
+
Content-Disposition: form-data; name="${l}"\r
|
|
1304
|
+
\r
|
|
1305
|
+
${c}\r
|
|
1306
|
+
`;return s+=`--${e}\r
|
|
1307
|
+
Content-Disposition: form-data; name="file"; filename="${a}"; filename*=UTF-8''${i}\r
|
|
1308
|
+
Content-Type: ${o}\r
|
|
1309
|
+
\r
|
|
1310
|
+
`,{head:s,tail:`\r
|
|
1311
|
+
--${e}--\r
|
|
1312
|
+
`}}function Ad(e,t){let n=e.filter(([l])=>t-l<=3e3);if(n.length<2)return 0;let[o,a]=n[0],[i,s]=n[n.length-1];return i>o?Math.max(0,(s-a)/(i-o)*1e3):0}function Ed(e,t){let n=t??{};return e===401?"not_signed_in":n.code==="FILE_TOO_LARGE"||e===413?"too_large":typeof n.detail=="string"&&/quota exceeded/i.test(n.detail)?"quota":n.code==="STORAGE_NOT_CONFIGURED"?"storage_unavailable":`http_${e}`}var Pg=3,Mg=200,zi=32,Ig=e=>typeof e=="string"&&!!e&&e!=="."&&e!==".."&&!/[\\/]/.test(e);function Pd(e,t){return t?e.flatMap(n=>{let o=(n.webkitRelativePath||n.name).split("/");return o.slice(1).some(a=>a.startsWith("."))||o.length-1>zi?[]:[{file:n,relDir:o.slice(0,-1)}]}):e.map(n=>({file:n,relDir:[]}))}function Md(e){let t=Array.from(e.items??[]).filter(a=>a.kind==="file").map(a=>({entry:a.webkitGetAsEntry?.()??null,file:a.getAsFile()})),n=[],o=async(a,i)=>{if(i.length>zi)return!0;if(a.isFile){let c=await new Promise(d=>a.file(d,()=>d(null)));return c&&n.push({file:c,relDir:i}),n.length<=2e3}if(!a.isDirectory)return!0;let s=a.createReader(),l=[];for(;;){let c=await new Promise(d=>s.readEntries(d,()=>d([])));if(!c.length)break;l.push(...c)}l.sort((c,d)=>c.name<d.name?-1:c.name>d.name?1:0);for(let c of l)if(!c.name.startsWith(".")&&!await o(c,[...i,a.name]))return!1;return!0};return(async()=>{for(let a of t)if(a.entry){if(!await o(a.entry,[]))break}else a.file&&n.push({file:a.file,relDir:[]});return n})()}function Id(e,t=window){let n=[],o=new Map,a=!1,i=()=>Date.now(),s=()=>Array.from(t.crypto.getRandomValues(new Uint8Array(16)),w=>w.toString(16).padStart(2,"0")).join("");async function l(){let w=await e.getCloud();if(!w.token)throw new Error("not_signed_in");return w}async function c(w,A={}){let P=await l(),I=ln(P.base,w);if(!I)throw new Error("bad_path");let N=await sn(P,I,{method:A.method??"GET",headers:{...A.body!==void 0?{"Content-Type":"application/json"}:{},...A.projectSource?{"X-Project-Source":A.projectSource}:{}},body:A.body!==void 0?JSON.stringify(A.body):void 0,signal:AbortSignal.timeout(3e4)});return{status:N.status,json:await N.json().catch(()=>null)}}let d=w=>{let{attempt:A,relDir:P,abort:I,samples:N,file:V,dl:X,...oe}=w;return{...oe,speed:w.state==="active"?Ad(N,i()):0}},f=w=>w.state==="active"||w.state==="queued"||w.state==="paused",u=(w,A,P=null)=>{w.state=A,w.error=P,w.abort=null,w.finishedAt=i(),w.samples=[];let I=n.filter(N=>N.state==="done"||N.state==="canceled");for(let N of I.slice(0,Math.max(0,I.length-Mg)))n.splice(n.indexOf(N),1);g()},p=w=>{let A=String(w?.message||w);return["too_large","quota","not_signed_in","bad_response","popup_blocked"].includes(A)||A.startsWith("http_")?A:"network"};function g(){if(!a)for(let w of["up","down"]){let A=n.filter(P=>P.kind===w&&P.state==="active").length;for(let P of n){if(A>=Pg)break;if(P.kind!==w||P.state!=="queued")continue;A++,P.state="active",P.startedAt=i(),P.done=0,P.samples=[[i(),0]],P.abort=new AbortController;let I=P.abort.signal,N=++P.attempt,V=()=>P.attempt===N&&P.state==="active";(w==="up"?_(P,V,I):R(P,V,I)).catch(X=>{V()&&u(P,"failed",p(X))})}}}let m=(w,A)=>{w.done=A;let P=i(),I=w.samples[w.samples.length-1];for((!I||P-I[0]>=200)&&w.samples.push([P,A]);w.samples.length>2&&P-w.samples[0][0]>3500;)w.samples.shift()};function y(w){if(!w.relDir.length)return Promise.resolve(w.targetId);let A=o.get(w.batch);A||o.set(w.batch,A=new Map);let P=A,I=N=>{if(N===0)return Promise.resolve(w.targetId);let V=w.relDir.slice(0,N).join("/"),X=P.get(V);return X||(X=I(N-1).then(async oe=>{let b=w.relDir[N-1],C=await c("/files",{method:"POST",body:{type:"directory",parentId:oe,name:b},projectSource:w.projectSource});if(C.status===201&&typeof C.json?.id=="string")return C.json.id;if(C.status===409){let L=await c(`/files${oe==="ROOT"?"":`?parentId=${encodeURIComponent(oe)}`}`,{projectSource:w.projectSource}),K=Array.isArray(L.json)?L.json.find(ie=>ie?.fileType==="directory"&&ie?.name===b):null;if(K?.id)return String(K.id)}throw new Error(C.status===401?"not_signed_in":`http_${C.status}`)}),X.catch(()=>P.delete(V)),P.set(V,X)),X};return I(w.relDir.length)}async function _(w,A,P){let I=w.file;if(I.size>52428800)throw new Error("too_large");let N=await y(w);if(!A())return;w.parentId=N;let V=await l();if(!A())return;let X=ln(V.base,"/files/upload");if(!X)throw new Error("bad_path");let oe=`----penzor${s()}`,{head:b,tail:C}=Td(oe,{parentId:N,autoRename:"true"},w.name,I.type||xi(w.name)),L=await sn(V,X,{method:"POST",headers:{"Content-Type":`multipart/form-data; boundary=${oe}`,...w.projectSource?{"X-Project-Source":w.projectSource}:{}},body:new Blob([b,I,C]),signal:P}),K=await L.json().catch(()=>null);A()&&(L.status===201||L.status===200?(w.fileId=typeof K?.id=="string"?K.id:null,m(w,w.size),u(w,"done")):u(w,"failed",Ed(L.status,K)))}async function E(w,A,P){A.size=Number(w.headers.get("content-length"))||A.size;let I=w.headers.get("content-type")||"";if(!w.body)return w.blob();let N=w.body.getReader(),V=[],X=0;for(;;){let{done:oe,value:b}=await N.read();if(oe)break;if(!P())throw N.cancel().catch(()=>{}),new Error("aborted");V.push(b),X+=b.length,m(A,X)}return X>A.size&&(A.size=X),new Blob(V,{type:I})}let x=(w,A)=>{let P=URL.createObjectURL(w),I=t.document.createElement("a");I.href=P,I.download=A,t.document.body.appendChild(I),I.click(),I.remove(),setTimeout(()=>URL.revokeObjectURL(P),6e4)},k=w=>{let A=t.open("","_blank");return A?(A.opener=null,A.location.replace(w),!0):!1};async function R(w,A,P){let I=w.dl,N=await l();if(!A())return;let V=ln(N.base,I.path);if(!V)throw new Error("bad_path");let X=await sn(N,V,{signal:P});if(!X.ok)throw new Error(X.status===401?"not_signed_in":`http_${X.status}`);let oe;if(I.mode==="bytes")oe=await E(X,w,A);else{let b=await X.json().catch(()=>null);if(I.mode==="text"){if(typeof b?.content!="string")throw new Error("bad_response");oe=new Blob([b.content],{type:xi(I.name)}),w.size=oe.size,m(w,oe.size)}else{if(typeof b?.url!="string"||!/^https?:\/\//i.test(b.url))throw new Error("bad_response");let C=await fetch(b.url,{signal:P,credentials:"omit"}).catch(L=>{if(P.aborted)throw L;return null});if(!C){if(!A())return;if(!k(b.url))throw new Error("popup_blocked");u(w,"done");return}if(!C.ok)throw new Error(`http_${C.status}`);oe=await E(C,w,A)}}A()&&(x(oe,I.name),u(w,"done"))}let B=(w,A)=>{let P={projectSource:void 0,parentId:void 0,targetId:void 0,fileId:null,localPath:null,...w,id:s(),attempt:0,done:0,state:A?"failed":"queued",error:A??null,abort:null,samples:[],speed:0,startedAt:null,finishedAt:A?i():null};return n.push(P),P};e.handle("penzor:upload",async(w,A)=>{let P=A??{},I=(Array.isArray(P.files)?P.files:[]).filter(C=>!!C&&C.file instanceof Blob&&typeof C.file.name=="string"&&Array.isArray(C.relDir)&&C.relDir.length<=zi&&C.relDir.every(Ig)),N=typeof P.parentId=="string"&&_d.test(P.parentId)?P.parentId:null,V=typeof P.projectSource=="string"&&Sd.test(P.projectSource)?P.projectSource:null;if(!I.length)return{ok:!1,error:"no_files"};if(!N||!V)return{ok:!1,error:"bad_target"};if(I.length>2e3)return{ok:!1,error:"too_many",max:2e3};if(!(await e.getCloud()).token)return{ok:!1,error:"not_signed_in"};let X=I.filter(C=>C.file.size<=52428800).reduce((C,L)=>C+L.file.size,0);try{let C=await c("/storage/quota"),L=Number(C.json?.used),K=Number(C.json?.quota);if(C.status===200&&K>0&&L+X>K)return{ok:!1,error:"quota",short:L+X-K}}catch{}if(a)return{ok:!1,error:"disposed"};let oe=s(),b=I.map(C=>B({kind:"up",name:C.file.name,size:C.file.size,projectSource:V,parentId:C.relDir.length?null:N,targetId:N,batch:oe,relDir:C.relDir,file:C.file},C.file.size>52428800?"too_large":void 0).id);return g(),{ok:!0,ids:b,batch:oe}}),e.handle("penzor:download",async(w,A)=>{let P=A??{},I=zd.includes(P.mode)?P.mode:null,N=Cd(P.name);if(!I)return{ok:!1,error:"bad_mode"};if(!N)return{ok:!1,error:"bad_name"};let V=await e.getCloud();if(typeof P.path!="string"||!ln(V.base,P.path))return{ok:!1,error:"bad_path"};if(!V.token)return{ok:!1,error:"not_signed_in"};if(a)return{ok:!1,error:"disposed"};let X=B({kind:"down",name:N,size:Math.max(0,Number(P.size)||0),relDir:[],batch:typeof P.batch=="string"&&P.batch.length<=64?P.batch:s(),dl:{path:P.path,mode:I,name:N}});return g(),{ok:!0,id:X.id}}),e.handle("penzor:transfers",()=>({ok:!0,items:n.map(d)})),e.handle("penzor:transfer",(w,A)=>{let P=A??{},I=n.find(V=>V.id===P.id);if(!I)return{ok:!1,error:"not_found"};let N=()=>{I.abort?.abort(),I.abort=null,I.done=0,I.samples=[]};switch(P.op){case"pause":(I.state==="active"||I.state==="queued")&&(N(),I.state="paused",g());break;case"resume":I.state==="paused"&&(I.state="queued",g());break;case"cancel":f(I)&&(N(),u(I,"canceled"));break;case"retry":(I.state==="failed"||I.state==="canceled")&&(I.state="queued",I.error=null,I.finishedAt=null,I.done=0,g());break;case"dismiss":I.state!=="active"&&I.state!=="queued"&&n.splice(n.indexOf(I),1);break;default:return{ok:!1,error:"bad_op"}}return{ok:!0}}),e.handle("penzor:transfers:clear",(w,A)=>{let P=A?.which==="all";for(let I of[...n])(I.state==="done"||I.state==="canceled"||P&&I.state==="failed")&&n.splice(n.indexOf(I),1);return{ok:!0}});let j=w=>{n.some(f)&&(w.preventDefault(),w.returnValue="")};return t.addEventListener("beforeunload",j),{dispose(){a=!0,t.removeEventListener("beforeunload",j);for(let w of n)w.state="canceled",w.abort?.abort();n.length=0}}}var Rd={search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',down:'<path d="m6 9 6 6 6-6"/>',right:'<path d="m9 18 6-6-6-6"/>',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',page:'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5V19A9 3 0 0 0 21 19V5"/><path d="M3 12A9 3 0 0 0 21 12"/>',attachment:'<path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/>',trash:'<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/>',refresh:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/>',archive:'<rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/>',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',undo:'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/>',pen:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>',move:'<path d="M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1"/><path d="M2 13h10"/><path d="m9 16 3-3-3-3"/>',book:'<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/>',login:'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/>',gear:'<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>',up:'<path d="m18 15-6-6-6 6"/>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>',"folder-plus":'<path d="M12 10v6"/><path d="M9 13h6"/><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>',pause:'<rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/>',play:'<polygon points="6 3 20 12 6 21 6 3"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',check:'<path d="M20 6 9 17l-5-5"/>',alert:'<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',"tx-up":'<path d="m18 9-6-6-6 6"/><path d="M12 3v14"/><path d="M5 21h14"/>',"tx-down":'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',files:'<path d="M20 7h-3a2 2 0 0 1-2-2V2"/><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"/><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"/>',notebook:'<path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"/><path d="M2 6h4"/><path d="M2 10h4"/><path d="M2 14h4"/><path d="M2 18h4"/><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/>',bot:'<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>',puzzle:'<path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"/>',laptop:'<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"/><path d="M20.054 15.987H3.946"/>',info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>'},ne=({n:e})=>r("svg",{viewBox:"0 0 24 24","aria-hidden":"true",dangerouslySetInnerHTML:{__html:Rd[e]??Rd.attachment}});function Od(e){let[,t]=M(0);Q(()=>{let n=e.subscribe(()=>t(o=>o+1));return t(o=>o+1),n},[e])}function Bo(e){return r("div",{ref:e.rootRef,class:`${e.side?"pz-side":"pz"}${e.extra?` ${e.extra}`:""}`,lang:e.p.locale()==="zh"?"zh-CN":"en",...e.on,children:[r("style",{children:wd}),e.children]})}var qn=({pct:e,warn:t})=>r("div",{class:`pz-bar${t?" is-low":""}`,children:r("span",{style:{width:`${Math.max(0,Math.min(100,e)).toFixed(1)}%`}})}),Ld={sync:1,ama:.62,apps:.38,exports:.2},Dd={sync:"penzor.ledger.sync",ama:"penzor.ledger.ama",apps:"penzor.ledger.apps",exports:"penzor.ledger.exports"};function Fd({p:e}){Od(e);let t=te(null);Q(()=>{e.enter(),e.refresh(),Un(e.loc())&&e.ctx.closeView?.("penzor-info",{collapse:!0});let u=t.current;if(!u||typeof IntersectionObserver>"u")return;let p=!0;e.setVisible(!0);let g=new IntersectionObserver(m=>{let y=m.some(_=>_.isIntersecting);y&&!p&&(e.enter(),e.refresh()),p=y,e.setVisible(y)});return g.observe(u),()=>{g.disconnect(),e.setVisible(!1)}},[e]);let[n,o]=M(null),a=u=>Array.from(u.dataTransfer?.types??[]).includes("Files"),i=u=>{let p=u.target?.closest?.("tr[data-dir-id]");return p?{id:p.dataset.dirId,name:p.dataset.dirName??""}:null},s=()=>e.appStack()[e.appStack().length-1]?.name??e.t("penzor.drive"),l=e.canWrite()&&e.auth()==="in"?{onDragOver:u=>{if(!a(u))return;u.preventDefault(),u.stopPropagation(),u.dataTransfer&&(u.dataTransfer.dropEffect="copy");let p=i(u),g=p?.name||s();(n?.place!==g||n?.target?.id!==p?.id)&&o({place:g,target:p})},onDragLeave:u=>{t.current?.contains(u.relatedTarget)||o(null)},onDrop:u=>{if(!a(u))return;u.preventDefault(),u.stopPropagation();let p=i(u);o(null);let g=re().getPathForFile;if(!g){u.dataTransfer&&e.upload(Md(u.dataTransfer),p);return}let m=Array.from(u.dataTransfer?.files??[]).map(y=>{try{return g(y)}catch{return""}}).filter(Boolean);e.upload(m,p)}}:{};Q(()=>{e.canWrite()||o(null)},[e.canWrite()]);let c=e.t,d=e.auth(),f;return d==="out"?f=r($d,{p:e}):e.loc().kind==="sync-home"?f=r(Lg,{p:e}):e.snap()?e.error()?f=r("div",{class:"pz-scroll",children:r("p",{class:"pz-note",children:e.error()})}):e.loc().kind==="overview"?f=di(e.snap()).empty?r(Ng,{p:e}):r(Og,{p:e}):f=r($g,{p:e,dropDir:n?.target?.id??null}):f=r("div",{class:"pz-scroll",children:r("p",{class:"pz-note",children:e.error()??c("penzor.loading")})}),r(Bo,{p:e,rootRef:t,extra:n?"pz-drop":"",on:l,children:[f,n&&r("div",{class:"pz-dropbar",children:r("span",{children:[r(ne,{n:"upload"}),c("penzor.drop.to",{place:n.place})]})}),e.menu()&&r(qg,{p:e}),r(Xg,{p:e})]})}var Rg={dropbox:"Dropbox",s3:"S3",webdav:"WebDAV"};function _i({on:e,disabled:t,label:n,title:o,onToggle:a}){return r("button",{type:"button",role:"switch",class:`settings-switch${e?" active":""}`,"aria-checked":e,"aria-label":n,title:o,disabled:t,onClick:i=>{i.stopPropagation(),a(!e)},children:r("span",{})})}var Si=({tone:e,text:t})=>r("span",{class:`pz-sync-state is-${e}`,children:[e!=="off"&&r("i",{}),t]});function Lg({p:e}){let t=e.t,n=e.syncState(),[o,a]=M(!1);if(!n)return r("div",{class:"pz-scroll",children:r("p",{class:"pz-note",children:t("penzor.loading")})});if(!n.signedIn)return r($d,{p:e});let i=e.snap(),s=n.notes,l=t("penzor.ledger.sync"),c=s.maxBytes??i?.sync?.maxBytes??0,d=i?.sync?.maxFileBytes||50*1024*1024,f=s.vault?i?.sync?.vaults.find(w=>w.vault===s.vault)??null:null,u=nd(n,c),p=s.on?s.last?.skippedLarge??0:0,g=s.rootName?t("penzor.sync.notesNamed",{name:s.rootName}):t("penzor.sync.notesPlain"),m=()=>e.openSync(),y=()=>{if(s.pending)return{tone:"wait",text:t("penzor.sync.waiting")};if(!s.on)return{tone:"off",text:t("penzor.sync.off")};let w=Fr(n);if(w!=null)return{tone:"ok",text:w>0?t("penzor.sync.running",{pct:Math.round(w*100)}):t("penzor.sync.runningPlain")};if(u)return{tone:"warn",text:t("penzor.sync.overQuota")};if(fi(n))return{tone:"warn",text:t("penzor.sync.failed")};if(s.backend==="folder")return{tone:"ok",text:t("penzor.sync.toFolder")};let A=Rg[s.backend];return A?{tone:"ok",text:t("penzor.sync.to",{name:A})}:s.last?{tone:"ok",text:s.localBytes!=null?t("penzor.sync.doneSize",{size:e.b(s.localBytes)}):t("penzor.sync.done")}:{tone:"ok",text:t("penzor.sync.firstPending")}},_=(w,A)=>w?{tone:"ok",text:A}:{tone:"off",text:t("penzor.sync.off")},E=w=>A=>{e.setSync(w,A)},x=s.available===!1&&!s.on&&(s.backend==="off"||s.backend==="penzor"),k=[e.thisDevice()?t("penzor.sync.metaDevice",{name:e.thisDevice()}):null,s.on?s.last?t("penzor.sync.metaLast",{time:gi(s.last.at,e.locale())}):t("penzor.sync.metaNever"):null,s.on&&s.backend!=="off"?mi(s,e.locale()):null].filter(w=>!!w),R=y(),B=f?[...new Set([...f.devices,...f.device?[f.device]:[]])]:[],j=i?.ama?i.ama.reduce((w,A)=>w+A.sizeBytes,0):null;return r("div",{class:"pz-scroll",children:r("div",{class:"pz-col",children:[r("div",{class:"pz-ov-kick",children:t("penzor.kicker")}),r("div",{class:"pz-title pz-sync-head",children:[r("h1",{class:"pz-h1",children:t("penzor.sync.title")}),r("span",{class:"pz-badge",children:[r(ne,{n:"check"}),od(n,e.locale())]})]}),k.length>0&&r("div",{class:"pz-meta",children:k.map(w=>r("span",{children:w},w))}),s.pending&&r(Dg,{p:e,s:n}),u&&r("div",{class:"pz-sync-ask is-warn",role:"region",children:[r("h4",{children:s.localBytes!=null&&c>0?t("penzor.sync.quotaTitle",{size:e.b(s.localBytes),ledger:l,max:e.b(c)}):t("penzor.sync.quotaTitlePlain",{ledger:l})}),r("p",{children:[t("penzor.sync.quotaBody"),p>0&&` ${t("penzor.sync.quotaLarge",{size:e.b(d),n:p})}`]}),r("div",{class:"pz-acts",children:[r("button",{class:"pz-btn pri",onClick:()=>void bn("membership").then(w=>{w||e.ctx.app?.notify?.(t("err.openFailed"))}),children:t("member.upgrade")}),f&&r("button",{class:"pz-btn",onClick:()=>e.go(`sync:${f.vault}`),children:t("penzor.sync.quotaSee")})]})]}),r("div",{class:"pz-sync-card",children:[r("div",{class:`pz-sync-row is-click${o?" is-open":""}`,children:[r("button",{type:"button",class:"pz-sync-main","aria-expanded":o,onClick:()=>a(!o),children:[r("span",{class:"pz-tile",children:r(ne,{n:"notebook"})}),r("span",{class:"pz-sync-txt",children:[r("b",{children:g}),r("small",{children:t("penzor.sync.notesDesc")})]}),r(Si,{...R})]}),r(_i,{on:s.on&&!s.pending,label:g,disabled:!!s.pending||x||e.syncBusy("notes"),title:s.pending?t("penzor.sync.decideAbove"):void 0,onToggle:E("notes")})]}),o&&r("div",{class:"pz-sync-sub",children:[r("div",{class:"kv",children:[r("span",{children:t("penzor.sync.kvSchedule")}),r("span",{children:mi(s,e.locale())}),r("button",{class:"pz-link",onClick:m,children:t("penzor.sync.change")})]}),r("div",{class:"kv",children:[r("span",{children:t("penzor.sync.kvDirection")}),r("span",{children:t(`penzor.sync.dir.${s.direction}`)}),r("button",{class:"pz-link",onClick:m,children:t("penzor.sync.change")})]}),p>0&&r("div",{class:"kv",children:[r("span",{children:t("penzor.sync.kvSkipped")}),r("span",{children:t("penzor.sync.skippedN",{n:p,size:e.b(d)})}),r("span",{})]}),s.backend==="penzor"&&s.vault&&r("div",{class:"kv",children:[r("span",{children:t("penzor.sync.kvWhere")}),r("span",{children:i?.sync&&c>0?t("penzor.sync.whereUsed",{ledger:l,vault:s.vault,used:e.b(i.sync.usedBytes),max:e.b(c)}):t("penzor.sync.where",{ledger:l,vault:s.vault})}),f?r("button",{class:"pz-link",onClick:()=>e.go(`sync:${f.vault}`),children:t("penzor.sync.open")}):r("span",{})]})]}),r("div",{class:"pz-sync-row",children:[r("div",{class:"pz-sync-main",children:[r("span",{class:"pz-tile",children:r(ne,{n:"bot"})}),r("span",{class:"pz-sync-txt",children:[r("b",{children:t("penzor.sync.agents")}),r("small",{children:t("penzor.sync.agentsDesc")})]}),r(Si,{..._(n.agents.on,t("penzor.sync.agentsN",{n:n.agents.count}))})]}),r(_i,{on:n.agents.on,label:t("penzor.sync.agents"),disabled:e.syncBusy("agents"),onToggle:E("agents")})]}),r("div",{class:"pz-sync-row",children:[r("div",{class:"pz-sync-main",children:[r("span",{class:"pz-tile",children:r(ne,{n:"puzzle"})}),r("span",{class:"pz-sync-txt",children:[r("b",{children:t("penzor.sync.plugins")}),r("small",{children:t("penzor.sync.pluginsDesc")})]}),r(Si,{..._(n.plugins.on,t("penzor.sync.pluginsN",{n:n.plugins.count}))})]}),r(_i,{on:n.plugins.on,label:t("penzor.sync.plugins"),disabled:e.syncBusy("plugins"),onToggle:E("plugins")})]})]}),r("div",{class:"pz-h3",children:t("penzor.sync.devicesTitle")}),i?B.length===0?r("p",{class:"pz-sync-none",children:t("penzor.sync.noDevices")}):r("div",{class:"pz-rows pz-sync-dev",children:B.map(w=>r("div",{class:"row",children:[r(ne,{n:"laptop"}),r("span",{class:"t",children:[w,w===e.thisDevice()&&r("em",{children:t("penzor.sync.thisOne")})]}),r("span",{class:"s",children:f?.device===w&&f.updatedAt?t("penzor.sync.lastWrite",{time:gi(Date.parse(f.updatedAt),e.locale())}):""})]},w))}):r("p",{class:"pz-sync-none",children:t("penzor.loading")}),r("div",{class:"pz-h3",children:t("penzor.sync.phoneTitle")}),r("div",{class:"pz-tip",children:[r(ne,{n:"info"}),r("span",{children:j!=null?t("penzor.sync.phoneTip",{size:e.b(j)}):t("penzor.sync.phoneTipPlain")})]}),r("p",{class:"pz-note",children:[t("penzor.sync.foot"),r("button",{class:"pz-link",onClick:m,children:t("penzor.sync.footLink")})]})]})})}function Dg({p:e,s:t}){let n=e.t,o=t.notes.pending,a=e.syncBusy("resolve"),i=new Date,s=n("penzor.sync.backupName",{name:t.notes.rootName??n("penzor.sync.notesPlain"),date:`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`}),l=o.cloudDevice?n("penzor.sync.askCloud",{device:o.cloudDevice,files:o.cloudFiles.toLocaleString(),size:e.b(o.cloudBytes)}):n("penzor.sync.askCloudNoDevice",{files:o.cloudFiles.toLocaleString(),size:e.b(o.cloudBytes)});return r("div",{class:"pz-sync-ask",role:"region","aria-label":n("penzor.sync.askTitle"),children:[r("h4",{children:n("penzor.sync.askTitle")}),r("p",{children:[l," ",n("penzor.sync.askLocal",{local:o.localOnly.toLocaleString(),conflicts:o.conflicts.toLocaleString()})]}),e.confirmCloud()?r("div",{class:"pz-confirm",children:[r("span",{children:n("penzor.sync.askConfirm",{backup:s})}),r("button",{class:"pz-btn pri",disabled:a,onClick:()=>void e.resolveNotes("cloud"),children:n("penzor.sync.askConfirmGo")}),r("button",{class:"pz-btn",disabled:a,onClick:()=>e.setConfirmCloud(!1),children:n("penzor.cancel")})]}):r("div",{class:"pz-acts",children:[r("button",{class:"pz-btn pri",disabled:a,onClick:()=>void e.resolveNotes("merge"),children:n("penzor.sync.askMerge")}),r("button",{class:"pz-btn",disabled:a,onClick:()=>e.setConfirmCloud(!0),children:n("penzor.sync.askCloudBtn")}),r("button",{class:"pz-btn",disabled:a,onClick:()=>void e.resolveNotes("skip"),children:n("penzor.sync.askSkip")})]}),r("p",{class:"pz-sync-explain",children:n("penzor.sync.askExplain",{backup:s})})]})}function $d({p:e}){let t=e.t;return r("div",{class:"pz-scroll",children:r("div",{class:"pz-empty",children:[r("span",{class:"ic",children:r(ne,{n:"cloud"})}),r("h2",{children:t("penzor.out.title")}),r("p",{children:t("penzor.out.lead")}),r("button",{class:"pz-btn pri",onClick:()=>e.signIn(),children:[r(ne,{n:"login"}),t("penzor.out.signIn")]})]})})}function Ng({p:e}){let t=e.t;return r("div",{class:"pz-scroll",children:r("div",{class:"pz-empty",children:[r("span",{class:"ic",children:r(ne,{n:"cloud"})}),r("h2",{children:t("penzor.empty.title")}),r("p",{children:t("penzor.empty.lead")}),r("ul",{children:[r("li",{children:t("penzor.empty.sync")}),r("li",{children:t("penzor.empty.ama")}),r("li",{children:t("penzor.empty.apps")})]}),r("button",{class:"pz-btn",onClick:()=>e.openSync(),children:[r(ne,{n:"gear"}),t("penzor.empty.openSync")]})]})})}function Og({p:e}){let t=e.t,n=e.snap(),o=di(n),a=d=>Vt(d,e.locale()),i=d=>d==="sync"?n.sync?.vaults[0]?`sync:${n.sync.vaults[0].vault}`:"ov":d==="ama"?n.ama?.[0]?`ama:${n.ama[0].id}`:"ov":d==="apps"?o.apps?.apps[0]?`app:${o.apps.apps[0]}`:"trash":"exports",s=(d,f,u,p,g,m,y)=>r("button",{class:`pz-card${y?.warn?" warn":""}`,onClick:()=>e.go(i(d)),children:[r("div",{class:"pz-card-h",children:[r("span",{class:"pz-tile",children:r(ne,{n:f})}),t(Dd[d]),r("span",{class:"go",children:r(ne,{n:"right"})})]}),r("div",{class:"pz-big",children:[u,r("small",{children:p})]}),y&&r(qn,{pct:y.pct,warn:y.warn}),r("div",{class:"pz-sub",children:g}),r("div",{class:`pz-foot${y?.warn?" warn":""}`,children:m})]}),l=Fg(e),c=Math.max(1,...l.map(d=>d.size));return r("div",{class:"pz-scroll",children:r("div",{class:"pz-col",children:[r("div",{class:"pz-ov-kick",children:t("penzor.kicker")}),r("div",{class:"pz-total",children:[r("b",{children:e.b(o.total)}),r("span",{children:t("penzor.total.sub",{time:t("penzor.justNow")})})]}),r("div",{class:"pz-seg",children:o.segments.map(d=>r("i",{style:{width:`${o.total?d.bytes/o.total*100:0}%`,opacity:Ld[d.ledger]}},d.ledger))}),r("div",{class:"pz-legend",children:o.segments.map(d=>r("span",{children:[r("i",{style:{opacity:Ld[d.ledger]}}),t(Dd[d.ledger])," ",e.b(d.bytes)]},d.ledger))}),r("div",{class:"pz-cards",children:[o.sync&&s("sync","refresh",e.b(o.sync.bytes),o.sync.meter?t("penzor.ofMax",{max:e.b(o.sync.meter.max)}):"",o.sync.updatedAt?t("penzor.card.syncSub",{n:o.sync.vaults,time:a(Date.parse(o.sync.updatedAt))}):t("penzor.card.syncSubNone",{n:o.sync.vaults}),o.sync.meter?.warn?t("penzor.card.syncWarn",{max:e.b(o.sync.meter.max)}):t("penzor.card.syncFoot",{size:e.b(o.sync.maxFileBytes)}),o.sync.meter),o.ama&&s("ama","cloud",e.b(o.ama.bytes),t("penzor.card.amaSmall"),t("penzor.card.amaSub",{n:o.ama.vaults}),t("penzor.card.amaFoot")),o.apps&&s("apps","archive",e.b(o.apps.bytes),o.apps.meter?t("penzor.ofMax",{max:e.b(o.apps.meter.max)}):"",[...Ro(n)>0?[t("penzor.drive")]:[],...o.apps.apps.map(d=>e.appLabel(d))].join(" \xB7 ")||t("penzor.card.none"),o.apps.meter?.warn?t("penzor.card.appsWarn",{max:e.b(o.apps.meter.max)}):t("penzor.card.appsFoot",{n:o.apps.trashCount,size:e.b(o.apps.trashBytes)}),o.apps.meter),o.exports&&s("exports","attachment",e.b(o.exports.bytes),t("penzor.card.expSmall",{n:o.exports.count}),o.exports.latest?t("penzor.card.expSub",{name:o.exports.latest.fileName,time:a(Date.parse(o.exports.latest.createdAt))}):t("penzor.card.none"),t("penzor.card.expFoot"))]}),l.length>0&&r(F,{children:[r("div",{class:"pz-h3",children:t("penzor.largest")}),r("div",{class:"pz-rows",children:l.map(d=>r("button",{class:"row",onClick:()=>e.go(d.go),children:[r(ne,{n:$r(d.name)}),r("span",{class:"t",children:[d.name,r("em",{children:d.where})]}),r(qn,{pct:d.size/c*100}),r("span",{class:"s",children:e.b(d.size)})]},d.key))})]})]})})}function Fg(e){let t=e.snap(),n=e.t,o=[...e.largest()];for(let a of t.apps?.largest??[])o.push({key:`a:${a.id}`,name:a.name,where:`${n("penzor.ledger.apps")} \xB7 ${e.appLabel(a.appId)}`,size:a.size,go:`app:${a.appId}`});for(let a of t.exports?.files??[])o.push({key:`e:${a.fileId}`,name:a.fileName,where:`${n("penzor.ledger.exports")} \xB7 ${e.appLabel(a.appId)}`,size:a.size,go:"exports"});return o.sort((a,i)=>i.size-a.size).slice(0,6)}function $g({p:e,dropDir:t}){let n=e.t,o=e.loc(),a=e.snap(),i=e.rows(),[s,l]=M(!1),[c,d]=M(null),f=te(null),u=te(null),p=te(null),g=e.canWrite(),m=e.selection();Q(()=>(e.picker.files=()=>f.current?.click(),e.picker.folder=()=>u.current?.click(),()=>{e.picker.files=void 0,e.picker.folder=void 0}),[e]);let y=(b,C)=>{let L=b.currentTarget,K=re().getPathForFile,ie=Array.from(L.files??[]);if(!K){L.value="",e.upload(Pd(ie,C));return}let pe=ie.map(Pe=>{try{return K(Pe)}catch{return""}}),He=pe.filter(Boolean);if(C){let Pe=new Set;ie.forEach((yt,ve)=>{let et=yt.webkitRelativePath??"",jt=pe[ve];!et||!jt||jt.length<et.length||Pe.add(jt.slice(0,jt.length-et.length)+et.split("/")[0])}),He=[...Pe]}L.value="",e.upload(He)},_=(b,C)=>{e.select(C,{toggle:b.metaKey||b.ctrlKey,range:b.shiftKey}),p.current?.focus({preventScroll:!0})},E=b=>{if(b.target?.tagName!=="INPUT"){if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="a"&&e.canMulti())b.preventDefault(),e.selectAll();else if(b.key==="Escape"&&m.length>1){b.preventDefault();let C=e.selected();e.select(C)}}},x=o.kind==="sync"?n("penzor.ledger.sync"):o.kind==="ama"?n("penzor.ledger.ama"):o.kind==="app"&&!e.canWrite()?n("penzor.ledger.apps"):null,k=o.kind==="sync"?o.vault:o.kind==="ama"?a.ama?.find(b=>b.id===o.vaultId)?.name??"":o.kind==="app"?e.appLabel(o.appId):o.kind==="exports"?n("penzor.ledger.exports"):n("penzor.trash"),R=o.kind==="app"?e.appStack().map(b=>b.name):e.path()?e.path().split("/"):[],B=[...x?[{label:x,depth:null}]:[],{label:k,depth:0},...R.map((b,C)=>({label:b,depth:C+1}))],j=["mtime","size","name"],w=()=>e.setSort(j[(j.indexOf(e.sort())+1)%j.length]),A=o.kind==="sync"?n("penzor.col.device"):o.kind==="trash"?n("penzor.col.origin"):o.kind==="exports"?n("penzor.col.app"):null,P=o.kind==="trash"?n("penzor.col.deleted"):n("penzor.col.mtime"),I=()=>{if(o.kind==="sync"){let C=a.sync?.vaults.find(ie=>ie.vault===o.vault);if(!C)return null;let L=!!e.thisDevice()&&C.devices.includes(e.thisDevice()),K=a.sync;return r(F,{children:[r("div",{class:"pz-title",children:[r("h1",{class:"pz-h1",children:C.vault}),L&&r("span",{class:"pz-badge",children:[r(ne,{n:"refresh"}),n("penzor.sync.thisDevice")]})]}),r("div",{class:"pz-meta",children:[r("span",{children:n("penzor.meta.files",{size:e.b(C.bytes),n:C.files.toLocaleString()})}),C.updatedAt&&r("span",{children:C.device?n("penzor.sync.last",{time:Vt(Date.parse(C.updatedAt),e.locale()),device:C.device}):n("penzor.sync.lastNoDevice",{time:Vt(Date.parse(C.updatedAt),e.locale())})}),C.devices.length>0&&r("span",{children:n("penzor.sync.devices",{n:C.devices.length})})]}),K.maxBytes>0&&r("div",{class:"pz-meter",children:[r(qn,{pct:K.usedBytes/K.maxBytes*100,warn:K.usedBytes/K.maxBytes>=.9}),r("span",{children:n("penzor.sync.meter",{max:e.b(K.maxBytes),used:e.b(K.usedBytes)})})]})]})}if(o.kind==="ama"){let C=a.ama?.find(L=>L.id===o.vaultId);return r(F,{children:[r("div",{class:"pz-title",children:[r("h1",{class:"pz-h1",children:C?.name}),r("span",{class:"pz-badge",children:[r(ne,{n:"cloud"}),"Amadeus Cloud"]})]}),r("div",{class:"pz-meta",children:[r("span",{children:e.b(C?.sizeBytes??0)}),r("span",{children:n("penzor.ama.notCounted")})]})]})}if(o.kind==="app"){let C=a.apps?.apps.find(K=>K.appId===o.appId),L=a.apps;return r(F,{children:[r("div",{class:"pz-title",children:r("h1",{class:"pz-h1",children:e.appLabel(o.appId)})}),r("div",{class:"pz-meta",children:[r("span",{children:n("penzor.meta.files",{size:e.b(C?.bytes??0),n:(C?.files??0).toLocaleString()})}),r("span",{children:e.canWrite()?n("penzor.drive.meta",{max:e.b(L.quota)}):n("penzor.apps.by",{app:e.appLabel(o.appId)})})]}),L.quota>0&&r("div",{class:"pz-meter",children:[r(qn,{pct:L.used/L.quota*100,warn:L.used/L.quota>=.9}),r("span",{children:n("penzor.apps.meter",{max:e.b(L.quota),used:e.b(L.used)})})]})]})}if(o.kind==="exports")return r(F,{children:[r("div",{class:"pz-title",children:r("h1",{class:"pz-h1",children:n("penzor.ledger.exports")})}),r("div",{class:"pz-meta",children:[r("span",{children:n("penzor.meta.files",{size:e.b(a.exports?.totalBytes??0),n:(a.exports?.total??0).toLocaleString()})}),r("span",{children:n("penzor.card.expFoot")})]})]});let b=i??[];return r(F,{children:[r("div",{class:"pz-title",children:r("h1",{class:"pz-h1",children:n("penzor.trash")})}),r("div",{class:"pz-meta",children:[r("span",{children:n("penzor.trash.meta",{n:b.length,size:e.b((a.trash??[]).reduce((C,L)=>C+(Number(L.fileSize)||0),0))})}),a.apps&&a.apps.quota>0&&r("span",{children:n("penzor.trash.note",{max:e.b(a.apps.quota)})})]}),e.confirmEmpty()&&r("div",{class:"pz-confirm",children:[r("span",{children:n("penzor.confirm.empty",{n:b.length})}),r("button",{class:"pz-btn danger solid",onClick:()=>void e.emptyTrash(),children:n("penzor.trash.emptyBtn")}),r("button",{class:"pz-btn",onClick:()=>e.setConfirmEmpty(!1),children:n("penzor.cancel")})]})]})},N=e.selected(),V=m.length>1,X=m.reduce((b,C)=>b+(C.dir?0:C.size),0),oe=e.txRows();return r(F,{children:[r("div",{class:"pz-top",children:[r("nav",{class:"pz-crumb",children:B.map((b,C)=>{let L=C===B.length-1,K=L?r("b",{children:b.label}):b.depth==null?r("span",{children:b.label}):r("button",{onClick:()=>e.up(b.depth),children:b.label});return r("span",{style:{display:"contents"},children:[K,!L&&r("i",{children:"\u203A"})]},C)})}),r("span",{class:"pz-sp"}),V?r(F,{children:[r("span",{class:"pz-selbar",children:n("penzor.sel.bar",{n:m.length,size:e.b(X)})}),m.some(b=>!b.dir)&&r("button",{class:"pz-btn",onClick:()=>void e.downloadMany(m),children:[r(ne,{n:"download"}),n("penzor.act.download")]}),o.kind==="app"&&r("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"move",at:[]}),children:[r(ne,{n:"move"}),n("penzor.act.move")]}),o.kind==="app"&&r("button",{class:"pz-btn danger",onClick:()=>void e.trashMany(m),children:[r(ne,{n:"trash"}),n("penzor.act.trash")]}),r("button",{class:"pz-ibtn",title:n("penzor.act.clearSel"),onClick:()=>e.select(N),children:r(ne,{n:"x"})})]}):r(F,{children:[R.length>0&&r("button",{class:"pz-ibtn",title:n("penzor.act.up"),onClick:()=>e.up(),children:r(ne,{n:"up"})}),o.kind==="ama"&&r("button",{class:"pz-chip",onClick:()=>void e.ctx.app?.openSpace?.("amadeus"),children:[r(ne,{n:"book"}),n("penzor.ama.open")]}),o.kind==="trash"&&(i?.length??0)>0&&r("button",{class:"pz-btn danger",onClick:()=>e.setConfirmEmpty(!0),children:[r(ne,{n:"trash"}),n("penzor.trash.emptyBtn")]}),g&&r("span",{class:"pz-split",children:[r("button",{class:"pz-btn pri",onClick:()=>e.picker.files?.(),children:[r(ne,{n:"upload"}),n("penzor.act.upload")]}),r("button",{class:"pz-btn pri more",title:n("penzor.act.uploadMore"),"aria-label":n("penzor.act.uploadMore"),onClick:b=>{let C=b.currentTarget.getBoundingClientRect();d({x:C.right,y:C.bottom+4})},children:r(ne,{n:"down"})})]}),g&&r("button",{class:"pz-ibtn",title:n("penzor.act.newFolder"),onClick:()=>e.startNewFolder(),children:r(ne,{n:"folder-plus"})}),s||e.query()?r("input",{class:"pz-find",placeholder:n("penzor.search"),value:e.query(),autoFocus:!0,onInput:b=>e.setQuery(b.currentTarget.value),onKeyDown:b=>{b.key==="Escape"&&(e.setQuery(""),l(!1))},onBlur:()=>{e.query()||l(!1)}}):r("button",{class:"pz-ibtn",title:n("penzor.search"),onClick:()=>l(!0),children:r(ne,{n:"search"})}),r("button",{class:"pz-chip",onClick:w,children:[o.kind==="trash"&&e.sort()==="mtime"?n("penzor.sort.deleted"):n(`penzor.sort.${e.sort()}`),r(ne,{n:"down"})]})]})]}),g&&r(F,{children:[r("input",{ref:f,type:"file",multiple:!0,hidden:!0,onChange:b=>y(b,!1)}),r("input",{ref:u,type:"file",hidden:!0,webkitdirectory:!0,onChange:b=>y(b,!0)})]}),c&&r(qd,{x:c.x,y:c.y,alignRight:!0,onClose:()=>d(null),items:[{id:"files",label:n("penzor.act.uploadFiles"),icon:"upload",run:()=>e.picker.files?.()},{id:"folder",label:n("penzor.act.uploadFolder"),icon:"folder",run:()=>e.picker.folder?.()}]}),r("div",{class:"pz-scroll",ref:p,tabIndex:-1,onKeyDown:E,onContextMenu:b=>{!g||b.target.closest("tr")||(b.preventDefault(),e.openMenu(b.clientX,b.clientY,null))},children:r("div",{class:"pz-col",children:[I(),e.rowsError()?r("p",{class:"pz-note",children:n("penzor.err",{reason:e.rowsError()})}):i?i.length===0&&!oe.length&&e.newFolder()==null?r("p",{class:"pz-note",children:e.query()?n("penzor.noMatch",{q:e.query()}):g&&!R.length?n("penzor.drive.empty"):n("penzor.folderEmpty")}):r("table",{class:"pz-table",children:[r("thead",{children:r("tr",{children:[r("th",{children:n("penzor.col.name")}),r("th",{class:"r",children:n("penzor.col.size")}),r("th",{children:P}),A&&r("th",{children:A})]})}),r("tbody",{children:[e.newFolder()!=null&&r(Bg,{p:e,cols:A?4:3}),i.map((b,C)=>r(F,{children:[!b.dir&&(C===0||i[C-1].dir)&&oe.map(L=>r(Nd,{p:e,x:L},L.key)),r("tr",{class:`${e.isSelected(b.key)?"sel":""}${t&&t===b.key?" drop":""}`,"data-dir-id":g&&b.dir?b.key:void 0,"data-dir-name":g&&b.dir?b.name:void 0,onMouseDown:L=>{L.shiftKey&&L.preventDefault()},onClick:L=>_(L,b),onDblClick:()=>{b.dir?e.openDir(b):e.download(b)},onContextMenu:L=>{L.preventDefault(),e.openMenu(L.clientX,L.clientY,b)},children:[r("td",{class:"n",children:r("span",{children:[r(ne,{n:$r(b.name,b.dir)}),r("b",{children:b.name}),b.count!=null&&b.count>0&&r("em",{class:"cnt",children:b.count.toLocaleString()})]})}),r("td",{class:"r",children:b.dir&&o.kind==="app"?"\u2014":e.b(b.size)}),r("td",{children:Vt(b.mtime,e.locale())}),A&&r("td",{class:b.col4?"":"dim",children:b.col4?b.col4===e.thisDevice()?n("penzor.side.thisDevice",{name:b.col4}):b.col4:"\u2014"})]})]},b.key)),(i.length===0||i[i.length-1].dir)&&oe.map(b=>r(Nd,{p:e,x:b},b.key))]})]}):r("p",{class:"pz-note",children:n("penzor.loading")})]})})]})}function Bg({p:e,cols:t}){let[n,o]=M(e.newFolder()??""),a=te(null),i=te(!1);Er(()=>{a.current?.focus(),a.current?.select()},[]);let s=()=>{i.current||(i.current=!0,e.createFolder(n))};return r("tr",{class:"sel",children:[r("td",{class:"n",children:r("span",{children:[r(ne,{n:"folder-open"}),r("input",{ref:a,class:"pz-newname",value:n,onInput:l=>o(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"?s():l.key==="Escape"&&(i.current=!0,e.cancelNewFolder())},onBlur:s})]})}),r("td",{class:"r",children:"\u2014"}),r("td",{children:e.t("penzor.justNow")}),t>3&&r("td",{})]})}function Nd({p:e,x:t}){let n=t.size>0?Math.min(100,Math.round(t.done/t.size*100)):0;return r("tr",{class:`pz-txrow ${t.state}`,title:t.state==="paused"?e.t("penzor.tx.paused"):void 0,children:[r("td",{class:"n",children:r("span",{children:[r(ne,{n:$r(t.name)}),r("b",{children:t.name})]})}),r("td",{class:"r",children:t.state==="active"?pi(t.done,t.size,e.locale()):e.b(t.size)}),r("td",{children:t.state==="queued"?r("span",{class:"pz-inl",children:e.t("penzor.tx.queued")}):r("span",{class:"pz-inl",children:[r(qn,{pct:n}),t.state==="paused"?e.t("penzor.tx.pause"):`${n}%`]})})]})}function Bd(e,t){let n=e.t,o=e.loc().kind,a={id:"download",label:n("penzor.act.download"),icon:"download",run:()=>void e.download(t)};return o==="sync"||o==="ama"?t.dir?[]:[a]:o==="app"?[...t.dir?[]:[a],{id:"rename",label:n("penzor.act.rename"),icon:"pen",run:()=>{e.select(t),e.setSide({kind:"rename"})}},{id:"move",label:n("penzor.act.move"),icon:"move",run:()=>{e.select(t),e.setSide({kind:"move",at:[]})}},{id:"trash",label:n("penzor.act.trash"),icon:"trash",danger:!0,run:()=>void e.trash(t)}]:o==="exports"?[a,{id:"rename",label:n("penzor.act.rename"),icon:"pen",run:()=>{e.select(t),e.setSide({kind:"rename"})}},{id:"delete",label:n("penzor.act.delete"),icon:"trash",danger:!0,run:()=>{e.select(t),e.setSide({kind:"confirm",what:"deleteExport"})}}]:o==="trash"?[{id:"restore",label:n("penzor.act.restore"),icon:"undo",run:()=>void e.restore(t)},{id:"purge",label:n("penzor.act.purge"),icon:"trash",danger:!0,run:()=>{e.select(t),e.setSide({kind:"confirm",what:"purge"})}}]:[]}function Ug(e,t){let n=e.t;if(!t)return e.canWrite()?[{id:"upload",label:n("penzor.act.uploadHere"),icon:"upload",run:()=>e.picker.files?.()},{id:"new-folder",label:n("penzor.act.newFolder"),icon:"folder-plus",run:()=>e.startNewFolder()}]:[];let o=e.selection();return o.length>1&&o.some(a=>a.key===t.key)?Ud(e,o):Bd(e,t)}function Ud(e,t){let n=e.t,o=e.loc().kind,a=t.filter(i=>!i.dir).length;return[...a?[{id:"download",label:n("penzor.sel.download",{n:a}),icon:"download",run:()=>void e.downloadMany(t)}]:[],...o==="app"?[{id:"move",label:n("penzor.act.move"),icon:"move",run:()=>e.setSide({kind:"move",at:[]})},{id:"trash",label:n("penzor.act.trash"),icon:"trash",danger:!0,run:()=>void e.trashMany(t)}]:[]]}function qd({x:e,y:t,items:n,onClose:o,alignRight:a}){let i=te(null),[s,l]=M({x:e,y:t});return Q(()=>{let c=i.current;if(c){let u=c.getBoundingClientRect(),p=a?e-u.width:e;l({x:Math.max(8,Math.min(p,window.innerWidth-u.width-8)),y:t+u.height>window.innerHeight-8?Math.max(8,t-u.height):t})}let d=u=>{u.target instanceof Node&&c?.contains(u.target)||o()},f=u=>{u.key==="Escape"&&o()};return window.addEventListener("pointerdown",d,!0),window.addEventListener("keydown",f,!0),window.addEventListener("blur",o),window.addEventListener("wheel",o,{passive:!0}),()=>{window.removeEventListener("pointerdown",d,!0),window.removeEventListener("keydown",f,!0),window.removeEventListener("blur",o),window.removeEventListener("wheel",o)}},[e,t]),n.length?xd(r("div",{ref:i,class:"ctx-menu pz-menu",role:"menu",style:{left:`${s.x}px`,top:`${s.y}px`},children:n.map((c,d)=>r(F,{children:[c.danger&&d>0&&r("div",{class:"ctx-separator"}),r("button",{role:"menuitem",class:c.danger?"danger":"",onClick:()=>{o(),c.run()},children:[r(ne,{n:c.icon}),c.label]})]},c.id))}),document.body):(queueMicrotask(o),null)}function qg({p:e}){let t=e.menu();return r(qd,{x:t.x,y:t.y,items:Ug(e,t.row),onClose:e.closeMenu})}function Hd({p:e}){Od(e);let t=e.t,n=e.loc(),o=e.selected();if(Un(n)||!o)return r(Bo,{p:e,side:!0,children:r("p",{class:"pz-side-none",children:t("penzor.side.none")})});let a=e.snap(),i=e.side(),s=e.selection();if(s.length>1)return r(Vg,{p:e,sel:s});let l=n.kind==="sync"?`${n.vault} / ${o.key}`:n.kind==="ama"?`${a?.ama?.find(m=>m.id===n.vaultId)?.name??""} / ${o.key}`:n.kind==="app"?[e.appLabel(n.appId),...e.appStack().map(m=>m.name),o.name].join(" / "):n.kind==="exports"?`${t("penzor.ledger.exports")} / ${o.name}`:o.col4??"",c=o.dir?"":(o.name.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??"").toUpperCase(),d=n.kind==="trash"?t("penzor.side.inTrash",{size:e.b(o.size)}):o.dir?o.count!=null?t("penzor.side.folder",{n:o.count.toLocaleString()}):t("penzor.side.folderPlain"):[c,e.b(o.size)].filter(Boolean).join(" \xB7 "),f=n.kind==="trash"?[[t("penzor.side.origin"),l],[t("penzor.side.deletedAt"),Vt(o.mtime,e.locale())]]:[[t("penzor.side.where"),l],[t("penzor.side.mtime"),Vt(o.mtime,e.locale())]];n.kind==="sync"&&!o.dir&&f.push([t("penzor.side.device"),o.col4?o.col4===e.thisDevice()?t("penzor.side.thisDevice",{name:o.col4}):o.col4:"\u2014"]),n.kind==="app"&&!o.dir&&!e.canWrite()&&f.push([t("penzor.side.from"),e.appLabel(n.appId)]),n.kind==="exports"&&f.push([t("penzor.side.from"),o.col4??"\u2014"]);let u=sd(n),p=Bd(e,o),g=e.versions();return r(Bo,{p:e,side:!0,children:[r("div",{class:"pz-thumb",children:r(ne,{n:$r(o.name,o.dir)})}),i.kind==="rename"?r(Hg,{p:e,row:o}):r("div",{class:"pz-fname",children:o.name}),r("div",{class:"pz-fsub",children:d}),i.kind==="confirm"?r("div",{class:"pz-confirm",style:{margin:0},children:[r("span",{children:t(i.what==="purge"?"penzor.confirm.purge":"penzor.confirm.deleteExport",{name:o.name})}),r("button",{class:"pz-btn danger solid",onClick:()=>void(i.what==="purge"?e.purge(o):e.deleteExport(o)),children:t(i.what==="purge"?"penzor.act.purge":"penzor.act.delete")}),r("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"view"}),children:t("penzor.cancel")})]}):p.length>0&&r("div",{class:"pz-acts",children:p.filter(m=>m.id!=="move").map(m=>r("button",{class:`pz-btn${m.danger?" danger":""}${m.id==="restore"?" pri":""}`,onClick:()=>m.run(),children:[r(ne,{n:m.icon}),m.id==="trash"?t("penzor.act.delete"):m.label]},m.id))}),i.kind==="move"&&r(Vd,{p:e,row:o,at:i.at}),r("dl",{class:"pz-dl",children:[f.map(([m,y])=>r(F,{children:[r("dt",{children:m}),r("dd",{children:y})]},m)),n.kind==="app"&&!o.dir&&r(F,{children:[r("dt",{children:t("penzor.side.versions")}),r("dd",{children:g==null?"\u2026":g.length?t("penzor.side.versionsN",{n:g.length}):t("penzor.side.versionsNone")})]})]}),n.kind==="app"&&!o.dir&&g&&g.length>0&&r("div",{class:"pz-vers",children:g.map(m=>r("div",{children:[r("span",{children:t("penzor.side.versionRow",{n:m.versionNumber,time:Vt(m.createdAt,e.locale()),size:e.b(m.fileSize)})}),r("button",{class:"pz-link",onClick:()=>void e.restoreVersion(o,m),children:t("penzor.side.restoreVersion")})]},m.versionNumber))}),n.kind==="trash"&&o.dir&&(o.count??0)>0&&r("div",{class:"pz-tip",children:[r(ne,{n:"undo"}),r("span",{children:t("penzor.side.inner",{n:o.count})})]}),n.kind==="exports"&&r("div",{class:"pz-tip",children:[r(ne,{n:"trash"}),r("span",{children:t("penzor.side.exportNote")})]}),u&&r("div",{class:"pz-tip",children:[r(ne,{n:"lock"}),r("span",{children:t(u,{vault:n.kind==="sync"?n.vault:""})})]})]})}function Hg({p:e,row:t}){let[n,o]=M(t.name),a=te(null),i=te(!1),s=()=>{i.current||(i.current=!0,e.rename(t,n))};return Q(()=>{let l=a.current;if(!l)return;l.focus();let c=t.dir?-1:t.name.lastIndexOf(".");l.setSelectionRange(0,c>0?c:t.name.length)},[t.key]),r("input",{ref:a,class:"pz-input",value:n,onInput:l=>o(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"?s():l.key==="Escape"&&(i.current=!0,e.setSide({kind:"view"}))},onBlur:s})}function Vd({p:e,row:t,at:n}){let o=e.t,a=e.loc(),i=a.kind==="app"?e.appLabel(a.appId):"",s=e.selection(),l=s.length>1,c=new Set(l?s.map(u=>u.key):[t.key]),d=(e.moveFolders()??[]).filter(u=>!c.has(u.id)),f=n[n.length-1]??{id:"ROOT",name:o("penzor.move.root",{app:i})};return r("div",{class:"pz-tip",style:{flexDirection:"column"},children:[r("div",{class:"pz-sh",style:{margin:0},children:o("penzor.move.title")}),r("div",{class:"pz-pick",children:[n.length>0&&r("button",{onClick:()=>e.moveBrowse(n.slice(0,-1)),children:[r(ne,{n:"up"}),n.length>1?n[n.length-2].name:o("penzor.move.root",{app:i})]}),e.moveFolders()==null?r("span",{children:"\u2026"}):d.length===0?r("span",{children:o("penzor.move.noFolders")}):d.map(u=>r("button",{onClick:()=>e.moveBrowse([...n,u]),children:[r(ne,{n:"folder"}),u.name]},u.id))]}),r("div",{class:"pz-acts",children:[r("button",{class:"pz-btn pri",onClick:()=>void(l?e.moveMany(s,f):e.moveTo(t,f)),children:o("penzor.move.here")}),r("button",{class:"pz-btn",onClick:()=>e.setSide({kind:"view"}),children:o("penzor.cancel")})]})]})}function Vg({p:e,sel:t}){let n=e.t,o=e.loc(),a=t.filter(u=>!u.dir),i=t.length-a.length,s=a.reduce((u,p)=>u+p.size,0),l=new Date,c=n("penzor.download.folder",{date:`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`}),d=o.kind==="app"?[e.appLabel(o.appId),...e.appStack().map(u=>u.name)].join(" / "):o.kind==="sync"?[o.vault,...e.path()?e.path().split("/"):[]].join(" / "):o.kind==="ama"?[e.snap()?.ama?.find(u=>u.id===o.vaultId)?.name??"",...e.path()?e.path().split("/"):[]].join(" / "):"",f=e.side();return r(Bo,{p:e,side:!0,children:[r("div",{class:"pz-thumb",children:r(ne,{n:"files"})}),r("div",{class:"pz-fname",children:n("penzor.sel.title",{n:t.length})}),r("div",{class:"pz-fsub",children:i?n("penzor.sel.subDirs",{size:e.b(s),files:a.length,dirs:i}):n("penzor.sel.sub",{size:e.b(s),files:a.length})}),r("div",{class:"pz-acts",children:Ud(e,t).map(u=>r("button",{class:`pz-btn${u.danger?" danger":""}`,onClick:()=>u.run(),children:[r(ne,{n:u.icon}),u.id==="trash"?n("penzor.act.delete"):u.label]},u.id))}),f.kind==="move"&&r(Vd,{p:e,row:t[0],at:f.at}),r("dl",{class:"pz-dl",children:[r("dt",{children:n("penzor.side.where")}),r("dd",{children:d}),a.length>1&&r(F,{children:[r("dt",{children:n("penzor.sel.saveTo")}),r("dd",{children:n("penzor.sel.saveToValue",{folder:c})})]})]}),i>0&&a.length>0&&r("div",{class:"pz-tip",children:[r(ne,{n:"folder"}),r("span",{children:n("penzor.sel.noDirs")})]})]})}var jd=(e,t)=>t<60?e.t("penzor.tx.sec",{n:Math.max(1,Math.round(t))}):e.t("penzor.tx.min",{n:Math.ceil(t/60)}),jg=(e,t)=>t!=null&&Date.now()-t<6e4?e.t("penzor.justNow"):Vt(t,e.locale()),Wg=(e,t)=>{let n=t.error??"";return n==="too_large"?e.t("penzor.err.too_large",{size:e.b(t.size)}):n==="network"?e.t("penzor.err.network",{pct:t.size?Math.round(t.done/t.size*100):0}):n==="quota"||n==="account_changed"||n==="not_signed_in"||n==="gone"||n==="changed"||n==="storage_unavailable"||n==="popup_blocked"?e.t(`penzor.err.${n}`):e.t("penzor.err.other",{code:n||"?"})};function Gg(e){let t=e.filter(l=>l.state==="active"||l.state==="queued"||l.state==="paused"),n=t.filter(l=>l.state!=="paused"),o=n.reduce((l,c)=>l+Math.max(c.size,c.done),0),a=n.reduce((l,c)=>l+c.done,0),i=n.reduce((l,c)=>l+c.speed,0),s=i>0?(o-a)/i:null;return{live:t,failed:e.filter(l=>l.state==="failed"),done:e.filter(l=>l.state==="done"),up:t.filter(l=>l.kind==="up").length,down:t.filter(l=>l.kind==="down").length,pct:o>0?Math.min(100,Math.round(a/o*100)):0,eta:s!=null&&s>=5?s:null}}function Xg({p:e}){let t=e.t,n=e.card(),o=e.transfers(),a=e.notices();if(n==="hidden"||!o.length&&!a.length)return null;let i=Gg(o),s=i.failed.length+a.length,l=t("penzor.tx.counts",{up:i.up,down:i.down}),c=i.live.length?t("penzor.tx.busy",{n:i.live.length}):s?t("penzor.tx.failedN",{n:s}):t("penzor.tx.allDone"),d=i.live.length?[l,i.eta!=null?t("penzor.tx.eta",{eta:jd(e,i.eta)}):""].filter(Boolean).join(" \xB7 "):s?i.done.length?t("penzor.tx.restDone",{n:i.done.length}):"":t("penzor.tx.doneN",{n:i.done.length}),f={onMouseEnter:()=>e.holdCard(!0),onMouseLeave:()=>e.holdCard(!1)};if(n==="pill")return r("button",{class:"ui-popover pz-txpill",...f,onClick:()=>e.setCard("open"),title:t("penzor.tx.expand"),"aria-label":t("penzor.tx.expand"),children:[i.live.length?r("span",{class:"pz-ring",style:{"--p":i.pct}}):r(ne,{n:s?"alert":"check"}),r("span",{children:i.live.length?t("penzor.tx.pill",{counts:l,pct:i.pct}):c}),r(ne,{n:"up"})]});let u=m=>m.state==="failed"?0:m.state==="active"?1:m.state==="queued"||m.state==="paused"?2:3,p=[...o].filter(m=>m.state!=="canceled").sort((m,y)=>u(m)-u(y)||(u(m)===3?(y.finishedAt??0)-(m.finishedAt??0):0)),g=i.live.length>0&&i.live.every(m=>m.state==="paused");return r("div",{class:"ui-popover pz-txcard",role:"region","aria-label":c,...f,children:[r("div",{class:"pz-txhead",children:[r("b",{children:c}),r("span",{children:d}),r("i",{class:"sp"}),r("button",{class:"pz-ib",title:t("penzor.tx.collapse"),"aria-label":t("penzor.tx.collapse"),onClick:()=>e.setCard(i.live.length||s?"pill":"hidden"),children:r(ne,{n:"down"})})]}),i.live.length>0&&r("div",{class:"pz-txall",children:r(qn,{pct:i.pct})}),r("div",{class:"pz-txlist",children:[a.map(m=>r("div",{class:"pz-txrow2 is-fail",children:[r(ne,{n:"alert"}),r("span",{class:"nm",children:t("penzor.tx.quota",{size:e.b(m.short)})}),r("span",{class:"acts",children:r("button",{class:"pz-ib",title:t("penzor.tx.remove"),onClick:()=>e.dismissNotice(m.id),children:r(ne,{n:"x"})})}),r("span",{class:"sub",children:[r("span",{class:"err",children:t("penzor.tx.quotaSub")}),r("button",{class:"pz-link",onClick:()=>{e.dismissNotice(m.id),e.go("trash")},children:t("penzor.tx.freeSpace")})]})]},m.id)),p.map(m=>r(Kg,{p:e,x:m},m.id))]}),r("div",{class:"pz-txfoot",children:[i.live.length>0&&r("button",{onClick:()=>void e.txAll(g?"resume":"pause"),children:t(g?"penzor.tx.resumeAll":"penzor.tx.pauseAll")}),i.failed.length>0&&!i.live.length&&r("button",{onClick:()=>void e.txAll("retry"),children:t("penzor.tx.retryAll")}),i.done.length>0&&i.live.length>0&&r("button",{onClick:()=>void e.txClear("finished"),children:t("penzor.tx.clearDone")}),!i.live.length&&r("button",{onClick:()=>void e.txClear(s?"all":"finished"),children:t(s?"penzor.tx.clear":"penzor.tx.clearDone")})]})]})}function Kg({p:e,x:t}){let n=e.t,o=t.size>0?Math.min(100,t.done/t.size*100):0,a=t.state==="done"?"check":t.state==="failed"?"alert":t.kind==="up"?"tx-up":"tx-down",i=(l,c,d)=>r("button",{class:"pz-ib",title:c,"aria-label":c,onClick:d,children:r(ne,{n:l})}),s;if(t.state==="failed")s=r("span",{class:"err",children:Wg(e,t)});else if(t.state==="done")s=r(F,{children:[r("span",{children:e.b(t.size)}),r("span",{children:n(t.kind==="up"?"penzor.tx.uploaded":"penzor.tx.downloaded",{time:jg(e,t.finishedAt)})})]});else if(t.state==="queued")s=r(F,{children:[r("span",{children:e.b(t.size)}),r("span",{children:n("penzor.tx.queued")})]});else if(t.state==="paused")s=r(F,{children:[r("span",{children:e.b(t.size)}),r("span",{children:n("penzor.tx.paused")})]});else{let l=t.speed>0?(t.size-t.done)/t.speed:null;s=r(F,{children:[r("span",{children:pi(t.done,t.size,e.locale())}),t.speed>0&&r("span",{children:[e.b(t.speed),"/s"]}),l!=null&&l>=5&&r("span",{children:n("penzor.tx.left",{eta:jd(e,l)})})]})}return r("div",{class:`pz-txrow2${t.state==="done"?" is-done":t.state==="failed"?" is-fail":""}`,children:[r(ne,{n:a}),r("span",{class:"nm",title:t.name,children:t.name}),r("span",{class:"acts",children:[(t.state==="active"||t.state==="queued")&&i("pause",n("penzor.tx.pause"),()=>void e.txOp(t.id,"pause")),t.state==="paused"&&i("play",n("penzor.tx.resume"),()=>void e.txOp(t.id,"resume")),(t.state==="active"||t.state==="queued"||t.state==="paused")&&i("x",n("penzor.tx.cancel"),()=>void e.txOp(t.id,"cancel")),t.state==="failed"&&t.error!=="too_large"&&r("button",{class:"pz-link",onClick:()=>void e.txOp(t.id,"retry"),children:n("penzor.tx.retry")}),t.state==="failed"&&i("x",n("penzor.tx.remove"),()=>void e.txOp(t.id,"dismiss")),t.state==="done"&&(t.kind==="up"||t.localPath)&&r("button",{class:"pz-link",onClick:()=>e.locate(t),children:n(t.kind==="down"?"penzor.tx.reveal":"penzor.tx.locate")})]}),(t.state==="active"||t.state==="paused"||t.state==="queued")&&r(qn,{pct:o}),r("span",{class:"sub",children:s})]})}function Jg(e,t){let n=en(t.tangu);return!!e&&typeof e.registerView=="function"&&typeof e.registerListSource=="function"&&typeof e.openView=="function"&&typeof e.app?.openSpace=="function"&&typeof n?.cloudInvoke=="function"&&!n.mobile&&Ln(n)}function Wd(e,t=window){if(!Jg(e,t))return null;let n=en(t.tangu),o=id(e);n.unitPublicEntry||n.cloudInvoke("penzor:device").then(p=>{let g=p?.name;typeof g=="string"&&g&&o.setDevice(g)}).catch(()=>{});let a=p=>g=>(Be(r(p,{p:o}),g),()=>{Be(null,g)});e.registerView({id:an.main,title:o.t("penzor.title"),icon:"cloud",workspaceSource:bi,mount:a(Fd)}),e.registerView({id:an.info,title:o.t("penzor.details"),icon:"page",mount:a(Hd)});let i=e.listCapabilities?.includes("tree")??!1,s=typeof e.app?.setSpaceProgress=="function"?"hard-drive":"archive",l=()=>({overview:o.t("penzor.overview"),drive:o.t("penzor.drive"),driveIcon:s,sync:o.t("penzor.ledger.sync"),ama:o.t("penzor.ledger.ama"),apps:o.t("penzor.ledger.apps"),exports:o.t("penzor.ledger.exports"),trash:o.t("penzor.trash"),items:p=>o.t("penzor.items",{n:p})}),c=()=>{if(!o.hasSync())return[];let p=o.syncState();return[{key:"sync-home",title:o.t("penzor.sync.title"),icon:"refresh",hint:rd(p,o.locale()),...No(p)?{unread:!0}:{}}]};e.registerListSource({id:bi,title:o.t("penzor.title"),search:!0,items:p=>{let g=[...c(),...Yc(o.snap(),l(),o.locale())],m=p?.query?.trim().toLowerCase()??"";if(m)return g.filter(_=>_.kind!=="folder"&&_.title.toLowerCase().includes(m)).map(({parent:_,...E})=>E);if(i)return g;let y=new Map(g.filter(_=>_.kind==="folder").map(_=>[_.key,_.title]));return g.filter(_=>_.kind!=="folder").map(({parent:_,...E})=>({...E,group:_?y.get(_):void 0}))},subscribe:p=>o.subscribe(p),activeKey:()=>ir(o.loc()),open:p=>o.go(p.key),actions:[{id:"refresh",label:o.t("penzor.act.refresh"),icon:"refresh",primary:!0,run:()=>{o.refresh(),e.app?.sync?.refresh?.().catch(()=>{})}}],itemMenu:p=>{if(p.key.startsWith("sync:")){let g=p.key.slice(5);return[{id:"open-sync",label:o.t("penzor.act.openSync"),icon:"gear",run:()=>o.openSync()},{id:"copy-name",label:o.t("penzor.act.copyName"),icon:"copy",run:()=>{navigator.clipboard?.writeText(g).then(()=>e.app?.notify?.(o.t("penzor.toast.copied")))}}]}return p.key==="trash"&&(o.snap()?.trash?.length??0)>0?[{id:"empty-trash",label:o.t("penzor.trash.emptyBtn"),icon:"trash",danger:!0,run:()=>{o.go("trash"),o.setConfirmEmpty(!0)}}]:[]}}),e.registerCommand?.({id:"open-penzor",title:()=>o.t("penzor.cmd.open"),keywords:"penzor cloud storage quota sync files trash drive upload \u84EC\u6D32\u4E91 \u4E91\u7A7A\u95F4 \u4E91\u76D8 \u7F51\u76D8 \u4E0A\u4F20 \u989D\u5EA6 \u540C\u6B65 \u56DE\u6536\u7AD9",run:()=>{e.app?.openSpace?.(on)}});let d=p=>{if(!(p.key!==ad||!p.newValue))try{let g=JSON.parse(p.newValue);g.page==="sync"&&o.hasSync()?e.app?.openSpace?.(on).then(()=>o.go("sync-home")):typeof g.vault=="string"&&g.vault&&o.focusVault(g.vault)}catch{}},f=(()=>{try{return!new URLSearchParams(t.location.search).get("window")}catch{return!1}})();if(f){t.addEventListener("storage",d);try{t.localStorage.setItem(vi,"1")}catch{}}let u=o.dispose;return o.dispose=()=>{if(f){t.removeEventListener("storage",d);try{t.localStorage.removeItem(vi)}catch{}}u()},o}var Yg=new TextEncoder,Ix=new TextDecoder("utf-8",{ignoreBOM:!0}),Gd=e=>Yg.encode(e);function Xd(e){let t="";for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}var Zg=50*1024*1024,Qg=new Set(["type","source","name","summary","githubRepoUrl","npmPackage","version","readme","description","tags","minAppVersion","maxAppVersion","platforms"]);function eh(e){if(!e||typeof e!="object")return null;let t=e;if(t.id!==void 0&&(typeof t.id!="string"||!/^[a-zA-Z0-9_-]{1,128}$/.test(t.id))||!t.fields||typeof t.fields!="object"||Array.isArray(t.fields))return null;let n=new FormData,o=0;for(let[a,i]of Object.entries(t.fields)){if(!Qg.has(a)||typeof i!="string"||(o+=i.length,o>25e4)||t.id&&!["summary","version","readme","description","tags","minAppVersion","maxAppVersion","platforms"].includes(a))return null;n.append(a,i)}if(t.zip!==void 0){if(!t.zip||typeof t.zip.name!="string"||!/\.zip$/i.test(t.zip.name)||!(t.zip.data instanceof Uint8Array)||!t.zip.data.byteLength||t.zip.data.byteLength>Zg)return null;n.append("zip",new Blob([new Uint8Array(t.zip.data)],{type:"application/zip"}),t.zip.name.replace(/[\\/]/g,"_").slice(-255))}return{path:t.id?`/market/mine/${t.id}/update`:"/market/submit",body:n}}function Kd(e){e.handle("cloud:marketSubmit",async(t,n)=>{if(!e.isTrustedSender(t))return{status:0,error:"untrusted"};let o=eh(n);if(!o)return{status:400,json:{error:"invalid_request"}};let a=await e.getCloud();if(!a.token)return{status:401,error:"not_signed_in"};let i=ln(a.base,o.path);if(!i)return{status:0,error:"no_cloud_url"};try{let s=await sn(a,i,{method:"POST",body:o.body,redirect:"error",signal:AbortSignal.timeout(12e4)});return{status:s.status,json:await s.json().catch(()=>null)}}catch(s){return{status:0,error:String(s?.message||s)}}})}async function Jd(e){if(!e.token)return"";try{let t=await sr(e,"POST","/api/auth/handoff",{},5e3);if(t.status===200&&typeof t.json?.code=="string"&&t.json.code)return`code=${encodeURIComponent(t.json.code)}`;if((t.status===404||t.status===405)&&!e.fetch)return`token=${encodeURIComponent(e.token)}`}catch{}return""}var th=["membership","credits","storefront"],nh=["monthly","quarterly","yearly"],rh=/^[A-Za-z0-9_-]{1,64}$/;function Yd(e){let t={status:0,error:"untrusted"},n={ok:!1,error:"untrusted"};e.handle("auth:openAccountCenter",async(a,i)=>{if(!e.isTrustedSender(a))return n;let s=await e.getCloud(),l=s.base;if(!l)return{ok:!1};let c=i&&/^[a-z0-9-]+$/i.test(i)?`#${i}`:"",d=await Jd(s),f=`${l}/account${d?`?${d}`:""}${c}`;return await e.openExternal(f),{ok:!0}}),e.handle("auth:openPayCenter",async(a,i,s,l)=>{if(!e.isTrustedSender(a))return n;if(i!==void 0&&!th.includes(i))return{ok:!1,error:"invalid_tab"};if(s!==void 0&&(typeof s!="string"||!rh.test(s)))return{ok:!1,error:"invalid_plan"};if(l!==void 0&&!nh.includes(l))return{ok:!1,error:"invalid_period"};let c=(i??"membership")==="membership"&&s?`&plan=${encodeURIComponent(s)}${l?`&period=${l}`:""}`:"",d=await e.getCloud(),f=d.base;if(!f)return{ok:!1};let u=await Jd(d),p=`${f}/pay?tab=${i??"membership"}${c}${u?`&${u}`:""}&redirect=${encodeURIComponent(`${f}/account`)}`;return await e.openExternal(p),{ok:!0}}),e.handle("profile:publicOrigin",async a=>{if(!e.isTrustedSender(a))return n;let{base:i}=await e.getCloud();if(!i)return{ok:!1};try{let s=await fetch(`${i}/account`,{redirect:"manual",signal:AbortSignal.timeout(4e3)});s.body?.cancel().catch(()=>{});let l=s.status>=300&&s.status<400?s.headers.get("location"):null;return l&&/^https?:\/\//i.test(l)?{ok:!0,origin:new URL(l).origin}:{ok:!1}}catch{return{ok:!1}}});let o=()=>e.getCloud();e.handle("account:quota",async a=>{if(!e.isTrustedSender(a))return t;let i=await o();if(!i.token)return{status:401,json:null};try{return await sr(i,"GET","/api/token-quota/my",void 0,15e3)}catch(s){return{status:0,json:{detail:String(s?.message||s)}}}}),e.handle("account:useResetCard",async(a,i)=>{if(!e.isTrustedSender(a))return t;let s=await o();if(!s.token)return{status:401,json:null};if(i!==void 0&&i!=="both")return{status:400,json:{error:"invalid_type",detail:`invalid reset card type: ${i}`}};let l=i??"both";try{return await sr(s,"POST","/api/token-quota/reset-card/use",{type:l},15e3)}catch(c){return{status:0,json:{detail:String(c?.message||c)}}}}),e.handle("account:bgConvert",async(a,i)=>{if(!e.isTrustedSender(a))return t;let s=await o();if(!s.token)return{status:401,json:null};if(!Number.isInteger(i)||i<1||i>100)return{status:400,json:{error:"invalid_percent"}};try{return await sr(s,"POST","/api/token-quota/background/convert",{percent:i},15e3)}catch(l){return{status:0,json:{detail:String(l?.message||l)}}}}),e.handle("account:bgAutoMain",async(a,i)=>{if(!e.isTrustedSender(a))return t;let s=await o();if(!s.token)return{status:401,json:null};if(typeof i!="boolean")return{status:400,json:{error:"invalid_request"}};try{return await sr(s,"POST","/api/token-quota/background/auto-main",{enabled:i},15e3)}catch(l){return{status:0,json:{detail:String(l?.message||l)}}}}),e.handle("feedback:submit",async(a,i)=>{if(!e.isTrustedSender(a))return n;let s=await e.getCloud();if(!s.base||!s.token)return{ok:!1,error:"not-logged-in"};let l=(i?.description||"").trim();if(!l)return{ok:!1,error:"empty"};if(l.length>1e4)return{ok:!1,error:"description-too-long"};let c=[],d=!1;if(i?.sessionLogJson){let f=Gd(i.sessionLogJson);if(f.length>5*1024*1024)return{ok:!1,error:"attachment-too-large"};c.push({filename:i.sessionLogName||"tangu-session.json",mime_type:"application/json",size:f.length,data_base64:Xd(f)})}try{let f=await sn(s,`${s.base}/api/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:l,attachments:c}),signal:AbortSignal.timeout(2e4)});if(!f.ok){let p=`HTTP ${f.status}`;try{p=(await f.json())?.detail||p}catch{}return{ok:!1,error:p}}return{ok:!0,id:(await f.json().catch(()=>({})))?.id??null,attachmentSkipped:d}}catch(f){return{ok:!1,error:f?.message||String(f)}}}),e.handle("cloud:fetch",async(a,i)=>{if(!e.isTrustedSender(a))return{status:0,error:"untrusted"};let s=i??{},l=typeof s.path=="string"?s.path:"",c=s.projectSource===void 0?null:s.projectSource;if(c!==null&&(typeof c!="string"||!/^[a-z0-9][a-z0-9-]{0,63}$/.test(c)))return{status:0,error:"bad_project_source"};let d=Math.min(12e4,Math.max(1e3,Number(s.timeoutMs)||15e3)),f=typeof s.method=="string"?s.method.toUpperCase():"GET";if(!/^(GET|POST|PUT|PATCH|DELETE)$/.test(f))return{status:0,error:"bad_method"};if(!l.startsWith("/"))return{status:0,error:"bad_path"};let u=await e.getCloud();if(!String(u.base||""))return{status:0,error:"no_cloud_url"};let p=ln(u.base,l);if(!p)return{status:0,error:"bad_path"};if(!u.token)return{status:401,error:"not_signed_in"};let g=s.body!==void 0&&f!=="GET"&&f!=="DELETE",m=new AbortController,y=setTimeout(()=>m.abort(),d);try{let _=await sn(u,p,{method:f,headers:{...g?{"Content-Type":"application/json"}:{},...c?{"X-Project-Source":c}:{}},body:g?JSON.stringify(s.body):void 0,signal:m.signal});return{status:_.status,json:await _.json().catch(()=>null)}}catch(_){return{status:0,error:String(_?.message||_)}}finally{clearTimeout(y)}}),Kd(e)}var Zd={sender:"web"},oh=new Set(["auth:openAccountCenter","auth:openPayCenter"]),Qd=(e,t)=>new URL(typeof e=="string"&&e?e:t.location.origin,t.location.href).origin;function ah(e,t=window){let n=new Map,o=[],a={async getCloud(){let c=await e.status().catch(()=>null);return{base:Qd(c?.cloudUrl,t),token:c?.loggedIn?"session":"",fetch:(d,f)=>e.request(d,f)}},handle:(c,d)=>{n.set(c,d)},async openExternal(c){let d=o.shift();d&&!d.closed?d.location.replace(c):t.open(c,"_blank","noopener,noreferrer")},isTrustedSender:()=>!0,log:c=>console.info("[forsion-extend]",c)};Yd(a);let i=Id(a,t),s=async(c,...d)=>{let f=n.get(c);if(!f)throw new Error(`No handler registered for '${c}'`);if(!oh.has(c))return f(Zd,...d);let u=t.open("","_blank");u&&(u.opener=null,o.push(u));try{return await f(Zd,...d)}finally{let p=u?o.indexOf(u):-1;p>=0&&(o.splice(p,1),u.close())}},l=t.tangu?.authStatus;return{...l?{authStatus:async()=>{let c=await l();return{...c,cloudUrl:c?.cloudUrl?Qd(c.cloudUrl,t):c?.cloudUrl}}}:{},cloudInvoke:s,cloudFetch:c=>s("cloud:fetch",c),openAccountCenter:c=>s("auth:openAccountCenter",c),openExternal:async c=>{/^https?:\/\//i.test(c)&&t.open(c,"_blank","noopener,noreferrer")},dispose:i.dispose}}function eu(e,t=window){let n=t.tangu;if(!n?.unitPage||!n.unitPublicEntry||typeof e?.account?.request!="function")return null;let{dispose:o,...a}=ah(e.account,t);return Ks(a),o}var tu;if(typeof ctx<"u"){let e=eu(ctx);Cc(ctx),Sc(ctx);let t=nl(ctx),n=jc(ctx),o=Wd(ctx);(t||n||o||e)&&(tu=()=>{t?.dispose(),n?.dispose(),o?.dispose(),e?.()})}return yu(ih);})();
|
|
1303
1313
|
return __fxExtend.dispose;
|