hive-react-kit 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +22633 -2869
- package/dist/index.umd.js +1040 -29
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ae,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("lucide-react"),require("date-fns"),require("@hiveio/dhive"),require("hls.js"),require("zustand"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","date-fns","@hiveio/dhive","hls.js","zustand","react-router-dom"],T):(ae=typeof globalThis<"u"?globalThis:ae||self,T(ae.HiveReactKit={},ae.React,ae.LucideReact,ae.dateFns,ae.Dhive,ae.Hls,ae.Zustand,ae.ReactRouterDOM))})(this,function(ae,T,q,ls,cs,vn,il,ol){"use strict";var Qy=Object.defineProperty;var ev=(ae,T,q)=>T in ae?Qy(ae,T,{enumerable:!0,configurable:!0,writable:!0,value:q}):ae[T]=q;var us=(ae,T,q)=>ev(ae,typeof T!="symbol"?T+"":T,q);function ul(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ds=ul(T),Ef=ul(cs);var J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var co={exports:{}},ca={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ll;function Nf(){if(ll)return ca;ll=1;var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,f){var l,h={},d=null,m=null;f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(m=u.ref);for(l in u)n.call(u,l)&&!s.hasOwnProperty(l)&&(h[l]=u[l]);if(c&&c.defaultProps)for(l in u=c.defaultProps,u)h[l]===void 0&&(h[l]=u[l]);return{$$typeof:e,type:c,key:d,ref:m,props:h,_owner:a.current}}return ca.Fragment=r,ca.jsx=o,ca.jsxs=o,ca}var da={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var cl;function Af(){return cl||(cl=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,x="@@iterator";function y(N){if(N===null||typeof N!="object")return null;var z=b&&N[b]||N[x];return typeof z=="function"?z:null}var g=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(N){{for(var z=arguments.length,Z=new Array(z>1?z-1:0),oe=1;oe<z;oe++)Z[oe-1]=arguments[oe];D("error",N,Z)}}function D(N,z,Z){{var oe=g.ReactDebugCurrentFrame,ce=oe.getStackAddendum();ce!==""&&(z+="%s",Z=Z.concat([ce]));var he=Z.map(function(ue){return String(ue)});he.unshift("Warning: "+z),Function.prototype.apply.call(console[N],console,he)}}var w=!1,j=!1,p=!1,A=!1,k=!1,U;U=Symbol.for("react.module.reference");function H(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===s||k||N===a||N===f||N===l||A||N===m||w||j||p||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===h||N.$$typeof===o||N.$$typeof===c||N.$$typeof===u||N.$$typeof===U||N.getModuleId!==void 0))}function S(N,z,Z){var oe=N.displayName;if(oe)return oe;var ce=z.displayName||z.name||"";return ce!==""?Z+"("+ce+")":Z}function P(N){return N.displayName||"Context"}function I(N){if(N==null)return null;if(typeof N.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case l:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case c:var z=N;return P(z)+".Consumer";case o:var Z=N;return P(Z._context)+".Provider";case u:return S(N,N.render,"ForwardRef");case h:var oe=N.displayName||null;return oe!==null?oe:I(N.type)||"Memo";case d:{var ce=N,he=ce._payload,ue=ce._init;try{return I(ue(he))}catch{return null}}}return null}var W=Object.assign,_=0,M,O,G,B,K,X,se;function je(){}je.__reactDisabledLog=!0;function L(){{if(_===0){M=console.log,O=console.info,G=console.warn,B=console.error,K=console.group,X=console.groupCollapsed,se=console.groupEnd;var N={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}_++}}function V(){{if(_--,_===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},N,{value:M}),info:W({},N,{value:O}),warn:W({},N,{value:G}),error:W({},N,{value:B}),group:W({},N,{value:K}),groupCollapsed:W({},N,{value:X}),groupEnd:W({},N,{value:se})})}_<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=g.ReactCurrentDispatcher,ie;function ne(N,z,Z){{if(ie===void 0)try{throw Error()}catch(ce){var oe=ce.stack.trim().match(/\n( *(at )?)/);ie=oe&&oe[1]||""}return`
|
|
18
|
+
`+ie+N}}var Ne=!1,Fe;{var At=typeof WeakMap=="function"?WeakMap:Map;Fe=new At}function kt(N,z){if(!N||Ne)return"";{var Z=Fe.get(N);if(Z!==void 0)return Z}var oe;Ne=!0;var ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=re.current,re.current=null,L();try{if(z){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch($e){oe=$e}Reflect.construct(N,[],ue)}else{try{ue.call()}catch($e){oe=$e}N.call(ue.prototype)}}else{try{throw Error()}catch($e){oe=$e}N()}}catch($e){if($e&&oe&&typeof $e.stack=="string"){for(var de=$e.stack.split(`
|
|
19
|
+
`),He=oe.stack.split(`
|
|
20
|
+
`),Ee=de.length-1,ke=He.length-1;Ee>=1&&ke>=0&&de[Ee]!==He[ke];)ke--;for(;Ee>=1&&ke>=0;Ee--,ke--)if(de[Ee]!==He[ke]){if(Ee!==1||ke!==1)do if(Ee--,ke--,ke<0||de[Ee]!==He[ke]){var Ce=`
|
|
21
|
+
`+de[Ee].replace(" at new "," at ");return N.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",N.displayName)),typeof N=="function"&&Fe.set(N,Ce),Ce}while(Ee>=1&&ke>=0);break}}}finally{Ne=!1,re.current=he,V(),Error.prepareStackTrace=ce}var Ut=N?N.displayName||N.name:"",Tt=Ut?ne(Ut):"";return typeof N=="function"&&Fe.set(N,Tt),Tt}function yr(N,z,Z){return kt(N,!1)}function vr(N){var z=N.prototype;return!!(z&&z.isReactComponent)}function _e(N,z,Z){if(N==null)return"";if(typeof N=="function")return kt(N,vr(N));if(typeof N=="string")return ne(N);switch(N){case f:return ne("Suspense");case l:return ne("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case u:return yr(N.render);case h:return _e(N.type,z,Z);case d:{var oe=N,ce=oe._payload,he=oe._init;try{return _e(he(ce),z,Z)}catch{}}}return""}var ze=Object.prototype.hasOwnProperty,Qe={},Re=g.ReactDebugCurrentFrame;function jt(N){if(N){var z=N._owner,Z=_e(N.type,N._source,z?z.type:null);Re.setExtraStackFrame(Z)}else Re.setExtraStackFrame(null)}function wr(N,z,Z,oe,ce){{var he=Function.call.bind(ze);for(var ue in N)if(he(N,ue)){var de=void 0;try{if(typeof N[ue]!="function"){var He=Error((oe||"React class")+": "+Z+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw He.name="Invariant Violation",He}de=N[ue](z,ue,oe,Z,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ee){de=Ee}de&&!(de instanceof Error)&&(jt(ce),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",oe||"React class",Z,ue,typeof de),jt(null)),de instanceof Error&&!(de.message in Qe)&&(Qe[de.message]=!0,jt(ce),E("Failed %s type: %s",Z,de.message),jt(null))}}}var ts=Array.isArray;function Cr(N){return ts(N)}function Or(N){{var z=typeof Symbol=="function"&&Symbol.toStringTag,Z=z&&N[Symbol.toStringTag]||N.constructor.name||"Object";return Z}}function ta(N){try{return un(N),!1}catch{return!0}}function un(N){return""+N}function ra(N){if(ta(N))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Or(N)),un(N)}var lt=g.ReactCurrentOwner,$r={key:!0,ref:!0,__self:!0,__source:!0},ln,ct;function Pr(N){if(ze.call(N,"ref")){var z=Object.getOwnPropertyDescriptor(N,"ref").get;if(z&&z.isReactWarning)return!1}return N.ref!==void 0}function Kt(N){if(ze.call(N,"key")){var z=Object.getOwnPropertyDescriptor(N,"key").get;if(z&&z.isReactWarning)return!1}return N.key!==void 0}function cn(N,z){typeof N.ref=="string"&<.current}function Lr(N,z){{var Z=function(){ln||(ln=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};Z.isReactWarning=!0,Object.defineProperty(N,"key",{get:Z,configurable:!0})}}function Qt(N,z){{var Z=function(){ct||(ct=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};Z.isReactWarning=!0,Object.defineProperty(N,"ref",{get:Z,configurable:!0})}}var er=function(N,z,Z,oe,ce,he,ue){var de={$$typeof:e,type:N,key:z,ref:Z,props:ue,_owner:he};return de._store={},Object.defineProperty(de._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(de,"_self",{configurable:!1,enumerable:!1,writable:!1,value:oe}),Object.defineProperty(de,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.freeze&&(Object.freeze(de.props),Object.freeze(de)),de};function na(N,z,Z,oe,ce){{var he,ue={},de=null,He=null;Z!==void 0&&(ra(Z),de=""+Z),Kt(z)&&(ra(z.key),de=""+z.key),Pr(z)&&(He=z.ref,cn(z,ce));for(he in z)ze.call(z,he)&&!$r.hasOwnProperty(he)&&(ue[he]=z[he]);if(N&&N.defaultProps){var Ee=N.defaultProps;for(he in Ee)ue[he]===void 0&&(ue[he]=Ee[he])}if(de||He){var ke=typeof N=="function"?N.displayName||N.name||"Unknown":N;de&&Lr(ue,ke),He&&Qt(ue,ke)}return er(N,de,He,ce,oe,lt.current,ue)}}var dn=g.ReactCurrentOwner,St=g.ReactDebugCurrentFrame;function Vt(N){if(N){var z=N._owner,Z=_e(N.type,N._source,z?z.type:null);St.setExtraStackFrame(Z)}else St.setExtraStackFrame(null)}var fn;fn=!1;function Mr(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function tr(){{if(dn.current){var N=I(dn.current.type);if(N)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+N+"`."}return""}}function dt(N){return""}var at={};function wt(N){{var z=tr();if(!z){var Z=typeof N=="string"?N:N.displayName||N.name;Z&&(z=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+Z+">.")}return z}}function qt(N,z){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var Z=wt(z);if(at[Z])return;at[Z]=!0;var oe="";N&&N._owner&&N._owner!==dn.current&&(oe=" It was passed a child from "+I(N._owner.type)+"."),Vt(N),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Z,oe),Vt(null)}}function et(N,z){{if(typeof N!="object")return;if(Cr(N))for(var Z=0;Z<N.length;Z++){var oe=N[Z];Mr(oe)&&qt(oe,z)}else if(Mr(N))N._store&&(N._store.validated=!0);else if(N){var ce=y(N);if(typeof ce=="function"&&ce!==N.entries)for(var he=ce.call(N),ue;!(ue=he.next()).done;)Mr(ue.value)&&qt(ue.value,z)}}}function rs(N){{var z=N.type;if(z==null||typeof z=="string")return;var Z;if(typeof z=="function")Z=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===u||z.$$typeof===h))Z=z.propTypes;else return;if(Z){var oe=I(z);wr(Z,N.props,"prop",oe,N)}else if(z.PropTypes!==void 0&&!fn){fn=!0;var ce=I(z);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ce||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ir(N){{for(var z=Object.keys(N.props),Z=0;Z<z.length;Z++){var oe=z[Z];if(oe!=="children"&&oe!=="key"){Vt(N),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",oe),Vt(null);break}}N.ref!==null&&(Vt(N),E("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}var rr={};function hn(N,z,Z,oe,ce,he){{var ue=H(N);if(!ue){var de="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var He=dt();He?de+=He:de+=tr();var Ee;N===null?Ee="null":Cr(N)?Ee="array":N!==void 0&&N.$$typeof===e?(Ee="<"+(I(N.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Ee=typeof N,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ee,de)}var ke=na(N,z,Z,ce,he);if(ke==null)return ke;if(ue){var Ce=z.children;if(Ce!==void 0)if(oe)if(Cr(Ce)){for(var Ut=0;Ut<Ce.length;Ut++)et(Ce[Ut],N);Object.freeze&&Object.freeze(Ce)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else et(Ce,N)}if(ze.call(z,"key")){var Tt=I(N),$e=Object.keys(z).filter(function(C){return C!=="key"}),Fr=$e.length>0?"{key: someKey, "+$e.join(": ..., ")+": ...}":"{key: someKey}";if(!rr[Tt+Fr]){var ns=$e.length>0?"{"+$e.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Fr,Tt,ns,Tt),rr[Tt+Fr]=!0}}return N===n?Ir(ke):rs(ke),ke}}function aa(N,z,Z){return hn(N,z,Z,!0)}function sa(N,z,Z){return hn(N,z,Z,!1)}var pn=sa,Dt=aa;da.Fragment=n,da.jsx=pn,da.jsxs=Dt}()),da}process.env.NODE_ENV==="production"?co.exports=Nf():co.exports=Af();var i=co.exports;const sr={domain:"https://studio.3speak.tv",kThreeSpeakApiUrl:"https://studio.3speak.tv/mobile/api",userOwnerThumb:t=>`https://images.hive.blog/u/${t}/avatar`,graphQLServerUrl:"https://union.us-02.infra.3speak.tv"},fs=new cs.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class kf{constructor(){us(this,"commonFields",`
|
|
31
31
|
items {
|
|
32
32
|
created_at
|
|
33
33
|
title
|
|
@@ -55,28 +55,28 @@ React keys must be passed directly to JSX without using spread:
|
|
|
55
55
|
spkvideo
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`)}async getGQLFeed(
|
|
59
|
-
query ${
|
|
60
|
-
${
|
|
61
|
-
spkvideo: { ${
|
|
62
|
-
feedOptions: ${
|
|
63
|
-
pagination: { limit: ${
|
|
58
|
+
`)}async getGQLFeed(e,r){var a,s,o;const n=`${sr.graphQLServerUrl}/api/v2/graphql`;try{const c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:r,operationName:e})});if(!c.ok)throw new Error(`GraphQL request failed: ${c.statusText}`);const u=await c.json();if(u.errors)throw new Error(`GraphQL error: ${u.errors.map(l=>l.message).join(", ")}`);const f=u.data;return(a=f.socialFeed)!=null&&a.items?f.socialFeed.items:(s=f.trendingFeed)!=null&&s.items?f.trendingFeed.items:(o=f.searchFeed)!=null&&o.items?f.searchFeed.items:[]}catch(c){throw console.error(`Failed to fetch ${e}:`,c),c}}async handleLogin(e){const r=`${sr.domain}/mobile/login`,n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challenge:e.challenge,proof:e.proof,publicKey:e.publicKey,username:e.username})});if(n.ok)return await n.json();throw new Error(`Login API error: ${await n.text()}`)}async handleUpvote({author:e,permlink:r,weight:n,authToken:a}){const s=`${sr.domain}/mobile/vote`,o=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:a},body:JSON.stringify({author:e,permlink:r,weight:n})});if(o.ok)return await o.json();{const c=await o.json();throw new Error(c.error||"Unknown API error")}}async handleComment({author:e,permlink:r,body:n,authToken:a}){const s=`${sr.domain}/mobile/comment`,o=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:a},body:JSON.stringify({author:e,permlink:r,comment:n})});if(o.ok)return await o.json();{const c=await o.json();throw new Error(c.error||"Unknown API error")}}async getVideoDetails(e,r){const n=`${sr.kThreeSpeakApiUrl}/video/@${e}/${r}`,a=await fetch(n);if(a.ok)return await a.json();console.error("Failed to fetch video details:",a.statusText)}async fetchFeed(e,r,n,a,s={limit:50,skip:0}){const{limit:o=50,skip:c=0}=s,u=`
|
|
59
|
+
query ${e} {
|
|
60
|
+
${r}(
|
|
61
|
+
spkvideo: { ${n} }
|
|
62
|
+
feedOptions: ${a}
|
|
63
|
+
pagination: { limit: ${o}, skip: ${c} }
|
|
64
64
|
) {
|
|
65
65
|
${this.commonFields}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,f=await this.getGQLFeed(e,u);return this.convertGQLItemsToThreeSpeakVideos(f)}async getUserVideos(e,r=0){return await this.fetchFeed("UserChannelFeed","socialFeed","only: true",`{ byCreator: { _in: ["${e}"] } }`,{skip:r})}async getHomeVideos(e=0){const r=`${sr.kThreeSpeakApiUrl}/feed/home?skip=${e}`,n=await fetch(r);if(n.ok){const a=await n.json();return Array.isArray(a)?a:[]}else return console.error("Failed to fetch home videos:",n.statusText),[]}async getTrendingVideos(e=0){return await this.fetchFeed("TrendingFeed","trendingFeed","only: true","{}",{skip:e})}async getNewVideos(e=0){return await this.fetchFeed("NewUploadsFeed","socialFeed","only: true","{}",{skip:e})}async getFirstUploadsVideos(e=0){return await this.fetchFeed("FirstUploadsFeed","trendingFeed","only: true, firstUpload: true","{}",{skip:e})}async getCommunityVideos(e,r=0){return await this.fetchFeed("CommunityFeed","socialFeed","only: true",`{ byCommunity: { _eq: "${e}" } }`,{skip:r})}async getRelatedVideos(e,r=0){return await this.fetchFeed("RelatedFeed","socialFeed","only: true",`{ byCreator: { _in: ["${e}"] } }`,{skip:r})}async getTaggedVideos(e,r=0){return await this.fetchFeed("TrendingTagFeed","trendingFeed","only: true",`{ byTag: { _eq: "${e}" } }`,{skip:r})}async getSearchFeed(e,r=0,n){const a=n?`{ byLang: { _eq: "${n}" } }`:"{}",s=`
|
|
69
69
|
query SearchFeed {
|
|
70
70
|
searchFeed(
|
|
71
|
-
searchTerm: "${
|
|
71
|
+
searchTerm: "${e}"
|
|
72
72
|
spkvideo: { only: true }
|
|
73
|
-
feedOptions: ${
|
|
74
|
-
pagination: { limit: 50, skip: ${
|
|
73
|
+
feedOptions: ${a}
|
|
74
|
+
pagination: { limit: 50, skip: ${r} }
|
|
75
75
|
) {
|
|
76
76
|
${this.commonFields}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,o=await this.getGQLFeed("SearchFeed",s);return this.convertGQLItemsToThreeSpeakVideos(o)}async getTrendingTags(){var n,a;const e=`${sr.graphQLServerUrl}/api/v2/graphql`,r=`
|
|
80
80
|
query TrendingTags {
|
|
81
81
|
trendingTags(limit: 50) {
|
|
82
82
|
tags {
|
|
@@ -85,18 +85,1029 @@ React keys must be passed directly to JSX without using spread:
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
`;try{const i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,operationName:"TrendingTags"})});if(!i.ok)throw new Error(`GraphQL request failed: ${i.statusText}`);const l=await i.json();if(l.errors)throw new Error(`GraphQL error: ${l.errors.map(u=>u.message).join(", ")}`);return((o=(a=l.data)==null?void 0:a.trendingTags)==null?void 0:o.tags)||[]}catch(i){throw console.error("Failed to fetch trending tags:",i),i}}convertGQLItemsToThreeSpeakVideos(s){return s.map(t=>{var o,i,l,u,c,h,m,x,v,y,g,C,k,S;let a=null;try{typeof t.spkvideo=="string"?a=JSON.parse(t.spkvideo):a=t.spkvideo}catch(w){console.error("Error parsing spkvideo JSON",w)}return{title:t.title||"Untitled",owner:((o=t.author)==null?void 0:o.username)||"",permlink:t.permlink||"",created:new Date(t.created_at),category:t.tags&&t.tags.length>0?t.tags[0]:"general",duration:(a==null?void 0:a.duration)||((c=(u=(l=(i=t.json_metadata)==null?void 0:i.raw)==null?void 0:l.video)==null?void 0:u.info)==null?void 0:c.duration)||0,thumbnail:(a==null?void 0:a.thumbnail_url)||((v=(x=(m=(h=t.json_metadata)==null?void 0:h.raw)==null?void 0:m.video)==null?void 0:x.info)==null?void 0:v.thumbnail),numOfUpvotes:(y=t.stats)==null?void 0:y.num_votes,numOfComments:(g=t.stats)==null?void 0:g.num_comments,hiveValue:(C=t.stats)==null?void 0:C.total_hive_reward,active_votes:((S=(k=t.stats)==null?void 0:k.active_voters)==null?void 0:S.map(w=>({voter:w.voter,percent:w.percent,rshares:w.rshares,weight:w.weight})))||[]}})}async getContentStats(s,t){try{const a=await Fe.call("condenser_api","get_content",[s,t]);return{numOfUpvotes:(a==null?void 0:a.net_votes)??0,numOfComments:(a==null?void 0:a.children)??0,hiveValue:a!=null&&a.pending_payout_value?parseFloat(a.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(s,t){try{return await Fe.call("condenser_api","get_active_votes",[s,t])}catch(a){return console.error("Error calling get_active_votes:",a),[]}}async getCommentsList(s,t){try{const a=await Fe.call("bridge","get_discussion",[s,t]);return(Array.isArray(a)?a:a&&typeof a=="object"?Object.values(a):[]).map(i=>{const l=i.depth;if(typeof l=="string"){const c=parseInt(l,10);i.depth=Number.isFinite(c)?c:0}else(typeof l!="number"||!Number.isFinite(l))&&(i.depth=i.depth??0);const u=i.json_metadata;try{if(u&&typeof u=="string"){const c=u.trim();(c.startsWith("{")&&c.endsWith("}")||c.startsWith("[")&&c.endsWith("]"))&&(i.json_metadata_parsed=JSON.parse(c))}else u&&typeof u=="object"&&(i.json_metadata_parsed=u)}catch{console.warn(`Skipped invalid json_metadata for ${i.author}/${i.permlink}`)}return i})}catch(a){return console.error("Error fetching comments list:",a),[]}}async getMyVideos(s){const t=`${xe.domain}/mobile/api/my-videos`,a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:s}});if(a.ok){const o=await a.json();return Array.isArray(o)?o:[]}else throw console.error("Failed to fetch my videos:",a.statusText),new Error(`Failed to fetch my videos: ${a.status}`)}async getRankedPosts(s="trending",t="",a="hive.blog",o=20,i,l){try{const u={sort:s,tag:t,observer:a,limit:o};return i&&l&&(u.start_author=i,u.start_permlink=l),await Fe.call("bridge","get_ranked_posts",u)}catch(u){return console.error("Error fetching ranked posts:",u),[]}}}const se=new Gt,ve=r=>r?r.startsWith("Qm")||r.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${r}`:r.startsWith("http")?r:r.startsWith("/")?`https://3speak.tv${r}`:r:"/placeholder.svg",ht=({video:r,onVideoClick:s,onAuthorClick:t,isGrid:a=!1})=>{const[o,i]=d.useState({numOfUpvotes:r.numOfUpvotes,numOfComments:r.numOfComments,hiveValue:r.hiveValue});d.useEffect(()=>{if(o.numOfUpvotes===void 0&&r.numOfUpvotes===void 0){let c=!0;return(async()=>{try{const h=await se.getContentStats(r.author||"",r.permlink||"");c&&i(h)}catch(h){console.error("Error fetching content stats for VideoCard:",h)}})(),()=>{c=!1}}else r.numOfUpvotes!==void 0&&i({numOfUpvotes:r.numOfUpvotes,numOfComments:r.numOfComments||0,hiveValue:r.hiveValue||0})},[r.author,r.permlink,o.numOfUpvotes,r.numOfUpvotes,r.numOfComments,r.hiveValue]);const l=c=>{if(!c)return"00:00";const h=Math.floor(c),m=Math.floor(h/3600),x=Math.floor(h%3600/60),v=h%60,y=g=>g.toString().padStart(2,"0");return h<60?`00:${y(v)}`:m===0?`${y(x)}:${y(v)}`:`${y(m)}:${y(x)}:${y(v)}`},u=c=>c==null?"":c>=1e6?`${(c/1e6).toFixed(1)}M`:c>=1e3?`${(c/1e3).toFixed(1)}K`:c.toString();return e.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[e.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>s(r),children:[e.jsx("img",{src:ve(r.thumbnail),alt:r.title,onError:c=>{c.target.src=`https://images.hive.blog/u/${r.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),r.duration&&e.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[e.jsx(j.Clock,{className:"w-3 h-3"}),l(r.duration)]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:e.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:e.jsx(j.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>s(r),children:r.title}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>t(r.author),children:[e.jsx("img",{src:`https://images.hive.blog/u/${r.author}/avatar`,alt:r.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:c=>{c.target.src="https://images.hive.blog/u/null/avatar"}}),e.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",r.author]})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Ge.formatDistanceToNow(r.created,{addSuffix:!0})})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[o.numOfUpvotes!=null&&e.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[e.jsx(j.ThumbsUp,{className:"w-4 h-4"}),e.jsx("span",{children:u(o.numOfUpvotes)})]}),o.numOfComments!=null&&e.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[e.jsx(j.MessageCircle,{className:"w-4 h-4"}),e.jsx("span",{children:u(o.numOfComments)})]})]}),o.hiveValue!=null&&o.hiveValue>0&&e.jsxs("div",{className:"text-primary font-semibold",children:["$",o.hiveValue.toFixed(2)]})]}),r.category&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:r.category})})]})]})};var ee=(r=>(r.HOME="home",r.TRENDING="trending",r.NEW_VIDEOS="newVideos",r.FIRST_UPLOADS="firstUploads",r.USER="user",r.COMMUNITY="community",r.RELATED="related",r.TAG_FEED="tag_feed",r.SEARCH="search",r))(ee||{});const gt=new Map,xt=({title:r,author:s,permlink:t,createdAt:a,video:o,currentUser:i,isContentVoted:l=!1,description:u,onTapComment:c,onTapUpvote:h,onTapShare:m,onTapBookmark:x,onTapAuthor:v,onTapInfo:y})=>{const[g,C]=d.useState(o.numOfComments||0),[k,S]=d.useState(o.numOfUpvotes||0),[w,I]=d.useState(!1),[_,M]=d.useState(!1),[D,$]=d.useState(""),f=B=>{$(B),M(!0),setTimeout(()=>M(!1),3e3)},V=(B,z)=>`${B}:${z}`;d.useEffect(()=>{const B=V(s,t),z=gt.get(B);z?(C(z.comments),S(z.upvotes)):(async()=>{const p=await se.getContentStats(s,t);S(p.numOfUpvotes),C(p.numOfComments),gt.set(V(s,t),{comments:p.numOfComments,upvotes:p.numOfUpvotes})})()},[s,t]);const L=()=>{c?c(s,t):f("Comments feature coming soon!")},P=()=>{h?h(s,t):f("Upvote feature requires authentication!")},T=()=>{if(m)m(s,t);else{const B=`https://3speak.tv/user/${s}/${t}`;navigator.share?navigator.share({title:r,url:B}):(navigator.clipboard.writeText(B),f("Link copied to clipboard!"))}},E=()=>{x?x(s,t):(I(!w),f(w?"Removed from bookmarks":"Added to bookmarks"))},J=()=>v==null?void 0:v(s,t),re=()=>{y?y(s,t):f("Video details coming soon!")};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[e.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:r}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("button",{onClick:J,className:"flex-shrink-0 group",children:e.jsx("img",{src:`https://images.hive.blog/u/${s}/avatar`,alt:s,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:B=>{B.target.src=`https://ui-avatars.com/api/?name=${s}&background=random`}})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{children:[e.jsxs("button",{onClick:J,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",s]}),e.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[o.views&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j.Eye,{className:"w-4 h-4"}),e.jsxs("span",{children:[o.views.toLocaleString()," views"]})]}),a&&e.jsx("span",{children:Ge.formatDistanceToNow(a,{addSuffix:!0})})]})]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:re,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[e.jsx(j.Info,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),e.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[e.jsx(j.MessageCircle,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:g})]}),e.jsxs("button",{type:"button",onClick:P,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${l?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[e.jsx(j.ThumbsUp,{className:`w-4 h-4 ${l?"fill-current":""}`}),e.jsx("span",{className:"text-sm font-medium",children:k})]}),e.jsxs("button",{type:"button",onClick:T,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[e.jsx(j.Share2,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),e.jsxs("button",{type:"button",onClick:E,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${w?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[e.jsx(j.Heart,{className:`w-4 h-4 ${w?"fill-current":""}`}),e.jsx("span",{className:"text-sm font-medium",children:w?"Saved":"Save"})]})]}),(o.hiveValue||o.category)&&e.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[o.hiveValue&&o.hiveValue>0&&e.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:e.jsxs("span",{children:["$",o.hiveValue.toFixed(2)," earned"]})}),o.category&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j.Users,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:o.category})]})]})]})]})]}),_&&e.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:e.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:e.jsx("div",{className:"font-medium",children:D})})})]})},$e=new Map,Pe=({feedType:r,username:s,communityId:t,tag:a,onVideoClick:o,onAuthorClick:i})=>{const[l,u]=d.useState([]),[c,h]=d.useState(!0),[m,x]=d.useState(!1),[v,y]=d.useState(null),[g,C]=d.useState(!0),[k,S]=d.useState(0),w=d.useMemo(()=>{switch(r){case ee.USER:return`user:${s||""}`;case ee.COMMUNITY:return`community:${t||""}`;case ee.TAG_FEED:return`tag:${a||""}`;case ee.SEARCH:return`search:${a||""}`;default:return r}},[r,s,t,a]),I=d.useCallback(async f=>{var V,L,P,T,E,J,re,B,z,ae,p,te;if((V=f.author)!=null&&V.username){if(!f.permlink)return null;let R=null;try{typeof f.spkvideo=="string"?R=JSON.parse(f.spkvideo):R=f.spkvideo}catch(q){console.error("Error parsing spkvideo JSON",q)}const ye=ve(R==null?void 0:R.thumbnail_url)||ve((E=(T=(P=(L=f.json_metadata)==null?void 0:L.raw)==null?void 0:P.video)==null?void 0:T.info)==null?void 0:E.thumbnail),he=(R==null?void 0:R.duration)||((z=(B=(re=(J=f.json_metadata)==null?void 0:J.raw)==null?void 0:re.video)==null?void 0:B.info)==null?void 0:z.duration)||0;return{title:f.title||"Untitled",author:f.author.username,permlink:f.permlink,created:new Date(f.created_at),category:f.tags&&f.tags.length>0?f.tags[0]:"general",duration:he,thumbnail:ye,numOfUpvotes:((ae=f.stats)==null?void 0:ae.num_votes)||f.numOfUpvotes,numOfComments:((p=f.stats)==null?void 0:p.num_comments)||f.numOfComments,hiveValue:((te=f.stats)==null?void 0:te.total_hive_reward)||f.hiveValue}}return f.owner?{title:f.title||"Untitled",author:f.owner,permlink:f.permlink||"",created:new Date(f.created||Date.now()),category:f.category||"general",duration:f.duration,thumbnail:ve(f.thumbnail),numOfUpvotes:f.numOfUpvotes,numOfComments:f.numOfComments,hiveValue:f.hiveValue}:null},[]),_=d.useCallback(async(f,V=!1)=>{try{let L=[];switch(r){case ee.SEARCH:a&&(L=await se.getSearchFeed(a,f));break;case ee.TAG_FEED:a&&(L=await se.getTaggedVideos(a,f));break;case ee.HOME:L=await se.getHomeVideos(f);break;case ee.TRENDING:L=await se.getTrendingVideos(f);break;case ee.NEW_VIDEOS:L=await se.getNewVideos(f);break;case ee.FIRST_UPLOADS:L=await se.getFirstUploadsVideos(f);break;case ee.USER:s&&(L=await se.getUserVideos(s,f));break;case ee.COMMUNITY:t&&(L=await se.getCommunityVideos(t,f));break;case ee.RELATED:s&&(L=await se.getRelatedVideos(s,f));break}const T=(await Promise.all(L.map(I))).filter(E=>E!==null);V?(u(T),$e.set(w,T)):u(E=>{const J=[...E,...T];return $e.set(w,J),J}),C(L.length>=20),S(f+L.length),y(null)}catch(L){y(L instanceof Error?L.message:"Failed to load videos")}},[r,s,t,a,w,I]);d.useEffect(()=>{(async()=>{h(!0),u([]),S(0);const V=$e.get(w);V!=null&&V.length&&(u(V),h(!1)),await _(0,!0),h(!1)})()},[w,_]);const M=d.useCallback(async()=>{m||!g||(x(!0),await _(k),x(!1))},[m,g,k,_]),D=d.useCallback(async()=>{$e.delete(w),h(!0),S(0),await _(0,!0),h(!1)},[w,_]);d.useEffect(()=>{const f=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&M()};return window.addEventListener("scroll",f),()=>window.removeEventListener("scroll",f)},[M]);const $=()=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((f,V)=>e.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[e.jsx("div",{className:"aspect-video bg-muted"}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),e.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("div",{className:"h-3 bg-muted rounded w-16"}),e.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},V))});return c&&l.length===0?e.jsx($,{}):v&&l.length===0?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:v}),e.jsxs("button",{onClick:D,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):l.length===0?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),e.jsxs("button",{onClick:D,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[r.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),e.jsxs("button",{onClick:D,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:l.map((f,V)=>e.jsx(ht,{video:f,onVideoClick:o,onAuthorClick:i,isGrid:!0},`${f.author}-${f.permlink}-${V}`))}),g&&e.jsx("div",{className:"flex justify-center pt-8",children:m?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(j.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):e.jsx("button",{onClick:M,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})},Me=({isOpen:r,onClose:s,title:t,children:a,maxWidth:o="max-w-2xl"})=>r?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:s}),e.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${o} max-h-[90vh] overflow-hidden animate-scale-in`,children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[e.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:t}),e.jsx("button",{onClick:s,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:e.jsx(j.X,{className:"w-5 h-5 text-muted-foreground"})})]}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:a})]})]}):null,ft=({author:r,permlink:s,currentUser:t,onClose:a})=>{const[o,i]=d.useState([]),[l,u]=d.useState(!0),[c,h]=d.useState(null),[m,x]=d.useState(""),[v,y]=d.useState(!1);d.useEffect(()=>{(async()=>{try{u(!0);const w=(await se.getCommentsList(r,s)).filter(I=>I.depth&&I.depth>0).sort((I,_)=>new Date(_.created||0).getTime()-new Date(I.created||0).getTime());i(w)}catch(S){h(S instanceof Error?S.message:"Failed to load comments")}finally{u(!1)}})()},[r,s]);const g=async()=>{if(!(!m.trim()||!t))try{y(!0),console.log("Would submit comment:",m),x("")}catch(k){console.error("Failed to submit comment:",k)}finally{y(!1)}},C=k=>{const S=Math.min(k.depth||0,5);return e.jsx("div",{className:`border-l-2 border-border ${S>0?`ml-${S*4}`:""}`,children:e.jsxs("div",{className:"p-4 bg-muted/30 rounded-r-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("img",{src:`https://images.hive.blog/u/${k.author}/avatar`,alt:k.author,className:"w-6 h-6 rounded-full object-cover border border-border",onError:w=>{w.target.src=`https://ui-avatars.com/api/?name=${k.author}&background=random`}}),e.jsxs("span",{className:"font-medium text-card-foreground text-sm",children:["@",k.author]}),k.created&&e.jsx("span",{className:"text-xs text-muted-foreground",children:Ge.formatDistanceToNow(new Date(k.created),{addSuffix:!0})})]}),e.jsx("div",{className:"text-sm text-card-foreground leading-relaxed",children:k.body||"No content"}),k.net_votes&&k.net_votes>0&&e.jsx("div",{className:"flex items-center gap-1 mt-2",children:e.jsxs("span",{className:"text-xs text-muted-foreground",children:[k.net_votes," votes"]})})]})},`${k.author}-${k.permlink}`)};return e.jsx(Me,{isOpen:!0,onClose:a,title:`Comments (${o.length})`,maxWidth:"max-w-2xl",children:e.jsxs("div",{className:"p-6",children:[t&&e.jsx("div",{className:"mb-6 p-4 bg-muted/50 rounded-lg",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("img",{src:`https://images.hive.blog/u/${t}/avatar`,alt:t,className:"w-8 h-8 rounded-full object-cover border border-border"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("textarea",{value:m,onChange:k=>x(k.target.value),placeholder:"Write a comment...",className:"w-full p-3 bg-background border border-border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-primary",rows:3}),e.jsx("div",{className:"flex justify-end mt-2",children:e.jsxs("button",{onClick:g,disabled:!m.trim()||v,className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[v?e.jsx(j.Loader2,{className:"w-4 h-4 animate-spin"}):e.jsx(j.Send,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:v?"Posting...":"Post Comment"})]})})]})]})}),l?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(j.Loader2,{className:"w-6 h-6 animate-spin text-primary"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading comments..."})]}):c?e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-error",children:c})}):o.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(j.MessageCircle,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-muted-foreground",children:"No comments yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Be the first to share your thoughts!"})]}):e.jsx("div",{className:"space-y-4",children:o.map(C)})]})})},pt=({author:r,permlink:s,onClose:t})=>{const[a,o]=d.useState([]),[i,l]=d.useState(!0),[u,c]=d.useState(null);d.useEffect(()=>{(async()=>{try{l(!0);const v=(await se.getActiveVotes(r,s)).sort((y,g)=>g.rshares-y.rshares);o(v)}catch(x){c(x instanceof Error?x.message:"Failed to load votes")}finally{l(!1)}})()},[r,s]);const h=m=>m>=1e9?`${(m/1e9).toFixed(1)}B`:m>=1e6?`${(m/1e6).toFixed(1)}M`:m>=1e3?`${(m/1e3).toFixed(1)}K`:m.toString();return e.jsx(Me,{isOpen:!0,onClose:t,title:`Votes (${a.length})`,maxWidth:"max-w-md",children:e.jsx("div",{className:"p-6",children:i?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(j.Loader2,{className:"w-6 h-6 animate-spin text-primary"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading votes..."})]}):u?e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-error",children:u})}):a.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(j.ThumbsUp,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-muted-foreground",children:"No votes yet"})]}):e.jsx("div",{className:"space-y-3",children:a.map((m,x)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:`https://images.hive.blog/u/${m.voter}/avatar`,alt:m.voter,className:"w-8 h-8 rounded-full object-cover border border-border",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${m.voter}&background=random`}}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-medium text-card-foreground",children:["@",m.voter]}),m.time&&e.jsx("div",{className:"text-sm text-muted-foreground",children:new Date(m.time).toLocaleDateString()})]})]}),e.jsxs("div",{className:"text-right",children:[m.percent&&e.jsxs("div",{className:"text-sm font-medium text-primary",children:[(m.percent/100).toFixed(1),"%"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[h(m.rshares)," rshares"]})]})]},`${m.voter}-${x}`))})})})},bt=({author:r,permlink:s,content:t,onClose:a})=>e.jsx(Me,{isOpen:!0,onClose:a,title:"Video Description",maxWidth:"max-w-2xl",children:e.jsxs("div",{className:"p-6",children:[t?e.jsx("div",{className:"prose prose-sm max-w-none",children:e.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:e.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:t})})}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx(j.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-muted-foreground",children:"No description available"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),e.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsxs("span",{children:["By @",r]}),e.jsx("span",{children:"•"}),e.jsxs("span",{children:["/",s]})]})})]})}),Kt=({username:r,permlink:s,onAuthorClick:t,onVideoClick:a,onTagClick:o,onBack:i,onCommentsModal:l,onUpvotesModal:u,onDescriptionModal:c,onVideoInfo:h,onShare:m,onBookmark:x}={})=>{const v=r,y=s,[g,C]=d.useState(null),[k,S]=d.useState(!0),[w,I]=d.useState(null),[_,M]=d.useState(!1),[D,$]=d.useState(null),[f,V]=d.useState(!1),[L,P]=d.useState(!1),[T,E]=d.useState(!1),[J,re]=d.useState(!1),B=d.useRef(null),z=d.useRef(null),ae=d.useRef(null);d.useEffect(()=>{(async()=>{if(!(!v||!y))try{S(!0),I(null);const Z=await se.getVideoDetails(v,y);C(Z),M(!1),$(null)}catch(Z){I(Z instanceof Error?Z.message:"Failed to load video")}finally{S(!1)}})()},[v,y]);const p=q=>q?q.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${q.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:q:"";d.useEffect(()=>((async()=>{const Z=g==null?void 0:g.video_v2;if(!_||!Z||!B.current)return;const Y=B.current,ge=p(Z);z.current&&(z.current.destroy(),z.current=null),Y.src="",Y.load();try{let oe=!1;const ce=()=>{oe||(oe=!0,Y.play().then(()=>$(null)).catch(G=>$(`Playback failed: ${G.message}`)))};if(ke.isSupported()){const G=new ke({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});z.current=G,G.on(ke.Events.MANIFEST_PARSED,()=>{}),G.on(ke.Events.ERROR,(le,de)=>{if(de.fatal)switch(de.type){case ke.ErrorTypes.NETWORK_ERROR:$("Network error, retrying..."),setTimeout(()=>G.startLoad(),1e3);break;case ke.ErrorTypes.MEDIA_ERROR:$("Media error, retrying..."),setTimeout(()=>G.recoverMediaError(),1e3);break;default:$(`Fatal error: ${de.details}`),G.destroy(),z.current=null;break}}),G.attachMedia(Y),G.loadSource(ge)}else if(Y.canPlayType("application/vnd.apple.mpegurl"))Y.src=ge;else{const G=ge.replace("/manifest.m3u8","/480p/index.m3u8");Y.src=G}const be=()=>V(!0),Be=()=>{V(!1),ce()},Oe=G=>{var de;const le=G.target;$(`Video error: ${((de=le.error)==null?void 0:de.message)||"Unknown error"}`),V(!1)},ze=()=>V(!1);Y.addEventListener("loadstart",be),Y.addEventListener("canplay",Be),Y.addEventListener("error",Oe),Y.addEventListener("loadeddata",ze);const qe=async()=>{var le,de,je,we;const G=!!document.fullscreenElement;try{G?"orientation"in screen&&await(((de=(le=screen.orientation)==null?void 0:le.lock)==null?void 0:de.call(le,"landscape"))??Promise.resolve()):"orientation"in screen&&((we=(je=screen.orientation)==null?void 0:je.unlock)==null||we.call(je))}catch{}};return document.addEventListener("fullscreenchange",qe),ae.current=()=>{document.removeEventListener("fullscreenchange",qe)},()=>{Y.removeEventListener("loadstart",be),Y.removeEventListener("canplay",Be),Y.removeEventListener("error",Oe),Y.removeEventListener("loadeddata",ze),ae.current&&ae.current()}}catch(oe){$(`Setup error: ${oe instanceof Error?oe.message:"Unknown"}`)}})(),()=>{z.current&&(z.current.destroy(),z.current=null)}),[_,g==null?void 0:g.video_v2]);const te=()=>{if(!(g==null?void 0:g.video_v2)){$("No video source available");return}M(!0),$(null),V(!0)},R=q=>{a&&a(q)},ye=q=>{t&&t(q)},he=q=>{if(!q)return"00:00";const Z=Math.floor(q),Y=Math.floor(Z/3600),ge=Math.floor(Z%3600/60),oe=Z%60,ce=be=>be.toString().padStart(2,"0");return Z<60?`00:${ce(oe)}`:Y===0?`${ce(ge)}:${ce(oe)}`:`${ce(Y)}:${ce(ge)}:${ce(oe)}`};return k?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),e.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:e.jsxs("div",{className:"animate-pulse space-y-6",children:[e.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):w||!g?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:w||"Video not found"}),e.jsxs("button",{onClick:()=>{i&&i()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[e.jsx(j.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("button",{onClick:()=>{i&&i()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[e.jsx(j.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),e.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:_?e.jsxs("div",{className:"relative w-full h-full",children:[e.jsx("video",{ref:B,controls:!0,poster:ve(g.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async q=>{const Z=q.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await Z.requestFullscreen()}catch{}}}),f&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),D&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:e.jsxs("div",{className:"text-center text-white",children:[e.jsx("p",{className:"mb-4",children:D}),e.jsx("button",{onClick:()=>{M(!1),$(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:ve(g.thumbnail)||`https://images.hive.blog/u/${g.owner}/avatar`,alt:g.title,className:"w-full h-full object-cover",onError:q=>{q.target.src=`https://images.hive.blog/u/${g.owner}/avatar`}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("button",{onClick:te,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:e.jsx(j.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),g.duration&&e.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[e.jsx(j.Clock,{className:"w-3 h-3"}),he(g.duration)]}),g.views&&e.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[e.jsx(j.Eye,{className:"w-3 h-3"}),g.views.toLocaleString()," views"]})]})}),e.jsx(xt,{title:g.title||"",author:g.owner||"",permlink:g.permlink||"",createdAt:g.created,description:g.description||"",video:{title:g.title||"",author:g.owner||"",permlink:g.permlink||"",created:g.created||new Date,category:g.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:g.duration,thumbnail:g.thumbnail,views:g.views},onTapComment:()=>{l?l(v,y):P(!0)},onTapUpvote:()=>{u?u(v,y):E(!0)},onTapInfo:()=>{c?c(v,y,g.description||""):re(!0)},onTapAuthor:()=>{t&&t(g.owner)},onTapShare:()=>{m&&m(v,y)},onTapBookmark:()=>{x&&x(v,y)}}),g.tags&&e.jsx("div",{className:"flex flex-wrap gap-2",children:g.tags.split(",").map((q,Z)=>e.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{o&&o(q.trim())},children:["#",q.trim()]},Z))})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[e.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),e.jsx("div",{className:"space-y-4",children:e.jsx(Pe,{feedType:ee.RELATED,username:g.owner,onVideoClick:R,onAuthorClick:ye})})]})]})}),L&&v&&y&&e.jsx(ft,{author:v,permlink:y,onClose:()=>P(!1)}),T&&v&&y&&e.jsx(pt,{author:v,permlink:y,onClose:()=>E(!1)}),J&&v&&y&&e.jsx(bt,{author:v,permlink:y,content:g.description||"",onClose:()=>re(!1)})]})};var yt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vt=d.createContext&&d.createContext(yt),Qt=["attr","size","title"];function Rt(r,s){if(r==null)return{};var t=Xt(r,s),a,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)a=i[o],!(s.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(t[a]=r[a])}return t}function Xt(r,s){if(r==null)return{};var t={};for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)){if(s.indexOf(a)>=0)continue;t[a]=r[a]}return t}function Ae(){return Ae=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},Ae.apply(this,arguments)}function jt(r,s){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);s&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,a)}return t}function De(r){for(var s=1;s<arguments.length;s++){var t=arguments[s]!=null?arguments[s]:{};s%2?jt(Object(t),!0).forEach(function(a){Zt(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):jt(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function Zt(r,s,t){return s=er(s),s in r?Object.defineProperty(r,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[s]=t,r}function er(r){var s=tr(r,"string");return typeof s=="symbol"?s:s+""}function tr(r,s){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,s);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(r)}function wt(r){return r&&r.map((s,t)=>d.createElement(s.tag,De({key:t},s.attr),wt(s.child)))}function _e(r){return s=>d.createElement(rr,Ae({attr:De({},r.attr)},s),wt(r.child))}function rr(r){var s=t=>{var{attr:a,size:o,title:i}=r,l=Rt(r,Qt),u=o||t.size||"1em",c;return t.className&&(c=t.className),r.className&&(c=(c?c+" ":"")+r.className),d.createElement("svg",Ae({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,l,{className:c,style:De(De({color:r.color||t.color},t.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),i&&d.createElement("title",null,i),r.children)};return vt!==void 0?d.createElement(vt.Consumer,null,t=>s(t)):s(yt)}function sr(r){return _e({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(r)}function ar(r){return _e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(r)}function nr(r){return _e({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(r)}function or(r){return _e({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(r)}function ir(r){return _e({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(r)}function lr(r){return _e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(r)}const Re=new qt.Client(["https://api.hive.blog"]),cr=async r=>{try{const s=await Re.database.getAccounts([r]);if(!s||s.length===0)throw new Error("Account not found");return s[0]}catch(s){return console.error("Error in getWalletDataDetail:",s),{error:s instanceof Error?s.message:"Unknown error"}}},dr=async r=>{try{const s=await Re.database.getDynamicGlobalProperties(),t=parseFloat(r.split(" ")[0]),a=parseFloat(String(s.total_vesting_shares).split(" ")[0]),o=parseFloat(String(s.total_vesting_fund_hive).split(" ")[0]);return(t*o/a).toFixed(3)}catch(s){return console.error("Error in convertVestingSharesToHiveData:",s),"0"}},ur=async r=>{try{const t=(await Re.database.call("get_feed_history",[])).current_median_history,a=parseFloat(t.base.split(" ")[0]),o=typeof r=="string"?parseFloat(r):r;return(a*o).toFixed(2)}catch(s){return console.error("Error in convertHivetoUSDData:",s),"0"}},Nt=lt.create(r=>({walletData:null,isLoading:!1,error:null,setWalletData:s=>r({walletData:s}),clearWalletData:()=>r({walletData:null,error:null}),fetchWalletData:async s=>{r({isLoading:!0,error:null});try{const t=await cr(s),a=C=>"error"in C;if(!t||a(t))throw new Error(a(t)?t.error:"Account not found");const o=typeof t.vesting_shares=="string"?t.vesting_shares:"0.000000 VESTS",i=typeof t.balance=="string"?t.balance:t.balance.toString(),l=typeof t.hbd_balance=="string"?t.hbd_balance:t.hbd_balance.toString(),u=typeof t.savings_balance=="string"?t.savings_balance:t.savings_balance.toString(),c=typeof t.savings_hbd_balance=="string"?t.savings_hbd_balance:t.savings_hbd_balance.toString(),h=await dr(o),m=parseFloat(i.split(" ")[0]||"0"),x=parseFloat(h),v=(m+x).toFixed(3),y=await ur(v),g={balance:i,hbd_balance:l,savings_balance:u,savings_hbd_balance:c,hive_power:`${h} HP`,estimated_value:`$${y}`};return r({walletData:g}),g}catch(t){const a=t instanceof Error?t.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",a);const o={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:a};return r({walletData:o,error:a}),o}finally{r({isLoading:!1})}}})),mr=({username:r,className:s=""})=>{const{walletData:t,fetchWalletData:a,isLoading:o,error:i}=Nt();d.useEffect(()=>{r&&a(r)},[r,a]);const l=({label:u,value:c,icon:h,colorClass:m="bg-primary/10"})=>e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[h&&e.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${m} text-primary`,children:h}),e.jsx("span",{className:"font-semibold text-card-foreground",children:u})]}),e.jsx("span",{className:"font-medium text-muted-foreground",children:c??"-"})]});return e.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${s}`,children:e.jsxs("div",{className:"max-w-md mx-auto",children:[e.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[r&&e.jsx("img",{src:`https://images.hive.blog/u/${r}/avatar`,alt:`${r} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:u=>{u.target.src=`https://ui-avatars.com/api/?name=${r}&background=random`}}),e.jsx("div",{className:"text-lg font-bold text-card-foreground",children:r}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),e.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[e.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),e.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:o?e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):(t==null?void 0:t.estimated_value)??"-"})]}),i&&e.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[e.jsx(nr,{className:"mr-2"}),e.jsx("span",{children:i})]}),e.jsx(l,{label:"Balance",value:t==null?void 0:t.balance,icon:e.jsx(lr,{}),colorClass:"bg-blue-500/10"}),e.jsx(l,{label:"HBD Balance",value:t==null?void 0:t.hbd_balance,icon:e.jsx(or,{}),colorClass:"bg-green-500/10"}),e.jsx(l,{label:"Savings Balance",value:t==null?void 0:t.savings_balance,icon:e.jsx(ir,{}),colorClass:"bg-yellow-500/10"}),e.jsx(l,{label:"Savings HBD Balance",value:t==null?void 0:t.savings_hbd_balance,icon:e.jsx(ar,{}),colorClass:"bg-purple-500/10"}),e.jsx(l,{label:"Hive Power",value:t==null?void 0:t.hive_power,icon:e.jsx(sr,{}),colorClass:"bg-orange-500/10"})]})})},We=new Ke.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class hr{async getWitnessesByVote(s="",t=60){try{return await We.call("condenser_api","get_witnesses_by_vote",[s,t])}catch(a){throw console.error("Error fetching witnesses by vote:",a),a}}async getAccount(s){try{const t=await We.call("condenser_api","get_accounts",[[s]]);return t&&t.length>0?t[0]:null}catch(t){return console.error("Error fetching account:",t),null}}async getAccounts(s){try{return await We.call("condenser_api","get_accounts",[s])}catch(t){return console.error("Error fetching accounts:",t),[]}}async getWitnessVotes(s,t="",a=250){try{return await We.call("database_api","list_witness_votes",{start:[s,t],limit:a,order:"by_witness_account"})}catch(o){throw console.error("Error fetching witness votes:",o),o}}async getAllWitnessVotes(s){const t=[];let a="";try{for(;;){const i=await this.getWitnessVotes(s,a,250);if(t.push(...i.votes),i.votes.length<250)break;a=i.votes[i.votes.length-1].account}return t}catch(i){return console.error("Error fetching all witness votes:",i),[]}}async hasUserVotedForWitness(s,t){try{const a=await this.getAccount(s);return!a||!a.witness_votes?!1:a.witness_votes.includes(t)}catch(a){return console.error("Error checking witness vote:",a),!1}}async getUserWitnessVotes(s){try{const t=await this.getAccount(s);return(t==null?void 0:t.witness_votes)||[]}catch(t){return console.error("Error fetching user witness votes:",t),[]}}formatVotesToMHP(s){return`${(parseFloat(s)/1e6).toFixed(1)}m`}calculateAPR(s){return s/100}getVersionStatus(s,t){const a=this.parseVersion(s),o=this.parseVersion(t);return this.compareVersions(a,o)>=0?"green":this.compareVersions(a,o)<0?"red":"grey"}parseVersion(s){return s.split(".").map(t=>parseInt(t,10))}compareVersions(s,t){const a=Math.max(s.length,t.length);for(let o=0;o<a;o++){const i=s[o]||0,l=t[o]||0;if(i>l)return 1;if(i<l)return-1}return 0}getWitnessDescription(s){var t,a;try{let o;if(s.json_metadata&&s.json_metadata!=="{}"){o=JSON.parse(s.json_metadata);const i=(t=o.profile)==null?void 0:t.witness_description;if(i)return i}return s.posting_json_metadata&&s.posting_json_metadata!=="{}"?(o=JSON.parse(s.posting_json_metadata),((a=o.profile)==null?void 0:a.about)||""):""}catch(o){return console.error("Error parsing witness description:",o),""}}formatTimeAgo(s){const t=new Date(s),o=Math.floor((new Date().getTime()-t.getTime())/1e3);if(o<60)return`${o} second${o>1?"s":""} ago`;if(o<3600){const i=Math.floor(o/60);return`${i} minute${i>1?"s":""} ago`}else if(o<86400){const i=Math.floor(o/3600);return`${i} hour${i>1?"s":""} ago`}else if(o<604800){const i=Math.floor(o/86400);return`${i} day${i>1?"s":""} ago`}else if(o<2592e3){const i=Math.floor(o/604800);return`${i} week${i>1?"s":""} ago`}else if(o<31536e3){const i=Math.floor(o/2592e3);return`${i} month${i>1?"s":""} ago`}else{const i=Math.floor(o/31536e3);return`${i} year${i>1?"s":""} ago`}}}const me=new hr,Q=lt.create((r,s)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(t="",a=50)=>{const{witnesses:o}=s();if(o.length>=500){r({hasMoreWitnesses:!1});return}r(t!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const l=await me.getWitnessesByVote(t,a);r(c=>{const h=new Set(c.witnesses.map(x=>x.owner)),m=l.filter(x=>!h.has(x.owner));return{witnesses:[...c.witnesses,...m],nextWitnessStart:l.length>0?l[l.length-1].owner:"",hasMoreWitnesses:l.length===a}});const u=l.filter(c=>!s().witnessDetails.has(c.owner)).map(c=>c.owner);u.length>0&&s().loadWitnessDetails(u)}catch(l){console.error("Error loading witnesses:",l),r({error:"Failed to load witnesses data"})}finally{r({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:t,hasMoreWitnesses:a,loadingMoreWitnesses:o}=s();!a||o||!t||await s().loadWitnesses(t,50)},loadWitnessVotes:async t=>{r({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:t});try{const a=await me.getWitnessVotes(t,"",250);r({witnessVotes:a.votes,nextVotesStart:a.votes.length>0?a.votes[a.votes.length-1].account:"",hasMoreVotes:a.votes.length===250,loadingVotes:!1})}catch(a){console.error("Error loading witness votes:",a),r({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:t,loadingMoreVotes:a,nextVotesStart:o,selectedWitness:i,witnessVotes:l}=s();if(!t||a||!o||l.length>=1e3){l.length>=1e3&&r({hasMoreVotes:!1});return}r({loadingMoreVotes:!0});try{const u=await me.getWitnessVotes(i||"",o,250);r(c=>{const m=[...c.witnessVotes,...u.votes].filter((v,y,g)=>g.findIndex(C=>C.account===v.account)===y),x=u.votes.filter((v,y,g)=>g.findIndex(C=>C.account===v.account)===y);return{witnessVotes:m,nextVotesStart:x.length>0?x[x.length-1].account:"",hasMoreVotes:u.votes.length===250}})}catch(u){console.error("Error loading more witness votes:",u)}finally{r({loadingMoreVotes:!1})}},loadUserWitnessVotes:async t=>{if(t){r({loadingUserVotes:!0});try{const a=await me.getUserWitnessVotes(t);r({userWitnessVotes:a})}catch(a){console.error("Error loading user witness votes:",a)}finally{r({loadingUserVotes:!1})}}},loadWitnessDetails:async t=>{try{const a=await me.getAccounts(t);r(o=>{const i=new Map(o.witnessDetails),l=new Map(o.witnessAccounts);return a.forEach(u=>{const c=me.getWitnessDescription(u);c&&i.set(u.name,c),l.set(u.name,u)}),{witnessDetails:i,witnessAccounts:l}})}catch(a){console.error("Error loading witness details:",a)}},setFilters:t=>r({filters:t}),setSelectedWitness:t=>r({selectedWitness:t}),clearVotes:()=>r({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),gr=({filters:r,onFiltersChange:s})=>{const t=i=>{s({...r,status:i})},a=i=>{s({...r,name:i})},o=i=>{s({...r,version:i})};return e.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"FILTERS"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"WITNESS"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.status==="active",onChange:()=>t("active"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),e.jsx("span",{className:"text-white",children:"Active"})]}),e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.status==="disabled",onChange:()=>t("disabled"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),e.jsx("span",{className:"text-white",children:"Disabled/Stale"})]}),e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.status==="approved",onChange:()=>t("approved"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),e.jsx("span",{className:"text-white",children:"Approved"})]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"NAME"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e.jsx("input",{type:"text",placeholder:"Search",value:r.name,onChange:i=>a(i.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-700 border-b border-gray-600 text-white placeholder-gray-400 focus:outline-none focus:border-blue-500"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"VERSION"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e.jsx("input",{type:"text",placeholder:"Version",value:r.version,onChange:i=>o(i.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-700 border-b border-gray-600 text-white placeholder-gray-400 focus:outline-none focus:border-blue-500"})]})]})]})},xr=({isOpen:r,onClose:s,witness:t,votes:a,loadingMore:o,hasMore:i,loadingInitial:l,scrollContainerRef:u,sentinelRef:c,loadMoreVotes:h})=>{const m=d.useCallback(x=>{x[0].isIntersecting&&i&&!o&&h()},[i,o,h]);return d.useEffect(()=>{const x=new IntersectionObserver(m,{threshold:.1,root:u.current});return c.current&&x.observe(c.current),()=>{c.current&&x.unobserve(c.current)}},[m,u,c]),r?e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-gray-900 rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[e.jsxs("h3",{className:"text-lg font-semibold text-white",children:["Votes for @",t," (showing ",a.length,")"]}),e.jsx("button",{onClick:s,className:"text-gray-400 hover:text-white text-xl font-bold",children:"×"})]}),e.jsxs("div",{ref:u,className:"p-4 overflow-y-auto max-h-[60vh]",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:a.map((x,v)=>e.jsxs("div",{className:"flex items-center space-x-3 p-3 bg-gray-800 rounded-lg",children:[e.jsx("div",{className:"w-8 h-8 bg-gray-600 rounded-full flex items-center justify-center text-white text-sm font-medium",children:e.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${x.account}/avatar`,alt:x.account,onError:y=>{y.target.src="https://images.hive.blog/u/null/avatar"}})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-white font-medium",children:x.account}),e.jsxs("div",{className:"text-gray-400 text-sm",children:["Vote #",v+1]})]}),e.jsx("div",{className:"text-gray-400 text-sm",children:"25"})]},x.account))}),a.length===0&&!l&&e.jsx("div",{className:"text-center text-gray-400 py-8",children:"No votes found for this witness."}),o&&e.jsx("div",{className:"text-center text-gray-400 py-4",children:"Loading more votes..."}),i&&!o&&e.jsx("div",{className:"text-center py-4",children:e.jsx("button",{onClick:h,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),i&&e.jsx("div",{ref:c,className:"h-4"})]})]})}):null},fr=({username:r,filters:s={status:"all",name:"",version:""},onWitnessVoteClick:t,onWitnessStatsClick:a,onWitnessUrlClick:o})=>{const i=Q(p=>p.witnesses),l=Q(p=>p.userWitnessVotes),u=Q(p=>p.loadingWitnesses),c=Q(p=>p.error),h=Q(p=>p.selectedWitness),m=Q(p=>p.witnessVotes),x=Q(p=>p.hasMoreVotes),v=Q(p=>p.loadingMoreVotes),y=Q(p=>p.loadingVotes),g=Q(p=>p.filters),C=Q(p=>p.hasMoreWitnesses),k=Q(p=>p.loadingWitnesses),S=Q(p=>p.witnessDetails);Q(p=>p.witnessAccounts);const w=Q(p=>p.loadWitnesses),I=Q(p=>p.loadMoreWitnesses),_=Q(p=>p.loadWitnessVotes),M=Q(p=>p.loadMoreVotes),D=Q(p=>p.loadUserWitnessVotes),$=Q(p=>p.setFilters),[f,V]=d.useState(!1),L=d.useRef(null),P=d.useRef(null),T=d.useRef(null),E=d.useCallback(p=>{p[0].isIntersecting&&C&&!k&&I()},[C,k,I]);d.useEffect(()=>{const p=new IntersectionObserver(E,{threshold:.1});return T.current&&p.observe(T.current),()=>{T.current&&p.unobserve(T.current)}},[E]),d.useEffect(()=>{w()},[w]),d.useEffect(()=>{r&&D(r)},[r,D]),d.useEffect(()=>{$(s)},[]);const J=d.useMemo(()=>i.filter(p=>{if(g.status!=="all"){if(g.status==="active"){const te=new Date;if(te.setFullYear(te.getFullYear()-1),new Date(p.last_hbd_exchange_update+"Z")<=te)return!1}else if(g.status==="disabled"){const te=new Date;if(te.setFullYear(te.getFullYear()-1),new Date(p.last_hbd_exchange_update+"Z")>te)return!1}else if(g.status==="approved"&&!l.includes(p.owner))return!1}return!(g.name&&!p.owner.toLowerCase().includes(g.name.toLowerCase())||g.version&&!p.running_version.includes(g.version))}),[i,g,l]),re=async p=>{t?t(p):(await _(p),V(!0))},B=p=>{a?a(p):window.open(`https://hivehub.dev/witnesses/@${p}`,"_blank")},z=p=>{o?o(p):window.open(p,"_blank")},ae=p=>r?l.includes(p):!1;return u?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):c?e.jsx("div",{className:"text-center p-8 text-red-400",children:c}):e.jsxs("div",{className:"w-full",children:[e.jsx(xr,{isOpen:f,onClose:()=>V(!1),witness:h||"",votes:m,loadingMore:v,hasMore:x,loadingInitial:y,scrollContainerRef:P,sentinelRef:L,loadMoreVotes:M}),e.jsx(gr,{filters:g,onFiltersChange:$}),e.jsxs("div",{className:"overflow-auto max-h-[70vh]",children:[e.jsxs("table",{className:"w-full text-sm text-left text-gray-400",children:[e.jsx("thead",{className:"text-xs text-gray-400 uppercase bg-gray-800",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Rank"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Witness"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Version"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Votes (MHP)"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Last Block"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Miss"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Price Feed"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"APR (%)"}),e.jsx("th",{scope:"col",className:"px-4 py-3",children:"Vote"})]})}),e.jsx("tbody",{children:J.map((p,te)=>{const R=me.getVersionStatus(p.running_version,p.hardfork_version_vote),ye=ae(p.owner);return e.jsxs("tr",{className:"border-b border-gray-700 hover:bg-gray-800",children:[e.jsx("td",{className:"px-4 py-4 font-medium text-white",children:i.findIndex(he=>he.owner===p.owner)+1}),e.jsx("td",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${p.owner}/avatar`,alt:p.owner,onError:he=>{he.target.src="https://images.hive.blog/u/null/avatar"}}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-white font-medium",children:p.owner}),e.jsxs("div",{className:"text-gray-400 text-xs",children:["Witness since ",new Date(p.created).getFullYear()]}),S.get(p.owner)&&e.jsx("div",{className:"text-gray-400 text-xs mt-1 line-clamp-2",children:S.get(p.owner)})]}),e.jsxs("div",{className:"flex space-x-2 flex-shrink-0",children:[e.jsx("button",{onClick:()=>z(p.url),className:"text-gray-400 hover:text-white",title:"Visit witness URL",children:"🔗"}),e.jsx("button",{onClick:()=>B(p.owner),className:"text-gray-400 hover:text-white",title:"View witness stats",children:"📊"})]})]})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${R==="green"?"bg-green-900 text-green-300":R==="red"?"bg-red-900 text-red-300":"bg-gray-700 text-gray-300"}`,children:p.running_version})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("button",{onClick:()=>re(p.owner),className:"text-blue-400 hover:text-blue-300 cursor-pointer",disabled:y,children:y&&h===p.owner?"Loading...":me.formatVotesToMHP(p.votes)})}),e.jsxs("td",{className:"px-4 py-4 text-right",children:[e.jsx("div",{className:"text-white",children:p.last_confirmed_block_num.toLocaleString()}),e.jsx("div",{className:"text-gray-400 text-xs",children:"NA"})]}),e.jsx("td",{className:"px-4 py-4 text-right text-white",children:p.total_missed.toLocaleString()}),e.jsxs("td",{className:"px-4 py-4 text-right",children:[e.jsx("div",{className:"text-white",children:p.hbd_exchange_rate.base}),e.jsx("div",{className:"text-gray-400 text-xs",children:me.formatTimeAgo(p.last_hbd_exchange_update+"Z")})]}),e.jsxs("td",{className:"px-4 py-4 text-right text-white",children:[me.calculateAPR(p.props.hbd_interest_rate),"%"]}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("svg",{className:`w-5 h-5 ${ye?"text-green-500":"text-gray-500"}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},p.owner)})})]}),k&&e.jsxs("div",{className:"flex items-center justify-center py-4",children:[e.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),e.jsx("span",{className:"ml-2 text-gray-400",children:"Loading more witnesses..."})]}),C&&e.jsx("div",{ref:T,className:"h-1"})]})]})},Xe="_communityLocalKey",Ie={getBookmarkedCommunities:()=>{const r=localStorage.getItem(Xe);return r?JSON.parse(r):[]},isUserPresentLocally:r=>{const s=localStorage.getItem(Xe);return s?JSON.parse(s).includes(r):!1},storeLikedCommunityLocally:(r,s=!1)=>{let t=Ie.getBookmarkedCommunities();return t.includes(r)?t=t.filter(a=>a!==r):s||t.push(r),localStorage.setItem(Xe,JSON.stringify(t)),t}},Ze=({id:r,toastType:s,isLiked:t,onAdd:a,onRemove:o,onFavourite:i})=>{const[l,u]=d.useState(t??Ie.isUserPresentLocally(r));d.useEffect(()=>{t!==void 0&&u(t)},[t]);const c=()=>{i&&i(),l?(o?o(r,"remove_bookmark"):Ie.storeLikedCommunityLocally(r,!0),h(!1)):(a?a(r,"add_bookmark"):Ie.storeLikedCommunityLocally(r),h(!0)),u(!l)},h=m=>{alert(`The ${s} is ${m?"added to":"removed from"} your bookmarks`)};return e.jsx("button",{onClick:c,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:l?e.jsx(j.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):e.jsx(j.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class pr{constructor(){Ye(this,"HIVE_API_URL","https://api.hive.blog")}async getListOfCommunities(s,t=20,a){const o={limit:t};a&&a.trim()!==""&&(o.last=a),s&&s.trim()!==""&&(o.query=s);const i={jsonrpc:"2.0",method:"bridge.list_communities",params:o,id:1};try{const l=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);return(await l.json()).result||[]}catch(l){throw console.error("Error fetching communities:",l),l}}async getCommunityDetails(s){const t={jsonrpc:"2.0",method:"bridge.get_community",params:{name:s},id:1};try{const a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(a){throw console.error("Error fetching community details:",a),a}}async getCommunitySubscribers(s,t=100,a){const o={community:s,limit:t};a&&a.trim()!==""&&(o.last=a);const i={jsonrpc:"2.0",method:"bridge.list_community_roles",params:o,id:1};try{const l=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);return((await l.json()).result||[]).map(c=>({username:c[0],role:c[1],extra:c[2],subscribedAt:c[3]}))}catch(l){throw console.error("Error fetching community subscribers:",l),l}}async getCommunitySubscribersList(s,t=100,a){const o={community:s,limit:t};a&&a.trim()!==""&&(o.last=a);const i={jsonrpc:"2.0",method:"bridge.list_subscribers",params:o,id:2};try{const l=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);return((await l.json()).result||[]).map(c=>({username:c[0],role:c[1],extra:c[2],subscribedAt:c[3]}))}catch(l){throw console.error("Error fetching community subscribers list:",l),l}}async getCommunityAccounts(s){const t={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[s]],id:2};try{const a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return(await a.json()).result||[]}catch(a){throw console.error("Error fetching community accounts:",a),a}}async getRankedPosts(s,t="created",a=20,o,i){const l={tag:s,sort:t,limit:a};o&&i&&(l.start_author=o,l.start_permlink=i);const u={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:l,id:3};try{const c=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return(await c.json()).result||[]}catch(c){throw console.error("Error fetching ranked posts:",c),c}}communityIcon(s){return`https://images.hive.blog/u/${s}/avatar?size=icon`}userOwnerThumb(s){return`https://images.hive.blog/u/${s}/avatar`}async getCommunityActivities(s,t=100,a){const o={account:s,limit:t};a&&(o.last_id=a);const i={jsonrpc:"2.0",method:"bridge.account_notifications",params:o,id:19};try{const l=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);return(await l.json()).result||[]}catch(l){throw console.error("Error fetching community activities:",l),l}}}const fe=new pr,br=({onSelectCommunity:r})=>{const[s,t]=d.useState([]),[a,o]=d.useState(""),[i,l]=d.useState(!0),[u,c]=d.useState(!1),[h,m]=d.useState(!0),[x,v]=d.useState(null),[y,g]=d.useState(null),C=20,k=d.useRef(null),S=d.useCallback(async(_=!1)=>{if(!(!_&&(u||!h)))try{_?(l(!0),g(null),t([]),v(null),m(!0)):c(!0);const M=a.trim(),D=await fe.getListOfCommunities(M.length>=3?M:void 0,C,_?void 0:x||void 0);t($=>_?D:[...$,...D]),D.length<C||D.length>0&&D[D.length-1].name===x?m(!1):D.length>0&&v(D[D.length-1].name||null)}catch(M){g(M instanceof Error?M.message:"Failed to load communities"),m(!1)}finally{l(!1),c(!1)}},[a,u,h,x]);d.useEffect(()=>{const _=setTimeout(()=>{S(!0)},a.length>=3||a.length===0?0:500);return()=>clearTimeout(_)},[a]),d.useEffect(()=>{var _;(_=k.current)==null||_.focus()},[a,i,y]),d.useEffect(()=>{const _=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!i&&h&&S()};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[S,u,i,h]);const w=()=>{S(!0)},I=()=>e.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((_,M)=>e.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 animate-pulse",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-gray-200 dark:bg-gray-700 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"}),e.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-1/2"})]}),e.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-16"})]})},M))});return i&&s.length===0?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"relative",children:[e.jsx(j.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),e.jsx("input",{type:"text",placeholder:"Search communities...",value:a,onChange:_=>o(_.target.value),ref:k,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
88
|
+
`;try{const s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:r,operationName:"TrendingTags"})});if(!s.ok)throw new Error(`GraphQL request failed: ${s.statusText}`);const o=await s.json();if(o.errors)throw new Error(`GraphQL error: ${o.errors.map(c=>c.message).join(", ")}`);return((a=(n=o.data)==null?void 0:n.trendingTags)==null?void 0:a.tags)||[]}catch(s){throw console.error("Failed to fetch trending tags:",s),s}}convertGQLItemsToThreeSpeakVideos(e){return e.map(r=>{var a,s,o,c,u,f,l,h,d,m,b,x,y,g;let n=null;try{typeof r.spkvideo=="string"?n=JSON.parse(r.spkvideo):n=r.spkvideo}catch(E){console.error("Error parsing spkvideo JSON",E)}return{title:r.title||"Untitled",owner:((a=r.author)==null?void 0:a.username)||"",permlink:r.permlink||"",created:new Date(r.created_at),category:r.tags&&r.tags.length>0?r.tags[0]:"general",duration:(n==null?void 0:n.duration)||((u=(c=(o=(s=r.json_metadata)==null?void 0:s.raw)==null?void 0:o.video)==null?void 0:c.info)==null?void 0:u.duration)||0,thumbnail:(n==null?void 0:n.thumbnail_url)||((d=(h=(l=(f=r.json_metadata)==null?void 0:f.raw)==null?void 0:l.video)==null?void 0:h.info)==null?void 0:d.thumbnail),numOfUpvotes:(m=r.stats)==null?void 0:m.num_votes,numOfComments:(b=r.stats)==null?void 0:b.num_comments,hiveValue:(x=r.stats)==null?void 0:x.total_hive_reward,active_votes:((g=(y=r.stats)==null?void 0:y.active_voters)==null?void 0:g.map(E=>({voter:E.voter,percent:E.percent,rshares:E.rshares,weight:E.weight})))||[]}})}async getContentStats(e,r){try{const n=await fs.call("condenser_api","get_content",[e,r]);return{numOfUpvotes:(n==null?void 0:n.net_votes)??0,numOfComments:(n==null?void 0:n.children)??0,hiveValue:n!=null&&n.pending_payout_value?parseFloat(n.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(e,r){try{return await fs.call("condenser_api","get_active_votes",[e,r])}catch(n){return console.error("Error calling get_active_votes:",n),[]}}async getCommentsList(e,r){try{const n=await fs.call("bridge","get_discussion",[e,r]);return(Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[]).map(s=>{const o=s.depth;if(typeof o=="string"){const u=parseInt(o,10);s.depth=Number.isFinite(u)?u:0}else(typeof o!="number"||!Number.isFinite(o))&&(s.depth=s.depth??0);const c=s.json_metadata;try{if(c&&typeof c=="string"){const u=c.trim();(u.startsWith("{")&&u.endsWith("}")||u.startsWith("[")&&u.endsWith("]"))&&(s.json_metadata_parsed=JSON.parse(u))}else c&&typeof c=="object"&&(s.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${s.author}/${s.permlink}`)}return s})}catch(n){return console.error("Error fetching comments list:",n),[]}}async getMyVideos(e){const r=`${sr.domain}/mobile/api/my-videos`,n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:e}});if(n.ok){const a=await n.json();return Array.isArray(a)?a:[]}else throw console.error("Failed to fetch my videos:",n.statusText),new Error(`Failed to fetch my videos: ${n.status}`)}async getRankedPosts(e="trending",r="",n="hive.blog",a=20,s,o){try{const c={sort:e,tag:r,observer:n,limit:a};return s&&o&&(c.start_author=s,c.start_permlink=o),await fs.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}}const Ke=new kf,Hr=t=>t?t.startsWith("Qm")||t.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${t}`:t.startsWith("http")?t:t.startsWith("/")?`https://3speak.tv${t}`:t:"/placeholder.svg",dl=({video:t,onVideoClick:e,onAuthorClick:r,isGrid:n=!1})=>{const[a,s]=T.useState({numOfUpvotes:t.numOfUpvotes,numOfComments:t.numOfComments,hiveValue:t.hiveValue});T.useEffect(()=>{if(a.numOfUpvotes===void 0&&t.numOfUpvotes===void 0){let u=!0;return(async()=>{try{const f=await Ke.getContentStats(t.author||"",t.permlink||"");u&&s(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{u=!1}}else t.numOfUpvotes!==void 0&&s({numOfUpvotes:t.numOfUpvotes,numOfComments:t.numOfComments||0,hiveValue:t.hiveValue||0})},[t.author,t.permlink,a.numOfUpvotes,t.numOfUpvotes,t.numOfComments,t.hiveValue]);const o=u=>{if(!u)return"00:00";const f=Math.floor(u),l=Math.floor(f/3600),h=Math.floor(f%3600/60),d=f%60,m=b=>b.toString().padStart(2,"0");return f<60?`00:${m(d)}`:l===0?`${m(h)}:${m(d)}`:`${m(l)}:${m(h)}:${m(d)}`},c=u=>u==null?"":u>=1e6?`${(u/1e6).toFixed(1)}M`:u>=1e3?`${(u/1e3).toFixed(1)}K`:u.toString();return i.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[i.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>e(t),children:[i.jsx("img",{src:Hr(t.thumbnail),alt:t.title,onError:u=>{u.target.src=`https://images.hive.blog/u/${t.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),t.duration&&i.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[i.jsx(q.Clock,{className:"w-3 h-3"}),o(t.duration)]}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:i.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:i.jsx(q.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),i.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),i.jsxs("div",{className:"p-4 space-y-3",children:[i.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>e(t),children:t.title}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>r(t.author),children:[i.jsx("img",{src:`https://images.hive.blog/u/${t.author}/avatar`,alt:t.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:u=>{u.target.src="https://images.hive.blog/u/null/avatar"}}),i.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",t.author]})]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:ls.formatDistanceToNow(t.created,{addSuffix:!0})})]}),i.jsxs("div",{className:"flex items-center justify-between text-sm",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[a.numOfUpvotes!=null&&i.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[i.jsx(q.ThumbsUp,{className:"w-4 h-4"}),i.jsx("span",{children:c(a.numOfUpvotes)})]}),a.numOfComments!=null&&i.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[i.jsx(q.MessageCircle,{className:"w-4 h-4"}),i.jsx("span",{children:c(a.numOfComments)})]})]}),a.hiveValue!=null&&a.hiveValue>0&&i.jsxs("div",{className:"text-primary font-semibold",children:["$",a.hiveValue.toFixed(2)]})]}),t.category&&i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:t.category})})]})]})};var We=(t=>(t.HOME="home",t.TRENDING="trending",t.NEW_VIDEOS="newVideos",t.FIRST_UPLOADS="firstUploads",t.USER="user",t.COMMUNITY="community",t.RELATED="related",t.TAG_FEED="tag_feed",t.SEARCH="search",t))(We||{});const fl=new Map,hl=({title:t,author:e,permlink:r,createdAt:n,video:a,currentUser:s,isContentVoted:o=!1,description:c,onTapComment:u,onTapUpvote:f,onTapShare:l,onTapBookmark:h,onTapAuthor:d,onTapInfo:m})=>{const[b,x]=T.useState(a.numOfComments||0),[y,g]=T.useState(a.numOfUpvotes||0),[E,D]=T.useState(!1),[w,j]=T.useState(!1),[p,A]=T.useState(""),k=M=>{A(M),j(!0),setTimeout(()=>j(!1),3e3)},U=(M,O)=>`${M}:${O}`;T.useEffect(()=>{const M=U(e,r),O=fl.get(M);O?(x(O.comments),g(O.upvotes)):(async()=>{const B=await Ke.getContentStats(e,r);g(B.numOfUpvotes),x(B.numOfComments),fl.set(U(e,r),{comments:B.numOfComments,upvotes:B.numOfUpvotes})})()},[e,r]);const H=()=>{u?u(e,r):k("Comments feature coming soon!")},S=()=>{f?f(e,r):k("Upvote feature requires authentication!")},P=()=>{if(l)l(e,r);else{const M=`https://3speak.tv/user/${e}/${r}`;navigator.share?navigator.share({title:t,url:M}):(navigator.clipboard.writeText(M),k("Link copied to clipboard!"))}},I=()=>{h?h(e,r):(D(!E),k(E?"Removed from bookmarks":"Added to bookmarks"))},W=()=>d==null?void 0:d(e,r),_=()=>{m?m(e,r):k("Video details coming soon!")};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[i.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:t}),i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("button",{onClick:W,className:"flex-shrink-0 group",children:i.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:e,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:M=>{M.target.src=`https://ui-avatars.com/api/?name=${e}&background=random`}})}),i.jsxs("div",{className:"flex-1",children:[i.jsx("div",{className:"flex items-center justify-between mb-4",children:i.jsxs("div",{children:[i.jsxs("button",{onClick:W,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",e]}),i.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[a.views&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(q.Eye,{className:"w-4 h-4"}),i.jsxs("span",{children:[a.views.toLocaleString()," views"]})]}),n&&i.jsx("span",{children:ls.formatDistanceToNow(n,{addSuffix:!0})})]})]})}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:_,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[i.jsx(q.Info,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),i.jsxs("button",{type:"button",onClick:H,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[i.jsx(q.MessageCircle,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:b})]}),i.jsxs("button",{type:"button",onClick:S,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${o?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[i.jsx(q.ThumbsUp,{className:`w-4 h-4 ${o?"fill-current":""}`}),i.jsx("span",{className:"text-sm font-medium",children:y})]}),i.jsxs("button",{type:"button",onClick:P,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[i.jsx(q.Share2,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),i.jsxs("button",{type:"button",onClick:I,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${E?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[i.jsx(q.Heart,{className:`w-4 h-4 ${E?"fill-current":""}`}),i.jsx("span",{className:"text-sm font-medium",children:E?"Saved":"Save"})]})]}),(a.hiveValue||a.category)&&i.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[a.hiveValue&&a.hiveValue>0&&i.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:i.jsxs("span",{children:["$",a.hiveValue.toFixed(2)," earned"]})}),a.category&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(q.Users,{className:"w-4 h-4 text-muted-foreground"}),i.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:a.category})]})]})]})]})]}),w&&i.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:i.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:i.jsx("div",{className:"font-medium",children:p})})})]})},hs=new Map,ps=({feedType:t,username:e,communityId:r,tag:n,onVideoClick:a,onAuthorClick:s})=>{const[o,c]=T.useState([]),[u,f]=T.useState(!0),[l,h]=T.useState(!1),[d,m]=T.useState(null),[b,x]=T.useState(!0),[y,g]=T.useState(0),E=T.useMemo(()=>{switch(t){case We.USER:return`user:${e||""}`;case We.COMMUNITY:return`community:${r||""}`;case We.TAG_FEED:return`tag:${n||""}`;case We.SEARCH:return`search:${n||""}`;default:return t}},[t,e,r,n]),D=T.useCallback(async k=>{var U,H,S,P,I,W,_,M,O,G,B,K;if((U=k.author)!=null&&U.username){if(!k.permlink)return null;let X=null;try{typeof k.spkvideo=="string"?X=JSON.parse(k.spkvideo):X=k.spkvideo}catch(L){console.error("Error parsing spkvideo JSON",L)}const se=Hr(X==null?void 0:X.thumbnail_url)||Hr((I=(P=(S=(H=k.json_metadata)==null?void 0:H.raw)==null?void 0:S.video)==null?void 0:P.info)==null?void 0:I.thumbnail),je=(X==null?void 0:X.duration)||((O=(M=(_=(W=k.json_metadata)==null?void 0:W.raw)==null?void 0:_.video)==null?void 0:M.info)==null?void 0:O.duration)||0;return{title:k.title||"Untitled",author:k.author.username,permlink:k.permlink,created:new Date(k.created_at),category:k.tags&&k.tags.length>0?k.tags[0]:"general",duration:je,thumbnail:se,numOfUpvotes:((G=k.stats)==null?void 0:G.num_votes)||k.numOfUpvotes,numOfComments:((B=k.stats)==null?void 0:B.num_comments)||k.numOfComments,hiveValue:((K=k.stats)==null?void 0:K.total_hive_reward)||k.hiveValue}}return k.owner?{title:k.title||"Untitled",author:k.owner,permlink:k.permlink||"",created:new Date(k.created||Date.now()),category:k.category||"general",duration:k.duration,thumbnail:Hr(k.thumbnail),numOfUpvotes:k.numOfUpvotes,numOfComments:k.numOfComments,hiveValue:k.hiveValue}:null},[]),w=T.useCallback(async(k,U=!1)=>{try{let H=[];switch(t){case We.SEARCH:n&&(H=await Ke.getSearchFeed(n,k));break;case We.TAG_FEED:n&&(H=await Ke.getTaggedVideos(n,k));break;case We.HOME:H=await Ke.getHomeVideos(k);break;case We.TRENDING:H=await Ke.getTrendingVideos(k);break;case We.NEW_VIDEOS:H=await Ke.getNewVideos(k);break;case We.FIRST_UPLOADS:H=await Ke.getFirstUploadsVideos(k);break;case We.USER:e&&(H=await Ke.getUserVideos(e,k));break;case We.COMMUNITY:r&&(H=await Ke.getCommunityVideos(r,k));break;case We.RELATED:e&&(H=await Ke.getRelatedVideos(e,k));break}const P=(await Promise.all(H.map(D))).filter(I=>I!==null);U?(c(P),hs.set(E,P)):c(I=>{const W=[...I,...P];return hs.set(E,W),W}),x(H.length>=20),g(k+H.length),m(null)}catch(H){m(H instanceof Error?H.message:"Failed to load videos")}},[t,e,r,n,E,D]);T.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const U=hs.get(E);U!=null&&U.length&&(c(U),f(!1)),await w(0,!0),f(!1)})()},[E,w]);const j=T.useCallback(async()=>{l||!b||(h(!0),await w(y),h(!1))},[l,b,y,w]),p=T.useCallback(async()=>{hs.delete(E),f(!0),g(0),await w(0,!0),f(!1)},[E,w]);T.useEffect(()=>{const k=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&j()};return window.addEventListener("scroll",k),()=>window.removeEventListener("scroll",k)},[j]);const A=()=>i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((k,U)=>i.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[i.jsx("div",{className:"aspect-video bg-muted"}),i.jsxs("div",{className:"p-4 space-y-3",children:[i.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),i.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("div",{className:"h-3 bg-muted rounded w-16"}),i.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},U))});return u&&o.length===0?i.jsx(A,{}):d&&o.length===0?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:d}),i.jsxs("button",{onClick:p,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):o.length===0?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),i.jsxs("button",{onClick:p,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[t.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),i.jsxs("button",{onClick:p,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:o.map((k,U)=>i.jsx(dl,{video:k,onVideoClick:a,onAuthorClick:s,isGrid:!0},`${k.author}-${k.permlink}-${U}`))}),b&&i.jsx("div",{className:"flex justify-center pt-8",children:l?i.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[i.jsx(q.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):i.jsx("button",{onClick:j,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})},ms=({isOpen:t,onClose:e,title:r,children:n,maxWidth:a="max-w-2xl"})=>t?i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[i.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:e}),i.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${a} max-h-[90vh] overflow-hidden animate-scale-in`,children:[i.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[i.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:r}),i.jsx("button",{onClick:e,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:i.jsx(q.X,{className:"w-5 h-5 text-muted-foreground"})})]}),i.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:n})]})]}):null,pl=({author:t,permlink:e,currentUser:r,onClose:n})=>{const[a,s]=T.useState([]),[o,c]=T.useState(!0),[u,f]=T.useState(null),[l,h]=T.useState(""),[d,m]=T.useState(!1);T.useEffect(()=>{(async()=>{try{c(!0);const E=(await Ke.getCommentsList(t,e)).filter(D=>D.depth&&D.depth>0).sort((D,w)=>new Date(w.created||0).getTime()-new Date(D.created||0).getTime());s(E)}catch(g){f(g instanceof Error?g.message:"Failed to load comments")}finally{c(!1)}})()},[t,e]);const b=async()=>{if(!(!l.trim()||!r))try{m(!0),console.log("Would submit comment:",l),h("")}catch(y){console.error("Failed to submit comment:",y)}finally{m(!1)}},x=y=>{const g=Math.min(y.depth||0,5);return i.jsx("div",{className:`border-l-2 border-border ${g>0?`ml-${g*4}`:""}`,children:i.jsxs("div",{className:"p-4 bg-muted/30 rounded-r-lg",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("img",{src:`https://images.hive.blog/u/${y.author}/avatar`,alt:y.author,className:"w-6 h-6 rounded-full object-cover border border-border",onError:E=>{E.target.src=`https://ui-avatars.com/api/?name=${y.author}&background=random`}}),i.jsxs("span",{className:"font-medium text-card-foreground text-sm",children:["@",y.author]}),y.created&&i.jsx("span",{className:"text-xs text-muted-foreground",children:ls.formatDistanceToNow(new Date(y.created),{addSuffix:!0})})]}),i.jsx("div",{className:"text-sm text-card-foreground leading-relaxed",children:y.body||"No content"}),y.net_votes&&y.net_votes>0&&i.jsx("div",{className:"flex items-center gap-1 mt-2",children:i.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.net_votes," votes"]})})]})},`${y.author}-${y.permlink}`)};return i.jsx(ms,{isOpen:!0,onClose:n,title:`Comments (${a.length})`,maxWidth:"max-w-2xl",children:i.jsxs("div",{className:"p-6",children:[r&&i.jsx("div",{className:"mb-6 p-4 bg-muted/50 rounded-lg",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("img",{src:`https://images.hive.blog/u/${r}/avatar`,alt:r,className:"w-8 h-8 rounded-full object-cover border border-border"}),i.jsxs("div",{className:"flex-1",children:[i.jsx("textarea",{value:l,onChange:y=>h(y.target.value),placeholder:"Write a comment...",className:"w-full p-3 bg-background border border-border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-primary",rows:3}),i.jsx("div",{className:"flex justify-end mt-2",children:i.jsxs("button",{onClick:b,disabled:!l.trim()||d,className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[d?i.jsx(q.Loader2,{className:"w-4 h-4 animate-spin"}):i.jsx(q.Send,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:d?"Posting...":"Post Comment"})]})})]})]})}),o?i.jsxs("div",{className:"flex items-center justify-center py-8",children:[i.jsx(q.Loader2,{className:"w-6 h-6 animate-spin text-primary"}),i.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading comments..."})]}):u?i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-error",children:u})}):a.length===0?i.jsxs("div",{className:"text-center py-8",children:[i.jsx(q.MessageCircle,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),i.jsx("p",{className:"text-muted-foreground",children:"No comments yet"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Be the first to share your thoughts!"})]}):i.jsx("div",{className:"space-y-4",children:a.map(x)})]})})},ml=({author:t,permlink:e,onClose:r})=>{const[n,a]=T.useState([]),[s,o]=T.useState(!0),[c,u]=T.useState(null);T.useEffect(()=>{(async()=>{try{o(!0);const d=(await Ke.getActiveVotes(t,e)).sort((m,b)=>b.rshares-m.rshares);a(d)}catch(h){u(h instanceof Error?h.message:"Failed to load votes")}finally{o(!1)}})()},[t,e]);const f=l=>l>=1e9?`${(l/1e9).toFixed(1)}B`:l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toString();return i.jsx(ms,{isOpen:!0,onClose:r,title:`Votes (${n.length})`,maxWidth:"max-w-md",children:i.jsx("div",{className:"p-6",children:s?i.jsxs("div",{className:"flex items-center justify-center py-8",children:[i.jsx(q.Loader2,{className:"w-6 h-6 animate-spin text-primary"}),i.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading votes..."})]}):c?i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-error",children:c})}):n.length===0?i.jsxs("div",{className:"text-center py-8",children:[i.jsx(q.ThumbsUp,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),i.jsx("p",{className:"text-muted-foreground",children:"No votes yet"})]}):i.jsx("div",{className:"space-y-3",children:n.map((l,h)=>i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:`https://images.hive.blog/u/${l.voter}/avatar`,alt:l.voter,className:"w-8 h-8 rounded-full object-cover border border-border",onError:d=>{d.target.src=`https://ui-avatars.com/api/?name=${l.voter}&background=random`}}),i.jsxs("div",{children:[i.jsxs("div",{className:"font-medium text-card-foreground",children:["@",l.voter]}),l.time&&i.jsx("div",{className:"text-sm text-muted-foreground",children:new Date(l.time).toLocaleDateString()})]})]}),i.jsxs("div",{className:"text-right",children:[l.percent&&i.jsxs("div",{className:"text-sm font-medium text-primary",children:[(l.percent/100).toFixed(1),"%"]}),i.jsxs("div",{className:"text-xs text-muted-foreground",children:[f(l.rshares)," rshares"]})]})]},`${l.voter}-${h}`))})})})},gl=({author:t,permlink:e,content:r,onClose:n})=>i.jsx(ms,{isOpen:!0,onClose:n,title:"Video Description",maxWidth:"max-w-2xl",children:i.jsxs("div",{className:"p-6",children:[r?i.jsx("div",{className:"prose prose-sm max-w-none",children:i.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:i.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:r})})}):i.jsxs("div",{className:"text-center py-8",children:[i.jsx(q.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),i.jsx("p",{className:"text-muted-foreground",children:"No description available"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),i.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:i.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsxs("span",{children:["By @",t]}),i.jsx("span",{children:"•"}),i.jsxs("span",{children:["/",e]})]})})]})}),jf=({username:t,permlink:e,onAuthorClick:r,onVideoClick:n,onTagClick:a,onBack:s,onCommentsModal:o,onUpvotesModal:c,onDescriptionModal:u,onVideoInfo:f,onShare:l,onBookmark:h}={})=>{const d=t,m=e,[b,x]=T.useState(null),[y,g]=T.useState(!0),[E,D]=T.useState(null),[w,j]=T.useState(!1),[p,A]=T.useState(null),[k,U]=T.useState(!1),[H,S]=T.useState(!1),[P,I]=T.useState(!1),[W,_]=T.useState(!1),M=T.useRef(null),O=T.useRef(null),G=T.useRef(null);T.useEffect(()=>{(async()=>{if(!(!d||!m))try{g(!0),D(null);const V=await Ke.getVideoDetails(d,m);x(V),j(!1),A(null)}catch(V){D(V instanceof Error?V.message:"Failed to load video")}finally{g(!1)}})()},[d,m]);const B=L=>L?L.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${L.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:L:"";T.useEffect(()=>((async()=>{const V=b==null?void 0:b.video_v2;if(!w||!V||!M.current)return;const re=M.current,ie=B(V);O.current&&(O.current.destroy(),O.current=null),re.src="",re.load();try{let ne=!1;const Ne=()=>{ne||(ne=!0,re.play().then(()=>A(null)).catch(_e=>A(`Playback failed: ${_e.message}`)))};if(vn.isSupported()){const _e=new vn({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});O.current=_e,_e.on(vn.Events.MANIFEST_PARSED,()=>{}),_e.on(vn.Events.ERROR,(ze,Qe)=>{if(Qe.fatal)switch(Qe.type){case vn.ErrorTypes.NETWORK_ERROR:A("Network error, retrying..."),setTimeout(()=>_e.startLoad(),1e3);break;case vn.ErrorTypes.MEDIA_ERROR:A("Media error, retrying..."),setTimeout(()=>_e.recoverMediaError(),1e3);break;default:A(`Fatal error: ${Qe.details}`),_e.destroy(),O.current=null;break}}),_e.attachMedia(re),_e.loadSource(ie)}else if(re.canPlayType("application/vnd.apple.mpegurl"))re.src=ie;else{const _e=ie.replace("/manifest.m3u8","/480p/index.m3u8");re.src=_e}const Fe=()=>U(!0),At=()=>{U(!1),Ne()},kt=_e=>{var Qe;const ze=_e.target;A(`Video error: ${((Qe=ze.error)==null?void 0:Qe.message)||"Unknown error"}`),U(!1)},yr=()=>U(!1);re.addEventListener("loadstart",Fe),re.addEventListener("canplay",At),re.addEventListener("error",kt),re.addEventListener("loadeddata",yr);const vr=async()=>{var ze,Qe,Re,jt;const _e=!!document.fullscreenElement;try{_e?"orientation"in screen&&await(((Qe=(ze=screen.orientation)==null?void 0:ze.lock)==null?void 0:Qe.call(ze,"landscape"))??Promise.resolve()):"orientation"in screen&&((jt=(Re=screen.orientation)==null?void 0:Re.unlock)==null||jt.call(Re))}catch{}};return document.addEventListener("fullscreenchange",vr),G.current=()=>{document.removeEventListener("fullscreenchange",vr)},()=>{re.removeEventListener("loadstart",Fe),re.removeEventListener("canplay",At),re.removeEventListener("error",kt),re.removeEventListener("loadeddata",yr),G.current&&G.current()}}catch(ne){A(`Setup error: ${ne instanceof Error?ne.message:"Unknown"}`)}})(),()=>{O.current&&(O.current.destroy(),O.current=null)}),[w,b==null?void 0:b.video_v2]);const K=()=>{if(!(b==null?void 0:b.video_v2)){A("No video source available");return}j(!0),A(null),U(!0)},X=L=>{n&&n(L)},se=L=>{r&&r(L)},je=L=>{if(!L)return"00:00";const V=Math.floor(L),re=Math.floor(V/3600),ie=Math.floor(V%3600/60),ne=V%60,Ne=Fe=>Fe.toString().padStart(2,"0");return V<60?`00:${Ne(ne)}`:re===0?`${Ne(ie)}:${Ne(ne)}`:`${Ne(re)}:${Ne(ie)}:${Ne(ne)}`};return y?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:i.jsx("div",{className:"container mx-auto px-4 py-3",children:i.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),i.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:i.jsxs("div",{className:"animate-pulse space-y-6",children:[i.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),i.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):E||!b?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:E||"Video not found"}),i.jsxs("button",{onClick:()=>{s&&s()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[i.jsx(q.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:i.jsx("div",{className:"container mx-auto px-4 py-3",children:i.jsxs("button",{onClick:()=>{s&&s()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[i.jsx(q.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),i.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:i.jsxs("div",{className:"flex flex-col gap-8",children:[i.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[i.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:w?i.jsxs("div",{className:"relative w-full h-full",children:[i.jsx("video",{ref:M,controls:!0,poster:Hr(b.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async L=>{const V=L.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await V.requestFullscreen()}catch{}}}),k&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),p&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:i.jsxs("div",{className:"text-center text-white",children:[i.jsx("p",{className:"mb-4",children:p}),i.jsx("button",{onClick:()=>{j(!1),A(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):i.jsxs(i.Fragment,{children:[i.jsx("img",{src:Hr(b.thumbnail)||`https://images.hive.blog/u/${b.owner}/avatar`,alt:b.title,className:"w-full h-full object-cover",onError:L=>{L.target.src=`https://images.hive.blog/u/${b.owner}/avatar`}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx("button",{onClick:K,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:i.jsx(q.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),b.duration&&i.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[i.jsx(q.Clock,{className:"w-3 h-3"}),je(b.duration)]}),b.views&&i.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[i.jsx(q.Eye,{className:"w-3 h-3"}),b.views.toLocaleString()," views"]})]})}),i.jsx(hl,{title:b.title||"",author:b.owner||"",permlink:b.permlink||"",createdAt:b.created,description:b.description||"",video:{title:b.title||"",author:b.owner||"",permlink:b.permlink||"",created:b.created||new Date,category:b.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:b.duration,thumbnail:b.thumbnail,views:b.views},onTapComment:()=>{o?o(d,m):S(!0)},onTapUpvote:()=>{c?c(d,m):I(!0)},onTapInfo:()=>{u?u(d,m,b.description||""):_(!0)},onTapAuthor:()=>{r&&r(b.owner)},onTapShare:()=>{l&&l(d,m)},onTapBookmark:()=>{h&&h(d,m)}}),b.tags&&i.jsx("div",{className:"flex flex-wrap gap-2",children:b.tags.split(",").map((L,V)=>i.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{a&&a(L.trim())},children:["#",L.trim()]},V))})]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[i.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),i.jsx("div",{className:"space-y-4",children:i.jsx(ps,{feedType:We.RELATED,username:b.owner,onVideoClick:X,onAuthorClick:se})})]})]})}),H&&d&&m&&i.jsx(pl,{author:d,permlink:m,onClose:()=>S(!1)}),P&&d&&m&&i.jsx(ml,{author:d,permlink:m,onClose:()=>I(!1)}),W&&d&&m&&i.jsx(gl,{author:d,permlink:m,content:b.description||"",onClose:()=>_(!1)})]})};var bl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xl=T.createContext&&T.createContext(bl),Sf=["attr","size","title"];function Df(t,e){if(t==null)return{};var r=Tf(t,e),n,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)n=s[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Tf(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function gs(){return gs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gs.apply(this,arguments)}function yl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function bs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yl(Object(r),!0).forEach(function(n){Cf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cf(t,e,r){return e=Of(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Of(t){var e=$f(t,"string");return typeof e=="symbol"?e:e+""}function $f(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vl(t){return t&&t.map((e,r)=>T.createElement(e.tag,bs({key:r},e.attr),vl(e.child)))}function wn(t){return e=>T.createElement(Pf,gs({attr:bs({},t.attr)},e),vl(t.child))}function Pf(t){var e=r=>{var{attr:n,size:a,title:s}=t,o=Df(t,Sf),c=a||r.size||"1em",u;return r.className&&(u=r.className),t.className&&(u=(u?u+" ":"")+t.className),T.createElement("svg",gs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:u,style:bs(bs({color:t.color||r.color},r.style),t.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&T.createElement("title",null,s),t.children)};return xl!==void 0?T.createElement(xl.Consumer,null,r=>e(r)):e(bl)}function Lf(t){return wn({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(t)}function Mf(t){return wn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(t)}function If(t){return wn({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(t)}function Ff(t){return wn({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(t)}function Bf(t){return wn({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(t)}function Vf(t){return wn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}const fo=new Ef.Client(["https://api.hive.blog"]),qf=async t=>{try{const e=await fo.database.getAccounts([t]);if(!e||e.length===0)throw new Error("Account not found");return e[0]}catch(e){return console.error("Error in getWalletDataDetail:",e),{error:e instanceof Error?e.message:"Unknown error"}}},Uf=async t=>{try{const e=await fo.database.getDynamicGlobalProperties(),r=parseFloat(t.split(" ")[0]),n=parseFloat(String(e.total_vesting_shares).split(" ")[0]),a=parseFloat(String(e.total_vesting_fund_hive).split(" ")[0]);return(r*a/n).toFixed(3)}catch(e){return console.error("Error in convertVestingSharesToHiveData:",e),"0"}},Rf=async t=>{try{const r=(await fo.database.call("get_feed_history",[])).current_median_history,n=parseFloat(r.base.split(" ")[0]),a=typeof t=="string"?parseFloat(t):t;return(n*a).toFixed(2)}catch(e){return console.error("Error in convertHivetoUSDData:",e),"0"}},wl=il.create(t=>({walletData:null,isLoading:!1,error:null,setWalletData:e=>t({walletData:e}),clearWalletData:()=>t({walletData:null,error:null}),fetchWalletData:async e=>{t({isLoading:!0,error:null});try{const r=await qf(e),n=x=>"error"in x;if(!r||n(r))throw new Error(n(r)?r.error:"Account not found");const a=typeof r.vesting_shares=="string"?r.vesting_shares:"0.000000 VESTS",s=typeof r.balance=="string"?r.balance:r.balance.toString(),o=typeof r.hbd_balance=="string"?r.hbd_balance:r.hbd_balance.toString(),c=typeof r.savings_balance=="string"?r.savings_balance:r.savings_balance.toString(),u=typeof r.savings_hbd_balance=="string"?r.savings_hbd_balance:r.savings_hbd_balance.toString(),f=await Uf(a),l=parseFloat(s.split(" ")[0]||"0"),h=parseFloat(f),d=(l+h).toFixed(3),m=await Rf(d),b={balance:s,hbd_balance:o,savings_balance:c,savings_hbd_balance:u,hive_power:`${f} HP`,estimated_value:`$${m}`};return t({walletData:b}),b}catch(r){const n=r instanceof Error?r.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",n);const a={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:n};return t({walletData:a,error:n}),a}finally{t({isLoading:!1})}}})),zf=({username:t,className:e=""})=>{const{walletData:r,fetchWalletData:n,isLoading:a,error:s}=wl();T.useEffect(()=>{t&&n(t)},[t,n]);const o=({label:c,value:u,icon:f,colorClass:l="bg-primary/10"})=>i.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[f&&i.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${l} text-primary`,children:f}),i.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),i.jsx("span",{className:"font-medium text-muted-foreground",children:u??"-"})]});return i.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${e}`,children:i.jsxs("div",{className:"max-w-md mx-auto",children:[i.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[t&&i.jsx("img",{src:`https://images.hive.blog/u/${t}/avatar`,alt:`${t} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:c=>{c.target.src=`https://ui-avatars.com/api/?name=${t}&background=random`}}),i.jsx("div",{className:"text-lg font-bold text-card-foreground",children:t}),i.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),i.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[i.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),i.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:a?i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):(r==null?void 0:r.estimated_value)??"-"})]}),s&&i.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[i.jsx(If,{className:"mr-2"}),i.jsx("span",{children:s})]}),i.jsx(o,{label:"Balance",value:r==null?void 0:r.balance,icon:i.jsx(Vf,{}),colorClass:"bg-blue-500/10"}),i.jsx(o,{label:"HBD Balance",value:r==null?void 0:r.hbd_balance,icon:i.jsx(Ff,{}),colorClass:"bg-green-500/10"}),i.jsx(o,{label:"Savings Balance",value:r==null?void 0:r.savings_balance,icon:i.jsx(Bf,{}),colorClass:"bg-yellow-500/10"}),i.jsx(o,{label:"Savings HBD Balance",value:r==null?void 0:r.savings_hbd_balance,icon:i.jsx(Mf,{}),colorClass:"bg-purple-500/10"}),i.jsx(o,{label:"Hive Power",value:r==null?void 0:r.hive_power,icon:i.jsx(Lf,{}),colorClass:"bg-orange-500/10"})]})})};var _l={},fa={},_n={},ho={exports:{}};const El=()=>{const t=Error.prepareStackTrace;Error.prepareStackTrace=(r,n)=>n;const e=new Error().stack.slice(1);return Error.prepareStackTrace=t,e};ho.exports=El,ho.exports.default=El;var Hf=ho.exports,xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.inferLabel=void 0;const Wf=()=>{};xs.inferLabel=Wf;var po={},mo={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function n(p){return r.includes(p)}const a=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function s(p){return a.includes(p)}const o=["null","undefined","string","number","bigint","boolean","symbol"];function c(p){return o.includes(p)}function u(p){return A=>typeof A===p}const{toString:f}=Object.prototype,l=p=>{const A=f.call(p).slice(8,-1);if(/HTML\w+Element/.test(A)&&d.domElement(p))return"HTMLElement";if(s(A))return A},h=p=>A=>l(A)===p;function d(p){if(p===null)return"null";switch(typeof p){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(d.observable(p))return"Observable";if(d.array(p))return"Array";if(d.buffer(p))return"Buffer";const A=l(p);if(A)return A;if(p instanceof String||p instanceof Boolean||p instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}d.undefined=u("undefined"),d.string=u("string");const m=u("number");d.number=p=>m(p)&&!d.nan(p),d.bigint=u("bigint"),d.function_=u("function"),d.null_=p=>p===null,d.class_=p=>d.function_(p)&&p.toString().startsWith("class "),d.boolean=p=>p===!0||p===!1,d.symbol=u("symbol"),d.numericString=p=>d.string(p)&&!d.emptyStringOrWhitespace(p)&&!Number.isNaN(Number(p)),d.array=(p,A)=>Array.isArray(p)?d.function_(A)?p.every(A):!0:!1,d.buffer=p=>{var A,k,U,H;return(H=(U=(k=(A=p)===null||A===void 0?void 0:A.constructor)===null||k===void 0?void 0:k.isBuffer)===null||U===void 0?void 0:U.call(k,p))!==null&&H!==void 0?H:!1},d.blob=p=>h("Blob")(p),d.nullOrUndefined=p=>d.null_(p)||d.undefined(p),d.object=p=>!d.null_(p)&&(typeof p=="object"||d.function_(p)),d.iterable=p=>{var A;return d.function_((A=p)===null||A===void 0?void 0:A[Symbol.iterator])},d.asyncIterable=p=>{var A;return d.function_((A=p)===null||A===void 0?void 0:A[Symbol.asyncIterator])},d.generator=p=>{var A,k;return d.iterable(p)&&d.function_((A=p)===null||A===void 0?void 0:A.next)&&d.function_((k=p)===null||k===void 0?void 0:k.throw)},d.asyncGenerator=p=>d.asyncIterable(p)&&d.function_(p.next)&&d.function_(p.throw),d.nativePromise=p=>h("Promise")(p);const b=p=>{var A,k;return d.function_((A=p)===null||A===void 0?void 0:A.then)&&d.function_((k=p)===null||k===void 0?void 0:k.catch)};d.promise=p=>d.nativePromise(p)||b(p),d.generatorFunction=h("GeneratorFunction"),d.asyncGeneratorFunction=p=>l(p)==="AsyncGeneratorFunction",d.asyncFunction=p=>l(p)==="AsyncFunction",d.boundFunction=p=>d.function_(p)&&!p.hasOwnProperty("prototype"),d.regExp=h("RegExp"),d.date=h("Date"),d.error=h("Error"),d.map=p=>h("Map")(p),d.set=p=>h("Set")(p),d.weakMap=p=>h("WeakMap")(p),d.weakSet=p=>h("WeakSet")(p),d.int8Array=h("Int8Array"),d.uint8Array=h("Uint8Array"),d.uint8ClampedArray=h("Uint8ClampedArray"),d.int16Array=h("Int16Array"),d.uint16Array=h("Uint16Array"),d.int32Array=h("Int32Array"),d.uint32Array=h("Uint32Array"),d.float32Array=h("Float32Array"),d.float64Array=h("Float64Array"),d.bigInt64Array=h("BigInt64Array"),d.bigUint64Array=h("BigUint64Array"),d.arrayBuffer=h("ArrayBuffer"),d.sharedArrayBuffer=h("SharedArrayBuffer"),d.dataView=h("DataView"),d.enumCase=(p,A)=>Object.values(A).includes(p),d.directInstanceOf=(p,A)=>Object.getPrototypeOf(p)===A.prototype,d.urlInstance=p=>h("URL")(p),d.urlString=p=>{if(!d.string(p))return!1;try{return new URL(p),!0}catch{return!1}},d.truthy=p=>!!p,d.falsy=p=>!p,d.nan=p=>Number.isNaN(p),d.primitive=p=>d.null_(p)||c(typeof p),d.integer=p=>Number.isInteger(p),d.safeInteger=p=>Number.isSafeInteger(p),d.plainObject=p=>{if(f.call(p)!=="[object Object]")return!1;const A=Object.getPrototypeOf(p);return A===null||A===Object.getPrototypeOf({})},d.typedArray=p=>n(l(p));const x=p=>d.safeInteger(p)&&p>=0;d.arrayLike=p=>!d.nullOrUndefined(p)&&!d.function_(p)&&x(p.length),d.inRange=(p,A)=>{if(d.number(A))return p>=Math.min(0,A)&&p<=Math.max(A,0);if(d.array(A)&&A.length===2)return p>=Math.min(...A)&&p<=Math.max(...A);throw new TypeError(`Invalid range: ${JSON.stringify(A)}`)};const y=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];d.domElement=p=>d.object(p)&&p.nodeType===y&&d.string(p.nodeName)&&!d.plainObject(p)&&g.every(A=>A in p),d.observable=p=>{var A,k,U,H;return p?p===((k=(A=p)[Symbol.observable])===null||k===void 0?void 0:k.call(A))||p===((H=(U=p)["@@observable"])===null||H===void 0?void 0:H.call(U)):!1},d.nodeStream=p=>d.object(p)&&d.function_(p.pipe)&&!d.observable(p),d.infinite=p=>p===1/0||p===-1/0;const E=p=>A=>d.integer(A)&&Math.abs(A%2)===p;d.evenInteger=E(0),d.oddInteger=E(1),d.emptyArray=p=>d.array(p)&&p.length===0,d.nonEmptyArray=p=>d.array(p)&&p.length>0,d.emptyString=p=>d.string(p)&&p.length===0;const D=p=>d.string(p)&&!/\S/.test(p);d.emptyStringOrWhitespace=p=>d.emptyString(p)||D(p),d.nonEmptyString=p=>d.string(p)&&p.length>0,d.nonEmptyStringAndNotWhitespace=p=>d.string(p)&&!d.emptyStringOrWhitespace(p),d.emptyObject=p=>d.object(p)&&!d.map(p)&&!d.set(p)&&Object.keys(p).length===0,d.nonEmptyObject=p=>d.object(p)&&!d.map(p)&&!d.set(p)&&Object.keys(p).length>0,d.emptySet=p=>d.set(p)&&p.size===0,d.nonEmptySet=p=>d.set(p)&&p.size>0,d.emptyMap=p=>d.map(p)&&p.size===0,d.nonEmptyMap=p=>d.map(p)&&p.size>0,d.propertyKey=p=>d.any([d.string,d.number,d.symbol],p),d.formData=p=>h("FormData")(p),d.urlSearchParams=p=>h("URLSearchParams")(p);const w=(p,A,k)=>{if(!d.function_(A))throw new TypeError(`Invalid predicate: ${JSON.stringify(A)}`);if(k.length===0)throw new TypeError("Invalid number of values");return p.call(k,A)};d.any=(p,...A)=>(d.array(p)?p:[p]).some(U=>w(Array.prototype.some,U,A)),d.all=(p,...A)=>w(Array.prototype.every,p,A);const j=(p,A,k,U={})=>{if(!p){const{multipleValues:H}=U,S=H?`received values of types ${[...new Set(k.map(P=>`\`${d(P)}\``))].join(", ")}`:`received value of type \`${d(k)}\``;throw new TypeError(`Expected value which is \`${A}\`, ${S}.`)}};e.assert={undefined:p=>j(d.undefined(p),"undefined",p),string:p=>j(d.string(p),"string",p),number:p=>j(d.number(p),"number",p),bigint:p=>j(d.bigint(p),"bigint",p),function_:p=>j(d.function_(p),"Function",p),null_:p=>j(d.null_(p),"null",p),class_:p=>j(d.class_(p),"Class",p),boolean:p=>j(d.boolean(p),"boolean",p),symbol:p=>j(d.symbol(p),"symbol",p),numericString:p=>j(d.numericString(p),"string with a number",p),array:(p,A)=>{j(d.array(p),"Array",p),A&&p.forEach(A)},buffer:p=>j(d.buffer(p),"Buffer",p),blob:p=>j(d.blob(p),"Blob",p),nullOrUndefined:p=>j(d.nullOrUndefined(p),"null or undefined",p),object:p=>j(d.object(p),"Object",p),iterable:p=>j(d.iterable(p),"Iterable",p),asyncIterable:p=>j(d.asyncIterable(p),"AsyncIterable",p),generator:p=>j(d.generator(p),"Generator",p),asyncGenerator:p=>j(d.asyncGenerator(p),"AsyncGenerator",p),nativePromise:p=>j(d.nativePromise(p),"native Promise",p),promise:p=>j(d.promise(p),"Promise",p),generatorFunction:p=>j(d.generatorFunction(p),"GeneratorFunction",p),asyncGeneratorFunction:p=>j(d.asyncGeneratorFunction(p),"AsyncGeneratorFunction",p),asyncFunction:p=>j(d.asyncFunction(p),"AsyncFunction",p),boundFunction:p=>j(d.boundFunction(p),"Function",p),regExp:p=>j(d.regExp(p),"RegExp",p),date:p=>j(d.date(p),"Date",p),error:p=>j(d.error(p),"Error",p),map:p=>j(d.map(p),"Map",p),set:p=>j(d.set(p),"Set",p),weakMap:p=>j(d.weakMap(p),"WeakMap",p),weakSet:p=>j(d.weakSet(p),"WeakSet",p),int8Array:p=>j(d.int8Array(p),"Int8Array",p),uint8Array:p=>j(d.uint8Array(p),"Uint8Array",p),uint8ClampedArray:p=>j(d.uint8ClampedArray(p),"Uint8ClampedArray",p),int16Array:p=>j(d.int16Array(p),"Int16Array",p),uint16Array:p=>j(d.uint16Array(p),"Uint16Array",p),int32Array:p=>j(d.int32Array(p),"Int32Array",p),uint32Array:p=>j(d.uint32Array(p),"Uint32Array",p),float32Array:p=>j(d.float32Array(p),"Float32Array",p),float64Array:p=>j(d.float64Array(p),"Float64Array",p),bigInt64Array:p=>j(d.bigInt64Array(p),"BigInt64Array",p),bigUint64Array:p=>j(d.bigUint64Array(p),"BigUint64Array",p),arrayBuffer:p=>j(d.arrayBuffer(p),"ArrayBuffer",p),sharedArrayBuffer:p=>j(d.sharedArrayBuffer(p),"SharedArrayBuffer",p),dataView:p=>j(d.dataView(p),"DataView",p),enumCase:(p,A)=>j(d.enumCase(p,A),"EnumCase",p),urlInstance:p=>j(d.urlInstance(p),"URL",p),urlString:p=>j(d.urlString(p),"string with a URL",p),truthy:p=>j(d.truthy(p),"truthy",p),falsy:p=>j(d.falsy(p),"falsy",p),nan:p=>j(d.nan(p),"NaN",p),primitive:p=>j(d.primitive(p),"primitive",p),integer:p=>j(d.integer(p),"integer",p),safeInteger:p=>j(d.safeInteger(p),"integer",p),plainObject:p=>j(d.plainObject(p),"plain object",p),typedArray:p=>j(d.typedArray(p),"TypedArray",p),arrayLike:p=>j(d.arrayLike(p),"array-like",p),domElement:p=>j(d.domElement(p),"HTMLElement",p),observable:p=>j(d.observable(p),"Observable",p),nodeStream:p=>j(d.nodeStream(p),"Node.js Stream",p),infinite:p=>j(d.infinite(p),"infinite number",p),emptyArray:p=>j(d.emptyArray(p),"empty array",p),nonEmptyArray:p=>j(d.nonEmptyArray(p),"non-empty array",p),emptyString:p=>j(d.emptyString(p),"empty string",p),emptyStringOrWhitespace:p=>j(d.emptyStringOrWhitespace(p),"empty string or whitespace",p),nonEmptyString:p=>j(d.nonEmptyString(p),"non-empty string",p),nonEmptyStringAndNotWhitespace:p=>j(d.nonEmptyStringAndNotWhitespace(p),"non-empty string and not whitespace",p),emptyObject:p=>j(d.emptyObject(p),"empty object",p),nonEmptyObject:p=>j(d.nonEmptyObject(p),"non-empty object",p),emptySet:p=>j(d.emptySet(p),"empty set",p),nonEmptySet:p=>j(d.nonEmptySet(p),"non-empty set",p),emptyMap:p=>j(d.emptyMap(p),"empty map",p),nonEmptyMap:p=>j(d.nonEmptyMap(p),"non-empty map",p),propertyKey:p=>j(d.propertyKey(p),"PropertyKey",p),formData:p=>j(d.formData(p),"FormData",p),urlSearchParams:p=>j(d.urlSearchParams(p),"URLSearchParams",p),evenInteger:p=>j(d.evenInteger(p),"even integer",p),oddInteger:p=>j(d.oddInteger(p),"odd integer",p),directInstanceOf:(p,A)=>j(d.directInstanceOf(p,A),"T",p),inRange:(p,A)=>j(d.inRange(p,A),"in range",p),any:(p,...A)=>j(d.any(p,...A),"predicate returns truthy for any value",A,{multipleValues:!0}),all:(p,...A)=>j(d.all(p,...A),"predicate returns truthy for all values",A,{multipleValues:!0})},Object.defineProperties(d,{class:{value:d.class_},function:{value:d.function_},null:{value:d.null_}}),Object.defineProperties(e.assert,{class:{value:e.assert.class_},function:{value:e.assert.function_},null:{value:e.assert.null_}}),e.default=d,t.exports=d,t.exports.default=d,t.exports.assert=e.assert})(mo,mo.exports);var En=mo.exports,Nn={},ys={};Object.defineProperty(ys,"__esModule",{value:!0}),ys.generateStackTrace=void 0;const Gf=()=>new RangeError("INTERNAL_OW_ERROR").stack;ys.generateStackTrace=Gf,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.ArgumentError=void 0;const Jf=ys,Yf=(t,e)=>`${t.name}: ${t.message}
|
|
89
|
+
${e}`;class Zf extends Error{constructor(e,r,n=new Map){super(e),Object.defineProperty(this,"validationErrors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="ArgumentError",Error.captureStackTrace?Error.captureStackTrace(this,r):this.stack=Yf(this,(0,Jf.generateStackTrace)()),this.validationErrors=n}}Nn.ArgumentError=Zf;var ha={},go={};Object.defineProperty(go,"__esModule",{value:!0}),go.default=()=>Math.random().toString(16).slice(2);var Nl;function Xf(){if(Nl)return ha;Nl=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.not=void 0;const t=go,e=Ge(),r=n=>{const a=n.addValidator;return n.addValidator=s=>{const{validator:o,message:c,negatedMessage:u}=s,f=(0,t.default)();return s.message=(l,h)=>u?u(l,h):c(l,f).replace(/ to /,"$¬ ").replace(f,h),s.validator=l=>!o(l),n[e.validatorSymbol].push(s),n.addValidator=a,n},n};return ha.not=r,ha}var An={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPredicate=t.testSymbol=void 0,t.testSymbol=Symbol("test");const e=r=>!!r[t.testSymbol];t.isPredicate=e})(An);var pa={};Object.defineProperty(pa,"__esModule",{value:!0}),pa.generateArgumentErrorMessage=void 0;const Kf=(t,e=!1)=>{const r=[],n=[...t.entries()],a=n.some(([,s])=>s.size!==1);if(n.length===1){const[,s]=n[0];if(!e&&s.size===1){const[o]=s;return o}for(const o of s)r.push(`${e?" - ":""}${o}`);return r.join(`
|
|
90
|
+
`)}if(!a)return n.map(([,[s]])=>` - ${s}`).join(`
|
|
91
|
+
`);for(const[s,o]of n){r.push(`Errors from the "${s}" predicate:`);for(const c of o)r.push(` - ${c}`)}return r.join(`
|
|
92
|
+
`)};pa.generateArgumentErrorMessage=Kf;var Al;function Ge(){return Al||(Al=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Predicate=t.validatorSymbol=void 0;const e=En,r=Nn,n=Xf(),a=An,s=pa;t.validatorSymbol=Symbol("validators");class o{constructor(u,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:{validators:[]}}),this.context={...this.context,...this.options};const l=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,d)=>`Expected ${(d==null?void 0:d.slice(this.type.length+1))||"argument"} to be of type \`${this.type}\` but received type \`${(0,e.default)(h)}\``,validator:h=>e.default[l](h)})}[a.testSymbol](u,f,l,h){const d=new Map;for(const{validator:m,message:b}of this.context.validators){if(this.options.optional===!0&&u===void 0)continue;let x;try{x=m(u)}catch(p){x=p}if(x===!0)continue;const y=e.default.function_(l)?l():l,g=y&&h?`\`${y}\``:y,E=g?`${this.type} ${g}`:this.type,D=y||this.type,w=d.get(D),j=b(u,E,x);w?w.add(j):d.set(D,new Set([j]))}if(d.size>0){const m=(0,s.generateArgumentErrorMessage)(d);throw new r.ArgumentError(m,f,d)}}get[t.validatorSymbol](){return this.context.validators}get not(){return(0,n.not)(this)}validate(u){return this.addValidator({message:(f,l,h)=>typeof h=="string"?`(${l}) ${h}`:h(l),validator:f=>{const{message:l,validator:h}=u(f);return h?!0:l}})}is(u){return this.addValidator({message:(f,l,h)=>h?`(${l}) ${h}`:`Expected ${l} \`${f}\` to pass custom validation function`,validator:u})}message(u){const{validators:f}=this.context;return f[f.length-1].message=(l,h)=>typeof u=="function"?u(l,h):u,this}addValidator(u){return this.context.validators.push(u),this}}t.Predicate=o}(po)),po}var bo={},vs={},ws={},Qf=function(t){return!isNaN(Date.parse(t))};Object.defineProperty(ws,"__esModule",{value:!0}),ws.StringPredicate=void 0;const eh=En,th=Qf,rh=Ge();class nh extends rh.Predicate{constructor(e){super("string",e)}length(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${e}\`, got \`${r}\``,validator:r=>r.length===e})}minLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${e}\`, got \`${r}\``,validator:r=>r.length>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${e-1}\`, got \`${r}\``})}maxLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${e}\`, got \`${r}\``,validator:r=>r.length<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${e+1}\`, got \`${r}\``})}matches(e){return this.addValidator({message:(r,n)=>`Expected ${n} to match \`${e}\`, got \`${r}\``,validator:r=>e.test(r)})}startsWith(e){return this.addValidator({message:(r,n)=>`Expected ${n} to start with \`${e}\`, got \`${r}\``,validator:r=>r.startsWith(e)})}endsWith(e){return this.addValidator({message:(r,n)=>`Expected ${n} to end with \`${e}\`, got \`${r}\``,validator:r=>r.endsWith(e)})}includes(e){return this.addValidator({message:(r,n)=>`Expected ${n} to include \`${e}\`, got \`${r}\``,validator:r=>r.includes(e)})}oneOf(e){return this.addValidator({message:(r,n)=>{let a=JSON.stringify(e);if(e.length>10){const s=e.length-10;a=JSON.stringify(e.slice(0,10)).replace(/]$/,`,…+${s} more]`)}return`Expected ${n} to be one of \`${a}\`, got \`${r}\``},validator:r=>e.includes(r)})}get empty(){return this.addValidator({message:(e,r)=>`Expected ${r} to be empty, got \`${e}\``,validator:e=>e===""})}get nonEmpty(){return this.addValidator({message:(e,r)=>`Expected ${r} to not be empty`,validator:e=>e!==""})}equals(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be equal to \`${e}\`, got \`${r}\``,validator:r=>r===e})}get alphanumeric(){return this.addValidator({message:(e,r)=>`Expected ${r} to be alphanumeric, got \`${e}\``,validator:e=>/^[a-z\d]+$/i.test(e)})}get alphabetical(){return this.addValidator({message:(e,r)=>`Expected ${r} to be alphabetical, got \`${e}\``,validator:e=>/^[a-z]+$/gi.test(e)})}get numeric(){return this.addValidator({message:(e,r)=>`Expected ${r} to be numeric, got \`${e}\``,validator:e=>/^[+-]?\d+$/i.test(e)})}get date(){return this.addValidator({message:(e,r)=>`Expected ${r} to be a date, got \`${e}\``,validator:th})}get lowercase(){return this.addValidator({message:(e,r)=>`Expected ${r} to be lowercase, got \`${e}\``,validator:e=>e.trim()!==""&&e===e.toLowerCase()})}get uppercase(){return this.addValidator({message:(e,r)=>`Expected ${r} to be uppercase, got \`${e}\``,validator:e=>e.trim()!==""&&e===e.toUpperCase()})}get url(){return this.addValidator({message:(e,r)=>`Expected ${r} to be a URL, got \`${e}\``,validator:eh.default.urlString})}}ws.StringPredicate=nh;var _s={};Object.defineProperty(_s,"__esModule",{value:!0}),_s.NumberPredicate=void 0;const kn=En,ah=Ge();class sh extends ah.Predicate{constructor(e){super("number",e)}inRange(e,r){return this.addValidator({message:(n,a)=>`Expected ${a} to be in range [${e}..${r}], got ${n}`,validator:n=>kn.default.inRange(n,[e,r])})}greaterThan(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be greater than ${e}, got ${r}`,validator:r=>r>e})}greaterThanOrEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be greater than or equal to ${e}, got ${r}`,validator:r=>r>=e})}lessThan(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be less than ${e}, got ${r}`,validator:r=>r<e})}lessThanOrEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be less than or equal to ${e}, got ${r}`,validator:r=>r<=e})}equal(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be equal to ${e}, got ${r}`,validator:r=>r===e})}oneOf(e){return this.addValidator({message:(r,n)=>{let a=JSON.stringify(e);if(e.length>10){const s=e.length-10;a=JSON.stringify(e.slice(0,10)).replace(/]$/,`,…+${s} more]`)}return`Expected ${n} to be one of \`${a}\`, got ${r}`},validator:r=>e.includes(r)})}get integer(){return this.addValidator({message:(e,r)=>`Expected ${r} to be an integer, got ${e}`,validator:e=>kn.default.integer(e)})}get finite(){return this.addValidator({message:(e,r)=>`Expected ${r} to be finite, got ${e}`,validator:e=>!kn.default.infinite(e)})}get infinite(){return this.addValidator({message:(e,r)=>`Expected ${r} to be infinite, got ${e}`,validator:e=>kn.default.infinite(e)})}get positive(){return this.addValidator({message:(e,r)=>`Expected ${r} to be positive, got ${e}`,validator:e=>e>0})}get negative(){return this.addValidator({message:(e,r)=>`Expected ${r} to be negative, got ${e}`,validator:e=>e<0})}get integerOrInfinite(){return this.addValidator({message:(e,r)=>`Expected ${r} to be an integer or infinite, got ${e}`,validator:e=>kn.default.integer(e)||kn.default.infinite(e)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}_s.NumberPredicate=sh;var Es={};Object.defineProperty(Es,"__esModule",{value:!0}),Es.BigIntPredicate=void 0;const ih=Ge();class oh extends ih.Predicate{constructor(e){super("bigint",e)}}Es.BigIntPredicate=oh;var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.BooleanPredicate=void 0;const uh=Ge();class lh extends uh.Predicate{constructor(e){super("boolean",e)}get true(){return this.addValidator({message:(e,r)=>`Expected ${r} to be true, got ${e}`,validator:e=>e})}get false(){return this.addValidator({message:(e,r)=>`Expected ${r} to be false, got ${e}`,validator:e=>!e})}}Ns.BooleanPredicate=lh;var As={},ks={exports:{}};ks.exports,function(t,e){var r=200,n="__lodash_hash_undefined__",a=1,s=2,o=9007199254740991,c="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",l="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",b="[object GeneratorFunction]",x="[object Map]",y="[object Number]",g="[object Null]",E="[object Object]",D="[object Promise]",w="[object Proxy]",j="[object RegExp]",p="[object Set]",A="[object String]",k="[object Symbol]",U="[object Undefined]",H="[object WeakMap]",S="[object ArrayBuffer]",P="[object DataView]",I="[object Float32Array]",W="[object Float64Array]",_="[object Int8Array]",M="[object Int16Array]",O="[object Int32Array]",G="[object Uint8Array]",B="[object Uint8ClampedArray]",K="[object Uint16Array]",X="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,je=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,V={};V[I]=V[W]=V[_]=V[M]=V[O]=V[G]=V[B]=V[K]=V[X]=!0,V[c]=V[u]=V[S]=V[l]=V[P]=V[h]=V[d]=V[m]=V[x]=V[y]=V[E]=V[j]=V[p]=V[A]=V[H]=!1;var re=typeof J=="object"&&J&&J.Object===Object&&J,ie=typeof self=="object"&&self&&self.Object===Object&&self,ne=re||ie||Function("return this")(),Ne=e&&!e.nodeType&&e,Fe=Ne&&!0&&t&&!t.nodeType&&t,At=Fe&&Fe.exports===Ne,kt=At&&re.process,yr=function(){try{return kt&&kt.binding&&kt.binding("util")}catch{}}(),vr=yr&&yr.isTypedArray;function _e(v,$){for(var R=-1,ee=v==null?0:v.length,Se=0,fe=[];++R<ee;){var Le=v[R];$(Le,R,v)&&(fe[Se++]=Le)}return fe}function ze(v,$){for(var R=-1,ee=$.length,Se=v.length;++R<ee;)v[Se+R]=$[R];return v}function Qe(v,$){for(var R=-1,ee=v==null?0:v.length;++R<ee;)if($(v[R],R,v))return!0;return!1}function Re(v,$){for(var R=-1,ee=Array(v);++R<v;)ee[R]=$(R);return ee}function jt(v){return function($){return v($)}}function wr(v,$){return v.has($)}function ts(v,$){return v==null?void 0:v[$]}function Cr(v){var $=-1,R=Array(v.size);return v.forEach(function(ee,Se){R[++$]=[Se,ee]}),R}function Or(v,$){return function(R){return v($(R))}}function ta(v){var $=-1,R=Array(v.size);return v.forEach(function(ee){R[++$]=ee}),R}var un=Array.prototype,ra=Function.prototype,lt=Object.prototype,$r=ne["__core-js_shared__"],ln=ra.toString,ct=lt.hasOwnProperty,Pr=function(){var v=/[^.]+$/.exec($r&&$r.keys&&$r.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),Kt=lt.toString,cn=RegExp("^"+ln.call(ct).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lr=At?ne.Buffer:void 0,Qt=ne.Symbol,er=ne.Uint8Array,na=lt.propertyIsEnumerable,dn=un.splice,St=Qt?Qt.toStringTag:void 0,Vt=Object.getOwnPropertySymbols,fn=Lr?Lr.isBuffer:void 0,Mr=Or(Object.keys,Object),tr=Rt(ne,"DataView"),dt=Rt(ne,"Map"),at=Rt(ne,"Promise"),wt=Rt(ne,"Set"),qt=Rt(ne,"WeakMap"),et=Rt(Object,"create"),rs=st(tr),Ir=st(dt),rr=st(at),hn=st(wt),aa=st(qt),sa=Qt?Qt.prototype:void 0,pn=sa?sa.valueOf:void 0;function Dt(v){var $=-1,R=v==null?0:v.length;for(this.clear();++$<R;){var ee=v[$];this.set(ee[0],ee[1])}}function N(){this.__data__=et?et(null):{},this.size=0}function z(v){var $=this.has(v)&&delete this.__data__[v];return this.size-=$?1:0,$}function Z(v){var $=this.__data__;if(et){var R=$[v];return R===n?void 0:R}return ct.call($,v)?$[v]:void 0}function oe(v){var $=this.__data__;return et?$[v]!==void 0:ct.call($,v)}function ce(v,$){var R=this.__data__;return this.size+=this.has(v)?0:1,R[v]=et&&$===void 0?n:$,this}Dt.prototype.clear=N,Dt.prototype.delete=z,Dt.prototype.get=Z,Dt.prototype.has=oe,Dt.prototype.set=ce;function he(v){var $=-1,R=v==null?0:v.length;for(this.clear();++$<R;){var ee=v[$];this.set(ee[0],ee[1])}}function ue(){this.__data__=[],this.size=0}function de(v){var $=this.__data__,R=Te($,v);if(R<0)return!1;var ee=$.length-1;return R==ee?$.pop():dn.call($,R,1),--this.size,!0}function He(v){var $=this.__data__,R=Te($,v);return R<0?void 0:$[R][1]}function Ee(v){return Te(this.__data__,v)>-1}function ke(v,$){var R=this.__data__,ee=Te(R,v);return ee<0?(++this.size,R.push([v,$])):R[ee][1]=$,this}he.prototype.clear=ue,he.prototype.delete=de,he.prototype.get=He,he.prototype.has=Ee,he.prototype.set=ke;function Ce(v){var $=-1,R=v==null?0:v.length;for(this.clear();++$<R;){var ee=v[$];this.set(ee[0],ee[1])}}function Ut(){this.size=0,this.__data__={hash:new Dt,map:new(dt||he),string:new Dt}}function Tt(v){var $=be(this,v).delete(v);return this.size-=$?1:0,$}function $e(v){return be(this,v).get(v)}function Fr(v){return be(this,v).has(v)}function ns(v,$){var R=be(this,v),ee=R.size;return R.set(v,$),this.size+=R.size==ee?0:1,this}Ce.prototype.clear=Ut,Ce.prototype.delete=Tt,Ce.prototype.get=$e,Ce.prototype.has=Fr,Ce.prototype.set=ns;function C(v){var $=-1,R=v==null?0:v.length;for(this.__data__=new Ce;++$<R;)this.add(v[$])}function F(v){return this.__data__.set(v,n),this}function Y(v){return this.__data__.has(v)}C.prototype.add=C.prototype.push=F,C.prototype.has=Y;function Q(v){var $=this.__data__=new he(v);this.size=$.size}function Ae(){this.__data__=new he,this.size=0}function pe(v){var $=this.__data__,R=$.delete(v);return this.size=$.size,R}function De(v){return this.__data__.get(v)}function Pe(v){return this.__data__.has(v)}function _t(v,$){var R=this.__data__;if(R instanceof he){var ee=R.__data__;if(!dt||ee.length<r-1)return ee.push([v,$]),this.size=++R.size,this;R=this.__data__=new Ce(ee)}return R.set(v,$),this.size=R.size,this}Q.prototype.clear=Ae,Q.prototype.delete=pe,Q.prototype.get=De,Q.prototype.has=Pe,Q.prototype.set=_t;function Be(v,$){var R=Ur(v),ee=!R&&ua(v),Se=!R&&!ee&&Rr(v),fe=!R&&!ee&&!Se&&xf(v),Le=R||ee||Se||fe,Xe=Le?Re(v.length,String):[],tt=Xe.length;for(var Oe in v)ct.call(v,Oe)&&!(Le&&(Oe=="length"||Se&&(Oe=="offset"||Oe=="parent")||fe&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||zt(Oe,tt)))&&Xe.push(Oe);return Xe}function Te(v,$){for(var R=v.length;R--;)if(is(v[R][0],$))return R;return-1}function Ct(v,$,R){var ee=$(v);return Ur(v)?ee:ze(ee,R(v))}function ft(v){return v==null?v===void 0?U:g:St&&St in Object(v)?nr(v):qr(v)}function Ze(v){return os(v)&&ft(v)==c}function Ot(v,$,R,ee,Se){return v===$?!0:v==null||$==null||!os(v)&&!os($)?v!==v&&$!==$:Br(v,$,R,ee,Ot,Se)}function Br(v,$,R,ee,Se,fe){var Le=Ur(v),Xe=Ur($),tt=Le?u:Ve(v),Oe=Xe?u:Ve($);tt=tt==c?E:tt,Oe=Oe==c?E:Oe;var Et=tt==E,Ht=Oe==E,it=tt==Oe;if(it&&Rr(v)){if(!Rr($))return!1;Le=!0,Et=!1}if(it&&!Et)return fe||(fe=new Q),Le||xf(v)?as(v,$,R,ee,Se,fe):al(v,$,tt,R,ee,Se,fe);if(!(R&a)){var $t=Et&&ct.call(v,"__wrapped__"),Pt=Ht&&ct.call($,"__wrapped__");if($t||Pt){var zr=$t?v.value():v,_r=Pt?$.value():$;return fe||(fe=new Q),Se(zr,_r,R,ee,fe)}}return it?(fe||(fe=new Q),sl(v,$,R,ee,Se,fe)):!1}function ia(v){if(!bf(v)||gn(v))return!1;var $=bn(v)?cn:je;return $.test(st(v))}function Vr(v){return os(v)&&xn(v.length)&&!!V[ft(v)]}function mn(v){if(!oa(v))return Mr(v);var $=[];for(var R in Object(v))ct.call(v,R)&&R!="constructor"&&$.push(R);return $}function as(v,$,R,ee,Se,fe){var Le=R&a,Xe=v.length,tt=$.length;if(Xe!=tt&&!(Le&&tt>Xe))return!1;var Oe=fe.get(v);if(Oe&&fe.get($))return Oe==$;var Et=-1,Ht=!0,it=R&s?new C:void 0;for(fe.set(v,$),fe.set($,v);++Et<Xe;){var $t=v[Et],Pt=$[Et];if(ee)var zr=Le?ee(Pt,$t,Et,$,v,fe):ee($t,Pt,Et,v,$,fe);if(zr!==void 0){if(zr)continue;Ht=!1;break}if(it){if(!Qe($,function(_r,yn){if(!wr(it,yn)&&($t===_r||Se($t,_r,R,ee,fe)))return it.push(yn)})){Ht=!1;break}}else if(!($t===Pt||Se($t,Pt,R,ee,fe))){Ht=!1;break}}return fe.delete(v),fe.delete($),Ht}function al(v,$,R,ee,Se,fe,Le){switch(R){case P:if(v.byteLength!=$.byteLength||v.byteOffset!=$.byteOffset)return!1;v=v.buffer,$=$.buffer;case S:return!(v.byteLength!=$.byteLength||!fe(new er(v),new er($)));case l:case h:case y:return is(+v,+$);case d:return v.name==$.name&&v.message==$.message;case j:case A:return v==$+"";case x:var Xe=Cr;case p:var tt=ee&a;if(Xe||(Xe=ta),v.size!=$.size&&!tt)return!1;var Oe=Le.get(v);if(Oe)return Oe==$;ee|=s,Le.set(v,$);var Et=as(Xe(v),Xe($),ee,Se,fe,Le);return Le.delete(v),Et;case k:if(pn)return pn.call(v)==pn.call($)}return!1}function sl(v,$,R,ee,Se,fe){var Le=R&a,Xe=xe(v),tt=Xe.length,Oe=xe($),Et=Oe.length;if(tt!=Et&&!Le)return!1;for(var Ht=tt;Ht--;){var it=Xe[Ht];if(!(Le?it in $:ct.call($,it)))return!1}var $t=fe.get(v);if($t&&fe.get($))return $t==$;var Pt=!0;fe.set(v,$),fe.set($,v);for(var zr=Le;++Ht<tt;){it=Xe[Ht];var _r=v[it],yn=$[it];if(ee)var yf=Le?ee(yn,_r,it,$,v,fe):ee(_r,yn,it,v,$,fe);if(!(yf===void 0?_r===yn||Se(_r,yn,R,ee,fe):yf)){Pt=!1;break}zr||(zr=it=="constructor")}if(Pt&&!zr){var oo=v.constructor,uo=$.constructor;oo!=uo&&"constructor"in v&&"constructor"in $&&!(typeof oo=="function"&&oo instanceof oo&&typeof uo=="function"&&uo instanceof uo)&&(Pt=!1)}return fe.delete(v),fe.delete($),Pt}function xe(v){return Ct(v,Zy,ss)}function be(v,$){var R=v.__data__;return ar($)?R[typeof $=="string"?"string":"hash"]:R.map}function Rt(v,$){var R=ts(v,$);return ia(R)?R:void 0}function nr(v){var $=ct.call(v,St),R=v[St];try{v[St]=void 0;var ee=!0}catch{}var Se=Kt.call(v);return ee&&($?v[St]=R:delete v[St]),Se}var ss=Vt?function(v){return v==null?[]:(v=Object(v),_e(Vt(v),function($){return na.call(v,$)}))}:Xy,Ve=ft;(tr&&Ve(new tr(new ArrayBuffer(1)))!=P||dt&&Ve(new dt)!=x||at&&Ve(at.resolve())!=D||wt&&Ve(new wt)!=p||qt&&Ve(new qt)!=H)&&(Ve=function(v){var $=ft(v),R=$==E?v.constructor:void 0,ee=R?st(R):"";if(ee)switch(ee){case rs:return P;case Ir:return x;case rr:return D;case hn:return p;case aa:return H}return $});function zt(v,$){return $=$??o,!!$&&(typeof v=="number"||L.test(v))&&v>-1&&v%1==0&&v<$}function ar(v){var $=typeof v;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?v!=="__proto__":v===null}function gn(v){return!!Pr&&Pr in v}function oa(v){var $=v&&v.constructor,R=typeof $=="function"&&$.prototype||lt;return v===R}function qr(v){return Kt.call(v)}function st(v){if(v!=null){try{return ln.call(v)}catch{}try{return v+""}catch{}}return""}function is(v,$){return v===$||v!==v&&$!==$}var ua=Ze(function(){return arguments}())?Ze:function(v){return os(v)&&ct.call(v,"callee")&&!na.call(v,"callee")},Ur=Array.isArray;function la(v){return v!=null&&xn(v.length)&&!bn(v)}var Rr=fn||Ky;function io(v,$){return Ot(v,$)}function bn(v){if(!bf(v))return!1;var $=ft(v);return $==m||$==b||$==f||$==w}function xn(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=o}function bf(v){var $=typeof v;return v!=null&&($=="object"||$=="function")}function os(v){return v!=null&&typeof v=="object"}var xf=vr?jt(vr):Vr;function Zy(v){return la(v)?Be(v):mn(v)}function Xy(){return[]}function Ky(){return!1}t.exports=io}(ks,ks.exports);var js=ks.exports,Wr={},jn={};Object.defineProperty(jn,"__esModule",{value:!0});const ch=An;function kl(t,e,r,n=!0){r[ch.testSymbol](t,kl,e,n)}jn.default=kl,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.exact=Wr.partial=void 0;const jl=En,Sl=jn,Dl=An;function Tl(t,e,r){try{for(const n of Object.keys(e)){const a=r?`${r}.${n}`:n;if((0,Dl.isPredicate)(e[n]))(0,Sl.default)(t[n],a,e[n]);else if(jl.default.plainObject(e[n])){const s=Tl(t[n],e[n],a);if(s!==!0)return s}}return!0}catch(n){return n.message}}Wr.partial=Tl;function Cl(t,e,r,n){try{const a=new Set(Object.keys(t));for(const s of Object.keys(e)){a.delete(s);const o=r?`${r}.${s}`:s;if((0,Dl.isPredicate)(e[s]))(0,Sl.default)(t[s],o,e[s]);else if(jl.default.plainObject(e[s])){if(!Object.prototype.hasOwnProperty.call(t,s))return`Expected \`${o}\` to exist`;const c=Cl(t[s],e[s],o);if(c!==!0)return c}}if(a.size>0){const s=[...a.keys()][0],o=r?`${r}.${s}`:s;return`Did not expect ${n?"element":"property"} \`${o}\` to exist, got \`${t[s]}\``}return!0}catch(a){return a.message}}Wr.exact=Cl;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});const dh=jn;Sn.default=(t,e,r)=>{try{for(const n of t)(0,dh.default)(n,e,r,!1);return!0}catch(n){return n.message}},Object.defineProperty(As,"__esModule",{value:!0}),As.ArrayPredicate=void 0;const fh=js,hh=Ge(),ph=Wr,mh=Sn;class gh extends hh.Predicate{constructor(e){super("array",e)}length(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${e}\`, got \`${r.length}\``,validator:r=>r.length===e})}minLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${e}\`, got \`${r.length}\``,validator:r=>r.length>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${e-1}\`, got \`${r.length}\``})}maxLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${e}\`, got \`${r.length}\``,validator:r=>r.length<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${e+1}\`, got \`${r.length}\``})}startsWith(e){return this.addValidator({message:(r,n)=>`Expected ${n} to start with \`${e}\`, got \`${r[0]}\``,validator:r=>r[0]===e})}endsWith(e){return this.addValidator({message:(r,n)=>`Expected ${n} to end with \`${e}\`, got \`${r[r.length-1]}\``,validator:r=>r[r.length-1]===e})}includes(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to include all elements of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(r)}\``,validator:r=>e.every(n=>r.includes(n))})}includesAny(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to include any element of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(r)}\``,validator:r=>e.some(n=>r.includes(n))})}get empty(){return this.addValidator({message:(e,r)=>`Expected ${r} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>e.length===0})}get nonEmpty(){return this.addValidator({message:(e,r)=>`Expected ${r} to not be empty`,validator:e=>e.length>0})}deepEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(r)}\``,validator:r=>fh(r,e)})}ofType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,mh.default)(r,"values",e)})}exactShape(e){const r=e;return this.addValidator({message:(n,a,s)=>`${s.replace("Expected","Expected element")} in ${a}`,validator:n=>(0,ph.exact)(n,r,void 0,!0)})}}As.ArrayPredicate=gh;var Ss={},bh=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")};const Gr=bh,xh=new Set(["__proto__","prototype","constructor"]),yh=t=>!t.some(e=>xh.has(e));function Ds(t){const e=t.split("."),r=[];for(let n=0;n<e.length;n++){let a=e[n];for(;a[a.length-1]==="\\"&&e[n+1]!==void 0;)a=a.slice(0,-1)+".",a+=e[++n];r.push(a)}return yh(r)?r:[]}var vh={get(t,e,r){if(!Gr(t)||typeof e!="string")return r===void 0?t:r;const n=Ds(e);if(n.length!==0){for(let a=0;a<n.length;a++)if(t=t[n[a]],t==null){if(a!==n.length-1)return r;break}return t===void 0?r:t}},set(t,e,r){if(!Gr(t)||typeof e!="string")return t;const n=t,a=Ds(e);for(let s=0;s<a.length;s++){const o=a[s];Gr(t[o])||(t[o]={}),s===a.length-1&&(t[o]=r),t=t[o]}return n},delete(t,e){if(!Gr(t)||typeof e!="string")return!1;const r=Ds(e);for(let n=0;n<r.length;n++){const a=r[n];if(n===r.length-1)return delete t[a],!0;if(t=t[a],!Gr(t))return!1}},has(t,e){if(!Gr(t)||typeof e!="string")return!1;const r=Ds(e);if(r.length===0)return!1;for(let n=0;n<r.length;n++)if(Gr(t)){if(!(r[n]in t))return!1;t=t[r[n]]}else return!1;return!0}},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.default=(t,e,r=5)=>{const n=[];for(const a of e)if(!t.has(a)&&(n.push(a),n.length===r))return n;return n.length===0?!0:n};var xo={};Object.defineProperty(xo,"__esModule",{value:!0});const wh=En,_h=jn,Ol=(t,e)=>wh.default.plainObject(t)?Object.values(t).every(r=>Ol(r,e)):((0,_h.default)(t,"deep values",e,!1),!0);xo.default=(t,e)=>{try{return Ol(t,e)}catch(r){return r.message}},Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.ObjectPredicate=void 0;const Eh=En,$l=vh,Nh=js,Ah=Jr,kh=Sn,jh=xo,Pl=Wr,Sh=Ge();class Dh extends Sh.Predicate{constructor(e){super("object",e)}get plain(){return this.addValidator({message:(e,r)=>`Expected ${r} to be a plain object`,validator:e=>Eh.default.plainObject(e)})}get empty(){return this.addValidator({message:(e,r)=>`Expected ${r} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>Object.keys(e).length===0})}get nonEmpty(){return this.addValidator({message:(e,r)=>`Expected ${r} to not be empty`,validator:e=>Object.keys(e).length>0})}valuesOfType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,kh.default)(Object.values(r),"values",e)})}deepValuesOfType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,jh.default)(r,e)})}deepEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(r)}\``,validator:r=>Nh(r,e)})}instanceOf(e){return this.addValidator({message:(r,n)=>{var a;let{name:s}=(a=r==null?void 0:r.constructor)!==null&&a!==void 0?a:{};return(!s||s==="Object")&&(s=JSON.stringify(r)),`Expected ${n} \`${s}\` to be of type \`${e.name}\``},validator:r=>r instanceof e})}hasKeys(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have keys \`${JSON.stringify(a)}\``,validator:r=>(0,Ah.default)({has:n=>$l.has(r,n)},e)})}hasAnyKeys(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any key of \`${JSON.stringify(e)}\``,validator:r=>e.some(n=>$l.has(r,n))})}partialShape(e){return this.addValidator({message:(r,n,a)=>`${a.replace("Expected","Expected property")} in ${n}`,validator:r=>(0,Pl.partial)(r,e)})}exactShape(e){return this.addValidator({message:(r,n,a)=>`${a.replace("Expected","Expected property")} in ${n}`,validator:r=>(0,Pl.exact)(r,e)})}}Ss.ObjectPredicate=Dh;var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.DatePredicate=void 0;const Th=Ge();class Ch extends Th.Predicate{constructor(e){super("date",e)}before(e){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${e.toISOString()}`,validator:r=>r.getTime()<e.getTime()})}after(e){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${e.toISOString()}`,validator:r=>r.getTime()>e.getTime()})}}Ts.DatePredicate=Ch;var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.ErrorPredicate=void 0;const Oh=Ge();class $h extends Oh.Predicate{constructor(e){super("error",e)}name(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${e}\`, got \`${r.name}\``,validator:r=>r.name===e})}message(e){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${e}\`, got \`${r.message}\``,validator:r=>r.message===e})}messageIncludes(e){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${e}\`, got \`${r.message}\``,validator:r=>r.message.includes(e)})}hasKeys(...e){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${e.join("`, `")}\``,validator:r=>e.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(e){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${e.name}\``,validator:r=>r instanceof e})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}Cs.ErrorPredicate=$h;var Os={};Object.defineProperty(Os,"__esModule",{value:!0}),Os.MapPredicate=void 0;const Ph=js,Ll=Jr,Ml=Sn,Lh=Ge();class Mh extends Lh.Predicate{constructor(e){super("Map",e)}size(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have size \`${e}\`, got \`${r.size}\``,validator:r=>r.size===e})}minSize(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum size of \`${e}\`, got \`${r.size}\``,validator:r=>r.size>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum size of \`${e-1}\`, got \`${r.size}\``})}maxSize(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum size of \`${e}\`, got \`${r.size}\``,validator:r=>r.size<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum size of \`${e+1}\`, got \`${r.size}\``})}hasKeys(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have keys \`${JSON.stringify(a)}\``,validator:r=>(0,Ll.default)(r,e)})}hasAnyKeys(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any key of \`${JSON.stringify(e)}\``,validator:r=>e.some(n=>r.has(n))})}hasValues(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have values \`${JSON.stringify(a)}\``,validator:r=>(0,Ll.default)(new Set(r.values()),e)})}hasAnyValues(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any value of \`${JSON.stringify(e)}\``,validator:r=>{const n=new Set(r.values());return e.some(a=>n.has(a))}})}keysOfType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,Ml.default)(r.keys(),"keys",e)})}valuesOfType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,Ml.default)(r.values(),"values",e)})}get empty(){return this.addValidator({message:(e,r)=>`Expected ${r} to be empty, got \`${JSON.stringify([...e])}\``,validator:e=>e.size===0})}get nonEmpty(){return this.addValidator({message:(e,r)=>`Expected ${r} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be deeply equal to \`${JSON.stringify([...e])}\`, got \`${JSON.stringify([...r])}\``,validator:r=>Ph(r,e)})}}Os.MapPredicate=Mh;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.WeakMapPredicate=void 0;const Ih=Jr,Fh=Ge();class Bh extends Fh.Predicate{constructor(e){super("WeakMap",e)}hasKeys(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have keys \`${JSON.stringify(a)}\``,validator:r=>(0,Ih.default)(r,e)})}hasAnyKeys(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any key of \`${JSON.stringify(e)}\``,validator:r=>e.some(n=>r.has(n))})}}$s.WeakMapPredicate=Bh;var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.SetPredicate=void 0;const Vh=js,qh=Jr,Uh=Sn,Rh=Ge();class zh extends Rh.Predicate{constructor(e){super("Set",e)}size(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have size \`${e}\`, got \`${r.size}\``,validator:r=>r.size===e})}minSize(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum size of \`${e}\`, got \`${r.size}\``,validator:r=>r.size>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum size of \`${e-1}\`, got \`${r.size}\``})}maxSize(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum size of \`${e}\`, got \`${r.size}\``,validator:r=>r.size<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum size of \`${e+1}\`, got \`${r.size}\``})}has(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have items \`${JSON.stringify(a)}\``,validator:r=>(0,qh.default)(r,e)})}hasAny(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any item of \`${JSON.stringify(e)}\``,validator:r=>e.some(n=>r.has(n))})}ofType(e){return this.addValidator({message:(r,n,a)=>`(${n}) ${a}`,validator:r=>(0,Uh.default)(r,"values",e)})}get empty(){return this.addValidator({message:(e,r)=>`Expected ${r} to be empty, got \`${JSON.stringify([...e])}\``,validator:e=>e.size===0})}get nonEmpty(){return this.addValidator({message:(e,r)=>`Expected ${r} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(r,n)=>`Expected ${n} to be deeply equal to \`${JSON.stringify([...e])}\`, got \`${JSON.stringify([...r])}\``,validator:r=>Vh(r,e)})}}Ps.SetPredicate=zh;var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.WeakSetPredicate=void 0;const Hh=Jr,Wh=Ge();class Gh extends Wh.Predicate{constructor(e){super("WeakSet",e)}has(...e){return this.addValidator({message:(r,n,a)=>`Expected ${n} to have items \`${JSON.stringify(a)}\``,validator:r=>(0,Hh.default)(r,e)})}hasAny(...e){return this.addValidator({message:(r,n)=>`Expected ${n} to have any item of \`${JSON.stringify(e)}\``,validator:r=>e.some(n=>r.has(n))})}}Ls.WeakSetPredicate=Gh;var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.TypedArrayPredicate=void 0;const Jh=Ge();class Yh extends Jh.Predicate{byteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===e})}minByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e-1}\`, got \`${r.byteLength}\``})}maxByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e+1}\`, got \`${r.byteLength}\``})}length(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${e}\`, got \`${r.length}\``,validator:r=>r.length===e})}minLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${e}\`, got \`${r.length}\``,validator:r=>r.length>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${e-1}\`, got \`${r.length}\``})}maxLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${e}\`, got \`${r.length}\``,validator:r=>r.length<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${e+1}\`, got \`${r.length}\``})}}Ms.TypedArrayPredicate=Yh;var Is={};Object.defineProperty(Is,"__esModule",{value:!0}),Is.ArrayBufferPredicate=void 0;const Zh=Ge();class Xh extends Zh.Predicate{byteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===e})}minByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e-1}\`, got \`${r.byteLength}\``})}maxByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e+1}\`, got \`${r.byteLength}\``})}}Is.ArrayBufferPredicate=Xh;var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.DataViewPredicate=void 0;const Kh=Ge();class Qh extends Kh.Predicate{constructor(e){super("DataView",e)}byteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===e})}minByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=e,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e-1}\`, got \`${r.byteLength}\``})}maxByteLength(e){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${e}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=e,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${e+1}\`, got \`${r.byteLength}\``})}}Fs.DataViewPredicate=Qh;var Bs={};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.AnyPredicate=void 0;const Il=Nn,ep=An,tp=pa;class rp{constructor(e,r={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r})}[ep.testSymbol](e,r,n,a){const s=new Map;for(const o of this.predicates)try{r(e,n,o,a);return}catch(c){if(e===void 0&&this.options.optional===!0)return;if(c instanceof Il.ArgumentError)for(const[u,f]of c.validationErrors.entries()){const l=s.get(u);s.set(u,new Set([...l??[],...f]))}}if(s.size>0){const o=(0,tp.generateArgumentErrorMessage)(s,!0);throw new Il.ArgumentError(`Any predicate failed with the following errors:
|
|
93
|
+
${o}`,r,s)}}}Bs.AnyPredicate=rp,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnyPredicate=t.DataViewPredicate=t.ArrayBufferPredicate=t.TypedArrayPredicate=t.WeakSetPredicate=t.SetPredicate=t.WeakMapPredicate=t.MapPredicate=t.ErrorPredicate=t.DatePredicate=t.ObjectPredicate=t.ArrayPredicate=t.BooleanPredicate=t.BigIntPredicate=t.NumberPredicate=t.StringPredicate=void 0;const e=ws;Object.defineProperty(t,"StringPredicate",{enumerable:!0,get:function(){return e.StringPredicate}});const r=_s;Object.defineProperty(t,"NumberPredicate",{enumerable:!0,get:function(){return r.NumberPredicate}});const n=Es;Object.defineProperty(t,"BigIntPredicate",{enumerable:!0,get:function(){return n.BigIntPredicate}});const a=Ns;Object.defineProperty(t,"BooleanPredicate",{enumerable:!0,get:function(){return a.BooleanPredicate}});const s=Ge(),o=As;Object.defineProperty(t,"ArrayPredicate",{enumerable:!0,get:function(){return o.ArrayPredicate}});const c=Ss;Object.defineProperty(t,"ObjectPredicate",{enumerable:!0,get:function(){return c.ObjectPredicate}});const u=Ts;Object.defineProperty(t,"DatePredicate",{enumerable:!0,get:function(){return u.DatePredicate}});const f=Cs;Object.defineProperty(t,"ErrorPredicate",{enumerable:!0,get:function(){return f.ErrorPredicate}});const l=Os;Object.defineProperty(t,"MapPredicate",{enumerable:!0,get:function(){return l.MapPredicate}});const h=$s;Object.defineProperty(t,"WeakMapPredicate",{enumerable:!0,get:function(){return h.WeakMapPredicate}});const d=Ps;Object.defineProperty(t,"SetPredicate",{enumerable:!0,get:function(){return d.SetPredicate}});const m=Ls;Object.defineProperty(t,"WeakSetPredicate",{enumerable:!0,get:function(){return m.WeakSetPredicate}});const b=Ms;Object.defineProperty(t,"TypedArrayPredicate",{enumerable:!0,get:function(){return b.TypedArrayPredicate}});const x=Is;Object.defineProperty(t,"ArrayBufferPredicate",{enumerable:!0,get:function(){return x.ArrayBufferPredicate}});const y=Fs;Object.defineProperty(t,"DataViewPredicate",{enumerable:!0,get:function(){return y.DataViewPredicate}});const g=Bs;Object.defineProperty(t,"AnyPredicate",{enumerable:!0,get:function(){return g.AnyPredicate}}),t.default=(E,D)=>(Object.defineProperties(E,{string:{get:()=>new e.StringPredicate(D)},number:{get:()=>new r.NumberPredicate(D)},bigint:{get:()=>new n.BigIntPredicate(D)},boolean:{get:()=>new a.BooleanPredicate(D)},undefined:{get:()=>new s.Predicate("undefined",D)},null:{get:()=>new s.Predicate("null",D)},nullOrUndefined:{get:()=>new s.Predicate("nullOrUndefined",D)},nan:{get:()=>new s.Predicate("nan",D)},symbol:{get:()=>new s.Predicate("symbol",D)},array:{get:()=>new o.ArrayPredicate(D)},object:{get:()=>new c.ObjectPredicate(D)},date:{get:()=>new u.DatePredicate(D)},error:{get:()=>new f.ErrorPredicate(D)},map:{get:()=>new l.MapPredicate(D)},weakMap:{get:()=>new h.WeakMapPredicate(D)},set:{get:()=>new d.SetPredicate(D)},weakSet:{get:()=>new m.WeakSetPredicate(D)},function:{get:()=>new s.Predicate("Function",D)},buffer:{get:()=>new s.Predicate("Buffer",D)},regExp:{get:()=>new s.Predicate("RegExp",D)},promise:{get:()=>new s.Predicate("Promise",D)},typedArray:{get:()=>new b.TypedArrayPredicate("TypedArray",D)},int8Array:{get:()=>new b.TypedArrayPredicate("Int8Array",D)},uint8Array:{get:()=>new b.TypedArrayPredicate("Uint8Array",D)},uint8ClampedArray:{get:()=>new b.TypedArrayPredicate("Uint8ClampedArray",D)},int16Array:{get:()=>new b.TypedArrayPredicate("Int16Array",D)},uint16Array:{get:()=>new b.TypedArrayPredicate("Uint16Array",D)},int32Array:{get:()=>new b.TypedArrayPredicate("Int32Array",D)},uint32Array:{get:()=>new b.TypedArrayPredicate("Uint32Array",D)},float32Array:{get:()=>new b.TypedArrayPredicate("Float32Array",D)},float64Array:{get:()=>new b.TypedArrayPredicate("Float64Array",D)},arrayBuffer:{get:()=>new x.ArrayBufferPredicate("ArrayBuffer",D)},sharedArrayBuffer:{get:()=>new x.ArrayBufferPredicate("SharedArrayBuffer",D)},dataView:{get:()=>new y.DataViewPredicate(D)},iterable:{get:()=>new s.Predicate("Iterable",D)},any:{value:(...w)=>new g.AnyPredicate(w,D)}}),E)}(vs),Object.defineProperty(bo,"__esModule",{value:!0});const np=vs;bo.default=t=>(Object.defineProperties(t,{optional:{get:()=>(0,np.default)({},{optional:!0})}}),t),function(t){var e=J&&J.__createBinding||(Object.create?function(m,b,x,y){y===void 0&&(y=x);var g=Object.getOwnPropertyDescriptor(b,x);(!g||("get"in g?!b.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return b[x]}}),Object.defineProperty(m,y,g)}:function(m,b,x,y){y===void 0&&(y=x),m[y]=b[x]}),r=J&&J.__exportStar||function(m,b){for(var x in m)x!=="default"&&!Object.prototype.hasOwnProperty.call(b,x)&&e(b,m,x)};Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentError=t.Predicate=void 0;const n=Hf,a=xs,s=Ge();Object.defineProperty(t,"Predicate",{enumerable:!0,get:function(){return s.Predicate}});const o=An,c=bo,u=vs,f=jn,l=(m,b,x)=>{if(!(0,o.isPredicate)(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if((0,o.isPredicate)(b)){const y=(0,n.default)();(0,f.default)(m,()=>(0,a.inferLabel)(y),b);return}(0,f.default)(m,b,x)};Object.defineProperties(l,{isValid:{value:(m,b)=>{try{return(0,f.default)(m,"",b),!0}catch{return!1}}},create:{value:(m,b)=>(x,y)=>{if((0,o.isPredicate)(m)){const g=(0,n.default)();(0,f.default)(x,y??(()=>(0,a.inferLabel)(g)),m);return}(0,f.default)(x,y??m,b)}}});const h=(0,u.default)((0,c.default)(l));t.default=h,r(vs,t);var d=Nn;Object.defineProperty(t,"ArgumentError",{enumerable:!0,get:function(){return d.ArgumentError}})}(_n);var Vs;function Fl(t){return Vs=Vs||document.createElement("textarea"),Vs.innerHTML="&"+t+";",Vs.value}function ap(t){return Object.prototype.toString.call(t)}function sp(t){return ap(t)==="[object String]"}var ip=Object.prototype.hasOwnProperty;function Bl(t,e){return t?ip.call(t,e):!1}function yo(t){var e=[].slice.call(arguments,1);return e.forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}var op=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function Dn(t){return t.indexOf("\\")<0?t:t.replace(op,"$1")}function vo(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function qs(t){if(t>65535){t-=65536;var e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}var up=/&([a-z#][a-z0-9]{1,31});/gi,lp=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function cp(t,e){var r=0,n=Fl(e);return e!==n?n:e.charCodeAt(0)===35&&lp.test(e)&&(r=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),vo(r))?qs(r):t}function Er(t){return t.indexOf("&")<0?t:t.replace(up,cp)}var dp=/[&<>"]/,fp=/[&<>"]/g,hp={"&":"&","<":"<",">":">",'"':"""};function pp(t){return hp[t]}function ot(t){return dp.test(t)?t.replace(fp,pp):t}var mp=Object.freeze({isString:sp,has:Bl,assign:yo,unescapeMd:Dn,isValidEntityCode:vo,fromCodePoint:qs,replaceEntities:Er,escapeHtml:ot}),te={};te.blockquote_open=function(){return`<blockquote>
|
|
94
|
+
`},te.blockquote_close=function(t,e){return"</blockquote>"+Yr(t,e)},te.code=function(t,e){return t[e].block?"<pre><code>"+ot(t[e].content)+"</code></pre>"+Yr(t,e):"<code>"+ot(t[e].content)+"</code>"},te.fence=function(t,e,r,n,a){var s=t[e],o="",c=r.langPrefix,u="",f,l,h;if(s.params){if(f=s.params.split(/\s+/g),l=f.join(" "),Bl(a.rules.fence_custom,f[0]))return a.rules.fence_custom[f[0]](t,e,r,n,a);u=ot(Er(Dn(l))),o=' class="'+c+u+'"'}return r.highlight?h=r.highlight.apply(r.highlight,[s.content].concat(f))||ot(s.content):h=ot(s.content),"<pre><code"+o+">"+h+"</code></pre>"+Yr(t,e)},te.fence_custom={},te.heading_open=function(t,e){return"<h"+t[e].hLevel+">"},te.heading_close=function(t,e){return"</h"+t[e].hLevel+`>
|
|
95
|
+
`},te.hr=function(t,e,r){return(r.xhtmlOut?"<hr />":"<hr>")+Yr(t,e)},te.bullet_list_open=function(){return`<ul>
|
|
96
|
+
`},te.bullet_list_close=function(t,e){return"</ul>"+Yr(t,e)},te.list_item_open=function(){return"<li>"},te.list_item_close=function(){return`</li>
|
|
97
|
+
`},te.ordered_list_open=function(t,e){var r=t[e],n=r.order>1?' start="'+r.order+'"':"";return"<ol"+n+`>
|
|
98
|
+
`},te.ordered_list_close=function(t,e){return"</ol>"+Yr(t,e)},te.paragraph_open=function(t,e){return t[e].tight?"":"<p>"},te.paragraph_close=function(t,e){var r=!(t[e].tight&&e&&t[e-1].type==="inline"&&!t[e-1].content);return(t[e].tight?"":"</p>")+(r?Yr(t,e):"")},te.link_open=function(t,e,r){var n=t[e].title?' title="'+ot(Er(t[e].title))+'"':"",a=r.linkTarget?' target="'+r.linkTarget+'"':"";return'<a href="'+ot(t[e].href)+'"'+n+a+">"},te.link_close=function(){return"</a>"},te.image=function(t,e,r){var n=' src="'+ot(t[e].src)+'"',a=t[e].title?' title="'+ot(Er(t[e].title))+'"':"",s=' alt="'+(t[e].alt?ot(Er(Dn(t[e].alt))):"")+'"',o=r.xhtmlOut?" /":"";return"<img"+n+s+a+o+">"},te.table_open=function(){return`<table>
|
|
99
|
+
`},te.table_close=function(){return`</table>
|
|
100
|
+
`},te.thead_open=function(){return`<thead>
|
|
101
|
+
`},te.thead_close=function(){return`</thead>
|
|
102
|
+
`},te.tbody_open=function(){return`<tbody>
|
|
103
|
+
`},te.tbody_close=function(){return`</tbody>
|
|
104
|
+
`},te.tr_open=function(){return"<tr>"},te.tr_close=function(){return`</tr>
|
|
105
|
+
`},te.th_open=function(t,e){var r=t[e];return"<th"+(r.align?' style="text-align:'+r.align+'"':"")+">"},te.th_close=function(){return"</th>"},te.td_open=function(t,e){var r=t[e];return"<td"+(r.align?' style="text-align:'+r.align+'"':"")+">"},te.td_close=function(){return"</td>"},te.strong_open=function(){return"<strong>"},te.strong_close=function(){return"</strong>"},te.em_open=function(){return"<em>"},te.em_close=function(){return"</em>"},te.del_open=function(){return"<del>"},te.del_close=function(){return"</del>"},te.ins_open=function(){return"<ins>"},te.ins_close=function(){return"</ins>"},te.mark_open=function(){return"<mark>"},te.mark_close=function(){return"</mark>"},te.sub=function(t,e){return"<sub>"+ot(t[e].content)+"</sub>"},te.sup=function(t,e){return"<sup>"+ot(t[e].content)+"</sup>"},te.hardbreak=function(t,e,r){return r.xhtmlOut?`<br />
|
|
106
|
+
`:`<br>
|
|
107
|
+
`},te.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`<br />
|
|
108
|
+
`:`<br>
|
|
109
|
+
`:`
|
|
110
|
+
`},te.text=function(t,e){return ot(t[e].content)},te.htmlblock=function(t,e){return t[e].content},te.htmltag=function(t,e){return t[e].content},te.abbr_open=function(t,e){return'<abbr title="'+ot(Er(t[e].title))+'">'},te.abbr_close=function(){return"</abbr>"},te.footnote_ref=function(t,e){var r=Number(t[e].id+1).toString(),n="fnref"+r;return t[e].subId>0&&(n+=":"+t[e].subId),'<sup class="footnote-ref"><a href="#fn'+r+'" id="'+n+'">['+r+"]</a></sup>"},te.footnote_block_open=function(t,e,r){var n=r.xhtmlOut?`<hr class="footnotes-sep" />
|
|
111
|
+
`:`<hr class="footnotes-sep">
|
|
112
|
+
`;return n+`<section class="footnotes">
|
|
113
|
+
<ol class="footnotes-list">
|
|
114
|
+
`},te.footnote_block_close=function(){return`</ol>
|
|
115
|
+
</section>
|
|
116
|
+
`},te.footnote_open=function(t,e){var r=Number(t[e].id+1).toString();return'<li id="fn'+r+'" class="footnote-item">'},te.footnote_close=function(){return`</li>
|
|
117
|
+
`},te.footnote_anchor=function(t,e){var r=Number(t[e].id+1).toString(),n="fnref"+r;return t[e].subId>0&&(n+=":"+t[e].subId),' <a href="#'+n+'" class="footnote-backref">↩</a>'},te.dl_open=function(){return`<dl>
|
|
118
|
+
`},te.dt_open=function(){return"<dt>"},te.dd_open=function(){return"<dd>"},te.dl_close=function(){return`</dl>
|
|
119
|
+
`},te.dt_close=function(){return`</dt>
|
|
120
|
+
`},te.dd_close=function(){return`</dd>
|
|
121
|
+
`};function Vl(t,e){return++e>=t.length-2?e:t[e].type==="paragraph_open"&&t[e].tight&&t[e+1].type==="inline"&&t[e+1].content.length===0&&t[e+2].type==="paragraph_close"&&t[e+2].tight?Vl(t,e+2):e}var Yr=te.getBreak=function(e,r){return r=Vl(e,r),r<e.length&&e[r].type==="list_item_close"?"":`
|
|
122
|
+
`};function wo(){this.rules=yo({},te),this.getBreak=te.getBreak}wo.prototype.renderInline=function(t,e,r){for(var n=this.rules,a=t.length,s=0,o="";a--;)o+=n[t[s].type](t,s++,e,r,this);return o},wo.prototype.render=function(t,e,r){for(var n=this.rules,a=t.length,s=-1,o="";++s<a;)t[s].type==="inline"?o+=this.renderInline(t[s].children,e,r):o+=n[t[s].type](t,s,e,r,this);return o};function vt(){this.__rules__=[],this.__cache__=null}vt.prototype.__find__=function(t){for(var e=this.__rules__.length,r=-1;e--;)if(this.__rules__[++r].name===t)return r;return-1},vt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),t.__cache__={},e.forEach(function(r){t.__cache__[r]=[],t.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||t.__cache__[r].push(n.fn))})})},vt.prototype.at=function(t,e,r){var n=this.__find__(t),a=r||{};if(n===-1)throw new Error("Parser rule not found: "+t);this.__rules__[n].fn=e,this.__rules__[n].alt=a.alt||[],this.__cache__=null},vt.prototype.before=function(t,e,r,n){var a=this.__find__(t),s=n||{};if(a===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(a,0,{name:e,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},vt.prototype.after=function(t,e,r,n){var a=this.__find__(t),s=n||{};if(a===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(a+1,0,{name:e,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},vt.prototype.push=function(t,e,r){var n=r||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},vt.prototype.enable=function(t,e){t=Array.isArray(t)?t:[t],e&&this.__rules__.forEach(function(r){r.enabled=!1}),t.forEach(function(r){var n=this.__find__(r);if(n<0)throw new Error("Rules manager: invalid rule name "+r);this.__rules__[n].enabled=!0},this),this.__cache__=null},vt.prototype.disable=function(t){t=Array.isArray(t)?t:[t],t.forEach(function(e){var r=this.__find__(e);if(r<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[r].enabled=!1},this),this.__cache__=null},vt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};function gp(t){t.inlineMode?t.tokens.push({type:"inline",content:t.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):t.block.parse(t.src,t.options,t.env,t.tokens)}function Zr(t,e,r,n,a){this.src=t,this.env=n,this.options=r,this.parser=e,this.tokens=a,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}Zr.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""},Zr.prototype.push=function(t){this.pending&&this.pushPending(),this.tokens.push(t),this.pendingLevel=this.level},Zr.prototype.cacheSet=function(t,e){for(var r=this.cache.length;r<=t;r++)this.cache.push(0);this.cache[t]=e},Zr.prototype.cacheGet=function(t){return t<this.cache.length?this.cache[t]:0};function ma(t,e){var r,n,a,s=-1,o=t.posMax,c=t.pos,u=t.isInLabel;if(t.isInLabel)return-1;if(t.labelUnmatchedScopes)return t.labelUnmatchedScopes--,-1;for(t.pos=e+1,t.isInLabel=!0,r=1;t.pos<o;){if(a=t.src.charCodeAt(t.pos),a===91)r++;else if(a===93&&(r--,r===0)){n=!0;break}t.parser.skipToken(t)}return n?(s=t.pos,t.labelUnmatchedScopes=0):t.labelUnmatchedScopes=r-1,t.pos=c,t.isInLabel=u,s}function bp(t,e,r,n){var a,s,o,c,u,f;if(t.charCodeAt(0)!==42||t.charCodeAt(1)!==91||t.indexOf("]:")===-1||(a=new Zr(t,e,r,n,[]),s=ma(a,1),s<0||t.charCodeAt(s+1)!==58))return-1;for(c=a.posMax,o=s+2;o<c&&a.src.charCodeAt(o)!==10;o++);return u=t.slice(2,s),f=t.slice(s+2,o).trim(),f.length===0?-1:(n.abbreviations||(n.abbreviations={}),typeof n.abbreviations[":"+u]>"u"&&(n.abbreviations[":"+u]=f),o)}function xp(t){var e=t.tokens,r,n,a,s;if(!t.inlineMode){for(r=1,n=e.length-1;r<n;r++)if(e[r-1].type==="paragraph_open"&&e[r].type==="inline"&&e[r+1].type==="paragraph_close"){for(a=e[r].content;a.length&&(s=bp(a,t.inline,t.options,t.env),!(s<0));)a=a.slice(s).trim();e[r].content=a,a.length||(e[r-1].tight=!0,e[r+1].tight=!0)}}}function _o(t){var e=Er(t);try{e=decodeURI(e)}catch{}return encodeURI(e)}function ql(t,e){var r,n,a,s=e,o=t.posMax;if(t.src.charCodeAt(e)===60){for(e++;e<o;){if(r=t.src.charCodeAt(e),r===10)return!1;if(r===62)return a=_o(Dn(t.src.slice(s+1,e))),t.parser.validateLink(a)?(t.pos=e+1,t.linkContent=a,!0):!1;if(r===92&&e+1<o){e+=2;continue}e++}return!1}for(n=0;e<o&&(r=t.src.charCodeAt(e),!(r===32||r<32||r===127));){if(r===92&&e+1<o){e+=2;continue}if(r===40&&(n++,n>1)||r===41&&(n--,n<0))break;e++}return s===e||(a=Dn(t.src.slice(s,e)),!t.parser.validateLink(a))?!1:(t.linkContent=a,t.pos=e,!0)}function Ul(t,e){var r,n=e,a=t.posMax,s=t.src.charCodeAt(e);if(s!==34&&s!==39&&s!==40)return!1;for(e++,s===40&&(s=41);e<a;){if(r=t.src.charCodeAt(e),r===s)return t.pos=e+1,t.linkContent=Dn(t.src.slice(n+1,e)),!0;if(r===92&&e+1<a){e+=2;continue}e++}return!1}function Rl(t){return t.trim().replace(/\s+/g," ").toUpperCase()}function yp(t,e,r,n){var a,s,o,c,u,f,l,h,d;if(t.charCodeAt(0)!==91||t.indexOf("]:")===-1||(a=new Zr(t,e,r,n,[]),s=ma(a,0),s<0||t.charCodeAt(s+1)!==58))return-1;for(c=a.posMax,o=s+2;o<c&&(u=a.src.charCodeAt(o),!(u!==32&&u!==10));o++);if(!ql(a,o))return-1;for(l=a.linkContent,o=a.pos,f=o,o=o+1;o<c&&(u=a.src.charCodeAt(o),!(u!==32&&u!==10));o++);for(o<c&&f!==o&&Ul(a,o)?(h=a.linkContent,o=a.pos):(h="",o=f);o<c&&a.src.charCodeAt(o)===32;)o++;return o<c&&a.src.charCodeAt(o)!==10?-1:(d=Rl(t.slice(1,s)),typeof n.references[d]>"u"&&(n.references[d]={title:h,href:l}),o)}function vp(t){var e=t.tokens,r,n,a,s;if(t.env.references=t.env.references||{},!t.inlineMode){for(r=1,n=e.length-1;r<n;r++)if(e[r].type==="inline"&&e[r-1].type==="paragraph_open"&&e[r+1].type==="paragraph_close"){for(a=e[r].content;a.length&&(s=yp(a,t.inline,t.options,t.env),!(s<0));)a=a.slice(s).trim();e[r].content=a,a.length||(e[r-1].tight=!0,e[r+1].tight=!0)}}}function wp(t){var e=t.tokens,r,n,a;for(n=0,a=e.length;n<a;n++)r=e[n],r.type==="inline"&&t.inline.parse(r.content,t.options,t.env,r.children)}function _p(t){var e,r,n,a,s,o,c,u,f,l=0,h=!1,d={};if(t.env.footnotes&&(t.tokens=t.tokens.filter(function(m){return m.type==="footnote_reference_open"?(h=!0,u=[],f=m.label,!1):m.type==="footnote_reference_close"?(h=!1,d[":"+f]=u,!1):(h&&u.push(m),!h)}),!!t.env.footnotes.list)){for(o=t.env.footnotes.list,t.tokens.push({type:"footnote_block_open",level:l++}),e=0,r=o.length;e<r;e++){for(t.tokens.push({type:"footnote_open",id:e,level:l++}),o[e].tokens?(c=[],c.push({type:"paragraph_open",tight:!1,level:l++}),c.push({type:"inline",content:"",level:l,children:o[e].tokens}),c.push({type:"paragraph_close",tight:!1,level:--l})):o[e].label&&(c=d[":"+o[e].label]),t.tokens=t.tokens.concat(c),t.tokens[t.tokens.length-1].type==="paragraph_close"?s=t.tokens.pop():s=null,a=o[e].count>0?o[e].count:1,n=0;n<a;n++)t.tokens.push({type:"footnote_anchor",id:e,subId:n,level:l});s&&t.tokens.push(s),t.tokens.push({type:"footnote_close",level:--l})}t.tokens.push({type:"footnote_block_close",level:--l})}}var zl=`
|
|
123
|
+
()[]'".,!?-`;function Eo(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function Ep(t){var e,r,n,a,s,o,c,u,f,l,h,d,m=t.tokens;if(t.env.abbreviations){for(t.env.abbrRegExp||(d="(^|["+zl.split("").map(Eo).join("")+"])("+Object.keys(t.env.abbreviations).map(function(b){return b.substr(1)}).sort(function(b,x){return x.length-b.length}).map(Eo).join("|")+")($|["+zl.split("").map(Eo).join("")+"])",t.env.abbrRegExp=new RegExp(d,"g")),l=t.env.abbrRegExp,r=0,n=m.length;r<n;r++)if(m[r].type==="inline"){for(a=m[r].children,e=a.length-1;e>=0;e--)if(s=a[e],s.type==="text"){for(u=0,o=s.content,l.lastIndex=0,f=s.level,c=[];h=l.exec(o);)l.lastIndex>u&&c.push({type:"text",content:o.slice(u,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:t.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),u=l.lastIndex-h[3].length;c.length&&(u<o.length&&c.push({type:"text",content:o.slice(u),level:f}),m[r].children=a=[].concat(a.slice(0,e),c,a.slice(e+1)))}}}}var Np=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ap=/\((c|tm|r|p)\)/ig,kp={c:"©",r:"®",p:"§",tm:"™"};function jp(t){return t.indexOf("(")<0?t:t.replace(Ap,function(e,r){return kp[r.toLowerCase()]})}function Sp(t){var e,r,n,a,s;if(t.options.typographer){for(s=t.tokens.length-1;s>=0;s--)if(t.tokens[s].type==="inline")for(a=t.tokens[s].children,e=a.length-1;e>=0;e--)r=a[e],r.type==="text"&&(n=r.content,n=jp(n),Np.test(n)&&(n=n.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),r.content=n)}}var Dp=/['"]/,Hl=/['"]/g,Tp=/[-\s()\[\]]/,Wl="’";function Gl(t,e){return e<0||e>=t.length?!1:!Tp.test(t[e])}function Tn(t,e,r){return t.substr(0,e)+r+t.substr(e+1)}function Cp(t){var e,r,n,a,s,o,c,u,f,l,h,d,m,b,x,y,g;if(t.options.typographer){for(g=[],x=t.tokens.length-1;x>=0;x--)if(t.tokens[x].type==="inline"){for(y=t.tokens[x].children,g.length=0,e=0;e<y.length;e++)if(r=y[e],!(r.type!=="text"||Dp.test(r.text))){for(c=y[e].level,m=g.length-1;m>=0&&!(g[m].level<=c);m--);g.length=m+1,n=r.content,s=0,o=n.length;e:for(;s<o&&(Hl.lastIndex=s,a=Hl.exec(n),!!a);){if(u=!Gl(n,a.index-1),s=a.index+1,b=a[0]==="'",f=!Gl(n,s),!f&&!u){b&&(r.content=Tn(r.content,a.index,Wl));continue}if(h=!f,d=!u,d){for(m=g.length-1;m>=0&&(l=g[m],!(g[m].level<c));m--)if(l.single===b&&g[m].level===c){l=g[m],b?(y[l.token].content=Tn(y[l.token].content,l.pos,t.options.quotes[2]),r.content=Tn(r.content,a.index,t.options.quotes[3])):(y[l.token].content=Tn(y[l.token].content,l.pos,t.options.quotes[0]),r.content=Tn(r.content,a.index,t.options.quotes[1])),g.length=m;continue e}}h?g.push({token:e,pos:a.index,single:b,level:c}):d&&b&&(r.content=Tn(r.content,a.index,Wl))}}}}}var No=[["block",gp],["abbr",xp],["references",vp],["inline",wp],["footnote_tail",_p],["abbr2",Ep],["replacements",Sp],["smartquotes",Cp]];function Jl(){this.options={},this.ruler=new vt;for(var t=0;t<No.length;t++)this.ruler.push(No[t][0],No[t][1])}Jl.prototype.process=function(t){var e,r,n;for(n=this.ruler.getRules(""),e=0,r=n.length;e<r;e++)n[e](t)};function Xr(t,e,r,n,a){var s,o,c,u,f,l,h;for(this.src=t,this.parser=e,this.options=r,this.env=n,this.tokens=a,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",o=this.src,l=0,h=!1,c=u=l=0,f=o.length;u<f;u++){if(s=o.charCodeAt(u),!h)if(s===32){l++;continue}else h=!0;(s===10||u===f-1)&&(s!==10&&u++,this.bMarks.push(c),this.eMarks.push(u),this.tShift.push(l),h=!1,l=0,c=u+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}Xr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Xr.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Xr.prototype.skipSpaces=function(e){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===32;e++);return e},Xr.prototype.skipChars=function(e,r){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e},Xr.prototype.skipCharsBack=function(e,r,n){if(e<=n)return e;for(;e>n;)if(r!==this.src.charCodeAt(--e))return e+1;return e},Xr.prototype.getLines=function(e,r,n,a){var s,o,c,u,f,l=e;if(e>=r)return"";if(l+1===r)return o=this.bMarks[l]+Math.min(this.tShift[l],n),c=a?this.eMarks[l]+1:this.eMarks[l],this.src.slice(o,c);for(u=new Array(r-e),s=0;l<r;l++,s++)f=this.tShift[l],f>n&&(f=n),f<0&&(f=0),o=this.bMarks[l]+f,l+1<r||a?c=this.eMarks[l]+1:c=this.eMarks[l],u[s]=this.src.slice(o,c);return u.join("")};function Op(t,e,r){var n,a;if(t.tShift[e]-t.blkIndent<4)return!1;for(a=n=e+1;n<r;){if(t.isEmpty(n)){n++;continue}if(t.tShift[n]-t.blkIndent>=4){n++,a=n;continue}break}return t.line=n,t.tokens.push({type:"code",content:t.getLines(e,a,4+t.blkIndent,!0),block:!0,lines:[e,t.line],level:t.level}),!0}function $p(t,e,r,n){var a,s,o,c,u,f=!1,l=t.bMarks[e]+t.tShift[e],h=t.eMarks[e];if(l+3>h||(a=t.src.charCodeAt(l),a!==126&&a!==96)||(u=l,l=t.skipChars(l,a),s=l-u,s<3)||(o=t.src.slice(l,h).trim(),o.indexOf("`")>=0))return!1;if(n)return!0;for(c=e;c++,!(c>=r||(l=u=t.bMarks[c]+t.tShift[c],h=t.eMarks[c],l<h&&t.tShift[c]<t.blkIndent));)if(t.src.charCodeAt(l)===a&&!(t.tShift[c]-t.blkIndent>=4)&&(l=t.skipChars(l,a),!(l-u<s)&&(l=t.skipSpaces(l),!(l<h)))){f=!0;break}return s=t.tShift[e],t.line=c+(f?1:0),t.tokens.push({type:"fence",params:o,content:t.getLines(e+1,c,s,!0),lines:[e,t.line],level:t.level}),!0}function Pp(t,e,r,n){var a,s,o,c,u,f,l,h,d,m,b,x=t.bMarks[e]+t.tShift[e],y=t.eMarks[e];if(x>y||t.src.charCodeAt(x++)!==62||t.level>=t.options.maxNesting)return!1;if(n)return!0;for(t.src.charCodeAt(x)===32&&x++,u=t.blkIndent,t.blkIndent=0,c=[t.bMarks[e]],t.bMarks[e]=x,x=x<y?t.skipSpaces(x):x,s=x>=y,o=[t.tShift[e]],t.tShift[e]=x-t.bMarks[e],h=t.parser.ruler.getRules("blockquote"),a=e+1;a<r&&(x=t.bMarks[a]+t.tShift[a],y=t.eMarks[a],!(x>=y));a++){if(t.src.charCodeAt(x++)===62){t.src.charCodeAt(x)===32&&x++,c.push(t.bMarks[a]),t.bMarks[a]=x,x=x<y?t.skipSpaces(x):x,s=x>=y,o.push(t.tShift[a]),t.tShift[a]=x-t.bMarks[a];continue}if(s)break;for(b=!1,d=0,m=h.length;d<m;d++)if(h[d](t,a,r,!0)){b=!0;break}if(b)break;c.push(t.bMarks[a]),o.push(t.tShift[a]),t.tShift[a]=-1337}for(f=t.parentType,t.parentType="blockquote",t.tokens.push({type:"blockquote_open",lines:l=[e,0],level:t.level++}),t.parser.tokenize(t,e,a),t.tokens.push({type:"blockquote_close",level:--t.level}),t.parentType=f,l[1]=t.line,d=0;d<o.length;d++)t.bMarks[d+e]=c[d],t.tShift[d+e]=o[d];return t.blkIndent=u,!0}function Lp(t,e,r,n){var a,s,o,c=t.bMarks[e],u=t.eMarks[e];if(c+=t.tShift[e],c>u||(a=t.src.charCodeAt(c++),a!==42&&a!==45&&a!==95))return!1;for(s=1;c<u;){if(o=t.src.charCodeAt(c++),o!==a&&o!==32)return!1;o===a&&s++}return s<3?!1:(n||(t.line=e+1,t.tokens.push({type:"hr",lines:[e,t.line],level:t.level})),!0)}function Yl(t,e){var r,n,a;return n=t.bMarks[e]+t.tShift[e],a=t.eMarks[e],n>=a||(r=t.src.charCodeAt(n++),r!==42&&r!==45&&r!==43)||n<a&&t.src.charCodeAt(n)!==32?-1:n}function Zl(t,e){var r,n=t.bMarks[e]+t.tShift[e],a=t.eMarks[e];if(n+1>=a||(r=t.src.charCodeAt(n++),r<48||r>57))return-1;for(;;){if(n>=a)return-1;if(r=t.src.charCodeAt(n++),!(r>=48&&r<=57)){if(r===41||r===46)break;return-1}}return n<a&&t.src.charCodeAt(n)!==32?-1:n}function Mp(t,e){var r,n,a=t.level+2;for(r=e+2,n=t.tokens.length-2;r<n;r++)t.tokens[r].level===a&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].tight=!0,t.tokens[r].tight=!0,r+=2)}function Ip(t,e,r,n){var a,s,o,c,u,f,l,h,d,m,b,x,y,g,E,D,w,j,p=!0,A,k,U,H;if((h=Zl(t,e))>=0)y=!0;else if((h=Yl(t,e))>=0)y=!1;else return!1;if(t.level>=t.options.maxNesting)return!1;if(x=t.src.charCodeAt(h-1),n)return!0;for(E=t.tokens.length,y?(l=t.bMarks[e]+t.tShift[e],b=Number(t.src.substr(l,h-l-1)),t.tokens.push({type:"ordered_list_open",order:b,lines:w=[e,0],level:t.level++})):t.tokens.push({type:"bullet_list_open",lines:w=[e,0],level:t.level++}),a=e,D=!1,A=t.parser.ruler.getRules("list");a<r&&(g=t.skipSpaces(h),d=t.eMarks[a],g>=d?m=1:m=g-h,m>4&&(m=1),m<1&&(m=1),s=h-t.bMarks[a]+m,t.tokens.push({type:"list_item_open",lines:j=[e,0],level:t.level++}),c=t.blkIndent,u=t.tight,o=t.tShift[e],f=t.parentType,t.tShift[e]=g-t.bMarks[e],t.blkIndent=s,t.tight=!0,t.parentType="list",t.parser.tokenize(t,e,r,!0),(!t.tight||D)&&(p=!1),D=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=c,t.tShift[e]=o,t.tight=u,t.parentType=f,t.tokens.push({type:"list_item_close",level:--t.level}),a=e=t.line,j[1]=a,g=t.bMarks[e],!(a>=r||t.isEmpty(a)||t.tShift[a]<t.blkIndent));){for(H=!1,k=0,U=A.length;k<U;k++)if(A[k](t,a,r,!0)){H=!0;break}if(H)break;if(y){if(h=Zl(t,a),h<0)break}else if(h=Yl(t,a),h<0)break;if(x!==t.src.charCodeAt(h-1))break}return t.tokens.push({type:y?"ordered_list_close":"bullet_list_close",level:--t.level}),w[1]=a,t.line=a,p&&Mp(t,E),!0}function Fp(t,e,r,n){var a,s,o,c,u,f=t.bMarks[e]+t.tShift[e],l=t.eMarks[e];if(f+4>l||t.src.charCodeAt(f)!==91||t.src.charCodeAt(f+1)!==94||t.level>=t.options.maxNesting)return!1;for(c=f+2;c<l;c++){if(t.src.charCodeAt(c)===32)return!1;if(t.src.charCodeAt(c)===93)break}return c===f+2||c+1>=l||t.src.charCodeAt(++c)!==58?!1:(n||(c++,t.env.footnotes||(t.env.footnotes={}),t.env.footnotes.refs||(t.env.footnotes.refs={}),u=t.src.slice(f+2,c-2),t.env.footnotes.refs[":"+u]=-1,t.tokens.push({type:"footnote_reference_open",label:u,level:t.level++}),a=t.bMarks[e],s=t.tShift[e],o=t.parentType,t.tShift[e]=t.skipSpaces(c)-c,t.bMarks[e]=c,t.blkIndent+=4,t.parentType="footnote",t.tShift[e]<t.blkIndent&&(t.tShift[e]+=t.blkIndent,t.bMarks[e]-=t.blkIndent),t.parser.tokenize(t,e,r,!0),t.parentType=o,t.blkIndent-=4,t.tShift[e]=s,t.bMarks[e]=a,t.tokens.push({type:"footnote_reference_close",level:--t.level})),!0)}function Bp(t,e,r,n){var a,s,o,c=t.bMarks[e]+t.tShift[e],u=t.eMarks[e];if(c>=u||(a=t.src.charCodeAt(c),a!==35||c>=u))return!1;for(s=1,a=t.src.charCodeAt(++c);a===35&&c<u&&s<=6;)s++,a=t.src.charCodeAt(++c);return s>6||c<u&&a!==32?!1:(n||(u=t.skipCharsBack(u,32,c),o=t.skipCharsBack(u,35,c),o>c&&t.src.charCodeAt(o-1)===32&&(u=o),t.line=e+1,t.tokens.push({type:"heading_open",hLevel:s,lines:[e,t.line],level:t.level}),c<u&&t.tokens.push({type:"inline",content:t.src.slice(c,u).trim(),level:t.level+1,lines:[e,t.line],children:[]}),t.tokens.push({type:"heading_close",hLevel:s,level:t.level})),!0)}function Vp(t,e,r){var n,a,s,o=e+1;return o>=r||t.tShift[o]<t.blkIndent||t.tShift[o]-t.blkIndent>3||(a=t.bMarks[o]+t.tShift[o],s=t.eMarks[o],a>=s)||(n=t.src.charCodeAt(a),n!==45&&n!==61)||(a=t.skipChars(a,n),a=t.skipSpaces(a),a<s)?!1:(a=t.bMarks[e]+t.tShift[e],t.line=o+1,t.tokens.push({type:"heading_open",hLevel:n===61?1:2,lines:[e,t.line],level:t.level}),t.tokens.push({type:"inline",content:t.src.slice(a,t.eMarks[e]).trim(),level:t.level+1,lines:[e,t.line-1],children:[]}),t.tokens.push({type:"heading_close",hLevel:n===61?1:2,level:t.level}),!0)}var Xl={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(t){Xl[t]=!0});var qp=/^<([a-zA-Z]{1,15})[\s\/>]/,Up=/^<\/([a-zA-Z]{1,15})[\s>]/;function Rp(t){var e=t|32;return e>=97&&e<=122}function zp(t,e,r,n){var a,s,o,c=t.bMarks[e],u=t.eMarks[e],f=t.tShift[e];if(c+=f,!t.options.html||f>3||c+2>=u||t.src.charCodeAt(c)!==60)return!1;if(a=t.src.charCodeAt(c+1),a===33||a===63){if(n)return!0}else if(a===47||Rp(a)){if(a===47){if(s=t.src.slice(c,u).match(Up),!s)return!1}else if(s=t.src.slice(c,u).match(qp),!s)return!1;if(Xl[s[1].toLowerCase()]!==!0)return!1;if(n)return!0}else return!1;for(o=e+1;o<t.lineMax&&!t.isEmpty(o);)o++;return t.line=o,t.tokens.push({type:"htmlblock",level:t.level,lines:[e,t.line],content:t.getLines(e,o,0,!0)}),!0}function Ao(t,e){var r=t.bMarks[e]+t.blkIndent,n=t.eMarks[e];return t.src.substr(r,n-r)}function Hp(t,e,r,n){var a,s,o,c,u,f,l,h,d,m,b;if(e+2>r||(u=e+1,t.tShift[u]<t.blkIndent)||(o=t.bMarks[u]+t.tShift[u],o>=t.eMarks[u])||(a=t.src.charCodeAt(o),a!==124&&a!==45&&a!==58)||(s=Ao(t,e+1),!/^[-:| ]+$/.test(s))||(f=s.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(d=f[c].trim(),!d){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;d.charCodeAt(d.length-1)===58?h.push(d.charCodeAt(0)===58?"center":"right"):d.charCodeAt(0)===58?h.push("left"):h.push("")}if(s=Ao(t,e).trim(),s.indexOf("|")===-1||(f=s.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(n)return!0;for(t.tokens.push({type:"table_open",lines:m=[e,0],level:t.level++}),t.tokens.push({type:"thead_open",lines:[e,e+1],level:t.level++}),t.tokens.push({type:"tr_open",lines:[e,e+1],level:t.level++}),c=0;c<f.length;c++)t.tokens.push({type:"th_open",align:h[c],lines:[e,e+1],level:t.level++}),t.tokens.push({type:"inline",content:f[c].trim(),lines:[e,e+1],level:t.level,children:[]}),t.tokens.push({type:"th_close",level:--t.level});for(t.tokens.push({type:"tr_close",level:--t.level}),t.tokens.push({type:"thead_close",level:--t.level}),t.tokens.push({type:"tbody_open",lines:b=[e+2,0],level:t.level++}),u=e+2;u<r&&!(t.tShift[u]<t.blkIndent||(s=Ao(t,u).trim(),s.indexOf("|")===-1));u++){for(f=s.replace(/^\||\|$/g,"").split("|"),t.tokens.push({type:"tr_open",level:t.level++}),c=0;c<f.length;c++)t.tokens.push({type:"td_open",align:h[c],level:t.level++}),l=f[c].substring(f[c].charCodeAt(0)===124?1:0,f[c].charCodeAt(f[c].length-1)===124?f[c].length-1:f[c].length).trim(),t.tokens.push({type:"inline",content:l,level:t.level,children:[]}),t.tokens.push({type:"td_close",level:--t.level});t.tokens.push({type:"tr_close",level:--t.level})}return t.tokens.push({type:"tbody_close",level:--t.level}),t.tokens.push({type:"table_close",level:--t.level}),m[1]=b[1]=u,t.line=u,!0}function Us(t,e){var r,n,a=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];return a>=s||(n=t.src.charCodeAt(a++),n!==126&&n!==58)||(r=t.skipSpaces(a),a===r)||r>=s?-1:r}function Wp(t,e){var r,n,a=t.level+2;for(r=e+2,n=t.tokens.length-2;r<n;r++)t.tokens[r].level===a&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].tight=!0,t.tokens[r].tight=!0,r+=2)}function Gp(t,e,r,n){var a,s,o,c,u,f,l,h,d,m,b,x,y,g;if(n)return t.ddIndent<0?!1:Us(t,e)>=0;if(l=e+1,t.isEmpty(l)&&++l>r||t.tShift[l]<t.blkIndent||(a=Us(t,l),a<0)||t.level>=t.options.maxNesting)return!1;f=t.tokens.length,t.tokens.push({type:"dl_open",lines:u=[e,0],level:t.level++}),o=e,s=l;e:for(;;){for(g=!0,y=!1,t.tokens.push({type:"dt_open",lines:[o,o],level:t.level++}),t.tokens.push({type:"inline",content:t.getLines(o,o+1,t.blkIndent,!1).trim(),level:t.level+1,lines:[o,o],children:[]}),t.tokens.push({type:"dt_close",level:--t.level});;){if(t.tokens.push({type:"dd_open",lines:c=[l,0],level:t.level++}),x=t.tight,d=t.ddIndent,h=t.blkIndent,b=t.tShift[s],m=t.parentType,t.blkIndent=t.ddIndent=t.tShift[s]+2,t.tShift[s]=a-t.bMarks[s],t.tight=!0,t.parentType="deflist",t.parser.tokenize(t,s,r,!0),(!t.tight||y)&&(g=!1),y=t.line-s>1&&t.isEmpty(t.line-1),t.tShift[s]=b,t.tight=x,t.parentType=m,t.blkIndent=h,t.ddIndent=d,t.tokens.push({type:"dd_close",level:--t.level}),c[1]=l=t.line,l>=r||t.tShift[l]<t.blkIndent)break e;if(a=Us(t,l),a<0)break;s=l}if(l>=r||(o=l,t.isEmpty(o))||t.tShift[o]<t.blkIndent||(s=o+1,s>=r)||(t.isEmpty(s)&&s++,s>=r)||t.tShift[s]<t.blkIndent||(a=Us(t,s),a<0))break}return t.tokens.push({type:"dl_close",level:--t.level}),u[1]=l,t.line=l,g&&Wp(t,f),!0}function Jp(t,e){var r,n,a,s,o,c=e+1,u;if(r=t.lineMax,c<r&&!t.isEmpty(c)){for(u=t.parser.ruler.getRules("paragraph");c<r&&!t.isEmpty(c);c++)if(!(t.tShift[c]-t.blkIndent>3)){for(a=!1,s=0,o=u.length;s<o;s++)if(u[s](t,c,r,!0)){a=!0;break}if(a)break}}return n=t.getLines(e,c,t.blkIndent,!1).trim(),t.line=c,n.length&&(t.tokens.push({type:"paragraph_open",tight:!1,lines:[e,t.line],level:t.level}),t.tokens.push({type:"inline",content:n,level:t.level+1,lines:[e,t.line],children:[]}),t.tokens.push({type:"paragraph_close",tight:!1,level:t.level})),!0}var Rs=[["code",Op],["fences",$p,["paragraph","blockquote","list"]],["blockquote",Pp,["paragraph","blockquote","list"]],["hr",Lp,["paragraph","blockquote","list"]],["list",Ip,["paragraph","blockquote"]],["footnote",Fp,["paragraph"]],["heading",Bp,["paragraph","blockquote"]],["lheading",Vp],["htmlblock",zp,["paragraph","blockquote"]],["table",Hp,["paragraph"]],["deflist",Gp,["paragraph"]],["paragraph",Jp]];function ko(){this.ruler=new vt;for(var t=0;t<Rs.length;t++)this.ruler.push(Rs[t][0],Rs[t][1],{alt:(Rs[t][2]||[]).slice()})}ko.prototype.tokenize=function(t,e,r){for(var n=this.ruler.getRules(""),a=n.length,s=e,o=!1,c,u;s<r&&(t.line=s=t.skipEmptyLines(s),!(s>=r||t.tShift[s]<t.blkIndent));){for(u=0;u<a&&(c=n[u](t,s,r,!1),!c);u++);if(t.tight=!o,t.isEmpty(t.line-1)&&(o=!0),s=t.line,s<r&&t.isEmpty(s)){if(o=!0,s++,s<r&&t.parentType==="list"&&t.isEmpty(s))break;t.line=s}}};var Yp=/[\n\t]/g,Zp=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,Xp=/\u00a0/g;ko.prototype.parse=function(t,e,r,n){var a,s=0,o=0;if(!t)return[];t=t.replace(Xp," "),t=t.replace(Zp,`
|
|
124
|
+
`),t.indexOf(" ")>=0&&(t=t.replace(Yp,function(c,u){var f;return t.charCodeAt(u)===10?(s=u+1,o=0,c):(f=" ".slice((u-s-o)%4),o=u-s+1,f)})),a=new Xr(t,this,e,r,n),this.tokenize(a,a.line,a.lineMax)};function Kp(t){switch(t){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function Qp(t,e){for(var r=t.pos;r<t.posMax&&!Kp(t.src.charCodeAt(r));)r++;return r===t.pos?!1:(e||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)}function em(t,e){var r,n,a=t.pos;if(t.src.charCodeAt(a)!==10)return!1;if(r=t.pending.length-1,n=t.posMax,!e)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(var s=r-2;s>=0;s--)if(t.pending.charCodeAt(s)!==32){t.pending=t.pending.substring(0,s+1);break}t.push({type:"hardbreak",level:t.level})}else t.pending=t.pending.slice(0,-1),t.push({type:"softbreak",level:t.level});else t.push({type:"softbreak",level:t.level});for(a++;a<n&&t.src.charCodeAt(a)===32;)a++;return t.pos=a,!0}for(var jo=[],Kl=0;Kl<256;Kl++)jo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){jo[t.charCodeAt(0)]=1});function tm(t,e){var r,n=t.pos,a=t.posMax;if(t.src.charCodeAt(n)!==92)return!1;if(n++,n<a){if(r=t.src.charCodeAt(n),r<256&&jo[r]!==0)return e||(t.pending+=t.src[n]),t.pos+=2,!0;if(r===10){for(e||t.push({type:"hardbreak",level:t.level}),n++;n<a&&t.src.charCodeAt(n)===32;)n++;return t.pos=n,!0}}return e||(t.pending+="\\"),t.pos++,!0}function rm(t,e){var r,n,a,s,o,c=t.pos,u=t.src.charCodeAt(c);if(u!==96)return!1;for(r=c,c++,n=t.posMax;c<n&&t.src.charCodeAt(c)===96;)c++;for(a=t.src.slice(r,c),s=o=c;(s=t.src.indexOf("`",o))!==-1;){for(o=s+1;o<n&&t.src.charCodeAt(o)===96;)o++;if(o-s===a.length)return e||t.push({type:"code",content:t.src.slice(c,s).replace(/[ \n]+/g," ").trim(),block:!1,level:t.level}),t.pos=o,!0}return e||(t.pending+=a),t.pos+=a.length,!0}function nm(t,e){var r,n,a,s=t.posMax,o=t.pos,c,u;if(t.src.charCodeAt(o)!==126||e||o+4>=s||t.src.charCodeAt(o+1)!==126||t.level>=t.options.maxNesting||(c=o>0?t.src.charCodeAt(o-1):-1,u=t.src.charCodeAt(o+2),c===126)||u===126||u===32||u===10)return!1;for(n=o+2;n<s&&t.src.charCodeAt(n)===126;)n++;if(n>o+3)return t.pos+=n-o,e||(t.pending+=t.src.slice(o,n)),!0;for(t.pos=o+2,a=1;t.pos+1<s;){if(t.src.charCodeAt(t.pos)===126&&t.src.charCodeAt(t.pos+1)===126&&(c=t.src.charCodeAt(t.pos-1),u=t.pos+2<s?t.src.charCodeAt(t.pos+2):-1,u!==126&&c!==126&&(c!==32&&c!==10?a--:u!==32&&u!==10&&a++,a<=0))){r=!0;break}t.parser.skipToken(t)}return r?(t.posMax=t.pos,t.pos=o+2,e||(t.push({type:"del_open",level:t.level++}),t.parser.tokenize(t),t.push({type:"del_close",level:--t.level})),t.pos=t.posMax+2,t.posMax=s,!0):(t.pos=o,!1)}function am(t,e){var r,n,a,s=t.posMax,o=t.pos,c,u;if(t.src.charCodeAt(o)!==43||e||o+4>=s||t.src.charCodeAt(o+1)!==43||t.level>=t.options.maxNesting||(c=o>0?t.src.charCodeAt(o-1):-1,u=t.src.charCodeAt(o+2),c===43)||u===43||u===32||u===10)return!1;for(n=o+2;n<s&&t.src.charCodeAt(n)===43;)n++;if(n!==o+2)return t.pos+=n-o,e||(t.pending+=t.src.slice(o,n)),!0;for(t.pos=o+2,a=1;t.pos+1<s;){if(t.src.charCodeAt(t.pos)===43&&t.src.charCodeAt(t.pos+1)===43&&(c=t.src.charCodeAt(t.pos-1),u=t.pos+2<s?t.src.charCodeAt(t.pos+2):-1,u!==43&&c!==43&&(c!==32&&c!==10?a--:u!==32&&u!==10&&a++,a<=0))){r=!0;break}t.parser.skipToken(t)}return r?(t.posMax=t.pos,t.pos=o+2,e||(t.push({type:"ins_open",level:t.level++}),t.parser.tokenize(t),t.push({type:"ins_close",level:--t.level})),t.pos=t.posMax+2,t.posMax=s,!0):(t.pos=o,!1)}function sm(t,e){var r,n,a,s=t.posMax,o=t.pos,c,u;if(t.src.charCodeAt(o)!==61||e||o+4>=s||t.src.charCodeAt(o+1)!==61||t.level>=t.options.maxNesting||(c=o>0?t.src.charCodeAt(o-1):-1,u=t.src.charCodeAt(o+2),c===61)||u===61||u===32||u===10)return!1;for(n=o+2;n<s&&t.src.charCodeAt(n)===61;)n++;if(n!==o+2)return t.pos+=n-o,e||(t.pending+=t.src.slice(o,n)),!0;for(t.pos=o+2,a=1;t.pos+1<s;){if(t.src.charCodeAt(t.pos)===61&&t.src.charCodeAt(t.pos+1)===61&&(c=t.src.charCodeAt(t.pos-1),u=t.pos+2<s?t.src.charCodeAt(t.pos+2):-1,u!==61&&c!==61&&(c!==32&&c!==10?a--:u!==32&&u!==10&&a++,a<=0))){r=!0;break}t.parser.skipToken(t)}return r?(t.posMax=t.pos,t.pos=o+2,e||(t.push({type:"mark_open",level:t.level++}),t.parser.tokenize(t),t.push({type:"mark_close",level:--t.level})),t.pos=t.posMax+2,t.posMax=s,!0):(t.pos=o,!1)}function Ql(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122}function ec(t,e){var r=e,n,a,s,o=!0,c=!0,u=t.posMax,f=t.src.charCodeAt(e);for(n=e>0?t.src.charCodeAt(e-1):-1;r<u&&t.src.charCodeAt(r)===f;)r++;return r>=u&&(o=!1),s=r-e,s>=4?o=c=!1:(a=r<u?t.src.charCodeAt(r):-1,(a===32||a===10)&&(o=!1),(n===32||n===10)&&(c=!1),f===95&&(Ql(n)&&(o=!1),Ql(a)&&(c=!1))),{can_open:o,can_close:c,delims:s}}function im(t,e){var r,n,a,s,o,c,u,f=t.posMax,l=t.pos,h=t.src.charCodeAt(l);if(h!==95&&h!==42||e)return!1;if(u=ec(t,l),r=u.delims,!u.can_open)return t.pos+=r,e||(t.pending+=t.src.slice(l,t.pos)),!0;if(t.level>=t.options.maxNesting)return!1;for(t.pos=l+r,c=[r];t.pos<f;){if(t.src.charCodeAt(t.pos)===h){if(u=ec(t,t.pos),n=u.delims,u.can_close){for(s=c.pop(),o=n;s!==o;){if(o<s){c.push(s-o);break}if(o-=s,c.length===0)break;t.pos+=s,s=c.pop()}if(c.length===0){r=s,a=!0;break}t.pos+=n;continue}u.can_open&&c.push(n),t.pos+=n;continue}t.parser.skipToken(t)}return a?(t.posMax=t.pos,t.pos=l+r,e||((r===2||r===3)&&t.push({type:"strong_open",level:t.level++}),(r===1||r===3)&&t.push({type:"em_open",level:t.level++}),t.parser.tokenize(t),(r===1||r===3)&&t.push({type:"em_close",level:--t.level}),(r===2||r===3)&&t.push({type:"strong_close",level:--t.level})),t.pos=t.posMax+r,t.posMax=f,!0):(t.pos=l,!1)}var om=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function um(t,e){var r,n,a=t.posMax,s=t.pos;if(t.src.charCodeAt(s)!==126||e||s+2>=a||t.level>=t.options.maxNesting)return!1;for(t.pos=s+1;t.pos<a;){if(t.src.charCodeAt(t.pos)===126){r=!0;break}t.parser.skipToken(t)}return!r||s+1===t.pos||(n=t.src.slice(s+1,t.pos),n.match(/(^|[^\\])(\\\\)*\s/))?(t.pos=s,!1):(t.posMax=t.pos,t.pos=s+1,e||t.push({type:"sub",level:t.level,content:n.replace(om,"$1")}),t.pos=t.posMax+1,t.posMax=a,!0)}var lm=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function cm(t,e){var r,n,a=t.posMax,s=t.pos;if(t.src.charCodeAt(s)!==94||e||s+2>=a||t.level>=t.options.maxNesting)return!1;for(t.pos=s+1;t.pos<a;){if(t.src.charCodeAt(t.pos)===94){r=!0;break}t.parser.skipToken(t)}return!r||s+1===t.pos||(n=t.src.slice(s+1,t.pos),n.match(/(^|[^\\])(\\\\)*\s/))?(t.pos=s,!1):(t.posMax=t.pos,t.pos=s+1,e||t.push({type:"sup",level:t.level,content:n.replace(lm,"$1")}),t.pos=t.posMax+1,t.posMax=a,!0)}function dm(t,e){var r,n,a,s,o,c,u,f,l=!1,h=t.pos,d=t.posMax,m=t.pos,b=t.src.charCodeAt(m);if(b===33&&(l=!0,b=t.src.charCodeAt(++m)),b!==91||t.level>=t.options.maxNesting||(r=m+1,n=ma(t,m),n<0))return!1;if(c=n+1,c<d&&t.src.charCodeAt(c)===40){for(c++;c<d&&(f=t.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=d)return!1;for(m=c,ql(t,c)?(s=t.linkContent,c=t.pos):s="",m=c;c<d&&(f=t.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<d&&m!==c&&Ul(t,c))for(o=t.linkContent,c=t.pos;c<d&&(f=t.src.charCodeAt(c),!(f!==32&&f!==10));c++);else o="";if(c>=d||t.src.charCodeAt(c)!==41)return t.pos=h,!1;c++}else{if(t.linkLevel>0)return!1;for(;c<d&&(f=t.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<d&&t.src.charCodeAt(c)===91&&(m=c+1,c=ma(t,c),c>=0?a=t.src.slice(m,c++):c=m-1),a||(typeof a>"u"&&(c=n+1),a=t.src.slice(r,n)),u=t.env.references[Rl(a)],!u)return t.pos=h,!1;s=u.href,o=u.title}return e||(t.pos=r,t.posMax=n,l?t.push({type:"image",src:s,title:o,alt:t.src.substr(r,n-r),level:t.level}):(t.push({type:"link_open",href:s,title:o,level:t.level++}),t.linkLevel++,t.parser.tokenize(t),t.linkLevel--,t.push({type:"link_close",level:--t.level}))),t.pos=c,t.posMax=d,!0}function fm(t,e){var r,n,a,s,o=t.posMax,c=t.pos;return c+2>=o||t.src.charCodeAt(c)!==94||t.src.charCodeAt(c+1)!==91||t.level>=t.options.maxNesting||(r=c+2,n=ma(t,c+1),n<0)?!1:(e||(t.env.footnotes||(t.env.footnotes={}),t.env.footnotes.list||(t.env.footnotes.list=[]),a=t.env.footnotes.list.length,t.pos=r,t.posMax=n,t.push({type:"footnote_ref",id:a,level:t.level}),t.linkLevel++,s=t.tokens.length,t.parser.tokenize(t),t.env.footnotes.list[a]={tokens:t.tokens.splice(s)},t.linkLevel--),t.pos=n+1,t.posMax=o,!0)}function hm(t,e){var r,n,a,s,o=t.posMax,c=t.pos;if(c+3>o||!t.env.footnotes||!t.env.footnotes.refs||t.src.charCodeAt(c)!==91||t.src.charCodeAt(c+1)!==94||t.level>=t.options.maxNesting)return!1;for(n=c+2;n<o;n++){if(t.src.charCodeAt(n)===32||t.src.charCodeAt(n)===10)return!1;if(t.src.charCodeAt(n)===93)break}return n===c+2||n>=o||(n++,r=t.src.slice(c+2,n-1),typeof t.env.footnotes.refs[":"+r]>"u")?!1:(e||(t.env.footnotes.list||(t.env.footnotes.list=[]),t.env.footnotes.refs[":"+r]<0?(a=t.env.footnotes.list.length,t.env.footnotes.list[a]={label:r,count:0},t.env.footnotes.refs[":"+r]=a):a=t.env.footnotes.refs[":"+r],s=t.env.footnotes.list[a].count,t.env.footnotes.list[a].count++,t.push({type:"footnote_ref",id:a,subId:s,level:t.level})),t.pos=n,t.posMax=o,!0)}var pm=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],mm=/^<([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])?)*)>/,gm=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function bm(t,e){var r,n,a,s,o,c=t.pos;return t.src.charCodeAt(c)!==60||(r=t.src.slice(c),r.indexOf(">")<0)?!1:(n=r.match(gm),n?pm.indexOf(n[1].toLowerCase())<0||(s=n[0].slice(1,-1),o=_o(s),!t.parser.validateLink(s))?!1:(e||(t.push({type:"link_open",href:o,level:t.level}),t.push({type:"text",content:s,level:t.level+1}),t.push({type:"link_close",level:t.level})),t.pos+=n[0].length,!0):(a=r.match(mm),a?(s=a[0].slice(1,-1),o=_o("mailto:"+s),t.parser.validateLink(o)?(e||(t.push({type:"link_open",href:o,level:t.level}),t.push({type:"text",content:s,level:t.level+1}),t.push({type:"link_close",level:t.level})),t.pos+=a[0].length,!0):!1):!1))}function zs(t,e){return t=t.source,e=e||"",function r(n,a){return n?(a=a.source||a,t=t.replace(n,a),r):new RegExp(t,e)}}var xm=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,ym=/[^"'=<>`\x00-\x20]+/,vm=/'[^']*'/,wm=/"[^"]*"/,_m=zs(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",ym)("single_quoted",vm)("double_quoted",wm)(),Em=zs(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",xm)("attr_value",_m)(),Nm=zs(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Em)(),Am=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,km=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,jm=/<[?].*?[?]>/,Sm=/<![A-Z]+\s+[^>]*>/,Dm=/<!\[CDATA\[[\s\S]*?\]\]>/,Tm=zs(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Nm)("close_tag",Am)("comment",km)("processing",jm)("declaration",Sm)("cdata",Dm)();function Cm(t){var e=t|32;return e>=97&&e<=122}function Om(t,e){var r,n,a,s=t.pos;return!t.options.html||(a=t.posMax,t.src.charCodeAt(s)!==60||s+2>=a)||(r=t.src.charCodeAt(s+1),r!==33&&r!==63&&r!==47&&!Cm(r))||(n=t.src.slice(s).match(Tm),!n)?!1:(e||t.push({type:"htmltag",content:t.src.slice(s,s+n[0].length),level:t.level}),t.pos+=n[0].length,!0)}var $m=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,Pm=/^&([a-z][a-z0-9]{1,31});/i;function Lm(t,e){var r,n,a,s=t.pos,o=t.posMax;if(t.src.charCodeAt(s)!==38)return!1;if(s+1<o){if(r=t.src.charCodeAt(s+1),r===35){if(a=t.src.slice(s).match($m),a)return e||(n=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),t.pending+=vo(n)?qs(n):qs(65533)),t.pos+=a[0].length,!0}else if(a=t.src.slice(s).match(Pm),a){var c=Fl(a[1]);if(a[1]!==c)return e||(t.pending+=c),t.pos+=a[0].length,!0}}return e||(t.pending+="&"),t.pos++,!0}var So=[["text",Qp],["newline",em],["escape",tm],["backticks",rm],["del",nm],["ins",am],["mark",sm],["emphasis",im],["sub",um],["sup",cm],["links",dm],["footnote_inline",fm],["footnote_ref",hm],["autolink",bm],["htmltag",Om],["entity",Lm]];function Hs(){this.ruler=new vt;for(var t=0;t<So.length;t++)this.ruler.push(So[t][0],So[t][1]);this.validateLink=Mm}Hs.prototype.skipToken=function(t){var e=this.ruler.getRules(""),r=e.length,n=t.pos,a,s;if((s=t.cacheGet(n))>0){t.pos=s;return}for(a=0;a<r;a++)if(e[a](t,!0)){t.cacheSet(n,t.pos);return}t.pos++,t.cacheSet(n,t.pos)},Hs.prototype.tokenize=function(t){for(var e=this.ruler.getRules(""),r=e.length,n=t.posMax,a,s;t.pos<n;){for(s=0;s<r&&(a=e[s](t,!1),!a);s++);if(a){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},Hs.prototype.parse=function(t,e,r,n){var a=new Zr(t,this,e,r,n);this.tokenize(a)};function Mm(t){var e=["vbscript","javascript","file","data"],r=t.trim().toLowerCase();return r=Er(r),!(r.indexOf(":")!==-1&&e.indexOf(r.split(":")[0])!==-1)}var Im={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Fm={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Bm={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Vm={default:Im,full:Fm,commonmark:Bm};function tc(t,e,r){this.src=e,this.env=r,this.options=t.options,this.tokens=[],this.inlineMode=!1,this.inline=t.inline,this.block=t.block,this.renderer=t.renderer,this.typographer=t.typographer}function Nr(t,e){typeof t!="string"&&(e=t,t="default"),e&&e.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
|
|
125
|
+
|
|
126
|
+
import Remarkable from 'remarkable';
|
|
127
|
+
import linkify from 'remarkable/linkify';
|
|
128
|
+
new Remarkable().use(linkify)
|
|
129
|
+
`),this.inline=new Hs,this.block=new ko,this.core=new Jl,this.renderer=new wo,this.ruler=new vt,this.options={},this.configure(Vm[t]),this.set(e||{})}Nr.prototype.set=function(t){yo(this.options,t)},Nr.prototype.configure=function(t){var e=this;if(!t)throw new Error("Wrong `remarkable` preset, check name/content");t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enable(t.components[r].rules,!0)})},Nr.prototype.use=function(t,e){return t(this,e),this},Nr.prototype.parse=function(t,e){var r=new tc(this,t,e);return this.core.process(r),r.tokens},Nr.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},Nr.prototype.parseInline=function(t,e){var r=new tc(this,t,e);return r.inlineMode=!0,this.core.process(r),r.tokens},Nr.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const qm=lo(Object.freeze(Object.defineProperty({__proto__:null,Remarkable:Nr,utils:mp},Symbol.toStringTag,{value:"Module"})));var Cn={},Ar={};function Um(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function rc(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var Rm=function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(a[o]=s[o])},t(r,n)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zm=function(t){Rm(e,t);function e(r,n){var a=this.constructor,s=t.call(this,r,n)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),Um(s,a.prototype),rc(s),s}return e}(Error),Hm=function(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,s;n<a;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))};function Wm(t,e){e===void 0&&(e=Error);function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(!(this instanceof r))return new(r.bind.apply(r,Hm([void 0],n,!1)));e.apply(this,n),Object.defineProperty(this,"name",{value:t.name||e.name,enumerable:!1,configurable:!0}),t.apply(this,n),rc(this,r)}return Object.defineProperties(r,{prototype:{value:Object.create(e.prototype,{constructor:{value:r,writable:!0,configurable:!0}})}})}const Gm=lo(Object.freeze(Object.defineProperty({__proto__:null,CustomError:zm,customErrorFactory:Wm},Symbol.toStringTag,{value:"Module"})));var Do={};const ht=lo(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),nc=ht,ac=/\s+at.*(?:\(|\s)(.*)\)?/,Jm=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,Ym=typeof nc.homedir>"u"?"":nc.homedir();var Zm=(t,e)=>(e=Object.assign({pretty:!1},e),t.replace(/\\/g,"/").split(`
|
|
130
|
+
`).filter(r=>{const n=r.match(ac);if(n===null||!n[1])return!0;const a=n[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")?!1:!Jm.test(a)}).filter(r=>r.trim()!=="").map(r=>e.pretty?r.replace(ac,(n,a)=>n.replace(a,a.replace(Ym,"~"))):r).join(`
|
|
131
|
+
`)),Xm=function(e){return Km(e)&&!Qm(e)};function Km(t){return!!t&&typeof t=="object"}function Qm(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||rg(t)}var eg=typeof Symbol=="function"&&Symbol.for,tg=eg?Symbol.for("react.element"):60103;function rg(t){return t.$$typeof===tg}function ng(t){return Array.isArray(t)?[]:{}}function ga(t,e){return e.clone!==!1&&e.isMergeableObject(t)?On(ng(t),t,e):t}function ag(t,e,r){return t.concat(e).map(function(n){return ga(n,r)})}function sg(t,e){if(!e.customMerge)return On;var r=e.customMerge(t);return typeof r=="function"?r:On}function ig(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function sc(t){return Object.keys(t).concat(ig(t))}function ic(t,e){try{return e in t}catch{return!1}}function og(t,e){return ic(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function ug(t,e,r){var n={};return r.isMergeableObject(t)&&sc(t).forEach(function(a){n[a]=ga(t[a],r)}),sc(e).forEach(function(a){og(t,a)||(ic(t,a)&&r.isMergeableObject(e[a])?n[a]=sg(a,r)(t[a],e[a],r):n[a]=ga(e[a],r))}),n}function On(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||ag,r.isMergeableObject=r.isMergeableObject||Xm,r.cloneUnlessOtherwiseSpecified=ga;var n=Array.isArray(e),a=Array.isArray(t),s=n===a;return s?n?r.arrayMerge(t,e,r):ug(t,e,r):ga(e,r)}On.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,a){return On(n,a,r)},{})};var lg=On,oc=lg,Ws={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.DEFAULT={cleanStack:!0}}(t.Options||(t.Options={}))})(Ws),function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Zm,r=oc,n=Ws;(function(a){function s(u,f,l,h){h===void 0&&(h=n.Options.DEFAULT);var d=u;return f&&(d.cause=f),d.stack=o(d.stack,f,h),l&&c(d,l),d}a.make=s;function o(u,f,l){var h=u||"";f&&(h+=`
|
|
132
|
+
Caused by: `+(f.stack||f));function d(m){return e(m,{pretty:!0})}return l&&l.cleanStack&&(h=d(h)),h}a.appendToStack=o;function c(u,f){for(var l in f)if(f.hasOwnProperty(l)){var h=u.hasOwnProperty(l)&&typeof u[l]=="object";u[l]=h?r(u[l],f[l]):f[l]}}})(t.ChainedErrorFactory||(t.ChainedErrorFactory={}))}(Do);var cg=J&&J.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ar,"__esModule",{value:!0});var dg=Gm,fg=Do,hg=Ws,pg=function(t){cg(e,t);function e(r,n,a){a===void 0&&(a=hg.Options.DEFAULT);var s=t.call(this,r)||this;return s.cause=n,s.stack=fg.ChainedErrorFactory.appendToStack(s.stack,n,a),s}return e}(dg.CustomError);Ar.default=pg;var mg=Do;Ar.ChainedErrorFactory=mg.ChainedErrorFactory;var gg=Ws;Ar.Options=gg.Options;var bg=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.SecurityError=Cn.SecurityChecker=void 0;const xg=bg(Ar);class yg{static checkSecurity(e,r){if(!r.allowScriptTag&&this.containsScriptTag(e))throw new uc("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(e){return/<\s*script/gi.test(e)}}Cn.SecurityChecker=yg;class uc extends xg.default{constructor(e,r){super(e,r)}}Cn.SecurityError=uc;var $n={},Gs={},ir={},or={};function vg(t,e,r){if(r===void 0&&(r=Array.prototype),t&&typeof r.find=="function")return r.find.call(t,e);for(var n=0;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(t,n)){var a=t[n];if(e.call(void 0,a,n,t))return a}}function To(t,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(t):t}function wg(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}var lc=To({HTML:"text/html",isHTML:function(t){return t===lc.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),cc=To({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===cc.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});or.assign=wg,or.find=vg,or.freeze=To,or.MIME_TYPE=lc,or.NAMESPACE=cc;var dc=or,Wt=dc.find,ba=dc.NAMESPACE;function _g(t){return t!==""}function Eg(t){return t?t.split(/[\t\n\f\r ]+/).filter(_g):[]}function Ng(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function fc(t){if(!t)return[];var e=Eg(t);return Object.keys(e.reduce(Ng,{}))}function Ag(t){return function(e){return t&&t.indexOf(e)!==-1}}function xa(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function pt(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,xa(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var mt={},Lt=mt.ELEMENT_NODE=1,Pn=mt.ATTRIBUTE_NODE=2,Js=mt.TEXT_NODE=3,hc=mt.CDATA_SECTION_NODE=4,pc=mt.ENTITY_REFERENCE_NODE=5,kg=mt.ENTITY_NODE=6,mc=mt.PROCESSING_INSTRUCTION_NODE=7,gc=mt.COMMENT_NODE=8,bc=mt.DOCUMENT_NODE=9,xc=mt.DOCUMENT_TYPE_NODE=10,ur=mt.DOCUMENT_FRAGMENT_NODE=11,jg=mt.NOTATION_NODE=12,rt={},Je={};rt.INDEX_SIZE_ERR=(Je[1]="Index size error",1),rt.DOMSTRING_SIZE_ERR=(Je[2]="DOMString size error",2);var gt=rt.HIERARCHY_REQUEST_ERR=(Je[3]="Hierarchy request error",3);rt.WRONG_DOCUMENT_ERR=(Je[4]="Wrong document",4),rt.INVALID_CHARACTER_ERR=(Je[5]="Invalid character",5),rt.NO_DATA_ALLOWED_ERR=(Je[6]="No data allowed",6),rt.NO_MODIFICATION_ALLOWED_ERR=(Je[7]="No modification allowed",7);var yc=rt.NOT_FOUND_ERR=(Je[8]="Not found",8);rt.NOT_SUPPORTED_ERR=(Je[9]="Not supported",9);var vc=rt.INUSE_ATTRIBUTE_ERR=(Je[10]="Attribute in use",10);rt.INVALID_STATE_ERR=(Je[11]="Invalid state",11),rt.SYNTAX_ERR=(Je[12]="Syntax error",12),rt.INVALID_MODIFICATION_ERR=(Je[13]="Invalid modification",13),rt.NAMESPACE_ERR=(Je[14]="Invalid namespace",14),rt.INVALID_ACCESS_ERR=(Je[15]="Invalid access",15);function Me(t,e){if(e instanceof Error)var r=e;else r=this,Error.call(this,Je[t]),this.message=Je[t],Error.captureStackTrace&&Error.captureStackTrace(this,Me);return r.code=t,e&&(this.message=this.message+": "+e),r}Me.prototype=Error.prototype,xa(rt,Me);function lr(){}lr.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t,e){for(var r=[],n=0;n<this.length;n++)Mn(this[n],r,t,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};function Ln(t,e){this._node=t,this._refresh=e,Co(this)}function Co(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ic(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];xa(r,t),t._inc=e}}Ln.prototype.item=function(t){return Co(this),this[t]||null},pt(Ln,lr);function Ys(){}function wc(t,e){for(var r=t.length;r--;)if(t[r]===e)return r}function _c(t,e,r,n){if(n?e[wc(e,n)]=r:e[e.length++]=r,t){r.ownerElement=t;var a=t.ownerDocument;a&&(n&&kc(a,t,n),Sg(a,t,r))}}function Ec(t,e,r){var n=wc(e,r);if(n>=0){for(var a=e.length-1;n<a;)e[n]=e[++n];if(e.length=a,t){var s=t.ownerDocument;s&&(kc(s,t,r),r.ownerElement=null)}}else throw new Me(yc,new Error(t.tagName+"@"+r))}Ys.prototype={length:0,item:lr.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var r=this[e];if(r.nodeName==t)return r}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new Me(vc);var r=this.getNamedItem(t.nodeName);return _c(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var e=t.ownerElement,r;if(e&&e!=this._ownerElement)throw new Me(vc);return r=this.getNamedItemNS(t.namespaceURI,t.localName),_c(this._ownerElement,this,t,r),r},removeNamedItem:function(t){var e=this.getNamedItem(t);return Ec(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);return Ec(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){for(var r=this.length;r--;){var n=this[r];if(n.localName==e&&n.namespaceURI==t)return n}return null}};function Nc(){}Nc.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=new va;if(n.implementation=this,n.childNodes=new lr,n.doctype=r||null,r&&n.appendChild(r),e){var a=n.createElementNS(t,e);n.appendChild(a)}return n},createDocumentType:function(t,e,r){var n=new Ks;return n.name=t,n.nodeName=t,n.publicId=e||"",n.systemId=r||"",n}};function ye(){}ye.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return Zs(this,t,e)},replaceChild:function(t,e){Zs(this,t,e,Tc),e&&this.removeChild(e)},removeChild:function(t){return jc(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Vo(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==Js&&t.nodeType==Js?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===t)return n}e=e.nodeType==Pn?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];e=e.nodeType==Pn?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null}};function Ac(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}xa(mt,ye),xa(mt,ye.prototype);function ya(t,e){if(e(t))return!0;if(t=t.firstChild)do if(ya(t,e))return!0;while(t=t.nextSibling)}function va(){this.ownerDocument=this}function Sg(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===ba.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function kc(t,e,r,n){t&&t._inc++;var a=r.namespaceURI;a===ba.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function Oo(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r)n[n.length++]=r;else{for(var a=e.firstChild,s=0;a;)n[s++]=a,a=a.nextSibling;n.length=s,delete n[n.length]}}}function jc(t,e){var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Oo(t.ownerDocument,t),e}function Dg(t){return t&&(t.nodeType===ye.DOCUMENT_NODE||t.nodeType===ye.DOCUMENT_FRAGMENT_NODE||t.nodeType===ye.ELEMENT_NODE)}function Tg(t){return t&&(Gt(t)||$o(t)||cr(t)||t.nodeType===ye.DOCUMENT_FRAGMENT_NODE||t.nodeType===ye.COMMENT_NODE||t.nodeType===ye.PROCESSING_INSTRUCTION_NODE)}function cr(t){return t&&t.nodeType===ye.DOCUMENT_TYPE_NODE}function Gt(t){return t&&t.nodeType===ye.ELEMENT_NODE}function $o(t){return t&&t.nodeType===ye.TEXT_NODE}function Sc(t,e){var r=t.childNodes||[];if(Wt(r,Gt)||cr(e))return!1;var n=Wt(r,cr);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function Dc(t,e){var r=t.childNodes||[];function n(s){return Gt(s)&&s!==e}if(Wt(r,n))return!1;var a=Wt(r,cr);return!(e&&a&&r.indexOf(a)>r.indexOf(e))}function Cg(t,e,r){if(!Dg(t))throw new Me(gt,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new Me(yc,"child not in parent");if(!Tg(e)||cr(e)&&t.nodeType!==ye.DOCUMENT_NODE)throw new Me(gt,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function Og(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===ye.DOCUMENT_FRAGMENT_NODE){var s=a.filter(Gt);if(s.length>1||Wt(a,$o))throw new Me(gt,"More than one element or text in fragment");if(s.length===1&&!Sc(t,r))throw new Me(gt,"Element in fragment can not be inserted before doctype")}if(Gt(e)&&!Sc(t,r))throw new Me(gt,"Only one element can be added and only after doctype");if(cr(e)){if(Wt(n,cr))throw new Me(gt,"Only one doctype is allowed");var o=Wt(n,Gt);if(r&&n.indexOf(o)<n.indexOf(r))throw new Me(gt,"Doctype can only be inserted before an element");if(!r&&o)throw new Me(gt,"Doctype can not be appended since element is present")}}function Tc(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===ye.DOCUMENT_FRAGMENT_NODE){var s=a.filter(Gt);if(s.length>1||Wt(a,$o))throw new Me(gt,"More than one element or text in fragment");if(s.length===1&&!Dc(t,r))throw new Me(gt,"Element in fragment can not be inserted before doctype")}if(Gt(e)&&!Dc(t,r))throw new Me(gt,"Only one element can be added and only after doctype");if(cr(e)){if(Wt(n,function(u){return cr(u)&&u!==r}))throw new Me(gt,"Only one doctype is allowed");var o=Wt(n,Gt);if(r&&n.indexOf(o)<n.indexOf(r))throw new Me(gt,"Doctype can only be inserted before an element")}}function Zs(t,e,r,n){Cg(t,e,r),t.nodeType===ye.DOCUMENT_NODE&&(n||Og)(t,e,r);var a=e.parentNode;if(a&&a.removeChild(e),e.nodeType===ur){var s=e.firstChild;if(s==null)return e;var o=e.lastChild}else s=o=e;var c=r?r.previousSibling:t.lastChild;s.previousSibling=c,o.nextSibling=r,c?c.nextSibling=s:t.firstChild=s,r==null?t.lastChild=o:r.previousSibling=o;do s.parentNode=t;while(s!==o&&(s=s.nextSibling));return Oo(t.ownerDocument||t,t),e.nodeType==ur&&(e.firstChild=e.lastChild=null),e}function $g(t,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=t,e.previousSibling=t.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,t.lastChild=e,Oo(t.ownerDocument,t,e),e}va.prototype={nodeName:"#document",nodeType:bc,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==ur){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return Zs(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===Lt&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),jc(this,t)},replaceChild:function(t,e){Zs(this,t,e,Tc),t.ownerDocument=this,e&&this.removeChild(e),Gt(t)&&(this.documentElement=t)},importNode:function(t,e){return Mc(this,t,e)},getElementById:function(t){var e=null;return ya(this.documentElement,function(r){if(r.nodeType==Lt&&r.getAttribute("id")==t)return e=r,!0}),e},getElementsByClassName:function(t){var e=fc(t);return new Ln(this,function(r){var n=[];return e.length>0&&ya(r.documentElement,function(a){if(a!==r&&a.nodeType===Lt){var s=a.getAttribute("class");if(s){var o=t===s;if(!o){var c=fc(s);o=e.every(Ag(c))}o&&n.push(a)}}}),n})},createElement:function(t){var e=new Kr;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new lr;var r=e.attributes=new Ys;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Qs;return t.ownerDocument=this,t.childNodes=new lr,t},createTextNode:function(t){var e=new Po;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new Lo;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new Mo;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new Fo;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new Xs;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new Io;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new Kr,n=e.split(":"),a=r.attributes=new Ys;return r.childNodes=new lr,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,n.length==2?(r.prefix=n[0],r.localName=n[1]):r.localName=e,a._ownerElement=r,r},createAttributeNS:function(t,e){var r=new Xs,n=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,n.length==2?(r.prefix=n[0],r.localName=n[1]):r.localName=e,r}},pt(va,ye);function Kr(){this._nsMap={}}Kr.prototype={nodeType:Lt,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===ur?this.insertBefore(t,null):$g(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new Ln(this,function(e){var r=[];return ya(e,function(n){n!==e&&n.nodeType==Lt&&(t==="*"||n.tagName==t)&&r.push(n)}),r})},getElementsByTagNameNS:function(t,e){return new Ln(this,function(r){var n=[];return ya(r,function(a){a!==r&&a.nodeType===Lt&&(t==="*"||a.namespaceURI===t)&&(e==="*"||a.localName==e)&&n.push(a)}),n})}},va.prototype.getElementsByTagName=Kr.prototype.getElementsByTagName,va.prototype.getElementsByTagNameNS=Kr.prototype.getElementsByTagNameNS,pt(Kr,ye);function Xs(){}Xs.prototype.nodeType=Pn,pt(Xs,ye);function wa(){}wa.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(Je[gt])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var n=this.data.substring(0,t),a=this.data.substring(t+e);r=n+r+a,this.nodeValue=this.data=r,this.length=r.length}},pt(wa,ye);function Po(){}Po.prototype={nodeName:"#text",nodeType:Js,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},pt(Po,wa);function Lo(){}Lo.prototype={nodeName:"#comment",nodeType:gc},pt(Lo,wa);function Mo(){}Mo.prototype={nodeName:"#cdata-section",nodeType:hc},pt(Mo,wa);function Ks(){}Ks.prototype.nodeType=xc,pt(Ks,ye);function Cc(){}Cc.prototype.nodeType=jg,pt(Cc,ye);function Oc(){}Oc.prototype.nodeType=kg,pt(Oc,ye);function Io(){}Io.prototype.nodeType=pc,pt(Io,ye);function Qs(){}Qs.prototype.nodeName="#document-fragment",Qs.prototype.nodeType=ur,pt(Qs,ye);function Fo(){}Fo.prototype.nodeType=mc,pt(Fo,ye);function $c(){}$c.prototype.serializeToString=function(t,e,r){return Pc.call(t,e,r)},ye.prototype.toString=Pc;function Pc(t,e){var r=[],n=this.nodeType==9&&this.documentElement||this,a=n.prefix,s=n.namespaceURI;if(s&&a==null){var a=n.lookupPrefix(s);if(a==null)var o=[{namespace:s,prefix:null}]}return Mn(this,r,t,e,o),r.join("")}function Lc(t,e,r){var n=t.prefix||"",a=t.namespaceURI;if(!a||n==="xml"&&a===ba.XML||a===ba.XMLNS)return!1;for(var s=r.length;s--;){var o=r[s];if(o.prefix===n)return o.namespace!==a}return!0}function Bo(t,e,r){t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,Ac),'"')}function Mn(t,e,r,n,a){if(a||(a=[]),n)if(t=n(t),t){if(typeof t=="string"){e.push(t);return}}else return;switch(t.nodeType){case Lt:var s=t.attributes,o=s.length,g=t.firstChild,c=t.tagName;r=ba.isHTML(t.namespaceURI)||r;var u=c;if(!r&&!t.prefix&&t.namespaceURI){for(var f,l=0;l<s.length;l++)if(s.item(l).name==="xmlns"){f=s.item(l).value;break}if(!f)for(var h=a.length-1;h>=0;h--){var d=a[h];if(d.prefix===""&&d.namespace===t.namespaceURI){f=d.namespace;break}}if(f!==t.namespaceURI)for(var h=a.length-1;h>=0;h--){var d=a[h];if(d.namespace===t.namespaceURI){d.prefix&&(u=d.prefix+":"+c);break}}}e.push("<",u);for(var m=0;m<o;m++){var b=s.item(m);b.prefix=="xmlns"?a.push({prefix:b.localName,namespace:b.value}):b.nodeName=="xmlns"&&a.push({prefix:"",namespace:b.value})}for(var m=0;m<o;m++){var b=s.item(m);if(Lc(b,r,a)){var x=b.prefix||"",y=b.namespaceURI;Bo(e,x?"xmlns:"+x:"xmlns",y),a.push({prefix:x,namespace:y})}Mn(b,e,r,n,a)}if(c===u&&Lc(t,r,a)){var x=t.prefix||"",y=t.namespaceURI;Bo(e,x?"xmlns:"+x:"xmlns",y),a.push({prefix:x,namespace:y})}if(g||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(e.push(">"),r&&/^script$/i.test(c))for(;g;)g.data?e.push(g.data):Mn(g,e,r,n,a.slice()),g=g.nextSibling;else for(;g;)Mn(g,e,r,n,a.slice()),g=g.nextSibling;e.push("</",u,">")}else e.push("/>");return;case bc:case ur:for(var g=t.firstChild;g;)Mn(g,e,r,n,a.slice()),g=g.nextSibling;return;case Pn:return Bo(e,t.name,t.value);case Js:return e.push(t.data.replace(/[<&>]/g,Ac));case hc:return e.push("<![CDATA[",t.data,"]]>");case gc:return e.push("<!--",t.data,"-->");case xc:var E=t.publicId,D=t.systemId;if(e.push("<!DOCTYPE ",t.name),E)e.push(" PUBLIC ",E),D&&D!="."&&e.push(" ",D),e.push(">");else if(D&&D!=".")e.push(" SYSTEM ",D,">");else{var w=t.internalSubset;w&&e.push(" [",w,"]"),e.push(">")}return;case mc:return e.push("<?",t.target," ",t.data,"?>");case pc:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function Mc(t,e,r){var n;switch(e.nodeType){case Lt:n=e.cloneNode(!1),n.ownerDocument=t;case ur:break;case Pn:r=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=t,n.parentNode=null,r)for(var a=e.firstChild;a;)n.appendChild(Mc(t,a,r)),a=a.nextSibling;return n}function Vo(t,e,r){var n=new e.constructor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=e[a];typeof s!="object"&&s!=n[a]&&(n[a]=s)}switch(e.childNodes&&(n.childNodes=new lr),n.ownerDocument=t,n.nodeType){case Lt:var o=e.attributes,c=n.attributes=new Ys,u=o.length;c._ownerElement=n;for(var f=0;f<u;f++)n.setAttributeNode(Vo(t,o.item(f),!0));break;case Pn:r=!0}if(r)for(var l=e.firstChild;l;)n.appendChild(Vo(t,l,r)),l=l.nextSibling;return n}function Ic(t,e,r){t[e]=r}try{if(Object.defineProperty){let t=function(e){switch(e.nodeType){case Lt:case ur:var r=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&r.push(t(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}};Object.defineProperty(Ln.prototype,"length",{get:function(){return Co(this),this.$$length}}),Object.defineProperty(ye.prototype,"textContent",{get:function(){return t(this)},set:function(e){switch(this.nodeType){case Lt:case ur:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ic=function(e,r,n){e["$$"+r]=n}}}catch{}ir.DocumentType=Ks,ir.DOMException=Me,ir.DOMImplementation=Nc,ir.Element=Kr,ir.Node=ye,ir.NodeList=lr,ir.XMLSerializer=$c;var ei={},Fc={};(function(t){var e=or.freeze;t.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
133
|
+
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),t.entityMap=t.HTML_ENTITIES})(Fc);var qo={},_a=or.NAMESPACE,Uo=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Bc=new RegExp("[\\-\\.0-9"+Uo.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Vc=new RegExp("^"+Uo.source+Bc.source+"*(?::"+Uo.source+Bc.source+"*)?$"),Ea=0,kr=1,In=2,Na=3,Fn=4,Bn=5,Aa=6,ti=7;function Vn(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Vn)}Vn.prototype=new Error,Vn.prototype.name=Vn.name;function qc(){}qc.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),zc(e,e={}),Pg(t,e,r,n,this.errorHandler),n.endDocument()}};function Pg(t,e,r,n,a){function s(M){if(M>65535){M-=65536;var O=55296+(M>>10),G=56320+(M&1023);return String.fromCharCode(O,G)}else return String.fromCharCode(M)}function o(M){var O=M.slice(1,-1);return Object.hasOwnProperty.call(r,O)?r[O]:O.charAt(0)==="#"?s(parseInt(O.substr(1).replace("x","0x"))):(a.error("entity not found:"+M),M)}function c(M){if(M>x){var O=t.substring(x,M).replace(/&#?\w+;/g,o);d&&u(x),n.characters(O,0,M-x),x=M}}function u(M,O){for(;M>=l&&(O=h.exec(t));)f=O.index,l=f+O[0].length,d.lineNumber++;d.columnNumber=M-f+1}for(var f=0,l=0,h=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,m=[{currentNSMap:e}],b={},x=0;;){try{var y=t.indexOf("<",x);if(y<0){if(!t.substr(x).match(/^\s*$/)){var g=n.doc,E=g.createTextNode(t.substr(x));g.appendChild(E),n.currentElement=E}return}switch(y>x&&c(y),t.charAt(y+1)){case"/":var S=t.indexOf(">",y+3),D=t.substring(y+2,S).replace(/[ \t\n\r]+$/g,""),w=m.pop();S<0?(D=t.substring(y+2).replace(/[\s<].*/,""),a.error("end tag name: "+D+" is not complete:"+w.tagName),S=y+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),a.error("end tag name: "+D+" maybe not complete"),S=y+1+D.length);var j=w.localNSMap,p=w.tagName==D,A=p||w.tagName&&w.tagName.toLowerCase()==D.toLowerCase();if(A){if(n.endElement(w.uri,w.localName,D),j)for(var k in j)Object.prototype.hasOwnProperty.call(j,k)&&n.endPrefixMapping(k);p||a.fatalError("end tag name: "+D+" is not match the current start tagName:"+w.tagName)}else m.push(w);S++;break;case"?":d&&u(y),S=Bg(t,y,n);break;case"!":d&&u(y),S=Fg(t,y,n,a);break;default:d&&u(y);var U=new Hc,H=m[m.length-1].currentNSMap,S=Lg(t,y,U,H,o,a),P=U.length;if(!U.closed&&Ig(t,S,U.tagName,b)&&(U.closed=!0,r.nbsp||a.warning("unclosed xml attribute")),d&&P){for(var I=Uc(d,{}),W=0;W<P;W++){var _=U[W];u(_.offset),_.locator=Uc(d,{})}n.locator=I,Rc(U,n,H)&&m.push(U),n.locator=d}else Rc(U,n,H)&&m.push(U);_a.isHTML(U.uri)&&!U.closed?S=Mg(t,S,U.tagName,o,n):S++}}catch(M){if(M instanceof Vn)throw M;a.error("element parse error: "+M),S=-1}S>x?x=S:c(Math.max(y,x)+1)}}function Uc(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Lg(t,e,r,n,a,s){function o(d,m,b){r.attributeNames.hasOwnProperty(d)&&s.fatalError("Attribute "+d+" redefined"),r.addValue(d,m.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),b)}for(var c,u,f=++e,l=Ea;;){var h=t.charAt(f);switch(h){case"=":if(l===kr)c=t.slice(e,f),l=Na;else if(l===In)l=Na;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(l===Na||l===kr)if(l===kr&&(s.warning('attribute value must after "="'),c=t.slice(e,f)),e=f+1,f=t.indexOf(h,e),f>0)u=t.slice(e,f),o(c,u,e-1),l=Bn;else throw new Error("attribute value no end '"+h+"' match");else if(l==Fn)u=t.slice(e,f),o(c,u,e),s.warning('attribute "'+c+'" missed start quot('+h+")!!"),e=f+1,l=Bn;else throw new Error('attribute value must after "="');break;case"/":switch(l){case Ea:r.setTagName(t.slice(e,f));case Bn:case Aa:case ti:l=ti,r.closed=!0;case Fn:case kr:break;case In:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),l==Ea&&r.setTagName(t.slice(e,f)),f;case">":switch(l){case Ea:r.setTagName(t.slice(e,f));case Bn:case Aa:case ti:break;case Fn:case kr:u=t.slice(e,f),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case In:l===In&&(u=c),l==Fn?(s.warning('attribute "'+u+'" missed quot(")!'),o(c,u,e)):((!_a.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Na:throw new Error("attribute value missed!!")}return f;case"":h=" ";default:if(h<=" ")switch(l){case Ea:r.setTagName(t.slice(e,f)),l=Aa;break;case kr:c=t.slice(e,f),l=In;break;case Fn:var u=t.slice(e,f);s.warning('attribute "'+u+'" missed quot(")!!'),o(c,u,e);case Bn:l=Aa;break}else switch(l){case In:r.tagName,(!_a.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),o(c,c,e),e=f,l=kr;break;case Bn:s.warning('attribute space is required"'+c+'"!!');case Aa:l=kr,e=f;break;case Na:l=Fn,e=f;break;case ti:throw new Error("elements closed character '/' and '>' must be connected to")}}f++}}function Rc(t,e,r){for(var n=t.tagName,a=null,h=t.length;h--;){var s=t[h],o=s.qName,c=s.value,d=o.indexOf(":");if(d>0)var u=s.prefix=o.slice(0,d),f=o.slice(d+1),l=u==="xmlns"&&f;else f=o,u=null,l=o==="xmlns"&&"";s.localName=f,l!==!1&&(a==null&&(a={},zc(r,r={})),r[l]=a[l]=c,s.uri=_a.XMLNS,e.startPrefixMapping(l,c))}for(var h=t.length;h--;){s=t[h];var u=s.prefix;u&&(u==="xml"&&(s.uri=_a.XML),u!=="xmlns"&&(s.uri=r[u||""]))}var d=n.indexOf(":");d>0?(u=t.prefix=n.slice(0,d),f=t.localName=n.slice(d+1)):(u=null,f=t.localName=n);var m=t.uri=r[u||""];if(e.startElement(m,f,n,t),t.closed){if(e.endElement(m,f,n),a)for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&e.endPrefixMapping(u)}else return t.currentNSMap=r,t.localNSMap=a,!0}function Mg(t,e,r,n,a){if(/^(?:script|textarea)$/i.test(r)){var s=t.indexOf("</"+r+">",e),o=t.substring(e+1,s);if(/[&<]/.test(o))return/^script$/i.test(r)?(a.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,n),a.characters(o,0,o.length),s)}return e+1}function Ig(t,e,r,n){var a=n[r];return a==null&&(a=t.lastIndexOf("</"+r+">"),a<e&&(a=t.lastIndexOf("</"+r)),n[r]=a),a<e}function zc(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function Fg(t,e,r,n){var a=t.charAt(e+2);switch(a){case"-":if(t.charAt(e+3)==="-"){var s=t.indexOf("-->",e+4);return s>e?(r.comment(t,e+4,s-e-4),s+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(t.substr(e+3,6)=="CDATA["){var s=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,s-e-9),r.endCDATA(),s+3}var o=Vg(t,e),c=o.length;if(c>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],f=!1,l=!1;c>3&&(/^public$/i.test(o[2][0])?(f=o[3][0],l=c>4&&o[4][0]):/^system$/i.test(o[2][0])&&(l=o[3][0]));var h=o[c-1];return r.startDTD(u,f,l),r.endDTD(),h.index+h[0].length}}return-1}function Bg(t,e,r){var n=t.indexOf("?>",e);if(n){var a=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,r.processingInstruction(a[1],a[2]),n+2):-1}return-1}function Hc(){this.attributeNames={}}Hc.prototype={setTagName:function(t){if(!Vc.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!Vc.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};function Vg(t,e){var r,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=e,a.exec(t);r=a.exec(t);)if(n.push(r),r[1])return n}qo.XMLReader=qc,qo.ParseError=Vn;var qg=or,Ug=ir,Wc=Fc,Gc=qo,Rg=Ug.DOMImplementation,Jc=qg.NAMESPACE,zg=Gc.ParseError,Hg=Gc.XMLReader;function Yc(t){return t.replace(/\r[\n\u0085]/g,`
|
|
134
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
135
|
+
`)}function Zc(t){this.options=t||{locator:{}}}Zc.prototype.parseFromString=function(t,e){var r=this.options,n=new Hg,a=r.domBuilder||new ka,s=r.errorHandler,o=r.locator,c=r.xmlns||{},u=/\/x?html?$/.test(e),f=u?Wc.HTML_ENTITIES:Wc.XML_ENTITIES;o&&a.setDocumentLocator(o),n.errorHandler=Wg(s,a,o),n.domBuilder=r.domBuilder||a,u&&(c[""]=Jc.HTML),c.xml=c.xml||Jc.XML;var l=r.normalizeLineEndings||Yc;return t&&typeof t=="string"?n.parse(l(t),c,f):n.errorHandler.error("invalid doc source"),a.doc};function Wg(t,e,r){if(!t){if(e instanceof ka)return e;t=e}var n={},a=t instanceof Function;r=r||{};function s(o){var c=t[o];!c&&a&&(c=t.length==2?function(u){t(o,u)}:t),n[o]=c&&function(u){c("[xmldom "+o+"] "+u+Ro(r))}||function(){}}return s("warning"),s("error"),s("fatalError"),n}function ka(){this.cdata=!1}function qn(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}ka.prototype={startDocument:function(){this.doc=new Rg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,n){var a=this.doc,s=a.createElementNS(t,r||e),o=n.length;ri(this,s),this.currentElement=s,this.locator&&qn(this.locator,s);for(var c=0;c<o;c++){var t=n.getURI(c),u=n.getValue(c),r=n.getQName(c),f=a.createAttributeNS(t,r);this.locator&&qn(n.getLocator(c),f),f.value=f.nodeValue=u,s.setAttributeNode(f)}},endElement:function(t,e,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&qn(this.locator,r),ri(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=Xc.apply(this,arguments),t){if(this.cdata)var n=this.doc.createCDATASection(t);else var n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&qn(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,r){t=Xc.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&qn(this.locator,n),ri(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var a=n.createDocumentType(t,e,r);this.locator&&qn(this.locator,a),ri(this,a),this.doc.doctype=a}},warning:function(t){console.warn("[xmldom warning] "+t,Ro(this.locator))},error:function(t){console.error("[xmldom error] "+t,Ro(this.locator))},fatalError:function(t){throw new zg(t,this.locator)}};function Ro(t){if(t)return`
|
|
136
|
+
@`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function Xc(t,e,r){return typeof t=="string"?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){ka.prototype[t]=function(){return null}});function ri(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}ei.__DOMHandler=ka,ei.normalizeLineEndings=Yc,ei.DOMParser=Zc;var Kc=ir;Gs.DOMImplementation=Kc.DOMImplementation,Gs.XMLSerializer=Kc.XMLSerializer,Gs.DOMParser=ei.DOMParser;var Nt={},Mt={},ni={},Un={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const Gg=Ar;class Jg extends Gg.default{constructor(e,r){super(e,r)}}Rn.UniverseLogError=Jg,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Rn;(function(r){r.error="error",r.warn="warn",r.info="info",r.http="http",r.verbose="verbose",r.debug="debug",r.silly="silly"})(t.LogLevel||(t.LogLevel={})),function(r){r.LEVELS_VALUES={[r.error]:0,[r.warn]:1,[r.info]:2,[r.http]:3,[r.verbose]:4,[r.debug]:5,[r.silly]:6},r.LEVELS_BY_NAME={[r.error]:r.error,[r.warn]:r.warn,[r.info]:r.info,[r.http]:r.http,[r.verbose]:r.verbose,[r.debug]:r.debug,[r.silly]:r.silly},r.DEFAULT_LEVEL=r.info;function n(u){if(typeof r.LEVELS_BY_NAME[u]>"u"){const f=Object.keys(r.LEVELS_BY_NAME).join(", ");throw new e.UniverseLogError(`There is no such log level: '${u}'. Available levels: [ ${f} ]`)}return r.LEVELS_BY_NAME[u]}r.valueOf=n;function a(u){if(typeof r.LEVELS_VALUES[u]>"u"){const f=Object.keys(r.LEVELS_BY_NAME).join(", ");throw new e.UniverseLogError(`There is no such log level: '${u}'. Available levels: [ ${f} ]`)}return r.LEVELS_VALUES[u]}r.levelToValue=a;function s(u){return a(u.level)<=a(u.threshold)}r.isLessOrEquallyVerbose=s;function o(u,f){return r.LEVELS_VALUES[u]>r.LEVELS_VALUES[f]?u:f}r.moreVerbose=o;function c(u,f){return r.LEVELS_VALUES[u]<r.LEVELS_VALUES[f]?u:f}r.lessVerbose=c}(t.LogLevel||(t.LogLevel={}))}(Un);var ai={},zo={},Qc={exports:{}};(function(t){t.exports=function(r){var n={};function a(s){if(n[s])return n[s].exports;var o=n[s]={i:s,l:!1,exports:{}};return r[s].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=r,a.c=n,a.d=function(s,o,c){a.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:c})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,o){if(1&o&&(s=a(s)),8&o||4&o&&typeof s=="object"&&s&&s.__esModule)return s;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:s}),2&o&&typeof s!="string")for(var u in s)a.d(c,u,(function(f){return s[f]}).bind(null,u));return c},a.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(o,"a",o),o},a.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},a.p="",a(a.s=4)}([function(r,n,a){var s=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=a(8),u=a(2),f=a(16);n.validatorSymbol=Symbol("validators"),n.Predicate=class{constructor(l,h={}){this.type=l,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const d=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(m,b)=>`Expected ${b&&b.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${o.default(m)}\``,validator:m=>o.default[d](m)})}[u.testSymbol](l,h,d){for(const{validator:m,message:b}of this.context.validators){if(this.options.optional===!0&&l===void 0)continue;const x=m(l);if(x===!0)continue;let y=d;throw typeof d=="function"&&(y=d()),y=y?`${this.type} \`${y}\``:this.type,new c.ArgumentError(b(l,y,x),h)}}get[n.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(l){return this.addValidator({message:(h,d,m)=>typeof m=="string"?`(${d}) ${m}`:m(d),validator:h=>{const{message:d,validator:m}=l(h);return!!m||d}})}is(l){return this.addValidator({message:(h,d,m)=>m?`(${d}) ${m}`:`Expected ${d} \`${h}\` to pass custom validation function`,validator:l})}addValidator(l){return this.context.validators.push(l),this}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=typeof URL>"u"?a(15).URL:URL,{toString:o}=Object.prototype,c=g=>E=>typeof E===g,u=g=>{const E=o.call(g).slice(8,-1);if(E)return E},f=g=>E=>u(E)===g;function l(g){switch(g){case null:return"null";case!0:case!1:return"boolean"}switch(typeof g){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(l.function_(g))return"Function";if(l.observable(g))return"Observable";if(l.array(g))return"Array";if(l.buffer(g))return"Buffer";const E=u(g);if(E)return E;if(g instanceof String||g instanceof Boolean||g instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}const h=g=>typeof g=="object";l.undefined=c("undefined"),l.string=c("string"),l.number=c("number"),l.bigint=c("bigint"),l.function_=c("function"),l.null_=g=>g===null,l.class_=g=>l.function_(g)&&g.toString().startsWith("class "),l.boolean=g=>g===!0||g===!1,l.symbol=c("symbol"),l.numericString=g=>l.string(g)&&g.length>0&&!Number.isNaN(Number(g)),l.array=Array.isArray,l.buffer=g=>!l.nullOrUndefined(g)&&!l.nullOrUndefined(g.constructor)&&l.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g),l.nullOrUndefined=g=>l.null_(g)||l.undefined(g),l.object=g=>!l.nullOrUndefined(g)&&(l.function_(g)||h(g)),l.iterable=g=>!l.nullOrUndefined(g)&&l.function_(g[Symbol.iterator]),l.asyncIterable=g=>!l.nullOrUndefined(g)&&l.function_(g[Symbol.asyncIterator]),l.generator=g=>l.iterable(g)&&l.function_(g.next)&&l.function_(g.throw),l.nativePromise=g=>f("Promise")(g),l.promise=g=>l.nativePromise(g)||(E=>!l.null_(E)&&h(E)&&l.function_(E.then)&&l.function_(E.catch))(g),l.generatorFunction=f("GeneratorFunction"),l.asyncFunction=f("AsyncFunction"),l.boundFunction=g=>l.function_(g)&&!g.hasOwnProperty("prototype"),l.regExp=f("RegExp"),l.date=f("Date"),l.error=f("Error"),l.map=g=>f("Map")(g),l.set=g=>f("Set")(g),l.weakMap=g=>f("WeakMap")(g),l.weakSet=g=>f("WeakSet")(g),l.int8Array=f("Int8Array"),l.uint8Array=f("Uint8Array"),l.uint8ClampedArray=f("Uint8ClampedArray"),l.int16Array=f("Int16Array"),l.uint16Array=f("Uint16Array"),l.int32Array=f("Int32Array"),l.uint32Array=f("Uint32Array"),l.float32Array=f("Float32Array"),l.float64Array=f("Float64Array"),l.bigint64Array=f("BigInt64Array"),l.biguint64Array=f("BigUint64Array"),l.arrayBuffer=f("ArrayBuffer"),l.sharedArrayBuffer=f("SharedArrayBuffer"),l.dataView=f("DataView"),l.directInstanceOf=(g,E)=>Object.getPrototypeOf(g)===E.prototype,l.urlInstance=g=>f("URL")(g),l.urlString=g=>{if(!l.string(g))return!1;try{return new s(g),!0}catch{return!1}},l.truthy=g=>!!g,l.falsy=g=>!g,l.nan=g=>Number.isNaN(g);const d=new Set(["undefined","string","number","bigint","boolean","symbol"]);l.primitive=g=>l.null_(g)||d.has(typeof g),l.integer=g=>Number.isInteger(g),l.safeInteger=g=>Number.isSafeInteger(g),l.plainObject=g=>{if(u(g)!=="Object")return!1;const E=Object.getPrototypeOf(g);return E===null||E===Object.getPrototypeOf({})};const m=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);l.typedArray=g=>{const E=u(g);return E!==void 0&&m.has(E)},l.arrayLike=g=>!l.nullOrUndefined(g)&&!l.function_(g)&&(E=>l.safeInteger(E)&&E>=0)(g.length),l.inRange=(g,E)=>{if(l.number(E))return g>=Math.min(0,E)&&g<=Math.max(E,0);if(l.array(E)&&E.length===2)return g>=Math.min(...E)&&g<=Math.max(...E);throw new TypeError(`Invalid range: ${JSON.stringify(E)}`)};const b=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=g=>l.object(g)&&g.nodeType===1&&l.string(g.nodeName)&&!l.plainObject(g)&&b.every(E=>E in g),l.observable=g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]())),l.nodeStream=g=>!l.nullOrUndefined(g)&&h(g)&&l.function_(g.pipe)&&!l.observable(g),l.infinite=g=>g===1/0||g===-1/0;const x=g=>E=>l.integer(E)&&Math.abs(E%2)===g;l.evenInteger=x(0),l.oddInteger=x(1),l.emptyArray=g=>l.array(g)&&g.length===0,l.nonEmptyArray=g=>l.array(g)&&g.length>0,l.emptyString=g=>l.string(g)&&g.length===0,l.nonEmptyString=g=>l.string(g)&&g.length>0,l.emptyStringOrWhitespace=g=>l.emptyString(g)||(E=>l.string(E)&&/\S/.test(E)===!1)(g),l.emptyObject=g=>l.object(g)&&!l.map(g)&&!l.set(g)&&Object.keys(g).length===0,l.nonEmptyObject=g=>l.object(g)&&!l.map(g)&&!l.set(g)&&Object.keys(g).length>0,l.emptySet=g=>l.set(g)&&g.size===0,l.nonEmptySet=g=>l.set(g)&&g.size>0,l.emptyMap=g=>l.map(g)&&g.size===0,l.nonEmptyMap=g=>l.map(g)&&g.size>0;const y=(g,E,D)=>{if(l.function_(E)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(E)}`);if(D.length===0)throw new TypeError("Invalid number of values");return g.call(D,E)};l.any=(g,...E)=>y(Array.prototype.some,g,E),l.all=(g,...E)=>y(Array.prototype.every,g,E),Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),r.exports=l,n.default=l},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.testSymbol=Symbol("test"),n.isPredicate=s=>!!(s&&s[n.testSymbol])},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=(s,o,c=5)=>{const u=[];for(const f of o)if(!s.has(f)&&(u.push(f),u.length===c))return u;return u.length===0||u}},function(r,n,a){var s=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(10)),c=a(11),u=a(0);n.Predicate=u.Predicate;const f=a(2),l=s(a(17)),h=s(a(6)),d=s(a(9)),m=(x,y,g)=>{if(!f.isPredicate(y)&&typeof y!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof y}\``);if(f.isPredicate(y)){const E=o.default();d.default(x,()=>c.inferLabel(E),y)}else d.default(x,y,g)};Object.defineProperties(m,{isValid:{value:(x,y)=>{try{return m(x,y),!0}catch{return!1}}},create:{value:(x,y)=>g=>{if(f.isPredicate(x)){const E=o.default();d.default(g,()=>c.inferLabel(E),x)}else d.default(g,x,y)}}}),n.default=h.default(l.default(m));var b=a(6);n.StringPredicate=b.StringPredicate,n.NumberPredicate=b.NumberPredicate,n.BooleanPredicate=b.BooleanPredicate,n.ArrayPredicate=b.ArrayPredicate,n.ObjectPredicate=b.ObjectPredicate,n.DatePredicate=b.DatePredicate,n.ErrorPredicate=b.ErrorPredicate,n.MapPredicate=b.MapPredicate,n.WeakMapPredicate=b.WeakMapPredicate,n.SetPredicate=b.SetPredicate,n.WeakSetPredicate=b.WeakSetPredicate,n.AnyPredicate=b.AnyPredicate},function(r,n,a){(function(s){var o=200,c="__lodash_hash_undefined__",u=1,f=2,l=9007199254740991,h="[object Arguments]",d="[object Array]",m="[object AsyncFunction]",b="[object Boolean]",x="[object Date]",y="[object Error]",g="[object Function]",E="[object GeneratorFunction]",D="[object Map]",w="[object Number]",j="[object Null]",p="[object Object]",A="[object Proxy]",k="[object RegExp]",U="[object Set]",H="[object String]",S="[object Symbol]",P="[object Undefined]",I="[object ArrayBuffer]",W="[object DataView]",_=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[h]=O[d]=O[I]=O[b]=O[W]=O[x]=O[y]=O[g]=O[D]=O[w]=O[p]=O[k]=O[U]=O[H]=O["[object WeakMap]"]=!1;var G=typeof J=="object"&&J&&J.Object===Object&&J,B=typeof self=="object"&&self&&self.Object===Object&&self,K=G||B||Function("return this")(),X=n&&!n.nodeType&&n,se=X&&typeof s=="object"&&s&&!s.nodeType&&s,je=se&&se.exports===X,L=je&&G.process,V=function(){try{return L&&L.binding&&L.binding("util")}catch{}}(),re=V&&V.isTypedArray;function ie(C,F){for(var Y=-1,Q=C==null?0:C.length;++Y<Q;)if(F(C[Y],Y,C))return!0;return!1}function ne(C){var F=-1,Y=Array(C.size);return C.forEach(function(Q,Ae){Y[++F]=[Ae,Q]}),Y}function Ne(C){var F=-1,Y=Array(C.size);return C.forEach(function(Q){Y[++F]=Q}),Y}var Fe,At,kt,yr=Array.prototype,vr=Function.prototype,_e=Object.prototype,ze=K["__core-js_shared__"],Qe=vr.toString,Re=_e.hasOwnProperty,jt=(Fe=/[^.]+$/.exec(ze&&ze.keys&&ze.keys.IE_PROTO||""))?"Symbol(src)_1."+Fe:"",wr=_e.toString,ts=RegExp("^"+Qe.call(Re).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Cr=je?K.Buffer:void 0,Or=K.Symbol,ta=K.Uint8Array,un=_e.propertyIsEnumerable,ra=yr.splice,lt=Or?Or.toStringTag:void 0,$r=Object.getOwnPropertySymbols,ln=Cr?Cr.isBuffer:void 0,ct=(At=Object.keys,kt=Object,function(C){return At(kt(C))}),Pr=Z(K,"DataView"),Kt=Z(K,"Map"),cn=Z(K,"Promise"),Lr=Z(K,"Set"),Qt=Z(K,"WeakMap"),er=Z(Object,"create"),na=ue(Pr),dn=ue(Kt),St=ue(cn),Vt=ue(Lr),fn=ue(Qt),Mr=Or?Or.prototype:void 0,tr=Mr?Mr.valueOf:void 0;function dt(C){var F=-1,Y=C==null?0:C.length;for(this.clear();++F<Y;){var Q=C[F];this.set(Q[0],Q[1])}}function at(C){var F=-1,Y=C==null?0:C.length;for(this.clear();++F<Y;){var Q=C[F];this.set(Q[0],Q[1])}}function wt(C){var F=-1,Y=C==null?0:C.length;for(this.clear();++F<Y;){var Q=C[F];this.set(Q[0],Q[1])}}function qt(C){var F=-1,Y=C==null?0:C.length;for(this.__data__=new wt;++F<Y;)this.add(C[F])}function et(C){var F=this.__data__=new at(C);this.size=F.size}function rs(C,F){var Y=Ee(C),Q=!Y&&He(C),Ae=!Y&&!Q&&ke(C),pe=!Y&&!Q&&!Ae&&Fr(C),De=Y||Q||Ae||pe,Pe=De?function(Te,Ct){for(var ft=-1,Ze=Array(Te);++ft<Te;)Ze[ft]=Ct(ft);return Ze}(C.length,String):[],_t=Pe.length;for(var Be in C)!Re.call(C,Be)||De&&(Be=="length"||Ae&&(Be=="offset"||Be=="parent")||pe&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||he(Be,_t))||Pe.push(Be);return Pe}function Ir(C,F){for(var Y=C.length;Y--;)if(de(C[Y][0],F))return Y;return-1}function rr(C){return C==null?C===void 0?P:j:lt&< in Object(C)?function(F){var Y=Re.call(F,lt),Q=F[lt];try{F[lt]=void 0;var Ae=!0}catch{}var pe=wr.call(F);return Ae&&(Y?F[lt]=Q:delete F[lt]),pe}(C):function(F){return wr.call(F)}(C)}function hn(C){return $e(C)&&rr(C)==h}function aa(C,F,Y,Q,Ae){return C===F||(C==null||F==null||!$e(C)&&!$e(F)?C!=C&&F!=F:function(pe,De,Pe,_t,Be,Te){var Ct=Ee(pe),ft=Ee(De),Ze=Ct?d:ce(pe),Ot=ft?d:ce(De),Br=(Ze=Ze==h?p:Ze)==p,ia=(Ot=Ot==h?p:Ot)==p,Vr=Ze==Ot;if(Vr&&ke(pe)){if(!ke(De))return!1;Ct=!0,Br=!1}if(Vr&&!Br)return Te||(Te=new et),Ct||Fr(pe)?Dt(pe,De,Pe,_t,Be,Te):function(xe,be,Rt,nr,ss,Ve,zt){switch(Rt){case W:if(xe.byteLength!=be.byteLength||xe.byteOffset!=be.byteOffset)return!1;xe=xe.buffer,be=be.buffer;case I:return!(xe.byteLength!=be.byteLength||!Ve(new ta(xe),new ta(be)));case b:case x:case w:return de(+xe,+be);case y:return xe.name==be.name&&xe.message==be.message;case k:case H:return xe==be+"";case D:var ar=ne;case U:var gn=nr&u;if(ar||(ar=Ne),xe.size!=be.size&&!gn)return!1;var oa=zt.get(xe);if(oa)return oa==be;nr|=f,zt.set(xe,be);var qr=Dt(ar(xe),ar(be),nr,ss,Ve,zt);return zt.delete(xe),qr;case S:if(tr)return tr.call(xe)==tr.call(be)}return!1}(pe,De,Ze,Pe,_t,Be,Te);if(!(Pe&u)){var mn=Br&&Re.call(pe,"__wrapped__"),as=ia&&Re.call(De,"__wrapped__");if(mn||as){var al=mn?pe.value():pe,sl=as?De.value():De;return Te||(Te=new et),Be(al,sl,Pe,_t,Te)}}return Vr?(Te||(Te=new et),function(xe,be,Rt,nr,ss,Ve){var zt=Rt&u,ar=N(xe),gn=ar.length,oa=N(be).length;if(gn!=oa&&!zt)return!1;for(var qr=gn;qr--;){var st=ar[qr];if(!(zt?st in be:Re.call(be,st)))return!1}var is=Ve.get(xe);if(is&&Ve.get(be))return is==be;var ua=!0;Ve.set(xe,be),Ve.set(be,xe);for(var Ur=zt;++qr<gn;){st=ar[qr];var la=xe[st],Rr=be[st];if(nr)var io=zt?nr(Rr,la,st,be,xe,Ve):nr(la,Rr,st,xe,be,Ve);if(!(io===void 0?la===Rr||ss(la,Rr,Rt,nr,Ve):io)){ua=!1;break}Ur||(Ur=st=="constructor")}if(ua&&!Ur){var bn=xe.constructor,xn=be.constructor;bn!=xn&&"constructor"in xe&&"constructor"in be&&!(typeof bn=="function"&&bn instanceof bn&&typeof xn=="function"&&xn instanceof xn)&&(ua=!1)}return Ve.delete(xe),Ve.delete(be),ua}(pe,De,Pe,_t,Be,Te)):!1}(C,F,Y,Q,aa,Ae))}function sa(C){return!(!Tt(C)||(F=C,jt&&jt in F))&&(Ce(C)?ts:_).test(ue(C));var F}function pn(C){if(Y=(F=C)&&F.constructor,Q=typeof Y=="function"&&Y.prototype||_e,F!==Q)return ct(C);var F,Y,Q,Ae=[];for(var pe in Object(C))Re.call(C,pe)&&pe!="constructor"&&Ae.push(pe);return Ae}function Dt(C,F,Y,Q,Ae,pe){var De=Y&u,Pe=C.length,_t=F.length;if(Pe!=_t&&!(De&&_t>Pe))return!1;var Be=pe.get(C);if(Be&&pe.get(F))return Be==F;var Te=-1,Ct=!0,ft=Y&f?new qt:void 0;for(pe.set(C,F),pe.set(F,C);++Te<Pe;){var Ze=C[Te],Ot=F[Te];if(Q)var Br=De?Q(Ot,Ze,Te,F,C,pe):Q(Ze,Ot,Te,C,F,pe);if(Br!==void 0){if(Br)continue;Ct=!1;break}if(ft){if(!ie(F,function(ia,Vr){if(mn=Vr,!ft.has(mn)&&(Ze===ia||Ae(Ze,ia,Y,Q,pe)))return ft.push(Vr);var mn})){Ct=!1;break}}else if(Ze!==Ot&&!Ae(Ze,Ot,Y,Q,pe)){Ct=!1;break}}return pe.delete(C),pe.delete(F),Ct}function N(C){return function(F,Y,Q){var Ae=Y(F);return Ee(F)?Ae:function(pe,De){for(var Pe=-1,_t=De.length,Be=pe.length;++Pe<_t;)pe[Be+Pe]=De[Pe];return pe}(Ae,Q(F))}(C,ns,oe)}function z(C,F){var Y,Q,Ae=C.__data__;return((Q=typeof(Y=F))=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?Y!=="__proto__":Y===null)?Ae[typeof F=="string"?"string":"hash"]:Ae.map}function Z(C,F){var Y=function(Q,Ae){return Q==null?void 0:Q[Ae]}(C,F);return sa(Y)?Y:void 0}dt.prototype.clear=function(){this.__data__=er?er(null):{},this.size=0},dt.prototype.delete=function(C){var F=this.has(C)&&delete this.__data__[C];return this.size-=F?1:0,F},dt.prototype.get=function(C){var F=this.__data__;if(er){var Y=F[C];return Y===c?void 0:Y}return Re.call(F,C)?F[C]:void 0},dt.prototype.has=function(C){var F=this.__data__;return er?F[C]!==void 0:Re.call(F,C)},dt.prototype.set=function(C,F){var Y=this.__data__;return this.size+=this.has(C)?0:1,Y[C]=er&&F===void 0?c:F,this},at.prototype.clear=function(){this.__data__=[],this.size=0},at.prototype.delete=function(C){var F=this.__data__,Y=Ir(F,C);return!(Y<0||(Y==F.length-1?F.pop():ra.call(F,Y,1),--this.size,0))},at.prototype.get=function(C){var F=this.__data__,Y=Ir(F,C);return Y<0?void 0:F[Y][1]},at.prototype.has=function(C){return Ir(this.__data__,C)>-1},at.prototype.set=function(C,F){var Y=this.__data__,Q=Ir(Y,C);return Q<0?(++this.size,Y.push([C,F])):Y[Q][1]=F,this},wt.prototype.clear=function(){this.size=0,this.__data__={hash:new dt,map:new(Kt||at),string:new dt}},wt.prototype.delete=function(C){var F=z(this,C).delete(C);return this.size-=F?1:0,F},wt.prototype.get=function(C){return z(this,C).get(C)},wt.prototype.has=function(C){return z(this,C).has(C)},wt.prototype.set=function(C,F){var Y=z(this,C),Q=Y.size;return Y.set(C,F),this.size+=Y.size==Q?0:1,this},qt.prototype.add=qt.prototype.push=function(C){return this.__data__.set(C,c),this},qt.prototype.has=function(C){return this.__data__.has(C)},et.prototype.clear=function(){this.__data__=new at,this.size=0},et.prototype.delete=function(C){var F=this.__data__,Y=F.delete(C);return this.size=F.size,Y},et.prototype.get=function(C){return this.__data__.get(C)},et.prototype.has=function(C){return this.__data__.has(C)},et.prototype.set=function(C,F){var Y=this.__data__;if(Y instanceof at){var Q=Y.__data__;if(!Kt||Q.length<o-1)return Q.push([C,F]),this.size=++Y.size,this;Y=this.__data__=new wt(Q)}return Y.set(C,F),this.size=Y.size,this};var oe=$r?function(C){return C==null?[]:(C=Object(C),function(F,Y){for(var Q=-1,Ae=F==null?0:F.length,pe=0,De=[];++Q<Ae;){var Pe=F[Q];Y(Pe,Q,F)&&(De[pe++]=Pe)}return De}($r(C),function(F){return un.call(C,F)}))}:function(){return[]},ce=rr;function he(C,F){return!!(F=F??l)&&(typeof C=="number"||M.test(C))&&C>-1&&C%1==0&&C<F}function ue(C){if(C!=null){try{return Qe.call(C)}catch{}try{return C+""}catch{}}return""}function de(C,F){return C===F||C!=C&&F!=F}(Pr&&ce(new Pr(new ArrayBuffer(1)))!=W||Kt&&ce(new Kt)!=D||cn&&ce(cn.resolve())!="[object Promise]"||Lr&&ce(new Lr)!=U||Qt&&ce(new Qt)!="[object WeakMap]")&&(ce=function(C){var F=rr(C),Y=F==p?C.constructor:void 0,Q=Y?ue(Y):"";if(Q)switch(Q){case na:return W;case dn:return D;case St:return"[object Promise]";case Vt:return U;case fn:return"[object WeakMap]"}return F});var He=hn(function(){return arguments}())?hn:function(C){return $e(C)&&Re.call(C,"callee")&&!un.call(C,"callee")},Ee=Array.isArray,ke=ln||function(){return!1};function Ce(C){if(!Tt(C))return!1;var F=rr(C);return F==g||F==E||F==m||F==A}function Ut(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=l}function Tt(C){var F=typeof C;return C!=null&&(F=="object"||F=="function")}function $e(C){return C!=null&&typeof C=="object"}var Fr=re?function(C){return function(F){return C(F)}}(re):function(C){return $e(C)&&Ut(C.length)&&!!O[rr(C)]};function ns(C){return(F=C)!=null&&Ut(F.length)&&!Ce(F)?rs(C):pn(C);var F}s.exports=function(C,F){return aa(C,F)}}).call(this,a(23)(r))},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(18);n.StringPredicate=s.StringPredicate;const o=a(20);n.NumberPredicate=o.NumberPredicate;const c=a(21);n.BooleanPredicate=c.BooleanPredicate;const u=a(0),f=a(22);n.ArrayPredicate=f.ArrayPredicate;const l=a(24);n.ObjectPredicate=l.ObjectPredicate;const h=a(29);n.DatePredicate=h.DatePredicate;const d=a(30);n.ErrorPredicate=d.ErrorPredicate;const m=a(31);n.MapPredicate=m.MapPredicate;const b=a(32);n.WeakMapPredicate=b.WeakMapPredicate;const x=a(33);n.SetPredicate=x.SetPredicate;const y=a(34);n.WeakSetPredicate=y.WeakSetPredicate;const g=a(35);n.AnyPredicate=g.AnyPredicate,n.default=(E,D)=>(Object.defineProperties(E,{string:{get:()=>new s.StringPredicate(D)},number:{get:()=>new o.NumberPredicate(D)},boolean:{get:()=>new c.BooleanPredicate(D)},undefined:{get:()=>new u.Predicate("undefined",D)},null:{get:()=>new u.Predicate("null",D)},nullOrUndefined:{get:()=>new u.Predicate("nullOrUndefined",D)},nan:{get:()=>new u.Predicate("nan",D)},symbol:{get:()=>new u.Predicate("symbol",D)},array:{get:()=>new f.ArrayPredicate(D)},object:{get:()=>new l.ObjectPredicate(D)},date:{get:()=>new h.DatePredicate(D)},error:{get:()=>new d.ErrorPredicate(D)},map:{get:()=>new m.MapPredicate(D)},weakMap:{get:()=>new b.WeakMapPredicate(D)},set:{get:()=>new x.SetPredicate(D)},weakSet:{get:()=>new y.WeakSetPredicate(D)},function:{get:()=>new u.Predicate("Function",D)},buffer:{get:()=>new u.Predicate("Buffer",D)},regExp:{get:()=>new u.Predicate("RegExp",D)},promise:{get:()=>new u.Predicate("Promise",D)},typedArray:{get:()=>new u.Predicate("TypedArray",D)},int8Array:{get:()=>new u.Predicate("Int8Array",D)},uint8Array:{get:()=>new u.Predicate("Uint8Array",D)},uint8ClampedArray:{get:()=>new u.Predicate("Uint8ClampedArray",D)},int16Array:{get:()=>new u.Predicate("Int16Array",D)},uint16Array:{get:()=>new u.Predicate("Uint16Array",D)},int32Array:{get:()=>new u.Predicate("Int32Array",D)},uint32Array:{get:()=>new u.Predicate("Uint32Array",D)},float32Array:{get:()=>new u.Predicate("Float32Array",D)},float64Array:{get:()=>new u.Predicate("Float64Array",D)},arrayBuffer:{get:()=>new u.Predicate("ArrayBuffer",D)},dataView:{get:()=>new u.Predicate("DataView",D)},iterable:{get:()=>new u.Predicate("Iterable",D)},any:{value:(...w)=>new g.AnyPredicate(w,D)}}),E)},function(r,n,a){var s=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(4));n.default=(c,u)=>{try{for(const f of c)o.default(f,u);return!0}catch(f){return f.message}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.ArgumentError=class extends Error{constructor(s,o){super(s),"captureStackTrace"in Error&&Error.captureStackTrace(this,o),this.name="ArgumentError"}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(2);n.default=function o(c,u,f){f[s.testSymbol](c,o,u)}},function(r,n,a){const s=()=>{const o=Error.prepareStackTrace;Error.prepareStackTrace=(u,f)=>f;const c=new Error().stack.slice(1);return Error.prepareStackTrace=o,c};r.exports=s,r.exports.default=s},function(r,n,a){var s=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m in h)Object.hasOwnProperty.call(h,m)&&(d[m]=h[m]);return d.default=h,d},o=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(n,"__esModule",{value:!0});const c=s(a(12)),u=o(a(13)),f=o(a(14)),l=/^.*?\((.*?)[,)]/;n.inferLabel=h=>{if(!f.default)return;const d=h[1],m=d.getFileName(),b=d.getLineNumber(),x=d.getColumnNumber();if(!m||b===null||x===null)return;let y=[];try{y=c.readFileSync(m,"utf8").split(`
|
|
137
|
+
`)}catch{return}let g=y[b-1];if(!g)return;g=g.slice(x-1);const E=l.exec(g);if(!E||!E[1])return;const D=E[1];return u.default(D)||u.default(D.split(".").pop())?D:void 0}},function(r,n){r.exports=ht},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=/^[a-z$_][a-z$_0-9]*$/i,o=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);n.default=c=>c&&!o.has(c)&&s.test(c)},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(r,n){r.exports=ht},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(0);n.not=o=>{const c=o.addValidator;return o.addValidator=u=>{const f=u.validator,l=u.message;return u.message=(h,d)=>`[NOT] ${l(h,d)}`,u.validator=h=>!f(h),o[s.validatorSymbol].push(u),o.addValidator=c,o},o}},function(r,n,a){var s=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(6));n.default=c=>(Object.defineProperties(c,{optional:{get:()=>o.default({},{optional:!0})}}),c)},function(r,n,a){var s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=s(a(19)),u=a(0);n.StringPredicate=class extends u.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have length \`${f}\`, got \`${l}\``,validator:l=>l.length===f})}minLength(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${l}\``,validator:l=>l.length>=f})}maxLength(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${l}\``,validator:l=>l.length<=f})}matches(f){return this.addValidator({message:(l,h)=>`Expected ${h} to match \`${f}\`, got \`${l}\``,validator:l=>f.test(l)})}startsWith(f){return this.addValidator({message:(l,h)=>`Expected ${h} to start with \`${f}\`, got \`${l}\``,validator:l=>l.startsWith(f)})}endsWith(f){return this.addValidator({message:(l,h)=>`Expected ${h} to end with \`${f}\`, got \`${l}\``,validator:l=>l.endsWith(f)})}includes(f){return this.addValidator({message:(l,h)=>`Expected ${h} to include \`${f}\`, got \`${l}\``,validator:l=>l.includes(f)})}oneOf(f){return this.addValidator({message:(l,h)=>{let d=JSON.stringify(f);if(f.length>10){const m=f.length-10;d=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${m} more]`)}return`Expected ${h} to be one of \`${d}\`, got \`${l}\``},validator:l=>f.includes(l)})}get empty(){return this.addValidator({message:(f,l)=>`Expected ${l} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,l)=>`Expected ${l} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(l,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${l}\``,validator:l=>l===f})}get alphanumeric(){return this.addValidator({message:(f,l)=>`Expected ${l} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,l)=>`Expected ${l} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,l)=>`Expected ${l} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,l)=>`Expected ${l} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,l)=>`Expected ${l} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,l)=>`Expected ${l} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,l)=>`Expected ${l} to be a URL, got \`${f}\``,validator:o.default.urlString})}}},function(r,n,a){r.exports=function(s){return!isNaN(Date.parse(s))}},function(r,n,a){var s=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=a(0);n.NumberPredicate=class extends c.Predicate{constructor(u){super("number",u)}inRange(u,f){return this.addValidator({message:(l,h)=>`Expected ${h} to be in range [${u}..${f}], got ${l}`,validator:l=>o.default.inRange(l,[u,f])})}greaterThan(u){return this.addValidator({message:(f,l)=>`Expected ${l} to be greater than ${u}, got ${f}`,validator:f=>f>u})}greaterThanOrEqual(u){return this.addValidator({message:(f,l)=>`Expected ${l} to be greater than or equal to ${u}, got ${f}`,validator:f=>f>=u})}lessThan(u){return this.addValidator({message:(f,l)=>`Expected ${l} to be less than ${u}, got ${f}`,validator:f=>f<u})}lessThanOrEqual(u){return this.addValidator({message:(f,l)=>`Expected ${l} to be less than or equal to ${u}, got ${f}`,validator:f=>f<=u})}equal(u){return this.addValidator({message:(f,l)=>`Expected ${l} to be equal to ${u}, got ${f}`,validator:f=>f===u})}oneOf(u){return this.addValidator({message:(f,l)=>{let h=JSON.stringify(u);if(u.length>10){const d=u.length-10;h=JSON.stringify(u.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${l} to be one of \`${h}\`, got ${f}`},validator:f=>u.includes(f)})}get integer(){return this.addValidator({message:(u,f)=>`Expected ${f} to be an integer, got ${u}`,validator:u=>o.default.integer(u)})}get finite(){return this.addValidator({message:(u,f)=>`Expected ${f} to be finite, got ${u}`,validator:u=>!o.default.infinite(u)})}get infinite(){return this.addValidator({message:(u,f)=>`Expected ${f} to be infinite, got ${u}`,validator:u=>o.default.infinite(u)})}get positive(){return this.addValidator({message:(u,f)=>`Expected ${f} to be positive, got ${u}`,validator:u=>u>0})}get negative(){return this.addValidator({message:(u,f)=>`Expected ${f} to be negative, got ${u}`,validator:u=>u<0})}get integerOrInfinite(){return this.addValidator({message:(u,f)=>`Expected ${f} to be an integer or infinite, got ${u}`,validator:u=>o.default.integer(u)||o.default.infinite(u)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(0);n.BooleanPredicate=class extends s.Predicate{constructor(o){super("boolean",o)}get true(){return this.addValidator({message:(o,c)=>`Expected ${c} to be true, got ${o}`,validator:o=>o===!0})}get false(){return this.addValidator({message:(o,c)=>`Expected ${c} to be false, got ${o}`,validator:o=>o===!1})}}},function(r,n,a){var s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(5)),c=s(a(4)),u=a(0);n.ArrayPredicate=class extends u.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have length \`${f}\`, got \`${l.length}\``,validator:l=>l.length===f})}minLength(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${l.length}\``,validator:l=>l.length>=f})}maxLength(f){return this.addValidator({message:(l,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${l.length}\``,validator:l=>l.length<=f})}startsWith(f){return this.addValidator({message:(l,h)=>`Expected ${h} to start with \`${f}\`, got \`${l[0]}\``,validator:l=>l[0]===f})}endsWith(f){return this.addValidator({message:(l,h)=>`Expected ${h} to end with \`${f}\`, got \`${l[l.length-1]}\``,validator:l=>l[l.length-1]===f})}includes(...f){return this.addValidator({message:(l,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(l)}\``,validator:l=>f.every(h=>l.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(l,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(l)}\``,validator:l=>f.some(h=>l.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,l)=>`Expected ${l} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,l)=>`Expected ${l} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(l,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(l)}\``,validator:l=>o.default(l,f)})}ofType(f){let l;return this.addValidator({message:(h,d)=>`(${d}) ${l}`,validator:h=>{try{for(const d of h)c.default(d,f);return!0}catch(d){return l=d.message,!1}}})}}},function(r,n){r.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(r,n,a){var s=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=s(a(25)),u=s(a(5)),f=a(0),l=s(a(3)),h=s(a(7)),d=s(a(27)),m=a(28);n.ObjectPredicate=class extends f.Predicate{constructor(b){super("object",b)}get plain(){return this.addValidator({message:(b,x)=>`Expected ${x} to be a plain object`,validator:b=>o.default.plainObject(b)})}get empty(){return this.addValidator({message:(b,x)=>`Expected ${x} to be empty, got \`${JSON.stringify(b)}\``,validator:b=>Object.keys(b).length===0})}get nonEmpty(){return this.addValidator({message:(b,x)=>`Expected ${x} to not be empty`,validator:b=>Object.keys(b).length>0})}valuesOfType(b){return this.addValidator({message:(x,y,g)=>`(${y}) ${g}`,validator:x=>{const y=Object.keys(x).map(g=>x[g]);return h.default(y,b)}})}deepValuesOfType(b){return this.addValidator({message:(x,y,g)=>`(${y}) ${g}`,validator:x=>d.default(x,b)})}deepEqual(b){return this.addValidator({message:(x,y)=>`Expected ${y} to be deeply equal to \`${JSON.stringify(b)}\`, got \`${JSON.stringify(x)}\``,validator:x=>u.default(x,b)})}instanceOf(b){return this.addValidator({message:(x,y)=>{let g=x.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(x)),`Expected ${y} \`${g}\` to be of type \`${b.name}\``},validator:x=>x instanceof b})}hasKeys(...b){return this.addValidator({message:(x,y,g)=>`Expected ${y} to have keys \`${JSON.stringify(g)}\``,validator:x=>l.default({has:y=>c.default.has(x,y)},b)})}hasAnyKeys(...b){return this.addValidator({message:(x,y)=>`Expected ${y} to have any key of \`${JSON.stringify(b)}\``,validator:x=>b.some(y=>c.default.has(x,y))})}partialShape(b){return this.addValidator({message:(x,y,g)=>`${g.replace("Expected","Expected property")} in ${y}`,validator:x=>m.partial(x,b)})}exactShape(b){return this.addValidator({message:(x,y,g)=>`${g.replace("Expected","Expected property")} in ${y}`,validator:x=>m.exact(x,b)})}}},function(r,n,a){const s=a(26);function o(c){const u=c.split("."),f=[];for(let l=0;l<u.length;l++){let h=u[l];for(;h[h.length-1]==="\\"&&u[l+1]!==void 0;)h=h.slice(0,-1)+".",h+=u[++l];f.push(h)}return f}r.exports={get(c,u,f){if(!s(c)||typeof u!="string")return f===void 0?c:f;const l=o(u);for(let h=0;h<l.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,l[h]))return f;if((c=c[l[h]])==null){if(h!==l.length-1)return f;break}}return c},set(c,u,f){if(!s(c)||typeof u!="string")return c;const l=c,h=o(u);for(let d=0;d<h.length;d++){const m=h[d];s(c[m])||(c[m]={}),d===h.length-1&&(c[m]=f),c=c[m]}return l},delete(c,u){if(!s(c)||typeof u!="string")return;const f=o(u);for(let l=0;l<f.length;l++){const h=f[l];if(l===f.length-1)return void delete c[h];if(c=c[h],!s(c))return}},has(c,u){if(!s(c)||typeof u!="string")return!1;const f=o(u);for(let l=0;l<f.length;l++){if(!s(c)||!(f[l]in c))return!1;c=c[f[l]]}return!0}}},function(r,n,a){r.exports=function(s){var o=typeof s;return s!==null&&(o==="object"||o==="function")}},function(r,n,a){var s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=s(a(4)),u=(f,l)=>o.default.plainObject(f)?Object.keys(f).every(h=>u(f[h],l)):(c.default(f,l),!0);n.default=(f,l)=>{try{return u(f,l)}catch(h){return h.message}}},function(r,n,a){var s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(1)),c=s(a(9)),u=a(2);n.partial=function f(l,h,d){try{for(const m of Object.keys(h)){const b=d?`${d}.${m}`:m;if(u.isPredicate(h[m]))c.default(l[m],b,h[m]);else if(o.default.plainObject(h[m])){const x=f(l[m],h[m],b);if(x!==!0)return x}}return!0}catch(m){return m.message}},n.exact=function f(l,h,d){try{const m=new Set(Object.keys(l));for(const b of Object.keys(h)){m.delete(b);const x=d?`${d}.${b}`:b;if(u.isPredicate(h[b]))c.default(l[b],x,h[b]);else if(o.default.plainObject(h[b])){if(!Object.prototype.hasOwnProperty.call(l,b))return`Expected \`${x}\` to exist`;const y=f(l[b],h[b],x);if(y!==!0)return y}}if(m.size>0){const b=Array.from(m.keys())[0];return`Did not expect property \`${d?`${d}.${b}`:b}\` to exist, got \`${l[b]}\``}return!0}catch(m){return m.message}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(0);n.DatePredicate=class extends s.Predicate{constructor(o){super("date",o)}before(o){return this.addValidator({message:(c,u)=>`Expected ${u} ${c.toISOString()} to be before ${o.toISOString()}`,validator:c=>c.getTime()<o.getTime()})}after(o){return this.addValidator({message:(c,u)=>`Expected ${u} ${c.toISOString()} to be after ${o.toISOString()}`,validator:c=>c.getTime()>o.getTime()})}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(0);n.ErrorPredicate=class extends s.Predicate{constructor(o){super("error",o)}name(o){return this.addValidator({message:(c,u)=>`Expected ${u} to have name \`${o}\`, got \`${c.name}\``,validator:c=>c.name===o})}message(o){return this.addValidator({message:(c,u)=>`Expected ${u} message to be \`${o}\`, got \`${c.message}\``,validator:c=>c.message===o})}messageIncludes(o){return this.addValidator({message:(c,u)=>`Expected ${u} message to include \`${o}\`, got \`${c.message}\``,validator:c=>c.message.includes(o)})}hasKeys(...o){return this.addValidator({message:(c,u)=>`Expected ${u} message to have keys \`${o.join("`, `")}\``,validator:c=>o.every(u=>c.hasOwnProperty(u))})}instanceOf(o){return this.addValidator({message:(c,u)=>`Expected ${u} \`${c.name}\` to be of type \`${o.name}\``,validator:c=>c instanceof o})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(r,n,a){var s=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(5)),c=a(0),u=s(a(3)),f=s(a(7));n.MapPredicate=class extends c.Predicate{constructor(l){super("Map",l)}size(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have size \`${l}\`, got \`${h.size}\``,validator:h=>h.size===l})}minSize(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have a minimum size of \`${l}\`, got \`${h.size}\``,validator:h=>h.size>=l})}maxSize(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have a maximum size of \`${l}\`, got \`${h.size}\``,validator:h=>h.size<=l})}hasKeys(...l){return this.addValidator({message:(h,d,m)=>`Expected ${d} to have keys \`${JSON.stringify(m)}\``,validator:h=>u.default(h,l)})}hasAnyKeys(...l){return this.addValidator({message:(h,d)=>`Expected ${d} to have any key of \`${JSON.stringify(l)}\``,validator:h=>l.some(d=>h.has(d))})}hasValues(...l){return this.addValidator({message:(h,d,m)=>`Expected ${d} to have values \`${JSON.stringify(m)}\``,validator:h=>u.default(new Set(h.values()),l)})}hasAnyValues(...l){return this.addValidator({message:(h,d)=>`Expected ${d} to have any value of \`${JSON.stringify(l)}\``,validator:h=>{const d=new Set(h.values());return l.some(m=>d.has(m))}})}keysOfType(l){return this.addValidator({message:(h,d,m)=>`(${d}) ${m}`,validator:h=>f.default(h.keys(),l)})}valuesOfType(l){return this.addValidator({message:(h,d,m)=>`(${d}) ${m}`,validator:h=>f.default(h.values(),l)})}get empty(){return this.addValidator({message:(l,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(l))}\``,validator:l=>l.size===0})}get nonEmpty(){return this.addValidator({message:(l,h)=>`Expected ${h} to not be empty`,validator:l=>l.size>0})}deepEqual(l){return this.addValidator({message:(h,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(Array.from(l))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>o.default(h,l)})}}},function(r,n,a){var s=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(n,"__esModule",{value:!0});const o=a(0),c=s(a(3));n.WeakMapPredicate=class extends o.Predicate{constructor(u){super("WeakMap",u)}hasKeys(...u){return this.addValidator({message:(f,l,h)=>`Expected ${l} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,u)})}hasAnyKeys(...u){return this.addValidator({message:(f,l)=>`Expected ${l} to have any key of \`${JSON.stringify(u)}\``,validator:f=>u.some(l=>f.has(l))})}}},function(r,n,a){var s=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(n,"__esModule",{value:!0});const o=s(a(5)),c=a(0),u=s(a(3)),f=s(a(7));n.SetPredicate=class extends c.Predicate{constructor(l){super("Set",l)}size(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have size \`${l}\`, got \`${h.size}\``,validator:h=>h.size===l})}minSize(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have a minimum size of \`${l}\`, got \`${h.size}\``,validator:h=>h.size>=l})}maxSize(l){return this.addValidator({message:(h,d)=>`Expected ${d} to have a maximum size of \`${l}\`, got \`${h.size}\``,validator:h=>h.size<=l})}has(...l){return this.addValidator({message:(h,d,m)=>`Expected ${d} to have items \`${JSON.stringify(m)}\``,validator:h=>u.default(h,l)})}hasAny(...l){return this.addValidator({message:(h,d)=>`Expected ${d} to have any item of \`${JSON.stringify(l)}\``,validator:h=>l.some(d=>h.has(d))})}ofType(l){return this.addValidator({message:(h,d,m)=>`(${d}) ${m}`,validator:h=>f.default(h,l)})}get empty(){return this.addValidator({message:(l,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(l))}\``,validator:l=>l.size===0})}get nonEmpty(){return this.addValidator({message:(l,h)=>`Expected ${h} to not be empty`,validator:l=>l.size>0})}deepEqual(l){return this.addValidator({message:(h,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(Array.from(l))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>o.default(h,l)})}}},function(r,n,a){var s=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(n,"__esModule",{value:!0});const o=a(0),c=s(a(3));n.WeakSetPredicate=class extends o.Predicate{constructor(u){super("WeakSet",u)}has(...u){return this.addValidator({message:(f,l,h)=>`Expected ${l} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,u)})}hasAny(...u){return this.addValidator({message:(f,l)=>`Expected ${l} to have any item of \`${JSON.stringify(u)}\``,validator:f=>u.some(l=>f.has(l))})}}},function(r,n,a){Object.defineProperty(n,"__esModule",{value:!0});const s=a(8),o=a(2);n.AnyPredicate=class{constructor(c,u={}){this.predicates=c,this.options=u}[o.testSymbol](c,u,f){const l=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void u(c,f,h)}catch(d){if(c===void 0&&this.options.optional===!0)return;l.push(`- ${d.message}`)}throw new s.ArgumentError(l.join(`
|
|
138
|
+
`),u)}}}]);const e=t.exports;t.exports=e.default,Object.assign(t.exports,e)})(Qc);var ed=Qc.exports,ja={},Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});class zn{constructor(e){this.pretty=!1,this.pretty=e}format(e,r){const n=Object.assign({},r,e);return this.pretty?JSON.stringify(n,void 0,2)+`
|
|
139
|
+
`:JSON.stringify(n)}getName(){return this.pretty?zn.FORMAT_NAME_PRETTY:zn.FORMAT_NAME}}zn.FORMAT_NAME="json",zn.FORMAT_NAME_PRETTY="json_pretty",Ho.JsonLogFormat=zn;var Wo={},Sa={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.EMPTY_METADATA={};function r(n){let a=n.service?`${n.service}.`:n.project?`${n.project}.`:"";return a+=n.module?`${n.module}.`:"",a+=n.library?`[${n.library}].`:"",a+=n.tag||"",a||(a="universe-log-empty-id"),a}e.getBestIdentifier=r}(t.LogMetadata||(t.LogMetadata={}))})(Sa);var si={};Object.defineProperty(si,"__esModule",{value:!0});class Yg{static getTimestamp(){return Date.now()}static getUTCISOTime(){return new Date().toISOString()}}si.TimeUtils=Yg,Object.defineProperty(Wo,"__esModule",{value:!0});const Zg=Sa,Xg=si;class ii{format(e,r){const n=e.time_iso||new Date(e.timestamp).toISOString()||Xg.TimeUtils.getUTCISOTime();return`${Zg.LogMetadata.getBestIdentifier(r)} | ${n} [${e.level}]: ${e.message}`+this.includeStackIfPresent(e)}getName(){return ii.FORMAT_NAME}includeStackIfPresent(e){return e.error&&e.error.stack?`
|
|
140
|
+
${e.error.stack}`:""}}ii.FORMAT_NAME="oneline",Wo.OnelineLogFormat=ii,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Rn,r=Ho,n=Wo;(function(a){a.FORMATS={json:new r.JsonLogFormat(!1),json_pretty:new r.JsonLogFormat(!0),oneline:new n.OnelineLogFormat},a.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),a.DEFAULT_FORMAT=a.FORMATS.oneline;function s(o){if(typeof a.FORMATS[o]>"u"){const c=Object.keys(a.FORMATS).join(",");throw new e.UniverseLogError(`There is no such log format: '${o}'. Available formats: [ ${c} ]`)}return a.FORMATS[o]}a.valueOf=s})(t.LogFormats||(t.LogFormats={}))}(ja);var Go={};Object.defineProperty(Go,"__esModule",{value:!0});class Kg{static log(e){console.error(`UniverseLog.FallbackLog: ${e}`)}}Go.FallbackLog=Kg;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});const ui=Rn,Qg=new Function("try {return this===window;}catch(e){ return false;}"),eb=new Function("try {return this===global;}catch(e){return false;}"),tb=new Function("try {return this;}catch(e){return undefined}");function rb(t){const e=tb();if(!e)throw new ui.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return e[t]}function nb(t){if(!process)throw new ui.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new ui.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[t])return process.env[t]}function ab(t){if(Qg())return rb(t);if(eb())return nb(t);throw new ui.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}oi.PortableEnv=ab;var li={};Object.defineProperty(li,"__esModule",{value:!0});let Hn=class{};Hn.LEAST_LEVEL_ENV="LOG_LEVEL",Hn.LOG_FORMAT_ENV="LOG_FORMAT",Hn.LOG_METADATA_ENV="LOG_METADATA",Hn.REEVALUATE_CONFIG_AFTER_MS=150,Hn.DEFAULT_LOG_FN=t=>console.error(t),li.StaticConfig=Hn;var sb=J&&J.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r};Object.defineProperty(zo,"__esModule",{value:!0});const Qr=ed,ib=ja,ob=Go,ci=Un,td=Sa,Jo=oi,Da=li;class ub{constructor(e){this.levelEvaluationEnvNames=[],this.level=ci.LogLevel.DEFAULT_LEVEL,this.metadata=td.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=e.levelEvaluationEnvNames,Qr.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",Qr.default.array.ofType(Qr.default.string)),this.fallbackLog=e.fallbackLog,Qr.default(this.fallbackLog,"fallbackLog",Qr.default.function),this.defaultFormat=e.defaultFormat,Qr.default(this.defaultFormat,"defaultFormat",Qr.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(e){this.levelEvaluationEnvNames=e,this.evaluateIfRequired()}getLevel(){return this.level}getFormat(){return this.format}getMetadata(){return this.metadata}evaluateIfRequired(){if(!(Date.now()<this.nextReevaluateTimestampMs))try{this.nextReevaluateTimestampMs=Date.now()+Da.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(e){this.fallbackLog(`Could not evaluate live log config: ${e}: ${e.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const e=Jo.PortableEnv(Da.StaticConfig.LOG_FORMAT_ENV);return e?ib.LogFormats.valueOf(e):this.defaultFormat}evaluateLogLevel(){const e=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(e)return e;const r=this.chooseMostVerboseLevel(this.getEnvValues([Da.StaticConfig.LEAST_LEVEL_ENV]));return r||ci.LogLevel.DEFAULT_LEVEL}getEnvValues(e){return e.map(n=>Jo.PortableEnv(n)).filter(n=>!!n).map(n=>n||"unreachable")}chooseMostVerboseLevel(e){const r=e.map(a=>ci.LogLevel.valueOf(a));return r.length===0?void 0:r.reduce((a,s)=>ci.LogLevel.moreVerbose(a,s))}evaluateMetadata(){try{const e=Jo.PortableEnv(Da.StaticConfig.LOG_METADATA_ENV);if(e){const r=JSON.parse(e);return this.removeTagFromMetadata(r)}}catch(e){ob.FallbackLog.log(`Could not parse value of ${Da.StaticConfig.LOG_METADATA_ENV} env: ${e}`)}return td.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(e){const{tag:r}=e;return sb(e,["tag"])}}zo.LiveLogConfig=ub;var Yo={};Object.defineProperty(Yo,"__esModule",{value:!0});const lb=Ar,cb=Un,rd=si;class It{static parse(e,r){let n=It.basicLogMsg(e);for(const a of r)n=Object.assign({},n,It.parseElem(a,n));return n}static basicLogMsg(e){return{time_iso:rd.TimeUtils.getUTCISOTime(),timestamp:rd.TimeUtils.getTimestamp(),level:e,level_value:cb.LogLevel.LEVELS_VALUES[e]}}static parseElem(e,r){return typeof e=="string"?It.parseString(e,r):e instanceof Error?It.parseError(e,r):typeof e=="object"?It.parseObject(e,r):It.parseOther(e,r)}static parseString(e,r){return{message:(r.message?r.message+"; ":"")+e}}static parseError(e,r){const n={};return n.message=(r.message?r.message+"; ":"")+(e+"").trim(),r.error?(n.other_errors=[...r.other_errors||[]],n.other_errors.push(It.errorToObj(e))):n.error=It.errorToObj(e),n}static errorToObj(e){return e instanceof lb.default?Object.assign({name:e.name,message:e.message,stack:e.stack},e.cause?{cause:It.errorToObj(e.cause)}:{}):{name:e.name,message:e.message,stack:e.stack}}static parseObject(e,r){return Object.assign({},e)}static parseOther(e,r){return{others:[...r.others||[],e]}}}Yo.ParseLogMsg=It;var Zo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ed,r=ja;(function(n){function a(s){e.default(s.levelEnvs,"Properties.levelEnvs",e.default.any(e.default.undefined,e.default.array.ofType(e.default.string))),e.default(s.metadata,"Properties.metadata",e.default.optional.object),e.default(s.logFn,"Properties.logFn",e.default.any(e.default.undefined,e.default.function)),e.default(s.defaultFormat,"Properties.defaultFormat",e.default.optional.string.oneOf(Object.keys(r.LogFormats.KEYS)))}n.validate=a})(t.Properties||(t.Properties={}))})(Zo),Object.defineProperty(ai,"__esModule",{value:!0});const db=zo,Xo=Un,fb=Sa,hb=li,nd=ja,pb=Yo,mb=Zo;class Ko{constructor(e){if(this.instanceMetadata=fb.LogMetadata.EMPTY_METADATA,"clone"in e){this.instanceMetadata=Object.assign({},e.clone.instanceMetadata,e.newMetadata),this.liveConfig=e.clone.liveConfig,this.logFn=e.clone.logFn;return}mb.Properties.validate(e),e.metadata&&(this.instanceMetadata=e.metadata),e.logFn?this.logFn=e.logFn:this.logFn=hb.StaticConfig.DEFAULT_LOG_FN;const r=e.defaultFormat?nd.LogFormats.valueOf(e.defaultFormat):nd.LogFormats.DEFAULT_FORMAT;this.liveConfig=new db.LiveLogConfig({levelEvaluationEnvNames:e.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:r})}cloneWithMetadata(e){return new Ko({clone:this,newMetadata:e})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(e,r){this.reevaluateConfigIfRequired();const n=Xo.LogLevel.LEVELS_VALUES[this.getLevel()];Xo.LogLevel.LEVELS_VALUES[e]<=n&&this.doLog(e,r())}doLog(e,...r){if(this.reevaluateConfigIfRequired(),r.length!==0&&(r.length===1&&Array.isArray(r[0])&&(r=r[0]),Xo.LogLevel.isLessOrEquallyVerbose({level:e,threshold:this.getLevel()}))){const n=pb.ParseLogMsg.parse(e,r),a=this.liveConfig.getFormat().format(n,this.getMetadata());this.rawWriteToLog(a)}}rawWriteToLog(e){this.logFn(e)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}}ai.LogEngine=Ko,Object.defineProperty(ni,"__esModule",{value:!0});const nt=Un,ad=ai;class gb{constructor(e){e instanceof ad.LogEngine?this.logEngine=e:this.logEngine=new ad.LogEngine(e)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return nt.LogLevel.LEVELS_VALUES[this.getLevel()]>=nt.LogLevel.LEVELS_VALUES.debug}error(...e){this.doLog(nt.LogLevel.error,e)}errorGen(e){this.doEfficientLog(nt.LogLevel.error,e)}warn(...e){this.doLog(nt.LogLevel.warn,e)}warnGen(e){this.doEfficientLog(nt.LogLevel.warn,e)}info(...e){this.doLog(nt.LogLevel.info,e)}infoGen(e){this.doEfficientLog(nt.LogLevel.info,e)}http(...e){this.doLog(nt.LogLevel.http,e)}httpGen(e){this.doEfficientLog(nt.LogLevel.http,e)}verbose(...e){this.doLog(nt.LogLevel.verbose,e)}verboseGen(e){this.doEfficientLog(nt.LogLevel.verbose,e)}debug(...e){this.doLog(nt.LogLevel.debug,e)}debugGen(e){this.doEfficientLog(nt.LogLevel.debug,e)}silly(...e){this.doLog(nt.LogLevel.silly,e)}sillyGen(e){this.doEfficientLog(nt.LogLevel.silly,e)}doEfficientLog(e,r){this.logEngine.doEfficientLog(e,r)}doLog(e,...r){this.logEngine.doLog(e,...r)}getEngine(){return this.logEngine}}ni.AbstractUniverseLog=gb;var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0});const bb=ni;class eu extends bb.AbstractUniverseLog{constructor(e){super(e)}tag(e){return new eu(super.getEngine().cloneWithMetadata({tag:e}))}}Qo.BasicTaggedUniverseLog=eu,Object.defineProperty(Mt,"__esModule",{value:!0});var xb=ni;Mt.AbstractUniverseLog=xb.AbstractUniverseLog;var yb=ai;Mt.LogEngine=yb.LogEngine;var vb=Zo;Mt.UniverseLogProperties=vb.Properties;var wb=Qo;Mt.BasicTaggedUniverseLog=wb.BasicTaggedUniverseLog;var _b=Sa;Mt.LogMetadata=_b.LogMetadata;var Eb=Un;Mt.LogLevel=Eb.LogLevel;var Nb=oi;Mt.PortableEnv=Nb.PortableEnv;var Ab=Rn;Mt.UniverseLogError=Ab.UniverseLogError;var kb=ja;Mt.LogFormats=kb.LogFormats,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Log=void 0;const jb=Mt;class Ta extends jb.AbstractUniverseLog{static log(){return Ta.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}}Nt.Log=Ta,Ta.INSTANCE=new Ta;var di={},fi={};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Phishing=void 0;const Sb=["steewit.com","śteemit.com","ŝteemit.com","şteemit.com","šteemit.com","sţeemit.com","sťeemit.com","șteemit.com","sleemit.com","aba.ae","autobidbot.cf","autobidbot.ga","autobidbot.gq","autobotsteem.cf","autobotsteem.ga","autobotsteem.gq","autobotsteem.ml","autosteem.info","autosteembot.cf","autosteembot.ga","autosteembot.gq","autosteembot.ml","autosteemit.wapka.mobi","boostbot.ga","boostbot.gq","boostwhaleup.cf","cutt.us","dereferer.me","eb2a.com","lordlinkers.tk","nullrefer.com","steeemit.ml","steeemitt.aba.ae","steemart.ga","steemautobot.bid","steemautobot.cf","steemautobot.trade","steemers.aba.ae","steemiit.cf","steemiit.ga","steemij.tk","steemik.ga","steemik.tk","steemil.com","steemil.ml","steemir.tk","steemitou.co.nf","steemitservices.ga","steemitservices.gq","steemiz.tk","steemnow.cf","steemnow.ga","steemnow.gq","steemnow.ml","steempostupper.win","steemrewards.ml","steemrobot.ga","steemrobot.ml","steemupgot.cf","steemupgot.ga","steemupgot.gq","steemupper.cf","steemupper.ga","steemupper.gq","steemupper.ml","steenit.cf","stemit.com","stssmater.aba.ae","uppervotes.ga","uppervotes.gq","upperwhaleplus.cf","upperwhaleplus.ga","upperwhaleplus.gq","upvoteme.cf","upvoteme.ga","upvoteme.gq","upvoteme.ml","url.rw","us.aba.ae","whaleboostup.ga","whaleboostup.ml"];class sd{}fi.Phishing=sd,sd.looksPhishy=t=>{for(const e of Sb)if(t.toLocaleLowerCase().indexOf(e)>-1)return!0;return!1};var Db=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(di,"__esModule",{value:!0}),di.LinkSanitizer=void 0;const hi=Db(_n),tu=Nt,Tb=fi;class ru{constructor(e){this.validate(e),this.options=e,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=ru.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(e,r){return e=this.prependUnknownProtocolLink(e),tu.Log.log().debug("LinkSanitizer#sanitizeLink",{url:e,urlTitle:r}),Tb.Phishing.looksPhishy(e)?(tu.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",e,{url:e,urlTitle:r}),!1):this.isPseudoLocalUrl(e,r)?(tu.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",e,{url:e,urlTitle:r}),!1):e}static getTopLevelBaseDomainFromBaseUrl(e){const n=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(e.hostname);if(n&&n[0])return n[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${e.hostname}`)}prependUnknownProtocolLink(e){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(e)||(e="https://"+e),e}isPseudoLocalUrl(e,r){if(e.indexOf("#")===0)return!1;e=e.toLowerCase(),r=r.toLowerCase();try{const n=r.indexOf(this.topLevelsBaseDomain)!==-1,a=e.indexOf(this.topLevelsBaseDomain)!==-1;if(n&&!a)return!0}catch(n){if(n instanceof TypeError)return!1;throw n}return!1}validate(e){(0,hi.default)(e,"LinkSanitizerOptions",hi.default.object),(0,hi.default)(e.baseUrl,"LinkSanitizerOptions.baseUrl",hi.default.string.nonEmpty)}}di.LinkSanitizer=ru;var Wn={},Cb=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.Localization=void 0;const bt=Cb(_n);class id{static validate(e){(0,bt.default)(e,"LocalizationOptions",bt.default.object),(0,bt.default)(e.phishingWarning,"LocalizationOptions.phishingWarning",bt.default.string.nonEmpty),(0,bt.default)(e.externalLink,"LocalizationOptions.externalLink",bt.default.string.nonEmpty),(0,bt.default)(e.noImage,"LocalizationOptions.noImage",bt.default.string.nonEmpty),(0,bt.default)(e.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",bt.default.string.nonEmpty),(0,bt.default)(e.accountNameBadActor,"LocalizationOptions.accountNameBadActor",bt.default.string.nonEmpty),(0,bt.default)(e.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",bt.default.string.nonEmpty)}}Wn.Localization=id,id.DEFAULT={phishingWarning:"Link expanded to plain text; beware of a potential phishing attempt",externalLink:"This link will take you away from example.com",noImage:"Images not allowed",accountNameWrongLength:"Account name should be between 3 and 16 characters long",accountNameBadActor:"This account is on a bad actor list",accountNameWrongSegment:"This account name contains a bad segment"};var pi={},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.AbstractEmbedder=void 0;class Ob{static getEmbedMarker(e,r){return`~~~ embed:${e} ${r} ~~~`}static insertAllEmbeds(e,r,n){const a=[];for(let s of r.split("~~~ embed:")){const o=s.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(o&&o.length>=3){const c=o[1],u=o[2];for(const f of e)if(f.type==u){a.push(f.processEmbed(c,n));break}if(s=s.substring(`${c} ${u} ~~~`.length),s==="")continue}a.push(s)}return a.join("")}}Jt.AbstractEmbedder=Ob;var mi={};Object.defineProperty(mi,"__esModule",{value:!0}),mi.SpotifyEmbedder=void 0;const $b=Nt,Pb=Jt;class Ca extends Pb.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(e){if(!e)return;const r=e.match(Ca.regex.main);return!r||r.length<2?void 0:{id:`${r[1]==="show"||r[1]==="episode"?"embed-podcast":"embed"}/${r[1]}/${r[2]}`,url:r[0],canonical:`https://open.spotify.com/${r[1]}/${r[2]}`}}getEmbedMetadata(e){try{const r=Ca.extractMetadata(e.data);return r?{id:r.id,url:r.url,image:r.canonical}:void 0}catch(r){$b.Log.log().error(r)}}processEmbed(e,r){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${e}`}" width="${r.width}" height="${r.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}}mi.SpotifyEmbedder=Ca,Ca.regex={main:/https?:\/\/open.spotify.com\/(playlist|show|episode|album|track|artist)\/(.*)/i,sanitize:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i};var gi={};Object.defineProperty(gi,"__esModule",{value:!0}),gi.ThreeSpeakEmbedder=void 0;const Lb=Nt,Mb=Jt;class bi extends Mb.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(e){const r=typeof e=="string"?e:e.data;try{const n=r.match(bi.linkRegex);if(n&&n[1])return{id:n[1],url:r}}catch(n){Lb.Log.log().error(n)}}processEmbed(e,r){const n=`https://3speak.tv/embed?v=${e}`;return`<div class="threeSpeakWrapper"><iframe width="${r.width}" height="${r.height}" src="${n}" frameborder="0" allowfullscreen></iframe></div>`}}gi.ThreeSpeakEmbedder=bi,bi.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/;var xi={},nu={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.imageFile=t.image=t.remote=t.local=t.any=void 0;const e='[^\\s"<>\\]\\[\\(\\)]',r=e.replace(/\]$/,".,']"),n="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",a="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",s="(?:"+e+"*"+r+")?",o=({domain:d=a,path:m=""}={})=>`https?://${d}(?::\\d{2,5})?(?:[/\\?#]${s}${m||""})${m?"":"?"}`,c=(d="i")=>new RegExp(o(),d);t.any=c;const u=(d="i")=>new RegExp(o({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),d);t.local=u;const f=(d="i")=>new RegExp(o({domain:`(?!localhost|(?:.*\\.)?hive.blog)${a}`}),d);t.remote=f;const l=(d="i")=>new RegExp(o({path:n}),d);t.image=l;const h=(d="i")=>new RegExp(n,d);t.imageFile=h,t.default={any:(0,t.any)(),local:(0,t.local)(),remote:(0,t.remote)(),image:(0,t.image)(),imageFile:(0,t.imageFile)(),vimeo:/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,vimeoId:/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)/,twitch:/https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i,ipfsProtocol:/^((\/\/?ipfs\/)|(ipfs:\/\/))/}})(nu);var Ib=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.TwitchEmbedder=void 0;const Fb=Nt,Bb=Ib(nu),Vb=Jt;class qb extends Vb.AbstractEmbedder{constructor(e){super(),this.type="twitch",this.domain=new URL(e.baseUrl).hostname}getEmbedMetadata(e){try{const r=e.data,n=this.twitchId(r);return n?Object.assign({},n):void 0}catch(r){Fb.Log.log().error(r)}}processEmbed(e,r){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${e}&parent=${this.domain}`} width=${r.width} height=${r.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(e){if(!e)return null;const r=e.match(Bb.default.twitch);return!r||r.length<3?null:{id:r[1]==="videos"?`?video=${r[2]}`:`?channel=${r[2]}`,url:r[0],canonical:r[1]==="videos"?`https://player.twitch.tv/?video=${r[2]}`:`https://player.twitch.tv/?channel=${r[2]}`}}}xi.TwitchEmbedder=qb;var yi={},Oa={};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.StaticConfig=void 0;class od{}Oa.StaticConfig=od,od.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:t=>{if(!t)return null;const r=t.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!r||r.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${r[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:t=>{if(!t)return null;const e=t.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!e||e.length!==2?null:"https://player.vimeo.com/video/"+e[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:t=>t.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:t=>{if(!t)return null;const e=t.match(/url=(.+?)&/);return!e||e.length!==2?null:`https://w.soundcloud.com/player/?url=${e[1]}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true`}},{re:/^(https?:)?\/\/player.twitch.tv\/.*/i,fn:t=>t},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:t=>t},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:t=>{if(!t)return null;const e=t.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!e||e.length!==2?null:`https://3speak.tv/embed?v=${e[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:t=>{if(!t)return null;const e=t.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!e||e.length!==2?null:`https://3speak.tv/embed?v=${e[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:t=>{if(!t)return null;const e=t.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!e||e.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${e[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
|
|
141
|
+
div, iframe, del,
|
|
142
|
+
a, p, b, i, q, br, ul, li, ol, img, h1, h2, h3, h4, h5, h6, hr,
|
|
143
|
+
blockquote, pre, code, em, strong, center, table, thead, tbody, tr, th, td,
|
|
144
|
+
strike, sup, sub
|
|
145
|
+
`.trim().split(/,\s*/)};var au;Object.defineProperty(yi,"__esModule",{value:!0}),yi.TwitterEmbedder=void 0;const Ub=Nt,ud=Oa,Rb=Jt;class $a extends Rb.AbstractEmbedder{constructor(){super(...arguments),this.type="twitter"}getEmbedMetadata(e){const r=typeof e=="string"?e:e.data;try{const n=$a.getTwitterMetadataFromLink(r);return n?{id:n.id,url:n.url}:void 0}catch(n){Ub.Log.log().error(n)}}processEmbed(e,r){const n=ud.StaticConfig.sanitization.iframeWhitelist.find(s=>s.re.toString().includes("twitter")),a=n==null?void 0:n.fn(`https://twitter.com/status/${e}`);return a?`<div class="twitterWrapper"><iframe width="${r.width}" height="${r.height}" src="${a}" frameborder="0" scrolling="no" allowtransparency="true" allowfullscreen="true"></iframe></div>`:""}static getTwitterMetadataFromLink(e){if(!e)return;const r=e.replace(/^(@|https:\/\/)/,""),n=r.match($a.linkRegex);if(!n)return;const a=n[2],s=`https://${r}`;return{id:a,url:s}}}yi.TwitterEmbedder=$a,$a.linkRegex=(au=ud.StaticConfig.sanitization.iframeWhitelist.find(t=>t.re.toString().includes("twitter")))===null||au===void 0?void 0:au.re;var vi={};Object.defineProperty(vi,"__esModule",{value:!0}),vi.VimeoEmbedder=void 0;const zb=Nt,Hb=Jt;class wi extends Hb.AbstractEmbedder{constructor(){super(...arguments),this.type="vimeo"}getEmbedMetadata(e){try{const r=e.data,n=this.extractMetadata(r);return n?{id:n.id,url:n.url}:void 0}catch(r){zb.Log.log().error(r)}}processEmbed(e,r){return`<div class="videoWrapper"><iframe src=${this.generateCanonicalUrl(e)} width=${r.width} height=${r.height} frameBorder="0" webkitallowfullscreen mozallowfullscreen allowFullScreen></iframe></div>`}generateCanonicalUrl(e){return`https://player.vimeo.com/video/${e}`}extractMetadata(e){if(!e)return null;const r=e.match(wi.regex);return!r||r.length<2?null:{id:r[1],url:r[0],canonical:this.generateCanonicalUrl(r[1])}}}vi.VimeoEmbedder=wi,wi.regex=/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.YoutubeEmbedder=void 0;const Wb=Nt,Gb=Jt;class en extends Gb.AbstractEmbedder{constructor(){super(...arguments),this.type="youtube"}static getYoutubeMetadataFromLink(e){if(!e)return;const r=e.match(en.linkRegex),n=r?r[0]:void 0;if(!n)return;const a=n.match(en.idRegex),s=a&&a.length>=2?a[2]:void 0;if(s)return{id:s,url:n,thumbnail:"https://img.youtube.com/vi/"+s+"/0.jpg"}}getEmbedMetadata(e){try{const r=en.getYoutubeMetadataFromLink(e.data);return r?{id:r.id,url:r.url,image:r.thumbnail}:void 0}catch(r){Wb.Log.log().error(r)}}processEmbed(e,r){const n=`https://www.youtube.com/embed/${e}`;return`<div class="videoWrapper"><iframe width="${r.width}" height="${r.height}" src="${n}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe></div>`}}Pa.YoutubeEmbedder=en,en.linkRegex=/https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/[^watch]|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)[^ ]*/i,en.idRegex=/(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)/i;var Jb=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pi,"__esModule",{value:!0}),pi.AssetEmbedder=void 0;const Ye=Jb(_n),ld=Jt,Yb=mi,Zb=gi,Xb=xi,Kb=yi,Qb=vi,e2=Pa;class su{constructor(e,r){su.validate(e),this.options=e,this.localization=r,this.embedders=[new e2.YoutubeEmbedder,new Qb.VimeoEmbedder,new Xb.TwitchEmbedder(e),new Yb.SpotifyEmbedder,new Zb.ThreeSpeakEmbedder,new Kb.TwitterEmbedder]}static validate(e){(0,Ye.default)(e,"AssetEmbedderOptions",Ye.default.object),(0,Ye.default)(e.ipfsPrefix,"AssetEmbedderOptions.ipfsPrefix",Ye.default.optional.string),(0,Ye.default)(e.width,"AssetEmbedderOptions.width",Ye.default.number.integer.positive),(0,Ye.default)(e.height,"AssetEmbedderOptions.height",Ye.default.number.integer.positive),(0,Ye.default)(e.hideImages,"AssetEmbedderOptions.hideImages",Ye.default.boolean),(0,Ye.default)(e.baseUrl,"AssetEmbedderOptions.baseUrl",Ye.default.string.nonEmpty),(0,Ye.default)(e.imageProxyFn,"AssetEmbedderOptions.imageProxyFn",Ye.default.function),(0,Ye.default)(e.hashtagUrlFn,"AssetEmbedderOptions.hashtagUrlFn",Ye.default.function),(0,Ye.default)(e.usertagUrlFn,"AssetEmbedderOptions.usertagUrlFn",Ye.default.function)}insertAssets(e){const r={width:this.options.width,height:this.options.height};return this.insertMarkedEmbedsToRenderedOutput(e,r)}insertMarkedEmbedsToRenderedOutput(e,r){return ld.AbstractEmbedder.insertAllEmbeds(this.embedders,e,r)}processTextNodeAndInsertEmbeds(e){const r={links:[],images:[]};for(const n of this.embedders){const a=n.getEmbedMetadata(e);a&&(e.data=e.data.replace(a.url,ld.AbstractEmbedder.getEmbedMarker(a.id,n.type)),a.image&&r.images.push(a.image),a.link&&r.links.push(a.link))}return r}}pi.AssetEmbedder=su;var _i={},iu={};Object.defineProperty(iu,"__esModule",{value:!0});const t2=`
|
|
146
|
+
aalpha
|
|
147
|
+
aappreciator
|
|
148
|
+
abits
|
|
149
|
+
acx
|
|
150
|
+
aex.com
|
|
151
|
+
alha
|
|
152
|
+
alhpa
|
|
153
|
+
allcoin.com
|
|
154
|
+
alpah
|
|
155
|
+
alph
|
|
156
|
+
alphha
|
|
157
|
+
alppha
|
|
158
|
+
alueup
|
|
159
|
+
apha
|
|
160
|
+
aplha
|
|
161
|
+
apppreciator
|
|
162
|
+
apprceiator
|
|
163
|
+
apprciator
|
|
164
|
+
apprecaitor
|
|
165
|
+
apprecator
|
|
166
|
+
apprecciator
|
|
167
|
+
appreciaator
|
|
168
|
+
appreciaor
|
|
169
|
+
appreciaotr
|
|
170
|
+
appreciater
|
|
171
|
+
appreciatoor
|
|
172
|
+
appreciatorr
|
|
173
|
+
appreciatr
|
|
174
|
+
appreciatro
|
|
175
|
+
appreciattor
|
|
176
|
+
appreciiator
|
|
177
|
+
apprecitaor
|
|
178
|
+
apprecitor
|
|
179
|
+
appreeciator
|
|
180
|
+
appreiator
|
|
181
|
+
appreicator
|
|
182
|
+
apprreciator
|
|
183
|
+
apreciator
|
|
184
|
+
aprpeciator
|
|
185
|
+
ausbitban
|
|
186
|
+
ausbltbank
|
|
187
|
+
avlueup
|
|
188
|
+
battrex
|
|
189
|
+
bbithumb.hot
|
|
190
|
+
bbittrex
|
|
191
|
+
bblocktrades
|
|
192
|
+
bboomerang
|
|
193
|
+
bbooster
|
|
194
|
+
bbuildawhale
|
|
195
|
+
bcex
|
|
196
|
+
bellyrub
|
|
197
|
+
berniesandlers
|
|
198
|
+
bernieslanders
|
|
199
|
+
berniestandards
|
|
200
|
+
bernlesanders
|
|
201
|
+
bettrex
|
|
202
|
+
bihtrex
|
|
203
|
+
bihtumb.hot
|
|
204
|
+
bihumb.hot
|
|
205
|
+
biithumb.hot
|
|
206
|
+
biitrex
|
|
207
|
+
biittrex
|
|
208
|
+
bildawhale
|
|
209
|
+
binan
|
|
210
|
+
binanc
|
|
211
|
+
binance
|
|
212
|
+
binance.com
|
|
213
|
+
binanced
|
|
214
|
+
binancee
|
|
215
|
+
binances
|
|
216
|
+
binanse
|
|
217
|
+
binnance
|
|
218
|
+
bit-z
|
|
219
|
+
bitex
|
|
220
|
+
bitfinex
|
|
221
|
+
bitfinex.com
|
|
222
|
+
bitfinix
|
|
223
|
+
bitflip
|
|
224
|
+
bithhumb.hot
|
|
225
|
+
bithmb.hot
|
|
226
|
+
bithmub.hot
|
|
227
|
+
bithub.hot
|
|
228
|
+
bithubm.hot
|
|
229
|
+
bithum.bhot
|
|
230
|
+
bithumb
|
|
231
|
+
bithumb-deposit
|
|
232
|
+
bithumb-exchange
|
|
233
|
+
bithumb-pro
|
|
234
|
+
bithumb.com
|
|
235
|
+
bithumb.hoot
|
|
236
|
+
bithumb.hott
|
|
237
|
+
bithumb.hto
|
|
238
|
+
bithumb.oht
|
|
239
|
+
bithumbb.hot
|
|
240
|
+
bithummb.hot
|
|
241
|
+
bithuumb.hot
|
|
242
|
+
bitifinex
|
|
243
|
+
bitkrx
|
|
244
|
+
bitnaru
|
|
245
|
+
bitre
|
|
246
|
+
bitreex
|
|
247
|
+
bitrex
|
|
248
|
+
bitrexx
|
|
249
|
+
bitrix
|
|
250
|
+
bitrrex
|
|
251
|
+
bitrtex
|
|
252
|
+
bitrx
|
|
253
|
+
bitsane
|
|
254
|
+
bitsane.com
|
|
255
|
+
bitstamp
|
|
256
|
+
bitstamp.net
|
|
257
|
+
bitt
|
|
258
|
+
bitteex
|
|
259
|
+
bitter
|
|
260
|
+
bitterex
|
|
261
|
+
bitterx
|
|
262
|
+
bittex
|
|
263
|
+
bitthai
|
|
264
|
+
bittr
|
|
265
|
+
bittrax
|
|
266
|
+
bittre
|
|
267
|
+
bittrec
|
|
268
|
+
bittrecs
|
|
269
|
+
bittrecx
|
|
270
|
+
bittred
|
|
271
|
+
bittreex
|
|
272
|
+
bittrek
|
|
273
|
+
bittres
|
|
274
|
+
bittresx
|
|
275
|
+
bittret
|
|
276
|
+
bittrev
|
|
277
|
+
bittrex-deposit
|
|
278
|
+
bittrex-pro
|
|
279
|
+
bittrex.com
|
|
280
|
+
bittrexc
|
|
281
|
+
bittrexchange
|
|
282
|
+
bittrexe
|
|
283
|
+
bittrexs
|
|
284
|
+
bittrext
|
|
285
|
+
bittrexx
|
|
286
|
+
bittrexxx
|
|
287
|
+
bittrez
|
|
288
|
+
bittriex
|
|
289
|
+
bittrix
|
|
290
|
+
bittrrex
|
|
291
|
+
bittrrx
|
|
292
|
+
bittrx
|
|
293
|
+
bittrxe
|
|
294
|
+
bitttec
|
|
295
|
+
bitttex
|
|
296
|
+
bitttrex
|
|
297
|
+
bittylicious
|
|
298
|
+
bittylicious.com
|
|
299
|
+
bituhmb.hot
|
|
300
|
+
biuldawhale
|
|
301
|
+
blcktrades
|
|
302
|
+
blcoktrades
|
|
303
|
+
bleutrade
|
|
304
|
+
bleutrade.com
|
|
305
|
+
bllocktrades
|
|
306
|
+
bloccktrades
|
|
307
|
+
block-trades
|
|
308
|
+
block-trades-com
|
|
309
|
+
blockktrades
|
|
310
|
+
blockrade
|
|
311
|
+
blockrades
|
|
312
|
+
blockrtades
|
|
313
|
+
blocktades
|
|
314
|
+
blocktardes
|
|
315
|
+
blocktraades
|
|
316
|
+
blocktrad
|
|
317
|
+
blocktraddes
|
|
318
|
+
blocktrade
|
|
319
|
+
blocktraded
|
|
320
|
+
blocktradee
|
|
321
|
+
blocktradees
|
|
322
|
+
blocktrader
|
|
323
|
+
blocktraders
|
|
324
|
+
blocktrades-com
|
|
325
|
+
blocktrades-info
|
|
326
|
+
blocktrades-us
|
|
327
|
+
blocktrades.com
|
|
328
|
+
blocktrades.info
|
|
329
|
+
blocktrades.us
|
|
330
|
+
blocktradess
|
|
331
|
+
blocktradesss
|
|
332
|
+
blocktradez
|
|
333
|
+
blocktrading
|
|
334
|
+
blocktrads
|
|
335
|
+
blocktradse
|
|
336
|
+
blocktraeds
|
|
337
|
+
blocktraes
|
|
338
|
+
blocktrdaes
|
|
339
|
+
blocktrdes
|
|
340
|
+
blocktredes
|
|
341
|
+
blocktrrades
|
|
342
|
+
blockttrades
|
|
343
|
+
bloctkrades
|
|
344
|
+
bloctrades
|
|
345
|
+
blokctrades
|
|
346
|
+
bloktrades
|
|
347
|
+
bloocktrades
|
|
348
|
+
bocktrades
|
|
349
|
+
bolcktrades
|
|
350
|
+
bomerang
|
|
351
|
+
bomoerang
|
|
352
|
+
booemrang
|
|
353
|
+
booerang
|
|
354
|
+
boomeang
|
|
355
|
+
boomearng
|
|
356
|
+
boomeerang
|
|
357
|
+
boomeraang
|
|
358
|
+
boomerag
|
|
359
|
+
boomeragn
|
|
360
|
+
boomerangg
|
|
361
|
+
boomeranng
|
|
362
|
+
boomernag
|
|
363
|
+
boomerrang
|
|
364
|
+
boommerang
|
|
365
|
+
boomreang
|
|
366
|
+
booomerang
|
|
367
|
+
boooster
|
|
368
|
+
booser
|
|
369
|
+
boosetr
|
|
370
|
+
boostar
|
|
371
|
+
booste
|
|
372
|
+
boosterr
|
|
373
|
+
boostr
|
|
374
|
+
boostre
|
|
375
|
+
boostter
|
|
376
|
+
bootser
|
|
377
|
+
bosoter
|
|
378
|
+
boster
|
|
379
|
+
btc-alpha
|
|
380
|
+
btc-alpha.com
|
|
381
|
+
btc38
|
|
382
|
+
btcalpha
|
|
383
|
+
btcmarkets
|
|
384
|
+
btcmarkets.net
|
|
385
|
+
bthumb.hot
|
|
386
|
+
btihumb.hot
|
|
387
|
+
btitrex
|
|
388
|
+
btrex
|
|
389
|
+
bttrex
|
|
390
|
+
bttrx
|
|
391
|
+
buidawhale
|
|
392
|
+
buidlawhale
|
|
393
|
+
buiildawhale
|
|
394
|
+
builadwhale
|
|
395
|
+
buildaawhale
|
|
396
|
+
buildahale
|
|
397
|
+
buildahwale
|
|
398
|
+
buildawahle
|
|
399
|
+
buildawale
|
|
400
|
+
buildawhaale
|
|
401
|
+
buildawhael
|
|
402
|
+
buildawhalee
|
|
403
|
+
buildawhalle
|
|
404
|
+
buildawhhale
|
|
405
|
+
buildawhile
|
|
406
|
+
buildawhlae
|
|
407
|
+
buildawwhale
|
|
408
|
+
builddawhale
|
|
409
|
+
buildwahale
|
|
410
|
+
buildwhale
|
|
411
|
+
builldawhale
|
|
412
|
+
buldawhale
|
|
413
|
+
bulidawhale
|
|
414
|
+
buobi-pro
|
|
415
|
+
buuildawhale
|
|
416
|
+
c-cex
|
|
417
|
+
c-cex.com
|
|
418
|
+
canadiancoconut
|
|
419
|
+
ccex
|
|
420
|
+
cexio
|
|
421
|
+
changellly
|
|
422
|
+
changelly.com
|
|
423
|
+
changely
|
|
424
|
+
cinpayments.net
|
|
425
|
+
cionpayments.net
|
|
426
|
+
coin-room
|
|
427
|
+
coinapyments.net
|
|
428
|
+
coinayments.net
|
|
429
|
+
coinbas
|
|
430
|
+
coinbase
|
|
431
|
+
coinbase.com
|
|
432
|
+
coinbased
|
|
433
|
+
coinegg
|
|
434
|
+
coinegg.com
|
|
435
|
+
coinpaments.net
|
|
436
|
+
coinpamyents.net
|
|
437
|
+
coinpayemnts.net
|
|
438
|
+
coinpayents.net
|
|
439
|
+
coinpaymens.net
|
|
440
|
+
coinpaymenst.net
|
|
441
|
+
coinpayment
|
|
442
|
+
coinpayment.snet
|
|
443
|
+
coinpayments
|
|
444
|
+
coinpayments.ent
|
|
445
|
+
coinpayments.nte
|
|
446
|
+
coinpaymetns.net
|
|
447
|
+
coinpaymnets.net
|
|
448
|
+
coinpaymnts.net
|
|
449
|
+
coinpia
|
|
450
|
+
coinpyaments.net
|
|
451
|
+
coinroom.com
|
|
452
|
+
coinsmarkets
|
|
453
|
+
coinsmarkets.com
|
|
454
|
+
coinspot
|
|
455
|
+
coinzest
|
|
456
|
+
coipayments.net
|
|
457
|
+
coipnayments.net
|
|
458
|
+
community-coin
|
|
459
|
+
conipayments.net
|
|
460
|
+
conpayments.net
|
|
461
|
+
coolcoin.com
|
|
462
|
+
curi
|
|
463
|
+
curied
|
|
464
|
+
curies
|
|
465
|
+
curing
|
|
466
|
+
d-tube
|
|
467
|
+
dcrypto8
|
|
468
|
+
ddeepcrypto8
|
|
469
|
+
decrypto8
|
|
470
|
+
deep8
|
|
471
|
+
deepccrypto8
|
|
472
|
+
deepcripto8
|
|
473
|
+
deepcrpto8
|
|
474
|
+
deepcrrypto8
|
|
475
|
+
deepcrypo8
|
|
476
|
+
deepcryppto8
|
|
477
|
+
deepcrypt08
|
|
478
|
+
deepcrypt8
|
|
479
|
+
deepcrypto-8
|
|
480
|
+
deepcrypto0
|
|
481
|
+
deepcrypto7
|
|
482
|
+
deepcrypto88
|
|
483
|
+
deepcrypto9
|
|
484
|
+
deepcryptoo8
|
|
485
|
+
deepcryptos
|
|
486
|
+
deepcryptos8
|
|
487
|
+
deepcryptto8
|
|
488
|
+
deepcryto8
|
|
489
|
+
deepcrytpo8
|
|
490
|
+
deepcryypto8
|
|
491
|
+
deepcypto8
|
|
492
|
+
deeppcrypto8
|
|
493
|
+
deeprypto8
|
|
494
|
+
depcrypto8
|
|
495
|
+
donkeypon
|
|
496
|
+
edepcrypto8
|
|
497
|
+
eepcrypto8
|
|
498
|
+
etherdelta
|
|
499
|
+
etherdelta.com
|
|
500
|
+
exrates
|
|
501
|
+
exx.com
|
|
502
|
+
feepcrypto8
|
|
503
|
+
freeewallet
|
|
504
|
+
freewalet.org
|
|
505
|
+
freewaller
|
|
506
|
+
frewallet
|
|
507
|
+
fyrstiken
|
|
508
|
+
gatecoin.com
|
|
509
|
+
gatehub
|
|
510
|
+
gatehub.net
|
|
511
|
+
gdax.com
|
|
512
|
+
gemini.com
|
|
513
|
+
ggopax-deposit
|
|
514
|
+
goapx-deposit
|
|
515
|
+
goax-deposit
|
|
516
|
+
good-kama
|
|
517
|
+
goopax-deposit
|
|
518
|
+
gopa-deposit
|
|
519
|
+
gopa-xdeposit
|
|
520
|
+
gopaax-deposit
|
|
521
|
+
gopax-ddeposit
|
|
522
|
+
gopax-deopsit
|
|
523
|
+
gopax-deosit
|
|
524
|
+
gopax-depoist
|
|
525
|
+
gopax-depoit
|
|
526
|
+
gopax-depoosit
|
|
527
|
+
gopax-deposiit
|
|
528
|
+
gopax-depositt
|
|
529
|
+
gopax-depossit
|
|
530
|
+
gopax-depost
|
|
531
|
+
gopax-deposti
|
|
532
|
+
gopax-depposit
|
|
533
|
+
gopax-depsit
|
|
534
|
+
gopax-depsoit
|
|
535
|
+
gopax-dpeosit
|
|
536
|
+
gopax-dposit
|
|
537
|
+
gopax-edposit
|
|
538
|
+
gopax-eposit
|
|
539
|
+
gopax-hot
|
|
540
|
+
gopaxd-eposit
|
|
541
|
+
gopaxx-deposit
|
|
542
|
+
goppax-deposit
|
|
543
|
+
gopx-deposit
|
|
544
|
+
gopxa-deposit
|
|
545
|
+
gpax-deposit
|
|
546
|
+
gpoax-deposit
|
|
547
|
+
gtg.witnesses
|
|
548
|
+
herising
|
|
549
|
+
hhuobi-pro
|
|
550
|
+
hitbtc-deposit
|
|
551
|
+
hitbtc-pro
|
|
552
|
+
hitbtc.com
|
|
553
|
+
hitbtcexchange
|
|
554
|
+
hterising
|
|
555
|
+
huobbi-pro
|
|
556
|
+
huobi-ppro
|
|
557
|
+
huobi-pr0
|
|
558
|
+
huobi-proo
|
|
559
|
+
huobi-prro
|
|
560
|
+
huobi.pro
|
|
561
|
+
huobii-pro
|
|
562
|
+
huobl-pro
|
|
563
|
+
huoobi-pro
|
|
564
|
+
huuobi-pro
|
|
565
|
+
ibthumb.hot
|
|
566
|
+
ibttrex
|
|
567
|
+
idex.market
|
|
568
|
+
imnnowbooster
|
|
569
|
+
inance
|
|
570
|
+
innowbooster
|
|
571
|
+
ithumb.hot
|
|
572
|
+
ittrex
|
|
573
|
+
ittrexx
|
|
574
|
+
kcx
|
|
575
|
+
kevinwon
|
|
576
|
+
kocostock
|
|
577
|
+
koinex
|
|
578
|
+
kraken
|
|
579
|
+
kraken.com
|
|
580
|
+
kucoi
|
|
581
|
+
kucoin
|
|
582
|
+
kucoinn
|
|
583
|
+
kucoins
|
|
584
|
+
lapha
|
|
585
|
+
lbocktrades
|
|
586
|
+
linkcoin
|
|
587
|
+
litebit
|
|
588
|
+
little-pepper
|
|
589
|
+
livecoin.com
|
|
590
|
+
livecoinnet
|
|
591
|
+
livingroomofsato
|
|
592
|
+
localtrade
|
|
593
|
+
localtrade.pro
|
|
594
|
+
locktrades
|
|
595
|
+
lpha
|
|
596
|
+
martsteem
|
|
597
|
+
mercatox.com
|
|
598
|
+
miinnowbooster
|
|
599
|
+
minnnowbooster
|
|
600
|
+
minnobooster
|
|
601
|
+
minnobwooster
|
|
602
|
+
minnooboster
|
|
603
|
+
minnoowbooster
|
|
604
|
+
minnowboooster
|
|
605
|
+
minnowbooser
|
|
606
|
+
minnowboosetr
|
|
607
|
+
minnowboosster
|
|
608
|
+
minnowboost
|
|
609
|
+
minnowbooste
|
|
610
|
+
minnowboosted
|
|
611
|
+
minnowboosteer
|
|
612
|
+
minnowboosterr
|
|
613
|
+
minnowboosters
|
|
614
|
+
minnowboostr
|
|
615
|
+
minnowboostre
|
|
616
|
+
minnowboostter
|
|
617
|
+
minnowbootser
|
|
618
|
+
minnowbosoter
|
|
619
|
+
minnowboster
|
|
620
|
+
minnowbuster
|
|
621
|
+
minnowhelp
|
|
622
|
+
minnowoboster
|
|
623
|
+
minnowooster
|
|
624
|
+
minnowpooster
|
|
625
|
+
minnows
|
|
626
|
+
minnowsuport
|
|
627
|
+
minnowsupports
|
|
628
|
+
minnowwbooster
|
|
629
|
+
minnwbooster
|
|
630
|
+
minnwobooster
|
|
631
|
+
minobooster
|
|
632
|
+
minonwbooster
|
|
633
|
+
minowbooster
|
|
634
|
+
minowboster
|
|
635
|
+
minowhelper
|
|
636
|
+
minowsupport
|
|
637
|
+
mminnowbooster
|
|
638
|
+
mmyupbit
|
|
639
|
+
mninowbooster
|
|
640
|
+
msartsteem
|
|
641
|
+
my-upbit
|
|
642
|
+
myupbbit
|
|
643
|
+
myupbiit
|
|
644
|
+
myupbitt
|
|
645
|
+
myupblt
|
|
646
|
+
myuppbit
|
|
647
|
+
myuupbit
|
|
648
|
+
myyupbit
|
|
649
|
+
neraex
|
|
650
|
+
neraex.com
|
|
651
|
+
nextgencrypted
|
|
652
|
+
nextgencryptos
|
|
653
|
+
obomerang
|
|
654
|
+
oboster
|
|
655
|
+
ocky1
|
|
656
|
+
oenledger-dex
|
|
657
|
+
oepnledger-dex
|
|
658
|
+
ogpax-deposit
|
|
659
|
+
oinpayments.net
|
|
660
|
+
okex.com
|
|
661
|
+
olonie
|
|
662
|
+
oloniex
|
|
663
|
+
oomerang
|
|
664
|
+
oopenledger-dex
|
|
665
|
+
ooster
|
|
666
|
+
opeenledger-dex
|
|
667
|
+
opeledger-dex
|
|
668
|
+
opelnedger-dex
|
|
669
|
+
openedger-dex
|
|
670
|
+
openeldger-dex
|
|
671
|
+
openldeger-dex
|
|
672
|
+
openldger-dex
|
|
673
|
+
openleddger-dex
|
|
674
|
+
openledegr-dex
|
|
675
|
+
openleder-dex
|
|
676
|
+
openledge-dex
|
|
677
|
+
openledge-rdex
|
|
678
|
+
openledgeer-dex
|
|
679
|
+
openledger-ddex
|
|
680
|
+
openledger-de
|
|
681
|
+
openledger-deex
|
|
682
|
+
openledger-dx
|
|
683
|
+
openledger-dxe
|
|
684
|
+
openledger-edx
|
|
685
|
+
openledger-ex
|
|
686
|
+
openledger-pro
|
|
687
|
+
openledgerd-ex
|
|
688
|
+
openledgerdex
|
|
689
|
+
openledgerr-dex
|
|
690
|
+
openledgr-dex
|
|
691
|
+
openledgre-dex
|
|
692
|
+
openleedger-dex
|
|
693
|
+
openlegder-dex
|
|
694
|
+
openleger-dex
|
|
695
|
+
openlledger-dex
|
|
696
|
+
opennledger-dex
|
|
697
|
+
opnledger-dex
|
|
698
|
+
oppenledger-dex
|
|
699
|
+
opstpromoter
|
|
700
|
+
orcky1
|
|
701
|
+
ostpromoter
|
|
702
|
+
p-funk
|
|
703
|
+
paloniex
|
|
704
|
+
papreciator
|
|
705
|
+
paypals
|
|
706
|
+
penledger-dex
|
|
707
|
+
pextokens
|
|
708
|
+
pfuck
|
|
709
|
+
piloniex
|
|
710
|
+
plolniex
|
|
711
|
+
ploniex
|
|
712
|
+
plooniex
|
|
713
|
+
poenledger-dex
|
|
714
|
+
pokoniex
|
|
715
|
+
polaniex
|
|
716
|
+
poleniex
|
|
717
|
+
poliniex
|
|
718
|
+
polionex
|
|
719
|
+
pollniex
|
|
720
|
+
polloniex
|
|
721
|
+
polloniexx
|
|
722
|
+
pollonix
|
|
723
|
+
polniex
|
|
724
|
+
polnoiex
|
|
725
|
+
polobiex
|
|
726
|
+
poloex
|
|
727
|
+
poloiex
|
|
728
|
+
poloinex
|
|
729
|
+
pololniex
|
|
730
|
+
polomiex
|
|
731
|
+
polon
|
|
732
|
+
poloneex
|
|
733
|
+
poloneiex
|
|
734
|
+
poloneix
|
|
735
|
+
polonex
|
|
736
|
+
poloni
|
|
737
|
+
poloniax
|
|
738
|
+
polonie
|
|
739
|
+
poloniec
|
|
740
|
+
poloniecs
|
|
741
|
+
polonied
|
|
742
|
+
poloniee
|
|
743
|
+
polonieex
|
|
744
|
+
poloniek
|
|
745
|
+
polonieks
|
|
746
|
+
polonies
|
|
747
|
+
poloniet
|
|
748
|
+
poloniets
|
|
749
|
+
poloniew
|
|
750
|
+
poloniex.com
|
|
751
|
+
poloniexcold
|
|
752
|
+
poloniexcom
|
|
753
|
+
poloniexe
|
|
754
|
+
poloniexs
|
|
755
|
+
poloniext
|
|
756
|
+
poloniexwalle
|
|
757
|
+
poloniexwallet
|
|
758
|
+
poloniexx
|
|
759
|
+
poloniexxx
|
|
760
|
+
poloniey
|
|
761
|
+
poloniez
|
|
762
|
+
poloniiex
|
|
763
|
+
poloniix
|
|
764
|
+
poloniks
|
|
765
|
+
poloniox
|
|
766
|
+
polonium
|
|
767
|
+
polonix
|
|
768
|
+
polonixe
|
|
769
|
+
polonixx
|
|
770
|
+
polonniex
|
|
771
|
+
polonoiex
|
|
772
|
+
polonox
|
|
773
|
+
polonx
|
|
774
|
+
polonyex
|
|
775
|
+
polooniex
|
|
776
|
+
poluniex
|
|
777
|
+
pomobot
|
|
778
|
+
pononiex
|
|
779
|
+
poolniex
|
|
780
|
+
pooloniex
|
|
781
|
+
pooniex
|
|
782
|
+
poooniex
|
|
783
|
+
poostpromoter
|
|
784
|
+
poponiex
|
|
785
|
+
pormobot
|
|
786
|
+
posptromoter
|
|
787
|
+
posstpromoter
|
|
788
|
+
postpormoter
|
|
789
|
+
postppromoter
|
|
790
|
+
postprmooter
|
|
791
|
+
postprmoter
|
|
792
|
+
postprommoter
|
|
793
|
+
postpromoer
|
|
794
|
+
postpromooter
|
|
795
|
+
postpromote
|
|
796
|
+
postpromoteer
|
|
797
|
+
postpromoterr
|
|
798
|
+
postpromotor
|
|
799
|
+
postpromotre
|
|
800
|
+
postpromotter
|
|
801
|
+
postpromter
|
|
802
|
+
postpromtoer
|
|
803
|
+
postproomoter
|
|
804
|
+
postproomter
|
|
805
|
+
postprooter
|
|
806
|
+
postprromoter
|
|
807
|
+
postromoter
|
|
808
|
+
posttpromoter
|
|
809
|
+
potpromoter
|
|
810
|
+
potspromoter
|
|
811
|
+
ppostpromoter
|
|
812
|
+
ppreciator
|
|
813
|
+
ppromobot
|
|
814
|
+
prmobot
|
|
815
|
+
prmoobot
|
|
816
|
+
promboot
|
|
817
|
+
prombot
|
|
818
|
+
prommobot
|
|
819
|
+
promobbot
|
|
820
|
+
promobo
|
|
821
|
+
promoboot
|
|
822
|
+
promobott
|
|
823
|
+
promobt
|
|
824
|
+
promobto
|
|
825
|
+
promoobot
|
|
826
|
+
promoobt
|
|
827
|
+
promoot
|
|
828
|
+
proobot
|
|
829
|
+
proombot
|
|
830
|
+
proomobot
|
|
831
|
+
prromobot
|
|
832
|
+
pse
|
|
833
|
+
psotpromoter
|
|
834
|
+
pstpromoter
|
|
835
|
+
ptakundamianshow
|
|
836
|
+
ptunk
|
|
837
|
+
puloniex
|
|
838
|
+
qryptos
|
|
839
|
+
qryptos.com
|
|
840
|
+
randomwhale
|
|
841
|
+
randowale
|
|
842
|
+
randowhal
|
|
843
|
+
randwhale
|
|
844
|
+
rcky1
|
|
845
|
+
rcoky1
|
|
846
|
+
rdex
|
|
847
|
+
rduex
|
|
848
|
+
rendowhale
|
|
849
|
+
roccky1
|
|
850
|
+
rock1y
|
|
851
|
+
rockky1
|
|
852
|
+
rockyy1
|
|
853
|
+
rocy1
|
|
854
|
+
rocyk1
|
|
855
|
+
rokcy1
|
|
856
|
+
romobot
|
|
857
|
+
roocky1
|
|
858
|
+
rpomobot
|
|
859
|
+
rrocky1
|
|
860
|
+
rrudex
|
|
861
|
+
ruddex
|
|
862
|
+
rudeex
|
|
863
|
+
rudexx
|
|
864
|
+
rudx
|
|
865
|
+
rudxe
|
|
866
|
+
ruedx
|
|
867
|
+
ruudex
|
|
868
|
+
samrtsteem
|
|
869
|
+
sartsteem
|
|
870
|
+
scoin
|
|
871
|
+
seem
|
|
872
|
+
seemit
|
|
873
|
+
seemit2
|
|
874
|
+
seepcrypto8
|
|
875
|
+
setem
|
|
876
|
+
setemit
|
|
877
|
+
setemit2
|
|
878
|
+
shapeshif
|
|
879
|
+
shapeshift
|
|
880
|
+
smaartsteem
|
|
881
|
+
smarrtsteem
|
|
882
|
+
smarstteem
|
|
883
|
+
smartseem
|
|
884
|
+
smartsetem
|
|
885
|
+
smartstee
|
|
886
|
+
smartsteeem
|
|
887
|
+
smartsteemm
|
|
888
|
+
smartsteme
|
|
889
|
+
smartstteem
|
|
890
|
+
smartteem
|
|
891
|
+
smatrsteem
|
|
892
|
+
smmartsteem
|
|
893
|
+
smratsteem
|
|
894
|
+
smrtsteem
|
|
895
|
+
ssmartsteem
|
|
896
|
+
ssteemit2
|
|
897
|
+
steampunks
|
|
898
|
+
steeemit2
|
|
899
|
+
steeimt
|
|
900
|
+
steeimt2
|
|
901
|
+
steeit
|
|
902
|
+
steeit2
|
|
903
|
+
steemi2
|
|
904
|
+
steemi2t
|
|
905
|
+
steemitpay
|
|
906
|
+
steemitt2
|
|
907
|
+
steemmit2
|
|
908
|
+
steempay
|
|
909
|
+
steempays
|
|
910
|
+
steemt2
|
|
911
|
+
steemti2
|
|
912
|
+
steemupbit
|
|
913
|
+
stemeit
|
|
914
|
+
stemeit2
|
|
915
|
+
stemit1
|
|
916
|
+
stemit2
|
|
917
|
+
stemit3
|
|
918
|
+
stemit4
|
|
919
|
+
stteem
|
|
920
|
+
stteemit2
|
|
921
|
+
sweetsj
|
|
922
|
+
sweetssj
|
|
923
|
+
sweetsss
|
|
924
|
+
sweetsssjs
|
|
925
|
+
sweetssssj
|
|
926
|
+
swetsssj
|
|
927
|
+
tdax
|
|
928
|
+
tdax.com
|
|
929
|
+
teamsteam
|
|
930
|
+
techno-comanche
|
|
931
|
+
technocommander
|
|
932
|
+
teemit2
|
|
933
|
+
tehrising
|
|
934
|
+
terising
|
|
935
|
+
thealien
|
|
936
|
+
thebiton
|
|
937
|
+
theerising
|
|
938
|
+
theirsing
|
|
939
|
+
theising
|
|
940
|
+
theriing
|
|
941
|
+
theriising
|
|
942
|
+
theriisng
|
|
943
|
+
therisig
|
|
944
|
+
therisign
|
|
945
|
+
therisiing
|
|
946
|
+
therisingg
|
|
947
|
+
therisinng
|
|
948
|
+
therisng
|
|
949
|
+
therisnig
|
|
950
|
+
therissing
|
|
951
|
+
therocktrading
|
|
952
|
+
therrising
|
|
953
|
+
thersiing
|
|
954
|
+
thersing
|
|
955
|
+
thherising
|
|
956
|
+
threising
|
|
957
|
+
thrising
|
|
958
|
+
tidex.com
|
|
959
|
+
topbtc
|
|
960
|
+
tseem
|
|
961
|
+
tseemit
|
|
962
|
+
tseemit2
|
|
963
|
+
ttherising
|
|
964
|
+
ttrex
|
|
965
|
+
ubildawhale
|
|
966
|
+
udex
|
|
967
|
+
uhobi-pro
|
|
968
|
+
uildawhale
|
|
969
|
+
umewhale
|
|
970
|
+
umpewhale
|
|
971
|
+
underug
|
|
972
|
+
uobi-pro
|
|
973
|
+
upbbit
|
|
974
|
+
upbi
|
|
975
|
+
upbit
|
|
976
|
+
upbit.com
|
|
977
|
+
upbits
|
|
978
|
+
upbitt
|
|
979
|
+
upblt
|
|
980
|
+
upemwhale
|
|
981
|
+
upewhale
|
|
982
|
+
upm
|
|
983
|
+
upmee
|
|
984
|
+
upmeewhale
|
|
985
|
+
upmehale
|
|
986
|
+
upmehwale
|
|
987
|
+
upmewahle
|
|
988
|
+
upmewhaale
|
|
989
|
+
upmewhae
|
|
990
|
+
upmewhael
|
|
991
|
+
upmewhalee
|
|
992
|
+
upmewhalle
|
|
993
|
+
upmewhhale
|
|
994
|
+
upmewhlae
|
|
995
|
+
upmewhle
|
|
996
|
+
upmewwhale
|
|
997
|
+
upmme
|
|
998
|
+
upmmewhale
|
|
999
|
+
upmwehale
|
|
1000
|
+
upmwhale
|
|
1001
|
+
uppme
|
|
1002
|
+
uppmee
|
|
1003
|
+
uppmewhale
|
|
1004
|
+
uupmewhale
|
|
1005
|
+
vaalueup
|
|
1006
|
+
valeup
|
|
1007
|
+
valeuup
|
|
1008
|
+
vallueup
|
|
1009
|
+
valueeup
|
|
1010
|
+
valuep
|
|
1011
|
+
valuepu
|
|
1012
|
+
valueu
|
|
1013
|
+
valueupp
|
|
1014
|
+
valuuep
|
|
1015
|
+
valuueup
|
|
1016
|
+
valuup
|
|
1017
|
+
vaueup
|
|
1018
|
+
vauleup
|
|
1019
|
+
viabtc
|
|
1020
|
+
vittrex
|
|
1021
|
+
vlaueup
|
|
1022
|
+
vlueup
|
|
1023
|
+
vvalueup
|
|
1024
|
+
wallet.bitshares
|
|
1025
|
+
whaleshare
|
|
1026
|
+
www.aex.com
|
|
1027
|
+
www.binance.com
|
|
1028
|
+
www.bit-z.com
|
|
1029
|
+
www.bitfinex.com
|
|
1030
|
+
www.bithumb.com
|
|
1031
|
+
www.bitstamp.net
|
|
1032
|
+
www.bittrex.com
|
|
1033
|
+
www.coinbase.com
|
|
1034
|
+
www.coinegg.com
|
|
1035
|
+
www.coolcoin.com
|
|
1036
|
+
www.exx.com
|
|
1037
|
+
www.gatecoin.com
|
|
1038
|
+
www.gatehub.net
|
|
1039
|
+
www.gdax.com
|
|
1040
|
+
www.huobi.pro
|
|
1041
|
+
www.kraken.com
|
|
1042
|
+
www.livecoin.net
|
|
1043
|
+
www.okex.com
|
|
1044
|
+
www.poloniex.com
|
|
1045
|
+
www.qryptos.com
|
|
1046
|
+
www.xbtce.com
|
|
1047
|
+
xbtce.com
|
|
1048
|
+
ymupbit
|
|
1049
|
+
yobit
|
|
1050
|
+
yobit.net
|
|
1051
|
+
youbit
|
|
1052
|
+
yunbi
|
|
1053
|
+
zenieix
|
|
1054
|
+
`.trim().split(`
|
|
1055
|
+
`);iu.default=t2;var r2=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_i,"__esModule",{value:!0}),_i.AccountNameValidator=void 0;const n2=r2(iu);class a2{static validateAccountName(e,r){let n,a,s;if(!e)return r.accountNameWrongLength;const o=e.length;if(o<3||o>16)return r.accountNameWrongLength;if(n2.default.includes(e))return r.accountNameBadActor;const c=e.split(".");for(n=0,s=c.length;n<s;n++)if(a=c[n],!/^[a-z]/.test(a)||!/^[a-z0-9-]*$/.test(a)||!/[a-z0-9]$/.test(a)||!(a.length>=3))return r.accountNameWrongSegment;return null}}_i.AccountNameValidator=a2;var s2=J&&J.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),i2=J&&J.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cd=J&&J.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&s2(e,t,r);return i2(e,t),e},o2=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0}),$n.HtmlDOMParserError=$n.HtmlDOMParser=void 0;const dd=cd(Gs),u2=o2(Ar),l2=Nt,c2=di,fd=Wn,hd=pi,d2=Pa,f2=_i,La=cd(nu);class h2{constructor(e,r=fd.Localization.DEFAULT){this.domParser=new dd.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new dd.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,hd.AssetEmbedder.validate(e),fd.Localization.validate(r),this.options=e,this.localization=r,this.linkSanitizer=new c2.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new hd.AssetEmbedder({ipfsPrefix:this.options.ipfsPrefix,width:this.options.width,height:this.options.height,hideImages:this.options.hideImages,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,baseUrl:this.options.baseUrl},r),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(e){return this.mutate=e,this}parse(e){try{const r=this.domParser.parseFromString(e,"text/html");this.traverseDOMNode(r),this.mutate&&this.postprocessDOM(r),this.parsedDocument=r}catch(r){throw new Ei("Parsing error",r)}return this}getState(){if(!this.parsedDocument)throw new Ei("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new Ei("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(e,r=0){!e||!e.childNodes||Array.from(e.childNodes).forEach(n=>{const a=n.tagName?n.tagName.toLowerCase():null;a&&this.state.htmltags.add(a),a==="img"?this.processImgTag(n):a==="iframe"?this.processIframeTag(n):a==="a"?this.processLinkTag(n):n.nodeName==="#text"&&this.processTextNode(n),this.traverseDOMNode(n,r+1)})}processLinkTag(e){const r=e.getAttribute("href");if(r&&(this.state.links.add(r),this.mutate)){const n=e.textContent+"",a=this.linkSanitizer.sanitizeLink(r,n);if(a===!1){const s=e.ownerDocument.createElement("div");s.textContent=`${e.textContent} / ${r}`,s.setAttribute("title",this.localization.phishingWarning),s.setAttribute("class","phishy");const o=e.parentNode;o&&(o.appendChild(s),o.removeChild(e))}else e.setAttribute("href",a)}}processIframeTag(e){const r=e.getAttribute("src");if(r&&this.reportIframeLink(r),!this.mutate||(e.parentNode.tagName?e.parentNode.tagName.toLowerCase():e.parentNode.tagName)==="div"&&e.parentNode.getAttribute("class")==="videoWrapper")return;const a=this.xmlSerializer.serializeToString(e),s=this.domParser.parseFromString(`<div class="videoWrapper">${a}</div>`),o=e.parentNode;o&&(o.appendChild(s),o.removeChild(e))}reportIframeLink(e){const r=d2.YoutubeEmbedder.getYoutubeMetadataFromLink(e);r&&(this.state.links.add(r.url),this.state.images.add("https://img.youtube.com/vi/"+r.id+"/0.jpg"))}processImgTag(e){const r=e.getAttribute("src");if(r&&(this.state.images.add(r),this.mutate)){let n=this.normalizeUrl(r);/^\/\//.test(n)&&(n="https:"+n),n!==r&&e.setAttribute("src",n)}}processTextNode(e){try{const r=e.parentNode.tagName?e.parentNode.tagName.toLowerCase():e.parentNode.tagName;if(r==="code"||r==="a"||!e.data)return;const n=this.embedder.processTextNodeAndInsertEmbeds(e);n.images.forEach(o=>this.state.images.add(o)),n.links.forEach(o=>this.state.links.add(o));const a=this.xmlSerializer.serializeToString(e),s=this.linkify(a);if(this.mutate&&s!==a){const o=this.domParser.parseFromString(`<span>${s}</span>`),c=e.parentNode;return c&&(c.appendChild(o),c.removeChild(e)),o}}catch(r){l2.Log.log().error(r)}}linkify(e){return e=e.replace((0,La.any)("gi"),r=>{if(La.default.image.test(r))return this.state.images.add(r),`<img src="${this.normalizeUrl(r)}" />`;if(/\.(zip|exe)$/i.test(r))return r;const n=this.linkSanitizer.sanitizeLink(r,r);return n===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${r}</div>`:(this.state.links.add(n),`<a href="${this.normalizeUrl(r)}">${n}</a>`)}),e=e.replace(/(^|\s)(#[-a-z\d]+)/gi,r=>{if(/#[\d]+$/.test(r))return r;const n=/^\s/.test(r)?r[0]:"",s=r.trim().substring(1).toLowerCase();if(this.state.hashtags.add(s),!this.mutate)return r;const o=this.options.hashtagUrlFn(s);return n+`<a href="${o}">${r.trim()}</a>`}),e=e.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(r,n,a,s)=>{const o=s.toLowerCase(),c=f2.AccountNameValidator.validateAccountName(o,this.localization)==null;c&&this.state.usertags&&this.state.usertags.add(o);const u=(n||"")+(a||"");if(!this.mutate)return`${u}${s}`;const f=this.options.usertagUrlFn(o);return c?`${u}<a href="${f}">@${s}</a>`:`${u}@${s}`}),e}postprocessDOM(e){this.hideImagesIfNeeded(e),this.proxifyImagesIfNeeded(e)}hideImagesIfNeeded(e){if(this.mutate&&this.options.hideImages)for(const r of Array.from(e.getElementsByTagName("img"))){const n=e.createElement("pre");n.setAttribute("class","image-url-only"),n.appendChild(e.createTextNode(r.getAttribute("src")||""));const a=r.parentNode;a&&(a.appendChild(n),a.removeChild(r))}}proxifyImagesIfNeeded(e){this.mutate&&!this.options.hideImages&&this.proxifyImages(e)}proxifyImages(e){e&&Array.from(e.getElementsByTagName("img")).forEach(r=>{const n=r.getAttribute("src")||"";La.default.local.test(n)||r.setAttribute("src",this.options.imageProxyFn(n))})}normalizeUrl(e){if(this.options.ipfsPrefix&&La.default.ipfsProtocol.test(e)){const[r]=e.match(La.default.ipfsProtocol),n=e.replace(r,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${n}`}return e}}$n.HtmlDOMParser=h2;class Ei extends u2.default{constructor(e,r){super(e,r)}}$n.HtmlDOMParserError=Ei;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.PreliminarySanitizer=void 0;class ou{static preliminarySanitize(e){return ou.stripHtmlComments(e)}static stripHtmlComments(e){return e.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}}Ni.PreliminarySanitizer=ou;var Ai={},pd={},Ma={},uu={},Ia={},lu={};Object.defineProperty(lu,"__esModule",{value:!0}),lu.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(t){return t.charCodeAt(0)}));var cu={};Object.defineProperty(cu,"__esModule",{value:!0}),cu.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t){return t.charCodeAt(0)}));var du={};(function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var r=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function n(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=r.get(s))!==null&&o!==void 0?o:s}t.replaceCodePoint=n;function a(s){return(0,t.fromCodePoint)(n(s))}t.default=a})(du),function(t){var e=J&&J.__createBinding||(Object.create?function(S,P,I,W){W===void 0&&(W=I);var _=Object.getOwnPropertyDescriptor(P,I);(!_||("get"in _?!P.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return P[I]}}),Object.defineProperty(S,W,_)}:function(S,P,I,W){W===void 0&&(W=I),S[W]=P[I]}),r=J&&J.__setModuleDefault||(Object.create?function(S,P){Object.defineProperty(S,"default",{enumerable:!0,value:P})}:function(S,P){S.default=P}),n=J&&J.__importStar||function(S){if(S&&S.__esModule)return S;var P={};if(S!=null)for(var I in S)I!=="default"&&Object.prototype.hasOwnProperty.call(S,I)&&e(P,S,I);return r(P,S),P},a=J&&J.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=a(lu);t.htmlDecodeTree=s.default;var o=a(cu);t.xmlDecodeTree=o.default;var c=n(du);t.decodeCodePoint=c.default;var u=du;Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var f;(function(S){S[S.NUM=35]="NUM",S[S.SEMI=59]="SEMI",S[S.EQUALS=61]="EQUALS",S[S.ZERO=48]="ZERO",S[S.NINE=57]="NINE",S[S.LOWER_A=97]="LOWER_A",S[S.LOWER_F=102]="LOWER_F",S[S.LOWER_X=120]="LOWER_X",S[S.LOWER_Z=122]="LOWER_Z",S[S.UPPER_A=65]="UPPER_A",S[S.UPPER_F=70]="UPPER_F",S[S.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var l=32,h;(function(S){S[S.VALUE_LENGTH=49152]="VALUE_LENGTH",S[S.BRANCH_LENGTH=16256]="BRANCH_LENGTH",S[S.JUMP_TABLE=127]="JUMP_TABLE"})(h=t.BinTrieFlags||(t.BinTrieFlags={}));function d(S){return S>=f.ZERO&&S<=f.NINE}function m(S){return S>=f.UPPER_A&&S<=f.UPPER_F||S>=f.LOWER_A&&S<=f.LOWER_F}function b(S){return S>=f.UPPER_A&&S<=f.UPPER_Z||S>=f.LOWER_A&&S<=f.LOWER_Z||d(S)}function x(S){return S===f.EQUALS||b(S)}var y;(function(S){S[S.EntityStart=0]="EntityStart",S[S.NumericStart=1]="NumericStart",S[S.NumericDecimal=2]="NumericDecimal",S[S.NumericHex=3]="NumericHex",S[S.NamedEntity=4]="NamedEntity"})(y||(y={}));var g;(function(S){S[S.Legacy=0]="Legacy",S[S.Strict=1]="Strict",S[S.Attribute=2]="Attribute"})(g=t.DecodingMode||(t.DecodingMode={}));var E=function(){function S(P,I,W){this.decodeTree=P,this.emitCodePoint=I,this.errors=W,this.state=y.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return S.prototype.startEntity=function(P){this.decodeMode=P,this.state=y.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},S.prototype.write=function(P,I){switch(this.state){case y.EntityStart:return P.charCodeAt(I)===f.NUM?(this.state=y.NumericStart,this.consumed+=1,this.stateNumericStart(P,I+1)):(this.state=y.NamedEntity,this.stateNamedEntity(P,I));case y.NumericStart:return this.stateNumericStart(P,I);case y.NumericDecimal:return this.stateNumericDecimal(P,I);case y.NumericHex:return this.stateNumericHex(P,I);case y.NamedEntity:return this.stateNamedEntity(P,I)}},S.prototype.stateNumericStart=function(P,I){return I>=P.length?-1:(P.charCodeAt(I)|l)===f.LOWER_X?(this.state=y.NumericHex,this.consumed+=1,this.stateNumericHex(P,I+1)):(this.state=y.NumericDecimal,this.stateNumericDecimal(P,I))},S.prototype.addToNumericResult=function(P,I,W,_){if(I!==W){var M=W-I;this.result=this.result*Math.pow(_,M)+parseInt(P.substr(I,M),_),this.consumed+=M}},S.prototype.stateNumericHex=function(P,I){for(var W=I;I<P.length;){var _=P.charCodeAt(I);if(d(_)||m(_))I+=1;else return this.addToNumericResult(P,W,I,16),this.emitNumericEntity(_,3)}return this.addToNumericResult(P,W,I,16),-1},S.prototype.stateNumericDecimal=function(P,I){for(var W=I;I<P.length;){var _=P.charCodeAt(I);if(d(_))I+=1;else return this.addToNumericResult(P,W,I,10),this.emitNumericEntity(_,2)}return this.addToNumericResult(P,W,I,10),-1},S.prototype.emitNumericEntity=function(P,I){var W;if(this.consumed<=I)return(W=this.errors)===null||W===void 0||W.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(P===f.SEMI)this.consumed+=1;else if(this.decodeMode===g.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(P!==f.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},S.prototype.stateNamedEntity=function(P,I){for(var W=this.decodeTree,_=W[this.treeIndex],M=(_&h.VALUE_LENGTH)>>14;I<P.length;I++,this.excess++){var O=P.charCodeAt(I);if(this.treeIndex=w(W,_,this.treeIndex+Math.max(1,M),O),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(M===0||x(O))?0:this.emitNotTerminatedNamedEntity();if(_=W[this.treeIndex],M=(_&h.VALUE_LENGTH)>>14,M!==0){if(O===f.SEMI)return this.emitNamedEntityData(this.treeIndex,M,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},S.prototype.emitNotTerminatedNamedEntity=function(){var P,I=this,W=I.result,_=I.decodeTree,M=(_[W]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(W,M,this.consumed),(P=this.errors)===null||P===void 0||P.missingSemicolonAfterCharacterReference(),this.consumed},S.prototype.emitNamedEntityData=function(P,I,W){var _=this.decodeTree;return this.emitCodePoint(I===1?_[P]&~h.VALUE_LENGTH:_[P+1],W),I===3&&this.emitCodePoint(_[P+2],W),W},S.prototype.end=function(){var P;switch(this.state){case y.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case y.NumericDecimal:return this.emitNumericEntity(0,2);case y.NumericHex:return this.emitNumericEntity(0,3);case y.NumericStart:return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case y.EntityStart:return 0}},S}();t.EntityDecoder=E;function D(S){var P="",I=new E(S,function(W){return P+=(0,c.fromCodePoint)(W)});return function(_,M){for(var O=0,G=0;(G=_.indexOf("&",G))>=0;){P+=_.slice(O,G),I.startEntity(M);var B=I.write(_,G+1);if(B<0){O=G+I.end();break}O=G+B,G=B===0?O+1:O}var K=P+_.slice(O);return P="",K}}function w(S,P,I,W){var _=(P&h.BRANCH_LENGTH)>>7,M=P&h.JUMP_TABLE;if(_===0)return M!==0&&W===M?I:-1;if(M){var O=W-M;return O<0||O>=_?-1:S[I+O]-1}for(var G=I,B=G+_-1;G<=B;){var K=G+B>>>1,X=S[K];if(X<W)G=K+1;else if(X>W)B=K-1;else return S[K+_]}return-1}t.determineBranch=w;var j=D(s.default),p=D(o.default);function A(S,P){return P===void 0&&(P=g.Legacy),j(S,P)}t.decodeHTML=A;function k(S){return j(S,g.Attribute)}t.decodeHTMLAttribute=k;function U(S){return j(S,g.Strict)}t.decodeHTMLStrict=U;function H(S){return p(S,g.Strict)}t.decodeXML=H}(Ia),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ia,r;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(n||(n={}));function a(d){return d===r.Space||d===r.NewLine||d===r.Tab||d===r.FormFeed||d===r.CarriageReturn}function s(d){return d===r.Slash||d===r.Gt||a(d)}function o(d){return d>=r.Zero&&d<=r.Nine}function c(d){return d>=r.LowerA&&d<=r.LowerZ||d>=r.UpperA&&d<=r.UpperZ}function u(d){return d>=r.UpperA&&d<=r.UpperF||d>=r.LowerA&&d<=r.LowerF}var f;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(f=t.QuoteType||(t.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=function(){function d(m,b){var x=m.xmlMode,y=x===void 0?!1:x,g=m.decodeEntities,E=g===void 0?!0:g;this.cbs=b,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=y,this.decodeEntities=E,this.entityTrie=y?e.xmlDecodeTree:e.htmlDecodeTree}return d.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(m){this.offset+=this.buffer.length,this.buffer=m,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},d.prototype.getIndex=function(){return this.index},d.prototype.getSectionStart=function(){return this.sectionStart},d.prototype.stateText=function(m){m===r.Lt||!this.decodeEntities&&this.fastForwardTo(r.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&m===r.Amp&&(this.state=n.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(m){var b=this.sequenceIndex===this.currentSequence.length,x=b?s(m):(m|32)===this.currentSequence[this.sequenceIndex];if(!x)this.isSpecial=!1;else if(!b){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(m)},d.prototype.stateInSpecialTag=function(m){if(this.sequenceIndex===this.currentSequence.length){if(m===r.Gt||a(m)){var b=this.index-this.currentSequence.length;if(this.sectionStart<b){var x=this.index;this.index=b,this.cbs.ontext(this.sectionStart,b),this.index=x}this.isSpecial=!1,this.sectionStart=b+2,this.stateInClosingTagName(m);return}this.sequenceIndex=0}(m|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===l.TitleEnd?this.decodeEntities&&m===r.Amp&&(this.state=n.BeforeEntity):this.fastForwardTo(r.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(m===r.Lt)},d.prototype.stateCDATASequence=function(m){m===l.Cdata[this.sequenceIndex]?++this.sequenceIndex===l.Cdata.length&&(this.state=n.InCommentLike,this.currentSequence=l.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=n.InDeclaration,this.stateInDeclaration(m))},d.prototype.fastForwardTo=function(m){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===m)return!0;return this.index=this.buffer.length+this.offset-1,!1},d.prototype.stateInCommentLike=function(m){m===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=n.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):m!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},d.prototype.isTagStartChar=function(m){return this.xmlMode?!s(m):c(m)},d.prototype.startSpecial=function(m,b){this.isSpecial=!0,this.currentSequence=m,this.sequenceIndex=b,this.state=n.SpecialStartSequence},d.prototype.stateBeforeTagName=function(m){if(m===r.ExclamationMark)this.state=n.BeforeDeclaration,this.sectionStart=this.index+1;else if(m===r.Questionmark)this.state=n.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(m)){var b=m|32;this.sectionStart=this.index,!this.xmlMode&&b===l.TitleEnd[2]?this.startSpecial(l.TitleEnd,3):this.state=!this.xmlMode&&b===l.ScriptEnd[2]?n.BeforeSpecialS:n.InTagName}else m===r.Slash?this.state=n.BeforeClosingTagName:(this.state=n.Text,this.stateText(m))},d.prototype.stateInTagName=function(m){s(m)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(m))},d.prototype.stateBeforeClosingTagName=function(m){a(m)||(m===r.Gt?this.state=n.Text:(this.state=this.isTagStartChar(m)?n.InClosingTagName:n.InSpecialComment,this.sectionStart=this.index))},d.prototype.stateInClosingTagName=function(m){(m===r.Gt||a(m))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterClosingTagName,this.stateAfterClosingTagName(m))},d.prototype.stateAfterClosingTagName=function(m){(m===r.Gt||this.fastForwardTo(r.Gt))&&(this.state=n.Text,this.baseState=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeAttributeName=function(m){m===r.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=n.InSpecialTag,this.sequenceIndex=0):this.state=n.Text,this.baseState=this.state,this.sectionStart=this.index+1):m===r.Slash?this.state=n.InSelfClosingTag:a(m)||(this.state=n.InAttributeName,this.sectionStart=this.index)},d.prototype.stateInSelfClosingTag=function(m){m===r.Gt?(this.cbs.onselfclosingtag(this.index),this.state=n.Text,this.baseState=n.Text,this.sectionStart=this.index+1,this.isSpecial=!1):a(m)||(this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(m))},d.prototype.stateInAttributeName=function(m){(m===r.Eq||s(m))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterAttributeName,this.stateAfterAttributeName(m))},d.prototype.stateAfterAttributeName=function(m){m===r.Eq?this.state=n.BeforeAttributeValue:m===r.Slash||m===r.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(m)):a(m)||(this.cbs.onattribend(f.NoValue,this.index),this.state=n.InAttributeName,this.sectionStart=this.index)},d.prototype.stateBeforeAttributeValue=function(m){m===r.DoubleQuote?(this.state=n.InAttributeValueDq,this.sectionStart=this.index+1):m===r.SingleQuote?(this.state=n.InAttributeValueSq,this.sectionStart=this.index+1):a(m)||(this.sectionStart=this.index,this.state=n.InAttributeValueNq,this.stateInAttributeValueNoQuotes(m))},d.prototype.handleInAttributeValue=function(m,b){m===b||!this.decodeEntities&&this.fastForwardTo(b)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(b===r.DoubleQuote?f.Double:f.Single,this.index),this.state=n.BeforeAttributeName):this.decodeEntities&&m===r.Amp&&(this.baseState=this.state,this.state=n.BeforeEntity)},d.prototype.stateInAttributeValueDoubleQuotes=function(m){this.handleInAttributeValue(m,r.DoubleQuote)},d.prototype.stateInAttributeValueSingleQuotes=function(m){this.handleInAttributeValue(m,r.SingleQuote)},d.prototype.stateInAttributeValueNoQuotes=function(m){a(m)||m===r.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(m)):this.decodeEntities&&m===r.Amp&&(this.baseState=this.state,this.state=n.BeforeEntity)},d.prototype.stateBeforeDeclaration=function(m){m===r.OpeningSquareBracket?(this.state=n.CDATASequence,this.sequenceIndex=0):this.state=m===r.Dash?n.BeforeComment:n.InDeclaration},d.prototype.stateInDeclaration=function(m){(m===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateInProcessingInstruction=function(m){(m===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeComment=function(m){m===r.Dash?(this.state=n.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=n.InDeclaration},d.prototype.stateInSpecialComment=function(m){(m===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeSpecialS=function(m){var b=m|32;b===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):b===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=n.InTagName,this.stateInTagName(m))},d.prototype.stateBeforeEntity=function(m){this.entityExcess=1,this.entityResult=0,m===r.Number?this.state=n.BeforeNumericEntity:m===r.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=n.InNamedEntity,this.stateInNamedEntity(m))},d.prototype.stateInNamedEntity=function(m){if(this.entityExcess+=1,this.trieIndex=(0,e.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,m),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var b=this.trieCurrent&e.BinTrieFlags.VALUE_LENGTH;if(b){var x=(b>>14)-1;if(!this.allowLegacyEntity()&&m!==r.Semi)this.trieIndex+=x;else{var y=this.index-this.entityExcess+1;y>this.sectionStart&&this.emitPartial(this.sectionStart,y),this.entityResult=this.trieIndex,this.trieIndex+=x,this.entityExcess=0,this.sectionStart=this.index+1,x===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var m=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(m){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(m){(m|32)===r.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(m))},d.prototype.emitNumericEntity=function(m){var b=this.index-this.entityExcess-1,x=b+2+ +(this.state===n.InHexEntity);x!==this.index&&(b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.sectionStart=this.index+Number(m),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(m){m===r.Semi?this.emitNumericEntity(!0):o(m)?(this.entityResult=this.entityResult*10+(m-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(m){m===r.Semi?this.emitNumericEntity(!0):o(m)?(this.entityResult=this.entityResult*16+(m-r.Zero),this.entityExcess++):u(m)?(this.entityResult=this.entityResult*16+((m|32)-r.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},d.prototype.parse=function(){for(;this.shouldContinue();){var m=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case n.Text:{this.stateText(m);break}case n.SpecialStartSequence:{this.stateSpecialStartSequence(m);break}case n.InSpecialTag:{this.stateInSpecialTag(m);break}case n.CDATASequence:{this.stateCDATASequence(m);break}case n.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(m);break}case n.InAttributeName:{this.stateInAttributeName(m);break}case n.InCommentLike:{this.stateInCommentLike(m);break}case n.InSpecialComment:{this.stateInSpecialComment(m);break}case n.BeforeAttributeName:{this.stateBeforeAttributeName(m);break}case n.InTagName:{this.stateInTagName(m);break}case n.InClosingTagName:{this.stateInClosingTagName(m);break}case n.BeforeTagName:{this.stateBeforeTagName(m);break}case n.AfterAttributeName:{this.stateAfterAttributeName(m);break}case n.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(m);break}case n.BeforeAttributeValue:{this.stateBeforeAttributeValue(m);break}case n.BeforeClosingTagName:{this.stateBeforeClosingTagName(m);break}case n.AfterClosingTagName:{this.stateAfterClosingTagName(m);break}case n.BeforeSpecialS:{this.stateBeforeSpecialS(m);break}case n.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(m);break}case n.InSelfClosingTag:{this.stateInSelfClosingTag(m);break}case n.InDeclaration:{this.stateInDeclaration(m);break}case n.BeforeDeclaration:{this.stateBeforeDeclaration(m);break}case n.BeforeComment:{this.stateBeforeComment(m);break}case n.InProcessingInstruction:{this.stateInProcessingInstruction(m);break}case n.InNamedEntity:{this.stateInNamedEntity(m);break}case n.BeforeEntity:{this.stateBeforeEntity(m);break}case n.InHexEntity:{this.stateInHexEntity(m);break}case n.InNumericEntity:{this.stateInNumericEntity(m);break}default:this.stateBeforeNumericEntity(m)}this.index++}this.cleanup()},d.prototype.finish=function(){this.state===n.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},d.prototype.handleTrailingData=function(){var m=this.buffer.length+this.offset;this.state===n.InCommentLike?this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,m,0):this.cbs.oncomment(this.sectionStart,m,0):this.state===n.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===n.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,m)},d.prototype.emitPartial=function(m,b){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?this.cbs.onattribdata(m,b):this.cbs.ontext(m,b)},d.prototype.emitCodePoint=function(m){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?this.cbs.onattribentity(m):this.cbs.ontextentity(m)},d}();t.default=h}(uu);var p2=J&&J.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),m2=J&&J.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),g2=J&&J.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&p2(e,t,r);return m2(e,t),e};Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.Parser=void 0;var ki=g2(uu),md=Ia,Gn=new Set(["input","option","optgroup","select","button","datalist","textarea"]),we=new Set(["p"]),gd=new Set(["thead","tbody"]),bd=new Set(["dd","dt"]),xd=new Set(["rt","rp"]),b2=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",we],["h1",we],["h2",we],["h3",we],["h4",we],["h5",we],["h6",we],["select",Gn],["input",Gn],["output",Gn],["button",Gn],["datalist",Gn],["textarea",Gn],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",bd],["dt",bd],["address",we],["article",we],["aside",we],["blockquote",we],["details",we],["div",we],["dl",we],["fieldset",we],["figcaption",we],["figure",we],["footer",we],["form",we],["header",we],["hr",we],["main",we],["nav",we],["ol",we],["pre",we],["section",we],["table",we],["ul",we],["rt",xd],["rp",xd],["tbody",gd],["tfoot",gd]]),x2=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),yd=new Set(["math","svg"]),vd=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),y2=/\s|\//,v2=function(){function t(e,r){r===void 0&&(r={});var n,a,s,o,c;this.options=r,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=e??{},this.lowerCaseTagNames=(n=r.lowerCaseTags)!==null&&n!==void 0?n:!r.xmlMode,this.lowerCaseAttributeNames=(a=r.lowerCaseAttributeNames)!==null&&a!==void 0?a:!r.xmlMode,this.tokenizer=new((s=r.Tokenizer)!==null&&s!==void 0?s:ki.default)(this.options,this),(c=(o=this.cbs).onparserinit)===null||c===void 0||c.call(o,this)}return t.prototype.ontext=function(e,r){var n,a,s=this.getSlice(e,r);this.endIndex=r-1,(a=(n=this.cbs).ontext)===null||a===void 0||a.call(n,s),this.startIndex=r},t.prototype.ontextentity=function(e){var r,n,a=this.tokenizer.getSectionStart();this.endIndex=a-1,(n=(r=this.cbs).ontext)===null||n===void 0||n.call(r,(0,md.fromCodePoint)(e)),this.startIndex=a},t.prototype.isVoidElement=function(e){return!this.options.xmlMode&&x2.has(e)},t.prototype.onopentagname=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)},t.prototype.emitOpenTag=function(e){var r,n,a,s;this.openTagStart=this.startIndex,this.tagname=e;var o=!this.options.xmlMode&&b2.get(e);if(o)for(;this.stack.length>0&&o.has(this.stack[this.stack.length-1]);){var c=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,c,!0)}this.isVoidElement(e)||(this.stack.push(e),yd.has(e)?this.foreignContext.push(!0):vd.has(e)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,c,u;this.endIndex=r;var f=this.getSlice(e,r);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),(yd.has(f)||vd.has(f))&&this.foreignContext.pop(),this.isVoidElement(f))!this.options.xmlMode&&f==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(u=(c=this.cbs).onclosetag)===null||u===void 0||u.call(c,"br",!1));else{var l=this.stack.lastIndexOf(f);if(l!==-1)if(this.cbs.onclosetag)for(var h=this.stack.length-l;h--;)this.cbs.onclosetag(this.stack.pop(),h!==0);else this.stack.length=l;else!this.options.xmlMode&&f==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.pop())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,md.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===ki.QuoteType.Double?'"':e===ki.QuoteType.Single?"'":e===ki.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(y2),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,c;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(c=(o=this.cbs).oncommentend)===null||c===void 0||c.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,c,u,f,l,h,d,m;this.endIndex=r;var b=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(c=(o=this.cbs).ontext)===null||c===void 0||c.call(o,b),(f=(u=this.cbs).oncdataend)===null||f===void 0||f.call(u)):((h=(l=this.cbs).oncomment)===null||h===void 0||h.call(l,"[CDATA[".concat(b,"]]")),(m=(d=this.cbs).oncommentend)===null||m===void 0||m.call(d)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,n,a;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.getSlice=function(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},t.prototype.parseChunk=function(e){this.write(e)},t.prototype.done=function(e){this.end(e)},t}();Ma.Parser=v2;var dr={},Jn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function r(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}t.isTag=r,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})(Jn);var me={},jr=J&&J.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fa=J&&J.__assign||function(){return Fa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Fa.apply(this,arguments)};Object.defineProperty(me,"__esModule",{value:!0}),me.cloneNode=me.hasChildren=me.isDocument=me.isDirective=me.isComment=me.isText=me.isCDATA=me.isTag=me.Element=me.Document=me.CDATA=me.NodeWithChildren=me.ProcessingInstruction=me.Comment=me.Text=me.DataNode=me.Node=void 0;var xt=Jn,fu=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),hu(this,e)},t}();me.Node=fu;var ji=function(t){jr(e,t);function e(r){var n=t.call(this)||this;return n.data=r,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),e}(fu);me.DataNode=ji;var wd=function(t){jr(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=xt.ElementType.Text,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(ji);me.Text=wd;var _d=function(t){jr(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=xt.ElementType.Comment,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(ji);me.Comment=_d;var Ed=function(t){jr(e,t);function e(r,n){var a=t.call(this,n)||this;return a.name=r,a.type=xt.ElementType.Directive,a}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(ji);me.ProcessingInstruction=Ed;var Si=function(t){jr(e,t);function e(r){var n=t.call(this)||this;return n.children=r,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(fu);me.NodeWithChildren=Si;var Nd=function(t){jr(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=xt.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Si);me.CDATA=Nd;var Ad=function(t){jr(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=xt.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Si);me.Document=Ad;var kd=function(t){jr(e,t);function e(r,n,a,s){a===void 0&&(a=[]),s===void 0&&(s=r==="script"?xt.ElementType.Script:r==="style"?xt.ElementType.Style:xt.ElementType.Tag);var o=t.call(this,a)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var a,s;return{name:n,value:r.attribs[n],namespace:(a=r["x-attribsNamespace"])===null||a===void 0?void 0:a[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),e}(Si);me.Element=kd;function jd(t){return(0,xt.isTag)(t)}me.isTag=jd;function Sd(t){return t.type===xt.ElementType.CDATA}me.isCDATA=Sd;function Dd(t){return t.type===xt.ElementType.Text}me.isText=Dd;function Td(t){return t.type===xt.ElementType.Comment}me.isComment=Td;function Cd(t){return t.type===xt.ElementType.Directive}me.isDirective=Cd;function Od(t){return t.type===xt.ElementType.Root}me.isDocument=Od;function w2(t){return Object.prototype.hasOwnProperty.call(t,"children")}me.hasChildren=w2;function hu(t,e){e===void 0&&(e=!1);var r;if(Dd(t))r=new wd(t.data);else if(Td(t))r=new _d(t.data);else if(jd(t)){var n=e?pu(t.children):[],a=new kd(t.name,Fa({},t.attribs),n);n.forEach(function(u){return u.parent=a}),t.namespace!=null&&(a.namespace=t.namespace),t["x-attribsNamespace"]&&(a["x-attribsNamespace"]=Fa({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(a["x-attribsPrefix"]=Fa({},t["x-attribsPrefix"])),r=a}else if(Sd(t)){var n=e?pu(t.children):[],s=new Nd(n);n.forEach(function(f){return f.parent=s}),r=s}else if(Od(t)){var n=e?pu(t.children):[],o=new Ad(n);n.forEach(function(f){return f.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),r=o}else if(Cd(t)){var c=new Ed(t.name,t.data);t["x-name"]!=null&&(c["x-name"]=t["x-name"],c["x-publicId"]=t["x-publicId"],c["x-systemId"]=t["x-systemId"]),r=c}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}me.cloneNode=hu;function pu(t){for(var e=t.map(function(n){return hu(n,!0)}),r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}(function(t){var e=J&&J.__createBinding||(Object.create?function(c,u,f,l){l===void 0&&(l=f);var h=Object.getOwnPropertyDescriptor(u,f);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(c,l,h)}:function(c,u,f,l){l===void 0&&(l=f),c[l]=u[f]}),r=J&&J.__exportStar||function(c,u){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&e(u,c,f)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var n=Jn,a=me;r(me,t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function c(u,f,l){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(l=f,f=s),typeof u=="object"&&(f=u,u=void 0),this.callback=u??null,this.options=f??s,this.elementCB=l??null}return c.prototype.onparserinit=function(u){this.parser=u},c.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(u){this.handleCallback(u)},c.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},c.prototype.onopentag=function(u,f){var l=this.options.xmlMode?n.ElementType.Tag:void 0,h=new a.Element(u,f,void 0,l);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(u){var f=this.lastNode;if(f&&f.type===n.ElementType.Text)f.data+=u,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var l=new a.Text(u);this.addNode(l),this.lastNode=l}},c.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=u;return}var f=new a.Comment(u);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var u=new a.Text(""),f=new a.CDATA([u]);this.addNode(f),u.parent=f,this.lastNode=u},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(u,f){var l=new a.ProcessingInstruction(u,f);this.addNode(l)},c.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},c.prototype.addNode=function(u){var f=this.tagStack[this.tagStack.length-1],l=f.children[f.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),f.children.push(u),l&&(u.prev=l,l.next=u),u.parent=f,this.lastNode=null},c}();t.DomHandler=o,t.default=o})(dr);var Di={},Sr={},Ba={},$d={},tn={},mu={};Object.defineProperty(mu,"__esModule",{value:!0});function Ti(t){for(var e=1;e<t.length;e++)t[e][0]+=t[e-1][0]+1;return t}mu.default=new Map(Ti([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(Ti([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(Ti([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(Ti([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]));var Ci={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function r(a){for(var s="",o=0,c;(c=t.xmlReplacer.exec(a))!==null;){var u=c.index,f=a.charCodeAt(u),l=e.get(f);l!==void 0?(s+=a.substring(o,u)+l,o=u+1):(s+="".concat(a.substring(o,u),"&#x").concat((0,t.getCodePoint)(a,u).toString(16),";"),o=t.xmlReplacer.lastIndex+=+((f&64512)===55296))}return s+a.substr(o)}t.encodeXML=r,t.escape=r;function n(a,s){return function(c){for(var u,f=0,l="";u=a.exec(c);)f!==u.index&&(l+=c.substring(f,u.index)),l+=s.get(u[0].charCodeAt(0)),f=u.index+1;return l+c.substring(f)}}t.escapeUTF8=n(/[&<>'"]/g,e),t.escapeAttribute=n(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=n(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Ci);var _2=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tn,"__esModule",{value:!0}),tn.encodeNonAsciiHTML=tn.encodeHTML=void 0;var E2=_2(mu),Pd=Ci,N2=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function A2(t){return Ld(N2,t)}tn.encodeHTML=A2;function k2(t){return Ld(Pd.xmlReplacer,t)}tn.encodeNonAsciiHTML=k2;function Ld(t,e){for(var r="",n=0,a;(a=t.exec(e))!==null;){var s=a.index;r+=e.substring(n,s);var o=e.charCodeAt(s),c=E2.default.get(o);if(typeof c=="object"){if(s+1<e.length){var u=e.charCodeAt(s+1),f=typeof c.n=="number"?c.n===u?c.o:void 0:c.n.get(u);if(f!==void 0){r+=f,n=t.lastIndex+=1;continue}}c=c.v}if(c!==void 0)r+=c,n=s+1;else{var l=(0,Pd.getCodePoint)(e,s);r+="&#x".concat(l.toString(16),";"),n=t.lastIndex+=+(l!==o)}}return r+e.substr(n)}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var e=Ia,r=tn,n=Ci,a;(function(d){d[d.XML=0]="XML",d[d.HTML=1]="HTML"})(a=t.EntityLevel||(t.EntityLevel={}));var s;(function(d){d[d.UTF8=0]="UTF8",d[d.ASCII=1]="ASCII",d[d.Extensive=2]="Extensive",d[d.Attribute=3]="Attribute",d[d.Text=4]="Text"})(s=t.EncodingMode||(t.EncodingMode={}));function o(d,m){m===void 0&&(m=a.XML);var b=typeof m=="number"?m:m.level;if(b===a.HTML){var x=typeof m=="object"?m.mode:void 0;return(0,e.decodeHTML)(d,x)}return(0,e.decodeXML)(d)}t.decode=o;function c(d,m){var b;m===void 0&&(m=a.XML);var x=typeof m=="number"?{level:m}:m;return(b=x.mode)!==null&&b!==void 0||(x.mode=e.DecodingMode.Strict),o(d,x)}t.decodeStrict=c;function u(d,m){m===void 0&&(m=a.XML);var b=typeof m=="number"?{level:m}:m;return b.mode===s.UTF8?(0,n.escapeUTF8)(d):b.mode===s.Attribute?(0,n.escapeAttribute)(d):b.mode===s.Text?(0,n.escapeText)(d):b.level===a.HTML?b.mode===s.ASCII?(0,r.encodeNonAsciiHTML)(d):(0,r.encodeHTML)(d):(0,n.encodeXML)(d)}t.encode=u;var f=Ci;Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var l=tn;Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return l.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return l.encodeHTML}});var h=Ia;Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})($d);var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.attributeNames=Yn.elementNames=void 0,Yn.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(t){return[t.toLowerCase(),t]})),Yn.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(t){return[t.toLowerCase(),t]}));var Zn=J&&J.__assign||function(){return Zn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Zn.apply(this,arguments)},j2=J&&J.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),S2=J&&J.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),D2=J&&J.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j2(e,t,r);return S2(e,t),e};Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.render=void 0;var fr=D2(Jn),Oi=$d,Md=Yn,T2=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function C2(t){return t.replace(/"/g,""")}function O2(t,e){var r;if(t){var n=((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)===!1?C2:e.xmlMode||e.encodeEntities!=="utf8"?Oi.encodeXML:Oi.escapeAttribute;return Object.keys(t).map(function(a){var s,o,c=(s=t[a])!==null&&s!==void 0?s:"";return e.xmlMode==="foreign"&&(a=(o=Md.attributeNames.get(a))!==null&&o!==void 0?o:a),!e.emptyAttrs&&!e.xmlMode&&c===""?a:"".concat(a,'="').concat(n(c),'"')}).join(" ")}}var Id=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function $i(t,e){e===void 0&&(e={});for(var r=("length"in t)?t:[t],n="",a=0;a<r.length;a++)n+=$2(r[a],e);return n}Ba.render=$i,Ba.default=$i;function $2(t,e){switch(t.type){case fr.Root:return $i(t.children,e);case fr.Doctype:case fr.Directive:return I2(t);case fr.Comment:return V2(t);case fr.CDATA:return B2(t);case fr.Script:case fr.Style:case fr.Tag:return M2(t,e);case fr.Text:return F2(t,e)}}var P2=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),L2=new Set(["svg","math"]);function M2(t,e){var r;e.xmlMode==="foreign"&&(t.name=(r=Md.elementNames.get(t.name))!==null&&r!==void 0?r:t.name,t.parent&&P2.has(t.parent.name)&&(e=Zn(Zn({},e),{xmlMode:!1}))),!e.xmlMode&&L2.has(t.name)&&(e=Zn(Zn({},e),{xmlMode:"foreign"}));var n="<".concat(t.name),a=O2(t.attribs,e);return a&&(n+=" ".concat(a)),t.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&Id.has(t.name))?(e.xmlMode||(n+=" "),n+="/>"):(n+=">",t.children.length>0&&(n+=$i(t.children,e)),(e.xmlMode||!Id.has(t.name))&&(n+="</".concat(t.name,">"))),n}function I2(t){return"<".concat(t.data,">")}function F2(t,e){var r,n=t.data||"";return((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&T2.has(t.parent.name))&&(n=e.xmlMode||e.encodeEntities!=="utf8"?(0,Oi.encodeXML)(n):(0,Oi.escapeText)(n)),n}function B2(t){return"<![CDATA[".concat(t.children[0].data,"]]>")}function V2(t){return"<!--".concat(t.data,"-->")}var q2=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.getOuterHTML=Fd,Sr.getInnerHTML=z2,Sr.getText=Pi,Sr.textContent=gu,Sr.innerText=bu;var Yt=dr,U2=q2(Ba),R2=Jn;function Fd(t,e){return(0,U2.default)(t,e)}function z2(t,e){return(0,Yt.hasChildren)(t)?t.children.map(function(r){return Fd(r,e)}).join(""):""}function Pi(t){return Array.isArray(t)?t.map(Pi).join(""):(0,Yt.isTag)(t)?t.name==="br"?`
|
|
1056
|
+
`:Pi(t.children):(0,Yt.isCDATA)(t)?Pi(t.children):(0,Yt.isText)(t)?t.data:""}function gu(t){return Array.isArray(t)?t.map(gu).join(""):(0,Yt.hasChildren)(t)&&!(0,Yt.isComment)(t)?gu(t.children):(0,Yt.isText)(t)?t.data:""}function bu(t){return Array.isArray(t)?t.map(bu).join(""):(0,Yt.hasChildren)(t)&&(t.type===R2.ElementType.Tag||(0,Yt.isCDATA)(t))?bu(t.children):(0,Yt.isText)(t)?t.data:""}var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getChildren=Bd,Zt.getParent=Vd,Zt.getSiblings=H2,Zt.getAttributeValue=W2,Zt.hasAttrib=G2,Zt.getName=J2,Zt.nextElementSibling=Y2,Zt.prevElementSibling=Z2;var xu=dr;function Bd(t){return(0,xu.hasChildren)(t)?t.children:[]}function Vd(t){return t.parent||null}function H2(t){var e,r,n=Vd(t);if(n!=null)return Bd(n);for(var a=[t],s=t.prev,o=t.next;s!=null;)a.unshift(s),e=s,s=e.prev;for(;o!=null;)a.push(o),r=o,o=r.next;return a}function W2(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}function G2(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function J2(t){return t.name}function Y2(t){for(var e,r=t.next;r!==null&&!(0,xu.isTag)(r);)e=r,r=e.next;return r}function Z2(t){for(var e,r=t.prev;r!==null&&!(0,xu.isTag)(r);)e=r,r=e.prev;return r}var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.removeElement=Va,Dr.replaceElement=X2,Dr.appendChild=K2,Dr.append=Q2,Dr.prependChild=e1,Dr.prepend=t1;function Va(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}function X2(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var a=e.parent=t.parent;if(a){var s=a.children;s[s.lastIndexOf(t)]=e,t.parent=null}}function K2(t,e){if(Va(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}function Q2(t,e){Va(e);var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var a=r.children;a.splice(a.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}function e1(t,e){if(Va(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var r=t.children[1];r.prev=e,e.next=r}else e.next=null}function t1(t,e){Va(e);var r=t.parent;if(r){var n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}var hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.filter=r1,hr.find=qd,hr.findOneChild=n1,hr.findOne=Ud,hr.existsOne=Rd,hr.findAll=a1;var rn=dr;function r1(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),qd(t,Array.isArray(e)?e:[e],r,n)}function qd(t,e,r,n){for(var a=[],s=[Array.isArray(e)?e:[e]],o=[0];;){if(o[0]>=s[0].length){if(o.length===1)return a;s.shift(),o.shift();continue}var c=s[0][o[0]++];if(t(c)&&(a.push(c),--n<=0))return a;r&&(0,rn.hasChildren)(c)&&c.children.length>0&&(o.unshift(0),s.unshift(c.children))}}function n1(t,e){return e.find(t)}function Ud(t,e,r){r===void 0&&(r=!0);for(var n=Array.isArray(e)?e:[e],a=0;a<n.length;a++){var s=n[a];if((0,rn.isTag)(s)&&t(s))return s;if(r&&(0,rn.hasChildren)(s)&&s.children.length>0){var o=Ud(t,s.children,!0);if(o)return o}}return null}function Rd(t,e){return(Array.isArray(e)?e:[e]).some(function(r){return(0,rn.isTag)(r)&&t(r)||(0,rn.hasChildren)(r)&&Rd(t,r.children)})}function a1(t,e){for(var r=[],n=[Array.isArray(e)?e:[e]],a=[0];;){if(a[0]>=n[0].length){if(n.length===1)return r;n.shift(),a.shift();continue}var s=n[0][a[0]++];(0,rn.isTag)(s)&&t(s)&&r.push(s),(0,rn.hasChildren)(s)&&s.children.length>0&&(a.unshift(0),n.unshift(s.children))}}var pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.testElement=i1,pr.getElements=o1,pr.getElementById=u1,pr.getElementsByTagName=l1,pr.getElementsByClassName=c1,pr.getElementsByTagType=d1;var nn=dr,qa=hr,Li={tag_name:function(t){return typeof t=="function"?function(e){return(0,nn.isTag)(e)&&t(e.name)}:t==="*"?nn.isTag:function(e){return(0,nn.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,nn.isText)(e)&&t(e.data)}:function(e){return(0,nn.isText)(e)&&e.data===t}}};function yu(t,e){return typeof e=="function"?function(r){return(0,nn.isTag)(r)&&e(r.attribs[t])}:function(r){return(0,nn.isTag)(r)&&r.attribs[t]===e}}function s1(t,e){return function(r){return t(r)||e(r)}}function zd(t){var e=Object.keys(t).map(function(r){var n=t[r];return Object.prototype.hasOwnProperty.call(Li,r)?Li[r](n):yu(r,n)});return e.length===0?null:e.reduce(s1)}function i1(t,e){var r=zd(t);return r?r(e):!0}function o1(t,e,r,n){n===void 0&&(n=1/0);var a=zd(t);return a?(0,qa.filter)(a,e,r,n):[]}function u1(t,e,r){return r===void 0&&(r=!0),Array.isArray(e)||(e=[e]),(0,qa.findOne)(yu("id",t),e,r)}function l1(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,qa.filter)(Li.tag_name(t),e,r,n)}function c1(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,qa.filter)(yu("class",t),e,r,n)}function d1(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,qa.filter)(Li.tag_type(t),e,r,n)}var an={};Object.defineProperty(an,"__esModule",{value:!0}),an.DocumentPosition=void 0,an.removeSubsets=f1,an.compareDocumentPosition=Wd,an.uniqueSort=h1;var Hd=dr;function f1(t){for(var e=t.length;--e>=0;){var r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(var n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t}var Ft;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(Ft||(an.DocumentPosition=Ft={}));function Wd(t,e){var r=[],n=[];if(t===e)return 0;for(var a=(0,Hd.hasChildren)(t)?t:t.parent;a;)r.unshift(a),a=a.parent;for(a=(0,Hd.hasChildren)(e)?e:e.parent;a;)n.unshift(a),a=a.parent;for(var s=Math.min(r.length,n.length),o=0;o<s&&r[o]===n[o];)o++;if(o===0)return Ft.DISCONNECTED;var c=r[o-1],u=c.children,f=r[o],l=n[o];return u.indexOf(f)>u.indexOf(l)?c===e?Ft.FOLLOWING|Ft.CONTAINED_BY:Ft.FOLLOWING:c===t?Ft.PRECEDING|Ft.CONTAINS:Ft.PRECEDING}function h1(t){return t=t.filter(function(e,r,n){return!n.includes(e,r+1)}),t.sort(function(e,r){var n=Wd(e,r);return n&Ft.PRECEDING?-1:n&Ft.FOLLOWING?1:0}),t}var vu={};Object.defineProperty(vu,"__esModule",{value:!0}),vu.getFeed=m1;var p1=Sr,Ua=pr;function m1(t){var e=Mi(v1,t);return e?e.name==="feed"?g1(e):b1(e):null}function g1(t){var e,r=t.children,n={type:"atom",items:(0,Ua.getElementsByTagName)("entry",r).map(function(o){var c,u=o.children,f={media:Gd(u)};yt(f,"id","id",u),yt(f,"title","title",u);var l=(c=Mi("link",u))===null||c===void 0?void 0:c.attribs.href;l&&(f.link=l);var h=Tr("summary",u)||Tr("content",u);h&&(f.description=h);var d=Tr("updated",u);return d&&(f.pubDate=new Date(d)),f})};yt(n,"id","id",r),yt(n,"title","title",r);var a=(e=Mi("link",r))===null||e===void 0?void 0:e.attribs.href;a&&(n.link=a),yt(n,"description","subtitle",r);var s=Tr("updated",r);return s&&(n.updated=new Date(s)),yt(n,"author","email",r,!0),n}function b1(t){var e,r,n=(r=(e=Mi("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&r!==void 0?r:[],a={type:t.name.substr(0,3),id:"",items:(0,Ua.getElementsByTagName)("item",t.children).map(function(o){var c=o.children,u={media:Gd(c)};yt(u,"id","guid",c),yt(u,"title","title",c),yt(u,"link","link",c),yt(u,"description","description",c);var f=Tr("pubDate",c)||Tr("dc:date",c);return f&&(u.pubDate=new Date(f)),u})};yt(a,"title","title",n),yt(a,"link","link",n),yt(a,"description","description",n);var s=Tr("lastBuildDate",n);return s&&(a.updated=new Date(s)),yt(a,"author","managingEditor",n,!0),a}var x1=["url","type","lang"],y1=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Gd(t){return(0,Ua.getElementsByTagName)("media:content",t).map(function(e){for(var r=e.attribs,n={medium:r.medium,isDefault:!!r.isDefault},a=0,s=x1;a<s.length;a++){var o=s[a];r[o]&&(n[o]=r[o])}for(var c=0,u=y1;c<u.length;c++){var o=u[c];r[o]&&(n[o]=parseInt(r[o],10))}return r.expression&&(n.expression=r.expression),n})}function Mi(t,e){return(0,Ua.getElementsByTagName)(t,e,!0,1)[0]}function Tr(t,e,r){return r===void 0&&(r=!1),(0,p1.textContent)((0,Ua.getElementsByTagName)(t,e,r,1)).trim()}function yt(t,e,r,n,a){a===void 0&&(a=!1);var s=Tr(r,n,a);s&&(t[e]=s)}function v1(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}(function(t){var e=J&&J.__createBinding||(Object.create?function(a,s,o,c){c===void 0&&(c=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(a,c,u)}:function(a,s,o,c){c===void 0&&(c=o),a[c]=s[o]}),r=J&&J.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,a,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,r(Sr,t),r(Zt,t),r(Dr,t),r(hr,t),r(pr,t),r(an,t),r(vu,t);var n=dr;Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return n.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return n.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return n.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return n.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return n.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return n.hasChildren}})})(Di),function(t){var e=J&&J.__createBinding||(Object.create?function(g,E,D,w){w===void 0&&(w=D);var j=Object.getOwnPropertyDescriptor(E,D);(!j||("get"in j?!E.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return E[D]}}),Object.defineProperty(g,w,j)}:function(g,E,D,w){w===void 0&&(w=D),g[w]=E[D]}),r=J&&J.__setModuleDefault||(Object.create?function(g,E){Object.defineProperty(g,"default",{enumerable:!0,value:E})}:function(g,E){g.default=E}),n=J&&J.__importStar||function(g){if(g&&g.__esModule)return g;var E={};if(g!=null)for(var D in g)D!=="default"&&Object.prototype.hasOwnProperty.call(g,D)&&e(E,g,D);return r(E,g),E},a=J&&J.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomUtils=t.parseFeed=t.getFeed=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DefaultHandler=t.DomHandler=t.Parser=void 0;var s=Ma,o=Ma;Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return o.Parser}});var c=dr,u=dr;Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return u.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return u.DomHandler}});function f(g,E){var D=new c.DomHandler(void 0,E);return new s.Parser(D,E).end(g),D.root}t.parseDocument=f;function l(g,E){return f(g,E).children}t.parseDOM=l;function h(g,E,D){var w=new c.DomHandler(g,E,D);return new s.Parser(w,E)}t.createDomStream=h;var d=uu;Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(d).default}}),t.ElementType=n(Jn);var m=Di,b=Di;Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return b.getFeed}});var x={xmlMode:!0};function y(g,E){return E===void 0&&(E=x),(0,m.getFeed)(l(g,E))}t.parseFeed=y,t.DomUtils=n(Di)}(pd);var w1=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},wu={};Object.defineProperty(wu,"__esModule",{value:!0});/*!
|
|
1057
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1058
|
+
*
|
|
1059
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
1060
|
+
* Released under the MIT License.
|
|
1061
|
+
*/function Jd(t){return Object.prototype.toString.call(t)==="[object Object]"}function _1(t){var e,r;return Jd(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(Jd(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}wu.isPlainObject=_1;var Yd={exports:{}};(function(t){(function(e,r){t.exports?t.exports=r():e.parseSrcset=r()})(J,function(){return function(e){function r(w){return w===" "||w===" "||w===`
|
|
1062
|
+
`||w==="\f"||w==="\r"}function n(w){var j,p=w.exec(e.substring(y));if(p)return j=p[0],y+=j.length,j}for(var a=e.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,f=/^\d+$/,l=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,d,m,b,x,y=0,g=[];;){if(n(o),y>=a)return g;h=n(c),d=[],h.slice(-1)===","?(h=h.replace(u,""),D()):E()}function E(){for(n(s),m="",b="in descriptor";;){if(x=e.charAt(y),b==="in descriptor")if(r(x))m&&(d.push(m),m="",b="after descriptor");else if(x===","){y+=1,m&&d.push(m),D();return}else if(x==="(")m=m+x,b="in parens";else if(x===""){m&&d.push(m),D();return}else m=m+x;else if(b==="in parens")if(x===")")m=m+x,b="in descriptor";else if(x===""){d.push(m),D();return}else m=m+x;else if(b==="after descriptor"&&!r(x))if(x===""){D();return}else b="in descriptor",y-=1;y+=1}}function D(){var w=!1,j,p,A,k,U={},H,S,P,I,W;for(k=0;k<d.length;k++)H=d[k],S=H[H.length-1],P=H.substring(0,H.length-1),I=parseInt(P,10),W=parseFloat(P),f.test(P)&&S==="w"?((j||p)&&(w=!0),I===0?w=!0:j=I):l.test(P)&&S==="x"?((j||p||A)&&(w=!0),W<0?w=!0:p=W):f.test(P)&&S==="h"?((A||p)&&(w=!0),I===0?w=!0:A=I):w=!0;w?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+H+"'."):(U.url=h,j&&(U.w=j),p&&(U.d=p),A&&(U.h=A),g.push(U))}}})})(Yd);var E1=Yd.exports,_u={exports:{}},le=String,Zd=function(){return{isColorSupported:!1,reset:le,bold:le,dim:le,italic:le,underline:le,inverse:le,hidden:le,strikethrough:le,black:le,red:le,green:le,yellow:le,blue:le,magenta:le,cyan:le,white:le,gray:le,bgBlack:le,bgRed:le,bgGreen:le,bgYellow:le,bgBlue:le,bgMagenta:le,bgCyan:le,bgWhite:le,blackBright:le,redBright:le,greenBright:le,yellowBright:le,blueBright:le,magentaBright:le,cyanBright:le,whiteBright:le,bgBlackBright:le,bgRedBright:le,bgGreenBright:le,bgYellowBright:le,bgBlueBright:le,bgMagentaBright:le,bgCyanBright:le,bgWhiteBright:le}};_u.exports=Zd(),_u.exports.createColors=Zd;var N1=_u.exports;let Xd=N1,Kd=ht,Eu=class vf extends Error{constructor(e,r,n,a,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),a&&(this.source=a),o&&(this.plugin=o),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,vf)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=Xd.isColorSupported);let n=l=>l,a=l=>l,s=l=>l;if(e){let{bold:l,gray:h,red:d}=Xd.createColors(!0);a=m=>l(d(m)),n=m=>h(m),Kd&&(s=m=>Kd(m))}let o=r.split(/\r?\n/),c=Math.max(this.line-3,0),u=Math.min(this.line+2,o.length),f=String(u).length;return o.slice(c,u).map((l,h)=>{let d=c+1+h,m=" "+(" "+d).slice(-f)+" | ";if(d===this.line){if(l.length>160){let x=20,y=Math.max(0,this.column-x),g=Math.max(this.column+x,this.endColumn+x),E=l.slice(y,g),D=n(m.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return a(">")+n(m)+s(E)+`
|
|
1063
|
+
`+D+a("^")}let b=n(m.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+n(m)+s(l)+`
|
|
1064
|
+
`+b+a("^")}return" "+n(m)+s(l)}).join(`
|
|
1065
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
1066
|
+
|
|
1067
|
+
`+e+`
|
|
1068
|
+
`),this.name+": "+this.message+e}};var Nu=Eu;Eu.default=Eu;const Qd={after:`
|
|
1069
|
+
`,beforeClose:`
|
|
1070
|
+
`,beforeComment:`
|
|
1071
|
+
`,beforeDecl:`
|
|
1072
|
+
`,beforeOpen:" ",beforeRule:`
|
|
1073
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function A1(t){return t[0].toUpperCase()+t.slice(1)}let Au=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,a=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:a&&(n+=" "),e.nodes)this.block(e,n+a);else{let s=(e.raws.between||"")+(r?";":"");this.builder(n+a+s,e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let a=e.parent,s=0;for(;a&&a.type!=="root";)s+=1,a=a.parent;if(n.includes(`
|
|
1074
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let c=0;c<s;c++)n+=o}return n}block(e,r){let n=this.raw(e,"between","beforeOpen");this.builder(r+n+"{",e,"start");let a;e.nodes&&e.nodes.length?(this.body(e),a=this.raw(e,"after")):a=this.raw(e,"after","emptyBody"),a&&this.builder(a),this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon");for(let a=0;a<e.nodes.length;a++){let s=e.nodes[a],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,r!==a||n)}}comment(e){let r=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+n+"*/",e)}decl(e,r){let n=this.raw(e,"between","colon"),a=e.prop+n+this.rawValue(e,"value");e.important&&(a+=e.raws.important||" !important"),r&&(a+=";"),this.builder(a,e)}document(e){this.body(e)}raw(e,r,n){let a;if(n||(n=r),r&&(a=e.raws[r],typeof a<"u"))return a;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return Qd[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let c="raw"+A1(n);this[c]?a=this[c](o,e):o.walk(u=>{if(a=u.raws[r],typeof a<"u")return!1})}return typeof a>"u"&&(a=Qd[n]),o.rawCache[n]=a,a}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(`
|
|
1075
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
1076
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
1077
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
|
1078
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let a=n.parent;if(a&&a!==e&&a.parent&&a.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(`
|
|
1079
|
+
`);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],a=e.raws[r];return a&&a.value===n?a.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};var e0=Au;Au.default=Au;let k1=e0;function ku(t,e){new k1(e).stringify(t)}var Ii=ku;ku.default=ku;var Ra={};Ra.isClean=Symbol("isClean"),Ra.my=Symbol("my");let j1=Nu,S1=e0,D1=Ii,{isClean:za,my:T1}=Ra;function ju(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let a=t[n],s=typeof a;n==="parent"&&s==="object"?e&&(r[n]=e):n==="source"?r[n]=a:Array.isArray(a)?r[n]=a.map(o=>ju(o,r)):(s==="object"&&a!==null&&(a=ju(a)),r[n]=a)}return r}function mr(t,e){if(e&&typeof e.offset<"u")return e.offset;let r=1,n=1,a=0;for(let s=0;s<t.length;s++){if(n===e.line&&r===e.column){a=s;break}t[s]===`
|
|
1080
|
+
`?(r=1,n+=1):r+=1}return a}let Su=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[za]=!1,this[T1]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=ju(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:a}=this.rangeBy(r);return this.source.input.error(e,{column:a.column,line:a.line},{column:n.column,line:n.line},r)}return new j1(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markClean(){this[za]=!0}markDirty(){if(this[za]){this[za]=!1;let e=this;for(;e=e.parent;)e[za]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let r=this.source.start;if(e.index)r=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,s=n.slice(mr(n,this.source.start),mr(n,this.source.end)).indexOf(e.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(e){let r=this.source.start.column,n=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,s=mr(a,this.source.start),o=s+e;for(let c=s;c<o;c++)a[c]===`
|
|
1081
|
+
`?(r=1,n+=1):r+=1;return{column:r,line:n,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:mr(r,this.source.start)},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:mr(r,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let o=r.slice(mr(r,this.source.start),mr(r,this.source.end)).indexOf(e.word);o!==-1&&(n=this.positionInside(o),a=this.positionInside(o+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:mr(r,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?a={column:e.end.column,line:e.end.line,offset:mr(r,e.end)}:typeof e.endIndex=="number"?a=this.positionInside(e.endIndex):e.index&&(a=this.positionInside(e.index+1));return(a.line<n.line||a.line===n.line&&a.column<=n.column)&&(a={column:n.column+1,line:n.line,offset:n.offset+1}),{end:a,start:n}}raw(e,r){return new S1().raw(this,e,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,n=!1;for(let a of e)a===this?n=!0:n?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,r){let n={},a=r==null;r=r||new Map;let s=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let c=this[o];if(Array.isArray(c))n[o]=c.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,r):u);else if(typeof c=="object"&&c.toJSON)n[o]=c.toJSON(null,r);else if(o==="source"){if(c==null)continue;let u=r.get(c.input);u==null&&(u=s,r.set(c.input,s),s++),n[o]={end:c.end,inputId:u,start:c.start}}else n[o]=c}return a&&(n.inputs=[...r.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=D1){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n={}){let a={node:this};for(let s in n)a[s]=n[s];return e.warn(r,a)}};var Fi=Su;Su.default=Su;let C1=Fi,Du=class extends C1{constructor(e){super(e),this.type="comment"}};var Bi=Du;Du.default=Du;let O1=Fi,Tu=class extends O1{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};var Vi=Tu;Tu.default=Tu;let t0=Bi,r0=Vi,$1=Fi,{isClean:n0,my:a0}=Ra,Cu,s0,i0,Ou;function o0(t){return t.map(e=>(e.nodes&&(e.nodes=o0(e.nodes)),delete e.source,e))}function u0(t){if(t[n0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u0(e)}let gr=class wf extends $1{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let a of n)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,a;for(;this.indexes[r]<this.proxyOf.nodes.length&&(n=this.indexes[r],a=e(this.proxyOf.nodes[n],n),a!==!1);)this.indexes[r]+=1;return delete this.indexes[r],a}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...n)=>e[r](...n.map(a=>typeof a=="function"?(s,o)=>a(s.toProxy(),o):a)):r==="every"||r==="some"?n=>e[r]((a,...s)=>n(a.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),a=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of a)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+a.length);return this.markDirty(),this}insertBefore(e,r){let n=this.index(e),a=n===0?"prepend":!1,s=this.normalize(r,this.proxyOf.nodes[n],a).reverse();n=this.index(e);for(let c of s)this.proxyOf.nodes.splice(n,0,c);let o;for(let c in this.indexes)o=this.indexes[c],n<=o&&(this.indexes[c]=o+s.length);return this.markDirty(),this}normalize(e,r){if(typeof e=="string")e=o0(s0(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new r0(e)]}else if(e.selector||e.selectors)e=[new Ou(e)];else if(e.name)e=[new Cu(e)];else if(e.text)e=[new t0(e)];else throw new Error("Unknown node type in node creation");return e.map(a=>(a[a0]||wf.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[n0]&&u0(a),a.raws||(a.raws={}),typeof a.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(a.raws.before=r.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let a of n)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(a=>{r.props&&!r.props.includes(a.prop)||r.fast&&!a.value.includes(r.fast)||(a.value=a.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let a;try{a=e(r,n)}catch(s){throw r.addToError(s)}return a!==!1&&r.walk&&(a=r.walk(e)),a})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,a)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,a)}):this.walk((n,a)=>{if(n.type==="atrule"&&n.name===e)return r(n,a)}):(r=e,this.walk((n,a)=>{if(n.type==="atrule")return r(n,a)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,a)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,a)}):this.walk((n,a)=>{if(n.type==="decl"&&n.prop===e)return r(n,a)}):(r=e,this.walk((n,a)=>{if(n.type==="decl")return r(n,a)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,a)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,a)}):this.walk((n,a)=>{if(n.type==="rule"&&n.selector===e)return r(n,a)}):(r=e,this.walk((n,a)=>{if(n.type==="rule")return r(n,a)}))}};gr.registerParse=t=>{s0=t},gr.registerRule=t=>{Ou=t},gr.registerAtRule=t=>{Cu=t},gr.registerRoot=t=>{i0=t};var sn=gr;gr.default=gr,gr.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Cu.prototype):t.type==="rule"?Object.setPrototypeOf(t,Ou.prototype):t.type==="decl"?Object.setPrototypeOf(t,r0.prototype):t.type==="comment"?Object.setPrototypeOf(t,t0.prototype):t.type==="root"&&Object.setPrototypeOf(t,i0.prototype),t[a0]=!0,t.nodes&&t.nodes.forEach(e=>{gr.rebuild(e)})};let l0=sn,qi=class extends l0{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $u=qi;qi.default=qi,l0.registerAtRule(qi);let P1=sn,c0,d0,Ha=class extends P1{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new c0(new d0,this,e).stringify()}};Ha.registerLazyResult=t=>{c0=t},Ha.registerProcessor=t=>{d0=t};var Pu=Ha;Ha.default=Ha;let L1="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var M1={nanoid:(t=21)=>{let e="",r=t|0;for(;r--;)e+=L1[Math.random()*64|0];return e}};let{existsSync:I1,readFileSync:F1}=ht,{dirname:Lu,join:B1}=ht,{SourceMapConsumer:f0,SourceMapGenerator:h0}=ht;function V1(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Mu=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,a=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Lu(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new f0(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,o=e.match(a)||e.match(s);if(o)return decodeURIComponent(e.substr(o[0].length));let c=e.match(r)||e.match(n);if(c)return V1(e.substr(c[0].length));let u=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+u)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let n=e.lastIndexOf(r.pop()),a=e.indexOf("*/",n);n>-1&&a>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,a)))}loadFile(e){if(this.root=Lu(e),I1(e))return this.mapFile=e,F1(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let a=this.loadFile(n);if(!a)throw new Error("Unable to load previous source map: "+n.toString());return a}}else{if(r instanceof f0)return h0.fromSourceMap(r).toString();if(r instanceof h0)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=B1(Lu(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var p0=Mu;Mu.default=Mu;let{nanoid:q1}=M1,{isAbsolute:Iu,resolve:Fu}=ht,{SourceMapConsumer:U1,SourceMapGenerator:R1}=ht,{fileURLToPath:m0,pathToFileURL:Ui}=ht,g0=Nu,z1=p0,Bu=ht,Vu=Symbol("lineToIndexCache"),H1=!!(U1&&R1),b0=!!(Fu&&Iu);function x0(t){if(t[Vu])return t[Vu];let e=t.css.split(`
|
|
1082
|
+
`),r=new Array(e.length),n=0;for(let a=0,s=e.length;a<s;a++)r[a]=n,n+=e[a].length+1;return t[Vu]=r,r}let Ri=class{get from(){return this.file||this.id}constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,r.document&&(this.document=r.document.toString()),r.from&&(!b0||/^\w+:\/\//.test(r.from)||Iu(r.from)?this.file=r.from:this.file=Fu(r.from)),b0&&H1){let n=new z1(this.css,r);if(n.text){this.map=n;let a=n.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+q1(6)+">"),this.map&&(this.map.file=this.from)}error(e,r,n,a={}){let s,o,c,u,f;if(r&&typeof r=="object"){let h=r,d=n;if(typeof h.offset=="number"){u=h.offset;let m=this.fromOffset(u);r=m.line,n=m.col}else r=h.line,n=h.column,u=this.fromLineAndColumn(r,n);if(typeof d.offset=="number"){c=d.offset;let m=this.fromOffset(c);o=m.line,s=m.col}else o=d.line,s=d.column,c=this.fromLineAndColumn(d.line,d.column)}else if(n)u=this.fromLineAndColumn(r,n);else{u=r;let h=this.fromOffset(u);r=h.line,n=h.col}let l=this.origin(r,n,o,s);return l?f=new g0(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,a.plugin):f=new g0(e,o===void 0?r:{column:n,line:r},o===void 0?n:{column:s,line:o},this.css,this.file,a.plugin),f.input={column:n,endColumn:s,endLine:o,endOffset:c,line:r,offset:u,source:this.css},this.file&&(Ui&&(f.input.url=Ui(this.file).toString()),f.input.file=this.file),f}fromLineAndColumn(e,r){return x0(this)[e-1]+r-1}fromOffset(e){let r=x0(this),n=r[r.length-1],a=0;if(e>=n)a=r.length-1;else{let s=r.length-2,o;for(;a<s;)if(o=a+(s-a>>1),e<r[o])s=o-1;else if(e>=r[o+1])a=o+1;else{a=o;break}}return{col:e-r[a]+1,line:a+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Fu(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,a){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:r,line:e});if(!o.source)return!1;let c;typeof n=="number"&&(c=s.originalPositionFor({column:a,line:n}));let u;Iu(o.source)?u=Ui(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||Ui(this.map.mapFile));let f={column:o.column,endColumn:c&&c.column,endLine:c&&c.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(m0)f.file=m0(u);else throw new Error("file: protocol is not available in this PostCSS build");let l=s.sourceContentFor(o.source);return l&&(f.source=l),f}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var zi=Ri;Ri.default=Ri,Bu&&Bu.registerInput&&Bu.registerInput(Ri);let y0=sn,v0,w0,Xn=class extends y0{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let a=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of a)s.raws.before=r.raws.before}return a}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new v0(new w0,this,e).stringify()}};Xn.registerLazyResult=t=>{v0=t},Xn.registerProcessor=t=>{w0=t};var Wa=Xn;Xn.default=Xn,y0.registerRoot(Xn);let Ga={comma(t){return Ga.split(t,[","],!0)},space(t){let e=[" ",`
|
|
1083
|
+
`," "];return Ga.split(t,e)},split(t,e,r){let n=[],a="",s=!1,o=0,c=!1,u="",f=!1;for(let l of t)f?f=!1:l==="\\"?f=!0:c?l===u&&(c=!1):l==='"'||l==="'"?(c=!0,u=l):l==="("?o+=1:l===")"?o>0&&(o-=1):o===0&&e.includes(l)&&(s=!0),s?(a!==""&&n.push(a.trim()),a="",s=!1):a+=l;return(r||a!=="")&&n.push(a.trim()),n}};var _0=Ga;Ga.default=Ga;let E0=sn,W1=_0,Hi=class extends E0{get selectors(){return W1.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var qu=Hi;Hi.default=Hi,E0.registerRule(Hi);let G1=$u,J1=Bi,Y1=Vi,Z1=zi,X1=p0,K1=Wa,Q1=qu;function Ja(t,e){if(Array.isArray(t))return t.map(a=>Ja(a));let{inputs:r,...n}=t;if(r){e=[];for(let a of r){let s={...a,__proto__:Z1.prototype};s.map&&(s.map={...s.map,__proto__:X1.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=t.nodes.map(a=>Ja(a,e))),n.source){let{inputId:a,...s}=n.source;n.source=s,a!=null&&(n.source.input=e[a])}if(n.type==="root")return new K1(n);if(n.type==="decl")return new Y1(n);if(n.type==="rule")return new Q1(n);if(n.type==="comment")return new J1(n);if(n.type==="atrule")return new G1(n);throw new Error("Unknown node type: "+t.type)}var ex=Ja;Ja.default=Ja;let{dirname:Wi,relative:N0,resolve:A0,sep:k0}=ht,{SourceMapConsumer:j0,SourceMapGenerator:Gi}=ht,{pathToFileURL:S0}=ht,tx=zi,rx=!!(j0&&Gi),nx=!!(Wi&&A0&&N0&&k0);var D0=class{constructor(e,r,n,a){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=`
|
|
1084
|
+
`;this.css.includes(`\r
|
|
1085
|
+
`)&&(r=`\r
|
|
1086
|
+
`),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||Wi(e.file),a;this.mapOpts.sourcesContent===!1?(a=new j0(e.text),a.sourcesContent&&(a.sourcesContent=null)):a=e.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),nx&&rx&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Gi.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Gi({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Gi({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(c,u,f)=>{if(this.css+=c,u&&f!=="end"&&(a.generated.line=e,a.generated.column=r-1,u.source&&u.source.start?(a.source=this.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,this.map.addMapping(a)):(a.source=n,a.original.line=1,a.original.column=0,this.map.addMapping(a))),o=c.match(/\n/g),o?(e+=o.length,s=c.lastIndexOf(`
|
|
1087
|
+
`),r=c.length-s):r+=c.length,u&&f!=="start"){let l=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(a.source=this.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=e,a.generated.column=r-2,this.map.addMapping(a)):(a.source=n,a.original.line=1,a.original.column=0,a.generated.line=e,a.generated.column=r-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?Wi(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Wi(A0(n,this.mapOpts.annotation)));let a=N0(n,e);return this.memoizedPaths.set(e,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new tx(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let a=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(a,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(S0){let n=S0(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;k0==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};const Uu=39,T0=34,Ji=92,C0=47,Yi=10,Ya=32,Zi=12,Xi=9,Ki=13,ax=91,sx=93,ix=40,ox=41,ux=123,lx=125,cx=59,dx=42,fx=58,hx=64,Qi=/[\t\n\f\r "#'()/;[\\\]{}]/g,eo=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,px=/.[\r\n"'(/\\]/,O0=/[\da-f]/i;var mx=function(e,r={}){let n=e.css.valueOf(),a=r.ignoreErrors,s,o,c,u,f,l,h,d,m,b,x=n.length,y=0,g=[],E=[];function D(){return y}function w(k){throw e.error("Unclosed "+k,y)}function j(){return E.length===0&&y>=x}function p(k){if(E.length)return E.pop();if(y>=x)return;let U=k?k.ignoreUnclosed:!1;switch(s=n.charCodeAt(y),s){case Yi:case Ya:case Xi:case Ki:case Zi:{u=y;do u+=1,s=n.charCodeAt(u);while(s===Ya||s===Yi||s===Xi||s===Ki||s===Zi);l=["space",n.slice(y,u)],y=u-1;break}case ax:case sx:case ux:case lx:case fx:case cx:case ox:{let H=String.fromCharCode(s);l=[H,H,y];break}case ix:{if(b=g.length?g.pop()[1]:"",m=n.charCodeAt(y+1),b==="url"&&m!==Uu&&m!==T0&&m!==Ya&&m!==Yi&&m!==Xi&&m!==Zi&&m!==Ki){u=y;do{if(h=!1,u=n.indexOf(")",u+1),u===-1)if(a||U){u=y;break}else w("bracket");for(d=u;n.charCodeAt(d-1)===Ji;)d-=1,h=!h}while(h);l=["brackets",n.slice(y,u+1),y,u],y=u}else u=n.indexOf(")",y+1),o=n.slice(y,u+1),u===-1||px.test(o)?l=["(","(",y]:(l=["brackets",o,y,u],y=u);break}case Uu:case T0:{f=s===Uu?"'":'"',u=y;do{if(h=!1,u=n.indexOf(f,u+1),u===-1)if(a||U){u=y+1;break}else w("string");for(d=u;n.charCodeAt(d-1)===Ji;)d-=1,h=!h}while(h);l=["string",n.slice(y,u+1),y,u],y=u;break}case hx:{Qi.lastIndex=y+1,Qi.test(n),Qi.lastIndex===0?u=n.length-1:u=Qi.lastIndex-2,l=["at-word",n.slice(y,u+1),y,u],y=u;break}case Ji:{for(u=y,c=!0;n.charCodeAt(u+1)===Ji;)u+=1,c=!c;if(s=n.charCodeAt(u+1),c&&s!==C0&&s!==Ya&&s!==Yi&&s!==Xi&&s!==Ki&&s!==Zi&&(u+=1,O0.test(n.charAt(u)))){for(;O0.test(n.charAt(u+1));)u+=1;n.charCodeAt(u+1)===Ya&&(u+=1)}l=["word",n.slice(y,u+1),y,u],y=u;break}default:{s===C0&&n.charCodeAt(y+1)===dx?(u=n.indexOf("*/",y+2)+1,u===0&&(a||U?u=n.length:w("comment")),l=["comment",n.slice(y,u+1),y,u],y=u):(eo.lastIndex=y+1,eo.test(n),eo.lastIndex===0?u=n.length-1:u=eo.lastIndex-2,l=["word",n.slice(y,u+1),y,u],g.push(l),y=u);break}}return y++,l}function A(k){E.push(k)}return{back:A,endOfFile:j,nextToken:p,position:D}};let gx=$u,bx=Bi,xx=Vi,yx=Wa,$0=qu,vx=mx;const P0={empty:!0,space:!0};function wx(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}var _x=class{constructor(e){this.input=e,this.root=new yx,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new gx;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,a,s,o=!1,c=!1,u=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?f.push(n==="("?")":"]"):n==="{"&&f.length>0?f.push("}"):n===f[f.length-1]&&f.pop(),f.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){c=!0;break}else if(n==="}"){if(u.length>0){for(s=u.length-1,a=u[s];a&&a[0]==="space";)a=u[--s];a&&(r.source.end=this.getPosition(a[3]||a[2]),r.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(r.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(r,"params",u),o&&(e=u[u.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),c&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,a;for(let s=r-1;s>=0&&(a=e[s],!(a[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(e){let r=0,n,a,s;for(let[o,c]of e.entries()){if(a=c,s=a[0],s==="("&&(r+=1),s===")"&&(r-=1),r===0&&s===":")if(!n)this.doubleColon(a);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=a}return!1}comment(e){let r=new bx;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let a=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=a[2],r.raws.left=a[1],r.raws.right=a[3]}}createTokenizer(){this.tokenizer=vx(this.input)}decl(e,r){let n=new xx;this.init(n,e[0][2]);let a=e[e.length-1];for(a[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(a[3]||a[2]||wx(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],c;for(;e.length&&(c=e[0][0],!(c!=="space"&&c!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(s=e[f],s[1].toLowerCase()==="!important"){n.important=!0;let l=this.stringFrom(e,f);l=this.spacesFromEnd(e)+l,l!==" !important"&&(n.raws.important=l);break}else if(s[1].toLowerCase()==="important"){let l=e.slice(0),h="";for(let d=f;d>0;d--){let m=l[d][0];if(h.trim().startsWith("!")&&m!=="space")break;h=l.pop()[1]+h}h.trim().startsWith("!")&&(n.important=!0,n.raws.important=h,e=l)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(n.raws.between+=o.map(f=>f[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new $0;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="",r.source.end=this.getPosition(e[2]),r.source.end.offset+=r.raws.ownSemicolon.length)}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,a=!1,s=null,o=[],c=e[1].startsWith("--"),u=[],f=e;for(;f;){if(n=f[0],u.push(f),n==="("||n==="[")s||(s=f),o.push(n==="("?")":"]");else if(c&&a&&n==="{")s||(s=f),o.push("}");else if(o.length===0)if(n===";")if(a){this.decl(u,c);return}else break;else if(n==="{"){this.rule(u);return}else if(n==="}"){this.tokenizer.back(u.pop()),r=!0;break}else n===":"&&(a=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),o.length>0&&this.unclosedBracket(s),r&&a){if(!c)for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,c)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,a){let s,o,c=n.length,u="",f=!0,l,h;for(let d=0;d<c;d+=1)s=n[d],o=s[0],o==="space"&&d===c-1&&!a?f=!1:o==="comment"?(h=n[d-1]?n[d-1][0]:"empty",l=n[d+1]?n[d+1][0]:"empty",!P0[h]&&!P0[l]?u.slice(-1)===","?f=!1:u+=s[1]:f=!1):u+=s[1];if(!f){let d=n.reduce((m,b)=>m+b[1],"");e.raws[r]={raw:d,value:u}}e[r]=u}rule(e){e.pop();let r=new $0;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let a=r;a<e.length;a++)n+=e[a][1];return e.splice(r,e.length-r),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}};let Ex=sn,Nx=zi,Ax=_x;function to(t,e){let r=new Nx(t,e),n=new Ax(r);try{n.parse()}catch(a){throw process.env.NODE_ENV!=="production"&&a.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?a.message+=`
|
|
1088
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?a.message+=`
|
|
1089
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(a.message+=`
|
|
1090
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),a}return n.root}var Ru=to;to.default=to,Ex.registerParse(to);let zu=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var L0=zu;zu.default=zu;let kx=L0,Hu=class{get content(){return this.css}constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new kx(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Wu=Hu;Hu.default=Hu;let M0={};var I0=function(e){M0[e]||(M0[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let jx=sn,Sx=Pu,Dx=D0,Tx=Ru,F0=Wu,Cx=Wa,Ox=Ii,{isClean:Xt,my:$x}=Ra,Px=I0;const Lx={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Mx={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ix={Once:!0,postcssPlugin:!0,prepare:!0},Kn=0;function Za(t){return typeof t=="object"&&typeof t.then=="function"}function B0(t){let e=!1,r=Lx[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,Kn,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,Kn,r+"Exit"]:[r,r+"Exit"]}function V0(t){let e;return t.type==="document"?e=["Document",Kn,"DocumentExit"]:t.type==="root"?e=["Root",Kn,"RootExit"]:e=B0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Gu(t){return t[Xt]=!1,t.nodes&&t.nodes.forEach(e=>Gu(e)),t}let Ju={},Qn=class _f{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,r,n){this.stringified=!1,this.processed=!1;let a;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))a=Gu(r);else if(r instanceof _f||r instanceof F0)a=Gu(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let s=Tx;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{a=s(r,n)}catch(o){this.processed=!0,this.error=o}a&&!a[$x]&&jx.rebuild(a)}this.result=new F0(e,a,n),this.helpers={...Ju,postcss:Ju,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{if(r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=n.postcssPlugin,e.setMessage();else if(n.postcssVersion&&process.env.NODE_ENV!=="production"){let a=n.postcssPlugin,s=n.postcssVersion,o=this.result.processor.version,c=s.split("."),u=o.split(".");(c[0]!==u[0]||parseInt(c[1])>parseInt(u[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+a+" uses "+s+". Perhaps this is the source of the error below.")}}catch(a){console&&console.error&&console.error(a)}return e}prepareVisitors(){this.listeners={};let e=(r,n,a)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,a])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!Mx[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ix[n])if(typeof r[n]=="object")for(let a in r[n])a==="*"?e(r,n,r[n][a]):e(r,n+"-"+a.toLowerCase(),r[n][a]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],n=this.runOnRoot(r);if(Za(n))try{await n}catch(a){throw this.handleError(a)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Xt];){e[Xt]=!0;let r=[V0(e)];for(;r.length>0;){let n=this.visitTick(r);if(Za(n))try{await n}catch(a){let s=r[r.length-1].node;throw this.handleError(a,s)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let a=e.nodes.map(s=>n(s,this.helpers));await Promise.all(a)}else await n(e,this.helpers)}catch(a){throw this.handleError(a)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return Za(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=Ox;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let a=new Dx(r,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(Za(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Xt];)e[Xt]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Px("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,a]of e){this.result.lastPlugin=n;let s;try{s=a(r,this.helpers)}catch(o){throw this.handleError(o,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(Za(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:a}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(a.length>0&&r.visitorIndex<a.length){let[o,c]=a[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===a.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=o;try{return c(n.toProxy(),this.helpers)}catch(u){throw this.handleError(u,n)}}if(r.iterator!==0){let o=r.iterator,c;for(;c=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!c[Xt]){c[Xt]=!0,e.push(V0(c));return}r.iterator=0,delete n.indexes[o]}let s=r.events;for(;r.eventIndex<s.length;){let o=s[r.eventIndex];if(r.eventIndex+=1,o===Kn){n.nodes&&n.nodes.length&&(n[Xt]=!0,r.iterator=n.getIterator());return}else if(this.listeners[o]){r.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Xt]=!0;let r=B0(e);for(let n of r)if(n===Kn)e.nodes&&e.each(a=>{a[Xt]||this.walkSync(a)});else{let a=this.listeners[n];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Qn.registerPostcss=t=>{Ju=t};var q0=Qn;Qn.default=Qn,Cx.registerLazyResult(Qn),Sx.registerLazyResult(Qn);let Fx=D0,Bx=Ru;const Vx=Wu;let qx=Ii,Ux=I0,Yu=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=Bx;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let a,s=qx;this.result=new Vx(this._processor,a,this._opts),this.result.css=r;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let c=new Fx(s,a,this._opts,r);if(c.isMap()){let[u,f]=c.generate();u&&(this.result.css=u),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Ux("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this._css}warnings(){return[]}};var Rx=Yu;Yu.default=Yu;let zx=Pu,Hx=q0,Wx=Rx,Gx=Wa,Xa=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(typeof n=="object"&&(n.parse||n.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new Wx(this,e,r):new Hx(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Jx=Xa;Xa.default=Xa,Gx.registerProcessor(Xa),zx.registerProcessor(Xa);let U0=$u,R0=Bi,Yx=sn,Zx=Nu,z0=Vi,H0=Pu,Xx=ex,Kx=zi,Qx=q0,ey=_0,ty=Fi,ry=Ru,Zu=Jx,ny=Wu,W0=Wa,G0=qu,ay=Ii,sy=L0;function ve(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Zu(t)}ve.plugin=function(e,r){let n=!1;function a(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
1091
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
1092
|
+
https://www.w3ctech.com/topic/2226`));let c=r(...o);return c.postcssPlugin=e,c.postcssVersion=new Zu().version,c}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(o,c,u){return ve([a(u)]).process(o,c)},a},ve.stringify=ay,ve.parse=ry,ve.fromJSON=Xx,ve.list=ey,ve.comment=t=>new R0(t),ve.atRule=t=>new U0(t),ve.decl=t=>new z0(t),ve.rule=t=>new G0(t),ve.root=t=>new W0(t),ve.document=t=>new H0(t),ve.CssSyntaxError=Zx,ve.Declaration=z0,ve.Container=Yx,ve.Processor=Zu,ve.Document=H0,ve.Comment=R0,ve.Warning=sy,ve.AtRule=U0,ve.Result=ny,ve.Input=Kx,ve.Rule=G0,ve.Root=W0,ve.Node=ty,Qx.registerPostcss(ve);var iy=ve;ve.default=ve;const oy=pd,J0=w1,{isPlainObject:uy}=wu,Y0=oc,ly=E1,{parse:cy}=iy,dy=["img","audio","video","picture","svg","object","map","iframe","embed"],fy=["script","style"];function Ka(t,e){t&&Object.keys(t).forEach(function(r){e(t[r],r)})}function br(t,e){return{}.hasOwnProperty.call(t,e)}function Z0(t,e){const r=[];return Ka(t,function(n){e(n)&&r.push(n)}),r}function hy(t){for(const e in t)if(br(t,e))return!1;return!0}function py(t){return t.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}var my=Qa;const gy=/^[^\0\t\n\f\r /<=>]+$/;function Qa(t,e,r){if(t==null)return"";typeof t=="number"&&(t=t.toString());let n="",a="";function s(_,M){const O=this;this.tag=_,this.attribs=M||{},this.tagPosition=n.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(y.length){const G=y[y.length-1];G.text+=O.text}},this.updateParentNodeMediaChildren=function(){y.length&&dy.includes(this.tag)&&y[y.length-1].mediaChildren.push(this.tag)}}e=Object.assign({},Qa.defaults,e),e.parser=Object.assign({},by,e.parser);const o=function(_){return e.allowedTags===!1||(e.allowedTags||[]).indexOf(_)>-1};fy.forEach(function(_){o(_)&&!e.allowVulnerableTags&&console.warn(`
|
|
1093
|
+
|
|
1094
|
+
⚠️ Your \`allowedTags\` option includes, \`${_}\`, which is inherently
|
|
1095
|
+
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
|
|
1096
|
+
Or, to disable this warning, add the \`allowVulnerableTags\` option
|
|
1097
|
+
and ensure you are accounting for this risk.
|
|
1098
|
+
|
|
1099
|
+
`)});const c=e.nonTextTags||["script","style","textarea","option"];let u,f;e.allowedAttributes&&(u={},f={},Ka(e.allowedAttributes,function(_,M){u[M]=[];const O=[];_.forEach(function(G){typeof G=="string"&&G.indexOf("*")>=0?O.push(J0(G).replace(/\\\*/g,".*")):u[M].push(G)}),O.length&&(f[M]=new RegExp("^("+O.join("|")+")$"))}));const l={},h={},d={};Ka(e.allowedClasses,function(_,M){if(u&&(br(u,M)||(u[M]=[]),u[M].push("class")),l[M]=_,Array.isArray(_)){const O=[];l[M]=[],d[M]=[],_.forEach(function(G){typeof G=="string"&&G.indexOf("*")>=0?O.push(J0(G).replace(/\\\*/g,".*")):G instanceof RegExp?d[M].push(G):l[M].push(G)}),O.length&&(h[M]=new RegExp("^("+O.join("|")+")$"))}});const m={};let b;Ka(e.transformTags,function(_,M){let O;typeof _=="function"?O=_:typeof _=="string"&&(O=Qa.simpleTransform(_)),M==="*"?b=O:m[M]=O});let x,y,g,E,D,w,j=!1;A();const p=new oy.Parser({onopentag:function(_,M){if(e.enforceHtmlBoundary&&_==="html"&&A(),D){w++;return}const O=new s(_,M);y.push(O);let G=!1;const B=!!O.text;let K;if(br(m,_)&&(K=m[_](_,M),O.attribs=M=K.attribs,K.text!==void 0&&(O.innerText=K.text),_!==K.tagName&&(O.name=_=K.tagName,E[x]=K.tagName)),b&&(K=b(_,M),O.attribs=M=K.attribs,_!==K.tagName&&(O.name=_=K.tagName,E[x]=K.tagName)),(!o(_)||e.disallowedTagsMode==="recursiveEscape"&&!hy(g)||e.nestingLimit!=null&&x>=e.nestingLimit)&&(G=!0,g[x]=!0,(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&c.indexOf(_)!==-1&&(D=!0,w=1),g[x]=!0),x++,G){if(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")return;a=n,n=""}n+="<"+_,_==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(O.innerText=""),(!u||br(u,_)||u["*"])&&Ka(M,function(X,se){if(!gy.test(se)){delete O.attribs[se];return}if(X===""&&!e.allowedEmptyAttributes.includes(se)&&(e.nonBooleanAttributes.includes(se)||e.nonBooleanAttributes.includes("*"))){delete O.attribs[se];return}let je=!1;if(!u||br(u,_)&&u[_].indexOf(se)!==-1||u["*"]&&u["*"].indexOf(se)!==-1||br(f,_)&&f[_].test(se)||f["*"]&&f["*"].test(se))je=!0;else if(u&&u[_]){for(const L of u[_])if(uy(L)&&L.name&&L.name===se){je=!0;let V="";if(L.multiple===!0){const re=X.split(" ");for(const ie of re)L.values.indexOf(ie)!==-1&&(V===""?V=ie:V+=" "+ie)}else L.values.indexOf(X)>=0&&(V=X);X=V}}if(je){if(e.allowedSchemesAppliedToAttributes.indexOf(se)!==-1&&U(_,X)){delete O.attribs[se];return}if(_==="script"&&se==="src"){let L=!0;try{const V=H(X);if(e.allowedScriptHostnames||e.allowedScriptDomains){const re=(e.allowedScriptHostnames||[]).find(function(ne){return ne===V.url.hostname}),ie=(e.allowedScriptDomains||[]).find(function(ne){return V.url.hostname===ne||V.url.hostname.endsWith(`.${ne}`)});L=re||ie}}catch{L=!1}if(!L){delete O.attribs[se];return}}if(_==="iframe"&&se==="src"){let L=!0;try{const V=H(X);if(V.isRelativeUrl)L=br(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){const re=(e.allowedIframeHostnames||[]).find(function(ne){return ne===V.url.hostname}),ie=(e.allowedIframeDomains||[]).find(function(ne){return V.url.hostname===ne||V.url.hostname.endsWith(`.${ne}`)});L=re||ie}}catch{L=!1}if(!L){delete O.attribs[se];return}}if(se==="srcset")try{let L=ly(X);if(L.forEach(function(V){U("srcset",V.url)&&(V.evil=!0)}),L=Z0(L,function(V){return!V.evil}),L.length)X=py(Z0(L,function(V){return!V.evil})),O.attribs[se]=X;else{delete O.attribs[se];return}}catch{delete O.attribs[se];return}if(se==="class"){const L=l[_],V=l["*"],re=h[_],ie=d[_],ne=h["*"],Ne=[re,ne].concat(ie).filter(function(Fe){return Fe});if(L&&V?X=W(X,Y0(L,V),Ne):X=W(X,L||V,Ne),!X.length){delete O.attribs[se];return}}if(se==="style"){if(e.parseStyleAttributes)try{const L=cy(_+" {"+X+"}",{map:!1}),V=S(L,e.allowedStyles);if(X=P(V),X.length===0){delete O.attribs[se];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+_+" {"+X+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete O.attribs[se];return}else if(e.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}n+=" "+se,X&&X.length?n+='="'+k(X,!0)+'"':e.allowedEmptyAttributes.includes(se)&&(n+='=""')}else delete O.attribs[se]}),e.selfClosing.indexOf(_)!==-1?n+=" />":(n+=">",O.innerText&&!B&&!e.textFilter&&(n+=k(O.innerText),j=!0)),G&&(n=a+k(n),a="")},ontext:function(_){if(D)return;const M=y[y.length-1];let O;if(M&&(O=M.tag,_=M.innerText!==void 0?M.innerText:_),e.disallowedTagsMode==="completelyDiscard"&&!o(O))_="";else if((e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&(O==="script"||O==="style"))n+=_;else{const G=k(_,!1);e.textFilter&&!j?n+=e.textFilter(G,O):j||(n+=G)}if(y.length){const G=y[y.length-1];G.text+=_}},onclosetag:function(_,M){if(D)if(w--,!w)D=!1;else return;const O=y.pop();if(!O)return;if(O.tag!==_){y.push(O);return}D=e.enforceHtmlBoundary?_==="html":!1,x--;const G=g[x];if(G){if(delete g[x],e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){O.updateParentNodeText();return}a=n,n=""}if(E[x]&&(_=E[x],delete E[x]),e.exclusiveFilter&&e.exclusiveFilter(O)){n=n.substr(0,O.tagPosition);return}if(O.updateParentNodeMediaChildren(),O.updateParentNodeText(),e.selfClosing.indexOf(_)!==-1||M&&!o(_)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){G&&(n=a,a="");return}n+="</"+_+">",G&&(n=a+k(n),a=""),j=!1}},e.parser);return p.write(t),p.end(),n;function A(){n="",x=0,y=[],g={},E={},D=!1,w=0}function k(_,M){return typeof _!="string"&&(_=_+""),e.parser.decodeEntities&&(_=_.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),M&&(_=_.replace(/"/g,"""))),_=_.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),M&&(_=_.replace(/"/g,""")),_}function U(_,M){for(M=M.replace(/[\x00-\x20]+/g,"");;){const B=M.indexOf("<!--");if(B===-1)break;const K=M.indexOf("-->",B+4);if(K===-1)break;M=M.substring(0,B)+M.substring(K+3)}const O=M.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!O)return M.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;const G=O[1].toLowerCase();return br(e.allowedSchemesByTag,_)?e.allowedSchemesByTag[_].indexOf(G)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(G)===-1}function H(_){if(_=_.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),_.startsWith("relative:"))throw new Error("relative: exploit attempt");let M="relative://relative-site";for(let B=0;B<100;B++)M+=`/${B}`;const O=new URL(_,M);return{isRelativeUrl:O&&O.hostname==="relative-site"&&O.protocol==="relative:",url:O}}function S(_,M){if(!M)return _;const O=_.nodes[0];let G;return M[O.selector]&&M["*"]?G=Y0(M[O.selector],M["*"]):G=M[O.selector]||M["*"],G&&(_.nodes[0].nodes=O.nodes.reduce(I(G),[])),_}function P(_){return _.nodes[0].nodes.reduce(function(M,O){return M.push(`${O.prop}:${O.value}${O.important?" !important":""}`),M},[]).join(";")}function I(_){return function(M,O){return br(_,O.prop)&&_[O.prop].some(function(B){return B.test(O.value)})&&M.push(O),M}}function W(_,M,O){return M?(_=_.split(/\s+/),_.filter(function(G){return M.indexOf(G)!==-1||O.some(function(B){return B.test(G)})}).join(" ")):_}}const by={decodeEntities:!0};Qa.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},Qa.simpleTransform=function(t,e,r){return r=r===void 0?!0:r,e=e||{},function(n,a){let s;if(r)for(s in e)a[s]=e[s];else a=e;return{tagName:t,attribs:a}}};var X0=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.TagTransformingSanitizer=void 0;const qe=X0(_n),xy=X0(my),K0=Nt,yy=Wn,Q0=Oa;class vy{constructor(e,r){this.sanitizationErrors=[],this.validate(e),yy.Localization.validate(r),this.localization=r,this.options=e}sanitize(e){return(0,xy.default)(e,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:Q0.StaticConfig.sanitization.allowedTags,allowedAttributes:{iframe:["src","width","height","frameborder","allowfullscreen","webkitallowfullscreen","mozallowfullscreen"],div:["class","title"],td:["style"],img:["src","alt"],a:["href","rel","title","class","target","id"]},allowedSchemes:["http","https","hive"],transformTags:{iframe:(e,r)=>{const n=r.src;for(const s of Q0.StaticConfig.sanitization.iframeWhitelist)if(s.re.test(n)){const o=typeof s.fn=="function"?s.fn(n):n;if(!o)break;return{tagName:"iframe",attribs:{src:o,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return K0.Log.log().warn('Blocked, did not match iframe "src" white list urls:',e,r),this.sanitizationErrors.push("Invalid iframe URL: "+n),{tagName:"div",text:`(Unsupported ${n})`,attribs:{}}},img:(e,r)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:n,alt:a}=r;if(!/^(https?:)?\/\//i.test(n))return K0.Log.log().warn("Blocked, image tag src does not appear to be a url",e,r),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const s={};return s.src=n.replace(/^http:\/\//i,"//"),a&&a!==""&&(s.alt=a),{tagName:e,attribs:s}},div:(e,r)=>{const n={},s=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(c=>r.class===c);return s&&(n.class=s),s==="phishy"&&r.title===this.localization.phishingWarning&&(n.title=r.title),{tagName:e,attribs:n}},td:(e,r)=>{const n={};return r.style==="text-align:right"&&(n.style="text-align:right"),{tagName:e,attribs:n}},a:(e,r)=>{const n=Object.assign({},r);let{href:a}=r;return a&&(a=a.trim(),n.href=a),a&&!this.options.isLinkSafeFn(a)&&(n.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",n.title=this.localization.phishingWarning,n.target=this.options.addTargetBlankToLinks?"_blank":"_self"),a&&this.options.addExternalCssClassToMatchingLinksFn(a)?n.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":n.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:e,attribs:n}}}}}validate(e){(0,qe.default)(e,"TagsSanitizerOptions",qe.default.object),(0,qe.default)(e.iframeWidth,"TagsSanitizerOptions.iframeWidth",qe.default.number.integer.positive),(0,qe.default)(e.iframeHeight,"TagsSanitizerOptions.iframeHeight",qe.default.number.integer.positive),(0,qe.default)(e.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",qe.default.boolean),(0,qe.default)(e.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",qe.default.optional.boolean),(0,qe.default)(e.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",qe.default.optional.string),(0,qe.default)(e.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",qe.default.optional.string),(0,qe.default)(e.noImage,"TagsSanitizerOptions.noImage",qe.default.boolean),(0,qe.default)(e.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",qe.default.function),(0,qe.default)(e.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",qe.default.function)}}Ai.TagTransformingSanitizer=vy;var wy=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fa,"__esModule",{value:!0}),fa.DefaultRenderer=void 0;const ge=wy(_n),_y=qm,Ey=Cn,Ny=$n,ef=Wn,Ay=Ni,ky=Ai;class jy{constructor(e,r=ef.Localization.DEFAULT){this.validate(e),this.options=e,ef.Localization.validate(r),this.tagTransformingSanitizer=new ky.TagTransformingSanitizer({iframeWidth:this.options.assetsWidth,iframeHeight:this.options.assetsHeight,addNofollowToLinks:this.options.addNofollowToLinks,addTargetBlankToLinks:this.options.addTargetBlankToLinks,cssClassForInternalLinks:this.options.cssClassForInternalLinks,cssClassForExternalLinks:this.options.cssClassForExternalLinks,noImage:this.options.doNotShowImages,isLinkSafeFn:this.options.isLinkSafeFn,addExternalCssClassToMatchingLinksFn:this.options.addExternalCssClassToMatchingLinksFn},r),this.domParser=new Ny.HtmlDOMParser({width:this.options.assetsWidth,height:this.options.assetsHeight,ipfsPrefix:this.options.ipfsPrefix,baseUrl:this.options.baseUrl,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,hideImages:this.options.doNotShowImages},r)}render(e){return(0,ge.default)(e,"input",ge.default.string.nonEmpty),this.doRender(e)}doRender(e){return e=Ay.PreliminarySanitizer.preliminarySanitize(e),e=this.isHtml(e)?e:this.renderMarkdown(e),e=this.wrapRenderedTextWithHtmlIfNeeded(e),e=this.domParser.parse(e).getParsedDocumentAsString(),e=this.sanitize(e),Ey.SecurityChecker.checkSecurity(e,{allowScriptTag:this.options.allowInsecureScriptTags}),e=this.domParser.embedder.insertAssets(e),e}renderMarkdown(e){return new _y.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(e)}wrapRenderedTextWithHtmlIfNeeded(e){return e.indexOf("<html>")!==0&&(e="<html>"+e+"</html>"),e}isHtml(e){let r=!1;const n=e.match(/^<html>([\S\s]*)<\/html>$/);return n&&n.length===2?(r=!0,e=n[1]):r=/^<p>[\S\s]*<\/p>/.test(e),r}sanitize(e){return this.options.skipSanitization?e:this.tagTransformingSanitizer.sanitize(e)}validate(e){(0,ge.default)(e,"RendererOptions",ge.default.object),(0,ge.default)(e.baseUrl,"RendererOptions.baseUrl",ge.default.string.nonEmpty),(0,ge.default)(e.breaks,"RendererOptions.breaks",ge.default.boolean),(0,ge.default)(e.skipSanitization,"RendererOptions.skipSanitization",ge.default.boolean),(0,ge.default)(e.addNofollowToLinks,"RendererOptions.addNofollowToLinks",ge.default.boolean),(0,ge.default)(e.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",ge.default.optional.boolean),(0,ge.default)(e.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",ge.default.optional.string),(0,ge.default)(e.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",ge.default.optional.string),(0,ge.default)(e.doNotShowImages,"RendererOptions.doNotShowImages",ge.default.boolean),(0,ge.default)(e.ipfsPrefix,"RendererOptions.ipfsPrefix",ge.default.optional.string),(0,ge.default)(e.assetsWidth,"RendererOptions.assetsWidth",ge.default.number.integer.positive),(0,ge.default)(e.assetsHeight,"RendererOptions.assetsHeight",ge.default.number.integer.positive),(0,ge.default)(e.imageProxyFn,"RendererOptions.imageProxyFn",ge.default.function),(0,ge.default)(e.hashtagUrlFn,"RendererOptions.hashtagUrlFn",ge.default.function),(0,ge.default)(e.usertagUrlFn,"RendererOptions.usertagUrlFn",ge.default.function),(0,ge.default)(e.isLinkSafeFn,"RendererOptions.isLinkSafeFn",ge.default.function),(0,ge.default)(e.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",ge.default.function)}}fa.DefaultRenderer=jy,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HiveContentRenderer=t.DefaultRenderer=void 0;const e=fa;var r=fa;Object.defineProperty(t,"DefaultRenderer",{enumerable:!0,get:function(){return r.DefaultRenderer}}),t.HiveContentRenderer={DefaultRenderer:e.DefaultRenderer},t.default=t.HiveContentRenderer}(_l);function Sy({sort:t="trending",tag:e="",observer:r="hive.blog",limit:n=20,showSortDropdown:a=!0,onAuthorClick:s,onPostClick:o,onCommunityClick:c,onPayoutClick:u,onUpvoteClick:f,onCommentClick:l,onReblogClick:h}){const[d,m]=T.useState([]),[b,x]=T.useState(!0),[y,g]=T.useState(null),[E,D]=T.useState(t),[w,j]=T.useState(!0),[p,A]=T.useState(!1),k=T.useRef(null);new _l.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:_=>_,usertagUrlFn:_=>`/@${_}`,hashtagUrlFn:_=>`/trending/${_}`,isLinkSafeFn:_=>!0,addExternalCssClassToMatchingLinksFn:_=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const U=T.useCallback(async(_,M=!1)=>{M?A(!0):(x(!0),j(!0)),g(null);try{const O=M&&d.length>0?d[d.length-1]:null,G=await Ke.getRankedPosts(_,e,r,n,O==null?void 0:O.author,O==null?void 0:O.permlink);M?(m(B=>{const K=new Set(B.map(se=>se.post_id)),X=G.filter(se=>!K.has(se.post_id));return[...B,...X]}),j(G.length===n)):(m(G),j(G.length===n))}catch(O){g(O instanceof Error?O.message:"Failed to load posts"),j(!1)}finally{x(!1),A(!1)}},[e,r,n,d]),H=T.useCallback(()=>{!p&&w&&!b&&U(E,!0)},[p,w,b,E,U]);T.useEffect(()=>{U(E)},[E,e,r,n]),T.useEffect(()=>{const _=new IntersectionObserver(M=>{M[0].isIntersecting&&H()},{threshold:1});return k.current&&_.observe(k.current),()=>{k.current&&_.unobserve(k.current)}},[H]);const S=_=>{D(_),m([]),j(!0)},P=_=>_>=1e6?`${(_/1e6).toFixed(1)}M`:_>=1e3?`${(_/1e3).toFixed(1)}K`:_.toString(),I=_=>{var K;const M=_.payout*.5,O=_.payout*.5,B=(((K=_.beneficiaries.find(X=>X.account==="commentrewarder"))==null?void 0:K.weight)||0)/1e4*100;return{pending:`$${_.payout.toFixed(2)}`,breakdown:`${M.toFixed(2)} HBD, ${O.toFixed(2)} HP`,commentRewarder:`${B.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(_.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},W=_=>{const O=(_.body||"").replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#+\s*/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/<[^>]*>/g,"").replace(/\n+/g," ").trim();return O.length>200?O.substring(0,200)+"...":O};return b?i.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:i.jsx(q.Loader2,{className:"w-8 h-8 animate-spin"})}):y?i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),i.jsx("p",{className:"text-muted-foreground",children:y}),i.jsx("button",{onClick:()=>U(E),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):i.jsxs("div",{className:"space-y-6",children:[a&&i.jsx("div",{className:"flex justify-center",children:i.jsxs("select",{value:E,onChange:_=>S(_.target.value),className:"px-4 py-2 border border-border rounded-lg bg-card text-card-foreground focus:outline-none focus:ring-2 focus:ring-primary",children:[i.jsx("option",{value:"trending",children:"Trending"}),i.jsx("option",{value:"hot",children:"Hot"}),i.jsx("option",{value:"created",children:"New"})]})}),i.jsxs("div",{className:"space-y-4",children:[d.map(_=>{var G,B,K;const M=(B=(G=_.json_metadata)==null?void 0:G.image)==null?void 0:B[0],O=I(_);return i.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[i.jsx("img",{src:`https://images.hive.blog/u/${_.author}/avatar`,alt:_.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>s==null?void 0:s(_.author,`https://images.hive.blog/u/${_.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${_.author}&background=random`}}),i.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>s==null?void 0:s(_.author,`https://images.hive.blog/u/${_.author}/avatar`),children:_.author}),i.jsxs("span",{className:"text-muted-foreground",children:["(",_.author_reputation.toFixed(2),")"]}),i.jsx("span",{className:"text-muted-foreground cursor-pointer hover:text-primary",onClick:()=>c==null?void 0:c(_.community_title),children:_.community_title}),i.jsx("span",{className:"text-muted-foreground hidden sm:inline",children:"•"}),i.jsx("span",{className:"text-muted-foreground text-sm",children:ls.formatDistanceToNow(new Date(_.created+"Z"),{addSuffix:!0})})]}),i.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[i.jsx("div",{className:"flex-shrink-0",children:M?i.jsxs("div",{className:"relative",children:[i.jsx("img",{src:M.startsWith("http")?M:`https://images.hive.blog/u/320x0/${M}`,alt:_.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>o==null?void 0:o(_),onError:X=>{X.target.src!==`https://images.hive.blog/u/${_.author}/avatar`?X.target.src=`https://images.hive.blog/u/${_.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{var se,je;const X=((je=(se=_.body)==null?void 0:se.match(/!\[[^\]]*\]\(([^)]+)\)/g))==null?void 0:je.map(L=>{const V=L.match(/\(([^)]+)\)/);return V?V[1]:null}).filter(Boolean))||[];return X.length>0?i.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((L,V)=>i.jsx("img",{src:L,alt:`body-image-${V}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:re=>{var ne,Ne;re.stopPropagation();const ie=(Ne=(ne=re.currentTarget.parentElement)==null?void 0:ne.parentElement)==null?void 0:Ne.querySelector("img:not(.w-6):not(.w-8)");ie&&(ie.src=L)}},V))}):null})()]}):i.jsx("img",{src:`https://images.hive.blog/u/${_.author}/avatar`,alt:_.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>o==null?void 0:o(_)})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>o==null?void 0:o(_),children:_.title}),i.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base",onClick:()=>o==null?void 0:o(_),children:((K=_.json_metadata)==null?void 0:K.description)||W(_)||"No description available"}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"relative group",children:[i.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>u==null?void 0:u(_.payout),children:["$",_.payout.toFixed(2)]}),i.jsxs("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block bg-black text-white text-xs p-2 rounded shadow-lg whitespace-nowrap z-10",children:[i.jsxs("div",{children:["Pending payout amount: ",O.pending]}),i.jsxs("div",{children:["Breakdown: ",O.breakdown]}),i.jsxs("div",{children:["commentrewarder: ",O.commentRewarder]}),i.jsxs("div",{children:["Payout in ",O.payoutInDays," days"]})]})]}),i.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[i.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",onClick:()=>f==null?void 0:f(_),children:[i.jsx(q.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),i.jsx("span",{className:"text-xs sm:text-sm",children:P(_.stats.total_votes)})]}),i.jsxs("div",{className:"flex items-center gap-1 text-blue-600 hover:text-blue-700 transition-colors cursor-pointer",onClick:()=>l==null?void 0:l(_),children:[i.jsx(q.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),i.jsx("span",{className:"text-xs sm:text-sm",children:P(_.children)})]}),i.jsxs("div",{className:"flex items-center gap-1 text-gray-600 hover:text-gray-700 transition-colors cursor-pointer",onClick:()=>h==null?void 0:h(_),children:[i.jsx(q.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),i.jsx("span",{className:"text-xs sm:text-sm",children:P(_.reblogs)})]})]})]})]})]})]},_.post_id)}),p&&i.jsxs("div",{className:"flex justify-center items-center py-4",children:[i.jsx(q.Loader2,{className:"w-6 h-6 animate-spin"}),i.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading more posts..."})]}),w&&!p&&i.jsx("div",{ref:k,className:"h-10"})]})]})}const on=class on{static getInstance(){return on.instance||(on.instance=new on),on.instance}async getProposals(e){return e==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const n=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:72,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"votable"}})})).json()).result.proposals,s=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),o={};s.forEach(h=>{o[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:73,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"votable"}})})).json()).result.proposal_votes||[],l={};return f.forEach(h=>{l[h.proposal.proposal_id]||(l[h.proposal.proposal_id]=[]),l[h.proposal.proposal_id].push(h)}),n.map(h=>{const d=h.id,m=o[d],b=l[d]||[],x=b.reduce((y,g)=>y+parseFloat(g.total_hbd||"0"),0);return{proposal_id:d,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:m?m.total_hbd_received:"0",max_hbd_remaining:m?m.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:m?m.all_votes_hp:x.toString(),votes:m?m.votes:b,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:Math.max(0,Math.ceil((new Date(h.end_date).getTime()-new Date().getTime())/(1e3*60*60*24))),vote_value_total:m?parseFloat(m.all_votes_hp):x}})}catch(e){return console.error("Error fetching active proposals:",e),[]}}async getExpiredProposals(){try{const n=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:65,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"expired"}})})).json()).result.proposals,s=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),o={};s.forEach(h=>{o[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:76,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"expired"}})})).json()).result.proposal_votes||[],l={};return f.forEach(h=>{l[h.proposal_id]||(l[h.proposal_id]=[]),l[h.proposal_id].push(h)}),n.map(h=>{const d=h.id,m=o[d],b=l[d]||[],x=b.reduce((y,g)=>y+parseFloat(g.total_hbd||"0"),0);return{proposal_id:d,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:m?m.total_hbd_received:"0",max_hbd_remaining:m?m.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:m?m.all_votes_hp:x.toString(),votes:m?m.votes:b,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:0,vote_value_total:m?parseFloat(m.all_votes_hp):x}})}catch(e){return console.error("Error fetching expired proposals:",e),[]}}};us(on,"instance");let Xu=on;const tf=Xu.getInstance(),Dy=["All","Active","Upcoming","Expired","By Peak Projects"],rf=["Votes","Start Date","End Date","Creator"],nf=t=>t==="By Peak Projects"?["Creator"]:rf,ut=t=>{const e=typeof t=="string"?parseFloat(t):t;return isNaN(e)?t.toString():e.toLocaleString()},Ku=t=>{const e=new Date(t.start_date),r=new Date(t.end_date);return`(${Math.ceil((r.getTime()-e.getTime())/(1e3*60*60*24))} days)`},Ty=({onClickSupport:t,onClickVoteValue:e,onClickSelect:r,onClickUser:n,onClickAvatar:a})=>{const[s,o]=T.useState([]),[c,u]=T.useState("All"),[f,l]=T.useState("Votes");T.useEffect(()=>{c==="By Peak Projects"&&!nf(c).includes(f)?l("Creator"):c!=="By Peak Projects"&&f==="Creator"&&!rf.includes(f)&&l("Votes")},[c,f]);const[h,d]=T.useState(!0);T.useEffect(()=>{(async()=>{d(!0);try{const[y,g]=await Promise.all([tf.getProposals("active"),tf.getProposals("expired")]);o([...y,...g])}catch(y){console.error("Error fetching proposals:",y),o([])}d(!1)})()},[]);const m=s.filter(x=>c==="All"?x.status==="active"||new Date(x.start_date+"Z")>new Date:c==="Active"?x.status==="active":c==="Upcoming"?new Date(x.start_date+"Z")>new Date:c==="Expired"?new Date(x.end_date+"Z")<new Date:c==="By Peak Projects"?x.creator==="peakd":!0).sort((x,y)=>c==="By Peak Projects"?y.creator.localeCompare(x.creator):0),b=c==="All"?(()=>{const x=m.filter(E=>E.status==="active"),y=m.filter(E=>new Date(E.start_date+"Z")>new Date),g=(E,D)=>f==="Votes"?Number(D.all_votes_num)-Number(E.all_votes_num):f==="Start Date"?new Date(D.start_date+"Z").getTime()-new Date(E.start_date+"Z").getTime():f==="End Date"?new Date(E.end_date+"Z").getTime()-new Date(D.end_date+"Z").getTime():f==="Creator"?E.creator.localeCompare(D.creator):0;return[...x.sort(g),...y.sort(g)]})():m.sort((x,y)=>f==="Votes"?Number(y.all_votes_num)-Number(x.all_votes_num):f==="Start Date"?new Date(y.start_date+"Z").getTime()-new Date(x.start_date+"Z").getTime():f==="End Date"?new Date(x.end_date+"Z").getTime()-new Date(y.end_date+"Z").getTime():f==="Creator"?x.creator.localeCompare(y.creator):0);return h?i.jsx("div",{className:"flex justify-center items-center py-8",children:i.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):i.jsxs("div",{children:[i.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Dy.map(x=>i.jsx("button",{className:`px-3 py-1 rounded text-sm ${c===x?"bg-blue-500 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,onClick:()=>u(x),children:x},x))}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"text-gray-700 dark:text-gray-300 mr-2",children:"Sort by:"}),i.jsx("select",{value:f,onChange:x=>l(x.target.value),className:"px-3 py-1 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",children:nf(c).map(x=>i.jsx("option",{value:x,children:x},x))})]}),i.jsxs("div",{children:[c==="All"&&(()=>{const x=b.filter(g=>g.status==="active"),y=b.filter(g=>new Date(g.start_date+"Z")>new Date);return i.jsxs(i.Fragment,{children:[x.map(g=>i.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg mb-4 p-2 sm:p-4 shadow bg-white dark:bg-gray-800",children:i.jsxs("div",{className:"flex flex-col sm:flex-row",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center mb-2",children:[i.jsx("span",{onClick:()=>a(g),className:"inline-block mr-2 cursor-pointer",children:i.jsx("img",{src:`https://images.hive.blog/u/${g.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${g.creator} avatar`})}),i.jsxs("span",{className:"font-bold cursor-pointer text-gray-900 dark:text-gray-100",onClick:()=>n(g),children:["by ",g.creator]}),g.receiver&&i.jsxs("span",{className:"ml-2 text-gray-500 dark:text-gray-400",children:["with receiver ",i.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:g.receiver})]})]}),i.jsxs("div",{className:"cursor-pointer text-lg font-semibold mb-1 text-gray-900 dark:text-gray-100",onClick:()=>r(g),children:[g.subject," ",i.jsxs("span",{className:"cursor-pointer text-lg font-semibold mb-1 text-gray-600 dark:text-gray-500",children:["#",g.proposal_id]})]}),i.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[i.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(g.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(g.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":g.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(g.start_date+"Z")>new Date?"upcoming":new Date(g.end_date+"Z")<new Date?"expired":g.status})," - "+new Date(g.start_date+"Z").toLocaleDateString()+" - "+new Date(g.end_date+"Z").toLocaleDateString()," ",i.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:Ku(g)})]}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx("button",{onClick:()=>window.open(`https://peakd.com/${g.creator}/${g.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:i.jsx(q.ExternalLink,{size:16})}),i.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${g.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[i.jsx(q.PieChart,{size:16})," Stats"]})]}),i.jsx("div",{className:"mb-2",children:i.jsxs("span",{className:"inline-block cursor-pointer px-2 py-1 bg-gray-100 dark:bg-gray-700 rounded text-gray-700 dark:text-gray-300",onClick:()=>e(g),children:["Vote value: ",g.vote_value_total?ut(g.vote_value_total):0," HP"]})})]}),i.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[g.daily_pay_hbd?ut(g.daily_pay_hbd):0," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.remaining_days||0)," Days"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.total_hbd_received||0)," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.max_hbd_remaining||0)," HBD"]})]}),i.jsx("div",{className:"mt-2",children:i.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>t(g),children:"Support"})})]})]})},g.proposal_id)),y.length>0&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"my-6 text-center",children:[i.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:"Upcoming proposals"}),i.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"The proposals listed below will start in the future. You can already support them."})]}),y.map(g=>i.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg mb-4 p-2 sm:p-4 shadow bg-white dark:bg-gray-800",children:i.jsxs("div",{className:"flex flex-col sm:flex-row",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center mb-2",children:[i.jsx("span",{onClick:()=>a(g),className:"inline-block mr-2 cursor-pointer",children:i.jsx("img",{src:`https://images.hive.blog/u/${g.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${g.creator} avatar`})}),i.jsx("span",{className:"font-bold cursor-pointer text-gray-900 dark:text-gray-100",onClick:()=>n(g),children:g.creator}),i.jsxs("span",{className:"ml-2 text-gray-500 dark:text-gray-400",children:["with receiver ",i.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:g.receiver})]})]}),i.jsx("div",{className:"cursor-pointer text-lg font-semibold mb-1 text-gray-900 dark:text-gray-100",onClick:()=>r(g),children:g.subject}),i.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[i.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(g.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(g.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":g.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(g.start_date+"Z")>new Date?"upcoming":new Date(g.end_date+"Z")<new Date?"expired":g.status})," - "+new Date(g.start_date+"Z").toLocaleDateString()+" - "+new Date(g.end_date+"Z").toLocaleDateString()," ",i.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:Ku(g)})]}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx("button",{onClick:()=>window.open(`https://peakd.com/${g.creator}/${g.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:i.jsx(q.ExternalLink,{size:16})}),i.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${g.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[i.jsx(q.PieChart,{size:16})," Stats"]})]}),i.jsx("div",{className:"mb-2",children:i.jsxs("span",{className:"inline-block cursor-pointer px-2 py-1 bg-gray-100 dark:bg-gray-700 rounded text-gray-700 dark:text-gray-300",onClick:()=>e(g),children:["Vote value: ",g.vote_value_total?ut(g.vote_value_total):0," HP"]})})]}),i.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[g.daily_pay_hbd?ut(g.daily_pay_hbd):0," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.remaining_days||0)," Days"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.total_hbd_received||0)," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(g.max_hbd_remaining||0)," HBD"]})]}),i.jsx("div",{className:"mt-2",children:i.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>t(g),children:"Support"})})]})]})},g.proposal_id))]})]})})(),c!=="All"&&b.map(x=>i.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg mb-4 p-2 sm:p-4 shadow bg-white dark:bg-gray-800",children:i.jsxs("div",{className:"flex flex-col sm:flex-row",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center mb-2",children:[i.jsx("span",{onClick:()=>a(x),className:"inline-block mr-2 cursor-pointer",children:i.jsx("img",{src:`https://images.hive.blog/u/${x.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${x.creator} avatar`})}),i.jsx("span",{className:"font-bold cursor-pointer text-gray-900 dark:text-gray-100",onClick:()=>n(x),children:x.creator}),i.jsxs("span",{className:"ml-2 text-gray-500 dark:text-gray-400",children:["with receiver ",i.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:x.receiver})]})]}),i.jsxs("div",{className:"cursor-pointer text-lg font-semibold mb-1 text-gray-900 dark:text-gray-100",onClick:()=>r(x),children:[x.subject," #",x.proposal_id]}),i.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[i.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(x.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(x.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":x.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(x.start_date+"Z")>new Date?"upcoming":new Date(x.end_date+"Z")<new Date?"expired":x.status})," - "+new Date(x.start_date+"Z").toLocaleDateString()+" - "+new Date(x.end_date+"Z").toLocaleDateString()," ",i.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:Ku(x)})]}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${x.creator}/${x.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:i.jsx(q.ExternalLink,{size:16})}),i.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${x.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[i.jsx(q.PieChart,{size:16})," Stats"]})]}),i.jsx("div",{className:"mb-2",children:i.jsxs("span",{className:"inline-block cursor-pointer px-2 py-1 bg-gray-100 dark:bg-gray-700 rounded text-gray-700 dark:text-gray-300",onClick:()=>e(x),children:["Vote value: ",x.vote_value_total?ut(x.vote_value_total):0," HP"]})})]}),i.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[x.daily_pay_hbd?ut(x.daily_pay_hbd):0," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(x.remaining_days||0)," Days"]})]}),c!=="Expired"&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(x.total_hbd_received||0)," HBD"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),i.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ut(x.max_hbd_remaining||0)," HBD"]})]}),i.jsx("div",{className:"mt-2",children:i.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>t(x),children:"Support"})})]})]})},x.proposal_id))]})]})};class Cy{constructor(){us(this,"HIVE_API_URL","https://api.hive.blog")}async getProfile(e){const r={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:e},id:1},n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}async getFollowers(e){const r={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[e,null,"blog"],id:1},n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return(await n.json()).result}async getFollowing(e){const r={jsonrpc:"2.0",method:"condenser_api.get_following",params:[e,null,"blog"],id:1},n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return(await n.json()).result}async getAccounts(e){const r={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[e],id:1},n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return(await n.json()).result}async getDynamicGlobalProperties(){const e={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},r=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return(await r.json()).result}async convertVestingSharesToHive(e){try{const r=await this.getDynamicGlobalProperties(),n=parseFloat(e.split(" ")[0]),a=parseFloat(r.total_vesting_shares.split(" ")[0]),s=parseFloat(r.total_vesting_fund_hive.split(" ")[0]);return(n*s/a).toFixed(3)}catch(r){return console.error("Error converting vesting shares:",r),"0"}}async getFeedHistory(){const e={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},r=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return(await r.json()).result}async getVoteValue(e,r=1e4){try{const n=await this.getAccounts([e]);if(n.length===0)throw new Error("Account not found!");const a=n[0],s=await this.getDynamicGlobalProperties(),o=await this.getFeedHistory(),c=parseFloat(a.vesting_shares)+parseFloat(a.received_vesting_shares)-parseFloat(a.delegated_vesting_shares)-parseFloat(a.vesting_withdraw_rate),u=Math.floor(Date.now()/1e3)-a.voting_manabar.last_update_time,f=c*1e6/4;let l=parseFloat(a.voting_manabar.current_mana.toString())+u*f/(5*60*60*24);l>f&&(l=f);const h=l*100/f,d=a.vesting_shares||"0 VESTS",m=parseFloat(d.toString().split(" ")[0]),b=s.total_vesting_shares||"0 VESTS",x=parseFloat(b.toString().split(" ")[0]),y=r/1e4,g=h*y/100,E=s.vote_power_reserve_rate*(5*60*60*24)/(60*60*24),D=g*f/100,w=parseFloat(s.recent_claims||"0"),j=s.reward_balance||"0 HIVE",p=parseFloat(j.toString().split(" ")[0]),A=s.current_supply||"0 HIVE",k=parseFloat(A.toString().split(" ")[0]),U=s.current_sbd_supply||"0 HBD",H=parseFloat(U.toString().split(" ")[0]),S=p/w*(m/x)*(D/f)*k,P=o==null?void 0:o.current_median_history;if(!P||!P.base)return"0.00";const I=parseFloat(P.base.toString().split(" ")[0]);return(S*I).toFixed(2)}catch(n){return console.error("Error calculating vote value:",n),"0.00"}}userAvatar(e){return`https://images.hive.blog/u/${e}/avatar`}}const Ie=new Cy,af=({vestingShares:t})=>{const[e,r]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const a=await Ie.convertVestingSharesToHive(t);r(a)}catch(a){console.error("Error calculating HP:",a);const s=parseFloat(t.split(" ")[0]);r((s/1e6).toFixed(3))}})()},[t]),i.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[e," HP"]})},Oy=({username:t,onClickAuthor:e,onClickAddRemoveFromLists:r,onClickFollow:n})=>{const[a,s]=T.useState([]),[o,c]=T.useState([]),[u,f]=T.useState({}),[l,h]=T.useState(!0),[d,m]=T.useState(null),[b,x]=T.useState(null),y=T.useRef(null),g=async()=>{try{h(!0),m(null);const w=await Ie.getFollowers(t);if(s(w),w.length>0){const j=w.map(U=>U.follower),p=await Ie.getAccounts(j);c(p);const A={},k={};for(const U of w)try{const H=await Ie.getVoteValue(U.follower);k[U.follower]=H}catch(H){console.warn(`Failed to get voting data for ${U.follower}:`,H),A[U.follower]={upvotepower:"0",downvote:"0"},k[U.follower]="0.00"}f(k)}}catch(w){m(w instanceof Error?w.message:"Failed to load followers data")}finally{h(!1)}};T.useEffect(()=>{g()},[t]),T.useEffect(()=>{const w=j=>{y.current&&!y.current.contains(j.target)&&x(null)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]);const E=w=>{const j=o.find(p=>p.name===w);if(!j)return null;try{const p=JSON.parse(j.posting_json_metadata);return(p==null?void 0:p.profile)||{}}catch{return{}}},D=w=>{const j=new Date,p=new Date(w),A=j.getTime()-p.getTime(),k=Math.floor(A/(1e3*60*60*24));if(Math.floor(k/30)>=1)return p.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const H=Math.floor(A/1e3),S=Math.floor(H/60),P=Math.floor(S/60),I=Math.floor(k/7),W=Math.floor(k/365);return W>0?`${W} year${W>1?"s":""} ago`:I>0?`${I} week${I>1?"s":""} ago`:k>0?`${k} day${k>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:S>0?`${S} minute${S>1?"s":""} ago`:"Just now"};return l?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):d?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:d}),i.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):a.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"hidden md:block overflow-x-auto",children:i.jsxs("table",{className:"w-full border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),i.jsx("tbody",{children:a.map((w,j)=>{const p=o.find(k=>k.name===w.follower),A=E(w.follower);return i.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[i.jsx("td",{className:"py-4 px-4",children:i.jsx("img",{src:(A==null?void 0:A.profile_image)||Ie.userAvatar(w.follower),alt:w.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>e&&e(w.follower),onError:k=>{k.target.src=`https://ui-avatars.com/api/?name=${w.follower}&background=random`}})}),i.jsxs("td",{className:"py-4 px-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>e&&e(w.follower),children:["@",w.follower]}),(A==null?void 0:A.location)&&i.jsxs("div",{className:"relative group",children:[i.jsx(q.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),i.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:A.location})]})]}),(A==null?void 0:A.about)&&i.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:A.about})]}),i.jsx("td",{className:"py-4 px-4",children:p!=null&&p.last_post&&p.last_post!=="1970-01-01T00:00:00"?i.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:D(p.last_root_post)}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),i.jsx("td",{className:"py-4 px-4",children:p?i.jsx(af,{vestingShares:p.vesting_shares}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),i.jsx("td",{className:"py-4 px-4",children:u[w.follower]?i.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",u[w.follower]]}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),i.jsx("td",{className:"py-4 px-4",children:i.jsxs("div",{className:"relative",ref:b===w.follower?y:null,children:[i.jsx("button",{onClick:()=>x(b===w.follower?null:w.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),b===w.follower&&i.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[i.jsxs("button",{onClick:()=>{r&&r(w.follower),x(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),i.jsxs("button",{onClick:()=>{n&&n(w.follower),x(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${w.follower}-${j}`)})})]})}),i.jsx("div",{className:"md:hidden space-y-4",children:a.map((w,j)=>{const p=o.find(k=>k.name===w.follower),A=E(w.follower);return i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("img",{src:(A==null?void 0:A.profile_image)||Ie.userAvatar(w.follower),alt:w.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>e&&e(w.follower),onError:k=>{k.target.src=`https://ui-avatars.com/api/?name=${w.follower}&background=random`}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>e&&e(w.follower),children:["@",w.follower]}),(A==null?void 0:A.location)&&i.jsxs("div",{className:"relative group",children:[i.jsx(q.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),i.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:A.location})]})]}),i.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:p!=null&&p.last_post&&p.last_post!=="1970-01-01T00:00:00"?D(p.last_root_post):i.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),i.jsxs("div",{className:"flex items-center justify-between mt-2",children:[i.jsx("div",{className:"flex items-center gap-4",children:p&&i.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.jsx(af,{vestingShares:p.vesting_shares})})}),i.jsxs("div",{className:"relative",ref:b===w.follower?y:null,children:[i.jsx("button",{onClick:()=>x(b===w.follower?null:w.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),b===w.follower&&i.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[i.jsxs("button",{onClick:()=>{r&&r(w.follower),x(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),i.jsxs("button",{onClick:()=>{n&&n(w.follower),x(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${w.follower}-${j}`)})})]})},sf=({vestingShares:t})=>{const[e,r]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const a=await Ie.convertVestingSharesToHive(t);r(a)}catch(a){console.error("Error calculating HP:",a);const s=parseFloat(t.split(" ")[0]);r((s/1e6).toFixed(3))}})()},[t]),i.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[e," HP"]})},$y=({username:t,onClickAuthor:e,onClickAddRemoveFromLists:r,onClickUnfollow:n})=>{const[a,s]=T.useState([]),[o,c]=T.useState([]),[u,f]=T.useState({}),[l,h]=T.useState(!0),[d,m]=T.useState(null),[b,x]=T.useState(null),y=T.useRef(null),g=async()=>{try{h(!0),m(null);const w=await Ie.getFollowing(t);if(s(w),w.length>0){const j=w.map(k=>k.following),p=await Ie.getAccounts(j);c(p);const A={};for(const k of w)try{const U=await Ie.getVoteValue(k.following);A[k.following]=U}catch(U){console.warn(`Failed to get voting data for ${k.following}:`,U),A[k.following]="0.00"}f(A)}}catch(w){m(w instanceof Error?w.message:"Failed to load following data")}finally{h(!1)}};T.useEffect(()=>{g()},[t]),T.useEffect(()=>{const w=j=>{y.current&&!y.current.contains(j.target)&&x(null)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]);const E=w=>{const j=o.find(p=>p.name===w);if(!j)return null;try{const p=JSON.parse(j.posting_json_metadata);return(p==null?void 0:p.profile)||{}}catch{return{}}},D=w=>{const j=new Date,p=new Date(w),A=j.getTime()-p.getTime(),k=Math.floor(A/(1e3*60*60*24));if(Math.floor(k/30)>=1)return p.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const H=Math.floor(A/1e3),S=Math.floor(H/60),P=Math.floor(S/60),I=Math.floor(k/7),W=Math.floor(k/365);return W>0?`${W} year${W>1?"s":""} ago`:I>0?`${I} week${I>1?"s":""} ago`:k>0?`${k} day${k>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:S>0?`${S} minute${S>1?"s":""} ago`:"Just now"};return l?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):d?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:d}),i.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):a.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"hidden md:block overflow-x-auto",children:i.jsxs("table",{className:"w-full border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),i.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),i.jsx("tbody",{children:a.map((w,j)=>{const p=o.find(k=>k.name===w.following),A=E(w.following);return i.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[i.jsx("td",{className:"py-4 px-4",children:i.jsx("img",{src:(A==null?void 0:A.profile_image)||Ie.userAvatar(w.following),alt:w.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>e&&e(w.following),onError:k=>{k.target.src=`https://ui-avatars.com/api/?name=${w.following}&background=random`}})}),i.jsxs("td",{className:"py-4 px-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>e&&e(w.following),children:["@",w.following]}),(A==null?void 0:A.location)&&i.jsxs("div",{className:"relative group",children:[i.jsx(q.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),i.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:A.location})]})]}),(A==null?void 0:A.about)&&i.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:A.about})]}),i.jsx("td",{className:"py-4 px-4",children:p!=null&&p.last_post&&p.last_post!=="1970-01-01T00:00:00"?i.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:D(p.last_root_post)}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),i.jsx("td",{className:"py-4 px-4",children:p?i.jsx(sf,{vestingShares:p.vesting_shares}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),i.jsx("td",{className:"py-4 px-4",children:u[w.following]?i.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",u[w.following]]}):i.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),i.jsx("td",{className:"py-4 px-4",children:i.jsxs("div",{className:"relative",ref:b===w.following?y:null,children:[i.jsx("button",{onClick:()=>x(b===w.following?null:w.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),b===w.following&&i.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[i.jsxs("button",{onClick:()=>{r&&r(w.following),x(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),i.jsxs("button",{onClick:()=>{n&&n(w.following),x(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${w.following}-${j}`)})})]})}),i.jsx("div",{className:"md:hidden space-y-4",children:a.map((w,j)=>{const p=o.find(k=>k.name===w.following),A=E(w.following);return i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("img",{src:(A==null?void 0:A.profile_image)||Ie.userAvatar(w.following),alt:w.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>e&&e(w.following),onError:k=>{k.target.src=`https://ui-avatars.com/api/?name=${w.following}&background=random`}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>e&&e(w.following),children:["@",w.following]}),(A==null?void 0:A.location)&&i.jsxs("div",{className:"relative group",children:[i.jsx(q.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),i.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:A.location})]})]}),i.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:p!=null&&p.last_post&&p.last_post!=="1970-01-01T00:00:00"?D(p.last_root_post):i.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),i.jsxs("div",{className:"flex items-center justify-between mt-2",children:[i.jsx("div",{className:"flex items-center gap-4",children:p&&i.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.jsx(sf,{vestingShares:p.vesting_shares})})}),i.jsxs("div",{className:"relative",ref:b===w.following?y:null,children:[i.jsx("button",{onClick:()=>x(b===w.following?null:w.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),b===w.following&&i.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[i.jsxs("button",{onClick:()=>{r&&r(w.following),x(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),i.jsxs("button",{onClick:()=>{n&&n(w.following),x(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[i.jsx(q.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${w.following}-${j}`)})})]})},of=new cs.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Py{async getAccountHistory(e,r=-1,n=1e3,a,s){try{const o=[e,r,n];return a!==void 0&&s!==void 0&&o.push(a,s),(await of.call("condenser_api","get_account_history",o)).map(([u,f])=>({index:u,block:f.block,op:{type:f.op[0],value:f.op[1]},op_in_trx:f.op_in_trx,timestamp:f.timestamp,trx_id:f.trx_id,trx_in_block:f.trx_in_block,virtual_op:f.virtual_op}))}catch(o){return console.error("Error fetching account history:",o),[]}}async getNextAccountHistoryPage(e,r,n=1e3){try{const a=r-1;return(await of.call("condenser_api","get_account_history",[e,a,n])).map(([c,u])=>({index:c,block:u.block,op:{type:u.op[0],value:u.op[1]},op_in_trx:u.op_in_trx,timestamp:u.timestamp,trx_id:u.trx_id,trx_in_block:u.trx_in_block,virtual_op:u.virtual_op})).filter(c=>c.index<r)}catch(a){return console.error("Error fetching next page of account history:",a),[]}}convertToActivityListItems(e,r){return e.filter(n=>{const a=n.op.type;return a!=="effective_comment_vote"&&a!=="witness_set_properties"&&a!=="producer_reward"&&a!=="comment_reward"&&a!=="comment_payout_update"&&a!=="claim_reward_balance"&&a!=="transfer"&&a!=="claim_account"&&a!=="transfer_to_vesting"&&a!=="transfer_to_vesting_completed"}).map(n=>{const a=this.parseOperation(n,r);return{id:`${n.index}-${n.trx_id}`,type:a.type,direction:a.direction,timestamp:n.timestamp,block:n.block,description:a.description,details:n.op.value,index:n.index,...a.extraFields}}).filter(n=>n!==null)}parseOperation(e,r){const{op:n}=e,a=n.type,s=n.value;switch(a){case"vote":return this.parseVoteOperation(s,r);case"comment":return this.parseCommentOperation(s,r);case"custom_json":return this.parseCustomJsonOperation(s,r);case"comment_options":return this.parseCommentOptionsOperation(s,r);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(s,r);case"curation_reward":return this.parseCurationRewardOperation(s,r);case"author_reward":return this.parseAuthorRewardOperation(s,r);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(s,r);default:return{type:"other",direction:"out",description:`${a} operation`,extraFields:{}}}}parseVoteOperation(e,r){const{voter:n,author:a,permlink:s,weight:o}=e,c=a===r,u=c?"in":"out",f=(o/100).toFixed(0);let l="";return c?l=`${n} voted ${a}/${s} with ${f}%`:l=`Voted ${a}/${s} with ${f}%`,{type:"vote",direction:u,description:l,extraFields:{voter:n,author:a,permlink:s,weight:parseInt(f)}}}parseCommentOperation(e,r){const{author:n,parent_author:a,parent_permlink:s,permlink:o}=e,u=a===r?"in":"out",l=`Commented on ${s} by ${a||n}.`;return{type:"comment",direction:u,description:l,extraFields:{author:n,permlink:o,parent_author:a,parent_permlink:s}}}parseCustomJsonOperation(e,r){const{id:n,json:a,required_auths:s,required_posting_auths:o}=e;let c={};try{c=JSON.parse(a)}catch{}let u="Custom Json";if(n==="follow"){const[f,l]=c;f==="follow"&&(u="Custom Json")}return{type:"custom_json",direction:"out",description:u,extraFields:{}}}parseCommentOptionsOperation(e,r){const{author:n,permlink:a,max_accepted_payout:s}=e;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:n,permlink:a,payout:s}}}parseEffectiveCommentVoteOperation(e,r){const{voter:n,author:a,permlink:s,pending_payout:o}=e,c=a===r,u=c?"in":"out",f=c?`${n} voted on ${a}/${s} (effective vote)`:`Effective vote on ${a}/${s}`;return{type:"effective_comment_vote",direction:u,description:f,extraFields:{voter:n,author:a,permlink:s,payout:o}}}parseCurationRewardOperation(e,r){const{author:n,curator:a,permlink:s,reward:o}=e,u=a===r?"in":"out",h=`${(parseFloat(o.split(" ")[0])*1e-6).toFixed(3)} HP`,d=`Curation reward for ${a}/${s} by ${n}`;return{type:"curation_reward",direction:u,description:d,extraFields:{author:n,curator:a,permlink:s,reward:h}}}parseAuthorRewardOperation(e,r){const{author:n,permlink:a,hbd_payout:s,hive_payout:o,vesting_payout:c}=e,f=n===r?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),d=s.split(" ")[0],m=o.split(" ")[0],b=`Author reward: ${d} HBD, ${m} HIVE, ${h} HP for ${a}`;return{type:"author_reward",direction:f,description:b,extraFields:{author:n,permlink:a,hbd_payout:s,hive_payout:o,vesting_payout:c}}}parseCommentBenefactorRewardOperation(e,r){const{author:n,benefactor:a,permlink:s,hbd_payout:o,hive_payout:c,vesting_payout:u}=e,l=a===r?"in":"out",d=(parseFloat(u.split(" ")[0])*1e-6).toFixed(3),m=o.split(" ")[0],b=c.split(" ")[0],x=`Benefactor reward on ${s} by ${n}: ${m} HBD, ${b} HIVE, ${d} HP`;return{type:"comment_benefactor_reward",direction:l,description:x,extraFields:{author:n,benefactor:a,permlink:s,hbd_payout:o,hive_payout:c,vesting_payout:u}}}filterByDirection(e,r){return r==="all"?e:e.filter(n=>n.direction===r)}filterByGeneralType(e,r){if(r==="all")return e;switch(r){case"votes":return e.filter(n=>n.type==="vote"||n.type==="effective_comment_vote");case"comments":return e.filter(n=>n.type==="comment");case"replies":return e.filter(n=>n.type==="comment"&&n.direction==="in");case"others":return e.filter(n=>n.type==="custom_json"||n.type==="comment_options"||n.type==="other");default:return e}}filterByRewardType(e,r){if(r==="all")return e;switch(r){case"author":return e.filter(n=>n.type==="effective_comment_vote"&&n.direction==="in");case"curation":return e.filter(n=>n.type==="effective_comment_vote"&&n.direction==="out");case"benefactor":return e.filter(n=>{var a;return n.type==="comment_options"&&((a=n.details)==null?void 0:a.beneficiaries)});default:return e}}searchActivities(e,r){if(!r.trim())return e;const n=r.toLowerCase();return e.filter(a=>{var s,o,c;return a.description.toLowerCase().includes(n)||((s=a.author)==null?void 0:s.toLowerCase().includes(n))||((o=a.permlink)==null?void 0:o.toLowerCase().includes(n))||((c=a.voter)==null?void 0:c.toLowerCase().includes(n))})}getRelativeTime(e){try{const r=new Date(e),a=new Date().getTime()-r.getTime(),s=Math.floor(a/1e3),o=Math.floor(s/60),c=Math.floor(o/60),u=Math.floor(c/24);return s<60?`${s} seconds ago`:o<60?`${o} minutes ago`:c<24?`${c} hours ago`:u<7?`${u} days ago`:r.toLocaleDateString()}catch(r){return console.error("Error calculating relative time:",r),e}}}const ea=new Py,Ly=({username:t,directionFilter:e="all",generalFilter:r="all",rewardFilter:n="all",searchTerm:a="",limit:s=1e3,className:o,onClickPermlink:c,onSelectActivity:u})=>{const[f,l]=T.useState(a),[h,d]=T.useState(e),[m,b]=T.useState(r),[x,y]=T.useState(n),[g,E]=T.useState([]),[D,w]=T.useState([]),[j,p]=T.useState(!1),[A,k]=T.useState(null),[U,H]=T.useState(new Set),[S,P]=T.useState(null),[I,W]=T.useState(!0),[_,M]=T.useState(!1),[O,G]=T.useState(-1),B=T.useRef(null),K=async(L=!1)=>{if(t){L?M(!0):(p(!0),W(!0),G(-1)),k(null);try{let V;L?V=await ea.getNextAccountHistoryPage(t,O,s):V=await ea.getAccountHistory(t,-1,s);const re=ea.convertToActivityListItems(V,t);if(re.sort((ie,ne)=>new Date(ne.timestamp).getTime()-new Date(ie.timestamp).getTime()),E(L?ie=>[...ie,...re]:re),V.length>0){const ie=Math.min(...V.map(ne=>ne.index));G(ie)}re.length===0&&W(!1)}catch(V){k("Failed to load activity history"),console.error("Error loading activities:",V),W(!1)}finally{p(!1),M(!1)}}};T.useEffect(()=>{K()},[t,s]);const X=T.useCallback(()=>{I&&!j&&!_&&K(!0)},[I,j,_]);T.useEffect(()=>{let L=g;h!=="all"?L=L.filter(V=>V.direction===h):L=L.filter(V=>V.type!=="custom_json"&&V.type!=="comment_options"),m!=="all"&&(m==="votes"?L=L.filter(V=>V.type==="vote"||V.type==="effective_comment_vote"):m==="comments"?L=L.filter(V=>V.type==="comment"):m==="replies"?L=L.filter(V=>V.type==="comment"&&V.direction==="in"):m==="curation"?L=L.filter(V=>V.type==="curation_reward"):m==="others"&&(L=g.filter(V=>V.type==="custom_json"||V.type==="comment_options"))),x!=="all"&&(x==="author"?L=L.filter(V=>V.type==="effective_comment_vote"&&V.direction==="in"):x==="curation"?L=L.filter(V=>V.type==="effective_comment_vote"&&V.direction==="out"):x==="benefactor"&&(L=L.filter(V=>V.type==="comment_options"))),f&&(L=L.filter(V=>{var re,ie;return V.description.toLowerCase().includes(f.toLowerCase())||((re=V.author)==null?void 0:re.toLowerCase().includes(f.toLowerCase()))||((ie=V.permlink)==null?void 0:ie.toLowerCase().includes(f.toLowerCase()))})),w(L)},[g,h,m,x,f]),T.useEffect(()=>{const L=V=>{B.current&&!B.current.contains(V.target)&&P(null)};return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[]);const se=L=>{switch(L.type){case"vote":case"effective_comment_vote":return i.jsx(q.Wallet,{className:"h-4 w-4"});case"comment":return i.jsx(q.MessageCircle,{className:"h-4 w-4"});case"custom_json":return i.jsx(q.FileText,{className:"h-4 w-4"});case"curation_reward":return i.jsx(q.Wallet,{className:"h-4 w-4"});case"author_reward":return i.jsx(q.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return i.jsx(q.User,{className:"h-4 w-4"});default:return i.jsx(q.Eye,{className:"h-4 w-4"})}},je=(L,V)=>L.split(/(\s+)/).map((ie,ne)=>{if(ie.includes("/")){const[Ne,Fe]=ie.split("/");if(Ne&&Fe)return i.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:At=>{At.stopPropagation(),console.log("Clicked permlink:",Ne,Fe),c==null||c(Ne,Fe)},children:ie},ne)}return i.jsx("span",{children:ie},ne)});return j?i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[i.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[i.jsx("div",{className:"flex-1 max-w-md",children:i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),i.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),i.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((L,V)=>i.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},V))})]}),i.jsx("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:Array.from({length:4}).map((L,V)=>i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},V))})]}),i.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((L,V)=>i.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[i.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),i.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),i.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[i.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},V))})]}):A?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:A}),i.jsxs("button",{onClick:()=>K(),className:"inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[i.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[i.jsx("div",{className:"flex-1 max-w-md",children:i.jsxs("div",{className:"relative",children:[i.jsx(q.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),i.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:L=>l(L.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.jsxs("select",{value:h,onChange:L=>d(L.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[i.jsx("option",{value:"all",children:"All Directions"}),i.jsx("option",{value:"in",children:"Incoming"}),i.jsx("option",{value:"out",children:"Outgoing"})]}),i.jsxs("select",{value:m,onChange:L=>b(L.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[i.jsx("option",{value:"all",children:"All Types"}),i.jsx("option",{value:"votes",children:"Votes"}),i.jsx("option",{value:"comments",children:"Comments"}),i.jsx("option",{value:"replies",children:"Replies"}),i.jsx("option",{value:"curation",children:"Curation"}),i.jsx("option",{value:"others",children:"Others"})]}),i.jsxs("select",{value:x,onChange:L=>y(L.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[i.jsx("option",{value:"all",children:"All Rewards"}),i.jsx("option",{value:"author",children:"Author"}),i.jsx("option",{value:"curation",children:"Curation"}),i.jsx("option",{value:"benefactor",children:"Benefactor"})]}),i.jsx("button",{onClick:()=>K(),disabled:j||_,className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:i.jsx(q.RefreshCw,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[i.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",i.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),i.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",i.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:D.length})]}),i.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",i.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(L=>L.direction==="in").length})]}),i.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",i.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(L=>L.direction==="out").length})]})]})]}),i.jsx("div",{className:"space-y-4",children:D.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:g.length===0?"No activities found for this user.":"No activities match the current filters."})}):i.jsxs(i.Fragment,{children:[D.map((L,V)=>i.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer",onClick:re=>{u==null||u(L)},children:[i.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[L.type==="vote"&&L.voter?i.jsx("img",{src:`https://images.hive.blog/u/${L.voter}/avatar`,alt:L.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:re=>{const ie=re.target;ie.style.display="none";const ne=ie.nextElementSibling;ne&&(ne.style.display="flex")}}):L.type==="comment_benefactor_reward"&&L.author?i.jsx("img",{src:`https://images.hive.blog/u/${L.author}/avatar`,alt:L.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:re=>{const ie=re.target;ie.style.display="none";const ne=ie.nextElementSibling;ne&&(ne.style.display="flex")}}):L.type==="comment"&&L.author?i.jsx("img",{src:`https://images.hive.blog/u/${L.author}/avatar`,alt:L.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:re=>{const ie=re.target;ie.style.display="none";const ne=ie.nextElementSibling;ne&&(ne.style.display="flex")}}):null,i.jsx("div",{className:`w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-full flex items-center justify-center flex-shrink-0 ${L.type==="vote"&&L.voter||L.type==="comment_benefactor_reward"&&L.author||L.type==="comment"&&L.author?"hidden":""}`,children:se(L)}),i.jsx("div",{className:"flex-1 min-w-0",children:L.type==="custom_json"||L.type==="comment_options"?i.jsxs("div",{children:[i.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:je(L.description)}),i.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ea.getRelativeTime(L.timestamp+"Z")}),i.jsx("div",{className:"border border-gray-200 dark:border-gray-600 rounded p-2 bg-gray-50 dark:bg-gray-700/50 mt-1",children:i.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[L.type==="custom_json"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("span",{className:"font-medium",children:"id:"})," ",L.details.id]}),i.jsxs("div",{className:"break-all",children:[i.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(L.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),i.jsxs("div",{children:[i.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(L.details.required_auths)]}),i.jsxs("div",{children:[i.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(L.details.required_posting_auths)]})]}),L.type==="comment_options"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("span",{className:"font-medium",children:"author:"}),i.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:L.details.author})]}),i.jsxs("div",{children:[i.jsx("span",{className:"font-medium",children:"permlink:"}),i.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:re=>{re.stopPropagation(),console.log("Clicked permlink:",L.details.author,L.details.permlink),c==null||c(L.details.author,L.details.permlink)},children:L.details.permlink})]})]})]})})]}):i.jsxs("div",{children:[i.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:je(L.description)}),i.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ea.getRelativeTime(L.timestamp+"Z")})]})})]}),i.jsx("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 flex-shrink-0 ml-4 hidden sm:flex",children:L.type!=="custom_json"&&L.type!=="comment_options"&&i.jsxs(i.Fragment,{children:[i.jsx(q.Clock,{className:"h-3 w-3 flex-shrink-0"}),i.jsx("span",{className:"truncate",children:ea.getRelativeTime(L.timestamp+"Z")})]})})]},`${L.id}-${V}`)),I&&g.length>0&&i.jsx("div",{className:"flex justify-center py-6",children:i.jsx("button",{onClick:X,disabled:j||_,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white rounded-lg font-medium transition-colors disabled:cursor-not-allowed flex items-center gap-2",children:_?i.jsxs(i.Fragment,{children:[i.jsx(q.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!I&&g.length>0&&i.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},ro=new cs.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class My{async getWitnessesByVote(e="",r=60){try{return await ro.call("condenser_api","get_witnesses_by_vote",[e,r])}catch(n){throw console.error("Error fetching witnesses by vote:",n),n}}async getAccount(e){try{const r=await ro.call("condenser_api","get_accounts",[[e]]);return r&&r.length>0?r[0]:null}catch(r){return console.error("Error fetching account:",r),null}}async getAccounts(e){try{return await ro.call("condenser_api","get_accounts",[e])}catch(r){return console.error("Error fetching accounts:",r),[]}}async getWitnessVotes(e,r="",n=250){try{return await ro.call("database_api","list_witness_votes",{start:[e,r],limit:n,order:"by_witness_account"})}catch(a){throw console.error("Error fetching witness votes:",a),a}}async getAllWitnessVotes(e){const r=[];let n="";try{for(;;){const s=await this.getWitnessVotes(e,n,250);if(r.push(...s.votes),s.votes.length<250)break;n=s.votes[s.votes.length-1].account}return r}catch(s){return console.error("Error fetching all witness votes:",s),[]}}async hasUserVotedForWitness(e,r){try{const n=await this.getAccount(e);return!n||!n.witness_votes?!1:n.witness_votes.includes(r)}catch(n){return console.error("Error checking witness vote:",n),!1}}async getUserWitnessVotes(e){try{const r=await this.getAccount(e);return(r==null?void 0:r.witness_votes)||[]}catch(r){return console.error("Error fetching user witness votes:",r),[]}}formatVotesToMHP(e){return`${(parseFloat(e)/1e6).toFixed(1)}m`}calculateAPR(e){return e/100}getVersionStatus(e,r){const n=this.parseVersion(e),a=this.parseVersion(r);return this.compareVersions(n,a)>=0?"green":this.compareVersions(n,a)<0?"red":"grey"}parseVersion(e){return e.split(".").map(r=>parseInt(r,10))}compareVersions(e,r){const n=Math.max(e.length,r.length);for(let a=0;a<n;a++){const s=e[a]||0,o=r[a]||0;if(s>o)return 1;if(s<o)return-1}return 0}getWitnessDescription(e){var r,n;try{let a;if(e.json_metadata&&e.json_metadata!=="{}"){a=JSON.parse(e.json_metadata);const s=(r=a.profile)==null?void 0:r.witness_description;if(s)return s}return e.posting_json_metadata&&e.posting_json_metadata!=="{}"?(a=JSON.parse(e.posting_json_metadata),((n=a.profile)==null?void 0:n.about)||""):""}catch(a){return console.error("Error parsing witness description:",a),""}}formatTimeAgo(e){const r=new Date(e),a=Math.floor((new Date().getTime()-r.getTime())/1e3);if(a<60)return`${a} second${a>1?"s":""} ago`;if(a<3600){const s=Math.floor(a/60);return`${s} minute${s>1?"s":""} ago`}else if(a<86400){const s=Math.floor(a/3600);return`${s} hour${s>1?"s":""} ago`}else if(a<604800){const s=Math.floor(a/86400);return`${s} day${s>1?"s":""} ago`}else if(a<2592e3){const s=Math.floor(a/604800);return`${s} week${s>1?"s":""} ago`}else if(a<31536e3){const s=Math.floor(a/2592e3);return`${s} month${s>1?"s":""} ago`}else{const s=Math.floor(a/31536e3);return`${s} year${s>1?"s":""} ago`}}}const Bt=new My,Ue=il.create((t,e)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(r="",n=50)=>{const{witnesses:a}=e();if(a.length>=500){t({hasMoreWitnesses:!1});return}t(r!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const o=await Bt.getWitnessesByVote(r,n);t(u=>{const f=new Set(u.witnesses.map(h=>h.owner)),l=o.filter(h=>!f.has(h.owner));return{witnesses:[...u.witnesses,...l],nextWitnessStart:o.length>0?o[o.length-1].owner:"",hasMoreWitnesses:o.length===n}});const c=o.filter(u=>!e().witnessDetails.has(u.owner)).map(u=>u.owner);c.length>0&&e().loadWitnessDetails(c)}catch(o){console.error("Error loading witnesses:",o),t({error:"Failed to load witnesses data"})}finally{t({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:r,hasMoreWitnesses:n,loadingMoreWitnesses:a}=e();!n||a||!r||await e().loadWitnesses(r,50)},loadWitnessVotes:async r=>{t({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:r});try{const n=await Bt.getWitnessVotes(r,"",250);t({witnessVotes:n.votes,nextVotesStart:n.votes.length>0?n.votes[n.votes.length-1].account:"",hasMoreVotes:n.votes.length===250,loadingVotes:!1})}catch(n){console.error("Error loading witness votes:",n),t({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:r,loadingMoreVotes:n,nextVotesStart:a,selectedWitness:s,witnessVotes:o}=e();if(!r||n||!a||o.length>=1e3){o.length>=1e3&&t({hasMoreVotes:!1});return}t({loadingMoreVotes:!0});try{const c=await Bt.getWitnessVotes(s||"",a,250);t(u=>{const l=[...u.witnessVotes,...c.votes].filter((d,m,b)=>b.findIndex(x=>x.account===d.account)===m),h=c.votes.filter((d,m,b)=>b.findIndex(x=>x.account===d.account)===m);return{witnessVotes:l,nextVotesStart:h.length>0?h[h.length-1].account:"",hasMoreVotes:c.votes.length===250}})}catch(c){console.error("Error loading more witness votes:",c)}finally{t({loadingMoreVotes:!1})}},loadUserWitnessVotes:async r=>{if(r){t({loadingUserVotes:!0});try{const n=await Bt.getUserWitnessVotes(r);t({userWitnessVotes:n})}catch(n){console.error("Error loading user witness votes:",n)}finally{t({loadingUserVotes:!1})}}},loadWitnessDetails:async r=>{try{const n=await Bt.getAccounts(r);t(a=>{const s=new Map(a.witnessDetails),o=new Map(a.witnessAccounts);return n.forEach(c=>{const u=Bt.getWitnessDescription(c);u&&s.set(c.name,u),o.set(c.name,c)}),{witnessDetails:s,witnessAccounts:o}})}catch(n){console.error("Error loading witness details:",n)}},setFilters:r=>t({filters:r}),setSelectedWitness:r=>t({selectedWitness:r}),clearVotes:()=>t({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),Iy=({filters:t,onFiltersChange:e})=>{const r=s=>{e({...t,status:s})},n=s=>{e({...t,name:s})},a=s=>{e({...t,version:s})};return i.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"FILTERS"}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"WITNESS"}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:t.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),i.jsx("span",{className:"text-white",children:"Active"})]}),i.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:t.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),i.jsx("span",{className:"text-white",children:"Disabled/Stale"})]}),i.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:t.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2"}),i.jsx("span",{className:"text-white",children:"Approved"})]})]})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"NAME"}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:i.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),i.jsx("input",{type:"text",placeholder:"Search",value:t.name,onChange:s=>n(s.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-700 border-b border-gray-600 text-white placeholder-gray-400 focus:outline-none focus:border-blue-500"})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"VERSION"}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:i.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),i.jsx("input",{type:"text",placeholder:"Version",value:t.version,onChange:s=>a(s.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-700 border-b border-gray-600 text-white placeholder-gray-400 focus:outline-none focus:border-blue-500"})]})]})]})},Fy=({isOpen:t,onClose:e,witness:r,votes:n,loadingMore:a,hasMore:s,loadingInitial:o,scrollContainerRef:c,sentinelRef:u,loadMoreVotes:f})=>{const l=T.useCallback(h=>{h[0].isIntersecting&&s&&!a&&f()},[s,a,f]);return T.useEffect(()=>{const h=new IntersectionObserver(l,{threshold:.1,root:c.current});return u.current&&h.observe(u.current),()=>{u.current&&h.unobserve(u.current)}},[l,c,u]),t?i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:i.jsxs("div",{className:"bg-gray-900 rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[i.jsxs("h3",{className:"text-lg font-semibold text-white",children:["Votes for @",r," (showing ",n.length,")"]}),i.jsx("button",{onClick:e,className:"text-gray-400 hover:text-white text-xl font-bold",children:"×"})]}),i.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:n.map((h,d)=>i.jsxs("div",{className:"flex items-center space-x-3 p-3 bg-gray-800 rounded-lg",children:[i.jsx("div",{className:"w-8 h-8 bg-gray-600 rounded-full flex items-center justify-center text-white text-sm font-medium",children:i.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${h.account}/avatar`,alt:h.account,onError:m=>{m.target.src="https://images.hive.blog/u/null/avatar"}})}),i.jsxs("div",{className:"flex-1",children:[i.jsx("div",{className:"text-white font-medium",children:h.account}),i.jsxs("div",{className:"text-gray-400 text-sm",children:["Vote #",d+1]})]}),i.jsx("div",{className:"text-gray-400 text-sm",children:"25"})]},h.account))}),n.length===0&&!o&&i.jsx("div",{className:"text-center text-gray-400 py-8",children:"No votes found for this witness."}),a&&i.jsx("div",{className:"text-center text-gray-400 py-4",children:"Loading more votes..."}),s&&!a&&i.jsx("div",{className:"text-center py-4",children:i.jsx("button",{onClick:f,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),s&&i.jsx("div",{ref:u,className:"h-4"})]})]})}):null},By=({username:t,filters:e={status:"all",name:"",version:""},onWitnessVoteClick:r,onWitnessStatsClick:n,onWitnessUrlClick:a})=>{const s=Ue(B=>B.witnesses),o=Ue(B=>B.userWitnessVotes),c=Ue(B=>B.loadingWitnesses),u=Ue(B=>B.error),f=Ue(B=>B.selectedWitness),l=Ue(B=>B.witnessVotes),h=Ue(B=>B.hasMoreVotes),d=Ue(B=>B.loadingMoreVotes),m=Ue(B=>B.loadingVotes),b=Ue(B=>B.filters),x=Ue(B=>B.hasMoreWitnesses),y=Ue(B=>B.loadingWitnesses),g=Ue(B=>B.witnessDetails);Ue(B=>B.witnessAccounts);const E=Ue(B=>B.loadWitnesses),D=Ue(B=>B.loadMoreWitnesses),w=Ue(B=>B.loadWitnessVotes),j=Ue(B=>B.loadMoreVotes),p=Ue(B=>B.loadUserWitnessVotes),A=Ue(B=>B.setFilters),[k,U]=T.useState(!1),H=T.useRef(null),S=T.useRef(null),P=T.useRef(null),I=T.useCallback(B=>{B[0].isIntersecting&&x&&!y&&D()},[x,y,D]);T.useEffect(()=>{const B=new IntersectionObserver(I,{threshold:.1});return P.current&&B.observe(P.current),()=>{P.current&&B.unobserve(P.current)}},[I]),T.useEffect(()=>{E()},[E]),T.useEffect(()=>{t&&p(t)},[t,p]),T.useEffect(()=>{A(e)},[]);const W=T.useMemo(()=>s.filter(B=>{if(b.status!=="all"){if(b.status==="active"){const K=new Date;if(K.setFullYear(K.getFullYear()-1),new Date(B.last_hbd_exchange_update+"Z")<=K)return!1}else if(b.status==="disabled"){const K=new Date;if(K.setFullYear(K.getFullYear()-1),new Date(B.last_hbd_exchange_update+"Z")>K)return!1}else if(b.status==="approved"&&!o.includes(B.owner))return!1}return!(b.name&&!B.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!B.running_version.includes(b.version))}),[s,b,o]),_=async B=>{r?r(B):(await w(B),U(!0))},M=B=>{n?n(B):window.open(`https://hivehub.dev/witnesses/@${B}`,"_blank")},O=B=>{a?a(B):window.open(B,"_blank")},G=B=>t?o.includes(B):!1;return c?i.jsx("div",{className:"flex items-center justify-center p-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):u?i.jsx("div",{className:"text-center p-8 text-red-400",children:u}):i.jsxs("div",{className:"w-full",children:[i.jsx(Fy,{isOpen:k,onClose:()=>U(!1),witness:f||"",votes:l,loadingMore:d,hasMore:h,loadingInitial:m,scrollContainerRef:S,sentinelRef:H,loadMoreVotes:j}),i.jsx(Iy,{filters:b,onFiltersChange:A}),i.jsxs("div",{className:"overflow-auto max-h-[70vh]",children:[i.jsxs("table",{className:"w-full text-sm text-left text-gray-400",children:[i.jsx("thead",{className:"text-xs text-gray-400 uppercase bg-gray-800",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Rank"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Witness"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Version"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Votes (MHP)"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Last Block"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Miss"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Price Feed"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"APR (%)"}),i.jsx("th",{scope:"col",className:"px-4 py-3",children:"Vote"})]})}),i.jsx("tbody",{children:W.map((B,K)=>{const X=Bt.getVersionStatus(B.running_version,B.hardfork_version_vote),se=G(B.owner);return i.jsxs("tr",{className:"border-b border-gray-700 hover:bg-gray-800",children:[i.jsx("td",{className:"px-4 py-4 font-medium text-white",children:s.findIndex(je=>je.owner===B.owner)+1}),i.jsx("td",{className:"px-4 py-4",children:i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${B.owner}/avatar`,alt:B.owner,onError:je=>{je.target.src="https://images.hive.blog/u/null/avatar"}}),i.jsxs("div",{className:"flex-1",children:[i.jsx("div",{className:"text-white font-medium",children:B.owner}),i.jsxs("div",{className:"text-gray-400 text-xs",children:["Witness since ",new Date(B.created).getFullYear()]}),g.get(B.owner)&&i.jsx("div",{className:"text-gray-400 text-xs mt-1 line-clamp-2",children:g.get(B.owner)})]}),i.jsxs("div",{className:"flex space-x-2 flex-shrink-0",children:[i.jsx("button",{onClick:()=>O(B.url),className:"text-gray-400 hover:text-white",title:"Visit witness URL",children:"🔗"}),i.jsx("button",{onClick:()=>M(B.owner),className:"text-gray-400 hover:text-white",title:"View witness stats",children:"📊"})]})]})}),i.jsx("td",{className:"px-4 py-4",children:i.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${X==="green"?"bg-green-900 text-green-300":X==="red"?"bg-red-900 text-red-300":"bg-gray-700 text-gray-300"}`,children:B.running_version})}),i.jsx("td",{className:"px-4 py-4",children:i.jsx("button",{onClick:()=>_(B.owner),className:"text-blue-400 hover:text-blue-300 cursor-pointer",disabled:m,children:m&&f===B.owner?"Loading...":Bt.formatVotesToMHP(B.votes)})}),i.jsxs("td",{className:"px-4 py-4 text-right",children:[i.jsx("div",{className:"text-white",children:B.last_confirmed_block_num.toLocaleString()}),i.jsx("div",{className:"text-gray-400 text-xs",children:"NA"})]}),i.jsx("td",{className:"px-4 py-4 text-right text-white",children:B.total_missed.toLocaleString()}),i.jsxs("td",{className:"px-4 py-4 text-right",children:[i.jsx("div",{className:"text-white",children:B.hbd_exchange_rate.base}),i.jsx("div",{className:"text-gray-400 text-xs",children:Bt.formatTimeAgo(B.last_hbd_exchange_update+"Z")})]}),i.jsxs("td",{className:"px-4 py-4 text-right text-white",children:[Bt.calculateAPR(B.props.hbd_interest_rate),"%"]}),i.jsx("td",{className:"px-4 py-4",children:i.jsx("div",{className:"flex items-center justify-center",children:i.jsx("svg",{className:`w-5 h-5 ${se?"text-green-500":"text-gray-500"}`,fill:"currentColor",viewBox:"0 0 20 20",children:i.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},B.owner)})})]}),y&&i.jsxs("div",{className:"flex items-center justify-center py-4",children:[i.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),i.jsx("span",{className:"ml-2 text-gray-400",children:"Loading more witnesses..."})]}),x&&i.jsx("div",{ref:P,className:"h-1"})]})]})},Qu="_communityLocalKey",no={getBookmarkedCommunities:()=>{const t=localStorage.getItem(Qu);return t?JSON.parse(t):[]},isUserPresentLocally:t=>{const e=localStorage.getItem(Qu);return e?JSON.parse(e).includes(t):!1},storeLikedCommunityLocally:(t,e=!1)=>{let r=no.getBookmarkedCommunities();return r.includes(t)?r=r.filter(n=>n!==t):e||r.push(t),localStorage.setItem(Qu,JSON.stringify(r)),r}},el=({id:t,toastType:e,isLiked:r,onAdd:n,onRemove:a,onFavourite:s})=>{const[o,c]=T.useState(r??no.isUserPresentLocally(t));T.useEffect(()=>{r!==void 0&&c(r)},[r]);const u=()=>{s&&s(),o?(a?a(t,"remove_bookmark"):no.storeLikedCommunityLocally(t,!0),f(!1)):(n?n(t,"add_bookmark"):no.storeLikedCommunityLocally(t),f(!0)),c(!o)},f=l=>{alert(`The ${e} is ${l?"added to":"removed from"} your bookmarks`)};return i.jsx("button",{onClick:u,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:o?i.jsx(q.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):i.jsx(q.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class Vy{constructor(){us(this,"HIVE_API_URL","https://api.hive.blog")}async getListOfCommunities(e,r=20,n){const a={limit:r};n&&n.trim()!==""&&(a.last=n),e&&e.trim()!==""&&(a.query=e);const s={jsonrpc:"2.0",method:"bridge.list_communities",params:a,id:1};try{const o=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(await o.json()).result||[]}catch(o){throw console.error("Error fetching communities:",o),o}}async getCommunityDetails(e){const r={jsonrpc:"2.0",method:"bridge.get_community",params:{name:e},id:1};try{const n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}catch(n){throw console.error("Error fetching community details:",n),n}}async getCommunitySubscribers(e,r=100,n){const a={community:e,limit:r};n&&n.trim()!==""&&(a.last=n);const s={jsonrpc:"2.0",method:"bridge.list_community_roles",params:a,id:1};try{const o=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return((await o.json()).result||[]).map(u=>({username:u[0],role:u[1],extra:u[2],subscribedAt:u[3]}))}catch(o){throw console.error("Error fetching community subscribers:",o),o}}async getCommunitySubscribersList(e,r=100,n){const a={community:e,limit:r};n&&n.trim()!==""&&(a.last=n);const s={jsonrpc:"2.0",method:"bridge.list_subscribers",params:a,id:2};try{const o=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return((await o.json()).result||[]).map(u=>({username:u[0],role:u[1],extra:u[2],subscribedAt:u[3]}))}catch(o){throw console.error("Error fetching community subscribers list:",o),o}}async getCommunityAccounts(e){const r={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[e]],id:2};try{const n=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return(await n.json()).result||[]}catch(n){throw console.error("Error fetching community accounts:",n),n}}async getRankedPosts(e,r="created",n=20,a,s){const o={tag:e,sort:r,limit:n};a&&s&&(o.start_author=a,o.start_permlink=s);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:o,id:3};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching ranked posts:",u),u}}communityIcon(e){return`https://images.hive.blog/u/${e}/avatar?size=icon`}userOwnerThumb(e){return`https://images.hive.blog/u/${e}/avatar`}async getCommunityActivities(e,r=100,n){const a={account:e,limit:r};n&&(a.last_id=n);const s={jsonrpc:"2.0",method:"bridge.account_notifications",params:a,id:19};try{const o=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(await o.json()).result||[]}catch(o){throw console.error("Error fetching community activities:",o),o}}}const xr=new Vy,qy=({onSelectCommunity:t})=>{const[e,r]=T.useState([]),[n,a]=T.useState(""),[s,o]=T.useState(!0),[c,u]=T.useState(!1),[f,l]=T.useState(!0),[h,d]=T.useState(null),[m,b]=T.useState(null),x=20,y=T.useRef(null),g=T.useCallback(async(w=!1)=>{if(!(!w&&(c||!f)))try{w?(o(!0),b(null),r([]),d(null),l(!0)):u(!0);const j=n.trim(),p=await xr.getListOfCommunities(j.length>=3?j:void 0,x,w?void 0:h||void 0);r(A=>w?p:[...A,...p]),p.length<x||p.length>0&&p[p.length-1].name===h?l(!1):p.length>0&&d(p[p.length-1].name||null)}catch(j){b(j instanceof Error?j.message:"Failed to load communities"),l(!1)}finally{o(!1),u(!1)}},[n,c,f,h]);T.useEffect(()=>{const w=setTimeout(()=>{g(!0)},n.length>=3||n.length===0?0:500);return()=>clearTimeout(w)},[n]),T.useEffect(()=>{var w;(w=y.current)==null||w.focus()},[n,s,m]),T.useEffect(()=>{const w=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!c&&!s&&f&&g()};return window.addEventListener("scroll",w),()=>window.removeEventListener("scroll",w)},[g,c,s,f]);const E=()=>{g(!0)},D=()=>i.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((w,j)=>i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 animate-pulse",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 bg-gray-200 dark:bg-gray-700 rounded-full"}),i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"}),i.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-1/2"})]}),i.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-16"})]})},j))});return s&&e.length===0?i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"relative",children:[i.jsx(q.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),i.jsx("input",{type:"text",placeholder:"Search communities...",value:n,onChange:w=>a(w.target.value),ref:y,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
89
1100
|
rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
|
|
90
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),
|
|
1101
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),i.jsx(D,{})]}):m&&e.length===0?i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"relative",children:[i.jsx(q.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),i.jsx("input",{type:"text",placeholder:"Search communities...",value:n,onChange:w=>a(w.target.value),ref:y,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
91
1102
|
rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
|
|
92
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),
|
|
1103
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load communities"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:m}),i.jsxs("button",{onClick:E,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})})]}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"",children:i.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Communities"})}),i.jsxs("div",{className:"relative flex justify-between items-center",children:[i.jsx(q.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),i.jsx("input",{type:"text",placeholder:"Search communities...",value:n,onChange:w=>a(w.target.value),ref:y,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
93
1104
|
rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
|
|
94
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500`}),
|
|
1105
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500`}),i.jsx("button",{onClick:E,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:i.jsx(q.RefreshCw,{className:"w-4 h-4"})})]}),e.length===0?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"No communities found"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:n?"Try adjusting your search terms":"Check back later for new communities"})]})}):i.jsxs("div",{className:"space-y-4",children:[e.map(w=>i.jsx("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
95
1106
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
96
|
-
transition-colors cursor-pointer`,onClick:()=>
|
|
1107
|
+
transition-colors cursor-pointer`,onClick:()=>t(w.name||""),children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("img",{src:xr.communityIcon(w.name||""),alt:w.title,className:"w-12 h-12 rounded-full object-cover",onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${w.title}&background=random`}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:w.title}),i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 line-clamp-2",children:w.about})]}),i.jsx("div",{className:"text-right",children:i.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[(w.subscribers||0).toLocaleString()," members"]})})]})},w.id)),f&&i.jsx("div",{className:"flex justify-center pt-4",children:c?i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more communities..."]}):i.jsx("button",{onClick:()=>g(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Communities"})})]})]})},uf=({communityId:t})=>{var h,d,m;const[e,r]=T.useState(null),[n,a]=T.useState(!0),[s,o]=T.useState(null),c=async()=>{try{a(!0),o(null);const b=await xr.getCommunityDetails(t);r(b)}catch(b){o(b instanceof Error?b.message:"Failed to load community details")}finally{a(!1)}};T.useEffect(()=>{c()},[t]);const u=b=>{try{return new Date(b).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return b}},f=b=>b.replace(/<[^>]*>/g,"");if(n)return i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})});if(s)return i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load community details"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:s}),i.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!(e!=null&&e.result))return i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community details available"})});const l=e.result;return i.jsx("div",{className:"space-y-6",children:i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[l.about&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),i.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:f(l.about)})]}),l.description&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),i.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(l.description)})]}),l.flag_text&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),i.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(l.flag_text)})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),i.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((h=l.num_authors)==null?void 0:h.toLocaleString())||"0"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),i.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((d=l.subscribers)==null?void 0:d.toLocaleString())||"0"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l.created_at?u(l.created_at):"Unknown"})]}),l.lang&&i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l.lang.toUpperCase()})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:((m=l.num_pending)==null?void 0:m.toLocaleString())||"0"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l.is_nsfw?"NSFW":"Safe"})]})]})]})})},lf=({communityId:t,onSelectTeamMember:e})=>{var l;const[r,n]=T.useState(null),[a,s]=T.useState(!0),[o,c]=T.useState(null),u=async()=>{try{s(!0),c(null);const h=await xr.getCommunityDetails(t);n(h)}catch(h){c(h instanceof Error?h.message:"Failed to load team details")}finally{s(!1)}};T.useEffect(()=>{u()},[t]);const f=((l=r==null?void 0:r.result)==null?void 0:l.team)||[];return a?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading team members..."]})}):o?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load team details"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:o}),i.jsxs("button",{onClick:u,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):f.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No team members found"})}):i.jsx("div",{className:"space-y-6",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map((h,d)=>{const m=h[0],b=h.length>1?h[1]:"";return i.jsx("div",{onClick:()=>e&&e(m),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
97
1108
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
98
|
-
transition-colors cursor-pointer`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:fe.userOwnerThumb(y),alt:y,className:"w-12 h-12 rounded-full object-cover",onError:C=>{C.target.src=`https://ui-avatars.com/api/?name=${y}&background=random`}}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",y]}),g&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:g})]})]})},`${y}-${v}`)})})})},St=({communityId:r,onSelectCommunityMember:s})=>{const[t,a]=d.useState([]),[o,i]=d.useState(!0),[l,u]=d.useState(!1),[c,h]=d.useState(!0),[m,x]=d.useState(null),[v,y]=d.useState(null),g=100,C=d.useCallback(async(k=!1)=>{if(!(l&&!k))try{k?(i(!0),y(null),a([]),x(null),h(!0)):u(!0);const S=await fe.getCommunitySubscribers(r,g,k?void 0:m||void 0);S.length===0?h(!1):(a(w=>{if(k)return S;const I=new Set(w.map(M=>M.username)),_=S.filter(M=>!I.has(M.username));return[...w,..._]}),S.length>0&&x(S[S.length-1].username),h(S.length===g))}catch(S){y(S instanceof Error?S.message:"Failed to load members")}finally{i(!1),u(!1)}},[r,l,m]);return d.useEffect(()=>{C(!0)},[r]),d.useEffect(()=>{const k=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!l&&!o&&c&&C()};return window.addEventListener("scroll",k),()=>window.removeEventListener("scroll",k)},[C,l,o,c]),o&&t.length===0?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):v&&t.length===0?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:v}),e.jsxs("button",{onClick:()=>C(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.length===0?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:t.map((k,S)=>e.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>s==null?void 0:s(k.username),children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:fe.userOwnerThumb(k.username),alt:k.username,className:"w-12 h-12 rounded-full object-cover",onError:w=>{w.target.src=`https://ui-avatars.com/api/?name=${k.username}&background=random`}}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",k.username]}),k.role&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:k.role})]})]})},`${k.username}-${S}`))}),c&&e.jsx("div",{className:"flex justify-center pt-4",children:l?e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):e.jsx("button",{onClick:()=>C(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},yr=({communityId:r,onVideoClick:s,onAuthorClick:t,onBack:a,onclickAboutTab:o,onclickTeamTab:i,onclickMemberTab:l,onShare:u,onFavourite:c,onRss:h,onMoreVertical:m,showMoreVertical:x=!0})=>{const v=ct.useNavigate(),[y,g]=d.useState("videos"),[C,k]=d.useState(null),[S,w]=d.useState(!1),[I,_]=d.useState(!0);d.useEffect(()=>{(async()=>{try{_(!0);const L=await fe.getCommunityDetails(r);k(L)}catch(L){console.error("Failed to fetch community details:",L)}finally{_(!1)}})()},[r]);const M=()=>{var L;const V=`https://3speak.tv/user/${r}`;navigator.share?navigator.share({title:((L=C==null?void 0:C.result)==null?void 0:L.title)||r,url:V}):navigator.clipboard.writeText(V)},D=()=>{window.open(`https://3speak.tv/rss/${r}.xml`,"_blank")},$=V=>{v(`/user/${V}`)};if(I)return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"animate-pulse",children:[e.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),e.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((V,L)=>e.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},L))})]})]})});const f=C==null?void 0:C.result;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("button",{onClick:a,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[e.jsx(j.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[e.jsx("img",{src:fe.userOwnerThumb(r),alt:(f==null?void 0:f.title)||r,className:"w-16 h-16 rounded-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${(f==null?void 0:f.title)||r}/avatar`}}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:(f==null?void 0:f.title)||r}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:(f==null?void 0:f.about)||"Community description"}),e.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Users,{className:"w-4 h-4"}),e.jsxs("span",{children:[((f==null?void 0:f.subscribers)||0).toLocaleString()," members"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Calendar,{className:"w-4 h-4"}),e.jsxs("span",{children:["Created"," ",f!=null&&f.created_at?new Date(f.created_at).getFullYear():"Unknown"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:r,toastType:"community",onAdd:(V,L)=>console.log("Added:",V,L),onRemove:(V,L)=>console.log("Removed:",V,L),onFavourite:c}),e.jsx("button",{onClick:h||D,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.Rss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:u||M,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.Share2,{className:"w-4 h-4"})}),x&&e.jsx("button",{onClick:m||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.MoreVertical,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsx("button",{onClick:()=>g("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${y==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),e.jsx("button",{onClick:()=>o?o():g("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${y==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),e.jsx("button",{onClick:()=>i?i():g("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${y==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),e.jsx("button",{onClick:()=>l?l():g("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${y==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),e.jsxs("div",{className:"mt-6",children:[y==="videos"&&e.jsx(Pe,{feedType:ee.COMMUNITY,communityId:r,onVideoClick:s,onAuthorClick:t}),y==="about"&&!o&&e.jsx(kt,{communityId:r}),y==="team"&&!i&&e.jsx(_t,{communityId:r,onSelectTeamMember:$}),y==="members"&&!l&&e.jsx(St,{communityId:r,onSelectCommunityMember:$})]})]})]})},vr=({currentUser:r,onTabChanged:s,onPublish:t,onViewMyVideo:a,onMoreOptions:o,onTapBackButton:i,shouldShowBackButton:l=!0,shouldShowPublishButton:u=!1,shouldShowMoreOptionsButton:c=!1})=>{const h=ct.useNavigate(),[m,x]=d.useState(0),[v,y]=d.useState([]),[g,C]=d.useState(!0),[k,S]=d.useState(null),w=v.filter(P=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(P.status||"")),I=v.filter(P=>P.status==="publish_manual"),_=v.filter(P=>P.status==="published");d.useEffect(()=>{r!=null&&r.token&&M()},[r]);const M=async()=>{if(!(r!=null&&r.token)){S("No authentication token provided"),C(!1);return}C(!0),S(null);try{const P=await se.getMyVideos(r.token);y(P)}catch(P){console.error("Error fetching videos:",P),S(`Failed to load videos: ${P instanceof Error?P.message:"Unknown error"}`)}finally{C(!1)}},D=P=>{x(P),s==null||s(P)},$=P=>{P.owner&&P.permlink&&h(`/video/${P.owner}/${P.permlink}`)},f=P=>{switch(P.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},V=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],L=(P,T)=>{if(P.length===0){let E="";switch(T){case"publishNow":E="No videos ready to publish.";break;case"myVideos":E="No published videos found.";break;case"encoding":E="No videos currently encoding.";break}return e.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[e.jsx(j.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:E})]})}return e.jsx("div",{className:"space-y-3 w-full",children:P.map((E,J)=>{const re=E.thumbnail||"",B=E.title||"No Title",z=E.permlink||"",ae=E.owner||(r==null?void 0:r.username)||"",p=E.id||"",te=V.includes(E.status||"");return e.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("img",{src:ve(re)||`https://images.hive.blog/u/${r==null?void 0:r.username}/avatar`,alt:B,className:"w-24 h-16 rounded-lg object-cover",onError:R=>{R.target.src=`https://images.hive.blog/u/${r==null?void 0:r.username}/avatar`}}),V.includes(E.status||"")?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:e.jsx(j.Ban,{className:"w-6 h-6 text-red-500"})}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>$(E),children:e.jsx(j.Play,{className:"w-6 h-6 text-white"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>$(E),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:B}),e.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",ae]}),E.status&&e.jsx("div",{className:"mt-2",children:e.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${f(E.status)}`,children:E.status.toUpperCase()})})]}),te?e.jsx("div",{className:"flex-shrink-0 pl-2",children:e.jsx(j.Ban,{className:"w-5 h-5 text-red-500"})}):e.jsxs("div",{className:"flex flex-col items-end gap-2",children:[T==="publishNow"&&u&&e.jsx("button",{onClick:()=>t==null?void 0:t(ae,z),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),T==="myVideos"&&e.jsx("button",{onClick:()=>a?a(ae,z):$(E),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),c&&e.jsx("button",{onClick:()=>o==null?void 0:o(p),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:e.jsx(j.MoreVertical,{className:"w-4 h-4"})})]})]})},`${p}-${J}`)})})};return r?e.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[l&&e.jsxs("button",{onClick:i,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[e.jsx(j.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:`https://images.hive.blog/u/${r.username}/avatar`,alt:r.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:P=>{P.target.src=`https://ui-avatars.com/api/?name=${r.username}&background=random&size=64`}}),e.jsx("div",{children:e.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:r.username})})]})}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("button",{onClick:M,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:e.jsx(j.RefreshCw,{className:"w-5 h-5"})})})]}),e.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[e.jsxs("button",{onClick:()=>D(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${m===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[e.jsx(j.Upload,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),e.jsx("span",{className:"sm:hidden",children:"Publish"}),I.length>0&&e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:I.length})]}),e.jsxs("button",{onClick:()=>D(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${m===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[e.jsx(j.Video,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),e.jsx("span",{className:"sm:hidden",children:"Videos"}),_.length>0&&e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:_.length})]}),e.jsxs("button",{onClick:()=>D(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${m===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[e.jsx(j.Hourglass,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),e.jsx("span",{className:"sm:hidden",children:"Encoding"}),w.length>0&&e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:w.length})]})]})})]}),e.jsx("div",{className:"py-4 md:py-6 w-full",children:g?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):k?e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:e.jsx(j.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:k}),e.jsx("button",{onClick:M,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):e.jsxs("div",{className:"space-y-6",children:[m===0&&L(I,"publishNow"),m===1&&L(_,"myVideos"),m===2&&L(w,"encoding")]})})]}):e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})};class jr{constructor(){Ye(this,"HIVE_API_URL","https://api.hive.blog")}async getProfile(s){const t={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:s},id:1},a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}async getFollowers(s){const t={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[s,null,"blog"],id:1},a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return(await a.json()).result}async getFollowing(s){const t={jsonrpc:"2.0",method:"condenser_api.get_following",params:[s,null,"blog"],id:1},a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return(await a.json()).result}async getAccounts(s){const t={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[s],id:1},a=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return(await a.json()).result}async getDynamicGlobalProperties(){const s={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},t=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return(await t.json()).result}async convertVestingSharesToHive(s){try{const t=await this.getDynamicGlobalProperties(),a=parseFloat(s.split(" ")[0]),o=parseFloat(t.total_vesting_shares.split(" ")[0]),i=parseFloat(t.total_vesting_fund_hive.split(" ")[0]);return(a*i/o).toFixed(3)}catch(t){return console.error("Error converting vesting shares:",t),"0"}}async getFeedHistory(){const s={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},t=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return(await t.json()).result}async getVoteValue(s,t=1e4){try{const a=await this.getAccounts([s]);if(a.length===0)throw new Error("Account not found!");const o=a[0],i=await this.getDynamicGlobalProperties(),l=await this.getFeedHistory(),u=parseFloat(o.vesting_shares)+parseFloat(o.received_vesting_shares)-parseFloat(o.delegated_vesting_shares)-parseFloat(o.vesting_withdraw_rate),c=Math.floor(Date.now()/1e3)-o.voting_manabar.last_update_time,h=u*1e6/4;let m=parseFloat(o.voting_manabar.current_mana.toString())+c*h/(5*60*60*24);m>h&&(m=h);const x=m*100/h,v=o.vesting_shares||"0 VESTS",y=parseFloat(v.toString().split(" ")[0]),g=i.total_vesting_shares||"0 VESTS",C=parseFloat(g.toString().split(" ")[0]),k=t/1e4,S=x*k/100,w=i.vote_power_reserve_rate*(5*60*60*24)/(60*60*24),I=S*h/100,_=parseFloat(i.recent_claims||"0"),M=i.reward_balance||"0 HIVE",D=parseFloat(M.toString().split(" ")[0]),$=i.current_supply||"0 HIVE",f=parseFloat($.toString().split(" ")[0]),V=i.current_sbd_supply||"0 HBD",L=parseFloat(V.toString().split(" ")[0]),P=D/_*(y/C)*(I/h)*f,T=l==null?void 0:l.current_median_history;if(!T||!T.base)return"0.00";const E=parseFloat(T.base.toString().split(" ")[0]);return(P*E).toFixed(2)}catch(a){return console.error("Error calculating vote value:",a),"0.00"}}userAvatar(s){return`https://images.hive.blog/u/${s}/avatar`}}const pe=new jr,Et=({username:r,onSelectUser:s})=>{const[t,a]=d.useState([]),[o,i]=d.useState(!0),[l,u]=d.useState(null),c=async()=>{try{i(!0),u(null);const h=await pe.getFollowers(r);a(h)}catch(h){u(h instanceof Error?h.message:"Failed to load followers")}finally{i(!1)}};return d.useEffect(()=>{c()},[r]),o?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),e.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.length===0?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):e.jsx("div",{className:"space-y-6",children:e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:t.map((h,m)=>e.jsx("div",{onClick:()=>s&&s(h.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1109
|
+
transition-colors cursor-pointer`,children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:xr.userOwnerThumb(m),alt:m,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${m}&background=random`}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",m]}),b&&i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b})]})]})},`${m}-${d}`)})})})},cf=({communityId:t,onSelectCommunityMember:e})=>{const[r,n]=T.useState([]),[a,s]=T.useState(!0),[o,c]=T.useState(!1),[u,f]=T.useState(!0),[l,h]=T.useState(null),[d,m]=T.useState(null),b=100,x=T.useCallback(async(y=!1)=>{if(!(o&&!y))try{y?(s(!0),m(null),n([]),h(null),f(!0)):c(!0);const g=await xr.getCommunitySubscribers(t,b,y?void 0:l||void 0);g.length===0?f(!1):(n(E=>{if(y)return g;const D=new Set(E.map(j=>j.username)),w=g.filter(j=>!D.has(j.username));return[...E,...w]}),g.length>0&&h(g[g.length-1].username),f(g.length===b))}catch(g){m(g instanceof Error?g.message:"Failed to load members")}finally{s(!1),c(!1)}},[t,o,l]);return T.useEffect(()=>{x(!0)},[t]),T.useEffect(()=>{const y=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!o&&!a&&u&&x()};return window.addEventListener("scroll",y),()=>window.removeEventListener("scroll",y)},[x,o,a,u]),a&&r.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):d&&r.length===0?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:d}),i.jsxs("button",{onClick:()=>x(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:r.map((y,g)=>i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>e==null?void 0:e(y.username),children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:xr.userOwnerThumb(y.username),alt:y.username,className:"w-12 h-12 rounded-full object-cover",onError:E=>{E.target.src=`https://ui-avatars.com/api/?name=${y.username}&background=random`}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",y.username]}),y.role&&i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:y.role})]})]})},`${y.username}-${g}`))}),u&&i.jsx("div",{className:"flex justify-center pt-4",children:o?i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):i.jsx("button",{onClick:()=>x(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},Uy=({communityId:t,onVideoClick:e,onAuthorClick:r,onBack:n,onclickAboutTab:a,onclickTeamTab:s,onclickMemberTab:o,onShare:c,onFavourite:u,onRss:f,onMoreVertical:l,showMoreVertical:h=!0})=>{const d=ol.useNavigate(),[m,b]=T.useState("videos"),[x,y]=T.useState(null),[g,E]=T.useState(!1),[D,w]=T.useState(!0);T.useEffect(()=>{(async()=>{try{w(!0);const H=await xr.getCommunityDetails(t);y(H)}catch(H){console.error("Failed to fetch community details:",H)}finally{w(!1)}})()},[t]);const j=()=>{var H;const U=`https://3speak.tv/user/${t}`;navigator.share?navigator.share({title:((H=x==null?void 0:x.result)==null?void 0:H.title)||t,url:U}):navigator.clipboard.writeText(U)},p=()=>{window.open(`https://3speak.tv/rss/${t}.xml`,"_blank")},A=U=>{d(`/user/${U}`)};if(D)return i.jsx("div",{className:"space-y-6",children:i.jsxs("div",{className:"animate-pulse",children:[i.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),i.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((U,H)=>i.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},H))})]})]})});const k=x==null?void 0:x.result;return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[i.jsx(q.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:i.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[i.jsx("img",{src:xr.userOwnerThumb(t),alt:(k==null?void 0:k.title)||t,className:"w-16 h-16 rounded-full object-cover",onError:U=>{U.target.src=`https://images.hive.blog/u/${(k==null?void 0:k.title)||t}/avatar`}}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:(k==null?void 0:k.title)||t}),i.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:(k==null?void 0:k.about)||"Community description"}),i.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Users,{className:"w-4 h-4"}),i.jsxs("span",{children:[((k==null?void 0:k.subscribers)||0).toLocaleString()," members"]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Calendar,{className:"w-4 h-4"}),i.jsxs("span",{children:["Created"," ",k!=null&&k.created_at?new Date(k.created_at).getFullYear():"Unknown"]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(el,{id:t,toastType:"community",onAdd:(U,H)=>console.log("Added:",U,H),onRemove:(U,H)=>console.log("Removed:",U,H),onFavourite:u}),i.jsx("button",{onClick:f||p,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.Rss,{className:"w-4 h-4"})}),i.jsx("button",{onClick:c||j,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.Share2,{className:"w-4 h-4"})}),h&&i.jsx("button",{onClick:l||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.MoreVertical,{className:"w-4 h-4"})})]})]})}),i.jsxs("div",{children:[i.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[i.jsx("button",{onClick:()=>b("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${m==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),i.jsx("button",{onClick:()=>a?a():b("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${m==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),i.jsx("button",{onClick:()=>s?s():b("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${m==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),i.jsx("button",{onClick:()=>o?o():b("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${m==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),i.jsxs("div",{className:"mt-6",children:[m==="videos"&&i.jsx(ps,{feedType:We.COMMUNITY,communityId:t,onVideoClick:e,onAuthorClick:r}),m==="about"&&!a&&i.jsx(uf,{communityId:t}),m==="team"&&!s&&i.jsx(lf,{communityId:t,onSelectTeamMember:A}),m==="members"&&!o&&i.jsx(cf,{communityId:t,onSelectCommunityMember:A})]})]})]})},Ry=({currentUser:t,onTabChanged:e,onPublish:r,onViewMyVideo:n,onMoreOptions:a,onTapBackButton:s,shouldShowBackButton:o=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:u=!1})=>{const f=ol.useNavigate(),[l,h]=T.useState(0),[d,m]=T.useState([]),[b,x]=T.useState(!0),[y,g]=T.useState(null),E=d.filter(S=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(S.status||"")),D=d.filter(S=>S.status==="publish_manual"),w=d.filter(S=>S.status==="published");T.useEffect(()=>{t!=null&&t.token&&j()},[t]);const j=async()=>{if(!(t!=null&&t.token)){g("No authentication token provided"),x(!1);return}x(!0),g(null);try{const S=await Ke.getMyVideos(t.token);m(S)}catch(S){console.error("Error fetching videos:",S),g(`Failed to load videos: ${S instanceof Error?S.message:"Unknown error"}`)}finally{x(!1)}},p=S=>{h(S),e==null||e(S)},A=S=>{S.owner&&S.permlink&&f(`/video/${S.owner}/${S.permlink}`)},k=S=>{switch(S.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},U=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],H=(S,P)=>{if(S.length===0){let I="";switch(P){case"publishNow":I="No videos ready to publish.";break;case"myVideos":I="No published videos found.";break;case"encoding":I="No videos currently encoding.";break}return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[i.jsx(q.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),i.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:I})]})}return i.jsx("div",{className:"space-y-3 w-full",children:S.map((I,W)=>{const _=I.thumbnail||"",M=I.title||"No Title",O=I.permlink||"",G=I.owner||(t==null?void 0:t.username)||"",B=I.id||"",K=U.includes(I.status||"");return i.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-shrink-0",children:[i.jsx("img",{src:Hr(_)||`https://images.hive.blog/u/${t==null?void 0:t.username}/avatar`,alt:M,className:"w-24 h-16 rounded-lg object-cover",onError:X=>{X.target.src=`https://images.hive.blog/u/${t==null?void 0:t.username}/avatar`}}),U.includes(I.status||"")?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:i.jsx(q.Ban,{className:"w-6 h-6 text-red-500"})}):i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>A(I),children:i.jsx(q.Play,{className:"w-6 h-6 text-white"})})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>A(I),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:M}),i.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",G]}),I.status&&i.jsx("div",{className:"mt-2",children:i.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${k(I.status)}`,children:I.status.toUpperCase()})})]}),K?i.jsx("div",{className:"flex-shrink-0 pl-2",children:i.jsx(q.Ban,{className:"w-5 h-5 text-red-500"})}):i.jsxs("div",{className:"flex flex-col items-end gap-2",children:[P==="publishNow"&&c&&i.jsx("button",{onClick:()=>r==null?void 0:r(G,O),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),P==="myVideos"&&i.jsx("button",{onClick:()=>n?n(G,O):A(I),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),u&&i.jsx("button",{onClick:()=>a==null?void 0:a(B),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.MoreVertical,{className:"w-4 h-4"})})]})]})},`${B}-${W}`)})})};return t?i.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[o&&i.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[i.jsx(q.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),i.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[i.jsxs("div",{className:"flex items-center justify-between p-4",children:[i.jsx("div",{className:"flex items-center gap-3",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:`https://images.hive.blog/u/${t.username}/avatar`,alt:t.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:S=>{S.target.src=`https://ui-avatars.com/api/?name=${t.username}&background=random&size=64`}}),i.jsx("div",{children:i.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:t.username})})]})}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("button",{onClick:j,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:i.jsx(q.RefreshCw,{className:"w-5 h-5"})})})]}),i.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:i.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[i.jsxs("button",{onClick:()=>p(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[i.jsx(q.Upload,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),i.jsx("span",{className:"sm:hidden",children:"Publish"}),D.length>0&&i.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:D.length})]}),i.jsxs("button",{onClick:()=>p(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[i.jsx(q.Video,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),i.jsx("span",{className:"sm:hidden",children:"Videos"}),w.length>0&&i.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:w.length})]}),i.jsxs("button",{onClick:()=>p(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[i.jsx(q.Hourglass,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),i.jsx("span",{className:"sm:hidden",children:"Encoding"}),E.length>0&&i.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:E.length})]})]})})]}),i.jsx("div",{className:"py-4 md:py-6 w-full",children:b?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):y?i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[i.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:i.jsx(q.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),i.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:y}),i.jsx("button",{onClick:j,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):i.jsxs("div",{className:"space-y-6",children:[l===0&&H(D,"publishNow"),l===1&&H(w,"myVideos"),l===2&&H(E,"encoding")]})})]}):i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},df=({username:t,onSelectUser:e})=>{const[r,n]=T.useState([]),[a,s]=T.useState(!0),[o,c]=T.useState(null),u=async()=>{try{s(!0),c(null);const f=await Ie.getFollowers(t);n(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{s(!1)}};return T.useEffect(()=>{u()},[t]),a?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):o?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:o}),i.jsxs("button",{onClick:u,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):i.jsx("div",{className:"space-y-6",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:r.map((f,l)=>i.jsx("div",{onClick:()=>e&&e(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
99
1110
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
100
|
-
transition-colors cursor-pointer`,children:
|
|
1111
|
+
transition-colors cursor-pointer`,children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:Ie.userAvatar(f.follower),alt:f.follower,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.follower}&background=random`}}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.follower]})})]})},`${f.follower}-${l}`))})})},ff=({username:t,onSelectUser:e})=>{const[r,n]=T.useState([]),[a,s]=T.useState(!0),[o,c]=T.useState(null),u=async()=>{try{s(!0),c(null);const f=await Ie.getFollowing(t);n(f)}catch(f){c(f instanceof Error?f.message:"Failed to load following list")}finally{s(!1)}};return T.useEffect(()=>{u()},[t]),a?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following list..."]})}):o?i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following list"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:o}),i.jsxs("button",{onClick:u,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):i.jsx("div",{className:"space-y-6",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:r.map((f,l)=>i.jsx("div",{onClick:()=>e&&e(f.following),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
101
1112
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
102
|
-
transition-colors cursor-pointer`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:pe.userAvatar(h.following),alt:h.following,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${h.following}&background=random`}}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",h.following]})})]})},`${h.following}-${m}`))})})},Tt=({username:r})=>{var v,y,g,C,k,S;const[s,t]=d.useState(null),[a,o]=d.useState(!0),[i,l]=d.useState(null),u=async()=>{try{o(!0),l(null);const w=await pe.getProfile(r);t(w)}catch(w){l(w instanceof Error?w.message:"Failed to load user details")}finally{o(!1)}};d.useEffect(()=>{u()},[r]);const c=w=>{try{return new Date(w).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return w}},h=w=>w.replace(/<[^>]*>/g,"");if(a)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(i)return e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:i}),e.jsxs("button",{onClick:u,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[e.jsx(j.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!(s!=null&&s.result))return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const m=s.result,x=(v=m.metadata)==null?void 0:v.profile;return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[(x==null?void 0:x.about)&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),e.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:h(x.about)})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),e.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:(x==null?void 0:x.location)||"Not specified"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),e.jsx("a",{href:x==null?void 0:x.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:(x==null?void 0:x.website)||"Not specified"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),e.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:m.created?c(m.created):"Unknown"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((g=(y=m.stats)==null?void 0:y.followers)==null?void 0:g.toLocaleString())||"0"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((k=(C=m.stats)==null?void 0:C.following)==null?void 0:k.toLocaleString())||"0"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((S=m.post_count)==null?void 0:S.toLocaleString())||"0"})]})]})]})})},wr=({username:r,onVideoClick:s,onAuthorClick:t,onBack:a,onClickUserInfoTab:o,onClickFollowersTab:i,onClickFollowingTab:l,onBookmarkToggle:u,onRss:c,onShare:h,onMoreMenu:m,showMoreMenu:x=!1})=>{var V,L,P;const[v,y]=d.useState("videos"),[g,C]=d.useState(null),[k,S]=d.useState(!1),[w,I]=d.useState(!0);d.useEffect(()=>{(async()=>{try{I(!0);const E=await pe.getProfile(r);C(E)}catch(E){console.error("Failed to fetch user details:",E)}finally{I(!1)}})()},[r]);const _=()=>{var T;if(h)h(r);else{const E=`https://3speak.tv/user/${r}`;navigator.share?navigator.share({title:((T=g==null?void 0:g.result)==null?void 0:T.name)||r,url:E}):navigator.clipboard.writeText(E)}},M=()=>{c?c(r):window.open(`https://3speak.tv/rss/${r}.xml`,"_blank")},D=T=>{t(T)};if(w)return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"animate-pulse",children:[e.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),e.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((T,E)=>e.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},E))})]})]})});const $=g==null?void 0:g.result,f=(V=$==null?void 0:$.metadata)==null?void 0:V.profile;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("button",{onClick:a,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[e.jsx(j.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[e.jsx("img",{src:f.cover_image||pe.userAvatar(r),alt:"Cover",className:"w-full h-48 object-cover",onError:T=>{T.target.src=pe.userAvatar(r)}}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[e.jsx("img",{src:f==null?void 0:f.profile_image,alt:f==null?void 0:f.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:T=>{T.target.src=pe.userAvatar(r)}}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:(f==null?void 0:f.name)||r}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:(f==null?void 0:f.about)||"No description available"}),e.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Users,{className:"w-4 h-4"}),e.jsxs("span",{children:[(((L=$==null?void 0:$.stats)==null?void 0:L.followers)||0).toLocaleString()," Followers"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Users,{className:"w-4 h-4"}),e.jsxs("span",{children:[(((P=$==null?void 0:$.stats)==null?void 0:P.following)||0).toLocaleString()," Following"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(j.Calendar,{className:"w-4 h-4"}),e.jsxs("span",{children:["Joined"," ",$!=null&&$.created?new Date($.created).getFullYear():"Unknown"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:r,toastType:"user",onAdd:(T,E)=>{u?u(T,!0):console.log("Added:",T,E)},onRemove:(T,E)=>{u?u(T,!1):console.log("Removed:",T,E)}}),e.jsx("button",{onClick:M,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.Rss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:_,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.Share2,{className:"w-4 h-4"})}),x&&e.jsx("button",{onClick:()=>{m&&m(r)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(j.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:o},{key:"followers",label:"Followers",callback:i},{key:"following",label:"Following",callback:l}].map((T,E)=>e.jsx("button",{onClick:()=>{T.callback?T.callback():y(T.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${v===T.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:T.label},T.key))}),e.jsxs("div",{className:"mt-6",children:[v==="videos"&&e.jsx(Pe,{feedType:ee.USER,username:r,onVideoClick:s,onAuthorClick:t}),v==="about"&&e.jsx(Tt,{username:r}),v==="followers"&&e.jsx(Et,{username:r,onSelectUser:D}),v==="following"&&e.jsx(Ct,{username:r,onSelectUser:D})]})]})]})},et=768;function Nr(){const[r,s]=Le.useState(void 0);return Le.useEffect(()=>{const t=window.matchMedia(`(max-width: ${et-1}px)`),a=()=>{s(window.innerWidth<et)};return t.addEventListener("change",a),s(window.innerWidth<et),()=>t.removeEventListener("change",a)},[]),!!r}const kr=1,_r=1e6;let tt=0;function Sr(){return tt=(tt+1)%Number.MAX_SAFE_INTEGER,tt.toString()}const rt=new Map,Vt=r=>{if(rt.has(r))return;const s=setTimeout(()=>{rt.delete(r),Ve({type:"REMOVE_TOAST",toastId:r})},_r);rt.set(r,s)},Ot=(r,s)=>{switch(s.type){case"ADD_TOAST":return{...r,toasts:[s.toast,...r.toasts].slice(0,kr)};case"UPDATE_TOAST":return{...r,toasts:r.toasts.map(t=>t.id===s.toast.id?{...t,...s.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=s;return t?Vt(t):r.toasts.forEach(a=>{Vt(a.id)}),{...r,toasts:r.toasts.map(a=>a.id===t||t===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return s.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(t=>t.id!==s.toastId)}}},Ue=[];let He={toasts:[]};function Ve(r){He=Ot(He,r),Ue.forEach(s=>{s(He)})}function Lt({...r}){const s=Sr(),t=o=>Ve({type:"UPDATE_TOAST",toast:{...o,id:s}}),a=()=>Ve({type:"DISMISS_TOAST",toastId:s});return Ve({type:"ADD_TOAST",toast:{...r,id:s,open:!0,onOpenChange:o=>{o||a()}}}),{id:s,dismiss:a,update:t}}function Er(){const[r,s]=Le.useState(He);return Le.useEffect(()=>(Ue.push(s),()=>{const t=Ue.indexOf(s);t>-1&&Ue.splice(t,1)}),[r]),{...r,toast:Lt,dismiss:t=>Ve({type:"DISMISS_TOAST",toastId:t})}}O.ApiVideoFeedType=ee,O.CommentsModal=ft,O.CommunitiesList=br,O.CommunityAbout=kt,O.CommunityDetail=yr,O.CommunityMembers=St,O.CommunityTeam=_t,O.DescriptionModal=bt,O.FavouriteWidget=Ze,O.ListOfWitnesses=fr,O.Modal=Me,O.UpvoteListModal=pt,O.UserAccount=vr,O.UserFollowers=Et,O.UserFollowing=Ct,O.UserInfo=Tt,O.UserProfilePage=wr,O.VideoCard=ht,O.VideoDetail=Kt,O.VideoFeed=Pe,O.VideoInfo=xt,O.Wallet=mr,O.apiService=se,O.reducer=Ot,O.server=xe,O.toast=Lt,O.useIsMobile=Nr,O.useToast=Er,O.useWalletStore=Nt,O.witnessService=me,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
1113
|
+
transition-colors cursor-pointer`,children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:Ie.userAvatar(f.following),alt:f.following,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.following}&background=random`}}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${l}`))})})},hf=({username:t})=>{var d,m,b,x,y,g;const[e,r]=T.useState(null),[n,a]=T.useState(!0),[s,o]=T.useState(null),c=async()=>{try{a(!0),o(null);const E=await Ie.getProfile(t);r(E)}catch(E){o(E instanceof Error?E.message:"Failed to load user details")}finally{a(!1)}};T.useEffect(()=>{c()},[t]);const u=E=>{try{return new Date(E).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return E}},f=E=>E.replace(/<[^>]*>/g,"");if(n)return i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(s)return i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:s}),i.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[i.jsx(q.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!(e!=null&&e.result))return i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const l=e.result,h=(d=l.metadata)==null?void 0:d.profile;return i.jsx("div",{className:"space-y-6",children:i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[(h==null?void 0:h.about)&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),i.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:(h==null?void 0:h.location)||"Not specified"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),i.jsx("a",{href:h==null?void 0:h.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:(h==null?void 0:h.website)||"Not specified"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),i.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l.created?u(l.created):"Unknown"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),i.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((b=(m=l.stats)==null?void 0:m.followers)==null?void 0:b.toLocaleString())||"0"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),i.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((y=(x=l.stats)==null?void 0:x.following)==null?void 0:y.toLocaleString())||"0"})]}),i.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),i.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:((g=l.post_count)==null?void 0:g.toLocaleString())||"0"})]})]})]})})},zy=({username:t,onVideoClick:e,onAuthorClick:r,onBack:n,onClickUserInfoTab:a,onClickFollowersTab:s,onClickFollowingTab:o,onBookmarkToggle:c,onRss:u,onShare:f,onMoreMenu:l,showMoreMenu:h=!1})=>{var U,H,S;const[d,m]=T.useState("videos"),[b,x]=T.useState(null),[y,g]=T.useState(!1),[E,D]=T.useState(!0);T.useEffect(()=>{(async()=>{try{D(!0);const I=await Ie.getProfile(t);x(I)}catch(I){console.error("Failed to fetch user details:",I)}finally{D(!1)}})()},[t]);const w=()=>{var P;if(f)f(t);else{const I=`https://3speak.tv/user/${t}`;navigator.share?navigator.share({title:((P=b==null?void 0:b.result)==null?void 0:P.name)||t,url:I}):navigator.clipboard.writeText(I)}},j=()=>{u?u(t):window.open(`https://3speak.tv/rss/${t}.xml`,"_blank")},p=P=>{r(P)};if(E)return i.jsx("div",{className:"space-y-6",children:i.jsxs("div",{className:"animate-pulse",children:[i.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),i.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),i.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),i.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((P,I)=>i.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},I))})]})]})});const A=b==null?void 0:b.result,k=(U=A==null?void 0:A.metadata)==null?void 0:U.profile;return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[i.jsx(q.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),i.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[i.jsx("img",{src:k.cover_image||Ie.userAvatar(t),alt:"Cover",className:"w-full h-48 object-cover",onError:P=>{P.target.src=Ie.userAvatar(t)}}),i.jsx("div",{className:"p-6",children:i.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[i.jsx("img",{src:k==null?void 0:k.profile_image,alt:k==null?void 0:k.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:P=>{P.target.src=Ie.userAvatar(t)}}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:(k==null?void 0:k.name)||t}),i.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:(k==null?void 0:k.about)||"No description available"}),i.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Users,{className:"w-4 h-4"}),i.jsxs("span",{children:[(((H=A==null?void 0:A.stats)==null?void 0:H.followers)||0).toLocaleString()," Followers"]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Users,{className:"w-4 h-4"}),i.jsxs("span",{children:[(((S=A==null?void 0:A.stats)==null?void 0:S.following)||0).toLocaleString()," Following"]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx(q.Calendar,{className:"w-4 h-4"}),i.jsxs("span",{children:["Joined"," ",A!=null&&A.created?new Date(A.created).getFullYear():"Unknown"]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(el,{id:t,toastType:"user",onAdd:(P,I)=>{c?c(P,!0):console.log("Added:",P,I)},onRemove:(P,I)=>{c?c(P,!1):console.log("Removed:",P,I)}}),i.jsx("button",{onClick:j,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.Rss,{className:"w-4 h-4"})}),i.jsx("button",{onClick:w,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.Share2,{className:"w-4 h-4"})}),h&&i.jsx("button",{onClick:()=>{l&&l(t)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:i.jsx(q.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),i.jsxs("div",{children:[i.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:a},{key:"followers",label:"Followers",callback:s},{key:"following",label:"Following",callback:o}].map((P,I)=>i.jsx("button",{onClick:()=>{P.callback?P.callback():m(P.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d===P.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:P.label},P.key))}),i.jsxs("div",{className:"mt-6",children:[d==="videos"&&i.jsx(ps,{feedType:We.USER,username:t,onVideoClick:e,onAuthorClick:r}),d==="about"&&i.jsx(hf,{username:t}),d==="followers"&&i.jsx(df,{username:t,onSelectUser:p}),d==="following"&&i.jsx(ff,{username:t,onSelectUser:p})]})]})]})},tl=768;function Hy(){const[t,e]=ds.useState(void 0);return ds.useEffect(()=>{const r=window.matchMedia(`(max-width: ${tl-1}px)`),n=()=>{e(window.innerWidth<tl)};return r.addEventListener("change",n),e(window.innerWidth<tl),()=>r.removeEventListener("change",n)},[]),!!t}const Wy=1,Gy=1e6;let rl=0;function Jy(){return rl=(rl+1)%Number.MAX_SAFE_INTEGER,rl.toString()}const nl=new Map,pf=t=>{if(nl.has(t))return;const e=setTimeout(()=>{nl.delete(t),es({type:"REMOVE_TOAST",toastId:t})},Gy);nl.set(t,e)},mf=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,Wy)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?pf(r):t.toasts.forEach(n=>{pf(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},ao=[];let so={toasts:[]};function es(t){so=mf(so,t),ao.forEach(e=>{e(so)})}function gf({...t}){const e=Jy(),r=a=>es({type:"UPDATE_TOAST",toast:{...a,id:e}}),n=()=>es({type:"DISMISS_TOAST",toastId:e});return es({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:a=>{a||n()}}}),{id:e,dismiss:n,update:r}}function Yy(){const[t,e]=ds.useState(so);return ds.useEffect(()=>(ao.push(e),()=>{const r=ao.indexOf(e);r>-1&&ao.splice(r,1)}),[t]),{...t,toast:gf,dismiss:r=>es({type:"DISMISS_TOAST",toastId:r})}}ae.ActivityList=Ly,ae.ApiVideoFeedType=We,ae.CommentsModal=pl,ae.CommunitiesList=qy,ae.CommunityAbout=uf,ae.CommunityDetail=Uy,ae.CommunityMembers=cf,ae.CommunityTeam=lf,ae.DescriptionModal=gl,ae.FavouriteWidget=el,ae.FollowersList=Oy,ae.FollowingList=$y,ae.ListOfWitnesses=By,ae.Modal=ms,ae.PostFeedList=Sy,ae.ProposalsList=Ty,ae.UpvoteListModal=ml,ae.UserAccount=Ry,ae.UserFollowers=df,ae.UserFollowing=ff,ae.UserInfo=hf,ae.UserProfilePage=zy,ae.VideoCard=dl,ae.VideoDetail=jf,ae.VideoFeed=ps,ae.VideoInfo=hl,ae.Wallet=zf,ae.apiService=Ke,ae.reducer=mf,ae.server=sr,ae.toast=gf,ae.useIsMobile=Hy,ae.useToast=Yy,ae.useWalletStore=wl,ae.witnessService=Bt,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});
|