hive-react-kit 0.4.3 → 0.4.5
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/build.css +13 -0
- package/dist/index.cjs.js +36 -36
- package/dist/index.esm.js +1073 -1092
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),z=require("lucide-react"),dn=require("date-fns"),ha=require("@hiveio/dhive"),na=require("hls.js"),Pc=require("zustand"),Lc=require("react-router-dom");function Mc(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const sn=Mc(T),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),z=require("lucide-react"),dn=require("date-fns"),ha=require("@hiveio/dhive"),na=require("hls.js"),Pc=require("zustand"),Lc=require("react-router-dom");function Mc(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const sn=Mc(T),Zd=Mc(ha);var Nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ji(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var s=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};s.prototype=a.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),s}var xs={exports:{}},va={};var vo;function Xd(){if(vo)return va;vo=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(i,r,n){var u=null;if(n!==void 0&&(u=""+n),r.key!==void 0&&(u=""+r.key),"key"in r){n={};for(var c in r)c!=="key"&&(n[c]=r[c])}else n=r;return r=n.ref,{$$typeof:e,type:i,key:u,ref:r!==void 0?r:null,props:n}}return va.Fragment=a,va.jsx=s,va.jsxs=s,va}var wa={};var wo;function Qd(){return wo||(wo=1,process.env.NODE_ENV!=="production"&&(function(){function e(R){if(R==null)return null;if(typeof R=="function")return R.$$typeof===C?null:R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case b:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case m:return"Suspense";case k:return"SuspenseList";case D:return"Activity"}if(typeof R=="object")switch(typeof R.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),R.$$typeof){case w:return"Portal";case j:return R.displayName||"Context";case N:return(R._context.displayName||"Context")+".Consumer";case x:var ne=R.render;return R=R.displayName,R||(R=ne.displayName||ne.name||"",R=R!==""?"ForwardRef("+R+")":"ForwardRef"),R;case _:return ne=R.displayName||null,ne!==null?ne:e(R.type)||"Memo";case E:ne=R._payload,R=R._init;try{return e(R(ne))}catch{}}return null}function a(R){return""+R}function s(R){try{a(R);var ne=!1}catch{ne=!0}if(ne){ne=console;var I=ne.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object";return I.call(ne,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),a(R)}}function i(R){if(R===b)return"<>";if(typeof R=="object"&&R!==null&&R.$$typeof===E)return"<...>";try{var ne=e(R);return ne?"<"+ne+">":"<...>"}catch{return"<...>"}}function r(){var R=P.A;return R===null?null:R.getOwner()}function n(){return Error("react-stack-top-frame")}function u(R){if(L.call(R,"key")){var ne=Object.getOwnPropertyDescriptor(R,"key").get;if(ne&&ne.isReactWarning)return!1}return R.key!==void 0}function c(R,ne){function I(){q||(q=!0,console.error("%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://react.dev/link/special-props)",ne))}I.isReactWarning=!0,Object.defineProperty(R,"key",{get:I,configurable:!0})}function d(){var R=e(this.type);return M[R]||(M[R]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),R=this.props.ref,R!==void 0?R:null}function f(R,ne,I,V,J,ue){var Q=I.ref;return R={$$typeof:y,type:R,key:ne,props:I,_owner:V},(Q!==void 0?Q:null)!==null?Object.defineProperty(R,"ref",{enumerable:!1,get:d}):Object.defineProperty(R,"ref",{enumerable:!1,value:null}),R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(R,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(R,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(R,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R}function o(R,ne,I,V,J,ue){var Q=ne.children;if(Q!==void 0)if(V)if(H(Q)){for(V=0;V<Q.length;V++)h(Q[V]);Object.freeze&&Object.freeze(Q)}else console.error("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 h(Q);if(L.call(ne,"key")){Q=e(R);var te=Object.keys(ne).filter(function(Se){return Se!=="key"});V=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",ee[Q+V]||(te=0<te.length?"{"+te.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,V,Q,te,Q),ee[Q+V]=!0)}if(Q=null,I!==void 0&&(s(I),Q=""+I),u(
|
|
6
|
+
<%s key={someKey} {...props} />`,V,Q,te,Q),ee[Q+V]=!0)}if(Q=null,I!==void 0&&(s(I),Q=""+I),u(ne)&&(s(ne.key),Q=""+ne.key),"key"in ne){I={};for(var me in ne)me!=="key"&&(I[me]=ne[me])}else I=ne;return Q&&c(I,typeof R=="function"?R.displayName||R.name||"Unknown":R),f(R,Q,I,r(),J,ue)}function h(R){l(R)?R._store&&(R._store.validated=1):typeof R=="object"&&R!==null&&R.$$typeof===E&&(R._payload.status==="fulfilled"?l(R._payload.value)&&R._payload.value._store&&(R._payload.value._store.validated=1):R._store&&(R._store.validated=1))}function l(R){return typeof R=="object"&&R!==null&&R.$$typeof===y}var p=T,y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),j=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),C=Symbol.for("react.client.reference"),P=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,H=Array.isArray,F=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(R){return R()}};var q,M={},G=p.react_stack_bottom_frame.bind(p,n)(),X=F(i(n)),ee={};wa.Fragment=b,wa.jsx=function(R,ne,I){var V=1e4>P.recentlyCreatedOwnerStacks++;return o(R,ne,I,!1,V?Error("react-stack-top-frame"):G,V?F(i(R)):X)},wa.jsxs=function(R,ne,I){var V=1e4>P.recentlyCreatedOwnerStacks++;return o(R,ne,I,!0,V?Error("react-stack-top-frame"):G,V?F(i(R)):X)}})()),wa}var No;function Kd(){return No||(No=1,process.env.NODE_ENV==="production"?xs.exports=Xd():xs.exports=Qd()),xs.exports}var t=Kd();const dr={domain:"https://studio.3speak.tv",kThreeSpeakApiUrl:"https://studio.3speak.tv/mobile/api",userOwnerThumb:e=>`https://images.hive.blog/u/${e}/avatar`,graphQLServerUrl:"https://union.us-02.infra.3speak.tv"},Na=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class e0{commonFields=`
|
|
7
7
|
items {
|
|
8
8
|
created_at
|
|
9
9
|
title
|
|
@@ -61,12 +61,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:s,operationName:"TrendingTags"})});if(!i.ok)throw new Error(`GraphQL request failed: ${i.statusText}`);const r=await i.json();if(r.errors)throw new Error(`GraphQL error: ${r.errors.map(n=>n.message).join(", ")}`);return r.data?.trendingTags?.tags||[]}catch(i){throw console.error("Failed to fetch trending tags:",i),i}}convertGQLItemsToThreeSpeakVideos(a){return a.map(s=>{let i=null;try{typeof s.spkvideo=="string"?i=JSON.parse(s.spkvideo):i=s.spkvideo}catch(r){console.error("Error parsing spkvideo JSON",r)}return{title:s.title||"Untitled",owner:s.author?.username||"",permlink:s.permlink||"",created:new Date(s.created_at),category:s.tags&&s.tags.length>0?s.tags[0]:"general",duration:i?.duration||s.json_metadata?.raw?.video?.info?.duration||0,thumbnail:i?.thumbnail_url||s.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:s.stats?.num_votes,numOfComments:s.stats?.num_comments,hiveValue:s.stats?.total_hive_reward,active_votes:s.stats?.active_voters?.map(r=>({voter:r.voter,percent:r.percent,rshares:r.rshares,weight:r.weight}))||[]}})}async getContentStats(a,s){try{const i=await Na.call("condenser_api","get_content",[a,s]);return{numOfUpvotes:i?.net_votes??0,numOfComments:i?.children??0,hiveValue:i?.pending_payout_value?parseFloat(i.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(a,s){try{return await Na.call("condenser_api","get_active_votes",[a,s])}catch(i){return console.error("Error calling get_active_votes:",i),[]}}async getCommentsList(a,s){try{const i=await Na.call("bridge","get_discussion",[a,s]);let r=Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[];return r=r.filter(n=>!(n.author===a&&n.permlink===s)),r.map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(i){return console.error("Error fetching comments list:",i),[]}}async getMyVideos(a){const s=`${dr.domain}/mobile/api/my-videos`,i=await fetch(s,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a}});if(i.ok){const r=await i.json();return Array.isArray(r)?r:[]}else throw console.error("Failed to fetch my videos:",i.statusText),new Error(`Failed to fetch my videos: ${i.status}`)}async getRankedPosts(a="trending",s="",i="hive.blog",r=20,n,u){try{const c={sort:a,tag:s,observer:i,limit:r};return n&&u&&(c.start_author=n,c.start_permlink=u),await Na.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(a,s){try{return await Na.call("condenser_api","get_content",[a,s])}catch(i){return console.error("Error fetching post content:",i),null}}}const Pe=new t0,Gr=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",$c=({video:e,onVideoClick:a,onAuthorClick:s,isGrid:i=!1})=>{const[r,n]=T.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});T.useEffect(()=>{if(r.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Pe.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,r.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=y=>y.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.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:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>a(e),children:[t.jsx("img",{src:Gr(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.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:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.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:t.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:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>a(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>s(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:dn.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[r.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfUpvotes)})]}),r.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfComments)})]})]}),r.hiveValue!=null&&r.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",r.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Xe=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Xe||{});const jo=new Map,Rc=({title:e,author:a,permlink:s,createdAt:i,video:r,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[y,w]=T.useState(r.numOfComments||0),[b,g]=T.useState(r.numOfUpvotes||0),[v,N]=T.useState(!1),[j,x]=T.useState(!1),[m,k]=T.useState(""),_=q=>{k(q),x(!0),setTimeout(()=>x(!1),3e3)},E=(q,M)=>`${q}:${M}`;T.useEffect(()=>{const q=E(a,s),M=jo.get(q);M?(w(M.comments),g(M.upvotes)):(async()=>{const X=await Pe.getContentStats(a,s);g(X.numOfUpvotes),w(X.numOfComments),jo.set(E(a,s),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[a,s]);const D=()=>{d?d(a,s):_("Comments feature coming soon!")},C=()=>{f?f(a,s):_("Upvote feature requires authentication!")},P=()=>{if(o)o(a,s);else{const q=`https://3speak.tv/user/${a}/${s}`;navigator.share?navigator.share({title:e,url:q}):(navigator.clipboard.writeText(q),_("Link copied to clipboard!"))}},L=()=>{h?h(a,s):(N(!v),_(v?"Removed from bookmarks":"Added to bookmarks"))},H=()=>l?.(a,s),F=()=>{p?p(a,s):_("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:H,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${a}/avatar`,alt:a,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:q=>{q.target.src=`https://ui-avatars.com/api/?name=${a}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:H,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",a]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[r.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[r.views.toLocaleString()," views"]})]}),i&&t.jsx("span",{children:dn.formatDistanceToNow(i,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,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:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,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:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:y})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.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:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:L,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(r.hiveValue||r.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[r.hiveValue&&r.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",r.hiveValue.toFixed(2)," earned"]})}),r.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:r.category})]})]})]})]})]}),j&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},ys=new Map,fn=({feedType:e,username:a,communityId:s,tag:i,onVideoClick:r,onAuthorClick:n})=>{const[u,c]=T.useState([]),[d,f]=T.useState(!0),[o,h]=T.useState(!1),[l,p]=T.useState(null),[y,w]=T.useState(!0),[b,g]=T.useState(0),v=T.useMemo(()=>{switch(e){case Xe.USER:return`user:${a||""}`;case Xe.COMMUNITY:return`community:${s||""}`;case Xe.TAG_FEED:return`tag:${i||""}`;case Xe.SEARCH:return`search:${i||""}`;default:return e}},[e,a,s,i]),N=T.useCallback(async _=>{if(_.author?.username){if(!_.permlink)return null;let E=null;try{typeof _.spkvideo=="string"?E=JSON.parse(_.spkvideo):E=_.spkvideo}catch(P){console.error("Error parsing spkvideo JSON",P)}const D=Gr(E?.thumbnail_url)||Gr(_.json_metadata?.raw?.video?.info?.thumbnail),C=E?.duration||_.json_metadata?.raw?.video?.info?.duration||0;return{title:_.title||"Untitled",author:_.author.username,permlink:_.permlink,created:new Date(_.created_at),category:_.tags&&_.tags.length>0?_.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:_.stats?.num_votes||_.numOfUpvotes,numOfComments:_.stats?.num_comments||_.numOfComments,hiveValue:_.stats?.total_hive_reward||_.hiveValue}}return _.owner?{title:_.title||"Untitled",author:_.owner,permlink:_.permlink||"",created:new Date(_.created||Date.now()),category:_.category||"general",duration:_.duration,thumbnail:Gr(_.thumbnail),numOfUpvotes:_.numOfUpvotes,numOfComments:_.numOfComments,hiveValue:_.hiveValue}:null},[]),j=T.useCallback(async(_,E=!1)=>{try{let D=[];switch(e){case Xe.SEARCH:i&&(D=await Pe.getSearchFeed(i,_));break;case Xe.TAG_FEED:i&&(D=await Pe.getTaggedVideos(i,_));break;case Xe.HOME:D=await Pe.getHomeVideos(_);break;case Xe.TRENDING:D=await Pe.getTrendingVideos(_);break;case Xe.NEW_VIDEOS:D=await Pe.getNewVideos(_);break;case Xe.FIRST_UPLOADS:D=await Pe.getFirstUploadsVideos(_);break;case Xe.USER:a&&(D=await Pe.getUserVideos(a,_));break;case Xe.COMMUNITY:s&&(D=await Pe.getCommunityVideos(s,_));break;case Xe.RELATED:a&&(D=await Pe.getRelatedVideos(a,_));break}const P=(await Promise.all(D.map(N))).filter(L=>L!==null);E?(c(P),ys.set(v,P)):c(L=>{const H=[...L,...P];return ys.set(v,H),H}),w(D.length>=20),g(_+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,a,s,i,v,N]);T.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const E=ys.get(v);E?.length&&(c(E),f(!1)),await j(0,!0),f(!1)})()},[v,j]);const x=T.useCallback(async()=>{o||!y||(h(!0),await j(b),h(!1))},[o,y,b,j]),m=T.useCallback(async()=>{ys.delete(v),f(!0),g(0),await j(0,!0),f(!1)},[v,j]);T.useEffect(()=>{const _=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&x()};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[x]);const k=()=>t.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((_,E)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},E))});return d&&u.length===0?t.jsx(k,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((_,E)=>t.jsx($c,{video:_,onVideoClick:r,onAuthorClick:n,isGrid:!0},`${_.author}-${_.permlink}-${E}`))}),y&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:x,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"})})]})};var On={},Lr={},Mr={},vs={exports:{}},ko;function r0(){if(ko)return vs.exports;ko=1;const e=()=>{const a=Error.prepareStackTrace;Error.prepareStackTrace=(i,r)=>r;const s=new Error().stack.slice(1);return Error.prepareStackTrace=a,s};return vs.exports=e,vs.exports.default=e,vs.exports}var ja={},_o;function a0(){if(_o)return ja;_o=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.inferLabel=void 0;const e=()=>{};return ja.inferLabel=e,ja}var Pn={},ws={exports:{}},Eo;function pa(){return Eo||(Eo=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const s=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function i(m){return s.includes(m)}const r=["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",...s];function n(m){return r.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return k=>typeof k===m}const{toString:f}=Object.prototype,o=m=>{const k=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(k)&&l.domElement(m))return"HTMLElement";if(n(k))return k},h=m=>k=>o(k)===m;function l(m){if(m===null)return"null";switch(typeof m){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(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const k=o(m);if(k)return k;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,k)=>Array.isArray(m)?l.function_(k)?m.every(k):!0:!1,l.buffer=m=>{var k,_,E,D;return(D=(E=(_=(k=m)===null||k===void 0?void 0:k.constructor)===null||_===void 0?void 0:_.isBuffer)===null||E===void 0?void 0:E.call(_,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.iterator])},l.asyncIterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.asyncIterator])},l.generator=m=>{var k,_;return l.iterable(m)&&l.function_((k=m)===null||k===void 0?void 0:k.next)&&l.function_((_=m)===null||_===void 0?void 0:_.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const y=m=>{var k,_;return l.function_((k=m)===null||k===void 0?void 0:k.then)&&l.function_((_=m)===null||_===void 0?void 0:_.catch)};l.promise=m=>l.nativePromise(m)||y(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,k)=>Object.values(k).includes(m),l.directInstanceOf=(m,k)=>Object.getPrototypeOf(m)===k.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const k=Object.getPrototypeOf(m);return k===null||k===Object.getPrototypeOf({})},l.typedArray=m=>i(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,k)=>{if(l.number(k))return m>=Math.min(0,k)&&m<=Math.max(k,0);if(l.array(k)&&k.length===2)return m>=Math.min(...k)&&m<=Math.max(...k);throw new TypeError(`Invalid range: ${JSON.stringify(k)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(k=>k in m),l.observable=m=>{var k,_,E,D;return m?m===((_=(k=m)[Symbol.observable])===null||_===void 0?void 0:_.call(k))||m===((D=(E=m)["@@observable"])===null||D===void 0?void 0:D.call(E)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>k=>l.integer(k)&&Math.abs(k%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const N=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||N(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const j=(m,k,_)=>{if(!l.function_(k))throw new TypeError(`Invalid predicate: ${JSON.stringify(k)}`);if(_.length===0)throw new TypeError("Invalid number of values");return m.call(_,k)};l.any=(m,...k)=>(l.array(m)?m:[m]).some(E=>j(Array.prototype.some,E,k)),l.all=(m,...k)=>j(Array.prototype.every,m,k);const x=(m,k,_,E={})=>{if(!m){const{multipleValues:D}=E,C=D?`received values of types ${[...new Set(_.map(P=>`\`${l(P)}\``))].join(", ")}`:`received value of type \`${l(_)}\``;throw new TypeError(`Expected value which is \`${k}\`, ${C}.`)}};a.assert={undefined:m=>x(l.undefined(m),"undefined",m),string:m=>x(l.string(m),"string",m),number:m=>x(l.number(m),"number",m),bigint:m=>x(l.bigint(m),"bigint",m),function_:m=>x(l.function_(m),"Function",m),null_:m=>x(l.null_(m),"null",m),class_:m=>x(l.class_(m),"Class",m),boolean:m=>x(l.boolean(m),"boolean",m),symbol:m=>x(l.symbol(m),"symbol",m),numericString:m=>x(l.numericString(m),"string with a number",m),array:(m,k)=>{x(l.array(m),"Array",m),k&&m.forEach(k)},buffer:m=>x(l.buffer(m),"Buffer",m),blob:m=>x(l.blob(m),"Blob",m),nullOrUndefined:m=>x(l.nullOrUndefined(m),"null or undefined",m),object:m=>x(l.object(m),"Object",m),iterable:m=>x(l.iterable(m),"Iterable",m),asyncIterable:m=>x(l.asyncIterable(m),"AsyncIterable",m),generator:m=>x(l.generator(m),"Generator",m),asyncGenerator:m=>x(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>x(l.nativePromise(m),"native Promise",m),promise:m=>x(l.promise(m),"Promise",m),generatorFunction:m=>x(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>x(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>x(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>x(l.boundFunction(m),"Function",m),regExp:m=>x(l.regExp(m),"RegExp",m),date:m=>x(l.date(m),"Date",m),error:m=>x(l.error(m),"Error",m),map:m=>x(l.map(m),"Map",m),set:m=>x(l.set(m),"Set",m),weakMap:m=>x(l.weakMap(m),"WeakMap",m),weakSet:m=>x(l.weakSet(m),"WeakSet",m),int8Array:m=>x(l.int8Array(m),"Int8Array",m),uint8Array:m=>x(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>x(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>x(l.int16Array(m),"Int16Array",m),uint16Array:m=>x(l.uint16Array(m),"Uint16Array",m),int32Array:m=>x(l.int32Array(m),"Int32Array",m),uint32Array:m=>x(l.uint32Array(m),"Uint32Array",m),float32Array:m=>x(l.float32Array(m),"Float32Array",m),float64Array:m=>x(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>x(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>x(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>x(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>x(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>x(l.dataView(m),"DataView",m),enumCase:(m,k)=>x(l.enumCase(m,k),"EnumCase",m),urlInstance:m=>x(l.urlInstance(m),"URL",m),urlString:m=>x(l.urlString(m),"string with a URL",m),truthy:m=>x(l.truthy(m),"truthy",m),falsy:m=>x(l.falsy(m),"falsy",m),nan:m=>x(l.nan(m),"NaN",m),primitive:m=>x(l.primitive(m),"primitive",m),integer:m=>x(l.integer(m),"integer",m),safeInteger:m=>x(l.safeInteger(m),"integer",m),plainObject:m=>x(l.plainObject(m),"plain object",m),typedArray:m=>x(l.typedArray(m),"TypedArray",m),arrayLike:m=>x(l.arrayLike(m),"array-like",m),domElement:m=>x(l.domElement(m),"HTMLElement",m),observable:m=>x(l.observable(m),"Observable",m),nodeStream:m=>x(l.nodeStream(m),"Node.js Stream",m),infinite:m=>x(l.infinite(m),"infinite number",m),emptyArray:m=>x(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>x(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>x(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>x(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>x(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>x(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>x(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>x(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>x(l.emptySet(m),"empty set",m),nonEmptySet:m=>x(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>x(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>x(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>x(l.propertyKey(m),"PropertyKey",m),formData:m=>x(l.formData(m),"FormData",m),urlSearchParams:m=>x(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>x(l.evenInteger(m),"even integer",m),oddInteger:m=>x(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,k)=>x(l.directInstanceOf(m,k),"T",m),inRange:(m,k)=>x(l.inRange(m,k),"in range",m),any:(m,...k)=>x(l.any(m,...k),"predicate returns truthy for any value",k,{multipleValues:!0}),all:(m,...k)=>x(l.all(m,...k),"predicate returns truthy for all values",k,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(a.assert,{class:{value:a.assert.class_},function:{value:a.assert.function_},null:{value:a.assert.null_}}),a.default=l,e.exports=l,e.exports.default=l,e.exports.assert=a.assert})(ws,ws.exports)),ws.exports}var ka={},_a={},Ao;function s0(){if(Ao)return _a;Ao=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return _a.generateStackTrace=e,_a}var So;function Yi(){if(So)return ka;So=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.ArgumentError=void 0;const e=s0(),a=(i,r)=>`${i.name}: ${i.message}
|
|
65
|
-
${r}`;class s extends Error{constructor(r,n,u=new Map){super(r),Object.defineProperty(this,"validationErrors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="ArgumentError",Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=a(this,(0,e.generateStackTrace)()),this.validationErrors=u}}return ka.ArgumentError=s,ka}var Ea={},Ns={},Co;function
|
|
64
|
+
`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:s,operationName:"TrendingTags"})});if(!i.ok)throw new Error(`GraphQL request failed: ${i.statusText}`);const r=await i.json();if(r.errors)throw new Error(`GraphQL error: ${r.errors.map(n=>n.message).join(", ")}`);return r.data?.trendingTags?.tags||[]}catch(i){throw console.error("Failed to fetch trending tags:",i),i}}convertGQLItemsToThreeSpeakVideos(a){return a.map(s=>{let i=null;try{typeof s.spkvideo=="string"?i=JSON.parse(s.spkvideo):i=s.spkvideo}catch(r){console.error("Error parsing spkvideo JSON",r)}return{title:s.title||"Untitled",owner:s.author?.username||"",permlink:s.permlink||"",created:new Date(s.created_at),category:s.tags&&s.tags.length>0?s.tags[0]:"general",duration:i?.duration||s.json_metadata?.raw?.video?.info?.duration||0,thumbnail:i?.thumbnail_url||s.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:s.stats?.num_votes,numOfComments:s.stats?.num_comments,hiveValue:s.stats?.total_hive_reward,active_votes:s.stats?.active_voters?.map(r=>({voter:r.voter,percent:r.percent,rshares:r.rshares,weight:r.weight}))||[]}})}async getContentStats(a,s){try{const i=await Na.call("condenser_api","get_content",[a,s]);return{numOfUpvotes:i?.net_votes??0,numOfComments:i?.children??0,hiveValue:i?.pending_payout_value?parseFloat(i.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(a,s){try{return await Na.call("condenser_api","get_active_votes",[a,s])}catch(i){return console.error("Error calling get_active_votes:",i),[]}}async getCommentsList(a,s){try{const i=await Na.call("bridge","get_discussion",[a,s]);let r=Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[];return r=r.filter(n=>!(n.author===a&&n.permlink===s)),r.map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(i){return console.error("Error fetching comments list:",i),[]}}async getMyVideos(a){const s=`${dr.domain}/mobile/api/my-videos`,i=await fetch(s,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a}});if(i.ok){const r=await i.json();return Array.isArray(r)?r:[]}else throw console.error("Failed to fetch my videos:",i.statusText),new Error(`Failed to fetch my videos: ${i.status}`)}async getRankedPosts(a="trending",s="",i="hive.blog",r=20,n,u){try{const c={sort:a,tag:s,observer:i,limit:r};return n&&u&&(c.start_author=n,c.start_permlink=u),await Na.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(a,s){try{return await Na.call("condenser_api","get_content",[a,s])}catch(i){return console.error("Error fetching post content:",i),null}}}const Pe=new e0,Gr=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",$c=({video:e,onVideoClick:a,onAuthorClick:s,isGrid:i=!1})=>{const[r,n]=T.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});T.useEffect(()=>{if(r.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Pe.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,r.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=y=>y.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.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:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>a(e),children:[t.jsx("img",{src:Gr(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.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:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.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:t.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:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>a(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>s(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:dn.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[r.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfUpvotes)})]}),r.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfComments)})]})]}),r.hiveValue!=null&&r.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",r.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Xe=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Xe||{});const jo=new Map,Rc=({title:e,author:a,permlink:s,createdAt:i,video:r,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[y,w]=T.useState(r.numOfComments||0),[b,g]=T.useState(r.numOfUpvotes||0),[v,N]=T.useState(!1),[j,x]=T.useState(!1),[m,k]=T.useState(""),_=q=>{k(q),x(!0),setTimeout(()=>x(!1),3e3)},E=(q,M)=>`${q}:${M}`;T.useEffect(()=>{const q=E(a,s),M=jo.get(q);M?(w(M.comments),g(M.upvotes)):(async()=>{const X=await Pe.getContentStats(a,s);g(X.numOfUpvotes),w(X.numOfComments),jo.set(E(a,s),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[a,s]);const D=()=>{d?d(a,s):_("Comments feature coming soon!")},C=()=>{f?f(a,s):_("Upvote feature requires authentication!")},P=()=>{if(o)o(a,s);else{const q=`https://3speak.tv/user/${a}/${s}`;navigator.share?navigator.share({title:e,url:q}):(navigator.clipboard.writeText(q),_("Link copied to clipboard!"))}},L=()=>{h?h(a,s):(N(!v),_(v?"Removed from bookmarks":"Added to bookmarks"))},H=()=>l?.(a,s),F=()=>{p?p(a,s):_("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:H,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${a}/avatar`,alt:a,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:q=>{q.target.src=`https://ui-avatars.com/api/?name=${a}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:H,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",a]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[r.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[r.views.toLocaleString()," views"]})]}),i&&t.jsx("span",{children:dn.formatDistanceToNow(i,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,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:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,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:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:y})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.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:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:L,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(r.hiveValue||r.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[r.hiveValue&&r.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",r.hiveValue.toFixed(2)," earned"]})}),r.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:r.category})]})]})]})]})]}),j&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},ys=new Map,fn=({feedType:e,username:a,communityId:s,tag:i,onVideoClick:r,onAuthorClick:n})=>{const[u,c]=T.useState([]),[d,f]=T.useState(!0),[o,h]=T.useState(!1),[l,p]=T.useState(null),[y,w]=T.useState(!0),[b,g]=T.useState(0),v=T.useMemo(()=>{switch(e){case Xe.USER:return`user:${a||""}`;case Xe.COMMUNITY:return`community:${s||""}`;case Xe.TAG_FEED:return`tag:${i||""}`;case Xe.SEARCH:return`search:${i||""}`;default:return e}},[e,a,s,i]),N=T.useCallback(async _=>{if(_.author?.username){if(!_.permlink)return null;let E=null;try{typeof _.spkvideo=="string"?E=JSON.parse(_.spkvideo):E=_.spkvideo}catch(P){console.error("Error parsing spkvideo JSON",P)}const D=Gr(E?.thumbnail_url)||Gr(_.json_metadata?.raw?.video?.info?.thumbnail),C=E?.duration||_.json_metadata?.raw?.video?.info?.duration||0;return{title:_.title||"Untitled",author:_.author.username,permlink:_.permlink,created:new Date(_.created_at),category:_.tags&&_.tags.length>0?_.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:_.stats?.num_votes||_.numOfUpvotes,numOfComments:_.stats?.num_comments||_.numOfComments,hiveValue:_.stats?.total_hive_reward||_.hiveValue}}return _.owner?{title:_.title||"Untitled",author:_.owner,permlink:_.permlink||"",created:new Date(_.created||Date.now()),category:_.category||"general",duration:_.duration,thumbnail:Gr(_.thumbnail),numOfUpvotes:_.numOfUpvotes,numOfComments:_.numOfComments,hiveValue:_.hiveValue}:null},[]),j=T.useCallback(async(_,E=!1)=>{try{let D=[];switch(e){case Xe.SEARCH:i&&(D=await Pe.getSearchFeed(i,_));break;case Xe.TAG_FEED:i&&(D=await Pe.getTaggedVideos(i,_));break;case Xe.HOME:D=await Pe.getHomeVideos(_);break;case Xe.TRENDING:D=await Pe.getTrendingVideos(_);break;case Xe.NEW_VIDEOS:D=await Pe.getNewVideos(_);break;case Xe.FIRST_UPLOADS:D=await Pe.getFirstUploadsVideos(_);break;case Xe.USER:a&&(D=await Pe.getUserVideos(a,_));break;case Xe.COMMUNITY:s&&(D=await Pe.getCommunityVideos(s,_));break;case Xe.RELATED:a&&(D=await Pe.getRelatedVideos(a,_));break}const P=(await Promise.all(D.map(N))).filter(L=>L!==null);E?(c(P),ys.set(v,P)):c(L=>{const H=[...L,...P];return ys.set(v,H),H}),w(D.length>=20),g(_+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,a,s,i,v,N]);T.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const E=ys.get(v);E?.length&&(c(E),f(!1)),await j(0,!0),f(!1)})()},[v,j]);const x=T.useCallback(async()=>{o||!y||(h(!0),await j(b),h(!1))},[o,y,b,j]),m=T.useCallback(async()=>{ys.delete(v),f(!0),g(0),await j(0,!0),f(!1)},[v,j]);T.useEffect(()=>{const _=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&x()};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[x]);const k=()=>t.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((_,E)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},E))});return d&&u.length===0?t.jsx(k,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((_,E)=>t.jsx($c,{video:_,onVideoClick:r,onAuthorClick:n,isGrid:!0},`${_.author}-${_.permlink}-${E}`))}),y&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:x,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"})})]})};var On={},Lr={},Mr={},vs={exports:{}},ko;function t0(){if(ko)return vs.exports;ko=1;const e=()=>{const a=Error.prepareStackTrace;Error.prepareStackTrace=(i,r)=>r;const s=new Error().stack.slice(1);return Error.prepareStackTrace=a,s};return vs.exports=e,vs.exports.default=e,vs.exports}var ja={},_o;function r0(){if(_o)return ja;_o=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.inferLabel=void 0;const e=()=>{};return ja.inferLabel=e,ja}var Pn={},ws={exports:{}},Eo;function pa(){return Eo||(Eo=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const s=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function i(m){return s.includes(m)}const r=["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",...s];function n(m){return r.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return k=>typeof k===m}const{toString:f}=Object.prototype,o=m=>{const k=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(k)&&l.domElement(m))return"HTMLElement";if(n(k))return k},h=m=>k=>o(k)===m;function l(m){if(m===null)return"null";switch(typeof m){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(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const k=o(m);if(k)return k;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,k)=>Array.isArray(m)?l.function_(k)?m.every(k):!0:!1,l.buffer=m=>{var k,_,E,D;return(D=(E=(_=(k=m)===null||k===void 0?void 0:k.constructor)===null||_===void 0?void 0:_.isBuffer)===null||E===void 0?void 0:E.call(_,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.iterator])},l.asyncIterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.asyncIterator])},l.generator=m=>{var k,_;return l.iterable(m)&&l.function_((k=m)===null||k===void 0?void 0:k.next)&&l.function_((_=m)===null||_===void 0?void 0:_.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const y=m=>{var k,_;return l.function_((k=m)===null||k===void 0?void 0:k.then)&&l.function_((_=m)===null||_===void 0?void 0:_.catch)};l.promise=m=>l.nativePromise(m)||y(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,k)=>Object.values(k).includes(m),l.directInstanceOf=(m,k)=>Object.getPrototypeOf(m)===k.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const k=Object.getPrototypeOf(m);return k===null||k===Object.getPrototypeOf({})},l.typedArray=m=>i(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,k)=>{if(l.number(k))return m>=Math.min(0,k)&&m<=Math.max(k,0);if(l.array(k)&&k.length===2)return m>=Math.min(...k)&&m<=Math.max(...k);throw new TypeError(`Invalid range: ${JSON.stringify(k)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(k=>k in m),l.observable=m=>{var k,_,E,D;return m?m===((_=(k=m)[Symbol.observable])===null||_===void 0?void 0:_.call(k))||m===((D=(E=m)["@@observable"])===null||D===void 0?void 0:D.call(E)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>k=>l.integer(k)&&Math.abs(k%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const N=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||N(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const j=(m,k,_)=>{if(!l.function_(k))throw new TypeError(`Invalid predicate: ${JSON.stringify(k)}`);if(_.length===0)throw new TypeError("Invalid number of values");return m.call(_,k)};l.any=(m,...k)=>(l.array(m)?m:[m]).some(E=>j(Array.prototype.some,E,k)),l.all=(m,...k)=>j(Array.prototype.every,m,k);const x=(m,k,_,E={})=>{if(!m){const{multipleValues:D}=E,C=D?`received values of types ${[...new Set(_.map(P=>`\`${l(P)}\``))].join(", ")}`:`received value of type \`${l(_)}\``;throw new TypeError(`Expected value which is \`${k}\`, ${C}.`)}};a.assert={undefined:m=>x(l.undefined(m),"undefined",m),string:m=>x(l.string(m),"string",m),number:m=>x(l.number(m),"number",m),bigint:m=>x(l.bigint(m),"bigint",m),function_:m=>x(l.function_(m),"Function",m),null_:m=>x(l.null_(m),"null",m),class_:m=>x(l.class_(m),"Class",m),boolean:m=>x(l.boolean(m),"boolean",m),symbol:m=>x(l.symbol(m),"symbol",m),numericString:m=>x(l.numericString(m),"string with a number",m),array:(m,k)=>{x(l.array(m),"Array",m),k&&m.forEach(k)},buffer:m=>x(l.buffer(m),"Buffer",m),blob:m=>x(l.blob(m),"Blob",m),nullOrUndefined:m=>x(l.nullOrUndefined(m),"null or undefined",m),object:m=>x(l.object(m),"Object",m),iterable:m=>x(l.iterable(m),"Iterable",m),asyncIterable:m=>x(l.asyncIterable(m),"AsyncIterable",m),generator:m=>x(l.generator(m),"Generator",m),asyncGenerator:m=>x(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>x(l.nativePromise(m),"native Promise",m),promise:m=>x(l.promise(m),"Promise",m),generatorFunction:m=>x(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>x(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>x(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>x(l.boundFunction(m),"Function",m),regExp:m=>x(l.regExp(m),"RegExp",m),date:m=>x(l.date(m),"Date",m),error:m=>x(l.error(m),"Error",m),map:m=>x(l.map(m),"Map",m),set:m=>x(l.set(m),"Set",m),weakMap:m=>x(l.weakMap(m),"WeakMap",m),weakSet:m=>x(l.weakSet(m),"WeakSet",m),int8Array:m=>x(l.int8Array(m),"Int8Array",m),uint8Array:m=>x(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>x(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>x(l.int16Array(m),"Int16Array",m),uint16Array:m=>x(l.uint16Array(m),"Uint16Array",m),int32Array:m=>x(l.int32Array(m),"Int32Array",m),uint32Array:m=>x(l.uint32Array(m),"Uint32Array",m),float32Array:m=>x(l.float32Array(m),"Float32Array",m),float64Array:m=>x(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>x(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>x(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>x(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>x(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>x(l.dataView(m),"DataView",m),enumCase:(m,k)=>x(l.enumCase(m,k),"EnumCase",m),urlInstance:m=>x(l.urlInstance(m),"URL",m),urlString:m=>x(l.urlString(m),"string with a URL",m),truthy:m=>x(l.truthy(m),"truthy",m),falsy:m=>x(l.falsy(m),"falsy",m),nan:m=>x(l.nan(m),"NaN",m),primitive:m=>x(l.primitive(m),"primitive",m),integer:m=>x(l.integer(m),"integer",m),safeInteger:m=>x(l.safeInteger(m),"integer",m),plainObject:m=>x(l.plainObject(m),"plain object",m),typedArray:m=>x(l.typedArray(m),"TypedArray",m),arrayLike:m=>x(l.arrayLike(m),"array-like",m),domElement:m=>x(l.domElement(m),"HTMLElement",m),observable:m=>x(l.observable(m),"Observable",m),nodeStream:m=>x(l.nodeStream(m),"Node.js Stream",m),infinite:m=>x(l.infinite(m),"infinite number",m),emptyArray:m=>x(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>x(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>x(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>x(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>x(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>x(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>x(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>x(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>x(l.emptySet(m),"empty set",m),nonEmptySet:m=>x(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>x(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>x(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>x(l.propertyKey(m),"PropertyKey",m),formData:m=>x(l.formData(m),"FormData",m),urlSearchParams:m=>x(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>x(l.evenInteger(m),"even integer",m),oddInteger:m=>x(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,k)=>x(l.directInstanceOf(m,k),"T",m),inRange:(m,k)=>x(l.inRange(m,k),"in range",m),any:(m,...k)=>x(l.any(m,...k),"predicate returns truthy for any value",k,{multipleValues:!0}),all:(m,...k)=>x(l.all(m,...k),"predicate returns truthy for all values",k,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(a.assert,{class:{value:a.assert.class_},function:{value:a.assert.function_},null:{value:a.assert.null_}}),a.default=l,e.exports=l,e.exports.default=l,e.exports.assert=a.assert})(ws,ws.exports)),ws.exports}var ka={},_a={},Ao;function a0(){if(Ao)return _a;Ao=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return _a.generateStackTrace=e,_a}var So;function Yi(){if(So)return ka;So=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.ArgumentError=void 0;const e=a0(),a=(i,r)=>`${i.name}: ${i.message}
|
|
65
|
+
${r}`;class s extends Error{constructor(r,n,u=new Map){super(r),Object.defineProperty(this,"validationErrors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="ArgumentError",Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=a(this,(0,e.generateStackTrace)()),this.validationErrors=u}}return ka.ArgumentError=s,ka}var Ea={},Ns={},Co;function s0(){return Co||(Co=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=()=>Math.random().toString(16).slice(2)),Ns}var Do;function n0(){if(Do)return Ea;Do=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.not=void 0;const e=s0(),a=Qe(),s=i=>{const r=i.addValidator;return i.addValidator=n=>{const{validator:u,message:c,negatedMessage:d}=n,f=(0,e.default)();return n.message=(o,h)=>d?d(o,h):c(o,f).replace(/ to /,"$¬ ").replace(f,h),n.validator=o=>!u(o),i[a.validatorSymbol].push(n),i.addValidator=r,i},i};return Ea.not=s,Ea}var Ln={},To;function ns(){return To||(To=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPredicate=e.testSymbol=void 0,e.testSymbol=Symbol("test");const a=s=>!!s[e.testSymbol];e.isPredicate=a})(Ln)),Ln}var Aa={},Oo;function Ic(){if(Oo)return Aa;Oo=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.generateArgumentErrorMessage=void 0;const e=(a,s=!1)=>{const i=[],r=[...a.entries()],n=r.some(([,u])=>u.size!==1);if(r.length===1){const[,u]=r[0];if(!s&&u.size===1){const[c]=u;return c}for(const c of u)i.push(`${s?" - ":""}${c}`);return i.join(`
|
|
66
66
|
`)}if(!n)return r.map(([,[u]])=>` - ${u}`).join(`
|
|
67
67
|
`);for(const[u,c]of r){i.push(`Errors from the "${u}" predicate:`);for(const d of c)i.push(` - ${d}`)}return i.join(`
|
|
68
|
-
`)};return Aa.generateArgumentErrorMessage=e,Aa}var Po;function Qe(){return Po||(Po=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const a=pa(),s=Yi(),i=i0(),r=ns(),n=Ic();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),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 o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,a.default)(h)}\``,validator:h=>a.default[o](h)})}[r.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:y}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=a.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,N=b||this.type,j=l.get(N),x=y(d,v,w);j?j.add(x):l.set(N,new Set([x]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new s.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,i.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(Pn)),Pn}var js={},Mn={},Sa={},$n,Lo;function o0(){return Lo||(Lo=1,$n=function(e){return!isNaN(Date.parse(e))}),$n}var Mo;function u0(){if(Mo)return Sa;Mo=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.StringPredicate=void 0;const e=pa(),a=o0(),s=Qe();class i extends s.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:a})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return Sa.StringPredicate=i,Sa}var Ca={},$o;function l0(){if($o)return Ca;$o=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.NumberPredicate=void 0;const e=pa(),a=Qe();class s extends a.Predicate{constructor(r){super("number",r)}inRange(r,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${r}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[r,n])})}greaterThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${r}, got ${n}`,validator:n=>n>r})}greaterThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${r}, got ${n}`,validator:n=>n>=r})}lessThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${r}, got ${n}`,validator:n=>n<r})}lessThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${r}, got ${n}`,validator:n=>n<=r})}equal(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${r}, got ${n}`,validator:n=>n===r})}oneOf(r){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(r);if(r.length>10){const d=r.length-10;c=JSON.stringify(r.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>r.includes(n)})}get integer(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer, got ${r}`,validator:r=>e.default.integer(r)})}get finite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be finite, got ${r}`,validator:r=>!e.default.infinite(r)})}get infinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be infinite, got ${r}`,validator:r=>e.default.infinite(r)})}get positive(){return this.addValidator({message:(r,n)=>`Expected ${n} to be positive, got ${r}`,validator:r=>r>0})}get negative(){return this.addValidator({message:(r,n)=>`Expected ${n} to be negative, got ${r}`,validator:r=>r<0})}get integerOrInfinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer or infinite, got ${r}`,validator:r=>e.default.integer(r)||e.default.infinite(r)})}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)}}return Ca.NumberPredicate=s,Ca}var Da={},Ro;function c0(){if(Ro)return Da;Ro=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.BigIntPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("bigint",i)}}return Da.BigIntPredicate=a,Da}var Ta={},Io;function d0(){if(Io)return Ta;Io=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.BooleanPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("boolean",i)}get true(){return this.addValidator({message:(i,r)=>`Expected ${r} to be true, got ${i}`,validator:i=>i})}get false(){return this.addValidator({message:(i,r)=>`Expected ${r} to be false, got ${i}`,validator:i=>!i})}}return Ta.BooleanPredicate=a,Ta}var Oa={},rs={exports:{}};rs.exports;var Fo;function hn(){return Fo||(Fo=1,(function(e,a){var s=200,i="__lodash_hash_undefined__",r=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",y="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",N="[object Promise]",j="[object Proxy]",x="[object RegExp]",m="[object Set]",k="[object String]",_="[object Symbol]",E="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",P="[object DataView]",L="[object Float32Array]",H="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",M="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",ee="[object Uint16Array]",R="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[L]=J[H]=J[F]=J[q]=J[M]=J[G]=J[X]=J[ee]=J[R]=!0,J[c]=J[d]=J[C]=J[o]=J[P]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[x]=J[m]=J[k]=J[D]=!1;var ue=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,Q=typeof self=="object"&&self&&self.Object===Object&&self,te=ue||Q||Function("return this")(),me=a&&!a.nodeType&&a,Se=me&&!0&&e&&!e.nodeType&&e,Z=Se&&Se.exports===me,ae=Z&&ue.process,re=(function(){try{return ae&&ae.binding&&ae.binding("util")}catch{}})(),de=re&&re.isTypedArray;function ye(O,U){for(var K=-1,ce=O==null?0:O.length,Le=0,ve=[];++K<ce;){var qe=O[K];U(qe,K,O)&&(ve[Le++]=qe)}return ve}function be(O,U){for(var K=-1,ce=U.length,Le=O.length;++K<ce;)O[Le+K]=U[K];return O}function _e(O,U){for(var K=-1,ce=O==null?0:O.length;++K<ce;)if(U(O[K],K,O))return!0;return!1}function ge(O,U){for(var K=-1,ce=Array(O);++K<O;)ce[K]=U(K);return ce}function Ke(O){return function(U){return O(U)}}function je(O,U){return O.has(U)}function he(O,U){return O?.[U]}function Ce(O){var U=-1,K=Array(O.size);return O.forEach(function(ce,Le){K[++U]=[Le,ce]}),K}function Me(O,U){return function(K){return O(U(K))}}function ze(O){var U=-1,K=Array(O.size);return O.forEach(function(ce){K[++U]=ce}),K}var Pt=Array.prototype,er=Function.prototype,et=Object.prototype,tr=te["__core-js_shared__"],Er=er.toString,at=et.hasOwnProperty,Lt=(function(){var O=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""})(),Nt=et.toString,hr=RegExp("^"+Er.call(at).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rr=Z?te.Buffer:void 0,Mt=te.Symbol,jt=te.Uint8Array,$t=et.propertyIsEnumerable,Kr=Pt.splice,gt=Mt?Mt.toStringTag:void 0,Ar=Object.getOwnPropertySymbols,A=rr?rr.isBuffer:void 0,S=Me(Object.keys,Object),$=Ft(te,"DataView"),W=Ft(te,"Map"),se=Ft(te,"Promise"),pe=Ft(te,"Set"),Ee=Ft(te,"WeakMap"),Te=Ft(Object,"create"),bt=nt($),ot=nt(W),tt=nt(se),kt=nt(pe),_t=nt(Ee),Et=Mt?Mt.prototype:void 0,st=Et?Et.valueOf:void 0;function Ge(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function Wt(){this.__data__=Te?Te(null):{},this.size=0}function Ie(O){var U=this.has(O)&&delete this.__data__[O];return this.size-=U?1:0,U}function Rt(O){var U=this.__data__;if(Te){var K=U[O];return K===i?void 0:K}return at.call(U,O)?U[O]:void 0}function Gt(O){var U=this.__data__;return Te?U[O]!==void 0:at.call(U,O)}function xt(O,U){var K=this.__data__;return this.size+=this.has(O)?0:1,K[O]=Te&&U===void 0?i:U,this}Ge.prototype.clear=Wt,Ge.prototype.delete=Ie,Ge.prototype.get=Rt,Ge.prototype.has=Gt,Ge.prototype.set=xt;function It(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function ar(){this.__data__=[],this.size=0}function ds(O){var U=this.__data__,K=Re(U,O);if(K<0)return!1;var ce=U.length-1;return K==ce?U.pop():Kr.call(U,K,1),--this.size,!0}function Sn(O){var U=this.__data__,K=Re(U,O);return K<0?void 0:U[K][1]}function ea(O){return Re(this.__data__,O)>-1}function ma(O,U){var K=this.__data__,ce=Re(K,O);return ce<0?(++this.size,K.push([O,U])):K[ce][1]=U,this}It.prototype.clear=ar,It.prototype.delete=ds,It.prototype.get=Sn,It.prototype.has=ea,It.prototype.set=ma;function Jt(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function fs(){this.size=0,this.__data__={hash:new Ge,map:new(W||It),string:new Ge}}function hs(O){var U=Ae(this,O).delete(O);return this.size-=U?1:0,U}function Sr(O){return Ae(this,O).get(O)}function ps(O){return Ae(this,O).has(O)}function Cn(O,U){var K=Ae(this,O),ce=K.size;return K.set(O,U),this.size+=K.size==ce?0:1,this}Jt.prototype.clear=fs,Jt.prototype.delete=hs,Jt.prototype.get=Sr,Jt.prototype.has=ps,Jt.prototype.set=Cn;function B(O){var U=-1,K=O==null?0:O.length;for(this.__data__=new Jt;++U<K;)this.add(O[U])}function Y(O){return this.__data__.set(O,i),this}function oe(O){return this.__data__.has(O)}B.prototype.add=B.prototype.push=Y,B.prototype.has=oe;function le(O){var U=this.__data__=new It(O);this.size=U.size}function Oe(){this.__data__=new It,this.size=0}function ke(O){var U=this.__data__,K=U.delete(O);return this.size=U.size,K}function $e(O){return this.__data__.get(O)}function Be(O){return this.__data__.has(O)}function yt(O,U){var K=this.__data__;if(K instanceof It){var ce=K.__data__;if(!W||ce.length<s-1)return ce.push([O,U]),this.size=++K.size,this;K=this.__data__=new Jt(ce)}return K.set(O,U),this.size=K.size,this}le.prototype.clear=Oe,le.prototype.delete=ke,le.prototype.get=$e,le.prototype.has=Be,le.prototype.set=yt;function Ve(O,U){var K=br(O),ce=!K&&aa(O),Le=!K&&!ce&&xr(O),ve=!K&&!ce&&!Le&&xo(O),qe=K||ce||Le||ve,Ye=qe?ge(O.length,String):[],rt=Ye.length;for(var Fe in O)at.call(O,Fe)&&!(qe&&(Fe=="length"||Le&&(Fe=="offset"||Fe=="parent")||ve&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||Bt(Fe,rt)))&&Ye.push(Fe);return Ye}function Re(O,U){for(var K=O.length;K--;)if(xa(O[K][0],U))return K;return-1}function At(O,U,K){var ce=U(O);return br(O)?ce:be(ce,K(O))}function ut(O){return O==null?O===void 0?E:g:gt&> in Object(O)?Yt(O):gr(O)}function Je(O){return ya(O)&&ut(O)==c}function St(O,U,K,ce,Le){return O===U?!0:O==null||U==null||!ya(O)&&!ya(U)?O!==O&&U!==U:pr(O,U,K,ce,St,Le)}function pr(O,U,K,ce,Le,ve){var qe=br(O),Ye=br(U),rt=qe?d:Ue(O),Fe=Ye?d:Ue(U);rt=rt==c?v:rt,Fe=Fe==c?v:Fe;var vt=rt==v,qt=Fe==v,it=rt==Fe;if(it&&xr(O)){if(!xr(U))return!1;qe=!0,vt=!1}if(it&&!vt)return ve||(ve=new le),qe||xo(O)?ga(O,U,K,ce,Le,ve):Dn(O,U,rt,K,ce,Le,ve);if(!(K&r)){var Ct=vt&&at.call(O,"__wrapped__"),Dt=qt&&at.call(U,"__wrapped__");if(Ct||Dt){var yr=Ct?O.value():O,sr=Dt?U.value():U;return ve||(ve=new le),Le(yr,sr,K,ce,ve)}}return it?(ve||(ve=new le),Tn(O,U,K,ce,Le,ve)):!1}function ta(O){if(!bo(O)||Dr(O))return!1;var U=Tr(O)?hr:I;return U.test(nt(O))}function mr(O){return ya(O)&&Or(O.length)&&!!J[ut(O)]}function Cr(O){if(!ra(O))return S(O);var U=[];for(var K in Object(O))at.call(O,K)&&K!="constructor"&&U.push(K);return U}function ga(O,U,K,ce,Le,ve){var qe=K&r,Ye=O.length,rt=U.length;if(Ye!=rt&&!(qe&&rt>Ye))return!1;var Fe=ve.get(O);if(Fe&&ve.get(U))return Fe==U;var vt=-1,qt=!0,it=K&n?new B:void 0;for(ve.set(O,U),ve.set(U,O);++vt<Ye;){var Ct=O[vt],Dt=U[vt];if(ce)var yr=qe?ce(Dt,Ct,vt,U,O,ve):ce(Ct,Dt,vt,O,U,ve);if(yr!==void 0){if(yr)continue;qt=!1;break}if(it){if(!_e(U,function(sr,Pr){if(!je(it,Pr)&&(Ct===sr||Le(Ct,sr,K,ce,ve)))return it.push(Pr)})){qt=!1;break}}else if(!(Ct===Dt||Le(Ct,Dt,K,ce,ve))){qt=!1;break}}return ve.delete(O),ve.delete(U),qt}function Dn(O,U,K,ce,Le,ve,qe){switch(K){case P:if(O.byteLength!=U.byteLength||O.byteOffset!=U.byteOffset)return!1;O=O.buffer,U=U.buffer;case C:return!(O.byteLength!=U.byteLength||!ve(new jt(O),new jt(U)));case o:case h:case b:return xa(+O,+U);case l:return O.name==U.name&&O.message==U.message;case x:case k:return O==U+"";case w:var Ye=Ce;case m:var rt=ce&r;if(Ye||(Ye=ze),O.size!=U.size&&!rt)return!1;var Fe=qe.get(O);if(Fe)return Fe==U;ce|=n,qe.set(O,U);var vt=ga(Ye(O),Ye(U),ce,Le,ve,qe);return qe.delete(O),vt;case _:if(st)return st.call(O)==st.call(U)}return!1}function Tn(O,U,K,ce,Le,ve){var qe=K&r,Ye=De(O),rt=Ye.length,Fe=De(U),vt=Fe.length;if(rt!=vt&&!qe)return!1;for(var qt=rt;qt--;){var it=Ye[qt];if(!(qe?it in U:at.call(U,it)))return!1}var Ct=ve.get(O);if(Ct&&ve.get(U))return Ct==U;var Dt=!0;ve.set(O,U),ve.set(U,O);for(var yr=qe;++qt<rt;){it=Ye[qt];var sr=O[it],Pr=U[it];if(ce)var yo=qe?ce(Pr,sr,it,U,O,ve):ce(sr,Pr,it,O,U,ve);if(!(yo===void 0?sr===Pr||Le(sr,Pr,K,ce,ve):yo)){Dt=!1;break}yr||(yr=it=="constructor")}if(Dt&&!yr){var gs=O.constructor,bs=U.constructor;gs!=bs&&"constructor"in O&&"constructor"in U&&!(typeof gs=="function"&&gs instanceof gs&&typeof bs=="function"&&bs instanceof bs)&&(Dt=!1)}return ve.delete(O),ve.delete(U),Dt}function De(O){return At(O,Jd,ba)}function Ae(O,U){var K=O.__data__;return Zt(U)?K[typeof U=="string"?"string":"hash"]:K.map}function Ft(O,U){var K=he(O,U);return ta(K)?K:void 0}function Yt(O){var U=at.call(O,gt),K=O[gt];try{O[gt]=void 0;var ce=!0}catch{}var Le=Nt.call(O);return ce&&(U?O[gt]=K:delete O[gt]),Le}var ba=Ar?function(O){return O==null?[]:(O=Object(O),ye(Ar(O),function(U){return $t.call(O,U)}))}:Yd,Ue=ut;($&&Ue(new $(new ArrayBuffer(1)))!=P||W&&Ue(new W)!=w||se&&Ue(se.resolve())!=N||pe&&Ue(new pe)!=m||Ee&&Ue(new Ee)!=D)&&(Ue=function(O){var U=ut(O),K=U==v?O.constructor:void 0,ce=K?nt(K):"";if(ce)switch(ce){case bt:return P;case ot:return w;case tt:return N;case kt:return m;case _t:return D}return U});function Bt(O,U){return U=U??u,!!U&&(typeof O=="number"||V.test(O))&&O>-1&&O%1==0&&O<U}function Zt(O){var U=typeof O;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?O!=="__proto__":O===null}function Dr(O){return!!Lt&&Lt in O}function ra(O){var U=O&&O.constructor,K=typeof U=="function"&&U.prototype||et;return O===K}function gr(O){return Nt.call(O)}function nt(O){if(O!=null){try{return Er.call(O)}catch{}try{return O+""}catch{}}return""}function xa(O,U){return O===U||O!==O&&U!==U}var aa=Je((function(){return arguments})())?Je:function(O){return ya(O)&&at.call(O,"callee")&&!$t.call(O,"callee")},br=Array.isArray;function sa(O){return O!=null&&Or(O.length)&&!Tr(O)}var xr=A||Zd;function ms(O,U){return St(O,U)}function Tr(O){if(!bo(O))return!1;var U=ut(O);return U==p||U==y||U==f||U==j}function Or(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=u}function bo(O){var U=typeof O;return O!=null&&(U=="object"||U=="function")}function ya(O){return O!=null&&typeof O=="object"}var xo=de?Ke(de):mr;function Jd(O){return sa(O)?Ve(O):Cr(O)}function Yd(){return[]}function Zd(){return!1}e.exports=ms})(rs,rs.exports)),rs.exports}var $r={},ks={},Bo;function pn(){if(Bo)return ks;Bo=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=ns();function a(s,i,r,n=!0){r[e.testSymbol](s,a,i,n)}return ks.default=a,ks}var qo;function Fc(){if(qo)return $r;qo=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.exact=$r.partial=void 0;const e=pa(),a=pn(),s=ns();function i(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,s.isPredicate)(u[d]))(0,a.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=i(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}$r.partial=i;function r(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,s.isPredicate)(u[o]))(0,a.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=r(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return $r.exact=r,$r}var _s={},Vo;function mn(){if(Vo)return _s;Vo=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=pn();return _s.default=(a,s,i)=>{try{for(const r of a)(0,e.default)(r,s,i,!1);return!0}catch(r){return r.message}},_s}var Uo;function f0(){if(Uo)return Oa;Uo=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.ArrayPredicate=void 0;const e=hn(),a=Qe(),s=Fc(),i=mn();class r extends a.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,s.exact)(d,c,void 0,!0)})}}return Oa.ArrayPredicate=r,Oa}var Pa={},Rn,zo;function h0(){return zo||(zo=1,Rn=e=>{const a=typeof e;return e!==null&&(a==="object"||a==="function")}),Rn}var In,Ho;function p0(){if(Ho)return In;Ho=1;const e=h0(),a=new Set(["__proto__","prototype","constructor"]),s=r=>!r.some(n=>a.has(n));function i(r){const n=r.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return s(u)?u:[]}return In={get(r,n,u){if(!e(r)||typeof n!="string")return u===void 0?r:u;const c=i(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(r=r[c[d]],r==null){if(d!==c.length-1)return u;break}return r===void 0?u:r}},set(r,n,u){if(!e(r)||typeof n!="string")return r;const c=r,d=i(n);for(let f=0;f<d.length;f++){const o=d[f];e(r[o])||(r[o]={}),f===d.length-1&&(r[o]=u),r=r[o]}return c},delete(r,n){if(!e(r)||typeof n!="string")return!1;const u=i(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete r[d],!0;if(r=r[d],!e(r))return!1}},has(r,n){if(!e(r)||typeof n!="string")return!1;const u=i(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(r)){if(!(u[c]in r))return!1;r=r[u[c]]}else return!1;return!0}},In}var Es={},Wo;function is(){return Wo||(Wo=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=(e,a,s=5)=>{const i=[];for(const r of a)if(!e.has(r)&&(i.push(r),i.length===s))return i;return i.length===0?!0:i}),Es}var As={},Go;function m0(){if(Go)return As;Go=1,Object.defineProperty(As,"__esModule",{value:!0});const e=pa(),a=pn(),s=(i,r)=>e.default.plainObject(i)?Object.values(i).every(n=>s(n,r)):((0,a.default)(i,"deep values",r,!1),!0);return As.default=(i,r)=>{try{return s(i,r)}catch(n){return n.message}},As}var Jo;function g0(){if(Jo)return Pa;Jo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.ObjectPredicate=void 0;const e=pa(),a=p0(),s=hn(),i=is(),r=mn(),n=m0(),u=Fc(),c=Qe();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,r.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>s(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:y}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!y||y==="Object")&&(y=JSON.stringify(h)),`Expected ${l} \`${y}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,i.default)({has:l=>a.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>a.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Pa.ObjectPredicate=d,Pa}var La={},Yo;function b0(){if(Yo)return La;Yo=1,Object.defineProperty(La,"__esModule",{value:!0}),La.DatePredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("date",i)}before(i){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${i.toISOString()}`,validator:r=>r.getTime()<i.getTime()})}after(i){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${i.toISOString()}`,validator:r=>r.getTime()>i.getTime()})}}return La.DatePredicate=a,La}var Ma={},Zo;function x0(){if(Zo)return Ma;Zo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ErrorPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("error",i)}name(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${i}\`, got \`${r.name}\``,validator:r=>r.name===i})}message(i){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${i}\`, got \`${r.message}\``,validator:r=>r.message===i})}messageIncludes(i){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${i}\`, got \`${r.message}\``,validator:r=>r.message.includes(i)})}hasKeys(...i){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${i.join("`, `")}\``,validator:r=>i.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(i){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${i.name}\``,validator:r=>r instanceof i})}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)}}return Ma.ErrorPredicate=a,Ma}var $a={},Xo;function y0(){if(Xo)return $a;Xo=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.MapPredicate=void 0;const e=hn(),a=is(),s=mn(),i=Qe();class r extends i.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return $a.MapPredicate=r,$a}var Ra={},Qo;function v0(){if(Qo)return Ra;Qo=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.WeakMapPredicate=void 0;const e=is(),a=Qe();class s extends a.Predicate{constructor(r){super("WeakMap",r)}hasKeys(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAnyKeys(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Ra.WeakMapPredicate=s,Ra}var Ia={},Ko;function w0(){if(Ko)return Ia;Ko=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.SetPredicate=void 0;const e=hn(),a=is(),s=mn(),i=Qe();class r extends i.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ia.SetPredicate=r,Ia}var Fa={},eu;function N0(){if(eu)return Fa;eu=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.WeakSetPredicate=void 0;const e=is(),a=Qe();class s extends a.Predicate{constructor(r){super("WeakSet",r)}has(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAny(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Fa.WeakSetPredicate=s,Fa}var Ba={},tu;function j0(){if(tu)return Ba;tu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.TypedArrayPredicate=void 0;const e=Qe();class a extends e.Predicate{byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}length(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${i}\`, got \`${r.length}\``,validator:r=>r.length===i})}minLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${i}\`, got \`${r.length}\``,validator:r=>r.length>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${i-1}\`, got \`${r.length}\``})}maxLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${i}\`, got \`${r.length}\``,validator:r=>r.length<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${i+1}\`, got \`${r.length}\``})}}return Ba.TypedArrayPredicate=a,Ba}var qa={},ru;function k0(){if(ru)return qa;ru=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.ArrayBufferPredicate=void 0;const e=Qe();class a extends e.Predicate{byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}}return qa.ArrayBufferPredicate=a,qa}var Va={},au;function _0(){if(au)return Va;au=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.DataViewPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("DataView",i)}byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}}return Va.DataViewPredicate=a,Va}var Ua={},su;function E0(){if(su)return Ua;su=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AnyPredicate=void 0;const e=Yi(),a=ns(),s=Ic();class i{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[a.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const y=f.get(l);f.set(l,new Set([...y??[],...p]))}}if(f.size>0){const o=(0,s.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
|
|
69
|
-
${o}`,u,f)}}}return Ua.AnyPredicate=i,Ua}var nu;function qi(){return nu||(nu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnyPredicate=e.DataViewPredicate=e.ArrayBufferPredicate=e.TypedArrayPredicate=e.WeakSetPredicate=e.SetPredicate=e.WeakMapPredicate=e.MapPredicate=e.ErrorPredicate=e.DatePredicate=e.ObjectPredicate=e.ArrayPredicate=e.BooleanPredicate=e.BigIntPredicate=e.NumberPredicate=e.StringPredicate=void 0;const a=
|
|
68
|
+
`)};return Aa.generateArgumentErrorMessage=e,Aa}var Po;function Qe(){return Po||(Po=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const a=pa(),s=Yi(),i=n0(),r=ns(),n=Ic();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),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 o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,a.default)(h)}\``,validator:h=>a.default[o](h)})}[r.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:y}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=a.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,N=b||this.type,j=l.get(N),x=y(d,v,w);j?j.add(x):l.set(N,new Set([x]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new s.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,i.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(Pn)),Pn}var js={},Mn={},Sa={},$n,Lo;function i0(){return Lo||(Lo=1,$n=function(e){return!isNaN(Date.parse(e))}),$n}var Mo;function o0(){if(Mo)return Sa;Mo=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.StringPredicate=void 0;const e=pa(),a=i0(),s=Qe();class i extends s.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:a})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return Sa.StringPredicate=i,Sa}var Ca={},$o;function u0(){if($o)return Ca;$o=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.NumberPredicate=void 0;const e=pa(),a=Qe();class s extends a.Predicate{constructor(r){super("number",r)}inRange(r,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${r}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[r,n])})}greaterThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${r}, got ${n}`,validator:n=>n>r})}greaterThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${r}, got ${n}`,validator:n=>n>=r})}lessThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${r}, got ${n}`,validator:n=>n<r})}lessThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${r}, got ${n}`,validator:n=>n<=r})}equal(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${r}, got ${n}`,validator:n=>n===r})}oneOf(r){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(r);if(r.length>10){const d=r.length-10;c=JSON.stringify(r.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>r.includes(n)})}get integer(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer, got ${r}`,validator:r=>e.default.integer(r)})}get finite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be finite, got ${r}`,validator:r=>!e.default.infinite(r)})}get infinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be infinite, got ${r}`,validator:r=>e.default.infinite(r)})}get positive(){return this.addValidator({message:(r,n)=>`Expected ${n} to be positive, got ${r}`,validator:r=>r>0})}get negative(){return this.addValidator({message:(r,n)=>`Expected ${n} to be negative, got ${r}`,validator:r=>r<0})}get integerOrInfinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer or infinite, got ${r}`,validator:r=>e.default.integer(r)||e.default.infinite(r)})}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)}}return Ca.NumberPredicate=s,Ca}var Da={},Ro;function l0(){if(Ro)return Da;Ro=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.BigIntPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("bigint",i)}}return Da.BigIntPredicate=a,Da}var Ta={},Io;function c0(){if(Io)return Ta;Io=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.BooleanPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("boolean",i)}get true(){return this.addValidator({message:(i,r)=>`Expected ${r} to be true, got ${i}`,validator:i=>i})}get false(){return this.addValidator({message:(i,r)=>`Expected ${r} to be false, got ${i}`,validator:i=>!i})}}return Ta.BooleanPredicate=a,Ta}var Oa={},rs={exports:{}};rs.exports;var Fo;function hn(){return Fo||(Fo=1,(function(e,a){var s=200,i="__lodash_hash_undefined__",r=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",y="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",N="[object Promise]",j="[object Proxy]",x="[object RegExp]",m="[object Set]",k="[object String]",_="[object Symbol]",E="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",P="[object DataView]",L="[object Float32Array]",H="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",M="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",ee="[object Uint16Array]",R="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[L]=J[H]=J[F]=J[q]=J[M]=J[G]=J[X]=J[ee]=J[R]=!0,J[c]=J[d]=J[C]=J[o]=J[P]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[x]=J[m]=J[k]=J[D]=!1;var ue=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,Q=typeof self=="object"&&self&&self.Object===Object&&self,te=ue||Q||Function("return this")(),me=a&&!a.nodeType&&a,Se=me&&!0&&e&&!e.nodeType&&e,Z=Se&&Se.exports===me,ae=Z&&ue.process,re=(function(){try{return ae&&ae.binding&&ae.binding("util")}catch{}})(),de=re&&re.isTypedArray;function ye(O,U){for(var K=-1,ce=O==null?0:O.length,Le=0,ve=[];++K<ce;){var qe=O[K];U(qe,K,O)&&(ve[Le++]=qe)}return ve}function be(O,U){for(var K=-1,ce=U.length,Le=O.length;++K<ce;)O[Le+K]=U[K];return O}function _e(O,U){for(var K=-1,ce=O==null?0:O.length;++K<ce;)if(U(O[K],K,O))return!0;return!1}function ge(O,U){for(var K=-1,ce=Array(O);++K<O;)ce[K]=U(K);return ce}function Ke(O){return function(U){return O(U)}}function je(O,U){return O.has(U)}function he(O,U){return O?.[U]}function Ce(O){var U=-1,K=Array(O.size);return O.forEach(function(ce,Le){K[++U]=[Le,ce]}),K}function Me(O,U){return function(K){return O(U(K))}}function ze(O){var U=-1,K=Array(O.size);return O.forEach(function(ce){K[++U]=ce}),K}var Pt=Array.prototype,er=Function.prototype,et=Object.prototype,tr=te["__core-js_shared__"],Er=er.toString,at=et.hasOwnProperty,Lt=(function(){var O=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""})(),Nt=et.toString,hr=RegExp("^"+Er.call(at).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rr=Z?te.Buffer:void 0,Mt=te.Symbol,jt=te.Uint8Array,$t=et.propertyIsEnumerable,Kr=Pt.splice,gt=Mt?Mt.toStringTag:void 0,Ar=Object.getOwnPropertySymbols,A=rr?rr.isBuffer:void 0,S=Me(Object.keys,Object),$=Ft(te,"DataView"),W=Ft(te,"Map"),se=Ft(te,"Promise"),pe=Ft(te,"Set"),Ee=Ft(te,"WeakMap"),Te=Ft(Object,"create"),bt=nt($),ot=nt(W),tt=nt(se),kt=nt(pe),_t=nt(Ee),Et=Mt?Mt.prototype:void 0,st=Et?Et.valueOf:void 0;function Ge(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function Wt(){this.__data__=Te?Te(null):{},this.size=0}function Ie(O){var U=this.has(O)&&delete this.__data__[O];return this.size-=U?1:0,U}function Rt(O){var U=this.__data__;if(Te){var K=U[O];return K===i?void 0:K}return at.call(U,O)?U[O]:void 0}function Gt(O){var U=this.__data__;return Te?U[O]!==void 0:at.call(U,O)}function xt(O,U){var K=this.__data__;return this.size+=this.has(O)?0:1,K[O]=Te&&U===void 0?i:U,this}Ge.prototype.clear=Wt,Ge.prototype.delete=Ie,Ge.prototype.get=Rt,Ge.prototype.has=Gt,Ge.prototype.set=xt;function It(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function ar(){this.__data__=[],this.size=0}function ds(O){var U=this.__data__,K=Re(U,O);if(K<0)return!1;var ce=U.length-1;return K==ce?U.pop():Kr.call(U,K,1),--this.size,!0}function Sn(O){var U=this.__data__,K=Re(U,O);return K<0?void 0:U[K][1]}function ea(O){return Re(this.__data__,O)>-1}function ma(O,U){var K=this.__data__,ce=Re(K,O);return ce<0?(++this.size,K.push([O,U])):K[ce][1]=U,this}It.prototype.clear=ar,It.prototype.delete=ds,It.prototype.get=Sn,It.prototype.has=ea,It.prototype.set=ma;function Jt(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ce=O[U];this.set(ce[0],ce[1])}}function fs(){this.size=0,this.__data__={hash:new Ge,map:new(W||It),string:new Ge}}function hs(O){var U=Ae(this,O).delete(O);return this.size-=U?1:0,U}function Sr(O){return Ae(this,O).get(O)}function ps(O){return Ae(this,O).has(O)}function Cn(O,U){var K=Ae(this,O),ce=K.size;return K.set(O,U),this.size+=K.size==ce?0:1,this}Jt.prototype.clear=fs,Jt.prototype.delete=hs,Jt.prototype.get=Sr,Jt.prototype.has=ps,Jt.prototype.set=Cn;function B(O){var U=-1,K=O==null?0:O.length;for(this.__data__=new Jt;++U<K;)this.add(O[U])}function Y(O){return this.__data__.set(O,i),this}function ie(O){return this.__data__.has(O)}B.prototype.add=B.prototype.push=Y,B.prototype.has=ie;function le(O){var U=this.__data__=new It(O);this.size=U.size}function Oe(){this.__data__=new It,this.size=0}function ke(O){var U=this.__data__,K=U.delete(O);return this.size=U.size,K}function $e(O){return this.__data__.get(O)}function Be(O){return this.__data__.has(O)}function yt(O,U){var K=this.__data__;if(K instanceof It){var ce=K.__data__;if(!W||ce.length<s-1)return ce.push([O,U]),this.size=++K.size,this;K=this.__data__=new Jt(ce)}return K.set(O,U),this.size=K.size,this}le.prototype.clear=Oe,le.prototype.delete=ke,le.prototype.get=$e,le.prototype.has=Be,le.prototype.set=yt;function Ve(O,U){var K=br(O),ce=!K&&aa(O),Le=!K&&!ce&&xr(O),ve=!K&&!ce&&!Le&&xo(O),qe=K||ce||Le||ve,Ye=qe?ge(O.length,String):[],rt=Ye.length;for(var Fe in O)at.call(O,Fe)&&!(qe&&(Fe=="length"||Le&&(Fe=="offset"||Fe=="parent")||ve&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||Bt(Fe,rt)))&&Ye.push(Fe);return Ye}function Re(O,U){for(var K=O.length;K--;)if(xa(O[K][0],U))return K;return-1}function At(O,U,K){var ce=U(O);return br(O)?ce:be(ce,K(O))}function ut(O){return O==null?O===void 0?E:g:gt&> in Object(O)?Yt(O):gr(O)}function Je(O){return ya(O)&&ut(O)==c}function St(O,U,K,ce,Le){return O===U?!0:O==null||U==null||!ya(O)&&!ya(U)?O!==O&&U!==U:pr(O,U,K,ce,St,Le)}function pr(O,U,K,ce,Le,ve){var qe=br(O),Ye=br(U),rt=qe?d:Ue(O),Fe=Ye?d:Ue(U);rt=rt==c?v:rt,Fe=Fe==c?v:Fe;var vt=rt==v,qt=Fe==v,it=rt==Fe;if(it&&xr(O)){if(!xr(U))return!1;qe=!0,vt=!1}if(it&&!vt)return ve||(ve=new le),qe||xo(O)?ga(O,U,K,ce,Le,ve):Dn(O,U,rt,K,ce,Le,ve);if(!(K&r)){var Ct=vt&&at.call(O,"__wrapped__"),Dt=qt&&at.call(U,"__wrapped__");if(Ct||Dt){var yr=Ct?O.value():O,sr=Dt?U.value():U;return ve||(ve=new le),Le(yr,sr,K,ce,ve)}}return it?(ve||(ve=new le),Tn(O,U,K,ce,Le,ve)):!1}function ta(O){if(!bo(O)||Dr(O))return!1;var U=Tr(O)?hr:I;return U.test(nt(O))}function mr(O){return ya(O)&&Or(O.length)&&!!J[ut(O)]}function Cr(O){if(!ra(O))return S(O);var U=[];for(var K in Object(O))at.call(O,K)&&K!="constructor"&&U.push(K);return U}function ga(O,U,K,ce,Le,ve){var qe=K&r,Ye=O.length,rt=U.length;if(Ye!=rt&&!(qe&&rt>Ye))return!1;var Fe=ve.get(O);if(Fe&&ve.get(U))return Fe==U;var vt=-1,qt=!0,it=K&n?new B:void 0;for(ve.set(O,U),ve.set(U,O);++vt<Ye;){var Ct=O[vt],Dt=U[vt];if(ce)var yr=qe?ce(Dt,Ct,vt,U,O,ve):ce(Ct,Dt,vt,O,U,ve);if(yr!==void 0){if(yr)continue;qt=!1;break}if(it){if(!_e(U,function(sr,Pr){if(!je(it,Pr)&&(Ct===sr||Le(Ct,sr,K,ce,ve)))return it.push(Pr)})){qt=!1;break}}else if(!(Ct===Dt||Le(Ct,Dt,K,ce,ve))){qt=!1;break}}return ve.delete(O),ve.delete(U),qt}function Dn(O,U,K,ce,Le,ve,qe){switch(K){case P:if(O.byteLength!=U.byteLength||O.byteOffset!=U.byteOffset)return!1;O=O.buffer,U=U.buffer;case C:return!(O.byteLength!=U.byteLength||!ve(new jt(O),new jt(U)));case o:case h:case b:return xa(+O,+U);case l:return O.name==U.name&&O.message==U.message;case x:case k:return O==U+"";case w:var Ye=Ce;case m:var rt=ce&r;if(Ye||(Ye=ze),O.size!=U.size&&!rt)return!1;var Fe=qe.get(O);if(Fe)return Fe==U;ce|=n,qe.set(O,U);var vt=ga(Ye(O),Ye(U),ce,Le,ve,qe);return qe.delete(O),vt;case _:if(st)return st.call(O)==st.call(U)}return!1}function Tn(O,U,K,ce,Le,ve){var qe=K&r,Ye=De(O),rt=Ye.length,Fe=De(U),vt=Fe.length;if(rt!=vt&&!qe)return!1;for(var qt=rt;qt--;){var it=Ye[qt];if(!(qe?it in U:at.call(U,it)))return!1}var Ct=ve.get(O);if(Ct&&ve.get(U))return Ct==U;var Dt=!0;ve.set(O,U),ve.set(U,O);for(var yr=qe;++qt<rt;){it=Ye[qt];var sr=O[it],Pr=U[it];if(ce)var yo=qe?ce(Pr,sr,it,U,O,ve):ce(sr,Pr,it,O,U,ve);if(!(yo===void 0?sr===Pr||Le(sr,Pr,K,ce,ve):yo)){Dt=!1;break}yr||(yr=it=="constructor")}if(Dt&&!yr){var gs=O.constructor,bs=U.constructor;gs!=bs&&"constructor"in O&&"constructor"in U&&!(typeof gs=="function"&&gs instanceof gs&&typeof bs=="function"&&bs instanceof bs)&&(Dt=!1)}return ve.delete(O),ve.delete(U),Dt}function De(O){return At(O,Gd,ba)}function Ae(O,U){var K=O.__data__;return Zt(U)?K[typeof U=="string"?"string":"hash"]:K.map}function Ft(O,U){var K=he(O,U);return ta(K)?K:void 0}function Yt(O){var U=at.call(O,gt),K=O[gt];try{O[gt]=void 0;var ce=!0}catch{}var Le=Nt.call(O);return ce&&(U?O[gt]=K:delete O[gt]),Le}var ba=Ar?function(O){return O==null?[]:(O=Object(O),ye(Ar(O),function(U){return $t.call(O,U)}))}:Jd,Ue=ut;($&&Ue(new $(new ArrayBuffer(1)))!=P||W&&Ue(new W)!=w||se&&Ue(se.resolve())!=N||pe&&Ue(new pe)!=m||Ee&&Ue(new Ee)!=D)&&(Ue=function(O){var U=ut(O),K=U==v?O.constructor:void 0,ce=K?nt(K):"";if(ce)switch(ce){case bt:return P;case ot:return w;case tt:return N;case kt:return m;case _t:return D}return U});function Bt(O,U){return U=U??u,!!U&&(typeof O=="number"||V.test(O))&&O>-1&&O%1==0&&O<U}function Zt(O){var U=typeof O;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?O!=="__proto__":O===null}function Dr(O){return!!Lt&&Lt in O}function ra(O){var U=O&&O.constructor,K=typeof U=="function"&&U.prototype||et;return O===K}function gr(O){return Nt.call(O)}function nt(O){if(O!=null){try{return Er.call(O)}catch{}try{return O+""}catch{}}return""}function xa(O,U){return O===U||O!==O&&U!==U}var aa=Je((function(){return arguments})())?Je:function(O){return ya(O)&&at.call(O,"callee")&&!$t.call(O,"callee")},br=Array.isArray;function sa(O){return O!=null&&Or(O.length)&&!Tr(O)}var xr=A||Yd;function ms(O,U){return St(O,U)}function Tr(O){if(!bo(O))return!1;var U=ut(O);return U==p||U==y||U==f||U==j}function Or(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=u}function bo(O){var U=typeof O;return O!=null&&(U=="object"||U=="function")}function ya(O){return O!=null&&typeof O=="object"}var xo=de?Ke(de):mr;function Gd(O){return sa(O)?Ve(O):Cr(O)}function Jd(){return[]}function Yd(){return!1}e.exports=ms})(rs,rs.exports)),rs.exports}var $r={},ks={},Bo;function pn(){if(Bo)return ks;Bo=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=ns();function a(s,i,r,n=!0){r[e.testSymbol](s,a,i,n)}return ks.default=a,ks}var qo;function Fc(){if(qo)return $r;qo=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.exact=$r.partial=void 0;const e=pa(),a=pn(),s=ns();function i(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,s.isPredicate)(u[d]))(0,a.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=i(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}$r.partial=i;function r(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,s.isPredicate)(u[o]))(0,a.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=r(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return $r.exact=r,$r}var _s={},Vo;function mn(){if(Vo)return _s;Vo=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=pn();return _s.default=(a,s,i)=>{try{for(const r of a)(0,e.default)(r,s,i,!1);return!0}catch(r){return r.message}},_s}var Uo;function d0(){if(Uo)return Oa;Uo=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.ArrayPredicate=void 0;const e=hn(),a=Qe(),s=Fc(),i=mn();class r extends a.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,s.exact)(d,c,void 0,!0)})}}return Oa.ArrayPredicate=r,Oa}var Pa={},Rn,zo;function f0(){return zo||(zo=1,Rn=e=>{const a=typeof e;return e!==null&&(a==="object"||a==="function")}),Rn}var In,Ho;function h0(){if(Ho)return In;Ho=1;const e=f0(),a=new Set(["__proto__","prototype","constructor"]),s=r=>!r.some(n=>a.has(n));function i(r){const n=r.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return s(u)?u:[]}return In={get(r,n,u){if(!e(r)||typeof n!="string")return u===void 0?r:u;const c=i(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(r=r[c[d]],r==null){if(d!==c.length-1)return u;break}return r===void 0?u:r}},set(r,n,u){if(!e(r)||typeof n!="string")return r;const c=r,d=i(n);for(let f=0;f<d.length;f++){const o=d[f];e(r[o])||(r[o]={}),f===d.length-1&&(r[o]=u),r=r[o]}return c},delete(r,n){if(!e(r)||typeof n!="string")return!1;const u=i(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete r[d],!0;if(r=r[d],!e(r))return!1}},has(r,n){if(!e(r)||typeof n!="string")return!1;const u=i(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(r)){if(!(u[c]in r))return!1;r=r[u[c]]}else return!1;return!0}},In}var Es={},Wo;function is(){return Wo||(Wo=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=(e,a,s=5)=>{const i=[];for(const r of a)if(!e.has(r)&&(i.push(r),i.length===s))return i;return i.length===0?!0:i}),Es}var As={},Go;function p0(){if(Go)return As;Go=1,Object.defineProperty(As,"__esModule",{value:!0});const e=pa(),a=pn(),s=(i,r)=>e.default.plainObject(i)?Object.values(i).every(n=>s(n,r)):((0,a.default)(i,"deep values",r,!1),!0);return As.default=(i,r)=>{try{return s(i,r)}catch(n){return n.message}},As}var Jo;function m0(){if(Jo)return Pa;Jo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.ObjectPredicate=void 0;const e=pa(),a=h0(),s=hn(),i=is(),r=mn(),n=p0(),u=Fc(),c=Qe();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,r.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>s(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:y}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!y||y==="Object")&&(y=JSON.stringify(h)),`Expected ${l} \`${y}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,i.default)({has:l=>a.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>a.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Pa.ObjectPredicate=d,Pa}var La={},Yo;function g0(){if(Yo)return La;Yo=1,Object.defineProperty(La,"__esModule",{value:!0}),La.DatePredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("date",i)}before(i){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${i.toISOString()}`,validator:r=>r.getTime()<i.getTime()})}after(i){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${i.toISOString()}`,validator:r=>r.getTime()>i.getTime()})}}return La.DatePredicate=a,La}var Ma={},Zo;function b0(){if(Zo)return Ma;Zo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ErrorPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("error",i)}name(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${i}\`, got \`${r.name}\``,validator:r=>r.name===i})}message(i){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${i}\`, got \`${r.message}\``,validator:r=>r.message===i})}messageIncludes(i){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${i}\`, got \`${r.message}\``,validator:r=>r.message.includes(i)})}hasKeys(...i){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${i.join("`, `")}\``,validator:r=>i.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(i){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${i.name}\``,validator:r=>r instanceof i})}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)}}return Ma.ErrorPredicate=a,Ma}var $a={},Xo;function x0(){if(Xo)return $a;Xo=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.MapPredicate=void 0;const e=hn(),a=is(),s=mn(),i=Qe();class r extends i.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return $a.MapPredicate=r,$a}var Ra={},Qo;function y0(){if(Qo)return Ra;Qo=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.WeakMapPredicate=void 0;const e=is(),a=Qe();class s extends a.Predicate{constructor(r){super("WeakMap",r)}hasKeys(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAnyKeys(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Ra.WeakMapPredicate=s,Ra}var Ia={},Ko;function v0(){if(Ko)return Ia;Ko=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.SetPredicate=void 0;const e=hn(),a=is(),s=mn(),i=Qe();class r extends i.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ia.SetPredicate=r,Ia}var Fa={},eu;function w0(){if(eu)return Fa;eu=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.WeakSetPredicate=void 0;const e=is(),a=Qe();class s extends a.Predicate{constructor(r){super("WeakSet",r)}has(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAny(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Fa.WeakSetPredicate=s,Fa}var Ba={},tu;function N0(){if(tu)return Ba;tu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.TypedArrayPredicate=void 0;const e=Qe();class a extends e.Predicate{byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}length(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${i}\`, got \`${r.length}\``,validator:r=>r.length===i})}minLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${i}\`, got \`${r.length}\``,validator:r=>r.length>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${i-1}\`, got \`${r.length}\``})}maxLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${i}\`, got \`${r.length}\``,validator:r=>r.length<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${i+1}\`, got \`${r.length}\``})}}return Ba.TypedArrayPredicate=a,Ba}var qa={},ru;function j0(){if(ru)return qa;ru=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.ArrayBufferPredicate=void 0;const e=Qe();class a extends e.Predicate{byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}}return qa.ArrayBufferPredicate=a,qa}var Va={},au;function k0(){if(au)return Va;au=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.DataViewPredicate=void 0;const e=Qe();class a extends e.Predicate{constructor(i){super("DataView",i)}byteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===i})}minByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=i,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i-1}\`, got \`${r.byteLength}\``})}maxByteLength(i){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${i}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=i,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${i+1}\`, got \`${r.byteLength}\``})}}return Va.DataViewPredicate=a,Va}var Ua={},su;function _0(){if(su)return Ua;su=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AnyPredicate=void 0;const e=Yi(),a=ns(),s=Ic();class i{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[a.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const y=f.get(l);f.set(l,new Set([...y??[],...p]))}}if(f.size>0){const o=(0,s.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
|
|
69
|
+
${o}`,u,f)}}}return Ua.AnyPredicate=i,Ua}var nu;function qi(){return nu||(nu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnyPredicate=e.DataViewPredicate=e.ArrayBufferPredicate=e.TypedArrayPredicate=e.WeakSetPredicate=e.SetPredicate=e.WeakMapPredicate=e.MapPredicate=e.ErrorPredicate=e.DatePredicate=e.ObjectPredicate=e.ArrayPredicate=e.BooleanPredicate=e.BigIntPredicate=e.NumberPredicate=e.StringPredicate=void 0;const a=o0();Object.defineProperty(e,"StringPredicate",{enumerable:!0,get:function(){return a.StringPredicate}});const s=u0();Object.defineProperty(e,"NumberPredicate",{enumerable:!0,get:function(){return s.NumberPredicate}});const i=l0();Object.defineProperty(e,"BigIntPredicate",{enumerable:!0,get:function(){return i.BigIntPredicate}});const r=c0();Object.defineProperty(e,"BooleanPredicate",{enumerable:!0,get:function(){return r.BooleanPredicate}});const n=Qe(),u=d0();Object.defineProperty(e,"ArrayPredicate",{enumerable:!0,get:function(){return u.ArrayPredicate}});const c=m0();Object.defineProperty(e,"ObjectPredicate",{enumerable:!0,get:function(){return c.ObjectPredicate}});const d=g0();Object.defineProperty(e,"DatePredicate",{enumerable:!0,get:function(){return d.DatePredicate}});const f=b0();Object.defineProperty(e,"ErrorPredicate",{enumerable:!0,get:function(){return f.ErrorPredicate}});const o=x0();Object.defineProperty(e,"MapPredicate",{enumerable:!0,get:function(){return o.MapPredicate}});const h=y0();Object.defineProperty(e,"WeakMapPredicate",{enumerable:!0,get:function(){return h.WeakMapPredicate}});const l=v0();Object.defineProperty(e,"SetPredicate",{enumerable:!0,get:function(){return l.SetPredicate}});const p=w0();Object.defineProperty(e,"WeakSetPredicate",{enumerable:!0,get:function(){return p.WeakSetPredicate}});const y=N0();Object.defineProperty(e,"TypedArrayPredicate",{enumerable:!0,get:function(){return y.TypedArrayPredicate}});const w=j0();Object.defineProperty(e,"ArrayBufferPredicate",{enumerable:!0,get:function(){return w.ArrayBufferPredicate}});const b=k0();Object.defineProperty(e,"DataViewPredicate",{enumerable:!0,get:function(){return b.DataViewPredicate}});const g=_0();Object.defineProperty(e,"AnyPredicate",{enumerable:!0,get:function(){return g.AnyPredicate}}),e.default=(v,N)=>(Object.defineProperties(v,{string:{get:()=>new a.StringPredicate(N)},number:{get:()=>new s.NumberPredicate(N)},bigint:{get:()=>new i.BigIntPredicate(N)},boolean:{get:()=>new r.BooleanPredicate(N)},undefined:{get:()=>new n.Predicate("undefined",N)},null:{get:()=>new n.Predicate("null",N)},nullOrUndefined:{get:()=>new n.Predicate("nullOrUndefined",N)},nan:{get:()=>new n.Predicate("nan",N)},symbol:{get:()=>new n.Predicate("symbol",N)},array:{get:()=>new u.ArrayPredicate(N)},object:{get:()=>new c.ObjectPredicate(N)},date:{get:()=>new d.DatePredicate(N)},error:{get:()=>new f.ErrorPredicate(N)},map:{get:()=>new o.MapPredicate(N)},weakMap:{get:()=>new h.WeakMapPredicate(N)},set:{get:()=>new l.SetPredicate(N)},weakSet:{get:()=>new p.WeakSetPredicate(N)},function:{get:()=>new n.Predicate("Function",N)},buffer:{get:()=>new n.Predicate("Buffer",N)},regExp:{get:()=>new n.Predicate("RegExp",N)},promise:{get:()=>new n.Predicate("Promise",N)},typedArray:{get:()=>new y.TypedArrayPredicate("TypedArray",N)},int8Array:{get:()=>new y.TypedArrayPredicate("Int8Array",N)},uint8Array:{get:()=>new y.TypedArrayPredicate("Uint8Array",N)},uint8ClampedArray:{get:()=>new y.TypedArrayPredicate("Uint8ClampedArray",N)},int16Array:{get:()=>new y.TypedArrayPredicate("Int16Array",N)},uint16Array:{get:()=>new y.TypedArrayPredicate("Uint16Array",N)},int32Array:{get:()=>new y.TypedArrayPredicate("Int32Array",N)},uint32Array:{get:()=>new y.TypedArrayPredicate("Uint32Array",N)},float32Array:{get:()=>new y.TypedArrayPredicate("Float32Array",N)},float64Array:{get:()=>new y.TypedArrayPredicate("Float64Array",N)},arrayBuffer:{get:()=>new w.ArrayBufferPredicate("ArrayBuffer",N)},sharedArrayBuffer:{get:()=>new w.ArrayBufferPredicate("SharedArrayBuffer",N)},dataView:{get:()=>new b.DataViewPredicate(N)},iterable:{get:()=>new n.Predicate("Iterable",N)},any:{value:(...j)=>new g.AnyPredicate(j,N)}}),v)})(Mn)),Mn}var iu;function E0(){if(iu)return js;iu=1,Object.defineProperty(js,"__esModule",{value:!0});const e=qi();return js.default=a=>(Object.defineProperties(a,{optional:{get:()=>(0,e.default)({},{optional:!0})}}),a),js}var ou;function os(){return ou||(ou=1,(function(e){var a=Mr&&Mr.__createBinding||(Object.create?(function(p,y,w,b){b===void 0&&(b=w);var g=Object.getOwnPropertyDescriptor(y,w);(!g||("get"in g?!y.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return y[w]}}),Object.defineProperty(p,b,g)}):(function(p,y,w,b){b===void 0&&(b=w),p[b]=y[w]})),s=Mr&&Mr.__exportStar||function(p,y){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(y,w)&&a(y,p,w)};Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentError=e.Predicate=void 0;const i=t0(),r=r0(),n=Qe();Object.defineProperty(e,"Predicate",{enumerable:!0,get:function(){return n.Predicate}});const u=ns(),c=E0(),d=qi(),f=pn(),o=(p,y,w)=>{if(!(0,u.isPredicate)(y)&&typeof y!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof y}\``);if((0,u.isPredicate)(y)){const b=(0,i.default)();(0,f.default)(p,()=>(0,r.inferLabel)(b),y);return}(0,f.default)(p,y,w)};Object.defineProperties(o,{isValid:{value:(p,y)=>{try{return(0,f.default)(p,"",y),!0}catch{return!1}}},create:{value:(p,y)=>(w,b)=>{if((0,u.isPredicate)(p)){const g=(0,i.default)();(0,f.default)(w,b??(()=>(0,r.inferLabel)(g)),p);return}(0,f.default)(w,b??p,y)}}});const h=(0,d.default)((0,c.default)(o));e.default=h,s(qi(),e);var l=Yi();Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return l.ArgumentError}})})(Mr)),Mr}var Ss;function Bc(e){return Ss=Ss||document.createElement("textarea"),Ss.innerHTML="&"+e+";",Ss.value}function A0(e){return Object.prototype.toString.call(e)}function S0(e){return A0(e)==="[object String]"}var C0=Object.prototype.hasOwnProperty;function qc(e,a){return e?C0.call(e,a):!1}function Zi(e){var a=[].slice.call(arguments,1);return a.forEach(function(s){if(s){if(typeof s!="object")throw new TypeError(s+"must be object");Object.keys(s).forEach(function(i){e[i]=s[i]})}}),e}var D0=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function fa(e){return e.indexOf("\\")<0?e:e.replace(D0,"$1")}function Xi(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function nn(e){if(e>65535){e-=65536;var a=55296+(e>>10),s=56320+(e&1023);return String.fromCharCode(a,s)}return String.fromCharCode(e)}var T0=/&([a-z#][a-z0-9]{1,31});/gi,O0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function P0(e,a){var s=0,i=Bc(a);return a!==i?i:a.charCodeAt(0)===35&&O0.test(a)&&(s=a[1].toLowerCase()==="x"?parseInt(a.slice(2),16):parseInt(a.slice(1),10),Xi(s))?nn(s):e}function jr(e){return e.indexOf("&")<0?e:e.replace(T0,P0)}var L0=/[&<>"]/,M0=/[&<>"]/g,$0={"&":"&","<":"<",">":">",'"':"""};function R0(e){return $0[e]}function ft(e){return L0.test(e)?e.replace(M0,R0):e}var I0=Object.freeze({isString:S0,has:qc,assign:Zi,unescapeMd:fa,isValidEntityCode:Xi,fromCodePoint:nn,replaceEntities:jr,escapeHtml:ft}),fe={};fe.blockquote_open=function(){return`<blockquote>
|
|
70
70
|
`};fe.blockquote_close=function(e,a){return"</blockquote>"+Jr(e,a)};fe.code=function(e,a){return e[a].block?"<pre><code>"+ft(e[a].content)+"</code></pre>"+Jr(e,a):"<code>"+ft(e[a].content)+"</code>"};fe.fence=function(e,a,s,i,r){var n=e[a],u="",c=s.langPrefix,d="",f,o,h;if(n.params){if(f=n.params.split(/\s+/g),o=f.join(" "),qc(r.rules.fence_custom,f[0]))return r.rules.fence_custom[f[0]](e,a,s,i,r);d=ft(jr(fa(o))),u=' class="'+c+d+'"'}return s.highlight?h=s.highlight.apply(s.highlight,[n.content].concat(f))||ft(n.content):h=ft(n.content),"<pre><code"+u+">"+h+"</code></pre>"+Jr(e,a)};fe.fence_custom={};fe.heading_open=function(e,a){return"<h"+e[a].hLevel+">"};fe.heading_close=function(e,a){return"</h"+e[a].hLevel+`>
|
|
71
71
|
`};fe.hr=function(e,a,s){return(s.xhtmlOut?"<hr />":"<hr>")+Jr(e,a)};fe.bullet_list_open=function(){return`<ul>
|
|
72
72
|
`};fe.bullet_list_close=function(e,a){return"</ul>"+Jr(e,a)};fe.list_item_open=function(){return"<li>"};fe.list_item_close=function(){return`</li>
|
|
@@ -95,30 +95,30 @@ ${o}`,u,f)}}}return Ua.AnyPredicate=i,Ua}var nu;function qi(){return nu||(nu=1,(
|
|
|
95
95
|
`};fe.dt_close=function(){return`</dt>
|
|
96
96
|
`};fe.dd_close=function(){return`</dd>
|
|
97
97
|
`};function Vc(e,a){return++a>=e.length-2?a:e[a].type==="paragraph_open"&&e[a].tight&&e[a+1].type==="inline"&&e[a+1].content.length===0&&e[a+2].type==="paragraph_close"&&e[a+2].tight?Vc(e,a+2):a}var Jr=fe.getBreak=function(a,s){return s=Vc(a,s),s<a.length&&a[s].type==="list_item_close"?"":`
|
|
98
|
-
`};function Qi(){this.rules=Zi({},fe),this.getBreak=fe.getBreak}Qi.prototype.renderInline=function(e,a,s){for(var i=this.rules,r=e.length,n=0,u="";r--;)u+=i[e[n].type](e,n++,a,s,this);return u};Qi.prototype.render=function(e,a,s){for(var i=this.rules,r=e.length,n=-1,u="";++n<r;)e[n].type==="inline"?u+=this.renderInline(e[n].children,a,s):u+=i[e[n].type](e,n,a,s,this);return u};function wt(){this.__rules__=[],this.__cache__=null}wt.prototype.__find__=function(e){for(var a=this.__rules__.length,s=-1;a--;)if(this.__rules__[++s].name===e)return s;return-1};wt.prototype.__compile__=function(){var e=this,a=[""];e.__rules__.forEach(function(s){s.enabled&&s.alt.forEach(function(i){a.indexOf(i)<0&&a.push(i)})}),e.__cache__={},a.forEach(function(s){e.__cache__[s]=[],e.__rules__.forEach(function(i){i.enabled&&(s&&i.alt.indexOf(s)<0||e.__cache__[s].push(i.fn))})})};wt.prototype.at=function(e,a,s){var i=this.__find__(e),r=s||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=a,this.__rules__[i].alt=r.alt||[],this.__cache__=null};wt.prototype.before=function(e,a,s,i){var r=this.__find__(e),n=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:a,enabled:!0,fn:s,alt:n.alt||[]}),this.__cache__=null};wt.prototype.after=function(e,a,s,i){var r=this.__find__(e),n=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:a,enabled:!0,fn:s,alt:n.alt||[]}),this.__cache__=null};wt.prototype.push=function(e,a,s){var i=s||{};this.__rules__.push({name:e,enabled:!0,fn:a,alt:i.alt||[]}),this.__cache__=null};wt.prototype.enable=function(e,a){e=Array.isArray(e)?e:[e],a&&this.__rules__.forEach(function(s){s.enabled=!1}),e.forEach(function(s){var i=this.__find__(s);if(i<0)throw new Error("Rules manager: invalid rule name "+s);this.__rules__[i].enabled=!0},this),this.__cache__=null};wt.prototype.disable=function(e){e=Array.isArray(e)?e:[e],e.forEach(function(a){var s=this.__find__(a);if(s<0)throw new Error("Rules manager: invalid rule name "+a);this.__rules__[s].enabled=!1},this),this.__cache__=null};wt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function
|
|
99
|
-
()[]'".,!?-`;function Fn(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function G0(e){var a,s,i,r,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+uu.split("").map(Fn).join("")+"])("+Object.keys(e.env.abbreviations).map(function(y){return y.substr(1)}).sort(function(y,w){return w.length-y.length}).map(Fn).join("|")+")($|["+uu.split("").map(Fn).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,s=0,i=p.length;s<i;s++)if(p[s].type==="inline"){for(r=p[s].children,a=r.length-1;a>=0;a--)if(n=r[a],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[s].children=r=[].concat(r.slice(0,a),c,r.slice(a+1)))}}}}var J0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Y0=/\((c|tm|r|p)\)/ig,Z0={c:"©",r:"®",p:"§",tm:"™"};function X0(e){return e.indexOf("(")<0?e:e.replace(Y0,function(a,s){return Z0[s.toLowerCase()]})}function Q0(e){var a,s,i,r,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(r=e.tokens[n].children,a=r.length-1;a>=0;a--)s=r[a],s.type==="text"&&(i=s.content,i=X0(i),J0.test(i)&&(i=i.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")),s.content=i)}}var K0=/['"]/,lu=/['"]/g,ef=/[-\s()\[\]]/,cu="’";function du(e,a){return a<0||a>=e.length?!1:!ef.test(e[a])}function ia(e,a,s){return e.substr(0,a)+s+e.substr(a+1)}function tf(e){var a,s,i,r,n,u,c,d,f,o,h,l,p,y,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,a=0;a<b.length;a++)if(s=b[a],!(s.type!=="text"||K0.test(s.text))){for(c=b[a].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,i=s.content,n=0,u=i.length;e:for(;n<u&&(lu.lastIndex=n,r=lu.exec(i),!!r);){if(d=!du(i,r.index-1),n=r.index+1,y=r[0]==="'",f=!du(i,n),!f&&!d){y&&(s.content=ia(s.content,r.index,cu));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===y&&g[p].level===c){o=g[p],y?(b[o.token].content=ia(b[o.token].content,o.pos,e.options.quotes[2]),s.content=ia(s.content,r.index,e.options.quotes[3])):(b[o.token].content=ia(b[o.token].content,o.pos,e.options.quotes[0]),s.content=ia(s.content,r.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:a,pos:r.index,single:y,level:c}):l&&y&&(s.content=ia(s.content,r.index,cu))}}}}}var Bn=[["block",B0],["abbr",V0],["references",z0],["inline",H0],["footnote_tail",W0],["abbr2",G0],["replacements",Q0],["smartquotes",tf]];function Wc(){this.options={},this.ruler=new wt;for(var e=0;e<Bn.length;e++)this.ruler.push(Bn[e][0],Bn[e][1])}Wc.prototype.process=function(e){var a,s,i;for(i=this.ruler.getRules(""),a=0,s=i.length;a<s;a++)i[a](e)};function Zr(e,a,s,i,r){var n,u,c,d,f,o,h;for(this.src=e,this.parser=a,this.options=s,this.env=i,this.tokens=r,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="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}Zr.prototype.isEmpty=function(a){return this.bMarks[a]+this.tShift[a]>=this.eMarks[a]};Zr.prototype.skipEmptyLines=function(a){for(var s=this.lineMax;a<s&&!(this.bMarks[a]+this.tShift[a]<this.eMarks[a]);a++);return a};Zr.prototype.skipSpaces=function(a){for(var s=this.src.length;a<s&&this.src.charCodeAt(a)===32;a++);return a};Zr.prototype.skipChars=function(a,s){for(var i=this.src.length;a<i&&this.src.charCodeAt(a)===s;a++);return a};Zr.prototype.skipCharsBack=function(a,s,i){if(a<=i)return a;for(;a>i;)if(s!==this.src.charCodeAt(--a))return a+1;return a};Zr.prototype.getLines=function(a,s,i,r){var n,u,c,d,f,o=a;if(a>=s)return"";if(o+1===s)return u=this.bMarks[o]+Math.min(this.tShift[o],i),c=r?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(s-a),n=0;o<s;o++,n++)f=this.tShift[o],f>i&&(f=i),f<0&&(f=0),u=this.bMarks[o]+f,o+1<s||r?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function rf(e,a,s){var i,r;if(e.tShift[a]-e.blkIndent<4)return!1;for(r=i=a+1;i<s;){if(e.isEmpty(i)){i++;continue}if(e.tShift[i]-e.blkIndent>=4){i++,r=i;continue}break}return e.line=i,e.tokens.push({type:"code",content:e.getLines(a,r,4+e.blkIndent,!0),block:!0,lines:[a,e.line],level:e.level}),!0}function af(e,a,s,i){var r,n,u,c,d,f=!1,o=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(o+3>h||(r=e.src.charCodeAt(o),r!==126&&r!==96)||(d=o,o=e.skipChars(o,r),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(i)return!0;for(c=a;c++,!(c>=s||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===r&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,r),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[a],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(a+1,c,n,!0),lines:[a,e.line],level:e.level}),!0}function sf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(i)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[a]],e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[a]],e.tShift[a]=w-e.bMarks[a],h=e.parser.ruler.getRules("blockquote"),r=a+1;r<s&&(w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r],!(w>=b));r++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[r]),e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[r]),e.tShift[r]=w-e.bMarks[r];continue}if(n)break;for(y=!1,l=0,p=h.length;l<p;l++)if(h[l](e,r,s,!0)){y=!0;break}if(y)break;c.push(e.bMarks[r]),u.push(e.tShift[r]),e.tShift[r]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[a,0],level:e.level++}),e.parser.tokenize(e,a,r),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+a]=c[l],e.tShift[l+a]=u[l];return e.blkIndent=d,!0}function nf(e,a,s,i){var r,n,u,c=e.bMarks[a],d=e.eMarks[a];if(c+=e.tShift[a],c>d||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==r&&u!==32)return!1;u===r&&n++}return n<3?!1:(i||(e.line=a+1,e.tokens.push({type:"hr",lines:[a,e.line],level:e.level})),!0)}function fu(e,a){var s,i,r;return i=e.bMarks[a]+e.tShift[a],r=e.eMarks[a],i>=r||(s=e.src.charCodeAt(i++),s!==42&&s!==45&&s!==43)||i<r&&e.src.charCodeAt(i)!==32?-1:i}function hu(e,a){var s,i=e.bMarks[a]+e.tShift[a],r=e.eMarks[a];if(i+1>=r||(s=e.src.charCodeAt(i++),s<48||s>57))return-1;for(;;){if(i>=r)return-1;if(s=e.src.charCodeAt(i++),!(s>=48&&s<=57)){if(s===41||s===46)break;return-1}}return i<r&&e.src.charCodeAt(i)!==32?-1:i}function of(e,a){var s,i,r=e.level+2;for(s=a+2,i=e.tokens.length-2;s<i;s++)e.tokens[s].level===r&&e.tokens[s].type==="paragraph_open"&&(e.tokens[s+2].tight=!0,e.tokens[s].tight=!0,s+=2)}function uf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w,b,g,v,N,j,x,m=!0,k,_,E,D;if((h=hu(e,a))>=0)b=!0;else if((h=fu(e,a))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),i)return!0;for(v=e.tokens.length,b?(o=e.bMarks[a]+e.tShift[a],y=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:y,lines:j=[a,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:j=[a,0],level:e.level++}),r=a,N=!1,k=e.parser.ruler.getRules("list");r<s&&(g=e.skipSpaces(h),l=e.eMarks[r],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[r]+p,e.tokens.push({type:"list_item_open",lines:x=[a,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[a],f=e.parentType,e.tShift[a]=g-e.bMarks[a],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,a,s,!0),(!e.tight||N)&&(m=!1),N=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[a]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),r=a=e.line,x[1]=r,g=e.bMarks[a],!(r>=s||e.isEmpty(r)||e.tShift[r]<e.blkIndent));){for(D=!1,_=0,E=k.length;_<E;_++)if(k[_](e,r,s,!0)){D=!0;break}if(D)break;if(b){if(h=hu(e,r),h<0)break}else if(h=fu(e,r),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),j[1]=r,e.line=r,m&&of(e,v),!0}function lf(e,a,s,i){var r,n,u,c,d,f=e.bMarks[a]+e.tShift[a],o=e.eMarks[a];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(i||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),r=e.bMarks[a],n=e.tShift[a],u=e.parentType,e.tShift[a]=e.skipSpaces(c)-c,e.bMarks[a]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[a]<e.blkIndent&&(e.tShift[a]+=e.blkIndent,e.bMarks[a]-=e.blkIndent),e.parser.tokenize(e,a,s,!0),e.parentType=u,e.blkIndent-=4,e.tShift[a]=n,e.bMarks[a]=r,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function cf(e,a,s,i){var r,n,u,c=e.bMarks[a]+e.tShift[a],d=e.eMarks[a];if(c>=d||(r=e.src.charCodeAt(c),r!==35||c>=d))return!1;for(n=1,r=e.src.charCodeAt(++c);r===35&&c<d&&n<=6;)n++,r=e.src.charCodeAt(++c);return n>6||c<d&&r!==32?!1:(i||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=a+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[a,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function df(e,a,s){var i,r,n,u=a+1;return u>=s||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(r=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],r>=n)||(i=e.src.charCodeAt(r),i!==45&&i!==61)||(r=e.skipChars(r,i),r=e.skipSpaces(r),r<n)?!1:(r=e.bMarks[a]+e.tShift[a],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:i===61?1:2,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(r,e.eMarks[a]).trim(),level:e.level+1,lines:[a,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:i===61?1:2,level:e.level}),!0)}var Gc={};["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(e){Gc[e]=!0});var ff=/^<([a-zA-Z]{1,15})[\s\/>]/,hf=/^<\/([a-zA-Z]{1,15})[\s>]/;function pf(e){var a=e|32;return a>=97&&a<=122}function mf(e,a,s,i){var r,n,u,c=e.bMarks[a],d=e.eMarks[a],f=e.tShift[a];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(r=e.src.charCodeAt(c+1),r===33||r===63){if(i)return!0}else if(r===47||pf(r)){if(r===47){if(n=e.src.slice(c,d).match(hf),!n)return!1}else if(n=e.src.slice(c,d).match(ff),!n)return!1;if(Gc[n[1].toLowerCase()]!==!0)return!1;if(i)return!0}else return!1;for(u=a+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[a,e.line],content:e.getLines(a,u,0,!0)}),!0}function qn(e,a){var s=e.bMarks[a]+e.blkIndent,i=e.eMarks[a];return e.src.substr(s,i-s)}function gf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y;if(a+2>s||(d=a+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(r=e.src.charCodeAt(u),r!==124&&r!==45&&r!==58)||(n=qn(e,a+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=qn(e,a).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(i)return!0;for(e.tokens.push({type:"table_open",lines:p=[a,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[a,a+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[a,a+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[a,a+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[a,a+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:y=[a+2,0],level:e.level++}),d=a+2;d<s&&!(e.tShift[d]<e.blkIndent||(n=qn(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=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(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=y[1]=d,e.line=d,!0}function Cs(e,a){var s,i,r=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];return r>=n||(i=e.src.charCodeAt(r++),i!==126&&i!==58)||(s=e.skipSpaces(r),r===s)||s>=n?-1:s}function bf(e,a){var s,i,r=e.level+2;for(s=a+2,i=e.tokens.length-2;s<i;s++)e.tokens[s].level===r&&e.tokens[s].type==="paragraph_open"&&(e.tokens[s+2].tight=!0,e.tokens[s].tight=!0,s+=2)}function xf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w,b,g;if(i)return e.ddIndent<0?!1:Cs(e,a)>=0;if(o=a+1,e.isEmpty(o)&&++o>s||e.tShift[o]<e.blkIndent||(r=Cs(e,o),r<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[a,0],level:e.level++}),u=a,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,y=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=r-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,s,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=y,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=s||e.tShift[o]<e.blkIndent)break e;if(r=Cs(e,o),r<0)break;n=o}if(o>=s||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=s)||(e.isEmpty(n)&&n++,n>=s)||e.tShift[n]<e.blkIndent||(r=Cs(e,n),r<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&bf(e,f),!0}function yf(e,a){var s,i,r,n,u,c=a+1,d;if(s=e.lineMax,c<s&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<s&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(r=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,s,!0)){r=!0;break}if(r)break}}return i=e.getLines(a,c,e.blkIndent,!1).trim(),e.line=c,i.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:i,level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var Ds=[["code",rf],["fences",af,["paragraph","blockquote","list"]],["blockquote",sf,["paragraph","blockquote","list"]],["hr",nf,["paragraph","blockquote","list"]],["list",uf,["paragraph","blockquote"]],["footnote",lf,["paragraph"]],["heading",cf,["paragraph","blockquote"]],["lheading",df],["htmlblock",mf,["paragraph","blockquote"]],["table",gf,["paragraph"]],["deflist",xf,["paragraph"]],["paragraph",yf]];function Ki(){this.ruler=new wt;for(var e=0;e<Ds.length;e++)this.ruler.push(Ds[e][0],Ds[e][1],{alt:(Ds[e][2]||[]).slice()})}Ki.prototype.tokenize=function(e,a,s){for(var i=this.ruler.getRules(""),r=i.length,n=a,u=!1,c,d;n<s&&(e.line=n=e.skipEmptyLines(n),!(n>=s||e.tShift[n]<e.blkIndent));){for(d=0;d<r&&(c=i[d](e,n,s,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<s&&e.isEmpty(n)){if(u=!0,n++,n<s&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var vf=/[\n\t]/g,wf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,Nf=/\u00a0/g;Ki.prototype.parse=function(e,a,s,i){var r,n=0,u=0;if(!e)return[];e=e.replace(Nf," "),e=e.replace(wf,`
|
|
100
|
-
`),e.indexOf(" ")>=0&&(e=e.replace(vf,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),r=new Zr(e,this,a,s,i),this.tokenize(r,r.line,r.lineMax)};function jf(e){switch(e){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 kf(e,a){for(var s=e.pos;s<e.posMax&&!jf(e.src.charCodeAt(s));)s++;return s===e.pos?!1:(a||(e.pending+=e.src.slice(e.pos,s)),e.pos=s,!0)}function _f(e,a){var s,i,r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;if(s=e.pending.length-1,i=e.posMax,!a)if(s>=0&&e.pending.charCodeAt(s)===32)if(s>=1&&e.pending.charCodeAt(s-1)===32){for(var n=s-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(r++;r<i&&e.src.charCodeAt(r)===32;)r++;return e.pos=r,!0}var eo=[];for(var pu=0;pu<256;pu++)eo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){eo[e.charCodeAt(0)]=1});function Ef(e,a){var s,i=e.pos,r=e.posMax;if(e.src.charCodeAt(i)!==92)return!1;if(i++,i<r){if(s=e.src.charCodeAt(i),s<256&&eo[s]!==0)return a||(e.pending+=e.src[i]),e.pos+=2,!0;if(s===10){for(a||e.push({type:"hardbreak",level:e.level}),i++;i<r&&e.src.charCodeAt(i)===32;)i++;return e.pos=i,!0}}return a||(e.pending+="\\"),e.pos++,!0}function Af(e,a){var s,i,r,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(s=c,c++,i=e.posMax;c<i&&e.src.charCodeAt(c)===96;)c++;for(r=e.src.slice(s,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<i&&e.src.charCodeAt(u)===96;)u++;if(u-n===r.length)return a||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return a||(e.pending+=r),e.pos+=r.length,!0}function Sf(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||a||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===126;)i++;if(i>u+3)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function Cf(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||a||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===43;)i++;if(i!==u+2)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function Df(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||a||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===61;)i++;if(i!==u+2)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function mu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function gu(e,a){var s=a,i,r,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(a);for(i=a>0?e.src.charCodeAt(a-1):-1;s<d&&e.src.charCodeAt(s)===f;)s++;return s>=d&&(u=!1),n=s-a,n>=4?u=c=!1:(r=s<d?e.src.charCodeAt(s):-1,(r===32||r===10)&&(u=!1),(i===32||i===10)&&(c=!1),f===95&&(mu(i)&&(u=!1),mu(r)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function Tf(e,a){var s,i,r,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||a)return!1;if(d=gu(e,o),s=d.delims,!d.can_open)return e.pos+=s,a||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+s,c=[s];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=gu(e,e.pos),i=d.delims,d.can_close){for(n=c.pop(),u=i;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){s=n,r=!0;break}e.pos+=i;continue}d.can_open&&c.push(i),e.pos+=i;continue}e.parser.skipToken(e)}return r?(e.posMax=e.pos,e.pos=o+s,a||((s===2||s===3)&&e.push({type:"strong_open",level:e.level++}),(s===1||s===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(s===1||s===3)&&e.push({type:"em_close",level:--e.level}),(s===2||s===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+s,e.posMax=f,!0):(e.pos=o,!1)}var Of=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function Pf(e,a){var s,i,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){s=!0;break}e.parser.skipToken(e)}return!s||n+1===e.pos||(i=e.src.slice(n+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sub",level:e.level,content:i.replace(Of,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}var Lf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function Mf(e,a){var s,i,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.parser.skipToken(e)}return!s||n+1===e.pos||(i=e.src.slice(n+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sup",level:e.level,content:i.replace(Lf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}function $f(e,a){var s,i,r,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,y=e.src.charCodeAt(p);if(y===33&&(o=!0,y=e.src.charCodeAt(++p)),y!==91||e.level>=e.options.maxNesting||(s=p+1,i=ss(e,p),i<0))return!1;if(c=i+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Uc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&zc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=ss(e,c),c>=0?r=e.src.slice(p,c++):c=p-1),r||(typeof r>"u"&&(c=i+1),r=e.src.slice(s,i)),d=e.env.references[Hc(r)],!d)return e.pos=h,!1;n=d.href,u=d.title}return a||(e.pos=s,e.posMax=i,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(s,i-s),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function Rf(e,a){var s,i,r,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(s=c+2,i=ss(e,c+1),i<0)?!1:(a||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=s,e.posMax=i,e.push({type:"footnote_ref",id:r,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=i+1,e.posMax=u,!0)}function If(e,a){var s,i,r,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(i=c+2;i<u;i++){if(e.src.charCodeAt(i)===32||e.src.charCodeAt(i)===10)return!1;if(e.src.charCodeAt(i)===93)break}return i===c+2||i>=u||(i++,s=e.src.slice(c+2,i-1),typeof e.env.footnotes.refs[":"+s]>"u")?!1:(a||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+s]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:s,count:0},e.env.footnotes.refs[":"+s]=r):r=e.env.footnotes.refs[":"+s],n=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push({type:"footnote_ref",id:r,subId:n,level:e.level})),e.pos=i,e.posMax=u,!0)}var Ff=["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"],Bf=/^<([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])?)*)>/,qf=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Vf(e,a){var s,i,r,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(s=e.src.slice(c),s.indexOf(">")<0)?!1:(i=s.match(qf),i?Ff.indexOf(i[1].toLowerCase())<0||(n=i[0].slice(1,-1),u=Vi(n),!e.parser.validateLink(n))?!1:(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=i[0].length,!0):(r=s.match(Bf),r?(n=r[0].slice(1,-1),u=Vi("mailto:"+n),e.parser.validateLink(u)?(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=r[0].length,!0):!1):!1))}function gn(e,a){return e=e.source,a=a||"",function s(i,r){return i?(r=r.source||r,e=e.replace(i,r),s):new RegExp(e,a)}}var Uf=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,zf=/[^"'=<>`\x00-\x20]+/,Hf=/'[^']*'/,Wf=/"[^"]*"/,Gf=gn(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",zf)("single_quoted",Hf)("double_quoted",Wf)(),Jf=gn(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Uf)("attr_value",Gf)(),Yf=gn(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Jf)(),Zf=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,Xf=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Qf=/<[?].*?[?]>/,Kf=/<![A-Z]+\s+[^>]*>/,eh=/<!\[CDATA\[[\s\S]*?\]\]>/,th=gn(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Yf)("close_tag",Zf)("comment",Xf)("processing",Qf)("declaration",Kf)("cdata",eh)();function rh(e){var a=e|32;return a>=97&&a<=122}function ah(e,a){var s,i,r,n=e.pos;return!e.options.html||(r=e.posMax,e.src.charCodeAt(n)!==60||n+2>=r)||(s=e.src.charCodeAt(n+1),s!==33&&s!==63&&s!==47&&!rh(s))||(i=e.src.slice(n).match(th),!i)?!1:(a||e.push({type:"htmltag",content:e.src.slice(n,n+i[0].length),level:e.level}),e.pos+=i[0].length,!0)}var sh=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,nh=/^&([a-z][a-z0-9]{1,31});/i;function ih(e,a){var s,i,r,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(s=e.src.charCodeAt(n+1),s===35){if(r=e.src.slice(n).match(sh),r)return a||(i=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),e.pending+=Xi(i)?nn(i):nn(65533)),e.pos+=r[0].length,!0}else if(r=e.src.slice(n).match(nh),r){var c=Bc(r[1]);if(r[1]!==c)return a||(e.pending+=c),e.pos+=r[0].length,!0}}return a||(e.pending+="&"),e.pos++,!0}var Vn=[["text",kf],["newline",_f],["escape",Ef],["backticks",Af],["del",Sf],["ins",Cf],["mark",Df],["emphasis",Tf],["sub",Pf],["sup",Mf],["links",$f],["footnote_inline",Rf],["footnote_ref",If],["autolink",Vf],["htmltag",ah],["entity",ih]];function bn(){this.ruler=new wt;for(var e=0;e<Vn.length;e++)this.ruler.push(Vn[e][0],Vn[e][1]);this.validateLink=oh}bn.prototype.skipToken=function(e){var a=this.ruler.getRules(""),s=a.length,i=e.pos,r,n;if((n=e.cacheGet(i))>0){e.pos=n;return}for(r=0;r<s;r++)if(a[r](e,!0)){e.cacheSet(i,e.pos);return}e.pos++,e.cacheSet(i,e.pos)};bn.prototype.tokenize=function(e){for(var a=this.ruler.getRules(""),s=a.length,i=e.posMax,r,n;e.pos<i;){for(n=0;n<s&&(r=a[n](e,!1),!r);n++);if(r){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};bn.prototype.parse=function(e,a,s,i){var r=new Yr(e,this,a,s,i);this.tokenize(r)};function oh(e){var a=["vbscript","javascript","file","data"],s=e.trim().toLowerCase();return s=jr(s),!(s.indexOf(":")!==-1&&a.indexOf(s.split(":")[0])!==-1)}var uh={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"]}}},lh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},ch={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"]}}},dh={default:uh,full:lh,commonmark:ch};function Jc(e,a,s){this.src=a,this.env=s,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function _r(e,a){typeof e!="string"&&(a=e,e="default"),a&&a.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
|
|
98
|
+
`};function Qi(){this.rules=Zi({},fe),this.getBreak=fe.getBreak}Qi.prototype.renderInline=function(e,a,s){for(var i=this.rules,r=e.length,n=0,u="";r--;)u+=i[e[n].type](e,n++,a,s,this);return u};Qi.prototype.render=function(e,a,s){for(var i=this.rules,r=e.length,n=-1,u="";++n<r;)e[n].type==="inline"?u+=this.renderInline(e[n].children,a,s):u+=i[e[n].type](e,n,a,s,this);return u};function wt(){this.__rules__=[],this.__cache__=null}wt.prototype.__find__=function(e){for(var a=this.__rules__.length,s=-1;a--;)if(this.__rules__[++s].name===e)return s;return-1};wt.prototype.__compile__=function(){var e=this,a=[""];e.__rules__.forEach(function(s){s.enabled&&s.alt.forEach(function(i){a.indexOf(i)<0&&a.push(i)})}),e.__cache__={},a.forEach(function(s){e.__cache__[s]=[],e.__rules__.forEach(function(i){i.enabled&&(s&&i.alt.indexOf(s)<0||e.__cache__[s].push(i.fn))})})};wt.prototype.at=function(e,a,s){var i=this.__find__(e),r=s||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=a,this.__rules__[i].alt=r.alt||[],this.__cache__=null};wt.prototype.before=function(e,a,s,i){var r=this.__find__(e),n=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:a,enabled:!0,fn:s,alt:n.alt||[]}),this.__cache__=null};wt.prototype.after=function(e,a,s,i){var r=this.__find__(e),n=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:a,enabled:!0,fn:s,alt:n.alt||[]}),this.__cache__=null};wt.prototype.push=function(e,a,s){var i=s||{};this.__rules__.push({name:e,enabled:!0,fn:a,alt:i.alt||[]}),this.__cache__=null};wt.prototype.enable=function(e,a){e=Array.isArray(e)?e:[e],a&&this.__rules__.forEach(function(s){s.enabled=!1}),e.forEach(function(s){var i=this.__find__(s);if(i<0)throw new Error("Rules manager: invalid rule name "+s);this.__rules__[i].enabled=!0},this),this.__cache__=null};wt.prototype.disable=function(e){e=Array.isArray(e)?e:[e],e.forEach(function(a){var s=this.__find__(a);if(s<0)throw new Error("Rules manager: invalid rule name "+a);this.__rules__[s].enabled=!1},this),this.__cache__=null};wt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function F0(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}function Yr(e,a,s,i,r){this.src=e,this.env=i,this.options=s,this.parser=a,this.tokens=r,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}Yr.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""};Yr.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level};Yr.prototype.cacheSet=function(e,a){for(var s=this.cache.length;s<=e;s++)this.cache.push(0);this.cache[e]=a};Yr.prototype.cacheGet=function(e){return e<this.cache.length?this.cache[e]:0};function ss(e,a){var s,i,r,n=-1,u=e.posMax,c=e.pos,d=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=a+1,e.isInLabel=!0,s=1;e.pos<u;){if(r=e.src.charCodeAt(e.pos),r===91)s++;else if(r===93&&(s--,s===0)){i=!0;break}e.parser.skipToken(e)}return i?(n=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=s-1,e.pos=c,e.isInLabel=d,n}function B0(e,a,s,i){var r,n,u,c,d,f;if(e.charCodeAt(0)!==42||e.charCodeAt(1)!==91||e.indexOf("]:")===-1||(r=new Yr(e,a,s,i,[]),n=ss(r,1),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&r.src.charCodeAt(u)!==10;u++);return d=e.slice(2,n),f=e.slice(n+2,u).trim(),f.length===0?-1:(i.abbreviations||(i.abbreviations={}),typeof i.abbreviations[":"+d]>"u"&&(i.abbreviations[":"+d]=f),u)}function q0(e){var a=e.tokens,s,i,r,n;if(!e.inlineMode){for(s=1,i=a.length-1;s<i;s++)if(a[s-1].type==="paragraph_open"&&a[s].type==="inline"&&a[s+1].type==="paragraph_close"){for(r=a[s].content;r.length&&(n=B0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[s].content=r,r.length||(a[s-1].tight=!0,a[s+1].tight=!0)}}}function Vi(e){var a=jr(e);try{a=decodeURI(a)}catch{}return encodeURI(a)}function Uc(e,a){var s,i,r,n=a,u=e.posMax;if(e.src.charCodeAt(a)===60){for(a++;a<u;){if(s=e.src.charCodeAt(a),s===10)return!1;if(s===62)return r=Vi(fa(e.src.slice(n+1,a))),e.parser.validateLink(r)?(e.pos=a+1,e.linkContent=r,!0):!1;if(s===92&&a+1<u){a+=2;continue}a++}return!1}for(i=0;a<u&&(s=e.src.charCodeAt(a),!(s===32||s<32||s===127));){if(s===92&&a+1<u){a+=2;continue}if(s===40&&(i++,i>1)||s===41&&(i--,i<0))break;a++}return n===a||(r=fa(e.src.slice(n,a)),!e.parser.validateLink(r))?!1:(e.linkContent=r,e.pos=a,!0)}function zc(e,a){var s,i=a,r=e.posMax,n=e.src.charCodeAt(a);if(n!==34&&n!==39&&n!==40)return!1;for(a++,n===40&&(n=41);a<r;){if(s=e.src.charCodeAt(a),s===n)return e.pos=a+1,e.linkContent=fa(e.src.slice(i+1,a)),!0;if(s===92&&a+1<r){a+=2;continue}a++}return!1}function Hc(e){return e.trim().replace(/\s+/g," ").toUpperCase()}function V0(e,a,s,i){var r,n,u,c,d,f,o,h,l;if(e.charCodeAt(0)!==91||e.indexOf("]:")===-1||(r=new Yr(e,a,s,i,[]),n=ss(r,0),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);if(!Uc(r,u))return-1;for(o=r.linkContent,u=r.pos,f=u,u=u+1;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);for(u<c&&f!==u&&zc(r,u)?(h=r.linkContent,u=r.pos):(h="",u=f);u<c&&r.src.charCodeAt(u)===32;)u++;return u<c&&r.src.charCodeAt(u)!==10?-1:(l=Hc(e.slice(1,n)),typeof i.references[l]>"u"&&(i.references[l]={title:h,href:o}),u)}function U0(e){var a=e.tokens,s,i,r,n;if(e.env.references=e.env.references||{},!e.inlineMode){for(s=1,i=a.length-1;s<i;s++)if(a[s].type==="inline"&&a[s-1].type==="paragraph_open"&&a[s+1].type==="paragraph_close"){for(r=a[s].content;r.length&&(n=V0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[s].content=r,r.length||(a[s-1].tight=!0,a[s+1].tight=!0)}}}function z0(e){var a=e.tokens,s,i,r;for(i=0,r=a.length;i<r;i++)s=a[i],s.type==="inline"&&e.inline.parse(s.content,e.options,e.env,s.children)}function H0(e){var a,s,i,r,n,u,c,d,f,o=0,h=!1,l={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(p){return p.type==="footnote_reference_open"?(h=!0,d=[],f=p.label,!1):p.type==="footnote_reference_close"?(h=!1,l[":"+f]=d,!1):(h&&d.push(p),!h)}),!!e.env.footnotes.list)){for(u=e.env.footnotes.list,e.tokens.push({type:"footnote_block_open",level:o++}),a=0,s=u.length;a<s;a++){for(e.tokens.push({type:"footnote_open",id:a,level:o++}),u[a].tokens?(c=[],c.push({type:"paragraph_open",tight:!1,level:o++}),c.push({type:"inline",content:"",level:o,children:u[a].tokens}),c.push({type:"paragraph_close",tight:!1,level:--o})):u[a].label&&(c=l[":"+u[a].label]),e.tokens=e.tokens.concat(c),e.tokens[e.tokens.length-1].type==="paragraph_close"?n=e.tokens.pop():n=null,r=u[a].count>0?u[a].count:1,i=0;i<r;i++)e.tokens.push({type:"footnote_anchor",id:a,subId:i,level:o});n&&e.tokens.push(n),e.tokens.push({type:"footnote_close",level:--o})}e.tokens.push({type:"footnote_block_close",level:--o})}}var uu=`
|
|
99
|
+
()[]'".,!?-`;function Fn(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function W0(e){var a,s,i,r,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+uu.split("").map(Fn).join("")+"])("+Object.keys(e.env.abbreviations).map(function(y){return y.substr(1)}).sort(function(y,w){return w.length-y.length}).map(Fn).join("|")+")($|["+uu.split("").map(Fn).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,s=0,i=p.length;s<i;s++)if(p[s].type==="inline"){for(r=p[s].children,a=r.length-1;a>=0;a--)if(n=r[a],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[s].children=r=[].concat(r.slice(0,a),c,r.slice(a+1)))}}}}var G0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,J0=/\((c|tm|r|p)\)/ig,Y0={c:"©",r:"®",p:"§",tm:"™"};function Z0(e){return e.indexOf("(")<0?e:e.replace(J0,function(a,s){return Y0[s.toLowerCase()]})}function X0(e){var a,s,i,r,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(r=e.tokens[n].children,a=r.length-1;a>=0;a--)s=r[a],s.type==="text"&&(i=s.content,i=Z0(i),G0.test(i)&&(i=i.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")),s.content=i)}}var Q0=/['"]/,lu=/['"]/g,K0=/[-\s()\[\]]/,cu="’";function du(e,a){return a<0||a>=e.length?!1:!K0.test(e[a])}function ia(e,a,s){return e.substr(0,a)+s+e.substr(a+1)}function ef(e){var a,s,i,r,n,u,c,d,f,o,h,l,p,y,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,a=0;a<b.length;a++)if(s=b[a],!(s.type!=="text"||Q0.test(s.text))){for(c=b[a].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,i=s.content,n=0,u=i.length;e:for(;n<u&&(lu.lastIndex=n,r=lu.exec(i),!!r);){if(d=!du(i,r.index-1),n=r.index+1,y=r[0]==="'",f=!du(i,n),!f&&!d){y&&(s.content=ia(s.content,r.index,cu));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===y&&g[p].level===c){o=g[p],y?(b[o.token].content=ia(b[o.token].content,o.pos,e.options.quotes[2]),s.content=ia(s.content,r.index,e.options.quotes[3])):(b[o.token].content=ia(b[o.token].content,o.pos,e.options.quotes[0]),s.content=ia(s.content,r.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:a,pos:r.index,single:y,level:c}):l&&y&&(s.content=ia(s.content,r.index,cu))}}}}}var Bn=[["block",F0],["abbr",q0],["references",U0],["inline",z0],["footnote_tail",H0],["abbr2",W0],["replacements",X0],["smartquotes",ef]];function Wc(){this.options={},this.ruler=new wt;for(var e=0;e<Bn.length;e++)this.ruler.push(Bn[e][0],Bn[e][1])}Wc.prototype.process=function(e){var a,s,i;for(i=this.ruler.getRules(""),a=0,s=i.length;a<s;a++)i[a](e)};function Zr(e,a,s,i,r){var n,u,c,d,f,o,h;for(this.src=e,this.parser=a,this.options=s,this.env=i,this.tokens=r,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="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}Zr.prototype.isEmpty=function(a){return this.bMarks[a]+this.tShift[a]>=this.eMarks[a]};Zr.prototype.skipEmptyLines=function(a){for(var s=this.lineMax;a<s&&!(this.bMarks[a]+this.tShift[a]<this.eMarks[a]);a++);return a};Zr.prototype.skipSpaces=function(a){for(var s=this.src.length;a<s&&this.src.charCodeAt(a)===32;a++);return a};Zr.prototype.skipChars=function(a,s){for(var i=this.src.length;a<i&&this.src.charCodeAt(a)===s;a++);return a};Zr.prototype.skipCharsBack=function(a,s,i){if(a<=i)return a;for(;a>i;)if(s!==this.src.charCodeAt(--a))return a+1;return a};Zr.prototype.getLines=function(a,s,i,r){var n,u,c,d,f,o=a;if(a>=s)return"";if(o+1===s)return u=this.bMarks[o]+Math.min(this.tShift[o],i),c=r?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(s-a),n=0;o<s;o++,n++)f=this.tShift[o],f>i&&(f=i),f<0&&(f=0),u=this.bMarks[o]+f,o+1<s||r?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function tf(e,a,s){var i,r;if(e.tShift[a]-e.blkIndent<4)return!1;for(r=i=a+1;i<s;){if(e.isEmpty(i)){i++;continue}if(e.tShift[i]-e.blkIndent>=4){i++,r=i;continue}break}return e.line=i,e.tokens.push({type:"code",content:e.getLines(a,r,4+e.blkIndent,!0),block:!0,lines:[a,e.line],level:e.level}),!0}function rf(e,a,s,i){var r,n,u,c,d,f=!1,o=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(o+3>h||(r=e.src.charCodeAt(o),r!==126&&r!==96)||(d=o,o=e.skipChars(o,r),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(i)return!0;for(c=a;c++,!(c>=s||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===r&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,r),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[a],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(a+1,c,n,!0),lines:[a,e.line],level:e.level}),!0}function af(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(i)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[a]],e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[a]],e.tShift[a]=w-e.bMarks[a],h=e.parser.ruler.getRules("blockquote"),r=a+1;r<s&&(w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r],!(w>=b));r++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[r]),e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[r]),e.tShift[r]=w-e.bMarks[r];continue}if(n)break;for(y=!1,l=0,p=h.length;l<p;l++)if(h[l](e,r,s,!0)){y=!0;break}if(y)break;c.push(e.bMarks[r]),u.push(e.tShift[r]),e.tShift[r]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[a,0],level:e.level++}),e.parser.tokenize(e,a,r),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+a]=c[l],e.tShift[l+a]=u[l];return e.blkIndent=d,!0}function sf(e,a,s,i){var r,n,u,c=e.bMarks[a],d=e.eMarks[a];if(c+=e.tShift[a],c>d||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==r&&u!==32)return!1;u===r&&n++}return n<3?!1:(i||(e.line=a+1,e.tokens.push({type:"hr",lines:[a,e.line],level:e.level})),!0)}function fu(e,a){var s,i,r;return i=e.bMarks[a]+e.tShift[a],r=e.eMarks[a],i>=r||(s=e.src.charCodeAt(i++),s!==42&&s!==45&&s!==43)||i<r&&e.src.charCodeAt(i)!==32?-1:i}function hu(e,a){var s,i=e.bMarks[a]+e.tShift[a],r=e.eMarks[a];if(i+1>=r||(s=e.src.charCodeAt(i++),s<48||s>57))return-1;for(;;){if(i>=r)return-1;if(s=e.src.charCodeAt(i++),!(s>=48&&s<=57)){if(s===41||s===46)break;return-1}}return i<r&&e.src.charCodeAt(i)!==32?-1:i}function nf(e,a){var s,i,r=e.level+2;for(s=a+2,i=e.tokens.length-2;s<i;s++)e.tokens[s].level===r&&e.tokens[s].type==="paragraph_open"&&(e.tokens[s+2].tight=!0,e.tokens[s].tight=!0,s+=2)}function of(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w,b,g,v,N,j,x,m=!0,k,_,E,D;if((h=hu(e,a))>=0)b=!0;else if((h=fu(e,a))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),i)return!0;for(v=e.tokens.length,b?(o=e.bMarks[a]+e.tShift[a],y=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:y,lines:j=[a,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:j=[a,0],level:e.level++}),r=a,N=!1,k=e.parser.ruler.getRules("list");r<s&&(g=e.skipSpaces(h),l=e.eMarks[r],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[r]+p,e.tokens.push({type:"list_item_open",lines:x=[a,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[a],f=e.parentType,e.tShift[a]=g-e.bMarks[a],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,a,s,!0),(!e.tight||N)&&(m=!1),N=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[a]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),r=a=e.line,x[1]=r,g=e.bMarks[a],!(r>=s||e.isEmpty(r)||e.tShift[r]<e.blkIndent));){for(D=!1,_=0,E=k.length;_<E;_++)if(k[_](e,r,s,!0)){D=!0;break}if(D)break;if(b){if(h=hu(e,r),h<0)break}else if(h=fu(e,r),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),j[1]=r,e.line=r,m&&nf(e,v),!0}function uf(e,a,s,i){var r,n,u,c,d,f=e.bMarks[a]+e.tShift[a],o=e.eMarks[a];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(i||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),r=e.bMarks[a],n=e.tShift[a],u=e.parentType,e.tShift[a]=e.skipSpaces(c)-c,e.bMarks[a]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[a]<e.blkIndent&&(e.tShift[a]+=e.blkIndent,e.bMarks[a]-=e.blkIndent),e.parser.tokenize(e,a,s,!0),e.parentType=u,e.blkIndent-=4,e.tShift[a]=n,e.bMarks[a]=r,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function lf(e,a,s,i){var r,n,u,c=e.bMarks[a]+e.tShift[a],d=e.eMarks[a];if(c>=d||(r=e.src.charCodeAt(c),r!==35||c>=d))return!1;for(n=1,r=e.src.charCodeAt(++c);r===35&&c<d&&n<=6;)n++,r=e.src.charCodeAt(++c);return n>6||c<d&&r!==32?!1:(i||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=a+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[a,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function cf(e,a,s){var i,r,n,u=a+1;return u>=s||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(r=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],r>=n)||(i=e.src.charCodeAt(r),i!==45&&i!==61)||(r=e.skipChars(r,i),r=e.skipSpaces(r),r<n)?!1:(r=e.bMarks[a]+e.tShift[a],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:i===61?1:2,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(r,e.eMarks[a]).trim(),level:e.level+1,lines:[a,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:i===61?1:2,level:e.level}),!0)}var Gc={};["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(e){Gc[e]=!0});var df=/^<([a-zA-Z]{1,15})[\s\/>]/,ff=/^<\/([a-zA-Z]{1,15})[\s>]/;function hf(e){var a=e|32;return a>=97&&a<=122}function pf(e,a,s,i){var r,n,u,c=e.bMarks[a],d=e.eMarks[a],f=e.tShift[a];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(r=e.src.charCodeAt(c+1),r===33||r===63){if(i)return!0}else if(r===47||hf(r)){if(r===47){if(n=e.src.slice(c,d).match(ff),!n)return!1}else if(n=e.src.slice(c,d).match(df),!n)return!1;if(Gc[n[1].toLowerCase()]!==!0)return!1;if(i)return!0}else return!1;for(u=a+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[a,e.line],content:e.getLines(a,u,0,!0)}),!0}function qn(e,a){var s=e.bMarks[a]+e.blkIndent,i=e.eMarks[a];return e.src.substr(s,i-s)}function mf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y;if(a+2>s||(d=a+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(r=e.src.charCodeAt(u),r!==124&&r!==45&&r!==58)||(n=qn(e,a+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=qn(e,a).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(i)return!0;for(e.tokens.push({type:"table_open",lines:p=[a,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[a,a+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[a,a+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[a,a+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[a,a+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:y=[a+2,0],level:e.level++}),d=a+2;d<s&&!(e.tShift[d]<e.blkIndent||(n=qn(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=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(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=y[1]=d,e.line=d,!0}function Cs(e,a){var s,i,r=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];return r>=n||(i=e.src.charCodeAt(r++),i!==126&&i!==58)||(s=e.skipSpaces(r),r===s)||s>=n?-1:s}function gf(e,a){var s,i,r=e.level+2;for(s=a+2,i=e.tokens.length-2;s<i;s++)e.tokens[s].level===r&&e.tokens[s].type==="paragraph_open"&&(e.tokens[s+2].tight=!0,e.tokens[s].tight=!0,s+=2)}function bf(e,a,s,i){var r,n,u,c,d,f,o,h,l,p,y,w,b,g;if(i)return e.ddIndent<0?!1:Cs(e,a)>=0;if(o=a+1,e.isEmpty(o)&&++o>s||e.tShift[o]<e.blkIndent||(r=Cs(e,o),r<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[a,0],level:e.level++}),u=a,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,y=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=r-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,s,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=y,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=s||e.tShift[o]<e.blkIndent)break e;if(r=Cs(e,o),r<0)break;n=o}if(o>=s||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=s)||(e.isEmpty(n)&&n++,n>=s)||e.tShift[n]<e.blkIndent||(r=Cs(e,n),r<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&gf(e,f),!0}function xf(e,a){var s,i,r,n,u,c=a+1,d;if(s=e.lineMax,c<s&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<s&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(r=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,s,!0)){r=!0;break}if(r)break}}return i=e.getLines(a,c,e.blkIndent,!1).trim(),e.line=c,i.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:i,level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var Ds=[["code",tf],["fences",rf,["paragraph","blockquote","list"]],["blockquote",af,["paragraph","blockquote","list"]],["hr",sf,["paragraph","blockquote","list"]],["list",of,["paragraph","blockquote"]],["footnote",uf,["paragraph"]],["heading",lf,["paragraph","blockquote"]],["lheading",cf],["htmlblock",pf,["paragraph","blockquote"]],["table",mf,["paragraph"]],["deflist",bf,["paragraph"]],["paragraph",xf]];function Ki(){this.ruler=new wt;for(var e=0;e<Ds.length;e++)this.ruler.push(Ds[e][0],Ds[e][1],{alt:(Ds[e][2]||[]).slice()})}Ki.prototype.tokenize=function(e,a,s){for(var i=this.ruler.getRules(""),r=i.length,n=a,u=!1,c,d;n<s&&(e.line=n=e.skipEmptyLines(n),!(n>=s||e.tShift[n]<e.blkIndent));){for(d=0;d<r&&(c=i[d](e,n,s,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<s&&e.isEmpty(n)){if(u=!0,n++,n<s&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var yf=/[\n\t]/g,vf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,wf=/\u00a0/g;Ki.prototype.parse=function(e,a,s,i){var r,n=0,u=0;if(!e)return[];e=e.replace(wf," "),e=e.replace(vf,`
|
|
100
|
+
`),e.indexOf(" ")>=0&&(e=e.replace(yf,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),r=new Zr(e,this,a,s,i),this.tokenize(r,r.line,r.lineMax)};function Nf(e){switch(e){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 jf(e,a){for(var s=e.pos;s<e.posMax&&!Nf(e.src.charCodeAt(s));)s++;return s===e.pos?!1:(a||(e.pending+=e.src.slice(e.pos,s)),e.pos=s,!0)}function kf(e,a){var s,i,r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;if(s=e.pending.length-1,i=e.posMax,!a)if(s>=0&&e.pending.charCodeAt(s)===32)if(s>=1&&e.pending.charCodeAt(s-1)===32){for(var n=s-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(r++;r<i&&e.src.charCodeAt(r)===32;)r++;return e.pos=r,!0}var eo=[];for(var pu=0;pu<256;pu++)eo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){eo[e.charCodeAt(0)]=1});function _f(e,a){var s,i=e.pos,r=e.posMax;if(e.src.charCodeAt(i)!==92)return!1;if(i++,i<r){if(s=e.src.charCodeAt(i),s<256&&eo[s]!==0)return a||(e.pending+=e.src[i]),e.pos+=2,!0;if(s===10){for(a||e.push({type:"hardbreak",level:e.level}),i++;i<r&&e.src.charCodeAt(i)===32;)i++;return e.pos=i,!0}}return a||(e.pending+="\\"),e.pos++,!0}function Ef(e,a){var s,i,r,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(s=c,c++,i=e.posMax;c<i&&e.src.charCodeAt(c)===96;)c++;for(r=e.src.slice(s,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<i&&e.src.charCodeAt(u)===96;)u++;if(u-n===r.length)return a||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return a||(e.pending+=r),e.pos+=r.length,!0}function Af(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||a||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===126;)i++;if(i>u+3)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function Sf(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||a||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===43;)i++;if(i!==u+2)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function Cf(e,a){var s,i,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||a||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(i=u+2;i<n&&e.src.charCodeAt(i)===61;)i++;if(i!==u+2)return e.pos+=i-u,a||(e.pending+=e.src.slice(u,i)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){s=!0;break}e.parser.skipToken(e)}return s?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function mu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function gu(e,a){var s=a,i,r,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(a);for(i=a>0?e.src.charCodeAt(a-1):-1;s<d&&e.src.charCodeAt(s)===f;)s++;return s>=d&&(u=!1),n=s-a,n>=4?u=c=!1:(r=s<d?e.src.charCodeAt(s):-1,(r===32||r===10)&&(u=!1),(i===32||i===10)&&(c=!1),f===95&&(mu(i)&&(u=!1),mu(r)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function Df(e,a){var s,i,r,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||a)return!1;if(d=gu(e,o),s=d.delims,!d.can_open)return e.pos+=s,a||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+s,c=[s];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=gu(e,e.pos),i=d.delims,d.can_close){for(n=c.pop(),u=i;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){s=n,r=!0;break}e.pos+=i;continue}d.can_open&&c.push(i),e.pos+=i;continue}e.parser.skipToken(e)}return r?(e.posMax=e.pos,e.pos=o+s,a||((s===2||s===3)&&e.push({type:"strong_open",level:e.level++}),(s===1||s===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(s===1||s===3)&&e.push({type:"em_close",level:--e.level}),(s===2||s===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+s,e.posMax=f,!0):(e.pos=o,!1)}var Tf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function Of(e,a){var s,i,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){s=!0;break}e.parser.skipToken(e)}return!s||n+1===e.pos||(i=e.src.slice(n+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sub",level:e.level,content:i.replace(Tf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}var Pf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function Lf(e,a){var s,i,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.parser.skipToken(e)}return!s||n+1===e.pos||(i=e.src.slice(n+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sup",level:e.level,content:i.replace(Pf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}function Mf(e,a){var s,i,r,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,y=e.src.charCodeAt(p);if(y===33&&(o=!0,y=e.src.charCodeAt(++p)),y!==91||e.level>=e.options.maxNesting||(s=p+1,i=ss(e,p),i<0))return!1;if(c=i+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Uc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&zc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=ss(e,c),c>=0?r=e.src.slice(p,c++):c=p-1),r||(typeof r>"u"&&(c=i+1),r=e.src.slice(s,i)),d=e.env.references[Hc(r)],!d)return e.pos=h,!1;n=d.href,u=d.title}return a||(e.pos=s,e.posMax=i,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(s,i-s),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function $f(e,a){var s,i,r,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(s=c+2,i=ss(e,c+1),i<0)?!1:(a||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=s,e.posMax=i,e.push({type:"footnote_ref",id:r,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=i+1,e.posMax=u,!0)}function Rf(e,a){var s,i,r,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(i=c+2;i<u;i++){if(e.src.charCodeAt(i)===32||e.src.charCodeAt(i)===10)return!1;if(e.src.charCodeAt(i)===93)break}return i===c+2||i>=u||(i++,s=e.src.slice(c+2,i-1),typeof e.env.footnotes.refs[":"+s]>"u")?!1:(a||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+s]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:s,count:0},e.env.footnotes.refs[":"+s]=r):r=e.env.footnotes.refs[":"+s],n=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push({type:"footnote_ref",id:r,subId:n,level:e.level})),e.pos=i,e.posMax=u,!0)}var If=["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"],Ff=/^<([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])?)*)>/,Bf=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function qf(e,a){var s,i,r,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(s=e.src.slice(c),s.indexOf(">")<0)?!1:(i=s.match(Bf),i?If.indexOf(i[1].toLowerCase())<0||(n=i[0].slice(1,-1),u=Vi(n),!e.parser.validateLink(n))?!1:(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=i[0].length,!0):(r=s.match(Ff),r?(n=r[0].slice(1,-1),u=Vi("mailto:"+n),e.parser.validateLink(u)?(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=r[0].length,!0):!1):!1))}function gn(e,a){return e=e.source,a=a||"",function s(i,r){return i?(r=r.source||r,e=e.replace(i,r),s):new RegExp(e,a)}}var Vf=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,Uf=/[^"'=<>`\x00-\x20]+/,zf=/'[^']*'/,Hf=/"[^"]*"/,Wf=gn(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",Uf)("single_quoted",zf)("double_quoted",Hf)(),Gf=gn(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Vf)("attr_value",Wf)(),Jf=gn(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Gf)(),Yf=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,Zf=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Xf=/<[?].*?[?]>/,Qf=/<![A-Z]+\s+[^>]*>/,Kf=/<!\[CDATA\[[\s\S]*?\]\]>/,eh=gn(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Jf)("close_tag",Yf)("comment",Zf)("processing",Xf)("declaration",Qf)("cdata",Kf)();function th(e){var a=e|32;return a>=97&&a<=122}function rh(e,a){var s,i,r,n=e.pos;return!e.options.html||(r=e.posMax,e.src.charCodeAt(n)!==60||n+2>=r)||(s=e.src.charCodeAt(n+1),s!==33&&s!==63&&s!==47&&!th(s))||(i=e.src.slice(n).match(eh),!i)?!1:(a||e.push({type:"htmltag",content:e.src.slice(n,n+i[0].length),level:e.level}),e.pos+=i[0].length,!0)}var ah=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,sh=/^&([a-z][a-z0-9]{1,31});/i;function nh(e,a){var s,i,r,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(s=e.src.charCodeAt(n+1),s===35){if(r=e.src.slice(n).match(ah),r)return a||(i=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),e.pending+=Xi(i)?nn(i):nn(65533)),e.pos+=r[0].length,!0}else if(r=e.src.slice(n).match(sh),r){var c=Bc(r[1]);if(r[1]!==c)return a||(e.pending+=c),e.pos+=r[0].length,!0}}return a||(e.pending+="&"),e.pos++,!0}var Vn=[["text",jf],["newline",kf],["escape",_f],["backticks",Ef],["del",Af],["ins",Sf],["mark",Cf],["emphasis",Df],["sub",Of],["sup",Lf],["links",Mf],["footnote_inline",$f],["footnote_ref",Rf],["autolink",qf],["htmltag",rh],["entity",nh]];function bn(){this.ruler=new wt;for(var e=0;e<Vn.length;e++)this.ruler.push(Vn[e][0],Vn[e][1]);this.validateLink=ih}bn.prototype.skipToken=function(e){var a=this.ruler.getRules(""),s=a.length,i=e.pos,r,n;if((n=e.cacheGet(i))>0){e.pos=n;return}for(r=0;r<s;r++)if(a[r](e,!0)){e.cacheSet(i,e.pos);return}e.pos++,e.cacheSet(i,e.pos)};bn.prototype.tokenize=function(e){for(var a=this.ruler.getRules(""),s=a.length,i=e.posMax,r,n;e.pos<i;){for(n=0;n<s&&(r=a[n](e,!1),!r);n++);if(r){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};bn.prototype.parse=function(e,a,s,i){var r=new Yr(e,this,a,s,i);this.tokenize(r)};function ih(e){var a=["vbscript","javascript","file","data"],s=e.trim().toLowerCase();return s=jr(s),!(s.indexOf(":")!==-1&&a.indexOf(s.split(":")[0])!==-1)}var oh={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"]}}},uh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},lh={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"]}}},ch={default:oh,full:uh,commonmark:lh};function Jc(e,a,s){this.src=a,this.env=s,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function _r(e,a){typeof e!="string"&&(a=e,e="default"),a&&a.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
|
|
101
101
|
|
|
102
102
|
import Remarkable from 'remarkable';
|
|
103
103
|
import linkify from 'remarkable/linkify';
|
|
104
104
|
new Remarkable().use(linkify)
|
|
105
|
-
`),this.inline=new bn,this.block=new Ki,this.core=new Wc,this.renderer=new Qi,this.ruler=new wt,this.options={},this.configure(
|
|
105
|
+
`),this.inline=new bn,this.block=new Ki,this.core=new Wc,this.renderer=new Qi,this.ruler=new wt,this.options={},this.configure(ch[e]),this.set(a||{})}_r.prototype.set=function(e){Zi(this.options,e)};_r.prototype.configure=function(e){var a=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&a.set(e.options),e.components&&Object.keys(e.components).forEach(function(s){e.components[s].rules&&a[s].ruler.enable(e.components[s].rules,!0)})};_r.prototype.use=function(e,a){return e(this,a),this};_r.prototype.parse=function(e,a){var s=new Jc(this,e,a);return this.core.process(s),s.tokens};_r.prototype.render=function(e,a){return a=a||{},this.renderer.render(this.parse(e,a),this.options,a)};_r.prototype.parseInline=function(e,a){var s=new Jc(this,e,a);return s.inlineMode=!0,this.core.process(s),s.tokens};_r.prototype.renderInline=function(e,a){return a=a||{},this.renderer.render(this.parseInline(e,a),this.options,a)};const dh=Object.freeze(Object.defineProperty({__proto__:null,Remarkable:_r,utils:I0},Symbol.toStringTag,{value:"Module"})),fh=Ji(dh);var nr={},vr={};function hh(e,a){var s=Object.setPrototypeOf;s?s(e,a):e.__proto__=a}function Yc(e,a){a===void 0&&(a=e.constructor);var s=Error.captureStackTrace;s&&s(e,a)}var ph=(function(){var e=function(s,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])},e(s,i)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(a,s);function i(){this.constructor=a}a.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}})(),mh=(function(e){ph(a,e);function a(s,i){var r=this.constructor,n=e.call(this,s,i)||this;return Object.defineProperty(n,"name",{value:r.name,enumerable:!1,configurable:!0}),hh(n,r.prototype),Yc(n),n}return a})(Error),gh=function(e,a,s){if(s||arguments.length===2)for(var i=0,r=a.length,n;i<r;i++)(n||!(i in a))&&(n||(n=Array.prototype.slice.call(a,0,i)),n[i]=a[i]);return e.concat(n||Array.prototype.slice.call(a))};function bh(e,a){a===void 0&&(a=Error);function s(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];if(!(this instanceof s))return new(s.bind.apply(s,gh([void 0],i,!1)));a.apply(this,i),Object.defineProperty(this,"name",{value:e.name||a.name,enumerable:!1,configurable:!0}),e.apply(this,i),Yc(this,s)}return Object.defineProperties(s,{prototype:{value:Object.create(a.prototype,{constructor:{value:s,writable:!0,configurable:!0}})}})}const xh=Object.freeze(Object.defineProperty({__proto__:null,CustomError:mh,customErrorFactory:bh},Symbol.toStringTag,{value:"Module"})),yh=Ji(xh);var Un={};const vh={},wh=Object.freeze(Object.defineProperty({__proto__:null,default:vh},Symbol.toStringTag,{value:"Module"})),mt=Ji(wh);var zn,bu;function Nh(){if(bu)return zn;bu=1;const e=mt,a=/\s+at.*(?:\(|\s)(.*)\)?/,s=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,i=typeof e.homedir>"u"?"":e.homedir();return zn=(r,n)=>(n=Object.assign({pretty:!1},n),r.replace(/\\/g,"/").split(`
|
|
106
106
|
`).filter(u=>{const c=u.match(a);if(c===null||!c[1])return!0;const d=c[1];return d.includes(".app/Contents/Resources/electron.asar")||d.includes(".app/Contents/Resources/default_app.asar")?!1:!s.test(d)}).filter(u=>u.trim()!=="").map(u=>n.pretty?u.replace(a,(c,d)=>c.replace(d,d.replace(i,"~"))):u).join(`
|
|
107
|
-
`)),zn}var Hn,xu;function Zc(){if(xu)return Hn;xu=1;var e=function(v){return a(v)&&!s(v)};function a(g){return!!g&&typeof g=="object"}function s(g){var v=Object.prototype.toString.call(g);return v==="[object RegExp]"||v==="[object Date]"||n(g)}var i=typeof Symbol=="function"&&Symbol.for,r=i?Symbol.for("react.element"):60103;function n(g){return g.$$typeof===r}function u(g){return Array.isArray(g)?[]:{}}function c(g,v){return v.clone!==!1&&v.isMergeableObject(g)?w(u(g),g,v):g}function d(g,v,N){return g.concat(v).map(function(j){return c(j,N)})}function f(g,v){if(!v.customMerge)return w;var N=v.customMerge(g);return typeof N=="function"?N:w}function o(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(v){return Object.propertyIsEnumerable.call(g,v)}):[]}function h(g){return Object.keys(g).concat(o(g))}function l(g,v){try{return v in g}catch{return!1}}function p(g,v){return l(g,v)&&!(Object.hasOwnProperty.call(g,v)&&Object.propertyIsEnumerable.call(g,v))}function y(g,v,N){var j={};return N.isMergeableObject(g)&&h(g).forEach(function(x){j[x]=c(g[x],N)}),h(v).forEach(function(x){p(g,x)||(l(g,x)&&N.isMergeableObject(v[x])?j[x]=f(x,N)(g[x],v[x],N):j[x]=c(v[x],N))}),j}function w(g,v,N){N=N||{},N.arrayMerge=N.arrayMerge||d,N.isMergeableObject=N.isMergeableObject||e,N.cloneUnlessOtherwiseSpecified=c;var j=Array.isArray(v),x=Array.isArray(g),m=j===x;return m?j?N.arrayMerge(g,v,N):y(g,v,N):c(v,N)}w.all=function(v,N){if(!Array.isArray(v))throw new Error("first argument should be an array");return v.reduce(function(j,x){return w(j,x,N)},{})};var b=w;return Hn=b,Hn}var Wn={},yu;function Ui(){return yu||(yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.DEFAULT={cleanStack:!0}})(e.Options||(e.Options={}))})(Wn)),Wn}var vu;function wu(){return vu||(vu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var a=
|
|
108
|
-
Caused by: `+(f.stack||f));function l(p){return a(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}r.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?s(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Un)),Un}var Nu;function xn(){if(Nu)return vr;Nu=1;var e=vr&&vr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(vr,"__esModule",{value:!0});var a=vh,s=wu(),i=Ui(),r=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=i.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=s.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(a.CustomError);vr.default=r;var n=wu();vr.ChainedErrorFactory=n.ChainedErrorFactory;var u=Ui();return vr.Options=u.Options,vr}var ju;function kh(){if(ju)return nr;ju=1;var e=nr&&nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.SecurityError=nr.SecurityChecker=void 0;const a=e(xn());let s=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new i("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};nr.SecurityChecker=s;class i extends a.default{constructor(n,u){super(n,u)}}return nr.SecurityError=i,nr}var lt={},za={},ir={},Rr={},ku;function yn(){if(ku)return Rr;ku=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function a(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function s(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var i=a({HTML:"text/html",isHTML:function(n){return n===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Rr.assign=s,Rr.find=e,Rr.freeze=a,Rr.MIME_TYPE=i,Rr.NAMESPACE=r,Rr}var _u;function Xc(){if(_u)return ir;_u=1;var e=yn(),a=e.find,s=e.NAMESPACE;function i(A){return A!==""}function r(A){return A?A.split(/[\t\n\f\r ]+/).filter(i):[]}function n(A,S){return A.hasOwnProperty(S)||(A[S]=!0),A}function u(A){if(!A)return[];var S=r(A);return Object.keys(S.reduce(n,{}))}function c(A){return function(S){return A&&A.indexOf(S)!==-1}}function d(A,S){for(var $ in A)Object.prototype.hasOwnProperty.call(A,$)&&(S[$]=A[$])}function f(A,S){var $=A.prototype;if(!($ instanceof S)){let W=function(){};W.prototype=S.prototype,W=new W,d($,W),A.prototype=$=W}$.constructor!=A&&(typeof A!="function"&&console.error("unknown Class:"+A),$.constructor=A)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,y=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,N=o.DOCUMENT_NODE=9,j=o.DOCUMENT_TYPE_NODE=10,x=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,k={},_={};k.INDEX_SIZE_ERR=(_[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2);var E=k.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3);k.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7);var D=k.NOT_FOUND_ERR=(_[8]="Not found",8);k.NOT_SUPPORTED_ERR=(_[9]="Not supported",9);var C=k.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10);k.INVALID_STATE_ERR=(_[11]="Invalid state",11),k.SYNTAX_ERR=(_[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),k.NAMESPACE_ERR=(_[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function P(A,S){if(S instanceof Error)var $=S;else $=this,Error.call(this,_[A]),this.message=_[A],Error.captureStackTrace&&Error.captureStackTrace(this,P);return $.code=A,S&&(this.message=this.message+": "+S),$}P.prototype=Error.prototype,d(k,P);function L(){}L.prototype={length:0,item:function(A){return A>=0&&A<this.length?this[A]:null},toString:function(A,S){for(var $=[],W=0;W<this.length;W++)$t(this[W],$,A,S);return $.join("")},filter:function(A){return Array.prototype.filter.call(this,A)},indexOf:function(A){return Array.prototype.indexOf.call(this,A)}};function H(A,S){this._node=A,this._refresh=S,F(this)}function F(A){var S=A._node._inc||A._node.ownerDocument._inc;if(A._inc!==S){var $=A._refresh(A._node);if(Ar(A,"length",$.length),!A.$$length||$.length<A.$$length)for(var W=$.length;W in A;W++)Object.prototype.hasOwnProperty.call(A,W)&&delete A[W];d($,A),A._inc=S}}H.prototype.item=function(A){return F(this),this[A]||null},f(H,L);function q(){}function M(A,S){for(var $=A.length;$--;)if(A[$]===S)return $}function G(A,S,$,W){if(W?S[M(S,W)]=$:S[S.length++]=$,A){$.ownerElement=A;var se=A.ownerDocument;se&&(W&&ue(se,A,W),J(se,A,$))}}function X(A,S,$){var W=M(S,$);if(W>=0){for(var se=S.length-1;W<se;)S[W]=S[++W];if(S.length=se,A){var pe=A.ownerDocument;pe&&(ue(pe,A,$),$.ownerElement=null)}}else throw new P(D,new Error(A.tagName+"@"+$))}q.prototype={length:0,item:L.prototype.item,getNamedItem:function(A){for(var S=this.length;S--;){var $=this[S];if($.nodeName==A)return $}},setNamedItem:function(A){var S=A.ownerElement;if(S&&S!=this._ownerElement)throw new P(C);var $=this.getNamedItem(A.nodeName);return G(this._ownerElement,this,A,$),$},setNamedItemNS:function(A){var S=A.ownerElement,$;if(S&&S!=this._ownerElement)throw new P(C);return $=this.getNamedItemNS(A.namespaceURI,A.localName),G(this._ownerElement,this,A,$),$},removeNamedItem:function(A){var S=this.getNamedItem(A);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(A,S){var $=this.getNamedItemNS(A,S);return X(this._ownerElement,this,$),$},getNamedItemNS:function(A,S){for(var $=this.length;$--;){var W=this[$];if(W.localName==S&&W.namespaceURI==A)return W}return null}};function ee(){}ee.prototype={hasFeature:function(A,S){return!0},createDocument:function(A,S,$){var W=new V;if(W.implementation=this,W.childNodes=new L,W.doctype=$||null,$&&W.appendChild($),S){var se=W.createElementNS(A,S);W.appendChild(se)}return W},createDocumentType:function(A,S,$){var W=new et;return W.name=A,W.nodeName=A,W.publicId=S||"",W.systemId=$||"",W}};function R(){}R.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(A,S){return Ke(this,A,S)},replaceChild:function(A,S){Ke(this,A,S,ge),S&&this.removeChild(S)},removeChild:function(A){return te(this,A)},appendChild:function(A){return this.insertBefore(A,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(A){return gt(this.ownerDocument||this,this,A)},normalize:function(){for(var A=this.firstChild;A;){var S=A.nextSibling;S&&S.nodeType==p&&A.nodeType==p?(this.removeChild(S),A.appendData(S.data)):(A.normalize(),A=S)}},isSupported:function(A,S){return this.ownerDocument.implementation.hasFeature(A,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(A){for(var S=this;S;){var $=S._nsMap;if($){for(var W in $)if(Object.prototype.hasOwnProperty.call($,W)&&$[W]===A)return W}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(A){for(var S=this;S;){var $=S._nsMap;if($&&Object.prototype.hasOwnProperty.call($,A))return $[A];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(A){var S=this.lookupPrefix(A);return S==null}};function ie(A){return A=="<"&&"<"||A==">"&&">"||A=="&"&&"&"||A=='"'&&"""||"&#"+A.charCodeAt()+";"}d(o,R),d(o,R.prototype);function I(A,S){if(S(A))return!0;if(A=A.firstChild)do if(I(A,S))return!0;while(A=A.nextSibling)}function V(){this.ownerDocument=this}function J(A,S,$){A&&A._inc++;var W=$.namespaceURI;W===s.XMLNS&&(S._nsMap[$.prefix?$.localName:""]=$.value)}function ue(A,S,$,W){A&&A._inc++;var se=$.namespaceURI;se===s.XMLNS&&delete S._nsMap[$.prefix?$.localName:""]}function Q(A,S,$){if(A&&A._inc){A._inc++;var W=S.childNodes;if($)W[W.length++]=$;else{for(var se=S.firstChild,pe=0;se;)W[pe++]=se,se=se.nextSibling;W.length=pe,delete W[W.length]}}}function te(A,S){var $=S.previousSibling,W=S.nextSibling;return $?$.nextSibling=W:A.firstChild=W,W?W.previousSibling=$:A.lastChild=$,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,Q(A.ownerDocument,A),S}function me(A){return A&&(A.nodeType===R.DOCUMENT_NODE||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.ELEMENT_NODE)}function Se(A){return A&&(ae(A)||re(A)||Z(A)||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.COMMENT_NODE||A.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Z(A){return A&&A.nodeType===R.DOCUMENT_TYPE_NODE}function ae(A){return A&&A.nodeType===R.ELEMENT_NODE}function re(A){return A&&A.nodeType===R.TEXT_NODE}function de(A,S){var $=A.childNodes||[];if(a($,ae)||Z(S))return!1;var W=a($,Z);return!(S&&W&&$.indexOf(W)>$.indexOf(S))}function ye(A,S){var $=A.childNodes||[];function W(pe){return ae(pe)&&pe!==S}if(a($,W))return!1;var se=a($,Z);return!(S&&se&&$.indexOf(se)>$.indexOf(S))}function be(A,S,$){if(!me(A))throw new P(E,"Unexpected parent node type "+A.nodeType);if($&&$.parentNode!==A)throw new P(D,"child not in parent");if(!Se(S)||Z(S)&&A.nodeType!==R.DOCUMENT_NODE)throw new P(E,"Unexpected node type "+S.nodeType+" for parent node type "+A.nodeType)}function _e(A,S,$){var W=A.childNodes||[],se=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var pe=se.filter(ae);if(pe.length>1||a(se,re))throw new P(E,"More than one element or text in fragment");if(pe.length===1&&!de(A,$))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!de(A,$))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,Z))throw new P(E,"Only one doctype is allowed");var Ee=a(W,ae);if($&&W.indexOf(Ee)<W.indexOf($))throw new P(E,"Doctype can only be inserted before an element");if(!$&&Ee)throw new P(E,"Doctype can not be appended since element is present")}}function ge(A,S,$){var W=A.childNodes||[],se=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var pe=se.filter(ae);if(pe.length>1||a(se,re))throw new P(E,"More than one element or text in fragment");if(pe.length===1&&!ye(A,$))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!ye(A,$))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,function(bt){return Z(bt)&&bt!==$}))throw new P(E,"Only one doctype is allowed");var Ee=a(W,ae);if($&&W.indexOf(Ee)<W.indexOf($))throw new P(E,"Doctype can only be inserted before an element")}}function Ke(A,S,$,W){be(A,S,$),A.nodeType===R.DOCUMENT_NODE&&(W||_e)(A,S,$);var se=S.parentNode;if(se&&se.removeChild(S),S.nodeType===x){var pe=S.firstChild;if(pe==null)return S;var Ee=S.lastChild}else pe=Ee=S;var Te=$?$.previousSibling:A.lastChild;pe.previousSibling=Te,Ee.nextSibling=$,Te?Te.nextSibling=pe:A.firstChild=pe,$==null?A.lastChild=Ee:$.previousSibling=Ee;do pe.parentNode=A;while(pe!==Ee&&(pe=pe.nextSibling));return Q(A.ownerDocument||A,A),S.nodeType==x&&(S.firstChild=S.lastChild=null),S}function je(A,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=A,S.previousSibling=A.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:A.firstChild=S,A.lastChild=S,Q(A.ownerDocument,A,S),S}V.prototype={nodeName:"#document",nodeType:N,doctype:null,documentElement:null,_inc:1,insertBefore:function(A,S){if(A.nodeType==x){for(var $=A.firstChild;$;){var W=$.nextSibling;this.insertBefore($,S),$=W}return A}return Ke(this,A,S),A.ownerDocument=this,this.documentElement===null&&A.nodeType===h&&(this.documentElement=A),A},removeChild:function(A){return this.documentElement==A&&(this.documentElement=null),te(this,A)},replaceChild:function(A,S){Ke(this,A,S,ge),A.ownerDocument=this,S&&this.removeChild(S),ae(A)&&(this.documentElement=A)},importNode:function(A,S){return Kr(this,A,S)},getElementById:function(A){var S=null;return I(this.documentElement,function($){if($.nodeType==h&&$.getAttribute("id")==A)return S=$,!0}),S},getElementsByClassName:function(A){var S=u(A);return new H(this,function($){var W=[];return S.length>0&&I($.documentElement,function(se){if(se!==$&&se.nodeType===h){var pe=se.getAttribute("class");if(pe){var Ee=A===pe;if(!Ee){var Te=u(pe);Ee=S.every(c(Te))}Ee&&W.push(se)}}}),W})},createElement:function(A){var S=new he;S.ownerDocument=this,S.nodeName=A,S.tagName=A,S.localName=A,S.childNodes=new L;var $=S.attributes=new q;return $._ownerElement=S,S},createDocumentFragment:function(){var A=new Lt;return A.ownerDocument=this,A.childNodes=new L,A},createTextNode:function(A){var S=new ze;return S.ownerDocument=this,S.appendData(A),S},createComment:function(A){var S=new Pt;return S.ownerDocument=this,S.appendData(A),S},createCDATASection:function(A){var S=new er;return S.ownerDocument=this,S.appendData(A),S},createProcessingInstruction:function(A,S){var $=new Nt;return $.ownerDocument=this,$.tagName=$.nodeName=$.target=A,$.nodeValue=$.data=S,$},createAttribute:function(A){var S=new Ce;return S.ownerDocument=this,S.name=A,S.nodeName=A,S.localName=A,S.specified=!0,S},createEntityReference:function(A){var S=new at;return S.ownerDocument=this,S.nodeName=A,S},createElementNS:function(A,S){var $=new he,W=S.split(":"),se=$.attributes=new q;return $.childNodes=new L,$.ownerDocument=this,$.nodeName=S,$.tagName=S,$.namespaceURI=A,W.length==2?($.prefix=W[0],$.localName=W[1]):$.localName=S,se._ownerElement=$,$},createAttributeNS:function(A,S){var $=new Ce,W=S.split(":");return $.ownerDocument=this,$.nodeName=S,$.name=S,$.namespaceURI=A,$.specified=!0,W.length==2?($.prefix=W[0],$.localName=W[1]):$.localName=S,$}},f(V,R);function he(){this._nsMap={}}he.prototype={nodeType:h,hasAttribute:function(A){return this.getAttributeNode(A)!=null},getAttribute:function(A){var S=this.getAttributeNode(A);return S&&S.value||""},getAttributeNode:function(A){return this.attributes.getNamedItem(A)},setAttribute:function(A,S){var $=this.ownerDocument.createAttribute(A);$.value=$.nodeValue=""+S,this.setAttributeNode($)},removeAttribute:function(A){var S=this.getAttributeNode(A);S&&this.removeAttributeNode(S)},appendChild:function(A){return A.nodeType===x?this.insertBefore(A,null):je(this,A)},setAttributeNode:function(A){return this.attributes.setNamedItem(A)},setAttributeNodeNS:function(A){return this.attributes.setNamedItemNS(A)},removeAttributeNode:function(A){return this.attributes.removeNamedItem(A.nodeName)},removeAttributeNS:function(A,S){var $=this.getAttributeNodeNS(A,S);$&&this.removeAttributeNode($)},hasAttributeNS:function(A,S){return this.getAttributeNodeNS(A,S)!=null},getAttributeNS:function(A,S){var $=this.getAttributeNodeNS(A,S);return $&&$.value||""},setAttributeNS:function(A,S,$){var W=this.ownerDocument.createAttributeNS(A,S);W.value=W.nodeValue=""+$,this.setAttributeNode(W)},getAttributeNodeNS:function(A,S){return this.attributes.getNamedItemNS(A,S)},getElementsByTagName:function(A){return new H(this,function(S){var $=[];return I(S,function(W){W!==S&&W.nodeType==h&&(A==="*"||W.tagName==A)&&$.push(W)}),$})},getElementsByTagNameNS:function(A,S){return new H(this,function($){var W=[];return I($,function(se){se!==$&&se.nodeType===h&&(A==="*"||se.namespaceURI===A)&&(S==="*"||se.localName==S)&&W.push(se)}),W})}},V.prototype.getElementsByTagName=he.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=he.prototype.getElementsByTagNameNS,f(he,R);function Ce(){}Ce.prototype.nodeType=l,f(Ce,R);function Me(){}Me.prototype={data:"",substringData:function(A,S){return this.data.substring(A,A+S)},appendData:function(A){A=this.data+A,this.nodeValue=this.data=A,this.length=A.length},insertData:function(A,S){this.replaceData(A,0,S)},appendChild:function(A){throw new Error(_[E])},deleteData:function(A,S){this.replaceData(A,S,"")},replaceData:function(A,S,$){var W=this.data.substring(0,A),se=this.data.substring(A+S);$=W+$+se,this.nodeValue=this.data=$,this.length=$.length}},f(Me,R);function ze(){}ze.prototype={nodeName:"#text",nodeType:p,splitText:function(A){var S=this.data,$=S.substring(A);S=S.substring(0,A),this.data=this.nodeValue=S,this.length=S.length;var W=this.ownerDocument.createTextNode($);return this.parentNode&&this.parentNode.insertBefore(W,this.nextSibling),W}},f(ze,Me);function Pt(){}Pt.prototype={nodeName:"#comment",nodeType:v},f(Pt,Me);function er(){}er.prototype={nodeName:"#cdata-section",nodeType:y},f(er,Me);function et(){}et.prototype.nodeType=j,f(et,R);function tr(){}tr.prototype.nodeType=m,f(tr,R);function Er(){}Er.prototype.nodeType=b,f(Er,R);function at(){}at.prototype.nodeType=w,f(at,R);function Lt(){}Lt.prototype.nodeName="#document-fragment",Lt.prototype.nodeType=x,f(Lt,R);function Nt(){}Nt.prototype.nodeType=g,f(Nt,R);function hr(){}hr.prototype.serializeToString=function(A,S,$){return rr.call(A,S,$)},R.prototype.toString=rr;function rr(A,S){var $=[],W=this.nodeType==9&&this.documentElement||this,se=W.prefix,pe=W.namespaceURI;if(pe&&se==null){var se=W.lookupPrefix(pe);if(se==null)var Ee=[{namespace:pe,prefix:null}]}return $t(this,$,A,S,Ee),$.join("")}function Mt(A,S,$){var W=A.prefix||"",se=A.namespaceURI;if(!se||W==="xml"&&se===s.XML||se===s.XMLNS)return!1;for(var pe=$.length;pe--;){var Ee=$[pe];if(Ee.prefix===W)return Ee.namespace!==se}return!0}function jt(A,S,$){A.push(" ",S,'="',$.replace(/[<>&"\t\n\r]/g,ie),'"')}function $t(A,S,$,W,se){if(se||(se=[]),W)if(A=W(A),A){if(typeof A=="string"){S.push(A);return}}else return;switch(A.nodeType){case h:var pe=A.attributes,Ee=pe.length,Ie=A.firstChild,Te=A.tagName;$=s.isHTML(A.namespaceURI)||$;var bt=Te;if(!$&&!A.prefix&&A.namespaceURI){for(var ot,tt=0;tt<pe.length;tt++)if(pe.item(tt).name==="xmlns"){ot=pe.item(tt).value;break}if(!ot)for(var kt=se.length-1;kt>=0;kt--){var _t=se[kt];if(_t.prefix===""&&_t.namespace===A.namespaceURI){ot=_t.namespace;break}}if(ot!==A.namespaceURI)for(var kt=se.length-1;kt>=0;kt--){var _t=se[kt];if(_t.namespace===A.namespaceURI){_t.prefix&&(bt=_t.prefix+":"+Te);break}}}S.push("<",bt);for(var Et=0;Et<Ee;Et++){var st=pe.item(Et);st.prefix=="xmlns"?se.push({prefix:st.localName,namespace:st.value}):st.nodeName=="xmlns"&&se.push({prefix:"",namespace:st.value})}for(var Et=0;Et<Ee;Et++){var st=pe.item(Et);if(Mt(st,$,se)){var Ge=st.prefix||"",Wt=st.namespaceURI;jt(S,Ge?"xmlns:"+Ge:"xmlns",Wt),se.push({prefix:Ge,namespace:Wt})}$t(st,S,$,W,se)}if(Te===bt&&Mt(A,$,se)){var Ge=A.prefix||"",Wt=A.namespaceURI;jt(S,Ge?"xmlns:"+Ge:"xmlns",Wt),se.push({prefix:Ge,namespace:Wt})}if(Ie||$&&!/^(?:meta|link|img|br|hr|input)$/i.test(Te)){if(S.push(">"),$&&/^script$/i.test(Te))for(;Ie;)Ie.data?S.push(Ie.data):$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;else for(;Ie;)$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;S.push("</",bt,">")}else S.push("/>");return;case N:case x:for(var Ie=A.firstChild;Ie;)$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;return;case l:return jt(S,A.name,A.value);case p:return S.push(A.data.replace(/[<&>]/g,ie));case y:return S.push("<![CDATA[",A.data,"]]>");case v:return S.push("<!--",A.data,"-->");case j:var Rt=A.publicId,Gt=A.systemId;if(S.push("<!DOCTYPE ",A.name),Rt)S.push(" PUBLIC ",Rt),Gt&&Gt!="."&&S.push(" ",Gt),S.push(">");else if(Gt&&Gt!=".")S.push(" SYSTEM ",Gt,">");else{var xt=A.internalSubset;xt&&S.push(" [",xt,"]"),S.push(">")}return;case g:return S.push("<?",A.target," ",A.data,"?>");case w:return S.push("&",A.nodeName,";");default:S.push("??",A.nodeName)}}function Kr(A,S,$){var W;switch(S.nodeType){case h:W=S.cloneNode(!1),W.ownerDocument=A;case x:break;case l:$=!0;break}if(W||(W=S.cloneNode(!1)),W.ownerDocument=A,W.parentNode=null,$)for(var se=S.firstChild;se;)W.appendChild(Kr(A,se,$)),se=se.nextSibling;return W}function gt(A,S,$){var W=new S.constructor;for(var se in S)if(Object.prototype.hasOwnProperty.call(S,se)){var pe=S[se];typeof pe!="object"&&pe!=W[se]&&(W[se]=pe)}switch(S.childNodes&&(W.childNodes=new L),W.ownerDocument=A,W.nodeType){case h:var Ee=S.attributes,Te=W.attributes=new q,bt=Ee.length;Te._ownerElement=W;for(var ot=0;ot<bt;ot++)W.setAttributeNode(gt(A,Ee.item(ot),!0));break;case l:$=!0}if($)for(var tt=S.firstChild;tt;)W.appendChild(gt(A,tt,$)),tt=tt.nextSibling;return W}function Ar(A,S,$){A[S]=$}try{if(Object.defineProperty){let A=function(S){switch(S.nodeType){case h:case x:var $=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&$.push(A(S)),S=S.nextSibling;return $.join("");default:return S.nodeValue}};Object.defineProperty(H.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return A(this)},set:function(S){switch(this.nodeType){case h:case x:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),Ar=function(S,$,W){S["$$"+$]=W}}}catch{}return ir.DocumentType=et,ir.DOMException=P,ir.DOMImplementation=ee,ir.Element=he,ir.Node=R,ir.NodeList=L,ir.XMLSerializer=hr,ir}var Ha={},Gn={},Eu;function _h(){return Eu||(Eu=1,(function(e){var a=yn().freeze;e.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=a({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:`
|
|
109
|
-
`,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:""}),e.entityMap=e.HTML_ENTITIES})(Gn)),Gn}var Ts={},Au;function Eh(){if(Au)return Ts;Au=1;var e=yn().NAMESPACE,a=/[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]/,s=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+a.source+s.source+"*(?::"+a.source+s.source+"*)?$"),r=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(E,D){this.message=E,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(E,D,C){var P=this.domBuilder;P.startDocument(),j(D,D={}),y(E,D,C,P,this.errorHandler),P.endDocument()}};function y(E,D,C,P,L){function H(he){if(he>65535){he-=65536;var Ce=55296+(he>>10),Me=56320+(he&1023);return String.fromCharCode(Ce,Me)}else return String.fromCharCode(he)}function F(he){var Ce=he.slice(1,-1);return Object.hasOwnProperty.call(C,Ce)?C[Ce]:Ce.charAt(0)==="#"?H(parseInt(Ce.substr(1).replace("x","0x"))):(L.error("entity not found:"+he),he)}function q(he){if(he>V){var Ce=E.substring(V,he).replace(/&#?\w+;/g,F);R&&M(V),P.characters(Ce,0,he-V),V=he}}function M(he,Ce){for(;he>=X&&(Ce=ee.exec(E));)G=Ce.index,X=G+Ce[0].length,R.lineNumber++;R.columnNumber=he-G+1}for(var G=0,X=0,ee=/.*(?:\r\n?|\n)|.*$/g,R=P.locator,ie=[{currentNSMap:D}],I={},V=0;;){try{var J=E.indexOf("<",V);if(J<0){if(!E.substr(V).match(/^\s*$/)){var ue=P.doc,Q=ue.createTextNode(E.substr(V));ue.appendChild(Q),P.currentElement=Q}return}switch(J>V&&q(J),E.charAt(J+1)){case"/":var be=E.indexOf(">",J+3),te=E.substring(J+2,be).replace(/[ \t\n\r]+$/g,""),me=ie.pop();be<0?(te=E.substring(J+2).replace(/[\s<].*/,""),L.error("end tag name: "+te+" is not complete:"+me.tagName),be=J+1+te.length):te.match(/\s</)&&(te=te.replace(/[\s<].*/,""),L.error("end tag name: "+te+" maybe not complete"),be=J+1+te.length);var Se=me.localNSMap,Z=me.tagName==te,ae=Z||me.tagName&&me.tagName.toLowerCase()==te.toLowerCase();if(ae){if(P.endElement(me.uri,me.localName,te),Se)for(var re in Se)Object.prototype.hasOwnProperty.call(Se,re)&&P.endPrefixMapping(re);Z||L.fatalError("end tag name: "+te+" is not match the current start tagName:"+me.tagName)}else ie.push(me);be++;break;case"?":R&&M(J),be=m(E,J,P);break;case"!":R&&M(J),be=x(E,J,P,L);break;default:R&&M(J);var de=new k,ye=ie[ie.length-1].currentNSMap,be=b(E,J,de,ye,F,L),_e=de.length;if(!de.closed&&N(E,be,de.tagName,I)&&(de.closed=!0,C.nbsp||L.warning("unclosed xml attribute")),R&&_e){for(var ge=w(R,{}),Ke=0;Ke<_e;Ke++){var je=de[Ke];M(je.offset),je.locator=w(R,{})}P.locator=ge,g(de,P,ye)&&ie.push(de),P.locator=R}else g(de,P,ye)&&ie.push(de);e.isHTML(de.uri)&&!de.closed?be=v(E,be,de.tagName,F,P):be++}}catch(he){if(he instanceof l)throw he;L.error("element parse error: "+he),be=-1}be>V?V=be:q(Math.max(J,V)+1)}}function w(E,D){return D.lineNumber=E.lineNumber,D.columnNumber=E.columnNumber,D}function b(E,D,C,P,L,H){function F(R,ie,I){C.attributeNames.hasOwnProperty(R)&&H.fatalError("Attribute "+R+" redefined"),C.addValue(R,ie.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),I)}for(var q,M,G=++D,X=r;;){var ee=E.charAt(G);switch(ee){case"=":if(X===n)q=E.slice(D,G),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(H.warning('attribute value must after "="'),q=E.slice(D,G)),D=G+1,G=E.indexOf(ee,D),G>0)M=E.slice(D,G),F(q,M,D-1),X=f;else throw new Error("attribute value no end '"+ee+"' match");else if(X==d)M=E.slice(D,G),F(q,M,D),H.warning('attribute "'+q+'" missed start quot('+ee+")!!"),D=G+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case r:C.setTagName(E.slice(D,G));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return H.error("unexpected end of input"),X==r&&C.setTagName(E.slice(D,G)),G;case">":switch(X){case r:C.setTagName(E.slice(D,G));case f:case o:case h:break;case d:case n:M=E.slice(D,G),M.slice(-1)==="/"&&(C.closed=!0,M=M.slice(0,-1));case u:X===u&&(M=q),X==d?(H.warning('attribute "'+M+'" missed quot(")!'),F(q,M,D)):((!e.isHTML(P[""])||!M.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+M+'" missed value!! "'+M+'" instead!!'),F(M,M,D));break;case c:throw new Error("attribute value missed!!")}return G;case"":ee=" ";default:if(ee<=" ")switch(X){case r:C.setTagName(E.slice(D,G)),X=o;break;case n:q=E.slice(D,G),X=u;break;case d:var M=E.slice(D,G);H.warning('attribute "'+M+'" missed quot(")!!'),F(q,M,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(P[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),F(q,q,D),D=G,X=n;break;case f:H.warning('attribute space is required"'+q+'"!!');case o:X=n,D=G;break;case c:X=d,D=G;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}G++}}function g(E,D,C){for(var P=E.tagName,L=null,ee=E.length;ee--;){var H=E[ee],F=H.qName,q=H.value,R=F.indexOf(":");if(R>0)var M=H.prefix=F.slice(0,R),G=F.slice(R+1),X=M==="xmlns"&&G;else G=F,M=null,X=F==="xmlns"&&"";H.localName=G,X!==!1&&(L==null&&(L={},j(C,C={})),C[X]=L[X]=q,H.uri=e.XMLNS,D.startPrefixMapping(X,q))}for(var ee=E.length;ee--;){H=E[ee];var M=H.prefix;M&&(M==="xml"&&(H.uri=e.XML),M!=="xmlns"&&(H.uri=C[M||""]))}var R=P.indexOf(":");R>0?(M=E.prefix=P.slice(0,R),G=E.localName=P.slice(R+1)):(M=null,G=E.localName=P);var ie=E.uri=C[M||""];if(D.startElement(ie,G,P,E),E.closed){if(D.endElement(ie,G,P),L)for(M in L)Object.prototype.hasOwnProperty.call(L,M)&&D.endPrefixMapping(M)}else return E.currentNSMap=C,E.localNSMap=L,!0}function v(E,D,C,P,L){if(/^(?:script|textarea)$/i.test(C)){var H=E.indexOf("</"+C+">",D),F=E.substring(D+1,H);if(/[&<]/.test(F))return/^script$/i.test(C)?(L.characters(F,0,F.length),H):(F=F.replace(/&#?\w+;/g,P),L.characters(F,0,F.length),H)}return D+1}function N(E,D,C,P){var L=P[C];return L==null&&(L=E.lastIndexOf("</"+C+">"),L<D&&(L=E.lastIndexOf("</"+C)),P[C]=L),L<D}function j(E,D){for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(D[C]=E[C])}function x(E,D,C,P){var L=E.charAt(D+2);switch(L){case"-":if(E.charAt(D+3)==="-"){var H=E.indexOf("-->",D+4);return H>D?(C.comment(E,D+4,H-D-4),H+3):(P.error("Unclosed comment"),-1)}else return-1;default:if(E.substr(D+3,6)=="CDATA["){var H=E.indexOf("]]>",D+9);return C.startCDATA(),C.characters(E,D+9,H-D-9),C.endCDATA(),H+3}var F=_(E,D),q=F.length;if(q>1&&/!doctype/i.test(F[0][0])){var M=F[1][0],G=!1,X=!1;q>3&&(/^public$/i.test(F[2][0])?(G=F[3][0],X=q>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ee=F[q-1];return C.startDTD(M,G,X),C.endDTD(),ee.index+ee[0].length}}return-1}function m(E,D,C){var P=E.indexOf("?>",D);if(P){var L=E.substring(D,P).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return L?(L[0].length,C.processingInstruction(L[1],L[2]),P+2):-1}return-1}function k(){this.attributeNames={}}k.prototype={setTagName:function(E){if(!i.test(E))throw new Error("invalid tagName:"+E);this.tagName=E},addValue:function(E,D,C){if(!i.test(E))throw new Error("invalid attribute:"+E);this.attributeNames[E]=this.length,this[this.length++]={qName:E,value:D,offset:C}},length:0,getLocalName:function(E){return this[E].localName},getLocator:function(E){return this[E].locator},getQName:function(E){return this[E].qName},getURI:function(E){return this[E].uri},getValue:function(E){return this[E].value}};function _(E,D){var C,P=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=D,L.exec(E);C=L.exec(E);)if(P.push(C),C[1])return P}return Ts.XMLReader=p,Ts.ParseError=l,Ts}var Su;function Ah(){if(Su)return Ha;Su=1;var e=yn(),a=Xc(),s=_h(),i=Eh(),r=a.DOMImplementation,n=e.NAMESPACE,u=i.ParseError,c=i.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
|
|
107
|
+
`)),zn}var Hn,xu;function Zc(){if(xu)return Hn;xu=1;var e=function(v){return a(v)&&!s(v)};function a(g){return!!g&&typeof g=="object"}function s(g){var v=Object.prototype.toString.call(g);return v==="[object RegExp]"||v==="[object Date]"||n(g)}var i=typeof Symbol=="function"&&Symbol.for,r=i?Symbol.for("react.element"):60103;function n(g){return g.$$typeof===r}function u(g){return Array.isArray(g)?[]:{}}function c(g,v){return v.clone!==!1&&v.isMergeableObject(g)?w(u(g),g,v):g}function d(g,v,N){return g.concat(v).map(function(j){return c(j,N)})}function f(g,v){if(!v.customMerge)return w;var N=v.customMerge(g);return typeof N=="function"?N:w}function o(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(v){return Object.propertyIsEnumerable.call(g,v)}):[]}function h(g){return Object.keys(g).concat(o(g))}function l(g,v){try{return v in g}catch{return!1}}function p(g,v){return l(g,v)&&!(Object.hasOwnProperty.call(g,v)&&Object.propertyIsEnumerable.call(g,v))}function y(g,v,N){var j={};return N.isMergeableObject(g)&&h(g).forEach(function(x){j[x]=c(g[x],N)}),h(v).forEach(function(x){p(g,x)||(l(g,x)&&N.isMergeableObject(v[x])?j[x]=f(x,N)(g[x],v[x],N):j[x]=c(v[x],N))}),j}function w(g,v,N){N=N||{},N.arrayMerge=N.arrayMerge||d,N.isMergeableObject=N.isMergeableObject||e,N.cloneUnlessOtherwiseSpecified=c;var j=Array.isArray(v),x=Array.isArray(g),m=j===x;return m?j?N.arrayMerge(g,v,N):y(g,v,N):c(v,N)}w.all=function(v,N){if(!Array.isArray(v))throw new Error("first argument should be an array");return v.reduce(function(j,x){return w(j,x,N)},{})};var b=w;return Hn=b,Hn}var Wn={},yu;function Ui(){return yu||(yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.DEFAULT={cleanStack:!0}})(e.Options||(e.Options={}))})(Wn)),Wn}var vu;function wu(){return vu||(vu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var a=Nh(),s=Zc(),i=Ui();(function(r){function n(d,f,o,h){h===void 0&&(h=i.Options.DEFAULT);var l=d;return f&&(l.cause=f),l.stack=u(l.stack,f,h),o&&c(l,o),l}r.make=n;function u(d,f,o){var h=d||"";f&&(h+=`
|
|
108
|
+
Caused by: `+(f.stack||f));function l(p){return a(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}r.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?s(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Un)),Un}var Nu;function xn(){if(Nu)return vr;Nu=1;var e=vr&&vr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(vr,"__esModule",{value:!0});var a=yh,s=wu(),i=Ui(),r=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=i.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=s.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(a.CustomError);vr.default=r;var n=wu();vr.ChainedErrorFactory=n.ChainedErrorFactory;var u=Ui();return vr.Options=u.Options,vr}var ju;function jh(){if(ju)return nr;ju=1;var e=nr&&nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.SecurityError=nr.SecurityChecker=void 0;const a=e(xn());let s=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new i("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};nr.SecurityChecker=s;class i extends a.default{constructor(n,u){super(n,u)}}return nr.SecurityError=i,nr}var lt={},za={},ir={},Rr={},ku;function yn(){if(ku)return Rr;ku=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function a(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function s(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var i=a({HTML:"text/html",isHTML:function(n){return n===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Rr.assign=s,Rr.find=e,Rr.freeze=a,Rr.MIME_TYPE=i,Rr.NAMESPACE=r,Rr}var _u;function Xc(){if(_u)return ir;_u=1;var e=yn(),a=e.find,s=e.NAMESPACE;function i(A){return A!==""}function r(A){return A?A.split(/[\t\n\f\r ]+/).filter(i):[]}function n(A,S){return A.hasOwnProperty(S)||(A[S]=!0),A}function u(A){if(!A)return[];var S=r(A);return Object.keys(S.reduce(n,{}))}function c(A){return function(S){return A&&A.indexOf(S)!==-1}}function d(A,S){for(var $ in A)Object.prototype.hasOwnProperty.call(A,$)&&(S[$]=A[$])}function f(A,S){var $=A.prototype;if(!($ instanceof S)){let W=function(){};W.prototype=S.prototype,W=new W,d($,W),A.prototype=$=W}$.constructor!=A&&(typeof A!="function"&&console.error("unknown Class:"+A),$.constructor=A)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,y=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,N=o.DOCUMENT_NODE=9,j=o.DOCUMENT_TYPE_NODE=10,x=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,k={},_={};k.INDEX_SIZE_ERR=(_[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2);var E=k.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3);k.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7);var D=k.NOT_FOUND_ERR=(_[8]="Not found",8);k.NOT_SUPPORTED_ERR=(_[9]="Not supported",9);var C=k.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10);k.INVALID_STATE_ERR=(_[11]="Invalid state",11),k.SYNTAX_ERR=(_[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),k.NAMESPACE_ERR=(_[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function P(A,S){if(S instanceof Error)var $=S;else $=this,Error.call(this,_[A]),this.message=_[A],Error.captureStackTrace&&Error.captureStackTrace(this,P);return $.code=A,S&&(this.message=this.message+": "+S),$}P.prototype=Error.prototype,d(k,P);function L(){}L.prototype={length:0,item:function(A){return A>=0&&A<this.length?this[A]:null},toString:function(A,S){for(var $=[],W=0;W<this.length;W++)$t(this[W],$,A,S);return $.join("")},filter:function(A){return Array.prototype.filter.call(this,A)},indexOf:function(A){return Array.prototype.indexOf.call(this,A)}};function H(A,S){this._node=A,this._refresh=S,F(this)}function F(A){var S=A._node._inc||A._node.ownerDocument._inc;if(A._inc!==S){var $=A._refresh(A._node);if(Ar(A,"length",$.length),!A.$$length||$.length<A.$$length)for(var W=$.length;W in A;W++)Object.prototype.hasOwnProperty.call(A,W)&&delete A[W];d($,A),A._inc=S}}H.prototype.item=function(A){return F(this),this[A]||null},f(H,L);function q(){}function M(A,S){for(var $=A.length;$--;)if(A[$]===S)return $}function G(A,S,$,W){if(W?S[M(S,W)]=$:S[S.length++]=$,A){$.ownerElement=A;var se=A.ownerDocument;se&&(W&&ue(se,A,W),J(se,A,$))}}function X(A,S,$){var W=M(S,$);if(W>=0){for(var se=S.length-1;W<se;)S[W]=S[++W];if(S.length=se,A){var pe=A.ownerDocument;pe&&(ue(pe,A,$),$.ownerElement=null)}}else throw new P(D,new Error(A.tagName+"@"+$))}q.prototype={length:0,item:L.prototype.item,getNamedItem:function(A){for(var S=this.length;S--;){var $=this[S];if($.nodeName==A)return $}},setNamedItem:function(A){var S=A.ownerElement;if(S&&S!=this._ownerElement)throw new P(C);var $=this.getNamedItem(A.nodeName);return G(this._ownerElement,this,A,$),$},setNamedItemNS:function(A){var S=A.ownerElement,$;if(S&&S!=this._ownerElement)throw new P(C);return $=this.getNamedItemNS(A.namespaceURI,A.localName),G(this._ownerElement,this,A,$),$},removeNamedItem:function(A){var S=this.getNamedItem(A);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(A,S){var $=this.getNamedItemNS(A,S);return X(this._ownerElement,this,$),$},getNamedItemNS:function(A,S){for(var $=this.length;$--;){var W=this[$];if(W.localName==S&&W.namespaceURI==A)return W}return null}};function ee(){}ee.prototype={hasFeature:function(A,S){return!0},createDocument:function(A,S,$){var W=new V;if(W.implementation=this,W.childNodes=new L,W.doctype=$||null,$&&W.appendChild($),S){var se=W.createElementNS(A,S);W.appendChild(se)}return W},createDocumentType:function(A,S,$){var W=new et;return W.name=A,W.nodeName=A,W.publicId=S||"",W.systemId=$||"",W}};function R(){}R.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(A,S){return Ke(this,A,S)},replaceChild:function(A,S){Ke(this,A,S,ge),S&&this.removeChild(S)},removeChild:function(A){return te(this,A)},appendChild:function(A){return this.insertBefore(A,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(A){return gt(this.ownerDocument||this,this,A)},normalize:function(){for(var A=this.firstChild;A;){var S=A.nextSibling;S&&S.nodeType==p&&A.nodeType==p?(this.removeChild(S),A.appendData(S.data)):(A.normalize(),A=S)}},isSupported:function(A,S){return this.ownerDocument.implementation.hasFeature(A,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(A){for(var S=this;S;){var $=S._nsMap;if($){for(var W in $)if(Object.prototype.hasOwnProperty.call($,W)&&$[W]===A)return W}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(A){for(var S=this;S;){var $=S._nsMap;if($&&Object.prototype.hasOwnProperty.call($,A))return $[A];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(A){var S=this.lookupPrefix(A);return S==null}};function ne(A){return A=="<"&&"<"||A==">"&&">"||A=="&"&&"&"||A=='"'&&"""||"&#"+A.charCodeAt()+";"}d(o,R),d(o,R.prototype);function I(A,S){if(S(A))return!0;if(A=A.firstChild)do if(I(A,S))return!0;while(A=A.nextSibling)}function V(){this.ownerDocument=this}function J(A,S,$){A&&A._inc++;var W=$.namespaceURI;W===s.XMLNS&&(S._nsMap[$.prefix?$.localName:""]=$.value)}function ue(A,S,$,W){A&&A._inc++;var se=$.namespaceURI;se===s.XMLNS&&delete S._nsMap[$.prefix?$.localName:""]}function Q(A,S,$){if(A&&A._inc){A._inc++;var W=S.childNodes;if($)W[W.length++]=$;else{for(var se=S.firstChild,pe=0;se;)W[pe++]=se,se=se.nextSibling;W.length=pe,delete W[W.length]}}}function te(A,S){var $=S.previousSibling,W=S.nextSibling;return $?$.nextSibling=W:A.firstChild=W,W?W.previousSibling=$:A.lastChild=$,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,Q(A.ownerDocument,A),S}function me(A){return A&&(A.nodeType===R.DOCUMENT_NODE||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.ELEMENT_NODE)}function Se(A){return A&&(ae(A)||re(A)||Z(A)||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.COMMENT_NODE||A.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Z(A){return A&&A.nodeType===R.DOCUMENT_TYPE_NODE}function ae(A){return A&&A.nodeType===R.ELEMENT_NODE}function re(A){return A&&A.nodeType===R.TEXT_NODE}function de(A,S){var $=A.childNodes||[];if(a($,ae)||Z(S))return!1;var W=a($,Z);return!(S&&W&&$.indexOf(W)>$.indexOf(S))}function ye(A,S){var $=A.childNodes||[];function W(pe){return ae(pe)&&pe!==S}if(a($,W))return!1;var se=a($,Z);return!(S&&se&&$.indexOf(se)>$.indexOf(S))}function be(A,S,$){if(!me(A))throw new P(E,"Unexpected parent node type "+A.nodeType);if($&&$.parentNode!==A)throw new P(D,"child not in parent");if(!Se(S)||Z(S)&&A.nodeType!==R.DOCUMENT_NODE)throw new P(E,"Unexpected node type "+S.nodeType+" for parent node type "+A.nodeType)}function _e(A,S,$){var W=A.childNodes||[],se=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var pe=se.filter(ae);if(pe.length>1||a(se,re))throw new P(E,"More than one element or text in fragment");if(pe.length===1&&!de(A,$))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!de(A,$))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,Z))throw new P(E,"Only one doctype is allowed");var Ee=a(W,ae);if($&&W.indexOf(Ee)<W.indexOf($))throw new P(E,"Doctype can only be inserted before an element");if(!$&&Ee)throw new P(E,"Doctype can not be appended since element is present")}}function ge(A,S,$){var W=A.childNodes||[],se=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var pe=se.filter(ae);if(pe.length>1||a(se,re))throw new P(E,"More than one element or text in fragment");if(pe.length===1&&!ye(A,$))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!ye(A,$))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,function(bt){return Z(bt)&&bt!==$}))throw new P(E,"Only one doctype is allowed");var Ee=a(W,ae);if($&&W.indexOf(Ee)<W.indexOf($))throw new P(E,"Doctype can only be inserted before an element")}}function Ke(A,S,$,W){be(A,S,$),A.nodeType===R.DOCUMENT_NODE&&(W||_e)(A,S,$);var se=S.parentNode;if(se&&se.removeChild(S),S.nodeType===x){var pe=S.firstChild;if(pe==null)return S;var Ee=S.lastChild}else pe=Ee=S;var Te=$?$.previousSibling:A.lastChild;pe.previousSibling=Te,Ee.nextSibling=$,Te?Te.nextSibling=pe:A.firstChild=pe,$==null?A.lastChild=Ee:$.previousSibling=Ee;do pe.parentNode=A;while(pe!==Ee&&(pe=pe.nextSibling));return Q(A.ownerDocument||A,A),S.nodeType==x&&(S.firstChild=S.lastChild=null),S}function je(A,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=A,S.previousSibling=A.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:A.firstChild=S,A.lastChild=S,Q(A.ownerDocument,A,S),S}V.prototype={nodeName:"#document",nodeType:N,doctype:null,documentElement:null,_inc:1,insertBefore:function(A,S){if(A.nodeType==x){for(var $=A.firstChild;$;){var W=$.nextSibling;this.insertBefore($,S),$=W}return A}return Ke(this,A,S),A.ownerDocument=this,this.documentElement===null&&A.nodeType===h&&(this.documentElement=A),A},removeChild:function(A){return this.documentElement==A&&(this.documentElement=null),te(this,A)},replaceChild:function(A,S){Ke(this,A,S,ge),A.ownerDocument=this,S&&this.removeChild(S),ae(A)&&(this.documentElement=A)},importNode:function(A,S){return Kr(this,A,S)},getElementById:function(A){var S=null;return I(this.documentElement,function($){if($.nodeType==h&&$.getAttribute("id")==A)return S=$,!0}),S},getElementsByClassName:function(A){var S=u(A);return new H(this,function($){var W=[];return S.length>0&&I($.documentElement,function(se){if(se!==$&&se.nodeType===h){var pe=se.getAttribute("class");if(pe){var Ee=A===pe;if(!Ee){var Te=u(pe);Ee=S.every(c(Te))}Ee&&W.push(se)}}}),W})},createElement:function(A){var S=new he;S.ownerDocument=this,S.nodeName=A,S.tagName=A,S.localName=A,S.childNodes=new L;var $=S.attributes=new q;return $._ownerElement=S,S},createDocumentFragment:function(){var A=new Lt;return A.ownerDocument=this,A.childNodes=new L,A},createTextNode:function(A){var S=new ze;return S.ownerDocument=this,S.appendData(A),S},createComment:function(A){var S=new Pt;return S.ownerDocument=this,S.appendData(A),S},createCDATASection:function(A){var S=new er;return S.ownerDocument=this,S.appendData(A),S},createProcessingInstruction:function(A,S){var $=new Nt;return $.ownerDocument=this,$.tagName=$.nodeName=$.target=A,$.nodeValue=$.data=S,$},createAttribute:function(A){var S=new Ce;return S.ownerDocument=this,S.name=A,S.nodeName=A,S.localName=A,S.specified=!0,S},createEntityReference:function(A){var S=new at;return S.ownerDocument=this,S.nodeName=A,S},createElementNS:function(A,S){var $=new he,W=S.split(":"),se=$.attributes=new q;return $.childNodes=new L,$.ownerDocument=this,$.nodeName=S,$.tagName=S,$.namespaceURI=A,W.length==2?($.prefix=W[0],$.localName=W[1]):$.localName=S,se._ownerElement=$,$},createAttributeNS:function(A,S){var $=new Ce,W=S.split(":");return $.ownerDocument=this,$.nodeName=S,$.name=S,$.namespaceURI=A,$.specified=!0,W.length==2?($.prefix=W[0],$.localName=W[1]):$.localName=S,$}},f(V,R);function he(){this._nsMap={}}he.prototype={nodeType:h,hasAttribute:function(A){return this.getAttributeNode(A)!=null},getAttribute:function(A){var S=this.getAttributeNode(A);return S&&S.value||""},getAttributeNode:function(A){return this.attributes.getNamedItem(A)},setAttribute:function(A,S){var $=this.ownerDocument.createAttribute(A);$.value=$.nodeValue=""+S,this.setAttributeNode($)},removeAttribute:function(A){var S=this.getAttributeNode(A);S&&this.removeAttributeNode(S)},appendChild:function(A){return A.nodeType===x?this.insertBefore(A,null):je(this,A)},setAttributeNode:function(A){return this.attributes.setNamedItem(A)},setAttributeNodeNS:function(A){return this.attributes.setNamedItemNS(A)},removeAttributeNode:function(A){return this.attributes.removeNamedItem(A.nodeName)},removeAttributeNS:function(A,S){var $=this.getAttributeNodeNS(A,S);$&&this.removeAttributeNode($)},hasAttributeNS:function(A,S){return this.getAttributeNodeNS(A,S)!=null},getAttributeNS:function(A,S){var $=this.getAttributeNodeNS(A,S);return $&&$.value||""},setAttributeNS:function(A,S,$){var W=this.ownerDocument.createAttributeNS(A,S);W.value=W.nodeValue=""+$,this.setAttributeNode(W)},getAttributeNodeNS:function(A,S){return this.attributes.getNamedItemNS(A,S)},getElementsByTagName:function(A){return new H(this,function(S){var $=[];return I(S,function(W){W!==S&&W.nodeType==h&&(A==="*"||W.tagName==A)&&$.push(W)}),$})},getElementsByTagNameNS:function(A,S){return new H(this,function($){var W=[];return I($,function(se){se!==$&&se.nodeType===h&&(A==="*"||se.namespaceURI===A)&&(S==="*"||se.localName==S)&&W.push(se)}),W})}},V.prototype.getElementsByTagName=he.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=he.prototype.getElementsByTagNameNS,f(he,R);function Ce(){}Ce.prototype.nodeType=l,f(Ce,R);function Me(){}Me.prototype={data:"",substringData:function(A,S){return this.data.substring(A,A+S)},appendData:function(A){A=this.data+A,this.nodeValue=this.data=A,this.length=A.length},insertData:function(A,S){this.replaceData(A,0,S)},appendChild:function(A){throw new Error(_[E])},deleteData:function(A,S){this.replaceData(A,S,"")},replaceData:function(A,S,$){var W=this.data.substring(0,A),se=this.data.substring(A+S);$=W+$+se,this.nodeValue=this.data=$,this.length=$.length}},f(Me,R);function ze(){}ze.prototype={nodeName:"#text",nodeType:p,splitText:function(A){var S=this.data,$=S.substring(A);S=S.substring(0,A),this.data=this.nodeValue=S,this.length=S.length;var W=this.ownerDocument.createTextNode($);return this.parentNode&&this.parentNode.insertBefore(W,this.nextSibling),W}},f(ze,Me);function Pt(){}Pt.prototype={nodeName:"#comment",nodeType:v},f(Pt,Me);function er(){}er.prototype={nodeName:"#cdata-section",nodeType:y},f(er,Me);function et(){}et.prototype.nodeType=j,f(et,R);function tr(){}tr.prototype.nodeType=m,f(tr,R);function Er(){}Er.prototype.nodeType=b,f(Er,R);function at(){}at.prototype.nodeType=w,f(at,R);function Lt(){}Lt.prototype.nodeName="#document-fragment",Lt.prototype.nodeType=x,f(Lt,R);function Nt(){}Nt.prototype.nodeType=g,f(Nt,R);function hr(){}hr.prototype.serializeToString=function(A,S,$){return rr.call(A,S,$)},R.prototype.toString=rr;function rr(A,S){var $=[],W=this.nodeType==9&&this.documentElement||this,se=W.prefix,pe=W.namespaceURI;if(pe&&se==null){var se=W.lookupPrefix(pe);if(se==null)var Ee=[{namespace:pe,prefix:null}]}return $t(this,$,A,S,Ee),$.join("")}function Mt(A,S,$){var W=A.prefix||"",se=A.namespaceURI;if(!se||W==="xml"&&se===s.XML||se===s.XMLNS)return!1;for(var pe=$.length;pe--;){var Ee=$[pe];if(Ee.prefix===W)return Ee.namespace!==se}return!0}function jt(A,S,$){A.push(" ",S,'="',$.replace(/[<>&"\t\n\r]/g,ne),'"')}function $t(A,S,$,W,se){if(se||(se=[]),W)if(A=W(A),A){if(typeof A=="string"){S.push(A);return}}else return;switch(A.nodeType){case h:var pe=A.attributes,Ee=pe.length,Ie=A.firstChild,Te=A.tagName;$=s.isHTML(A.namespaceURI)||$;var bt=Te;if(!$&&!A.prefix&&A.namespaceURI){for(var ot,tt=0;tt<pe.length;tt++)if(pe.item(tt).name==="xmlns"){ot=pe.item(tt).value;break}if(!ot)for(var kt=se.length-1;kt>=0;kt--){var _t=se[kt];if(_t.prefix===""&&_t.namespace===A.namespaceURI){ot=_t.namespace;break}}if(ot!==A.namespaceURI)for(var kt=se.length-1;kt>=0;kt--){var _t=se[kt];if(_t.namespace===A.namespaceURI){_t.prefix&&(bt=_t.prefix+":"+Te);break}}}S.push("<",bt);for(var Et=0;Et<Ee;Et++){var st=pe.item(Et);st.prefix=="xmlns"?se.push({prefix:st.localName,namespace:st.value}):st.nodeName=="xmlns"&&se.push({prefix:"",namespace:st.value})}for(var Et=0;Et<Ee;Et++){var st=pe.item(Et);if(Mt(st,$,se)){var Ge=st.prefix||"",Wt=st.namespaceURI;jt(S,Ge?"xmlns:"+Ge:"xmlns",Wt),se.push({prefix:Ge,namespace:Wt})}$t(st,S,$,W,se)}if(Te===bt&&Mt(A,$,se)){var Ge=A.prefix||"",Wt=A.namespaceURI;jt(S,Ge?"xmlns:"+Ge:"xmlns",Wt),se.push({prefix:Ge,namespace:Wt})}if(Ie||$&&!/^(?:meta|link|img|br|hr|input)$/i.test(Te)){if(S.push(">"),$&&/^script$/i.test(Te))for(;Ie;)Ie.data?S.push(Ie.data):$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;else for(;Ie;)$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;S.push("</",bt,">")}else S.push("/>");return;case N:case x:for(var Ie=A.firstChild;Ie;)$t(Ie,S,$,W,se.slice()),Ie=Ie.nextSibling;return;case l:return jt(S,A.name,A.value);case p:return S.push(A.data.replace(/[<&>]/g,ne));case y:return S.push("<![CDATA[",A.data,"]]>");case v:return S.push("<!--",A.data,"-->");case j:var Rt=A.publicId,Gt=A.systemId;if(S.push("<!DOCTYPE ",A.name),Rt)S.push(" PUBLIC ",Rt),Gt&&Gt!="."&&S.push(" ",Gt),S.push(">");else if(Gt&&Gt!=".")S.push(" SYSTEM ",Gt,">");else{var xt=A.internalSubset;xt&&S.push(" [",xt,"]"),S.push(">")}return;case g:return S.push("<?",A.target," ",A.data,"?>");case w:return S.push("&",A.nodeName,";");default:S.push("??",A.nodeName)}}function Kr(A,S,$){var W;switch(S.nodeType){case h:W=S.cloneNode(!1),W.ownerDocument=A;case x:break;case l:$=!0;break}if(W||(W=S.cloneNode(!1)),W.ownerDocument=A,W.parentNode=null,$)for(var se=S.firstChild;se;)W.appendChild(Kr(A,se,$)),se=se.nextSibling;return W}function gt(A,S,$){var W=new S.constructor;for(var se in S)if(Object.prototype.hasOwnProperty.call(S,se)){var pe=S[se];typeof pe!="object"&&pe!=W[se]&&(W[se]=pe)}switch(S.childNodes&&(W.childNodes=new L),W.ownerDocument=A,W.nodeType){case h:var Ee=S.attributes,Te=W.attributes=new q,bt=Ee.length;Te._ownerElement=W;for(var ot=0;ot<bt;ot++)W.setAttributeNode(gt(A,Ee.item(ot),!0));break;case l:$=!0}if($)for(var tt=S.firstChild;tt;)W.appendChild(gt(A,tt,$)),tt=tt.nextSibling;return W}function Ar(A,S,$){A[S]=$}try{if(Object.defineProperty){let A=function(S){switch(S.nodeType){case h:case x:var $=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&$.push(A(S)),S=S.nextSibling;return $.join("");default:return S.nodeValue}};Object.defineProperty(H.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return A(this)},set:function(S){switch(this.nodeType){case h:case x:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),Ar=function(S,$,W){S["$$"+$]=W}}}catch{}return ir.DocumentType=et,ir.DOMException=P,ir.DOMImplementation=ee,ir.Element=he,ir.Node=R,ir.NodeList=L,ir.XMLSerializer=hr,ir}var Ha={},Gn={},Eu;function kh(){return Eu||(Eu=1,(function(e){var a=yn().freeze;e.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=a({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:`
|
|
109
|
+
`,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:""}),e.entityMap=e.HTML_ENTITIES})(Gn)),Gn}var Ts={},Au;function _h(){if(Au)return Ts;Au=1;var e=yn().NAMESPACE,a=/[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]/,s=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+a.source+s.source+"*(?::"+a.source+s.source+"*)?$"),r=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(E,D){this.message=E,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(E,D,C){var P=this.domBuilder;P.startDocument(),j(D,D={}),y(E,D,C,P,this.errorHandler),P.endDocument()}};function y(E,D,C,P,L){function H(he){if(he>65535){he-=65536;var Ce=55296+(he>>10),Me=56320+(he&1023);return String.fromCharCode(Ce,Me)}else return String.fromCharCode(he)}function F(he){var Ce=he.slice(1,-1);return Object.hasOwnProperty.call(C,Ce)?C[Ce]:Ce.charAt(0)==="#"?H(parseInt(Ce.substr(1).replace("x","0x"))):(L.error("entity not found:"+he),he)}function q(he){if(he>V){var Ce=E.substring(V,he).replace(/&#?\w+;/g,F);R&&M(V),P.characters(Ce,0,he-V),V=he}}function M(he,Ce){for(;he>=X&&(Ce=ee.exec(E));)G=Ce.index,X=G+Ce[0].length,R.lineNumber++;R.columnNumber=he-G+1}for(var G=0,X=0,ee=/.*(?:\r\n?|\n)|.*$/g,R=P.locator,ne=[{currentNSMap:D}],I={},V=0;;){try{var J=E.indexOf("<",V);if(J<0){if(!E.substr(V).match(/^\s*$/)){var ue=P.doc,Q=ue.createTextNode(E.substr(V));ue.appendChild(Q),P.currentElement=Q}return}switch(J>V&&q(J),E.charAt(J+1)){case"/":var be=E.indexOf(">",J+3),te=E.substring(J+2,be).replace(/[ \t\n\r]+$/g,""),me=ne.pop();be<0?(te=E.substring(J+2).replace(/[\s<].*/,""),L.error("end tag name: "+te+" is not complete:"+me.tagName),be=J+1+te.length):te.match(/\s</)&&(te=te.replace(/[\s<].*/,""),L.error("end tag name: "+te+" maybe not complete"),be=J+1+te.length);var Se=me.localNSMap,Z=me.tagName==te,ae=Z||me.tagName&&me.tagName.toLowerCase()==te.toLowerCase();if(ae){if(P.endElement(me.uri,me.localName,te),Se)for(var re in Se)Object.prototype.hasOwnProperty.call(Se,re)&&P.endPrefixMapping(re);Z||L.fatalError("end tag name: "+te+" is not match the current start tagName:"+me.tagName)}else ne.push(me);be++;break;case"?":R&&M(J),be=m(E,J,P);break;case"!":R&&M(J),be=x(E,J,P,L);break;default:R&&M(J);var de=new k,ye=ne[ne.length-1].currentNSMap,be=b(E,J,de,ye,F,L),_e=de.length;if(!de.closed&&N(E,be,de.tagName,I)&&(de.closed=!0,C.nbsp||L.warning("unclosed xml attribute")),R&&_e){for(var ge=w(R,{}),Ke=0;Ke<_e;Ke++){var je=de[Ke];M(je.offset),je.locator=w(R,{})}P.locator=ge,g(de,P,ye)&&ne.push(de),P.locator=R}else g(de,P,ye)&&ne.push(de);e.isHTML(de.uri)&&!de.closed?be=v(E,be,de.tagName,F,P):be++}}catch(he){if(he instanceof l)throw he;L.error("element parse error: "+he),be=-1}be>V?V=be:q(Math.max(J,V)+1)}}function w(E,D){return D.lineNumber=E.lineNumber,D.columnNumber=E.columnNumber,D}function b(E,D,C,P,L,H){function F(R,ne,I){C.attributeNames.hasOwnProperty(R)&&H.fatalError("Attribute "+R+" redefined"),C.addValue(R,ne.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),I)}for(var q,M,G=++D,X=r;;){var ee=E.charAt(G);switch(ee){case"=":if(X===n)q=E.slice(D,G),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(H.warning('attribute value must after "="'),q=E.slice(D,G)),D=G+1,G=E.indexOf(ee,D),G>0)M=E.slice(D,G),F(q,M,D-1),X=f;else throw new Error("attribute value no end '"+ee+"' match");else if(X==d)M=E.slice(D,G),F(q,M,D),H.warning('attribute "'+q+'" missed start quot('+ee+")!!"),D=G+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case r:C.setTagName(E.slice(D,G));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return H.error("unexpected end of input"),X==r&&C.setTagName(E.slice(D,G)),G;case">":switch(X){case r:C.setTagName(E.slice(D,G));case f:case o:case h:break;case d:case n:M=E.slice(D,G),M.slice(-1)==="/"&&(C.closed=!0,M=M.slice(0,-1));case u:X===u&&(M=q),X==d?(H.warning('attribute "'+M+'" missed quot(")!'),F(q,M,D)):((!e.isHTML(P[""])||!M.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+M+'" missed value!! "'+M+'" instead!!'),F(M,M,D));break;case c:throw new Error("attribute value missed!!")}return G;case"":ee=" ";default:if(ee<=" ")switch(X){case r:C.setTagName(E.slice(D,G)),X=o;break;case n:q=E.slice(D,G),X=u;break;case d:var M=E.slice(D,G);H.warning('attribute "'+M+'" missed quot(")!!'),F(q,M,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(P[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),F(q,q,D),D=G,X=n;break;case f:H.warning('attribute space is required"'+q+'"!!');case o:X=n,D=G;break;case c:X=d,D=G;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}G++}}function g(E,D,C){for(var P=E.tagName,L=null,ee=E.length;ee--;){var H=E[ee],F=H.qName,q=H.value,R=F.indexOf(":");if(R>0)var M=H.prefix=F.slice(0,R),G=F.slice(R+1),X=M==="xmlns"&&G;else G=F,M=null,X=F==="xmlns"&&"";H.localName=G,X!==!1&&(L==null&&(L={},j(C,C={})),C[X]=L[X]=q,H.uri=e.XMLNS,D.startPrefixMapping(X,q))}for(var ee=E.length;ee--;){H=E[ee];var M=H.prefix;M&&(M==="xml"&&(H.uri=e.XML),M!=="xmlns"&&(H.uri=C[M||""]))}var R=P.indexOf(":");R>0?(M=E.prefix=P.slice(0,R),G=E.localName=P.slice(R+1)):(M=null,G=E.localName=P);var ne=E.uri=C[M||""];if(D.startElement(ne,G,P,E),E.closed){if(D.endElement(ne,G,P),L)for(M in L)Object.prototype.hasOwnProperty.call(L,M)&&D.endPrefixMapping(M)}else return E.currentNSMap=C,E.localNSMap=L,!0}function v(E,D,C,P,L){if(/^(?:script|textarea)$/i.test(C)){var H=E.indexOf("</"+C+">",D),F=E.substring(D+1,H);if(/[&<]/.test(F))return/^script$/i.test(C)?(L.characters(F,0,F.length),H):(F=F.replace(/&#?\w+;/g,P),L.characters(F,0,F.length),H)}return D+1}function N(E,D,C,P){var L=P[C];return L==null&&(L=E.lastIndexOf("</"+C+">"),L<D&&(L=E.lastIndexOf("</"+C)),P[C]=L),L<D}function j(E,D){for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(D[C]=E[C])}function x(E,D,C,P){var L=E.charAt(D+2);switch(L){case"-":if(E.charAt(D+3)==="-"){var H=E.indexOf("-->",D+4);return H>D?(C.comment(E,D+4,H-D-4),H+3):(P.error("Unclosed comment"),-1)}else return-1;default:if(E.substr(D+3,6)=="CDATA["){var H=E.indexOf("]]>",D+9);return C.startCDATA(),C.characters(E,D+9,H-D-9),C.endCDATA(),H+3}var F=_(E,D),q=F.length;if(q>1&&/!doctype/i.test(F[0][0])){var M=F[1][0],G=!1,X=!1;q>3&&(/^public$/i.test(F[2][0])?(G=F[3][0],X=q>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ee=F[q-1];return C.startDTD(M,G,X),C.endDTD(),ee.index+ee[0].length}}return-1}function m(E,D,C){var P=E.indexOf("?>",D);if(P){var L=E.substring(D,P).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return L?(L[0].length,C.processingInstruction(L[1],L[2]),P+2):-1}return-1}function k(){this.attributeNames={}}k.prototype={setTagName:function(E){if(!i.test(E))throw new Error("invalid tagName:"+E);this.tagName=E},addValue:function(E,D,C){if(!i.test(E))throw new Error("invalid attribute:"+E);this.attributeNames[E]=this.length,this[this.length++]={qName:E,value:D,offset:C}},length:0,getLocalName:function(E){return this[E].localName},getLocator:function(E){return this[E].locator},getQName:function(E){return this[E].qName},getURI:function(E){return this[E].uri},getValue:function(E){return this[E].value}};function _(E,D){var C,P=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=D,L.exec(E);C=L.exec(E);)if(P.push(C),C[1])return P}return Ts.XMLReader=p,Ts.ParseError=l,Ts}var Su;function Eh(){if(Su)return Ha;Su=1;var e=yn(),a=Xc(),s=kh(),i=_h(),r=a.DOMImplementation,n=e.NAMESPACE,u=i.ParseError,c=i.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
|
|
110
110
|
`).replace(/[\r\u0085\u2028]/g,`
|
|
111
111
|
`)}function f(b){this.options=b||{locator:{}}}f.prototype.parseFromString=function(b,g){var v=this.options,N=new c,j=v.domBuilder||new h,x=v.errorHandler,m=v.locator,k=v.xmlns||{},_=/\/x?html?$/.test(g),E=_?s.HTML_ENTITIES:s.XML_ENTITIES;m&&j.setDocumentLocator(m),N.errorHandler=o(x,j,m),N.domBuilder=v.domBuilder||j,_&&(k[""]=n.HTML),k.xml=k.xml||n.XML;var D=v.normalizeLineEndings||d;return b&&typeof b=="string"?N.parse(D(b),k,E):N.errorHandler.error("invalid doc source"),j.doc};function o(b,g,v){if(!b){if(g instanceof h)return g;b=g}var N={},j=b instanceof Function;v=v||{};function x(m){var k=b[m];!k&&j&&(k=b.length==2?function(_){b(m,_)}:b),N[m]=k&&function(_){k("[xmldom "+m+"] "+_+p(v))}||function(){}}return x("warning"),x("error"),x("fatalError"),N}function h(){this.cdata=!1}function l(b,g){g.lineNumber=b.lineNumber,g.columnNumber=b.columnNumber}h.prototype={startDocument:function(){this.doc=new r().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(b,g,v,N){var j=this.doc,x=j.createElementNS(b,v||g),m=N.length;w(this,x),this.currentElement=x,this.locator&&l(this.locator,x);for(var k=0;k<m;k++){var b=N.getURI(k),_=N.getValue(k),v=N.getQName(k),E=j.createAttributeNS(b,v);this.locator&&l(N.getLocator(k),E),E.value=E.nodeValue=_,x.setAttributeNode(E)}},endElement:function(b,g,v){var N=this.currentElement;N.tagName,this.currentElement=N.parentNode},startPrefixMapping:function(b,g){},endPrefixMapping:function(b){},processingInstruction:function(b,g){var v=this.doc.createProcessingInstruction(b,g);this.locator&&l(this.locator,v),w(this,v)},ignorableWhitespace:function(b,g,v){},characters:function(b,g,v){if(b=y.apply(this,arguments),b){if(this.cdata)var N=this.doc.createCDATASection(b);else var N=this.doc.createTextNode(b);this.currentElement?this.currentElement.appendChild(N):/^\s*$/.test(b)&&this.doc.appendChild(N),this.locator&&l(this.locator,N)}},skippedEntity:function(b){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(b){(this.locator=b)&&(b.lineNumber=0)},comment:function(b,g,v){b=y.apply(this,arguments);var N=this.doc.createComment(b);this.locator&&l(this.locator,N),w(this,N)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(b,g,v){var N=this.doc.implementation;if(N&&N.createDocumentType){var j=N.createDocumentType(b,g,v);this.locator&&l(this.locator,j),w(this,j),this.doc.doctype=j}},warning:function(b){console.warn("[xmldom warning] "+b,p(this.locator))},error:function(b){console.error("[xmldom error] "+b,p(this.locator))},fatalError:function(b){throw new u(b,this.locator)}};function p(b){if(b)return`
|
|
112
|
-
@`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function y(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return Ha.__DOMHandler=h,Ha.normalizeLineEndings=d,Ha.DOMParser=f,Ha}var Cu;function Sh(){if(Cu)return za;Cu=1;var e=Xc();return za.DOMImplementation=e.DOMImplementation,za.XMLSerializer=e.XMLSerializer,za.DOMParser=Ah().DOMParser,za}var Wa={},Tt={},Os={},Jn={},Ps={},Du;function vn(){if(Du)return Ps;Du=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=xn();let a=class extends e.default{constructor(i,r){super(i,r)}};return Ps.UniverseLogError=a,Ps}var Tu;function us(){return Tu||(Tu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=vn();(function(s){s.error="error",s.warn="warn",s.info="info",s.http="http",s.verbose="verbose",s.debug="debug",s.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(s){s.LEVELS_VALUES={[s.error]:0,[s.warn]:1,[s.info]:2,[s.http]:3,[s.verbose]:4,[s.debug]:5,[s.silly]:6},s.LEVELS_BY_NAME={[s.error]:s.error,[s.warn]:s.warn,[s.info]:s.info,[s.http]:s.http,[s.verbose]:s.verbose,[s.debug]:s.debug,[s.silly]:s.silly},s.DEFAULT_LEVEL=s.info;function i(d){if(typeof s.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(s.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return s.LEVELS_BY_NAME[d]}s.valueOf=i;function r(d){if(typeof s.LEVELS_VALUES[d]>"u"){const f=Object.keys(s.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return s.LEVELS_VALUES[d]}s.levelToValue=r;function n(d){return r(d.level)<=r(d.threshold)}s.isLessOrEquallyVerbose=n;function u(d,f){return s.LEVELS_VALUES[d]>s.LEVELS_VALUES[f]?d:f}s.moreVerbose=u;function c(d,f){return s.LEVELS_VALUES[d]<s.LEVELS_VALUES[f]?d:f}s.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Jn)),Jn}var Ls={},oa={},Yn={exports:{}},Ou;function Qc(){return Ou||(Ou=1,(function(e){e.exports=(function(s){var i={};function r(n){if(i[n])return i[n].exports;var u=i[n]={i:n,l:!1,exports:{}};return s[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=s,r.c=i,r.d=function(n,u,c){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)r.d(c,d,(function(f){return n[f]}).bind(null,d));return c},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=4)})([function(s,i,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=r(8),d=r(2),f=r(16);i.validatorSymbol=Symbol("validators"),i.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,y)=>`Expected ${y&&y.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:y}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(y(o,b,w),h)}}get[i.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=typeof URL>"u"?r(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(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(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;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";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const y=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&y.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,N)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(N.length===0)throw new TypeError("Invalid number of values");return g.call(N,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),s.exports=o,i.default=o},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.testSymbol=Symbol("test"),i.isPredicate=(n=>!!(n&&n[i.testSymbol]))},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(s,i,r){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(10)),c=r(11),d=r(0);i.Predicate=d.Predicate;const f=r(2),o=n(r(17)),h=n(r(6)),l=n(r(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),i.default=h.default(o.default(p));var y=r(6);i.StringPredicate=y.StringPredicate,i.NumberPredicate=y.NumberPredicate,i.BooleanPredicate=y.BooleanPredicate,i.ArrayPredicate=y.ArrayPredicate,i.ObjectPredicate=y.ObjectPredicate,i.DatePredicate=y.DatePredicate,i.ErrorPredicate=y.ErrorPredicate,i.MapPredicate=y.MapPredicate,i.WeakMapPredicate=y.WeakMapPredicate,i.SetPredicate=y.SetPredicate,i.WeakSetPredicate=y.WeakSetPredicate,i.AnyPredicate=y.AnyPredicate},function(s,i,r){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",y="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",N="[object Map]",j="[object Number]",x="[object Null]",m="[object Object]",k="[object Proxy]",_="[object RegExp]",E="[object Set]",D="[object String]",C="[object Symbol]",P="[object Undefined]",L="[object ArrayBuffer]",H="[object DataView]",F=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[h]=M[l]=M[L]=M[y]=M[H]=M[w]=M[b]=M[g]=M[N]=M[j]=M[m]=M[_]=M[E]=M[D]=M["[object WeakMap]"]=!1;var G=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,X=typeof self=="object"&&self&&self.Object===Object&&self,ee=G||X||Function("return this")(),R=i&&!i.nodeType&&i,ie=R&&typeof n=="object"&&n&&!n.nodeType&&n,I=ie&&ie.exports===R,V=I&&G.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),ue=J&&J.isTypedArray;function Q(B,Y){for(var oe=-1,le=B==null?0:B.length;++oe<le;)if(Y(B[oe],oe,B))return!0;return!1}function te(B){var Y=-1,oe=Array(B.size);return B.forEach(function(le,Oe){oe[++Y]=[Oe,le]}),oe}function me(B){var Y=-1,oe=Array(B.size);return B.forEach(function(le){oe[++Y]=le}),oe}var Se,Z,ae,re=Array.prototype,de=Function.prototype,ye=Object.prototype,be=ee["__core-js_shared__"],_e=de.toString,ge=ye.hasOwnProperty,Ke=(Se=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||""))?"Symbol(src)_1."+Se:"",je=ye.toString,he=RegExp("^"+_e.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=I?ee.Buffer:void 0,Me=ee.Symbol,ze=ee.Uint8Array,Pt=ye.propertyIsEnumerable,er=re.splice,et=Me?Me.toStringTag:void 0,tr=Object.getOwnPropertySymbols,Er=Ce?Ce.isBuffer:void 0,at=(Z=Object.keys,ae=Object,function(B){return Z(ae(B))}),Lt=Rt(ee,"DataView"),Nt=Rt(ee,"Map"),hr=Rt(ee,"Promise"),rr=Rt(ee,"Set"),Mt=Rt(ee,"WeakMap"),jt=Rt(Object,"create"),$t=ar(Lt),Kr=ar(Nt),gt=ar(hr),Ar=ar(rr),A=ar(Mt),S=Me?Me.prototype:void 0,$=S?S.valueOf:void 0;function W(B){var Y=-1,oe=B==null?0:B.length;for(this.clear();++Y<oe;){var le=B[Y];this.set(le[0],le[1])}}function se(B){var Y=-1,oe=B==null?0:B.length;for(this.clear();++Y<oe;){var le=B[Y];this.set(le[0],le[1])}}function pe(B){var Y=-1,oe=B==null?0:B.length;for(this.clear();++Y<oe;){var le=B[Y];this.set(le[0],le[1])}}function Ee(B){var Y=-1,oe=B==null?0:B.length;for(this.__data__=new pe;++Y<oe;)this.add(B[Y])}function Te(B){var Y=this.__data__=new se(B);this.size=Y.size}function bt(B,Y){var oe=ea(B),le=!oe&&Sn(B),Oe=!oe&&!le&&ma(B),ke=!oe&&!le&&!Oe&&ps(B),$e=oe||le||Oe||ke,Be=$e?(function(Re,At){for(var ut=-1,Je=Array(Re);++ut<Re;)Je[ut]=At(ut);return Je})(B.length,String):[],yt=Be.length;for(var Ve in B)!ge.call(B,Ve)||$e&&(Ve=="length"||Oe&&(Ve=="offset"||Ve=="parent")||ke&&(Ve=="buffer"||Ve=="byteLength"||Ve=="byteOffset")||It(Ve,yt))||Be.push(Ve);return Be}function ot(B,Y){for(var oe=B.length;oe--;)if(ds(B[oe][0],Y))return oe;return-1}function tt(B){return B==null?B===void 0?P:x:et&&et in Object(B)?(function(Y){var oe=ge.call(Y,et),le=Y[et];try{Y[et]=void 0;var Oe=!0}catch{}var ke=je.call(Y);return Oe&&(oe?Y[et]=le:delete Y[et]),ke})(B):(function(Y){return je.call(Y)})(B)}function kt(B){return Sr(B)&&tt(B)==h}function _t(B,Y,oe,le,Oe){return B===Y||(B==null||Y==null||!Sr(B)&&!Sr(Y)?B!=B&&Y!=Y:(function(ke,$e,Be,yt,Ve,Re){var At=ea(ke),ut=ea($e),Je=At?l:xt(ke),St=ut?l:xt($e),pr=(Je=Je==h?m:Je)==m,ta=(St=St==h?m:St)==m,mr=Je==St;if(mr&&ma(ke)){if(!ma($e))return!1;At=!0,pr=!1}if(mr&&!pr)return Re||(Re=new Te),At||ps(ke)?Ge(ke,$e,Be,yt,Ve,Re):(function(De,Ae,Ft,Yt,ba,Ue,Bt){switch(Ft){case H:if(De.byteLength!=Ae.byteLength||De.byteOffset!=Ae.byteOffset)return!1;De=De.buffer,Ae=Ae.buffer;case L:return!(De.byteLength!=Ae.byteLength||!Ue(new ze(De),new ze(Ae)));case y:case w:case j:return ds(+De,+Ae);case b:return De.name==Ae.name&&De.message==Ae.message;case _:case D:return De==Ae+"";case N:var Zt=te;case E:var Dr=Yt&d;if(Zt||(Zt=me),De.size!=Ae.size&&!Dr)return!1;var ra=Bt.get(De);if(ra)return ra==Ae;Yt|=f,Bt.set(De,Ae);var gr=Ge(Zt(De),Zt(Ae),Yt,ba,Ue,Bt);return Bt.delete(De),gr;case C:if($)return $.call(De)==$.call(Ae)}return!1})(ke,$e,Je,Be,yt,Ve,Re);if(!(Be&d)){var Cr=pr&&ge.call(ke,"__wrapped__"),ga=ta&&ge.call($e,"__wrapped__");if(Cr||ga){var Dn=Cr?ke.value():ke,Tn=ga?$e.value():$e;return Re||(Re=new Te),Ve(Dn,Tn,Be,yt,Re)}}return mr?(Re||(Re=new Te),(function(De,Ae,Ft,Yt,ba,Ue){var Bt=Ft&d,Zt=Wt(De),Dr=Zt.length,ra=Wt(Ae).length;if(Dr!=ra&&!Bt)return!1;for(var gr=Dr;gr--;){var nt=Zt[gr];if(!(Bt?nt in Ae:ge.call(Ae,nt)))return!1}var xa=Ue.get(De);if(xa&&Ue.get(Ae))return xa==Ae;var aa=!0;Ue.set(De,Ae),Ue.set(Ae,De);for(var br=Bt;++gr<Dr;){nt=Zt[gr];var sa=De[nt],xr=Ae[nt];if(Yt)var ms=Bt?Yt(xr,sa,nt,Ae,De,Ue):Yt(sa,xr,nt,De,Ae,Ue);if(!(ms===void 0?sa===xr||ba(sa,xr,Ft,Yt,Ue):ms)){aa=!1;break}br||(br=nt=="constructor")}if(aa&&!br){var Tr=De.constructor,Or=Ae.constructor;Tr!=Or&&"constructor"in De&&"constructor"in Ae&&!(typeof Tr=="function"&&Tr instanceof Tr&&typeof Or=="function"&&Or instanceof Or)&&(aa=!1)}return Ue.delete(De),Ue.delete(Ae),aa})(ke,$e,Be,yt,Ve,Re)):!1})(B,Y,oe,le,_t,Oe))}function Et(B){return!(!hs(B)||(Y=B,Ke&&Ke in Y))&&(Jt(B)?he:F).test(ar(B));var Y}function st(B){if(oe=(Y=B)&&Y.constructor,le=typeof oe=="function"&&oe.prototype||ye,Y!==le)return at(B);var Y,oe,le,Oe=[];for(var ke in Object(B))ge.call(B,ke)&&ke!="constructor"&&Oe.push(ke);return Oe}function Ge(B,Y,oe,le,Oe,ke){var $e=oe&d,Be=B.length,yt=Y.length;if(Be!=yt&&!($e&&yt>Be))return!1;var Ve=ke.get(B);if(Ve&&ke.get(Y))return Ve==Y;var Re=-1,At=!0,ut=oe&f?new Ee:void 0;for(ke.set(B,Y),ke.set(Y,B);++Re<Be;){var Je=B[Re],St=Y[Re];if(le)var pr=$e?le(St,Je,Re,Y,B,ke):le(Je,St,Re,B,Y,ke);if(pr!==void 0){if(pr)continue;At=!1;break}if(ut){if(!Q(Y,function(ta,mr){if(Cr=mr,!ut.has(Cr)&&(Je===ta||Oe(Je,ta,oe,le,ke)))return ut.push(mr);var Cr})){At=!1;break}}else if(Je!==St&&!Oe(Je,St,oe,le,ke)){At=!1;break}}return ke.delete(B),ke.delete(Y),At}function Wt(B){return(function(Y,oe,le){var Oe=oe(Y);return ea(Y)?Oe:(function(ke,$e){for(var Be=-1,yt=$e.length,Ve=ke.length;++Be<yt;)ke[Ve+Be]=$e[Be];return ke})(Oe,le(Y))})(B,Cn,Gt)}function Ie(B,Y){var oe,le,Oe=B.__data__;return((le=typeof(oe=Y))=="string"||le=="number"||le=="symbol"||le=="boolean"?oe!=="__proto__":oe===null)?Oe[typeof Y=="string"?"string":"hash"]:Oe.map}function Rt(B,Y){var oe=(function(le,Oe){return le?.[Oe]})(B,Y);return Et(oe)?oe:void 0}W.prototype.clear=function(){this.__data__=jt?jt(null):{},this.size=0},W.prototype.delete=function(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y},W.prototype.get=function(B){var Y=this.__data__;if(jt){var oe=Y[B];return oe===c?void 0:oe}return ge.call(Y,B)?Y[B]:void 0},W.prototype.has=function(B){var Y=this.__data__;return jt?Y[B]!==void 0:ge.call(Y,B)},W.prototype.set=function(B,Y){var oe=this.__data__;return this.size+=this.has(B)?0:1,oe[B]=jt&&Y===void 0?c:Y,this},se.prototype.clear=function(){this.__data__=[],this.size=0},se.prototype.delete=function(B){var Y=this.__data__,oe=ot(Y,B);return!(oe<0||(oe==Y.length-1?Y.pop():er.call(Y,oe,1),--this.size,0))},se.prototype.get=function(B){var Y=this.__data__,oe=ot(Y,B);return oe<0?void 0:Y[oe][1]},se.prototype.has=function(B){return ot(this.__data__,B)>-1},se.prototype.set=function(B,Y){var oe=this.__data__,le=ot(oe,B);return le<0?(++this.size,oe.push([B,Y])):oe[le][1]=Y,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(Nt||se),string:new W}},pe.prototype.delete=function(B){var Y=Ie(this,B).delete(B);return this.size-=Y?1:0,Y},pe.prototype.get=function(B){return Ie(this,B).get(B)},pe.prototype.has=function(B){return Ie(this,B).has(B)},pe.prototype.set=function(B,Y){var oe=Ie(this,B),le=oe.size;return oe.set(B,Y),this.size+=oe.size==le?0:1,this},Ee.prototype.add=Ee.prototype.push=function(B){return this.__data__.set(B,c),this},Ee.prototype.has=function(B){return this.__data__.has(B)},Te.prototype.clear=function(){this.__data__=new se,this.size=0},Te.prototype.delete=function(B){var Y=this.__data__,oe=Y.delete(B);return this.size=Y.size,oe},Te.prototype.get=function(B){return this.__data__.get(B)},Te.prototype.has=function(B){return this.__data__.has(B)},Te.prototype.set=function(B,Y){var oe=this.__data__;if(oe instanceof se){var le=oe.__data__;if(!Nt||le.length<u-1)return le.push([B,Y]),this.size=++oe.size,this;oe=this.__data__=new pe(le)}return oe.set(B,Y),this.size=oe.size,this};var Gt=tr?function(B){return B==null?[]:(B=Object(B),(function(Y,oe){for(var le=-1,Oe=Y==null?0:Y.length,ke=0,$e=[];++le<Oe;){var Be=Y[le];oe(Be,le,Y)&&($e[ke++]=Be)}return $e})(tr(B),function(Y){return Pt.call(B,Y)}))}:function(){return[]},xt=tt;function It(B,Y){return!!(Y=Y??o)&&(typeof B=="number"||q.test(B))&&B>-1&&B%1==0&&B<Y}function ar(B){if(B!=null){try{return _e.call(B)}catch{}try{return B+""}catch{}}return""}function ds(B,Y){return B===Y||B!=B&&Y!=Y}(Lt&&xt(new Lt(new ArrayBuffer(1)))!=H||Nt&&xt(new Nt)!=N||hr&&xt(hr.resolve())!="[object Promise]"||rr&&xt(new rr)!=E||Mt&&xt(new Mt)!="[object WeakMap]")&&(xt=function(B){var Y=tt(B),oe=Y==m?B.constructor:void 0,le=oe?ar(oe):"";if(le)switch(le){case $t:return H;case Kr:return N;case gt:return"[object Promise]";case Ar:return E;case A:return"[object WeakMap]"}return Y});var Sn=kt((function(){return arguments})())?kt:function(B){return Sr(B)&&ge.call(B,"callee")&&!Pt.call(B,"callee")},ea=Array.isArray,ma=Er||function(){return!1};function Jt(B){if(!hs(B))return!1;var Y=tt(B);return Y==g||Y==v||Y==p||Y==k}function fs(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function hs(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function Sr(B){return B!=null&&typeof B=="object"}var ps=ue?(function(B){return function(Y){return B(Y)}})(ue):function(B){return Sr(B)&&fs(B.length)&&!!M[tt(B)]};function Cn(B){return(Y=B)!=null&&fs(Y.length)&&!Jt(Y)?bt(B):st(B);var Y}n.exports=function(B,Y){return _t(B,Y)}}).call(this,r(23)(s))},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(18);i.StringPredicate=n.StringPredicate;const u=r(20);i.NumberPredicate=u.NumberPredicate;const c=r(21);i.BooleanPredicate=c.BooleanPredicate;const d=r(0),f=r(22);i.ArrayPredicate=f.ArrayPredicate;const o=r(24);i.ObjectPredicate=o.ObjectPredicate;const h=r(29);i.DatePredicate=h.DatePredicate;const l=r(30);i.ErrorPredicate=l.ErrorPredicate;const p=r(31);i.MapPredicate=p.MapPredicate;const y=r(32);i.WeakMapPredicate=y.WeakMapPredicate;const w=r(33);i.SetPredicate=w.SetPredicate;const b=r(34);i.WeakSetPredicate=b.WeakSetPredicate;const g=r(35);i.AnyPredicate=g.AnyPredicate,i.default=((v,N)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(N)},number:{get:()=>new u.NumberPredicate(N)},boolean:{get:()=>new c.BooleanPredicate(N)},undefined:{get:()=>new d.Predicate("undefined",N)},null:{get:()=>new d.Predicate("null",N)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",N)},nan:{get:()=>new d.Predicate("nan",N)},symbol:{get:()=>new d.Predicate("symbol",N)},array:{get:()=>new f.ArrayPredicate(N)},object:{get:()=>new o.ObjectPredicate(N)},date:{get:()=>new h.DatePredicate(N)},error:{get:()=>new l.ErrorPredicate(N)},map:{get:()=>new p.MapPredicate(N)},weakMap:{get:()=>new y.WeakMapPredicate(N)},set:{get:()=>new w.SetPredicate(N)},weakSet:{get:()=>new b.WeakSetPredicate(N)},function:{get:()=>new d.Predicate("Function",N)},buffer:{get:()=>new d.Predicate("Buffer",N)},regExp:{get:()=>new d.Predicate("RegExp",N)},promise:{get:()=>new d.Predicate("Promise",N)},typedArray:{get:()=>new d.Predicate("TypedArray",N)},int8Array:{get:()=>new d.Predicate("Int8Array",N)},uint8Array:{get:()=>new d.Predicate("Uint8Array",N)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",N)},int16Array:{get:()=>new d.Predicate("Int16Array",N)},uint16Array:{get:()=>new d.Predicate("Uint16Array",N)},int32Array:{get:()=>new d.Predicate("Int32Array",N)},uint32Array:{get:()=>new d.Predicate("Uint32Array",N)},float32Array:{get:()=>new d.Predicate("Float32Array",N)},float64Array:{get:()=>new d.Predicate("Float64Array",N)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",N)},dataView:{get:()=>new d.Predicate("DataView",N)},iterable:{get:()=>new d.Predicate("Iterable",N)},any:{value:(...j)=>new g.AnyPredicate(j,N)}}),v))},function(s,i,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(4));i.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(2);i.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(s,i,r){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};s.exports=n,s.exports.default=n},function(s,i,r){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(i,"__esModule",{value:!0});const c=n(r(12)),d=u(r(13)),f=u(r(14)),o=/^.*?\((.*?)[,)]/;i.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),y=l.getLineNumber(),w=l.getColumnNumber();if(!p||y===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
|
|
112
|
+
@`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function y(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return Ha.__DOMHandler=h,Ha.normalizeLineEndings=d,Ha.DOMParser=f,Ha}var Cu;function Ah(){if(Cu)return za;Cu=1;var e=Xc();return za.DOMImplementation=e.DOMImplementation,za.XMLSerializer=e.XMLSerializer,za.DOMParser=Eh().DOMParser,za}var Wa={},Tt={},Os={},Jn={},Ps={},Du;function vn(){if(Du)return Ps;Du=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=xn();let a=class extends e.default{constructor(i,r){super(i,r)}};return Ps.UniverseLogError=a,Ps}var Tu;function us(){return Tu||(Tu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=vn();(function(s){s.error="error",s.warn="warn",s.info="info",s.http="http",s.verbose="verbose",s.debug="debug",s.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(s){s.LEVELS_VALUES={[s.error]:0,[s.warn]:1,[s.info]:2,[s.http]:3,[s.verbose]:4,[s.debug]:5,[s.silly]:6},s.LEVELS_BY_NAME={[s.error]:s.error,[s.warn]:s.warn,[s.info]:s.info,[s.http]:s.http,[s.verbose]:s.verbose,[s.debug]:s.debug,[s.silly]:s.silly},s.DEFAULT_LEVEL=s.info;function i(d){if(typeof s.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(s.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return s.LEVELS_BY_NAME[d]}s.valueOf=i;function r(d){if(typeof s.LEVELS_VALUES[d]>"u"){const f=Object.keys(s.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return s.LEVELS_VALUES[d]}s.levelToValue=r;function n(d){return r(d.level)<=r(d.threshold)}s.isLessOrEquallyVerbose=n;function u(d,f){return s.LEVELS_VALUES[d]>s.LEVELS_VALUES[f]?d:f}s.moreVerbose=u;function c(d,f){return s.LEVELS_VALUES[d]<s.LEVELS_VALUES[f]?d:f}s.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Jn)),Jn}var Ls={},oa={},Yn={exports:{}},Ou;function Qc(){return Ou||(Ou=1,(function(e){e.exports=(function(s){var i={};function r(n){if(i[n])return i[n].exports;var u=i[n]={i:n,l:!1,exports:{}};return s[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=s,r.c=i,r.d=function(n,u,c){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)r.d(c,d,(function(f){return n[f]}).bind(null,d));return c},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=4)})([function(s,i,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=r(8),d=r(2),f=r(16);i.validatorSymbol=Symbol("validators"),i.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,y)=>`Expected ${y&&y.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:y}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(y(o,b,w),h)}}get[i.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=typeof URL>"u"?r(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(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(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;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";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const y=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&y.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,N)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(N.length===0)throw new TypeError("Invalid number of values");return g.call(N,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),s.exports=o,i.default=o},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.testSymbol=Symbol("test"),i.isPredicate=(n=>!!(n&&n[i.testSymbol]))},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(s,i,r){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(10)),c=r(11),d=r(0);i.Predicate=d.Predicate;const f=r(2),o=n(r(17)),h=n(r(6)),l=n(r(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),i.default=h.default(o.default(p));var y=r(6);i.StringPredicate=y.StringPredicate,i.NumberPredicate=y.NumberPredicate,i.BooleanPredicate=y.BooleanPredicate,i.ArrayPredicate=y.ArrayPredicate,i.ObjectPredicate=y.ObjectPredicate,i.DatePredicate=y.DatePredicate,i.ErrorPredicate=y.ErrorPredicate,i.MapPredicate=y.MapPredicate,i.WeakMapPredicate=y.WeakMapPredicate,i.SetPredicate=y.SetPredicate,i.WeakSetPredicate=y.WeakSetPredicate,i.AnyPredicate=y.AnyPredicate},function(s,i,r){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",y="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",N="[object Map]",j="[object Number]",x="[object Null]",m="[object Object]",k="[object Proxy]",_="[object RegExp]",E="[object Set]",D="[object String]",C="[object Symbol]",P="[object Undefined]",L="[object ArrayBuffer]",H="[object DataView]",F=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[h]=M[l]=M[L]=M[y]=M[H]=M[w]=M[b]=M[g]=M[N]=M[j]=M[m]=M[_]=M[E]=M[D]=M["[object WeakMap]"]=!1;var G=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,X=typeof self=="object"&&self&&self.Object===Object&&self,ee=G||X||Function("return this")(),R=i&&!i.nodeType&&i,ne=R&&typeof n=="object"&&n&&!n.nodeType&&n,I=ne&&ne.exports===R,V=I&&G.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),ue=J&&J.isTypedArray;function Q(B,Y){for(var ie=-1,le=B==null?0:B.length;++ie<le;)if(Y(B[ie],ie,B))return!0;return!1}function te(B){var Y=-1,ie=Array(B.size);return B.forEach(function(le,Oe){ie[++Y]=[Oe,le]}),ie}function me(B){var Y=-1,ie=Array(B.size);return B.forEach(function(le){ie[++Y]=le}),ie}var Se,Z,ae,re=Array.prototype,de=Function.prototype,ye=Object.prototype,be=ee["__core-js_shared__"],_e=de.toString,ge=ye.hasOwnProperty,Ke=(Se=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||""))?"Symbol(src)_1."+Se:"",je=ye.toString,he=RegExp("^"+_e.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=I?ee.Buffer:void 0,Me=ee.Symbol,ze=ee.Uint8Array,Pt=ye.propertyIsEnumerable,er=re.splice,et=Me?Me.toStringTag:void 0,tr=Object.getOwnPropertySymbols,Er=Ce?Ce.isBuffer:void 0,at=(Z=Object.keys,ae=Object,function(B){return Z(ae(B))}),Lt=Rt(ee,"DataView"),Nt=Rt(ee,"Map"),hr=Rt(ee,"Promise"),rr=Rt(ee,"Set"),Mt=Rt(ee,"WeakMap"),jt=Rt(Object,"create"),$t=ar(Lt),Kr=ar(Nt),gt=ar(hr),Ar=ar(rr),A=ar(Mt),S=Me?Me.prototype:void 0,$=S?S.valueOf:void 0;function W(B){var Y=-1,ie=B==null?0:B.length;for(this.clear();++Y<ie;){var le=B[Y];this.set(le[0],le[1])}}function se(B){var Y=-1,ie=B==null?0:B.length;for(this.clear();++Y<ie;){var le=B[Y];this.set(le[0],le[1])}}function pe(B){var Y=-1,ie=B==null?0:B.length;for(this.clear();++Y<ie;){var le=B[Y];this.set(le[0],le[1])}}function Ee(B){var Y=-1,ie=B==null?0:B.length;for(this.__data__=new pe;++Y<ie;)this.add(B[Y])}function Te(B){var Y=this.__data__=new se(B);this.size=Y.size}function bt(B,Y){var ie=ea(B),le=!ie&&Sn(B),Oe=!ie&&!le&&ma(B),ke=!ie&&!le&&!Oe&&ps(B),$e=ie||le||Oe||ke,Be=$e?(function(Re,At){for(var ut=-1,Je=Array(Re);++ut<Re;)Je[ut]=At(ut);return Je})(B.length,String):[],yt=Be.length;for(var Ve in B)!ge.call(B,Ve)||$e&&(Ve=="length"||Oe&&(Ve=="offset"||Ve=="parent")||ke&&(Ve=="buffer"||Ve=="byteLength"||Ve=="byteOffset")||It(Ve,yt))||Be.push(Ve);return Be}function ot(B,Y){for(var ie=B.length;ie--;)if(ds(B[ie][0],Y))return ie;return-1}function tt(B){return B==null?B===void 0?P:x:et&&et in Object(B)?(function(Y){var ie=ge.call(Y,et),le=Y[et];try{Y[et]=void 0;var Oe=!0}catch{}var ke=je.call(Y);return Oe&&(ie?Y[et]=le:delete Y[et]),ke})(B):(function(Y){return je.call(Y)})(B)}function kt(B){return Sr(B)&&tt(B)==h}function _t(B,Y,ie,le,Oe){return B===Y||(B==null||Y==null||!Sr(B)&&!Sr(Y)?B!=B&&Y!=Y:(function(ke,$e,Be,yt,Ve,Re){var At=ea(ke),ut=ea($e),Je=At?l:xt(ke),St=ut?l:xt($e),pr=(Je=Je==h?m:Je)==m,ta=(St=St==h?m:St)==m,mr=Je==St;if(mr&&ma(ke)){if(!ma($e))return!1;At=!0,pr=!1}if(mr&&!pr)return Re||(Re=new Te),At||ps(ke)?Ge(ke,$e,Be,yt,Ve,Re):(function(De,Ae,Ft,Yt,ba,Ue,Bt){switch(Ft){case H:if(De.byteLength!=Ae.byteLength||De.byteOffset!=Ae.byteOffset)return!1;De=De.buffer,Ae=Ae.buffer;case L:return!(De.byteLength!=Ae.byteLength||!Ue(new ze(De),new ze(Ae)));case y:case w:case j:return ds(+De,+Ae);case b:return De.name==Ae.name&&De.message==Ae.message;case _:case D:return De==Ae+"";case N:var Zt=te;case E:var Dr=Yt&d;if(Zt||(Zt=me),De.size!=Ae.size&&!Dr)return!1;var ra=Bt.get(De);if(ra)return ra==Ae;Yt|=f,Bt.set(De,Ae);var gr=Ge(Zt(De),Zt(Ae),Yt,ba,Ue,Bt);return Bt.delete(De),gr;case C:if($)return $.call(De)==$.call(Ae)}return!1})(ke,$e,Je,Be,yt,Ve,Re);if(!(Be&d)){var Cr=pr&&ge.call(ke,"__wrapped__"),ga=ta&&ge.call($e,"__wrapped__");if(Cr||ga){var Dn=Cr?ke.value():ke,Tn=ga?$e.value():$e;return Re||(Re=new Te),Ve(Dn,Tn,Be,yt,Re)}}return mr?(Re||(Re=new Te),(function(De,Ae,Ft,Yt,ba,Ue){var Bt=Ft&d,Zt=Wt(De),Dr=Zt.length,ra=Wt(Ae).length;if(Dr!=ra&&!Bt)return!1;for(var gr=Dr;gr--;){var nt=Zt[gr];if(!(Bt?nt in Ae:ge.call(Ae,nt)))return!1}var xa=Ue.get(De);if(xa&&Ue.get(Ae))return xa==Ae;var aa=!0;Ue.set(De,Ae),Ue.set(Ae,De);for(var br=Bt;++gr<Dr;){nt=Zt[gr];var sa=De[nt],xr=Ae[nt];if(Yt)var ms=Bt?Yt(xr,sa,nt,Ae,De,Ue):Yt(sa,xr,nt,De,Ae,Ue);if(!(ms===void 0?sa===xr||ba(sa,xr,Ft,Yt,Ue):ms)){aa=!1;break}br||(br=nt=="constructor")}if(aa&&!br){var Tr=De.constructor,Or=Ae.constructor;Tr!=Or&&"constructor"in De&&"constructor"in Ae&&!(typeof Tr=="function"&&Tr instanceof Tr&&typeof Or=="function"&&Or instanceof Or)&&(aa=!1)}return Ue.delete(De),Ue.delete(Ae),aa})(ke,$e,Be,yt,Ve,Re)):!1})(B,Y,ie,le,_t,Oe))}function Et(B){return!(!hs(B)||(Y=B,Ke&&Ke in Y))&&(Jt(B)?he:F).test(ar(B));var Y}function st(B){if(ie=(Y=B)&&Y.constructor,le=typeof ie=="function"&&ie.prototype||ye,Y!==le)return at(B);var Y,ie,le,Oe=[];for(var ke in Object(B))ge.call(B,ke)&&ke!="constructor"&&Oe.push(ke);return Oe}function Ge(B,Y,ie,le,Oe,ke){var $e=ie&d,Be=B.length,yt=Y.length;if(Be!=yt&&!($e&&yt>Be))return!1;var Ve=ke.get(B);if(Ve&&ke.get(Y))return Ve==Y;var Re=-1,At=!0,ut=ie&f?new Ee:void 0;for(ke.set(B,Y),ke.set(Y,B);++Re<Be;){var Je=B[Re],St=Y[Re];if(le)var pr=$e?le(St,Je,Re,Y,B,ke):le(Je,St,Re,B,Y,ke);if(pr!==void 0){if(pr)continue;At=!1;break}if(ut){if(!Q(Y,function(ta,mr){if(Cr=mr,!ut.has(Cr)&&(Je===ta||Oe(Je,ta,ie,le,ke)))return ut.push(mr);var Cr})){At=!1;break}}else if(Je!==St&&!Oe(Je,St,ie,le,ke)){At=!1;break}}return ke.delete(B),ke.delete(Y),At}function Wt(B){return(function(Y,ie,le){var Oe=ie(Y);return ea(Y)?Oe:(function(ke,$e){for(var Be=-1,yt=$e.length,Ve=ke.length;++Be<yt;)ke[Ve+Be]=$e[Be];return ke})(Oe,le(Y))})(B,Cn,Gt)}function Ie(B,Y){var ie,le,Oe=B.__data__;return((le=typeof(ie=Y))=="string"||le=="number"||le=="symbol"||le=="boolean"?ie!=="__proto__":ie===null)?Oe[typeof Y=="string"?"string":"hash"]:Oe.map}function Rt(B,Y){var ie=(function(le,Oe){return le?.[Oe]})(B,Y);return Et(ie)?ie:void 0}W.prototype.clear=function(){this.__data__=jt?jt(null):{},this.size=0},W.prototype.delete=function(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y},W.prototype.get=function(B){var Y=this.__data__;if(jt){var ie=Y[B];return ie===c?void 0:ie}return ge.call(Y,B)?Y[B]:void 0},W.prototype.has=function(B){var Y=this.__data__;return jt?Y[B]!==void 0:ge.call(Y,B)},W.prototype.set=function(B,Y){var ie=this.__data__;return this.size+=this.has(B)?0:1,ie[B]=jt&&Y===void 0?c:Y,this},se.prototype.clear=function(){this.__data__=[],this.size=0},se.prototype.delete=function(B){var Y=this.__data__,ie=ot(Y,B);return!(ie<0||(ie==Y.length-1?Y.pop():er.call(Y,ie,1),--this.size,0))},se.prototype.get=function(B){var Y=this.__data__,ie=ot(Y,B);return ie<0?void 0:Y[ie][1]},se.prototype.has=function(B){return ot(this.__data__,B)>-1},se.prototype.set=function(B,Y){var ie=this.__data__,le=ot(ie,B);return le<0?(++this.size,ie.push([B,Y])):ie[le][1]=Y,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(Nt||se),string:new W}},pe.prototype.delete=function(B){var Y=Ie(this,B).delete(B);return this.size-=Y?1:0,Y},pe.prototype.get=function(B){return Ie(this,B).get(B)},pe.prototype.has=function(B){return Ie(this,B).has(B)},pe.prototype.set=function(B,Y){var ie=Ie(this,B),le=ie.size;return ie.set(B,Y),this.size+=ie.size==le?0:1,this},Ee.prototype.add=Ee.prototype.push=function(B){return this.__data__.set(B,c),this},Ee.prototype.has=function(B){return this.__data__.has(B)},Te.prototype.clear=function(){this.__data__=new se,this.size=0},Te.prototype.delete=function(B){var Y=this.__data__,ie=Y.delete(B);return this.size=Y.size,ie},Te.prototype.get=function(B){return this.__data__.get(B)},Te.prototype.has=function(B){return this.__data__.has(B)},Te.prototype.set=function(B,Y){var ie=this.__data__;if(ie instanceof se){var le=ie.__data__;if(!Nt||le.length<u-1)return le.push([B,Y]),this.size=++ie.size,this;ie=this.__data__=new pe(le)}return ie.set(B,Y),this.size=ie.size,this};var Gt=tr?function(B){return B==null?[]:(B=Object(B),(function(Y,ie){for(var le=-1,Oe=Y==null?0:Y.length,ke=0,$e=[];++le<Oe;){var Be=Y[le];ie(Be,le,Y)&&($e[ke++]=Be)}return $e})(tr(B),function(Y){return Pt.call(B,Y)}))}:function(){return[]},xt=tt;function It(B,Y){return!!(Y=Y??o)&&(typeof B=="number"||q.test(B))&&B>-1&&B%1==0&&B<Y}function ar(B){if(B!=null){try{return _e.call(B)}catch{}try{return B+""}catch{}}return""}function ds(B,Y){return B===Y||B!=B&&Y!=Y}(Lt&&xt(new Lt(new ArrayBuffer(1)))!=H||Nt&&xt(new Nt)!=N||hr&&xt(hr.resolve())!="[object Promise]"||rr&&xt(new rr)!=E||Mt&&xt(new Mt)!="[object WeakMap]")&&(xt=function(B){var Y=tt(B),ie=Y==m?B.constructor:void 0,le=ie?ar(ie):"";if(le)switch(le){case $t:return H;case Kr:return N;case gt:return"[object Promise]";case Ar:return E;case A:return"[object WeakMap]"}return Y});var Sn=kt((function(){return arguments})())?kt:function(B){return Sr(B)&&ge.call(B,"callee")&&!Pt.call(B,"callee")},ea=Array.isArray,ma=Er||function(){return!1};function Jt(B){if(!hs(B))return!1;var Y=tt(B);return Y==g||Y==v||Y==p||Y==k}function fs(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function hs(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function Sr(B){return B!=null&&typeof B=="object"}var ps=ue?(function(B){return function(Y){return B(Y)}})(ue):function(B){return Sr(B)&&fs(B.length)&&!!M[tt(B)]};function Cn(B){return(Y=B)!=null&&fs(Y.length)&&!Jt(Y)?bt(B):st(B);var Y}n.exports=function(B,Y){return _t(B,Y)}}).call(this,r(23)(s))},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(18);i.StringPredicate=n.StringPredicate;const u=r(20);i.NumberPredicate=u.NumberPredicate;const c=r(21);i.BooleanPredicate=c.BooleanPredicate;const d=r(0),f=r(22);i.ArrayPredicate=f.ArrayPredicate;const o=r(24);i.ObjectPredicate=o.ObjectPredicate;const h=r(29);i.DatePredicate=h.DatePredicate;const l=r(30);i.ErrorPredicate=l.ErrorPredicate;const p=r(31);i.MapPredicate=p.MapPredicate;const y=r(32);i.WeakMapPredicate=y.WeakMapPredicate;const w=r(33);i.SetPredicate=w.SetPredicate;const b=r(34);i.WeakSetPredicate=b.WeakSetPredicate;const g=r(35);i.AnyPredicate=g.AnyPredicate,i.default=((v,N)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(N)},number:{get:()=>new u.NumberPredicate(N)},boolean:{get:()=>new c.BooleanPredicate(N)},undefined:{get:()=>new d.Predicate("undefined",N)},null:{get:()=>new d.Predicate("null",N)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",N)},nan:{get:()=>new d.Predicate("nan",N)},symbol:{get:()=>new d.Predicate("symbol",N)},array:{get:()=>new f.ArrayPredicate(N)},object:{get:()=>new o.ObjectPredicate(N)},date:{get:()=>new h.DatePredicate(N)},error:{get:()=>new l.ErrorPredicate(N)},map:{get:()=>new p.MapPredicate(N)},weakMap:{get:()=>new y.WeakMapPredicate(N)},set:{get:()=>new w.SetPredicate(N)},weakSet:{get:()=>new b.WeakSetPredicate(N)},function:{get:()=>new d.Predicate("Function",N)},buffer:{get:()=>new d.Predicate("Buffer",N)},regExp:{get:()=>new d.Predicate("RegExp",N)},promise:{get:()=>new d.Predicate("Promise",N)},typedArray:{get:()=>new d.Predicate("TypedArray",N)},int8Array:{get:()=>new d.Predicate("Int8Array",N)},uint8Array:{get:()=>new d.Predicate("Uint8Array",N)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",N)},int16Array:{get:()=>new d.Predicate("Int16Array",N)},uint16Array:{get:()=>new d.Predicate("Uint16Array",N)},int32Array:{get:()=>new d.Predicate("Int32Array",N)},uint32Array:{get:()=>new d.Predicate("Uint32Array",N)},float32Array:{get:()=>new d.Predicate("Float32Array",N)},float64Array:{get:()=>new d.Predicate("Float64Array",N)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",N)},dataView:{get:()=>new d.Predicate("DataView",N)},iterable:{get:()=>new d.Predicate("Iterable",N)},any:{value:(...j)=>new g.AnyPredicate(j,N)}}),v))},function(s,i,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(4));i.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(2);i.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(s,i,r){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};s.exports=n,s.exports.default=n},function(s,i,r){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(i,"__esModule",{value:!0});const c=n(r(12)),d=u(r(13)),f=u(r(14)),o=/^.*?\((.*?)[,)]/;i.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),y=l.getLineNumber(),w=l.getColumnNumber();if(!p||y===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
|
|
113
113
|
`)}catch{return}let g=b[y-1];if(!g)return;g=g.slice(w-1);const v=o.exec(g);if(!v||!v[1])return;const N=v[1];return d.default(N)||d.default(N.split(".").pop())?N:void 0})},function(s,i){s.exports=mt},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=/^[a-z$_][a-z$_0-9]*$/i,u=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);i.default=(c=>c&&!u.has(c)&&n.test(c))},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(s,i){s.exports=mt},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(0);i.not=(u=>{const c=u.addValidator;return u.addValidator=(d=>{const f=d.validator,o=d.message;return d.message=((h,l)=>`[NOT] ${o(h,l)}`),d.validator=(h=>!f(h)),u[n.validatorSymbol].push(d),u.addValidator=c,u}),u})},function(s,i,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(6));i.default=(c=>(Object.defineProperties(c,{optional:{get:()=>u.default({},{optional:!0})}}),c))},function(s,i,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=n(r(19)),d=r(0);i.StringPredicate=class extends d.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o}\``,validator:o=>o.length<=f})}matches(f){return this.addValidator({message:(o,h)=>`Expected ${h} to match \`${f}\`, got \`${o}\``,validator:o=>f.test(o)})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o}\``,validator:o=>o.startsWith(f)})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o}\``,validator:o=>o.endsWith(f)})}includes(f){return this.addValidator({message:(o,h)=>`Expected ${h} to include \`${f}\`, got \`${o}\``,validator:o=>o.includes(f)})}oneOf(f){return this.addValidator({message:(o,h)=>{let l=JSON.stringify(f);if(f.length>10){const p=f.length-10;l=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${p} more]`)}return`Expected ${h} to be one of \`${l}\`, got \`${o}\``},validator:o=>f.includes(o)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${o}\``,validator:o=>o===f})}get alphanumeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a URL, got \`${f}\``,validator:u.default.urlString})}}},function(s,i,r){s.exports=function(n){return!isNaN(Date.parse(n))}},function(s,i,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=r(0);i.NumberPredicate=class extends c.Predicate{constructor(d){super("number",d)}inRange(d,f){return this.addValidator({message:(o,h)=>`Expected ${h} to be in range [${d}..${f}], got ${o}`,validator:o=>u.default.inRange(o,[d,f])})}greaterThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than ${d}, got ${f}`,validator:f=>f>d})}greaterThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than or equal to ${d}, got ${f}`,validator:f=>f>=d})}lessThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than ${d}, got ${f}`,validator:f=>f<d})}lessThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than or equal to ${d}, got ${f}`,validator:f=>f<=d})}equal(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be equal to ${d}, got ${f}`,validator:f=>f===d})}oneOf(d){return this.addValidator({message:(f,o)=>{let h=JSON.stringify(d);if(d.length>10){const l=d.length-10;h=JSON.stringify(d.slice(0,10)).replace(/]$/,`,…+${l} more]`)}return`Expected ${o} to be one of \`${h}\`, got ${f}`},validator:f=>d.includes(f)})}get integer(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer, got ${d}`,validator:d=>u.default.integer(d)})}get finite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be finite, got ${d}`,validator:d=>!u.default.infinite(d)})}get infinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be infinite, got ${d}`,validator:d=>u.default.infinite(d)})}get positive(){return this.addValidator({message:(d,f)=>`Expected ${f} to be positive, got ${d}`,validator:d=>d>0})}get negative(){return this.addValidator({message:(d,f)=>`Expected ${f} to be negative, got ${d}`,validator:d=>d<0})}get integerOrInfinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer or infinite, got ${d}`,validator:d=>u.default.integer(d)||u.default.infinite(d)})}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(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(0);i.BooleanPredicate=class extends n.Predicate{constructor(u){super("boolean",u)}get true(){return this.addValidator({message:(u,c)=>`Expected ${c} to be true, got ${u}`,validator:u=>u===!0})}get false(){return this.addValidator({message:(u,c)=>`Expected ${c} to be false, got ${u}`,validator:u=>u===!1})}}},function(s,i,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(5)),c=n(r(4)),d=r(0);i.ArrayPredicate=class extends d.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o.length}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length<=f})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o[0]}\``,validator:o=>o[0]===f})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o[o.length-1]}\``,validator:o=>o[o.length-1]===f})}includes(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.every(h=>o.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.some(h=>o.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>u.default(o,f)})}ofType(f){let o;return this.addValidator({message:(h,l)=>`(${l}) ${o}`,validator:h=>{try{for(const l of h)c.default(l,f);return!0}catch(l){return o=l.message,!1}}})}}},function(s,i){s.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(s,i,r){var n=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=n(r(25)),d=n(r(5)),f=r(0),o=n(r(3)),h=n(r(7)),l=n(r(27)),p=r(28);i.ObjectPredicate=class extends f.Predicate{constructor(y){super("object",y)}get plain(){return this.addValidator({message:(y,w)=>`Expected ${w} to be a plain object`,validator:y=>u.default.plainObject(y)})}get empty(){return this.addValidator({message:(y,w)=>`Expected ${w} to be empty, got \`${JSON.stringify(y)}\``,validator:y=>Object.keys(y).length===0})}get nonEmpty(){return this.addValidator({message:(y,w)=>`Expected ${w} to not be empty`,validator:y=>Object.keys(y).length>0})}valuesOfType(y){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>{const b=Object.keys(w).map(g=>w[g]);return h.default(b,y)}})}deepValuesOfType(y){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>l.default(w,y)})}deepEqual(y){return this.addValidator({message:(w,b)=>`Expected ${b} to be deeply equal to \`${JSON.stringify(y)}\`, got \`${JSON.stringify(w)}\``,validator:w=>d.default(w,y)})}instanceOf(y){return this.addValidator({message:(w,b)=>{let g=w.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(w)),`Expected ${b} \`${g}\` to be of type \`${y.name}\``},validator:w=>w instanceof y})}hasKeys(...y){return this.addValidator({message:(w,b,g)=>`Expected ${b} to have keys \`${JSON.stringify(g)}\``,validator:w=>o.default({has:b=>c.default.has(w,b)},y)})}hasAnyKeys(...y){return this.addValidator({message:(w,b)=>`Expected ${b} to have any key of \`${JSON.stringify(y)}\``,validator:w=>y.some(b=>c.default.has(w,b))})}partialShape(y){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.partial(w,y)})}exactShape(y){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.exact(w,y)})}}},function(s,i,r){const n=r(26);function u(c){const d=c.split("."),f=[];for(let o=0;o<d.length;o++){let h=d[o];for(;h[h.length-1]==="\\"&&d[o+1]!==void 0;)h=h.slice(0,-1)+".",h+=d[++o];f.push(h)}return f}s.exports={get(c,d,f){if(!n(c)||typeof d!="string")return f===void 0?c:f;const o=u(d);for(let h=0;h<o.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,o[h]))return f;if((c=c[o[h]])==null){if(h!==o.length-1)return f;break}}return c},set(c,d,f){if(!n(c)||typeof d!="string")return c;const o=c,h=u(d);for(let l=0;l<h.length;l++){const p=h[l];n(c[p])||(c[p]={}),l===h.length-1&&(c[p]=f),c=c[p]}return o},delete(c,d){if(!n(c)||typeof d!="string")return;const f=u(d);for(let o=0;o<f.length;o++){const h=f[o];if(o===f.length-1)return void delete c[h];if(c=c[h],!n(c))return}},has(c,d){if(!n(c)||typeof d!="string")return!1;const f=u(d);for(let o=0;o<f.length;o++){if(!n(c)||!(f[o]in c))return!1;c=c[f[o]]}return!0}}},function(s,i,r){s.exports=function(n){var u=typeof n;return n!==null&&(u==="object"||u==="function")}},function(s,i,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=n(r(4)),d=(f,o)=>u.default.plainObject(f)?Object.keys(f).every(h=>d(f[h],o)):(c.default(f,o),!0);i.default=((f,o)=>{try{return d(f,o)}catch(h){return h.message}})},function(s,i,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(1)),c=n(r(9)),d=r(2);i.partial=function f(o,h,l){try{for(const p of Object.keys(h)){const y=l?`${l}.${p}`:p;if(d.isPredicate(h[p]))c.default(o[p],y,h[p]);else if(u.default.plainObject(h[p])){const w=f(o[p],h[p],y);if(w!==!0)return w}}return!0}catch(p){return p.message}},i.exact=function f(o,h,l){try{const p=new Set(Object.keys(o));for(const y of Object.keys(h)){p.delete(y);const w=l?`${l}.${y}`:y;if(d.isPredicate(h[y]))c.default(o[y],w,h[y]);else if(u.default.plainObject(h[y])){if(!Object.prototype.hasOwnProperty.call(o,y))return`Expected \`${w}\` to exist`;const b=f(o[y],h[y],w);if(b!==!0)return b}}if(p.size>0){const y=Array.from(p.keys())[0];return`Did not expect property \`${l?`${l}.${y}`:y}\` to exist, got \`${o[y]}\``}return!0}catch(p){return p.message}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(0);i.DatePredicate=class extends n.Predicate{constructor(u){super("date",u)}before(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be before ${u.toISOString()}`,validator:c=>c.getTime()<u.getTime()})}after(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be after ${u.toISOString()}`,validator:c=>c.getTime()>u.getTime()})}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(0);i.ErrorPredicate=class extends n.Predicate{constructor(u){super("error",u)}name(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have name \`${u}\`, got \`${c.name}\``,validator:c=>c.name===u})}message(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to be \`${u}\`, got \`${c.message}\``,validator:c=>c.message===u})}messageIncludes(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to include \`${u}\`, got \`${c.message}\``,validator:c=>c.message.includes(u)})}hasKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} message to have keys \`${u.join("`, `")}\``,validator:c=>u.every(d=>c.hasOwnProperty(d))})}instanceOf(u){return this.addValidator({message:(c,d)=>`Expected ${d} \`${c.name}\` to be of type \`${u.name}\``,validator:c=>c instanceof u})}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(s,i,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));i.MapPredicate=class extends c.Predicate{constructor(o){super("Map",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}hasValues(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have values \`${JSON.stringify(p)}\``,validator:h=>d.default(new Set(h.values()),o)})}hasAnyValues(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any value of \`${JSON.stringify(o)}\``,validator:h=>{const l=new Set(h.values());return o.some(p=>l.has(p))}})}keysOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.keys(),o)})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.values(),o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(s,i,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0});const u=r(0),c=n(r(3));i.WeakMapPredicate=class extends u.Predicate{constructor(d){super("WeakMap",d)}hasKeys(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAnyKeys(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any key of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(s,i,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(i,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));i.SetPredicate=class extends c.Predicate{constructor(o){super("Set",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}has(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have items \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAny(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any item of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}ofType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h,o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(s,i,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0});const u=r(0),c=n(r(3));i.WeakSetPredicate=class extends u.Predicate{constructor(d){super("WeakSet",d)}has(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAny(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any item of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(s,i,r){Object.defineProperty(i,"__esModule",{value:!0});const n=r(8),u=r(2);i.AnyPredicate=class{constructor(c,d={}){this.predicates=c,this.options=d}[u.testSymbol](c,d,f){const o=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void d(c,f,h)}catch(l){if(c===void 0&&this.options.optional===!0)return;o.push(`- ${l.message}`)}throw new n.ArgumentError(o.join(`
|
|
114
|
-
`),d)}}}]);const a=e.exports;e.exports=a.default,Object.assign(e.exports,a)})(Yn)),Yn.exports}var Zn={},Ms={},Pu;function
|
|
115
|
-
`:JSON.stringify(r)}getName(){return this.pretty?zi.FORMAT_NAME_PRETTY:zi.FORMAT_NAME}};return e.FORMAT_NAME="json",e.FORMAT_NAME_PRETTY="json_pretty",Ms.JsonLogFormat=e,Ms}var $s={},Xn={},Lu;function wn(){return Lu||(Lu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.EMPTY_METADATA={};function s(i){let r=i.service?`${i.service}.`:i.project?`${i.project}.`:"";return r+=i.module?`${i.module}.`:"",r+=i.library?`[${i.library}].`:"",r+=i.tag||"",r||(r="universe-log-empty-id"),r}a.getBestIdentifier=s})(e.LogMetadata||(e.LogMetadata={}))})(Xn)),Xn}var Rs={},Mu;function Kc(){if(Mu)return Rs;Mu=1,Object.defineProperty(Rs,"__esModule",{value:!0});let e=class{static getTimestamp(){return Date.now()}static getUTCISOTime(){return new Date().toISOString()}};return Rs.TimeUtils=e,Rs}var $u;function
|
|
116
|
-
${r.error.stack}`:""}};return s.FORMAT_NAME="oneline",$s.OnelineLogFormat=s,$s}var Ru;function Nn(){return Ru||(Ru=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=vn(),s=Ch(),i=Dh();(function(r){r.FORMATS={json:new s.JsonLogFormat(!1),json_pretty:new s.JsonLogFormat(!0),oneline:new i.OnelineLogFormat},r.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),r.DEFAULT_FORMAT=r.FORMATS.oneline;function n(u){if(typeof r.FORMATS[u]>"u"){const c=Object.keys(r.FORMATS).join(",");throw new a.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return r.FORMATS[u]}r.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(Zn)),Zn}var Is={},Iu;function Th(){if(Iu)return Is;Iu=1,Object.defineProperty(Is,"__esModule",{value:!0});let e=class{static log(s){console.error(`UniverseLog.FallbackLog: ${s}`)}};return Is.FallbackLog=e,Is}var Fs={},Fu;function td(){if(Fu)return Fs;Fu=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=vn(),a=new Function("try {return this===window;}catch(e){ return false;}"),s=new Function("try {return this===global;}catch(e){return false;}"),i=new Function("try {return this;}catch(e){return undefined}");function r(c){const d=i();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(a())return r(c);if(s())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return Fs.PortableEnv=u,Fs}var Bs={},Bu;function rd(){if(Bu)return Bs;Bu=1,Object.defineProperty(Bs,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=a=>console.error(a),Bs.StaticConfig=e,Bs}var qu;function Oh(){if(qu)return oa;qu=1;var e=oa&&oa.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(oa,"__esModule",{value:!0});const a=Qc(),s=Nn(),i=Th(),r=us(),n=wn(),u=td(),c=rd();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=r.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,a.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",a.default.array.ofType(a.default.string)),this.fallbackLog=o.fallbackLog,a.default(this.fallbackLog,"fallbackLog",a.default.function),this.defaultFormat=o.defaultFormat,a.default(this.defaultFormat,"defaultFormat",a.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,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()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?s.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||r.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>r.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,y)=>r.LogLevel.moreVerbose(p,y))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){i.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return oa.LiveLogConfig=d,oa}var qs={},Vu;function Ph(){if(Vu)return qs;Vu=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=xn(),a=us(),s=Kc();let i=class Qt{static parse(n,u){let c=Qt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Qt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:s.TimeUtils.getUTCISOTime(),timestamp:s.TimeUtils.getTimestamp(),level:n,level_value:a.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Qt.parseString(n,u):n instanceof Error?Qt.parseError(n,u):typeof n=="object"?Qt.parseObject(n,u):Qt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Qt.errorToObj(n))):c.error=Qt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Qt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return qs.ParseLogMsg=i,qs}var Qn={},Uu;function ad(){return Uu||(Uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=Qc(),s=Nn();(function(i){function r(n){a.default(n.levelEnvs,"Properties.levelEnvs",a.default.any(a.default.undefined,a.default.array.ofType(a.default.string))),a.default(n.metadata,"Properties.metadata",a.default.optional.object),a.default(n.logFn,"Properties.logFn",a.default.any(a.default.undefined,a.default.function)),a.default(n.defaultFormat,"Properties.defaultFormat",a.default.optional.string.oneOf(Object.keys(s.LogFormats.KEYS)))}i.validate=r})(e.Properties||(e.Properties={}))})(Qn)),Qn}var zu;function nd(){if(zu)return Ls;zu=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Oh(),a=us(),s=wn(),i=rd(),r=Nn(),n=Ph(),u=ad();let c=class sd{constructor(f){if(this.instanceMetadata=s.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=i.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?r.LogFormats.valueOf(f.defaultFormat):r.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new sd({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=a.LogLevel.LEVELS_VALUES[this.getLevel()];a.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),a.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Ls.LogEngine=c,Ls}var Hu;function id(){if(Hu)return Os;Hu=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=us(),a=nd();let s=class{constructor(r){r instanceof a.LogEngine?this.logEngine=r:this.logEngine=new a.LogEngine(r)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...r){this.doLog(e.LogLevel.error,r)}errorGen(r){this.doEfficientLog(e.LogLevel.error,r)}warn(...r){this.doLog(e.LogLevel.warn,r)}warnGen(r){this.doEfficientLog(e.LogLevel.warn,r)}info(...r){this.doLog(e.LogLevel.info,r)}infoGen(r){this.doEfficientLog(e.LogLevel.info,r)}http(...r){this.doLog(e.LogLevel.http,r)}httpGen(r){this.doEfficientLog(e.LogLevel.http,r)}verbose(...r){this.doLog(e.LogLevel.verbose,r)}verboseGen(r){this.doEfficientLog(e.LogLevel.verbose,r)}debug(...r){this.doLog(e.LogLevel.debug,r)}debugGen(r){this.doEfficientLog(e.LogLevel.debug,r)}silly(...r){this.doLog(e.LogLevel.silly,r)}sillyGen(r){this.doEfficientLog(e.LogLevel.silly,r)}doEfficientLog(r,n){this.logEngine.doEfficientLog(r,n)}doLog(r,...n){this.logEngine.doLog(r,...n)}getEngine(){return this.logEngine}};return Os.AbstractUniverseLog=s,Os}var Vs={},Wu;function Lh(){if(Wu)return Vs;Wu=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=id();let a=class od extends e.AbstractUniverseLog{constructor(i){super(i)}tag(i){return new od(super.getEngine().cloneWithMetadata({tag:i}))}};return Vs.BasicTaggedUniverseLog=a,Vs}var Gu;function Mh(){if(Gu)return Tt;Gu=1,Object.defineProperty(Tt,"__esModule",{value:!0});var e=id();Tt.AbstractUniverseLog=e.AbstractUniverseLog;var a=nd();Tt.LogEngine=a.LogEngine;var s=ad();Tt.UniverseLogProperties=s.Properties;var i=Lh();Tt.BasicTaggedUniverseLog=i.BasicTaggedUniverseLog;var r=wn();Tt.LogMetadata=r.LogMetadata;var n=us();Tt.LogLevel=n.LogLevel;var u=td();Tt.PortableEnv=u.PortableEnv;var c=vn();Tt.UniverseLogError=c.UniverseLogError;var d=Nn();return Tt.LogFormats=d.LogFormats,Tt}var Ju;function fr(){if(Ju)return Wa;Ju=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.Log=void 0;const e=Mh();let a=class ud extends e.AbstractUniverseLog{static log(){return ud.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Wa.Log=a,a.INSTANCE=new a,Wa}var Ir={},Ga={},Yu;function $h(){if(Yu)return Ga;Yu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.Phishing=void 0;const e=["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"];let a=class{};return Ga.Phishing=a,a.looksPhishy=s=>{for(const i of e)if(s.toLocaleLowerCase().indexOf(i)>-1)return!0;return!1},Ga}var Zu;function Rh(){if(Zu)return Ir;Zu=1;var e=Ir&&Ir.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.LinkSanitizer=void 0;const a=e(os()),s=fr(),i=$h();let r=class ld{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=ld.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),s.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),i.Phishing.looksPhishy(u)?(s.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(s.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,a.default)(u,"LinkSanitizerOptions",a.default.object),(0,a.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",a.default.string.nonEmpty)}};return Ir.LinkSanitizer=r,Ir}var Fr={},Xu;function to(){if(Xu)return Fr;Xu=1;var e=Fr&&Fr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Localization=void 0;const a=e(os());let s=class{static validate(r){(0,a.default)(r,"LocalizationOptions",a.default.object),(0,a.default)(r.phishingWarning,"LocalizationOptions.phishingWarning",a.default.string.nonEmpty),(0,a.default)(r.externalLink,"LocalizationOptions.externalLink",a.default.string.nonEmpty),(0,a.default)(r.noImage,"LocalizationOptions.noImage",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",a.default.string.nonEmpty),(0,a.default)(r.accountNameBadActor,"LocalizationOptions.accountNameBadActor",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",a.default.string.nonEmpty)}};return Fr.Localization=s,s.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"},Fr}var Br={},Ja={},Qu;function Xr(){if(Qu)return Ja;Qu=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(s,i){return`~~~ embed:${s} ${i} ~~~`}static insertAllEmbeds(s,i,r){const n=[];for(let u of i.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of s)if(o.type==f){n.push(o.processEmbed(d,r));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ja.AbstractEmbedder=e,Ja}var Ya={},Ku;function Ih(){if(Ku)return Ya;Ku=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.SpotifyEmbedder=void 0;const e=fr(),a=Xr();let s=class Hi extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(r){if(!r)return;const n=r.match(Hi.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(r){try{const n=Hi.extractMetadata(r.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${r}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return Ya.SpotifyEmbedder=s,s.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},Ya}var Za={},el;function Fh(){if(el)return Za;el=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.ThreeSpeakEmbedder=void 0;const e=fr(),a=Xr();let s=class cd extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(r){const n=typeof r=="string"?r:r.data;try{const u=n.match(cd.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(r,n){const u=`https://3speak.tv/embed?v=${r}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Za.ThreeSpeakEmbedder=s,s.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Za}var qr={},Kn={},tl;function dd(){return tl||(tl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const a='[^\\s"<>\\]\\[\\(\\)]',s=a.replace(/\]$/,".,']"),i="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",r="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+a+"*"+s+")?",u=({domain:l=r,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${r}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:i}),l);e.image=o;const h=(l="i")=>new RegExp(i,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.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:\/\/))/}})(Kn)),Kn}var rl;function Bh(){if(rl)return qr;rl=1;var e=qr&&qr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qr,"__esModule",{value:!0}),qr.TwitchEmbedder=void 0;const a=fr(),s=e(dd()),i=Xr();let r=class extends i.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){a.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(s.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return qr.TwitchEmbedder=r,qr}var Xa={},Qa={},al;function fd(){if(al)return Qa;al=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.StaticConfig=void 0;let e=class{};return Qa.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const i=a.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:a=>{if(!a)return null;const s=a.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!s||s.length!==2?null:"https://player.vimeo.com/video/"+s[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:a=>a.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:a=>{if(!a)return null;const s=a.match(/url=(.+?)&/);return!s||s.length!==2?null:`https://w.soundcloud.com/player/?url=${s[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:a=>a},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:a=>a},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const s=a.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!s||s.length!==2?null:`https://3speak.tv/embed?v=${s[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const s=a.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!s||s.length!==2?null:`https://3speak.tv/embed?v=${s[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const s=a.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
|
|
114
|
+
`),d)}}}]);const a=e.exports;e.exports=a.default,Object.assign(e.exports,a)})(Yn)),Yn.exports}var Zn={},Ms={},Pu;function Sh(){if(Pu)return Ms;Pu=1,Object.defineProperty(Ms,"__esModule",{value:!0});let e=class zi{constructor(s){this.pretty=!1,this.pretty=s}format(s,i){const r=Object.assign({},i,s);return this.pretty?JSON.stringify(r,void 0,2)+`
|
|
115
|
+
`:JSON.stringify(r)}getName(){return this.pretty?zi.FORMAT_NAME_PRETTY:zi.FORMAT_NAME}};return e.FORMAT_NAME="json",e.FORMAT_NAME_PRETTY="json_pretty",Ms.JsonLogFormat=e,Ms}var $s={},Xn={},Lu;function wn(){return Lu||(Lu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.EMPTY_METADATA={};function s(i){let r=i.service?`${i.service}.`:i.project?`${i.project}.`:"";return r+=i.module?`${i.module}.`:"",r+=i.library?`[${i.library}].`:"",r+=i.tag||"",r||(r="universe-log-empty-id"),r}a.getBestIdentifier=s})(e.LogMetadata||(e.LogMetadata={}))})(Xn)),Xn}var Rs={},Mu;function Kc(){if(Mu)return Rs;Mu=1,Object.defineProperty(Rs,"__esModule",{value:!0});let e=class{static getTimestamp(){return Date.now()}static getUTCISOTime(){return new Date().toISOString()}};return Rs.TimeUtils=e,Rs}var $u;function Ch(){if($u)return $s;$u=1,Object.defineProperty($s,"__esModule",{value:!0});const e=wn(),a=Kc();let s=class ed{format(r,n){const u=r.time_iso||new Date(r.timestamp).toISOString()||a.TimeUtils.getUTCISOTime();return`${e.LogMetadata.getBestIdentifier(n)} | ${u} [${r.level}]: ${r.message}`+this.includeStackIfPresent(r)}getName(){return ed.FORMAT_NAME}includeStackIfPresent(r){return r.error&&r.error.stack?`
|
|
116
|
+
${r.error.stack}`:""}};return s.FORMAT_NAME="oneline",$s.OnelineLogFormat=s,$s}var Ru;function Nn(){return Ru||(Ru=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=vn(),s=Sh(),i=Ch();(function(r){r.FORMATS={json:new s.JsonLogFormat(!1),json_pretty:new s.JsonLogFormat(!0),oneline:new i.OnelineLogFormat},r.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),r.DEFAULT_FORMAT=r.FORMATS.oneline;function n(u){if(typeof r.FORMATS[u]>"u"){const c=Object.keys(r.FORMATS).join(",");throw new a.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return r.FORMATS[u]}r.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(Zn)),Zn}var Is={},Iu;function Dh(){if(Iu)return Is;Iu=1,Object.defineProperty(Is,"__esModule",{value:!0});let e=class{static log(s){console.error(`UniverseLog.FallbackLog: ${s}`)}};return Is.FallbackLog=e,Is}var Fs={},Fu;function td(){if(Fu)return Fs;Fu=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=vn(),a=new Function("try {return this===window;}catch(e){ return false;}"),s=new Function("try {return this===global;}catch(e){return false;}"),i=new Function("try {return this;}catch(e){return undefined}");function r(c){const d=i();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(a())return r(c);if(s())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return Fs.PortableEnv=u,Fs}var Bs={},Bu;function rd(){if(Bu)return Bs;Bu=1,Object.defineProperty(Bs,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=a=>console.error(a),Bs.StaticConfig=e,Bs}var qu;function Th(){if(qu)return oa;qu=1;var e=oa&&oa.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(oa,"__esModule",{value:!0});const a=Qc(),s=Nn(),i=Dh(),r=us(),n=wn(),u=td(),c=rd();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=r.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,a.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",a.default.array.ofType(a.default.string)),this.fallbackLog=o.fallbackLog,a.default(this.fallbackLog,"fallbackLog",a.default.function),this.defaultFormat=o.defaultFormat,a.default(this.defaultFormat,"defaultFormat",a.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,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()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?s.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||r.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>r.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,y)=>r.LogLevel.moreVerbose(p,y))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){i.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return oa.LiveLogConfig=d,oa}var qs={},Vu;function Oh(){if(Vu)return qs;Vu=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=xn(),a=us(),s=Kc();let i=class Qt{static parse(n,u){let c=Qt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Qt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:s.TimeUtils.getUTCISOTime(),timestamp:s.TimeUtils.getTimestamp(),level:n,level_value:a.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Qt.parseString(n,u):n instanceof Error?Qt.parseError(n,u):typeof n=="object"?Qt.parseObject(n,u):Qt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Qt.errorToObj(n))):c.error=Qt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Qt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return qs.ParseLogMsg=i,qs}var Qn={},Uu;function ad(){return Uu||(Uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=Qc(),s=Nn();(function(i){function r(n){a.default(n.levelEnvs,"Properties.levelEnvs",a.default.any(a.default.undefined,a.default.array.ofType(a.default.string))),a.default(n.metadata,"Properties.metadata",a.default.optional.object),a.default(n.logFn,"Properties.logFn",a.default.any(a.default.undefined,a.default.function)),a.default(n.defaultFormat,"Properties.defaultFormat",a.default.optional.string.oneOf(Object.keys(s.LogFormats.KEYS)))}i.validate=r})(e.Properties||(e.Properties={}))})(Qn)),Qn}var zu;function nd(){if(zu)return Ls;zu=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Th(),a=us(),s=wn(),i=rd(),r=Nn(),n=Oh(),u=ad();let c=class sd{constructor(f){if(this.instanceMetadata=s.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=i.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?r.LogFormats.valueOf(f.defaultFormat):r.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new sd({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=a.LogLevel.LEVELS_VALUES[this.getLevel()];a.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),a.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Ls.LogEngine=c,Ls}var Hu;function id(){if(Hu)return Os;Hu=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=us(),a=nd();let s=class{constructor(r){r instanceof a.LogEngine?this.logEngine=r:this.logEngine=new a.LogEngine(r)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...r){this.doLog(e.LogLevel.error,r)}errorGen(r){this.doEfficientLog(e.LogLevel.error,r)}warn(...r){this.doLog(e.LogLevel.warn,r)}warnGen(r){this.doEfficientLog(e.LogLevel.warn,r)}info(...r){this.doLog(e.LogLevel.info,r)}infoGen(r){this.doEfficientLog(e.LogLevel.info,r)}http(...r){this.doLog(e.LogLevel.http,r)}httpGen(r){this.doEfficientLog(e.LogLevel.http,r)}verbose(...r){this.doLog(e.LogLevel.verbose,r)}verboseGen(r){this.doEfficientLog(e.LogLevel.verbose,r)}debug(...r){this.doLog(e.LogLevel.debug,r)}debugGen(r){this.doEfficientLog(e.LogLevel.debug,r)}silly(...r){this.doLog(e.LogLevel.silly,r)}sillyGen(r){this.doEfficientLog(e.LogLevel.silly,r)}doEfficientLog(r,n){this.logEngine.doEfficientLog(r,n)}doLog(r,...n){this.logEngine.doLog(r,...n)}getEngine(){return this.logEngine}};return Os.AbstractUniverseLog=s,Os}var Vs={},Wu;function Ph(){if(Wu)return Vs;Wu=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=id();let a=class od extends e.AbstractUniverseLog{constructor(i){super(i)}tag(i){return new od(super.getEngine().cloneWithMetadata({tag:i}))}};return Vs.BasicTaggedUniverseLog=a,Vs}var Gu;function Lh(){if(Gu)return Tt;Gu=1,Object.defineProperty(Tt,"__esModule",{value:!0});var e=id();Tt.AbstractUniverseLog=e.AbstractUniverseLog;var a=nd();Tt.LogEngine=a.LogEngine;var s=ad();Tt.UniverseLogProperties=s.Properties;var i=Ph();Tt.BasicTaggedUniverseLog=i.BasicTaggedUniverseLog;var r=wn();Tt.LogMetadata=r.LogMetadata;var n=us();Tt.LogLevel=n.LogLevel;var u=td();Tt.PortableEnv=u.PortableEnv;var c=vn();Tt.UniverseLogError=c.UniverseLogError;var d=Nn();return Tt.LogFormats=d.LogFormats,Tt}var Ju;function fr(){if(Ju)return Wa;Ju=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.Log=void 0;const e=Lh();let a=class ud extends e.AbstractUniverseLog{static log(){return ud.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Wa.Log=a,a.INSTANCE=new a,Wa}var Ir={},Ga={},Yu;function Mh(){if(Yu)return Ga;Yu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.Phishing=void 0;const e=["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"];let a=class{};return Ga.Phishing=a,a.looksPhishy=s=>{for(const i of e)if(s.toLocaleLowerCase().indexOf(i)>-1)return!0;return!1},Ga}var Zu;function $h(){if(Zu)return Ir;Zu=1;var e=Ir&&Ir.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.LinkSanitizer=void 0;const a=e(os()),s=fr(),i=Mh();let r=class ld{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=ld.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),s.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),i.Phishing.looksPhishy(u)?(s.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(s.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,a.default)(u,"LinkSanitizerOptions",a.default.object),(0,a.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",a.default.string.nonEmpty)}};return Ir.LinkSanitizer=r,Ir}var Fr={},Xu;function to(){if(Xu)return Fr;Xu=1;var e=Fr&&Fr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Localization=void 0;const a=e(os());let s=class{static validate(r){(0,a.default)(r,"LocalizationOptions",a.default.object),(0,a.default)(r.phishingWarning,"LocalizationOptions.phishingWarning",a.default.string.nonEmpty),(0,a.default)(r.externalLink,"LocalizationOptions.externalLink",a.default.string.nonEmpty),(0,a.default)(r.noImage,"LocalizationOptions.noImage",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",a.default.string.nonEmpty),(0,a.default)(r.accountNameBadActor,"LocalizationOptions.accountNameBadActor",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",a.default.string.nonEmpty)}};return Fr.Localization=s,s.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"},Fr}var Br={},Ja={},Qu;function Xr(){if(Qu)return Ja;Qu=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(s,i){return`~~~ embed:${s} ${i} ~~~`}static insertAllEmbeds(s,i,r){const n=[];for(let u of i.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of s)if(o.type==f){n.push(o.processEmbed(d,r));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ja.AbstractEmbedder=e,Ja}var Ya={},Ku;function Rh(){if(Ku)return Ya;Ku=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.SpotifyEmbedder=void 0;const e=fr(),a=Xr();let s=class Hi extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(r){if(!r)return;const n=r.match(Hi.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(r){try{const n=Hi.extractMetadata(r.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${r}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return Ya.SpotifyEmbedder=s,s.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},Ya}var Za={},el;function Ih(){if(el)return Za;el=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.ThreeSpeakEmbedder=void 0;const e=fr(),a=Xr();let s=class cd extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(r){const n=typeof r=="string"?r:r.data;try{const u=n.match(cd.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(r,n){const u=`https://3speak.tv/embed?v=${r}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Za.ThreeSpeakEmbedder=s,s.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Za}var qr={},Kn={},tl;function dd(){return tl||(tl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const a='[^\\s"<>\\]\\[\\(\\)]',s=a.replace(/\]$/,".,']"),i="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",r="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+a+"*"+s+")?",u=({domain:l=r,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${r}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:i}),l);e.image=o;const h=(l="i")=>new RegExp(i,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.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:\/\/))/}})(Kn)),Kn}var rl;function Fh(){if(rl)return qr;rl=1;var e=qr&&qr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qr,"__esModule",{value:!0}),qr.TwitchEmbedder=void 0;const a=fr(),s=e(dd()),i=Xr();let r=class extends i.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){a.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(s.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return qr.TwitchEmbedder=r,qr}var Xa={},Qa={},al;function fd(){if(al)return Qa;al=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.StaticConfig=void 0;let e=class{};return Qa.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const i=a.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:a=>{if(!a)return null;const s=a.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!s||s.length!==2?null:"https://player.vimeo.com/video/"+s[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:a=>a.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:a=>{if(!a)return null;const s=a.match(/url=(.+?)&/);return!s||s.length!==2?null:`https://w.soundcloud.com/player/?url=${s[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:a=>a},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:a=>a},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const s=a.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!s||s.length!==2?null:`https://3speak.tv/embed?v=${s[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const s=a.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!s||s.length!==2?null:`https://3speak.tv/embed?v=${s[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const s=a.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
|
|
117
117
|
div, iframe, del,
|
|
118
118
|
a, p, b, i, q, br, ul, li, ol, img, h1, h2, h3, h4, h5, h6, hr,
|
|
119
119
|
blockquote, pre, code, em, strong, center, table, thead, tbody, tr, th, td,
|
|
120
120
|
strike, sup, sub
|
|
121
|
-
`.trim().split(/,\s*/)},Qa}var sl;function
|
|
121
|
+
`.trim().split(/,\s*/)},Qa}var sl;function Bh(){if(sl)return Xa;sl=1;var e;Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.TwitterEmbedder=void 0;const a=fr(),s=fd(),i=Xr();let r=class Wi extends i.AbstractEmbedder{constructor(){super(...arguments),this.type="twitter"}getEmbedMetadata(u){const c=typeof u=="string"?u:u.data;try{const d=Wi.getTwitterMetadataFromLink(c);return d?{id:d.id,url:d.url}:void 0}catch(d){a.Log.log().error(d)}}processEmbed(u,c){const d=s.StaticConfig.sanitization.iframeWhitelist.find(o=>o.re.toString().includes("twitter")),f=d?.fn(`https://twitter.com/status/${u}`);return f?`<div class="twitterWrapper"><iframe width="${c.width}" height="${c.height}" src="${f}" frameborder="0" scrolling="no" allowtransparency="true" allowfullscreen="true"></iframe></div>`:""}static getTwitterMetadataFromLink(u){if(!u)return;const c=u.replace(/^(@|https:\/\/)/,""),d=c.match(Wi.linkRegex);if(!d)return;const f=d[2],o=`https://${c}`;return{id:f,url:o}}};return Xa.TwitterEmbedder=r,r.linkRegex=(e=s.StaticConfig.sanitization.iframeWhitelist.find(n=>n.re.toString().includes("twitter")))===null||e===void 0?void 0:e.re,Xa}var Ka={},nl;function qh(){if(nl)return Ka;nl=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.VimeoEmbedder=void 0;const e=fr(),a=Xr();let s=class hd extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="vimeo"}getEmbedMetadata(r){try{const n=r.data,u=this.extractMetadata(n);return u?{id:u.id,url:u.url}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src=${this.generateCanonicalUrl(r)} width=${n.width} height=${n.height} frameBorder="0" webkitallowfullscreen mozallowfullscreen allowFullScreen></iframe></div>`}generateCanonicalUrl(r){return`https://player.vimeo.com/video/${r}`}extractMetadata(r){if(!r)return null;const n=r.match(hd.regex);return!n||n.length<2?null:{id:n[1],url:n[0],canonical:this.generateCanonicalUrl(n[1])}}};return Ka.VimeoEmbedder=s,s.regex=/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,Ka}var es={},il;function pd(){if(il)return es;il=1,Object.defineProperty(es,"__esModule",{value:!0}),es.YoutubeEmbedder=void 0;const e=fr(),a=Xr();let s=class Ks extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="youtube"}static getYoutubeMetadataFromLink(r){if(!r)return;const n=r.match(Ks.linkRegex),u=n?n[0]:void 0;if(!u)return;const c=u.match(Ks.idRegex),d=c&&c.length>=2?c[2]:void 0;if(d)return{id:d,url:u,thumbnail:"https://img.youtube.com/vi/"+d+"/0.jpg"}}getEmbedMetadata(r){try{const n=Ks.getYoutubeMetadataFromLink(r.data);return n?{id:n.id,url:n.url,image:n.thumbnail}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){const u=`https://www.youtube.com/embed/${r}`;return`<div class="videoWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe></div>`}};return es.YoutubeEmbedder=s,s.linkRegex=/https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/[^watch]|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)[^ ]*/i,s.idRegex=/(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)/i,es}var ol;function Vh(){if(ol)return Br;ol=1;var e=Br&&Br.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Br,"__esModule",{value:!0}),Br.AssetEmbedder=void 0;const a=e(os()),s=Xr(),i=Rh(),r=Ih(),n=Fh(),u=Bh(),c=qh(),d=pd();let f=class md{constructor(h,l){md.validate(h),this.options=h,this.localization=l,this.embedders=[new d.YoutubeEmbedder,new c.VimeoEmbedder,new n.TwitchEmbedder(h),new i.SpotifyEmbedder,new r.ThreeSpeakEmbedder,new u.TwitterEmbedder]}static validate(h){(0,a.default)(h,"AssetEmbedderOptions",a.default.object),(0,a.default)(h.ipfsPrefix,"AssetEmbedderOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(h.width,"AssetEmbedderOptions.width",a.default.number.integer.positive),(0,a.default)(h.height,"AssetEmbedderOptions.height",a.default.number.integer.positive),(0,a.default)(h.hideImages,"AssetEmbedderOptions.hideImages",a.default.boolean),(0,a.default)(h.baseUrl,"AssetEmbedderOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(h.imageProxyFn,"AssetEmbedderOptions.imageProxyFn",a.default.function),(0,a.default)(h.hashtagUrlFn,"AssetEmbedderOptions.hashtagUrlFn",a.default.function),(0,a.default)(h.usertagUrlFn,"AssetEmbedderOptions.usertagUrlFn",a.default.function)}insertAssets(h){const l={width:this.options.width,height:this.options.height};return this.insertMarkedEmbedsToRenderedOutput(h,l)}insertMarkedEmbedsToRenderedOutput(h,l){return s.AbstractEmbedder.insertAllEmbeds(this.embedders,h,l)}processTextNodeAndInsertEmbeds(h){const l={links:[],images:[]};for(const p of this.embedders){const y=p.getEmbedMetadata(h);y&&(h.data=h.data.replace(y.url,s.AbstractEmbedder.getEmbedMarker(y.id,p.type)),y.image&&l.images.push(y.image),y.link&&l.links.push(y.link))}return l}};return Br.AssetEmbedder=f,Br}var Vr={},Us={},ul;function Uh(){if(ul)return Us;ul=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=`
|
|
122
122
|
aalpha
|
|
123
123
|
aappreciator
|
|
124
124
|
abits
|
|
@@ -1028,9 +1028,9 @@ youbit
|
|
|
1028
1028
|
yunbi
|
|
1029
1029
|
zenieix
|
|
1030
1030
|
`.trim().split(`
|
|
1031
|
-
`);return Us.default=e,Us}var ll;function Hh(){if(ll)return Vr;ll=1;var e=Vr&&Vr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.AccountNameValidator=void 0;const a=e(zh());let s=class{static validateAccountName(r,n){let u,c,d;if(!r)return n.accountNameWrongLength;const f=r.length;if(f<3||f>16)return n.accountNameWrongLength;if(a.default.includes(r))return n.accountNameBadActor;const o=r.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Vr.AccountNameValidator=s,Vr}var cl;function Wh(){if(cl)return lt;cl=1;var e=lt&<.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var N=Object.getOwnPropertyDescriptor(b,g);(!N||("get"in N?!b.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,N)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),a=lt&<.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),s=lt&<.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return a(b,w),b},i=lt&<.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(lt,"__esModule",{value:!0}),lt.HtmlDOMParserError=lt.HtmlDOMParser=void 0;const r=s(Sh()),n=i(xn()),u=fr(),c=Rh(),d=to(),f=Uh(),o=pd(),h=Hh(),l=s(dd());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new r.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new r.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.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},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new y("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new y("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new y("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const N=v.tagName?v.tagName.toLowerCase():null;N&&this.state.htmltags.add(N),N==="img"?this.processImgTag(v):N==="iframe"?this.processIframeTag(v):N==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",N=this.linkSanitizer.sanitizeLink(g,v);if(N===!1){const j=b.ownerDocument.createElement("div");j.textContent=`${b.textContent} / ${g}`,j.setAttribute("title",this.localization.phishingWarning),j.setAttribute("class","phishy");const x=b.parentNode;x&&(x.appendChild(j),x.removeChild(b))}else b.setAttribute("href",N)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const N=this.xmlSerializer.serializeToString(b),j=this.domParser.parseFromString(`<div class="videoWrapper">${N}</div>`),x=b.parentNode;x&&(x.appendChild(j),x.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(x=>this.state.images.add(x)),v.links.forEach(x=>this.state.links.add(x));const N=this.xmlSerializer.serializeToString(b),j=this.linkify(N);if(this.mutate&&j!==N){const x=this.domParser.parseFromString(`<span>${j}</span>`),m=b.parentNode;return m&&(m.appendChild(x),m.removeChild(b)),x}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",j=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(j),!this.mutate)return g;const x=this.options.hashtagUrlFn(j);return v+`<a href="${x}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,N,j)=>{const x=j.toLowerCase(),m=h.AccountNameValidator.validateAccountName(x,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(x);const k=(v||"")+(N||"");if(!this.mutate)return`${k}${j}`;const _=this.options.usertagUrlFn(x);return m?`${k}<a href="${_}">@${j}</a>`:`${k}@${j}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const N=g.parentNode;N&&(N.appendChild(v),N.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};lt.HtmlDOMParser=p;class y extends n.default{constructor(b,g){super(b,g)}}return lt.HtmlDOMParserError=y,lt}var ts={},dl;function Gh(){if(dl)return ts;dl=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.PreliminarySanitizer=void 0;let e=class gd{static preliminarySanitize(s){return gd.stripHtmlComments(s)}static stripHtmlComments(s){return s.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return ts.PreliminarySanitizer=e,ts}var Ur={},Vt={},Ut={},ei={},zt={},zs={},fl;function Jh(){return fl||(fl=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.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(e){return e.charCodeAt(0)}))),zs}var Hs={},hl;function Yh(){return hl||(hl=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Hs}var ti={},pl;function ml(){return pl||(pl=1,(function(e){var a;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var s=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]]);e.fromCodePoint=(a=String.fromCodePoint)!==null&&a!==void 0?a:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function i(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=s.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=i;function r(n){return(0,e.fromCodePoint)(i(n))}e.default=r})(ti)),ti}var gl;function on(){return gl||(gl=1,(function(e){var a=zt&&zt.__createBinding||(Object.create?(function(C,P,L,H){H===void 0&&(H=L);var F=Object.getOwnPropertyDescriptor(P,L);(!F||("get"in F?!P.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return P[L]}}),Object.defineProperty(C,H,F)}):(function(C,P,L,H){H===void 0&&(H=L),C[H]=P[L]})),s=zt&&zt.__setModuleDefault||(Object.create?(function(C,P){Object.defineProperty(C,"default",{enumerable:!0,value:P})}):function(C,P){C.default=P}),i=zt&&zt.__importStar||function(C){if(C&&C.__esModule)return C;var P={};if(C!=null)for(var L in C)L!=="default"&&Object.prototype.hasOwnProperty.call(C,L)&&a(P,C,L);return s(P,C),P},r=zt&&zt.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=r(Jh());e.htmlDecodeTree=n.default;var u=r(Yh());e.xmlDecodeTree=u.default;var c=i(ml());e.decodeCodePoint=c.default;var d=ml();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function y(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||y(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(P,L,H){this.decodeTree=P,this.emitCodePoint=L,this.errors=H,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(P){this.decodeMode=P,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(P,L){switch(this.state){case b.EntityStart:return P.charCodeAt(L)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(P,L+1)):(this.state=b.NamedEntity,this.stateNamedEntity(P,L));case b.NumericStart:return this.stateNumericStart(P,L);case b.NumericDecimal:return this.stateNumericDecimal(P,L);case b.NumericHex:return this.stateNumericHex(P,L);case b.NamedEntity:return this.stateNamedEntity(P,L)}},C.prototype.stateNumericStart=function(P,L){return L>=P.length?-1:(P.charCodeAt(L)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(P,L+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(P,L))},C.prototype.addToNumericResult=function(P,L,H,F){if(L!==H){var q=H-L;this.result=this.result*Math.pow(F,q)+parseInt(P.substr(L,q),F),this.consumed+=q}},C.prototype.stateNumericHex=function(P,L){for(var H=L;L<P.length;){var F=P.charCodeAt(L);if(l(F)||p(F))L+=1;else return this.addToNumericResult(P,H,L,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(P,H,L,16),-1},C.prototype.stateNumericDecimal=function(P,L){for(var H=L;L<P.length;){var F=P.charCodeAt(L);if(l(F))L+=1;else return this.addToNumericResult(P,H,L,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(P,H,L,10),-1},C.prototype.emitNumericEntity=function(P,L){var H;if(this.consumed<=L)return(H=this.errors)===null||H===void 0||H.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},C.prototype.stateNamedEntity=function(P,L){for(var H=this.decodeTree,F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14;L<P.length;L++,this.excess++){var M=P.charCodeAt(L);if(this.treeIndex=j(H,F,this.treeIndex+Math.max(1,q),M),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(q===0||w(M))?0:this.emitNotTerminatedNamedEntity();if(F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14,q!==0){if(M===f.SEMI)return this.emitNamedEntityData(this.treeIndex,q,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var P,L=this,H=L.result,F=L.decodeTree,q=(F[H]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,q,this.consumed),(P=this.errors)===null||P===void 0||P.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(P,L,H){var F=this.decodeTree;return this.emitCodePoint(L===1?F[P]&~h.VALUE_LENGTH:F[P+1],H),L===3&&this.emitCodePoint(F[P+2],H),H},C.prototype.end=function(){var P;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function N(C){var P="",L=new v(C,function(H){return P+=(0,c.fromCodePoint)(H)});return function(F,q){for(var M=0,G=0;(G=F.indexOf("&",G))>=0;){P+=F.slice(M,G),L.startEntity(q);var X=L.write(F,G+1);if(X<0){M=G+L.end();break}M=G+X,G=X===0?M+1:M}var ee=P+F.slice(M);return P="",ee}}function j(C,P,L,H){var F=(P&h.BRANCH_LENGTH)>>7,q=P&h.JUMP_TABLE;if(F===0)return q!==0&&H===q?L:-1;if(q){var M=H-q;return M<0||M>=F?-1:C[L+M]-1}for(var G=L,X=G+F-1;G<=X;){var ee=G+X>>>1,R=C[ee];if(R<H)G=ee+1;else if(R>H)X=ee-1;else return C[ee+F]}return-1}e.determineBranch=j;var x=N(n.default),m=N(u.default);function k(C,P){return P===void 0&&(P=g.Legacy),x(C,P)}e.decodeHTML=k;function _(C){return x(C,g.Attribute)}e.decodeHTMLAttribute=_;function E(C){return x(C,g.Strict)}e.decodeHTMLStrict=E;function D(C){return m(C,g.Strict)}e.decodeXML=D})(zt)),zt}var bl;function bd(){return bl||(bl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var a=on(),s;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(s||(s={}));var i;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(i||(i={}));function r(l){return l===s.Space||l===s.NewLine||l===s.Tab||l===s.FormFeed||l===s.CarriageReturn}function n(l){return l===s.Slash||l===s.Gt||r(l)}function u(l){return l>=s.Zero&&l<=s.Nine}function c(l){return l>=s.LowerA&&l<=s.LowerZ||l>=s.UpperA&&l<=s.UpperZ}function d(l){return l>=s.UpperA&&l<=s.UpperF||l>=s.LowerA&&l<=s.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={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 l(p,y){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=y,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.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=b,this.decodeEntities=v,this.entityTrie=b?a.xmlDecodeTree:a.htmlDecodeTree}return l.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===s.Lt||!this.decodeEntities&&this.fastForwardTo(s.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===s.Amp&&(this.state=i.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var y=this.sequenceIndex===this.currentSequence.length,w=y?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!y){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===s.Gt||r(p)){var y=this.index-this.currentSequence.length;if(this.sectionStart<y){var w=this.index;this.index=y,this.cbs.ontext(this.sectionStart,y),this.index=w}this.isSpecial=!1,this.sectionStart=y+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===s.Amp&&(this.state=i.BeforeEntity):this.fastForwardTo(s.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===s.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=i.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=i.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.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=i.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,y){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=y,this.state=i.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===s.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===s.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var y=p|32;this.sectionStart=this.index,!this.xmlMode&&y===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&y===o.ScriptEnd[2]?i.BeforeSpecialS:i.InTagName}else p===s.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){r(p)||(p===s.Gt?this.state=i.Text:(this.state=this.isTagStartChar(p)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===s.Gt||r(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===s.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===s.Slash?this.state=i.InSelfClosingTag:r(p)||(this.state=i.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===s.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(p)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===s.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===s.Eq?this.state=i.BeforeAttributeValue:p===s.Slash||p===s.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p)):r(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===s.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):p===s.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):r(p)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,y){p===y||!this.decodeEntities&&this.fastForwardTo(y)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(y===s.DoubleQuote?f.Double:f.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&p===s.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,s.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,s.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){r(p)||p===s.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===s.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===s.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=p===s.Dash?i.BeforeComment:i.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===s.Dash?(this.state=i.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var y=p|32;y===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):y===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===s.Number?this.state=i.BeforeNumericEntity:p===s.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var y=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(y){var w=(y>>14)-1;if(!this.allowLegacyEntity()&&p!==s.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~a.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])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===s.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var y=this.index-this.entityExcess-1,w=y+2+ +(this.state===i.InHexEntity);w!==this.index&&(y>this.sectionStart&&this.emitPartial(this.sectionStart,y),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===s.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-s.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===s.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-s.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-s.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===i.InAttributeValueDq||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case i.Text:{this.stateText(p);break}case i.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case i.InSpecialTag:{this.stateInSpecialTag(p);break}case i.CDATASequence:{this.stateCDATASequence(p);break}case i.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case i.InAttributeName:{this.stateInAttributeName(p);break}case i.InCommentLike:{this.stateInCommentLike(p);break}case i.InSpecialComment:{this.stateInSpecialComment(p);break}case i.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case i.InTagName:{this.stateInTagName(p);break}case i.InClosingTagName:{this.stateInClosingTagName(p);break}case i.BeforeTagName:{this.stateBeforeTagName(p);break}case i.AfterAttributeName:{this.stateAfterAttributeName(p);break}case i.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case i.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case i.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case i.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case i.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case i.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case i.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case i.InDeclaration:{this.stateInDeclaration(p);break}case i.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case i.BeforeComment:{this.stateBeforeComment(p);break}case i.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case i.InNamedEntity:{this.stateInNamedEntity(p);break}case i.BeforeEntity:{this.stateBeforeEntity(p);break}case i.InHexEntity:{this.stateInHexEntity(p);break}case i.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===i.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===i.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===i.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,y){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribdata(p,y):this.cbs.ontext(p,y)},l.prototype.emitCodePoint=function(p){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(ei)),ei}var xl;function yl(){if(xl)return Ut;xl=1;var e=Ut&&Ut.__createBinding||(Object.create?(function(b,g,v,N){N===void 0&&(N=v);var j=Object.getOwnPropertyDescriptor(g,v);(!j||("get"in j?!g.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,N,j)}):(function(b,g,v,N){N===void 0&&(N=v),b[N]=g[v]})),a=Ut&&Ut.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),s=Ut&&Ut.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return a(g,b),g};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Parser=void 0;var i=s(bd()),r=on(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=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",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),y=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var N,j,x,m,k;this.options=v,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=g??{},this.lowerCaseTagNames=(N=v.lowerCaseTags)!==null&&N!==void 0?N:!v.xmlMode,this.lowerCaseAttributeNames=(j=v.lowerCaseAttributeNames)!==null&&j!==void 0?j:!v.xmlMode,this.tokenizer=new((x=v.Tokenizer)!==null&&x!==void 0?x:i.default)(this.options,this),(k=(m=this.cbs).onparserinit)===null||k===void 0||k.call(m,this)}return b.prototype.ontext=function(g,v){var N,j,x=this.getSlice(g,v);this.endIndex=v-1,(j=(N=this.cbs).ontext)===null||j===void 0||j.call(N,x),this.startIndex=v},b.prototype.ontextentity=function(g){var v,N,j=this.tokenizer.getSectionStart();this.endIndex=j-1,(N=(v=this.cbs).ontext)===null||N===void 0||N.call(v,(0,r.fromCodePoint)(g)),this.startIndex=j},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);this.lowerCaseTagNames&&(N=N.toLowerCase()),this.emitOpenTag(N)},b.prototype.emitOpenTag=function(g){var v,N,j,x;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var k=this.stack.pop();(N=(v=this.cbs).onclosetag)===null||N===void 0||N.call(v,k,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(x=(j=this.cbs).onopentagname)===null||x===void 0||x.call(j,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,N;this.startIndex=this.openTagStart,this.attribs&&((N=(v=this.cbs).onopentag)===null||N===void 0||N.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var N,j,x,m,k,_;this.endIndex=v;var E=this.getSlice(g,v);if(this.lowerCaseTagNames&&(E=E.toLowerCase()),(l.has(E)||p.has(E))&&this.foreignContext.pop(),this.isVoidElement(E))!this.options.xmlMode&&E==="br"&&((j=(N=this.cbs).onopentagname)===null||j===void 0||j.call(N,"br"),(m=(x=this.cbs).onopentag)===null||m===void 0||m.call(x,"br",{},!0),(_=(k=this.cbs).onclosetag)===null||_===void 0||_.call(k,"br",!1));else{var D=this.stack.lastIndexOf(E);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&E==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,N,j=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===j&&((N=(v=this.cbs).onclosetag)===null||N===void 0||N.call(v,j,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var N=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?N.toLowerCase():N},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,r.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var N,j;this.endIndex=v,(j=(N=this.cbs).onattribute)===null||j===void 0||j.call(N,this.attribname,this.attribvalue,g===i.QuoteType.Double?'"':g===i.QuoteType.Single?"'":g===i.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(y),N=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(N=N.toLowerCase()),N},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var j=this.getInstructionName(N);this.cbs.onprocessinginstruction("!".concat(j),"!".concat(N))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var j=this.getInstructionName(N);this.cbs.onprocessinginstruction("?".concat(j),"?".concat(N))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,N){var j,x,m,k;this.endIndex=v,(x=(j=this.cbs).oncomment)===null||x===void 0||x.call(j,this.getSlice(g,v-N)),(k=(m=this.cbs).oncommentend)===null||k===void 0||k.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,N){var j,x,m,k,_,E,D,C,P,L;this.endIndex=v;var H=this.getSlice(g,v-N);this.options.xmlMode||this.options.recognizeCDATA?((x=(j=this.cbs).oncdatastart)===null||x===void 0||x.call(j),(k=(m=this.cbs).ontext)===null||k===void 0||k.call(m,H),(E=(_=this.cbs).oncdataend)===null||E===void 0||E.call(_)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(H,"]]")),(L=(P=this.cbs).oncommentend)===null||L===void 0||L.call(P)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var N=this.stack.length;N>0;this.cbs.onclosetag(this.stack[--N],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,N,j;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(j=(N=this.cbs).onparserinit)===null||j===void 0||j.call(N,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var N=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),N+=this.buffers[0].slice(0,v-this.bufferOffset);return N},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,N;if(this.ended){(N=(v=this.cbs).onerror)===null||N===void 0||N.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,N;if(this.ended){(N=(v=this.cbs).onerror)===null||N===void 0||N.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.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()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return Ut.Parser=w,Ut}var zr={},ri={},vl;function ls(){return vl||(vl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var a;(function(i){i.Root="root",i.Text="text",i.Directive="directive",i.Comment="comment",i.Script="script",i.Style="style",i.Tag="tag",i.CDATA="cdata",i.Doctype="doctype"})(a=e.ElementType||(e.ElementType={}));function s(i){return i.type===a.Tag||i.type===a.Script||i.type===a.Style}e.isTag=s,e.Root=a.Root,e.Text=a.Text,e.Directive=a.Directive,e.Comment=a.Comment,e.Script=a.Script,e.Style=a.Style,e.Tag=a.Tag,e.CDATA=a.CDATA,e.Doctype=a.Doctype})(ri)),ri}var we={},wl;function Nl(){if(wl)return we;wl=1;var e=we&&we.__extends||(function(){var x=function(m,k){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,E){_.__proto__=E}||function(_,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(_[D]=E[D])},x(m,k)};return function(m,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");x(m,k);function _(){this.constructor=m}m.prototype=k===null?Object.create(k):(_.prototype=k.prototype,new _)}})(),a=we&&we.__assign||function(){return a=Object.assign||function(x){for(var m,k=1,_=arguments.length;k<_;k++){m=arguments[k];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(x[E]=m[E])}return x},a.apply(this,arguments)};Object.defineProperty(we,"__esModule",{value:!0}),we.cloneNode=we.hasChildren=we.isDocument=we.isDirective=we.isComment=we.isText=we.isCDATA=we.isTag=we.Element=we.Document=we.CDATA=we.NodeWithChildren=we.ProcessingInstruction=we.Comment=we.Text=we.DataNode=we.Node=void 0;var s=ls(),i=(function(){function x(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),x.prototype.cloneNode=function(m){return m===void 0&&(m=!1),N(this,m)},x})();we.Node=i;var r=(function(x){e(m,x);function m(k){var _=x.call(this)||this;return _.data=k,_}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),m})(i);we.DataNode=r;var n=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Text,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(r);we.Text=n;var u=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Comment,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(r);we.Comment=u;var c=(function(x){e(m,x);function m(k,_){var E=x.call(this,_)||this;return E.name=k,E.type=s.ElementType.Directive,E}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(r);we.ProcessingInstruction=c;var d=(function(x){e(m,x);function m(k){var _=x.call(this)||this;return _.children=k,_}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),m})(i);we.NodeWithChildren=d;var f=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.CDATA,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);we.CDATA=f;var o=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Root,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);we.Document=o;var h=(function(x){e(m,x);function m(k,_,E,D){E===void 0&&(E=[]),D===void 0&&(D=k==="script"?s.ElementType.Script:k==="style"?s.ElementType.Style:s.ElementType.Tag);var C=x.call(this,E)||this;return C.name=k,C.attribs=_,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(_){var E,D;return{name:_,value:k.attribs[_],namespace:(E=k["x-attribsNamespace"])===null||E===void 0?void 0:E[_],prefix:(D=k["x-attribsPrefix"])===null||D===void 0?void 0:D[_]}})},enumerable:!1,configurable:!0}),m})(d);we.Element=h;function l(x){return(0,s.isTag)(x)}we.isTag=l;function p(x){return x.type===s.ElementType.CDATA}we.isCDATA=p;function y(x){return x.type===s.ElementType.Text}we.isText=y;function w(x){return x.type===s.ElementType.Comment}we.isComment=w;function b(x){return x.type===s.ElementType.Directive}we.isDirective=b;function g(x){return x.type===s.ElementType.Root}we.isDocument=g;function v(x){return Object.prototype.hasOwnProperty.call(x,"children")}we.hasChildren=v;function N(x,m){m===void 0&&(m=!1);var k;if(y(x))k=new n(x.data);else if(w(x))k=new u(x.data);else if(l(x)){var _=m?j(x.children):[],E=new h(x.name,a({},x.attribs),_);_.forEach(function(L){return L.parent=E}),x.namespace!=null&&(E.namespace=x.namespace),x["x-attribsNamespace"]&&(E["x-attribsNamespace"]=a({},x["x-attribsNamespace"])),x["x-attribsPrefix"]&&(E["x-attribsPrefix"]=a({},x["x-attribsPrefix"])),k=E}else if(p(x)){var _=m?j(x.children):[],D=new f(_);_.forEach(function(H){return H.parent=D}),k=D}else if(g(x)){var _=m?j(x.children):[],C=new o(_);_.forEach(function(H){return H.parent=C}),x["x-mode"]&&(C["x-mode"]=x["x-mode"]),k=C}else if(b(x)){var P=new c(x.name,x.data);x["x-name"]!=null&&(P["x-name"]=x["x-name"],P["x-publicId"]=x["x-publicId"],P["x-systemId"]=x["x-systemId"]),k=P}else throw new Error("Not implemented yet: ".concat(x.type));return k.startIndex=x.startIndex,k.endIndex=x.endIndex,x.sourceCodeLocation!=null&&(k.sourceCodeLocation=x.sourceCodeLocation),k}we.cloneNode=N;function j(x){for(var m=x.map(function(_){return N(_,!0)}),k=1;k<m.length;k++)m[k].prev=m[k-1],m[k-1].next=m[k];return m}return we}var jl;function kr(){return jl||(jl=1,(function(e){var a=zr&&zr.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),s=zr&&zr.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&a(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var i=ls(),r=Nl();s(Nl(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new r.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(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?i.ElementType.Tag:void 0,h=new r.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===i.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new r.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment){this.lastNode.data+=d;return}var f=new r.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new r.Text(""),f=new r.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new r.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(zr)),zr}var Hr={},Xt={},ht={},ai={},or={},Ws={},kl;function Zh(){if(kl)return Ws;kl=1,Object.defineProperty(Ws,"__esModule",{value:!0});function e(a){for(var s=1;s<a.length;s++)a[s][0]+=a[s-1][0]+1;return a}return Ws.default=new Map(e([[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(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[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(e([[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"]])),Ws}var si={},_l;function Gi(){return _l||(_l=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var a=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,n){return r.codePointAt(n)}:function(r,n){return(r.charCodeAt(n)&64512)===55296?(r.charCodeAt(n)-55296)*1024+r.charCodeAt(n+1)-56320+65536:r.charCodeAt(n)};function s(r){for(var n="",u=0,c;(c=e.xmlReplacer.exec(r))!==null;){var d=c.index,f=r.charCodeAt(d),o=a.get(f);o!==void 0?(n+=r.substring(u,d)+o,u=d+1):(n+="".concat(r.substring(u,d),"&#x").concat((0,e.getCodePoint)(r,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+r.substr(u)}e.encodeXML=s,e.escape=s;function i(r,n){return function(c){for(var d,f=0,o="";d=r.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=i(/[&<>'"]/g,a),e.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(si)),si}var El;function Al(){if(El)return or;El=1;var e=or&&or.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(or,"__esModule",{value:!0}),or.encodeNonAsciiHTML=or.encodeHTML=void 0;var a=e(Zh()),s=Gi(),i=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function r(c){return u(i,c)}or.encodeHTML=r;function n(c){return u(s.xmlReplacer,c)}or.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),y=a.default.get(p);if(typeof y=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof y.n=="number"?y.n===w?y.o:void 0:y.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}y=y.v}if(y!==void 0)f+=y,o=l+1;else{var g=(0,s.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return or}var Sl;function Xh(){return Sl||(Sl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var a=on(),s=Al(),i=Gi(),r;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(r=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=r.XML);var y=typeof p=="number"?p:p.level;if(y===r.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,a.decodeHTML)(l,w)}return(0,a.decodeXML)(l)}e.decode=u;function c(l,p){var y;p===void 0&&(p=r.XML);var w=typeof p=="number"?{level:p}:p;return(y=w.mode)!==null&&y!==void 0||(w.mode=a.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=r.XML);var y=typeof p=="number"?{level:p}:p;return y.mode===n.UTF8?(0,i.escapeUTF8)(l):y.mode===n.Attribute?(0,i.escapeAttribute)(l):y.mode===n.Text?(0,i.escapeText)(l):y.level===r.HTML?y.mode===n.ASCII?(0,s.encodeNonAsciiHTML)(l):(0,s.encodeHTML)(l):(0,i.encodeXML)(l)}e.encode=d;var f=Gi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=Al();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=on();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(ai)),ai}var Wr={},Cl;function Qh(){return Cl||(Cl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.attributeNames=Wr.elementNames=void 0,Wr.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(e){return[e.toLowerCase(),e]})),Wr.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(e){return[e.toLowerCase(),e]}))),Wr}var Dl;function Kh(){if(Dl)return ht;Dl=1;var e=ht&&ht.__assign||function(){return e=Object.assign||function(j){for(var x,m=1,k=arguments.length;m<k;m++){x=arguments[m];for(var _ in x)Object.prototype.hasOwnProperty.call(x,_)&&(j[_]=x[_])}return j},e.apply(this,arguments)},a=ht&&ht.__createBinding||(Object.create?(function(j,x,m,k){k===void 0&&(k=m);var _=Object.getOwnPropertyDescriptor(x,m);(!_||("get"in _?!x.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return x[m]}}),Object.defineProperty(j,k,_)}):(function(j,x,m,k){k===void 0&&(k=m),j[k]=x[m]})),s=ht&&ht.__setModuleDefault||(Object.create?(function(j,x){Object.defineProperty(j,"default",{enumerable:!0,value:x})}):function(j,x){j.default=x}),i=ht&&ht.__importStar||function(j){if(j&&j.__esModule)return j;var x={};if(j!=null)for(var m in j)m!=="default"&&Object.prototype.hasOwnProperty.call(j,m)&&a(x,j,m);return s(x,j),x};Object.defineProperty(ht,"__esModule",{value:!0}),ht.render=void 0;var r=i(ls()),n=Xh(),u=Qh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(j){return j.replace(/"/g,""")}function f(j,x){var m;if(j){var k=((m=x.encodeEntities)!==null&&m!==void 0?m:x.decodeEntities)===!1?d:x.xmlMode||x.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(j).map(function(_){var E,D,C=(E=j[_])!==null&&E!==void 0?E:"";return x.xmlMode==="foreign"&&(_=(D=u.attributeNames.get(_))!==null&&D!==void 0?D:_),!x.emptyAttrs&&!x.xmlMode&&C===""?_:"".concat(_,'="').concat(k(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(j,x){x===void 0&&(x={});for(var m=("length"in j)?j:[j],k="",_=0;_<m.length;_++)k+=l(m[_],x);return k}ht.render=h,ht.default=h;function l(j,x){switch(j.type){case r.Root:return h(j.children,x);case r.Doctype:case r.Directive:return b(j);case r.Comment:return N(j);case r.CDATA:return v(j);case r.Script:case r.Style:case r.Tag:return w(j,x);case r.Text:return g(j,x)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),y=new Set(["svg","math"]);function w(j,x){var m;x.xmlMode==="foreign"&&(j.name=(m=u.elementNames.get(j.name))!==null&&m!==void 0?m:j.name,j.parent&&p.has(j.parent.name)&&(x=e(e({},x),{xmlMode:!1}))),!x.xmlMode&&y.has(j.name)&&(x=e(e({},x),{xmlMode:"foreign"}));var k="<".concat(j.name),_=f(j.attribs,x);return _&&(k+=" ".concat(_)),j.children.length===0&&(x.xmlMode?x.selfClosingTags!==!1:x.selfClosingTags&&o.has(j.name))?(x.xmlMode||(k+=" "),k+="/>"):(k+=">",j.children.length>0&&(k+=h(j.children,x)),(x.xmlMode||!o.has(j.name))&&(k+="</".concat(j.name,">"))),k}function b(j){return"<".concat(j.data,">")}function g(j,x){var m,k=j.data||"";return((m=x.encodeEntities)!==null&&m!==void 0?m:x.decodeEntities)!==!1&&!(!x.xmlMode&&j.parent&&c.has(j.parent.name))&&(k=x.xmlMode||x.encodeEntities!=="utf8"?(0,n.encodeXML)(k):(0,n.escapeText)(k)),k}function v(j){return"<![CDATA[".concat(j.children[0].data,"]]>")}function N(j){return"<!--".concat(j.data,"-->")}return ht}var Tl;function xd(){if(Tl)return Xt;Tl=1;var e=Xt&&Xt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getOuterHTML=r,Xt.getInnerHTML=n,Xt.getText=u,Xt.textContent=c,Xt.innerText=d;var a=kr(),s=e(Kh()),i=ls();function r(f,o){return(0,s.default)(f,o)}function n(f,o){return(0,a.hasChildren)(f)?f.children.map(function(h){return r(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,a.isTag)(f)?f.name==="br"?`
|
|
1032
|
-
`:u(f.children):(0,a.isCDATA)(f)?u(f.children):(0,a.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,a.hasChildren)(f)&&!(0,a.isComment)(f)?c(f.children):(0,a.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,a.hasChildren)(f)&&(f.type===i.ElementType.Tag||(0,a.isCDATA)(f))?d(f.children):(0,a.isText)(f)?f.data:""}return Xt}var Ht={},Ol;function ep(){if(Ol)return Ht;Ol=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.getChildren=a,Ht.getParent=s,Ht.getSiblings=i,Ht.getAttributeValue=r,Ht.hasAttrib=n,Ht.getName=u,Ht.nextElementSibling=c,Ht.prevElementSibling=d;var e=kr();function a(f){return(0,e.hasChildren)(f)?f.children:[]}function s(f){return f.parent||null}function i(f){var o,h,l=s(f);if(l!=null)return a(l);for(var p=[f],y=f.prev,w=f.next;y!=null;)p.unshift(y),o=y,y=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function r(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return Ht}var ur={},Pl;function tp(){if(Pl)return ur;Pl=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.removeElement=e,ur.replaceElement=a,ur.appendChild=s,ur.append=i,ur.prependChild=r,ur.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function a(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function s(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function i(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function r(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return ur}var lr={},Ll;function yd(){if(Ll)return lr;Ll=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.filter=a,lr.find=s,lr.findOneChild=i,lr.findOne=r,lr.existsOne=n,lr.findAll=u;var e=kr();function a(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),s(c,Array.isArray(d)?d:[d],f,o)}function s(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var y=l[0][p[0]++];if(c(y)&&(h.push(y),--o<=0))return h;f&&(0,e.hasChildren)(y)&&y.children.length>0&&(p.unshift(0),l.unshift(y.children))}}function i(c,d){return d.find(c)}function r(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=r(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return lr}var cr={},Ml;function vd(){if(Ml)return cr;Ml=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.testElement=u,cr.getElements=c,cr.getElementById=d,cr.getElementsByTagName=f,cr.getElementsByClassName=o,cr.getElementsByTagType=h;var e=kr(),a=yd(),s={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function i(l,p){return typeof p=="function"?function(y){return(0,e.isTag)(y)&&p(y.attribs[l])}:function(y){return(0,e.isTag)(y)&&y.attribs[l]===p}}function r(l,p){return function(y){return l(y)||p(y)}}function n(l){var p=Object.keys(l).map(function(y){var w=l[y];return Object.prototype.hasOwnProperty.call(s,y)?s[y](w):i(y,w)});return p.length===0?null:p.reduce(r)}function u(l,p){var y=n(l);return y?y(p):!0}function c(l,p,y,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,a.filter)(b,p,y,w):[]}function d(l,p,y){return y===void 0&&(y=!0),Array.isArray(p)||(p=[p]),(0,a.findOne)(i("id",l),p,y)}function f(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(s.tag_name(l),p,y,w)}function o(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(i("class",l),p,y,w)}function h(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(s.tag_type(l),p,y,w)}return cr}var wr={},$l;function rp(){if($l)return wr;$l=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.DocumentPosition=void 0,wr.removeSubsets=a,wr.compareDocumentPosition=i,wr.uniqueSort=r;var e=kr();function a(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var s;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(s||(wr.DocumentPosition=s={}));function i(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return s.DISCONNECTED;var l=c[h-1],p=l.children,y=c[h],w=d[h];return p.indexOf(y)>p.indexOf(w)?l===u?s.FOLLOWING|s.CONTAINED_BY:s.FOLLOWING:l===n?s.PRECEDING|s.CONTAINS:s.PRECEDING}function r(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=i(u,c);return d&s.PRECEDING?-1:d&s.FOLLOWING?1:0}),n}return wr}var Gs={},Rl;function ap(){if(Rl)return Gs;Rl=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.getFeed=s;var e=xd(),a=vd();function s(l){var p=d(h,l);return p?p.name==="feed"?i(p):r(p):null}function i(l){var p,y=l.children,w={type:"atom",items:(0,a.getElementsByTagName)("entry",y).map(function(v){var N,j=v.children,x={media:c(j)};o(x,"id","id",j),o(x,"title","title",j);var m=(N=d("link",j))===null||N===void 0?void 0:N.attribs.href;m&&(x.link=m);var k=f("summary",j)||f("content",j);k&&(x.description=k);var _=f("updated",j);return _&&(x.pubDate=new Date(_)),x})};o(w,"id","id",y),o(w,"title","title",y);var b=(p=d("link",y))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",y);var g=f("updated",y);return g&&(w.updated=new Date(g)),o(w,"author","email",y,!0),w}function r(l){var p,y,w=(y=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&y!==void 0?y:[],b={type:l.name.substr(0,3),id:"",items:(0,a.getElementsByTagName)("item",l.children).map(function(v){var N=v.children,j={media:c(N)};o(j,"id","guid",N),o(j,"title","title",N),o(j,"link","link",N),o(j,"description","description",N);var x=f("pubDate",N)||f("dc:date",N);return x&&(j.pubDate=new Date(x)),j})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,a.getElementsByTagName)("media:content",l).map(function(p){for(var y=p.attribs,w={medium:y.medium,isDefault:!!y.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];y[v]&&(w[v]=y[v])}for(var N=0,j=u;N<j.length;N++){var v=j[N];y[v]&&(w[v]=parseInt(y[v],10))}return y.expression&&(w.expression=y.expression),w})}function d(l,p){return(0,a.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,y){return y===void 0&&(y=!1),(0,e.textContent)((0,a.getElementsByTagName)(l,p,y,1)).trim()}function o(l,p,y,w,b){b===void 0&&(b=!1);var g=f(y,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Gs}var Il;function ni(){return Il||(Il=1,(function(e){var a=Hr&&Hr.__createBinding||(Object.create?(function(r,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(r,c,d)}):(function(r,n,u,c){c===void 0&&(c=u),r[c]=n[u]})),s=Hr&&Hr.__exportStar||function(r,n){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&a(n,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,s(xd(),e),s(ep(),e),s(tp(),e),s(yd(),e),s(vd(),e),s(rp(),e),s(ap(),e);var i=kr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})})(Hr)),Hr}var Fl;function sp(){return Fl||(Fl=1,(function(e){var a=Vt&&Vt.__createBinding||(Object.create?(function(g,v,N,j){j===void 0&&(j=N);var x=Object.getOwnPropertyDescriptor(v,N);(!x||("get"in x?!v.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return v[N]}}),Object.defineProperty(g,j,x)}):(function(g,v,N,j){j===void 0&&(j=N),g[j]=v[N]})),s=Vt&&Vt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),i=Vt&&Vt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var N in g)N!=="default"&&Object.prototype.hasOwnProperty.call(g,N)&&a(v,g,N);return s(v,g),v},r=Vt&&Vt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=yl(),u=yl();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=kr(),d=kr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var N=new c.DomHandler(void 0,v);return new n.Parser(N,v).end(g),N.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,N){var j=new c.DomHandler(g,v,N);return new n.Parser(j,v)}e.createDomStream=h;var l=bd();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return r(l).default}}),e.ElementType=i(ls());var p=ni(),y=ni();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return y.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=i(ni())})(Vt)),Vt}var ii,Bl;function np(){return Bl||(Bl=1,ii=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),ii}var Js={},ql;function ip(){if(ql)return Js;ql=1,Object.defineProperty(Js,"__esModule",{value:!0});function e(s){return Object.prototype.toString.call(s)==="[object Object]"}function a(s){var i,r;return e(s)===!1?!1:(i=s.constructor,i===void 0?!0:(r=i.prototype,!(e(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}return Js.isPlainObject=a,Js}var en={exports:{}},op=en.exports,Vl;function up(){return Vl||(Vl=1,(function(e){(function(a,s){e.exports?e.exports=s():a.parseSrcset=s()})(op,function(){return function(a){function s(j){return j===" "||j===" "||j===`
|
|
1033
|
-
`||j==="\f"||j==="\r"}function i(j){var x,m=j.exec(a.substring(b));if(m)return x=m[0],b+=x.length,x}for(var r=a.length,n=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,f=/^\d+$/,o=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,l,p,y,w,b=0,g=[];;){if(i(u),b>=r)return g;h=i(c),l=[],h.slice(-1)===","?(h=h.replace(d,""),N()):v()}function v(){for(i(n),p="",y="in descriptor";;){if(w=a.charAt(b),y==="in descriptor")if(s(w))p&&(l.push(p),p="",y="after descriptor");else if(w===","){b+=1,p&&l.push(p),N();return}else if(w==="(")p=p+w,y="in parens";else if(w===""){p&&l.push(p),N();return}else p=p+w;else if(y==="in parens")if(w===")")p=p+w,y="in descriptor";else if(w===""){l.push(p),N();return}else p=p+w;else if(y==="after descriptor"&&!s(w))if(w===""){N();return}else y="in descriptor",b-=1;b+=1}}function N(){var j=!1,x,m,k,_,E={},D,C,P,L,H;for(_=0;_<l.length;_++)D=l[_],C=D[D.length-1],P=D.substring(0,D.length-1),L=parseInt(P,10),H=parseFloat(P),f.test(P)&&C==="w"?((x||m)&&(j=!0),L===0?j=!0:x=L):o.test(P)&&C==="x"?((x||m||k)&&(j=!0),H<0?j=!0:m=H):f.test(P)&&C==="h"?((k||m)&&(j=!0),L===0?j=!0:k=L):j=!0;j?console&&console.log&&console.log("Invalid srcset descriptor found in '"+a+"' at '"+D+"'."):(E.url=h,x&&(E.w=x),m&&(E.d=m),k&&(E.h=k),g.push(E))}}})})(en)),en.exports}var Ys={exports:{}},Ul;function
|
|
1031
|
+
`);return Us.default=e,Us}var ll;function zh(){if(ll)return Vr;ll=1;var e=Vr&&Vr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.AccountNameValidator=void 0;const a=e(Uh());let s=class{static validateAccountName(r,n){let u,c,d;if(!r)return n.accountNameWrongLength;const f=r.length;if(f<3||f>16)return n.accountNameWrongLength;if(a.default.includes(r))return n.accountNameBadActor;const o=r.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Vr.AccountNameValidator=s,Vr}var cl;function Hh(){if(cl)return lt;cl=1;var e=lt&<.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var N=Object.getOwnPropertyDescriptor(b,g);(!N||("get"in N?!b.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,N)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),a=lt&<.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),s=lt&<.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return a(b,w),b},i=lt&<.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(lt,"__esModule",{value:!0}),lt.HtmlDOMParserError=lt.HtmlDOMParser=void 0;const r=s(Ah()),n=i(xn()),u=fr(),c=$h(),d=to(),f=Vh(),o=pd(),h=zh(),l=s(dd());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new r.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new r.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.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},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new y("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new y("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new y("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const N=v.tagName?v.tagName.toLowerCase():null;N&&this.state.htmltags.add(N),N==="img"?this.processImgTag(v):N==="iframe"?this.processIframeTag(v):N==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",N=this.linkSanitizer.sanitizeLink(g,v);if(N===!1){const j=b.ownerDocument.createElement("div");j.textContent=`${b.textContent} / ${g}`,j.setAttribute("title",this.localization.phishingWarning),j.setAttribute("class","phishy");const x=b.parentNode;x&&(x.appendChild(j),x.removeChild(b))}else b.setAttribute("href",N)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const N=this.xmlSerializer.serializeToString(b),j=this.domParser.parseFromString(`<div class="videoWrapper">${N}</div>`),x=b.parentNode;x&&(x.appendChild(j),x.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(x=>this.state.images.add(x)),v.links.forEach(x=>this.state.links.add(x));const N=this.xmlSerializer.serializeToString(b),j=this.linkify(N);if(this.mutate&&j!==N){const x=this.domParser.parseFromString(`<span>${j}</span>`),m=b.parentNode;return m&&(m.appendChild(x),m.removeChild(b)),x}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",j=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(j),!this.mutate)return g;const x=this.options.hashtagUrlFn(j);return v+`<a href="${x}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,N,j)=>{const x=j.toLowerCase(),m=h.AccountNameValidator.validateAccountName(x,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(x);const k=(v||"")+(N||"");if(!this.mutate)return`${k}${j}`;const _=this.options.usertagUrlFn(x);return m?`${k}<a href="${_}">@${j}</a>`:`${k}@${j}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const N=g.parentNode;N&&(N.appendChild(v),N.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};lt.HtmlDOMParser=p;class y extends n.default{constructor(b,g){super(b,g)}}return lt.HtmlDOMParserError=y,lt}var ts={},dl;function Wh(){if(dl)return ts;dl=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.PreliminarySanitizer=void 0;let e=class gd{static preliminarySanitize(s){return gd.stripHtmlComments(s)}static stripHtmlComments(s){return s.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return ts.PreliminarySanitizer=e,ts}var Ur={},Vt={},Ut={},ei={},zt={},zs={},fl;function Gh(){return fl||(fl=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.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(e){return e.charCodeAt(0)}))),zs}var Hs={},hl;function Jh(){return hl||(hl=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Hs}var ti={},pl;function ml(){return pl||(pl=1,(function(e){var a;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var s=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]]);e.fromCodePoint=(a=String.fromCodePoint)!==null&&a!==void 0?a:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function i(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=s.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=i;function r(n){return(0,e.fromCodePoint)(i(n))}e.default=r})(ti)),ti}var gl;function on(){return gl||(gl=1,(function(e){var a=zt&&zt.__createBinding||(Object.create?(function(C,P,L,H){H===void 0&&(H=L);var F=Object.getOwnPropertyDescriptor(P,L);(!F||("get"in F?!P.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return P[L]}}),Object.defineProperty(C,H,F)}):(function(C,P,L,H){H===void 0&&(H=L),C[H]=P[L]})),s=zt&&zt.__setModuleDefault||(Object.create?(function(C,P){Object.defineProperty(C,"default",{enumerable:!0,value:P})}):function(C,P){C.default=P}),i=zt&&zt.__importStar||function(C){if(C&&C.__esModule)return C;var P={};if(C!=null)for(var L in C)L!=="default"&&Object.prototype.hasOwnProperty.call(C,L)&&a(P,C,L);return s(P,C),P},r=zt&&zt.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=r(Gh());e.htmlDecodeTree=n.default;var u=r(Jh());e.xmlDecodeTree=u.default;var c=i(ml());e.decodeCodePoint=c.default;var d=ml();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function y(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||y(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(P,L,H){this.decodeTree=P,this.emitCodePoint=L,this.errors=H,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(P){this.decodeMode=P,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(P,L){switch(this.state){case b.EntityStart:return P.charCodeAt(L)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(P,L+1)):(this.state=b.NamedEntity,this.stateNamedEntity(P,L));case b.NumericStart:return this.stateNumericStart(P,L);case b.NumericDecimal:return this.stateNumericDecimal(P,L);case b.NumericHex:return this.stateNumericHex(P,L);case b.NamedEntity:return this.stateNamedEntity(P,L)}},C.prototype.stateNumericStart=function(P,L){return L>=P.length?-1:(P.charCodeAt(L)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(P,L+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(P,L))},C.prototype.addToNumericResult=function(P,L,H,F){if(L!==H){var q=H-L;this.result=this.result*Math.pow(F,q)+parseInt(P.substr(L,q),F),this.consumed+=q}},C.prototype.stateNumericHex=function(P,L){for(var H=L;L<P.length;){var F=P.charCodeAt(L);if(l(F)||p(F))L+=1;else return this.addToNumericResult(P,H,L,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(P,H,L,16),-1},C.prototype.stateNumericDecimal=function(P,L){for(var H=L;L<P.length;){var F=P.charCodeAt(L);if(l(F))L+=1;else return this.addToNumericResult(P,H,L,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(P,H,L,10),-1},C.prototype.emitNumericEntity=function(P,L){var H;if(this.consumed<=L)return(H=this.errors)===null||H===void 0||H.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},C.prototype.stateNamedEntity=function(P,L){for(var H=this.decodeTree,F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14;L<P.length;L++,this.excess++){var M=P.charCodeAt(L);if(this.treeIndex=j(H,F,this.treeIndex+Math.max(1,q),M),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(q===0||w(M))?0:this.emitNotTerminatedNamedEntity();if(F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14,q!==0){if(M===f.SEMI)return this.emitNamedEntityData(this.treeIndex,q,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var P,L=this,H=L.result,F=L.decodeTree,q=(F[H]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,q,this.consumed),(P=this.errors)===null||P===void 0||P.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(P,L,H){var F=this.decodeTree;return this.emitCodePoint(L===1?F[P]&~h.VALUE_LENGTH:F[P+1],H),L===3&&this.emitCodePoint(F[P+2],H),H},C.prototype.end=function(){var P;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function N(C){var P="",L=new v(C,function(H){return P+=(0,c.fromCodePoint)(H)});return function(F,q){for(var M=0,G=0;(G=F.indexOf("&",G))>=0;){P+=F.slice(M,G),L.startEntity(q);var X=L.write(F,G+1);if(X<0){M=G+L.end();break}M=G+X,G=X===0?M+1:M}var ee=P+F.slice(M);return P="",ee}}function j(C,P,L,H){var F=(P&h.BRANCH_LENGTH)>>7,q=P&h.JUMP_TABLE;if(F===0)return q!==0&&H===q?L:-1;if(q){var M=H-q;return M<0||M>=F?-1:C[L+M]-1}for(var G=L,X=G+F-1;G<=X;){var ee=G+X>>>1,R=C[ee];if(R<H)G=ee+1;else if(R>H)X=ee-1;else return C[ee+F]}return-1}e.determineBranch=j;var x=N(n.default),m=N(u.default);function k(C,P){return P===void 0&&(P=g.Legacy),x(C,P)}e.decodeHTML=k;function _(C){return x(C,g.Attribute)}e.decodeHTMLAttribute=_;function E(C){return x(C,g.Strict)}e.decodeHTMLStrict=E;function D(C){return m(C,g.Strict)}e.decodeXML=D})(zt)),zt}var bl;function bd(){return bl||(bl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var a=on(),s;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(s||(s={}));var i;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(i||(i={}));function r(l){return l===s.Space||l===s.NewLine||l===s.Tab||l===s.FormFeed||l===s.CarriageReturn}function n(l){return l===s.Slash||l===s.Gt||r(l)}function u(l){return l>=s.Zero&&l<=s.Nine}function c(l){return l>=s.LowerA&&l<=s.LowerZ||l>=s.UpperA&&l<=s.UpperZ}function d(l){return l>=s.UpperA&&l<=s.UpperF||l>=s.LowerA&&l<=s.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={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 l(p,y){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=y,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.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=b,this.decodeEntities=v,this.entityTrie=b?a.xmlDecodeTree:a.htmlDecodeTree}return l.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===s.Lt||!this.decodeEntities&&this.fastForwardTo(s.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===s.Amp&&(this.state=i.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var y=this.sequenceIndex===this.currentSequence.length,w=y?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!y){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===s.Gt||r(p)){var y=this.index-this.currentSequence.length;if(this.sectionStart<y){var w=this.index;this.index=y,this.cbs.ontext(this.sectionStart,y),this.index=w}this.isSpecial=!1,this.sectionStart=y+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===s.Amp&&(this.state=i.BeforeEntity):this.fastForwardTo(s.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===s.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=i.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=i.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.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=i.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,y){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=y,this.state=i.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===s.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===s.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var y=p|32;this.sectionStart=this.index,!this.xmlMode&&y===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&y===o.ScriptEnd[2]?i.BeforeSpecialS:i.InTagName}else p===s.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){r(p)||(p===s.Gt?this.state=i.Text:(this.state=this.isTagStartChar(p)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===s.Gt||r(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===s.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===s.Slash?this.state=i.InSelfClosingTag:r(p)||(this.state=i.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===s.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(p)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===s.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===s.Eq?this.state=i.BeforeAttributeValue:p===s.Slash||p===s.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p)):r(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===s.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):p===s.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):r(p)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,y){p===y||!this.decodeEntities&&this.fastForwardTo(y)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(y===s.DoubleQuote?f.Double:f.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&p===s.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,s.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,s.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){r(p)||p===s.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===s.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===s.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=p===s.Dash?i.BeforeComment:i.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===s.Dash?(this.state=i.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===s.Gt||this.fastForwardTo(s.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var y=p|32;y===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):y===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===s.Number?this.state=i.BeforeNumericEntity:p===s.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var y=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(y){var w=(y>>14)-1;if(!this.allowLegacyEntity()&&p!==s.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~a.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])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===s.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var y=this.index-this.entityExcess-1,w=y+2+ +(this.state===i.InHexEntity);w!==this.index&&(y>this.sectionStart&&this.emitPartial(this.sectionStart,y),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===s.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-s.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===s.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-s.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-s.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===i.InAttributeValueDq||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case i.Text:{this.stateText(p);break}case i.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case i.InSpecialTag:{this.stateInSpecialTag(p);break}case i.CDATASequence:{this.stateCDATASequence(p);break}case i.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case i.InAttributeName:{this.stateInAttributeName(p);break}case i.InCommentLike:{this.stateInCommentLike(p);break}case i.InSpecialComment:{this.stateInSpecialComment(p);break}case i.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case i.InTagName:{this.stateInTagName(p);break}case i.InClosingTagName:{this.stateInClosingTagName(p);break}case i.BeforeTagName:{this.stateBeforeTagName(p);break}case i.AfterAttributeName:{this.stateAfterAttributeName(p);break}case i.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case i.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case i.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case i.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case i.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case i.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case i.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case i.InDeclaration:{this.stateInDeclaration(p);break}case i.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case i.BeforeComment:{this.stateBeforeComment(p);break}case i.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case i.InNamedEntity:{this.stateInNamedEntity(p);break}case i.BeforeEntity:{this.stateBeforeEntity(p);break}case i.InHexEntity:{this.stateInHexEntity(p);break}case i.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===i.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===i.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===i.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,y){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribdata(p,y):this.cbs.ontext(p,y)},l.prototype.emitCodePoint=function(p){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(ei)),ei}var xl;function yl(){if(xl)return Ut;xl=1;var e=Ut&&Ut.__createBinding||(Object.create?(function(b,g,v,N){N===void 0&&(N=v);var j=Object.getOwnPropertyDescriptor(g,v);(!j||("get"in j?!g.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,N,j)}):(function(b,g,v,N){N===void 0&&(N=v),b[N]=g[v]})),a=Ut&&Ut.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),s=Ut&&Ut.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return a(g,b),g};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Parser=void 0;var i=s(bd()),r=on(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=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",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),y=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var N,j,x,m,k;this.options=v,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=g??{},this.lowerCaseTagNames=(N=v.lowerCaseTags)!==null&&N!==void 0?N:!v.xmlMode,this.lowerCaseAttributeNames=(j=v.lowerCaseAttributeNames)!==null&&j!==void 0?j:!v.xmlMode,this.tokenizer=new((x=v.Tokenizer)!==null&&x!==void 0?x:i.default)(this.options,this),(k=(m=this.cbs).onparserinit)===null||k===void 0||k.call(m,this)}return b.prototype.ontext=function(g,v){var N,j,x=this.getSlice(g,v);this.endIndex=v-1,(j=(N=this.cbs).ontext)===null||j===void 0||j.call(N,x),this.startIndex=v},b.prototype.ontextentity=function(g){var v,N,j=this.tokenizer.getSectionStart();this.endIndex=j-1,(N=(v=this.cbs).ontext)===null||N===void 0||N.call(v,(0,r.fromCodePoint)(g)),this.startIndex=j},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);this.lowerCaseTagNames&&(N=N.toLowerCase()),this.emitOpenTag(N)},b.prototype.emitOpenTag=function(g){var v,N,j,x;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var k=this.stack.pop();(N=(v=this.cbs).onclosetag)===null||N===void 0||N.call(v,k,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(x=(j=this.cbs).onopentagname)===null||x===void 0||x.call(j,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,N;this.startIndex=this.openTagStart,this.attribs&&((N=(v=this.cbs).onopentag)===null||N===void 0||N.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var N,j,x,m,k,_;this.endIndex=v;var E=this.getSlice(g,v);if(this.lowerCaseTagNames&&(E=E.toLowerCase()),(l.has(E)||p.has(E))&&this.foreignContext.pop(),this.isVoidElement(E))!this.options.xmlMode&&E==="br"&&((j=(N=this.cbs).onopentagname)===null||j===void 0||j.call(N,"br"),(m=(x=this.cbs).onopentag)===null||m===void 0||m.call(x,"br",{},!0),(_=(k=this.cbs).onclosetag)===null||_===void 0||_.call(k,"br",!1));else{var D=this.stack.lastIndexOf(E);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&E==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,N,j=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===j&&((N=(v=this.cbs).onclosetag)===null||N===void 0||N.call(v,j,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var N=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?N.toLowerCase():N},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,r.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var N,j;this.endIndex=v,(j=(N=this.cbs).onattribute)===null||j===void 0||j.call(N,this.attribname,this.attribvalue,g===i.QuoteType.Double?'"':g===i.QuoteType.Single?"'":g===i.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(y),N=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(N=N.toLowerCase()),N},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var j=this.getInstructionName(N);this.cbs.onprocessinginstruction("!".concat(j),"!".concat(N))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var N=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var j=this.getInstructionName(N);this.cbs.onprocessinginstruction("?".concat(j),"?".concat(N))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,N){var j,x,m,k;this.endIndex=v,(x=(j=this.cbs).oncomment)===null||x===void 0||x.call(j,this.getSlice(g,v-N)),(k=(m=this.cbs).oncommentend)===null||k===void 0||k.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,N){var j,x,m,k,_,E,D,C,P,L;this.endIndex=v;var H=this.getSlice(g,v-N);this.options.xmlMode||this.options.recognizeCDATA?((x=(j=this.cbs).oncdatastart)===null||x===void 0||x.call(j),(k=(m=this.cbs).ontext)===null||k===void 0||k.call(m,H),(E=(_=this.cbs).oncdataend)===null||E===void 0||E.call(_)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(H,"]]")),(L=(P=this.cbs).oncommentend)===null||L===void 0||L.call(P)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var N=this.stack.length;N>0;this.cbs.onclosetag(this.stack[--N],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,N,j;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(j=(N=this.cbs).onparserinit)===null||j===void 0||j.call(N,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var N=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),N+=this.buffers[0].slice(0,v-this.bufferOffset);return N},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,N;if(this.ended){(N=(v=this.cbs).onerror)===null||N===void 0||N.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,N;if(this.ended){(N=(v=this.cbs).onerror)===null||N===void 0||N.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.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()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return Ut.Parser=w,Ut}var zr={},ri={},vl;function ls(){return vl||(vl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var a;(function(i){i.Root="root",i.Text="text",i.Directive="directive",i.Comment="comment",i.Script="script",i.Style="style",i.Tag="tag",i.CDATA="cdata",i.Doctype="doctype"})(a=e.ElementType||(e.ElementType={}));function s(i){return i.type===a.Tag||i.type===a.Script||i.type===a.Style}e.isTag=s,e.Root=a.Root,e.Text=a.Text,e.Directive=a.Directive,e.Comment=a.Comment,e.Script=a.Script,e.Style=a.Style,e.Tag=a.Tag,e.CDATA=a.CDATA,e.Doctype=a.Doctype})(ri)),ri}var we={},wl;function Nl(){if(wl)return we;wl=1;var e=we&&we.__extends||(function(){var x=function(m,k){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,E){_.__proto__=E}||function(_,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(_[D]=E[D])},x(m,k)};return function(m,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");x(m,k);function _(){this.constructor=m}m.prototype=k===null?Object.create(k):(_.prototype=k.prototype,new _)}})(),a=we&&we.__assign||function(){return a=Object.assign||function(x){for(var m,k=1,_=arguments.length;k<_;k++){m=arguments[k];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(x[E]=m[E])}return x},a.apply(this,arguments)};Object.defineProperty(we,"__esModule",{value:!0}),we.cloneNode=we.hasChildren=we.isDocument=we.isDirective=we.isComment=we.isText=we.isCDATA=we.isTag=we.Element=we.Document=we.CDATA=we.NodeWithChildren=we.ProcessingInstruction=we.Comment=we.Text=we.DataNode=we.Node=void 0;var s=ls(),i=(function(){function x(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),x.prototype.cloneNode=function(m){return m===void 0&&(m=!1),N(this,m)},x})();we.Node=i;var r=(function(x){e(m,x);function m(k){var _=x.call(this)||this;return _.data=k,_}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),m})(i);we.DataNode=r;var n=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Text,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(r);we.Text=n;var u=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Comment,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(r);we.Comment=u;var c=(function(x){e(m,x);function m(k,_){var E=x.call(this,_)||this;return E.name=k,E.type=s.ElementType.Directive,E}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(r);we.ProcessingInstruction=c;var d=(function(x){e(m,x);function m(k){var _=x.call(this)||this;return _.children=k,_}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),m})(i);we.NodeWithChildren=d;var f=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.CDATA,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);we.CDATA=f;var o=(function(x){e(m,x);function m(){var k=x!==null&&x.apply(this,arguments)||this;return k.type=s.ElementType.Root,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);we.Document=o;var h=(function(x){e(m,x);function m(k,_,E,D){E===void 0&&(E=[]),D===void 0&&(D=k==="script"?s.ElementType.Script:k==="style"?s.ElementType.Style:s.ElementType.Tag);var C=x.call(this,E)||this;return C.name=k,C.attribs=_,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(_){var E,D;return{name:_,value:k.attribs[_],namespace:(E=k["x-attribsNamespace"])===null||E===void 0?void 0:E[_],prefix:(D=k["x-attribsPrefix"])===null||D===void 0?void 0:D[_]}})},enumerable:!1,configurable:!0}),m})(d);we.Element=h;function l(x){return(0,s.isTag)(x)}we.isTag=l;function p(x){return x.type===s.ElementType.CDATA}we.isCDATA=p;function y(x){return x.type===s.ElementType.Text}we.isText=y;function w(x){return x.type===s.ElementType.Comment}we.isComment=w;function b(x){return x.type===s.ElementType.Directive}we.isDirective=b;function g(x){return x.type===s.ElementType.Root}we.isDocument=g;function v(x){return Object.prototype.hasOwnProperty.call(x,"children")}we.hasChildren=v;function N(x,m){m===void 0&&(m=!1);var k;if(y(x))k=new n(x.data);else if(w(x))k=new u(x.data);else if(l(x)){var _=m?j(x.children):[],E=new h(x.name,a({},x.attribs),_);_.forEach(function(L){return L.parent=E}),x.namespace!=null&&(E.namespace=x.namespace),x["x-attribsNamespace"]&&(E["x-attribsNamespace"]=a({},x["x-attribsNamespace"])),x["x-attribsPrefix"]&&(E["x-attribsPrefix"]=a({},x["x-attribsPrefix"])),k=E}else if(p(x)){var _=m?j(x.children):[],D=new f(_);_.forEach(function(H){return H.parent=D}),k=D}else if(g(x)){var _=m?j(x.children):[],C=new o(_);_.forEach(function(H){return H.parent=C}),x["x-mode"]&&(C["x-mode"]=x["x-mode"]),k=C}else if(b(x)){var P=new c(x.name,x.data);x["x-name"]!=null&&(P["x-name"]=x["x-name"],P["x-publicId"]=x["x-publicId"],P["x-systemId"]=x["x-systemId"]),k=P}else throw new Error("Not implemented yet: ".concat(x.type));return k.startIndex=x.startIndex,k.endIndex=x.endIndex,x.sourceCodeLocation!=null&&(k.sourceCodeLocation=x.sourceCodeLocation),k}we.cloneNode=N;function j(x){for(var m=x.map(function(_){return N(_,!0)}),k=1;k<m.length;k++)m[k].prev=m[k-1],m[k-1].next=m[k];return m}return we}var jl;function kr(){return jl||(jl=1,(function(e){var a=zr&&zr.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),s=zr&&zr.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&a(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var i=ls(),r=Nl();s(Nl(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new r.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(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?i.ElementType.Tag:void 0,h=new r.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===i.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new r.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment){this.lastNode.data+=d;return}var f=new r.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new r.Text(""),f=new r.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new r.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(zr)),zr}var Hr={},Xt={},ht={},ai={},or={},Ws={},kl;function Yh(){if(kl)return Ws;kl=1,Object.defineProperty(Ws,"__esModule",{value:!0});function e(a){for(var s=1;s<a.length;s++)a[s][0]+=a[s-1][0]+1;return a}return Ws.default=new Map(e([[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(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[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(e([[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"]])),Ws}var si={},_l;function Gi(){return _l||(_l=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var a=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,n){return r.codePointAt(n)}:function(r,n){return(r.charCodeAt(n)&64512)===55296?(r.charCodeAt(n)-55296)*1024+r.charCodeAt(n+1)-56320+65536:r.charCodeAt(n)};function s(r){for(var n="",u=0,c;(c=e.xmlReplacer.exec(r))!==null;){var d=c.index,f=r.charCodeAt(d),o=a.get(f);o!==void 0?(n+=r.substring(u,d)+o,u=d+1):(n+="".concat(r.substring(u,d),"&#x").concat((0,e.getCodePoint)(r,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+r.substr(u)}e.encodeXML=s,e.escape=s;function i(r,n){return function(c){for(var d,f=0,o="";d=r.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=i(/[&<>'"]/g,a),e.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(si)),si}var El;function Al(){if(El)return or;El=1;var e=or&&or.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(or,"__esModule",{value:!0}),or.encodeNonAsciiHTML=or.encodeHTML=void 0;var a=e(Yh()),s=Gi(),i=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function r(c){return u(i,c)}or.encodeHTML=r;function n(c){return u(s.xmlReplacer,c)}or.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),y=a.default.get(p);if(typeof y=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof y.n=="number"?y.n===w?y.o:void 0:y.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}y=y.v}if(y!==void 0)f+=y,o=l+1;else{var g=(0,s.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return or}var Sl;function Zh(){return Sl||(Sl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var a=on(),s=Al(),i=Gi(),r;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(r=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=r.XML);var y=typeof p=="number"?p:p.level;if(y===r.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,a.decodeHTML)(l,w)}return(0,a.decodeXML)(l)}e.decode=u;function c(l,p){var y;p===void 0&&(p=r.XML);var w=typeof p=="number"?{level:p}:p;return(y=w.mode)!==null&&y!==void 0||(w.mode=a.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=r.XML);var y=typeof p=="number"?{level:p}:p;return y.mode===n.UTF8?(0,i.escapeUTF8)(l):y.mode===n.Attribute?(0,i.escapeAttribute)(l):y.mode===n.Text?(0,i.escapeText)(l):y.level===r.HTML?y.mode===n.ASCII?(0,s.encodeNonAsciiHTML)(l):(0,s.encodeHTML)(l):(0,i.encodeXML)(l)}e.encode=d;var f=Gi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=Al();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=on();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(ai)),ai}var Wr={},Cl;function Xh(){return Cl||(Cl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.attributeNames=Wr.elementNames=void 0,Wr.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(e){return[e.toLowerCase(),e]})),Wr.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(e){return[e.toLowerCase(),e]}))),Wr}var Dl;function Qh(){if(Dl)return ht;Dl=1;var e=ht&&ht.__assign||function(){return e=Object.assign||function(j){for(var x,m=1,k=arguments.length;m<k;m++){x=arguments[m];for(var _ in x)Object.prototype.hasOwnProperty.call(x,_)&&(j[_]=x[_])}return j},e.apply(this,arguments)},a=ht&&ht.__createBinding||(Object.create?(function(j,x,m,k){k===void 0&&(k=m);var _=Object.getOwnPropertyDescriptor(x,m);(!_||("get"in _?!x.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return x[m]}}),Object.defineProperty(j,k,_)}):(function(j,x,m,k){k===void 0&&(k=m),j[k]=x[m]})),s=ht&&ht.__setModuleDefault||(Object.create?(function(j,x){Object.defineProperty(j,"default",{enumerable:!0,value:x})}):function(j,x){j.default=x}),i=ht&&ht.__importStar||function(j){if(j&&j.__esModule)return j;var x={};if(j!=null)for(var m in j)m!=="default"&&Object.prototype.hasOwnProperty.call(j,m)&&a(x,j,m);return s(x,j),x};Object.defineProperty(ht,"__esModule",{value:!0}),ht.render=void 0;var r=i(ls()),n=Zh(),u=Xh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(j){return j.replace(/"/g,""")}function f(j,x){var m;if(j){var k=((m=x.encodeEntities)!==null&&m!==void 0?m:x.decodeEntities)===!1?d:x.xmlMode||x.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(j).map(function(_){var E,D,C=(E=j[_])!==null&&E!==void 0?E:"";return x.xmlMode==="foreign"&&(_=(D=u.attributeNames.get(_))!==null&&D!==void 0?D:_),!x.emptyAttrs&&!x.xmlMode&&C===""?_:"".concat(_,'="').concat(k(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(j,x){x===void 0&&(x={});for(var m=("length"in j)?j:[j],k="",_=0;_<m.length;_++)k+=l(m[_],x);return k}ht.render=h,ht.default=h;function l(j,x){switch(j.type){case r.Root:return h(j.children,x);case r.Doctype:case r.Directive:return b(j);case r.Comment:return N(j);case r.CDATA:return v(j);case r.Script:case r.Style:case r.Tag:return w(j,x);case r.Text:return g(j,x)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),y=new Set(["svg","math"]);function w(j,x){var m;x.xmlMode==="foreign"&&(j.name=(m=u.elementNames.get(j.name))!==null&&m!==void 0?m:j.name,j.parent&&p.has(j.parent.name)&&(x=e(e({},x),{xmlMode:!1}))),!x.xmlMode&&y.has(j.name)&&(x=e(e({},x),{xmlMode:"foreign"}));var k="<".concat(j.name),_=f(j.attribs,x);return _&&(k+=" ".concat(_)),j.children.length===0&&(x.xmlMode?x.selfClosingTags!==!1:x.selfClosingTags&&o.has(j.name))?(x.xmlMode||(k+=" "),k+="/>"):(k+=">",j.children.length>0&&(k+=h(j.children,x)),(x.xmlMode||!o.has(j.name))&&(k+="</".concat(j.name,">"))),k}function b(j){return"<".concat(j.data,">")}function g(j,x){var m,k=j.data||"";return((m=x.encodeEntities)!==null&&m!==void 0?m:x.decodeEntities)!==!1&&!(!x.xmlMode&&j.parent&&c.has(j.parent.name))&&(k=x.xmlMode||x.encodeEntities!=="utf8"?(0,n.encodeXML)(k):(0,n.escapeText)(k)),k}function v(j){return"<![CDATA[".concat(j.children[0].data,"]]>")}function N(j){return"<!--".concat(j.data,"-->")}return ht}var Tl;function xd(){if(Tl)return Xt;Tl=1;var e=Xt&&Xt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getOuterHTML=r,Xt.getInnerHTML=n,Xt.getText=u,Xt.textContent=c,Xt.innerText=d;var a=kr(),s=e(Qh()),i=ls();function r(f,o){return(0,s.default)(f,o)}function n(f,o){return(0,a.hasChildren)(f)?f.children.map(function(h){return r(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,a.isTag)(f)?f.name==="br"?`
|
|
1032
|
+
`:u(f.children):(0,a.isCDATA)(f)?u(f.children):(0,a.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,a.hasChildren)(f)&&!(0,a.isComment)(f)?c(f.children):(0,a.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,a.hasChildren)(f)&&(f.type===i.ElementType.Tag||(0,a.isCDATA)(f))?d(f.children):(0,a.isText)(f)?f.data:""}return Xt}var Ht={},Ol;function Kh(){if(Ol)return Ht;Ol=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.getChildren=a,Ht.getParent=s,Ht.getSiblings=i,Ht.getAttributeValue=r,Ht.hasAttrib=n,Ht.getName=u,Ht.nextElementSibling=c,Ht.prevElementSibling=d;var e=kr();function a(f){return(0,e.hasChildren)(f)?f.children:[]}function s(f){return f.parent||null}function i(f){var o,h,l=s(f);if(l!=null)return a(l);for(var p=[f],y=f.prev,w=f.next;y!=null;)p.unshift(y),o=y,y=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function r(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return Ht}var ur={},Pl;function ep(){if(Pl)return ur;Pl=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.removeElement=e,ur.replaceElement=a,ur.appendChild=s,ur.append=i,ur.prependChild=r,ur.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function a(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function s(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function i(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function r(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return ur}var lr={},Ll;function yd(){if(Ll)return lr;Ll=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.filter=a,lr.find=s,lr.findOneChild=i,lr.findOne=r,lr.existsOne=n,lr.findAll=u;var e=kr();function a(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),s(c,Array.isArray(d)?d:[d],f,o)}function s(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var y=l[0][p[0]++];if(c(y)&&(h.push(y),--o<=0))return h;f&&(0,e.hasChildren)(y)&&y.children.length>0&&(p.unshift(0),l.unshift(y.children))}}function i(c,d){return d.find(c)}function r(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=r(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return lr}var cr={},Ml;function vd(){if(Ml)return cr;Ml=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.testElement=u,cr.getElements=c,cr.getElementById=d,cr.getElementsByTagName=f,cr.getElementsByClassName=o,cr.getElementsByTagType=h;var e=kr(),a=yd(),s={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function i(l,p){return typeof p=="function"?function(y){return(0,e.isTag)(y)&&p(y.attribs[l])}:function(y){return(0,e.isTag)(y)&&y.attribs[l]===p}}function r(l,p){return function(y){return l(y)||p(y)}}function n(l){var p=Object.keys(l).map(function(y){var w=l[y];return Object.prototype.hasOwnProperty.call(s,y)?s[y](w):i(y,w)});return p.length===0?null:p.reduce(r)}function u(l,p){var y=n(l);return y?y(p):!0}function c(l,p,y,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,a.filter)(b,p,y,w):[]}function d(l,p,y){return y===void 0&&(y=!0),Array.isArray(p)||(p=[p]),(0,a.findOne)(i("id",l),p,y)}function f(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(s.tag_name(l),p,y,w)}function o(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(i("class",l),p,y,w)}function h(l,p,y,w){return y===void 0&&(y=!0),w===void 0&&(w=1/0),(0,a.filter)(s.tag_type(l),p,y,w)}return cr}var wr={},$l;function tp(){if($l)return wr;$l=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.DocumentPosition=void 0,wr.removeSubsets=a,wr.compareDocumentPosition=i,wr.uniqueSort=r;var e=kr();function a(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var s;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(s||(wr.DocumentPosition=s={}));function i(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return s.DISCONNECTED;var l=c[h-1],p=l.children,y=c[h],w=d[h];return p.indexOf(y)>p.indexOf(w)?l===u?s.FOLLOWING|s.CONTAINED_BY:s.FOLLOWING:l===n?s.PRECEDING|s.CONTAINS:s.PRECEDING}function r(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=i(u,c);return d&s.PRECEDING?-1:d&s.FOLLOWING?1:0}),n}return wr}var Gs={},Rl;function rp(){if(Rl)return Gs;Rl=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.getFeed=s;var e=xd(),a=vd();function s(l){var p=d(h,l);return p?p.name==="feed"?i(p):r(p):null}function i(l){var p,y=l.children,w={type:"atom",items:(0,a.getElementsByTagName)("entry",y).map(function(v){var N,j=v.children,x={media:c(j)};o(x,"id","id",j),o(x,"title","title",j);var m=(N=d("link",j))===null||N===void 0?void 0:N.attribs.href;m&&(x.link=m);var k=f("summary",j)||f("content",j);k&&(x.description=k);var _=f("updated",j);return _&&(x.pubDate=new Date(_)),x})};o(w,"id","id",y),o(w,"title","title",y);var b=(p=d("link",y))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",y);var g=f("updated",y);return g&&(w.updated=new Date(g)),o(w,"author","email",y,!0),w}function r(l){var p,y,w=(y=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&y!==void 0?y:[],b={type:l.name.substr(0,3),id:"",items:(0,a.getElementsByTagName)("item",l.children).map(function(v){var N=v.children,j={media:c(N)};o(j,"id","guid",N),o(j,"title","title",N),o(j,"link","link",N),o(j,"description","description",N);var x=f("pubDate",N)||f("dc:date",N);return x&&(j.pubDate=new Date(x)),j})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,a.getElementsByTagName)("media:content",l).map(function(p){for(var y=p.attribs,w={medium:y.medium,isDefault:!!y.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];y[v]&&(w[v]=y[v])}for(var N=0,j=u;N<j.length;N++){var v=j[N];y[v]&&(w[v]=parseInt(y[v],10))}return y.expression&&(w.expression=y.expression),w})}function d(l,p){return(0,a.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,y){return y===void 0&&(y=!1),(0,e.textContent)((0,a.getElementsByTagName)(l,p,y,1)).trim()}function o(l,p,y,w,b){b===void 0&&(b=!1);var g=f(y,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Gs}var Il;function ni(){return Il||(Il=1,(function(e){var a=Hr&&Hr.__createBinding||(Object.create?(function(r,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(r,c,d)}):(function(r,n,u,c){c===void 0&&(c=u),r[c]=n[u]})),s=Hr&&Hr.__exportStar||function(r,n){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&a(n,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,s(xd(),e),s(Kh(),e),s(ep(),e),s(yd(),e),s(vd(),e),s(tp(),e),s(rp(),e);var i=kr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})})(Hr)),Hr}var Fl;function ap(){return Fl||(Fl=1,(function(e){var a=Vt&&Vt.__createBinding||(Object.create?(function(g,v,N,j){j===void 0&&(j=N);var x=Object.getOwnPropertyDescriptor(v,N);(!x||("get"in x?!v.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return v[N]}}),Object.defineProperty(g,j,x)}):(function(g,v,N,j){j===void 0&&(j=N),g[j]=v[N]})),s=Vt&&Vt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),i=Vt&&Vt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var N in g)N!=="default"&&Object.prototype.hasOwnProperty.call(g,N)&&a(v,g,N);return s(v,g),v},r=Vt&&Vt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=yl(),u=yl();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=kr(),d=kr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var N=new c.DomHandler(void 0,v);return new n.Parser(N,v).end(g),N.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,N){var j=new c.DomHandler(g,v,N);return new n.Parser(j,v)}e.createDomStream=h;var l=bd();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return r(l).default}}),e.ElementType=i(ls());var p=ni(),y=ni();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return y.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=i(ni())})(Vt)),Vt}var ii,Bl;function sp(){return Bl||(Bl=1,ii=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),ii}var Js={},ql;function np(){if(ql)return Js;ql=1,Object.defineProperty(Js,"__esModule",{value:!0});function e(s){return Object.prototype.toString.call(s)==="[object Object]"}function a(s){var i,r;return e(s)===!1?!1:(i=s.constructor,i===void 0?!0:(r=i.prototype,!(e(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}return Js.isPlainObject=a,Js}var en={exports:{}},ip=en.exports,Vl;function op(){return Vl||(Vl=1,(function(e){(function(a,s){e.exports?e.exports=s():a.parseSrcset=s()})(ip,function(){return function(a){function s(j){return j===" "||j===" "||j===`
|
|
1033
|
+
`||j==="\f"||j==="\r"}function i(j){var x,m=j.exec(a.substring(b));if(m)return x=m[0],b+=x.length,x}for(var r=a.length,n=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,f=/^\d+$/,o=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,l,p,y,w,b=0,g=[];;){if(i(u),b>=r)return g;h=i(c),l=[],h.slice(-1)===","?(h=h.replace(d,""),N()):v()}function v(){for(i(n),p="",y="in descriptor";;){if(w=a.charAt(b),y==="in descriptor")if(s(w))p&&(l.push(p),p="",y="after descriptor");else if(w===","){b+=1,p&&l.push(p),N();return}else if(w==="(")p=p+w,y="in parens";else if(w===""){p&&l.push(p),N();return}else p=p+w;else if(y==="in parens")if(w===")")p=p+w,y="in descriptor";else if(w===""){l.push(p),N();return}else p=p+w;else if(y==="after descriptor"&&!s(w))if(w===""){N();return}else y="in descriptor",b-=1;b+=1}}function N(){var j=!1,x,m,k,_,E={},D,C,P,L,H;for(_=0;_<l.length;_++)D=l[_],C=D[D.length-1],P=D.substring(0,D.length-1),L=parseInt(P,10),H=parseFloat(P),f.test(P)&&C==="w"?((x||m)&&(j=!0),L===0?j=!0:x=L):o.test(P)&&C==="x"?((x||m||k)&&(j=!0),H<0?j=!0:m=H):f.test(P)&&C==="h"?((k||m)&&(j=!0),L===0?j=!0:k=L):j=!0;j?console&&console.log&&console.log("Invalid srcset descriptor found in '"+a+"' at '"+D+"'."):(E.url=h,x&&(E.w=x),m&&(E.d=m),k&&(E.h=k),g.push(E))}}})})(en)),en.exports}var Ys={exports:{}},Ul;function up(){if(Ul)return Ys.exports;Ul=1;var e=String,a=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ys.exports=a(),Ys.exports.createColors=a,Ys.exports}var oi,zl;function ro(){if(zl)return oi;zl=1;let e=up(),a=mt;class s extends Error{constructor(r,n,u,c,d,f){super(r),this.name="CssSyntaxError",this.reason=r,d&&(this.file=d),c&&(this.source=c),f&&(this.plugin=f),typeof n<"u"&&typeof u<"u"&&(typeof n=="number"?(this.line=n,this.column=u):(this.line=n.line,this.column=n.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(r){if(!this.source)return"";let n=this.source;r==null&&(r=e.isColorSupported);let u=p=>p,c=p=>p,d=p=>p;if(r){let{bold:p,gray:y,red:w}=e.createColors(!0);c=b=>p(w(b)),u=b=>y(b),a&&(d=b=>a(b))}let f=n.split(/\r?\n/),o=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),l=String(h).length;return f.slice(o,h).map((p,y)=>{let w=o+1+y,b=" "+(" "+w).slice(-l)+" | ";if(w===this.line){if(p.length>160){let v=20,N=Math.max(0,this.column-v),j=Math.max(this.column+v,this.endColumn+v),x=p.slice(N,j),m=u(b.replace(/\d/g," "))+p.slice(0,Math.min(this.column-1,v-1)).replace(/[^\t]/g," ");return c(">")+u(b)+d(x)+`
|
|
1034
1034
|
`+m+c("^")}let g=u(b.replace(/\d/g," "))+p.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(b)+d(p)+`
|
|
1035
1035
|
`+g+c("^")}return" "+u(b)+d(p)}).join(`
|
|
1036
1036
|
`)}toString(){let r=this.showSourceCode();return r&&(r=`
|
|
@@ -1049,47 +1049,47 @@ zenieix
|
|
|
1049
1049
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(r){let n;return r.walkDecls(u=>{if(typeof u.raws.between<"u")return n=u.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(r){let n;return r.walk(u=>{if(u.nodes&&u.nodes.length===0&&(n=u.raws.after,typeof n<"u"))return!1}),n}rawIndent(r){if(r.raws.indent)return r.raws.indent;let n;return r.walk(u=>{let c=u.parent;if(c&&c!==r&&c.parent&&c.parent===r&&typeof u.raws.before<"u"){let d=u.raws.before.split(`
|
|
1050
1050
|
`);return n=d[d.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(r){let n;return r.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(n=u.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(r,n){let u=r[n],c=r.raws[n];return c&&c.value===u?c.raw:u}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,n){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,n)}}return ui=s,s.default=s,ui}var li,Wl;function jn(){if(Wl)return li;Wl=1;let e=wd();function a(s,i){new e(i).stringify(s)}return li=a,a.default=a,li}var Zs={},Gl;function ao(){return Gl||(Gl=1,Zs.isClean=Symbol("isClean"),Zs.my=Symbol("my")),Zs}var ci,Jl;function kn(){if(Jl)return ci;Jl=1;let e=ro(),a=wd(),s=jn(),{isClean:i,my:r}=ao();function n(d,f){let o=new d.constructor;for(let h in d){if(!Object.prototype.hasOwnProperty.call(d,h)||h==="proxyCache")continue;let l=d[h],p=typeof l;h==="parent"&&p==="object"?f&&(o[h]=f):h==="source"?o[h]=l:Array.isArray(l)?o[h]=l.map(y=>n(y,o)):(p==="object"&&l!==null&&(l=n(l)),o[h]=l)}return o}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let o=1,h=1,l=0;for(let p=0;p<d.length;p++){if(h===f.line&&o===f.column){l=p;break}d[p]===`
|
|
1051
1051
|
`?(o=1,h+=1):o+=1}return l}class c{get proxyOf(){return this}constructor(f={}){this.raws={},this[i]=!1,this[r]=!0;for(let o in f)if(o==="nodes"){this.nodes=[];for(let h of f[o])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[o]=f[o]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let o=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let o in f)this[o]=f[o];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let o=n(this);for(let h in f)o[h]=f[h];return o}cloneAfter(f={}){let o=this.clone(f);return this.parent.insertAfter(this,o),o}cloneBefore(f={}){let o=this.clone(f);return this.parent.insertBefore(this,o),o}error(f,o={}){if(this.source){let{end:h,start:l}=this.rangeBy(o);return this.source.input.error(f,{column:l.column,line:l.line},{column:h.column,line:h.line},o)}return new e(f)}getProxyProcessor(){return{get(f,o){return o==="proxyOf"?f:o==="root"?()=>f.root().toProxy():f[o]},set(f,o,h){return f[o]===h||(f[o]=h,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&f.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;let f=this;for(;f=f.parent;)f[i]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f={}){let o=this.source.start;if(f.index)o=this.positionInside(f.index);else if(f.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,p=h.slice(u(h,this.source.start),u(h,this.source.end)).indexOf(f.word);p!==-1&&(o=this.positionInside(p))}return o}positionInside(f){let o=this.source.start.column,h=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,p=u(l,this.source.start),y=p+f;for(let w=p;w<y;w++)l[w]===`
|
|
1052
|
-
`?(o=1,h+=1):o+=1;return{column:o,line:h,offset:y}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=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:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let y=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);y!==-1&&(h=this.positionInside(y),l=this.positionInside(y+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new a().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let y in this){if(!Object.prototype.hasOwnProperty.call(this,y)||y==="parent"||y==="proxyCache")continue;let w=this[y];if(Array.isArray(w))h[y]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[y]=w.toJSON(null,o);else if(y==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[y]={end:w.end,inputId:b,start:w.start}}else h[y]=w}return l&&(h.inputs=[...o.keys()].map(y=>y.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ci=c,c.default=c,ci}var di,Yl;function _n(){if(Yl)return di;Yl=1;let e=kn();class a extends e{constructor(i){super(i),this.type="comment"}}return di=a,a.default=a,di}var fi,Zl;function En(){if(Zl)return fi;Zl=1;let e=kn();class a extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl"}}return fi=a,a.default=a,fi}var hi,Xl;function Qr(){if(Xl)return hi;Xl=1;let e=_n(),a=En(),s=kn(),{isClean:i,my:r}=ao(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[i]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends s{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(...p){for(let y of p){let w=this.normalize(y,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let y of this.nodes)y.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let y=this.getIterator(),w,b;for(;this.indexes[y]<this.proxyOf.nodes.length&&(w=this.indexes[y],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[y]+=1;return delete this.indexes[y],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,y){return y==="proxyOf"?p:p[y]?y==="each"||typeof y=="string"&&y.startsWith("walk")?(...w)=>p[y](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):y==="every"||y==="some"?w=>p[y]((b,...g)=>w(b.toProxy(),...g)):y==="root"?()=>p.root().toProxy():y==="nodes"?p.nodes.map(w=>w.toProxy()):y==="first"||y==="last"?p[y].toProxy():p[y]:p[y]},set(p,y,w){return p[y]===w||(p[y]=w,(y==="name"||y==="params"||y==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,y){let w=this.index(p),b=this.normalize(y,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,y){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(y,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let N of g)this.proxyOf.nodes.splice(w,0,N);let v;for(let N in this.indexes)v=this.indexes[N],w<=v&&(this.indexes[N]=v+g.length);return this.markDirty(),this}normalize(p,y){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new a(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[r]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[i]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&y&&typeof y.raws.before<"u"&&(b.raws.before=y.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let y of p){let w=this.normalize(y,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let y;for(let w in this.indexes)y=this.indexes[w],y>=p&&(this.indexes[w]=y-1);return this.markDirty(),this}replaceValues(p,y,w){return w||(w=y,y={}),this.walkDecls(b=>{y.props&&!y.props.includes(b.prop)||y.fast&&!b.value.includes(y.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((y,w)=>{let b;try{b=p(y,w)}catch(g){throw y.addToError(g)}return b!==!1&&y.walk&&(b=y.walk(p)),b})}walkAtRules(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return y(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="atrule")return y(w,b)}))}walkComments(p){return this.walk((y,w)=>{if(y.type==="comment")return p(y,w)})}walkDecls(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return y(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="decl")return y(w,b)}))}walkRules(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return y(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="rule")return y(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},hi=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,a.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[r]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},hi}var pi,Ql;function so(){if(Ql)return pi;Ql=1;let e=Qr();class a extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return pi=a,a.default=a,e.registerAtRule(a),pi}var mi,Kl;function no(){if(Kl)return mi;Kl=1;let e=Qr(),a,s;class i extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new a(new s,this,n).stringify()}}return i.registerLazyResult=r=>{a=r},i.registerProcessor=r=>{s=r},mi=i,i.default=i,mi}var gi,ec;function cp(){if(ec)return gi;ec=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return gi={nanoid:(i=21)=>{let r="",n=i|0;for(;n--;)r+=e[Math.random()*64|0];return r},customAlphabet:(i,r=21)=>(n=r)=>{let u="",c=n|0;for(;c--;)u+=i[Math.random()*i.length|0];return u}},gi}var bi,tc;function Nd(){if(tc)return bi;tc=1;let{existsSync:e,readFileSync:a}=mt,{dirname:s,join:i}=mt,{SourceMapConsumer:r,SourceMapGenerator:n}=mt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,y=f.match(l)||f.match(p);if(y)return decodeURIComponent(f.substr(y[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof r)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=i(s(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return bi=c,c.default=c,bi}var xi,rc;function An(){if(rc)return xi;rc=1;let{nanoid:e}=cp(),{isAbsolute:a,resolve:s}=mt,{SourceMapConsumer:i,SourceMapGenerator:r}=mt,{fileURLToPath:n,pathToFileURL:u}=mt,c=ro(),d=Nd(),f=mt,o=Symbol("lineToIndexCache"),h=!!(i&&r),l=!!(s&&a);function p(w){if(w[o])return w[o];let b=w.css.split(`
|
|
1052
|
+
`?(o=1,h+=1):o+=1;return{column:o,line:h,offset:y}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=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:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let y=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);y!==-1&&(h=this.positionInside(y),l=this.positionInside(y+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new a().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let y in this){if(!Object.prototype.hasOwnProperty.call(this,y)||y==="parent"||y==="proxyCache")continue;let w=this[y];if(Array.isArray(w))h[y]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[y]=w.toJSON(null,o);else if(y==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[y]={end:w.end,inputId:b,start:w.start}}else h[y]=w}return l&&(h.inputs=[...o.keys()].map(y=>y.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ci=c,c.default=c,ci}var di,Yl;function _n(){if(Yl)return di;Yl=1;let e=kn();class a extends e{constructor(i){super(i),this.type="comment"}}return di=a,a.default=a,di}var fi,Zl;function En(){if(Zl)return fi;Zl=1;let e=kn();class a extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl"}}return fi=a,a.default=a,fi}var hi,Xl;function Qr(){if(Xl)return hi;Xl=1;let e=_n(),a=En(),s=kn(),{isClean:i,my:r}=ao(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[i]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends s{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(...p){for(let y of p){let w=this.normalize(y,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let y of this.nodes)y.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let y=this.getIterator(),w,b;for(;this.indexes[y]<this.proxyOf.nodes.length&&(w=this.indexes[y],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[y]+=1;return delete this.indexes[y],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,y){return y==="proxyOf"?p:p[y]?y==="each"||typeof y=="string"&&y.startsWith("walk")?(...w)=>p[y](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):y==="every"||y==="some"?w=>p[y]((b,...g)=>w(b.toProxy(),...g)):y==="root"?()=>p.root().toProxy():y==="nodes"?p.nodes.map(w=>w.toProxy()):y==="first"||y==="last"?p[y].toProxy():p[y]:p[y]},set(p,y,w){return p[y]===w||(p[y]=w,(y==="name"||y==="params"||y==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,y){let w=this.index(p),b=this.normalize(y,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,y){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(y,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let N of g)this.proxyOf.nodes.splice(w,0,N);let v;for(let N in this.indexes)v=this.indexes[N],w<=v&&(this.indexes[N]=v+g.length);return this.markDirty(),this}normalize(p,y){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new a(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[r]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[i]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&y&&typeof y.raws.before<"u"&&(b.raws.before=y.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let y of p){let w=this.normalize(y,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let y;for(let w in this.indexes)y=this.indexes[w],y>=p&&(this.indexes[w]=y-1);return this.markDirty(),this}replaceValues(p,y,w){return w||(w=y,y={}),this.walkDecls(b=>{y.props&&!y.props.includes(b.prop)||y.fast&&!b.value.includes(y.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((y,w)=>{let b;try{b=p(y,w)}catch(g){throw y.addToError(g)}return b!==!1&&y.walk&&(b=y.walk(p)),b})}walkAtRules(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return y(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="atrule")return y(w,b)}))}walkComments(p){return this.walk((y,w)=>{if(y.type==="comment")return p(y,w)})}walkDecls(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return y(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="decl")return y(w,b)}))}walkRules(p,y){return y?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return y(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return y(w,b)}):(y=p,this.walk((w,b)=>{if(w.type==="rule")return y(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},hi=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,a.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[r]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},hi}var pi,Ql;function so(){if(Ql)return pi;Ql=1;let e=Qr();class a extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return pi=a,a.default=a,e.registerAtRule(a),pi}var mi,Kl;function no(){if(Kl)return mi;Kl=1;let e=Qr(),a,s;class i extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new a(new s,this,n).stringify()}}return i.registerLazyResult=r=>{a=r},i.registerProcessor=r=>{s=r},mi=i,i.default=i,mi}var gi,ec;function lp(){if(ec)return gi;ec=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return gi={nanoid:(i=21)=>{let r="",n=i|0;for(;n--;)r+=e[Math.random()*64|0];return r},customAlphabet:(i,r=21)=>(n=r)=>{let u="",c=n|0;for(;c--;)u+=i[Math.random()*i.length|0];return u}},gi}var bi,tc;function Nd(){if(tc)return bi;tc=1;let{existsSync:e,readFileSync:a}=mt,{dirname:s,join:i}=mt,{SourceMapConsumer:r,SourceMapGenerator:n}=mt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,y=f.match(l)||f.match(p);if(y)return decodeURIComponent(f.substr(y[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof r)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=i(s(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return bi=c,c.default=c,bi}var xi,rc;function An(){if(rc)return xi;rc=1;let{nanoid:e}=lp(),{isAbsolute:a,resolve:s}=mt,{SourceMapConsumer:i,SourceMapGenerator:r}=mt,{fileURLToPath:n,pathToFileURL:u}=mt,c=ro(),d=Nd(),f=mt,o=Symbol("lineToIndexCache"),h=!!(i&&r),l=!!(s&&a);function p(w){if(w[o])return w[o];let b=w.css.split(`
|
|
1053
1053
|
`),g=new Array(b.length),v=0;for(let N=0,j=b.length;N<j;N++)g[N]=v,v+=b[N].length+1;return w[o]=g,g}class y{get from(){return this.file||this.id}constructor(b,g={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||a(g.from)?this.file=g.from:this.file=s(g.from)),l&&h){let v=new d(this.css,g);if(v.text){this.map=v;let N=v.consumer().file;!this.file&&N&&(this.file=this.mapResolve(N))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,g,v,N={}){let j,x,m,k,_;if(g&&typeof g=="object"){let D=g,C=v;if(typeof D.offset=="number"){k=D.offset;let P=this.fromOffset(k);g=P.line,v=P.col}else g=D.line,v=D.column,k=this.fromLineAndColumn(g,v);if(typeof C.offset=="number"){m=C.offset;let P=this.fromOffset(m);x=P.line,j=P.col}else x=C.line,j=C.column,m=this.fromLineAndColumn(C.line,C.column)}else if(v)k=this.fromLineAndColumn(g,v);else{k=g;let D=this.fromOffset(k);g=D.line,v=D.col}let E=this.origin(g,v,x,j);return E?_=new c(b,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,N.plugin):_=new c(b,x===void 0?g:{column:v,line:g},x===void 0?v:{column:j,line:x},this.css,this.file,N.plugin),_.input={column:v,endColumn:j,endLine:x,endOffset:m,line:g,offset:k,source:this.css},this.file&&(u&&(_.input.url=u(this.file).toString()),_.input.file=this.file),_}fromLineAndColumn(b,g){return p(this)[b-1]+g-1}fromOffset(b){let g=p(this),v=g[g.length-1],N=0;if(b>=v)N=g.length-1;else{let j=g.length-2,x;for(;N<j;)if(x=N+(j-N>>1),b<g[x])j=x-1;else if(b>=g[x+1])N=x+1;else{N=x;break}}return{col:b-g[N]+1,line:N+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:s(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,g,v,N){if(!this.map)return!1;let j=this.map.consumer(),x=j.originalPositionFor({column:g,line:b});if(!x.source)return!1;let m;typeof v=="number"&&(m=j.originalPositionFor({column:N,line:v}));let k;a(x.source)?k=u(x.source):k=new URL(x.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let _={column:x.column,endColumn:m&&m.column,endLine:m&&m.line,line:x.line,url:k.toString()};if(k.protocol==="file:")if(n)_.file=n(k);else throw new Error("file: protocol is not available in this PostCSS build");let E=j.sourceContentFor(x.source);return E&&(_.source=E),_}toJSON(){let b={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(b[g]=this[g]);return this.map&&(b.map={...this.map},b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return xi=y,y.default=y,f&&f.registerInput&&f.registerInput(y),xi}var yi,ac;function cs(){if(ac)return yi;ac=1;let e=Qr(),a,s;class i extends e{constructor(n){super(n),this.type="root",this.nodes||(this.nodes=[])}normalize(n,u,c){let d=super.normalize(n);if(u){if(c==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(n,u){let c=this.index(n);return!u&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(n)}toResult(n={}){return new a(new s,this,n).stringify()}}return i.registerLazyResult=r=>{a=r},i.registerProcessor=r=>{s=r},yi=i,i.default=i,e.registerRoot(i),yi}var vi,sc;function jd(){if(sc)return vi;sc=1;let e={comma(a){return e.split(a,[","],!0)},space(a){let s=[" ",`
|
|
1054
|
-
`," "];return e.split(a,s)},split(a,s,i){let r=[],n="",u=!1,c=0,d=!1,f="",o=!1;for(let h of a)o?o=!1:h==="\\"?o=!0:d?h===f&&(d=!1):h==='"'||h==="'"?(d=!0,f=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&s.includes(h)&&(u=!0),u?(n!==""&&r.push(n.trim()),n="",u=!1):n+=h;return(i||n!=="")&&r.push(n.trim()),r}};return vi=e,e.default=e,vi}var wi,nc;function io(){if(nc)return wi;nc=1;let e=Qr(),a=jd();class s extends e{get selectors(){return a.comma(this.selector)}set selectors(r){let n=this.selector?this.selector.match(/,\s*/):null,u=n?n[0]:","+this.raw("between","beforeOpen");this.selector=r.join(u)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return wi=s,s.default=s,e.registerRule(s),wi}var Ni,ic;function
|
|
1054
|
+
`," "];return e.split(a,s)},split(a,s,i){let r=[],n="",u=!1,c=0,d=!1,f="",o=!1;for(let h of a)o?o=!1:h==="\\"?o=!0:d?h===f&&(d=!1):h==='"'||h==="'"?(d=!0,f=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&s.includes(h)&&(u=!0),u?(n!==""&&r.push(n.trim()),n="",u=!1):n+=h;return(i||n!=="")&&r.push(n.trim()),r}};return vi=e,e.default=e,vi}var wi,nc;function io(){if(nc)return wi;nc=1;let e=Qr(),a=jd();class s extends e{get selectors(){return a.comma(this.selector)}set selectors(r){let n=this.selector?this.selector.match(/,\s*/):null,u=n?n[0]:","+this.raw("between","beforeOpen");this.selector=r.join(u)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return wi=s,s.default=s,e.registerRule(s),wi}var Ni,ic;function cp(){if(ic)return Ni;ic=1;let e=so(),a=_n(),s=En(),i=An(),r=Nd(),n=cs(),u=io();function c(d,f){if(Array.isArray(d))return d.map(l=>c(l));let{inputs:o,...h}=d;if(o){f=[];for(let l of o){let p={...l,__proto__:i.prototype};p.map&&(p.map={...p.map,__proto__:r.prototype}),f.push(p)}}if(h.nodes&&(h.nodes=d.nodes.map(l=>c(l,f))),h.source){let{inputId:l,...p}=h.source;h.source=p,l!=null&&(h.source.input=f[l])}if(h.type==="root")return new n(h);if(h.type==="decl")return new s(h);if(h.type==="rule")return new u(h);if(h.type==="comment")return new a(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+d.type)}return Ni=c,c.default=c,Ni}var ji,oc;function kd(){if(oc)return ji;oc=1;let{dirname:e,relative:a,resolve:s,sep:i}=mt,{SourceMapConsumer:r,SourceMapGenerator:n}=mt,{pathToFileURL:u}=mt,c=An(),d=!!(r&&n),f=!!(e&&s&&a&&i);class o{constructor(l,p,y,w){this.stringify=l,this.mapOpts=y.map||{},this.root=p,this.opts=y,this.css=w,this.originalCSS=w,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let p=`
|
|
1055
1055
|
`;this.css.includes(`\r
|
|
1056
1056
|
`)&&(p=`\r
|
|
1057
1057
|
`),this.css+=p+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let p=this.toUrl(this.path(l.file)),y=l.root||e(l.file),w;this.mapOpts.sourcesContent===!1?(w=new r(l.text),w.sourcesContent&&(w.sourcesContent=null)):w=l.consumer(),this.map.applySourceMap(w,p,this.toUrl(this.path(y)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let l;for(let p=this.root.nodes.length-1;p>=0;p--)l=this.root.nodes[p],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(p)}else if(this.css){let l;for(;(l=this.css.lastIndexOf("/*#"))!==-1;){let p=this.css.indexOf("*/",l+3);if(p===-1)break;for(;l>0&&this.css[l-1]===`
|
|
1058
1058
|
`;)l--;this.css=this.css.slice(0,l)+this.css.slice(p+2)}}}}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,p=>{l+=p}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=n.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new n({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 n({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,p=1,y="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,g;this.stringify(this.root,(v,N,j)=>{if(this.css+=v,N&&j!=="end"&&(w.generated.line=l,w.generated.column=p-1,N.source&&N.source.start?(w.source=this.sourcePath(N),w.original.line=N.source.start.line,w.original.column=N.source.start.column-1,this.map.addMapping(w)):(w.source=y,w.original.line=1,w.original.column=0,this.map.addMapping(w))),g=v.match(/\n/g),g?(l+=g.length,b=v.lastIndexOf(`
|
|
1059
|
-
`),p=v.length-b):p+=v.length,N&&j!=="start"){let x=N.parent||{raws:{}};(!(N.type==="decl"||N.type==="atrule"&&!N.nodes)||N!==x.last||x.raws.semicolon)&&(N.source&&N.source.end?(w.source=this.sourcePath(N),w.original.line=N.source.end.line,w.original.column=N.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=y,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let y=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(y=e(s(y,this.mapOpts.annotation)));let w=a(y,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let y=p.source.input.from;if(y&&!l[y]){l[y]=!0;let w=this.usesFileUrls?this.toFileUrl(y):this.toUrl(this.path(y));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let y=u(l).toString();return this.memoizedFileURLs.set(l,y),y}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;i==="\\"&&(l=l.replace(/\\/g,"/"));let y=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,y),y}}return ji=o,ji}var ki,uc;function fp(){if(uc)return ki;uc=1;const e=39,a=34,s=92,i=47,r=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,y=125,w=59,b=42,g=58,v=64,N=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return ki=function(_,E={}){let D=_.css.valueOf(),C=E.ignoreErrors,P,L,H,F,q,M,G,X,ee,R,ie=D.length,I=0,V=[],J=[];function ue(){return I}function Q(Z){throw _.error("Unclosed "+Z,I)}function te(){return J.length===0&&I>=ie}function me(Z){if(J.length)return J.pop();if(I>=ie)return;let ae=Z?Z.ignoreUnclosed:!1;switch(P=D.charCodeAt(I),P){case r:case n:case c:case d:case u:{F=I;do F+=1,P=D.charCodeAt(F);while(P===n||P===r||P===c||P===d||P===u);M=["space",D.slice(I,F)],I=F-1;break}case f:case o:case p:case y:case g:case w:case l:{let re=String.fromCharCode(P);M=[re,re,I];break}case h:{if(R=V.length?V.pop()[1]:"",ee=D.charCodeAt(I+1),R==="url"&&ee!==e&&ee!==a&&ee!==n&&ee!==r&&ee!==c&&ee!==u&&ee!==d){F=I;do{if(G=!1,F=D.indexOf(")",F+1),F===-1)if(C||ae){F=I;break}else Q("bracket");for(X=F;D.charCodeAt(X-1)===s;)X-=1,G=!G}while(G);M=["brackets",D.slice(I,F+1),I,F],I=F}else F=D.indexOf(")",I+1),L=D.slice(I,F+1),F===-1||x.test(L)?M=["(","(",I]:(M=["brackets",L,I,F],I=F);break}case e:case a:{q=P===e?"'":'"',F=I;do{if(G=!1,F=D.indexOf(q,F+1),F===-1)if(C||ae){F=I+1;break}else Q("string");for(X=F;D.charCodeAt(X-1)===s;)X-=1,G=!G}while(G);M=["string",D.slice(I,F+1),I,F],I=F;break}case v:{N.lastIndex=I+1,N.test(D),N.lastIndex===0?F=D.length-1:F=N.lastIndex-2,M=["at-word",D.slice(I,F+1),I,F],I=F;break}case s:{for(F=I,H=!0;D.charCodeAt(F+1)===s;)F+=1,H=!H;if(P=D.charCodeAt(F+1),H&&P!==i&&P!==n&&P!==r&&P!==c&&P!==d&&P!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}M=["word",D.slice(I,F+1),I,F],I=F;break}default:{P===i&&D.charCodeAt(I+1)===b?(F=D.indexOf("*/",I+2)+1,F===0&&(C||ae?F=D.length:Q("comment")),M=["comment",D.slice(I,F+1),I,F],I=F):(j.lastIndex=I+1,j.test(D),j.lastIndex===0?F=D.length-1:F=j.lastIndex-2,M=["word",D.slice(I,F+1),I,F],V.push(M),I=F);break}}return I++,M}function Se(Z){J.push(Z)}return{back:Se,endOfFile:te,nextToken:me,position:ue}},ki}var _i,lc;function hp(){if(lc)return _i;lc=1;let e=so(),a=_n(),s=En(),i=cs(),r=io(),n=fp();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,y,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(y=g.length-1,p=g[y];p&&p[0]==="space";)p=g[--y];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let y=h-1;y>=0&&(p=o[y],!(p[0]!=="space"&&(l+=1,l===2)));y--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,y;for(let[w,b]of o.entries()){if(p=b,y=p[0],y==="("&&(h+=1),y===")"&&(h-=1),h===0&&y===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new a;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(!l.trim())h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new s;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let y;for(;o.length;)if(y=o.shift(),y[0]===":"){l.raws.between+=y[1];break}else y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]),l.raws.between+=y[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(y=o[v],y[1].toLowerCase()==="!important"){l.important=!0;let N=this.stringFrom(o,v);N=this.spacesFromEnd(o)+N,N!==" !important"&&(l.raws.important=N);break}else if(y[1].toLowerCase()==="important"){let N=o.slice(0),j="";for(let x=v;x>0;x--){let m=N[x][0];if(j.trim().startsWith("!")&&m!=="space")break;j=N.pop()[1]+j}j.trim().startsWith("!")&&(l.important=!0,l.raws.important=j,o=N)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new r;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,y=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")y||(y=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")y||(y=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(y=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(y),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let y,w,b=l.length,g="",v=!0,N,j;for(let x=0;x<b;x+=1)y=l[x],w=y[0],w==="space"&&x===b-1&&!p?v=!1:w==="comment"?(j=l[x-1]?l[x-1][0]:"empty",N=l[x+1]?l[x+1][0]:"empty",!u[j]&&!u[N]?g.slice(-1)===","?v=!1:g+=y[1]:v=!1):g+=y[1];if(!v){let x=l.reduce((m,k)=>m+k[1],"");o.raws[h]={raw:x,value:g}}o[h]=g}rule(o){o.pop();let h=new r;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return _i=d,_i}var Ei,cc;function oo(){if(cc)return Ei;cc=1;let e=Qr(),a=An(),s=hp();function i(r,n){let u=new a(r,n),c=new s(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
|
|
1059
|
+
`),p=v.length-b):p+=v.length,N&&j!=="start"){let x=N.parent||{raws:{}};(!(N.type==="decl"||N.type==="atrule"&&!N.nodes)||N!==x.last||x.raws.semicolon)&&(N.source&&N.source.end?(w.source=this.sourcePath(N),w.original.line=N.source.end.line,w.original.column=N.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=y,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let y=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(y=e(s(y,this.mapOpts.annotation)));let w=a(y,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let y=p.source.input.from;if(y&&!l[y]){l[y]=!0;let w=this.usesFileUrls?this.toFileUrl(y):this.toUrl(this.path(y));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let y=u(l).toString();return this.memoizedFileURLs.set(l,y),y}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;i==="\\"&&(l=l.replace(/\\/g,"/"));let y=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,y),y}}return ji=o,ji}var ki,uc;function dp(){if(uc)return ki;uc=1;const e=39,a=34,s=92,i=47,r=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,y=125,w=59,b=42,g=58,v=64,N=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return ki=function(_,E={}){let D=_.css.valueOf(),C=E.ignoreErrors,P,L,H,F,q,M,G,X,ee,R,ne=D.length,I=0,V=[],J=[];function ue(){return I}function Q(Z){throw _.error("Unclosed "+Z,I)}function te(){return J.length===0&&I>=ne}function me(Z){if(J.length)return J.pop();if(I>=ne)return;let ae=Z?Z.ignoreUnclosed:!1;switch(P=D.charCodeAt(I),P){case r:case n:case c:case d:case u:{F=I;do F+=1,P=D.charCodeAt(F);while(P===n||P===r||P===c||P===d||P===u);M=["space",D.slice(I,F)],I=F-1;break}case f:case o:case p:case y:case g:case w:case l:{let re=String.fromCharCode(P);M=[re,re,I];break}case h:{if(R=V.length?V.pop()[1]:"",ee=D.charCodeAt(I+1),R==="url"&&ee!==e&&ee!==a&&ee!==n&&ee!==r&&ee!==c&&ee!==u&&ee!==d){F=I;do{if(G=!1,F=D.indexOf(")",F+1),F===-1)if(C||ae){F=I;break}else Q("bracket");for(X=F;D.charCodeAt(X-1)===s;)X-=1,G=!G}while(G);M=["brackets",D.slice(I,F+1),I,F],I=F}else F=D.indexOf(")",I+1),L=D.slice(I,F+1),F===-1||x.test(L)?M=["(","(",I]:(M=["brackets",L,I,F],I=F);break}case e:case a:{q=P===e?"'":'"',F=I;do{if(G=!1,F=D.indexOf(q,F+1),F===-1)if(C||ae){F=I+1;break}else Q("string");for(X=F;D.charCodeAt(X-1)===s;)X-=1,G=!G}while(G);M=["string",D.slice(I,F+1),I,F],I=F;break}case v:{N.lastIndex=I+1,N.test(D),N.lastIndex===0?F=D.length-1:F=N.lastIndex-2,M=["at-word",D.slice(I,F+1),I,F],I=F;break}case s:{for(F=I,H=!0;D.charCodeAt(F+1)===s;)F+=1,H=!H;if(P=D.charCodeAt(F+1),H&&P!==i&&P!==n&&P!==r&&P!==c&&P!==d&&P!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}M=["word",D.slice(I,F+1),I,F],I=F;break}default:{P===i&&D.charCodeAt(I+1)===b?(F=D.indexOf("*/",I+2)+1,F===0&&(C||ae?F=D.length:Q("comment")),M=["comment",D.slice(I,F+1),I,F],I=F):(j.lastIndex=I+1,j.test(D),j.lastIndex===0?F=D.length-1:F=j.lastIndex-2,M=["word",D.slice(I,F+1),I,F],V.push(M),I=F);break}}return I++,M}function Se(Z){J.push(Z)}return{back:Se,endOfFile:te,nextToken:me,position:ue}},ki}var _i,lc;function fp(){if(lc)return _i;lc=1;let e=so(),a=_n(),s=En(),i=cs(),r=io(),n=dp();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,y,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(y=g.length-1,p=g[y];p&&p[0]==="space";)p=g[--y];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let y=h-1;y>=0&&(p=o[y],!(p[0]!=="space"&&(l+=1,l===2)));y--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,y;for(let[w,b]of o.entries()){if(p=b,y=p[0],y==="("&&(h+=1),y===")"&&(h-=1),h===0&&y===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new a;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(!l.trim())h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new s;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let y;for(;o.length;)if(y=o.shift(),y[0]===":"){l.raws.between+=y[1];break}else y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]),l.raws.between+=y[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(y=o[v],y[1].toLowerCase()==="!important"){l.important=!0;let N=this.stringFrom(o,v);N=this.spacesFromEnd(o)+N,N!==" !important"&&(l.raws.important=N);break}else if(y[1].toLowerCase()==="important"){let N=o.slice(0),j="";for(let x=v;x>0;x--){let m=N[x][0];if(j.trim().startsWith("!")&&m!=="space")break;j=N.pop()[1]+j}j.trim().startsWith("!")&&(l.important=!0,l.raws.important=j,o=N)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new r;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,y=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")y||(y=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")y||(y=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(y=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(y),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let y,w,b=l.length,g="",v=!0,N,j;for(let x=0;x<b;x+=1)y=l[x],w=y[0],w==="space"&&x===b-1&&!p?v=!1:w==="comment"?(j=l[x-1]?l[x-1][0]:"empty",N=l[x+1]?l[x+1][0]:"empty",!u[j]&&!u[N]?g.slice(-1)===","?v=!1:g+=y[1]:v=!1):g+=y[1];if(!v){let x=l.reduce((m,k)=>m+k[1],"");o.raws[h]={raw:x,value:g}}o[h]=g}rule(o){o.pop();let h=new r;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return _i=d,_i}var Ei,cc;function oo(){if(cc)return Ei;cc=1;let e=Qr(),a=An(),s=fp();function i(r,n){let u=new a(r,n),c=new s(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
|
|
1060
1060
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(n.from)?d.message+=`
|
|
1061
1061
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(n.from)&&(d.message+=`
|
|
1062
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return Ei=i,i.default=i,e.registerParse(i),Ei}var Ai,dc;function _d(){if(dc)return Ai;dc=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let r=i.node.rangeBy(i);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in i)this[r]=i[r]}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}}return Ai=e,e.default=e,Ai}var Si,fc;function uo(){if(fc)return Si;fc=1;let e=_d();class a{get content(){return this.css}constructor(i,r,n){this.processor=i,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(i,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(i,r);return this.messages.push(n),n}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Si=a,a.default=a,Si}var Ci,hc;function Ed(){if(hc)return Ci;hc=1;let e={};return Ci=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},Ci}var Di,pc;function Ad(){if(pc)return Di;pc=1;let e=Qr(),a=no(),s=kd(),i=oo(),r=uo(),n=cs(),u=jn(),{isClean:c,my:d}=ao(),f=Ed();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function y(j){return typeof j=="object"&&typeof j.then=="function"}function w(j){let x=!1,m=o[j.type];return j.type==="decl"?x=j.prop.toLowerCase():j.type==="atrule"&&(x=j.name.toLowerCase()),x&&j.append?[m,m+"-"+x,p,m+"Exit",m+"Exit-"+x]:x?[m,m+"-"+x,m+"Exit",m+"Exit-"+x]:j.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(j){let x;return j.type==="document"?x=["Document",p,"DocumentExit"]:j.type==="root"?x=["Root",p,"RootExit"]:x=w(j),{eventIndex:0,events:x,iterator:0,node:j,visitorIndex:0,visitors:[]}}function g(j){return j[c]=!1,j.nodes&&j.nodes.forEach(x=>g(x)),j}let v={};class N{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(x,m,k){this.stringified=!1,this.processed=!1;let _;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))_=g(m);else if(m instanceof N||m instanceof r)_=g(m.root),m.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=m.map);else{let E=i;k.syntax&&(E=k.syntax.parse),k.parser&&(E=k.parser),E.parse&&(E=E.parse);try{_=E(m,k)}catch(D){this.processed=!0,this.error=D}_&&!_[d]&&e.rebuild(_)}this.result=new r(x,_,k),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?{...E,...E.prepare(this.result)}:E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(x){return this.async().catch(x)}finally(x){return this.async().then(x,x)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(x,m){let k=this.result.lastPlugin;try{if(m&&m.addToError(x),this.error=x,x.name==="CssSyntaxError"&&!x.plugin)x.plugin=k.postcssPlugin,x.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let _=k.postcssPlugin,E=k.postcssVersion,D=this.result.processor.version,C=E.split("."),P=D.split(".");(C[0]!==P[0]||parseInt(C[1])>parseInt(P[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+_+" uses "+E+". Perhaps this is the source of the error below.")}}catch(_){console&&console.error&&console.error(_)}return x}prepareVisitors(){this.listeners={};let x=(m,k,_)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([m,_])};for(let m of this.plugins)if(typeof m=="object")for(let k in m){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[k])if(typeof m[k]=="object")for(let _ in m[k])_==="*"?x(m,k,m[k][_]):x(m,k+"-"+_.toLowerCase(),m[k][_]);else typeof m[k]=="function"&&x(m,k,m[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let x=0;x<this.plugins.length;x++){let m=this.plugins[x],k=this.runOnRoot(m);if(y(k))try{await k}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let x=this.result.root;for(;!x[c];){x[c]=!0;let m=[b(x)];for(;m.length>0;){let k=this.visitTick(m);if(y(k))try{await k}catch(_){let E=m[m.length-1].node;throw this.handleError(_,E)}}}if(this.listeners.OnceExit)for(let[m,k]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(x.type==="document"){let _=x.nodes.map(E=>k(E,this.helpers));await Promise.all(_)}else await k(x,this.helpers)}catch(_){throw this.handleError(_)}}}return this.processed=!0,this.stringify()}runOnRoot(x){this.result.lastPlugin=x;try{if(typeof x=="object"&&x.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(k=>x.Once(k,this.helpers));return y(m[0])?Promise.all(m):m}return x.Once(this.result.root,this.helpers)}else if(typeof x=="function")return x(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let x=this.result.opts,m=u;x.syntax&&(m=x.syntax.stringify),x.stringifier&&(m=x.stringifier),m.stringify&&(m=m.stringify);let _=new s(m,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[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 x of this.plugins){let m=this.runOnRoot(x);if(y(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let x=this.result.root;for(;!x[c];)x[c]=!0,this.walkSync(x);if(this.listeners.OnceExit)if(x.type==="document")for(let m of x.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,x)}return this.result}then(x,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("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(x,m)}toString(){return this.css}visitSync(x,m){for(let[k,_]of x){this.result.lastPlugin=k;let E;try{E=_(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(y(E))throw this.getAsyncError()}}visitTick(x){let m=x[x.length-1],{node:k,visitors:_}=m;if(k.type!=="root"&&k.type!=="document"&&!k.parent){x.pop();return}if(_.length>0&&m.visitorIndex<_.length){let[D,C]=_[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===_.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(k.toProxy(),this.helpers)}catch(P){throw this.handleError(P,k)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!C[c]){C[c]=!0,x.push(b(C));return}m.iterator=0,delete k.indexes[D]}let E=m.events;for(;m.eventIndex<E.length;){let D=E[m.eventIndex];if(m.eventIndex+=1,D===p){k.nodes&&k.nodes.length&&(k[c]=!0,m.iterator=k.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}x.pop()}walkSync(x){x[c]=!0;let m=w(x);for(let k of m)if(k===p)x.nodes&&x.each(_=>{_[c]||this.walkSync(_)});else{let _=this.listeners[k];if(_&&this.visitSync(_,x.toProxy()))return}}warnings(){return this.sync().warnings()}}return N.registerPostcss=j=>{v=j},Di=N,N.default=N,n.registerLazyResult(N),a.registerLazyResult(N),Di}var Ti,mc;function pp(){if(mc)return Ti;mc=1;let e=kd(),a=oo();const s=uo();let i=jn(),r=Ed();class n{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 c,d=a;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=d;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let l=new e(o,void 0,this._opts,d);if(l.isMap()){let[p,y]=l.generate();p&&(this.result.css=p),y&&(this.result.map=y)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(c,d)}toString(){return this._css}warnings(){return[]}}return Ti=n,n.default=n,Ti}var Oi,gc;function mp(){if(gc)return Oi;gc=1;let e=no(),a=Ad(),s=pp(),i=cs();class r{constructor(u=[]){this.version="8.5.8",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.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(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new s(this,u,c):new a(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return Oi=r,r.default=r,i.registerProcessor(r),e.registerProcessor(r),Oi}var Pi,bc;function gp(){if(bc)return Pi;bc=1;let e=so(),a=_n(),s=Qr(),i=ro(),r=En(),n=no(),u=dp(),c=An(),d=Ad(),f=jd(),o=kn(),h=oo(),l=mp(),p=uo(),y=cs(),w=io(),b=jn(),g=_d();function v(...N){return N.length===1&&Array.isArray(N[0])&&(N=N[0]),new l(N)}return v.plugin=function(j,x){let m=!1;function k(...E){console&&console.warn&&!m&&(m=!0,console.warn(j+`: postcss.plugin was deprecated. Migration guide:
|
|
1062
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return Ei=i,i.default=i,e.registerParse(i),Ei}var Ai,dc;function _d(){if(dc)return Ai;dc=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let r=i.node.rangeBy(i);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in i)this[r]=i[r]}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}}return Ai=e,e.default=e,Ai}var Si,fc;function uo(){if(fc)return Si;fc=1;let e=_d();class a{get content(){return this.css}constructor(i,r,n){this.processor=i,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(i,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(i,r);return this.messages.push(n),n}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Si=a,a.default=a,Si}var Ci,hc;function Ed(){if(hc)return Ci;hc=1;let e={};return Ci=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},Ci}var Di,pc;function Ad(){if(pc)return Di;pc=1;let e=Qr(),a=no(),s=kd(),i=oo(),r=uo(),n=cs(),u=jn(),{isClean:c,my:d}=ao(),f=Ed();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function y(j){return typeof j=="object"&&typeof j.then=="function"}function w(j){let x=!1,m=o[j.type];return j.type==="decl"?x=j.prop.toLowerCase():j.type==="atrule"&&(x=j.name.toLowerCase()),x&&j.append?[m,m+"-"+x,p,m+"Exit",m+"Exit-"+x]:x?[m,m+"-"+x,m+"Exit",m+"Exit-"+x]:j.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(j){let x;return j.type==="document"?x=["Document",p,"DocumentExit"]:j.type==="root"?x=["Root",p,"RootExit"]:x=w(j),{eventIndex:0,events:x,iterator:0,node:j,visitorIndex:0,visitors:[]}}function g(j){return j[c]=!1,j.nodes&&j.nodes.forEach(x=>g(x)),j}let v={};class N{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(x,m,k){this.stringified=!1,this.processed=!1;let _;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))_=g(m);else if(m instanceof N||m instanceof r)_=g(m.root),m.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=m.map);else{let E=i;k.syntax&&(E=k.syntax.parse),k.parser&&(E=k.parser),E.parse&&(E=E.parse);try{_=E(m,k)}catch(D){this.processed=!0,this.error=D}_&&!_[d]&&e.rebuild(_)}this.result=new r(x,_,k),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?{...E,...E.prepare(this.result)}:E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(x){return this.async().catch(x)}finally(x){return this.async().then(x,x)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(x,m){let k=this.result.lastPlugin;try{if(m&&m.addToError(x),this.error=x,x.name==="CssSyntaxError"&&!x.plugin)x.plugin=k.postcssPlugin,x.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let _=k.postcssPlugin,E=k.postcssVersion,D=this.result.processor.version,C=E.split("."),P=D.split(".");(C[0]!==P[0]||parseInt(C[1])>parseInt(P[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+_+" uses "+E+". Perhaps this is the source of the error below.")}}catch(_){console&&console.error&&console.error(_)}return x}prepareVisitors(){this.listeners={};let x=(m,k,_)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([m,_])};for(let m of this.plugins)if(typeof m=="object")for(let k in m){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[k])if(typeof m[k]=="object")for(let _ in m[k])_==="*"?x(m,k,m[k][_]):x(m,k+"-"+_.toLowerCase(),m[k][_]);else typeof m[k]=="function"&&x(m,k,m[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let x=0;x<this.plugins.length;x++){let m=this.plugins[x],k=this.runOnRoot(m);if(y(k))try{await k}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let x=this.result.root;for(;!x[c];){x[c]=!0;let m=[b(x)];for(;m.length>0;){let k=this.visitTick(m);if(y(k))try{await k}catch(_){let E=m[m.length-1].node;throw this.handleError(_,E)}}}if(this.listeners.OnceExit)for(let[m,k]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(x.type==="document"){let _=x.nodes.map(E=>k(E,this.helpers));await Promise.all(_)}else await k(x,this.helpers)}catch(_){throw this.handleError(_)}}}return this.processed=!0,this.stringify()}runOnRoot(x){this.result.lastPlugin=x;try{if(typeof x=="object"&&x.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(k=>x.Once(k,this.helpers));return y(m[0])?Promise.all(m):m}return x.Once(this.result.root,this.helpers)}else if(typeof x=="function")return x(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let x=this.result.opts,m=u;x.syntax&&(m=x.syntax.stringify),x.stringifier&&(m=x.stringifier),m.stringify&&(m=m.stringify);let _=new s(m,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[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 x of this.plugins){let m=this.runOnRoot(x);if(y(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let x=this.result.root;for(;!x[c];)x[c]=!0,this.walkSync(x);if(this.listeners.OnceExit)if(x.type==="document")for(let m of x.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,x)}return this.result}then(x,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("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(x,m)}toString(){return this.css}visitSync(x,m){for(let[k,_]of x){this.result.lastPlugin=k;let E;try{E=_(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(y(E))throw this.getAsyncError()}}visitTick(x){let m=x[x.length-1],{node:k,visitors:_}=m;if(k.type!=="root"&&k.type!=="document"&&!k.parent){x.pop();return}if(_.length>0&&m.visitorIndex<_.length){let[D,C]=_[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===_.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(k.toProxy(),this.helpers)}catch(P){throw this.handleError(P,k)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!C[c]){C[c]=!0,x.push(b(C));return}m.iterator=0,delete k.indexes[D]}let E=m.events;for(;m.eventIndex<E.length;){let D=E[m.eventIndex];if(m.eventIndex+=1,D===p){k.nodes&&k.nodes.length&&(k[c]=!0,m.iterator=k.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}x.pop()}walkSync(x){x[c]=!0;let m=w(x);for(let k of m)if(k===p)x.nodes&&x.each(_=>{_[c]||this.walkSync(_)});else{let _=this.listeners[k];if(_&&this.visitSync(_,x.toProxy()))return}}warnings(){return this.sync().warnings()}}return N.registerPostcss=j=>{v=j},Di=N,N.default=N,n.registerLazyResult(N),a.registerLazyResult(N),Di}var Ti,mc;function hp(){if(mc)return Ti;mc=1;let e=kd(),a=oo();const s=uo();let i=jn(),r=Ed();class n{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 c,d=a;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=d;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let l=new e(o,void 0,this._opts,d);if(l.isMap()){let[p,y]=l.generate();p&&(this.result.css=p),y&&(this.result.map=y)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(c,d)}toString(){return this._css}warnings(){return[]}}return Ti=n,n.default=n,Ti}var Oi,gc;function pp(){if(gc)return Oi;gc=1;let e=no(),a=Ad(),s=hp(),i=cs();class r{constructor(u=[]){this.version="8.5.8",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.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(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new s(this,u,c):new a(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return Oi=r,r.default=r,i.registerProcessor(r),e.registerProcessor(r),Oi}var Pi,bc;function mp(){if(bc)return Pi;bc=1;let e=so(),a=_n(),s=Qr(),i=ro(),r=En(),n=no(),u=cp(),c=An(),d=Ad(),f=jd(),o=kn(),h=oo(),l=pp(),p=uo(),y=cs(),w=io(),b=jn(),g=_d();function v(...N){return N.length===1&&Array.isArray(N[0])&&(N=N[0]),new l(N)}return v.plugin=function(j,x){let m=!1;function k(...E){console&&console.warn&&!m&&(m=!0,console.warn(j+`: postcss.plugin was deprecated. Migration guide:
|
|
1063
1063
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(j+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
1064
|
-
https://www.w3ctech.com/topic/2226`));let D=x(...E);return D.postcssPlugin=j,D.postcssVersion=new l().version,D}let _;return Object.defineProperty(k,"postcss",{get(){return _||(_=k()),_}}),k.process=function(E,D,C){return v([k(C)]).process(E,D)},k},v.stringify=b,v.parse=h,v.fromJSON=u,v.list=f,v.comment=N=>new a(N),v.atRule=N=>new e(N),v.decl=N=>new r(N),v.rule=N=>new w(N),v.root=N=>new y(N),v.document=N=>new n(N),v.CssSyntaxError=i,v.Declaration=r,v.Container=s,v.Processor=l,v.Document=n,v.Comment=a,v.Warning=g,v.AtRule=e,v.Result=p,v.Input=c,v.Rule=w,v.Root=y,v.Node=o,d.registerPostcss(v),Pi=v,v.default=v,Pi}var Li,xc;function
|
|
1064
|
+
https://www.w3ctech.com/topic/2226`));let D=x(...E);return D.postcssPlugin=j,D.postcssVersion=new l().version,D}let _;return Object.defineProperty(k,"postcss",{get(){return _||(_=k()),_}}),k.process=function(E,D,C){return v([k(C)]).process(E,D)},k},v.stringify=b,v.parse=h,v.fromJSON=u,v.list=f,v.comment=N=>new a(N),v.atRule=N=>new e(N),v.decl=N=>new r(N),v.rule=N=>new w(N),v.root=N=>new y(N),v.document=N=>new n(N),v.CssSyntaxError=i,v.Declaration=r,v.Container=s,v.Processor=l,v.Document=n,v.Comment=a,v.Warning=g,v.AtRule=e,v.Result=p,v.Input=c,v.Rule=w,v.Root=y,v.Node=o,d.registerPostcss(v),Pi=v,v.default=v,Pi}var Li,xc;function gp(){if(xc)return Li;xc=1;const e=ap(),a=sp(),{isPlainObject:s}=np(),i=Zc(),r=op(),{parse:n}=mp(),u=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function d(b,g){b&&Object.keys(b).forEach(function(v){g(b[v],v)})}function f(b,g){return{}.hasOwnProperty.call(b,g)}function o(b,g){const v=[];return d(b,function(N){g(N)&&v.push(N)}),v}function h(b){for(const g in b)if(f(b,g))return!1;return!0}function l(b){return b.map(function(g){if(!g.url)throw new Error("URL missing");return g.url+(g.w?` ${g.w}w`:"")+(g.h?` ${g.h}h`:"")+(g.d?` ${g.d}x`:"")}).join(", ")}Li=y;const p=/^[^\0\t\n\f\r /<=>]+$/;function y(b,g,v){if(b==null)return"";typeof b=="number"&&(b=b.toString());let N="",j="";function x(Z,ae){const re=this;this.tag=Z,this.attribs=ae||{},this.tagPosition=N.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(q.length){const de=q[q.length-1];de.text+=re.text}},this.updateParentNodeMediaChildren=function(){q.length&&u.includes(this.tag)&&q[q.length-1].mediaChildren.push(this.tag)}}g=Object.assign({},y.defaults,g),g.parser=Object.assign({},w,g.parser);const m=function(Z){return g.allowedTags===!1||(g.allowedTags||[]).indexOf(Z)>-1};c.forEach(function(Z){m(Z)&&!g.allowVulnerableTags&&console.warn(`
|
|
1065
1065
|
|
|
1066
1066
|
⚠️ Your \`allowedTags\` option includes, \`${Z}\`, which is inherently
|
|
1067
1067
|
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
|
|
1068
1068
|
Or, to disable this warning, add the \`allowVulnerableTags\` option
|
|
1069
1069
|
and ensure you are accounting for this risk.
|
|
1070
1070
|
|
|
1071
|
-
`)});const k=g.nonTextTags||["script","style","textarea","option"];let _,E;g.allowedAttributes&&(_={},E={},d(g.allowedAttributes,function(Z,ae){_[ae]=[];const re=[];Z.forEach(function(de){typeof de=="string"&&de.indexOf("*")>=0?re.push(a(de).replace(/\\\*/g,".*")):_[ae].push(de)}),re.length&&(E[ae]=new RegExp("^("+re.join("|")+")$"))}));const D={},C={},P={};d(g.allowedClasses,function(Z,ae){if(_&&(f(_,ae)||(_[ae]=[]),_[ae].push("class")),D[ae]=Z,Array.isArray(Z)){const re=[];D[ae]=[],P[ae]=[],Z.forEach(function(de){typeof de=="string"&&de.indexOf("*")>=0?re.push(a(de).replace(/\\\*/g,".*")):de instanceof RegExp?P[ae].push(de):D[ae].push(de)}),re.length&&(C[ae]=new RegExp("^("+re.join("|")+")$"))}});const L={};let H;d(g.transformTags,function(Z,ae){let re;typeof Z=="function"?re=Z:typeof Z=="string"&&(re=y.simpleTransform(Z)),ae==="*"?H=re:L[ae]=re});let F,q,M,G,X,ee,R=!1;I();const ie=new e.Parser({onopentag:function(Z,ae){if(g.enforceHtmlBoundary&&Z==="html"&&I(),X){ee++;return}const re=new x(Z,ae);q.push(re);let de=!1;const ye=!!re.text;let be;if(f(L,Z)&&(be=L[Z](Z,ae),re.attribs=ae=be.attribs,be.text!==void 0&&(re.innerText=be.text),Z!==be.tagName&&(re.name=Z=be.tagName,G[F]=be.tagName)),H&&(be=H(Z,ae),re.attribs=ae=be.attribs,Z!==be.tagName&&(re.name=Z=be.tagName,G[F]=be.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h(M)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(de=!0,M[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&k.indexOf(Z)!==-1&&(X=!0,ee=1),M[F]=!0),F++,de){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;j=N,N=""}N+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(re.innerText=""),(!_||f(_,Z)||_["*"])&&d(ae,function(_e,ge){if(!p.test(ge)){delete re.attribs[ge];return}if(_e===""&&!g.allowedEmptyAttributes.includes(ge)&&(g.nonBooleanAttributes.includes(ge)||g.nonBooleanAttributes.includes("*"))){delete re.attribs[ge];return}let Ke=!1;if(!_||f(_,Z)&&_[Z].indexOf(ge)!==-1||_["*"]&&_["*"].indexOf(ge)!==-1||f(E,Z)&&E[Z].test(ge)||E["*"]&&E["*"].test(ge))Ke=!0;else if(_&&_[Z]){for(const je of _[Z])if(s(je)&&je.name&&je.name===ge){Ke=!0;let he="";if(je.multiple===!0){const Ce=_e.split(" ");for(const Me of Ce)je.values.indexOf(Me)!==-1&&(he===""?he=Me:he+=" "+Me)}else je.values.indexOf(_e)>=0&&(he=_e);_e=he}}if(Ke){if(g.allowedSchemesAppliedToAttributes.indexOf(ge)!==-1&&J(Z,_e)){delete re.attribs[ge];return}if(Z==="script"&&ge==="src"){let je=!0;try{const he=ue(_e);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ce=(g.allowedScriptHostnames||[]).find(function(ze){return ze===he.url.hostname}),Me=(g.allowedScriptDomains||[]).find(function(ze){return he.url.hostname===ze||he.url.hostname.endsWith(`.${ze}`)});je=Ce||Me}}catch{je=!1}if(!je){delete re.attribs[ge];return}}if(Z==="iframe"&&ge==="src"){let je=!0;try{const he=ue(_e);if(he.isRelativeUrl)je=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ce=(g.allowedIframeHostnames||[]).find(function(ze){return ze===he.url.hostname}),Me=(g.allowedIframeDomains||[]).find(function(ze){return he.url.hostname===ze||he.url.hostname.endsWith(`.${ze}`)});je=Ce||Me}}catch{je=!1}if(!je){delete re.attribs[ge];return}}if(ge==="srcset")try{let je=r(_e);if(je.forEach(function(he){J("srcset",he.url)&&(he.evil=!0)}),je=o(je,function(he){return!he.evil}),je.length)_e=l(o(je,function(he){return!he.evil})),re.attribs[ge]=_e;else{delete re.attribs[ge];return}}catch{delete re.attribs[ge];return}if(ge==="class"){const je=D[Z],he=D["*"],Ce=C[Z],Me=P[Z],ze=C["*"],Pt=[Ce,ze].concat(Me).filter(function(er){return er});if(je&&he?_e=Se(_e,i(je,he),Pt):_e=Se(_e,je||he,Pt),!_e.length){delete re.attribs[ge];return}}if(ge==="style"){if(g.parseStyleAttributes)try{const je=n(Z+" {"+_e+"}",{map:!1}),he=Q(je,g.allowedStyles);if(_e=te(he),_e.length===0){delete re.attribs[ge];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+_e+`}", 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 re.attribs[ge];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}N+=" "+ge,_e&&_e.length?N+='="'+V(_e,!0)+'"':g.allowedEmptyAttributes.includes(ge)&&(N+='=""')}else delete re.attribs[ge]}),g.selfClosing.indexOf(Z)!==-1?N+=" />":(N+=">",re.innerText&&!ye&&!g.textFilter&&(N+=V(re.innerText),R=!0)),de&&(N=j+V(N),j="")},ontext:function(Z){if(X)return;const ae=q[q.length-1];let re;if(ae&&(re=ae.tag,Z=ae.innerText!==void 0?ae.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(re))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(re==="script"||re==="style"))N+=Z;else{const de=V(Z,!1);g.textFilter&&!R?N+=g.textFilter(de,re):R||(N+=de)}if(q.length){const de=q[q.length-1];de.text+=Z}},onclosetag:function(Z,ae){if(X)if(ee--,!ee)X=!1;else return;const re=q.pop();if(!re)return;if(re.tag!==Z){q.push(re);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const de=M[F];if(de){if(delete M[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){re.updateParentNodeText();return}j=N,N=""}if(G[F]&&(Z=G[F],delete G[F]),g.exclusiveFilter&&g.exclusiveFilter(re)){N=N.substr(0,re.tagPosition);return}if(re.updateParentNodeMediaChildren(),re.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||ae&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){de&&(N=j,j="");return}N+="</"+Z+">",de&&(N=j+V(N),j=""),R=!1}},g.parser);return ie.write(b),ie.end(),N;function I(){N="",F=0,q=[],M={},G={},X=!1,ee=0}function V(Z,ae){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,"""))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,""")),Z}function J(Z,ae){for(ae=ae.replace(/[\x00-\x20]+/g,"");;){const ye=ae.indexOf("<!--");if(ye===-1)break;const be=ae.indexOf("-->",ye+4);if(be===-1)break;ae=ae.substring(0,ye)+ae.substring(be+3)}const re=ae.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!re)return ae.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const de=re[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(de)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(de)===-1}function ue(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let ae="relative://relative-site";for(let ye=0;ye<100;ye++)ae+=`/${ye}`;const re=new URL(Z,ae);return{isRelativeUrl:re&&re.hostname==="relative-site"&&re.protocol==="relative:",url:re}}function Q(Z,ae){if(!ae)return Z;const re=Z.nodes[0];let de;return ae[re.selector]&&ae["*"]?de=i(ae[re.selector],ae["*"]):de=ae[re.selector]||ae["*"],de&&(Z.nodes[0].nodes=re.nodes.reduce(me(de),[])),Z}function te(Z){return Z.nodes[0].nodes.reduce(function(ae,re){return ae.push(`${re.prop}:${re.value}${re.important?" !important":""}`),ae},[]).join(";")}function me(Z){return function(ae,re){return f(Z,re.prop)&&Z[re.prop].some(function(ye){return ye.test(re.value)})&&ae.push(re),ae}}function Se(Z,ae,re){return ae?(Z=Z.split(/\s+/),Z.filter(function(de){return ae.indexOf(de)!==-1||re.some(function(ye){return ye.test(de)})}).join(" ")):Z}}const w={decodeEntities:!0};return y.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},y.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(N,j){let x;if(v)for(x in g)j[x]=g[x];else j=g;return{tagName:b,attribs:j}}},Li}var yc;function xp(){if(yc)return Ur;yc=1;var e=Ur&&Ur.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.TagTransformingSanitizer=void 0;const a=e(os()),s=e(bp()),i=fr(),r=to(),n=fd();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),r.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,s.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.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:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return i.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return i.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(y=>f.class===y);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,a.default)(d,"TagsSanitizerOptions",a.default.object),(0,a.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",a.default.number.integer.positive),(0,a.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",a.default.number.integer.positive),(0,a.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(d.noImage,"TagsSanitizerOptions.noImage",a.default.boolean),(0,a.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",a.default.function),(0,a.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Ur.TagTransformingSanitizer=u,Ur}var vc;function wc(){if(vc)return Lr;vc=1;var e=Lr&&Lr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DefaultRenderer=void 0;const a=e(os()),s=hh,i=kh(),r=Wh(),n=to(),u=Gh(),c=xp();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.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},h),this.domParser=new r.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},h)}render(o){return(0,a.default)(o,"input",a.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),i.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new s.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,a.default)(o,"RendererOptions",a.default.object),(0,a.default)(o.baseUrl,"RendererOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(o.breaks,"RendererOptions.breaks",a.default.boolean),(0,a.default)(o.skipSanitization,"RendererOptions.skipSanitization",a.default.boolean),(0,a.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",a.default.boolean),(0,a.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(o.assetsWidth,"RendererOptions.assetsWidth",a.default.number.integer.positive),(0,a.default)(o.assetsHeight,"RendererOptions.assetsHeight",a.default.number.integer.positive),(0,a.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",a.default.function),(0,a.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",a.default.function),(0,a.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",a.default.function),(0,a.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",a.default.function),(0,a.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Lr.DefaultRenderer=d,Lr}var Nc;function yp(){return Nc||(Nc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const a=wc();var s=wc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return s.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:a.DefaultRenderer},e.default=e.HiveContentRenderer})(On)),On}var lo=yp();function co({author:e,permlink:a,defaultValue:s=100,onUpvote:i,onCancel:r}){const[n,u]=T.useState(s),[c,d]=T.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await i(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
|
|
1071
|
+
`)});const k=g.nonTextTags||["script","style","textarea","option"];let _,E;g.allowedAttributes&&(_={},E={},d(g.allowedAttributes,function(Z,ae){_[ae]=[];const re=[];Z.forEach(function(de){typeof de=="string"&&de.indexOf("*")>=0?re.push(a(de).replace(/\\\*/g,".*")):_[ae].push(de)}),re.length&&(E[ae]=new RegExp("^("+re.join("|")+")$"))}));const D={},C={},P={};d(g.allowedClasses,function(Z,ae){if(_&&(f(_,ae)||(_[ae]=[]),_[ae].push("class")),D[ae]=Z,Array.isArray(Z)){const re=[];D[ae]=[],P[ae]=[],Z.forEach(function(de){typeof de=="string"&&de.indexOf("*")>=0?re.push(a(de).replace(/\\\*/g,".*")):de instanceof RegExp?P[ae].push(de):D[ae].push(de)}),re.length&&(C[ae]=new RegExp("^("+re.join("|")+")$"))}});const L={};let H;d(g.transformTags,function(Z,ae){let re;typeof Z=="function"?re=Z:typeof Z=="string"&&(re=y.simpleTransform(Z)),ae==="*"?H=re:L[ae]=re});let F,q,M,G,X,ee,R=!1;I();const ne=new e.Parser({onopentag:function(Z,ae){if(g.enforceHtmlBoundary&&Z==="html"&&I(),X){ee++;return}const re=new x(Z,ae);q.push(re);let de=!1;const ye=!!re.text;let be;if(f(L,Z)&&(be=L[Z](Z,ae),re.attribs=ae=be.attribs,be.text!==void 0&&(re.innerText=be.text),Z!==be.tagName&&(re.name=Z=be.tagName,G[F]=be.tagName)),H&&(be=H(Z,ae),re.attribs=ae=be.attribs,Z!==be.tagName&&(re.name=Z=be.tagName,G[F]=be.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h(M)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(de=!0,M[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&k.indexOf(Z)!==-1&&(X=!0,ee=1),M[F]=!0),F++,de){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;j=N,N=""}N+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(re.innerText=""),(!_||f(_,Z)||_["*"])&&d(ae,function(_e,ge){if(!p.test(ge)){delete re.attribs[ge];return}if(_e===""&&!g.allowedEmptyAttributes.includes(ge)&&(g.nonBooleanAttributes.includes(ge)||g.nonBooleanAttributes.includes("*"))){delete re.attribs[ge];return}let Ke=!1;if(!_||f(_,Z)&&_[Z].indexOf(ge)!==-1||_["*"]&&_["*"].indexOf(ge)!==-1||f(E,Z)&&E[Z].test(ge)||E["*"]&&E["*"].test(ge))Ke=!0;else if(_&&_[Z]){for(const je of _[Z])if(s(je)&&je.name&&je.name===ge){Ke=!0;let he="";if(je.multiple===!0){const Ce=_e.split(" ");for(const Me of Ce)je.values.indexOf(Me)!==-1&&(he===""?he=Me:he+=" "+Me)}else je.values.indexOf(_e)>=0&&(he=_e);_e=he}}if(Ke){if(g.allowedSchemesAppliedToAttributes.indexOf(ge)!==-1&&J(Z,_e)){delete re.attribs[ge];return}if(Z==="script"&&ge==="src"){let je=!0;try{const he=ue(_e);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ce=(g.allowedScriptHostnames||[]).find(function(ze){return ze===he.url.hostname}),Me=(g.allowedScriptDomains||[]).find(function(ze){return he.url.hostname===ze||he.url.hostname.endsWith(`.${ze}`)});je=Ce||Me}}catch{je=!1}if(!je){delete re.attribs[ge];return}}if(Z==="iframe"&&ge==="src"){let je=!0;try{const he=ue(_e);if(he.isRelativeUrl)je=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ce=(g.allowedIframeHostnames||[]).find(function(ze){return ze===he.url.hostname}),Me=(g.allowedIframeDomains||[]).find(function(ze){return he.url.hostname===ze||he.url.hostname.endsWith(`.${ze}`)});je=Ce||Me}}catch{je=!1}if(!je){delete re.attribs[ge];return}}if(ge==="srcset")try{let je=r(_e);if(je.forEach(function(he){J("srcset",he.url)&&(he.evil=!0)}),je=o(je,function(he){return!he.evil}),je.length)_e=l(o(je,function(he){return!he.evil})),re.attribs[ge]=_e;else{delete re.attribs[ge];return}}catch{delete re.attribs[ge];return}if(ge==="class"){const je=D[Z],he=D["*"],Ce=C[Z],Me=P[Z],ze=C["*"],Pt=[Ce,ze].concat(Me).filter(function(er){return er});if(je&&he?_e=Se(_e,i(je,he),Pt):_e=Se(_e,je||he,Pt),!_e.length){delete re.attribs[ge];return}}if(ge==="style"){if(g.parseStyleAttributes)try{const je=n(Z+" {"+_e+"}",{map:!1}),he=Q(je,g.allowedStyles);if(_e=te(he),_e.length===0){delete re.attribs[ge];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+_e+`}", 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 re.attribs[ge];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}N+=" "+ge,_e&&_e.length?N+='="'+V(_e,!0)+'"':g.allowedEmptyAttributes.includes(ge)&&(N+='=""')}else delete re.attribs[ge]}),g.selfClosing.indexOf(Z)!==-1?N+=" />":(N+=">",re.innerText&&!ye&&!g.textFilter&&(N+=V(re.innerText),R=!0)),de&&(N=j+V(N),j="")},ontext:function(Z){if(X)return;const ae=q[q.length-1];let re;if(ae&&(re=ae.tag,Z=ae.innerText!==void 0?ae.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(re))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(re==="script"||re==="style"))N+=Z;else{const de=V(Z,!1);g.textFilter&&!R?N+=g.textFilter(de,re):R||(N+=de)}if(q.length){const de=q[q.length-1];de.text+=Z}},onclosetag:function(Z,ae){if(X)if(ee--,!ee)X=!1;else return;const re=q.pop();if(!re)return;if(re.tag!==Z){q.push(re);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const de=M[F];if(de){if(delete M[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){re.updateParentNodeText();return}j=N,N=""}if(G[F]&&(Z=G[F],delete G[F]),g.exclusiveFilter&&g.exclusiveFilter(re)){N=N.substr(0,re.tagPosition);return}if(re.updateParentNodeMediaChildren(),re.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||ae&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){de&&(N=j,j="");return}N+="</"+Z+">",de&&(N=j+V(N),j=""),R=!1}},g.parser);return ne.write(b),ne.end(),N;function I(){N="",F=0,q=[],M={},G={},X=!1,ee=0}function V(Z,ae){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,"""))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,""")),Z}function J(Z,ae){for(ae=ae.replace(/[\x00-\x20]+/g,"");;){const ye=ae.indexOf("<!--");if(ye===-1)break;const be=ae.indexOf("-->",ye+4);if(be===-1)break;ae=ae.substring(0,ye)+ae.substring(be+3)}const re=ae.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!re)return ae.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const de=re[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(de)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(de)===-1}function ue(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let ae="relative://relative-site";for(let ye=0;ye<100;ye++)ae+=`/${ye}`;const re=new URL(Z,ae);return{isRelativeUrl:re&&re.hostname==="relative-site"&&re.protocol==="relative:",url:re}}function Q(Z,ae){if(!ae)return Z;const re=Z.nodes[0];let de;return ae[re.selector]&&ae["*"]?de=i(ae[re.selector],ae["*"]):de=ae[re.selector]||ae["*"],de&&(Z.nodes[0].nodes=re.nodes.reduce(me(de),[])),Z}function te(Z){return Z.nodes[0].nodes.reduce(function(ae,re){return ae.push(`${re.prop}:${re.value}${re.important?" !important":""}`),ae},[]).join(";")}function me(Z){return function(ae,re){return f(Z,re.prop)&&Z[re.prop].some(function(ye){return ye.test(re.value)})&&ae.push(re),ae}}function Se(Z,ae,re){return ae?(Z=Z.split(/\s+/),Z.filter(function(de){return ae.indexOf(de)!==-1||re.some(function(ye){return ye.test(de)})}).join(" ")):Z}}const w={decodeEntities:!0};return y.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},y.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(N,j){let x;if(v)for(x in g)j[x]=g[x];else j=g;return{tagName:b,attribs:j}}},Li}var yc;function bp(){if(yc)return Ur;yc=1;var e=Ur&&Ur.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.TagTransformingSanitizer=void 0;const a=e(os()),s=e(gp()),i=fr(),r=to(),n=fd();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),r.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,s.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.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:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return i.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return i.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(y=>f.class===y);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,a.default)(d,"TagsSanitizerOptions",a.default.object),(0,a.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",a.default.number.integer.positive),(0,a.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",a.default.number.integer.positive),(0,a.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(d.noImage,"TagsSanitizerOptions.noImage",a.default.boolean),(0,a.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",a.default.function),(0,a.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Ur.TagTransformingSanitizer=u,Ur}var vc;function wc(){if(vc)return Lr;vc=1;var e=Lr&&Lr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DefaultRenderer=void 0;const a=e(os()),s=fh,i=jh(),r=Hh(),n=to(),u=Wh(),c=bp();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.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},h),this.domParser=new r.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},h)}render(o){return(0,a.default)(o,"input",a.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),i.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new s.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,a.default)(o,"RendererOptions",a.default.object),(0,a.default)(o.baseUrl,"RendererOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(o.breaks,"RendererOptions.breaks",a.default.boolean),(0,a.default)(o.skipSanitization,"RendererOptions.skipSanitization",a.default.boolean),(0,a.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",a.default.boolean),(0,a.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(o.assetsWidth,"RendererOptions.assetsWidth",a.default.number.integer.positive),(0,a.default)(o.assetsHeight,"RendererOptions.assetsHeight",a.default.number.integer.positive),(0,a.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",a.default.function),(0,a.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",a.default.function),(0,a.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",a.default.function),(0,a.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",a.default.function),(0,a.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Lr.DefaultRenderer=d,Lr}var Nc;function xp(){return Nc||(Nc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const a=wc();var s=wc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return s.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:a.DefaultRenderer},e.default=e.HiveContentRenderer})(On)),On}var lo=xp();function co({author:e,permlink:a,defaultValue:s=100,onUpvote:i,onCancel:r}){const[n,u]=T.useState(s),[c,d]=T.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await i(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
|
|
1072
1072
|
${n===h?"text-blue-600 font-bold":"hover:text-blue-700 hover:bg-blue-50 dark:hover:bg-gray-700"}`,style:{background:"none",border:"none",cursor:"pointer"},children:h},h))})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsx("button",{onClick:o,disabled:n===0||c,className:`flex-1 flex items-center justify-center rounded-full font-semibold transition
|
|
1073
1073
|
text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
|
|
1074
1074
|
${n===0||c?"bg-blue-300 text-white cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 text-white"}`,children:c?t.jsxs(t.Fragment,{children:[t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1 animate-spin"}),"Voting..."]}):t.jsxs(t.Fragment,{children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Vote"]})}),t.jsxs("button",{onClick:r,disabled:c,className:`flex-1 flex items-center justify-center rounded-full font-semibold text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
|
|
1075
1075
|
bg-gray-300 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-800 dark:text-white
|
|
1076
|
-
disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const fo=({comment:e,allComments:a,onReply:s,currentUser:i,token:r,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=T.useState(!1),[p,y]=T.useState(!0),[w,b]=T.useState(!1),g=T.useMemo(()=>{const Q=e.active_votes||[];if(!i)return!1;const te=i.toLowerCase();return Q.some(me=>(me.voter||"").toLowerCase()===te)},[e.active_votes,i]),[v,N]=T.useState(!1),[j,x]=T.useState(""),[m,k]=T.useState(!1),_=Q=>{x(Q),N(!0),setTimeout(()=>N(!1),2500)},E=e.depth||0;let C=a.filter(Q=>Q.parent_author===e.author&&Q.parent_permlink===e.permlink&&(typeof Q.depth!="number"||Q.depth===E+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const Q=new Set(e.replies);C=a.filter(te=>Q.has(`${te.author}/${te.permlink}`))}const P=C.length>0,L=u>=4,H=(Q,te)=>{if(!te)return Q;const me=new RegExp(`(${te})`,"gi");return Q.replace(me,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},q=async Q=>{if(d){try{await Promise.resolve(d(e.author,e.permlink,Q)),l(!0),b(!1),setTimeout(()=>{c?.(),_("Vote submitted successfully!")},3e3)}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";alert(me)}return}if(!r){_("Please login or provide an upvote handler to vote");return}try{const te=Math.round(Q*100);await Pe.handleUpvote({author:e.author,permlink:e.permlink,weight:te,authToken:r}),l(!0),b(!1),k(!0),setTimeout(()=>{c?.(),k(!1),_("Vote submitted successfully ✅")},3e3)}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";alert(me)}},M=()=>{i?s(e.author,e.permlink):_("Please login to upvote")},G=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",R=(Q=>{const te=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return Q.replace(te,"").trim()})(X),ie=n?H(R,n):R,I=/!\[[^\]]*\]\([^)]+\)/.test(R)||/<img\s/i.test(R),V=Array.isArray(G?.image)?G.image:[],J=new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:Q=>Q,usertagUrlFn:Q=>`/@${Q}`,hashtagUrlFn:Q=>`/trending/${Q}`,isLinkSafeFn:Q=>!0,addExternalCssClassToMatchingLinksFn:Q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),ue=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:Q=>{Q.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:dn.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===i&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-left text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400 [&>*]:text-left",children:n?t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:ie}}):t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:J.render(R)}})}),!I&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((Q,te)=>t.jsx("img",{src:Q,alt:`image-${te}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(Q,"_blank")},Q+te))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d){if(!i){_("Please login to upvote");return}if(g||h){_("You have already upvoted this comment");return}F()}else if(o){if(!i){_("Please login to upvote");return}if(g||h){_("You have already upvoted this comment");return}F()}else{if(!i){_("Please login to upvote");return}r?g?_("You have already upvoted this comment"):F():(c?.(),_("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:ue})]}),t.jsxs("button",{onClick:()=>{f?f(e):M()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),P&&t.jsx("button",{onClick:()=>y(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(co,{author:e.author,permlink:e.permlink,onUpvote:q,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:j})})]})]})}),P&&p&&!L&&t.jsx("div",{className:"space-y-0",children:C.map(Q=>t.jsx(fo,{comment:Q,allComments:a,onReply:s,currentUser:i,searchQuery:n,depth:u+1,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o},Q.permlink))}),P&&L&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},un=({onSubmit:e,onCancel:a,currentUser:s,placeholder:i="Write your comment...",parentAuthor:r,parentPermlink:n})=>{const[u,c]=T.useState(""),[d,f]=T.useState(!1),o=T.useRef(null);T.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&a()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center justify-start space-x-3 text-left",children:[t.jsx("div",{className:"flex-shrink-0",children:s?t.jsx("img",{src:`https://images.hive.blog/u/${s}/avatar`,alt:s,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${s}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:s?`@${s}`:"Anonymous"}),r&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",r]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:i,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const y=p.target;y.style.height="auto",y.style.height=y.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:a,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},vp=({parentAuthor:e,parentPermlink:a,onClose:s,onCommentSubmitted:i,currentUser:r})=>{const[n,u]=T.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await i(e,a,d),s()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return T.useEffect(()=>{const d=f=>{f.key==="Escape"&&s()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[s]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:s,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(un,{onSubmit:c,onCancel:s,currentUser:r,parentAuthor:e,parentPermlink:a,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},wp=({isVisible:e,searchQuery:a,onSearchChange:s,onClose:i})=>{const r=T.useRef(null);T.useEffect(()=>{e&&r.current&&r.current.focus()},[e]);const n=()=>{s(""),i()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:r,type:"text",value:a,onChange:u=>s(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),a&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},ho=({author:e,permlink:a,onClose:s,currentUser:i,token:r,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c,onSubmitComment:d})=>{const[f,o]=T.useState([]),[h,l]=T.useState([]),[p,y]=T.useState(!0),[w,b]=T.useState(null),[g,v]=T.useState(null),[N,j]=T.useState(!1),[x,m]=T.useState(""),[k,_]=T.useState(!1),[E,D]=T.useState(!1),C=T.useCallback(async(M=!1)=>{M?D(!0):y(!0),b(null);try{const G=await Pe.getCommentsList(e,a);o(G),l(G)}catch(G){b(G instanceof Error?G.message:"Failed to load comments")}finally{y(!1),D(!1)}},[e,a]);T.useEffect(()=>{C()},[C]),T.useEffect(()=>{if(!x.trim())l(f);else{const M=f.filter(G=>G.body?.toLowerCase().includes(x.toLowerCase())||G.author.toLowerCase().includes(x.toLowerCase()));l(M)}},[x,f]);const P=(M,G)=>{v({author:M,permlink:G})},L=M=>{M.target===M.currentTarget&&s()},H=async(M,G,X)=>{if(d){try{await Promise.resolve(d(M,G,X)),_(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}return}if(!r){alert("Please login to comment");return}try{await Pe.handleComment({author:M,permlink:G,body:X,authToken:r}),_(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}},F=T.useMemo(()=>{if(!i?.trim())return h;const M=i.toLowerCase();return[...h].sort((G,X)=>{const ee=G.author?.toLowerCase()===M,R=X.author?.toLowerCase()===M;return ee&&!R?-1:!ee&&R?1:0})},[h,i]),q=F.filter(M=>M.parent_author===e&&M.parent_permlink===a);return p?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):w?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:w}),t.jsx("button",{onClick:()=>C(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",f.length,")"]}),E&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>C(!0),disabled:E,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${E?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>j(!N),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:s,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(wp,{isVisible:N,searchQuery:x,onSearchChange:m,onClose:()=>j(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[k&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(un,{onSubmit:M=>H(e,a,M),onCancel:()=>_(!1),currentUser:i,placeholder:"Add a comment..."})}),q.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:x?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:x?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!x&&i&&t.jsx("button",{onClick:()=>_(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:q.map(M=>t.jsx(fo,{comment:M,allComments:F,onReply:P,currentUser:i,token:r,searchQuery:x,depth:0,onVotedRefresh:()=>C(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},M.permlink))})]}),!k&&i&&q.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>_(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),g&&t.jsx(vp,{parentAuthor:g.author,parentPermlink:g.permlink,onClose:()=>v(null),onCommentSubmitted:H,currentUser:i})]})};function Np(e){const a=typeof e=="string"?new Date(e):e,s=Math.floor((Date.now()-a.getTime())/1e3),i={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[r,n]of Object.entries(i)){const u=Math.floor(s/n);if(u>1)return`${u} ${r}s ago`;if(u===1)return`${u} ${r} ago`}return"just now"}const po=({author:e,permlink:a,onClose:s,currentUser:i,token:r,onClickUpvoteButton:n})=>{const[u,c]=T.useState([]),[d,f]=T.useState(!0),[o,h]=T.useState(!1),l=!!i&&u.some(k=>k.voter===i),[p,y]=T.useState(!1),[w,b]=T.useState(""),[g,v]=T.useState(!1),N=k=>{b(k),y(!0),setTimeout(()=>y(!1),2500)},j=async()=>{f(!0);const k=await Pe.getActiveVotes(e,a);k.sort((_,E)=>!_.time||!E.time?0:new Date(E.time).getTime()-new Date(_.time).getTime()),c(k),f(!1)};T.useEffect(()=>{j()},[e,a]);const x=k=>{k.target===k.currentTarget&&s()},m=async k=>{if(!r||!i){alert("Please login to upvote");return}try{const _=Math.round(k*100);await Pe.handleUpvote({author:e,permlink:a,weight:_,authToken:r}),h(!1),v(!0),setTimeout(async()=>{await j(),v(!1),N("Vote submitted successfully ✅"),s()},3e3)}catch(_){const E=_ instanceof Error?_.message:"Failed to upvote";alert(E)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:x,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(i,r);return}if(!i||!r){N("Please login to upvote");return}l?N("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(co,{author:e,permlink:a,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(k=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${k.voter}/avatar`,alt:k.voter,className:"w-10 h-10 rounded-full mr-4",onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${k.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:k.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((k.percent||0)/100).toFixed(0),"%",k.time&&` · ${Np(k.time+"Z")}`]})]})]},k.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},Sd=({isOpen:e,onClose:a,title:s,children:i,maxWidth:r="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${r} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:s}),t.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:i})]})]}):null,jp=({author:e,permlink:a,content:s,onClose:i})=>t.jsx(Sd,{isOpen:!0,onClose:i,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[s?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:s})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",a]})]})})]})}),kp=({username:e,permlink:a,onAuthorClick:s,onVideoClick:i,onTagClick:r,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=a,[y,w]=T.useState(null),[b,g]=T.useState(!0),[v,N]=T.useState(null),[j,x]=T.useState(!1),[m,k]=T.useState(null),[_,E]=T.useState(!1),[D,C]=T.useState(!1),[P,L]=T.useState(!1),[H,F]=T.useState(!1),q=T.useRef(null),M=T.useRef(null),G=T.useRef(null);T.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),N(null);const J=await Pe.getVideoDetails(l,p);w(J),x(!1),k(null)}catch(J){N(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";T.useEffect(()=>((async()=>{const J=y?.video_v2;if(!j||!J||!q.current)return;const ue=q.current,Q=X(J);M.current&&(M.current.destroy(),M.current=null),ue.src="",ue.load();try{let te=!1;const me=()=>{te||(te=!0,ue.play().then(()=>k(null)).catch(ye=>k(`Playback failed: ${ye.message}`)))};if(na.isSupported()){const ye=new na({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});M.current=ye,ye.on(na.Events.MANIFEST_PARSED,()=>{}),ye.on(na.Events.ERROR,(be,_e)=>{if(_e.fatal)switch(_e.type){case na.ErrorTypes.NETWORK_ERROR:k("Network error, retrying..."),setTimeout(()=>ye.startLoad(),1e3);break;case na.ErrorTypes.MEDIA_ERROR:k("Media error, retrying..."),setTimeout(()=>ye.recoverMediaError(),1e3);break;default:k(`Fatal error: ${_e.details}`),ye.destroy(),M.current=null;break}}),ye.attachMedia(ue),ye.loadSource(Q)}else if(ue.canPlayType("application/vnd.apple.mpegurl"))ue.src=Q;else{const ye=Q.replace("/manifest.m3u8","/480p/index.m3u8");ue.src=ye}const Se=()=>E(!0),Z=()=>{E(!1),me()},ae=ye=>{const be=ye.target;k(`Video error: ${be.error?.message||"Unknown error"}`),E(!1)},re=()=>E(!1);ue.addEventListener("loadstart",Se),ue.addEventListener("canplay",Z),ue.addEventListener("error",ae),ue.addEventListener("loadeddata",re);const de=async()=>{const ye=!!document.fullscreenElement;try{ye?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",de),G.current=()=>{document.removeEventListener("fullscreenchange",de)},()=>{ue.removeEventListener("loadstart",Se),ue.removeEventListener("canplay",Z),ue.removeEventListener("error",ae),ue.removeEventListener("loadeddata",re),G.current&&G.current()}}catch(te){k(`Setup error: ${te instanceof Error?te.message:"Unknown"}`)}})(),()=>{M.current&&(M.current.destroy(),M.current=null)}),[j,y?.video_v2]);const ee=()=>{if(!y?.video_v2){k("No video source available");return}x(!0),k(null),E(!0)},R=V=>{i&&i(V)},ie=V=>{s&&s(V)},I=V=>{if(!V)return"00:00";const J=Math.floor(V),ue=Math.floor(J/3600),Q=Math.floor(J%3600/60),te=J%60,me=Se=>Se.toString().padStart(2,"0");return J<60?`00:${me(te)}`:ue===0?`${me(Q)}:${me(te)}`:`${me(ue)}:${me(Q)}:${me(te)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!y?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:j?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:q,controls:!0,poster:Gr(y.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),_&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{x(!1),k(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Gr(y.thumbnail)||`https://images.hive.blog/u/${y.owner}/avatar`,alt:y.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${y.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ee,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),y.duration&&t.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:[t.jsx(z.Clock,{className:"w-3 h-3"}),I(y.duration)]}),y.views&&t.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:[t.jsx(z.Eye,{className:"w-3 h-3"}),y.views.toLocaleString()," views"]})]})}),t.jsx(Rc,{title:y.title||"",author:y.owner||"",permlink:y.permlink||"",createdAt:y.created,description:y.description||"",video:{title:y.title||"",author:y.owner||"",permlink:y.permlink||"",created:y.created||new Date,category:y.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:y.duration,thumbnail:y.thumbnail,views:y.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):L(!0)},onTapInfo:()=>{d?d(l,p,y.description||""):F(!0)},onTapAuthor:()=>{s&&s(y.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),y.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:y.tags.split(",").map((V,J)=>t.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:()=>{r&&r(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(fn,{feedType:Xe.RELATED,username:y.owner,onVideoClick:R,onAuthorClick:ie})})]})]})}),D&&l&&p&&t.jsx(ho,{author:l,permlink:p,onClose:()=>C(!1)}),P&&l&&p&&t.jsx(po,{author:l,permlink:p,onClose:()=>L(!1)}),H&&l&&p&&t.jsx(jp,{author:l,permlink:p,content:y.description||"",onClose:()=>F(!1)})]})};var Cd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jc=T.createContext&&T.createContext(Cd),_p=["attr","size","title"];function Ep(e,a){if(e==null)return{};var s,i,r=Ap(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)s=n[i],a.indexOf(s)===-1&&{}.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function Ap(e,a){if(e==null)return{};var s={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;s[i]=e[i]}return s}function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ln.apply(null,arguments)}function kc(e,a){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),s.push.apply(s,i)}return s}function cn(e){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?kc(Object(s),!0).forEach(function(i){Sp(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):kc(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Sp(e,a,s){return(a=Cp(a))in e?Object.defineProperty(e,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[a]=s,e}function Cp(e){var a=Dp(e,"string");return typeof a=="symbol"?a:a+""}function Dp(e,a){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,a);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Dd(e){return e&&e.map((a,s)=>T.createElement(a.tag,cn({key:s},a.attr),Dd(a.child)))}function We(e){return a=>T.createElement(Tp,ln({attr:cn({},e.attr)},a),Dd(e.child))}function Tp(e){var a=s=>{var{attr:i,size:r,title:n}=e,u=Ep(e,_p),c=r||s.size||"1em",d;return s.className&&(d=s.className),e.className&&(d=(d?d+" ":"")+e.className),T.createElement("svg",ln({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,i,u,{className:d,style:cn(cn({color:e.color||s.color},s.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&T.createElement("title",null,n),e.children)};return jc!==void 0?T.createElement(jc.Consumer,null,s=>a(s)):a(Cd)}function Op(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"},child:[]}]})(e)}function Pp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(e)}function Lp(e){return We({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:[]}]})(e)}function Mp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(e)}function $p(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"},child:[]}]})(e)}function Rp(e){return We({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:[]}]})(e)}function Ip(e){return We({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:[]}]})(e)}function Fp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM48 132.22c20.12 5.04 41.12 7.57 62.72 8.93C104.84 170.54 79 192.69 48 192.69v-60.47zm0 285v-47.78c34.37 0 62.18 27.27 63.71 61.4-22.53-1.81-43.59-6.31-63.71-13.62zM320 352c-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 27.78c-17.52-4.39-35.71-6.85-54.32-8.44 5.87-26.08 27.5-45.88 54.32-49.28v57.72zm0-236.11c-30.89-3.91-54.86-29.7-55.81-61.55 19.54 2.17 38.09 6.23 55.81 12.66v48.89z"},child:[]}]})(e)}function Mi(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z"},child:[]}]})(e)}function Bp(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M473.7 73.8l-2.4-2.5c-46-47-118-51.7-169.6-14.8L336 159.9l-96 64 48 128-144-144 96-64-28.6-86.5C159.7 19.6 87 24 40.7 71.4l-2.4 2.4C-10.4 123.6-12.5 202.9 31 256l212.1 218.6c7.1 7.3 18.6 7.3 25.7 0L481 255.9c43.5-53 41.4-132.3-7.3-182.1z"},child:[]}]})(e)}function _c(e){return We({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M275.3 250.5c7 7.4 18.4 7.4 25.5 0l108.9-114.2c31.6-33.2 29.8-88.2-5.6-118.8-30.8-26.7-76.7-21.9-104.9 7.7L288 36.9l-11.1-11.6C248.7-4.4 202.8-9.2 172 17.5c-35.3 30.6-37.2 85.6-5.6 118.8l108.9 114.2zm290 77.6c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"},child:[]}]})(e)}function qp(e){return We({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function Td(e){return We({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:[]}]})(e)}function Vp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M160 224v64h320v-64c0-35.3 28.7-64 64-64h32c0-53-43-96-96-96H160c-53 0-96 43-96 96h32c35.3 0 64 28.7 64 64zm416-32h-32c-17.7 0-32 14.3-32 32v96H128v-96c0-17.7-14.3-32-32-32H64c-35.3 0-64 28.7-64 64 0 23.6 13 44 32 55.1V432c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-16h384v16c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16V311.1c19-11.1 32-31.5 32-55.1 0-35.3-28.7-64-64-64z"},child:[]}]})(e)}function Up(e){return We({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:[]}]})(e)}function zp(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"},child:[]}]})(e)}function Hp(e){return We({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z"},child:[]}]})(e)}function Od(e){return We({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:[]}]})(e)}function Wp(e){return We({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}const mo=new Xd.Client(["https://api.hive.blog"]),Gp=async e=>{try{const a=await mo.database.getAccounts([e]);if(!a||a.length===0)throw new Error("Account not found");return a[0]}catch(a){return console.error("Error in getWalletDataDetail:",a),{error:a instanceof Error?a.message:"Unknown error"}}},Jp=async e=>{try{const a=await mo.database.getDynamicGlobalProperties(),s=parseFloat(e.split(" ")[0]),i=parseFloat(String(a.total_vesting_shares).split(" ")[0]),r=parseFloat(String(a.total_vesting_fund_hive).split(" ")[0]);return(s*r/i).toFixed(3)}catch(a){return console.error("Error in convertVestingSharesToHiveData:",a),"0"}},Yp=async e=>{try{const s=(await mo.database.call("get_feed_history",[])).current_median_history,i=parseFloat(s.base.split(" ")[0]),r=typeof e=="string"?parseFloat(e):e;return(i*r).toFixed(2)}catch(a){return console.error("Error in convertHivetoUSDData:",a),"0"}},Pd=Pc.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:a=>e({walletData:a}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async a=>{e({isLoading:!0,error:null});try{const s=await Gp(a),i=w=>"error"in w;if(!s||i(s))throw new Error(i(s)?s.error:"Account not found");const r=typeof s.vesting_shares=="string"?s.vesting_shares:"0.000000 VESTS",n=typeof s.balance=="string"?s.balance:s.balance.toString(),u=typeof s.hbd_balance=="string"?s.hbd_balance:s.hbd_balance.toString(),c=typeof s.savings_balance=="string"?s.savings_balance:s.savings_balance.toString(),d=typeof s.savings_hbd_balance=="string"?s.savings_hbd_balance:s.savings_hbd_balance.toString(),f=await Jp(r),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Yp(l),y={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:y}),y}catch(s){const i=s instanceof Error?s.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",i);const r={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:i};return e({walletData:r,error:i}),r}finally{e({isLoading:!1})}}})),Zp=({username:e,className:a=""})=>{const{walletData:s,fetchWalletData:i,isLoading:r,error:n}=Pd();T.useEffect(()=>{e&&i(e)},[e,i]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.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:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${a}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} 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=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:r?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):s?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(Td,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:s?.balance,icon:t.jsx(Lp,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:s?.hbd_balance,icon:t.jsx(Ip,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:s?.savings_balance,icon:t.jsx(Rp,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:s?.savings_hbd_balance,icon:t.jsx(Up,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:s?.hive_power,icon:t.jsx(Od,{}),colorClass:"bg-orange-500/10"})]})})};function Ld({sort:e="trending",tag:a="",observer:s="hive.blog",limit:i=20,showSortDropdown:r=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,y]=T.useState([]),[w,b]=T.useState(!0),[g,v]=T.useState(null),[N,j]=T.useState(e),[x,m]=T.useState(!0),[k,_]=T.useState(!1),E=T.useRef(null);new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:q=>q,usertagUrlFn:q=>`/@${q}`,hashtagUrlFn:q=>`/trending/${q}`,isLinkSafeFn:q=>!0,addExternalCssClassToMatchingLinksFn:q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=T.useCallback(async(q,M=!1)=>{M?_(!0):(b(!0),m(!0)),v(null);try{const G=M&&p.length>0?p[p.length-1]:null,X=await Pe.getRankedPosts(q,a,s,i,G?.author,G?.permlink);M?(y(ee=>{const R=new Set(ee.map(I=>I.post_id)),ie=X.filter(I=>!R.has(I.post_id));return[...ee,...ie]}),m(X.length===i)):(y(X),m(X.length===i))}catch(G){v(G instanceof Error?G.message:"Failed to load posts"),m(!1)}finally{b(!1),_(!1)}},[a,s,i,p]),C=T.useCallback(()=>{!k&&x&&!w&&D(N,!0)},[k,x,w,N,D]);T.useEffect(()=>{D(N)},[N,a,s,i]),T.useEffect(()=>{const q=new IntersectionObserver(M=>{M[0].isIntersecting&&C()},{threshold:1});return E.current&&q.observe(E.current),()=>{E.current&&q.unobserve(E.current)}},[C]);const P=q=>{j(q),y([]),m(!0)},L=q=>q>=1e6?`${(q/1e6).toFixed(1)}M`:q>=1e3?`${(q/1e3).toFixed(1)}K`:q.toString(),H=q=>{const M=q.payout*.5,G=q.payout*.5,ee=(q.beneficiaries.find(R=>R.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${q.payout.toFixed(2)}`,breakdown:`${M.toFixed(2)} HBD, ${G.toFixed(2)} HP`,commentRewarder:`${ee.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(q.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=q=>{const G=(q.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 G.length>200?G.substring(0,200)+"...":G};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(N),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[r&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:N,onChange:q=>P(q.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(q=>{const M=q.json_metadata?.image?.[0],G=H(q);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${q.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),children:q.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",q.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(q.community_title),children:q.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:dn.formatDistanceToNow(new Date(q.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:M?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:M.startsWith("http")?M:`https://images.hive.blog/u/320x0/${M}`,alt:q.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(q),onError:X=>{X.target.src!==`https://images.hive.blog/u/${q.author}/avatar`?X.target.src=`https://images.hive.blog/u/${q.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=q.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ee=>{const R=ee.match(/\(([^)]+)\)/);return R?R[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ee,R)=>t.jsx("img",{src:ee,alt:`body-image-${R}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:ie=>{ie.stopPropagation();const I=ie.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");I&&(I.src=ee)}},R))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(q)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(q),children:q.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(q),children:q.json_metadata?.description||F(q)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(q.payout),children:["$",q.payout.toFixed(2)]}),t.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:[t.jsxs("div",{children:["Pending payout amount: ",G.pending]}),t.jsxs("div",{children:["Breakdown: ",G.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",G.commentRewarder]}),t.jsxs("div",{children:["Payout in ",G.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(q),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(q),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(q),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.reblogs)})]})]})]})]})]})]},q.post_id)}),k&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),x&&!k&&t.jsx("div",{ref:E,className:"h-10"})]})]})})}class da{static instance;static getInstance(){return da.instance||(da.instance=new da),da.instance}async getProposals(a){return a==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const i=(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,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[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||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),i.map(h=>{const l=h.id,p=u[l],y=o[l]||[],w=y.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,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:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:y,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:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching active proposals:",a),[]}}async getExpiredProposals(){try{const i=(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,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[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||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),i.map(h=>{const l=h.id,p=u[l],y=o[l]||[],w=y.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,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:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:y,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:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching expired proposals:",a),[]}}}const Ec=da.getInstance(),Xp=["All","Active","Upcoming","Expired","By Peak Projects"],Md=["Votes","Start Date","End Date","Creator"],Ac=e=>e==="By Peak Projects"?["Creator"]:Md,ct=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?e.toString():a.toLocaleString()},$i=e=>{const a=new Date(e.start_date),s=new Date(e.end_date);return`(${Math.ceil((s.getTime()-a.getTime())/(1e3*60*60*24))} days)`},Qp=({onClickSupport:e,onClickVoteValue:a,onClickSelect:s,onClickUser:i,onClickAvatar:r,theme:n="dark"})=>{const[u,c]=T.useState([]),[d,f]=T.useState("All"),[o,h]=T.useState("Votes");T.useEffect(()=>{d==="By Peak Projects"&&!Ac(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!Md.includes(o)&&h("Votes")},[d,o]);const[l,p]=T.useState(!0);T.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([Ec.getProposals("active"),Ec.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const y=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=y.filter(N=>N.status==="active"),g=y.filter(N=>new Date(N.start_date+"Z")>new Date),v=(N,j)=>o==="Votes"?Number(j.all_votes_num)-Number(N.all_votes_num):o==="Start Date"?new Date(j.start_date+"Z").getTime()-new Date(N.start_date+"Z").getTime():o==="End Date"?new Date(N.end_date+"Z").getTime()-new Date(j.end_date+"Z").getTime():o==="Creator"?N.creator.localeCompare(j.creator):0;return[...b.sort(v),...g.sort(v)]})():y.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Xp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:Ac(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.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(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?ct(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?ct(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.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(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?ct(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?ct(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.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(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(b),children:["Vote value: ",b.vote_value_total?ct(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?ct(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Kp{HIVE_API_URL="https://api.hive.blog";async getProfile(a){const s={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:a},id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}async getFollowers(a){const s={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[a,null,"blog"],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getFollowing(a){const s={jsonrpc:"2.0",method:"condenser_api.get_following",params:[a,null,"blog"],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getAccounts(a){const s={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[a],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getDynamicGlobalProperties(){const a={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async convertVestingSharesToHive(a){try{const s=await this.getDynamicGlobalProperties(),i=parseFloat(a.split(" ")[0]),r=parseFloat(s.total_vesting_shares.split(" ")[0]),n=parseFloat(s.total_vesting_fund_hive.split(" ")[0]);return(i*n/r).toFixed(3)}catch(s){return console.error("Error converting vesting shares:",s),"0"}}async getFeedHistory(){const a={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getVoteValue(a,s=1e4){try{const i=await this.getAccounts([a]);if(i.length===0)throw new Error("Account not found!");const r=i[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(r.vesting_shares)+parseFloat(r.received_vesting_shares)-parseFloat(r.delegated_vesting_shares)-parseFloat(r.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-r.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(r.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=r.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),y=n.total_vesting_shares||"0 VESTS",w=parseFloat(y.toString().split(" ")[0]),b=s/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),N=g*f/100,j=parseFloat(n.recent_claims||"0"),x=n.reward_balance||"0 HIVE",m=parseFloat(x.toString().split(" ")[0]),k=n.current_supply||"0 HIVE",_=parseFloat(k.toString().split(" ")[0]),E=n.current_sbd_supply||"0 HBD",D=parseFloat(E.toString().split(" ")[0]),C=m/j*(p/w)*(N/f)*_,P=u?.current_median_history;if(!P||!P.base)return"0.00";const L=parseFloat(P.base.toString().split(" ")[0]);return(C*L).toFixed(2)}catch(i){return console.error("Error calculating vote value:",i),"0.00"}}userAvatar(a){return`https://images.hive.blog/u/${a}/avatar`}}const xe=new Kp,Sc=({vestingShares:e})=>{const[a,s]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const r=await xe.convertVestingSharesToHive(e);s(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);s((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},em=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:s,onClickFollow:i})=>{const[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState({}),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=T.useRef(null),g=async()=>{try{h(!0),p(null);const j=await xe.getFollowers(e);if(n(j),j.length>0){const x=j.map(E=>E.follower),m=await xe.getAccounts(x);c(m);const k={},_={};for(const E of j)try{const D=await xe.getVoteValue(E.follower);_[E.follower]=D}catch(D){console.warn(`Failed to get voting data for ${E.follower}:`,D),k[E.follower]={upvotepower:"0",downvote:"0"},_[E.follower]="0.00"}f(_)}}catch(j){p(j instanceof Error?j.message:"Failed to load followers data")}finally{h(!1)}};T.useEffect(()=>{g()},[e]),T.useEffect(()=>{const j=x=>{b.current&&!b.current.contains(x.target)&&w(null)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const v=j=>{const x=u.find(m=>m.name===j);if(!x)return null;try{return JSON.parse(x.posting_json_metadata)?.profile||{}}catch{return{}}},N=j=>{const x=new Date,m=new Date(j),k=x.getTime()-m.getTime(),_=Math.floor(k/(1e3*60*60*24));if(Math.floor(_/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),L=Math.floor(_/7),H=Math.floor(_/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:_>0?`${_} day${_>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((j,x)=>{const m=u.find(_=>_.name===j.follower),k=v(j.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.follower),alt:j.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(j.follower),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(j.follower),children:["@",j.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:N(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(Sc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[j.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[j.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:y===j.follower?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.follower?null:j.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),y===j.follower&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.follower),w(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:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.follower),w(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:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${j.follower}-${x}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((j,x)=>{const m=u.find(_=>_.name===j.follower),k=v(j.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.follower),alt:j.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(j.follower),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.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:()=>a&&a(j.follower),children:["@",j.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?N(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(Sc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:y===j.follower?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.follower?null:j.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),y===j.follower&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.follower),w(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:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.follower),w(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:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${j.follower}-${x}`)})})]})},Cc=({vestingShares:e})=>{const[a,s]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const r=await xe.convertVestingSharesToHive(e);s(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);s((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},tm=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:s,onClickUnfollow:i})=>{const[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState({}),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=T.useRef(null),g=async()=>{try{h(!0),p(null);const j=await xe.getFollowing(e);if(n(j),j.length>0){const x=j.map(_=>_.following),m=await xe.getAccounts(x);c(m);const k={};for(const _ of j)try{const E=await xe.getVoteValue(_.following);k[_.following]=E}catch(E){console.warn(`Failed to get voting data for ${_.following}:`,E),k[_.following]="0.00"}f(k)}}catch(j){p(j instanceof Error?j.message:"Failed to load following data")}finally{h(!1)}};T.useEffect(()=>{g()},[e]),T.useEffect(()=>{const j=x=>{b.current&&!b.current.contains(x.target)&&w(null)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const v=j=>{const x=u.find(m=>m.name===j);if(!x)return null;try{return JSON.parse(x.posting_json_metadata)?.profile||{}}catch{return{}}},N=j=>{const x=new Date,m=new Date(j),k=x.getTime()-m.getTime(),_=Math.floor(k/(1e3*60*60*24));if(Math.floor(_/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),L=Math.floor(_/7),H=Math.floor(_/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:_>0?`${_} day${_>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((j,x)=>{const m=u.find(_=>_.name===j.following),k=v(j.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.following),alt:j.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(j.following),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(j.following),children:["@",j.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:N(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(Cc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[j.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[j.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:y===j.following?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.following?null:j.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),y===j.following&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.following),w(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:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.following),w(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:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${j.following}-${x}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((j,x)=>{const m=u.find(_=>_.name===j.following),k=v(j.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.following),alt:j.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(j.following),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.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:()=>a&&a(j.following),children:["@",j.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?N(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(Cc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:y===j.following?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.following?null:j.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),y===j.following&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.following),w(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:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.following),w(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:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${j.following}-${x}`)})})]})},Dc=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class rm{async getAccountHistory(a,s=-1,i=1e3,r,n){try{const u=[a,s,i];return r!==void 0&&n!==void 0&&u.push(r,n),(await Dc.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,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(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(a,s,i=1e3){try{const r=s-1;return(await Dc.call("condenser_api","get_account_history",[a,r,i])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<s)}catch(r){return console.error("Error fetching next page of account history:",r),[]}}convertToActivityListItems(a,s){return a.filter(i=>{const r=i.op.type;return r!=="effective_comment_vote"&&r!=="witness_set_properties"&&r!=="producer_reward"&&r!=="comment_reward"&&r!=="comment_payout_update"&&r!=="claim_reward_balance"&&r!=="transfer"&&r!=="claim_account"&&r!=="transfer_to_vesting"&&r!=="transfer_to_vesting_completed"}).map(i=>{const r=this.parseOperation(i,s);return{id:`${i.index}-${i.trx_id}`,type:r.type,direction:r.direction,timestamp:i.timestamp,block:i.block,description:r.description,details:i.op.value,index:i.index,...r.extraFields}}).filter(i=>i!==null)}parseOperation(a,s){const{op:i}=a,r=i.type,n=i.value;switch(r){case"vote":return this.parseVoteOperation(n,s);case"comment":return this.parseCommentOperation(n,s);case"custom_json":return this.parseCustomJsonOperation(n,s);case"comment_options":return this.parseCommentOptionsOperation(n,s);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,s);case"curation_reward":return this.parseCurationRewardOperation(n,s);case"author_reward":return this.parseAuthorRewardOperation(n,s);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,s);default:return{type:"other",direction:"out",description:`${r} operation`,extraFields:{}}}}parseVoteOperation(a,s){const{voter:i,author:r,permlink:n,weight:u}=a,c=r===s,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${i} voted ${r}/${n} with ${f}%`:o=`Voted ${r}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:i,author:r,permlink:n,weight:parseInt(f)}}}parseCommentOperation(a,s){const{author:i,parent_author:r,parent_permlink:n,permlink:u}=a,d=r===s?"in":"out",o=`Commented on ${n} by ${r||i}.`;return{type:"comment",direction:d,description:o,extraFields:{author:i,permlink:u,parent_author:r,parent_permlink:n}}}parseCustomJsonOperation(a,s){const{id:i,json:r,required_auths:n,required_posting_auths:u}=a;let c={};try{c=JSON.parse(r)}catch{}let d="Custom Json";if(i==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(a,s){const{author:i,permlink:r,max_accepted_payout:n}=a;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:i,permlink:r,payout:n}}}parseEffectiveCommentVoteOperation(a,s){const{voter:i,author:r,permlink:n,pending_payout:u}=a,c=r===s,d=c?"in":"out",f=c?`${i} voted on ${r}/${n} (effective vote)`:`Effective vote on ${r}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:i,author:r,permlink:n,payout:u}}}parseCurationRewardOperation(a,s){const{author:i,curator:r,permlink:n,reward:u}=a,d=r===s?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${r}/${n} by ${i}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:i,curator:r,permlink:n,reward:h}}}parseAuthorRewardOperation(a,s){const{author:i,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}=a,f=i===s?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],y=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${r}`;return{type:"author_reward",direction:f,description:y,extraFields:{author:i,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(a,s){const{author:i,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=a,o=r===s?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],y=c.split(" ")[0],w=`Benefactor reward on ${n} by ${i}: ${p} HBD, ${y} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:i,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(a,s){return s==="all"?a:a.filter(i=>i.direction===s)}filterByGeneralType(a,s){if(s==="all")return a;switch(s){case"votes":return a.filter(i=>i.type==="vote"||i.type==="effective_comment_vote");case"comments":return a.filter(i=>i.type==="comment");case"replies":return a.filter(i=>i.type==="comment"&&i.direction==="in");case"others":return a.filter(i=>i.type==="custom_json"||i.type==="comment_options"||i.type==="other");default:return a}}filterByRewardType(a,s){if(s==="all")return a;switch(s){case"author":return a.filter(i=>i.type==="effective_comment_vote"&&i.direction==="in");case"curation":return a.filter(i=>i.type==="effective_comment_vote"&&i.direction==="out");case"benefactor":return a.filter(i=>i.type==="comment_options"&&i.details?.beneficiaries);default:return a}}searchActivities(a,s){if(!s.trim())return a;const i=s.toLowerCase();return a.filter(r=>r.description.toLowerCase().includes(i)||r.author?.toLowerCase().includes(i)||r.permlink?.toLowerCase().includes(i)||r.voter?.toLowerCase().includes(i))}getRelativeTime(a){try{const s=new Date(a),r=new Date().getTime()-s.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:s.toLocaleDateString()}catch(s){return console.error("Error calculating relative time:",s),a}}}const ua=new rm,am=({username:e,directionFilter:a="all",generalFilter:s="all",rewardFilter:i="all",searchTerm:r="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=T.useState(r),[h,l]=T.useState(a),[p,y]=T.useState(s),[w,b]=T.useState(i),[g,v]=T.useState([]),[N,j]=T.useState([]),[x,m]=T.useState(!1),[k,_]=T.useState(null),[E,D]=T.useState(new Set),[C,P]=T.useState(null),[L,H]=T.useState(!0),[F,q]=T.useState(!1),[M,G]=T.useState(-1),X=T.useRef(null),ee=async(V=!1)=>{if(e){V?q(!0):(m(!0),H(!0),G(-1)),_(null);try{let J;V?J=await ua.getNextAccountHistoryPage(e,M,n):J=await ua.getAccountHistory(e,-1,n);const ue=ua.convertToActivityListItems(J,e);if(ue.sort((Q,te)=>new Date(te.timestamp).getTime()-new Date(Q.timestamp).getTime()),v(V?Q=>[...Q,...ue]:ue),J.length>0){const Q=Math.min(...J.map(te=>te.index));G(Q)}ue.length===0&&H(!1)}catch(J){_("Failed to load activity history"),console.error("Error loading activities:",J),H(!1)}finally{m(!1),q(!1)}}};T.useEffect(()=>{ee()},[e,n]);const R=T.useCallback(()=>{L&&!x&&!F&&ee(!0)},[L,x,F]);T.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),j(V)},[g,h,p,w,f]),T.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&P(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const ie=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},I=(V,J)=>V.split(/(\s+)/).map((Q,te)=>{if(Q.includes("/")){const[me,Se]=Q.split("/");if(me&&Se)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",me,Se),c?.(me,Se)},children:Q},te)}return t.jsx("span",{children:Q},te)});return x?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.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"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.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((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.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:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):k?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:k}),t.jsxs("button",{onClick:()=>ee(),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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.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"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.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:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>y(V.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:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.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:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ee(),disabled:x||F,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:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:N.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:N.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.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."})}):t.jsxs(t.Fragment,{children:[N.map((V,J)=>t.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:ue=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):null,t.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 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:ie(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ua.getRelativeTime(V.timestamp+"Z")}),t.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:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:ue=>{ue.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ua.getRelativeTime(V.timestamp+"Z")})]})})]}),t.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:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ua.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),L&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:R,disabled:x||F,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:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!L&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Xs=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class sm{async getWitnessesByVote(a="",s=60){try{return await Xs.call("condenser_api","get_witnesses_by_vote",[a,s])}catch(i){throw console.error("Error fetching witnesses by vote:",i),i}}async getAccount(a){try{const s=await Xs.call("condenser_api","get_accounts",[[a]]);return s&&s.length>0?s[0]:null}catch(s){return console.error("Error fetching account:",s),null}}async getAccounts(a){try{return await Xs.call("condenser_api","get_accounts",[a])}catch(s){return console.error("Error fetching accounts:",s),[]}}async getWitnessVotes(a,s="",i=250){try{return await Xs.call("database_api","list_witness_votes",{start:[a,s],limit:i,order:"by_witness_account"})}catch(r){throw console.error("Error fetching witness votes:",r),r}}async getAllWitnessVotes(a){const s=[];let i="";try{for(;;){const n=await this.getWitnessVotes(a,i,250);if(s.push(...n.votes),n.votes.length<250)break;i=n.votes[n.votes.length-1].account}return s}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(a,s){try{const i=await this.getAccount(a);return!i||!i.witness_votes?!1:i.witness_votes.includes(s)}catch(i){return console.error("Error checking witness vote:",i),!1}}async getUserWitnessVotes(a){try{return(await this.getAccount(a))?.witness_votes||[]}catch(s){return console.error("Error fetching user witness votes:",s),[]}}formatVotesToMHP(a){return`${(parseFloat(a)/1e6).toFixed(1)}m`}calculateAPR(a){return a/100}getVersionStatus(a,s){const i=this.parseVersion(a),r=this.parseVersion(s);return this.compareVersions(i,r)>=0?"green":this.compareVersions(i,r)<0?"red":"grey"}parseVersion(a){return a.split(".").map(s=>parseInt(s,10))}compareVersions(a,s){const i=Math.max(a.length,s.length);for(let r=0;r<i;r++){const n=a[r]||0,u=s[r]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(a){try{let s;if(a.json_metadata&&a.json_metadata!=="{}"){s=JSON.parse(a.json_metadata);const i=s.profile?.witness_description;if(i)return i}return a.posting_json_metadata&&a.posting_json_metadata!=="{}"?(s=JSON.parse(a.posting_json_metadata),s.profile?.about||""):""}catch(s){return console.error("Error parsing witness description:",s),""}}formatTimeAgo(a){const s=new Date(a),r=Math.floor((new Date().getTime()-s.getTime())/1e3);if(r<60)return`${r} second${r>1?"s":""} ago`;if(r<3600){const n=Math.floor(r/60);return`${n} minute${n>1?"s":""} ago`}else if(r<86400){const n=Math.floor(r/3600);return`${n} hour${n>1?"s":""} ago`}else if(r<604800){const n=Math.floor(r/86400);return`${n} day${n>1?"s":""} ago`}else if(r<2592e3){const n=Math.floor(r/604800);return`${n} week${n>1?"s":""} ago`}else if(r<31536e3){const n=Math.floor(r/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(r/31536e3);return`${n} year${n>1?"s":""} ago`}}}const pt=new sm,He=Pc.create((e,a)=>({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(s="",i=50)=>{const{witnesses:r}=a();if(r.length>=500){e({hasMoreWitnesses:!1});return}e(s!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await pt.getWitnessesByVote(s,i);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===i}});const c=u.filter(d=>!a().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&a().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:s,hasMoreWitnesses:i,loadingMoreWitnesses:r}=a();!i||r||!s||await a().loadWitnesses(s,50)},loadWitnessVotes:async s=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:s});try{const i=await pt.getWitnessVotes(s,"",250);e({witnessVotes:i.votes,nextVotesStart:i.votes.length>0?i.votes[i.votes.length-1].account:"",hasMoreVotes:i.votes.length===250,loadingVotes:!1})}catch(i){console.error("Error loading witness votes:",i),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:s,loadingMoreVotes:i,nextVotesStart:r,selectedWitness:n,witnessVotes:u}=a();if(!s||i||!r||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await pt.getWitnessVotes(n||"",r,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,y)=>y.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,y)=>y.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,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{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async s=>{if(s){e({loadingUserVotes:!0});try{const i=await pt.getUserWitnessVotes(s);e({userWitnessVotes:i})}catch(i){console.error("Error loading user witness votes:",i)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async s=>{try{const i=await pt.getAccounts(s);e(r=>{const n=new Map(r.witnessDetails),u=new Map(r.witnessAccounts);return i.forEach(c=>{const d=pt.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(i){console.error("Error loading witness details:",i)}},setFilters:s=>e({filters:s}),setSelectedWitness:s=>e({selectedWitness:s}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),Tc=({filters:e,onFiltersChange:a,theme:s="dark"})=>{const i=s==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",r=c=>{const d=e.status===c?"all":c;a({...e,status:d})},n=c=>{a({...e,name:c})},u=c=>{a({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${s==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${s==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>a({...e,status:"all"}),className:`text-sm underline ${i}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${s==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${s==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${s==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${s==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Ri=768;function $d(){const[e,a]=sn.useState(void 0);return sn.useEffect(()=>{const s=window.matchMedia(`(max-width: ${Ri-1}px)`),i=()=>{a(window.innerWidth<Ri)};return s.addEventListener("change",i),a(window.innerWidth<Ri),()=>s.removeEventListener("change",i)},[]),!!e}const nm=({isOpen:e,onClose:a,witness:s,votes:i,loadingMore:r,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=T.useCallback(l=>{l[0].isIntersecting&&n&&!r&&f()},[n,r,f]);return T.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",s," (showing ",i.length,")"]}),t.jsx("button",{onClick:a,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:y=>{y.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),i.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),r&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!r&&t.jsx("div",{className:"text-center py-4",children:t.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"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},im=({username:e,filters:a={status:"all",name:"",version:""},onWitnessVoteClick:s,onWitnessStatsClick:i,onWitnessUrlClick:r,theme:n="dark"})=>{const u=$d(),c=He(I=>I.witnesses),d=He(I=>I.userWitnessVotes),f=He(I=>I.loadingWitnesses),o=He(I=>I.error),h=He(I=>I.selectedWitness),l=He(I=>I.witnessVotes),p=He(I=>I.hasMoreVotes),y=He(I=>I.loadingMoreVotes),w=He(I=>I.loadingVotes),b=He(I=>I.filters),g=He(I=>I.hasMoreWitnesses),v=He(I=>I.loadingWitnesses),N=He(I=>I.witnessDetails);He(I=>I.witnessAccounts);const j=He(I=>I.loadWitnesses),x=He(I=>I.loadMoreWitnesses),m=He(I=>I.loadWitnessVotes),k=He(I=>I.loadMoreVotes),_=He(I=>I.loadUserWitnessVotes),E=He(I=>I.setFilters),[D,C]=T.useState(!1),[P,L]=T.useState(!1),H=T.useRef(null),F=T.useRef(null),q=T.useRef(null),M=T.useCallback(I=>{I[0].isIntersecting&&g&&!v&&x()},[g,v,x]);T.useEffect(()=>{const I=new IntersectionObserver(M,{threshold:.1});return q.current&&I.observe(q.current),()=>{q.current&&I.unobserve(q.current)}},[M]),T.useEffect(()=>{j()},[j]),T.useEffect(()=>{e&&_(e)},[e,_]),T.useEffect(()=>{E(a)},[]);const G=T.useMemo(()=>c.filter(I=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(I.owner))return!1}return!(b.name&&!I.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!I.running_version.includes(b.version))}),[c,b,d]),X=async I=>{s?s(I):(await m(I),C(!0))},ee=I=>{i?i(I):window.open(`https://hivehub.dev/witnesses/@${I}`,"_blank")},R=I=>{r?r(I):window.open(I,"_blank")},ie=I=>e?d.includes(I):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(nm,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:y,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:H,loadMoreVotes:k,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>L(!P),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:P?"Hide Filters":"Show Filters"})]})]}),P&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>L(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(Tc,{filters:b,onFiltersChange:E,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[G.map((I,V)=>{const J=pt.getVersionStatus(I.running_version,I.hardfork_version_vote),ue=ie(I.owner),Q=c.findIndex(te=>te.owner===I.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",Q]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:te=>{te.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${ue?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>R(I.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===I.owner?"Loading...":pt.formatVotesToMHP(I.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[pt.calculateAPR(I.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:pt.formatTimeAgo(I.last_hbd_exchange_update+"Z")})]})]}),N.get(I.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:N.get(I.owner)})})]},I.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(Tc,{filters:b,onFiltersChange:E,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:G.map((I,V)=>{const J=pt.getVersionStatus(I.running_version,I.hardfork_version_vote),ue=ie(I.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(Q=>Q.owner===I.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:Q=>{Q.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>R(I.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===I.owner?"...":pt.formatVotesToMHP(I.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[pt.calculateAPR(I.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${ue?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})})})]},I.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]})})]})},om=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class um{async getTransactionHistory(a,s=-1,i=1e3,r=null,n=null){try{const u=[a,s,i];r!==null&&n!==null&&u.push(r,n);const c=await om.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(a,s=[],i=100){try{const r=await this.getTransactionHistory(a,-1,1e3);let n=r;return s.length>0&&(n=r.filter(u=>{const c=u.op?.[0];return s.includes(c)})),n.slice(0,i)}catch(r){return console.error("Error in getFilteredTransactionHistory:",r),[]}}async getRecentTransfers(a,s=50){return this.getFilteredTransactionHistory(a,["transfer"],s)}async getRecentVotes(a,s=50){return this.getFilteredTransactionHistory(a,["vote"],s)}async getRecentComments(a,s=50){return this.getFilteredTransactionHistory(a,["comment"],s)}parseOperation(a){try{if(!a.op||!Array.isArray(a.op)||a.op.length<2)return null;const[s,i]=a.op;switch(s){case"transfer":return{type:"transfer",value:{from:i.from||"",to:i.to||"",amount:i.amount||"",memo:i.memo||""}};case"vote":return{type:"vote",value:{voter:i.voter||"",author:i.author||"",permlink:i.permlink||"",weight:i.weight||0}};case"comment":return{type:"comment",value:{parent_author:i.parent_author||"",parent_permlink:i.parent_permlink||"",author:i.author||"",permlink:i.permlink||"",title:i.title||"",body:i.body||"",json_metadata:i.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:i.required_auths||[],required_posting_auths:i.required_posting_auths||[],id:i.id||"",json:i.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:i.author||"",permlink:i.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:i.author||"",permlink:i.permlink||"",max_accepted_payout:i.max_accepted_payout||"",percent_hbd:i.percent_hbd||0,allow_votes:i.allow_votes||!1,allow_curation_rewards:i.allow_curation_rewards||!1,extensions:i.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:i.voter||"",author:i.author||"",permlink:i.permlink||"",pending_payout:i.pending_payout||"",weight:i.weight||0,rshares:i.rshares||0,total_vote_weight:i.total_vote_weight||0}};default:return console.warn("Unknown operation type:",s,a.op),null}}catch(s){return console.error("Error parsing operation:",s,a.op),null}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(s){return console.error("Error formatting timestamp:",s),a}}getTransactionSummary(a){const s={};let i="",r="";return a.forEach(n=>{const u=n.op?.[0]||"unknown";s[u]=(s[u]||0)+1,(!i||n.timestamp<i)&&(i=n.timestamp),(!r||n.timestamp>r)&&(r=n.timestamp)}),{totalTransactions:a.length,operationCounts:s,dateRange:{earliest:i,latest:r}}}}const la=new um;function lm({account:e,className:a}){const[s,i]=T.useState([]),[r,n]=T.useState([]),[u,c]=T.useState(!1),[d,f]=T.useState(null),[o,h]=T.useState(""),[l,p]=T.useState("all"),[y,w]=T.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const x=await la.getTransactionHistory(e,-1,y);i(x),n(x)}catch(x){f("Failed to load transaction history"),console.error("Error loading transactions:",x)}finally{c(!1)}}};T.useEffect(()=>{g()},[e,y]),T.useEffect(()=>{let x=s;if(l!=="all"&&(x=x.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();x=x.filter(k=>{const _=la.parseOperation(k);if(!_)return!1;switch(_.type){case"transfer":return _.value.from.toLowerCase().includes(m)||_.value.to.toLowerCase().includes(m)||_.value.memo.toLowerCase().includes(m);case"vote":return _.value.voter.toLowerCase().includes(m)||_.value.author.toLowerCase().includes(m)||_.value.permlink.toLowerCase().includes(m);case"comment":return _.value.author.toLowerCase().includes(m)||_.value.title.toLowerCase().includes(m)||_.value.permlink.toLowerCase().includes(m);default:return!1}})}n(x)},[s,l,o]);const v=x=>{if(!x)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(k=>k.value===x.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},N=x=>{const m=la.parseOperation(x);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:xe.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:xe.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:xe.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},j=la.getTransactionSummary(s);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:x=>{x.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((x,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:x=>{x.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:x=>h(x.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:x=>p(x.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(x=>t.jsx("option",{value:x.value,children:x.label},x.value))}),t.jsxs("select",{value:y.toString(),onChange:x=>w(parseInt(x.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:r.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):r.map(x=>{const m=la.parseOperation(x);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),la.formatTimestamp(x.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:N(x)})]},`${x.trx_id}-${x.op_in_trx}`)})}),r.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",r.length," of ",s.length," ","transactions"]})]})]})}const cm=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class dm{async getUserChannel(a,s="posts",i=20,r=null,n=null,u=null){const c={account:a,sort:s,limit:i};r&&(c.start_author=r),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await cm.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(a,s=20){return this.getUserChannel(a,"posts",s)}async getUserComments(a,s=20){return this.getUserChannel(a,"comments",s)}async getUserReplies(a,s=20){return this.getUserChannel(a,"replies",s)}async getAllUserActivity(a,s=10){try{const[i,r,n]=await Promise.all([this.getUserPosts(a,s),this.getUserComments(a,s),this.getUserReplies(a,s)]);return[...i,...r,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(i){return console.error("Error in getAllUserActivity:",i),[]}}convertToDisplayItem(a){return{id:a.id,author:a.author,permlink:a.permlink,title:a.title,body:a.body,created:a.created,category:a.category,net_votes:a.net_votes,children:a.children,total_payout_value:a.total_payout_value,pending_payout_value:a.pending_payout_value,url:a.url,type:a.parent_author===""?"post":"comment"}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(s){return console.error("Error formatting timestamp:",s),a}}getRelativeTime(a){try{const s=new Date(a),r=new Date().getTime()-s.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:s.toLocaleDateString()}catch(s){return console.error("Error calculating relative time:",s),a}}truncateText(a,s=150){return a.length<=s?a:a.substring(0,s)+"..."}getActivitySummary(a){let s=0,i=0,r=0,n=0;return a.forEach(u=>{u.parent_author===""?s++:i++,r+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:a.length,postsCount:s,commentsCount:i,totalVotes:r,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:a.length>0?Math.round(r/a.length):0}}filterByCategory(a,s){return a.filter(i=>i.category===s)}filterByDateRange(a,s,i){return a.filter(r=>{const n=new Date(r.created);return n>=s&&n<=i})}searchActivities(a,s){const i=s.toLowerCase();return a.filter(r=>r.title.toLowerCase().includes(i)||r.body.toLowerCase().includes(i)||r.category.toLowerCase().includes(i))}}const ca=new dm,fm=({username:e,className:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState([]),[o,h]=T.useState([]),[l,p]=T.useState(!1),[y,w]=T.useState(null),[b,g]=T.useState(""),[v,N]=T.useState(20),[j,x]=T.useState("all"),[m,k]=T.useState(new Set),[_,E]=T.useState(!1),D=async()=>{if(!(!e||_)){p(!0),w(null);try{const[M,G,X]=await Promise.all([ca.getUserPosts(e,v),ca.getUserComments(e,v),ca.getUserReplies(e,v)]);i(M),n(G),c(X),E(!0)}catch(M){w("Failed to load activity history"),console.error("Error loading activities:",M)}finally{p(!1)}}};T.useEffect(()=>{D()},[e]),T.useEffect(()=>{if(!_)return;let M=[];switch(j){case"posts":M=s;break;case"comments":M=r;break;case"replies":M=u;break;default:M=[...s,...r,...u].sort((G,X)=>new Date(X.created).getTime()-new Date(G.created).getTime());break}f(M),h(M)},[j,s,r,u,_]),T.useEffect(()=>{let M=d;b&&(M=ca.searchActivities(d,b)),h(M)},[d,b]);const C=M=>!M||M==="0.000 HIVE"?"0 HIVE":M,P=M=>M.parent_author===""?"Post":M.depth===1?"Comment":"Reply",L=new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:M=>M,usertagUrlFn:M=>`/@${M}`,hashtagUrlFn:M=>`/trending/${M}`,isLinkSafeFn:M=>!0,addExternalCssClassToMatchingLinksFn:M=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),H=M=>{const G=new Set(m);G.has(M)?G.delete(M):G.add(M),k(G)},F=M=>{const G=`${M.author}-${M.permlink}`,X=m.has(G),ee=M.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${M.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:P(M)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",M.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:xe.userAvatar(M.author),alt:`${M.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:R=>{R.target.src=xe.userAvatar(M.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:M.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:L.render(ee&&!X?M.body.substring(0,50)+".....":M.body)}}),ee&&t.jsxs("button",{onClick:()=>H(G),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ca.getRelativeTime(M.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C(M.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${M.author}/${M.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},G)},q=ca.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:M=>{M.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map((M,G)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},G))})]}):t.jsxs("div",{className:`space-y-6 ${a}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:M=>{M.target.src=xe.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[q.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>x("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="all"?"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:"All"}),t.jsx("button",{onClick:()=>x("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="posts"?"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:"Posts"}),t.jsx("button",{onClick:()=>x("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="comments"?"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:"Comments"}),t.jsx("button",{onClick:()=>x("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="replies"?"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:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:M=>g(M.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{E(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),y&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:y})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})},Ze="https://images.ecency.com",Ne={actifit_logo:`${Ze}/DQmemUxomzr8RFEZGoT7a8rSvpx1LnzuAzDNyikKuENkSuc/actifit_logo.png`,checkinwithxyz:`${Ze}/DQmUAbGJ1XN461zbaEus7aam1vuVg1cMAtzpuLGgwdAPUEU/checkinwithxyz.png`,developers:`${Ze}/DQmNeGvBgY5r4pay9fhrD8LforDyasa2kstPwBmaLcQBmSW/developers.png`,distriator_logo:`${Ze}/DQmZw6AXZ7wmEChsWXA3onVZXCsRUYGwbp87qP9onaLAvLW/distriator_logo.png`,ecency_logo:`${Ze}/DQmNsuCkexmEKoWB9ywdR5UkzRQ4Xu6CAgHjRTATCB23znc/ecency_logo.png`,happrover_logo:`${Ze}/DQmcy4sHYiMkUJYLhu4jgrvVbvk9vxeSvXHn21ZpVLXK6Jf/happrover_logo.png`,hive_logo:`${Ze}/DQma5YQXrk1WZ7oxgLqdPjbVdShmVGzeL7yZ6BCQGjMF6G3/hive_logo.png`,hive_fest_fact_logo:`${Ze}/DQmTiwJfQSBsdQMAivWfi97P6UwUqsd4wBgFmP2xhQjtA4r/hive_fest_fact_logo.png`,hiveauth_logo:`${Ze}/DQmP9vkxQuQkaCfin2whQfokMF9YJMN3Aujz9B5sGQVNWoE/hiveauth_logo.png`,hpolls_logo:`${Ze}/DQmejtPJC86dhzUKPZxQxaCBaud2ocy6PWPLqjEHNPoWQnX/hpolls_logo.png`,hreplier:`${Ze}/DQmRMrDJvNBeRzDj1W8e99TqkN87Ch7w9SWun6woVaRTAZ3/hreplier.png`,nodes:`${Ze}/DQmbmVKTexP4r4CfzmQKztzBdA26vZBJuJHLZo5GwT88Gxf/nodes.png`,podcast_logo:`${Ze}/DQmd1xwQJvM5pPvWpXoNT1vWqo4XqFvN7RDUVZb3w6ZxHLo/podcast_logo.jpg`,stats_logo:`${Ze}/DQme3DKpB5uVv5ASf9AkFHLY3JdxD2YQMuPa6k2jptULXRY/stats_logo.png`,template:`${Ze}/DQmStuCUgDJmxtLKLUd3fZKmYyPEbvuopdRhwFx3SHiycCq/template.png`,three_shorts_logo:`${Ze}/DQmbNeu2p1GokLH6T8QwekCJBSwSK4qo29ebeVwqD1YbK25/three_shorts_logo.png`,three_speak_logo:`${Ze}/DQmc84A9bXdQ3oRMz3YgV1VNCAFvPbJVSvsf434FApxg2cf/three_speak_logo.png`,vote_logo:`${Ze}/DQmVa8V2FCjJKMaqgoUaRDHPa4TYdqceCmAbCJU7rGj5yBe/vote_logo.png`},hm=[{key:"vote-witness-sagar",name:"Vote Witness Sagar",url:"https://vote.hive.uno/@sagarkothari88",logo:"",alwaysVisible:!0,isAvatar:!0,avatarUrl:"https://images.hive.blog/u/sagarkothari88/avatar"},{key:"vote-witness-threespeak",name:"Vote Witness 3Speak",url:"https://vote.hive.uno/@threespeak",logo:Ne.three_speak_logo,alwaysVisible:!0},{key:"distriator",name:"Distriator",url:"https://distriator.com/",logo:Ne.distriator_logo,visibilityKey:"isDistriator"},{key:"checkinwithxyz",name:"CheckinWithXYZ",url:"https://checkinwith.xyz/",logo:Ne.checkinwithxyz,visibilityKey:"isCheckinwithxyz"},{key:"hreplier",name:"HReplier",url:"https://hreplier.sagarkothari88.one/",logo:Ne.hreplier,visibilityKey:"isHreplier"},{key:"hpolls",name:"HPolls",url:"https://hpolls.sagarkothari88.one/",logo:Ne.hpolls_logo,visibilityKey:"isHpolls"},{key:"hstats",name:"HStats",url:"https://hstats.sagarkothari88.one/",logo:Ne.stats_logo,visibilityKey:"isHstats"},{key:"hsnaps",name:"HSnaps",url:"https://hsnaps.sagarkothari88.one/",logo:Ne.template,visibilityKey:"isHsnaps"},{key:"3speak",name:"3Speak",url:"https://3speak.tv/",logo:Ne.three_speak_logo,alwaysVisible:!0},{key:"hivefestfacts",name:"HiveFestFacts",url:"https://hivefestfacts.sagarkothari88.one/",logo:Ne.hive_fest_fact_logo,visibilityKey:"isHiveFestFacts"}];function pm(){const[e,a]=T.useState("desktop");return T.useEffect(()=>{const s=()=>{const i=window.innerWidth;i<480?a("mobile"):i<768?a("tablet"):a("desktop")};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e}const mm={mobile:{icon:28,fontSize:8,padding:"4px 6px",gap:2,barPadding:"4px",minWidth:52,maxWidth:68},tablet:{icon:30,fontSize:8,padding:"4px 5px",gap:3,barPadding:"5px 6px",minWidth:56,maxWidth:72},desktop:{icon:32,fontSize:9,padding:"4px 6px",gap:4,barPadding:"6px 8px",minWidth:60,maxWidth:80}},gm=({isDistriator:e=!0,isCheckinwithxyz:a=!0,isHreplier:s=!0,isHpolls:i=!0,isHstats:r=!0,isHsnaps:n=!0,isHiveFestFacts:u=!0,backgroundColor:c="#ffffff",textColor:d="#4b5563",borderTopColor:f="#e2e8f0"})=>{const o=pm(),h=mm[o],l={isDistriator:e,isCheckinwithxyz:a,isHreplier:s,isHpolls:i,isHstats:r,isHsnaps:n,isHiveFestFacts:u},p=hm.filter(y=>y.alwaysVisible||l[y.visibilityKey]!==!1);return p.length===0?null:t.jsxs("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,backgroundColor:c,borderTop:`1px solid ${f}`,boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.08)"},children:[t.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:o==="desktop"?"center":"flex-start",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",padding:h.barPadding,gap:`${h.gap}px`,scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"},className:"hive-toolbar-scroll",children:p.map(y=>t.jsxs("a",{href:y.url,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textDecoration:"none",color:d,padding:h.padding,borderRadius:"8px",transition:"background-color 0.2s, transform 0.2s",cursor:"pointer",flexShrink:0,minWidth:`${h.minWidth}px`,maxWidth:`${h.maxWidth}px`},onMouseEnter:w=>{w.currentTarget.style.backgroundColor="#f3f4f6",w.currentTarget.style.transform="scale(1.05)"},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.transform="scale(1)"},children:[y.isAvatar?t.jsx("img",{src:y.avatarUrl,alt:y.name,style:{width:`${h.icon}px`,height:`${h.icon}px`,borderRadius:"50%",objectFit:"cover"}}):t.jsx("img",{src:y.logo,alt:y.name,style:{width:`${h.icon}px`,height:`${h.icon}px`,borderRadius:"8px",objectFit:"contain"}}),t.jsx("span",{style:{fontSize:`${h.fontSize}px`,fontWeight:500,marginTop:"2px",textAlign:"center",lineHeight:"1.2",whiteSpace:"normal",wordWrap:"break-word",color:d,maxWidth:`${h.maxWidth}px`,display:"block"},children:y.name})]},y.key))}),t.jsx("style",{children:`
|
|
1076
|
+
disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const fo=({comment:e,allComments:a,onReply:s,currentUser:i,token:r,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=T.useState(!1),[p,y]=T.useState(!0),[w,b]=T.useState(!1),g=T.useMemo(()=>{const Q=e.active_votes||[];if(!i)return!1;const te=i.toLowerCase();return Q.some(me=>(me.voter||"").toLowerCase()===te)},[e.active_votes,i]),[v,N]=T.useState(!1),[j,x]=T.useState(""),[m,k]=T.useState(!1),_=Q=>{x(Q),N(!0),setTimeout(()=>N(!1),2500)},E=e.depth||0;let C=a.filter(Q=>Q.parent_author===e.author&&Q.parent_permlink===e.permlink&&(typeof Q.depth!="number"||Q.depth===E+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const Q=new Set(e.replies);C=a.filter(te=>Q.has(`${te.author}/${te.permlink}`))}const P=C.length>0,L=u>=4,H=(Q,te)=>{if(!te)return Q;const me=new RegExp(`(${te})`,"gi");return Q.replace(me,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},q=async Q=>{if(d){try{await Promise.resolve(d(e.author,e.permlink,Q)),l(!0),b(!1),setTimeout(()=>{c?.(),_("Vote submitted successfully!")},3e3)}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";alert(me)}return}if(!r){_("Please login or provide an upvote handler to vote");return}try{const te=Math.round(Q*100);await Pe.handleUpvote({author:e.author,permlink:e.permlink,weight:te,authToken:r}),l(!0),b(!1),k(!0),setTimeout(()=>{c?.(),k(!1),_("Vote submitted successfully ✅")},3e3)}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";alert(me)}},M=()=>{i?s(e.author,e.permlink):_("Please login to upvote")},G=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",R=(Q=>{const te=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return Q.replace(te,"").trim()})(X),ne=n?H(R,n):R,I=/!\[[^\]]*\]\([^)]+\)/.test(R)||/<img\s/i.test(R),V=Array.isArray(G?.image)?G.image:[],J=new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:Q=>Q,usertagUrlFn:Q=>`/@${Q}`,hashtagUrlFn:Q=>`/trending/${Q}`,isLinkSafeFn:Q=>!0,addExternalCssClassToMatchingLinksFn:Q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),ue=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:Q=>{Q.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:dn.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===i&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-left text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400 [&>*]:text-left",children:n?t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:ne}}):t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:J.render(R)}})}),!I&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((Q,te)=>t.jsx("img",{src:Q,alt:`image-${te}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(Q,"_blank")},Q+te))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d){if(!i){_("Please login to upvote");return}if(g||h){_("You have already upvoted this comment");return}F()}else if(o){if(!i){_("Please login to upvote");return}if(g||h){_("You have already upvoted this comment");return}F()}else{if(!i){_("Please login to upvote");return}r?g?_("You have already upvoted this comment"):F():(c?.(),_("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:ue})]}),t.jsxs("button",{onClick:()=>{f?f(e):M()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),P&&t.jsx("button",{onClick:()=>y(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(co,{author:e.author,permlink:e.permlink,onUpvote:q,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:j})})]})]})}),P&&p&&!L&&t.jsx("div",{className:"space-y-0",children:C.map(Q=>t.jsx(fo,{comment:Q,allComments:a,onReply:s,currentUser:i,searchQuery:n,depth:u+1,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o},Q.permlink))}),P&&L&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},un=({onSubmit:e,onCancel:a,currentUser:s,placeholder:i="Write your comment...",parentAuthor:r,parentPermlink:n})=>{const[u,c]=T.useState(""),[d,f]=T.useState(!1),o=T.useRef(null);T.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&a()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center justify-start space-x-3 text-left",children:[t.jsx("div",{className:"flex-shrink-0",children:s?t.jsx("img",{src:`https://images.hive.blog/u/${s}/avatar`,alt:s,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${s}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:s?`@${s}`:"Anonymous"}),r&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",r]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:i,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const y=p.target;y.style.height="auto",y.style.height=y.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:a,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},yp=({parentAuthor:e,parentPermlink:a,onClose:s,onCommentSubmitted:i,currentUser:r})=>{const[n,u]=T.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await i(e,a,d),s()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return T.useEffect(()=>{const d=f=>{f.key==="Escape"&&s()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[s]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:s,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(un,{onSubmit:c,onCancel:s,currentUser:r,parentAuthor:e,parentPermlink:a,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},vp=({isVisible:e,searchQuery:a,onSearchChange:s,onClose:i})=>{const r=T.useRef(null);T.useEffect(()=>{e&&r.current&&r.current.focus()},[e]);const n=()=>{s(""),i()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:r,type:"text",value:a,onChange:u=>s(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),a&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},ho=({author:e,permlink:a,onClose:s,currentUser:i,token:r,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c,onSubmitComment:d})=>{const[f,o]=T.useState([]),[h,l]=T.useState([]),[p,y]=T.useState(!0),[w,b]=T.useState(null),[g,v]=T.useState(null),[N,j]=T.useState(!1),[x,m]=T.useState(""),[k,_]=T.useState(!1),[E,D]=T.useState(!1),C=T.useCallback(async(M=!1)=>{M?D(!0):y(!0),b(null);try{const G=await Pe.getCommentsList(e,a);o(G),l(G)}catch(G){b(G instanceof Error?G.message:"Failed to load comments")}finally{y(!1),D(!1)}},[e,a]);T.useEffect(()=>{C()},[C]),T.useEffect(()=>{if(!x.trim())l(f);else{const M=f.filter(G=>G.body?.toLowerCase().includes(x.toLowerCase())||G.author.toLowerCase().includes(x.toLowerCase()));l(M)}},[x,f]);const P=(M,G)=>{v({author:M,permlink:G})},L=M=>{M.target===M.currentTarget&&s()},H=async(M,G,X)=>{if(d){try{await Promise.resolve(d(M,G,X)),_(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}return}if(!r){alert("Please login to comment");return}try{await Pe.handleComment({author:M,permlink:G,body:X,authToken:r}),_(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}},F=T.useMemo(()=>{if(!i?.trim())return h;const M=i.toLowerCase();return[...h].sort((G,X)=>{const ee=G.author?.toLowerCase()===M,R=X.author?.toLowerCase()===M;return ee&&!R?-1:!ee&&R?1:0})},[h,i]),q=F.filter(M=>M.parent_author===e&&M.parent_permlink===a);return p?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):w?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:w}),t.jsx("button",{onClick:()=>C(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",f.length,")"]}),E&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>C(!0),disabled:E,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${E?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>j(!N),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:s,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(vp,{isVisible:N,searchQuery:x,onSearchChange:m,onClose:()=>j(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[k&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(un,{onSubmit:M=>H(e,a,M),onCancel:()=>_(!1),currentUser:i,placeholder:"Add a comment..."})}),q.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:x?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:x?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!x&&i&&t.jsx("button",{onClick:()=>_(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:q.map(M=>t.jsx(fo,{comment:M,allComments:F,onReply:P,currentUser:i,token:r,searchQuery:x,depth:0,onVotedRefresh:()=>C(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},M.permlink))})]}),!k&&i&&q.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>_(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),g&&t.jsx(yp,{parentAuthor:g.author,parentPermlink:g.permlink,onClose:()=>v(null),onCommentSubmitted:H,currentUser:i})]})};function wp(e){const a=typeof e=="string"?new Date(e):e,s=Math.floor((Date.now()-a.getTime())/1e3),i={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[r,n]of Object.entries(i)){const u=Math.floor(s/n);if(u>1)return`${u} ${r}s ago`;if(u===1)return`${u} ${r} ago`}return"just now"}const po=({author:e,permlink:a,onClose:s,currentUser:i,token:r,onClickUpvoteButton:n})=>{const[u,c]=T.useState([]),[d,f]=T.useState(!0),[o,h]=T.useState(!1),l=!!i&&u.some(k=>k.voter===i),[p,y]=T.useState(!1),[w,b]=T.useState(""),[g,v]=T.useState(!1),N=k=>{b(k),y(!0),setTimeout(()=>y(!1),2500)},j=async()=>{f(!0);const k=await Pe.getActiveVotes(e,a);k.sort((_,E)=>!_.time||!E.time?0:new Date(E.time).getTime()-new Date(_.time).getTime()),c(k),f(!1)};T.useEffect(()=>{j()},[e,a]);const x=k=>{k.target===k.currentTarget&&s()},m=async k=>{if(!r||!i){alert("Please login to upvote");return}try{const _=Math.round(k*100);await Pe.handleUpvote({author:e,permlink:a,weight:_,authToken:r}),h(!1),v(!0),setTimeout(async()=>{await j(),v(!1),N("Vote submitted successfully ✅"),s()},3e3)}catch(_){const E=_ instanceof Error?_.message:"Failed to upvote";alert(E)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:x,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(i,r);return}if(!i||!r){N("Please login to upvote");return}l?N("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(co,{author:e,permlink:a,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(k=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${k.voter}/avatar`,alt:k.voter,className:"w-10 h-10 rounded-full mr-4",onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${k.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:k.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((k.percent||0)/100).toFixed(0),"%",k.time&&` · ${wp(k.time+"Z")}`]})]})]},k.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},Sd=({isOpen:e,onClose:a,title:s,children:i,maxWidth:r="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${r} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:s}),t.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:i})]})]}):null,Np=({author:e,permlink:a,content:s,onClose:i})=>t.jsx(Sd,{isOpen:!0,onClose:i,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[s?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:s})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",a]})]})})]})}),jp=({username:e,permlink:a,onAuthorClick:s,onVideoClick:i,onTagClick:r,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=a,[y,w]=T.useState(null),[b,g]=T.useState(!0),[v,N]=T.useState(null),[j,x]=T.useState(!1),[m,k]=T.useState(null),[_,E]=T.useState(!1),[D,C]=T.useState(!1),[P,L]=T.useState(!1),[H,F]=T.useState(!1),q=T.useRef(null),M=T.useRef(null),G=T.useRef(null);T.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),N(null);const J=await Pe.getVideoDetails(l,p);w(J),x(!1),k(null)}catch(J){N(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";T.useEffect(()=>((async()=>{const J=y?.video_v2;if(!j||!J||!q.current)return;const ue=q.current,Q=X(J);M.current&&(M.current.destroy(),M.current=null),ue.src="",ue.load();try{let te=!1;const me=()=>{te||(te=!0,ue.play().then(()=>k(null)).catch(ye=>k(`Playback failed: ${ye.message}`)))};if(na.isSupported()){const ye=new na({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});M.current=ye,ye.on(na.Events.MANIFEST_PARSED,()=>{}),ye.on(na.Events.ERROR,(be,_e)=>{if(_e.fatal)switch(_e.type){case na.ErrorTypes.NETWORK_ERROR:k("Network error, retrying..."),setTimeout(()=>ye.startLoad(),1e3);break;case na.ErrorTypes.MEDIA_ERROR:k("Media error, retrying..."),setTimeout(()=>ye.recoverMediaError(),1e3);break;default:k(`Fatal error: ${_e.details}`),ye.destroy(),M.current=null;break}}),ye.attachMedia(ue),ye.loadSource(Q)}else if(ue.canPlayType("application/vnd.apple.mpegurl"))ue.src=Q;else{const ye=Q.replace("/manifest.m3u8","/480p/index.m3u8");ue.src=ye}const Se=()=>E(!0),Z=()=>{E(!1),me()},ae=ye=>{const be=ye.target;k(`Video error: ${be.error?.message||"Unknown error"}`),E(!1)},re=()=>E(!1);ue.addEventListener("loadstart",Se),ue.addEventListener("canplay",Z),ue.addEventListener("error",ae),ue.addEventListener("loadeddata",re);const de=async()=>{const ye=!!document.fullscreenElement;try{ye?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",de),G.current=()=>{document.removeEventListener("fullscreenchange",de)},()=>{ue.removeEventListener("loadstart",Se),ue.removeEventListener("canplay",Z),ue.removeEventListener("error",ae),ue.removeEventListener("loadeddata",re),G.current&&G.current()}}catch(te){k(`Setup error: ${te instanceof Error?te.message:"Unknown"}`)}})(),()=>{M.current&&(M.current.destroy(),M.current=null)}),[j,y?.video_v2]);const ee=()=>{if(!y?.video_v2){k("No video source available");return}x(!0),k(null),E(!0)},R=V=>{i&&i(V)},ne=V=>{s&&s(V)},I=V=>{if(!V)return"00:00";const J=Math.floor(V),ue=Math.floor(J/3600),Q=Math.floor(J%3600/60),te=J%60,me=Se=>Se.toString().padStart(2,"0");return J<60?`00:${me(te)}`:ue===0?`${me(Q)}:${me(te)}`:`${me(ue)}:${me(Q)}:${me(te)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!y?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:j?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:q,controls:!0,poster:Gr(y.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),_&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{x(!1),k(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Gr(y.thumbnail)||`https://images.hive.blog/u/${y.owner}/avatar`,alt:y.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${y.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ee,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),y.duration&&t.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:[t.jsx(z.Clock,{className:"w-3 h-3"}),I(y.duration)]}),y.views&&t.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:[t.jsx(z.Eye,{className:"w-3 h-3"}),y.views.toLocaleString()," views"]})]})}),t.jsx(Rc,{title:y.title||"",author:y.owner||"",permlink:y.permlink||"",createdAt:y.created,description:y.description||"",video:{title:y.title||"",author:y.owner||"",permlink:y.permlink||"",created:y.created||new Date,category:y.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:y.duration,thumbnail:y.thumbnail,views:y.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):L(!0)},onTapInfo:()=>{d?d(l,p,y.description||""):F(!0)},onTapAuthor:()=>{s&&s(y.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),y.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:y.tags.split(",").map((V,J)=>t.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:()=>{r&&r(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(fn,{feedType:Xe.RELATED,username:y.owner,onVideoClick:R,onAuthorClick:ne})})]})]})}),D&&l&&p&&t.jsx(ho,{author:l,permlink:p,onClose:()=>C(!1)}),P&&l&&p&&t.jsx(po,{author:l,permlink:p,onClose:()=>L(!1)}),H&&l&&p&&t.jsx(Np,{author:l,permlink:p,content:y.description||"",onClose:()=>F(!1)})]})};var Cd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jc=T.createContext&&T.createContext(Cd),kp=["attr","size","title"];function _p(e,a){if(e==null)return{};var s,i,r=Ep(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)s=n[i],a.indexOf(s)===-1&&{}.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function Ep(e,a){if(e==null)return{};var s={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;s[i]=e[i]}return s}function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ln.apply(null,arguments)}function kc(e,a){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),s.push.apply(s,i)}return s}function cn(e){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?kc(Object(s),!0).forEach(function(i){Ap(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):kc(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Ap(e,a,s){return(a=Sp(a))in e?Object.defineProperty(e,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[a]=s,e}function Sp(e){var a=Cp(e,"string");return typeof a=="symbol"?a:a+""}function Cp(e,a){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,a);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Dd(e){return e&&e.map((a,s)=>T.createElement(a.tag,cn({key:s},a.attr),Dd(a.child)))}function We(e){return a=>T.createElement(Dp,ln({attr:cn({},e.attr)},a),Dd(e.child))}function Dp(e){var a=s=>{var{attr:i,size:r,title:n}=e,u=_p(e,kp),c=r||s.size||"1em",d;return s.className&&(d=s.className),e.className&&(d=(d?d+" ":"")+e.className),T.createElement("svg",ln({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,i,u,{className:d,style:cn(cn({color:e.color||s.color},s.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&T.createElement("title",null,n),e.children)};return jc!==void 0?T.createElement(jc.Consumer,null,s=>a(s)):a(Cd)}function Tp(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"},child:[]}]})(e)}function Op(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(e)}function Pp(e){return We({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:[]}]})(e)}function Lp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(e)}function Mp(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"},child:[]}]})(e)}function $p(e){return We({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:[]}]})(e)}function Rp(e){return We({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:[]}]})(e)}function Ip(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM48 132.22c20.12 5.04 41.12 7.57 62.72 8.93C104.84 170.54 79 192.69 48 192.69v-60.47zm0 285v-47.78c34.37 0 62.18 27.27 63.71 61.4-22.53-1.81-43.59-6.31-63.71-13.62zM320 352c-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 27.78c-17.52-4.39-35.71-6.85-54.32-8.44 5.87-26.08 27.5-45.88 54.32-49.28v57.72zm0-236.11c-30.89-3.91-54.86-29.7-55.81-61.55 19.54 2.17 38.09 6.23 55.81 12.66v48.89z"},child:[]}]})(e)}function Mi(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z"},child:[]}]})(e)}function Fp(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M473.7 73.8l-2.4-2.5c-46-47-118-51.7-169.6-14.8L336 159.9l-96 64 48 128-144-144 96-64-28.6-86.5C159.7 19.6 87 24 40.7 71.4l-2.4 2.4C-10.4 123.6-12.5 202.9 31 256l212.1 218.6c7.1 7.3 18.6 7.3 25.7 0L481 255.9c43.5-53 41.4-132.3-7.3-182.1z"},child:[]}]})(e)}function _c(e){return We({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M275.3 250.5c7 7.4 18.4 7.4 25.5 0l108.9-114.2c31.6-33.2 29.8-88.2-5.6-118.8-30.8-26.7-76.7-21.9-104.9 7.7L288 36.9l-11.1-11.6C248.7-4.4 202.8-9.2 172 17.5c-35.3 30.6-37.2 85.6-5.6 118.8l108.9 114.2zm290 77.6c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"},child:[]}]})(e)}function Bp(e){return We({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function Td(e){return We({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:[]}]})(e)}function qp(e){return We({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M160 224v64h320v-64c0-35.3 28.7-64 64-64h32c0-53-43-96-96-96H160c-53 0-96 43-96 96h32c35.3 0 64 28.7 64 64zm416-32h-32c-17.7 0-32 14.3-32 32v96H128v-96c0-17.7-14.3-32-32-32H64c-35.3 0-64 28.7-64 64 0 23.6 13 44 32 55.1V432c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-16h384v16c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16V311.1c19-11.1 32-31.5 32-55.1 0-35.3-28.7-64-64-64z"},child:[]}]})(e)}function Vp(e){return We({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:[]}]})(e)}function Up(e){return We({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"},child:[]}]})(e)}function zp(e){return We({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z"},child:[]}]})(e)}function Od(e){return We({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:[]}]})(e)}function Hp(e){return We({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}const mo=new Zd.Client(["https://api.hive.blog"]),Wp=async e=>{try{const a=await mo.database.getAccounts([e]);if(!a||a.length===0)throw new Error("Account not found");return a[0]}catch(a){return console.error("Error in getWalletDataDetail:",a),{error:a instanceof Error?a.message:"Unknown error"}}},Gp=async e=>{try{const a=await mo.database.getDynamicGlobalProperties(),s=parseFloat(e.split(" ")[0]),i=parseFloat(String(a.total_vesting_shares).split(" ")[0]),r=parseFloat(String(a.total_vesting_fund_hive).split(" ")[0]);return(s*r/i).toFixed(3)}catch(a){return console.error("Error in convertVestingSharesToHiveData:",a),"0"}},Jp=async e=>{try{const s=(await mo.database.call("get_feed_history",[])).current_median_history,i=parseFloat(s.base.split(" ")[0]),r=typeof e=="string"?parseFloat(e):e;return(i*r).toFixed(2)}catch(a){return console.error("Error in convertHivetoUSDData:",a),"0"}},Pd=Pc.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:a=>e({walletData:a}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async a=>{e({isLoading:!0,error:null});try{const s=await Wp(a),i=w=>"error"in w;if(!s||i(s))throw new Error(i(s)?s.error:"Account not found");const r=typeof s.vesting_shares=="string"?s.vesting_shares:"0.000000 VESTS",n=typeof s.balance=="string"?s.balance:s.balance.toString(),u=typeof s.hbd_balance=="string"?s.hbd_balance:s.hbd_balance.toString(),c=typeof s.savings_balance=="string"?s.savings_balance:s.savings_balance.toString(),d=typeof s.savings_hbd_balance=="string"?s.savings_hbd_balance:s.savings_hbd_balance.toString(),f=await Gp(r),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Jp(l),y={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:y}),y}catch(s){const i=s instanceof Error?s.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",i);const r={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:i};return e({walletData:r,error:i}),r}finally{e({isLoading:!1})}}})),Yp=({username:e,className:a=""})=>{const{walletData:s,fetchWalletData:i,isLoading:r,error:n}=Pd();T.useEffect(()=>{e&&i(e)},[e,i]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.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:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${a}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} 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=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:r?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):s?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(Td,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:s?.balance,icon:t.jsx(Pp,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:s?.hbd_balance,icon:t.jsx(Rp,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:s?.savings_balance,icon:t.jsx($p,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:s?.savings_hbd_balance,icon:t.jsx(Vp,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:s?.hive_power,icon:t.jsx(Od,{}),colorClass:"bg-orange-500/10"})]})})};function Ld({sort:e="trending",tag:a="",observer:s="hive.blog",limit:i=20,showSortDropdown:r=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,y]=T.useState([]),[w,b]=T.useState(!0),[g,v]=T.useState(null),[N,j]=T.useState(e),[x,m]=T.useState(!0),[k,_]=T.useState(!1),E=T.useRef(null);new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:q=>q,usertagUrlFn:q=>`/@${q}`,hashtagUrlFn:q=>`/trending/${q}`,isLinkSafeFn:q=>!0,addExternalCssClassToMatchingLinksFn:q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=T.useCallback(async(q,M=!1)=>{M?_(!0):(b(!0),m(!0)),v(null);try{const G=M&&p.length>0?p[p.length-1]:null,X=await Pe.getRankedPosts(q,a,s,i,G?.author,G?.permlink);M?(y(ee=>{const R=new Set(ee.map(I=>I.post_id)),ne=X.filter(I=>!R.has(I.post_id));return[...ee,...ne]}),m(X.length===i)):(y(X),m(X.length===i))}catch(G){v(G instanceof Error?G.message:"Failed to load posts"),m(!1)}finally{b(!1),_(!1)}},[a,s,i,p]),C=T.useCallback(()=>{!k&&x&&!w&&D(N,!0)},[k,x,w,N,D]);T.useEffect(()=>{D(N)},[N,a,s,i]),T.useEffect(()=>{const q=new IntersectionObserver(M=>{M[0].isIntersecting&&C()},{threshold:1});return E.current&&q.observe(E.current),()=>{E.current&&q.unobserve(E.current)}},[C]);const P=q=>{j(q),y([]),m(!0)},L=q=>q>=1e6?`${(q/1e6).toFixed(1)}M`:q>=1e3?`${(q/1e3).toFixed(1)}K`:q.toString(),H=q=>{const M=q.payout*.5,G=q.payout*.5,ee=(q.beneficiaries.find(R=>R.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${q.payout.toFixed(2)}`,breakdown:`${M.toFixed(2)} HBD, ${G.toFixed(2)} HP`,commentRewarder:`${ee.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(q.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=q=>{const G=(q.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 G.length>200?G.substring(0,200)+"...":G};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(N),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[r&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:N,onChange:q=>P(q.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(q=>{const M=q.json_metadata?.image?.[0],G=H(q);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${q.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),children:q.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",q.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(q.community_title),children:q.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:dn.formatDistanceToNow(new Date(q.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:M?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:M.startsWith("http")?M:`https://images.hive.blog/u/320x0/${M}`,alt:q.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(q),onError:X=>{X.target.src!==`https://images.hive.blog/u/${q.author}/avatar`?X.target.src=`https://images.hive.blog/u/${q.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=q.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ee=>{const R=ee.match(/\(([^)]+)\)/);return R?R[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ee,R)=>t.jsx("img",{src:ee,alt:`body-image-${R}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:ne=>{ne.stopPropagation();const I=ne.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");I&&(I.src=ee)}},R))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(q)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(q),children:q.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(q),children:q.json_metadata?.description||F(q)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(q.payout),children:["$",q.payout.toFixed(2)]}),t.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:[t.jsxs("div",{children:["Pending payout amount: ",G.pending]}),t.jsxs("div",{children:["Breakdown: ",G.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",G.commentRewarder]}),t.jsxs("div",{children:["Payout in ",G.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(q),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(q),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(q),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(q.reblogs)})]})]})]})]})]})]},q.post_id)}),k&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),x&&!k&&t.jsx("div",{ref:E,className:"h-10"})]})]})})}class da{static instance;static getInstance(){return da.instance||(da.instance=new da),da.instance}async getProposals(a){return a==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const i=(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,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[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||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),i.map(h=>{const l=h.id,p=u[l],y=o[l]||[],w=y.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,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:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:y,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:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching active proposals:",a),[]}}async getExpiredProposals(){try{const i=(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,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[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||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),i.map(h=>{const l=h.id,p=u[l],y=o[l]||[],w=y.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,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:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:y,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:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching expired proposals:",a),[]}}}const Ec=da.getInstance(),Zp=["All","Active","Upcoming","Expired","By Peak Projects"],Md=["Votes","Start Date","End Date","Creator"],Ac=e=>e==="By Peak Projects"?["Creator"]:Md,ct=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?e.toString():a.toLocaleString()},$i=e=>{const a=new Date(e.start_date),s=new Date(e.end_date);return`(${Math.ceil((s.getTime()-a.getTime())/(1e3*60*60*24))} days)`},Xp=({onClickSupport:e,onClickVoteValue:a,onClickSelect:s,onClickUser:i,onClickAvatar:r,theme:n="dark"})=>{const[u,c]=T.useState([]),[d,f]=T.useState("All"),[o,h]=T.useState("Votes");T.useEffect(()=>{d==="By Peak Projects"&&!Ac(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!Md.includes(o)&&h("Votes")},[d,o]);const[l,p]=T.useState(!0);T.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([Ec.getProposals("active"),Ec.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const y=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=y.filter(N=>N.status==="active"),g=y.filter(N=>new Date(N.start_date+"Z")>new Date),v=(N,j)=>o==="Votes"?Number(j.all_votes_num)-Number(N.all_votes_num):o==="Start Date"?new Date(j.start_date+"Z").getTime()-new Date(N.start_date+"Z").getTime():o==="End Date"?new Date(N.end_date+"Z").getTime()-new Date(j.end_date+"Z").getTime():o==="Creator"?N.creator.localeCompare(j.creator):0;return[...b.sort(v),...g.sort(v)]})():y.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Zp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:Ac(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.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(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?ct(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?ct(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.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(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?ct(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?ct(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[ct(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.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(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:$i(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.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:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(b),children:["Vote value: ",b.vote_value_total?ct(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?ct(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[ct(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.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:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Qp{HIVE_API_URL="https://api.hive.blog";async getProfile(a){const s={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:a},id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}async getFollowers(a){const s={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[a,null,"blog"],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getFollowing(a){const s={jsonrpc:"2.0",method:"condenser_api.get_following",params:[a,null,"blog"],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getAccounts(a){const s={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[a],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getDynamicGlobalProperties(){const a={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async convertVestingSharesToHive(a){try{const s=await this.getDynamicGlobalProperties(),i=parseFloat(a.split(" ")[0]),r=parseFloat(s.total_vesting_shares.split(" ")[0]),n=parseFloat(s.total_vesting_fund_hive.split(" ")[0]);return(i*n/r).toFixed(3)}catch(s){return console.error("Error converting vesting shares:",s),"0"}}async getFeedHistory(){const a={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getVoteValue(a,s=1e4){try{const i=await this.getAccounts([a]);if(i.length===0)throw new Error("Account not found!");const r=i[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(r.vesting_shares)+parseFloat(r.received_vesting_shares)-parseFloat(r.delegated_vesting_shares)-parseFloat(r.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-r.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(r.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=r.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),y=n.total_vesting_shares||"0 VESTS",w=parseFloat(y.toString().split(" ")[0]),b=s/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),N=g*f/100,j=parseFloat(n.recent_claims||"0"),x=n.reward_balance||"0 HIVE",m=parseFloat(x.toString().split(" ")[0]),k=n.current_supply||"0 HIVE",_=parseFloat(k.toString().split(" ")[0]),E=n.current_sbd_supply||"0 HBD",D=parseFloat(E.toString().split(" ")[0]),C=m/j*(p/w)*(N/f)*_,P=u?.current_median_history;if(!P||!P.base)return"0.00";const L=parseFloat(P.base.toString().split(" ")[0]);return(C*L).toFixed(2)}catch(i){return console.error("Error calculating vote value:",i),"0.00"}}userAvatar(a){return`https://images.hive.blog/u/${a}/avatar`}}const xe=new Qp,Sc=({vestingShares:e})=>{const[a,s]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const r=await xe.convertVestingSharesToHive(e);s(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);s((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Kp=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:s,onClickFollow:i})=>{const[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState({}),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=T.useRef(null),g=async()=>{try{h(!0),p(null);const j=await xe.getFollowers(e);if(n(j),j.length>0){const x=j.map(E=>E.follower),m=await xe.getAccounts(x);c(m);const k={},_={};for(const E of j)try{const D=await xe.getVoteValue(E.follower);_[E.follower]=D}catch(D){console.warn(`Failed to get voting data for ${E.follower}:`,D),k[E.follower]={upvotepower:"0",downvote:"0"},_[E.follower]="0.00"}f(_)}}catch(j){p(j instanceof Error?j.message:"Failed to load followers data")}finally{h(!1)}};T.useEffect(()=>{g()},[e]),T.useEffect(()=>{const j=x=>{b.current&&!b.current.contains(x.target)&&w(null)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const v=j=>{const x=u.find(m=>m.name===j);if(!x)return null;try{return JSON.parse(x.posting_json_metadata)?.profile||{}}catch{return{}}},N=j=>{const x=new Date,m=new Date(j),k=x.getTime()-m.getTime(),_=Math.floor(k/(1e3*60*60*24));if(Math.floor(_/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),L=Math.floor(_/7),H=Math.floor(_/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:_>0?`${_} day${_>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((j,x)=>{const m=u.find(_=>_.name===j.follower),k=v(j.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.follower),alt:j.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(j.follower),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(j.follower),children:["@",j.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:N(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(Sc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[j.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[j.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:y===j.follower?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.follower?null:j.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),y===j.follower&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.follower),w(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:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.follower),w(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:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${j.follower}-${x}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((j,x)=>{const m=u.find(_=>_.name===j.follower),k=v(j.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.follower),alt:j.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(j.follower),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.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:()=>a&&a(j.follower),children:["@",j.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?N(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(Sc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:y===j.follower?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.follower?null:j.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),y===j.follower&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.follower),w(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:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.follower),w(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:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${j.follower}-${x}`)})})]})},Cc=({vestingShares:e})=>{const[a,s]=T.useState("...");return T.useEffect(()=>{(async()=>{try{const r=await xe.convertVestingSharesToHive(e);s(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);s((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},em=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:s,onClickUnfollow:i})=>{const[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState({}),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=T.useRef(null),g=async()=>{try{h(!0),p(null);const j=await xe.getFollowing(e);if(n(j),j.length>0){const x=j.map(_=>_.following),m=await xe.getAccounts(x);c(m);const k={};for(const _ of j)try{const E=await xe.getVoteValue(_.following);k[_.following]=E}catch(E){console.warn(`Failed to get voting data for ${_.following}:`,E),k[_.following]="0.00"}f(k)}}catch(j){p(j instanceof Error?j.message:"Failed to load following data")}finally{h(!1)}};T.useEffect(()=>{g()},[e]),T.useEffect(()=>{const j=x=>{b.current&&!b.current.contains(x.target)&&w(null)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const v=j=>{const x=u.find(m=>m.name===j);if(!x)return null;try{return JSON.parse(x.posting_json_metadata)?.profile||{}}catch{return{}}},N=j=>{const x=new Date,m=new Date(j),k=x.getTime()-m.getTime(),_=Math.floor(k/(1e3*60*60*24));if(Math.floor(_/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),L=Math.floor(_/7),H=Math.floor(_/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:_>0?`${_} day${_>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((j,x)=>{const m=u.find(_=>_.name===j.following),k=v(j.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.following),alt:j.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(j.following),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(j.following),children:["@",j.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:N(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(Cc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[j.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[j.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:y===j.following?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.following?null:j.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),y===j.following&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.following),w(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:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.following),w(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:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${j.following}-${x}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((j,x)=>{const m=u.find(_=>_.name===j.following),k=v(j.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||xe.userAvatar(j.following),alt:j.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(j.following),onError:_=>{_.target.src=`https://ui-avatars.com/api/?name=${j.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.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:()=>a&&a(j.following),children:["@",j.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.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:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?N(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(Cc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:y===j.following?b:null,children:[t.jsx("button",{onClick:()=>w(y===j.following?null:j.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),y===j.following&&t.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:[t.jsxs("button",{onClick:()=>{s&&s(j.following),w(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:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{i&&i(j.following),w(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:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${j.following}-${x}`)})})]})},Dc=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class tm{async getAccountHistory(a,s=-1,i=1e3,r,n){try{const u=[a,s,i];return r!==void 0&&n!==void 0&&u.push(r,n),(await Dc.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,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(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(a,s,i=1e3){try{const r=s-1;return(await Dc.call("condenser_api","get_account_history",[a,r,i])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<s)}catch(r){return console.error("Error fetching next page of account history:",r),[]}}convertToActivityListItems(a,s){return a.filter(i=>{const r=i.op.type;return r!=="effective_comment_vote"&&r!=="witness_set_properties"&&r!=="producer_reward"&&r!=="comment_reward"&&r!=="comment_payout_update"&&r!=="claim_reward_balance"&&r!=="transfer"&&r!=="claim_account"&&r!=="transfer_to_vesting"&&r!=="transfer_to_vesting_completed"}).map(i=>{const r=this.parseOperation(i,s);return{id:`${i.index}-${i.trx_id}`,type:r.type,direction:r.direction,timestamp:i.timestamp,block:i.block,description:r.description,details:i.op.value,index:i.index,...r.extraFields}}).filter(i=>i!==null)}parseOperation(a,s){const{op:i}=a,r=i.type,n=i.value;switch(r){case"vote":return this.parseVoteOperation(n,s);case"comment":return this.parseCommentOperation(n,s);case"custom_json":return this.parseCustomJsonOperation(n,s);case"comment_options":return this.parseCommentOptionsOperation(n,s);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,s);case"curation_reward":return this.parseCurationRewardOperation(n,s);case"author_reward":return this.parseAuthorRewardOperation(n,s);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,s);default:return{type:"other",direction:"out",description:`${r} operation`,extraFields:{}}}}parseVoteOperation(a,s){const{voter:i,author:r,permlink:n,weight:u}=a,c=r===s,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${i} voted ${r}/${n} with ${f}%`:o=`Voted ${r}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:i,author:r,permlink:n,weight:parseInt(f)}}}parseCommentOperation(a,s){const{author:i,parent_author:r,parent_permlink:n,permlink:u}=a,d=r===s?"in":"out",o=`Commented on ${n} by ${r||i}.`;return{type:"comment",direction:d,description:o,extraFields:{author:i,permlink:u,parent_author:r,parent_permlink:n}}}parseCustomJsonOperation(a,s){const{id:i,json:r,required_auths:n,required_posting_auths:u}=a;let c={};try{c=JSON.parse(r)}catch{}let d="Custom Json";if(i==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(a,s){const{author:i,permlink:r,max_accepted_payout:n}=a;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:i,permlink:r,payout:n}}}parseEffectiveCommentVoteOperation(a,s){const{voter:i,author:r,permlink:n,pending_payout:u}=a,c=r===s,d=c?"in":"out",f=c?`${i} voted on ${r}/${n} (effective vote)`:`Effective vote on ${r}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:i,author:r,permlink:n,payout:u}}}parseCurationRewardOperation(a,s){const{author:i,curator:r,permlink:n,reward:u}=a,d=r===s?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${r}/${n} by ${i}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:i,curator:r,permlink:n,reward:h}}}parseAuthorRewardOperation(a,s){const{author:i,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}=a,f=i===s?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],y=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${r}`;return{type:"author_reward",direction:f,description:y,extraFields:{author:i,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(a,s){const{author:i,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=a,o=r===s?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],y=c.split(" ")[0],w=`Benefactor reward on ${n} by ${i}: ${p} HBD, ${y} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:i,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(a,s){return s==="all"?a:a.filter(i=>i.direction===s)}filterByGeneralType(a,s){if(s==="all")return a;switch(s){case"votes":return a.filter(i=>i.type==="vote"||i.type==="effective_comment_vote");case"comments":return a.filter(i=>i.type==="comment");case"replies":return a.filter(i=>i.type==="comment"&&i.direction==="in");case"others":return a.filter(i=>i.type==="custom_json"||i.type==="comment_options"||i.type==="other");default:return a}}filterByRewardType(a,s){if(s==="all")return a;switch(s){case"author":return a.filter(i=>i.type==="effective_comment_vote"&&i.direction==="in");case"curation":return a.filter(i=>i.type==="effective_comment_vote"&&i.direction==="out");case"benefactor":return a.filter(i=>i.type==="comment_options"&&i.details?.beneficiaries);default:return a}}searchActivities(a,s){if(!s.trim())return a;const i=s.toLowerCase();return a.filter(r=>r.description.toLowerCase().includes(i)||r.author?.toLowerCase().includes(i)||r.permlink?.toLowerCase().includes(i)||r.voter?.toLowerCase().includes(i))}getRelativeTime(a){try{const s=new Date(a),r=new Date().getTime()-s.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:s.toLocaleDateString()}catch(s){return console.error("Error calculating relative time:",s),a}}}const ua=new tm,rm=({username:e,directionFilter:a="all",generalFilter:s="all",rewardFilter:i="all",searchTerm:r="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=T.useState(r),[h,l]=T.useState(a),[p,y]=T.useState(s),[w,b]=T.useState(i),[g,v]=T.useState([]),[N,j]=T.useState([]),[x,m]=T.useState(!1),[k,_]=T.useState(null),[E,D]=T.useState(new Set),[C,P]=T.useState(null),[L,H]=T.useState(!0),[F,q]=T.useState(!1),[M,G]=T.useState(-1),X=T.useRef(null),ee=async(V=!1)=>{if(e){V?q(!0):(m(!0),H(!0),G(-1)),_(null);try{let J;V?J=await ua.getNextAccountHistoryPage(e,M,n):J=await ua.getAccountHistory(e,-1,n);const ue=ua.convertToActivityListItems(J,e);if(ue.sort((Q,te)=>new Date(te.timestamp).getTime()-new Date(Q.timestamp).getTime()),v(V?Q=>[...Q,...ue]:ue),J.length>0){const Q=Math.min(...J.map(te=>te.index));G(Q)}ue.length===0&&H(!1)}catch(J){_("Failed to load activity history"),console.error("Error loading activities:",J),H(!1)}finally{m(!1),q(!1)}}};T.useEffect(()=>{ee()},[e,n]);const R=T.useCallback(()=>{L&&!x&&!F&&ee(!0)},[L,x,F]);T.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),j(V)},[g,h,p,w,f]),T.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&P(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const ne=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},I=(V,J)=>V.split(/(\s+)/).map((Q,te)=>{if(Q.includes("/")){const[me,Se]=Q.split("/");if(me&&Se)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",me,Se),c?.(me,Se)},children:Q},te)}return t.jsx("span",{children:Q},te)});return x?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.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"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.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((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.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:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):k?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:k}),t.jsxs("button",{onClick:()=>ee(),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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.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"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.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:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>y(V.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:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.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:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ee(),disabled:x||F,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:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:N.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:N.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.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."})}):t.jsxs(t.Fragment,{children:[N.map((V,J)=>t.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:ue=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:ue=>{const Q=ue.target;Q.style.display="none";const te=Q.nextElementSibling;te&&(te.style.display="flex")}}):null,t.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 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:ne(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ua.getRelativeTime(V.timestamp+"Z")}),t.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:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:ue=>{ue.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ua.getRelativeTime(V.timestamp+"Z")})]})})]}),t.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:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ua.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),L&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:R,disabled:x||F,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:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!L&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Xs=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class am{async getWitnessesByVote(a="",s=60){try{return await Xs.call("condenser_api","get_witnesses_by_vote",[a,s])}catch(i){throw console.error("Error fetching witnesses by vote:",i),i}}async getAccount(a){try{const s=await Xs.call("condenser_api","get_accounts",[[a]]);return s&&s.length>0?s[0]:null}catch(s){return console.error("Error fetching account:",s),null}}async getAccounts(a){try{return await Xs.call("condenser_api","get_accounts",[a])}catch(s){return console.error("Error fetching accounts:",s),[]}}async getWitnessVotes(a,s="",i=250){try{return await Xs.call("database_api","list_witness_votes",{start:[a,s],limit:i,order:"by_witness_account"})}catch(r){throw console.error("Error fetching witness votes:",r),r}}async getAllWitnessVotes(a){const s=[];let i="";try{for(;;){const n=await this.getWitnessVotes(a,i,250);if(s.push(...n.votes),n.votes.length<250)break;i=n.votes[n.votes.length-1].account}return s}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(a,s){try{const i=await this.getAccount(a);return!i||!i.witness_votes?!1:i.witness_votes.includes(s)}catch(i){return console.error("Error checking witness vote:",i),!1}}async getUserWitnessVotes(a){try{return(await this.getAccount(a))?.witness_votes||[]}catch(s){return console.error("Error fetching user witness votes:",s),[]}}formatVotesToMHP(a){return`${(parseFloat(a)/1e6).toFixed(1)}m`}calculateAPR(a){return a/100}getVersionStatus(a,s){const i=this.parseVersion(a),r=this.parseVersion(s);return this.compareVersions(i,r)>=0?"green":this.compareVersions(i,r)<0?"red":"grey"}parseVersion(a){return a.split(".").map(s=>parseInt(s,10))}compareVersions(a,s){const i=Math.max(a.length,s.length);for(let r=0;r<i;r++){const n=a[r]||0,u=s[r]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(a){try{let s;if(a.json_metadata&&a.json_metadata!=="{}"){s=JSON.parse(a.json_metadata);const i=s.profile?.witness_description;if(i)return i}return a.posting_json_metadata&&a.posting_json_metadata!=="{}"?(s=JSON.parse(a.posting_json_metadata),s.profile?.about||""):""}catch(s){return console.error("Error parsing witness description:",s),""}}formatTimeAgo(a){const s=new Date(a),r=Math.floor((new Date().getTime()-s.getTime())/1e3);if(r<60)return`${r} second${r>1?"s":""} ago`;if(r<3600){const n=Math.floor(r/60);return`${n} minute${n>1?"s":""} ago`}else if(r<86400){const n=Math.floor(r/3600);return`${n} hour${n>1?"s":""} ago`}else if(r<604800){const n=Math.floor(r/86400);return`${n} day${n>1?"s":""} ago`}else if(r<2592e3){const n=Math.floor(r/604800);return`${n} week${n>1?"s":""} ago`}else if(r<31536e3){const n=Math.floor(r/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(r/31536e3);return`${n} year${n>1?"s":""} ago`}}}const pt=new am,He=Pc.create((e,a)=>({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(s="",i=50)=>{const{witnesses:r}=a();if(r.length>=500){e({hasMoreWitnesses:!1});return}e(s!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await pt.getWitnessesByVote(s,i);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===i}});const c=u.filter(d=>!a().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&a().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:s,hasMoreWitnesses:i,loadingMoreWitnesses:r}=a();!i||r||!s||await a().loadWitnesses(s,50)},loadWitnessVotes:async s=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:s});try{const i=await pt.getWitnessVotes(s,"",250);e({witnessVotes:i.votes,nextVotesStart:i.votes.length>0?i.votes[i.votes.length-1].account:"",hasMoreVotes:i.votes.length===250,loadingVotes:!1})}catch(i){console.error("Error loading witness votes:",i),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:s,loadingMoreVotes:i,nextVotesStart:r,selectedWitness:n,witnessVotes:u}=a();if(!s||i||!r||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await pt.getWitnessVotes(n||"",r,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,y)=>y.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,y)=>y.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,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{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async s=>{if(s){e({loadingUserVotes:!0});try{const i=await pt.getUserWitnessVotes(s);e({userWitnessVotes:i})}catch(i){console.error("Error loading user witness votes:",i)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async s=>{try{const i=await pt.getAccounts(s);e(r=>{const n=new Map(r.witnessDetails),u=new Map(r.witnessAccounts);return i.forEach(c=>{const d=pt.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(i){console.error("Error loading witness details:",i)}},setFilters:s=>e({filters:s}),setSelectedWitness:s=>e({selectedWitness:s}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),Tc=({filters:e,onFiltersChange:a,theme:s="dark"})=>{const i=s==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",r=c=>{const d=e.status===c?"all":c;a({...e,status:d})},n=c=>{a({...e,name:c})},u=c=>{a({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${s==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${s==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${s==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>a({...e,status:"all"}),className:`text-sm underline ${i}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${s==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${s==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${s==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${s==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${s==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Ri=768;function $d(){const[e,a]=sn.useState(void 0);return sn.useEffect(()=>{const s=window.matchMedia(`(max-width: ${Ri-1}px)`),i=()=>{a(window.innerWidth<Ri)};return s.addEventListener("change",i),a(window.innerWidth<Ri),()=>s.removeEventListener("change",i)},[]),!!e}const sm=({isOpen:e,onClose:a,witness:s,votes:i,loadingMore:r,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=T.useCallback(l=>{l[0].isIntersecting&&n&&!r&&f()},[n,r,f]);return T.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",s," (showing ",i.length,")"]}),t.jsx("button",{onClick:a,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:y=>{y.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),i.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),r&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!r&&t.jsx("div",{className:"text-center py-4",children:t.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"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},nm=({username:e,filters:a={status:"all",name:"",version:""},onWitnessVoteClick:s,onWitnessStatsClick:i,onWitnessUrlClick:r,theme:n="dark"})=>{const u=$d(),c=He(I=>I.witnesses),d=He(I=>I.userWitnessVotes),f=He(I=>I.loadingWitnesses),o=He(I=>I.error),h=He(I=>I.selectedWitness),l=He(I=>I.witnessVotes),p=He(I=>I.hasMoreVotes),y=He(I=>I.loadingMoreVotes),w=He(I=>I.loadingVotes),b=He(I=>I.filters),g=He(I=>I.hasMoreWitnesses),v=He(I=>I.loadingWitnesses),N=He(I=>I.witnessDetails);He(I=>I.witnessAccounts);const j=He(I=>I.loadWitnesses),x=He(I=>I.loadMoreWitnesses),m=He(I=>I.loadWitnessVotes),k=He(I=>I.loadMoreVotes),_=He(I=>I.loadUserWitnessVotes),E=He(I=>I.setFilters),[D,C]=T.useState(!1),[P,L]=T.useState(!1),H=T.useRef(null),F=T.useRef(null),q=T.useRef(null),M=T.useCallback(I=>{I[0].isIntersecting&&g&&!v&&x()},[g,v,x]);T.useEffect(()=>{const I=new IntersectionObserver(M,{threshold:.1});return q.current&&I.observe(q.current),()=>{q.current&&I.unobserve(q.current)}},[M]),T.useEffect(()=>{j()},[j]),T.useEffect(()=>{e&&_(e)},[e,_]),T.useEffect(()=>{E(a)},[]);const G=T.useMemo(()=>c.filter(I=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(I.owner))return!1}return!(b.name&&!I.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!I.running_version.includes(b.version))}),[c,b,d]),X=async I=>{s?s(I):(await m(I),C(!0))},ee=I=>{i?i(I):window.open(`https://hivehub.dev/witnesses/@${I}`,"_blank")},R=I=>{r?r(I):window.open(I,"_blank")},ne=I=>e?d.includes(I):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(sm,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:y,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:H,loadMoreVotes:k,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>L(!P),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:P?"Hide Filters":"Show Filters"})]})]}),P&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>L(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(Tc,{filters:b,onFiltersChange:E,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[G.map((I,V)=>{const J=pt.getVersionStatus(I.running_version,I.hardfork_version_vote),ue=ne(I.owner),Q=c.findIndex(te=>te.owner===I.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",Q]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:te=>{te.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${ue?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>R(I.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===I.owner?"Loading...":pt.formatVotesToMHP(I.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[pt.calculateAPR(I.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:pt.formatTimeAgo(I.last_hbd_exchange_update+"Z")})]})]}),N.get(I.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:N.get(I.owner)})})]},I.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(Tc,{filters:b,onFiltersChange:E,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:G.map((I,V)=>{const J=pt.getVersionStatus(I.running_version,I.hardfork_version_vote),ue=ne(I.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(Q=>Q.owner===I.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:Q=>{Q.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>R(I.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===I.owner?"...":pt.formatVotesToMHP(I.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[pt.calculateAPR(I.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${ue?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})})})]},I.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]})})]})},im=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class om{async getTransactionHistory(a,s=-1,i=1e3,r=null,n=null){try{const u=[a,s,i];r!==null&&n!==null&&u.push(r,n);const c=await im.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(a,s=[],i=100){try{const r=await this.getTransactionHistory(a,-1,1e3);let n=r;return s.length>0&&(n=r.filter(u=>{const c=u.op?.[0];return s.includes(c)})),n.slice(0,i)}catch(r){return console.error("Error in getFilteredTransactionHistory:",r),[]}}async getRecentTransfers(a,s=50){return this.getFilteredTransactionHistory(a,["transfer"],s)}async getRecentVotes(a,s=50){return this.getFilteredTransactionHistory(a,["vote"],s)}async getRecentComments(a,s=50){return this.getFilteredTransactionHistory(a,["comment"],s)}parseOperation(a){try{if(!a.op||!Array.isArray(a.op)||a.op.length<2)return null;const[s,i]=a.op;switch(s){case"transfer":return{type:"transfer",value:{from:i.from||"",to:i.to||"",amount:i.amount||"",memo:i.memo||""}};case"vote":return{type:"vote",value:{voter:i.voter||"",author:i.author||"",permlink:i.permlink||"",weight:i.weight||0}};case"comment":return{type:"comment",value:{parent_author:i.parent_author||"",parent_permlink:i.parent_permlink||"",author:i.author||"",permlink:i.permlink||"",title:i.title||"",body:i.body||"",json_metadata:i.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:i.required_auths||[],required_posting_auths:i.required_posting_auths||[],id:i.id||"",json:i.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:i.author||"",permlink:i.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:i.author||"",permlink:i.permlink||"",max_accepted_payout:i.max_accepted_payout||"",percent_hbd:i.percent_hbd||0,allow_votes:i.allow_votes||!1,allow_curation_rewards:i.allow_curation_rewards||!1,extensions:i.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:i.voter||"",author:i.author||"",permlink:i.permlink||"",pending_payout:i.pending_payout||"",weight:i.weight||0,rshares:i.rshares||0,total_vote_weight:i.total_vote_weight||0}};default:return console.warn("Unknown operation type:",s,a.op),null}}catch(s){return console.error("Error parsing operation:",s,a.op),null}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(s){return console.error("Error formatting timestamp:",s),a}}getTransactionSummary(a){const s={};let i="",r="";return a.forEach(n=>{const u=n.op?.[0]||"unknown";s[u]=(s[u]||0)+1,(!i||n.timestamp<i)&&(i=n.timestamp),(!r||n.timestamp>r)&&(r=n.timestamp)}),{totalTransactions:a.length,operationCounts:s,dateRange:{earliest:i,latest:r}}}}const la=new om;function um({account:e,className:a}){const[s,i]=T.useState([]),[r,n]=T.useState([]),[u,c]=T.useState(!1),[d,f]=T.useState(null),[o,h]=T.useState(""),[l,p]=T.useState("all"),[y,w]=T.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const x=await la.getTransactionHistory(e,-1,y);i(x),n(x)}catch(x){f("Failed to load transaction history"),console.error("Error loading transactions:",x)}finally{c(!1)}}};T.useEffect(()=>{g()},[e,y]),T.useEffect(()=>{let x=s;if(l!=="all"&&(x=x.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();x=x.filter(k=>{const _=la.parseOperation(k);if(!_)return!1;switch(_.type){case"transfer":return _.value.from.toLowerCase().includes(m)||_.value.to.toLowerCase().includes(m)||_.value.memo.toLowerCase().includes(m);case"vote":return _.value.voter.toLowerCase().includes(m)||_.value.author.toLowerCase().includes(m)||_.value.permlink.toLowerCase().includes(m);case"comment":return _.value.author.toLowerCase().includes(m)||_.value.title.toLowerCase().includes(m)||_.value.permlink.toLowerCase().includes(m);default:return!1}})}n(x)},[s,l,o]);const v=x=>{if(!x)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(k=>k.value===x.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},N=x=>{const m=la.parseOperation(x);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:xe.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:xe.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:xe.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:xe.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=xe.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},j=la.getTransactionSummary(s);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:x=>{x.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((x,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:x=>{x.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:j.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:x=>h(x.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:x=>p(x.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(x=>t.jsx("option",{value:x.value,children:x.label},x.value))}),t.jsxs("select",{value:y.toString(),onChange:x=>w(parseInt(x.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:r.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):r.map(x=>{const m=la.parseOperation(x);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),la.formatTimestamp(x.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:N(x)})]},`${x.trx_id}-${x.op_in_trx}`)})}),r.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",r.length," of ",s.length," ","transactions"]})]})]})}const lm=new ha.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class cm{async getUserChannel(a,s="posts",i=20,r=null,n=null,u=null){const c={account:a,sort:s,limit:i};r&&(c.start_author=r),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await lm.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(a,s=20){return this.getUserChannel(a,"posts",s)}async getUserComments(a,s=20){return this.getUserChannel(a,"comments",s)}async getUserReplies(a,s=20){return this.getUserChannel(a,"replies",s)}async getAllUserActivity(a,s=10){try{const[i,r,n]=await Promise.all([this.getUserPosts(a,s),this.getUserComments(a,s),this.getUserReplies(a,s)]);return[...i,...r,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(i){return console.error("Error in getAllUserActivity:",i),[]}}convertToDisplayItem(a){return{id:a.id,author:a.author,permlink:a.permlink,title:a.title,body:a.body,created:a.created,category:a.category,net_votes:a.net_votes,children:a.children,total_payout_value:a.total_payout_value,pending_payout_value:a.pending_payout_value,url:a.url,type:a.parent_author===""?"post":"comment"}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(s){return console.error("Error formatting timestamp:",s),a}}getRelativeTime(a){try{const s=new Date(a),r=new Date().getTime()-s.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:s.toLocaleDateString()}catch(s){return console.error("Error calculating relative time:",s),a}}truncateText(a,s=150){return a.length<=s?a:a.substring(0,s)+"..."}getActivitySummary(a){let s=0,i=0,r=0,n=0;return a.forEach(u=>{u.parent_author===""?s++:i++,r+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:a.length,postsCount:s,commentsCount:i,totalVotes:r,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:a.length>0?Math.round(r/a.length):0}}filterByCategory(a,s){return a.filter(i=>i.category===s)}filterByDateRange(a,s,i){return a.filter(r=>{const n=new Date(r.created);return n>=s&&n<=i})}searchActivities(a,s){const i=s.toLowerCase();return a.filter(r=>r.title.toLowerCase().includes(i)||r.body.toLowerCase().includes(i)||r.category.toLowerCase().includes(i))}}const ca=new cm,dm=({username:e,className:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState([]),[u,c]=T.useState([]),[d,f]=T.useState([]),[o,h]=T.useState([]),[l,p]=T.useState(!1),[y,w]=T.useState(null),[b,g]=T.useState(""),[v,N]=T.useState(20),[j,x]=T.useState("all"),[m,k]=T.useState(new Set),[_,E]=T.useState(!1),D=async()=>{if(!(!e||_)){p(!0),w(null);try{const[M,G,X]=await Promise.all([ca.getUserPosts(e,v),ca.getUserComments(e,v),ca.getUserReplies(e,v)]);i(M),n(G),c(X),E(!0)}catch(M){w("Failed to load activity history"),console.error("Error loading activities:",M)}finally{p(!1)}}};T.useEffect(()=>{D()},[e]),T.useEffect(()=>{if(!_)return;let M=[];switch(j){case"posts":M=s;break;case"comments":M=r;break;case"replies":M=u;break;default:M=[...s,...r,...u].sort((G,X)=>new Date(X.created).getTime()-new Date(G.created).getTime());break}f(M),h(M)},[j,s,r,u,_]),T.useEffect(()=>{let M=d;b&&(M=ca.searchActivities(d,b)),h(M)},[d,b]);const C=M=>!M||M==="0.000 HIVE"?"0 HIVE":M,P=M=>M.parent_author===""?"Post":M.depth===1?"Comment":"Reply",L=new lo.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:M=>M,usertagUrlFn:M=>`/@${M}`,hashtagUrlFn:M=>`/trending/${M}`,isLinkSafeFn:M=>!0,addExternalCssClassToMatchingLinksFn:M=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),H=M=>{const G=new Set(m);G.has(M)?G.delete(M):G.add(M),k(G)},F=M=>{const G=`${M.author}-${M.permlink}`,X=m.has(G),ee=M.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${M.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:P(M)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",M.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:xe.userAvatar(M.author),alt:`${M.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:R=>{R.target.src=xe.userAvatar(M.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:M.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:L.render(ee&&!X?M.body.substring(0,50)+".....":M.body)}}),ee&&t.jsxs("button",{onClick:()=>H(G),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ca.getRelativeTime(M.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C(M.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${M.author}/${M.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},G)},q=ca.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:M=>{M.target.src=xe.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map((M,G)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},G))})]}):t.jsxs("div",{className:`space-y-6 ${a}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:xe.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:M=>{M.target.src=xe.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[q.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>x("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="all"?"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:"All"}),t.jsx("button",{onClick:()=>x("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="posts"?"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:"Posts"}),t.jsx("button",{onClick:()=>x("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="comments"?"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:"Comments"}),t.jsx("button",{onClick:()=>x("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${j==="replies"?"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:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:M=>g(M.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{E(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),y&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:y})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})},Ze="https://images.ecency.com",Ne={actifit_logo:`${Ze}/DQmemUxomzr8RFEZGoT7a8rSvpx1LnzuAzDNyikKuENkSuc/actifit_logo.png`,checkinwithxyz:`${Ze}/DQmUAbGJ1XN461zbaEus7aam1vuVg1cMAtzpuLGgwdAPUEU/checkinwithxyz.png`,developers:`${Ze}/DQmNeGvBgY5r4pay9fhrD8LforDyasa2kstPwBmaLcQBmSW/developers.png`,distriator_logo:`${Ze}/DQmZw6AXZ7wmEChsWXA3onVZXCsRUYGwbp87qP9onaLAvLW/distriator_logo.png`,ecency_logo:`${Ze}/DQmNsuCkexmEKoWB9ywdR5UkzRQ4Xu6CAgHjRTATCB23znc/ecency_logo.png`,happrover_logo:`${Ze}/DQmcy4sHYiMkUJYLhu4jgrvVbvk9vxeSvXHn21ZpVLXK6Jf/happrover_logo.png`,hive_logo:`${Ze}/DQma5YQXrk1WZ7oxgLqdPjbVdShmVGzeL7yZ6BCQGjMF6G3/hive_logo.png`,hive_fest_fact_logo:`${Ze}/DQmTiwJfQSBsdQMAivWfi97P6UwUqsd4wBgFmP2xhQjtA4r/hive_fest_fact_logo.png`,hiveauth_logo:`${Ze}/DQmP9vkxQuQkaCfin2whQfokMF9YJMN3Aujz9B5sGQVNWoE/hiveauth_logo.png`,hpolls_logo:`${Ze}/DQmejtPJC86dhzUKPZxQxaCBaud2ocy6PWPLqjEHNPoWQnX/hpolls_logo.png`,hreplier:`${Ze}/DQmRMrDJvNBeRzDj1W8e99TqkN87Ch7w9SWun6woVaRTAZ3/hreplier.png`,nodes:`${Ze}/DQmbmVKTexP4r4CfzmQKztzBdA26vZBJuJHLZo5GwT88Gxf/nodes.png`,podcast_logo:`${Ze}/DQmd1xwQJvM5pPvWpXoNT1vWqo4XqFvN7RDUVZb3w6ZxHLo/podcast_logo.jpg`,stats_logo:`${Ze}/DQme3DKpB5uVv5ASf9AkFHLY3JdxD2YQMuPa6k2jptULXRY/stats_logo.png`,template:`${Ze}/DQmStuCUgDJmxtLKLUd3fZKmYyPEbvuopdRhwFx3SHiycCq/template.png`,three_shorts_logo:`${Ze}/DQmbNeu2p1GokLH6T8QwekCJBSwSK4qo29ebeVwqD1YbK25/three_shorts_logo.png`,three_speak_logo:`${Ze}/DQmc84A9bXdQ3oRMz3YgV1VNCAFvPbJVSvsf434FApxg2cf/three_speak_logo.png`,vote_logo:`${Ze}/DQmVa8V2FCjJKMaqgoUaRDHPa4TYdqceCmAbCJU7rGj5yBe/vote_logo.png`},fm=[{key:"vote-witness-sagar",name:"Vote Witness Sagar",url:"https://vote.hive.uno/@sagarkothari88",logo:"",alwaysVisible:!0,isAvatar:!0,avatarUrl:"https://images.hive.blog/u/sagarkothari88/avatar"},{key:"vote-witness-threespeak",name:"Vote Witness 3Speak",url:"https://vote.hive.uno/@threespeak",logo:Ne.three_speak_logo,alwaysVisible:!0},{key:"distriator",name:"Distriator",url:"https://distriator.com/",logo:Ne.distriator_logo,visibilityKey:"isDistriator"},{key:"checkinwithxyz",name:"CheckinWithXYZ",url:"https://checkinwith.xyz/",logo:Ne.checkinwithxyz,visibilityKey:"isCheckinwithxyz"},{key:"hreplier",name:"HReplier",url:"https://hreplier.sagarkothari88.one/",logo:Ne.hreplier,visibilityKey:"isHreplier"},{key:"hpolls",name:"HPolls",url:"https://hpolls.sagarkothari88.one/",logo:Ne.hpolls_logo,visibilityKey:"isHpolls"},{key:"hstats",name:"HStats",url:"https://hstats.sagarkothari88.one/",logo:Ne.stats_logo,visibilityKey:"isHstats"},{key:"hsnaps",name:"HSnaps",url:"https://hsnaps.sagarkothari88.one/",logo:Ne.template,visibilityKey:"isHsnaps"},{key:"3speak",name:"3Speak",url:"https://3speak.tv/",logo:Ne.three_speak_logo,alwaysVisible:!0},{key:"hivefestfacts",name:"HiveFestFacts",url:"https://hivefestfacts.sagarkothari88.one/",logo:Ne.hive_fest_fact_logo,visibilityKey:"isHiveFestFacts"}];function hm(){const[e,a]=T.useState("desktop");return T.useEffect(()=>{const s=()=>{const i=window.innerWidth;i<480?a("mobile"):i<768?a("tablet"):a("desktop")};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e}const pm={mobile:{icon:28,fontSize:8,padding:"4px 6px",gap:2,barPadding:"4px",minWidth:52,maxWidth:68},tablet:{icon:30,fontSize:8,padding:"4px 5px",gap:3,barPadding:"5px 6px",minWidth:56,maxWidth:72},desktop:{icon:32,fontSize:9,padding:"4px 6px",gap:4,barPadding:"6px 8px",minWidth:60,maxWidth:80}},mm=({isDistriator:e=!0,isCheckinwithxyz:a=!0,isHreplier:s=!0,isHpolls:i=!0,isHstats:r=!0,isHsnaps:n=!0,isHiveFestFacts:u=!0,backgroundColor:c="#ffffff",textColor:d="#4b5563",borderTopColor:f="#e2e8f0"})=>{const o=hm(),h=pm[o],l={isDistriator:e,isCheckinwithxyz:a,isHreplier:s,isHpolls:i,isHstats:r,isHsnaps:n,isHiveFestFacts:u},p=fm.filter(y=>y.alwaysVisible||l[y.visibilityKey]!==!1);return p.length===0?null:t.jsxs("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,backgroundColor:c,borderTop:`1px solid ${f}`,boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.08)"},children:[t.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:o==="desktop"?"center":"flex-start",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",padding:h.barPadding,gap:`${h.gap}px`,scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"},className:"hive-toolbar-scroll",children:p.map(y=>t.jsxs("a",{href:y.url,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textDecoration:"none",color:d,padding:h.padding,borderRadius:"8px",transition:"background-color 0.2s, transform 0.2s",cursor:"pointer",flexShrink:0,minWidth:`${h.minWidth}px`,maxWidth:`${h.maxWidth}px`},onMouseEnter:w=>{w.currentTarget.style.backgroundColor="#f3f4f6",w.currentTarget.style.transform="scale(1.05)"},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.transform="scale(1)"},children:[y.isAvatar?t.jsx("img",{src:y.avatarUrl,alt:y.name,style:{width:`${h.icon}px`,height:`${h.icon}px`,borderRadius:"50%",objectFit:"cover"}}):t.jsx("img",{src:y.logo,alt:y.name,style:{width:`${h.icon}px`,height:`${h.icon}px`,borderRadius:"8px",objectFit:"contain"}}),t.jsx("span",{style:{fontSize:`${h.fontSize}px`,fontWeight:500,marginTop:"2px",textAlign:"center",lineHeight:"1.2",whiteSpace:"normal",wordWrap:"break-word",color:d,maxWidth:`${h.maxWidth}px`,display:"block"},children:y.name})]},y.key))}),t.jsx("style",{children:`
|
|
1077
1077
|
.hive-toolbar-scroll::-webkit-scrollbar {
|
|
1078
1078
|
display: none;
|
|
1079
1079
|
}
|
|
1080
|
-
`})]})};function bm({author:e,permlink:a,currentUser:s,hiveValue:i,onUpvote:r,onSubmitComment:n,onComments:u,onReblog:c,onShare:d,onTip:f,onReport:o,onClickCommentUpvote:h}){const l=s==null||s===""?null:s,p=l!=null,[y,w]=T.useState([]),[b,g]=T.useState(0),[v,N]=T.useState(!1),[j,x]=T.useState(!1),[m,k]=T.useState(!1),[_,E]=T.useState({message:"",visible:!1}),[D,C]=T.useState(!1),P=T.useCallback(Q=>{E({message:Q,visible:!0}),setTimeout(()=>E(te=>({...te,visible:!1})),2500)},[]),L=T.useCallback(async()=>{const Q=await Pe.getActiveVotes(e,a);w(Q)},[e,a]);T.useEffect(()=>{L()},[L]),T.useEffect(()=>{Pe.getCommentsList(e,a).then(Q=>{g(Q.length)})},[e,a]);const H=p&&!!l&&y.some(Q=>Q.voter.toLowerCase()===l.toLowerCase()),F=(Q,te)=>{if(!p){P(`Please Login to ${Q}`);return}te()},q=()=>{F("Upvote",()=>{if(H){P("You have already upvoted this post");return}N(!0)})},M=async Q=>{if(r){C(!0);try{await Promise.resolve(r(Q)),N(!1),await L(),P("Vote submitted successfully")}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";P(me)}finally{C(!1)}}},G=()=>{x(!0)},X=()=>{x(!1),p&&!H?N(!0):P(p?"You have already upvoted this post":"Please Login to Upvote")},ee=()=>{F("Comment",()=>{u?.(),k(!0)})},R=()=>{F("Reblog",()=>c?.())},ie=()=>{F("Report",()=>o?.())},I=()=>{F("Tip",()=>f?.())},V=()=>{if(d){d();return}typeof navigator<"u"&&navigator.share?navigator.share({title:`${e}'s post`,url:`https://peakd.com/@${e}/${a}`,text:`Check out this post by @${e}`}).then(()=>P("Shared")).catch(()=>{}):(navigator.clipboard?.writeText(`https://peakd.com/@${e}/${a}`),P("Link copied to clipboard"))},J=async(Q,te,me)=>{if(!p){P("Please Login to comment");return}if(n)try{await Promise.resolve(n(Q,te,me)),P("Comment posted")}catch(Se){const Z=Se instanceof Error?Se.message:"Failed to post comment";throw P(Z),Se}},ue="absolute left-1/2 -translate-x-1/2 bottom-full mb-1 px-2 py-1 text-xs font-medium text-white bg-gray-800 dark:bg-gray-700 rounded shadow-lg whitespace-nowrap opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity duration-150 z-[60]";return t.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm w-full",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 sm:gap-4 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Upvote"}),t.jsx("button",{type:"button",onClick:q,disabled:D,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 disabled:opacity-50","aria-label":"Upvote",children:D?t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 animate-spin text-blue-600"}):t.jsx(z.ThumbsUp,{className:`w-4 h-4 sm:w-5 sm:h-5 ${H?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-400"}`})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"View upvotes"}),t.jsx("button",{type:"button",onClick:G,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"View upvotes",children:t.jsx("span",{children:y.length})})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Comments"}),t.jsxs("button",{type:"button",onClick:ee,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"Comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4 sm:w-5 sm:h-5"}),t.jsx("span",{children:b})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Reblog"}),t.jsx("button",{type:"button",onClick:R,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Reblog",children:t.jsx(z.Repeat2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Share"}),t.jsx("button",{type:"button",onClick:V,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Share",children:t.jsx(z.Share2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Report"}),t.jsx("button",{type:"button",onClick:ie,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors p-1 rounded","aria-label":"Report",children:t.jsx(z.Flag,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Tip"}),t.jsx("button",{type:"button",onClick:I,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-green-600 dark:hover:text-green-400 transition-colors p-1 rounded","aria-label":"Tip",children:t.jsx(z.Gift,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]})]}),t.jsx("div",{className:"flex-1 flex justify-end min-w-0 shrink-0",children:i!=null&&i!==""&&t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:i})}),v&&t.jsx(co,{author:e,permlink:a,onUpvote:M,onCancel:()=>N(!1)}),j&&t.jsx(po,{author:e,permlink:a,onClose:()=>x(!1),currentUser:l??void 0,token:void 0,onClickUpvoteButton:X}),m&&t.jsx(ho,{author:e,permlink:a,onClose:()=>{k(!1),Pe.getCommentsList(e,a).then(Q=>g(Q.length))},currentUser:l??void 0,token:void 0,onSubmitComment:n?J:void 0,onClickCommentUpvote:h}),_.visible&&t.jsx("div",{className:"fixed bottom-4 right-4 z-[100] max-w-[280px] rounded-lg bg-gray-800 dark:bg-gray-900 text-white px-3 py-2 shadow-lg text-sm",children:_.message})]})}const Ii="_communityLocalKey",tn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Ii);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const a=localStorage.getItem(Ii);return a?JSON.parse(a).includes(e):!1},storeLikedCommunityLocally:(e,a=!1)=>{let s=tn.getBookmarkedCommunities();return s.includes(e)?s=s.filter(i=>i!==e):a||s.push(e),localStorage.setItem(Ii,JSON.stringify(s)),s}},go=({id:e,toastType:a,isLiked:s,onAdd:i,onRemove:r,onFavourite:n})=>{const[u,c]=T.useState(s??tn.isUserPresentLocally(e));T.useEffect(()=>{s!==void 0&&c(s)},[s]);const d=()=>{n&&n(),u?(r?r(e,"remove_bookmark"):tn.storeLikedCommunityLocally(e,!0),f(!1)):(i?i(e,"add_bookmark"):tn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${a} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick: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:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class xm{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(a,s=20,i){const r={limit:s};i&&i.trim()!==""&&(r.last=i),a&&a.trim()!==""&&(r.query=a);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(a){const s={jsonrpc:"2.0",method:"bridge.get_community",params:{name:a},id:1};try{const i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch(i){throw console.error("Error fetching community details:",i),i}}async getCommunitySubscribers(a,s=100,i){const r={community:a,limit:s};i&&i.trim()!==""&&(r.last=i);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(a,s=100,i){const r={community:a,limit:s};i&&i.trim()!==""&&(r.last=i);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:r,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(a){const s={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[a]],id:2};try{const i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result||[]}catch(i){throw console.error("Error fetching community accounts:",i),i}}async getRankedPosts(a,s="created",i=20,r,n){const u={tag:a,sort:s,limit:i};r&&n&&(u.start_author=r,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(a){return`https://images.hive.blog/u/${a}/avatar?size=icon`}userOwnerThumb(a){return`https://images.hive.blog/u/${a}/avatar`}async getCommunityActivities(a,s=100,i){const r={account:a,limit:s};i&&(r.last_id=i);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:r,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const dt=new xm,ym=({onSelectCommunity:e,theme:a="dark"})=>{const[s,i]=T.useState([]),[r,n]=T.useState(""),[u,c]=T.useState(!0),[d,f]=T.useState(!1),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=20,g=T.useRef(null),v=T.useCallback(async(x=!1)=>{if(!(!x&&(d||!o)))try{x?(c(!0),w(null),i([]),p(null),h(!0)):f(!0);const m=r.trim(),k=await dt.getListOfCommunities(m.length>=3?m:void 0,b,x?void 0:l||void 0);i(_=>x?k:[..._,...k]),k.length<b||k.length>0&&k[k.length-1].name===l?h(!1):k.length>0&&p(k[k.length-1].name||null)}catch(m){w(m instanceof Error?m.message:"Failed to load communities"),h(!1)}finally{c(!1),f(!1)}},[r,d,o,l]);T.useEffect(()=>{const x=setTimeout(()=>{v(!0)},r.length>=3||r.length===0?0:500);return()=>clearTimeout(x)},[r]),T.useEffect(()=>{g.current?.focus()},[r,u,y]),T.useEffect(()=>{const x=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!d&&!u&&o&&v()};return window.addEventListener("scroll",x),()=>window.removeEventListener("scroll",x)},[v,d,u,o]);const N=()=>{v(!0)},j=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((x,m)=>t.jsx("div",{className:`${a==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-4 animate-pulse`,children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:`w-12 h-12 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded-full`}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:`h-4 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-3/4`}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-1/2`})]}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-16`})]})},m))});return u&&s.length===0?t.jsxs("div",{className:`space-y-6 ${a==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${a==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:r,onChange:x=>n(x.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${a==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1080
|
+
`})]})};function gm({author:e,permlink:a,currentUser:s,hiveValue:i,onUpvote:r,onSubmitComment:n,onComments:u,onReblog:c,onShare:d,onTip:f,onReport:o,onClickCommentUpvote:h}){const l=s==null||s===""?null:s,p=l!=null,[y,w]=T.useState([]),[b,g]=T.useState(0),[v,N]=T.useState(!1),[j,x]=T.useState(!1),[m,k]=T.useState(!1),[_,E]=T.useState({message:"",visible:!1}),[D,C]=T.useState(!1),P=T.useCallback(Q=>{E({message:Q,visible:!0}),setTimeout(()=>E(te=>({...te,visible:!1})),2500)},[]),L=T.useCallback(async()=>{const Q=await Pe.getActiveVotes(e,a);w(Q)},[e,a]);T.useEffect(()=>{L()},[L]),T.useEffect(()=>{Pe.getCommentsList(e,a).then(Q=>{g(Q.length)})},[e,a]);const H=p&&!!l&&y.some(Q=>Q.voter.toLowerCase()===l.toLowerCase()),F=(Q,te)=>{if(!p){P(`Please Login to ${Q}`);return}te()},q=()=>{F("Upvote",()=>{if(H){P("You have already upvoted this post");return}N(!0)})},M=async Q=>{if(r){C(!0);try{await Promise.resolve(r(Q)),N(!1),await L(),P("Vote submitted successfully")}catch(te){const me=te instanceof Error?te.message:"Failed to upvote";P(me)}finally{C(!1)}}},G=()=>{x(!0)},X=()=>{x(!1),p&&!H?N(!0):P(p?"You have already upvoted this post":"Please Login to Upvote")},ee=()=>{F("Comment",()=>{u?.(),k(!0)})},R=()=>{F("Reblog",()=>c?.())},ne=()=>{F("Report",()=>o?.())},I=()=>{F("Tip",()=>f?.())},V=()=>{if(d){d();return}typeof navigator<"u"&&navigator.share?navigator.share({title:`${e}'s post`,url:`https://peakd.com/@${e}/${a}`,text:`Check out this post by @${e}`}).then(()=>P("Shared")).catch(()=>{}):(navigator.clipboard?.writeText(`https://peakd.com/@${e}/${a}`),P("Link copied to clipboard"))},J=async(Q,te,me)=>{if(!p){P("Please Login to comment");return}if(n)try{await Promise.resolve(n(Q,te,me)),P("Comment posted")}catch(Se){const Z=Se instanceof Error?Se.message:"Failed to post comment";throw P(Z),Se}},ue="absolute left-1/2 -translate-x-1/2 bottom-full mb-1 px-2 py-1 text-xs font-medium text-white bg-gray-800 dark:bg-gray-700 rounded shadow-lg whitespace-nowrap opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity duration-150 z-[60]";return t.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm w-full",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 sm:gap-4 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Upvote"}),t.jsx("button",{type:"button",onClick:q,disabled:D,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 disabled:opacity-50","aria-label":"Upvote",children:D?t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 animate-spin text-blue-600"}):t.jsx(z.ThumbsUp,{className:`w-4 h-4 sm:w-5 sm:h-5 ${H?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-400"}`})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"View upvotes"}),t.jsx("button",{type:"button",onClick:G,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"View upvotes",children:t.jsx("span",{children:y.length})})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Comments"}),t.jsxs("button",{type:"button",onClick:ee,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"Comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4 sm:w-5 sm:h-5"}),t.jsx("span",{children:b})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Reblog"}),t.jsx("button",{type:"button",onClick:R,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Reblog",children:t.jsx(z.Repeat2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Share"}),t.jsx("button",{type:"button",onClick:V,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Share",children:t.jsx(z.Share2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Report"}),t.jsx("button",{type:"button",onClick:ne,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors p-1 rounded","aria-label":"Report",children:t.jsx(z.Flag,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:ue,children:"Tip"}),t.jsx("button",{type:"button",onClick:I,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-green-600 dark:hover:text-green-400 transition-colors p-1 rounded","aria-label":"Tip",children:t.jsx(z.Gift,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]})]}),t.jsx("div",{className:"flex-1 flex justify-end min-w-0 shrink-0",children:i!=null&&i!==""&&t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:i})}),v&&t.jsx(co,{author:e,permlink:a,onUpvote:M,onCancel:()=>N(!1)}),j&&t.jsx(po,{author:e,permlink:a,onClose:()=>x(!1),currentUser:l??void 0,token:void 0,onClickUpvoteButton:X}),m&&t.jsx(ho,{author:e,permlink:a,onClose:()=>{k(!1),Pe.getCommentsList(e,a).then(Q=>g(Q.length))},currentUser:l??void 0,token:void 0,onSubmitComment:n?J:void 0,onClickCommentUpvote:h}),_.visible&&t.jsx("div",{className:"fixed bottom-4 right-4 z-[100] max-w-[280px] rounded-lg bg-gray-800 dark:bg-gray-900 text-white px-3 py-2 shadow-lg text-sm",children:_.message})]})}const Ii="_communityLocalKey",tn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Ii);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const a=localStorage.getItem(Ii);return a?JSON.parse(a).includes(e):!1},storeLikedCommunityLocally:(e,a=!1)=>{let s=tn.getBookmarkedCommunities();return s.includes(e)?s=s.filter(i=>i!==e):a||s.push(e),localStorage.setItem(Ii,JSON.stringify(s)),s}},go=({id:e,toastType:a,isLiked:s,onAdd:i,onRemove:r,onFavourite:n})=>{const[u,c]=T.useState(s??tn.isUserPresentLocally(e));T.useEffect(()=>{s!==void 0&&c(s)},[s]);const d=()=>{n&&n(),u?(r?r(e,"remove_bookmark"):tn.storeLikedCommunityLocally(e,!0),f(!1)):(i?i(e,"add_bookmark"):tn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${a} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick: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:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class bm{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(a,s=20,i){const r={limit:s};i&&i.trim()!==""&&(r.last=i),a&&a.trim()!==""&&(r.query=a);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(a){const s={jsonrpc:"2.0",method:"bridge.get_community",params:{name:a},id:1};try{const i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch(i){throw console.error("Error fetching community details:",i),i}}async getCommunitySubscribers(a,s=100,i){const r={community:a,limit:s};i&&i.trim()!==""&&(r.last=i);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(a,s=100,i){const r={community:a,limit:s};i&&i.trim()!==""&&(r.last=i);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:r,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(a){const s={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[a]],id:2};try{const i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result||[]}catch(i){throw console.error("Error fetching community accounts:",i),i}}async getRankedPosts(a,s="created",i=20,r,n){const u={tag:a,sort:s,limit:i};r&&n&&(u.start_author=r,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(a){return`https://images.hive.blog/u/${a}/avatar?size=icon`}userOwnerThumb(a){return`https://images.hive.blog/u/${a}/avatar`}async getCommunityActivities(a,s=100,i){const r={account:a,limit:s};i&&(r.last_id=i);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:r,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const dt=new bm,xm=({onSelectCommunity:e,theme:a="dark"})=>{const[s,i]=T.useState([]),[r,n]=T.useState(""),[u,c]=T.useState(!0),[d,f]=T.useState(!1),[o,h]=T.useState(!0),[l,p]=T.useState(null),[y,w]=T.useState(null),b=20,g=T.useRef(null),v=T.useCallback(async(x=!1)=>{if(!(!x&&(d||!o)))try{x?(c(!0),w(null),i([]),p(null),h(!0)):f(!0);const m=r.trim(),k=await dt.getListOfCommunities(m.length>=3?m:void 0,b,x?void 0:l||void 0);i(_=>x?k:[..._,...k]),k.length<b||k.length>0&&k[k.length-1].name===l?h(!1):k.length>0&&p(k[k.length-1].name||null)}catch(m){w(m instanceof Error?m.message:"Failed to load communities"),h(!1)}finally{c(!1),f(!1)}},[r,d,o,l]);T.useEffect(()=>{const x=setTimeout(()=>{v(!0)},r.length>=3||r.length===0?0:500);return()=>clearTimeout(x)},[r]),T.useEffect(()=>{g.current?.focus()},[r,u,y]),T.useEffect(()=>{const x=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!d&&!u&&o&&v()};return window.addEventListener("scroll",x),()=>window.removeEventListener("scroll",x)},[v,d,u,o]);const N=()=>{v(!0)},j=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((x,m)=>t.jsx("div",{className:`${a==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-4 animate-pulse`,children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:`w-12 h-12 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded-full`}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:`h-4 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-3/4`}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-1/2`})]}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-16`})]})},m))});return u&&s.length===0?t.jsxs("div",{className:`space-y-6 ${a==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${a==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:r,onChange:x=>n(x.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${a==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1081
1081
|
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx(j,{})]}):y&&s.length===0?t.jsxs("div",{className:`space-y-6 ${a==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${a==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:r,onChange:x=>n(x.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${a==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1082
1082
|
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:`text-lg font-semibold ${a==="dark"?"text-white":"text-gray-900"} mb-2`,children:"Failed to load communities"}),t.jsx("p",{className:`${a==="dark"?"text-gray-400":"text-gray-500"} mb-4`,children:y}),t.jsxs("button",{onClick:N,className:`m-2 inline-flex items-center justify-center rounded-md border ${a==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})})]}):t.jsxs("div",{className:`space-y-6 ${a==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"",children:t.jsx("h2",{className:`text-xl font-semibold ${a==="dark"?"text-white":"text-gray-900"}`,children:"Communities"})}),t.jsxs("div",{className:"relative flex justify-between items-center",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${a==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:r,onChange:x=>n(x.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${a==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1083
1083
|
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`}),t.jsx("button",{onClick:N,className:`m-2 inline-flex items-center justify-center rounded-md border ${a==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:t.jsx(z.RefreshCw,{className:"w-4 h-4"})})]}),s.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:`text-lg font-semibold ${a==="dark"?"text-white":"text-gray-900"} mb-2`,children:"No communities found"}),t.jsx("p",{className:`${a==="dark"?"text-gray-400":"text-gray-500"}`,children:r?"Try adjusting your search terms":"Check back later for new communities"})]})}):t.jsxs("div",{className:"space-y-4",children:[s.map(x=>t.jsx("div",{className:`${a==="dark"?"bg-slate-900 border-gray-800 hover:bg-slate-800":"bg-white border-gray-200 hover:bg-gray-100"} border rounded-xl p-4 transition-colors cursor-pointer`,onClick:()=>e(x.name||""),children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("img",{src:dt.communityIcon(x.name||""),alt:x.title,className:"w-12 h-12 rounded-full object-cover",onError:m=>{m.target.src=`https://ui-avatars.com/api/?name=${x.title}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:`font-semibold truncate ${a==="dark"?"text-white":"text-gray-900"}`,children:x.title}),t.jsx("p",{className:`text-sm line-clamp-2 ${a==="dark"?"text-gray-400":"text-gray-500"}`,children:x.about})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{className:`text-sm ${a==="dark"?"text-gray-400":"text-gray-500"}`,children:[(x.subscribers||0).toLocaleString()," members"]})})]})},x.id)),o&&t.jsx("div",{className:"flex justify-center pt-4",children:d?t.jsxs("div",{className:`flex items-center gap-2 ${a==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more communities..."]}):t.jsx("button",{onClick:()=>v(),className:`m-2 inline-flex items-center justify-center rounded-md border ${a==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:"Load More Communities"})})]})]})},Rd=({communityId:e})=>{const[a,s]=T.useState(null),[i,r]=T.useState(!0),[n,u]=T.useState(null),c=async()=>{try{r(!0),u(null);const h=await dt.getCommunityDetails(e);s(h)}catch(h){u(h instanceof Error?h.message:"Failed to load community details")}finally{r(!1)}};T.useEffect(()=>{c()},[e]);const d=h=>{try{return new Date(h).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return h}},f=h=>h.replace(/<[^>]*>/g,"");if(i)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load community details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community details available"})});const o=a.result;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[o.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:f(o.about)})]}),o.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.description)})]}),o.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.num_authors?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.subscribers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created_at?d(o.created_at):"Unknown"})]}),o.lang&&t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.lang.toUpperCase()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.num_pending?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.is_nsfw?"NSFW":"Safe"})]})]})]})})},Id=({communityId:e,onSelectTeamMember:a})=>{const[s,i]=T.useState(null),[r,n]=T.useState(!0),[u,c]=T.useState(null),d=async()=>{try{n(!0),c(null);const o=await dt.getCommunityDetails(e);i(o)}catch(o){c(o instanceof Error?o.message:"Failed to load team details")}finally{n(!1)}};T.useEffect(()=>{d()},[e]);const f=s?.result?.team||[];return r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading team members..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load team details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):f.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No team members found"})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map((o,h)=>{const l=o[0],p=o.length>1?o[1]:"";return t.jsx("div",{onClick:()=>a&&a(l),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1084
1084
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1085
|
-
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:dt.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:y=>{y.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Fd=({communityId:e,onSelectCommunityMember:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState(!0),[u,c]=T.useState(!1),[d,f]=T.useState(!0),[o,h]=T.useState(null),[l,p]=T.useState(null),y=100,w=T.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),i([]),h(null),f(!0)):c(!0);const g=await dt.getCommunitySubscribers(e,y,b?void 0:o||void 0);g.length===0?f(!1):(i(v=>{if(b)return g;const N=new Set(v.map(x=>x.username)),j=g.filter(x=>!N.has(x.username));return[...v,...j]}),g.length>0&&h(g[g.length-1].username),f(g.length===y))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return T.useEffect(()=>{w(!0)},[e]),T.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!r&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,r,d]),r&&s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&s.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map((b,g)=>t.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:()=>a?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:dt.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),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"})})]})},vm=({communityId:e,onVideoClick:a,onAuthorClick:s,onBack:i,onclickAboutTab:r,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=Lc.useNavigate(),[p,y]=T.useState("videos"),[w,b]=T.useState(null),[g,v]=T.useState(!1),[N,j]=T.useState(!0);T.useEffect(()=>{(async()=>{try{j(!0);const D=await dt.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{j(!1)}})()},[e]);const x=()=>{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:E}):navigator.clipboard.writeText(E)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},k=E=>{l(`/user/${E}`)};if(N)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const _=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:i,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:dt.userOwnerThumb(e),alt:_?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:E=>{E.target.src=`https://images.hive.blog/u/${_?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:_?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:_?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(_?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",_?.created_at?new Date(_.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(go,{id:e,toastType:"community",onAdd:(E,D)=>console.log("Added:",E,D),onRemove:(E,D)=>console.log("Removed:",E,D),onFavourite:d}),t.jsx("button",{onClick:f||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:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||x,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:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),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:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.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:[t.jsx("button",{onClick:()=>y("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>r?r():y("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>n?n():y("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>u?u():y("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(fn,{feedType:Xe.COMMUNITY,communityId:e,onVideoClick:a,onAuthorClick:s}),p==="about"&&!r&&t.jsx(Rd,{communityId:e}),p==="team"&&!n&&t.jsx(Id,{communityId:e,onSelectTeamMember:k}),p==="members"&&!u&&t.jsx(Fd,{communityId:e,onSelectCommunityMember:k})]})]})]})},wm=({communityId:e,onAuthorClick:a,onPostClick:s,onCommunityClick:i,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d="dark"})=>{const[f,o]=T.useState("posts"),[h,l]=T.useState(null),[p,y]=T.useState([]),[w,b]=T.useState([]),[g,v]=T.useState(!0),[N,j]=T.useState(!1),[x,m]=T.useState(!1),[k,_]=T.useState(null);T.useEffect(()=>{(async()=>{try{v(!0),_(null);const H=await dt.getCommunityDetails(e);l(H.result)}catch(H){_(H instanceof Error?H.message:"Failed to fetch community details")}finally{v(!1)}})()},[e]),T.useEffect(()=>{f==="subscribers"&&h?E():f==="activities"&&h&&D()},[f,h]);const E=async()=>{try{j(!0);const L=await dt.getCommunitySubscribersList(e,100);y(L)}catch(L){console.error("Failed to fetch subscribers:",L)}finally{j(!1)}},D=async()=>{try{m(!0);const L=await dt.getCommunityActivities(e,100);b(L)}catch(L){console.error("Failed to fetch activities:",L)}finally{m(!1)}},C=L=>{try{const H=new Date(L),q=new Date().getTime()-H.getTime(),M=Math.floor(q/1e3),G=Math.floor(M/60),X=Math.floor(G/60),ee=Math.floor(X/24),R=Math.floor(ee/30),ie=Math.floor(ee/365);return ie>0?`${ie} year${ie>1?"s":""} ago`:R>0?`${R} month${R>1?"s":""} ago`:ee>0?`${ee} day${ee>1?"s":""} ago`:X>0?`${X} hour${X>1?"s":""} ago`:G>0?`${G} minute${G>1?"s":""} ago`:"just now"}catch{return L}},P=L=>L.replace(/<[^>]*>/g,"");return g?t.jsx("div",{className:`flex items-center justify-center min-h-[400px] ${d==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):k||!h?t.jsxs("div",{className:`flex flex-col items-center justify-center min-h-[400px] space-y-4 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:"Failed to load community details"}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-500"}`,children:k})]}):t.jsxs("div",{className:`space-y-6 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:dt.userOwnerThumb(e),alt:h.title,className:"w-16 h-16 rounded-full object-cover",onError:L=>{L.target.src=`https://images.hive.blog/u/${h.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:`text-2xl font-bold mb-2 ${d==="dark"?"text-white":"text-gray-900"}`,children:h.title}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-600"} mb-4`,children:h.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[h.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",C(h.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:`flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full ${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-lg`,children:[t.jsx("button",{onClick:()=>o("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="posts"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-300"}`}`,children:"Posts"}),t.jsx("button",{onClick:()=>o("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="about"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"About"}),t.jsx("button",{onClick:()=>o("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="subscribers"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>o("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="activities"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[f==="posts"&&t.jsx(Ld,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:a,onPostClick:s,onCommunityClick:i,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d}),f==="about"&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:[h.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"About"}),t.jsx("p",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed`,children:P(h.about)})]}),h.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.description)})]}),h.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Community Rules"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Total Authors"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_authors.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Subscribers"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.subscribers.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Created"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:C(h.created_at)})]}),h.lang&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Language"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.lang.toUpperCase()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Pending Posts"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_pending.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Type"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.is_nsfw?"NSFW":"Safe"})]})]})]}),f==="subscribers"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:N?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):p.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Subscribers (",p.length,")"]}),p.map(L=>t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:dt.userOwnerThumb(L.username),alt:L.username,className:"w-10 h-10 rounded-full object-cover",onError:H=>{H.target.src=`https://images.hive.blog/u/${L.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:`font-medium ${d==="dark"?"text-white":"text-gray-900"}`,children:["@",L.username]}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:["Role: ",L.role," • Subscribed"," ",C(L.subscribedAt)]})]})]},L.username))]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No subscribers found"})}),f==="activities"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):w.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Recent Activities (",w.length,")"]}),w.map(L=>{const H=L.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:dt.userOwnerThumb(H),alt:H,className:"w-10 h-10 rounded-full object-cover",onError:F=>{F.target.src=`https://images.hive.blog/u/${H}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:`mb-1 ${d==="dark"?"text-white":"text-gray-900"}`,children:L.msg}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[C(L.date),L.score&&` • Score: ${L.score}`]})]})]},L.id)})]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No activities found"})})]})]})]})};function Nm(e){const a=typeof e=="string"?new Date(e):e,i=Math.floor((new Date().getTime()-a.getTime())/1e3);if(i<60)return`${i}s ago`;const r=Math.floor(i/60);if(r<60)return`${r}m ago`;const n=Math.floor(r/60);if(n<24)return`${n}h ago`;const u=Math.floor(n/24);if(u<30)return`${u}d ago`;const c=Math.floor(u/30);return c<12?`${c}mo ago`:`${Math.floor(c/12)}y ago`}function jm({author:e,permlink:a,currentUser:s,token:i,onClickUpvoteButton:r}){const[n,u]=T.useState([]),[c,d]=T.useState(!0);T.useEffect(()=>{f()},[e,a]);const f=async()=>{d(!0);try{const o=await Pe.getPostContent(e,a);o?.active_votes&&u(o.active_votes)}catch(o){console.error("Failed to fetch votes:",o)}finally{d(!1)}};return c?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):n.length===0?t.jsx("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:"No votes yet"}):t.jsx("div",{className:"space-y-2",children:n.map((o,h)=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${o.voter}/avatar`,alt:o.voter,className:"w-8 h-8 rounded-full",onError:l=>{l.target.src=`https://ui-avatars.com/api/?name=${o.voter}&background=random&size=32`}}),t.jsxs("div",{children:[t.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:["@",o.voter]}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[Math.round(o.percent/100),"%"]})]})]}),t.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:Nm(o.time+"Z")})]},h))})}function km({author:e,permlink:a,currentUser:s,token:i,onClickUpvoteButton:r,onClickCommentUpvote:n,onClickCommentReply:u}){const[c,d]=T.useState([]),[f,o]=T.useState([]),[h,l]=T.useState(!0),[p,y]=T.useState(null),[w,b]=T.useState(!1),[g,v]=T.useState(!1),[N,j]=T.useState(null),x=T.useCallback(async(E=!1)=>{E?v(!0):l(!0),y(null);try{const D=await Pe.getCommentsList(e,a);d(D),o(D)}catch(D){y(D instanceof Error?D.message:"Failed to load comments")}finally{l(!1),v(!1)}},[e,a]);T.useEffect(()=>{x()},[x]);const m=async(E,D,C)=>{if(!i){alert("Please login to comment");return}try{await Pe.handleComment({author:E,permlink:D,body:C,authToken:i}),b(!1),j(null),v(!0),setTimeout(async()=>{await x(!0),v(!1)},3e3)}catch(P){const L=P instanceof Error?P.message:"Failed to post comment";alert(L)}},k=(E,D)=>{j({author:E,permlink:D})},_=f.filter(E=>E.parent_author===e&&E.parent_permlink===a);return h?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):p?t.jsxs("div",{className:"text-center p-8",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:p}),t.jsx("button",{onClick:()=>x(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]}):t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Comments (",_.length,")"]}),g&&t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>x(!0),disabled:g,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-4 h-4 text-gray-500 dark:text-gray-400 ${g?"animate-spin":""}`})}),s&&t.jsx("button",{onClick:()=>{u?u({author:e,permlink:a}):b(!w)},className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Add comment",children:t.jsx(z.MessageCirclePlus,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"})})]})]}),w&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(un,{onSubmit:E=>m(e,a,E),onCancel:()=>b(!1),currentUser:s,placeholder:"Add a comment..."})}),N&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(un,{onSubmit:E=>m(N.author,N.permlink,E),onCancel:()=>j(null),currentUser:s,placeholder:`Reply to @${N.author}...`})}),_.length===0?t.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 mx-auto mb-4 text-gray-300 dark:text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:"Be the first to share your thoughts!"}),!w&&s&&t.jsx("button",{onClick:()=>b(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"space-y-4",children:_.map(E=>t.jsx(fo,{comment:E,allComments:f,onReply:k,currentUser:s,token:i,searchQuery:"",depth:0,onVotedRefresh:()=>x(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:r},E.permlink))})]})}const _m=({currentUser:e,onTabChanged:a,onPublish:s,onViewMyVideo:i,onMoreOptions:r,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=Lc.useNavigate(),[o,h]=T.useState(0),[l,p]=T.useState([]),[y,w]=T.useState(!0),[b,g]=T.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),N=l.filter(C=>C.status==="publish_manual"),j=l.filter(C=>C.status==="published");T.useEffect(()=>{e?.token&&x()},[e]);const x=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Pe.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),a?.(C)},k=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},_=C=>{switch(C.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"}},E=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,P)=>{if(C.length===0){let L="";switch(P){case"publishNow":L="No videos ready to publish.";break;case"myVideos":L="No published videos found.";break;case"encoding":L="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:L})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map((L,H)=>{const F=L.thumbnail||"",q=L.title||"No Title",M=L.permlink||"",G=L.owner||e?.username||"",X=L.id||"",ee=E.includes(L.status||"");return t.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:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Gr(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:q,className:"w-24 h-16 rounded-lg object-cover",onError:R=>{R.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),E.includes(L.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.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:()=>k(L),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.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:()=>k(L),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:q}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",G]}),L.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${_(L.status)}`,children:L.status.toUpperCase()})})]}),ee?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[P==="publishNow"&&c&&t.jsx("button",{onClick:()=>s?.(G,M),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),P==="myVideos"&&t.jsx("button",{onClick:()=>i?i(G,M):k(L),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>r?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${H}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.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:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:x,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),N.length>0&&t.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:N.length})]}),t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),j.length>0&&t.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:j.length})]}),t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.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:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:y?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:x,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(N,"publishNow"),o===1&&D(j,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Bd=({username:e,onSelectUser:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState(!0),[u,c]=T.useState(null),d=async()=>{try{n(!0),c(null);const f=await xe.getFollowers(e);i(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return T.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1085
|
+
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:dt.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:y=>{y.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Fd=({communityId:e,onSelectCommunityMember:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState(!0),[u,c]=T.useState(!1),[d,f]=T.useState(!0),[o,h]=T.useState(null),[l,p]=T.useState(null),y=100,w=T.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),i([]),h(null),f(!0)):c(!0);const g=await dt.getCommunitySubscribers(e,y,b?void 0:o||void 0);g.length===0?f(!1):(i(v=>{if(b)return g;const N=new Set(v.map(x=>x.username)),j=g.filter(x=>!N.has(x.username));return[...v,...j]}),g.length>0&&h(g[g.length-1].username),f(g.length===y))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return T.useEffect(()=>{w(!0)},[e]),T.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!r&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,r,d]),r&&s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&s.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map((b,g)=>t.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:()=>a?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:dt.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),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"})})]})},ym=({communityId:e,onVideoClick:a,onAuthorClick:s,onBack:i,onclickAboutTab:r,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=Lc.useNavigate(),[p,y]=T.useState("videos"),[w,b]=T.useState(null),[g,v]=T.useState(!1),[N,j]=T.useState(!0);T.useEffect(()=>{(async()=>{try{j(!0);const D=await dt.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{j(!1)}})()},[e]);const x=()=>{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:E}):navigator.clipboard.writeText(E)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},k=E=>{l(`/user/${E}`)};if(N)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const _=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:i,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:dt.userOwnerThumb(e),alt:_?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:E=>{E.target.src=`https://images.hive.blog/u/${_?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:_?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:_?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(_?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",_?.created_at?new Date(_.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(go,{id:e,toastType:"community",onAdd:(E,D)=>console.log("Added:",E,D),onRemove:(E,D)=>console.log("Removed:",E,D),onFavourite:d}),t.jsx("button",{onClick:f||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:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||x,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:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),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:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.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:[t.jsx("button",{onClick:()=>y("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>r?r():y("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>n?n():y("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"}),t.jsx("button",{onClick:()=>u?u():y("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="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"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(fn,{feedType:Xe.COMMUNITY,communityId:e,onVideoClick:a,onAuthorClick:s}),p==="about"&&!r&&t.jsx(Rd,{communityId:e}),p==="team"&&!n&&t.jsx(Id,{communityId:e,onSelectTeamMember:k}),p==="members"&&!u&&t.jsx(Fd,{communityId:e,onSelectCommunityMember:k})]})]})]})},vm=({communityId:e,onAuthorClick:a,onPostClick:s,onCommunityClick:i,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d="dark"})=>{const[f,o]=T.useState("posts"),[h,l]=T.useState(null),[p,y]=T.useState([]),[w,b]=T.useState([]),[g,v]=T.useState(!0),[N,j]=T.useState(!1),[x,m]=T.useState(!1),[k,_]=T.useState(null);T.useEffect(()=>{(async()=>{try{v(!0),_(null);const H=await dt.getCommunityDetails(e);l(H.result)}catch(H){_(H instanceof Error?H.message:"Failed to fetch community details")}finally{v(!1)}})()},[e]),T.useEffect(()=>{f==="subscribers"&&h?E():f==="activities"&&h&&D()},[f,h]);const E=async()=>{try{j(!0);const L=await dt.getCommunitySubscribersList(e,100);y(L)}catch(L){console.error("Failed to fetch subscribers:",L)}finally{j(!1)}},D=async()=>{try{m(!0);const L=await dt.getCommunityActivities(e,100);b(L)}catch(L){console.error("Failed to fetch activities:",L)}finally{m(!1)}},C=L=>{try{const H=new Date(L),q=new Date().getTime()-H.getTime(),M=Math.floor(q/1e3),G=Math.floor(M/60),X=Math.floor(G/60),ee=Math.floor(X/24),R=Math.floor(ee/30),ne=Math.floor(ee/365);return ne>0?`${ne} year${ne>1?"s":""} ago`:R>0?`${R} month${R>1?"s":""} ago`:ee>0?`${ee} day${ee>1?"s":""} ago`:X>0?`${X} hour${X>1?"s":""} ago`:G>0?`${G} minute${G>1?"s":""} ago`:"just now"}catch{return L}},P=L=>L.replace(/<[^>]*>/g,"");return g?t.jsx("div",{className:`flex items-center justify-center min-h-[400px] ${d==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):k||!h?t.jsxs("div",{className:`flex flex-col items-center justify-center min-h-[400px] space-y-4 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:"Failed to load community details"}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-500"}`,children:k})]}):t.jsxs("div",{className:`space-y-6 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:dt.userOwnerThumb(e),alt:h.title,className:"w-16 h-16 rounded-full object-cover",onError:L=>{L.target.src=`https://images.hive.blog/u/${h.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:`text-2xl font-bold mb-2 ${d==="dark"?"text-white":"text-gray-900"}`,children:h.title}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-600"} mb-4`,children:h.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[h.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",C(h.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:`flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full ${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-lg`,children:[t.jsx("button",{onClick:()=>o("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="posts"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-300"}`}`,children:"Posts"}),t.jsx("button",{onClick:()=>o("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="about"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"About"}),t.jsx("button",{onClick:()=>o("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="subscribers"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>o("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="activities"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[f==="posts"&&t.jsx(Ld,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:a,onPostClick:s,onCommunityClick:i,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d}),f==="about"&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:[h.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"About"}),t.jsx("p",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed`,children:P(h.about)})]}),h.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.description)})]}),h.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Community Rules"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Total Authors"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_authors.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Subscribers"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.subscribers.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Created"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:C(h.created_at)})]}),h.lang&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Language"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.lang.toUpperCase()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Pending Posts"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_pending.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Type"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.is_nsfw?"NSFW":"Safe"})]})]})]}),f==="subscribers"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:N?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):p.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Subscribers (",p.length,")"]}),p.map(L=>t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:dt.userOwnerThumb(L.username),alt:L.username,className:"w-10 h-10 rounded-full object-cover",onError:H=>{H.target.src=`https://images.hive.blog/u/${L.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:`font-medium ${d==="dark"?"text-white":"text-gray-900"}`,children:["@",L.username]}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:["Role: ",L.role," • Subscribed"," ",C(L.subscribedAt)]})]})]},L.username))]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No subscribers found"})}),f==="activities"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):w.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Recent Activities (",w.length,")"]}),w.map(L=>{const H=L.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:dt.userOwnerThumb(H),alt:H,className:"w-10 h-10 rounded-full object-cover",onError:F=>{F.target.src=`https://images.hive.blog/u/${H}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:`mb-1 ${d==="dark"?"text-white":"text-gray-900"}`,children:L.msg}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[C(L.date),L.score&&` • Score: ${L.score}`]})]})]},L.id)})]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No activities found"})})]})]})]})};function wm(e){const a=typeof e=="string"?new Date(e):e,i=Math.floor((new Date().getTime()-a.getTime())/1e3);if(i<60)return`${i}s ago`;const r=Math.floor(i/60);if(r<60)return`${r}m ago`;const n=Math.floor(r/60);if(n<24)return`${n}h ago`;const u=Math.floor(n/24);if(u<30)return`${u}d ago`;const c=Math.floor(u/30);return c<12?`${c}mo ago`:`${Math.floor(c/12)}y ago`}function Nm({author:e,permlink:a,currentUser:s,token:i,onClickUpvoteButton:r}){const[n,u]=T.useState([]),[c,d]=T.useState(!0);T.useEffect(()=>{f()},[e,a]);const f=async()=>{d(!0);try{const o=await Pe.getPostContent(e,a);o?.active_votes&&u(o.active_votes)}catch(o){console.error("Failed to fetch votes:",o)}finally{d(!1)}};return c?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):n.length===0?t.jsx("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:"No votes yet"}):t.jsx("div",{className:"space-y-2",children:n.map((o,h)=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${o.voter}/avatar`,alt:o.voter,className:"w-8 h-8 rounded-full",onError:l=>{l.target.src=`https://ui-avatars.com/api/?name=${o.voter}&background=random&size=32`}}),t.jsxs("div",{children:[t.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:["@",o.voter]}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[Math.round(o.percent/100),"%"]})]})]}),t.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:wm(o.time+"Z")})]},h))})}function jm({author:e,permlink:a,currentUser:s,token:i,onClickUpvoteButton:r,onClickCommentUpvote:n,onClickCommentReply:u}){const[c,d]=T.useState([]),[f,o]=T.useState([]),[h,l]=T.useState(!0),[p,y]=T.useState(null),[w,b]=T.useState(!1),[g,v]=T.useState(!1),[N,j]=T.useState(null),x=T.useCallback(async(E=!1)=>{E?v(!0):l(!0),y(null);try{const D=await Pe.getCommentsList(e,a);d(D),o(D)}catch(D){y(D instanceof Error?D.message:"Failed to load comments")}finally{l(!1),v(!1)}},[e,a]);T.useEffect(()=>{x()},[x]);const m=async(E,D,C)=>{if(!i){alert("Please login to comment");return}try{await Pe.handleComment({author:E,permlink:D,body:C,authToken:i}),b(!1),j(null),v(!0),setTimeout(async()=>{await x(!0),v(!1)},3e3)}catch(P){const L=P instanceof Error?P.message:"Failed to post comment";alert(L)}},k=(E,D)=>{j({author:E,permlink:D})},_=f.filter(E=>E.parent_author===e&&E.parent_permlink===a);return h?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):p?t.jsxs("div",{className:"text-center p-8",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:p}),t.jsx("button",{onClick:()=>x(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]}):t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Comments (",_.length,")"]}),g&&t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>x(!0),disabled:g,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-4 h-4 text-gray-500 dark:text-gray-400 ${g?"animate-spin":""}`})}),s&&t.jsx("button",{onClick:()=>{u?u({author:e,permlink:a}):b(!w)},className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Add comment",children:t.jsx(z.MessageCirclePlus,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"})})]})]}),w&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(un,{onSubmit:E=>m(e,a,E),onCancel:()=>b(!1),currentUser:s,placeholder:"Add a comment..."})}),N&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(un,{onSubmit:E=>m(N.author,N.permlink,E),onCancel:()=>j(null),currentUser:s,placeholder:`Reply to @${N.author}...`})}),_.length===0?t.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 mx-auto mb-4 text-gray-300 dark:text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:"Be the first to share your thoughts!"}),!w&&s&&t.jsx("button",{onClick:()=>b(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"space-y-4",children:_.map(E=>t.jsx(fo,{comment:E,allComments:f,onReply:k,currentUser:s,token:i,searchQuery:"",depth:0,onVotedRefresh:()=>x(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:r},E.permlink))})]})}const km=({currentUser:e,onTabChanged:a,onPublish:s,onViewMyVideo:i,onMoreOptions:r,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=Lc.useNavigate(),[o,h]=T.useState(0),[l,p]=T.useState([]),[y,w]=T.useState(!0),[b,g]=T.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),N=l.filter(C=>C.status==="publish_manual"),j=l.filter(C=>C.status==="published");T.useEffect(()=>{e?.token&&x()},[e]);const x=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Pe.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),a?.(C)},k=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},_=C=>{switch(C.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"}},E=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,P)=>{if(C.length===0){let L="";switch(P){case"publishNow":L="No videos ready to publish.";break;case"myVideos":L="No published videos found.";break;case"encoding":L="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:L})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map((L,H)=>{const F=L.thumbnail||"",q=L.title||"No Title",M=L.permlink||"",G=L.owner||e?.username||"",X=L.id||"",ee=E.includes(L.status||"");return t.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:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Gr(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:q,className:"w-24 h-16 rounded-lg object-cover",onError:R=>{R.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),E.includes(L.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.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:()=>k(L),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.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:()=>k(L),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:q}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",G]}),L.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${_(L.status)}`,children:L.status.toUpperCase()})})]}),ee?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[P==="publishNow"&&c&&t.jsx("button",{onClick:()=>s?.(G,M),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),P==="myVideos"&&t.jsx("button",{onClick:()=>i?i(G,M):k(L),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>r?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${H}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.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:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:x,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),N.length>0&&t.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:N.length})]}),t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),j.length>0&&t.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:j.length})]}),t.jsxs("button",{onClick:()=>m(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 ${o===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:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.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:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:y?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:x,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(N,"publishNow"),o===1&&D(j,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Bd=({username:e,onSelectUser:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState(!0),[u,c]=T.useState(null),d=async()=>{try{n(!0),c(null);const f=await xe.getFollowers(e);i(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return T.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1086
1086
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1087
1087
|
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:xe.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`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.follower]})})]})},`${f.follower}-${o}`))})})},qd=({username:e,onSelectUser:a})=>{const[s,i]=T.useState([]),[r,n]=T.useState(!0),[u,c]=T.useState(null),d=async()=>{try{n(!0),c(null);const f=await xe.getFollowing(e);i(f)}catch(f){c(f instanceof Error?f.message:"Failed to load following list")}finally{n(!1)}};return T.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following list..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following list"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,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:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):s.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.following),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1088
1088
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1089
|
-
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:xe.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`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Vd=({username:e})=>{const[a,s]=T.useState(null),[i,r]=T.useState(!0),[n,u]=T.useState(null),c=async()=>{try{r(!0),u(null);const l=await xe.getProfile(e);s(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{r(!1)}};T.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(i)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=a.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},Em=({username:e,onVideoClick:a,onAuthorClick:s,onBack:i,onClickUserInfoTab:r,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=T.useState("videos"),[y,w]=T.useState(null),[b,g]=T.useState(!1),[v,N]=T.useState(!0);T.useEffect(()=>{(async()=>{try{N(!0);const D=await xe.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{N(!1)}})()},[e]);const j=()=>{if(f)f(e);else{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:y?.result?.name||e,url:E}):navigator.clipboard.writeText(E)}},x=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=E=>{s(E)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const k=y?.result,_=k?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:i,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:_.cover_image||xe.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:E=>{E.target.src=xe.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:_?.profile_image,alt:_?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:E=>{E.target.src=xe.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:_?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:_?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",k?.created?new Date(k.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(go,{id:e,toastType:"user",onAdd:(E,D)=>{c?c(E,!0):console.log("Added:",E,D)},onRemove:(E,D)=>{c?c(E,!1):console.log("Removed:",E,D)}}),t.jsx("button",{onClick:x,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:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.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:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},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:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.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:r},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((E,D)=>t.jsx("button",{onClick:()=>{E.callback?E.callback():p(E.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===E.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:E.label},E.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(fn,{feedType:Xe.USER,username:e,onVideoClick:a,onAuthorClick:s}),l==="about"&&t.jsx(Vd,{username:e}),l==="followers"&&t.jsx(Bd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(qd,{username:e,onSelectUser:m})]})]})]})},Ud=e=>{window.open(e,"_blank")},Am=({app:e,backgroundColor:a,boxShadow:s})=>{const i=()=>{Ud(e.url)};return t.jsx("div",{className:"card hover-lift cursor-pointer transition-all duration-300 h-full",onClick:i,style:{backgroundColor:a??"rgba(15,23,42,0.9)",boxShadow:s??"0 18px 45px rgba(0,0,0,0.6)",border:"1px solid rgba(148,163,184,0.25)"},children:t.jsx("div",{className:"card-body p-6",children:t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:e.useCircleBackground!==!1?t.jsx("div",{className:"avatar",children:t.jsx("div",{className:"w-16 h-16 rounded-full",children:t.jsx("img",{src:e.imagePath,alt:`${e.name} logo`,className:"w-full h-full object-cover",onError:r=>{r.currentTarget.src="/placeholder.svg"}})})}):t.jsx("img",{src:e.imagePath,alt:`${e.name} logo`,className:"w-16 h-16 object-contain",onError:r=>{r.currentTarget.src="/placeholder.svg"}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsx("h3",{className:"card-title text-lg font-bold text-base-content mb-2 line-clamp-2",children:e.name}),e.isComingSoon&&t.jsx("div",{className:"badge badge-warning badge-sm",children:"Coming Soon"})]}),t.jsx("div",{className:"text-base-content/70 text-sm leading-relaxed",children:e.description.split(`
|
|
1090
|
-
`).map((r,n)=>t.jsx("div",{className:"mb-1",children:r},n))})]})]})})})},Sm=()=>{const[e,a]=T.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});T.useEffect(()=>{const n=()=>{a({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const s=e.width<850,i=e.width<=1050&&e.width>=850,r=e.width>1050;return{isMobileView:s,isTabletView:i,isWebView:r,screenSize:e}},Cm=({apps:e,cardBackgroundColor:a,cardShadow:s})=>{const{isMobileView:i,isTabletView:r}=Sm(),n=()=>i?"grid-cols-1":r?"grid-cols-2":"grid-cols-3";return t.jsx("div",{className:"container mx-auto px-4 lg:px-16",children:t.jsx("div",{className:`grid ${n()} gap-6 lg:gap-8`,children:e.map((u,c)=>t.jsx(Am,{app:u,backgroundColor:a,boxShadow:s},c))})})},zd=()=>{const e=[{icon:Op,href:"https://x.com/sagarkothari88",bgColor:"bg-blue-500",label:"Twitter"},{icon:Pp,href:"https://discord.gg/WEKa8JKg7W",bgColor:"bg-indigo-600",label:"Discord"}],a=s=>{Ud(s.href)};return t.jsx("footer",{className:"bg-base-300 py-8",children:t.jsx("div",{className:"container mx-auto px-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[t.jsx("h3",{className:"text-2xl font-bold text-base-content",children:"Contact us"}),t.jsx("div",{className:"flex gap-4",children:e.map((s,i)=>t.jsx("button",{onClick:()=>a(s),className:`btn btn-circle ${s.bgColor} text-white hover:scale-110 transition-transform duration-200`,"aria-label":s.label,children:t.jsx(s.icon,{className:"w-5 h-5"})},i))})]})})})},Dm=.07,Tm=85,Om=()=>{const[e,a]=T.useState({hiveUsd:Dm,usdInr:Tm}),[s,i]=T.useState(!0);return T.useEffect(()=>{(async()=>{try{const u=await(await fetch("https://api.coingecko.com/api/v3/simple/price?ids=hive&vs_currencies=usd,inr")).json();u?.hive?.usd&&u?.hive?.inr&&a({hiveUsd:u.hive.usd,usdInr:u.hive.inr/u.hive.usd})}catch{}finally{i(!1)}})()},[]),{rates:e,loading:s}},Pm={USD:{symbol:"$",suffix:"",locale:"en-US"},HIVE:{symbol:"",suffix:" HIVE",locale:"en-US"},INR:{symbol:"₹",suffix:"",locale:"en-IN"}},Ot={salary3:1250,salary2:900,rent:300,utilities:50,vps:175,devPrograms:15,domains:15,infraDepMonth:50,infraMaintMonth:20,furnDepMonth:30,infraCost:6e3,furnitureCost:2400},ne={accent:"#818cf8",error:"#f87171",errorBg:"rgba(248,113,113,0.12)",errorBorder:"rgba(248,113,113,0.3)",warning:"#fbbf24",warningBg:"rgba(251,191,36,0.15)",success:"#34d399",successBg:"rgba(52,211,153,0.15)",info:"#38bdf8",infoBg:"rgba(56,189,248,0.15)",primary:"#6366f1",primaryBg:"rgba(99,102,241,0.15)",progressTrack:"rgba(30,41,59,0.72)",blurOverlay:"rgba(2,6,23,0.72)",gradientFrom:"rgba(2,6,23,0.55)",gradientTo:"rgba(15,23,42,0.2)"},Lm=(e,a)=>e==="USD"?1:e==="INR"?a.usdInr:1/a.hiveUsd,Hd=(e,a)=>{const s=Lm(e,a);return{salary3:Math.round(Ot.salary3*s),salary2:Math.round(Ot.salary2*s),rent:Math.round(Ot.rent*s),utilities:Math.round(Ot.utilities*s),vps:Math.round(Ot.vps*s),devPrograms:Math.round(Ot.devPrograms*s),domains:Math.round(Ot.domains*s),infraDepMonth:Math.round(Ot.infraDepMonth*s),infraMaintMonth:Math.round(Ot.infraMaintMonth*s),furnDepMonth:Math.round(Ot.furnDepMonth*s),infraCost:Math.round(Ot.infraCost*s),furnitureCost:Math.round(Ot.furnitureCost*s)}},Mm=(e,a)=>{const{symbol:s,suffix:i,locale:r}=Pm[a],n=Math.round(e).toLocaleString(r);return`${s}${n}${i}`},$m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Rm(e,a){const s=Hd(e,a),i=[];let r=1,n=1,u=1;const c=new Date(2022,0),d=new Date(2026,2),f=new Date(c);for(;f<=d;){const o=f.getFullYear(),h=f.getMonth(),l=f>=new Date(2022,6);l&&h===6&&!(o===2022&&h===6)&&(r*=.9,n*=.9,u*=.85);let p=s.salary3;o===2026&&h>=1&&(p=s.salary2),o>2026&&(p=s.salary2);const y=l?s.rent:0,w=l?s.utilities:0,b=l?s.vps:0,g=l?s.devPrograms:0,v=l?s.domains:0,N=l?Math.round(s.infraDepMonth*r):0,j=l?Math.round(s.infraMaintMonth*n):0,x=l?Math.round(s.furnDepMonth*u):0,m=p+y+w+b+g+v+N+j+x;i.push({year:o,month:h,label:`${$m[h]} ${o}`,salaries:p,rent:y,utilities:w,vps:b,devPrograms:g,domains:v,infraDepreciation:N,infraMaintenance:j,furnitureDepreciation:x,total:m}),f.setMonth(f.getMonth()+1)}return i}const Im=({row:e,fmt:a,textColor:s,cardBackgroundColor:i,dividerColor:r})=>{const[n,u]=T.useState(!1),c=[];return c.push({label:"Salaries",value:e.salaries}),e.rent&&c.push({label:"Rent",value:e.rent}),e.utilities&&c.push({label:"Utilities",value:e.utilities}),e.vps&&c.push({label:"VPS & Hosting",value:e.vps}),e.devPrograms&&c.push({label:"Dev Programs",value:e.devPrograms}),e.domains&&c.push({label:"Domains",value:e.domains}),e.infraDepreciation&&c.push({label:"Infra Depreciation",value:e.infraDepreciation}),e.infraMaintenance&&c.push({label:"Infra Maintenance",value:e.infraMaintenance}),e.furnitureDepreciation&&c.push({label:"Furniture Depreciation",value:e.furnitureDepreciation}),t.jsxs("div",{style:{borderBottom:`1px solid ${r}`},children:[t.jsxs("button",{type:"button",onClick:()=>u(d=>!d),className:"w-full flex justify-between items-center py-3 px-2 transition-colors",style:{color:s},children:[t.jsx("span",{className:"font-medium text-sm",children:e.label}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-bold text-sm",style:{color:ne.error},children:a(e.total)}),t.jsx("span",{className:`text-xs transition-transform duration-200 ${n?"rotate-180":""}`,style:{color:ne.accent},children:"▼"})]})]}),n&&t.jsxs("div",{className:"px-4 pb-4 pt-1 rounded-b-lg mx-2 mb-1",style:{backgroundColor:i},children:[c.map((d,f)=>t.jsxs("div",{className:"flex justify-between py-1.5",style:{borderTop:f>0?`1px solid ${r}`:"none"},children:[t.jsx("span",{className:"text-sm",style:{color:ne.accent},children:d.label}),t.jsx("span",{className:"font-medium text-sm",style:{color:s},children:a(d.value)})]},d.label)),t.jsxs("div",{className:"flex justify-between py-2 mt-1",style:{borderTop:`2px solid ${r}`},children:[t.jsx("span",{className:"font-bold text-sm",style:{color:s},children:"Total"}),t.jsx("span",{className:"font-bold text-sm",style:{color:ne.error},children:a(e.total)})]})]})]})},Fm=({onBack:e,backgroundColor:a="#020617",textColor:s="#e5e7eb",cardBackgroundColor:i="rgba(15,23,42,0.85)",dividerColor:r="rgba(148,163,184,0.4)"})=>{const[n,u]=T.useState("USD"),{rates:c,loading:d}=Om(),f=T.useMemo(()=>Rm(n,c),[n,c]),o=T.useMemo(()=>Hd(n,c),[n,c]),h=N=>Mm(N,n),l=[...new Set(f.map(N=>N.year))],p={};l.forEach(N=>{p[N]=f.filter(j=>j.year===N).reduce((j,x)=>j+x.total,0)});const y=f.reduce((N,j)=>N+j.total,0),w=o.infraCost+o.furnitureCost,b=y+w,g=["USD","HIVE","INR"],v="0 18px 45px rgba(0,0,0,0.6)";return t.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[t.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundColor:a}}),t.jsx("div",{className:"fixed inset-0 z-10 backdrop-blur-md",style:{backgroundColor:ne.blurOverlay}}),t.jsx("div",{className:"fixed inset-0 z-20",style:{background:`linear-gradient(135deg, ${ne.gradientFrom}, transparent, ${ne.gradientTo})`}}),t.jsx("div",{className:"fixed inset-0 z-20",style:{background:`linear-gradient(180deg, ${ne.gradientFrom}, transparent, ${ne.gradientTo})`}}),t.jsxs("div",{className:"relative z-30",style:{color:s},children:[t.jsxs("main",{className:"min-h-screen",children:[t.jsx("div",{className:"pt-8 pb-4",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsx("button",{type:"button",onClick:e,className:"inline-flex items-center gap-2 hover:underline font-medium",style:{color:ne.accent},children:t.jsx(Wp,{className:"w-4 h-4"})})})}),t.jsx("section",{className:"py-12",children:t.jsxs("div",{className:"container mx-auto px-4 text-center",children:[t.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full font-semibold text-sm mb-6",style:{backgroundColor:ne.errorBg,color:ne.error},children:[t.jsx(Td,{className:"w-4 h-4"}),"Transparency Report — Running in Heavy Debt"]}),t.jsxs("h1",{className:"text-4xl md:text-5xl font-extrabold mb-4",style:{color:s},children:["Our Expenses — Every Single"," ",n==="USD"?"Dollar":n==="HIVE"?"Hive":"Rupee"]}),t.jsxs("p",{className:"max-w-2xl mx-auto text-lg",style:{color:s,opacity:.85},children:["We have never asked for funding. Every rupee has come out of our own pockets. All we ask in return is"," ",t.jsx("span",{className:"font-bold",style:{color:ne.accent},children:"your Hive witness vote"}),"."]})]})}),t.jsx("section",{className:"pb-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"inline-flex rounded-xl p-1 gap-1",style:{backgroundColor:i,boxShadow:v},children:g.map(N=>t.jsxs("button",{onClick:()=>u(N),className:"px-6 py-2.5 rounded-lg font-semibold text-sm transition-all duration-200",style:n===N?{backgroundColor:ne.primary,color:"#ffffff",boxShadow:"0 4px 14px rgba(99,102,241,0.4)"}:{color:s,opacity:.7},children:[N==="INR"&&"₹ INR",N==="USD"&&"$ USD",N==="HIVE"&&"HIVE"]},N))})}),t.jsx("p",{className:"text-center text-xs mt-2",style:{color:s,opacity:.5},children:d?"Fetching live rates…":t.jsxs(t.Fragment,{children:["Live rates via CoinGecko: 1 HIVE ≈ $",c.hiveUsd.toFixed(4)," • 1 USD ≈ ₹",c.usdInr.toFixed(2)]})})]})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Month-by-Month Expense Breakdown"}),t.jsx("div",{className:"max-w-6xl mx-auto hidden md:block rounded-2xl",style:{backgroundColor:i,boxShadow:v},children:t.jsxs("table",{className:"w-full border-collapse text-xs",children:[t.jsx("thead",{children:t.jsx("tr",{style:{borderBottom:`2px solid ${r}`},children:[{label:"Month",align:"left",cls:"pl-6"},{label:"Salaries",align:"right",cls:""},{label:"Rent",align:"right",cls:""},{label:"Utilities",align:"right",cls:""},{label:"VPS",align:"right",cls:"hidden lg:table-cell"},{label:"Dev Prog",align:"right",cls:"hidden lg:table-cell"},{label:"Domains",align:"right",cls:"hidden lg:table-cell"},{label:"Infra Dep.",align:"right",cls:"hidden xl:table-cell"},{label:"Infra Maint.",align:"right",cls:"hidden xl:table-cell"},{label:"Furn. Dep.",align:"right",cls:"hidden xl:table-cell"},{label:"Total",align:"right",cls:"pr-6"}].map(({label:N,align:j,cls:x})=>t.jsx("th",{className:`px-3 py-4 font-semibold uppercase tracking-wider whitespace-nowrap ${x}`,style:{textAlign:j,color:s,opacity:.5},children:N},N))})}),t.jsxs("tbody",{children:[l.map(N=>{const j=f.filter(x=>x.year===N);return t.jsxs(T.Fragment,{children:[t.jsx("tr",{children:t.jsx("td",{colSpan:11,className:"px-3 py-3 font-bold text-center tracking-widest uppercase",style:{backgroundColor:ne.primaryBg,color:ne.primary},children:N})}),j.map(x=>t.jsxs("tr",{className:"transition-colors",style:{borderBottom:`1px solid ${r}`},onMouseEnter:m=>m.currentTarget.style.backgroundColor="rgba(255,255,255,0.03)",onMouseLeave:m=>m.currentTarget.style.backgroundColor="transparent",children:[t.jsx("td",{className:"pl-6 pr-3 py-3 font-medium whitespace-nowrap",style:{color:s},children:x.label}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:h(x.salaries)}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:x.rent?h(x.rent):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:x.utilities?h(x.utilities):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.vps?h(x.vps):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.devPrograms?h(x.devPrograms):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.domains?h(x.domains):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.infraDepreciation?h(x.infraDepreciation):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.infraMaintenance?h(x.infraMaintenance):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.furnitureDepreciation?h(x.furnitureDepreciation):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"pl-3 pr-6 py-3 text-right font-bold tabular-nums whitespace-nowrap",style:{color:ne.error},children:h(x.total)})]},x.label)),t.jsxs("tr",{style:{borderTop:`2px solid ${ne.errorBorder}`,backgroundColor:"rgba(248,113,113,0.06)"},children:[t.jsxs("td",{colSpan:10,className:"pl-6 pr-3 py-3.5 font-bold",style:{color:ne.error},children:[N," Total"]}),t.jsx("td",{className:"pl-3 pr-6 py-3.5 text-right font-bold tabular-nums whitespace-nowrap",style:{color:ne.error},children:h(p[N])})]})]},N)}),t.jsxs("tr",{style:{borderTop:`3px solid ${ne.error}`,backgroundColor:ne.errorBg},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-4 text-2xl font-extrabold",style:{color:ne.error},children:"GRAND TOTAL (Recurring)"}),t.jsx("td",{className:"pl-3 pr-6 py-4 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:ne.error},children:h(y)})]}),t.jsxs("tr",{style:{backgroundColor:ne.errorBg,borderTop:`1px solid ${r}`},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-3 text-2xl font-extrabold",style:{color:ne.warning},children:"+ Capital Investments"}),t.jsx("td",{className:"pl-3 pr-6 py-3 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:ne.warning},children:h(w)})]}),t.jsxs("tr",{style:{backgroundColor:"rgba(248,113,113,0.16)",borderTop:`2px solid ${ne.error}`},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-4 text-2xl font-extrabold",style:{color:ne.error},children:"TOTAL EXPENSES"}),t.jsx("td",{className:"pl-3 pr-6 py-4 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:ne.error},children:h(b)})]})]})]})}),t.jsxs("div",{className:"md:hidden max-w-lg mx-auto",children:[l.map(N=>{const j=f.filter(x=>x.year===N);return t.jsxs(T.Fragment,{children:[t.jsx("div",{className:"font-extrabold text-center py-3 text-lg rounded-lg mt-4 first:mt-0",style:{backgroundColor:ne.primaryBg,color:ne.primary},children:N}),j.map(x=>t.jsx(Im,{row:x,fmt:h,textColor:s,cardBackgroundColor:i,dividerColor:r},x.label)),t.jsxs("div",{className:"flex justify-between items-center py-4 mb-2",style:{borderTop:`2px solid ${ne.errorBorder}`},children:[t.jsxs("span",{className:"font-extrabold text-lg",style:{color:ne.error},children:[N," Total"]}),t.jsx("span",{className:"font-extrabold text-lg",style:{color:ne.error},children:h(p[N])})]})]},N)}),t.jsxs("div",{className:"mt-2 rounded-xl overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center px-4 py-4",style:{backgroundColor:ne.errorBg,borderTop:`4px solid ${ne.error}`},children:[t.jsx("span",{className:"font-extrabold text-base",style:{color:ne.error},children:"GRAND TOTAL (Recurring)"}),t.jsx("span",{className:"font-extrabold text-base",style:{color:ne.error},children:h(y)})]}),t.jsxs("div",{className:"flex justify-between items-center px-4 py-3",style:{backgroundColor:ne.errorBg},children:[t.jsx("span",{className:"font-extrabold text-base",style:{color:ne.warning},children:"+ Capital Investments"}),t.jsx("span",{className:"font-extrabold text-base",style:{color:ne.warning},children:h(w)})]}),t.jsxs("div",{className:"flex justify-between items-center px-4 py-4",style:{backgroundColor:"rgba(248,113,113,0.18)",borderTop:`2px solid ${ne.error}`},children:[t.jsx("span",{className:"font-extrabold text-lg",style:{color:ne.error},children:"TOTAL EXPENSES"}),t.jsx("span",{className:"font-extrabold text-lg",style:{color:ne.error},children:h(b)})]})]})]})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 max-w-5xl mx-auto",children:[{icon:Fp,iconColor:ne.error,borderColor:ne.error,label:"Total Recurring Expenses",value:h(y),valueColor:ne.error,sub:null},{icon:Mi,iconColor:ne.warning,borderColor:ne.warning,label:"Capital Investments",value:h(w),valueColor:ne.warning,sub:null},{icon:zp,iconColor:ne.error,borderColor:ne.error,label:"Grand Total Spent",value:h(b),valueColor:ne.error,sub:null},{icon:_c,iconColor:ne.success,borderColor:ne.success,label:"Revenue / Funding",value:h(0),valueColor:ne.success,sub:"Zero. Nothing. Nada."}].map(({icon:N,iconColor:j,borderColor:x,label:m,value:k,valueColor:_,sub:E})=>t.jsxs("div",{className:"card glass-effect p-6 rounded-xl text-center border-l-4",style:{backgroundColor:i,boxShadow:v,borderColor:x},children:[t.jsx(N,{className:"w-8 h-8 mx-auto mb-2",style:{color:j}}),t.jsx("p",{className:"text-sm uppercase tracking-wide mb-1",style:{color:s,opacity:.6},children:m}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:_},children:k}),E&&t.jsx("p",{className:"text-xs mt-1 font-semibold",style:{color:ne.error},children:E})]},m))})})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Capital Investments (One-Time)"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-3xl mx-auto",children:[t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:ne.warningBg},children:t.jsx(Mi,{className:"w-5 h-5",style:{color:ne.warning}})}),t.jsx("h3",{className:"text-lg font-bold",style:{color:s},children:"IT Infrastructure"})]}),t.jsx("p",{className:"text-sm mb-2",style:{color:s,opacity:.75},children:"Laptops, computers, networking equipment — purchased since July 2022"}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:ne.warning},children:h(o.infraCost)}),t.jsx("p",{className:"text-xs mt-1",style:{color:s,opacity:.45},children:"Depreciating at 10%/year • 5%/year maintenance"})]}),t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:ne.infoBg},children:t.jsx(Vp,{className:"w-5 h-5",style:{color:ne.info}})}),t.jsx("h3",{className:"text-lg font-bold",style:{color:s},children:"Fixtures & Furniture"})]}),t.jsx("p",{className:"text-sm mb-2",style:{color:s,opacity:.75},children:"Office furniture, fixtures, and setup — since July 2022"}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:ne.info},children:h(o.furnitureCost)}),t.jsx("p",{className:"text-xs mt-1",style:{color:s,opacity:.45},children:"Depreciating at 15%/year"})]})]})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Monthly Recurring Expense Categories"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 max-w-5xl mx-auto",children:[{icon:Mp,iconBg:ne.primaryBg,iconColor:ne.primary,label:"Developer Salaries",desc:`3 devs (Jan 2022 – Jan 2026): ${h(o.salary3)}/mo
|
|
1091
|
-
2 devs (Feb 2026 – present): ${h(o.salary2)}/mo`},{icon:
|
|
1092
|
-
Furniture: 15% depreciation/yr`}].map(({icon:N,iconBg:j,iconColor:x,label:m,desc:k})=>t.jsxs("div",{className:"card glass-effect hover-lift p-5 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[t.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{backgroundColor:j},children:t.jsx(N,{className:"w-5 h-5",style:{color:x}})}),t.jsx("h3",{className:"font-bold text-sm",style:{color:s},children:m})]}),t.jsx("p",{className:"text-xs whitespace-pre-line",style:{color:s,opacity:.7},children:k})]},m))})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-12",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsx("div",{className:"max-w-3xl mx-auto",children:t.jsxs("div",{className:"card glass-effect rounded-2xl p-8",style:{backgroundColor:i,boxShadow:v,border:`2px solid ${r}`},children:[t.jsxs("div",{className:"text-center mb-6",children:[t.jsx(
|
|
1089
|
+
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:xe.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`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Vd=({username:e})=>{const[a,s]=T.useState(null),[i,r]=T.useState(!0),[n,u]=T.useState(null),c=async()=>{try{r(!0),u(null);const l=await xe.getProfile(e);s(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{r(!1)}};T.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(i)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.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:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=a.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},_m=({username:e,onVideoClick:a,onAuthorClick:s,onBack:i,onClickUserInfoTab:r,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=T.useState("videos"),[y,w]=T.useState(null),[b,g]=T.useState(!1),[v,N]=T.useState(!0);T.useEffect(()=>{(async()=>{try{N(!0);const D=await xe.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{N(!1)}})()},[e]);const j=()=>{if(f)f(e);else{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:y?.result?.name||e,url:E}):navigator.clipboard.writeText(E)}},x=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=E=>{s(E)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const k=y?.result,_=k?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:i,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:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:_.cover_image||xe.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:E=>{E.target.src=xe.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:_?.profile_image,alt:_?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:E=>{E.target.src=xe.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:_?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:_?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",k?.created?new Date(k.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(go,{id:e,toastType:"user",onAdd:(E,D)=>{c?c(E,!0):console.log("Added:",E,D)},onRemove:(E,D)=>{c?c(E,!1):console.log("Removed:",E,D)}}),t.jsx("button",{onClick:x,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:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.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:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},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:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.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:r},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((E,D)=>t.jsx("button",{onClick:()=>{E.callback?E.callback():p(E.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===E.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:E.label},E.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(fn,{feedType:Xe.USER,username:e,onVideoClick:a,onAuthorClick:s}),l==="about"&&t.jsx(Vd,{username:e}),l==="followers"&&t.jsx(Bd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(qd,{username:e,onSelectUser:m})]})]})]})},Ud=e=>{window.open(e,"_blank")},Em=({app:e,backgroundColor:a,boxShadow:s})=>{const i=()=>{Ud(e.url)};return t.jsx("div",{className:"card hover-lift cursor-pointer transition-all duration-300 h-full",onClick:i,style:{backgroundColor:a??"rgba(15,23,42,0.9)",boxShadow:s??"0 18px 45px rgba(0,0,0,0.6)",border:"1px solid rgba(148,163,184,0.25)"},children:t.jsx("div",{className:"card-body p-6",children:t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:e.useCircleBackground!==!1?t.jsx("div",{className:"avatar",children:t.jsx("div",{className:"w-16 h-16 rounded-full",children:t.jsx("img",{src:e.imagePath,alt:`${e.name} logo`,className:"w-full h-full object-cover",onError:r=>{r.currentTarget.src="/placeholder.svg"}})})}):t.jsx("img",{src:e.imagePath,alt:`${e.name} logo`,className:"w-16 h-16 object-contain",onError:r=>{r.currentTarget.src="/placeholder.svg"}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsx("h3",{className:"card-title text-lg font-bold text-base-content mb-2 line-clamp-2",children:e.name}),e.isComingSoon&&t.jsx("div",{className:"badge badge-warning badge-sm",children:"Coming Soon"})]}),t.jsx("div",{className:"text-base-content/70 text-sm leading-relaxed",children:e.description.split(`
|
|
1090
|
+
`).map((r,n)=>t.jsx("div",{className:"mb-1",children:r},n))})]})]})})})},Am=()=>{const[e,a]=T.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});T.useEffect(()=>{const n=()=>{a({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const s=e.width<850,i=e.width<=1050&&e.width>=850,r=e.width>1050;return{isMobileView:s,isTabletView:i,isWebView:r,screenSize:e}},Sm=({apps:e,cardBackgroundColor:a,cardShadow:s})=>{const{isMobileView:i,isTabletView:r}=Am(),n=()=>i?"grid-cols-1":r?"grid-cols-2":"grid-cols-3";return t.jsx("div",{className:"container mx-auto px-4 lg:px-16",children:t.jsx("div",{className:`grid ${n()} gap-6 lg:gap-8`,children:e.map((u,c)=>t.jsx(Em,{app:u,backgroundColor:a,boxShadow:s},c))})})},Cm=()=>{const e=[{icon:Tp,href:"https://x.com/sagarkothari88",bgColor:"bg-blue-500",label:"Twitter"},{icon:Op,href:"https://discord.gg/WEKa8JKg7W",bgColor:"bg-indigo-600",label:"Discord"}],a=s=>{Ud(s.href)};return t.jsx("footer",{className:"bg-base-300 py-8",children:t.jsx("div",{className:"container mx-auto px-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[t.jsx("h3",{className:"text-2xl font-bold text-base-content",children:"Contact us"}),t.jsx("div",{className:"flex gap-4",children:e.map((s,i)=>t.jsx("button",{onClick:()=>a(s),className:`btn btn-circle ${s.bgColor} text-white hover:scale-110 transition-transform duration-200`,"aria-label":s.label,children:t.jsx(s.icon,{className:"w-5 h-5"})},i))})]})})})},Dm=.07,Tm=85,Om=()=>{const[e,a]=T.useState({hiveUsd:Dm,usdInr:Tm}),[s,i]=T.useState(!0);return T.useEffect(()=>{(async()=>{try{const u=await(await fetch("https://api.coingecko.com/api/v3/simple/price?ids=hive&vs_currencies=usd,inr")).json();u?.hive?.usd&&u?.hive?.inr&&a({hiveUsd:u.hive.usd,usdInr:u.hive.inr/u.hive.usd})}catch{}finally{i(!1)}})()},[]),{rates:e,loading:s}},Pm={USD:{symbol:"$",suffix:"",locale:"en-US"},HIVE:{symbol:"",suffix:" HIVE",locale:"en-US"},INR:{symbol:"₹",suffix:"",locale:"en-IN"}},Ot={salary3:1250,salary2:900,rent:300,utilities:50,vps:175,devPrograms:15,domains:15,infraDepMonth:50,infraMaintMonth:20,furnDepMonth:30,infraCost:6e3,furnitureCost:2400},oe={accent:"#818cf8",error:"#f87171",errorBg:"rgba(248,113,113,0.12)",errorBorder:"rgba(248,113,113,0.3)",warning:"#fbbf24",warningBg:"rgba(251,191,36,0.15)",success:"#34d399",successBg:"rgba(52,211,153,0.15)",info:"#38bdf8",infoBg:"rgba(56,189,248,0.15)",primary:"#6366f1",primaryBg:"rgba(99,102,241,0.15)",progressTrack:"rgba(30,41,59,0.72)"},Lm=(e,a)=>e==="USD"?1:e==="INR"?a.usdInr:1/a.hiveUsd,zd=(e,a)=>{const s=Lm(e,a);return{salary3:Math.round(Ot.salary3*s),salary2:Math.round(Ot.salary2*s),rent:Math.round(Ot.rent*s),utilities:Math.round(Ot.utilities*s),vps:Math.round(Ot.vps*s),devPrograms:Math.round(Ot.devPrograms*s),domains:Math.round(Ot.domains*s),infraDepMonth:Math.round(Ot.infraDepMonth*s),infraMaintMonth:Math.round(Ot.infraMaintMonth*s),furnDepMonth:Math.round(Ot.furnDepMonth*s),infraCost:Math.round(Ot.infraCost*s),furnitureCost:Math.round(Ot.furnitureCost*s)}},Mm=(e,a)=>{const{symbol:s,suffix:i,locale:r}=Pm[a],n=Math.round(e).toLocaleString(r);return`${s}${n}${i}`},$m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Rm(e,a){const s=zd(e,a),i=[];let r=1,n=1,u=1;const c=new Date(2022,0),d=new Date(2026,2),f=new Date(c);for(;f<=d;){const o=f.getFullYear(),h=f.getMonth(),l=f>=new Date(2022,6);l&&h===6&&!(o===2022&&h===6)&&(r*=.9,n*=.9,u*=.85);let p=s.salary3;o===2026&&h>=1&&(p=s.salary2),o>2026&&(p=s.salary2);const y=l?s.rent:0,w=l?s.utilities:0,b=l?s.vps:0,g=l?s.devPrograms:0,v=l?s.domains:0,N=l?Math.round(s.infraDepMonth*r):0,j=l?Math.round(s.infraMaintMonth*n):0,x=l?Math.round(s.furnDepMonth*u):0,m=p+y+w+b+g+v+N+j+x;i.push({year:o,month:h,label:`${$m[h]} ${o}`,salaries:p,rent:y,utilities:w,vps:b,devPrograms:g,domains:v,infraDepreciation:N,infraMaintenance:j,furnitureDepreciation:x,total:m}),f.setMonth(f.getMonth()+1)}return i}const Im=({row:e,fmt:a,textColor:s,cardBackgroundColor:i,dividerColor:r})=>{const[n,u]=T.useState(!1),c=[];return c.push({label:"Salaries",value:e.salaries}),e.rent&&c.push({label:"Rent",value:e.rent}),e.utilities&&c.push({label:"Utilities",value:e.utilities}),e.vps&&c.push({label:"VPS & Hosting",value:e.vps}),e.devPrograms&&c.push({label:"Dev Programs",value:e.devPrograms}),e.domains&&c.push({label:"Domains",value:e.domains}),e.infraDepreciation&&c.push({label:"Infra Depreciation",value:e.infraDepreciation}),e.infraMaintenance&&c.push({label:"Infra Maintenance",value:e.infraMaintenance}),e.furnitureDepreciation&&c.push({label:"Furniture Depreciation",value:e.furnitureDepreciation}),t.jsxs("div",{style:{borderBottom:`1px solid ${r}`},children:[t.jsxs("button",{type:"button",onClick:()=>u(d=>!d),className:"w-full flex justify-between items-center py-3 px-2 transition-colors",style:{color:s},children:[t.jsx("span",{className:"font-medium text-sm",children:e.label}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-bold text-sm",style:{color:oe.error},children:a(e.total)}),t.jsx("span",{className:`text-xs transition-transform duration-200 ${n?"rotate-180":""}`,style:{color:oe.accent},children:"▼"})]})]}),n&&t.jsxs("div",{className:"px-4 pb-4 pt-1 rounded-b-lg mx-2 mb-1",style:{backgroundColor:i},children:[c.map((d,f)=>t.jsxs("div",{className:"flex justify-between py-1.5",style:{borderTop:f>0?`1px solid ${r}`:"none"},children:[t.jsx("span",{className:"text-sm",style:{color:oe.accent},children:d.label}),t.jsx("span",{className:"font-medium text-sm",style:{color:s},children:a(d.value)})]},d.label)),t.jsxs("div",{className:"flex justify-between py-2 mt-1",style:{borderTop:`2px solid ${r}`},children:[t.jsx("span",{className:"font-bold text-sm",style:{color:s},children:"Total"}),t.jsx("span",{className:"font-bold text-sm",style:{color:oe.error},children:a(e.total)})]})]})]})},Fm=({onBack:e,backgroundColor:a="#111827",textColor:s="#e5e7eb",cardBackgroundColor:i="rgba(15,23,42,0.85)",dividerColor:r="rgba(148,163,184,0.4)"})=>{const[n,u]=T.useState("USD"),{rates:c,loading:d}=Om(),f=T.useMemo(()=>Rm(n,c),[n,c]),o=T.useMemo(()=>zd(n,c),[n,c]),h=N=>Mm(N,n),l=[...new Set(f.map(N=>N.year))],p={};l.forEach(N=>{p[N]=f.filter(j=>j.year===N).reduce((j,x)=>j+x.total,0)});const y=f.reduce((N,j)=>N+j.total,0),w=o.infraCost+o.furnitureCost,b=y+w,g=["USD","HIVE","INR"],v="0 18px 45px rgba(0,0,0,0.6)";return t.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[t.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundColor:a}}),t.jsx("div",{className:"fixed inset-0 z-10 backdrop-blur-md",style:{backgroundColor:a,opacity:.6}}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-br from-base-100 via-transparent to-base-100/10"}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-b from-base-100 via-transparent to-base-100/10"}),t.jsx("div",{className:"relative z-30",style:{color:s},children:t.jsxs("main",{className:"min-h-screen",children:[t.jsx("div",{className:"pt-8 pb-4",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsxs("button",{type:"button",onClick:e,className:"inline-flex items-center gap-2 hover:underline font-medium",style:{color:oe.accent},children:[t.jsx(Hp,{className:"w-4 h-4"})," Back to Contributions View"]})})}),t.jsx("section",{className:"py-12",children:t.jsxs("div",{className:"container mx-auto px-4 text-center",children:[t.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full font-semibold text-sm mb-6",style:{backgroundColor:oe.errorBg,color:oe.error},children:[t.jsx(Td,{className:"w-4 h-4"}),"Transparency Report — Running in Heavy Debt"]}),t.jsxs("h1",{className:"text-4xl md:text-5xl font-extrabold mb-4",style:{color:s},children:["Our Expenses — Every Single"," ",n==="USD"?"Dollar":n==="HIVE"?"Hive":"Rupee"]}),t.jsxs("p",{className:"max-w-2xl mx-auto text-lg",style:{color:s,opacity:.85},children:["We have never asked for funding. Every rupee has come out of our own pockets. All we ask in return is"," ",t.jsx("span",{className:"font-bold",style:{color:oe.accent},children:"your Hive witness vote"}),"."]})]})}),t.jsx("section",{className:"pb-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"inline-flex rounded-xl p-1 gap-1",style:{backgroundColor:i,boxShadow:v},children:g.map(N=>t.jsxs("button",{onClick:()=>u(N),className:"px-6 py-2.5 rounded-lg font-semibold text-sm transition-all duration-200",style:n===N?{backgroundColor:oe.primary,color:"#ffffff",boxShadow:"0 4px 14px rgba(99,102,241,0.4)"}:{color:s,opacity:.7},children:[N==="INR"&&"₹ INR",N==="USD"&&"$ USD",N==="HIVE"&&"HIVE"]},N))})}),t.jsx("p",{className:"text-center text-xs mt-2",style:{color:s,opacity:.5},children:d?"Fetching live rates…":t.jsxs(t.Fragment,{children:["Live rates via CoinGecko: 1 HIVE ≈ $",c.hiveUsd.toFixed(4)," • 1 USD ≈ ₹",c.usdInr.toFixed(2)]})})]})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Month-by-Month Expense Breakdown"}),t.jsx("div",{className:"max-w-6xl mx-auto hidden md:block rounded-2xl",style:{backgroundColor:i,boxShadow:v},children:t.jsxs("table",{className:"w-full border-collapse text-xs",children:[t.jsx("thead",{children:t.jsx("tr",{style:{borderBottom:`2px solid ${r}`},children:[{label:"Month",align:"left",cls:"pl-6"},{label:"Salaries",align:"right",cls:""},{label:"Rent",align:"right",cls:""},{label:"Utilities",align:"right",cls:""},{label:"VPS",align:"right",cls:"hidden lg:table-cell"},{label:"Dev Prog",align:"right",cls:"hidden lg:table-cell"},{label:"Domains",align:"right",cls:"hidden lg:table-cell"},{label:"Infra Dep.",align:"right",cls:"hidden xl:table-cell"},{label:"Infra Maint.",align:"right",cls:"hidden xl:table-cell"},{label:"Furn. Dep.",align:"right",cls:"hidden xl:table-cell"},{label:"Total",align:"right",cls:"pr-6"}].map(({label:N,align:j,cls:x})=>t.jsx("th",{className:`px-3 py-4 font-semibold uppercase tracking-wider whitespace-nowrap ${x}`,style:{textAlign:j,color:s,opacity:.5},children:N},N))})}),t.jsxs("tbody",{children:[l.map(N=>{const j=f.filter(x=>x.year===N);return t.jsxs(T.Fragment,{children:[t.jsx("tr",{children:t.jsx("td",{colSpan:11,className:"px-3 py-3 font-bold text-center tracking-widest uppercase",style:{backgroundColor:oe.primaryBg,color:oe.primary},children:N})}),j.map(x=>t.jsxs("tr",{className:"transition-colors",style:{borderBottom:`1px solid ${r}`},onMouseEnter:m=>m.currentTarget.style.backgroundColor="rgba(255,255,255,0.03)",onMouseLeave:m=>m.currentTarget.style.backgroundColor="transparent",children:[t.jsx("td",{className:"pl-6 pr-3 py-3 font-medium whitespace-nowrap",style:{color:s},children:x.label}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:h(x.salaries)}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:x.rent?h(x.rent):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-3 py-3 text-right tabular-nums whitespace-nowrap",style:{color:s,opacity:.85},children:x.utilities?h(x.utilities):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.vps?h(x.vps):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.devPrograms?h(x.devPrograms):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden lg:table-cell",style:{color:s,opacity:.85},children:x.domains?h(x.domains):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.infraDepreciation?h(x.infraDepreciation):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.infraMaintenance?h(x.infraMaintenance):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"px-5 py-3 text-right tabular-nums whitespace-nowrap hidden xl:table-cell",style:{color:s,opacity:.85},children:x.furnitureDepreciation?h(x.furnitureDepreciation):t.jsx("span",{style:{opacity:.3},children:"—"})}),t.jsx("td",{className:"pl-3 pr-6 py-3 text-right font-bold tabular-nums whitespace-nowrap",style:{color:oe.error},children:h(x.total)})]},x.label)),t.jsxs("tr",{style:{borderTop:`2px solid ${oe.errorBorder}`,backgroundColor:"rgba(248,113,113,0.06)"},children:[t.jsxs("td",{colSpan:10,className:"pl-6 pr-3 py-3.5 font-bold",style:{color:oe.error},children:[N," Total"]}),t.jsx("td",{className:"pl-3 pr-6 py-3.5 text-right font-bold tabular-nums whitespace-nowrap",style:{color:oe.error},children:h(p[N])})]})]},N)}),t.jsxs("tr",{style:{borderTop:`3px solid ${oe.error}`,backgroundColor:oe.errorBg},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-4 text-2xl font-extrabold",style:{color:oe.error},children:"GRAND TOTAL (Recurring)"}),t.jsx("td",{className:"pl-3 pr-6 py-4 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:oe.error},children:h(y)})]}),t.jsxs("tr",{style:{backgroundColor:oe.errorBg,borderTop:`1px solid ${r}`},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-3 text-2xl font-extrabold",style:{color:oe.warning},children:"+ Capital Investments"}),t.jsx("td",{className:"pl-3 pr-6 py-3 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:oe.warning},children:h(w)})]}),t.jsxs("tr",{style:{backgroundColor:"rgba(248,113,113,0.16)",borderTop:`2px solid ${oe.error}`},children:[t.jsx("td",{colSpan:10,className:"pl-6 pr-3 py-4 text-2xl font-extrabold",style:{color:oe.error},children:"TOTAL EXPENSES"}),t.jsx("td",{className:"pl-3 pr-6 py-4 text-right text-2xl font-extrabold tabular-nums whitespace-nowrap",style:{color:oe.error},children:h(b)})]})]})]})}),t.jsxs("div",{className:"md:hidden max-w-lg mx-auto",children:[l.map(N=>{const j=f.filter(x=>x.year===N);return t.jsxs(T.Fragment,{children:[t.jsx("div",{className:"font-extrabold text-center py-3 text-lg rounded-lg mt-4 first:mt-0",style:{backgroundColor:oe.primaryBg,color:oe.primary},children:N}),j.map(x=>t.jsx(Im,{row:x,fmt:h,textColor:s,cardBackgroundColor:i,dividerColor:r},x.label)),t.jsxs("div",{className:"flex justify-between items-center py-4 mb-2",style:{borderTop:`2px solid ${oe.errorBorder}`},children:[t.jsxs("span",{className:"font-extrabold text-lg",style:{color:oe.error},children:[N," Total"]}),t.jsx("span",{className:"font-extrabold text-lg",style:{color:oe.error},children:h(p[N])})]})]},N)}),t.jsxs("div",{className:"mt-2 rounded-xl overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center px-4 py-4",style:{backgroundColor:oe.errorBg,borderTop:`4px solid ${oe.error}`},children:[t.jsx("span",{className:"font-extrabold text-base",style:{color:oe.error},children:"GRAND TOTAL (Recurring)"}),t.jsx("span",{className:"font-extrabold text-base",style:{color:oe.error},children:h(y)})]}),t.jsxs("div",{className:"flex justify-between items-center px-4 py-3",style:{backgroundColor:oe.errorBg},children:[t.jsx("span",{className:"font-extrabold text-base",style:{color:oe.warning},children:"+ Capital Investments"}),t.jsx("span",{className:"font-extrabold text-base",style:{color:oe.warning},children:h(w)})]}),t.jsxs("div",{className:"flex justify-between items-center px-4 py-4",style:{backgroundColor:"rgba(248,113,113,0.18)",borderTop:`2px solid ${oe.error}`},children:[t.jsx("span",{className:"font-extrabold text-lg",style:{color:oe.error},children:"TOTAL EXPENSES"}),t.jsx("span",{className:"font-extrabold text-lg",style:{color:oe.error},children:h(b)})]})]})]})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 max-w-5xl mx-auto",children:[{icon:Ip,iconColor:oe.error,borderColor:oe.error,label:"Total Recurring Expenses",value:h(y),valueColor:oe.error,sub:null},{icon:Mi,iconColor:oe.warning,borderColor:oe.warning,label:"Capital Investments",value:h(w),valueColor:oe.warning,sub:null},{icon:Up,iconColor:oe.error,borderColor:oe.error,label:"Grand Total Spent",value:h(b),valueColor:oe.error,sub:null},{icon:_c,iconColor:oe.success,borderColor:oe.success,label:"Revenue / Funding",value:h(0),valueColor:oe.success,sub:"Zero. Nothing. Nada."}].map(({icon:N,iconColor:j,borderColor:x,label:m,value:k,valueColor:_,sub:E})=>t.jsxs("div",{className:"card glass-effect p-6 rounded-xl text-center border-l-4",style:{backgroundColor:i,boxShadow:v,borderColor:x},children:[t.jsx(N,{className:"w-8 h-8 mx-auto mb-2",style:{color:j}}),t.jsx("p",{className:"text-sm uppercase tracking-wide mb-1",style:{color:s,opacity:.6},children:m}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:_},children:k}),E&&t.jsx("p",{className:"text-xs mt-1 font-semibold",style:{color:oe.error},children:E})]},m))})})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Capital Investments (One-Time)"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-3xl mx-auto",children:[t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:oe.warningBg},children:t.jsx(Mi,{className:"w-5 h-5",style:{color:oe.warning}})}),t.jsx("h3",{className:"text-lg font-bold",style:{color:s},children:"IT Infrastructure"})]}),t.jsx("p",{className:"text-sm mb-2",style:{color:s,opacity:.75},children:"Laptops, computers, networking equipment — purchased since July 2022"}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:oe.warning},children:h(o.infraCost)}),t.jsx("p",{className:"text-xs mt-1",style:{color:s,opacity:.45},children:"Depreciating at 10%/year • 5%/year maintenance"})]}),t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:oe.infoBg},children:t.jsx(qp,{className:"w-5 h-5",style:{color:oe.info}})}),t.jsx("h3",{className:"text-lg font-bold",style:{color:s},children:"Fixtures & Furniture"})]}),t.jsx("p",{className:"text-sm mb-2",style:{color:s,opacity:.75},children:"Office furniture, fixtures, and setup — since July 2022"}),t.jsx("p",{className:"text-2xl font-extrabold",style:{color:oe.info},children:h(o.furnitureCost)}),t.jsx("p",{className:"text-xs mt-1",style:{color:s,opacity:.45},children:"Depreciating at 15%/year"})]})]})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-8",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",style:{color:s},children:"Monthly Recurring Expense Categories"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 max-w-5xl mx-auto",children:[{icon:Lp,iconBg:oe.primaryBg,iconColor:oe.primary,label:"Developer Salaries",desc:`3 devs (Jan 2022 – Jan 2026): ${h(o.salary3)}/mo
|
|
1091
|
+
2 devs (Feb 2026 – present): ${h(o.salary2)}/mo`},{icon:zp,iconBg:oe.errorBg,iconColor:oe.error,label:"Office Rent",desc:`${h(o.rent)}/month since July 2022`},{icon:Od,iconBg:oe.warningBg,iconColor:oe.warning,label:"Utilities",desc:`Internet, Electricity & Backup = ${h(o.utilities)}/mo`},{icon:Mp,iconBg:oe.infoBg,iconColor:oe.info,label:"VPS & Hosting",desc:`Hive witness, VSC witness, app backends — ${h(o.vps)}/mo`},{icon:Bp,iconBg:oe.successBg,iconColor:oe.success,label:"Dev Programs & Domains",desc:`Apple/Google dev programs ${h(o.devPrograms)} + Domains ${h(o.domains)} = ${h(o.devPrograms+o.domains)}/mo`},{icon:Mi,iconBg:oe.warningBg,iconColor:oe.warning,label:"Depreciation & Maintenance",desc:`IT infra: 10% depreciation + 5% maintenance/yr
|
|
1092
|
+
Furniture: 15% depreciation/yr`}].map(({icon:N,iconBg:j,iconColor:x,label:m,desc:k})=>t.jsxs("div",{className:"card glass-effect hover-lift p-5 rounded-xl",style:{backgroundColor:i,boxShadow:v},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[t.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{backgroundColor:j},children:t.jsx(N,{className:"w-5 h-5",style:{color:x}})}),t.jsx("h3",{className:"font-bold text-sm",style:{color:s},children:m})]}),t.jsx("p",{className:"text-xs whitespace-pre-line",style:{color:s,opacity:.7},children:k})]},m))})]})}),t.jsx("div",{className:"py-2",children:t.jsx("div",{className:"max-w-5xl mx-auto",style:{height:1,backgroundColor:r}})}),t.jsx("section",{className:"py-12",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsx("div",{className:"max-w-3xl mx-auto",children:t.jsxs("div",{className:"card glass-effect rounded-2xl p-8",style:{backgroundColor:i,boxShadow:v,border:`2px solid ${r}`},children:[t.jsxs("div",{className:"text-center mb-6",children:[t.jsx(Fp,{className:"w-12 h-12 mx-auto mb-4",style:{color:oe.error}}),t.jsx("h2",{className:"text-3xl font-extrabold mb-2",style:{color:oe.error},children:"The Hard Truth"})]}),t.jsxs("div",{className:"space-y-4 text-base",style:{color:s,opacity:.9},children:[t.jsxs("p",{children:["We have spent"," ",t.jsx("span",{className:"font-extrabold",style:{color:oe.error},children:h(b)})," ","of our own money building apps, running infrastructure, and supporting the Hive ecosystem."]}),t.jsxs("p",{children:["Except for 3Speak-funded projects —"," ",t.jsx("span",{className:"font-semibold",style:{color:s},children:"Distriator"}),","," ",t.jsx("span",{className:"font-semibold",style:{color:s},children:"CheckInWithXYZ"})," ","&"," ",t.jsx("span",{className:"font-semibold",style:{color:s},children:"3Speak"})," ","— we have"," ",t.jsx("span",{className:"font-extrabold",style:{color:oe.error},children:"never received any funding"})," ","for any of our other projects. Everything else has been entirely self-funded."]}),t.jsxs("p",{children:["We have"," ",t.jsx("span",{className:"font-bold",style:{color:oe.error},children:"never asked for DHF funding or any grants"}),". We have not monetized any of our apps. We have not put ads in our apps. Everything is free, open-source, and built for the Hive community."]}),t.jsxs("p",{children:["On top of all this, we are holding"," ",t.jsx("span",{className:"font-extrabold",style:{color:oe.accent},children:"Hive Power (staked HIVE) worth $11,000"})," ","— locked for 3 months — and we are continuously investing and increasing our stake in Hive. We don't just build on Hive, we put our money where our mouth is."]}),t.jsxs("p",{children:["Since July 2023, we also send approximately"," ",t.jsx("span",{className:"font-bold",style:{color:s},children:"$10 to $20 worth of support every month"})," ","to community initiatives like"," ",t.jsx("span",{className:"font-semibold",children:"Ladies of Hive"}),","," ",t.jsx("span",{className:"font-semibold",children:"Shadow Hunters"}),","," ",t.jsx("span",{className:"font-semibold",children:"Reflection Hunters"}),","," ",t.jsx("span",{className:"font-semibold",children:"Bird Watchers"}),","," ",t.jsx("span",{className:"font-semibold",children:"Power Plant Vegan"}),","," ",t.jsx("span",{className:"font-semibold",children:"India United"}),", and"," ",t.jsx("span",{className:"font-semibold",children:"Amazing Drinks"}),". On top of that, we actively support many Hive users by upvoting their content and rewarding them with Hive inflation through our curation efforts."]}),t.jsxs("p",{children:["This is not sustainable. We are running in"," ",t.jsx("span",{className:"font-extrabold",style:{color:oe.error},children:"heavy debt"}),". Every month, the expenses pile up — salaries, rent, hosting, infrastructure — and nothing comes back."]}),t.jsx("p",{className:"font-semibold",style:{color:s},children:"This is taking a heavy toll — financially, mentally, and emotionally. Building for years without any return is exhausting. But we keep going because we believe in Hive and its community."})]}),t.jsx("div",{className:"my-6",style:{height:1,backgroundColor:r}}),t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-2xl font-extrabold mb-3",style:{color:oe.accent},children:"All We Ask Is Your Witness Vote"}),t.jsxs("p",{className:"mb-6 max-w-lg mx-auto",style:{color:s,opacity:.85},children:["We have never asked for money. We are not asking for money now. Just your"," ",t.jsx("span",{className:"font-bold",style:{color:oe.accent},children:"Hive witness vote for @sagarkothari88"})," ","— that's it. That small gesture of support means the world to us and helps us keep building for the ecosystem."]}),t.jsxs("a",{href:"https://vote.hive.uno/@sagarkothari88",target:"_blank",rel:"noopener noreferrer",className:"btn btn-primary btn-lg gap-2",children:[t.jsx(_c,{className:"w-5 h-5"}),"Vote @sagarkothari88 as Witness"]})]})]})})})}),t.jsx("section",{className:"py-8",children:t.jsx("div",{className:"container mx-auto px-4",children:t.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[t.jsx("h3",{className:"text-xl font-bold mb-4",style:{color:s},children:"Debt vs Revenue"}),t.jsx("div",{className:"w-full rounded-full h-8 overflow-hidden mb-2",style:{backgroundColor:oe.progressTrack},children:t.jsx("div",{className:"h-full rounded-full flex items-center justify-end pr-3",style:{width:"100%",background:`linear-gradient(90deg, ${oe.error}, rgba(248,113,113,0.7))`},children:t.jsxs("span",{className:"text-xs font-bold text-white",children:["DEBT: ",h(b)]})})}),t.jsx("div",{className:"w-full rounded-full h-8 overflow-hidden",style:{backgroundColor:oe.progressTrack},children:t.jsx("div",{className:"h-full rounded-full flex items-center pl-3",style:{width:"2%",minWidth:"80px",backgroundColor:oe.success},children:t.jsx("span",{className:"text-xs font-bold text-white",children:h(0)})})}),t.jsxs("p",{className:"text-xs mt-2",style:{color:s,opacity:.45},children:["Revenue bar is at minimum width because the actual value is ",h(0)]})]})})}),t.jsx("div",{className:"py-20"})]})})]})},Bm=[{imagePath:Ne.hreplier,name:"hReplier",url:"https://hreplier.sagarkothari88.one/",description:`- Easily Manage your Hive Blog's replies
|
|
1093
1093
|
- We are working on Hive Inbox as Key contributors`},{imagePath:Ne.template,name:"hSnaps",url:"https://hsnaps.sagarkothari88.one/",description:`- A Snaps App for Hive Blockchain
|
|
1094
1094
|
- We are working on Hive Snaps as Key contributors`},{imagePath:Ne.hive_fest_fact_logo,name:"Hive Fest Fact",url:"https://hivefestfacts.sagarkothari88.one/",description:"- Hive Fest Facts is a platform dedicated to sharing interesting and informative facts about Hive Fest, the annual gathering of the Hive blockchain community."},{imagePath:Ne.hpolls_logo,name:"hPolls",url:"https://hpolls.sagarkothari88.one/",description:`- Create and manage polls on the Hive blockchain
|
|
1095
1095
|
- We are working on HPolls as Key contributors`},{imagePath:Ne.stats_logo,name:"hStats",url:"https://hive-stats.sagarkothari88.one/",description:`- View Statstics for any Hive User
|
|
@@ -1115,5 +1115,5 @@ Furniture: 15% depreciation/yr`}].map(({icon:N,iconBg:j,iconColor:x,label:m,desc
|
|
|
1115
1115
|
- costs $10 per month`,url:"https://vote.hive.uno/@sagarkothari88",useCircleBackground:!1},{imagePath:Ne.developers,name:"Additional Developers",description:`- In order to manage on going development, we've a team of developers, community managers
|
|
1116
1116
|
- As a team, we are able to make an impact
|
|
1117
1117
|
- Cost of developers is on us as a Contribution for Hive Community members`,url:"https://vote.hive.uno/@sagarkothari88",useCircleBackground:!1},{imagePath:Ne.template,name:"uptime with kuma",description:"- We provide transperancy to all the services which we provide for hive blockchain. With uptime, we show status of all the services we provide",url:"https://uptime.sagarkothari88.one/status/sagar",useCircleBackground:!1}],Kt={viewBox:"0 0 512 512",fill:"currentColor"},qm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 105c-101.8 0-185 82.2-185 185 0 101.8 82.2 185 185 185s185-82.2 185-185c0-102.8-82.2-185-185-185zm0 323c-76.2 0-138-61.8-138-138s61.8-138 138-138 138 61.8 138 138-61.8 138-138 138zm0-229c-50.2 0-91 40.8-91 91s40.8 91 91 91 91-40.8 91-91-40.8-91-91-91z"})}),Vm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm0 448c-106 0-192-86-192-192S150 64 256 64s192 86 192 192-86 192-192 192zm0-320c-70.7 0-128 57.3-128 128s57.3 128 128 128 128-57.3 128-128-57.3-128-128-128zm0 208c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80zm0-112c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"})}),Um=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 0l67 136 149 22-108 105 25 147-133-70-133 70 25-147-108-105 149-22z"})}),zm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M288 0l-64 224h96l-64 288 256-320h-96z"})}),Hm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M156 132l-64 64 64 64 20-20-44-44 44-44zm200 0l-20 20 44 44-44 44 20 20 64-64zm-244 76h288v-32H112z"})}),Wm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 0c-32 64-96 128-96 224v128l96 32 96-32V224c0-96-64-160-96-224z"})}),Gm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-64 64c-70.7 0-128 57.3-128 128v32h256v-32c0-70.7-57.3-128-128-128H192zm256 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm64 64c0-70.7-57.3-128-128-128-35.3 0-64 28.7-64 64s28.7 64 64 64h128v32z"})}),Jm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6","aria-hidden":!0,children:t.jsx("path",{d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64zm0 352c-88.2 0-160-71.8-160-160S167.8 96 256 96s160 71.8 160 160-71.8 160-160 160zm16-176h-96v-32h80V128h32v80h-16z"})}),Ym=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M128 0h32v64h192V0h32v64h32c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128c0-35.3 28.7-64 64-64h32V0zm288 128H96v320h320V128zm-256 64h64v64h-64v-64zm96 0h64v64h-64v-64zm-96 96h64v64h-64v-64zm96 0h64v64h-64v-64zm96-96h64v64h-64v-64zm0 96h64v64h-64v-64z"})}),Zm=()=>t.jsx("svg",{...Kt,className:"w-6 h-6",children:t.jsx("path",{d:"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm128 192l-160 160-64-64 22.6-22.6 41.4 41.4 137.4-137.4L384 192z"})}),Xm=[{icon:zm,title:"Simplicity Wins",desc:"Blockchain technology should feel as easy as using any modern mobile app."},{icon:Hm,title:"Open Ecosystem",desc:"All our apps are open source so developers can learn, extend, and build."},{icon:Wm,title:"Build First, Talk Later",desc:"We prefer shipping real products and improving with community feedback."},{icon:Gm,title:"Community Over Ownership",desc:"These are tools built for the entire Hive ecosystem, not closed platforms."}],Qm=[{name:"Distriator",logo:Ne.distriator_logo},{name:"CheckInWithXYZ",logo:Ne.checkinwithxyz},{name:"hReplier",logo:Ne.hreplier},{name:"hStats",logo:Ne.stats_logo},{name:"hPolls",logo:Ne.hpolls_logo},{name:"hFestFacts",logo:Ne.hive_fest_fact_logo},{name:"hSnaps",logo:Ne.template}],Km=[{name:"hApprover",desc:"Approve Hive transactions from your phone",logo:Ne.happrover_logo},{name:"hCurators",desc:`- Request to curate content on behalf of them for their communities.
|
|
1118
|
-
- We have staked Hive Power to curate & reward Hive content creators`,logo:Ne.vote_logo}],eg=["hSurvey","hChat","hShorts","hVideos","hGovernance","hFind","hMarketPlace"],Qs="#f87171",tg=({backgroundColor:e="#020617",textColor:a="#e5e7eb",cardBackgroundColor:s="rgba(15,23,42,0.85)",isDividerShow:i=!0,dividerColor:r="rgba(148,163,184,0.4)",isExpensesCTA:n=!1})=>{const u="0 18px 45px rgba(0,0,0,0.6)",[c,d]=T.useState(!1);return t.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[t.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundColor:e}}),t.jsx("div",{className:"fixed inset-0 z-10 backdrop-blur-md",style:{backgroundColor:"rgba(15,23,42,0.6)"}}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-br from-base-100 via-transparent to-base-100/10"}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-b from-base-100 via-transparent to-base-100/10"}),t.jsxs("div",{className:"relative z-30",style:{color:a},children:[t.jsx("main",{className:"min-h-screen",children:
|
|
1119
|
-
`).map((o,h)=>t.jsxs("span",{children:[h>0&&t.jsx("br",{}),o]},h))})]},f.name))}),t.jsx("p",{className:"mt-8 mb-4 text-center text-sm font-medium uppercase tracking-wide text-base-content/60",children:"Planned"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:eg.map(f=>t.jsxs("div",{className:"flex items-center gap-3 glass-effect hover-lift px-5 py-4 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsx("span",{className:"shrink-0 inline-flex items-center justify-center bg-sky-500/20 p-1.5 rounded-full text-sky-400 [&_svg]:w-5 [&_svg]:h-5 [&_svg]:shrink-0",children:t.jsx(Ym,{})}),t.jsx("span",{className:"font-medium text-base-content",children:f}),t.jsx("span",{className:"ml-auto shrink-0 badge badge-info badge-outline text-xs",children:"Planned"})]},f))})]})]})}),i&&t.jsx("div",{className:"py-4",children:t.jsx("div",{style:{height:1,width:"100%",maxWidth:"72rem",margin:"0 auto",backgroundColor:r,opacity:.8}})}),t.jsxs("section",{className:"py-12",children:[t.jsx("div",{className:"container mx-auto px-4 text-center mb-12",children:t.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Contributions by @sagarkothari88 & team"})}),t.jsx(
|
|
1118
|
+
- We have staked Hive Power to curate & reward Hive content creators`,logo:Ne.vote_logo}],eg=["hSurvey","hChat","hShorts","hVideos","hGovernance","hFind","hMarketPlace"],Qs="#f87171",tg=({backgroundColor:e="#020617",textColor:a="#e5e7eb",cardBackgroundColor:s="rgba(15,23,42,0.85)",isDividerShow:i=!0,dividerColor:r="rgba(148,163,184,0.4)",isExpensesCTA:n=!1})=>{const u="0 18px 45px rgba(0,0,0,0.6)",[c,d]=T.useState(!1);return c?t.jsx(Fm,{onBack:()=>d(!1),backgroundColor:e,textColor:a,cardBackgroundColor:s,dividerColor:r}):t.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[t.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundColor:e}}),t.jsx("div",{className:"fixed inset-0 z-10 backdrop-blur-md",style:{backgroundColor:"rgba(15,23,42,0.6)"}}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-br from-base-100 via-transparent to-base-100/10"}),t.jsx("div",{className:"fixed inset-0 z-20 bg-gradient-to-b from-base-100 via-transparent to-base-100/10"}),t.jsxs("div",{className:"relative z-30",style:{color:a},children:[t.jsx("main",{className:"min-h-screen",children:t.jsxs(t.Fragment,{children:[i&&t.jsx("div",{className:"py-8",children:t.jsx("div",{style:{height:1,width:"100%",maxWidth:"72rem",margin:"0 auto",backgroundColor:r,opacity:.8}})}),t.jsx("section",{className:"py-12",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",children:"Our Vision & Mission"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:[t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/20 flex items-center justify-center text-primary",children:t.jsx(qm,{})}),t.jsx("h3",{className:"text-xl font-bold text-base-content",children:"Vision"})]}),t.jsx("p",{className:"text-base-content font-semibold mb-2",children:"Make Hive accessible to the world through simple, powerful applications."}),t.jsx("p",{className:"text-base-content/70",children:"We aim to bridge the gap between traditional social apps and decentralized technologies by creating familiar, easy-to-use products."})]}),t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/20 flex items-center justify-center text-primary",children:t.jsx(Vm,{})}),t.jsx("h3",{className:"text-xl font-bold text-base-content",children:"Mission"})]}),t.jsx("p",{className:"text-base-content font-semibold mb-2",children:"Build open, user-friendly applications that help Hive reach Web2 audiences."}),t.jsx("p",{className:"text-base-content/70",children:"Everything we build is open source and community driven."})]})]}),t.jsx("div",{className:"max-w-4xl mx-auto mt-6",children:t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/20 flex items-center justify-center text-primary",children:t.jsx(Um,{})}),t.jsx("h3",{className:"text-xl font-bold text-base-content",children:"Goal"})]}),t.jsx("p",{className:"text-base-content font-semibold mb-2",children:"Help Hive grow by making it easier for Web2 users to discover and use."}),t.jsx("p",{className:"text-base-content/70",children:"Built without external funding, with passion for Hive, for the entire community, and completely open source."})]})}),n&&t.jsx("div",{className:"max-w-4xl mx-auto mt-6",children:t.jsx("button",{type:"button",onClick:()=>d(!0),className:"w-full text-left",children:t.jsx("div",{className:"card glass-effect hover-lift p-6 rounded-xl border-2 transition-colors",style:{backgroundColor:s,borderColor:r,boxShadow:u},children:t.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[t.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:r},children:t.jsx("span",{className:"text-xl font-bold",style:{color:Qs},children:"₹"})}),t.jsxs("div",{className:"text-center sm:text-left flex-1",children:[t.jsx("h3",{className:"text-xl font-bold",style:{color:Qs},children:"Running in Heavy Debt — See Our Expenses"}),t.jsx("p",{className:"text-sm mt-1",style:{color:a},children:"We have spent our own money with zero revenue. No funding, no ads, no monetization. Open this transparent breakdown to understand how much it really costs."})]}),t.jsx("span",{className:"btn btn-outline btn-sm shrink-0",style:{color:Qs,borderColor:Qs,backgroundColor:"rgba(233, 57, 57, 0.26)"},children:"View Expenses →"})]})})})})]})}),i&&t.jsx("div",{className:"py-4",children:t.jsx("div",{style:{height:1,width:"100%",maxWidth:"72rem",margin:"0 auto",backgroundColor:r,opacity:.8}})}),t.jsx("section",{className:"py-12",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",children:"What We Believe"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 max-w-5xl mx-auto",children:Xm.map(({icon:f,title:o,desc:h})=>t.jsxs("div",{className:"card glass-effect hover-lift p-6 rounded-xl text-center",style:{backgroundColor:s,boxShadow:u},children:[t.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/20 flex items-center justify-center mx-auto mb-4 text-primary",children:t.jsx(f,{})}),t.jsx("h3",{className:"text-lg font-bold text-base-content mb-2",children:o}),t.jsx("p",{className:"text-base-content/70 text-sm",children:h})]},o))})]})}),i&&t.jsx("div",{className:"py-4",children:t.jsx("div",{style:{height:1,width:"100%",maxWidth:"72rem",margin:"0 auto",backgroundColor:r,opacity:.8}})}),t.jsx("section",{className:"py-12",children:t.jsxs("div",{className:"container mx-auto px-4",children:[t.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-4",children:"Apps We've Built & What's Coming"}),t.jsx("p",{className:"text-base-content/70 text-center mb-12 max-w-xl mx-auto",children:"We focus on building multiple specialized apps, each solving a specific problem."}),t.jsxs("div",{className:"max-w-5xl mx-auto",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Qm.map(f=>t.jsxs("div",{className:"flex items-center gap-3 glass-effect hover-lift px-5 py-4 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsx("span",{className:"shrink-0 text-success [&_svg]:w-5 [&_svg]:h-5 inline-flex text-green-500",children:t.jsx(Zm,{})}),t.jsx("img",{src:f.logo,alt:f.name,className:"w-8 h-8 shrink-0 rounded-lg object-contain"}),t.jsx("span",{className:"font-medium text-base-content",children:f.name}),t.jsx("span",{className:"ml-auto shrink-0 badge badge-success badge-outline text-xs",children:"Delivered"})]},f.name))}),t.jsx("p",{className:"mt-8 mb-4 text-center text-sm font-medium uppercase tracking-wide text-base-content/60",children:"In Development"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 max-w-2xl mx-auto",children:Km.map(f=>t.jsxs("div",{className:"glass-effect hover-lift px-5 py-4 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"shrink-0 inline-flex items-center justify-center bg-amber-500/20 p-1.5 rounded-full text-amber-400 [&_svg]:w-5 [&_svg]:h-5 [&_svg]:shrink-0",children:t.jsx(Jm,{})}),t.jsx("img",{src:f.logo,alt:f.name,className:"w-8 h-8 shrink-0 rounded-lg object-contain"}),t.jsx("span",{className:"font-medium text-base-content",children:f.name})]}),t.jsx("span",{className:"shrink-0 badge badge-warning badge-outline text-xs",children:"In Dev"})]}),t.jsx("p",{className:"mt-2 text-sm text-base-content/70 ml-8",children:f.desc.split(`
|
|
1119
|
+
`).map((o,h)=>t.jsxs("span",{children:[h>0&&t.jsx("br",{}),o]},h))})]},f.name))}),t.jsx("p",{className:"mt-8 mb-4 text-center text-sm font-medium uppercase tracking-wide text-base-content/60",children:"Planned"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:eg.map(f=>t.jsxs("div",{className:"flex items-center gap-3 glass-effect hover-lift px-5 py-4 rounded-xl",style:{backgroundColor:s,boxShadow:u},children:[t.jsx("span",{className:"shrink-0 inline-flex items-center justify-center bg-sky-500/20 p-1.5 rounded-full text-sky-400 [&_svg]:w-5 [&_svg]:h-5 [&_svg]:shrink-0",children:t.jsx(Ym,{})}),t.jsx("span",{className:"font-medium text-base-content",children:f}),t.jsx("span",{className:"ml-auto shrink-0 badge badge-info badge-outline text-xs",children:"Planned"})]},f))})]})]})}),i&&t.jsx("div",{className:"py-4",children:t.jsx("div",{style:{height:1,width:"100%",maxWidth:"72rem",margin:"0 auto",backgroundColor:r,opacity:.8}})}),t.jsxs("section",{className:"py-12",children:[t.jsx("div",{className:"container mx-auto px-4 text-center mb-12",children:t.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Contributions by @sagarkothari88 & team"})}),t.jsx(Sm,{apps:Bm,cardBackgroundColor:s,cardShadow:u})]}),t.jsx("div",{className:"py-20"})]})}),t.jsx(Cm,{})]})]})},rg=1,ag=1e6;let Fi=0;function sg(){return Fi=(Fi+1)%Number.MAX_SAFE_INTEGER,Fi.toString()}const Bi=new Map,Oc=e=>{if(Bi.has(e))return;const a=setTimeout(()=>{Bi.delete(e),as({type:"REMOVE_TOAST",toastId:e})},ag);Bi.set(e,a)},Hd=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,rg)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=a;return s?Oc(s):e.toasts.forEach(i=>{Oc(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==a.toastId)}}},rn=[];let an={toasts:[]};function as(e){an=Hd(an,e),rn.forEach(a=>{a(an)})}function Wd({...e}){const a=sg(),s=r=>as({type:"UPDATE_TOAST",toast:{...r,id:a}}),i=()=>as({type:"DISMISS_TOAST",toastId:a});return as({type:"ADD_TOAST",toast:{...e,id:a,open:!0,onOpenChange:r=>{r||i()}}}),{id:a,dismiss:i,update:s}}function ng(){const[e,a]=sn.useState(an);return sn.useEffect(()=>(rn.push(a),()=>{const s=rn.indexOf(a);s>-1&&rn.splice(s,1)}),[e]),{...e,toast:Wd,dismiss:s=>as({type:"DISMISS_TOAST",toastId:s})}}exports.ActivityList=rm;exports.ApiVideoFeedType=Xe;exports.CommentsList=jm;exports.CommentsModal=ho;exports.CommunitiesList=xm;exports.CommunityAbout=Rd;exports.CommunityDetail=ym;exports.CommunityMembers=Fd;exports.CommunityPostDetails=vm;exports.CommunityTeam=Id;exports.FavouriteWidget=go;exports.FollowersList=Kp;exports.FollowingList=em;exports.HiveContributionsLanding=tg;exports.HiveToolbar=mm;exports.ListOfWitnesses=nm;exports.Modal=Sd;exports.PostActionButton=gm;exports.PostFeedList=Ld;exports.ProposalsList=Xp;exports.TransactionHistory=um;exports.UpvoteList=Nm;exports.UpvoteListModal=po;exports.UserAccount=km;exports.UserChannel=dm;exports.UserFollowers=Bd;exports.UserFollowing=qd;exports.UserInfo=Vd;exports.UserProfilePage=_m;exports.VideoCard=$c;exports.VideoDetail=jp;exports.VideoFeed=fn;exports.VideoInfo=Rc;exports.Wallet=Yp;exports.apiService=Pe;exports.reducer=Hd;exports.server=dr;exports.toast=Wd;exports.useIsMobile=$d;exports.useToast=ng;exports.useWalletStore=Pd;exports.witnessService=pt;
|